@wordpress/block-editor 12.2.0 → 12.3.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 (1881) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +12 -0
  3. package/build/autocompleters/block.js +6 -6
  4. package/build/autocompleters/block.js.map +1 -1
  5. package/build/components/alignment-control/index.js +4 -6
  6. package/build/components/alignment-control/index.js.map +1 -1
  7. package/build/components/alignment-control/ui.js +14 -20
  8. package/build/components/alignment-control/ui.js.map +1 -1
  9. package/build/components/autocomplete/index.js +5 -8
  10. package/build/components/autocomplete/index.js.map +1 -1
  11. package/build/components/block-actions/index.js +12 -12
  12. package/build/components/block-actions/index.js.map +1 -1
  13. package/build/components/block-alignment-control/constants.js +1 -5
  14. package/build/components/block-alignment-control/constants.js.map +1 -1
  15. package/build/components/block-alignment-control/index.js +4 -6
  16. package/build/components/block-alignment-control/index.js.map +1 -1
  17. package/build/components/block-alignment-control/ui.js +20 -25
  18. package/build/components/block-alignment-control/ui.js.map +1 -1
  19. package/build/components/block-alignment-control/ui.native.js +17 -20
  20. package/build/components/block-alignment-control/ui.native.js.map +1 -1
  21. package/build/components/block-alignment-control/use-available-alignments.js +5 -10
  22. package/build/components/block-alignment-control/use-available-alignments.js.map +1 -1
  23. package/build/components/block-alignment-matrix-control/index.js +4 -7
  24. package/build/components/block-alignment-matrix-control/index.js.map +1 -1
  25. package/build/components/block-breadcrumb/index.js +5 -7
  26. package/build/components/block-breadcrumb/index.js.map +1 -1
  27. package/build/components/block-caption/index.native.js +30 -35
  28. package/build/components/block-caption/index.native.js.map +1 -1
  29. package/build/components/block-card/index.js +7 -9
  30. package/build/components/block-card/index.js.map +1 -1
  31. package/build/components/block-compare/block-view.js +8 -9
  32. package/build/components/block-compare/block-view.js.map +1 -1
  33. package/build/components/block-compare/index.js +7 -9
  34. package/build/components/block-compare/index.js.map +1 -1
  35. package/build/components/block-context/index.js +4 -5
  36. package/build/components/block-context/index.js.map +1 -1
  37. package/build/components/block-controls/fill.js +16 -22
  38. package/build/components/block-controls/fill.js.map +1 -1
  39. package/build/components/block-controls/hook.js +1 -3
  40. package/build/components/block-controls/hook.js.map +1 -1
  41. package/build/components/block-controls/index.js +8 -8
  42. package/build/components/block-controls/index.js.map +1 -1
  43. package/build/components/block-controls/slot.js +28 -20
  44. package/build/components/block-controls/slot.js.map +1 -1
  45. package/build/components/block-controls/slot.native.js +9 -17
  46. package/build/components/block-controls/slot.native.js.map +1 -1
  47. package/build/components/block-draggable/draggable-chip.js +5 -6
  48. package/build/components/block-draggable/draggable-chip.js.map +1 -1
  49. package/build/components/block-draggable/draggable-chip.native.js +3 -4
  50. package/build/components/block-draggable/draggable-chip.native.js.map +1 -1
  51. package/build/components/block-draggable/dropping-insertion-point.native.js +6 -7
  52. package/build/components/block-draggable/dropping-insertion-point.native.js.map +1 -1
  53. package/build/components/block-draggable/index.js +15 -16
  54. package/build/components/block-draggable/index.js.map +1 -1
  55. package/build/components/block-draggable/index.native.js +43 -58
  56. package/build/components/block-draggable/index.native.js.map +1 -1
  57. package/build/components/block-edit/edit.js +5 -10
  58. package/build/components/block-edit/edit.js.map +1 -1
  59. package/build/components/block-edit/edit.native.js +3 -8
  60. package/build/components/block-edit/edit.native.js.map +1 -1
  61. package/build/components/block-edit/index.js +3 -2
  62. package/build/components/block-edit/index.js.map +1 -1
  63. package/build/components/block-edit-visually-button/index.js +3 -4
  64. package/build/components/block-edit-visually-button/index.js.map +1 -1
  65. package/build/components/block-full-height-alignment-control/index.js +6 -7
  66. package/build/components/block-full-height-alignment-control/index.js.map +1 -1
  67. package/build/components/block-heading-level-dropdown/heading-level-icon.js +47 -0
  68. package/build/components/block-heading-level-dropdown/heading-level-icon.js.map +1 -0
  69. package/build/components/block-heading-level-dropdown/index.js +83 -0
  70. package/build/components/block-heading-level-dropdown/index.js.map +1 -0
  71. package/build/components/block-heading-level-dropdown/index.native.js +72 -0
  72. package/build/components/block-heading-level-dropdown/index.native.js.map +1 -0
  73. package/build/components/block-icon/index.js +7 -11
  74. package/build/components/block-icon/index.js.map +1 -1
  75. package/build/components/block-icon/index.native.js +15 -20
  76. package/build/components/block-icon/index.native.js.map +1 -1
  77. package/build/components/block-info-slot-fill/index.js +4 -2
  78. package/build/components/block-info-slot-fill/index.js.map +1 -1
  79. package/build/components/block-inspector/index.js +45 -122
  80. package/build/components/block-inspector/index.js.map +1 -1
  81. package/build/components/block-inspector/useBlockInspectorAnimationSettings.js +2 -2
  82. package/build/components/block-inspector/useBlockInspectorAnimationSettings.js.map +1 -1
  83. package/build/components/block-list/block-html.js +3 -4
  84. package/build/components/block-list/block-html.js.map +1 -1
  85. package/build/components/block-list/block-invalid-warning.js +3 -4
  86. package/build/components/block-list/block-invalid-warning.js.map +1 -1
  87. package/build/components/block-list/block-invalid-warning.native.js +10 -15
  88. package/build/components/block-list/block-invalid-warning.native.js.map +1 -1
  89. package/build/components/block-list/block-list-context.native.js +5 -11
  90. package/build/components/block-list/block-list-context.native.js.map +1 -1
  91. package/build/components/block-list/block-list-item-cell.native.js +5 -6
  92. package/build/components/block-list/block-list-item-cell.native.js.map +1 -1
  93. package/build/components/block-list/block-list-item.native.js +21 -20
  94. package/build/components/block-list/block-list-item.native.js.map +1 -1
  95. package/build/components/block-list/block-outline.native.js +8 -9
  96. package/build/components/block-list/block-outline.native.js.map +1 -1
  97. package/build/components/block-list/block-selection-button.native.js +10 -12
  98. package/build/components/block-list/block-selection-button.native.js.map +1 -1
  99. package/build/components/block-list/block.js +45 -50
  100. package/build/components/block-list/block.js.map +1 -1
  101. package/build/components/block-list/block.native.js +56 -68
  102. package/build/components/block-list/block.native.js.map +1 -1
  103. package/build/components/block-list/index.js +18 -18
  104. package/build/components/block-list/index.js.map +1 -1
  105. package/build/components/block-list/index.native.js +80 -90
  106. package/build/components/block-list/index.native.js.map +1 -1
  107. package/build/components/block-list/insertion-point.native.js +4 -5
  108. package/build/components/block-list/insertion-point.native.js.map +1 -1
  109. package/build/components/block-list/layout.js +6 -9
  110. package/build/components/block-list/layout.js.map +1 -1
  111. package/build/components/block-list/subdirectory-icon.js +11 -17
  112. package/build/components/block-list/subdirectory-icon.js.map +1 -1
  113. package/build/components/block-list/use-block-props/index.js +15 -11
  114. package/build/components/block-list/use-block-props/index.js.map +1 -1
  115. package/build/components/block-list/use-block-props/index.native.js +1 -2
  116. package/build/components/block-list/use-block-props/index.native.js.map +1 -1
  117. package/build/components/block-list/use-block-props/use-block-custom-class-name.js +2 -2
  118. package/build/components/block-list/use-block-props/use-block-custom-class-name.js.map +1 -1
  119. package/build/components/block-list/use-block-props/use-block-default-class-name.js +1 -1
  120. package/build/components/block-list/use-block-props/use-block-default-class-name.js.map +1 -1
  121. package/build/components/block-list/use-in-between-inserter.js +2 -6
  122. package/build/components/block-list/use-in-between-inserter.js.map +1 -1
  123. package/build/components/block-list-appender/index.js +36 -33
  124. package/build/components/block-list-appender/index.js.map +1 -1
  125. package/build/components/block-list-appender/index.native.js +9 -11
  126. package/build/components/block-list-appender/index.native.js.map +1 -1
  127. package/build/components/block-lock/menu-item.js +3 -4
  128. package/build/components/block-lock/menu-item.js.map +1 -1
  129. package/build/components/block-lock/modal.js +6 -9
  130. package/build/components/block-lock/modal.js.map +1 -1
  131. package/build/components/block-lock/toolbar.js +4 -10
  132. package/build/components/block-lock/toolbar.js.map +1 -1
  133. package/build/components/block-mobile-toolbar/block-actions-menu.native.js +50 -68
  134. package/build/components/block-mobile-toolbar/block-actions-menu.native.js.map +1 -1
  135. package/build/components/block-mobile-toolbar/index.native.js +26 -34
  136. package/build/components/block-mobile-toolbar/index.native.js.map +1 -1
  137. package/build/components/block-mover/button.js +18 -19
  138. package/build/components/block-mover/button.js.map +1 -1
  139. package/build/components/block-mover/index.js +16 -18
  140. package/build/components/block-mover/index.js.map +1 -1
  141. package/build/components/block-mover/index.native.js +23 -46
  142. package/build/components/block-mover/index.native.js.map +1 -1
  143. package/build/components/block-mover/mover-description.native.js +7 -10
  144. package/build/components/block-mover/mover-description.native.js.map +1 -1
  145. package/build/components/block-navigation/dropdown.js +22 -29
  146. package/build/components/block-navigation/dropdown.js.map +1 -1
  147. package/build/components/block-parent-selector/index.js +6 -7
  148. package/build/components/block-parent-selector/index.js.map +1 -1
  149. package/build/components/block-pattern-setup/index.js +33 -39
  150. package/build/components/block-pattern-setup/index.js.map +1 -1
  151. package/build/components/block-pattern-setup/setup-toolbar.js +35 -42
  152. package/build/components/block-pattern-setup/setup-toolbar.js.map +1 -1
  153. package/build/components/block-patterns-list/index.js +76 -85
  154. package/build/components/block-patterns-list/index.js.map +1 -1
  155. package/build/components/block-popover/drop-zone.js +4 -5
  156. package/build/components/block-popover/drop-zone.js.map +1 -1
  157. package/build/components/block-popover/inbetween.js +14 -21
  158. package/build/components/block-popover/inbetween.js.map +1 -1
  159. package/build/components/block-popover/index.js +18 -21
  160. package/build/components/block-popover/index.js.map +1 -1
  161. package/build/components/block-preview/auto.js +8 -12
  162. package/build/components/block-preview/auto.js.map +1 -1
  163. package/build/components/block-preview/index.js +21 -24
  164. package/build/components/block-preview/index.js.map +1 -1
  165. package/build/components/block-quick-navigation/index.js +83 -0
  166. package/build/components/block-quick-navigation/index.js.map +1 -0
  167. package/build/components/block-removal-warning-modal/index.js +90 -0
  168. package/build/components/block-removal-warning-modal/index.js.map +1 -0
  169. package/build/components/block-selection-clearer/index.js +4 -7
  170. package/build/components/block-selection-clearer/index.js.map +1 -1
  171. package/build/components/block-settings/button.native.js +10 -12
  172. package/build/components/block-settings/button.native.js.map +1 -1
  173. package/build/components/block-settings/container.native.js +6 -6
  174. package/build/components/block-settings/container.native.js.map +1 -1
  175. package/build/components/block-settings-menu/block-convert-button.js +5 -7
  176. package/build/components/block-settings-menu/block-convert-button.js.map +1 -1
  177. package/build/components/block-settings-menu/block-html-convert-button.js +10 -14
  178. package/build/components/block-settings-menu/block-html-convert-button.js.map +1 -1
  179. package/build/components/block-settings-menu/block-mode-toggle.js +19 -25
  180. package/build/components/block-settings-menu/block-mode-toggle.js.map +1 -1
  181. package/build/components/block-settings-menu/block-settings-dropdown.js +136 -116
  182. package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  183. package/build/components/block-settings-menu/index.js +8 -10
  184. package/build/components/block-settings-menu/index.js.map +1 -1
  185. package/build/components/block-settings-menu-controls/index.js +18 -21
  186. package/build/components/block-settings-menu-controls/index.js.map +1 -1
  187. package/build/components/block-styles/index.js +6 -7
  188. package/build/components/block-styles/index.js.map +1 -1
  189. package/build/components/block-styles/index.native.js +5 -7
  190. package/build/components/block-styles/index.native.js.map +1 -1
  191. package/build/components/block-styles/menu-items.js +4 -5
  192. package/build/components/block-styles/menu-items.js.map +1 -1
  193. package/build/components/block-styles/preview-panel.js +7 -10
  194. package/build/components/block-styles/preview-panel.js.map +1 -1
  195. package/build/components/block-styles/preview.native.js +6 -7
  196. package/build/components/block-styles/preview.native.js.map +1 -1
  197. package/build/components/block-styles/use-styles-for-block.js +7 -9
  198. package/build/components/block-styles/use-styles-for-block.js.map +1 -1
  199. package/build/components/block-styles/utils.js +4 -7
  200. package/build/components/block-styles/utils.js.map +1 -1
  201. package/build/components/block-switcher/block-styles-menu.js +4 -5
  202. package/build/components/block-switcher/block-styles-menu.js.map +1 -1
  203. package/build/components/block-switcher/block-transformations-menu.js +24 -29
  204. package/build/components/block-switcher/block-transformations-menu.js.map +1 -1
  205. package/build/components/block-switcher/block-transformations-menu.native.js +9 -10
  206. package/build/components/block-switcher/block-transformations-menu.native.js.map +1 -1
  207. package/build/components/block-switcher/block-variation-transformations.js +21 -30
  208. package/build/components/block-switcher/block-variation-transformations.js.map +1 -1
  209. package/build/components/block-switcher/index.js +48 -62
  210. package/build/components/block-switcher/index.js.map +1 -1
  211. package/build/components/block-switcher/pattern-transformations-menu.js +24 -30
  212. package/build/components/block-switcher/pattern-transformations-menu.js.map +1 -1
  213. package/build/components/block-switcher/preview-block-popover.js +3 -4
  214. package/build/components/block-switcher/preview-block-popover.js.map +1 -1
  215. package/build/components/block-switcher/utils.js +2 -3
  216. package/build/components/block-switcher/utils.js.map +1 -1
  217. package/build/components/block-title/index.js +5 -6
  218. package/build/components/block-title/index.js.map +1 -1
  219. package/build/components/block-title/use-block-display-title.js +5 -6
  220. package/build/components/block-title/use-block-display-title.js.map +1 -1
  221. package/build/components/block-toolbar/index.js +8 -10
  222. package/build/components/block-toolbar/index.js.map +1 -1
  223. package/build/components/block-toolbar/utils.js +14 -16
  224. package/build/components/block-toolbar/utils.js.map +1 -1
  225. package/build/components/block-tools/back-compat.js +3 -4
  226. package/build/components/block-tools/back-compat.js.map +1 -1
  227. package/build/components/block-tools/block-contextual-toolbar.js +9 -11
  228. package/build/components/block-tools/block-contextual-toolbar.js.map +1 -1
  229. package/build/components/block-tools/block-selection-button.js +10 -14
  230. package/build/components/block-tools/block-selection-button.js.map +1 -1
  231. package/build/components/block-tools/index.js +19 -13
  232. package/build/components/block-tools/index.js.map +1 -1
  233. package/build/components/block-tools/insertion-point.js +12 -15
  234. package/build/components/block-tools/insertion-point.js.map +1 -1
  235. package/build/components/block-tools/selected-block-popover.js +27 -28
  236. package/build/components/block-tools/selected-block-popover.js.map +1 -1
  237. package/build/components/block-tools/use-block-toolbar-popover-props.js +9 -14
  238. package/build/components/block-tools/use-block-toolbar-popover-props.js.map +1 -1
  239. package/build/components/block-tools/zoom-out-mode-inserters.js +3 -4
  240. package/build/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
  241. package/build/components/block-types-list/index.js +8 -9
  242. package/build/components/block-types-list/index.js.map +1 -1
  243. package/build/components/block-types-list/index.native.js +26 -33
  244. package/build/components/block-types-list/index.native.js.map +1 -1
  245. package/build/components/block-variation-picker/index.js +8 -9
  246. package/build/components/block-variation-picker/index.js.map +1 -1
  247. package/build/components/block-variation-picker/index.native.js +7 -9
  248. package/build/components/block-variation-picker/index.native.js.map +1 -1
  249. package/build/components/block-variation-transforms/index.js +30 -41
  250. package/build/components/block-variation-transforms/index.js.map +1 -1
  251. package/build/components/block-vertical-alignment-control/index.js +4 -6
  252. package/build/components/block-vertical-alignment-control/index.js.map +1 -1
  253. package/build/components/block-vertical-alignment-control/ui.js +12 -21
  254. package/build/components/block-vertical-alignment-control/ui.js.map +1 -1
  255. package/build/components/border-radius-control/all-input-control.js +9 -14
  256. package/build/components/border-radius-control/all-input-control.js.map +1 -1
  257. package/build/components/border-radius-control/index.js +9 -10
  258. package/build/components/border-radius-control/index.js.map +1 -1
  259. package/build/components/border-radius-control/input-controls.js +10 -17
  260. package/build/components/border-radius-control/input-controls.js.map +1 -1
  261. package/build/components/border-radius-control/linked-button.js +6 -11
  262. package/build/components/border-radius-control/linked-button.js.map +1 -1
  263. package/build/components/border-radius-control/utils.js +3 -7
  264. package/build/components/border-radius-control/utils.js.map +1 -1
  265. package/build/components/button-block-appender/index.js +13 -15
  266. package/build/components/button-block-appender/index.js.map +1 -1
  267. package/build/components/button-block-appender/index.native.js +25 -29
  268. package/build/components/button-block-appender/index.native.js.map +1 -1
  269. package/build/components/caption/index.native.js +40 -43
  270. package/build/components/caption/index.native.js.map +1 -1
  271. package/build/components/child-layout-control/index.js +5 -6
  272. package/build/components/child-layout-control/index.js.map +1 -1
  273. package/build/components/color-palette/control.js +7 -10
  274. package/build/components/color-palette/control.js.map +1 -1
  275. package/build/components/color-palette/with-color-context.js +3 -11
  276. package/build/components/color-palette/with-color-context.js.map +1 -1
  277. package/build/components/color-style-selector/index.js +28 -35
  278. package/build/components/color-style-selector/index.js.map +1 -1
  279. package/build/components/colors/utils.js +12 -11
  280. package/build/components/colors/utils.js.map +1 -1
  281. package/build/components/colors/with-colors.js +20 -40
  282. package/build/components/colors/with-colors.js.map +1 -1
  283. package/build/components/colors-gradients/control.js +26 -27
  284. package/build/components/colors-gradients/control.js.map +1 -1
  285. package/build/components/colors-gradients/dropdown.js +44 -50
  286. package/build/components/colors-gradients/dropdown.js.map +1 -1
  287. package/build/components/colors-gradients/panel-color-gradient-settings.js +27 -30
  288. package/build/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
  289. package/build/components/colors-gradients/panel-color-gradient-settings.native.js +27 -31
  290. package/build/components/colors-gradients/panel-color-gradient-settings.native.js.map +1 -1
  291. package/build/components/contrast-checker/index.js +12 -13
  292. package/build/components/contrast-checker/index.js.map +1 -1
  293. package/build/components/contrast-checker/index.native.js +16 -18
  294. package/build/components/contrast-checker/index.native.js.map +1 -1
  295. package/build/components/convert-to-group-buttons/index.js +9 -10
  296. package/build/components/convert-to-group-buttons/index.js.map +1 -1
  297. package/build/components/convert-to-group-buttons/index.native.js +6 -7
  298. package/build/components/convert-to-group-buttons/index.native.js.map +1 -1
  299. package/build/components/convert-to-group-buttons/toolbar.js +6 -12
  300. package/build/components/convert-to-group-buttons/toolbar.js.map +1 -1
  301. package/build/components/convert-to-group-buttons/use-convert-to-group-button-props.js +4 -6
  302. package/build/components/convert-to-group-buttons/use-convert-to-group-button-props.js.map +1 -1
  303. package/build/components/copy-handler/index.js +9 -13
  304. package/build/components/copy-handler/index.js.map +1 -1
  305. package/build/components/date-format-picker/index.js +12 -16
  306. package/build/components/date-format-picker/index.js.map +1 -1
  307. package/build/components/default-block-appender/index.js +7 -9
  308. package/build/components/default-block-appender/index.js.map +1 -1
  309. package/build/components/default-block-appender/index.native.js +8 -10
  310. package/build/components/default-block-appender/index.native.js.map +1 -1
  311. package/build/components/default-style-picker/index.js +14 -22
  312. package/build/components/default-style-picker/index.js.map +1 -1
  313. package/build/components/duotone/components.js +14 -18
  314. package/build/components/duotone/components.js.map +1 -1
  315. package/build/components/duotone/utils.js +1 -2
  316. package/build/components/duotone/utils.js.map +1 -1
  317. package/build/components/duotone-control/index.js +13 -17
  318. package/build/components/duotone-control/index.js.map +1 -1
  319. package/build/components/editable-text/index.js +11 -13
  320. package/build/components/editable-text/index.js.map +1 -1
  321. package/build/components/editor-styles/index.js +4 -5
  322. package/build/components/editor-styles/index.js.map +1 -1
  323. package/build/components/floating-toolbar/index.native.js +7 -8
  324. package/build/components/floating-toolbar/index.native.js.map +1 -1
  325. package/build/components/font-appearance-control/index.js +21 -32
  326. package/build/components/font-appearance-control/index.js.map +1 -1
  327. package/build/components/font-family/index.js +14 -17
  328. package/build/components/font-family/index.js.map +1 -1
  329. package/build/components/font-sizes/fluid-utils.js +17 -21
  330. package/build/components/font-sizes/fluid-utils.js.map +1 -1
  331. package/build/components/font-sizes/font-size-picker.js +2 -4
  332. package/build/components/font-sizes/font-size-picker.js.map +1 -1
  333. package/build/components/font-sizes/utils.js +9 -15
  334. package/build/components/font-sizes/utils.js.map +1 -1
  335. package/build/components/font-sizes/with-font-sizes.js +18 -37
  336. package/build/components/font-sizes/with-font-sizes.js.map +1 -1
  337. package/build/components/global-styles/advanced-panel.js +7 -10
  338. package/build/components/global-styles/advanced-panel.js.map +1 -1
  339. package/build/components/global-styles/border-panel.js +45 -78
  340. package/build/components/global-styles/border-panel.js.map +1 -1
  341. package/build/components/global-styles/color-panel.js +119 -163
  342. package/build/components/global-styles/color-panel.js.map +1 -1
  343. package/build/components/global-styles/color-panel.native.js +25 -42
  344. package/build/components/global-styles/color-panel.native.js.map +1 -1
  345. package/build/components/global-styles/dimensions-panel.js +78 -109
  346. package/build/components/global-styles/dimensions-panel.js.map +1 -1
  347. package/build/components/global-styles/effects-panel.js +60 -73
  348. package/build/components/global-styles/effects-panel.js.map +1 -1
  349. package/build/components/global-styles/filters-panel.js +55 -72
  350. package/build/components/global-styles/filters-panel.js.map +1 -1
  351. package/build/components/global-styles/get-block-css-selector.js +4 -7
  352. package/build/components/global-styles/get-block-css-selector.js.map +1 -1
  353. package/build/components/global-styles/hooks.js +22 -37
  354. package/build/components/global-styles/hooks.js.map +1 -1
  355. package/build/components/global-styles/index.js +6 -0
  356. package/build/components/global-styles/index.js.map +1 -1
  357. package/build/components/global-styles/typography-panel.js +69 -125
  358. package/build/components/global-styles/typography-panel.js.map +1 -1
  359. package/build/components/global-styles/typography-utils.js +49 -26
  360. package/build/components/global-styles/typography-utils.js.map +1 -1
  361. package/build/components/global-styles/use-global-styles-output.js +153 -245
  362. package/build/components/global-styles/use-global-styles-output.js.map +1 -1
  363. package/build/components/global-styles/utils.js +11 -27
  364. package/build/components/global-styles/utils.js.map +1 -1
  365. package/build/components/gradients/use-gradient.js +6 -7
  366. package/build/components/gradients/use-gradient.js.map +1 -1
  367. package/build/components/gradients/with-gradient.js +2 -6
  368. package/build/components/gradients/with-gradient.js.map +1 -1
  369. package/build/components/height-control/index.js +9 -10
  370. package/build/components/height-control/index.js.map +1 -1
  371. package/build/components/iframe/index.js +53 -90
  372. package/build/components/iframe/index.js.map +1 -1
  373. package/build/components/iframe/use-compatibility-styles.js +29 -20
  374. package/build/components/iframe/use-compatibility-styles.js.map +1 -1
  375. package/build/components/image-editor/aspect-ratio-dropdown.js +83 -91
  376. package/build/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
  377. package/build/components/image-editor/constants.js +1 -2
  378. package/build/components/image-editor/constants.js.map +1 -1
  379. package/build/components/image-editor/context.js +9 -10
  380. package/build/components/image-editor/context.js.map +1 -1
  381. package/build/components/image-editor/cropper.js +11 -12
  382. package/build/components/image-editor/cropper.js.map +1 -1
  383. package/build/components/image-editor/index.js +12 -13
  384. package/build/components/image-editor/index.js.map +1 -1
  385. package/build/components/image-editor/use-save-image.js +11 -12
  386. package/build/components/image-editor/use-save-image.js.map +1 -1
  387. package/build/components/image-editor/use-transform-image.js +5 -6
  388. package/build/components/image-editor/use-transform-image.js.map +1 -1
  389. package/build/components/image-editor/zoom-dropdown.js +10 -13
  390. package/build/components/image-editor/zoom-dropdown.js.map +1 -1
  391. package/build/components/image-size-control/index.js +12 -13
  392. package/build/components/image-size-control/index.js.map +1 -1
  393. package/build/components/index.js +9 -9
  394. package/build/components/index.js.map +1 -1
  395. package/build/components/index.native.js +9 -0
  396. package/build/components/index.native.js.map +1 -1
  397. package/build/components/inner-blocks/button-block-appender.js +7 -8
  398. package/build/components/inner-blocks/button-block-appender.js.map +1 -1
  399. package/build/components/inner-blocks/default-block-appender.js +6 -8
  400. package/build/components/inner-blocks/default-block-appender.js.map +1 -1
  401. package/build/components/inner-blocks/index.js +11 -14
  402. package/build/components/inner-blocks/index.js.map +1 -1
  403. package/build/components/inner-blocks/index.native.js +9 -10
  404. package/build/components/inner-blocks/index.native.js.map +1 -1
  405. package/build/components/inner-blocks/use-block-context.js +1 -4
  406. package/build/components/inner-blocks/use-block-context.js.map +1 -1
  407. package/build/components/inner-blocks/use-nested-settings-update.js +24 -32
  408. package/build/components/inner-blocks/use-nested-settings-update.js.map +1 -1
  409. package/build/components/inner-blocks/with-client-id.js +2 -6
  410. package/build/components/inner-blocks/with-client-id.js.map +1 -1
  411. package/build/components/inserter/block-patterns-explorer/explorer.js +11 -12
  412. package/build/components/inserter/block-patterns-explorer/explorer.js.map +1 -1
  413. package/build/components/inserter/block-patterns-explorer/patterns-list.js +11 -18
  414. package/build/components/inserter/block-patterns-explorer/patterns-list.js.map +1 -1
  415. package/build/components/inserter/block-patterns-explorer/sidebar.js +20 -24
  416. package/build/components/inserter/block-patterns-explorer/sidebar.js.map +1 -1
  417. package/build/components/inserter/block-patterns-tab.js +62 -45
  418. package/build/components/inserter/block-patterns-tab.js.map +1 -1
  419. package/build/components/inserter/block-types-tab.js +7 -9
  420. package/build/components/inserter/block-types-tab.js.map +1 -1
  421. package/build/components/inserter/block-types-tab.native.js +8 -9
  422. package/build/components/inserter/block-types-tab.native.js.map +1 -1
  423. package/build/components/inserter/hooks/use-block-type-impressions.native.js +3 -5
  424. package/build/components/inserter/hooks/use-block-type-impressions.native.js.map +1 -1
  425. package/build/components/inserter/hooks/use-block-types-state.js +9 -9
  426. package/build/components/inserter/hooks/use-block-types-state.js.map +1 -1
  427. package/build/components/inserter/hooks/use-clipboard-block.native.js +2 -2
  428. package/build/components/inserter/hooks/use-clipboard-block.native.js.map +1 -1
  429. package/build/components/inserter/hooks/use-debounced-input.js +1 -2
  430. package/build/components/inserter/hooks/use-debounced-input.js.map +1 -1
  431. package/build/components/inserter/hooks/use-insertion-point.js +11 -13
  432. package/build/components/inserter/hooks/use-insertion-point.js.map +1 -1
  433. package/build/components/inserter/index.js +45 -59
  434. package/build/components/inserter/index.js.map +1 -1
  435. package/build/components/inserter/index.native.js +28 -36
  436. package/build/components/inserter/index.native.js.map +1 -1
  437. package/build/components/inserter/library.js +12 -13
  438. package/build/components/inserter/library.js.map +1 -1
  439. package/build/components/inserter/media-tab/hooks.js +2 -5
  440. package/build/components/inserter/media-tab/hooks.js.map +1 -1
  441. package/build/components/inserter/media-tab/media-list.js +8 -13
  442. package/build/components/inserter/media-tab/media-list.js.map +1 -1
  443. package/build/components/inserter/media-tab/media-panel.js +12 -14
  444. package/build/components/inserter/media-tab/media-panel.js.map +1 -1
  445. package/build/components/inserter/media-tab/media-preview.js +47 -60
  446. package/build/components/inserter/media-tab/media-preview.js.map +1 -1
  447. package/build/components/inserter/media-tab/media-tab.js +25 -29
  448. package/build/components/inserter/media-tab/media-tab.js.map +1 -1
  449. package/build/components/inserter/media-tab/utils.js +3 -5
  450. package/build/components/inserter/media-tab/utils.js.map +1 -1
  451. package/build/components/inserter/menu.js +15 -19
  452. package/build/components/inserter/menu.js.map +1 -1
  453. package/build/components/inserter/menu.native.js +27 -31
  454. package/build/components/inserter/menu.native.js.map +1 -1
  455. package/build/components/inserter/mobile-tab-navigation.js +7 -9
  456. package/build/components/inserter/mobile-tab-navigation.js.map +1 -1
  457. package/build/components/inserter/panel.js +5 -6
  458. package/build/components/inserter/panel.js.map +1 -1
  459. package/build/components/inserter/preview-panel.js +4 -5
  460. package/build/components/inserter/preview-panel.js.map +1 -1
  461. package/build/components/inserter/quick-inserter.js +8 -9
  462. package/build/components/inserter/quick-inserter.js.map +1 -1
  463. package/build/components/inserter/reusable-blocks-tab.js +16 -21
  464. package/build/components/inserter/reusable-blocks-tab.js.map +1 -1
  465. package/build/components/inserter/reusable-blocks-tab.native.js +5 -6
  466. package/build/components/inserter/reusable-blocks-tab.native.js.map +1 -1
  467. package/build/components/inserter/search-items.js +12 -40
  468. package/build/components/inserter/search-items.js.map +1 -1
  469. package/build/components/inserter/search-results.js +17 -18
  470. package/build/components/inserter/search-results.js.map +1 -1
  471. package/build/components/inserter/search-results.native.js +11 -12
  472. package/build/components/inserter/search-results.native.js.map +1 -1
  473. package/build/components/inserter/tabs.js +11 -12
  474. package/build/components/inserter/tabs.js.map +1 -1
  475. package/build/components/inserter/tabs.native.js +37 -55
  476. package/build/components/inserter/tabs.native.js.map +1 -1
  477. package/build/components/inserter/utils.native.js +13 -17
  478. package/build/components/inserter/utils.native.js.map +1 -1
  479. package/build/components/inserter-draggable-blocks/index.js +11 -13
  480. package/build/components/inserter-draggable-blocks/index.js.map +1 -1
  481. package/build/components/inserter-list-item/index.js +69 -74
  482. package/build/components/inserter-list-item/index.js.map +1 -1
  483. package/build/components/inserter-listbox/group.js +4 -7
  484. package/build/components/inserter-listbox/group.js.map +1 -1
  485. package/build/components/inserter-listbox/index.js +3 -4
  486. package/build/components/inserter-listbox/index.js.map +1 -1
  487. package/build/components/inserter-listbox/item.js +14 -14
  488. package/build/components/inserter-listbox/item.js.map +1 -1
  489. package/build/components/inserter-listbox/row.js +4 -5
  490. package/build/components/inserter-listbox/row.js.map +1 -1
  491. package/build/components/inspector-controls/block-support-slot-container.js +6 -11
  492. package/build/components/inspector-controls/block-support-slot-container.js.map +1 -1
  493. package/build/components/inspector-controls/block-support-tools-panel.js +6 -8
  494. package/build/components/inspector-controls/block-support-tools-panel.js.map +1 -1
  495. package/build/components/inspector-controls/fill.js +13 -24
  496. package/build/components/inspector-controls/fill.js.map +1 -1
  497. package/build/components/inspector-controls/fill.native.js +9 -12
  498. package/build/components/inspector-controls/fill.native.js.map +1 -1
  499. package/build/components/inspector-controls/index.js +4 -6
  500. package/build/components/inspector-controls/index.js.map +1 -1
  501. package/build/components/inspector-controls/slot.js +13 -19
  502. package/build/components/inspector-controls/slot.js.map +1 -1
  503. package/build/components/inspector-controls/slot.native.js +8 -11
  504. package/build/components/inspector-controls/slot.native.js.map +1 -1
  505. package/build/components/inspector-controls-tabs/index.js +6 -7
  506. package/build/components/inspector-controls-tabs/index.js.map +1 -1
  507. package/build/components/inspector-controls-tabs/position-controls-panel.js +3 -8
  508. package/build/components/inspector-controls-tabs/position-controls-panel.js.map +1 -1
  509. package/build/components/inspector-controls-tabs/settings-tab-hint.js +1 -1
  510. package/build/components/inspector-controls-tabs/settings-tab-hint.js.map +1 -1
  511. package/build/components/inspector-controls-tabs/settings-tab.js +3 -6
  512. package/build/components/inspector-controls-tabs/settings-tab.js.map +1 -1
  513. package/build/components/inspector-controls-tabs/styles-tab.js +5 -6
  514. package/build/components/inspector-controls-tabs/styles-tab.js.map +1 -1
  515. package/build/components/inspector-controls-tabs/use-inspector-controls-tabs.js +1 -3
  516. package/build/components/inspector-controls-tabs/use-inspector-controls-tabs.js.map +1 -1
  517. package/build/components/inspector-popover-header/index.js +18 -22
  518. package/build/components/inspector-popover-header/index.js.map +1 -1
  519. package/build/components/justify-content-control/index.js +4 -6
  520. package/build/components/justify-content-control/index.js.map +1 -1
  521. package/build/components/justify-content-control/ui.js +12 -17
  522. package/build/components/justify-content-control/ui.js.map +1 -1
  523. package/build/components/letter-spacing-control/index.js +8 -11
  524. package/build/components/letter-spacing-control/index.js.map +1 -1
  525. package/build/components/line-height-control/index.js +15 -22
  526. package/build/components/line-height-control/index.js.map +1 -1
  527. package/build/components/line-height-control/index.native.js +4 -5
  528. package/build/components/line-height-control/index.native.js.map +1 -1
  529. package/build/components/link-control/index.js +86 -71
  530. package/build/components/link-control/index.js.map +1 -1
  531. package/build/components/link-control/is-url-like.js +32 -2
  532. package/build/components/link-control/is-url-like.js.map +1 -1
  533. package/build/components/link-control/link-preview.js +24 -27
  534. package/build/components/link-control/link-preview.js.map +1 -1
  535. package/build/components/link-control/search-create-button.js +9 -13
  536. package/build/components/link-control/search-create-button.js.map +1 -1
  537. package/build/components/link-control/search-input.js +24 -27
  538. package/build/components/link-control/search-input.js.map +1 -1
  539. package/build/components/link-control/search-item.js +15 -19
  540. package/build/components/link-control/search-item.js.map +1 -1
  541. package/build/components/link-control/search-results.js +23 -31
  542. package/build/components/link-control/search-results.js.map +1 -1
  543. package/build/components/link-control/settings-drawer.js +6 -35
  544. package/build/components/link-control/settings-drawer.js.map +1 -1
  545. package/build/components/link-control/settings.js +6 -8
  546. package/build/components/link-control/settings.js.map +1 -1
  547. package/build/components/link-control/use-internal-value.js +54 -0
  548. package/build/components/link-control/use-internal-value.js.map +1 -0
  549. package/build/components/link-control/use-rich-url-data.js +1 -1
  550. package/build/components/link-control/use-rich-url-data.js.map +1 -1
  551. package/build/components/link-control/use-search-handler.js +10 -23
  552. package/build/components/link-control/use-search-handler.js.map +1 -1
  553. package/build/components/list-view/appender.js +15 -17
  554. package/build/components/list-view/appender.js.map +1 -1
  555. package/build/components/list-view/aria-referenced-text.js +40 -0
  556. package/build/components/list-view/aria-referenced-text.js.map +1 -0
  557. package/build/components/list-view/block-contents.js +39 -40
  558. package/build/components/list-view/block-contents.js.map +1 -1
  559. package/build/components/list-view/block-select-button.js +79 -22
  560. package/build/components/list-view/block-select-button.js.map +1 -1
  561. package/build/components/list-view/block.js +119 -101
  562. package/build/components/list-view/block.js.map +1 -1
  563. package/build/components/list-view/branch.js +14 -13
  564. package/build/components/list-view/branch.js.map +1 -1
  565. package/build/components/list-view/drop-indicator.js +66 -16
  566. package/build/components/list-view/drop-indicator.js.map +1 -1
  567. package/build/components/list-view/expander.js +3 -4
  568. package/build/components/list-view/expander.js.map +1 -1
  569. package/build/components/list-view/index.js +50 -49
  570. package/build/components/list-view/index.js.map +1 -1
  571. package/build/components/list-view/leaf.js +14 -16
  572. package/build/components/list-view/leaf.js.map +1 -1
  573. package/build/components/list-view/use-block-selection.js +4 -6
  574. package/build/components/list-view/use-block-selection.js.map +1 -1
  575. package/build/components/list-view/use-list-view-client-ids.js +6 -29
  576. package/build/components/list-view/use-list-view-client-ids.js.map +1 -1
  577. package/build/components/list-view/use-list-view-drop-zone.js +63 -39
  578. package/build/components/list-view/use-list-view-drop-zone.js.map +1 -1
  579. package/build/components/list-view/use-list-view-expand-selected-item.js +4 -5
  580. package/build/components/list-view/use-list-view-expand-selected-item.js.map +1 -1
  581. package/build/components/list-view/use-list-view-scroll-into-view.js +5 -6
  582. package/build/components/list-view/use-list-view-scroll-into-view.js.map +1 -1
  583. package/build/components/media-placeholder/index.js +106 -102
  584. package/build/components/media-placeholder/index.js.map +1 -1
  585. package/build/components/media-placeholder/index.native.js +5 -6
  586. package/build/components/media-placeholder/index.native.js.map +1 -1
  587. package/build/components/media-replace-flow/index.js +92 -107
  588. package/build/components/media-replace-flow/index.js.map +1 -1
  589. package/build/components/media-upload/check.js +4 -5
  590. package/build/components/media-upload/check.js.map +1 -1
  591. package/build/components/media-upload/index.native.js +1 -1
  592. package/build/components/media-upload/index.native.js.map +1 -1
  593. package/build/components/multi-selection-inspector/index.js +3 -4
  594. package/build/components/multi-selection-inspector/index.js.map +1 -1
  595. package/build/components/navigable-toolbar/index.js +24 -23
  596. package/build/components/navigable-toolbar/index.js.map +1 -1
  597. package/build/components/observe-typing/index.js +3 -4
  598. package/build/components/observe-typing/index.js.map +1 -1
  599. package/build/components/panel-color-settings/index.js +8 -10
  600. package/build/components/panel-color-settings/index.js.map +1 -1
  601. package/build/components/plain-text/index.js +12 -14
  602. package/build/components/plain-text/index.js.map +1 -1
  603. package/build/components/plain-text/index.native.js +15 -20
  604. package/build/components/plain-text/index.native.js.map +1 -1
  605. package/build/components/preview-options/index.js +12 -12
  606. package/build/components/preview-options/index.js.map +1 -1
  607. package/build/components/provider/block-refs-provider.js +3 -4
  608. package/build/components/provider/block-refs-provider.js.map +1 -1
  609. package/build/components/provider/index.js +2 -4
  610. package/build/components/provider/index.js.map +1 -1
  611. package/build/components/provider/use-block-sync.js +7 -8
  612. package/build/components/provider/use-block-sync.js.map +1 -1
  613. package/build/components/provider/with-registry-provider.js +13 -17
  614. package/build/components/provider/with-registry-provider.js.map +1 -1
  615. package/build/components/publish-date-time-picker/index.js +10 -12
  616. package/build/components/publish-date-time-picker/index.js.map +1 -1
  617. package/build/components/recursion-provider/index.js +7 -11
  618. package/build/components/recursion-provider/index.js.map +1 -1
  619. package/build/components/resizable-box-popover/index.js +10 -11
  620. package/build/components/resizable-box-popover/index.js.map +1 -1
  621. package/build/components/responsive-block-control/label.js +5 -6
  622. package/build/components/responsive-block-control/label.js.map +1 -1
  623. package/build/components/rich-text/content.js +99 -0
  624. package/build/components/rich-text/content.js.map +1 -0
  625. package/build/components/rich-text/embed-handler-picker.native.js +6 -10
  626. package/build/components/rich-text/embed-handler-picker.native.js.map +1 -1
  627. package/build/components/rich-text/format-edit.js +7 -8
  628. package/build/components/rich-text/format-edit.js.map +1 -1
  629. package/build/components/rich-text/format-toolbar/index.js +10 -20
  630. package/build/components/rich-text/format-toolbar/index.js.map +1 -1
  631. package/build/components/rich-text/format-toolbar-container.js +13 -16
  632. package/build/components/rich-text/format-toolbar-container.js.map +1 -1
  633. package/build/components/rich-text/index.js +45 -83
  634. package/build/components/rich-text/index.js.map +1 -1
  635. package/build/components/rich-text/index.native.js +128 -183
  636. package/build/components/rich-text/index.native.js.map +1 -1
  637. package/build/components/rich-text/input-event.js +4 -5
  638. package/build/components/rich-text/input-event.js.map +1 -1
  639. package/build/components/rich-text/shortcut.js +5 -6
  640. package/build/components/rich-text/shortcut.js.map +1 -1
  641. package/build/components/rich-text/split-value.js +8 -10
  642. package/build/components/rich-text/split-value.js.map +1 -1
  643. package/build/components/rich-text/toolbar-button.js +8 -13
  644. package/build/components/rich-text/toolbar-button.js.map +1 -1
  645. package/build/components/rich-text/use-before-input-rules.js +1 -4
  646. package/build/components/rich-text/use-before-input-rules.js.map +1 -1
  647. package/build/components/rich-text/use-enter.js +3 -6
  648. package/build/components/rich-text/use-enter.js.map +1 -1
  649. package/build/components/rich-text/use-firefox-compat.js +32 -1
  650. package/build/components/rich-text/use-firefox-compat.js.map +1 -1
  651. package/build/components/rich-text/use-format-types.js +11 -17
  652. package/build/components/rich-text/use-format-types.js.map +1 -1
  653. package/build/components/rich-text/use-input-rules.js +9 -15
  654. package/build/components/rich-text/use-input-rules.js.map +1 -1
  655. package/build/components/rich-text/use-mark-persistent.js +4 -5
  656. package/build/components/rich-text/use-mark-persistent.js.map +1 -1
  657. package/build/components/rich-text/use-paste-handler.js +5 -7
  658. package/build/components/rich-text/use-paste-handler.js.map +1 -1
  659. package/build/components/rich-text/utils.js +5 -7
  660. package/build/components/rich-text/utils.js.map +1 -1
  661. package/build/components/skip-to-selected-block/index.js +3 -4
  662. package/build/components/skip-to-selected-block/index.js.map +1 -1
  663. package/build/components/spacing-sizes-control/hooks/use-spacing-sizes.js +38 -0
  664. package/build/components/spacing-sizes-control/hooks/use-spacing-sizes.js.map +1 -0
  665. package/build/components/spacing-sizes-control/index.js +62 -64
  666. package/build/components/spacing-sizes-control/index.js.map +1 -1
  667. package/build/components/spacing-sizes-control/{axial-input-controls.js → input-controls/axial.js} +21 -22
  668. package/build/components/spacing-sizes-control/input-controls/axial.js.map +1 -0
  669. package/build/components/spacing-sizes-control/{input-controls.js → input-controls/separated.js} +22 -22
  670. package/build/components/spacing-sizes-control/input-controls/separated.js.map +1 -0
  671. package/build/components/spacing-sizes-control/input-controls/single.js +51 -0
  672. package/build/components/spacing-sizes-control/input-controls/single.js.map +1 -0
  673. package/build/components/spacing-sizes-control/{spacing-input-control.js → input-controls/spacing-input-control.js} +51 -69
  674. package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -0
  675. package/build/components/spacing-sizes-control/sides-dropdown/index.js +84 -0
  676. package/build/components/spacing-sizes-control/sides-dropdown/index.js.map +1 -0
  677. package/build/components/spacing-sizes-control/utils.js +213 -31
  678. package/build/components/spacing-sizes-control/utils.js.map +1 -1
  679. package/build/components/text-decoration-control/index.js +5 -6
  680. package/build/components/text-decoration-control/index.js.map +1 -1
  681. package/build/components/text-transform-control/index.js +5 -6
  682. package/build/components/text-transform-control/index.js.map +1 -1
  683. package/build/components/tool-selector/index.js +13 -20
  684. package/build/components/tool-selector/index.js.map +1 -1
  685. package/build/components/typewriter/index.js +6 -9
  686. package/build/components/typewriter/index.js.map +1 -1
  687. package/build/components/ungroup-button/index.native.js +11 -16
  688. package/build/components/ungroup-button/index.native.js.map +1 -1
  689. package/build/components/unit-control/index.js +8 -10
  690. package/build/components/unit-control/index.js.map +1 -1
  691. package/build/components/url-input/index.js +23 -34
  692. package/build/components/url-input/index.js.map +1 -1
  693. package/build/components/url-input/index.native.js +10 -15
  694. package/build/components/url-input/index.native.js.map +1 -1
  695. package/build/components/url-popover/image-url-input-ui.js +33 -29
  696. package/build/components/url-popover/image-url-input-ui.js.map +1 -1
  697. package/build/components/url-popover/index.js +16 -19
  698. package/build/components/url-popover/index.js.map +1 -1
  699. package/build/components/url-popover/link-editor.js +10 -12
  700. package/build/components/url-popover/link-editor.js.map +1 -1
  701. package/build/components/url-popover/link-viewer-url.js +5 -6
  702. package/build/components/url-popover/link-viewer-url.js.map +1 -1
  703. package/build/components/url-popover/link-viewer.js +11 -13
  704. package/build/components/url-popover/link-viewer.js.map +1 -1
  705. package/build/components/use-block-display-information/index.js +30 -2
  706. package/build/components/use-block-display-information/index.js.map +1 -1
  707. package/build/components/use-block-drop-zone/index.js +16 -23
  708. package/build/components/use-block-drop-zone/index.js.map +1 -1
  709. package/build/components/use-block-drop-zone/index.native.js +8 -11
  710. package/build/components/use-block-drop-zone/index.native.js.map +1 -1
  711. package/build/components/use-moving-animation/index.js +9 -12
  712. package/build/components/use-moving-animation/index.js.map +1 -1
  713. package/build/components/use-on-block-drop/index.js +2 -6
  714. package/build/components/use-on-block-drop/index.js.map +1 -1
  715. package/build/components/use-on-block-drop/index.native.js +8 -10
  716. package/build/components/use-on-block-drop/index.native.js.map +1 -1
  717. package/build/components/use-paste-styles/index.js +2 -6
  718. package/build/components/use-paste-styles/index.js.map +1 -1
  719. package/build/components/video-player/index.native.js +2 -4
  720. package/build/components/video-player/index.native.js.map +1 -1
  721. package/build/components/warning/index.js +6 -7
  722. package/build/components/warning/index.js.map +1 -1
  723. package/build/components/warning/index.native.js +13 -15
  724. package/build/components/warning/index.native.js.map +1 -1
  725. package/build/components/writing-flow/index.js +6 -9
  726. package/build/components/writing-flow/index.js.map +1 -1
  727. package/build/components/writing-flow/use-drag-selection.js +5 -7
  728. package/build/components/writing-flow/use-drag-selection.js.map +1 -1
  729. package/build/components/writing-flow/use-tab-nav.js +41 -10
  730. package/build/components/writing-flow/use-tab-nav.js.map +1 -1
  731. package/build/hooks/align.js +15 -22
  732. package/build/hooks/align.js.map +1 -1
  733. package/build/hooks/anchor.js +9 -4
  734. package/build/hooks/anchor.js.map +1 -1
  735. package/build/hooks/aria-label.js +1 -3
  736. package/build/hooks/aria-label.js.map +1 -1
  737. package/build/hooks/behaviors.js +131 -60
  738. package/build/hooks/behaviors.js.map +1 -1
  739. package/build/hooks/border.js +29 -43
  740. package/build/hooks/border.js.map +1 -1
  741. package/build/hooks/color.js +26 -42
  742. package/build/hooks/color.js.map +1 -1
  743. package/build/hooks/content-lock-ui.js +33 -39
  744. package/build/hooks/content-lock-ui.js.map +1 -1
  745. package/build/hooks/contrast-checker.js +4 -7
  746. package/build/hooks/contrast-checker.js.map +1 -1
  747. package/build/hooks/custom-class-name.js +8 -5
  748. package/build/hooks/custom-class-name.js.map +1 -1
  749. package/build/hooks/dimensions.js +11 -14
  750. package/build/hooks/dimensions.js.map +1 -1
  751. package/build/hooks/duotone.js +37 -49
  752. package/build/hooks/duotone.js.map +1 -1
  753. package/build/hooks/font-family.js +6 -11
  754. package/build/hooks/font-family.js.map +1 -1
  755. package/build/hooks/font-size.js +22 -27
  756. package/build/hooks/font-size.js.map +1 -1
  757. package/build/hooks/gap.js +5 -6
  758. package/build/hooks/gap.js.map +1 -1
  759. package/build/hooks/layout.js +66 -81
  760. package/build/hooks/layout.js.map +1 -1
  761. package/build/hooks/line-height.js +5 -8
  762. package/build/hooks/line-height.js.map +1 -1
  763. package/build/hooks/lock.js +2 -2
  764. package/build/hooks/lock.js.map +1 -1
  765. package/build/hooks/margin.js +6 -9
  766. package/build/hooks/margin.js.map +1 -1
  767. package/build/hooks/metadata-name.js +4 -5
  768. package/build/hooks/metadata-name.js.map +1 -1
  769. package/build/hooks/metadata.js +3 -7
  770. package/build/hooks/metadata.js.map +1 -1
  771. package/build/hooks/padding.js +6 -9
  772. package/build/hooks/padding.js.map +1 -1
  773. package/build/hooks/position.js +50 -56
  774. package/build/hooks/position.js.map +1 -1
  775. package/build/hooks/settings.js +1 -3
  776. package/build/hooks/settings.js.map +1 -1
  777. package/build/hooks/style.js +19 -23
  778. package/build/hooks/style.js.map +1 -1
  779. package/build/hooks/supports.js +4 -6
  780. package/build/hooks/supports.js.map +1 -1
  781. package/build/hooks/typography.js +18 -27
  782. package/build/hooks/typography.js.map +1 -1
  783. package/build/hooks/typography.native.js +4 -3
  784. package/build/hooks/typography.native.js.map +1 -1
  785. package/build/hooks/use-border-props.js +1 -3
  786. package/build/hooks/use-border-props.js.map +1 -1
  787. package/build/hooks/use-color-props.js +6 -8
  788. package/build/hooks/use-color-props.js.map +1 -1
  789. package/build/hooks/use-editor-wrapper-styles.native.js +34 -39
  790. package/build/hooks/use-editor-wrapper-styles.native.js.map +1 -1
  791. package/build/hooks/use-spacing-props.js +1 -1
  792. package/build/hooks/use-spacing-props.js.map +1 -1
  793. package/build/hooks/use-typography-props.js +12 -23
  794. package/build/hooks/use-typography-props.js.map +1 -1
  795. package/build/hooks/utils.js +6 -18
  796. package/build/hooks/utils.js.map +1 -1
  797. package/build/index.js +0 -14
  798. package/build/index.js.map +1 -1
  799. package/build/layouts/constrained.js +24 -27
  800. package/build/layouts/constrained.js.map +1 -1
  801. package/build/layouts/definitions.js +154 -0
  802. package/build/layouts/definitions.js.map +1 -0
  803. package/build/layouts/flex.js +50 -58
  804. package/build/layouts/flex.js.map +1 -1
  805. package/build/layouts/flow.js +12 -13
  806. package/build/layouts/flow.js.map +1 -1
  807. package/build/layouts/grid.js +47 -25
  808. package/build/layouts/grid.js.map +1 -1
  809. package/build/layouts/index.js +1 -2
  810. package/build/layouts/index.js.map +1 -1
  811. package/build/layouts/utils.js +11 -11
  812. package/build/layouts/utils.js.map +1 -1
  813. package/build/private-apis.js +17 -1
  814. package/build/private-apis.js.map +1 -1
  815. package/build/store/actions.js +226 -369
  816. package/build/store/actions.js.map +1 -1
  817. package/build/store/array.js +1 -2
  818. package/build/store/array.js.map +1 -1
  819. package/build/store/private-actions.js +203 -7
  820. package/build/store/private-actions.js.map +1 -1
  821. package/build/store/private-selectors.js +109 -24
  822. package/build/store/private-selectors.js.map +1 -1
  823. package/build/store/reducer.js +119 -170
  824. package/build/store/reducer.js.map +1 -1
  825. package/build/store/selectors.js +161 -231
  826. package/build/store/selectors.js.map +1 -1
  827. package/build/utils/block-variation-transforms.js +4 -7
  828. package/build/utils/block-variation-transforms.js.map +1 -1
  829. package/build/utils/math.js +1 -2
  830. package/build/utils/math.js.map +1 -1
  831. package/build/utils/object.js +40 -4
  832. package/build/utils/object.js.map +1 -1
  833. package/build/utils/order-inserter-block-items.js +5 -7
  834. package/build/utils/order-inserter-block-items.js.map +1 -1
  835. package/build/utils/parse-css-unit-to-px.js +3 -6
  836. package/build/utils/parse-css-unit-to-px.js.map +1 -1
  837. package/build/utils/pasting.js +5 -8
  838. package/build/utils/pasting.js.map +1 -1
  839. package/build/utils/pre-parse-patterns.js +1 -1
  840. package/build/utils/pre-parse-patterns.js.map +1 -1
  841. package/build/utils/sorting.js +1 -2
  842. package/build/utils/sorting.js.map +1 -1
  843. package/build/utils/transform-styles/index.js +5 -7
  844. package/build/utils/transform-styles/index.js.map +1 -1
  845. package/build/utils/transform-styles/transforms/wrap.js +28 -31
  846. package/build/utils/transform-styles/transforms/wrap.js.map +1 -1
  847. package/build-module/autocompleters/block.js +6 -6
  848. package/build-module/autocompleters/block.js.map +1 -1
  849. package/build-module/components/alignment-control/index.js +4 -5
  850. package/build-module/components/alignment-control/index.js.map +1 -1
  851. package/build-module/components/alignment-control/ui.js +14 -17
  852. package/build-module/components/alignment-control/ui.js.map +1 -1
  853. package/build-module/components/autocomplete/index.js +5 -7
  854. package/build-module/components/autocomplete/index.js.map +1 -1
  855. package/build-module/components/block-actions/index.js +12 -12
  856. package/build-module/components/block-actions/index.js.map +1 -1
  857. package/build-module/components/block-alignment-control/constants.js +0 -3
  858. package/build-module/components/block-alignment-control/constants.js.map +1 -1
  859. package/build-module/components/block-alignment-control/index.js +4 -5
  860. package/build-module/components/block-alignment-control/index.js.map +1 -1
  861. package/build-module/components/block-alignment-control/ui.js +21 -25
  862. package/build-module/components/block-alignment-control/ui.js.map +1 -1
  863. package/build-module/components/block-alignment-control/ui.native.js +17 -19
  864. package/build-module/components/block-alignment-control/ui.native.js.map +1 -1
  865. package/build-module/components/block-alignment-control/use-available-alignments.js +5 -10
  866. package/build-module/components/block-alignment-control/use-available-alignments.js.map +1 -1
  867. package/build-module/components/block-alignment-matrix-control/index.js +4 -7
  868. package/build-module/components/block-alignment-matrix-control/index.js.map +1 -1
  869. package/build-module/components/block-breadcrumb/index.js +5 -7
  870. package/build-module/components/block-breadcrumb/index.js.map +1 -1
  871. package/build-module/components/block-caption/index.native.js +29 -34
  872. package/build-module/components/block-caption/index.native.js.map +1 -1
  873. package/build-module/components/block-card/index.js +7 -9
  874. package/build-module/components/block-card/index.js.map +1 -1
  875. package/build-module/components/block-compare/block-view.js +8 -9
  876. package/build-module/components/block-compare/block-view.js.map +1 -1
  877. package/build-module/components/block-compare/index.js +7 -9
  878. package/build-module/components/block-compare/index.js.map +1 -1
  879. package/build-module/components/block-context/index.js +4 -5
  880. package/build-module/components/block-context/index.js.map +1 -1
  881. package/build-module/components/block-controls/fill.js +18 -23
  882. package/build-module/components/block-controls/fill.js.map +1 -1
  883. package/build-module/components/block-controls/hook.js +1 -3
  884. package/build-module/components/block-controls/hook.js.map +1 -1
  885. package/build-module/components/block-controls/index.js +8 -7
  886. package/build-module/components/block-controls/index.js.map +1 -1
  887. package/build-module/components/block-controls/slot.js +29 -22
  888. package/build-module/components/block-controls/slot.js.map +1 -1
  889. package/build-module/components/block-controls/slot.native.js +10 -18
  890. package/build-module/components/block-controls/slot.native.js.map +1 -1
  891. package/build-module/components/block-draggable/draggable-chip.js +5 -7
  892. package/build-module/components/block-draggable/draggable-chip.js.map +1 -1
  893. package/build-module/components/block-draggable/draggable-chip.native.js +3 -4
  894. package/build-module/components/block-draggable/draggable-chip.native.js.map +1 -1
  895. package/build-module/components/block-draggable/dropping-insertion-point.native.js +6 -7
  896. package/build-module/components/block-draggable/dropping-insertion-point.native.js.map +1 -1
  897. package/build-module/components/block-draggable/index.js +16 -17
  898. package/build-module/components/block-draggable/index.js.map +1 -1
  899. package/build-module/components/block-draggable/index.native.js +43 -58
  900. package/build-module/components/block-draggable/index.native.js.map +1 -1
  901. package/build-module/components/block-edit/edit.js +5 -9
  902. package/build-module/components/block-edit/edit.js.map +1 -1
  903. package/build-module/components/block-edit/edit.native.js +3 -7
  904. package/build-module/components/block-edit/edit.native.js.map +1 -1
  905. package/build-module/components/block-edit/index.js +3 -2
  906. package/build-module/components/block-edit/index.js.map +1 -1
  907. package/build-module/components/block-edit-visually-button/index.js +3 -4
  908. package/build-module/components/block-edit-visually-button/index.js.map +1 -1
  909. package/build-module/components/block-full-height-alignment-control/index.js +6 -7
  910. package/build-module/components/block-full-height-alignment-control/index.js.map +1 -1
  911. package/build-module/components/block-heading-level-dropdown/heading-level-icon.js +39 -0
  912. package/build-module/components/block-heading-level-dropdown/heading-level-icon.js.map +1 -0
  913. package/build-module/components/block-heading-level-dropdown/index.js +71 -0
  914. package/build-module/components/block-heading-level-dropdown/index.js.map +1 -0
  915. package/build-module/components/block-heading-level-dropdown/index.native.js +60 -0
  916. package/build-module/components/block-heading-level-dropdown/index.native.js.map +1 -0
  917. package/build-module/components/block-icon/index.js +7 -11
  918. package/build-module/components/block-icon/index.js.map +1 -1
  919. package/build-module/components/block-icon/index.native.js +15 -19
  920. package/build-module/components/block-icon/index.native.js.map +1 -1
  921. package/build-module/components/block-info-slot-fill/index.js +4 -2
  922. package/build-module/components/block-info-slot-fill/index.js.map +1 -1
  923. package/build-module/components/block-inspector/index.js +45 -123
  924. package/build-module/components/block-inspector/index.js.map +1 -1
  925. package/build-module/components/block-inspector/useBlockInspectorAnimationSettings.js +2 -2
  926. package/build-module/components/block-inspector/useBlockInspectorAnimationSettings.js.map +1 -1
  927. package/build-module/components/block-list/block-html.js +3 -4
  928. package/build-module/components/block-list/block-html.js.map +1 -1
  929. package/build-module/components/block-list/block-invalid-warning.js +3 -4
  930. package/build-module/components/block-list/block-invalid-warning.js.map +1 -1
  931. package/build-module/components/block-list/block-invalid-warning.native.js +10 -15
  932. package/build-module/components/block-list/block-invalid-warning.native.js.map +1 -1
  933. package/build-module/components/block-list/block-list-context.native.js +5 -11
  934. package/build-module/components/block-list/block-list-context.native.js.map +1 -1
  935. package/build-module/components/block-list/block-list-item-cell.native.js +5 -6
  936. package/build-module/components/block-list/block-list-item-cell.native.js.map +1 -1
  937. package/build-module/components/block-list/block-list-item.native.js +21 -20
  938. package/build-module/components/block-list/block-list-item.native.js.map +1 -1
  939. package/build-module/components/block-list/block-outline.native.js +8 -9
  940. package/build-module/components/block-list/block-outline.native.js.map +1 -1
  941. package/build-module/components/block-list/block-selection-button.native.js +10 -12
  942. package/build-module/components/block-list/block-selection-button.native.js.map +1 -1
  943. package/build-module/components/block-list/block.js +45 -50
  944. package/build-module/components/block-list/block.js.map +1 -1
  945. package/build-module/components/block-list/block.native.js +56 -68
  946. package/build-module/components/block-list/block.native.js.map +1 -1
  947. package/build-module/components/block-list/index.js +18 -18
  948. package/build-module/components/block-list/index.js.map +1 -1
  949. package/build-module/components/block-list/index.native.js +80 -89
  950. package/build-module/components/block-list/index.native.js.map +1 -1
  951. package/build-module/components/block-list/insertion-point.native.js +4 -5
  952. package/build-module/components/block-list/insertion-point.native.js.map +1 -1
  953. package/build-module/components/block-list/layout.js +6 -9
  954. package/build-module/components/block-list/layout.js.map +1 -1
  955. package/build-module/components/block-list/subdirectory-icon.js +11 -14
  956. package/build-module/components/block-list/subdirectory-icon.js.map +1 -1
  957. package/build-module/components/block-list/use-block-props/index.js +14 -11
  958. package/build-module/components/block-list/use-block-props/index.js.map +1 -1
  959. package/build-module/components/block-list/use-block-props/index.native.js +1 -2
  960. package/build-module/components/block-list/use-block-props/index.native.js.map +1 -1
  961. package/build-module/components/block-list/use-block-props/use-block-custom-class-name.js +2 -2
  962. package/build-module/components/block-list/use-block-props/use-block-custom-class-name.js.map +1 -1
  963. package/build-module/components/block-list/use-block-props/use-block-default-class-name.js +1 -1
  964. package/build-module/components/block-list/use-block-props/use-block-default-class-name.js.map +1 -1
  965. package/build-module/components/block-list/use-in-between-inserter.js +2 -6
  966. package/build-module/components/block-list/use-in-between-inserter.js.map +1 -1
  967. package/build-module/components/block-list-appender/index.js +35 -33
  968. package/build-module/components/block-list-appender/index.js.map +1 -1
  969. package/build-module/components/block-list-appender/index.native.js +9 -11
  970. package/build-module/components/block-list-appender/index.native.js.map +1 -1
  971. package/build-module/components/block-lock/menu-item.js +3 -4
  972. package/build-module/components/block-lock/menu-item.js.map +1 -1
  973. package/build-module/components/block-lock/modal.js +6 -9
  974. package/build-module/components/block-lock/modal.js.map +1 -1
  975. package/build-module/components/block-lock/toolbar.js +5 -10
  976. package/build-module/components/block-lock/toolbar.js.map +1 -1
  977. package/build-module/components/block-mobile-toolbar/block-actions-menu.native.js +50 -68
  978. package/build-module/components/block-mobile-toolbar/block-actions-menu.native.js.map +1 -1
  979. package/build-module/components/block-mobile-toolbar/index.native.js +26 -34
  980. package/build-module/components/block-mobile-toolbar/index.native.js.map +1 -1
  981. package/build-module/components/block-mover/button.js +18 -18
  982. package/build-module/components/block-mover/button.js.map +1 -1
  983. package/build-module/components/block-mover/index.js +16 -17
  984. package/build-module/components/block-mover/index.js.map +1 -1
  985. package/build-module/components/block-mover/index.native.js +23 -46
  986. package/build-module/components/block-mover/index.native.js.map +1 -1
  987. package/build-module/components/block-mover/mover-description.native.js +7 -10
  988. package/build-module/components/block-mover/mover-description.native.js.map +1 -1
  989. package/build-module/components/block-navigation/dropdown.js +22 -28
  990. package/build-module/components/block-navigation/dropdown.js.map +1 -1
  991. package/build-module/components/block-parent-selector/index.js +6 -6
  992. package/build-module/components/block-parent-selector/index.js.map +1 -1
  993. package/build-module/components/block-pattern-setup/index.js +33 -38
  994. package/build-module/components/block-pattern-setup/index.js.map +1 -1
  995. package/build-module/components/block-pattern-setup/setup-toolbar.js +35 -42
  996. package/build-module/components/block-pattern-setup/setup-toolbar.js.map +1 -1
  997. package/build-module/components/block-patterns-list/index.js +73 -81
  998. package/build-module/components/block-patterns-list/index.js.map +1 -1
  999. package/build-module/components/block-popover/drop-zone.js +4 -5
  1000. package/build-module/components/block-popover/drop-zone.js.map +1 -1
  1001. package/build-module/components/block-popover/inbetween.js +14 -20
  1002. package/build-module/components/block-popover/inbetween.js.map +1 -1
  1003. package/build-module/components/block-popover/index.js +18 -20
  1004. package/build-module/components/block-popover/index.js.map +1 -1
  1005. package/build-module/components/block-preview/auto.js +8 -11
  1006. package/build-module/components/block-preview/auto.js.map +1 -1
  1007. package/build-module/components/block-preview/index.js +21 -24
  1008. package/build-module/components/block-preview/index.js.map +1 -1
  1009. package/build-module/components/block-quick-navigation/index.js +69 -0
  1010. package/build-module/components/block-quick-navigation/index.js.map +1 -0
  1011. package/build-module/components/block-removal-warning-modal/index.js +76 -0
  1012. package/build-module/components/block-removal-warning-modal/index.js.map +1 -0
  1013. package/build-module/components/block-selection-clearer/index.js +4 -4
  1014. package/build-module/components/block-selection-clearer/index.js.map +1 -1
  1015. package/build-module/components/block-settings/button.native.js +9 -11
  1016. package/build-module/components/block-settings/button.native.js.map +1 -1
  1017. package/build-module/components/block-settings/container.native.js +6 -5
  1018. package/build-module/components/block-settings/container.native.js.map +1 -1
  1019. package/build-module/components/block-settings-menu/block-convert-button.js +5 -7
  1020. package/build-module/components/block-settings-menu/block-convert-button.js.map +1 -1
  1021. package/build-module/components/block-settings-menu/block-html-convert-button.js +10 -14
  1022. package/build-module/components/block-settings-menu/block-html-convert-button.js.map +1 -1
  1023. package/build-module/components/block-settings-menu/block-mode-toggle.js +19 -25
  1024. package/build-module/components/block-settings-menu/block-mode-toggle.js.map +1 -1
  1025. package/build-module/components/block-settings-menu/block-settings-dropdown.js +139 -117
  1026. package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  1027. package/build-module/components/block-settings-menu/index.js +8 -9
  1028. package/build-module/components/block-settings-menu/index.js.map +1 -1
  1029. package/build-module/components/block-settings-menu-controls/index.js +18 -20
  1030. package/build-module/components/block-settings-menu-controls/index.js.map +1 -1
  1031. package/build-module/components/block-styles/index.js +6 -7
  1032. package/build-module/components/block-styles/index.js.map +1 -1
  1033. package/build-module/components/block-styles/index.native.js +5 -7
  1034. package/build-module/components/block-styles/index.native.js.map +1 -1
  1035. package/build-module/components/block-styles/menu-items.js +4 -5
  1036. package/build-module/components/block-styles/menu-items.js.map +1 -1
  1037. package/build-module/components/block-styles/preview-panel.js +7 -10
  1038. package/build-module/components/block-styles/preview-panel.js.map +1 -1
  1039. package/build-module/components/block-styles/preview.native.js +6 -7
  1040. package/build-module/components/block-styles/preview.native.js.map +1 -1
  1041. package/build-module/components/block-styles/use-styles-for-block.js +7 -9
  1042. package/build-module/components/block-styles/use-styles-for-block.js.map +1 -1
  1043. package/build-module/components/block-styles/utils.js +4 -7
  1044. package/build-module/components/block-styles/utils.js.map +1 -1
  1045. package/build-module/components/block-switcher/block-styles-menu.js +4 -5
  1046. package/build-module/components/block-switcher/block-styles-menu.js.map +1 -1
  1047. package/build-module/components/block-switcher/block-transformations-menu.js +24 -29
  1048. package/build-module/components/block-switcher/block-transformations-menu.js.map +1 -1
  1049. package/build-module/components/block-switcher/block-transformations-menu.native.js +9 -10
  1050. package/build-module/components/block-switcher/block-transformations-menu.native.js.map +1 -1
  1051. package/build-module/components/block-switcher/block-variation-transformations.js +21 -30
  1052. package/build-module/components/block-switcher/block-variation-transformations.js.map +1 -1
  1053. package/build-module/components/block-switcher/index.js +48 -62
  1054. package/build-module/components/block-switcher/index.js.map +1 -1
  1055. package/build-module/components/block-switcher/pattern-transformations-menu.js +24 -29
  1056. package/build-module/components/block-switcher/pattern-transformations-menu.js.map +1 -1
  1057. package/build-module/components/block-switcher/preview-block-popover.js +3 -4
  1058. package/build-module/components/block-switcher/preview-block-popover.js.map +1 -1
  1059. package/build-module/components/block-switcher/utils.js +2 -3
  1060. package/build-module/components/block-switcher/utils.js.map +1 -1
  1061. package/build-module/components/block-title/index.js +5 -6
  1062. package/build-module/components/block-title/index.js.map +1 -1
  1063. package/build-module/components/block-title/use-block-display-title.js +5 -6
  1064. package/build-module/components/block-title/use-block-display-title.js.map +1 -1
  1065. package/build-module/components/block-toolbar/index.js +8 -9
  1066. package/build-module/components/block-toolbar/index.js.map +1 -1
  1067. package/build-module/components/block-toolbar/utils.js +14 -16
  1068. package/build-module/components/block-toolbar/utils.js.map +1 -1
  1069. package/build-module/components/block-tools/back-compat.js +3 -4
  1070. package/build-module/components/block-tools/back-compat.js.map +1 -1
  1071. package/build-module/components/block-tools/block-contextual-toolbar.js +9 -10
  1072. package/build-module/components/block-tools/block-contextual-toolbar.js.map +1 -1
  1073. package/build-module/components/block-tools/block-selection-button.js +10 -13
  1074. package/build-module/components/block-tools/block-selection-button.js.map +1 -1
  1075. package/build-module/components/block-tools/index.js +19 -12
  1076. package/build-module/components/block-tools/index.js.map +1 -1
  1077. package/build-module/components/block-tools/insertion-point.js +12 -14
  1078. package/build-module/components/block-tools/insertion-point.js.map +1 -1
  1079. package/build-module/components/block-tools/selected-block-popover.js +27 -27
  1080. package/build-module/components/block-tools/selected-block-popover.js.map +1 -1
  1081. package/build-module/components/block-tools/use-block-toolbar-popover-props.js +9 -14
  1082. package/build-module/components/block-tools/use-block-toolbar-popover-props.js.map +1 -1
  1083. package/build-module/components/block-tools/zoom-out-mode-inserters.js +3 -4
  1084. package/build-module/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
  1085. package/build-module/components/block-types-list/index.js +8 -9
  1086. package/build-module/components/block-types-list/index.js.map +1 -1
  1087. package/build-module/components/block-types-list/index.native.js +26 -32
  1088. package/build-module/components/block-types-list/index.native.js.map +1 -1
  1089. package/build-module/components/block-variation-picker/index.js +8 -9
  1090. package/build-module/components/block-variation-picker/index.js.map +1 -1
  1091. package/build-module/components/block-variation-picker/index.native.js +7 -9
  1092. package/build-module/components/block-variation-picker/index.native.js.map +1 -1
  1093. package/build-module/components/block-variation-transforms/index.js +30 -41
  1094. package/build-module/components/block-variation-transforms/index.js.map +1 -1
  1095. package/build-module/components/block-vertical-alignment-control/index.js +4 -5
  1096. package/build-module/components/block-vertical-alignment-control/index.js.map +1 -1
  1097. package/build-module/components/block-vertical-alignment-control/ui.js +12 -18
  1098. package/build-module/components/block-vertical-alignment-control/ui.js.map +1 -1
  1099. package/build-module/components/border-radius-control/all-input-control.js +9 -11
  1100. package/build-module/components/border-radius-control/all-input-control.js.map +1 -1
  1101. package/build-module/components/border-radius-control/index.js +9 -10
  1102. package/build-module/components/border-radius-control/index.js.map +1 -1
  1103. package/build-module/components/border-radius-control/input-controls.js +10 -14
  1104. package/build-module/components/border-radius-control/input-controls.js.map +1 -1
  1105. package/build-module/components/border-radius-control/linked-button.js +6 -8
  1106. package/build-module/components/border-radius-control/linked-button.js.map +1 -1
  1107. package/build-module/components/border-radius-control/utils.js +3 -7
  1108. package/build-module/components/border-radius-control/utils.js.map +1 -1
  1109. package/build-module/components/button-block-appender/index.js +13 -15
  1110. package/build-module/components/button-block-appender/index.js.map +1 -1
  1111. package/build-module/components/button-block-appender/index.native.js +25 -29
  1112. package/build-module/components/button-block-appender/index.native.js.map +1 -1
  1113. package/build-module/components/caption/index.native.js +40 -43
  1114. package/build-module/components/caption/index.native.js.map +1 -1
  1115. package/build-module/components/child-layout-control/index.js +5 -6
  1116. package/build-module/components/child-layout-control/index.js.map +1 -1
  1117. package/build-module/components/color-palette/control.js +7 -9
  1118. package/build-module/components/color-palette/control.js.map +1 -1
  1119. package/build-module/components/color-palette/with-color-context.js +3 -9
  1120. package/build-module/components/color-palette/with-color-context.js.map +1 -1
  1121. package/build-module/components/color-style-selector/index.js +28 -35
  1122. package/build-module/components/color-style-selector/index.js.map +1 -1
  1123. package/build-module/components/colors/utils.js +10 -9
  1124. package/build-module/components/colors/utils.js.map +1 -1
  1125. package/build-module/components/colors/with-colors.js +19 -38
  1126. package/build-module/components/colors/with-colors.js.map +1 -1
  1127. package/build-module/components/colors-gradients/control.js +26 -25
  1128. package/build-module/components/colors-gradients/control.js.map +1 -1
  1129. package/build-module/components/colors-gradients/dropdown.js +44 -49
  1130. package/build-module/components/colors-gradients/dropdown.js.map +1 -1
  1131. package/build-module/components/colors-gradients/panel-color-gradient-settings.js +27 -28
  1132. package/build-module/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
  1133. package/build-module/components/colors-gradients/panel-color-gradient-settings.native.js +27 -31
  1134. package/build-module/components/colors-gradients/panel-color-gradient-settings.native.js.map +1 -1
  1135. package/build-module/components/contrast-checker/index.js +12 -13
  1136. package/build-module/components/contrast-checker/index.js.map +1 -1
  1137. package/build-module/components/contrast-checker/index.native.js +16 -18
  1138. package/build-module/components/contrast-checker/index.native.js.map +1 -1
  1139. package/build-module/components/convert-to-group-buttons/index.js +9 -10
  1140. package/build-module/components/convert-to-group-buttons/index.js.map +1 -1
  1141. package/build-module/components/convert-to-group-buttons/index.native.js +6 -7
  1142. package/build-module/components/convert-to-group-buttons/index.native.js.map +1 -1
  1143. package/build-module/components/convert-to-group-buttons/toolbar.js +6 -12
  1144. package/build-module/components/convert-to-group-buttons/toolbar.js.map +1 -1
  1145. package/build-module/components/convert-to-group-buttons/use-convert-to-group-button-props.js +4 -6
  1146. package/build-module/components/convert-to-group-buttons/use-convert-to-group-button-props.js.map +1 -1
  1147. package/build-module/components/copy-handler/index.js +9 -13
  1148. package/build-module/components/copy-handler/index.js.map +1 -1
  1149. package/build-module/components/date-format-picker/index.js +12 -16
  1150. package/build-module/components/date-format-picker/index.js.map +1 -1
  1151. package/build-module/components/default-block-appender/index.js +7 -9
  1152. package/build-module/components/default-block-appender/index.js.map +1 -1
  1153. package/build-module/components/default-block-appender/index.native.js +8 -10
  1154. package/build-module/components/default-block-appender/index.native.js.map +1 -1
  1155. package/build-module/components/default-style-picker/index.js +14 -22
  1156. package/build-module/components/default-style-picker/index.js.map +1 -1
  1157. package/build-module/components/duotone/components.js +14 -18
  1158. package/build-module/components/duotone/components.js.map +1 -1
  1159. package/build-module/components/duotone/utils.js +1 -2
  1160. package/build-module/components/duotone/utils.js.map +1 -1
  1161. package/build-module/components/duotone-control/index.js +13 -17
  1162. package/build-module/components/duotone-control/index.js.map +1 -1
  1163. package/build-module/components/editable-text/index.js +11 -12
  1164. package/build-module/components/editable-text/index.js.map +1 -1
  1165. package/build-module/components/editor-styles/index.js +4 -5
  1166. package/build-module/components/editor-styles/index.js.map +1 -1
  1167. package/build-module/components/floating-toolbar/index.native.js +7 -8
  1168. package/build-module/components/floating-toolbar/index.native.js.map +1 -1
  1169. package/build-module/components/font-appearance-control/index.js +21 -29
  1170. package/build-module/components/font-appearance-control/index.js.map +1 -1
  1171. package/build-module/components/font-family/index.js +14 -16
  1172. package/build-module/components/font-family/index.js.map +1 -1
  1173. package/build-module/components/font-sizes/fluid-utils.js +17 -21
  1174. package/build-module/components/font-sizes/fluid-utils.js.map +1 -1
  1175. package/build-module/components/font-sizes/font-size-picker.js +2 -3
  1176. package/build-module/components/font-sizes/font-size-picker.js.map +1 -1
  1177. package/build-module/components/font-sizes/utils.js +8 -14
  1178. package/build-module/components/font-sizes/utils.js.map +1 -1
  1179. package/build-module/components/font-sizes/with-font-sizes.js +18 -36
  1180. package/build-module/components/font-sizes/with-font-sizes.js.map +1 -1
  1181. package/build-module/components/global-styles/advanced-panel.js +7 -10
  1182. package/build-module/components/global-styles/advanced-panel.js.map +1 -1
  1183. package/build-module/components/global-styles/border-panel.js +45 -78
  1184. package/build-module/components/global-styles/border-panel.js.map +1 -1
  1185. package/build-module/components/global-styles/color-panel.js +119 -162
  1186. package/build-module/components/global-styles/color-panel.js.map +1 -1
  1187. package/build-module/components/global-styles/color-panel.native.js +25 -42
  1188. package/build-module/components/global-styles/color-panel.native.js.map +1 -1
  1189. package/build-module/components/global-styles/dimensions-panel.js +78 -109
  1190. package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
  1191. package/build-module/components/global-styles/effects-panel.js +60 -73
  1192. package/build-module/components/global-styles/effects-panel.js.map +1 -1
  1193. package/build-module/components/global-styles/filters-panel.js +55 -72
  1194. package/build-module/components/global-styles/filters-panel.js.map +1 -1
  1195. package/build-module/components/global-styles/get-block-css-selector.js +5 -8
  1196. package/build-module/components/global-styles/get-block-css-selector.js.map +1 -1
  1197. package/build-module/components/global-styles/hooks.js +22 -37
  1198. package/build-module/components/global-styles/hooks.js.map +1 -1
  1199. package/build-module/components/global-styles/index.js +1 -1
  1200. package/build-module/components/global-styles/index.js.map +1 -1
  1201. package/build-module/components/global-styles/typography-panel.js +69 -125
  1202. package/build-module/components/global-styles/typography-panel.js.map +1 -1
  1203. package/build-module/components/global-styles/typography-utils.js +48 -26
  1204. package/build-module/components/global-styles/typography-utils.js.map +1 -1
  1205. package/build-module/components/global-styles/use-global-styles-output.js +146 -240
  1206. package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
  1207. package/build-module/components/global-styles/utils.js +12 -28
  1208. package/build-module/components/global-styles/utils.js.map +1 -1
  1209. package/build-module/components/gradients/use-gradient.js +6 -7
  1210. package/build-module/components/gradients/use-gradient.js.map +1 -1
  1211. package/build-module/components/gradients/with-gradient.js +2 -3
  1212. package/build-module/components/gradients/with-gradient.js.map +1 -1
  1213. package/build-module/components/height-control/index.js +9 -10
  1214. package/build-module/components/height-control/index.js.map +1 -1
  1215. package/build-module/components/iframe/index.js +54 -90
  1216. package/build-module/components/iframe/index.js.map +1 -1
  1217. package/build-module/components/iframe/use-compatibility-styles.js +29 -20
  1218. package/build-module/components/iframe/use-compatibility-styles.js.map +1 -1
  1219. package/build-module/components/image-editor/aspect-ratio-dropdown.js +83 -91
  1220. package/build-module/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
  1221. package/build-module/components/image-editor/constants.js +1 -2
  1222. package/build-module/components/image-editor/constants.js.map +1 -1
  1223. package/build-module/components/image-editor/context.js +9 -10
  1224. package/build-module/components/image-editor/context.js.map +1 -1
  1225. package/build-module/components/image-editor/cropper.js +11 -12
  1226. package/build-module/components/image-editor/cropper.js.map +1 -1
  1227. package/build-module/components/image-editor/index.js +12 -13
  1228. package/build-module/components/image-editor/index.js.map +1 -1
  1229. package/build-module/components/image-editor/use-save-image.js +11 -12
  1230. package/build-module/components/image-editor/use-save-image.js.map +1 -1
  1231. package/build-module/components/image-editor/use-transform-image.js +5 -6
  1232. package/build-module/components/image-editor/use-transform-image.js.map +1 -1
  1233. package/build-module/components/image-editor/zoom-dropdown.js +10 -13
  1234. package/build-module/components/image-editor/zoom-dropdown.js.map +1 -1
  1235. package/build-module/components/image-size-control/index.js +12 -13
  1236. package/build-module/components/image-size-control/index.js.map +1 -1
  1237. package/build-module/components/index.js +1 -1
  1238. package/build-module/components/index.js.map +1 -1
  1239. package/build-module/components/index.native.js +1 -0
  1240. package/build-module/components/index.native.js.map +1 -1
  1241. package/build-module/components/inner-blocks/button-block-appender.js +7 -8
  1242. package/build-module/components/inner-blocks/button-block-appender.js.map +1 -1
  1243. package/build-module/components/inner-blocks/default-block-appender.js +6 -8
  1244. package/build-module/components/inner-blocks/default-block-appender.js.map +1 -1
  1245. package/build-module/components/inner-blocks/index.js +11 -13
  1246. package/build-module/components/inner-blocks/index.js.map +1 -1
  1247. package/build-module/components/inner-blocks/index.native.js +9 -9
  1248. package/build-module/components/inner-blocks/index.native.js.map +1 -1
  1249. package/build-module/components/inner-blocks/use-block-context.js +1 -4
  1250. package/build-module/components/inner-blocks/use-block-context.js.map +1 -1
  1251. package/build-module/components/inner-blocks/use-nested-settings-update.js +24 -29
  1252. package/build-module/components/inner-blocks/use-nested-settings-update.js.map +1 -1
  1253. package/build-module/components/inner-blocks/with-client-id.js +2 -3
  1254. package/build-module/components/inner-blocks/with-client-id.js.map +1 -1
  1255. package/build-module/components/inserter/block-patterns-explorer/explorer.js +11 -12
  1256. package/build-module/components/inserter/block-patterns-explorer/explorer.js.map +1 -1
  1257. package/build-module/components/inserter/block-patterns-explorer/patterns-list.js +11 -18
  1258. package/build-module/components/inserter/block-patterns-explorer/patterns-list.js.map +1 -1
  1259. package/build-module/components/inserter/block-patterns-explorer/sidebar.js +20 -24
  1260. package/build-module/components/inserter/block-patterns-explorer/sidebar.js.map +1 -1
  1261. package/build-module/components/inserter/block-patterns-tab.js +62 -47
  1262. package/build-module/components/inserter/block-patterns-tab.js.map +1 -1
  1263. package/build-module/components/inserter/block-types-tab.js +7 -9
  1264. package/build-module/components/inserter/block-types-tab.js.map +1 -1
  1265. package/build-module/components/inserter/block-types-tab.native.js +8 -9
  1266. package/build-module/components/inserter/block-types-tab.native.js.map +1 -1
  1267. package/build-module/components/inserter/hooks/use-block-type-impressions.native.js +3 -5
  1268. package/build-module/components/inserter/hooks/use-block-type-impressions.native.js.map +1 -1
  1269. package/build-module/components/inserter/hooks/use-block-types-state.js +9 -9
  1270. package/build-module/components/inserter/hooks/use-block-types-state.js.map +1 -1
  1271. package/build-module/components/inserter/hooks/use-clipboard-block.native.js +2 -2
  1272. package/build-module/components/inserter/hooks/use-clipboard-block.native.js.map +1 -1
  1273. package/build-module/components/inserter/hooks/use-debounced-input.js +1 -2
  1274. package/build-module/components/inserter/hooks/use-debounced-input.js.map +1 -1
  1275. package/build-module/components/inserter/hooks/use-insertion-point.js +11 -13
  1276. package/build-module/components/inserter/hooks/use-insertion-point.js.map +1 -1
  1277. package/build-module/components/inserter/index.js +45 -58
  1278. package/build-module/components/inserter/index.js.map +1 -1
  1279. package/build-module/components/inserter/index.native.js +28 -35
  1280. package/build-module/components/inserter/index.native.js.map +1 -1
  1281. package/build-module/components/inserter/library.js +12 -13
  1282. package/build-module/components/inserter/library.js.map +1 -1
  1283. package/build-module/components/inserter/media-tab/hooks.js +2 -5
  1284. package/build-module/components/inserter/media-tab/hooks.js.map +1 -1
  1285. package/build-module/components/inserter/media-tab/media-list.js +8 -10
  1286. package/build-module/components/inserter/media-tab/media-list.js.map +1 -1
  1287. package/build-module/components/inserter/media-tab/media-panel.js +12 -14
  1288. package/build-module/components/inserter/media-tab/media-panel.js.map +1 -1
  1289. package/build-module/components/inserter/media-tab/media-preview.js +47 -59
  1290. package/build-module/components/inserter/media-tab/media-preview.js.map +1 -1
  1291. package/build-module/components/inserter/media-tab/media-tab.js +27 -31
  1292. package/build-module/components/inserter/media-tab/media-tab.js.map +1 -1
  1293. package/build-module/components/inserter/media-tab/utils.js +3 -5
  1294. package/build-module/components/inserter/media-tab/utils.js.map +1 -1
  1295. package/build-module/components/inserter/menu.js +15 -19
  1296. package/build-module/components/inserter/menu.js.map +1 -1
  1297. package/build-module/components/inserter/menu.native.js +27 -31
  1298. package/build-module/components/inserter/menu.native.js.map +1 -1
  1299. package/build-module/components/inserter/mobile-tab-navigation.js +7 -9
  1300. package/build-module/components/inserter/mobile-tab-navigation.js.map +1 -1
  1301. package/build-module/components/inserter/panel.js +5 -6
  1302. package/build-module/components/inserter/panel.js.map +1 -1
  1303. package/build-module/components/inserter/preview-panel.js +4 -5
  1304. package/build-module/components/inserter/preview-panel.js.map +1 -1
  1305. package/build-module/components/inserter/quick-inserter.js +8 -9
  1306. package/build-module/components/inserter/quick-inserter.js.map +1 -1
  1307. package/build-module/components/inserter/reusable-blocks-tab.js +16 -21
  1308. package/build-module/components/inserter/reusable-blocks-tab.js.map +1 -1
  1309. package/build-module/components/inserter/reusable-blocks-tab.native.js +5 -6
  1310. package/build-module/components/inserter/reusable-blocks-tab.native.js.map +1 -1
  1311. package/build-module/components/inserter/search-items.js +12 -40
  1312. package/build-module/components/inserter/search-items.js.map +1 -1
  1313. package/build-module/components/inserter/search-results.js +17 -18
  1314. package/build-module/components/inserter/search-results.js.map +1 -1
  1315. package/build-module/components/inserter/search-results.native.js +11 -12
  1316. package/build-module/components/inserter/search-results.native.js.map +1 -1
  1317. package/build-module/components/inserter/tabs.js +11 -12
  1318. package/build-module/components/inserter/tabs.js.map +1 -1
  1319. package/build-module/components/inserter/tabs.native.js +37 -55
  1320. package/build-module/components/inserter/tabs.native.js.map +1 -1
  1321. package/build-module/components/inserter/utils.native.js +13 -17
  1322. package/build-module/components/inserter/utils.native.js.map +1 -1
  1323. package/build-module/components/inserter-draggable-blocks/index.js +11 -13
  1324. package/build-module/components/inserter-draggable-blocks/index.js.map +1 -1
  1325. package/build-module/components/inserter-list-item/index.js +66 -70
  1326. package/build-module/components/inserter-list-item/index.js.map +1 -1
  1327. package/build-module/components/inserter-listbox/group.js +4 -4
  1328. package/build-module/components/inserter-listbox/group.js.map +1 -1
  1329. package/build-module/components/inserter-listbox/index.js +3 -4
  1330. package/build-module/components/inserter-listbox/index.js.map +1 -1
  1331. package/build-module/components/inserter-listbox/item.js +14 -13
  1332. package/build-module/components/inserter-listbox/item.js.map +1 -1
  1333. package/build-module/components/inserter-listbox/row.js +4 -4
  1334. package/build-module/components/inserter-listbox/row.js.map +1 -1
  1335. package/build-module/components/inspector-controls/block-support-slot-container.js +6 -8
  1336. package/build-module/components/inspector-controls/block-support-slot-container.js.map +1 -1
  1337. package/build-module/components/inspector-controls/block-support-tools-panel.js +6 -8
  1338. package/build-module/components/inspector-controls/block-support-tools-panel.js.map +1 -1
  1339. package/build-module/components/inspector-controls/fill.js +13 -23
  1340. package/build-module/components/inspector-controls/fill.js.map +1 -1
  1341. package/build-module/components/inspector-controls/fill.native.js +9 -12
  1342. package/build-module/components/inspector-controls/fill.native.js.map +1 -1
  1343. package/build-module/components/inspector-controls/index.js +4 -5
  1344. package/build-module/components/inspector-controls/index.js.map +1 -1
  1345. package/build-module/components/inspector-controls/slot.js +13 -18
  1346. package/build-module/components/inspector-controls/slot.js.map +1 -1
  1347. package/build-module/components/inspector-controls/slot.native.js +8 -11
  1348. package/build-module/components/inspector-controls/slot.native.js.map +1 -1
  1349. package/build-module/components/inspector-controls-tabs/index.js +6 -7
  1350. package/build-module/components/inspector-controls-tabs/index.js.map +1 -1
  1351. package/build-module/components/inspector-controls-tabs/position-controls-panel.js +3 -8
  1352. package/build-module/components/inspector-controls-tabs/position-controls-panel.js.map +1 -1
  1353. package/build-module/components/inspector-controls-tabs/settings-tab-hint.js +1 -1
  1354. package/build-module/components/inspector-controls-tabs/settings-tab-hint.js.map +1 -1
  1355. package/build-module/components/inspector-controls-tabs/settings-tab.js +3 -6
  1356. package/build-module/components/inspector-controls-tabs/settings-tab.js.map +1 -1
  1357. package/build-module/components/inspector-controls-tabs/styles-tab.js +5 -6
  1358. package/build-module/components/inspector-controls-tabs/styles-tab.js.map +1 -1
  1359. package/build-module/components/inspector-controls-tabs/use-inspector-controls-tabs.js +1 -3
  1360. package/build-module/components/inspector-controls-tabs/use-inspector-controls-tabs.js.map +1 -1
  1361. package/build-module/components/inspector-popover-header/index.js +18 -22
  1362. package/build-module/components/inspector-popover-header/index.js.map +1 -1
  1363. package/build-module/components/justify-content-control/index.js +4 -5
  1364. package/build-module/components/justify-content-control/index.js.map +1 -1
  1365. package/build-module/components/justify-content-control/ui.js +12 -14
  1366. package/build-module/components/justify-content-control/ui.js.map +1 -1
  1367. package/build-module/components/letter-spacing-control/index.js +8 -10
  1368. package/build-module/components/letter-spacing-control/index.js.map +1 -1
  1369. package/build-module/components/line-height-control/index.js +14 -20
  1370. package/build-module/components/line-height-control/index.js.map +1 -1
  1371. package/build-module/components/line-height-control/index.native.js +4 -5
  1372. package/build-module/components/line-height-control/index.native.js.map +1 -1
  1373. package/build-module/components/link-control/index.js +85 -72
  1374. package/build-module/components/link-control/index.js.map +1 -1
  1375. package/build-module/components/link-control/is-url-like.js +32 -3
  1376. package/build-module/components/link-control/is-url-like.js.map +1 -1
  1377. package/build-module/components/link-control/link-preview.js +24 -27
  1378. package/build-module/components/link-control/link-preview.js.map +1 -1
  1379. package/build-module/components/link-control/search-create-button.js +9 -12
  1380. package/build-module/components/link-control/search-create-button.js.map +1 -1
  1381. package/build-module/components/link-control/search-input.js +24 -27
  1382. package/build-module/components/link-control/search-input.js.map +1 -1
  1383. package/build-module/components/link-control/search-item.js +15 -18
  1384. package/build-module/components/link-control/search-item.js.map +1 -1
  1385. package/build-module/components/link-control/search-results.js +23 -30
  1386. package/build-module/components/link-control/search-results.js.map +1 -1
  1387. package/build-module/components/link-control/settings-drawer.js +7 -33
  1388. package/build-module/components/link-control/settings-drawer.js.map +1 -1
  1389. package/build-module/components/link-control/settings.js +7 -9
  1390. package/build-module/components/link-control/settings.js.map +1 -1
  1391. package/build-module/components/link-control/use-internal-value.js +46 -0
  1392. package/build-module/components/link-control/use-internal-value.js.map +1 -0
  1393. package/build-module/components/link-control/use-rich-url-data.js +1 -1
  1394. package/build-module/components/link-control/use-rich-url-data.js.map +1 -1
  1395. package/build-module/components/link-control/use-search-handler.js +10 -23
  1396. package/build-module/components/link-control/use-search-handler.js.map +1 -1
  1397. package/build-module/components/list-view/appender.js +14 -16
  1398. package/build-module/components/list-view/appender.js.map +1 -1
  1399. package/build-module/components/list-view/aria-referenced-text.js +34 -0
  1400. package/build-module/components/list-view/aria-referenced-text.js.map +1 -0
  1401. package/build-module/components/list-view/block-contents.js +39 -39
  1402. package/build-module/components/list-view/block-contents.js.map +1 -1
  1403. package/build-module/components/list-view/block-select-button.js +78 -25
  1404. package/build-module/components/list-view/block-select-button.js.map +1 -1
  1405. package/build-module/components/list-view/block.js +117 -101
  1406. package/build-module/components/list-view/block.js.map +1 -1
  1407. package/build-module/components/list-view/branch.js +14 -12
  1408. package/build-module/components/list-view/branch.js.map +1 -1
  1409. package/build-module/components/list-view/drop-indicator.js +65 -16
  1410. package/build-module/components/list-view/drop-indicator.js.map +1 -1
  1411. package/build-module/components/list-view/expander.js +3 -4
  1412. package/build-module/components/list-view/expander.js.map +1 -1
  1413. package/build-module/components/list-view/index.js +50 -48
  1414. package/build-module/components/list-view/index.js.map +1 -1
  1415. package/build-module/components/list-view/leaf.js +14 -15
  1416. package/build-module/components/list-view/leaf.js.map +1 -1
  1417. package/build-module/components/list-view/use-block-selection.js +4 -6
  1418. package/build-module/components/list-view/use-block-selection.js.map +1 -1
  1419. package/build-module/components/list-view/use-list-view-client-ids.js +6 -29
  1420. package/build-module/components/list-view/use-list-view-client-ids.js.map +1 -1
  1421. package/build-module/components/list-view/use-list-view-drop-zone.js +62 -39
  1422. package/build-module/components/list-view/use-list-view-drop-zone.js.map +1 -1
  1423. package/build-module/components/list-view/use-list-view-expand-selected-item.js +4 -5
  1424. package/build-module/components/list-view/use-list-view-expand-selected-item.js.map +1 -1
  1425. package/build-module/components/list-view/use-list-view-scroll-into-view.js +5 -6
  1426. package/build-module/components/list-view/use-list-view-scroll-into-view.js.map +1 -1
  1427. package/build-module/components/media-placeholder/index.js +106 -102
  1428. package/build-module/components/media-placeholder/index.js.map +1 -1
  1429. package/build-module/components/media-placeholder/index.native.js +5 -6
  1430. package/build-module/components/media-placeholder/index.native.js.map +1 -1
  1431. package/build-module/components/media-replace-flow/index.js +92 -107
  1432. package/build-module/components/media-replace-flow/index.js.map +1 -1
  1433. package/build-module/components/media-upload/check.js +4 -5
  1434. package/build-module/components/media-upload/check.js.map +1 -1
  1435. package/build-module/components/media-upload/index.native.js +1 -1
  1436. package/build-module/components/media-upload/index.native.js.map +1 -1
  1437. package/build-module/components/multi-selection-inspector/index.js +3 -4
  1438. package/build-module/components/multi-selection-inspector/index.js.map +1 -1
  1439. package/build-module/components/navigable-toolbar/index.js +24 -22
  1440. package/build-module/components/navigable-toolbar/index.js.map +1 -1
  1441. package/build-module/components/observe-typing/index.js +3 -4
  1442. package/build-module/components/observe-typing/index.js.map +1 -1
  1443. package/build-module/components/panel-color-settings/index.js +8 -9
  1444. package/build-module/components/panel-color-settings/index.js.map +1 -1
  1445. package/build-module/components/plain-text/index.js +12 -13
  1446. package/build-module/components/plain-text/index.js.map +1 -1
  1447. package/build-module/components/plain-text/index.native.js +15 -19
  1448. package/build-module/components/plain-text/index.native.js.map +1 -1
  1449. package/build-module/components/preview-options/index.js +12 -12
  1450. package/build-module/components/preview-options/index.js.map +1 -1
  1451. package/build-module/components/provider/block-refs-provider.js +3 -4
  1452. package/build-module/components/provider/block-refs-provider.js.map +1 -1
  1453. package/build-module/components/provider/index.js +2 -3
  1454. package/build-module/components/provider/index.js.map +1 -1
  1455. package/build-module/components/provider/use-block-sync.js +7 -8
  1456. package/build-module/components/provider/use-block-sync.js.map +1 -1
  1457. package/build-module/components/provider/with-registry-provider.js +13 -14
  1458. package/build-module/components/provider/with-registry-provider.js.map +1 -1
  1459. package/build-module/components/publish-date-time-picker/index.js +10 -11
  1460. package/build-module/components/publish-date-time-picker/index.js.map +1 -1
  1461. package/build-module/components/recursion-provider/index.js +7 -11
  1462. package/build-module/components/recursion-provider/index.js.map +1 -1
  1463. package/build-module/components/resizable-box-popover/index.js +10 -10
  1464. package/build-module/components/resizable-box-popover/index.js.map +1 -1
  1465. package/build-module/components/responsive-block-control/label.js +5 -6
  1466. package/build-module/components/responsive-block-control/label.js.map +1 -1
  1467. package/build-module/components/rich-text/content.js +85 -0
  1468. package/build-module/components/rich-text/content.js.map +1 -0
  1469. package/build-module/components/rich-text/embed-handler-picker.native.js +6 -10
  1470. package/build-module/components/rich-text/embed-handler-picker.native.js.map +1 -1
  1471. package/build-module/components/rich-text/format-edit.js +7 -8
  1472. package/build-module/components/rich-text/format-edit.js.map +1 -1
  1473. package/build-module/components/rich-text/format-toolbar/index.js +10 -20
  1474. package/build-module/components/rich-text/format-toolbar/index.js.map +1 -1
  1475. package/build-module/components/rich-text/format-toolbar-container.js +13 -16
  1476. package/build-module/components/rich-text/format-toolbar-container.js.map +1 -1
  1477. package/build-module/components/rich-text/index.js +45 -83
  1478. package/build-module/components/rich-text/index.js.map +1 -1
  1479. package/build-module/components/rich-text/index.native.js +128 -183
  1480. package/build-module/components/rich-text/index.native.js.map +1 -1
  1481. package/build-module/components/rich-text/input-event.js +4 -5
  1482. package/build-module/components/rich-text/input-event.js.map +1 -1
  1483. package/build-module/components/rich-text/shortcut.js +5 -6
  1484. package/build-module/components/rich-text/shortcut.js.map +1 -1
  1485. package/build-module/components/rich-text/split-value.js +8 -10
  1486. package/build-module/components/rich-text/split-value.js.map +1 -1
  1487. package/build-module/components/rich-text/toolbar-button.js +8 -10
  1488. package/build-module/components/rich-text/toolbar-button.js.map +1 -1
  1489. package/build-module/components/rich-text/use-before-input-rules.js +1 -4
  1490. package/build-module/components/rich-text/use-before-input-rules.js.map +1 -1
  1491. package/build-module/components/rich-text/use-enter.js +3 -6
  1492. package/build-module/components/rich-text/use-enter.js.map +1 -1
  1493. package/build-module/components/rich-text/use-firefox-compat.js +29 -1
  1494. package/build-module/components/rich-text/use-firefox-compat.js.map +1 -1
  1495. package/build-module/components/rich-text/use-format-types.js +11 -17
  1496. package/build-module/components/rich-text/use-format-types.js.map +1 -1
  1497. package/build-module/components/rich-text/use-input-rules.js +9 -15
  1498. package/build-module/components/rich-text/use-input-rules.js.map +1 -1
  1499. package/build-module/components/rich-text/use-mark-persistent.js +4 -5
  1500. package/build-module/components/rich-text/use-mark-persistent.js.map +1 -1
  1501. package/build-module/components/rich-text/use-paste-handler.js +5 -7
  1502. package/build-module/components/rich-text/use-paste-handler.js.map +1 -1
  1503. package/build-module/components/rich-text/utils.js +5 -7
  1504. package/build-module/components/rich-text/utils.js.map +1 -1
  1505. package/build-module/components/skip-to-selected-block/index.js +3 -4
  1506. package/build-module/components/skip-to-selected-block/index.js.map +1 -1
  1507. package/build-module/components/spacing-sizes-control/hooks/use-spacing-sizes.js +27 -0
  1508. package/build-module/components/spacing-sizes-control/hooks/use-spacing-sizes.js.map +1 -0
  1509. package/build-module/components/spacing-sizes-control/index.js +64 -64
  1510. package/build-module/components/spacing-sizes-control/index.js.map +1 -1
  1511. package/build-module/components/spacing-sizes-control/{axial-input-controls.js → input-controls/axial.js} +21 -22
  1512. package/build-module/components/spacing-sizes-control/input-controls/axial.js.map +1 -0
  1513. package/build-module/components/spacing-sizes-control/{input-controls.js → input-controls/separated.js} +21 -21
  1514. package/build-module/components/spacing-sizes-control/input-controls/separated.js.map +1 -0
  1515. package/build-module/components/spacing-sizes-control/input-controls/single.js +40 -0
  1516. package/build-module/components/spacing-sizes-control/input-controls/single.js.map +1 -0
  1517. package/build-module/components/spacing-sizes-control/{spacing-input-control.js → input-controls/spacing-input-control.js} +53 -70
  1518. package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -0
  1519. package/build-module/components/spacing-sizes-control/sides-dropdown/index.js +73 -0
  1520. package/build-module/components/spacing-sizes-control/sides-dropdown/index.js.map +1 -0
  1521. package/build-module/components/spacing-sizes-control/utils.js +196 -25
  1522. package/build-module/components/spacing-sizes-control/utils.js.map +1 -1
  1523. package/build-module/components/text-decoration-control/index.js +5 -6
  1524. package/build-module/components/text-decoration-control/index.js.map +1 -1
  1525. package/build-module/components/text-transform-control/index.js +5 -6
  1526. package/build-module/components/text-transform-control/index.js.map +1 -1
  1527. package/build-module/components/tool-selector/index.js +13 -17
  1528. package/build-module/components/tool-selector/index.js.map +1 -1
  1529. package/build-module/components/typewriter/index.js +6 -9
  1530. package/build-module/components/typewriter/index.js.map +1 -1
  1531. package/build-module/components/ungroup-button/index.native.js +11 -14
  1532. package/build-module/components/ungroup-button/index.native.js.map +1 -1
  1533. package/build-module/components/unit-control/index.js +8 -9
  1534. package/build-module/components/unit-control/index.js.map +1 -1
  1535. package/build-module/components/url-input/index.js +23 -33
  1536. package/build-module/components/url-input/index.js.map +1 -1
  1537. package/build-module/components/url-input/index.native.js +10 -12
  1538. package/build-module/components/url-input/index.native.js.map +1 -1
  1539. package/build-module/components/url-popover/image-url-input-ui.js +34 -30
  1540. package/build-module/components/url-popover/image-url-input-ui.js.map +1 -1
  1541. package/build-module/components/url-popover/index.js +16 -18
  1542. package/build-module/components/url-popover/index.js.map +1 -1
  1543. package/build-module/components/url-popover/link-editor.js +10 -11
  1544. package/build-module/components/url-popover/link-editor.js.map +1 -1
  1545. package/build-module/components/url-popover/link-viewer-url.js +5 -6
  1546. package/build-module/components/url-popover/link-viewer-url.js.map +1 -1
  1547. package/build-module/components/url-popover/link-viewer.js +11 -12
  1548. package/build-module/components/url-popover/link-viewer.js.map +1 -1
  1549. package/build-module/components/use-block-display-information/index.js +29 -2
  1550. package/build-module/components/use-block-display-information/index.js.map +1 -1
  1551. package/build-module/components/use-block-drop-zone/index.js +16 -23
  1552. package/build-module/components/use-block-drop-zone/index.js.map +1 -1
  1553. package/build-module/components/use-block-drop-zone/index.native.js +8 -11
  1554. package/build-module/components/use-block-drop-zone/index.native.js.map +1 -1
  1555. package/build-module/components/use-moving-animation/index.js +9 -12
  1556. package/build-module/components/use-moving-animation/index.js.map +1 -1
  1557. package/build-module/components/use-on-block-drop/index.js +2 -6
  1558. package/build-module/components/use-on-block-drop/index.js.map +1 -1
  1559. package/build-module/components/use-on-block-drop/index.native.js +8 -10
  1560. package/build-module/components/use-on-block-drop/index.native.js.map +1 -1
  1561. package/build-module/components/use-paste-styles/index.js +2 -6
  1562. package/build-module/components/use-paste-styles/index.js.map +1 -1
  1563. package/build-module/components/video-player/index.native.js +2 -3
  1564. package/build-module/components/video-player/index.native.js.map +1 -1
  1565. package/build-module/components/warning/index.js +6 -7
  1566. package/build-module/components/warning/index.js.map +1 -1
  1567. package/build-module/components/warning/index.native.js +13 -14
  1568. package/build-module/components/warning/index.native.js.map +1 -1
  1569. package/build-module/components/writing-flow/index.js +6 -8
  1570. package/build-module/components/writing-flow/index.js.map +1 -1
  1571. package/build-module/components/writing-flow/use-drag-selection.js +5 -7
  1572. package/build-module/components/writing-flow/use-drag-selection.js.map +1 -1
  1573. package/build-module/components/writing-flow/use-tab-nav.js +41 -11
  1574. package/build-module/components/writing-flow/use-tab-nav.js.map +1 -1
  1575. package/build-module/hooks/align.js +15 -21
  1576. package/build-module/hooks/align.js.map +1 -1
  1577. package/build-module/hooks/anchor.js +8 -4
  1578. package/build-module/hooks/anchor.js.map +1 -1
  1579. package/build-module/hooks/aria-label.js +1 -3
  1580. package/build-module/hooks/aria-label.js.map +1 -1
  1581. package/build-module/hooks/behaviors.js +132 -58
  1582. package/build-module/hooks/behaviors.js.map +1 -1
  1583. package/build-module/hooks/border.js +29 -42
  1584. package/build-module/hooks/border.js.map +1 -1
  1585. package/build-module/hooks/color.js +26 -41
  1586. package/build-module/hooks/color.js.map +1 -1
  1587. package/build-module/hooks/content-lock-ui.js +30 -33
  1588. package/build-module/hooks/content-lock-ui.js.map +1 -1
  1589. package/build-module/hooks/contrast-checker.js +4 -7
  1590. package/build-module/hooks/contrast-checker.js.map +1 -1
  1591. package/build-module/hooks/custom-class-name.js +7 -5
  1592. package/build-module/hooks/custom-class-name.js.map +1 -1
  1593. package/build-module/hooks/dimensions.js +11 -13
  1594. package/build-module/hooks/dimensions.js.map +1 -1
  1595. package/build-module/hooks/duotone.js +37 -48
  1596. package/build-module/hooks/duotone.js.map +1 -1
  1597. package/build-module/hooks/font-family.js +6 -11
  1598. package/build-module/hooks/font-family.js.map +1 -1
  1599. package/build-module/hooks/font-size.js +22 -28
  1600. package/build-module/hooks/font-size.js.map +1 -1
  1601. package/build-module/hooks/gap.js +5 -6
  1602. package/build-module/hooks/gap.js.map +1 -1
  1603. package/build-module/hooks/layout.js +62 -77
  1604. package/build-module/hooks/layout.js.map +1 -1
  1605. package/build-module/hooks/line-height.js +5 -8
  1606. package/build-module/hooks/line-height.js.map +1 -1
  1607. package/build-module/hooks/lock.js +2 -2
  1608. package/build-module/hooks/lock.js.map +1 -1
  1609. package/build-module/hooks/margin.js +6 -9
  1610. package/build-module/hooks/margin.js.map +1 -1
  1611. package/build-module/hooks/metadata-name.js +4 -5
  1612. package/build-module/hooks/metadata-name.js.map +1 -1
  1613. package/build-module/hooks/metadata.js +3 -7
  1614. package/build-module/hooks/metadata.js.map +1 -1
  1615. package/build-module/hooks/padding.js +6 -9
  1616. package/build-module/hooks/padding.js.map +1 -1
  1617. package/build-module/hooks/position.js +49 -55
  1618. package/build-module/hooks/position.js.map +1 -1
  1619. package/build-module/hooks/settings.js +1 -3
  1620. package/build-module/hooks/settings.js.map +1 -1
  1621. package/build-module/hooks/style.js +18 -22
  1622. package/build-module/hooks/style.js.map +1 -1
  1623. package/build-module/hooks/supports.js +4 -6
  1624. package/build-module/hooks/supports.js.map +1 -1
  1625. package/build-module/hooks/typography.js +18 -27
  1626. package/build-module/hooks/typography.js.map +1 -1
  1627. package/build-module/hooks/typography.native.js +4 -3
  1628. package/build-module/hooks/typography.native.js.map +1 -1
  1629. package/build-module/hooks/use-border-props.js +1 -3
  1630. package/build-module/hooks/use-border-props.js.map +1 -1
  1631. package/build-module/hooks/use-color-props.js +6 -8
  1632. package/build-module/hooks/use-color-props.js.map +1 -1
  1633. package/build-module/hooks/use-editor-wrapper-styles.native.js +34 -39
  1634. package/build-module/hooks/use-editor-wrapper-styles.native.js.map +1 -1
  1635. package/build-module/hooks/use-spacing-props.js +1 -1
  1636. package/build-module/hooks/use-spacing-props.js.map +1 -1
  1637. package/build-module/hooks/use-typography-props.js +11 -22
  1638. package/build-module/hooks/use-typography-props.js.map +1 -1
  1639. package/build-module/hooks/utils.js +7 -19
  1640. package/build-module/hooks/utils.js.map +1 -1
  1641. package/build-module/index.js +1 -1
  1642. package/build-module/index.js.map +1 -1
  1643. package/build-module/layouts/constrained.js +23 -27
  1644. package/build-module/layouts/constrained.js.map +1 -1
  1645. package/build-module/layouts/definitions.js +147 -0
  1646. package/build-module/layouts/definitions.js.map +1 -0
  1647. package/build-module/layouts/flex.js +50 -59
  1648. package/build-module/layouts/flex.js.map +1 -1
  1649. package/build-module/layouts/flow.js +11 -13
  1650. package/build-module/layouts/flow.js.map +1 -1
  1651. package/build-module/layouts/grid.js +46 -25
  1652. package/build-module/layouts/grid.js.map +1 -1
  1653. package/build-module/layouts/index.js +1 -2
  1654. package/build-module/layouts/index.js.map +1 -1
  1655. package/build-module/layouts/utils.js +10 -11
  1656. package/build-module/layouts/utils.js.map +1 -1
  1657. package/build-module/private-apis.js +12 -1
  1658. package/build-module/private-apis.js.map +1 -1
  1659. package/build-module/store/actions.js +229 -372
  1660. package/build-module/store/actions.js.map +1 -1
  1661. package/build-module/store/array.js +1 -2
  1662. package/build-module/store/array.js.map +1 -1
  1663. package/build-module/store/private-actions.js +189 -7
  1664. package/build-module/store/private-actions.js.map +1 -1
  1665. package/build-module/store/private-selectors.js +100 -25
  1666. package/build-module/store/private-selectors.js.map +1 -1
  1667. package/build-module/store/reducer.js +118 -169
  1668. package/build-module/store/reducer.js.map +1 -1
  1669. package/build-module/store/selectors.js +160 -231
  1670. package/build-module/store/selectors.js.map +1 -1
  1671. package/build-module/utils/block-variation-transforms.js +4 -7
  1672. package/build-module/utils/block-variation-transforms.js.map +1 -1
  1673. package/build-module/utils/math.js +1 -2
  1674. package/build-module/utils/math.js.map +1 -1
  1675. package/build-module/utils/object.js +38 -5
  1676. package/build-module/utils/object.js.map +1 -1
  1677. package/build-module/utils/order-inserter-block-items.js +5 -7
  1678. package/build-module/utils/order-inserter-block-items.js.map +1 -1
  1679. package/build-module/utils/parse-css-unit-to-px.js +3 -6
  1680. package/build-module/utils/parse-css-unit-to-px.js.map +1 -1
  1681. package/build-module/utils/pasting.js +5 -8
  1682. package/build-module/utils/pasting.js.map +1 -1
  1683. package/build-module/utils/pre-parse-patterns.js +1 -1
  1684. package/build-module/utils/pre-parse-patterns.js.map +1 -1
  1685. package/build-module/utils/sorting.js +1 -2
  1686. package/build-module/utils/sorting.js.map +1 -1
  1687. package/build-module/utils/transform-styles/index.js +5 -7
  1688. package/build-module/utils/transform-styles/index.js.map +1 -1
  1689. package/build-module/utils/transform-styles/transforms/wrap.js +25 -28
  1690. package/build-module/utils/transform-styles/transforms/wrap.js.map +1 -1
  1691. package/build-style/content-rtl.css +7 -10
  1692. package/build-style/content.css +7 -10
  1693. package/build-style/style-rtl.css +51 -122
  1694. package/build-style/style.css +51 -122
  1695. package/package.json +31 -31
  1696. package/src/autocompleters/block.js +4 -2
  1697. package/src/components/alignment-control/ui.js +1 -2
  1698. package/src/components/block-actions/index.js +10 -0
  1699. package/src/components/block-alignment-control/constants.js +0 -4
  1700. package/src/components/block-alignment-control/ui.js +1 -6
  1701. package/src/components/block-alignment-matrix-control/index.js +1 -1
  1702. package/src/components/block-breadcrumb/index.js +2 -6
  1703. package/src/components/block-controls/fill.js +15 -17
  1704. package/src/components/block-controls/slot.js +21 -18
  1705. package/src/components/block-controls/slot.native.js +3 -8
  1706. package/src/components/block-draggable/index.js +2 -1
  1707. package/src/components/block-edit/index.js +3 -5
  1708. package/src/components/block-edit/test/edit.js +1 -1
  1709. package/src/components/block-heading-level-dropdown/README.md +52 -0
  1710. package/src/components/block-heading-level-dropdown/heading-level-icon.js +43 -0
  1711. package/src/components/block-heading-level-dropdown/index.js +77 -0
  1712. package/src/components/block-heading-level-dropdown/index.native.js +63 -0
  1713. package/src/components/block-inspector/index.js +19 -92
  1714. package/src/components/block-inspector/style.scss +0 -5
  1715. package/src/components/block-list/block.native.js +1 -0
  1716. package/src/components/block-list/content.scss +8 -12
  1717. package/src/components/block-list/index.js +1 -1
  1718. package/src/components/block-list/use-block-props/index.js +6 -1
  1719. package/src/components/block-list/use-in-between-inserter.js +0 -4
  1720. package/src/components/block-list-appender/index.js +32 -22
  1721. package/src/components/block-lock/style.scss +11 -4
  1722. package/src/components/block-lock/toolbar.js +2 -8
  1723. package/src/components/block-mobile-toolbar/block-actions-menu.native.js +1 -1
  1724. package/src/components/block-mobile-toolbar/test/block-actions-menu.native.js +2 -2
  1725. package/src/components/block-mover/test/__snapshots__/index.native.js.snap +3 -3
  1726. package/src/components/block-mover/test/index.native.js +1 -20
  1727. package/src/components/block-preview/index.js +7 -14
  1728. package/src/components/block-quick-navigation/index.js +81 -0
  1729. package/src/components/block-removal-warning-modal/index.js +94 -0
  1730. package/src/components/block-settings-menu/block-settings-dropdown.js +96 -54
  1731. package/src/components/block-switcher/index.js +1 -2
  1732. package/src/components/block-toolbar/style.scss +0 -4
  1733. package/src/components/block-tools/index.js +10 -1
  1734. package/src/components/block-tools/selected-block-popover.js +6 -0
  1735. package/src/components/block-vertical-alignment-control/ui.js +1 -3
  1736. package/src/components/color-palette/test/__snapshots__/control.js.snap +66 -50
  1737. package/src/components/color-palette/with-color-context.js +2 -6
  1738. package/src/components/colors/utils.js +5 -1
  1739. package/src/components/colors/with-colors.js +1 -5
  1740. package/src/components/colors-gradients/control.js +3 -3
  1741. package/src/components/colors-gradients/panel-color-gradient-settings.js +4 -5
  1742. package/src/components/copy-handler/index.js +5 -5
  1743. package/src/components/duotone-control/index.js +0 -1
  1744. package/src/components/font-sizes/test/fluid-utils.js +97 -76
  1745. package/src/components/font-sizes/utils.js +2 -2
  1746. package/src/components/global-styles/color-panel.js +3 -3
  1747. package/src/components/global-styles/dimensions-panel.js +14 -5
  1748. package/src/components/global-styles/get-block-css-selector.js +2 -2
  1749. package/src/components/global-styles/index.js +1 -0
  1750. package/src/components/global-styles/test/typography-utils.js +139 -1
  1751. package/src/components/global-styles/test/use-global-styles-output.js +14 -9
  1752. package/src/components/global-styles/typography-panel.js +19 -16
  1753. package/src/components/global-styles/typography-utils.js +53 -28
  1754. package/src/components/global-styles/use-global-styles-output.js +29 -19
  1755. package/src/components/global-styles/utils.js +9 -3
  1756. package/src/components/iframe/index.js +46 -68
  1757. package/src/components/iframe/use-compatibility-styles.js +34 -18
  1758. package/src/components/image-editor/constants.js +0 -1
  1759. package/src/components/index.js +1 -1
  1760. package/src/components/index.native.js +1 -0
  1761. package/src/components/inner-blocks/index.js +4 -2
  1762. package/src/components/inner-blocks/index.native.js +1 -1
  1763. package/src/components/inner-blocks/use-nested-settings-update.js +31 -36
  1764. package/src/components/inserter/block-patterns-tab.js +63 -8
  1765. package/src/components/inserter/hooks/use-block-types-state.js +4 -3
  1766. package/src/components/inserter/hooks/use-insertion-point.js +1 -0
  1767. package/src/components/inserter/library.js +2 -1
  1768. package/src/components/inserter/media-tab/media-tab.js +9 -3
  1769. package/src/components/inserter/reusable-blocks-tab.js +3 -3
  1770. package/src/components/inserter/tabs.js +3 -3
  1771. package/src/components/inspector-controls/README.md +1 -1
  1772. package/src/components/inspector-controls/fill.js +2 -6
  1773. package/src/components/inspector-controls-tabs/index.js +0 -1
  1774. package/src/components/inspector-controls-tabs/use-inspector-controls-tabs.js +0 -1
  1775. package/src/components/link-control/index.js +73 -42
  1776. package/src/components/link-control/is-url-like.js +40 -3
  1777. package/src/components/link-control/search-input.js +1 -0
  1778. package/src/components/link-control/search-results.js +4 -14
  1779. package/src/components/link-control/settings-drawer.js +2 -37
  1780. package/src/components/link-control/settings.js +2 -2
  1781. package/src/components/link-control/style.scss +5 -6
  1782. package/src/components/link-control/test/index.js +202 -105
  1783. package/src/components/link-control/test/is-url-like.js +66 -0
  1784. package/src/components/link-control/use-internal-value.js +60 -0
  1785. package/src/components/link-control/use-search-handler.js +10 -27
  1786. package/src/components/list-view/appender.js +3 -5
  1787. package/src/components/list-view/aria-referenced-text.js +30 -0
  1788. package/src/components/list-view/block-contents.js +9 -8
  1789. package/src/components/list-view/block-select-button.js +78 -2
  1790. package/src/components/list-view/block.js +40 -10
  1791. package/src/components/list-view/branch.js +6 -3
  1792. package/src/components/list-view/drop-indicator.js +94 -9
  1793. package/src/components/list-view/index.js +29 -19
  1794. package/src/components/list-view/style.scss +13 -17
  1795. package/src/components/list-view/test/use-list-view-drop-zone.js +208 -76
  1796. package/src/components/list-view/use-block-selection.js +2 -2
  1797. package/src/components/list-view/use-list-view-client-ids.js +3 -20
  1798. package/src/components/list-view/use-list-view-drop-zone.js +108 -47
  1799. package/src/components/media-placeholder/index.js +54 -20
  1800. package/src/components/media-replace-flow/index.js +1 -3
  1801. package/src/components/media-replace-flow/test/index.js +1 -1
  1802. package/src/components/navigable-toolbar/index.js +7 -5
  1803. package/src/components/preview-options/index.js +3 -2
  1804. package/src/components/provider/test/experimental-provider.js +9 -6
  1805. package/src/components/rich-text/content.js +85 -0
  1806. package/src/components/rich-text/format-toolbar/index.js +1 -2
  1807. package/src/components/rich-text/index.js +3 -36
  1808. package/src/components/rich-text/index.native.js +3 -33
  1809. package/src/components/rich-text/use-firefox-compat.js +27 -1
  1810. package/src/components/spacing-sizes-control/hooks/use-spacing-sizes.js +26 -0
  1811. package/src/components/spacing-sizes-control/index.js +85 -71
  1812. package/src/components/spacing-sizes-control/{axial-input-controls.js → input-controls/axial.js} +14 -13
  1813. package/src/components/spacing-sizes-control/{input-controls.js → input-controls/separated.js} +15 -14
  1814. package/src/components/spacing-sizes-control/input-controls/single.js +40 -0
  1815. package/src/components/spacing-sizes-control/{spacing-input-control.js → input-controls/spacing-input-control.js} +55 -80
  1816. package/src/components/spacing-sizes-control/sides-dropdown/index.js +91 -0
  1817. package/src/components/spacing-sizes-control/style.scss +28 -100
  1818. package/src/components/spacing-sizes-control/test/utils.js +233 -4
  1819. package/src/components/spacing-sizes-control/utils.js +203 -20
  1820. package/src/components/ungroup-button/index.native.js +2 -2
  1821. package/src/components/url-popover/image-url-input-ui.js +15 -15
  1822. package/src/components/url-popover/test/__snapshots__/index.js.snap +3 -3
  1823. package/src/components/use-block-display-information/index.js +26 -0
  1824. package/src/components/writing-flow/use-drag-selection.js +1 -1
  1825. package/src/components/writing-flow/use-tab-nav.js +56 -9
  1826. package/src/hooks/anchor.js +3 -1
  1827. package/src/hooks/behaviors.js +163 -64
  1828. package/src/hooks/custom-class-name.js +23 -19
  1829. package/src/hooks/font-family.js +1 -5
  1830. package/src/hooks/font-size.js +12 -17
  1831. package/src/hooks/layout.js +21 -26
  1832. package/src/hooks/position.js +24 -12
  1833. package/src/hooks/style.js +3 -1
  1834. package/src/hooks/supports.js +1 -1
  1835. package/src/hooks/use-typography-props.js +14 -19
  1836. package/src/hooks/utils.js +8 -7
  1837. package/src/index.js +0 -2
  1838. package/src/layouts/constrained.js +2 -1
  1839. package/src/layouts/definitions.js +174 -0
  1840. package/src/layouts/flex.js +7 -5
  1841. package/src/layouts/flow.js +2 -1
  1842. package/src/layouts/grid.js +31 -4
  1843. package/src/layouts/test/utils.js +2 -7
  1844. package/src/layouts/utils.js +7 -2
  1845. package/src/private-apis.js +11 -0
  1846. package/src/store/actions.js +7 -56
  1847. package/src/store/private-actions.js +193 -0
  1848. package/src/store/private-selectors.js +132 -37
  1849. package/src/store/reducer.js +50 -8
  1850. package/src/store/selectors.js +74 -41
  1851. package/src/store/test/private-selectors.js +491 -48
  1852. package/src/store/test/reducer.js +0 -7
  1853. package/src/store/test/selectors.js +117 -17
  1854. package/src/utils/object.js +35 -0
  1855. package/src/utils/test/object.js +96 -1
  1856. package/build/components/link-control/use-internal-input-value.js +0 -27
  1857. package/build/components/link-control/use-internal-input-value.js.map +0 -1
  1858. package/build/components/spacing-sizes-control/all-input-control.js +0 -57
  1859. package/build/components/spacing-sizes-control/all-input-control.js.map +0 -1
  1860. package/build/components/spacing-sizes-control/axial-input-controls.js.map +0 -1
  1861. package/build/components/spacing-sizes-control/input-controls.js.map +0 -1
  1862. package/build/components/spacing-sizes-control/linked-button.js +0 -37
  1863. package/build/components/spacing-sizes-control/linked-button.js.map +0 -1
  1864. package/build/components/spacing-sizes-control/spacing-input-control.js.map +0 -1
  1865. package/build/components/ungroup-button/icon.js +0 -31
  1866. package/build/components/ungroup-button/icon.js.map +0 -1
  1867. package/build-module/components/link-control/use-internal-input-value.js +0 -19
  1868. package/build-module/components/link-control/use-internal-input-value.js.map +0 -1
  1869. package/build-module/components/spacing-sizes-control/all-input-control.js +0 -45
  1870. package/build-module/components/spacing-sizes-control/all-input-control.js.map +0 -1
  1871. package/build-module/components/spacing-sizes-control/axial-input-controls.js.map +0 -1
  1872. package/build-module/components/spacing-sizes-control/input-controls.js.map +0 -1
  1873. package/build-module/components/spacing-sizes-control/linked-button.js +0 -27
  1874. package/build-module/components/spacing-sizes-control/linked-button.js.map +0 -1
  1875. package/build-module/components/spacing-sizes-control/spacing-input-control.js.map +0 -1
  1876. package/build-module/components/ungroup-button/icon.js +0 -22
  1877. package/build-module/components/ungroup-button/icon.js.map +0 -1
  1878. package/src/components/link-control/use-internal-input-value.js +0 -23
  1879. package/src/components/spacing-sizes-control/all-input-control.js +0 -44
  1880. package/src/components/spacing-sizes-control/linked-button.js +0 -24
  1881. package/src/components/ungroup-button/icon.js +0 -26
@@ -1,21 +1,19 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
2
1
  import { createElement } from "@wordpress/element";
3
2
 
4
3
  /**
5
4
  * Internal dependencies
6
5
  */
7
6
  import ColorGradientControl from '../colors-gradients/control';
8
- export default function ColorPaletteControl(_ref) {
9
- let {
10
- onChange,
11
- value,
12
- ...otherProps
13
- } = _ref;
14
- return createElement(ColorGradientControl, _extends({}, otherProps, {
7
+ export default function ColorPaletteControl({
8
+ onChange,
9
+ value,
10
+ ...otherProps
11
+ }) {
12
+ return createElement(ColorGradientControl, { ...otherProps,
15
13
  onColorChange: onChange,
16
14
  colorValue: value,
17
15
  gradients: [],
18
16
  disableCustomGradients: true
19
- }));
17
+ });
20
18
  }
21
19
  //# sourceMappingURL=control.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-editor/src/components/color-palette/control.js"],"names":["ColorGradientControl","ColorPaletteControl","onChange","value","otherProps"],"mappings":";;;AAAA;AACA;AACA;AACA,OAAOA,oBAAP,MAAiC,6BAAjC;AAEA,eAAe,SAASC,mBAAT,OAIX;AAAA,MAJyC;AAC5CC,IAAAA,QAD4C;AAE5CC,IAAAA,KAF4C;AAG5C,OAAGC;AAHyC,GAIzC;AACH,SACC,cAAC,oBAAD,eACMA,UADN;AAEC,IAAA,aAAa,EAAGF,QAFjB;AAGC,IAAA,UAAU,EAAGC,KAHd;AAIC,IAAA,SAAS,EAAG,EAJb;AAKC,IAAA,sBAAsB,EAAG;AAL1B,KADD;AASA","sourcesContent":["/**\n * Internal dependencies\n */\nimport ColorGradientControl from '../colors-gradients/control';\n\nexport default function ColorPaletteControl( {\n\tonChange,\n\tvalue,\n\t...otherProps\n} ) {\n\treturn (\n\t\t<ColorGradientControl\n\t\t\t{ ...otherProps }\n\t\t\tonColorChange={ onChange }\n\t\t\tcolorValue={ value }\n\t\t\tgradients={ [] }\n\t\t\tdisableCustomGradients={ true }\n\t\t/>\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/block-editor/src/components/color-palette/control.js"],"names":["ColorGradientControl","ColorPaletteControl","onChange","value","otherProps"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,oBAAP,MAAiC,6BAAjC;AAEA,eAAe,SAASC,mBAAT,CAA8B;AAC5CC,EAAAA,QAD4C;AAE5CC,EAAAA,KAF4C;AAG5C,KAAGC;AAHyC,CAA9B,EAIX;AACH,SACC,cAAC,oBAAD,OACMA,UADN;AAEC,IAAA,aAAa,EAAGF,QAFjB;AAGC,IAAA,UAAU,EAAGC,KAHd;AAIC,IAAA,SAAS,EAAG,EAJb;AAKC,IAAA,sBAAsB,EAAG;AAL1B,IADD;AASA","sourcesContent":["/**\n * Internal dependencies\n */\nimport ColorGradientControl from '../colors-gradients/control';\n\nexport default function ColorPaletteControl( {\n\tonChange,\n\tvalue,\n\t...otherProps\n} ) {\n\treturn (\n\t\t<ColorGradientControl\n\t\t\t{ ...otherProps }\n\t\t\tonColorChange={ onChange }\n\t\t\tcolorValue={ value }\n\t\t\tgradients={ [] }\n\t\t\tdisableCustomGradients={ true }\n\t\t/>\n\t);\n}\n"]}
@@ -1,14 +1,8 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
2
1
  import { createElement } from "@wordpress/element";
3
2
 
4
- /**
5
- * External dependencies
6
- */
7
- import { isEmpty } from 'lodash';
8
3
  /**
9
4
  * WordPress dependencies
10
5
  */
11
-
12
6
  import { createHigherOrderComponent } from '@wordpress/compose';
13
7
  /**
14
8
  * Internal dependencies
@@ -21,12 +15,12 @@ export default createHigherOrderComponent(WrappedComponent => {
21
15
  const disableCustomColorsFeature = !useSetting('color.custom');
22
16
  const colors = props.colors === undefined ? colorsFeature : props.colors;
23
17
  const disableCustomColors = props.disableCustomColors === undefined ? disableCustomColorsFeature : props.disableCustomColors;
24
- const hasColorsToChoose = !isEmpty(colors) || !disableCustomColors;
25
- return createElement(WrappedComponent, _extends({}, props, {
18
+ const hasColorsToChoose = colors && colors.length > 0 || !disableCustomColors;
19
+ return createElement(WrappedComponent, { ...props,
26
20
  colors,
27
21
  disableCustomColors,
28
22
  hasColorsToChoose
29
- }));
23
+ });
30
24
  };
31
25
  }, 'withColorContext');
32
26
  //# sourceMappingURL=with-color-context.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-editor/src/components/color-palette/with-color-context.js"],"names":["isEmpty","createHigherOrderComponent","useSetting","WrappedComponent","props","colorsFeature","disableCustomColorsFeature","colors","undefined","disableCustomColors","hasColorsToChoose"],"mappings":";;;AAAA;AACA;AACA;AACA,SAASA,OAAT,QAAwB,QAAxB;AAEA;AACA;AACA;;AACA,SAASC,0BAAT,QAA2C,oBAA3C;AAEA;AACA;AACA;;AACA,OAAOC,UAAP,MAAuB,gBAAvB;AAEA,eAAeD,0BAA0B,CAAIE,gBAAF,IAAwB;AAClE,SAASC,KAAF,IAAa;AACnB,UAAMC,aAAa,GAAGH,UAAU,CAAE,eAAF,CAAhC;AACA,UAAMI,0BAA0B,GAAG,CAAEJ,UAAU,CAAE,cAAF,CAA/C;AACA,UAAMK,MAAM,GACXH,KAAK,CAACG,MAAN,KAAiBC,SAAjB,GAA6BH,aAA7B,GAA6CD,KAAK,CAACG,MADpD;AAEA,UAAME,mBAAmB,GACxBL,KAAK,CAACK,mBAAN,KAA8BD,SAA9B,GACGF,0BADH,GAEGF,KAAK,CAACK,mBAHV;AAIA,UAAMC,iBAAiB,GAAG,CAAEV,OAAO,CAAEO,MAAF,CAAT,IAAuB,CAAEE,mBAAnD;AACA,WACC,cAAC,gBAAD,eAEKL,KAFL;AAGEG,MAAAA,MAHF;AAIEE,MAAAA,mBAJF;AAKEC,MAAAA;AALF,OADD;AAUA,GApBD;AAqBA,CAtBwC,EAsBtC,kBAtBsC,CAAzC","sourcesContent":["/**\n * External dependencies\n */\nimport { isEmpty } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { createHigherOrderComponent } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport useSetting from '../use-setting';\n\nexport default createHigherOrderComponent( ( WrappedComponent ) => {\n\treturn ( props ) => {\n\t\tconst colorsFeature = useSetting( 'color.palette' );\n\t\tconst disableCustomColorsFeature = ! useSetting( 'color.custom' );\n\t\tconst colors =\n\t\t\tprops.colors === undefined ? colorsFeature : props.colors;\n\t\tconst disableCustomColors =\n\t\t\tprops.disableCustomColors === undefined\n\t\t\t\t? disableCustomColorsFeature\n\t\t\t\t: props.disableCustomColors;\n\t\tconst hasColorsToChoose = ! isEmpty( colors ) || ! disableCustomColors;\n\t\treturn (\n\t\t\t<WrappedComponent\n\t\t\t\t{ ...{\n\t\t\t\t\t...props,\n\t\t\t\t\tcolors,\n\t\t\t\t\tdisableCustomColors,\n\t\t\t\t\thasColorsToChoose,\n\t\t\t\t} }\n\t\t\t/>\n\t\t);\n\t};\n}, 'withColorContext' );\n"]}
1
+ {"version":3,"sources":["@wordpress/block-editor/src/components/color-palette/with-color-context.js"],"names":["createHigherOrderComponent","useSetting","WrappedComponent","props","colorsFeature","disableCustomColorsFeature","colors","undefined","disableCustomColors","hasColorsToChoose","length"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,0BAAT,QAA2C,oBAA3C;AAEA;AACA;AACA;;AACA,OAAOC,UAAP,MAAuB,gBAAvB;AAEA,eAAeD,0BAA0B,CAAIE,gBAAF,IAAwB;AAClE,SAASC,KAAF,IAAa;AACnB,UAAMC,aAAa,GAAGH,UAAU,CAAE,eAAF,CAAhC;AACA,UAAMI,0BAA0B,GAAG,CAAEJ,UAAU,CAAE,cAAF,CAA/C;AACA,UAAMK,MAAM,GACXH,KAAK,CAACG,MAAN,KAAiBC,SAAjB,GAA6BH,aAA7B,GAA6CD,KAAK,CAACG,MADpD;AAEA,UAAME,mBAAmB,GACxBL,KAAK,CAACK,mBAAN,KAA8BD,SAA9B,GACGF,0BADH,GAEGF,KAAK,CAACK,mBAHV;AAIA,UAAMC,iBAAiB,GACpBH,MAAM,IAAIA,MAAM,CAACI,MAAP,GAAgB,CAA5B,IAAmC,CAAEF,mBADtC;AAEA,WACC,cAAC,gBAAD,IAEE,GAAGL,KAFL;AAGEG,MAAAA,MAHF;AAIEE,MAAAA,mBAJF;AAKEC,MAAAA;AALF,MADD;AAUA,GArBD;AAsBA,CAvBwC,EAuBtC,kBAvBsC,CAAzC","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createHigherOrderComponent } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport useSetting from '../use-setting';\n\nexport default createHigherOrderComponent( ( WrappedComponent ) => {\n\treturn ( props ) => {\n\t\tconst colorsFeature = useSetting( 'color.palette' );\n\t\tconst disableCustomColorsFeature = ! useSetting( 'color.custom' );\n\t\tconst colors =\n\t\t\tprops.colors === undefined ? colorsFeature : props.colors;\n\t\tconst disableCustomColors =\n\t\t\tprops.disableCustomColors === undefined\n\t\t\t\t? disableCustomColorsFeature\n\t\t\t\t: props.disableCustomColors;\n\t\tconst hasColorsToChoose =\n\t\t\t( colors && colors.length > 0 ) || ! disableCustomColors;\n\t\treturn (\n\t\t\t<WrappedComponent\n\t\t\t\t{ ...{\n\t\t\t\t\t...props,\n\t\t\t\t\tcolors,\n\t\t\t\t\tdisableCustomColors,\n\t\t\t\t\thasColorsToChoose,\n\t\t\t\t} }\n\t\t\t/>\n\t\t);\n\t};\n}, 'withColorContext' );\n"]}
@@ -25,11 +25,10 @@ const ColorSelectorSVGIcon = () => createElement(SVG, {
25
25
  */
26
26
 
27
27
 
28
- const ColorSelectorIcon = _ref => {
29
- let {
30
- style,
31
- className
32
- } = _ref;
28
+ const ColorSelectorIcon = ({
29
+ style,
30
+ className
31
+ }) => {
33
32
  return createElement("div", {
34
33
  className: "block-library-colors-selector__icon-container"
35
34
  }, createElement("div", {
@@ -48,39 +47,33 @@ const ColorSelectorIcon = _ref => {
48
47
  */
49
48
 
50
49
 
51
- const renderToggleComponent = _ref2 => {
52
- let {
53
- TextColor,
54
- BackgroundColor
55
- } = _ref2;
56
- return _ref3 => {
57
- let {
58
- onToggle,
59
- isOpen
60
- } = _ref3;
61
-
62
- const openOnArrowDown = event => {
63
- if (!isOpen && event.keyCode === DOWN) {
64
- event.preventDefault();
65
- onToggle();
66
- }
67
- };
68
-
69
- return createElement(ToolbarGroup, null, createElement(ToolbarButton, {
70
- className: "components-toolbar__control block-library-colors-selector__toggle",
71
- label: __('Open Colors Selector'),
72
- onClick: onToggle,
73
- onKeyDown: openOnArrowDown,
74
- icon: createElement(BackgroundColor, null, createElement(TextColor, null, createElement(ColorSelectorIcon, null)))
75
- }));
50
+ const renderToggleComponent = ({
51
+ TextColor,
52
+ BackgroundColor
53
+ }) => ({
54
+ onToggle,
55
+ isOpen
56
+ }) => {
57
+ const openOnArrowDown = event => {
58
+ if (!isOpen && event.keyCode === DOWN) {
59
+ event.preventDefault();
60
+ onToggle();
61
+ }
76
62
  };
63
+
64
+ return createElement(ToolbarGroup, null, createElement(ToolbarButton, {
65
+ className: "components-toolbar__control block-library-colors-selector__toggle",
66
+ label: __('Open Colors Selector'),
67
+ onClick: onToggle,
68
+ onKeyDown: openOnArrowDown,
69
+ icon: createElement(BackgroundColor, null, createElement(TextColor, null, createElement(ColorSelectorIcon, null)))
70
+ }));
77
71
  };
78
72
 
79
- const BlockColorsStyleSelector = _ref4 => {
80
- let {
81
- children,
82
- ...other
83
- } = _ref4;
73
+ const BlockColorsStyleSelector = ({
74
+ children,
75
+ ...other
76
+ }) => {
84
77
  deprecated(`wp.blockEditor.BlockColorsStyleSelector`, {
85
78
  alternative: 'block supports API',
86
79
  since: '6.1',
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-editor/src/components/color-style-selector/index.js"],"names":["ToolbarButton","Dropdown","ToolbarGroup","SVG","Path","__","DOWN","deprecated","ColorSelectorSVGIcon","ColorSelectorIcon","style","className","renderToggleComponent","TextColor","BackgroundColor","onToggle","isOpen","openOnArrowDown","event","keyCode","preventDefault","BlockColorsStyleSelector","children","other","alternative","since","version","placement"],"mappings":";;AAAA;AACA;AACA;AACA,SACCA,aADD,EAECC,QAFD,EAGCC,YAHD,EAICC,GAJD,EAKCC,IALD,QAMO,uBANP;AAOA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SAASC,IAAT,QAAqB,qBAArB;AACA,OAAOC,UAAP,MAAuB,uBAAvB;;AAEA,MAAMC,oBAAoB,GAAG,MAC5B,cAAC,GAAD;AAAK,EAAA,KAAK,EAAC,6BAAX;AAAyC,EAAA,OAAO,EAAC;AAAjD,GACC,cAAC,IAAD;AAAM,EAAA,CAAC,EAAC;AAAR,EADD,CADD;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,MAAMC,iBAAiB,GAAG,QAA4B;AAAA,MAA1B;AAAEC,IAAAA,KAAF;AAASC,IAAAA;AAAT,GAA0B;AACrD,SACC;AAAK,IAAA,SAAS,EAAC;AAAf,KACC;AACC,IAAA,SAAS,EAAI,GAAGA,SAAW,iDAD5B;AAEC,IAAA,KAAK,EAAGD;AAFT,KAIC,cAAC,oBAAD,OAJD,CADD,CADD;AAUA,CAXD;AAaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,MAAME,qBAAqB,GAC1B;AAAA,MAAE;AAAEC,IAAAA,SAAF;AAAaC,IAAAA;AAAb,GAAF;AAAA,SACA,SAA4B;AAAA,QAA1B;AAAEC,MAAAA,QAAF;AAAYC,MAAAA;AAAZ,KAA0B;;AAC3B,UAAMC,eAAe,GAAKC,KAAF,IAAa;AACpC,UAAK,CAAEF,MAAF,IAAYE,KAAK,CAACC,OAAN,KAAkBb,IAAnC,EAA0C;AACzCY,QAAAA,KAAK,CAACE,cAAN;AACAL,QAAAA,QAAQ;AACR;AACD,KALD;;AAOA,WACC,cAAC,YAAD,QACC,cAAC,aAAD;AACC,MAAA,SAAS,EAAC,mEADX;AAEC,MAAA,KAAK,EAAGV,EAAE,CAAE,sBAAF,CAFX;AAGC,MAAA,OAAO,EAAGU,QAHX;AAIC,MAAA,SAAS,EAAGE,eAJb;AAKC,MAAA,IAAI,EACH,cAAC,eAAD,QACC,cAAC,SAAD,QACC,cAAC,iBAAD,OADD,CADD;AANF,MADD,CADD;AAiBA,GA1BD;AAAA,CADD;;AA6BA,MAAMI,wBAAwB,GAAG,SAA8B;AAAA,MAA5B;AAAEC,IAAAA,QAAF;AAAY,OAAGC;AAAf,GAA4B;AAC9DhB,EAAAA,UAAU,CAAG,yCAAH,EAA6C;AACtDiB,IAAAA,WAAW,EAAE,oBADyC;AAEtDC,IAAAA,KAAK,EAAE,KAF+C;AAGtDC,IAAAA,OAAO,EAAE;AAH6C,GAA7C,CAAV;AAMA,SACC,cAAC,QAAD;AACC,IAAA,YAAY,EAAG;AAAEC,MAAAA,SAAS,EAAE;AAAb,KADhB;AAEC,IAAA,SAAS,EAAC,+BAFX;AAGC,IAAA,gBAAgB,EAAC,wCAHlB;AAIC,IAAA,YAAY,EAAGf,qBAAqB,CAAEW,KAAF,CAJrC;AAKC,IAAA,aAAa,EAAG,MAAMD;AALvB,IADD;AASA,CAhBD;;AAkBA,eAAeD,wBAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tToolbarButton,\n\tDropdown,\n\tToolbarGroup,\n\tSVG,\n\tPath,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { DOWN } from '@wordpress/keycodes';\nimport deprecated from '@wordpress/deprecated';\n\nconst ColorSelectorSVGIcon = () => (\n\t<SVG xmlns=\"https://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\">\n\t\t<Path d=\"M7.434 5l3.18 9.16H8.538l-.692-2.184H4.628l-.705 2.184H2L5.18 5h2.254zm-1.13 1.904h-.115l-1.148 3.593H7.44L6.304 6.904zM14.348 7.006c1.853 0 2.9.876 2.9 2.374v4.78h-1.79v-.914h-.114c-.362.64-1.123 1.022-2.031 1.022-1.346 0-2.292-.826-2.292-2.108 0-1.27.972-2.006 2.71-2.107l1.696-.102V9.38c0-.584-.42-.914-1.18-.914-.667 0-1.112.228-1.264.647h-1.701c.12-1.295 1.307-2.107 3.066-2.107zm1.079 4.1l-1.416.09c-.793.056-1.18.342-1.18.844 0 .52.45.837 1.091.837.857 0 1.505-.545 1.505-1.256v-.515z\" />\n\t</SVG>\n);\n\n/**\n * Color Selector Icon component.\n *\n * @param {Object} props Component properties.\n * @param {Object} props.style Style object.\n * @param {string} props.className Class name for component.\n *\n * @return {*} React Icon component.\n */\nconst ColorSelectorIcon = ( { style, className } ) => {\n\treturn (\n\t\t<div className=\"block-library-colors-selector__icon-container\">\n\t\t\t<div\n\t\t\t\tclassName={ `${ className } block-library-colors-selector__state-selection` }\n\t\t\t\tstyle={ style }\n\t\t\t>\n\t\t\t\t<ColorSelectorSVGIcon />\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\n/**\n * Renders the Colors Selector Toolbar with the icon button.\n *\n * @param {Object} props Component properties.\n * @param {Object} props.TextColor Text color component that wraps icon.\n * @param {Object} props.BackgroundColor Background color component that wraps icon.\n *\n * @return {*} React toggle button component.\n */\nconst renderToggleComponent =\n\t( { TextColor, BackgroundColor } ) =>\n\t( { onToggle, isOpen } ) => {\n\t\tconst openOnArrowDown = ( event ) => {\n\t\t\tif ( ! isOpen && event.keyCode === DOWN ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tonToggle();\n\t\t\t}\n\t\t};\n\n\t\treturn (\n\t\t\t<ToolbarGroup>\n\t\t\t\t<ToolbarButton\n\t\t\t\t\tclassName=\"components-toolbar__control block-library-colors-selector__toggle\"\n\t\t\t\t\tlabel={ __( 'Open Colors Selector' ) }\n\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\tonKeyDown={ openOnArrowDown }\n\t\t\t\t\ticon={\n\t\t\t\t\t\t<BackgroundColor>\n\t\t\t\t\t\t\t<TextColor>\n\t\t\t\t\t\t\t\t<ColorSelectorIcon />\n\t\t\t\t\t\t\t</TextColor>\n\t\t\t\t\t\t</BackgroundColor>\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t</ToolbarGroup>\n\t\t);\n\t};\n\nconst BlockColorsStyleSelector = ( { children, ...other } ) => {\n\tdeprecated( `wp.blockEditor.BlockColorsStyleSelector`, {\n\t\talternative: 'block supports API',\n\t\tsince: '6.1',\n\t\tversion: '6.3',\n\t} );\n\n\treturn (\n\t\t<Dropdown\n\t\t\tpopoverProps={ { placement: 'bottom-start' } }\n\t\t\tclassName=\"block-library-colors-selector\"\n\t\t\tcontentClassName=\"block-library-colors-selector__popover\"\n\t\t\trenderToggle={ renderToggleComponent( other ) }\n\t\t\trenderContent={ () => children }\n\t\t/>\n\t);\n};\n\nexport default BlockColorsStyleSelector;\n"]}
1
+ {"version":3,"sources":["@wordpress/block-editor/src/components/color-style-selector/index.js"],"names":["ToolbarButton","Dropdown","ToolbarGroup","SVG","Path","__","DOWN","deprecated","ColorSelectorSVGIcon","ColorSelectorIcon","style","className","renderToggleComponent","TextColor","BackgroundColor","onToggle","isOpen","openOnArrowDown","event","keyCode","preventDefault","BlockColorsStyleSelector","children","other","alternative","since","version","placement"],"mappings":";;AAAA;AACA;AACA;AACA,SACCA,aADD,EAECC,QAFD,EAGCC,YAHD,EAICC,GAJD,EAKCC,IALD,QAMO,uBANP;AAOA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SAASC,IAAT,QAAqB,qBAArB;AACA,OAAOC,UAAP,MAAuB,uBAAvB;;AAEA,MAAMC,oBAAoB,GAAG,MAC5B,cAAC,GAAD;AAAK,EAAA,KAAK,EAAC,6BAAX;AAAyC,EAAA,OAAO,EAAC;AAAjD,GACC,cAAC,IAAD;AAAM,E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C,GAA7C,CAAV;AAMA,SACC,cAAC,QAAD;AACC,IAAA,YAAY,EAAG;AAAEC,MAAAA,SAAS,EAAE;AAAb,KADhB;AAEC,IAAA,SAAS,EAAC,+BAFX;AAGC,IAAA,gBAAgB,EAAC,wCAHlB;AAIC,IAAA,YAAY,EAAGf,qBAAqB,CAAEW,KAAF,CAJrC;AAKC,IAAA,aAAa,EAAG,MAAMD;AALvB,IADD;AASA,CAhBD;;AAkBA,eAAeD,wBAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tToolbarButton,\n\tDropdown,\n\tToolbarGroup,\n\tSVG,\n\tPath,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { DOWN } from '@wordpress/keycodes';\nimport deprecated from '@wordpress/deprecated';\n\nconst ColorSelectorSVGIcon = () => (\n\t<SVG xmlns=\"https://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\">\n\t\t<Path d=\"M7.434 5l3.18 9.16H8.538l-.692-2.184H4.628l-.705 2.184H2L5.18 5h2.254zm-1.13 1.904h-.115l-1.148 3.593H7.44L6.304 6.904zM14.348 7.006c1.853 0 2.9.876 2.9 2.374v4.78h-1.79v-.914h-.114c-.362.64-1.123 1.022-2.031 1.022-1.346 0-2.292-.826-2.292-2.108 0-1.27.972-2.006 2.71-2.107l1.696-.102V9.38c0-.584-.42-.914-1.18-.914-.667 0-1.112.228-1.264.647h-1.701c.12-1.295 1.307-2.107 3.066-2.107zm1.079 4.1l-1.416.09c-.793.056-1.18.342-1.18.844 0 .52.45.837 1.091.837.857 0 1.505-.545 1.505-1.256v-.515z\" />\n\t</SVG>\n);\n\n/**\n * Color Selector Icon component.\n *\n * @param {Object} props Component properties.\n * @param {Object} props.style Style object.\n * @param {string} props.className Class name for component.\n *\n * @return {*} React Icon component.\n */\nconst ColorSelectorIcon = ( { style, className } ) => {\n\treturn (\n\t\t<div className=\"block-library-colors-selector__icon-container\">\n\t\t\t<div\n\t\t\t\tclassName={ `${ className } block-library-colors-selector__state-selection` }\n\t\t\t\tstyle={ style }\n\t\t\t>\n\t\t\t\t<ColorSelectorSVGIcon />\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\n/**\n * Renders the Colors Selector Toolbar with the icon button.\n *\n * @param {Object} props Component properties.\n * @param {Object} props.TextColor Text color component that wraps icon.\n * @param {Object} props.BackgroundColor Background color component that wraps icon.\n *\n * @return {*} React toggle button component.\n */\nconst renderToggleComponent =\n\t( { TextColor, BackgroundColor } ) =>\n\t( { onToggle, isOpen } ) => {\n\t\tconst openOnArrowDown = ( event ) => {\n\t\t\tif ( ! isOpen && event.keyCode === DOWN ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tonToggle();\n\t\t\t}\n\t\t};\n\n\t\treturn (\n\t\t\t<ToolbarGroup>\n\t\t\t\t<ToolbarButton\n\t\t\t\t\tclassName=\"components-toolbar__control block-library-colors-selector__toggle\"\n\t\t\t\t\tlabel={ __( 'Open Colors Selector' ) }\n\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\tonKeyDown={ openOnArrowDown }\n\t\t\t\t\ticon={\n\t\t\t\t\t\t<BackgroundColor>\n\t\t\t\t\t\t\t<TextColor>\n\t\t\t\t\t\t\t\t<ColorSelectorIcon />\n\t\t\t\t\t\t\t</TextColor>\n\t\t\t\t\t\t</BackgroundColor>\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t</ToolbarGroup>\n\t\t);\n\t};\n\nconst BlockColorsStyleSelector = ( { children, ...other } ) => {\n\tdeprecated( `wp.blockEditor.BlockColorsStyleSelector`, {\n\t\talternative: 'block supports API',\n\t\tsince: '6.1',\n\t\tversion: '6.3',\n\t} );\n\n\treturn (\n\t\t<Dropdown\n\t\t\tpopoverProps={ { placement: 'bottom-start' } }\n\t\t\tclassName=\"block-library-colors-selector\"\n\t\t\tcontentClassName=\"block-library-colors-selector__popover\"\n\t\t\trenderToggle={ renderToggleComponent( other ) }\n\t\t\trenderContent={ () => children }\n\t\t/>\n\t);\n};\n\nexport default BlockColorsStyleSelector;\n"]}
@@ -1,10 +1,14 @@
1
1
  /**
2
2
  * External dependencies
3
3
  */
4
- import { kebabCase } from 'lodash';
5
4
  import { colord, extend } from 'colord';
6
5
  import namesPlugin from 'colord/plugins/names';
7
6
  import a11yPlugin from 'colord/plugins/a11y';
7
+ /**
8
+ * Internal dependencies
9
+ */
10
+
11
+ import { kebabCase } from '../../utils/object';
8
12
  extend([namesPlugin, a11yPlugin]);
9
13
  /**
10
14
  * Provided an array of color objects as set by the theme or by the editor defaults,
@@ -21,7 +25,7 @@ extend([namesPlugin, a11yPlugin]);
21
25
 
22
26
  export const getColorObjectByAttributeValues = (colors, definedColor, customColor) => {
23
27
  if (definedColor) {
24
- const colorObj = colors === null || colors === void 0 ? void 0 : colors.find(color => color.slug === definedColor);
28
+ const colorObj = colors?.find(color => color.slug === definedColor);
25
29
 
26
30
  if (colorObj) {
27
31
  return colorObj;
@@ -43,7 +47,7 @@ export const getColorObjectByAttributeValues = (colors, definedColor, customColo
43
47
  */
44
48
 
45
49
  export const getColorObjectByColorValue = (colors, colorValue) => {
46
- return colors === null || colors === void 0 ? void 0 : colors.find(color => color.color === colorValue);
50
+ return colors?.find(color => color.color === colorValue);
47
51
  };
48
52
  /**
49
53
  * Returns a class based on the context a color is being used and its slug.
@@ -74,12 +78,9 @@ export function getColorClassName(colorContextName, colorSlug) {
74
78
  export function getMostReadableColor(colors, colorValue) {
75
79
  const colordColor = colord(colorValue);
76
80
 
77
- const getColorContrast = _ref => {
78
- let {
79
- color
80
- } = _ref;
81
- return colordColor.contrast(color);
82
- };
81
+ const getColorContrast = ({
82
+ color
83
+ }) => colordColor.contrast(color);
83
84
 
84
85
  const maxContrast = Math.max(...colors.map(getColorContrast));
85
86
  return colors.find(color => getColorContrast(color) === maxContrast).color;
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-editor/src/components/colors/utils.js"],"names":["kebabCase","colord","extend","namesPlugin","a11yPlugin","getColorObjectByAttributeValues","colors","definedColor","customColor","colorObj","find","color","slug","getColorObjectByColorValue","colorValue","getColorClassName","colorContextName","colorSlug","undefined","getMostReadableColor","colordColor","getColorContrast","contrast","maxContrast","Math","max","map"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAT,QAA0B,QAA1B;AACA,SAASC,MAAT,EAAiBC,MAAjB,QAA+B,QAA/B;AACA,OAAOC,WAAP,MAAwB,sBAAxB;AACA,OAAOC,UAAP,MAAuB,qBAAvB;AAEAF,MAAM,CAAE,CAAEC,WAAF,EAAeC,UAAf,CAAF,CAAN;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAMC,+BAA+B,GAAG,CAC9CC,MAD8C,EAE9CC,YAF8C,EAG9CC,WAH8C,KAI1C;AACJ,MAAKD,YAAL,EAAoB;AACnB,UAAME,QAAQ,GAAGH,MAAH,aAAGA,MAAH,uBAAGA,MAAM,CAAEI,IAAR,CACdC,KAAF,IAAaA,KAAK,CAACC,IAAN,KAAeL,YADZ,CAAjB;;AAIA,QAAKE,QAAL,EAAgB;AACf,aAAOA,QAAP;AACA;AACD;;AACD,SAAO;AACNE,IAAAA,KAAK,EAAEH;AADD,GAAP;AAGA,CAjBM;AAmBP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAMK,0BAA0B,GAAG,CAAEP,MAAF,EAAUQ,UAAV,KAA0B;AACnE,SAAOR,MAAP,aAAOA,MAAP,uBAAOA,MAAM,CAAEI,IAAR,CAAgBC,KAAF,IAAaA,KAAK,CAACA,KAAN,KAAgBG,UAA3C,CAAP;AACA,CAFM;AAIP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASC,iBAAT,CAA4BC,gBAA5B,EAA8CC,SAA9C,EAA0D;AAChE,MAAK,CAAED,gBAAF,IAAsB,CAAEC,SAA7B,EAAyC;AACxC,WAAOC,SAAP;AACA;;AAED,SAAQ,OAAOlB,SAAS,CAAEiB,SAAF,CAAe,IAAID,gBAAkB,EAA7D;AACA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASG,oBAAT,CAA+Bb,MAA/B,EAAuCQ,UAAvC,EAAoD;AAC1D,QAAMM,WAAW,GAAGnB,MAAM,CAAEa,UAAF,CAA1B;;AACA,QAAMO,gBAAgB,GAAG;AAAA,QAAE;AAAEV,MAAAA;AAAF,KAAF;AAAA,WAAiBS,WAAW,CAACE,QAAZ,CAAsBX,KAAtB,CAAjB;AAAA,GAAzB;;AAEA,QAAMY,WAAW,GAAGC,IAAI,CAACC,GAAL,CAAU,GAAGnB,MAAM,CAACoB,GAAP,CAAYL,gBAAZ,CAAb,CAApB;AACA,SAAOf,MAAM,CAACI,IAAP,CAAeC,KAAF,IAAaU,gBAAgB,CAAEV,KAAF,CAAhB,KAA8BY,WAAxD,EACLZ,KADF;AAEA","sourcesContent":["/**\n * External dependencies\n */\nimport { kebabCase } from 'lodash';\nimport { colord, extend } from 'colord';\nimport namesPlugin from 'colord/plugins/names';\nimport a11yPlugin from 'colord/plugins/a11y';\n\nextend( [ namesPlugin, a11yPlugin ] );\n\n/**\n * Provided an array of color objects as set by the theme or by the editor defaults,\n * and the values of the defined color or custom color returns a color object describing the color.\n *\n * @param {Array} colors Array of color objects as set by the theme or by the editor defaults.\n * @param {?string} definedColor A string containing the color slug.\n * @param {?string} customColor A string containing the customColor value.\n *\n * @return {?Object} If definedColor is passed and the name is found in colors,\n * the color object exactly as set by the theme or editor defaults is returned.\n * Otherwise, an object that just sets the color is defined.\n */\nexport const getColorObjectByAttributeValues = (\n\tcolors,\n\tdefinedColor,\n\tcustomColor\n) => {\n\tif ( definedColor ) {\n\t\tconst colorObj = colors?.find(\n\t\t\t( color ) => color.slug === definedColor\n\t\t);\n\n\t\tif ( colorObj ) {\n\t\t\treturn colorObj;\n\t\t}\n\t}\n\treturn {\n\t\tcolor: customColor,\n\t};\n};\n\n/**\n * Provided an array of color objects as set by the theme or by the editor defaults, and a color value returns the color object matching that value or undefined.\n *\n * @param {Array} colors Array of color objects as set by the theme or by the editor defaults.\n * @param {?string} colorValue A string containing the color value.\n *\n * @return {?Object} Color object included in the colors array whose color property equals colorValue.\n * Returns undefined if no color object matches this requirement.\n */\nexport const getColorObjectByColorValue = ( colors, colorValue ) => {\n\treturn colors?.find( ( color ) => color.color === colorValue );\n};\n\n/**\n * Returns a class based on the context a color is being used and its slug.\n *\n * @param {string} colorContextName Context/place where color is being used e.g: background, text etc...\n * @param {string} colorSlug Slug of the color.\n *\n * @return {?string} String with the class corresponding to the color in the provided context.\n * Returns undefined if either colorContextName or colorSlug are not provided.\n */\nexport function getColorClassName( colorContextName, colorSlug ) {\n\tif ( ! colorContextName || ! colorSlug ) {\n\t\treturn undefined;\n\t}\n\n\treturn `has-${ kebabCase( colorSlug ) }-${ colorContextName }`;\n}\n\n/**\n * Given an array of color objects and a color value returns the color value of the most readable color in the array.\n *\n * @param {Array} colors Array of color objects as set by the theme or by the editor defaults.\n * @param {?string} colorValue A string containing the color value.\n *\n * @return {string} String with the color value of the most readable color.\n */\nexport function getMostReadableColor( colors, colorValue ) {\n\tconst colordColor = colord( colorValue );\n\tconst getColorContrast = ( { color } ) => colordColor.contrast( color );\n\n\tconst maxContrast = Math.max( ...colors.map( getColorContrast ) );\n\treturn colors.find( ( color ) => getColorContrast( color ) === maxContrast )\n\t\t.color;\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/block-editor/src/components/colors/utils.js"],"names":["colord","extend","namesPlugin","a11yPlugin","kebabCase","getColorObjectByAttributeValues","colors","definedColor","customColor","colorObj","find","color","slug","getColorObjectByColorValue","colorValue","getColorClassName","colorContextName","colorSlug","undefined","getMostReadableColor","colordColor","getColorContrast","contrast","maxContrast","Math","max","map"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,MAAT,EAAiBC,MAAjB,QAA+B,QAA/B;AACA,OAAOC,WAAP,MAAwB,sBAAxB;AACA,OAAOC,UAAP,M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E,QAAZ,CAAsBX,KAAtB,CAA1C;;AAEA,QAAMY,WAAW,GAAGC,IAAI,CAACC,GAAL,CAAU,GAAGnB,MAAM,CAACoB,GAAP,CAAYL,gBAAZ,CAAb,CAApB;AACA,SAAOf,MAAM,CAACI,IAAP,CAAeC,KAAF,IAAaU,gBAAgB,CAAEV,KAAF,CAAhB,KAA8BY,WAAxD,EACLZ,KADF;AAEA","sourcesContent":["/**\n * External dependencies\n */\nimport { colord, extend } from 'colord';\nimport namesPlugin from 'colord/plugins/names';\nimport a11yPlugin from 'colord/plugins/a11y';\n\n/**\n * Internal dependencies\n */\nimport { kebabCase } from '../../utils/object';\n\nextend( [ namesPlugin, a11yPlugin ] );\n\n/**\n * Provided an array of color objects as set by the theme or by the editor defaults,\n * and the values of the defined color or custom color returns a color object describing the color.\n *\n * @param {Array} colors Array of color objects as set by the theme or by the editor defaults.\n * @param {?string} definedColor A string containing the color slug.\n * @param {?string} customColor A string containing the customColor value.\n *\n * @return {?Object} If definedColor is passed and the name is found in colors,\n * the color object exactly as set by the theme or editor defaults is returned.\n * Otherwise, an object that just sets the color is defined.\n */\nexport const getColorObjectByAttributeValues = (\n\tcolors,\n\tdefinedColor,\n\tcustomColor\n) => {\n\tif ( definedColor ) {\n\t\tconst colorObj = colors?.find(\n\t\t\t( color ) => color.slug === definedColor\n\t\t);\n\n\t\tif ( colorObj ) {\n\t\t\treturn colorObj;\n\t\t}\n\t}\n\treturn {\n\t\tcolor: customColor,\n\t};\n};\n\n/**\n * Provided an array of color objects as set by the theme or by the editor defaults, and a color value returns the color object matching that value or undefined.\n *\n * @param {Array} colors Array of color objects as set by the theme or by the editor defaults.\n * @param {?string} colorValue A string containing the color value.\n *\n * @return {?Object} Color object included in the colors array whose color property equals colorValue.\n * Returns undefined if no color object matches this requirement.\n */\nexport const getColorObjectByColorValue = ( colors, colorValue ) => {\n\treturn colors?.find( ( color ) => color.color === colorValue );\n};\n\n/**\n * Returns a class based on the context a color is being used and its slug.\n *\n * @param {string} colorContextName Context/place where color is being used e.g: background, text etc...\n * @param {string} colorSlug Slug of the color.\n *\n * @return {?string} String with the class corresponding to the color in the provided context.\n * Returns undefined if either colorContextName or colorSlug are not provided.\n */\nexport function getColorClassName( colorContextName, colorSlug ) {\n\tif ( ! colorContextName || ! colorSlug ) {\n\t\treturn undefined;\n\t}\n\n\treturn `has-${ kebabCase( colorSlug ) }-${ colorContextName }`;\n}\n\n/**\n * Given an array of color objects and a color value returns the color value of the most readable color in the array.\n *\n * @param {Array} colors Array of color objects as set by the theme or by the editor defaults.\n * @param {?string} colorValue A string containing the color value.\n *\n * @return {string} String with the color value of the most readable color.\n */\nexport function getMostReadableColor( colors, colorValue ) {\n\tconst colordColor = colord( colorValue );\n\tconst getColorContrast = ( { color } ) => colordColor.contrast( color );\n\n\tconst maxContrast = Math.max( ...colors.map( getColorContrast ) );\n\treturn colors.find( ( color ) => getColorContrast( color ) === maxContrast )\n\t\t.color;\n}\n"]}
@@ -1,14 +1,8 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
2
1
  import { createElement } from "@wordpress/element";
3
2
 
4
- /**
5
- * External dependencies
6
- */
7
- import { kebabCase } from 'lodash';
8
3
  /**
9
4
  * WordPress dependencies
10
5
  */
11
-
12
6
  import { useMemo, Component } from '@wordpress/element';
13
7
  import { compose, createHigherOrderComponent } from '@wordpress/compose';
14
8
  /**
@@ -17,6 +11,7 @@ import { compose, createHigherOrderComponent } from '@wordpress/compose';
17
11
 
18
12
  import { getColorClassName, getColorObjectByColorValue, getColorObjectByAttributeValues, getMostReadableColor } from './utils';
19
13
  import useSetting from '../use-setting';
14
+ import { kebabCase } from '../../utils/object';
20
15
  /**
21
16
  * Capitalizes the first letter in a string.
22
17
  *
@@ -25,10 +20,7 @@ import useSetting from '../use-setting';
25
20
  * @return {string} Capitalized string.
26
21
  */
27
22
 
28
- const upperFirst = _ref => {
29
- let [firstLetter, ...rest] = _ref;
30
- return firstLetter.toUpperCase() + rest.join('');
31
- };
23
+ const upperFirst = ([firstLetter, ...rest]) => firstLetter.toUpperCase() + rest.join('');
32
24
  /**
33
25
  * Higher order component factory for injecting the `colorsArray` argument as
34
26
  * the colors prop in the `withCustomColors` HOC.
@@ -39,9 +31,9 @@ const upperFirst = _ref => {
39
31
  */
40
32
 
41
33
 
42
- const withCustomColorPalette = colorsArray => createHigherOrderComponent(WrappedComponent => props => createElement(WrappedComponent, _extends({}, props, {
34
+ const withCustomColorPalette = colorsArray => createHigherOrderComponent(WrappedComponent => props => createElement(WrappedComponent, { ...props,
43
35
  colors: colorsArray
44
- })), 'withCustomColorPalette');
36
+ }), 'withCustomColorPalette');
45
37
  /**
46
38
  * Higher order component factory for injecting the editor colors as the
47
39
  * `colors` prop in the `withColors` HOC.
@@ -58,9 +50,9 @@ const withEditorColorPalette = () => createHigherOrderComponent(WrappedComponent
58
50
  const themePalette = useSetting('color.palette.theme');
59
51
  const defaultPalette = useSetting('color.palette.default');
60
52
  const allColors = useMemo(() => [...(userPalette || []), ...(themePalette || []), ...(defaultPalette || [])], [userPalette, themePalette, defaultPalette]);
61
- return createElement(WrappedComponent, _extends({}, props, {
53
+ return createElement(WrappedComponent, { ...props,
62
54
  colors: allColors
63
- }));
55
+ });
64
56
  }, 'withEditorColorPalette');
65
57
  /**
66
58
  * Helper function used with `createHigherOrderComponent` to create
@@ -118,16 +110,14 @@ function createColorHOC(colorTypes, withColorPalette) {
118
110
  };
119
111
  }
120
112
 
121
- static getDerivedStateFromProps(_ref2, previousState) {
122
- let {
123
- attributes,
124
- colors
125
- } = _ref2;
126
- return Object.entries(colorMap).reduce((newState, _ref3) => {
127
- let [colorAttributeName, colorContext] = _ref3;
113
+ static getDerivedStateFromProps({
114
+ attributes,
115
+ colors
116
+ }, previousState) {
117
+ return Object.entries(colorMap).reduce((newState, [colorAttributeName, colorContext]) => {
128
118
  const colorObject = getColorObjectByAttributeValues(colors, attributes[colorAttributeName], attributes[`custom${upperFirst(colorAttributeName)}`]);
129
119
  const previousColorObject = previousState[colorAttributeName];
130
- const previousColor = previousColorObject === null || previousColorObject === void 0 ? void 0 : previousColorObject.color;
120
+ const previousColor = previousColorObject?.color;
131
121
  /**
132
122
  * The "and previousColorObject" condition checks that a previous color object was already computed.
133
123
  * At the start previousColorObject and colorValue are both equal to undefined
@@ -147,11 +137,12 @@ function createColorHOC(colorTypes, withColorPalette) {
147
137
  }
148
138
 
149
139
  render() {
150
- return createElement(WrappedComponent, _extends({}, this.props, {
151
- colors: undefined
152
- }, this.state, this.setters, {
140
+ return createElement(WrappedComponent, { ...this.props,
141
+ colors: undefined,
142
+ ...this.state,
143
+ ...this.setters,
153
144
  colorUtils: this.colorUtils
154
- }));
145
+ });
155
146
  }
156
147
 
157
148
  };
@@ -182,13 +173,8 @@ function createColorHOC(colorTypes, withColorPalette) {
182
173
 
183
174
 
184
175
  export function createCustomColorsHOC(colorsArray) {
185
- return function () {
176
+ return (...colorTypes) => {
186
177
  const withColorPalette = withCustomColorPalette(colorsArray);
187
-
188
- for (var _len = arguments.length, colorTypes = new Array(_len), _key = 0; _key < _len; _key++) {
189
- colorTypes[_key] = arguments[_key];
190
- }
191
-
192
178
  return createHigherOrderComponent(createColorHOC(colorTypes, withColorPalette), 'withCustomColors');
193
179
  };
194
180
  }
@@ -217,13 +203,8 @@ export function createCustomColorsHOC(colorsArray) {
217
203
  * @return {Function} Higher-order component.
218
204
  */
219
205
 
220
- export default function withColors() {
206
+ export default function withColors(...colorTypes) {
221
207
  const withColorPalette = withEditorColorPalette();
222
-
223
- for (var _len2 = arguments.length, colorTypes = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
224
- colorTypes[_key2] = arguments[_key2];
225
- }
226
-
227
208
  return createHigherOrderComponent(createColorHOC(colorTypes, withColorPalette), 'withColors');
228
209
  }
229
210
  //# sourceMappingURL=with-colors.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-editor/src/components/colors/with-colors.js"],"names":["kebabCase","useMemo","Component","compose","createHigherOrderComponent","getColorClassName","getColorObjectByColorValue","getColorObjectByAttributeValues","getMostReadableColor","useSetting","upperFirst","firstLetter","rest","toUpperCase","join","withCustomColorPalette","colorsArray","WrappedComponent","props","withEditorColorPalette","userPalette","themePalette","defaultPalette","allColors","createColorHOC","colorTypes","withColorPalette","colorMap","reduce","colorObject","colorType","constructor","setters","createSetters","colorUtils","bind","state","colorValue","colors","Object","keys","settersAccumulator","colorAttributeName","upperFirstColorAttributeName","customColorAttributeName","createSetColor","setAttributes","slug","undefined","getDerivedStateFromProps","previousState","attributes","entries","newState","colorContext","previousColorObject","previousColor","color","class","render","createCustomColorsHOC","withColors"],"mappings":";;;AAAA;AACA;AACA;AACA,SAASA,SAAT,QAA0B,QAA1B;AAEA;AACA;AACA;;AACA,SAASC,OAAT,EAAkBC,SAAlB,QAAmC,oBAAnC;AACA,SAASC,OAAT,EAAkBC,0BAAlB,QAAoD,oBAApD;AAEA;AACA;AACA;;AACA,SACCC,iBADD,EAECC,0BAFD,EAGCC,+BAHD,EAICC,oBAJD,QAKO,SALP;AAMA,OAAOC,UAAP,MAAuB,gBAAvB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,MAAMC,UAAU,GAAG;AAAA,MAAE,CAAEC,WAAF,EAAe,GAAGC,IAAlB,CAAF;AAAA,SAClBD,WAAW,CAACE,WAAZ,KAA4BD,IAAI,CAACE,IAAL,CAAW,EAAX,CADV;AAAA,CAAnB;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,MAAMC,sBAAsB,GAAKC,WAAF,IAC9BZ,0BAA0B,CACvBa,gBAAF,IAA0BC,KAAF,IACvB,cAAC,gBAAD,eAAuBA,KAAvB;AAA+B,EAAA,MAAM,EAAGF;AAAxC,GAFwB,EAGzB,wBAHyB,CAD3B;AAOA;AACA;AACA;AACA;AACA;AACA;;;AACA,MAAMG,sBAAsB,GAAG,MAC9Bf,0BAA0B,CACvBa,gBAAF,IAA0BC,KAAF,IAAa;AACpC;AACA;AACA;AACA,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AAE3B,WAAOrB,0BAA0B,CAChCoB,cAAc,CAAEC,UAAF,EAAcC,gBAAd,CADkB,EAEhC,kBAFgC,CAAjC;AAIA,GAND;AAOA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,eAAe,SAASmC,UAAT,GAAqC;AACnD,QAAMnC,gBAAgB,GAAGP,sBAAsB,EAA/C;;AADmD,qCAAbM,UAAa;AAAbA,IAAAA,UAAa;AAAA;;AAEnD,SAAOrB,0BAA0B,CAChCoB,cAAc,CAAEC,UAAF,EAAcC,gBAAd,CADkB,EAEhC,YAFgC,CAAjC;AAIA","sourcesContent":["/**\n * External dependencies\n */\nimport { kebabCase } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo, Component } from '@wordpress/element';\nimport { compose, createHigherOrderComponent } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport {\n\tgetColorClassName,\n\tgetColorObjectByColorValue,\n\tgetColorObjectByAttributeValues,\n\tgetMostReadableColor,\n} from './utils';\nimport useSetting from '../use-setting';\n\n/**\n * Capitalizes the first letter in a string.\n *\n * @param {string} str The string whose first letter the function will capitalize.\n *\n * @return {string} Capitalized string.\n */\nconst upperFirst = ( [ firstLetter, ...rest ] ) =>\n\tfirstLetter.toUpperCase() + rest.join( '' );\n\n/**\n * Higher order component factory for injecting the `colorsArray` argument as\n * the colors prop in the `withCustomColors` HOC.\n *\n * @param {Array} colorsArray An array of color objects.\n *\n * @return {Function} The higher order component.\n */\nconst withCustomColorPalette = ( colorsArray ) =>\n\tcreateHigherOrderComponent(\n\t\t( WrappedComponent ) => ( props ) =>\n\t\t\t<WrappedComponent { ...props } colors={ colorsArray } />,\n\t\t'withCustomColorPalette'\n\t);\n\n/**\n * Higher order component factory for injecting the editor colors as the\n * `colors` prop in the `withColors` HOC.\n *\n * @return {Function} The higher order component.\n */\nconst withEditorColorPalette = () =>\n\tcreateHigherOrderComponent(\n\t\t( WrappedComponent ) => ( props ) => {\n\t\t\t// Some color settings have a special handling for deprecated flags in `useSetting`,\n\t\t\t// so we can't unwrap them by doing const { ... } = useSetting('color')\n\t\t\t// until https://github.com/WordPress/gutenberg/issues/37094 is fixed.\n\t\t\tconst userPalette = useSetting( 'color.palette.custom' );\n\t\t\tconst themePalette = useSetting( 'color.palette.theme' );\n\t\t\tconst defaultPalette = useSetting( 'color.palette.default' );\n\t\t\tconst allColors = useMemo(\n\t\t\t\t() => [\n\t\t\t\t\t...( userPalette || [] ),\n\t\t\t\t\t...( themePalette || [] ),\n\t\t\t\t\t...( defaultPalette || [] ),\n\t\t\t\t],\n\t\t\t\t[ userPalette, themePalette, defaultPalette ]\n\t\t\t);\n\t\t\treturn <WrappedComponent { ...props } colors={ allColors } />;\n\t\t},\n\t\t'withEditorColorPalette'\n\t);\n\n/**\n * Helper function used with `createHigherOrderComponent` to create\n * higher order components for managing color logic.\n *\n * @param {Array} colorTypes An array of color types (e.g. 'backgroundColor, borderColor).\n * @param {Function} withColorPalette A HOC for injecting the 'colors' prop into the WrappedComponent.\n *\n * @return {WPComponent} The component that can be used as a HOC.\n */\nfunction createColorHOC( colorTypes, withColorPalette ) {\n\tconst colorMap = colorTypes.reduce( ( colorObject, colorType ) => {\n\t\treturn {\n\t\t\t...colorObject,\n\t\t\t...( typeof colorType === 'string'\n\t\t\t\t? { [ colorType ]: kebabCase( colorType ) }\n\t\t\t\t: colorType ),\n\t\t};\n\t}, {} );\n\n\treturn compose( [\n\t\twithColorPalette,\n\t\t( WrappedComponent ) => {\n\t\t\treturn class extends Component {\n\t\t\t\tconstructor( props ) {\n\t\t\t\t\tsuper( props );\n\n\t\t\t\t\tthis.setters = this.createSetters();\n\t\t\t\t\tthis.colorUtils = {\n\t\t\t\t\t\tgetMostReadableColor:\n\t\t\t\t\t\t\tthis.getMostReadableColor.bind( this ),\n\t\t\t\t\t};\n\n\t\t\t\t\tthis.state = {};\n\t\t\t\t}\n\n\t\t\t\tgetMostReadableColor( colorValue ) {\n\t\t\t\t\tconst { colors } = this.props;\n\t\t\t\t\treturn getMostReadableColor( colors, colorValue );\n\t\t\t\t}\n\n\t\t\t\tcreateSetters() {\n\t\t\t\t\treturn Object.keys( colorMap ).reduce(\n\t\t\t\t\t\t( settersAccumulator, colorAttributeName ) => {\n\t\t\t\t\t\t\tconst upperFirstColorAttributeName =\n\t\t\t\t\t\t\t\tupperFirst( colorAttributeName );\n\t\t\t\t\t\t\tconst customColorAttributeName = `custom${ upperFirstColorAttributeName }`;\n\t\t\t\t\t\t\tsettersAccumulator[\n\t\t\t\t\t\t\t\t`set${ upperFirstColorAttributeName }`\n\t\t\t\t\t\t\t] = this.createSetColor(\n\t\t\t\t\t\t\t\tcolorAttributeName,\n\t\t\t\t\t\t\t\tcustomColorAttributeName\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\treturn settersAccumulator;\n\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\n\t\t\t\tcreateSetColor( colorAttributeName, customColorAttributeName ) {\n\t\t\t\t\treturn ( colorValue ) => {\n\t\t\t\t\t\tconst colorObject = getColorObjectByColorValue(\n\t\t\t\t\t\t\tthis.props.colors,\n\t\t\t\t\t\t\tcolorValue\n\t\t\t\t\t\t);\n\t\t\t\t\t\tthis.props.setAttributes( {\n\t\t\t\t\t\t\t[ colorAttributeName ]:\n\t\t\t\t\t\t\t\tcolorObject && colorObject.slug\n\t\t\t\t\t\t\t\t\t? colorObject.slug\n\t\t\t\t\t\t\t\t\t: undefined,\n\t\t\t\t\t\t\t[ customColorAttributeName ]:\n\t\t\t\t\t\t\t\tcolorObject && colorObject.slug\n\t\t\t\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t\t\t\t: colorValue,\n\t\t\t\t\t\t} );\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tstatic getDerivedStateFromProps(\n\t\t\t\t\t{ attributes, colors },\n\t\t\t\t\tpreviousState\n\t\t\t\t) {\n\t\t\t\t\treturn Object.entries( colorMap ).reduce(\n\t\t\t\t\t\t( newState, [ colorAttributeName, colorContext ] ) => {\n\t\t\t\t\t\t\tconst colorObject = getColorObjectByAttributeValues(\n\t\t\t\t\t\t\t\tcolors,\n\t\t\t\t\t\t\t\tattributes[ colorAttributeName ],\n\t\t\t\t\t\t\t\tattributes[\n\t\t\t\t\t\t\t\t\t`custom${ upperFirst(\n\t\t\t\t\t\t\t\t\t\tcolorAttributeName\n\t\t\t\t\t\t\t\t\t) }`\n\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\tconst previousColorObject =\n\t\t\t\t\t\t\t\tpreviousState[ colorAttributeName ];\n\t\t\t\t\t\t\tconst previousColor = previousColorObject?.color;\n\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t * The \"and previousColorObject\" condition checks that a previous color object was already computed.\n\t\t\t\t\t\t\t * At the start previousColorObject and colorValue are both equal to undefined\n\t\t\t\t\t\t\t * bus as previousColorObject does not exist we should compute the object.\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\tpreviousColor === colorObject.color &&\n\t\t\t\t\t\t\t\tpreviousColorObject\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tnewState[ colorAttributeName ] =\n\t\t\t\t\t\t\t\t\tpreviousColorObject;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tnewState[ colorAttributeName ] = {\n\t\t\t\t\t\t\t\t\t...colorObject,\n\t\t\t\t\t\t\t\t\tclass: getColorClassName(\n\t\t\t\t\t\t\t\t\t\tcolorContext,\n\t\t\t\t\t\t\t\t\t\tcolorObject.slug\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\treturn newState;\n\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\n\t\t\t\trender() {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<WrappedComponent\n\t\t\t\t\t\t\t{ ...{\n\t\t\t\t\t\t\t\t...this.props,\n\t\t\t\t\t\t\t\tcolors: undefined,\n\t\t\t\t\t\t\t\t...this.state,\n\t\t\t\t\t\t\t\t...this.setters,\n\t\t\t\t\t\t\t\tcolorUtils: this.colorUtils,\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t/>\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t};\n\t\t},\n\t] );\n}\n\n/**\n * A higher-order component factory for creating a 'withCustomColors' HOC, which handles color logic\n * for class generation color value, retrieval and color attribute setting.\n *\n * Use this higher-order component to work with a custom set of colors.\n *\n * @example\n *\n * ```jsx\n * const CUSTOM_COLORS = [ { name: 'Red', slug: 'red', color: '#ff0000' }, { name: 'Blue', slug: 'blue', color: '#0000ff' } ];\n * const withCustomColors = createCustomColorsHOC( CUSTOM_COLORS );\n * // ...\n * export default compose(\n * withCustomColors( 'backgroundColor', 'borderColor' ),\n * MyColorfulComponent,\n * );\n * ```\n *\n * @param {Array} colorsArray The array of color objects (name, slug, color, etc... ).\n *\n * @return {Function} Higher-order component.\n */\nexport function createCustomColorsHOC( colorsArray ) {\n\treturn ( ...colorTypes ) => {\n\t\tconst withColorPalette = withCustomColorPalette( colorsArray );\n\t\treturn createHigherOrderComponent(\n\t\t\tcreateColorHOC( colorTypes, withColorPalette ),\n\t\t\t'withCustomColors'\n\t\t);\n\t};\n}\n\n/**\n * A higher-order component, which handles color logic for class generation color value, retrieval and color attribute setting.\n *\n * For use with the default editor/theme color palette.\n *\n * @example\n *\n * ```jsx\n * export default compose(\n * withColors( 'backgroundColor', { textColor: 'color' } ),\n * MyColorfulComponent,\n * );\n * ```\n *\n * @param {...(Object|string)} colorTypes The arguments can be strings or objects. If the argument is an object,\n * it should contain the color attribute name as key and the color context as value.\n * If the argument is a string the value should be the color attribute name,\n * the color context is computed by applying a kebab case transform to the value.\n * Color context represents the context/place where the color is going to be used.\n * The class name of the color is generated using 'has' followed by the color name\n * and ending with the color context all in kebab case e.g: has-green-background-color.\n *\n * @return {Function} Higher-order component.\n */\nexport default function withColors( ...colorTypes ) {\n\tconst withColorPalette = withEditorColorPalette();\n\treturn createHigherOrderComponent(\n\t\tcreateColorHOC( colorTypes, withColorPalette ),\n\t\t'withColors'\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/block-editor/src/components/colors/with-colors.js"],"names":["useMemo","Component","compose","createHigherOrderComponent","getColorClassName","getColorObjectByColorValue","getColorObjectByAttributeValues","getMostReadableColor","useSetting","kebabCase","upperFirst","firstLetter","rest","toUpperCase","join","withCustomColorPalette","colorsArray","WrappedComponent","props","withEditorColorPalette","userPalette","themePalette","defaultPalette","allColors","createColorHOC","colorTypes","withColorPalette","colorMap","reduce","colorObject","colorType","constructor","setters","createSetters","colorUtils","bind","state","colorValue","colors","Object","keys","settersAccumulator","colorAttributeName","upperFirstColorAttributeName","customColorAttributeName","createSetColor","setAttributes","slug","undefined","getDerivedStateFromProps","attributes","previousState","entries","newState","colorContext","previousColorObject","previousColor","color","class","render","createCustomColorsHOC","withColors"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,OAAT,EAAkBC,SAAlB,QAAmC,oBAAnC;AACA,SAASC,OAAT,EAAkBC,0BAAlB,QAAoD,oBAApD;AAEA;AACA;AACA;;AACA,SACCC,iBADD,EAECC,0BAFD,EAGCC,+BAHD,EAICC,oBAJD,QAKO,SALP;AAMA,OAAOC,UAAP,MAAuB,gBAAvB;AACA,SAASC,SAAT,QAA0B,oBAA1B;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,MAAMC,UAAU,GAAG,CAAE,CAAEC,WAAF,EAAe,GAAGC,IAAlB,CAAF,KAClBD,WAAW,CAACE,WAAZ,KAA4BD,IAAI,CAACE,IAAL,CAAW,EAAX,CAD7B;AAGA;AACA;AACA;AACA;AACA;AACA;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,CAAd;AAuHA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,OAAO,SAAS0B,qBAAT,CAAgC5C,WAAhC,EAA8C;AACpD,SAAO,CAAE,GAAGS,UAAL,KAAqB;AAC3B,UAAMC,gBAAgB,GAAGX,sBAAsB,CAAEC,WAAF,CAA/C;AACA,WAAOb,0BAA0B,CAChCqB,cAAc,CAAEC,UAAF,EAAcC,gBAAd,CADkB,EAEhC,kBAFgC,CAAjC;AAIA,GAND;AAOA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,eAAe,SAASmC,UAAT,CAAqB,GAAGpC,UAAxB,EAAqC;AACnD,QAAMC,gBAAgB,GAAGP,sBAAsB,EAA/C;AACA,SAAOhB,0BAA0B,CAChCqB,cAAc,CAAEC,UAAF,EAAcC,gBAAd,CADkB,EAEhC,YAFgC,CAAjC;AAIA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo, Component } from '@wordpress/element';\nimport { compose, createHigherOrderComponent } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport {\n\tgetColorClassName,\n\tgetColorObjectByColorValue,\n\tgetColorObjectByAttributeValues,\n\tgetMostReadableColor,\n} from './utils';\nimport useSetting from '../use-setting';\nimport { kebabCase } from '../../utils/object';\n\n/**\n * Capitalizes the first letter in a string.\n *\n * @param {string} str The string whose first letter the function will capitalize.\n *\n * @return {string} Capitalized string.\n */\nconst upperFirst = ( [ firstLetter, ...rest ] ) =>\n\tfirstLetter.toUpperCase() + rest.join( '' );\n\n/**\n * Higher order component factory for injecting the `colorsArray` argument as\n * the colors prop in the `withCustomColors` HOC.\n *\n * @param {Array} colorsArray An array of color objects.\n *\n * @return {Function} The higher order component.\n */\nconst withCustomColorPalette = ( colorsArray ) =>\n\tcreateHigherOrderComponent(\n\t\t( WrappedComponent ) => ( props ) =>\n\t\t\t<WrappedComponent { ...props } colors={ colorsArray } />,\n\t\t'withCustomColorPalette'\n\t);\n\n/**\n * Higher order component factory for injecting the editor colors as the\n * `colors` prop in the `withColors` HOC.\n *\n * @return {Function} The higher order component.\n */\nconst withEditorColorPalette = () =>\n\tcreateHigherOrderComponent(\n\t\t( WrappedComponent ) => ( props ) => {\n\t\t\t// Some color settings have a special handling for deprecated flags in `useSetting`,\n\t\t\t// so we can't unwrap them by doing const { ... } = useSetting('color')\n\t\t\t// until https://github.com/WordPress/gutenberg/issues/37094 is fixed.\n\t\t\tconst userPalette = useSetting( 'color.palette.custom' );\n\t\t\tconst themePalette = useSetting( 'color.palette.theme' );\n\t\t\tconst defaultPalette = useSetting( 'color.palette.default' );\n\t\t\tconst allColors = useMemo(\n\t\t\t\t() => [\n\t\t\t\t\t...( userPalette || [] ),\n\t\t\t\t\t...( themePalette || [] ),\n\t\t\t\t\t...( defaultPalette || [] ),\n\t\t\t\t],\n\t\t\t\t[ userPalette, themePalette, defaultPalette ]\n\t\t\t);\n\t\t\treturn <WrappedComponent { ...props } colors={ allColors } />;\n\t\t},\n\t\t'withEditorColorPalette'\n\t);\n\n/**\n * Helper function used with `createHigherOrderComponent` to create\n * higher order components for managing color logic.\n *\n * @param {Array} colorTypes An array of color types (e.g. 'backgroundColor, borderColor).\n * @param {Function} withColorPalette A HOC for injecting the 'colors' prop into the WrappedComponent.\n *\n * @return {WPComponent} The component that can be used as a HOC.\n */\nfunction createColorHOC( colorTypes, withColorPalette ) {\n\tconst colorMap = colorTypes.reduce( ( colorObject, colorType ) => {\n\t\treturn {\n\t\t\t...colorObject,\n\t\t\t...( typeof colorType === 'string'\n\t\t\t\t? { [ colorType ]: kebabCase( colorType ) }\n\t\t\t\t: colorType ),\n\t\t};\n\t}, {} );\n\n\treturn compose( [\n\t\twithColorPalette,\n\t\t( WrappedComponent ) => {\n\t\t\treturn class extends Component {\n\t\t\t\tconstructor( props ) {\n\t\t\t\t\tsuper( props );\n\n\t\t\t\t\tthis.setters = this.createSetters();\n\t\t\t\t\tthis.colorUtils = {\n\t\t\t\t\t\tgetMostReadableColor:\n\t\t\t\t\t\t\tthis.getMostReadableColor.bind( this ),\n\t\t\t\t\t};\n\n\t\t\t\t\tthis.state = {};\n\t\t\t\t}\n\n\t\t\t\tgetMostReadableColor( colorValue ) {\n\t\t\t\t\tconst { colors } = this.props;\n\t\t\t\t\treturn getMostReadableColor( colors, colorValue );\n\t\t\t\t}\n\n\t\t\t\tcreateSetters() {\n\t\t\t\t\treturn Object.keys( colorMap ).reduce(\n\t\t\t\t\t\t( settersAccumulator, colorAttributeName ) => {\n\t\t\t\t\t\t\tconst upperFirstColorAttributeName =\n\t\t\t\t\t\t\t\tupperFirst( colorAttributeName );\n\t\t\t\t\t\t\tconst customColorAttributeName = `custom${ upperFirstColorAttributeName }`;\n\t\t\t\t\t\t\tsettersAccumulator[\n\t\t\t\t\t\t\t\t`set${ upperFirstColorAttributeName }`\n\t\t\t\t\t\t\t] = this.createSetColor(\n\t\t\t\t\t\t\t\tcolorAttributeName,\n\t\t\t\t\t\t\t\tcustomColorAttributeName\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\treturn settersAccumulator;\n\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\n\t\t\t\tcreateSetColor( colorAttributeName, customColorAttributeName ) {\n\t\t\t\t\treturn ( colorValue ) => {\n\t\t\t\t\t\tconst colorObject = getColorObjectByColorValue(\n\t\t\t\t\t\t\tthis.props.colors,\n\t\t\t\t\t\t\tcolorValue\n\t\t\t\t\t\t);\n\t\t\t\t\t\tthis.props.setAttributes( {\n\t\t\t\t\t\t\t[ colorAttributeName ]:\n\t\t\t\t\t\t\t\tcolorObject && colorObject.slug\n\t\t\t\t\t\t\t\t\t? colorObject.slug\n\t\t\t\t\t\t\t\t\t: undefined,\n\t\t\t\t\t\t\t[ customColorAttributeName ]:\n\t\t\t\t\t\t\t\tcolorObject && colorObject.slug\n\t\t\t\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t\t\t\t: colorValue,\n\t\t\t\t\t\t} );\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tstatic getDerivedStateFromProps(\n\t\t\t\t\t{ attributes, colors },\n\t\t\t\t\tpreviousState\n\t\t\t\t) {\n\t\t\t\t\treturn Object.entries( colorMap ).reduce(\n\t\t\t\t\t\t( newState, [ colorAttributeName, colorContext ] ) => {\n\t\t\t\t\t\t\tconst colorObject = getColorObjectByAttributeValues(\n\t\t\t\t\t\t\t\tcolors,\n\t\t\t\t\t\t\t\tattributes[ colorAttributeName ],\n\t\t\t\t\t\t\t\tattributes[\n\t\t\t\t\t\t\t\t\t`custom${ upperFirst(\n\t\t\t\t\t\t\t\t\t\tcolorAttributeName\n\t\t\t\t\t\t\t\t\t) }`\n\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\tconst previousColorObject =\n\t\t\t\t\t\t\t\tpreviousState[ colorAttributeName ];\n\t\t\t\t\t\t\tconst previousColor = previousColorObject?.color;\n\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t * The \"and previousColorObject\" condition checks that a previous color object was already computed.\n\t\t\t\t\t\t\t * At the start previousColorObject and colorValue are both equal to undefined\n\t\t\t\t\t\t\t * bus as previousColorObject does not exist we should compute the object.\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\tpreviousColor === colorObject.color &&\n\t\t\t\t\t\t\t\tpreviousColorObject\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tnewState[ colorAttributeName ] =\n\t\t\t\t\t\t\t\t\tpreviousColorObject;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tnewState[ colorAttributeName ] = {\n\t\t\t\t\t\t\t\t\t...colorObject,\n\t\t\t\t\t\t\t\t\tclass: getColorClassName(\n\t\t\t\t\t\t\t\t\t\tcolorContext,\n\t\t\t\t\t\t\t\t\t\tcolorObject.slug\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\treturn newState;\n\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\n\t\t\t\trender() {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<WrappedComponent\n\t\t\t\t\t\t\t{ ...{\n\t\t\t\t\t\t\t\t...this.props,\n\t\t\t\t\t\t\t\tcolors: undefined,\n\t\t\t\t\t\t\t\t...this.state,\n\t\t\t\t\t\t\t\t...this.setters,\n\t\t\t\t\t\t\t\tcolorUtils: this.colorUtils,\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t/>\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t};\n\t\t},\n\t] );\n}\n\n/**\n * A higher-order component factory for creating a 'withCustomColors' HOC, which handles color logic\n * for class generation color value, retrieval and color attribute setting.\n *\n * Use this higher-order component to work with a custom set of colors.\n *\n * @example\n *\n * ```jsx\n * const CUSTOM_COLORS = [ { name: 'Red', slug: 'red', color: '#ff0000' }, { name: 'Blue', slug: 'blue', color: '#0000ff' } ];\n * const withCustomColors = createCustomColorsHOC( CUSTOM_COLORS );\n * // ...\n * export default compose(\n * withCustomColors( 'backgroundColor', 'borderColor' ),\n * MyColorfulComponent,\n * );\n * ```\n *\n * @param {Array} colorsArray The array of color objects (name, slug, color, etc... ).\n *\n * @return {Function} Higher-order component.\n */\nexport function createCustomColorsHOC( colorsArray ) {\n\treturn ( ...colorTypes ) => {\n\t\tconst withColorPalette = withCustomColorPalette( colorsArray );\n\t\treturn createHigherOrderComponent(\n\t\t\tcreateColorHOC( colorTypes, withColorPalette ),\n\t\t\t'withCustomColors'\n\t\t);\n\t};\n}\n\n/**\n * A higher-order component, which handles color logic for class generation color value, retrieval and color attribute setting.\n *\n * For use with the default editor/theme color palette.\n *\n * @example\n *\n * ```jsx\n * export default compose(\n * withColors( 'backgroundColor', { textColor: 'color' } ),\n * MyColorfulComponent,\n * );\n * ```\n *\n * @param {...(Object|string)} colorTypes The arguments can be strings or objects. If the argument is an object,\n * it should contain the color attribute name as key and the color context as value.\n * If the argument is a string the value should be the color attribute name,\n * the color context is computed by applying a kebab case transform to the value.\n * Color context represents the context/place where the color is going to be used.\n * The class name of the color is generated using 'has' followed by the color name\n * and ending with the color context all in kebab case e.g: has-green-background-color.\n *\n * @return {Function} Higher-order component.\n */\nexport default function withColors( ...colorTypes ) {\n\tconst withColorPalette = withEditorColorPalette();\n\treturn createHigherOrderComponent(\n\t\tcreateColorHOC( colorTypes, withColorPalette ),\n\t\t'withColors'\n\t);\n}\n"]}
@@ -1,11 +1,9 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
2
1
  import { createElement } from "@wordpress/element";
3
2
 
4
3
  /**
5
4
  * External dependencies
6
5
  */
7
6
  import classnames from 'classnames';
8
- import { isEmpty } from 'lodash';
9
7
  /**
10
8
  * WordPress dependencies
11
9
  */
@@ -29,26 +27,25 @@ const TAB_GRADIENT = {
29
27
  };
30
28
  const TABS_SETTINGS = [TAB_COLOR, TAB_GRADIENT];
31
29
 
32
- function ColorGradientControlInner(_ref) {
33
- let {
34
- colors,
35
- gradients,
36
- disableCustomColors,
37
- disableCustomGradients,
38
- __experimentalIsRenderedInSidebar,
39
- className,
40
- label,
41
- onColorChange,
42
- onGradientChange,
43
- colorValue,
44
- gradientValue,
45
- clearable,
46
- showTitle = true,
47
- enableAlpha,
48
- headingLevel
49
- } = _ref;
50
- const canChooseAColor = onColorChange && (!isEmpty(colors) || !disableCustomColors);
51
- const canChooseAGradient = onGradientChange && (!isEmpty(gradients) || !disableCustomGradients);
30
+ function ColorGradientControlInner({
31
+ colors,
32
+ gradients,
33
+ disableCustomColors,
34
+ disableCustomGradients,
35
+ __experimentalIsRenderedInSidebar,
36
+ className,
37
+ label,
38
+ onColorChange,
39
+ onGradientChange,
40
+ colorValue,
41
+ gradientValue,
42
+ clearable,
43
+ showTitle = true,
44
+ enableAlpha,
45
+ headingLevel
46
+ }) {
47
+ const canChooseAColor = onColorChange && (colors && colors.length > 0 || !disableCustomColors);
48
+ const canChooseAGradient = onGradientChange && (gradients && gradients.length > 0 || !disableCustomGradients);
52
49
 
53
50
  if (!canChooseAColor && !canChooseAGradient) {
54
51
  return null;
@@ -109,15 +106,19 @@ function ColorGradientControlSelect(props) {
109
106
  colorGradientSettings.gradients = useSetting('color.gradients');
110
107
  colorGradientSettings.disableCustomColors = !useSetting('color.custom');
111
108
  colorGradientSettings.disableCustomGradients = !useSetting('color.customGradient');
112
- return createElement(ColorGradientControlInner, _extends({}, colorGradientSettings, props));
109
+ return createElement(ColorGradientControlInner, { ...colorGradientSettings,
110
+ ...props
111
+ });
113
112
  }
114
113
 
115
114
  function ColorGradientControl(props) {
116
115
  if (colorsAndGradientKeys.every(key => props.hasOwnProperty(key))) {
117
- return createElement(ColorGradientControlInner, props);
116
+ return createElement(ColorGradientControlInner, { ...props
117
+ });
118
118
  }
119
119
 
120
- return createElement(ColorGradientControlSelect, props);
120
+ return createElement(ColorGradientControlSelect, { ...props
121
+ });
121
122
  }
122
123
 
123
124
  export default ColorGradientControl;
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-editor/src/components/colors-gradients/control.js"],"names":["classnames","isEmpty","BaseControl","__experimentalVStack","VStack","TabPanel","ColorPalette","GradientPicker","useSetting","colorsAndGradientKeys","TAB_COLOR","name","title","value","TAB_GRADIENT","TABS_SETTINGS","ColorGradientControlInner","colors","gradients","disableCustomColors","disableCustomGradients","__experimentalIsRenderedInSidebar","className","label","onColorChange","onGradientChange","colorValue","gradientValue","clearable","showTitle","enableAlpha","headingLevel","canChooseAColor","canChooseAGradient","tabPanels","newColor","newGradient","renderPanelType","type","tab","ColorGradientControlSelect","props","colorGradientSettings","ColorGradientControl","every","key","hasOwnProperty"],"mappings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cAAC,0BAAD,EAAiCA,KAAjC,CAAP;AACA;;AAED,eAAeE,oBAAf","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport { isEmpty } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tBaseControl,\n\t__experimentalVStack as VStack,\n\tTabPanel,\n\tColorPalette,\n\tGradientPicker,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport useSetting from '../use-setting';\n\nconst colorsAndGradientKeys = [\n\t'colors',\n\t'disableCustomColors',\n\t'gradients',\n\t'disableCustomGradients',\n];\n\nconst TAB_COLOR = {\n\tname: 'color',\n\ttitle: 'Solid',\n\tvalue: 'color',\n};\nconst TAB_GRADIENT = {\n\tname: 'gradient',\n\ttitle: 'Gradient',\n\tvalue: 'gradient',\n};\n\nconst TABS_SETTINGS = [ TAB_COLOR, TAB_GRADIENT ];\n\nfunction ColorGradientControlInner( {\n\tcolors,\n\tgradients,\n\tdisableCustomColors,\n\tdisableCustomGradients,\n\t__experimentalIsRenderedInSidebar,\n\tclassName,\n\tlabel,\n\tonColorChange,\n\tonGradientChange,\n\tcolorValue,\n\tgradientValue,\n\tclearable,\n\tshowTitle = true,\n\tenableAlpha,\n\theadingLevel,\n} ) {\n\tconst canChooseAColor =\n\t\tonColorChange && ( ! isEmpty( colors ) || ! disableCustomColors );\n\tconst canChooseAGradient =\n\t\tonGradientChange &&\n\t\t( ! isEmpty( gradients ) || ! disableCustomGradients );\n\n\tif ( ! canChooseAColor && ! canChooseAGradient ) {\n\t\treturn null;\n\t}\n\n\tconst tabPanels = {\n\t\t[ TAB_COLOR.value ]: (\n\t\t\t<ColorPalette\n\t\t\t\tvalue={ colorValue }\n\t\t\t\tonChange={\n\t\t\t\t\tcanChooseAGradient\n\t\t\t\t\t\t? ( newColor ) => {\n\t\t\t\t\t\t\t\tonColorChange( newColor );\n\t\t\t\t\t\t\t\tonGradientChange();\n\t\t\t\t\t\t }\n\t\t\t\t\t\t: onColorChange\n\t\t\t\t}\n\t\t\t\t{ ...{ colors, disableCustomColors } }\n\t\t\t\t__experimentalIsRenderedInSidebar={\n\t\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t\t}\n\t\t\t\tclearable={ clearable }\n\t\t\t\tenableAlpha={ enableAlpha }\n\t\t\t\theadingLevel={ headingLevel }\n\t\t\t/>\n\t\t),\n\t\t[ TAB_GRADIENT.value ]: (\n\t\t\t<GradientPicker\n\t\t\t\t__nextHasNoMargin\n\t\t\t\tvalue={ gradientValue }\n\t\t\t\tonChange={\n\t\t\t\t\tcanChooseAColor\n\t\t\t\t\t\t? ( newGradient ) => {\n\t\t\t\t\t\t\t\tonGradientChange( newGradient );\n\t\t\t\t\t\t\t\tonColorChange();\n\t\t\t\t\t\t }\n\t\t\t\t\t\t: onGradientChange\n\t\t\t\t}\n\t\t\t\t{ ...{ gradients, disableCustomGradients } }\n\t\t\t\t__experimentalIsRenderedInSidebar={\n\t\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t\t}\n\t\t\t\tclearable={ clearable }\n\t\t\t\theadingLevel={ headingLevel }\n\t\t\t/>\n\t\t),\n\t};\n\n\tconst renderPanelType = ( type ) => (\n\t\t<div className=\"block-editor-color-gradient-control__panel\">\n\t\t\t{ tabPanels[ type ] }\n\t\t</div>\n\t);\n\n\treturn (\n\t\t<BaseControl\n\t\t\t__nextHasNoMarginBottom\n\t\t\tclassName={ classnames(\n\t\t\t\t'block-editor-color-gradient-control',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t>\n\t\t\t<fieldset className=\"block-editor-color-gradient-control__fieldset\">\n\t\t\t\t<VStack spacing={ 1 }>\n\t\t\t\t\t{ showTitle && (\n\t\t\t\t\t\t<legend>\n\t\t\t\t\t\t\t<div className=\"block-editor-color-gradient-control__color-indicator\">\n\t\t\t\t\t\t\t\t<BaseControl.VisualLabel>\n\t\t\t\t\t\t\t\t\t{ label }\n\t\t\t\t\t\t\t\t</BaseControl.VisualLabel>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</legend>\n\t\t\t\t\t) }\n\t\t\t\t\t{ canChooseAColor && canChooseAGradient && (\n\t\t\t\t\t\t<TabPanel\n\t\t\t\t\t\t\tclassName=\"block-editor-color-gradient-control__tabs\"\n\t\t\t\t\t\t\ttabs={ TABS_SETTINGS }\n\t\t\t\t\t\t\tinitialTabName={\n\t\t\t\t\t\t\t\tgradientValue\n\t\t\t\t\t\t\t\t\t? TAB_GRADIENT.value\n\t\t\t\t\t\t\t\t\t: !! canChooseAColor && TAB_COLOR.value\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ ( tab ) => renderPanelType( tab.value ) }\n\t\t\t\t\t\t</TabPanel>\n\t\t\t\t\t) }\n\t\t\t\t\t{ ! canChooseAGradient &&\n\t\t\t\t\t\trenderPanelType( TAB_COLOR.value ) }\n\t\t\t\t\t{ ! canChooseAColor &&\n\t\t\t\t\t\trenderPanelType( TAB_GRADIENT.value ) }\n\t\t\t\t</VStack>\n\t\t\t</fieldset>\n\t\t</BaseControl>\n\t);\n}\n\nfunction ColorGradientControlSelect( props ) {\n\tconst colorGradientSettings = {};\n\tcolorGradientSettings.colors = useSetting( 'color.palette' );\n\tcolorGradientSettings.gradients = useSetting( 'color.gradients' );\n\tcolorGradientSettings.disableCustomColors = ! useSetting( 'color.custom' );\n\tcolorGradientSettings.disableCustomGradients = ! useSetting(\n\t\t'color.customGradient'\n\t);\n\n\treturn (\n\t\t<ColorGradientControlInner\n\t\t\t{ ...{ ...colorGradientSettings, ...props } }\n\t\t/>\n\t);\n}\n\nfunction ColorGradientControl( props ) {\n\tif (\n\t\tcolorsAndGradientKeys.every( ( key ) => props.hasOwnProperty( key ) )\n\t) {\n\t\treturn <ColorGradientControlInner { ...props } />;\n\t}\n\treturn <ColorGradientControlSelect { ...props } />;\n}\n\nexport default ColorGradientControl;\n"]}
1
+ {"version":3,"sources":["@wordpress/block-editor/src/components/colors-gradients/control.js"],"names":["classnames","BaseControl","__experimentalVStack","VStack","TabPanel","ColorPalette","GradientPicker","useSetting","colorsAndGradientKeys","TAB_COLOR","name","title","value","TAB_GRADIENT","TABS_SETTINGS","ColorGradientControlInner","colors","gradients","disableCustomColors","disableCustomGradients","__experimentalIsRenderedInSidebar","className","label","onColorChange","onGradientChange","colorValue","gradientValue","clearable","showTitle","enableAlpha","headingLevel","canChooseAColor","length","canChooseAGradient","tabPanels","newColor","newGradient","renderPanelType","type","tab","ColorGradientControlSelect","props","colorGradientSettings","ColorGradientControl","every","key","hasOwnProperty"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SACCC,WADD,EAECC,oBAAoB,IAAIC,MAFzB,EAGCC,QAHD,EAICC,YAJD,EAKCC,cALD,QAMO,uBANP;AAQA;AACA;AACA;;AACA,OAAOC,UAAP,MAAuB,gBAAvB;AAEA,MAAMC,qBAAqB,GAAG,CAC7B,QAD6B,EAE7B,qBAF6B,EAG7B,WAH6B,EAI7B,wBAJ6B,CAA9B;AAOA,MAAMC,SAAS,GAAG;AACjBC,EAAAA,IAAI,EAAE,OADW;AAEjBC,EAAAA,KAAK,EAAE,OAFU;AAGjBC,EAAAA,KAAK,EAAE;AAHU,CAAlB;AAKA,MAAMC,YAAY,GAAG;AACpBH,EAAAA,IAAI,EAAE,UADc;AAEpBC,EAAAA,KAAK,EAAE,UAFa;AAGpBC,EAAAA,KAAK,EAAE;AAHa,CAArB;AAMA,MAAME,aAAa,GAAG,CAAEL,SAAF,EAAaI,YAAb,CAAtB;;AAEA,SAASE,yBAAT,CAAoC;AACnCC,EAAAA,MADmC;AAEnCC,EAAAA,SAFmC;AAGnCC,EAAAA,mBAHmC;AAInCC,EAAAA,sBAJmC;AAKnCC,EAAAA,iCALmC;AAMnCC,EAAAA,SANmC;AAOnCC,EAAAA,KAPmC;AAQnCC,EAAAA,aARmC;AASnCC,EAAAA,gBATmC;AAUnCC,EAAAA,UAVmC;A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qB,CAACvB,sBAAtB,GAA+C,CAAEZ,UAAU,CAC1D,sBAD0D,CAA3D;AAIA,SACC,cAAC,yBAAD,IACQ,GAAGmC,qBADX;AACkC,OAAGD;AADrC,IADD;AAKA;;AAED,SAASE,oBAAT,CAA+BF,KAA/B,EAAuC;AACtC,MACCjC,qBAAqB,CAACoC,KAAtB,CAA+BC,GAAF,IAAWJ,KAAK,CAACK,cAAN,CAAsBD,GAAtB,CAAxC,CADD,EAEE;AACD,WAAO,cAAC,yBAAD,OAAgCJ;AAAhC,MAAP;AACA;;AACD,SAAO,cAAC,0BAAD,OAAiCA;AAAjC,IAAP;AACA;;AAED,eAAeE,oBAAf","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tBaseControl,\n\t__experimentalVStack as VStack,\n\tTabPanel,\n\tColorPalette,\n\tGradientPicker,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport useSetting from '../use-setting';\n\nconst colorsAndGradientKeys = [\n\t'colors',\n\t'disableCustomColors',\n\t'gradients',\n\t'disableCustomGradients',\n];\n\nconst TAB_COLOR = {\n\tname: 'color',\n\ttitle: 'Solid',\n\tvalue: 'color',\n};\nconst TAB_GRADIENT = {\n\tname: 'gradient',\n\ttitle: 'Gradient',\n\tvalue: 'gradient',\n};\n\nconst TABS_SETTINGS = [ TAB_COLOR, TAB_GRADIENT ];\n\nfunction ColorGradientControlInner( {\n\tcolors,\n\tgradients,\n\tdisableCustomColors,\n\tdisableCustomGradients,\n\t__experimentalIsRenderedInSidebar,\n\tclassName,\n\tlabel,\n\tonColorChange,\n\tonGradientChange,\n\tcolorValue,\n\tgradientValue,\n\tclearable,\n\tshowTitle = true,\n\tenableAlpha,\n\theadingLevel,\n} ) {\n\tconst canChooseAColor =\n\t\tonColorChange &&\n\t\t( ( colors && colors.length > 0 ) || ! disableCustomColors );\n\tconst canChooseAGradient =\n\t\tonGradientChange &&\n\t\t( ( gradients && gradients.length > 0 ) || ! disableCustomGradients );\n\n\tif ( ! canChooseAColor && ! canChooseAGradient ) {\n\t\treturn null;\n\t}\n\n\tconst tabPanels = {\n\t\t[ TAB_COLOR.value ]: (\n\t\t\t<ColorPalette\n\t\t\t\tvalue={ colorValue }\n\t\t\t\tonChange={\n\t\t\t\t\tcanChooseAGradient\n\t\t\t\t\t\t? ( newColor ) => {\n\t\t\t\t\t\t\t\tonColorChange( newColor );\n\t\t\t\t\t\t\t\tonGradientChange();\n\t\t\t\t\t\t }\n\t\t\t\t\t\t: onColorChange\n\t\t\t\t}\n\t\t\t\t{ ...{ colors, disableCustomColors } }\n\t\t\t\t__experimentalIsRenderedInSidebar={\n\t\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t\t}\n\t\t\t\tclearable={ clearable }\n\t\t\t\tenableAlpha={ enableAlpha }\n\t\t\t\theadingLevel={ headingLevel }\n\t\t\t/>\n\t\t),\n\t\t[ TAB_GRADIENT.value ]: (\n\t\t\t<GradientPicker\n\t\t\t\t__nextHasNoMargin\n\t\t\t\tvalue={ gradientValue }\n\t\t\t\tonChange={\n\t\t\t\t\tcanChooseAColor\n\t\t\t\t\t\t? ( newGradient ) => {\n\t\t\t\t\t\t\t\tonGradientChange( newGradient );\n\t\t\t\t\t\t\t\tonColorChange();\n\t\t\t\t\t\t }\n\t\t\t\t\t\t: onGradientChange\n\t\t\t\t}\n\t\t\t\t{ ...{ gradients, disableCustomGradients } }\n\t\t\t\t__experimentalIsRenderedInSidebar={\n\t\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t\t}\n\t\t\t\tclearable={ clearable }\n\t\t\t\theadingLevel={ headingLevel }\n\t\t\t/>\n\t\t),\n\t};\n\n\tconst renderPanelType = ( type ) => (\n\t\t<div className=\"block-editor-color-gradient-control__panel\">\n\t\t\t{ tabPanels[ type ] }\n\t\t</div>\n\t);\n\n\treturn (\n\t\t<BaseControl\n\t\t\t__nextHasNoMarginBottom\n\t\t\tclassName={ classnames(\n\t\t\t\t'block-editor-color-gradient-control',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t>\n\t\t\t<fieldset className=\"block-editor-color-gradient-control__fieldset\">\n\t\t\t\t<VStack spacing={ 1 }>\n\t\t\t\t\t{ showTitle && (\n\t\t\t\t\t\t<legend>\n\t\t\t\t\t\t\t<div className=\"block-editor-color-gradient-control__color-indicator\">\n\t\t\t\t\t\t\t\t<BaseControl.VisualLabel>\n\t\t\t\t\t\t\t\t\t{ label }\n\t\t\t\t\t\t\t\t</BaseControl.VisualLabel>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</legend>\n\t\t\t\t\t) }\n\t\t\t\t\t{ canChooseAColor && canChooseAGradient && (\n\t\t\t\t\t\t<TabPanel\n\t\t\t\t\t\t\tclassName=\"block-editor-color-gradient-control__tabs\"\n\t\t\t\t\t\t\ttabs={ TABS_SETTINGS }\n\t\t\t\t\t\t\tinitialTabName={\n\t\t\t\t\t\t\t\tgradientValue\n\t\t\t\t\t\t\t\t\t? TAB_GRADIENT.value\n\t\t\t\t\t\t\t\t\t: !! canChooseAColor && TAB_COLOR.value\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ ( tab ) => renderPanelType( tab.value ) }\n\t\t\t\t\t\t</TabPanel>\n\t\t\t\t\t) }\n\t\t\t\t\t{ ! canChooseAGradient &&\n\t\t\t\t\t\trenderPanelType( TAB_COLOR.value ) }\n\t\t\t\t\t{ ! canChooseAColor &&\n\t\t\t\t\t\trenderPanelType( TAB_GRADIENT.value ) }\n\t\t\t\t</VStack>\n\t\t\t</fieldset>\n\t\t</BaseControl>\n\t);\n}\n\nfunction ColorGradientControlSelect( props ) {\n\tconst colorGradientSettings = {};\n\tcolorGradientSettings.colors = useSetting( 'color.palette' );\n\tcolorGradientSettings.gradients = useSetting( 'color.gradients' );\n\tcolorGradientSettings.disableCustomColors = ! useSetting( 'color.custom' );\n\tcolorGradientSettings.disableCustomGradients = ! useSetting(\n\t\t'color.customGradient'\n\t);\n\n\treturn (\n\t\t<ColorGradientControlInner\n\t\t\t{ ...{ ...colorGradientSettings, ...props } }\n\t\t/>\n\t);\n}\n\nfunction ColorGradientControl( props ) {\n\tif (\n\t\tcolorsAndGradientKeys.every( ( key ) => props.hasOwnProperty( key ) )\n\t) {\n\t\treturn <ColorGradientControlInner { ...props } />;\n\t}\n\treturn <ColorGradientControlSelect { ...props } />;\n}\n\nexport default ColorGradientControl;\n"]}