@wordpress/block-editor 12.22.0 → 12.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1508) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/README.md +8 -0
  3. package/build/autocompleters/block.js.map +1 -1
  4. package/build/autocompleters/link.js.map +1 -1
  5. package/build/components/alignment-control/index.js.map +1 -1
  6. package/build/components/alignment-control/ui.js.map +1 -1
  7. package/build/components/autocomplete/index.js.map +1 -1
  8. package/build/components/block-actions/index.js.map +1 -1
  9. package/build/components/block-alignment-control/constants.js.map +1 -1
  10. package/build/components/block-alignment-control/index.js.map +1 -1
  11. package/build/components/block-alignment-control/ui.js.map +1 -1
  12. package/build/components/block-alignment-control/ui.native.js.map +1 -1
  13. package/build/components/block-alignment-control/use-available-alignments.js.map +1 -1
  14. package/build/components/block-alignment-matrix-control/index.js.map +1 -1
  15. package/build/components/block-bindings-toolbar-indicator/index.js.map +1 -1
  16. package/build/components/block-breadcrumb/index.js.map +1 -1
  17. package/build/components/block-canvas/index.js.map +1 -1
  18. package/build/components/block-caption/index.native.js.map +1 -1
  19. package/build/components/block-card/index.js.map +1 -1
  20. package/build/components/block-compare/block-view.js.map +1 -1
  21. package/build/components/block-compare/index.js.map +1 -1
  22. package/build/components/block-content-overlay/index.js.map +1 -1
  23. package/build/components/block-context/index.js.map +1 -1
  24. package/build/components/block-controls/fill.js.map +1 -1
  25. package/build/components/block-controls/groups.js.map +1 -1
  26. package/build/components/block-controls/hook.js.map +1 -1
  27. package/build/components/block-controls/index.js.map +1 -1
  28. package/build/components/block-controls/slot.js.map +1 -1
  29. package/build/components/block-controls/slot.native.js.map +1 -1
  30. package/build/components/block-controls/use-has-block-controls.js.map +1 -1
  31. package/build/components/block-draggable/draggable-chip.js.map +1 -1
  32. package/build/components/block-draggable/draggable-chip.native.js.map +1 -1
  33. package/build/components/block-draggable/dropping-insertion-point.native.js +1 -1
  34. package/build/components/block-draggable/dropping-insertion-point.native.js.map +1 -1
  35. package/build/components/block-draggable/index.js.map +1 -1
  36. package/build/components/block-draggable/index.native.js +1 -1
  37. package/build/components/block-draggable/index.native.js.map +1 -1
  38. package/build/components/block-draggable/use-scroll-when-dragging.js.map +1 -1
  39. package/build/components/block-draggable/use-scroll-when-dragging.native.js.map +1 -1
  40. package/build/components/block-edit/context.js +2 -1
  41. package/build/components/block-edit/context.js.map +1 -1
  42. package/build/components/block-edit/edit.js.map +1 -1
  43. package/build/components/block-edit/edit.native.js.map +1 -1
  44. package/build/components/block-edit/index.js +4 -2
  45. package/build/components/block-edit/index.js.map +1 -1
  46. package/build/components/block-edit-visually-button/index.js.map +1 -1
  47. package/build/components/block-editing-mode/index.js.map +1 -1
  48. package/build/components/block-full-height-alignment-control/index.js.map +1 -1
  49. package/build/components/block-heading-level-dropdown/heading-level-icon.js.map +1 -1
  50. package/build/components/block-heading-level-dropdown/index.js.map +1 -1
  51. package/build/components/block-heading-level-dropdown/index.native.js.map +1 -1
  52. package/build/components/block-icon/index.js.map +1 -1
  53. package/build/components/block-icon/index.native.js.map +1 -1
  54. package/build/components/block-info-slot-fill/index.js.map +1 -1
  55. package/build/components/block-inspector/index.js +5 -4
  56. package/build/components/block-inspector/index.js.map +1 -1
  57. package/build/components/block-inspector/useBlockInspectorAnimationSettings.js.map +1 -1
  58. package/build/components/block-list/block-crash-boundary.js.map +1 -1
  59. package/build/components/block-list/block-crash-boundary.native.js.map +1 -1
  60. package/build/components/block-list/block-crash-warning.js.map +1 -1
  61. package/build/components/block-list/block-crash-warning.native.js.map +1 -1
  62. package/build/components/block-list/block-html.js.map +1 -1
  63. package/build/components/block-list/block-invalid-warning.js.map +1 -1
  64. package/build/components/block-list/block-invalid-warning.native.js.map +1 -1
  65. package/build/components/block-list/block-list-context.native.js.map +1 -1
  66. package/build/components/block-list/block-list-item-cell.native.js.map +1 -1
  67. package/build/components/block-list/block-list-item.native.js.map +1 -1
  68. package/build/components/block-list/block-outline.native.js.map +1 -1
  69. package/build/components/block-list/block-selection-button.native.js.map +1 -1
  70. package/build/components/block-list/block.js +55 -29
  71. package/build/components/block-list/block.js.map +1 -1
  72. package/build/components/block-list/block.native.js +2 -2
  73. package/build/components/block-list/block.native.js.map +1 -1
  74. package/build/components/block-list/grid-item.native.js.map +1 -1
  75. package/build/components/block-list/index.js +16 -5
  76. package/build/components/block-list/index.js.map +1 -1
  77. package/build/components/block-list/index.native.js.map +1 -1
  78. package/build/components/block-list/insertion-point.native.js.map +1 -1
  79. package/build/components/block-list/layout.js.map +1 -1
  80. package/build/components/block-list/private-block-context.js.map +1 -1
  81. package/build/components/block-list/subdirectory-icon.js.map +1 -1
  82. package/build/components/block-list/use-block-props/index.js +2 -1
  83. package/build/components/block-list/use-block-props/index.js.map +1 -1
  84. package/build/components/block-list/use-block-props/index.native.js.map +1 -1
  85. package/build/components/block-list/use-block-props/use-block-moving-mode-class-names.js.map +1 -1
  86. package/build/components/block-list/use-block-props/use-block-refs.js.map +1 -1
  87. package/build/components/block-list/use-block-props/use-focus-first-element.js +3 -2
  88. package/build/components/block-list/use-block-props/use-focus-first-element.js.map +1 -1
  89. package/build/components/block-list/use-block-props/use-focus-handler.js.map +1 -1
  90. package/build/components/block-list/use-block-props/use-intersection-observer.js.map +1 -1
  91. package/build/components/block-list/use-block-props/use-is-hovered.js.map +1 -1
  92. package/build/components/block-list/use-block-props/use-nav-mode-exit.js.map +1 -1
  93. package/build/components/block-list/use-block-props/use-selected-block-event-handlers.js.map +1 -1
  94. package/build/components/block-list/use-in-between-inserter.js.map +1 -1
  95. package/build/components/block-list/use-scroll-upon-insertion.native.js.map +1 -1
  96. package/build/components/block-list-appender/index.js.map +1 -1
  97. package/build/components/block-list-appender/index.native.js.map +1 -1
  98. package/build/components/block-lock/index.js.map +1 -1
  99. package/build/components/block-lock/menu-item.js.map +1 -1
  100. package/build/components/block-lock/modal.js.map +1 -1
  101. package/build/components/block-lock/toolbar.js.map +1 -1
  102. package/build/components/block-lock/use-block-lock.js.map +1 -1
  103. package/build/components/block-media-update-progress/index.native.js.map +1 -1
  104. package/build/components/block-mover/button.js +4 -1
  105. package/build/components/block-mover/button.js.map +1 -1
  106. package/build/components/block-mover/index.js +5 -1
  107. package/build/components/block-mover/index.js.map +1 -1
  108. package/build/components/block-mover/index.native.js.map +1 -1
  109. package/build/components/block-mover/mover-description.js.map +1 -1
  110. package/build/components/block-mover/mover-description.native.js.map +1 -1
  111. package/build/components/block-navigation/dropdown.js.map +1 -1
  112. package/build/components/block-parent-selector/index.js.map +1 -1
  113. package/build/components/block-pattern-setup/constants.js.map +1 -1
  114. package/build/components/block-pattern-setup/index.js.map +1 -1
  115. package/build/components/block-pattern-setup/setup-toolbar.js.map +1 -1
  116. package/build/components/block-pattern-setup/use-patterns-setup.js.map +1 -1
  117. package/build/components/block-patterns-list/index.js +4 -1
  118. package/build/components/block-patterns-list/index.js.map +1 -1
  119. package/build/components/block-patterns-paging/index.js +8 -4
  120. package/build/components/block-patterns-paging/index.js.map +1 -1
  121. package/build/components/block-popover/cover.js.map +1 -1
  122. package/build/components/block-popover/drop-zone.js.map +1 -1
  123. package/build/components/block-popover/inbetween.js.map +1 -1
  124. package/build/components/block-popover/index.js.map +1 -1
  125. package/build/components/block-popover/use-popover-scroll.js.map +1 -1
  126. package/build/components/block-preview/auto.js.map +1 -1
  127. package/build/components/block-preview/index.js.map +1 -1
  128. package/build/components/block-quick-navigation/index.js.map +1 -1
  129. package/build/components/block-removal-warning-modal/index.js.map +1 -1
  130. package/build/components/block-rename/index.js.map +1 -1
  131. package/build/components/block-rename/is-empty-string.js.map +1 -1
  132. package/build/components/block-rename/modal.js +13 -9
  133. package/build/components/block-rename/modal.js.map +1 -1
  134. package/build/components/block-rename/rename-control.js +3 -1
  135. package/build/components/block-rename/rename-control.js.map +1 -1
  136. package/build/components/block-rename/use-block-rename.js.map +1 -1
  137. package/build/components/block-selection-clearer/index.js.map +1 -1
  138. package/build/components/block-settings/button.native.js.map +1 -1
  139. package/build/components/block-settings/container.native.js.map +1 -1
  140. package/build/components/block-settings/index.native.js +1 -1
  141. package/build/components/block-settings/index.native.js.map +1 -1
  142. package/build/components/block-settings-menu/block-html-convert-button.js.map +1 -1
  143. package/build/components/block-settings-menu/block-mode-toggle.js.map +1 -1
  144. package/build/components/block-settings-menu/block-parent-selector-menu-item.js.map +1 -1
  145. package/build/components/block-settings-menu/block-settings-dropdown.js +7 -3
  146. package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  147. package/build/components/block-settings-menu/block-settings-menu-first-item.js.map +1 -1
  148. package/build/components/block-settings-menu/index.js.map +1 -1
  149. package/build/components/block-settings-menu-controls/index.js.map +1 -1
  150. package/build/components/block-styles/index.js.map +1 -1
  151. package/build/components/block-styles/index.native.js.map +1 -1
  152. package/build/components/block-styles/menu-items.js.map +1 -1
  153. package/build/components/block-styles/preview-panel.js.map +1 -1
  154. package/build/components/block-styles/preview.native.js.map +1 -1
  155. package/build/components/block-styles/use-styles-for-block.js.map +1 -1
  156. package/build/components/block-styles/utils.js.map +1 -1
  157. package/build/components/block-switcher/block-styles-menu.js.map +1 -1
  158. package/build/components/block-switcher/block-transformations-menu.js.map +1 -1
  159. package/build/components/block-switcher/block-transformations-menu.native.js.map +1 -1
  160. package/build/components/block-switcher/block-variation-transformations.js.map +1 -1
  161. package/build/components/block-switcher/index.js +4 -3
  162. package/build/components/block-switcher/index.js.map +1 -1
  163. package/build/components/block-switcher/pattern-transformations-menu.js.map +1 -1
  164. package/build/components/block-switcher/preview-block-popover.js.map +1 -1
  165. package/build/components/block-switcher/use-transformed-patterns.js.map +1 -1
  166. package/build/components/block-switcher/utils.js.map +1 -1
  167. package/build/components/block-title/index.js.map +1 -1
  168. package/build/components/block-title/use-block-display-title.js.map +1 -1
  169. package/build/components/block-toolbar/block-name-context.js.map +1 -1
  170. package/build/components/block-toolbar/block-toolbar-last-item.js.map +1 -1
  171. package/build/components/block-toolbar/block-toolbar-menu.native.js.map +1 -1
  172. package/build/components/block-toolbar/index.js +5 -4
  173. package/build/components/block-toolbar/index.js.map +1 -1
  174. package/build/components/block-toolbar/index.native.js.map +1 -1
  175. package/build/components/block-toolbar/shuffle.js +18 -9
  176. package/build/components/block-toolbar/shuffle.js.map +1 -1
  177. package/build/components/block-toolbar/use-has-block-toolbar.js +6 -3
  178. package/build/components/block-toolbar/use-has-block-toolbar.js.map +1 -1
  179. package/build/components/block-toolbar/utils.js.map +1 -1
  180. package/build/components/block-tools/block-selection-button.js +56 -12
  181. package/build/components/block-tools/block-selection-button.js.map +1 -1
  182. package/build/components/block-tools/block-toolbar-breadcrumb.js.map +1 -1
  183. package/build/components/block-tools/block-toolbar-popover.js.map +1 -1
  184. package/build/components/block-tools/empty-block-inserter.js.map +1 -1
  185. package/build/components/block-tools/index.js +15 -3
  186. package/build/components/block-tools/index.js.map +1 -1
  187. package/build/components/block-tools/insertion-point.js.map +1 -1
  188. package/build/components/block-tools/use-block-toolbar-popover-props.js.map +1 -1
  189. package/build/components/block-tools/use-selected-block-tool-props.js.map +1 -1
  190. package/build/components/block-tools/use-show-block-tools.js +7 -13
  191. package/build/components/block-tools/use-show-block-tools.js.map +1 -1
  192. package/build/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
  193. package/build/components/block-types-list/index.js.map +1 -1
  194. package/build/components/block-types-list/index.native.js.map +1 -1
  195. package/build/components/block-variation-picker/index.js.map +1 -1
  196. package/build/components/block-variation-picker/index.native.js.map +1 -1
  197. package/build/components/block-variation-transforms/index.js +4 -1
  198. package/build/components/block-variation-transforms/index.js.map +1 -1
  199. package/build/components/block-vertical-alignment-control/icons.js.map +1 -1
  200. package/build/components/block-vertical-alignment-control/index.js.map +1 -1
  201. package/build/components/block-vertical-alignment-control/ui.js.map +1 -1
  202. package/build/components/border-radius-control/all-input-control.js.map +1 -1
  203. package/build/components/border-radius-control/index.js.map +1 -1
  204. package/build/components/border-radius-control/input-controls.js.map +1 -1
  205. package/build/components/border-radius-control/linked-button.js.map +1 -1
  206. package/build/components/border-radius-control/utils.js.map +1 -1
  207. package/build/components/button-block-appender/index.js.map +1 -1
  208. package/build/components/button-block-appender/index.native.js +11 -1
  209. package/build/components/button-block-appender/index.native.js.map +1 -1
  210. package/build/components/caption/index.native.js.map +1 -1
  211. package/build/components/child-layout-control/index.js.map +1 -1
  212. package/build/components/color-palette/control.js.map +1 -1
  213. package/build/components/color-palette/index.js.map +1 -1
  214. package/build/components/color-palette/with-color-context.js.map +1 -1
  215. package/build/components/color-style-selector/index.js.map +1 -1
  216. package/build/components/colors/index.js +1 -1
  217. package/build/components/colors/index.js.map +1 -1
  218. package/build/components/colors/utils.js.map +1 -1
  219. package/build/components/colors/with-colors.js.map +1 -1
  220. package/build/components/colors-gradients/control.js.map +1 -1
  221. package/build/components/colors-gradients/dropdown.js.map +1 -1
  222. package/build/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
  223. package/build/components/colors-gradients/panel-color-gradient-settings.native.js.map +1 -1
  224. package/build/components/colors-gradients/use-multiple-origin-colors-and-gradients.js.map +1 -1
  225. package/build/components/contrast-checker/index.js.map +1 -1
  226. package/build/components/contrast-checker/index.native.js.map +1 -1
  227. package/build/components/convert-to-group-buttons/index.js.map +1 -1
  228. package/build/components/convert-to-group-buttons/index.native.js.map +1 -1
  229. package/build/components/convert-to-group-buttons/toolbar.js.map +1 -1
  230. package/build/components/convert-to-group-buttons/use-convert-to-group-button-props.js.map +1 -1
  231. package/build/components/copy-handler/index.js.map +1 -1
  232. package/build/components/date-format-picker/index.js.map +1 -1
  233. package/build/components/default-block-appender/index.js.map +1 -1
  234. package/build/components/default-block-appender/index.native.js.map +1 -1
  235. package/build/components/dimensions-tool/aspect-ratio-tool.js.map +1 -1
  236. package/build/components/dimensions-tool/index.js.map +1 -1
  237. package/build/components/dimensions-tool/scale-tool.js.map +1 -1
  238. package/build/components/dimensions-tool/width-height-tool.js +6 -2
  239. package/build/components/dimensions-tool/width-height-tool.js.map +1 -1
  240. package/build/components/duotone/utils.js.map +1 -1
  241. package/build/components/duotone-control/index.js.map +1 -1
  242. package/build/components/editable-text/index.js.map +1 -1
  243. package/build/components/editor-styles/index.js +2 -1
  244. package/build/components/editor-styles/index.js.map +1 -1
  245. package/build/components/floating-toolbar/index.native.js.map +1 -1
  246. package/build/components/floating-toolbar/nav-up-icon.js.map +1 -1
  247. package/build/components/font-appearance-control/index.js.map +1 -1
  248. package/build/components/font-family/index.js.map +1 -1
  249. package/build/components/font-sizes/fluid-utils.js.map +1 -1
  250. package/build/components/font-sizes/font-size-picker.js.map +1 -1
  251. package/build/components/font-sizes/index.js.map +1 -1
  252. package/build/components/font-sizes/index.native.js.map +1 -1
  253. package/build/components/font-sizes/utils.js.map +1 -1
  254. package/build/components/font-sizes/with-font-sizes.js.map +1 -1
  255. package/build/components/global-styles/advanced-panel.js +9 -2
  256. package/build/components/global-styles/advanced-panel.js.map +1 -1
  257. package/build/components/global-styles/background-panel.js +447 -0
  258. package/build/components/global-styles/background-panel.js.map +1 -0
  259. package/build/components/global-styles/border-panel.js.map +1 -1
  260. package/build/components/global-styles/color-panel.js +2 -1
  261. package/build/components/global-styles/color-panel.js.map +1 -1
  262. package/build/components/global-styles/color-panel.native.js.map +1 -1
  263. package/build/components/global-styles/context.js.map +1 -1
  264. package/build/components/global-styles/dimensions-panel.js.map +1 -1
  265. package/build/components/global-styles/filters-panel.js.map +1 -1
  266. package/build/components/global-styles/get-block-css-selector.js.map +1 -1
  267. package/build/components/global-styles/get-global-styles-changes.js +3 -0
  268. package/build/components/global-styles/get-global-styles-changes.js.map +1 -1
  269. package/build/components/global-styles/hooks.js +1 -1
  270. package/build/components/global-styles/hooks.js.map +1 -1
  271. package/build/components/global-styles/image-settings-panel.js.map +1 -1
  272. package/build/components/global-styles/index.js +14 -1
  273. package/build/components/global-styles/index.js.map +1 -1
  274. package/build/components/global-styles/shadow-panel-components.js.map +1 -1
  275. package/build/components/global-styles/typography-panel.js.map +1 -1
  276. package/build/components/global-styles/typography-utils.js.map +1 -1
  277. package/build/components/global-styles/use-global-styles-output.js +19 -18
  278. package/build/components/global-styles/use-global-styles-output.js.map +1 -1
  279. package/build/components/global-styles/utils.js +2 -1
  280. package/build/components/global-styles/utils.js.map +1 -1
  281. package/build/components/gradients/index.js.map +1 -1
  282. package/build/components/gradients/index.native.js.map +1 -1
  283. package/build/components/gradients/use-gradient.js.map +1 -1
  284. package/build/components/gradients/with-gradient.js.map +1 -1
  285. package/build/components/grid-visualizer/grid-item-resizer.js.map +1 -1
  286. package/build/components/grid-visualizer/grid-visualizer.js.map +1 -1
  287. package/build/components/grid-visualizer/index.js.map +1 -1
  288. package/build/components/grid-visualizer/utils.js.map +1 -1
  289. package/build/components/height-control/index.js.map +1 -1
  290. package/build/components/iframe/get-compatibility-styles.js.map +1 -1
  291. package/build/components/iframe/index.js +14 -10
  292. package/build/components/iframe/index.js.map +1 -1
  293. package/build/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
  294. package/build/components/image-editor/constants.js.map +1 -1
  295. package/build/components/image-editor/context.js.map +1 -1
  296. package/build/components/image-editor/cropper.js +6 -2
  297. package/build/components/image-editor/cropper.js.map +1 -1
  298. package/build/components/image-editor/form-controls.js.map +1 -1
  299. package/build/components/image-editor/index.js +0 -2
  300. package/build/components/image-editor/index.js.map +1 -1
  301. package/build/components/image-editor/rotation-button.js.map +1 -1
  302. package/build/components/image-editor/use-save-image.js.map +1 -1
  303. package/build/components/image-editor/use-transform-image.js.map +1 -1
  304. package/build/components/image-editor/zoom-dropdown.js.map +1 -1
  305. package/build/components/image-link-destinations/index.native.js.map +1 -1
  306. package/build/components/image-size-control/index.js.map +1 -1
  307. package/build/components/image-size-control/use-dimension-handler.js.map +1 -1
  308. package/build/components/index.js +1 -1
  309. package/build/components/index.js.map +1 -1
  310. package/build/components/index.native.js +1 -1
  311. package/build/components/index.native.js.map +1 -1
  312. package/build/components/inner-blocks/button-block-appender.js.map +1 -1
  313. package/build/components/inner-blocks/constants.native.js.map +1 -1
  314. package/build/components/inner-blocks/default-block-appender.js.map +1 -1
  315. package/build/components/inner-blocks/index.js.map +1 -1
  316. package/build/components/inner-blocks/index.native.js.map +1 -1
  317. package/build/components/inner-blocks/use-block-context.js.map +1 -1
  318. package/build/components/inner-blocks/use-inner-block-template-sync.js.map +1 -1
  319. package/build/components/inner-blocks/use-nested-settings-update.js.map +1 -1
  320. package/build/components/inner-blocks/warning-max-depth-exceeded.native.js.map +1 -1
  321. package/build/components/inner-blocks/with-client-id.js.map +1 -1
  322. package/build/components/inserter/block-patterns-explorer/index.js.map +1 -1
  323. package/build/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js.map +1 -1
  324. package/build/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
  325. package/build/components/inserter/block-patterns-tab/index.js +31 -18
  326. package/build/components/inserter/block-patterns-tab/index.js.map +1 -1
  327. package/build/components/inserter/block-patterns-tab/pattern-category-preview-panel.js +2 -19
  328. package/build/components/inserter/block-patterns-tab/pattern-category-preview-panel.js.map +1 -1
  329. package/build/components/inserter/block-patterns-tab/pattern-category-previews.js +1 -3
  330. package/build/components/inserter/block-patterns-tab/pattern-category-previews.js.map +1 -1
  331. package/build/components/inserter/block-patterns-tab/patterns-filter.js.map +1 -1
  332. package/build/components/inserter/block-patterns-tab/use-pattern-categories.js.map +1 -1
  333. package/build/components/inserter/block-patterns-tab/utils.js.map +1 -1
  334. package/build/components/inserter/block-types-tab.js.map +1 -1
  335. package/build/components/inserter/block-types-tab.native.js.map +1 -1
  336. package/build/components/inserter/hooks/use-block-type-impressions.native.js.map +1 -1
  337. package/build/components/inserter/hooks/use-block-types-state.js.map +1 -1
  338. package/build/components/inserter/hooks/use-clipboard-block.native.js.map +1 -1
  339. package/build/components/inserter/hooks/use-insertion-point.js.map +1 -1
  340. package/build/components/inserter/hooks/use-patterns-paging.js.map +1 -1
  341. package/build/components/inserter/hooks/use-patterns-state.js.map +1 -1
  342. package/build/components/inserter/index.js.map +1 -1
  343. package/build/components/inserter/index.native.js.map +1 -1
  344. package/build/components/inserter/library.js +2 -0
  345. package/build/components/inserter/library.js.map +1 -1
  346. package/build/components/inserter/media-tab/hooks.js.map +1 -1
  347. package/build/components/inserter/media-tab/index.js.map +1 -1
  348. package/build/components/inserter/media-tab/media-list.js.map +1 -1
  349. package/build/components/inserter/media-tab/media-panel.js.map +1 -1
  350. package/build/components/inserter/media-tab/media-preview.js.map +1 -1
  351. package/build/components/inserter/media-tab/media-tab.js.map +1 -1
  352. package/build/components/inserter/media-tab/utils.js.map +1 -1
  353. package/build/components/inserter/menu.js +25 -13
  354. package/build/components/inserter/menu.js.map +1 -1
  355. package/build/components/inserter/menu.native.js.map +1 -1
  356. package/build/components/inserter/mobile-tab-navigation.js.map +1 -1
  357. package/build/components/inserter/no-results.js.map +1 -1
  358. package/build/components/inserter/no-results.native.js.map +1 -1
  359. package/build/components/inserter/panel.js.map +1 -1
  360. package/build/components/inserter/preview-panel.js.map +1 -1
  361. package/build/components/inserter/quick-inserter.js.map +1 -1
  362. package/build/components/inserter/reusable-block-rename-hint.js.map +1 -1
  363. package/build/components/inserter/reusable-blocks-tab.native.js.map +1 -1
  364. package/build/components/inserter/search-items.js +36 -15
  365. package/build/components/inserter/search-items.js.map +1 -1
  366. package/build/components/inserter/search-results.js.map +1 -1
  367. package/build/components/inserter/search-results.native.js.map +1 -1
  368. package/build/components/inserter/tabs.js +7 -3
  369. package/build/components/inserter/tabs.js.map +1 -1
  370. package/build/components/inserter/tabs.native.js.map +1 -1
  371. package/build/components/inserter/tips.js.map +1 -1
  372. package/build/components/inserter/utils.native.js.map +1 -1
  373. package/build/components/inserter-button/index.native.js.map +1 -1
  374. package/build/components/inserter-button/sparkles.js.map +1 -1
  375. package/build/components/inserter-draggable-blocks/index.js.map +1 -1
  376. package/build/components/inserter-list-item/index.js.map +1 -1
  377. package/build/components/inserter-listbox/context.js.map +1 -1
  378. package/build/components/inserter-listbox/group.js.map +1 -1
  379. package/build/components/inserter-listbox/index.js.map +1 -1
  380. package/build/components/inserter-listbox/item.js.map +1 -1
  381. package/build/components/inserter-listbox/row.js.map +1 -1
  382. package/build/components/inserter-menu-extension/index.js.map +1 -1
  383. package/build/components/inspector-controls/block-support-slot-container.js.map +1 -1
  384. package/build/components/inspector-controls/block-support-tools-panel.js.map +1 -1
  385. package/build/components/inspector-controls/fill.js.map +1 -1
  386. package/build/components/inspector-controls/fill.native.js.map +1 -1
  387. package/build/components/inspector-controls/groups.js.map +1 -1
  388. package/build/components/inspector-controls/index.js.map +1 -1
  389. package/build/components/inspector-controls/slot.js.map +1 -1
  390. package/build/components/inspector-controls/slot.native.js.map +1 -1
  391. package/build/components/inspector-controls-tabs/advanced-controls-panel.js +1 -1
  392. package/build/components/inspector-controls-tabs/advanced-controls-panel.js.map +1 -1
  393. package/build/components/inspector-controls-tabs/advanced-controls-panel.native.js.map +1 -1
  394. package/build/components/inspector-controls-tabs/index.js.map +1 -1
  395. package/build/components/inspector-controls-tabs/position-controls-panel.js.map +1 -1
  396. package/build/components/inspector-controls-tabs/settings-tab-hint.js.map +1 -1
  397. package/build/components/inspector-controls-tabs/settings-tab.js.map +1 -1
  398. package/build/components/inspector-controls-tabs/styles-tab.js +1 -1
  399. package/build/components/inspector-controls-tabs/styles-tab.js.map +1 -1
  400. package/build/components/inspector-controls-tabs/use-inspector-controls-tabs.js.map +1 -1
  401. package/build/components/inspector-controls-tabs/use-is-list-view-tab-disabled.js.map +1 -1
  402. package/build/components/inspector-controls-tabs/utils.js.map +1 -1
  403. package/build/components/inspector-popover-header/index.js.map +1 -1
  404. package/build/components/justify-content-control/index.js.map +1 -1
  405. package/build/components/justify-content-control/ui.js.map +1 -1
  406. package/build/components/keyboard-shortcuts/index.js +11 -0
  407. package/build/components/keyboard-shortcuts/index.js.map +1 -1
  408. package/build/components/letter-spacing-control/index.js.map +1 -1
  409. package/build/components/line-height-control/index.js.map +1 -1
  410. package/build/components/line-height-control/index.native.js.map +1 -1
  411. package/build/components/line-height-control/utils.js.map +1 -1
  412. package/build/components/link-control/constants.js.map +1 -1
  413. package/build/components/link-control/index.js.map +1 -1
  414. package/build/components/link-control/is-url-like.js.map +1 -1
  415. package/build/components/link-control/link-preview.js.map +1 -1
  416. package/build/components/link-control/search-create-button.js.map +1 -1
  417. package/build/components/link-control/search-input.js.map +1 -1
  418. package/build/components/link-control/search-item.js.map +1 -1
  419. package/build/components/link-control/search-results.js.map +1 -1
  420. package/build/components/link-control/settings-drawer.js.map +1 -1
  421. package/build/components/link-control/settings.js.map +1 -1
  422. package/build/components/link-control/use-create-page.js.map +1 -1
  423. package/build/components/link-control/use-internal-value.js.map +1 -1
  424. package/build/components/link-control/use-rich-url-data.js.map +1 -1
  425. package/build/components/link-control/use-search-handler.js.map +1 -1
  426. package/build/components/link-control/viewer-slot.js.map +1 -1
  427. package/build/components/list-view/appender.js.map +1 -1
  428. package/build/components/list-view/aria-referenced-text.js.map +1 -1
  429. package/build/components/list-view/block-contents.js.map +1 -1
  430. package/build/components/list-view/block-select-button.js +45 -1
  431. package/build/components/list-view/block-select-button.js.map +1 -1
  432. package/build/components/list-view/block.js +1 -1
  433. package/build/components/list-view/block.js.map +1 -1
  434. package/build/components/list-view/branch.js.map +1 -1
  435. package/build/components/list-view/context.js.map +1 -1
  436. package/build/components/list-view/drop-indicator.js.map +1 -1
  437. package/build/components/list-view/expander.js.map +1 -1
  438. package/build/components/list-view/index.js +17 -2
  439. package/build/components/list-view/index.js.map +1 -1
  440. package/build/components/list-view/leaf.js.map +1 -1
  441. package/build/components/list-view/use-block-selection.js.map +1 -1
  442. package/build/components/list-view/use-clipboard-handler.js.map +1 -1
  443. package/build/components/list-view/use-list-view-block-indexes.js.map +1 -1
  444. package/build/components/list-view/use-list-view-client-ids.js.map +1 -1
  445. package/build/components/list-view/use-list-view-collapse-items.js +47 -0
  446. package/build/components/list-view/use-list-view-collapse-items.js.map +1 -0
  447. package/build/components/list-view/use-list-view-drop-zone.js +5 -0
  448. package/build/components/list-view/use-list-view-drop-zone.js.map +1 -1
  449. package/build/components/list-view/use-list-view-expand-selected-item.js.map +1 -1
  450. package/build/components/list-view/use-list-view-images.js.map +1 -1
  451. package/build/components/list-view/use-list-view-scroll-into-view.js.map +1 -1
  452. package/build/components/list-view/utils.js.map +1 -1
  453. package/build/components/media-placeholder/index.js.map +1 -1
  454. package/build/components/media-placeholder/index.native.js.map +1 -1
  455. package/build/components/media-replace-flow/index.js.map +1 -1
  456. package/build/components/media-replace-flow/index.native.js.map +1 -1
  457. package/build/components/media-upload/check.js.map +1 -1
  458. package/build/components/media-upload/constants.native.js.map +1 -1
  459. package/build/components/media-upload/index.js.map +1 -1
  460. package/build/components/media-upload/index.native.js.map +1 -1
  461. package/build/components/media-upload-progress/constants.js.map +1 -1
  462. package/build/components/media-upload-progress/index.native.js.map +1 -1
  463. package/build/components/multi-selection-inspector/index.js.map +1 -1
  464. package/build/components/navigable-toolbar/index.js.map +1 -1
  465. package/build/components/observe-typing/index.js.map +1 -1
  466. package/build/components/panel-color-settings/index.js.map +1 -1
  467. package/build/components/plain-text/index.js.map +1 -1
  468. package/build/components/plain-text/index.native.js.map +1 -1
  469. package/build/components/preview-options/index.js.map +1 -1
  470. package/build/components/provider/block-refs-provider.js.map +1 -1
  471. package/build/components/provider/index.js.map +1 -1
  472. package/build/components/provider/index.native.js.map +1 -1
  473. package/build/components/provider/use-block-sync.js.map +1 -1
  474. package/build/components/provider/with-registry-provider.js.map +1 -1
  475. package/build/components/publish-date-time-picker/index.js.map +1 -1
  476. package/build/components/recursion-provider/index.js +2 -2
  477. package/build/components/recursion-provider/index.js.map +1 -1
  478. package/build/components/resizable-box-popover/index.js.map +1 -1
  479. package/build/components/resolution-tool/index.js.map +1 -1
  480. package/build/components/responsive-block-control/index.js.map +1 -1
  481. package/build/components/responsive-block-control/label.js.map +1 -1
  482. package/build/components/rich-text/content.js +26 -19
  483. package/build/components/rich-text/content.js.map +1 -1
  484. package/build/components/rich-text/embed-handler-picker.native.js.map +1 -1
  485. package/build/components/rich-text/file-paste-handler.native.js.map +1 -1
  486. package/build/components/rich-text/format-edit.js.map +1 -1
  487. package/build/components/rich-text/format-toolbar/index.js.map +1 -1
  488. package/build/components/rich-text/format-toolbar/index.native.js.map +1 -1
  489. package/build/components/rich-text/format-toolbar-container.js.map +1 -1
  490. package/build/components/rich-text/format-toolbar-container.native.js.map +1 -1
  491. package/build/components/rich-text/get-rich-text-values.js.map +1 -1
  492. package/build/components/rich-text/index.js +54 -11
  493. package/build/components/rich-text/index.js.map +1 -1
  494. package/build/components/rich-text/index.native.js +20 -12
  495. package/build/components/rich-text/index.native.js.map +1 -1
  496. package/build/components/rich-text/input-event.js.map +1 -1
  497. package/build/components/rich-text/input-event.native.js.map +1 -1
  498. package/build/components/rich-text/multiline.js.map +1 -1
  499. package/build/components/rich-text/native/format-edit.js.map +1 -1
  500. package/build/components/rich-text/native/get-format-colors.native.js +1 -1
  501. package/build/components/rich-text/native/get-format-colors.native.js.map +1 -1
  502. package/build/components/rich-text/native/index.js.map +1 -1
  503. package/build/components/rich-text/native/index.native.js +2 -2
  504. package/build/components/rich-text/native/index.native.js.map +1 -1
  505. package/build/components/rich-text/native/toolbar-button-with-options.native.js.map +1 -1
  506. package/build/components/rich-text/native/use-format-types.js.map +1 -1
  507. package/build/components/rich-text/prevent-event-discovery.js.map +1 -1
  508. package/build/components/rich-text/remove-browser-shortcuts.native.js.map +1 -1
  509. package/build/components/rich-text/shortcut.js.map +1 -1
  510. package/build/components/rich-text/shortcut.native.js.map +1 -1
  511. package/build/components/rich-text/split-value.js.map +1 -1
  512. package/build/components/rich-text/toolbar-button.js.map +1 -1
  513. package/build/components/rich-text/use-before-input-rules.js.map +1 -1
  514. package/build/components/rich-text/use-delete.js.map +1 -1
  515. package/build/components/rich-text/use-enter.js.map +1 -1
  516. package/build/components/rich-text/use-firefox-compat.js.map +1 -1
  517. package/build/components/rich-text/use-format-types.js.map +1 -1
  518. package/build/components/rich-text/use-input-events.js.map +1 -1
  519. package/build/components/rich-text/use-input-rules.js.map +1 -1
  520. package/build/components/rich-text/use-insert-replacement-text.js.map +1 -1
  521. package/build/components/rich-text/use-mark-persistent.js.map +1 -1
  522. package/build/components/rich-text/use-paste-handler.js.map +1 -1
  523. package/build/components/rich-text/use-remove-browser-shortcuts.js.map +1 -1
  524. package/build/components/rich-text/use-shortcuts.js.map +1 -1
  525. package/build/components/rich-text/use-undo-automatic-change.js +1 -1
  526. package/build/components/rich-text/use-undo-automatic-change.js.map +1 -1
  527. package/build/components/rich-text/utils.js.map +1 -1
  528. package/build/components/rich-text/with-deprecations.js +0 -3
  529. package/build/components/rich-text/with-deprecations.js.map +1 -1
  530. package/build/components/selection-scroll-into-view/index.js.map +1 -1
  531. package/build/components/skip-to-selected-block/index.js.map +1 -1
  532. package/build/components/spacing-sizes-control/hooks/use-spacing-sizes.js.map +1 -1
  533. package/build/components/spacing-sizes-control/index.js.map +1 -1
  534. package/build/components/spacing-sizes-control/input-controls/axial.js.map +1 -1
  535. package/build/components/spacing-sizes-control/input-controls/separated.js.map +1 -1
  536. package/build/components/spacing-sizes-control/input-controls/single.js.map +1 -1
  537. package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
  538. package/build/components/spacing-sizes-control/sides-dropdown/index.js.map +1 -1
  539. package/build/components/spacing-sizes-control/utils.js.map +1 -1
  540. package/build/components/text-decoration-control/index.js.map +1 -1
  541. package/build/components/text-transform-control/index.js.map +1 -1
  542. package/build/components/tool-selector/index.js.map +1 -1
  543. package/build/components/typewriter/index.js.map +1 -1
  544. package/build/components/ungroup-button/index.native.js.map +1 -1
  545. package/build/components/unit-control/index.js.map +1 -1
  546. package/build/components/unsupported-block-details/index.native.js.map +1 -1
  547. package/build/components/url-input/button.js.map +1 -1
  548. package/build/components/url-input/index.js.map +1 -1
  549. package/build/components/url-input/index.native.js.map +1 -1
  550. package/build/components/url-popover/image-url-input-ui.js +50 -36
  551. package/build/components/url-popover/image-url-input-ui.js.map +1 -1
  552. package/build/components/url-popover/index.js.map +1 -1
  553. package/build/components/url-popover/link-editor.js.map +1 -1
  554. package/build/components/url-popover/link-viewer-url.js.map +1 -1
  555. package/build/components/url-popover/link-viewer.js.map +1 -1
  556. package/build/components/use-block-commands/index.js +20 -2
  557. package/build/components/use-block-commands/index.js.map +1 -1
  558. package/build/components/use-block-display-information/index.js +4 -6
  559. package/build/components/use-block-display-information/index.js.map +1 -1
  560. package/build/components/use-block-drop-zone/index.js.map +1 -1
  561. package/build/components/use-block-drop-zone/index.native.js.map +1 -1
  562. package/build/components/use-flash-editable-blocks/index.js.map +1 -1
  563. package/build/components/use-moving-animation/index.js.map +1 -1
  564. package/build/components/use-on-block-drop/index.js.map +1 -1
  565. package/build/components/use-on-block-drop/index.native.js.map +1 -1
  566. package/build/components/use-on-block-drop/types.js.map +1 -1
  567. package/build/components/use-paste-styles/index.js +1 -0
  568. package/build/components/use-paste-styles/index.js.map +1 -1
  569. package/build/components/use-resize-canvas/index.js.map +1 -1
  570. package/build/components/use-settings/index.js.map +1 -1
  571. package/build/components/use-unsupported-block-editor/index.native.js.map +1 -1
  572. package/build/components/video-player/gridicon-play.native.js.map +1 -1
  573. package/build/components/video-player/index.native.js.map +1 -1
  574. package/build/components/warning/index.js.map +1 -1
  575. package/build/components/warning/index.native.js.map +1 -1
  576. package/build/components/writing-flow/index.js.map +1 -1
  577. package/build/components/writing-flow/use-arrow-nav.js.map +1 -1
  578. package/build/components/writing-flow/use-click-selection.js.map +1 -1
  579. package/build/components/writing-flow/use-clipboard-handler.js.map +1 -1
  580. package/build/components/writing-flow/use-drag-selection.js.map +1 -1
  581. package/build/components/writing-flow/use-input.js.map +1 -1
  582. package/build/components/writing-flow/use-multi-selection.js.map +1 -1
  583. package/build/components/writing-flow/use-select-all.js.map +1 -1
  584. package/build/components/writing-flow/use-selection-observer.js.map +1 -1
  585. package/build/components/writing-flow/use-tab-nav.js.map +1 -1
  586. package/build/components/writing-flow/utils.js.map +1 -1
  587. package/build/components/writing-mode-control/index.js.map +1 -1
  588. package/build/elements/index.js.map +1 -1
  589. package/build/hooks/align.js.map +1 -1
  590. package/build/hooks/align.native.js +1 -1
  591. package/build/hooks/align.native.js.map +1 -1
  592. package/build/hooks/anchor.js +2 -2
  593. package/build/hooks/anchor.js.map +1 -1
  594. package/build/hooks/aria-label.js.map +1 -1
  595. package/build/hooks/background.js +70 -424
  596. package/build/hooks/background.js.map +1 -1
  597. package/build/hooks/block-hooks.js.map +1 -1
  598. package/build/hooks/block-renaming.js +0 -37
  599. package/build/hooks/block-renaming.js.map +1 -1
  600. package/build/hooks/border.js.map +1 -1
  601. package/build/hooks/color.js +1 -1
  602. package/build/hooks/color.js.map +1 -1
  603. package/build/hooks/compat.js.map +1 -1
  604. package/build/hooks/content-lock-ui.js +5 -5
  605. package/build/hooks/content-lock-ui.js.map +1 -1
  606. package/build/hooks/contrast-checker.js.map +1 -1
  607. package/build/hooks/custom-class-name.js.map +1 -1
  608. package/build/hooks/custom-class-name.native.js.map +1 -1
  609. package/build/hooks/dimensions.js.map +1 -1
  610. package/build/hooks/duotone.js.map +1 -1
  611. package/build/hooks/font-family.js.map +1 -1
  612. package/build/hooks/font-size.js.map +1 -1
  613. package/build/hooks/gap.js.map +1 -1
  614. package/build/hooks/generated-class-name.js.map +1 -1
  615. package/build/hooks/index.js +13 -5
  616. package/build/hooks/index.js.map +1 -1
  617. package/build/hooks/index.native.js.map +1 -1
  618. package/build/hooks/layout-child.js.map +1 -1
  619. package/build/hooks/layout.js +38 -19
  620. package/build/hooks/layout.js.map +1 -1
  621. package/build/hooks/layout.native.js.map +1 -1
  622. package/build/hooks/line-height.js.map +1 -1
  623. package/build/hooks/lock.js.map +1 -1
  624. package/build/hooks/metadata.js.map +1 -1
  625. package/build/hooks/position.js.map +1 -1
  626. package/build/hooks/settings.js.map +1 -1
  627. package/build/hooks/spacing-visualizer.js.map +1 -1
  628. package/build/hooks/style.js.map +1 -1
  629. package/build/hooks/supports.js +27 -4
  630. package/build/hooks/supports.js.map +1 -1
  631. package/build/hooks/text-align.js +156 -0
  632. package/build/hooks/text-align.js.map +1 -0
  633. package/build/hooks/typography.js +3 -2
  634. package/build/hooks/typography.js.map +1 -1
  635. package/build/hooks/typography.native.js.map +1 -1
  636. package/build/hooks/use-bindings-attributes.js +66 -129
  637. package/build/hooks/use-bindings-attributes.js.map +1 -1
  638. package/build/hooks/use-border-props.js.map +1 -1
  639. package/build/hooks/use-cached-truthy.js.map +1 -1
  640. package/build/hooks/use-color-props.js.map +1 -1
  641. package/build/hooks/use-editor-wrapper-styles.native.js.map +1 -1
  642. package/build/hooks/use-shadow-props.js.map +1 -1
  643. package/build/hooks/use-spacing-props.js.map +1 -1
  644. package/build/hooks/use-typography-props.js +2 -1
  645. package/build/hooks/use-typography-props.js.map +1 -1
  646. package/build/hooks/use-zoom-out.js +54 -0
  647. package/build/hooks/use-zoom-out.js.map +1 -0
  648. package/build/hooks/utils.js +29 -5
  649. package/build/hooks/utils.js.map +1 -1
  650. package/build/index.js +7 -0
  651. package/build/index.js.map +1 -1
  652. package/build/index.native.js.map +1 -1
  653. package/build/layouts/constrained.js.map +1 -1
  654. package/build/layouts/definitions.js +8 -6
  655. package/build/layouts/definitions.js.map +1 -1
  656. package/build/layouts/flex.js.map +1 -1
  657. package/build/layouts/flow.js.map +1 -1
  658. package/build/layouts/grid.js +52 -9
  659. package/build/layouts/grid.js.map +1 -1
  660. package/build/layouts/index.js.map +1 -1
  661. package/build/layouts/utils.js.map +1 -1
  662. package/build/lock-unlock.js.map +1 -1
  663. package/build/private-apis.js +7 -2
  664. package/build/private-apis.js.map +1 -1
  665. package/build/private-apis.native.js +4 -2
  666. package/build/private-apis.native.js.map +1 -1
  667. package/build/store/actions.js +18 -4
  668. package/build/store/actions.js.map +1 -1
  669. package/build/store/array.js.map +1 -1
  670. package/build/store/constants.js.map +1 -1
  671. package/build/store/defaults.js.map +1 -1
  672. package/build/store/defaults.native.js.map +1 -1
  673. package/build/store/get-block-settings.js.map +1 -1
  674. package/build/store/index.js +1 -1
  675. package/build/store/index.js.map +1 -1
  676. package/build/store/private-actions.js +18 -2
  677. package/build/store/private-actions.js.map +1 -1
  678. package/build/store/private-keys.js +2 -1
  679. package/build/store/private-keys.js.map +1 -1
  680. package/build/store/private-selectors.js +113 -36
  681. package/build/store/private-selectors.js.map +1 -1
  682. package/build/store/reducer.js +22 -0
  683. package/build/store/reducer.js.map +1 -1
  684. package/build/store/selectors.js +152 -109
  685. package/build/store/selectors.js.map +1 -1
  686. package/build/store/undo-ignore.js.map +1 -1
  687. package/build/store/utils.js +7 -1
  688. package/build/store/utils.js.map +1 -1
  689. package/build/utils/dom.js.map +1 -1
  690. package/build/utils/get-px-from-css-unit.js.map +1 -1
  691. package/build/utils/index.js.map +1 -1
  692. package/build/utils/math.js.map +1 -1
  693. package/build/utils/object.js.map +1 -1
  694. package/build/utils/order-inserter-block-items.js.map +1 -1
  695. package/build/utils/pasting.js.map +1 -1
  696. package/build/utils/selection.js.map +1 -1
  697. package/build/utils/sorting.js.map +1 -1
  698. package/build/utils/transform-styles/index.js +3 -2
  699. package/build/utils/transform-styles/index.js.map +1 -1
  700. package/build/utils/use-notify-copy.js.map +1 -1
  701. package/build-module/autocompleters/block.js.map +1 -1
  702. package/build-module/autocompleters/link.js.map +1 -1
  703. package/build-module/components/alignment-control/index.js.map +1 -1
  704. package/build-module/components/alignment-control/ui.js.map +1 -1
  705. package/build-module/components/autocomplete/index.js.map +1 -1
  706. package/build-module/components/block-actions/index.js.map +1 -1
  707. package/build-module/components/block-alignment-control/constants.js.map +1 -1
  708. package/build-module/components/block-alignment-control/index.js.map +1 -1
  709. package/build-module/components/block-alignment-control/ui.js.map +1 -1
  710. package/build-module/components/block-alignment-control/ui.native.js.map +1 -1
  711. package/build-module/components/block-alignment-control/use-available-alignments.js.map +1 -1
  712. package/build-module/components/block-alignment-matrix-control/index.js.map +1 -1
  713. package/build-module/components/block-bindings-toolbar-indicator/index.js.map +1 -1
  714. package/build-module/components/block-breadcrumb/index.js.map +1 -1
  715. package/build-module/components/block-canvas/index.js.map +1 -1
  716. package/build-module/components/block-caption/index.native.js.map +1 -1
  717. package/build-module/components/block-card/index.js.map +1 -1
  718. package/build-module/components/block-compare/block-view.js.map +1 -1
  719. package/build-module/components/block-compare/index.js.map +1 -1
  720. package/build-module/components/block-content-overlay/index.js.map +1 -1
  721. package/build-module/components/block-context/index.js.map +1 -1
  722. package/build-module/components/block-controls/fill.js.map +1 -1
  723. package/build-module/components/block-controls/groups.js.map +1 -1
  724. package/build-module/components/block-controls/hook.js.map +1 -1
  725. package/build-module/components/block-controls/index.js.map +1 -1
  726. package/build-module/components/block-controls/slot.js.map +1 -1
  727. package/build-module/components/block-controls/slot.native.js.map +1 -1
  728. package/build-module/components/block-controls/use-has-block-controls.js.map +1 -1
  729. package/build-module/components/block-draggable/draggable-chip.js.map +1 -1
  730. package/build-module/components/block-draggable/draggable-chip.native.js.map +1 -1
  731. package/build-module/components/block-draggable/dropping-insertion-point.native.js.map +1 -1
  732. package/build-module/components/block-draggable/index.js.map +1 -1
  733. package/build-module/components/block-draggable/index.native.js.map +1 -1
  734. package/build-module/components/block-draggable/use-scroll-when-dragging.js.map +1 -1
  735. package/build-module/components/block-draggable/use-scroll-when-dragging.native.js.map +1 -1
  736. package/build-module/components/block-edit/context.js +1 -0
  737. package/build-module/components/block-edit/context.js.map +1 -1
  738. package/build-module/components/block-edit/edit.js.map +1 -1
  739. package/build-module/components/block-edit/edit.native.js.map +1 -1
  740. package/build-module/components/block-edit/index.js +5 -3
  741. package/build-module/components/block-edit/index.js.map +1 -1
  742. package/build-module/components/block-edit-visually-button/index.js.map +1 -1
  743. package/build-module/components/block-editing-mode/index.js.map +1 -1
  744. package/build-module/components/block-full-height-alignment-control/index.js.map +1 -1
  745. package/build-module/components/block-heading-level-dropdown/heading-level-icon.js.map +1 -1
  746. package/build-module/components/block-heading-level-dropdown/index.js.map +1 -1
  747. package/build-module/components/block-heading-level-dropdown/index.native.js.map +1 -1
  748. package/build-module/components/block-icon/index.js.map +1 -1
  749. package/build-module/components/block-icon/index.native.js.map +1 -1
  750. package/build-module/components/block-info-slot-fill/index.js.map +1 -1
  751. package/build-module/components/block-inspector/index.js +5 -4
  752. package/build-module/components/block-inspector/index.js.map +1 -1
  753. package/build-module/components/block-inspector/useBlockInspectorAnimationSettings.js.map +1 -1
  754. package/build-module/components/block-list/block-crash-boundary.js.map +1 -1
  755. package/build-module/components/block-list/block-crash-boundary.native.js.map +1 -1
  756. package/build-module/components/block-list/block-crash-warning.js.map +1 -1
  757. package/build-module/components/block-list/block-crash-warning.native.js.map +1 -1
  758. package/build-module/components/block-list/block-html.js.map +1 -1
  759. package/build-module/components/block-list/block-invalid-warning.js.map +1 -1
  760. package/build-module/components/block-list/block-invalid-warning.native.js.map +1 -1
  761. package/build-module/components/block-list/block-list-context.native.js.map +1 -1
  762. package/build-module/components/block-list/block-list-item-cell.native.js.map +1 -1
  763. package/build-module/components/block-list/block-list-item.native.js.map +1 -1
  764. package/build-module/components/block-list/block-outline.native.js.map +1 -1
  765. package/build-module/components/block-list/block-selection-button.native.js.map +1 -1
  766. package/build-module/components/block-list/block.js +55 -29
  767. package/build-module/components/block-list/block.js.map +1 -1
  768. package/build-module/components/block-list/block.native.js +2 -2
  769. package/build-module/components/block-list/block.native.js.map +1 -1
  770. package/build-module/components/block-list/grid-item.native.js.map +1 -1
  771. package/build-module/components/block-list/index.js +16 -5
  772. package/build-module/components/block-list/index.js.map +1 -1
  773. package/build-module/components/block-list/index.native.js.map +1 -1
  774. package/build-module/components/block-list/insertion-point.native.js.map +1 -1
  775. package/build-module/components/block-list/layout.js.map +1 -1
  776. package/build-module/components/block-list/private-block-context.js.map +1 -1
  777. package/build-module/components/block-list/subdirectory-icon.js.map +1 -1
  778. package/build-module/components/block-list/use-block-props/index.js +2 -1
  779. package/build-module/components/block-list/use-block-props/index.js.map +1 -1
  780. package/build-module/components/block-list/use-block-props/index.native.js.map +1 -1
  781. package/build-module/components/block-list/use-block-props/use-block-moving-mode-class-names.js.map +1 -1
  782. package/build-module/components/block-list/use-block-props/use-block-refs.js.map +1 -1
  783. package/build-module/components/block-list/use-block-props/use-focus-first-element.js +3 -2
  784. package/build-module/components/block-list/use-block-props/use-focus-first-element.js.map +1 -1
  785. package/build-module/components/block-list/use-block-props/use-focus-handler.js.map +1 -1
  786. package/build-module/components/block-list/use-block-props/use-intersection-observer.js.map +1 -1
  787. package/build-module/components/block-list/use-block-props/use-is-hovered.js.map +1 -1
  788. package/build-module/components/block-list/use-block-props/use-nav-mode-exit.js.map +1 -1
  789. package/build-module/components/block-list/use-block-props/use-selected-block-event-handlers.js.map +1 -1
  790. package/build-module/components/block-list/use-in-between-inserter.js.map +1 -1
  791. package/build-module/components/block-list/use-scroll-upon-insertion.native.js.map +1 -1
  792. package/build-module/components/block-list-appender/index.js.map +1 -1
  793. package/build-module/components/block-list-appender/index.native.js.map +1 -1
  794. package/build-module/components/block-lock/index.js.map +1 -1
  795. package/build-module/components/block-lock/menu-item.js.map +1 -1
  796. package/build-module/components/block-lock/modal.js.map +1 -1
  797. package/build-module/components/block-lock/toolbar.js.map +1 -1
  798. package/build-module/components/block-lock/use-block-lock.js.map +1 -1
  799. package/build-module/components/block-media-update-progress/index.native.js.map +1 -1
  800. package/build-module/components/block-mover/button.js +4 -1
  801. package/build-module/components/block-mover/button.js.map +1 -1
  802. package/build-module/components/block-mover/index.js +5 -1
  803. package/build-module/components/block-mover/index.js.map +1 -1
  804. package/build-module/components/block-mover/index.native.js.map +1 -1
  805. package/build-module/components/block-mover/mover-description.js.map +1 -1
  806. package/build-module/components/block-mover/mover-description.native.js.map +1 -1
  807. package/build-module/components/block-navigation/dropdown.js.map +1 -1
  808. package/build-module/components/block-parent-selector/index.js.map +1 -1
  809. package/build-module/components/block-pattern-setup/constants.js.map +1 -1
  810. package/build-module/components/block-pattern-setup/index.js.map +1 -1
  811. package/build-module/components/block-pattern-setup/setup-toolbar.js.map +1 -1
  812. package/build-module/components/block-pattern-setup/use-patterns-setup.js.map +1 -1
  813. package/build-module/components/block-patterns-list/index.js +4 -1
  814. package/build-module/components/block-patterns-list/index.js.map +1 -1
  815. package/build-module/components/block-patterns-paging/index.js +8 -4
  816. package/build-module/components/block-patterns-paging/index.js.map +1 -1
  817. package/build-module/components/block-popover/cover.js.map +1 -1
  818. package/build-module/components/block-popover/drop-zone.js.map +1 -1
  819. package/build-module/components/block-popover/inbetween.js.map +1 -1
  820. package/build-module/components/block-popover/index.js.map +1 -1
  821. package/build-module/components/block-popover/use-popover-scroll.js.map +1 -1
  822. package/build-module/components/block-preview/auto.js.map +1 -1
  823. package/build-module/components/block-preview/index.js.map +1 -1
  824. package/build-module/components/block-quick-navigation/index.js.map +1 -1
  825. package/build-module/components/block-removal-warning-modal/index.js.map +1 -1
  826. package/build-module/components/block-rename/index.js.map +1 -1
  827. package/build-module/components/block-rename/is-empty-string.js.map +1 -1
  828. package/build-module/components/block-rename/modal.js +14 -10
  829. package/build-module/components/block-rename/modal.js.map +1 -1
  830. package/build-module/components/block-rename/rename-control.js +3 -1
  831. package/build-module/components/block-rename/rename-control.js.map +1 -1
  832. package/build-module/components/block-rename/use-block-rename.js.map +1 -1
  833. package/build-module/components/block-selection-clearer/index.js.map +1 -1
  834. package/build-module/components/block-settings/button.native.js.map +1 -1
  835. package/build-module/components/block-settings/container.native.js.map +1 -1
  836. package/build-module/components/block-settings/index.native.js.map +1 -1
  837. package/build-module/components/block-settings-menu/block-html-convert-button.js.map +1 -1
  838. package/build-module/components/block-settings-menu/block-mode-toggle.js.map +1 -1
  839. package/build-module/components/block-settings-menu/block-parent-selector-menu-item.js.map +1 -1
  840. package/build-module/components/block-settings-menu/block-settings-dropdown.js +7 -3
  841. package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  842. package/build-module/components/block-settings-menu/block-settings-menu-first-item.js.map +1 -1
  843. package/build-module/components/block-settings-menu/index.js.map +1 -1
  844. package/build-module/components/block-settings-menu-controls/index.js.map +1 -1
  845. package/build-module/components/block-styles/index.js.map +1 -1
  846. package/build-module/components/block-styles/index.native.js.map +1 -1
  847. package/build-module/components/block-styles/menu-items.js.map +1 -1
  848. package/build-module/components/block-styles/preview-panel.js.map +1 -1
  849. package/build-module/components/block-styles/preview.native.js.map +1 -1
  850. package/build-module/components/block-styles/use-styles-for-block.js.map +1 -1
  851. package/build-module/components/block-styles/utils.js.map +1 -1
  852. package/build-module/components/block-switcher/block-styles-menu.js.map +1 -1
  853. package/build-module/components/block-switcher/block-transformations-menu.js.map +1 -1
  854. package/build-module/components/block-switcher/block-transformations-menu.native.js.map +1 -1
  855. package/build-module/components/block-switcher/block-variation-transformations.js.map +1 -1
  856. package/build-module/components/block-switcher/index.js +4 -3
  857. package/build-module/components/block-switcher/index.js.map +1 -1
  858. package/build-module/components/block-switcher/pattern-transformations-menu.js.map +1 -1
  859. package/build-module/components/block-switcher/preview-block-popover.js.map +1 -1
  860. package/build-module/components/block-switcher/use-transformed-patterns.js.map +1 -1
  861. package/build-module/components/block-switcher/utils.js.map +1 -1
  862. package/build-module/components/block-title/index.js.map +1 -1
  863. package/build-module/components/block-title/use-block-display-title.js.map +1 -1
  864. package/build-module/components/block-toolbar/block-name-context.js.map +1 -1
  865. package/build-module/components/block-toolbar/block-toolbar-last-item.js.map +1 -1
  866. package/build-module/components/block-toolbar/block-toolbar-menu.native.js.map +1 -1
  867. package/build-module/components/block-toolbar/index.js +5 -4
  868. package/build-module/components/block-toolbar/index.js.map +1 -1
  869. package/build-module/components/block-toolbar/index.native.js.map +1 -1
  870. package/build-module/components/block-toolbar/shuffle.js +18 -9
  871. package/build-module/components/block-toolbar/shuffle.js.map +1 -1
  872. package/build-module/components/block-toolbar/use-has-block-toolbar.js +6 -3
  873. package/build-module/components/block-toolbar/use-has-block-toolbar.js.map +1 -1
  874. package/build-module/components/block-toolbar/utils.js.map +1 -1
  875. package/build-module/components/block-tools/block-selection-button.js +58 -14
  876. package/build-module/components/block-tools/block-selection-button.js.map +1 -1
  877. package/build-module/components/block-tools/block-toolbar-breadcrumb.js.map +1 -1
  878. package/build-module/components/block-tools/block-toolbar-popover.js.map +1 -1
  879. package/build-module/components/block-tools/empty-block-inserter.js.map +1 -1
  880. package/build-module/components/block-tools/index.js +14 -2
  881. package/build-module/components/block-tools/index.js.map +1 -1
  882. package/build-module/components/block-tools/insertion-point.js.map +1 -1
  883. package/build-module/components/block-tools/use-block-toolbar-popover-props.js.map +1 -1
  884. package/build-module/components/block-tools/use-selected-block-tool-props.js.map +1 -1
  885. package/build-module/components/block-tools/use-show-block-tools.js +7 -13
  886. package/build-module/components/block-tools/use-show-block-tools.js.map +1 -1
  887. package/build-module/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
  888. package/build-module/components/block-types-list/index.js.map +1 -1
  889. package/build-module/components/block-types-list/index.native.js.map +1 -1
  890. package/build-module/components/block-variation-picker/index.js.map +1 -1
  891. package/build-module/components/block-variation-picker/index.native.js.map +1 -1
  892. package/build-module/components/block-variation-transforms/index.js +4 -1
  893. package/build-module/components/block-variation-transforms/index.js.map +1 -1
  894. package/build-module/components/block-vertical-alignment-control/icons.js.map +1 -1
  895. package/build-module/components/block-vertical-alignment-control/index.js.map +1 -1
  896. package/build-module/components/block-vertical-alignment-control/ui.js.map +1 -1
  897. package/build-module/components/border-radius-control/all-input-control.js.map +1 -1
  898. package/build-module/components/border-radius-control/index.js.map +1 -1
  899. package/build-module/components/border-radius-control/input-controls.js.map +1 -1
  900. package/build-module/components/border-radius-control/linked-button.js.map +1 -1
  901. package/build-module/components/border-radius-control/utils.js.map +1 -1
  902. package/build-module/components/button-block-appender/index.js.map +1 -1
  903. package/build-module/components/button-block-appender/index.native.js +11 -1
  904. package/build-module/components/button-block-appender/index.native.js.map +1 -1
  905. package/build-module/components/caption/index.native.js.map +1 -1
  906. package/build-module/components/child-layout-control/index.js.map +1 -1
  907. package/build-module/components/color-palette/control.js.map +1 -1
  908. package/build-module/components/color-palette/index.js.map +1 -1
  909. package/build-module/components/color-palette/with-color-context.js.map +1 -1
  910. package/build-module/components/color-style-selector/index.js.map +1 -1
  911. package/build-module/components/colors/index.js.map +1 -1
  912. package/build-module/components/colors/utils.js.map +1 -1
  913. package/build-module/components/colors/with-colors.js.map +1 -1
  914. package/build-module/components/colors-gradients/control.js.map +1 -1
  915. package/build-module/components/colors-gradients/dropdown.js.map +1 -1
  916. package/build-module/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
  917. package/build-module/components/colors-gradients/panel-color-gradient-settings.native.js.map +1 -1
  918. package/build-module/components/colors-gradients/use-multiple-origin-colors-and-gradients.js.map +1 -1
  919. package/build-module/components/contrast-checker/index.js.map +1 -1
  920. package/build-module/components/contrast-checker/index.native.js.map +1 -1
  921. package/build-module/components/convert-to-group-buttons/index.js.map +1 -1
  922. package/build-module/components/convert-to-group-buttons/index.native.js.map +1 -1
  923. package/build-module/components/convert-to-group-buttons/toolbar.js.map +1 -1
  924. package/build-module/components/convert-to-group-buttons/use-convert-to-group-button-props.js.map +1 -1
  925. package/build-module/components/copy-handler/index.js.map +1 -1
  926. package/build-module/components/date-format-picker/index.js.map +1 -1
  927. package/build-module/components/default-block-appender/index.js.map +1 -1
  928. package/build-module/components/default-block-appender/index.native.js.map +1 -1
  929. package/build-module/components/dimensions-tool/aspect-ratio-tool.js.map +1 -1
  930. package/build-module/components/dimensions-tool/index.js.map +1 -1
  931. package/build-module/components/dimensions-tool/scale-tool.js.map +1 -1
  932. package/build-module/components/dimensions-tool/width-height-tool.js.map +1 -1
  933. package/build-module/components/duotone/utils.js.map +1 -1
  934. package/build-module/components/duotone-control/index.js.map +1 -1
  935. package/build-module/components/editable-text/index.js.map +1 -1
  936. package/build-module/components/editor-styles/index.js +3 -2
  937. package/build-module/components/editor-styles/index.js.map +1 -1
  938. package/build-module/components/floating-toolbar/index.native.js.map +1 -1
  939. package/build-module/components/floating-toolbar/nav-up-icon.js.map +1 -1
  940. package/build-module/components/font-appearance-control/index.js.map +1 -1
  941. package/build-module/components/font-family/index.js.map +1 -1
  942. package/build-module/components/font-sizes/fluid-utils.js.map +1 -1
  943. package/build-module/components/font-sizes/font-size-picker.js.map +1 -1
  944. package/build-module/components/font-sizes/index.js.map +1 -1
  945. package/build-module/components/font-sizes/index.native.js.map +1 -1
  946. package/build-module/components/font-sizes/utils.js.map +1 -1
  947. package/build-module/components/font-sizes/with-font-sizes.js.map +1 -1
  948. package/build-module/components/global-styles/advanced-panel.js +9 -2
  949. package/build-module/components/global-styles/advanced-panel.js.map +1 -1
  950. package/build-module/components/global-styles/background-panel.js +433 -0
  951. package/build-module/components/global-styles/background-panel.js.map +1 -0
  952. package/build-module/components/global-styles/border-panel.js.map +1 -1
  953. package/build-module/components/global-styles/color-panel.js +2 -1
  954. package/build-module/components/global-styles/color-panel.js.map +1 -1
  955. package/build-module/components/global-styles/color-panel.native.js.map +1 -1
  956. package/build-module/components/global-styles/context.js.map +1 -1
  957. package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
  958. package/build-module/components/global-styles/filters-panel.js.map +1 -1
  959. package/build-module/components/global-styles/get-block-css-selector.js.map +1 -1
  960. package/build-module/components/global-styles/get-global-styles-changes.js +3 -0
  961. package/build-module/components/global-styles/get-global-styles-changes.js.map +1 -1
  962. package/build-module/components/global-styles/hooks.js +1 -1
  963. package/build-module/components/global-styles/hooks.js.map +1 -1
  964. package/build-module/components/global-styles/image-settings-panel.js.map +1 -1
  965. package/build-module/components/global-styles/index.js +1 -0
  966. package/build-module/components/global-styles/index.js.map +1 -1
  967. package/build-module/components/global-styles/shadow-panel-components.js.map +1 -1
  968. package/build-module/components/global-styles/typography-panel.js.map +1 -1
  969. package/build-module/components/global-styles/typography-utils.js.map +1 -1
  970. package/build-module/components/global-styles/use-global-styles-output.js +20 -19
  971. package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
  972. package/build-module/components/global-styles/utils.js +1 -0
  973. package/build-module/components/global-styles/utils.js.map +1 -1
  974. package/build-module/components/gradients/index.js.map +1 -1
  975. package/build-module/components/gradients/index.native.js.map +1 -1
  976. package/build-module/components/gradients/use-gradient.js.map +1 -1
  977. package/build-module/components/gradients/with-gradient.js.map +1 -1
  978. package/build-module/components/grid-visualizer/grid-item-resizer.js.map +1 -1
  979. package/build-module/components/grid-visualizer/grid-visualizer.js.map +1 -1
  980. package/build-module/components/grid-visualizer/index.js.map +1 -1
  981. package/build-module/components/grid-visualizer/utils.js.map +1 -1
  982. package/build-module/components/height-control/index.js.map +1 -1
  983. package/build-module/components/iframe/get-compatibility-styles.js.map +1 -1
  984. package/build-module/components/iframe/index.js +14 -10
  985. package/build-module/components/iframe/index.js.map +1 -1
  986. package/build-module/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
  987. package/build-module/components/image-editor/constants.js.map +1 -1
  988. package/build-module/components/image-editor/context.js.map +1 -1
  989. package/build-module/components/image-editor/cropper.js +7 -3
  990. package/build-module/components/image-editor/cropper.js.map +1 -1
  991. package/build-module/components/image-editor/form-controls.js.map +1 -1
  992. package/build-module/components/image-editor/index.js +0 -2
  993. package/build-module/components/image-editor/index.js.map +1 -1
  994. package/build-module/components/image-editor/rotation-button.js.map +1 -1
  995. package/build-module/components/image-editor/use-save-image.js.map +1 -1
  996. package/build-module/components/image-editor/use-transform-image.js.map +1 -1
  997. package/build-module/components/image-editor/zoom-dropdown.js.map +1 -1
  998. package/build-module/components/image-link-destinations/index.native.js.map +1 -1
  999. package/build-module/components/image-size-control/index.js.map +1 -1
  1000. package/build-module/components/image-size-control/use-dimension-handler.js.map +1 -1
  1001. package/build-module/components/index.js.map +1 -1
  1002. package/build-module/components/index.native.js.map +1 -1
  1003. package/build-module/components/inner-blocks/button-block-appender.js.map +1 -1
  1004. package/build-module/components/inner-blocks/constants.native.js.map +1 -1
  1005. package/build-module/components/inner-blocks/default-block-appender.js.map +1 -1
  1006. package/build-module/components/inner-blocks/index.js.map +1 -1
  1007. package/build-module/components/inner-blocks/index.native.js.map +1 -1
  1008. package/build-module/components/inner-blocks/use-block-context.js.map +1 -1
  1009. package/build-module/components/inner-blocks/use-inner-block-template-sync.js.map +1 -1
  1010. package/build-module/components/inner-blocks/use-nested-settings-update.js.map +1 -1
  1011. package/build-module/components/inner-blocks/warning-max-depth-exceeded.native.js.map +1 -1
  1012. package/build-module/components/inner-blocks/with-client-id.js.map +1 -1
  1013. package/build-module/components/inserter/block-patterns-explorer/index.js.map +1 -1
  1014. package/build-module/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js.map +1 -1
  1015. package/build-module/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
  1016. package/build-module/components/inserter/block-patterns-tab/index.js +32 -19
  1017. package/build-module/components/inserter/block-patterns-tab/index.js.map +1 -1
  1018. package/build-module/components/inserter/block-patterns-tab/pattern-category-preview-panel.js +2 -19
  1019. package/build-module/components/inserter/block-patterns-tab/pattern-category-preview-panel.js.map +1 -1
  1020. package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js +2 -4
  1021. package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js.map +1 -1
  1022. package/build-module/components/inserter/block-patterns-tab/patterns-filter.js.map +1 -1
  1023. package/build-module/components/inserter/block-patterns-tab/use-pattern-categories.js.map +1 -1
  1024. package/build-module/components/inserter/block-patterns-tab/utils.js.map +1 -1
  1025. package/build-module/components/inserter/block-types-tab.js.map +1 -1
  1026. package/build-module/components/inserter/block-types-tab.native.js.map +1 -1
  1027. package/build-module/components/inserter/hooks/use-block-type-impressions.native.js.map +1 -1
  1028. package/build-module/components/inserter/hooks/use-block-types-state.js.map +1 -1
  1029. package/build-module/components/inserter/hooks/use-clipboard-block.native.js.map +1 -1
  1030. package/build-module/components/inserter/hooks/use-insertion-point.js.map +1 -1
  1031. package/build-module/components/inserter/hooks/use-patterns-paging.js.map +1 -1
  1032. package/build-module/components/inserter/hooks/use-patterns-state.js.map +1 -1
  1033. package/build-module/components/inserter/index.js.map +1 -1
  1034. package/build-module/components/inserter/index.native.js.map +1 -1
  1035. package/build-module/components/inserter/library.js +2 -0
  1036. package/build-module/components/inserter/library.js.map +1 -1
  1037. package/build-module/components/inserter/media-tab/hooks.js.map +1 -1
  1038. package/build-module/components/inserter/media-tab/index.js.map +1 -1
  1039. package/build-module/components/inserter/media-tab/media-list.js.map +1 -1
  1040. package/build-module/components/inserter/media-tab/media-panel.js.map +1 -1
  1041. package/build-module/components/inserter/media-tab/media-preview.js.map +1 -1
  1042. package/build-module/components/inserter/media-tab/media-tab.js.map +1 -1
  1043. package/build-module/components/inserter/media-tab/utils.js.map +1 -1
  1044. package/build-module/components/inserter/menu.js +25 -13
  1045. package/build-module/components/inserter/menu.js.map +1 -1
  1046. package/build-module/components/inserter/menu.native.js.map +1 -1
  1047. package/build-module/components/inserter/mobile-tab-navigation.js.map +1 -1
  1048. package/build-module/components/inserter/no-results.js.map +1 -1
  1049. package/build-module/components/inserter/no-results.native.js.map +1 -1
  1050. package/build-module/components/inserter/panel.js.map +1 -1
  1051. package/build-module/components/inserter/preview-panel.js.map +1 -1
  1052. package/build-module/components/inserter/quick-inserter.js.map +1 -1
  1053. package/build-module/components/inserter/reusable-block-rename-hint.js.map +1 -1
  1054. package/build-module/components/inserter/reusable-blocks-tab.native.js.map +1 -1
  1055. package/build-module/components/inserter/search-items.js +33 -15
  1056. package/build-module/components/inserter/search-items.js.map +1 -1
  1057. package/build-module/components/inserter/search-results.js.map +1 -1
  1058. package/build-module/components/inserter/search-results.native.js.map +1 -1
  1059. package/build-module/components/inserter/tabs.js +7 -3
  1060. package/build-module/components/inserter/tabs.js.map +1 -1
  1061. package/build-module/components/inserter/tabs.native.js.map +1 -1
  1062. package/build-module/components/inserter/tips.js.map +1 -1
  1063. package/build-module/components/inserter/utils.native.js.map +1 -1
  1064. package/build-module/components/inserter-button/index.native.js.map +1 -1
  1065. package/build-module/components/inserter-button/sparkles.js.map +1 -1
  1066. package/build-module/components/inserter-draggable-blocks/index.js.map +1 -1
  1067. package/build-module/components/inserter-list-item/index.js.map +1 -1
  1068. package/build-module/components/inserter-listbox/context.js.map +1 -1
  1069. package/build-module/components/inserter-listbox/group.js.map +1 -1
  1070. package/build-module/components/inserter-listbox/index.js.map +1 -1
  1071. package/build-module/components/inserter-listbox/item.js.map +1 -1
  1072. package/build-module/components/inserter-listbox/row.js.map +1 -1
  1073. package/build-module/components/inserter-menu-extension/index.js.map +1 -1
  1074. package/build-module/components/inspector-controls/block-support-slot-container.js.map +1 -1
  1075. package/build-module/components/inspector-controls/block-support-tools-panel.js.map +1 -1
  1076. package/build-module/components/inspector-controls/fill.js.map +1 -1
  1077. package/build-module/components/inspector-controls/fill.native.js.map +1 -1
  1078. package/build-module/components/inspector-controls/groups.js.map +1 -1
  1079. package/build-module/components/inspector-controls/index.js.map +1 -1
  1080. package/build-module/components/inspector-controls/slot.js.map +1 -1
  1081. package/build-module/components/inspector-controls/slot.native.js.map +1 -1
  1082. package/build-module/components/inspector-controls-tabs/advanced-controls-panel.js.map +1 -1
  1083. package/build-module/components/inspector-controls-tabs/advanced-controls-panel.native.js.map +1 -1
  1084. package/build-module/components/inspector-controls-tabs/index.js.map +1 -1
  1085. package/build-module/components/inspector-controls-tabs/position-controls-panel.js.map +1 -1
  1086. package/build-module/components/inspector-controls-tabs/settings-tab-hint.js.map +1 -1
  1087. package/build-module/components/inspector-controls-tabs/settings-tab.js.map +1 -1
  1088. package/build-module/components/inspector-controls-tabs/styles-tab.js +1 -1
  1089. package/build-module/components/inspector-controls-tabs/styles-tab.js.map +1 -1
  1090. package/build-module/components/inspector-controls-tabs/use-inspector-controls-tabs.js.map +1 -1
  1091. package/build-module/components/inspector-controls-tabs/use-is-list-view-tab-disabled.js.map +1 -1
  1092. package/build-module/components/inspector-controls-tabs/utils.js.map +1 -1
  1093. package/build-module/components/inspector-popover-header/index.js.map +1 -1
  1094. package/build-module/components/justify-content-control/index.js.map +1 -1
  1095. package/build-module/components/justify-content-control/ui.js.map +1 -1
  1096. package/build-module/components/keyboard-shortcuts/index.js +11 -0
  1097. package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
  1098. package/build-module/components/letter-spacing-control/index.js.map +1 -1
  1099. package/build-module/components/line-height-control/index.js.map +1 -1
  1100. package/build-module/components/line-height-control/index.native.js.map +1 -1
  1101. package/build-module/components/line-height-control/utils.js.map +1 -1
  1102. package/build-module/components/link-control/constants.js.map +1 -1
  1103. package/build-module/components/link-control/index.js.map +1 -1
  1104. package/build-module/components/link-control/is-url-like.js.map +1 -1
  1105. package/build-module/components/link-control/link-preview.js.map +1 -1
  1106. package/build-module/components/link-control/search-create-button.js.map +1 -1
  1107. package/build-module/components/link-control/search-input.js.map +1 -1
  1108. package/build-module/components/link-control/search-item.js.map +1 -1
  1109. package/build-module/components/link-control/search-results.js.map +1 -1
  1110. package/build-module/components/link-control/settings-drawer.js.map +1 -1
  1111. package/build-module/components/link-control/settings.js.map +1 -1
  1112. package/build-module/components/link-control/use-create-page.js.map +1 -1
  1113. package/build-module/components/link-control/use-internal-value.js.map +1 -1
  1114. package/build-module/components/link-control/use-rich-url-data.js.map +1 -1
  1115. package/build-module/components/link-control/use-search-handler.js.map +1 -1
  1116. package/build-module/components/link-control/viewer-slot.js.map +1 -1
  1117. package/build-module/components/list-view/appender.js.map +1 -1
  1118. package/build-module/components/list-view/aria-referenced-text.js.map +1 -1
  1119. package/build-module/components/list-view/block-contents.js.map +1 -1
  1120. package/build-module/components/list-view/block-select-button.js +45 -1
  1121. package/build-module/components/list-view/block-select-button.js.map +1 -1
  1122. package/build-module/components/list-view/block.js +1 -1
  1123. package/build-module/components/list-view/block.js.map +1 -1
  1124. package/build-module/components/list-view/branch.js.map +1 -1
  1125. package/build-module/components/list-view/context.js.map +1 -1
  1126. package/build-module/components/list-view/drop-indicator.js.map +1 -1
  1127. package/build-module/components/list-view/expander.js.map +1 -1
  1128. package/build-module/components/list-view/index.js +17 -2
  1129. package/build-module/components/list-view/index.js.map +1 -1
  1130. package/build-module/components/list-view/leaf.js.map +1 -1
  1131. package/build-module/components/list-view/use-block-selection.js.map +1 -1
  1132. package/build-module/components/list-view/use-clipboard-handler.js.map +1 -1
  1133. package/build-module/components/list-view/use-list-view-block-indexes.js.map +1 -1
  1134. package/build-module/components/list-view/use-list-view-client-ids.js.map +1 -1
  1135. package/build-module/components/list-view/use-list-view-collapse-items.js +40 -0
  1136. package/build-module/components/list-view/use-list-view-collapse-items.js.map +1 -0
  1137. package/build-module/components/list-view/use-list-view-drop-zone.js +5 -0
  1138. package/build-module/components/list-view/use-list-view-drop-zone.js.map +1 -1
  1139. package/build-module/components/list-view/use-list-view-expand-selected-item.js.map +1 -1
  1140. package/build-module/components/list-view/use-list-view-images.js.map +1 -1
  1141. package/build-module/components/list-view/use-list-view-scroll-into-view.js.map +1 -1
  1142. package/build-module/components/list-view/utils.js.map +1 -1
  1143. package/build-module/components/media-placeholder/index.js.map +1 -1
  1144. package/build-module/components/media-placeholder/index.native.js.map +1 -1
  1145. package/build-module/components/media-replace-flow/index.js.map +1 -1
  1146. package/build-module/components/media-replace-flow/index.native.js.map +1 -1
  1147. package/build-module/components/media-upload/check.js.map +1 -1
  1148. package/build-module/components/media-upload/constants.native.js.map +1 -1
  1149. package/build-module/components/media-upload/index.js.map +1 -1
  1150. package/build-module/components/media-upload/index.native.js.map +1 -1
  1151. package/build-module/components/media-upload-progress/constants.js.map +1 -1
  1152. package/build-module/components/media-upload-progress/index.native.js.map +1 -1
  1153. package/build-module/components/multi-selection-inspector/index.js.map +1 -1
  1154. package/build-module/components/navigable-toolbar/index.js.map +1 -1
  1155. package/build-module/components/observe-typing/index.js.map +1 -1
  1156. package/build-module/components/panel-color-settings/index.js.map +1 -1
  1157. package/build-module/components/plain-text/index.js.map +1 -1
  1158. package/build-module/components/plain-text/index.native.js.map +1 -1
  1159. package/build-module/components/preview-options/index.js.map +1 -1
  1160. package/build-module/components/provider/block-refs-provider.js.map +1 -1
  1161. package/build-module/components/provider/index.js.map +1 -1
  1162. package/build-module/components/provider/index.native.js.map +1 -1
  1163. package/build-module/components/provider/use-block-sync.js.map +1 -1
  1164. package/build-module/components/provider/with-registry-provider.js.map +1 -1
  1165. package/build-module/components/publish-date-time-picker/index.js.map +1 -1
  1166. package/build-module/components/recursion-provider/index.js +2 -2
  1167. package/build-module/components/recursion-provider/index.js.map +1 -1
  1168. package/build-module/components/resizable-box-popover/index.js.map +1 -1
  1169. package/build-module/components/resolution-tool/index.js.map +1 -1
  1170. package/build-module/components/responsive-block-control/index.js.map +1 -1
  1171. package/build-module/components/responsive-block-control/label.js.map +1 -1
  1172. package/build-module/components/rich-text/content.js +25 -19
  1173. package/build-module/components/rich-text/content.js.map +1 -1
  1174. package/build-module/components/rich-text/embed-handler-picker.native.js.map +1 -1
  1175. package/build-module/components/rich-text/file-paste-handler.native.js.map +1 -1
  1176. package/build-module/components/rich-text/format-edit.js.map +1 -1
  1177. package/build-module/components/rich-text/format-toolbar/index.js.map +1 -1
  1178. package/build-module/components/rich-text/format-toolbar/index.native.js.map +1 -1
  1179. package/build-module/components/rich-text/format-toolbar-container.js.map +1 -1
  1180. package/build-module/components/rich-text/format-toolbar-container.native.js.map +1 -1
  1181. package/build-module/components/rich-text/get-rich-text-values.js.map +1 -1
  1182. package/build-module/components/rich-text/index.js +57 -14
  1183. package/build-module/components/rich-text/index.js.map +1 -1
  1184. package/build-module/components/rich-text/index.native.js +19 -12
  1185. package/build-module/components/rich-text/index.native.js.map +1 -1
  1186. package/build-module/components/rich-text/input-event.js.map +1 -1
  1187. package/build-module/components/rich-text/input-event.native.js.map +1 -1
  1188. package/build-module/components/rich-text/multiline.js.map +1 -1
  1189. package/build-module/components/rich-text/native/format-edit.js.map +1 -1
  1190. package/build-module/components/rich-text/native/get-format-colors.native.js +1 -1
  1191. package/build-module/components/rich-text/native/get-format-colors.native.js.map +1 -1
  1192. package/build-module/components/rich-text/native/index.js.map +1 -1
  1193. package/build-module/components/rich-text/native/index.native.js +2 -2
  1194. package/build-module/components/rich-text/native/index.native.js.map +1 -1
  1195. package/build-module/components/rich-text/native/toolbar-button-with-options.native.js.map +1 -1
  1196. package/build-module/components/rich-text/native/use-format-types.js.map +1 -1
  1197. package/build-module/components/rich-text/prevent-event-discovery.js.map +1 -1
  1198. package/build-module/components/rich-text/remove-browser-shortcuts.native.js.map +1 -1
  1199. package/build-module/components/rich-text/shortcut.js.map +1 -1
  1200. package/build-module/components/rich-text/shortcut.native.js.map +1 -1
  1201. package/build-module/components/rich-text/split-value.js.map +1 -1
  1202. package/build-module/components/rich-text/toolbar-button.js.map +1 -1
  1203. package/build-module/components/rich-text/use-before-input-rules.js.map +1 -1
  1204. package/build-module/components/rich-text/use-delete.js.map +1 -1
  1205. package/build-module/components/rich-text/use-enter.js.map +1 -1
  1206. package/build-module/components/rich-text/use-firefox-compat.js.map +1 -1
  1207. package/build-module/components/rich-text/use-format-types.js.map +1 -1
  1208. package/build-module/components/rich-text/use-input-events.js.map +1 -1
  1209. package/build-module/components/rich-text/use-input-rules.js.map +1 -1
  1210. package/build-module/components/rich-text/use-insert-replacement-text.js.map +1 -1
  1211. package/build-module/components/rich-text/use-mark-persistent.js.map +1 -1
  1212. package/build-module/components/rich-text/use-paste-handler.js.map +1 -1
  1213. package/build-module/components/rich-text/use-remove-browser-shortcuts.js.map +1 -1
  1214. package/build-module/components/rich-text/use-shortcuts.js.map +1 -1
  1215. package/build-module/components/rich-text/use-undo-automatic-change.js +2 -2
  1216. package/build-module/components/rich-text/use-undo-automatic-change.js.map +1 -1
  1217. package/build-module/components/rich-text/utils.js.map +1 -1
  1218. package/build-module/components/rich-text/with-deprecations.js +0 -3
  1219. package/build-module/components/rich-text/with-deprecations.js.map +1 -1
  1220. package/build-module/components/selection-scroll-into-view/index.js.map +1 -1
  1221. package/build-module/components/skip-to-selected-block/index.js.map +1 -1
  1222. package/build-module/components/spacing-sizes-control/hooks/use-spacing-sizes.js.map +1 -1
  1223. package/build-module/components/spacing-sizes-control/index.js.map +1 -1
  1224. package/build-module/components/spacing-sizes-control/input-controls/axial.js.map +1 -1
  1225. package/build-module/components/spacing-sizes-control/input-controls/separated.js.map +1 -1
  1226. package/build-module/components/spacing-sizes-control/input-controls/single.js.map +1 -1
  1227. package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
  1228. package/build-module/components/spacing-sizes-control/sides-dropdown/index.js.map +1 -1
  1229. package/build-module/components/spacing-sizes-control/utils.js.map +1 -1
  1230. package/build-module/components/text-decoration-control/index.js.map +1 -1
  1231. package/build-module/components/text-transform-control/index.js.map +1 -1
  1232. package/build-module/components/tool-selector/index.js.map +1 -1
  1233. package/build-module/components/typewriter/index.js.map +1 -1
  1234. package/build-module/components/ungroup-button/index.native.js.map +1 -1
  1235. package/build-module/components/unit-control/index.js.map +1 -1
  1236. package/build-module/components/unsupported-block-details/index.native.js.map +1 -1
  1237. package/build-module/components/url-input/button.js.map +1 -1
  1238. package/build-module/components/url-input/index.js.map +1 -1
  1239. package/build-module/components/url-input/index.native.js.map +1 -1
  1240. package/build-module/components/url-popover/image-url-input-ui.js +50 -36
  1241. package/build-module/components/url-popover/image-url-input-ui.js.map +1 -1
  1242. package/build-module/components/url-popover/index.js.map +1 -1
  1243. package/build-module/components/url-popover/link-editor.js.map +1 -1
  1244. package/build-module/components/url-popover/link-viewer-url.js.map +1 -1
  1245. package/build-module/components/url-popover/link-viewer.js.map +1 -1
  1246. package/build-module/components/use-block-commands/index.js +20 -2
  1247. package/build-module/components/use-block-commands/index.js.map +1 -1
  1248. package/build-module/components/use-block-display-information/index.js +5 -7
  1249. package/build-module/components/use-block-display-information/index.js.map +1 -1
  1250. package/build-module/components/use-block-drop-zone/index.js.map +1 -1
  1251. package/build-module/components/use-block-drop-zone/index.native.js.map +1 -1
  1252. package/build-module/components/use-flash-editable-blocks/index.js.map +1 -1
  1253. package/build-module/components/use-moving-animation/index.js.map +1 -1
  1254. package/build-module/components/use-on-block-drop/index.js.map +1 -1
  1255. package/build-module/components/use-on-block-drop/index.native.js.map +1 -1
  1256. package/build-module/components/use-on-block-drop/types.js.map +1 -1
  1257. package/build-module/components/use-paste-styles/index.js +2 -1
  1258. package/build-module/components/use-paste-styles/index.js.map +1 -1
  1259. package/build-module/components/use-resize-canvas/index.js.map +1 -1
  1260. package/build-module/components/use-settings/index.js.map +1 -1
  1261. package/build-module/components/use-unsupported-block-editor/index.native.js.map +1 -1
  1262. package/build-module/components/video-player/gridicon-play.native.js.map +1 -1
  1263. package/build-module/components/video-player/index.native.js.map +1 -1
  1264. package/build-module/components/warning/index.js.map +1 -1
  1265. package/build-module/components/warning/index.native.js.map +1 -1
  1266. package/build-module/components/writing-flow/index.js.map +1 -1
  1267. package/build-module/components/writing-flow/use-arrow-nav.js.map +1 -1
  1268. package/build-module/components/writing-flow/use-click-selection.js.map +1 -1
  1269. package/build-module/components/writing-flow/use-clipboard-handler.js.map +1 -1
  1270. package/build-module/components/writing-flow/use-drag-selection.js.map +1 -1
  1271. package/build-module/components/writing-flow/use-input.js.map +1 -1
  1272. package/build-module/components/writing-flow/use-multi-selection.js.map +1 -1
  1273. package/build-module/components/writing-flow/use-select-all.js.map +1 -1
  1274. package/build-module/components/writing-flow/use-selection-observer.js.map +1 -1
  1275. package/build-module/components/writing-flow/use-tab-nav.js.map +1 -1
  1276. package/build-module/components/writing-flow/utils.js.map +1 -1
  1277. package/build-module/components/writing-mode-control/index.js.map +1 -1
  1278. package/build-module/elements/index.js.map +1 -1
  1279. package/build-module/hooks/align.js.map +1 -1
  1280. package/build-module/hooks/align.native.js.map +1 -1
  1281. package/build-module/hooks/anchor.js +2 -2
  1282. package/build-module/hooks/anchor.js.map +1 -1
  1283. package/build-module/hooks/aria-label.js.map +1 -1
  1284. package/build-module/hooks/background.js +67 -419
  1285. package/build-module/hooks/background.js.map +1 -1
  1286. package/build-module/hooks/block-hooks.js.map +1 -1
  1287. package/build-module/hooks/block-renaming.js +0 -36
  1288. package/build-module/hooks/block-renaming.js.map +1 -1
  1289. package/build-module/hooks/border.js.map +1 -1
  1290. package/build-module/hooks/color.js.map +1 -1
  1291. package/build-module/hooks/compat.js.map +1 -1
  1292. package/build-module/hooks/content-lock-ui.js +5 -5
  1293. package/build-module/hooks/content-lock-ui.js.map +1 -1
  1294. package/build-module/hooks/contrast-checker.js.map +1 -1
  1295. package/build-module/hooks/custom-class-name.js.map +1 -1
  1296. package/build-module/hooks/custom-class-name.native.js.map +1 -1
  1297. package/build-module/hooks/dimensions.js.map +1 -1
  1298. package/build-module/hooks/duotone.js.map +1 -1
  1299. package/build-module/hooks/font-family.js.map +1 -1
  1300. package/build-module/hooks/font-size.js.map +1 -1
  1301. package/build-module/hooks/gap.js.map +1 -1
  1302. package/build-module/hooks/generated-class-name.js.map +1 -1
  1303. package/build-module/hooks/index.js +6 -4
  1304. package/build-module/hooks/index.js.map +1 -1
  1305. package/build-module/hooks/index.native.js.map +1 -1
  1306. package/build-module/hooks/layout-child.js.map +1 -1
  1307. package/build-module/hooks/layout.js +38 -19
  1308. package/build-module/hooks/layout.js.map +1 -1
  1309. package/build-module/hooks/layout.native.js.map +1 -1
  1310. package/build-module/hooks/line-height.js.map +1 -1
  1311. package/build-module/hooks/lock.js.map +1 -1
  1312. package/build-module/hooks/metadata.js.map +1 -1
  1313. package/build-module/hooks/position.js.map +1 -1
  1314. package/build-module/hooks/settings.js.map +1 -1
  1315. package/build-module/hooks/spacing-visualizer.js.map +1 -1
  1316. package/build-module/hooks/style.js.map +1 -1
  1317. package/build-module/hooks/supports.js +22 -1
  1318. package/build-module/hooks/supports.js.map +1 -1
  1319. package/build-module/hooks/text-align.js +145 -0
  1320. package/build-module/hooks/text-align.js.map +1 -0
  1321. package/build-module/hooks/typography.js +2 -1
  1322. package/build-module/hooks/typography.js.map +1 -1
  1323. package/build-module/hooks/typography.native.js.map +1 -1
  1324. package/build-module/hooks/use-bindings-attributes.js +68 -132
  1325. package/build-module/hooks/use-bindings-attributes.js.map +1 -1
  1326. package/build-module/hooks/use-border-props.js.map +1 -1
  1327. package/build-module/hooks/use-cached-truthy.js.map +1 -1
  1328. package/build-module/hooks/use-color-props.js.map +1 -1
  1329. package/build-module/hooks/use-editor-wrapper-styles.native.js.map +1 -1
  1330. package/build-module/hooks/use-shadow-props.js.map +1 -1
  1331. package/build-module/hooks/use-spacing-props.js.map +1 -1
  1332. package/build-module/hooks/use-typography-props.js +2 -1
  1333. package/build-module/hooks/use-typography-props.js.map +1 -1
  1334. package/build-module/hooks/use-zoom-out.js +48 -0
  1335. package/build-module/hooks/use-zoom-out.js.map +1 -0
  1336. package/build-module/hooks/utils.js +30 -6
  1337. package/build-module/hooks/utils.js.map +1 -1
  1338. package/build-module/index.js +1 -1
  1339. package/build-module/index.js.map +1 -1
  1340. package/build-module/index.native.js.map +1 -1
  1341. package/build-module/layouts/constrained.js.map +1 -1
  1342. package/build-module/layouts/definitions.js +8 -6
  1343. package/build-module/layouts/definitions.js.map +1 -1
  1344. package/build-module/layouts/flex.js.map +1 -1
  1345. package/build-module/layouts/flow.js.map +1 -1
  1346. package/build-module/layouts/grid.js +52 -9
  1347. package/build-module/layouts/grid.js.map +1 -1
  1348. package/build-module/layouts/index.js.map +1 -1
  1349. package/build-module/layouts/utils.js.map +1 -1
  1350. package/build-module/lock-unlock.js.map +1 -1
  1351. package/build-module/private-apis.js +7 -2
  1352. package/build-module/private-apis.js.map +1 -1
  1353. package/build-module/private-apis.native.js +3 -1
  1354. package/build-module/private-apis.native.js.map +1 -1
  1355. package/build-module/store/actions.js +18 -4
  1356. package/build-module/store/actions.js.map +1 -1
  1357. package/build-module/store/array.js.map +1 -1
  1358. package/build-module/store/constants.js.map +1 -1
  1359. package/build-module/store/defaults.js.map +1 -1
  1360. package/build-module/store/defaults.native.js.map +1 -1
  1361. package/build-module/store/get-block-settings.js.map +1 -1
  1362. package/build-module/store/index.js.map +1 -1
  1363. package/build-module/store/private-actions.js +17 -2
  1364. package/build-module/store/private-actions.js.map +1 -1
  1365. package/build-module/store/private-keys.js +1 -0
  1366. package/build-module/store/private-keys.js.map +1 -1
  1367. package/build-module/store/private-selectors.js +105 -33
  1368. package/build-module/store/private-selectors.js.map +1 -1
  1369. package/build-module/store/reducer.js +21 -0
  1370. package/build-module/store/reducer.js.map +1 -1
  1371. package/build-module/store/selectors.js +130 -88
  1372. package/build-module/store/selectors.js.map +1 -1
  1373. package/build-module/store/undo-ignore.js.map +1 -1
  1374. package/build-module/store/utils.js +6 -1
  1375. package/build-module/store/utils.js.map +1 -1
  1376. package/build-module/utils/dom.js.map +1 -1
  1377. package/build-module/utils/get-px-from-css-unit.js.map +1 -1
  1378. package/build-module/utils/index.js.map +1 -1
  1379. package/build-module/utils/math.js.map +1 -1
  1380. package/build-module/utils/object.js.map +1 -1
  1381. package/build-module/utils/order-inserter-block-items.js.map +1 -1
  1382. package/build-module/utils/pasting.js.map +1 -1
  1383. package/build-module/utils/selection.js.map +1 -1
  1384. package/build-module/utils/sorting.js.map +1 -1
  1385. package/build-module/utils/transform-styles/index.js +2 -1
  1386. package/build-module/utils/transform-styles/index.js.map +1 -1
  1387. package/build-module/utils/use-notify-copy.js.map +1 -1
  1388. package/build-style/content-rtl.css +40 -19
  1389. package/build-style/content.css +40 -19
  1390. package/build-style/default-editor-styles-rtl.css +1 -1
  1391. package/build-style/default-editor-styles.css +1 -1
  1392. package/build-style/style-rtl.css +150 -130
  1393. package/build-style/style.css +150 -130
  1394. package/package.json +32 -33
  1395. package/src/components/block-bindings-toolbar-indicator/style.scss +1 -1
  1396. package/src/components/block-edit/context.js +1 -0
  1397. package/src/components/block-edit/index.js +4 -0
  1398. package/src/components/block-inspector/index.js +6 -4
  1399. package/src/components/block-list/block.js +69 -30
  1400. package/src/components/block-list/block.native.js +3 -2
  1401. package/src/components/block-list/content.scss +37 -19
  1402. package/src/components/block-list/index.js +22 -6
  1403. package/src/components/block-list/use-block-props/index.js +5 -1
  1404. package/src/components/block-list/use-block-props/use-focus-first-element.js +7 -3
  1405. package/src/components/block-mover/button.js +4 -1
  1406. package/src/components/block-mover/index.js +8 -1
  1407. package/src/components/block-patterns-list/index.js +22 -17
  1408. package/src/components/block-patterns-paging/index.js +4 -0
  1409. package/src/components/block-preview/style.scss +28 -0
  1410. package/src/components/block-rename/modal.js +17 -13
  1411. package/src/components/block-rename/rename-control.js +8 -1
  1412. package/src/components/block-settings-menu/block-settings-dropdown.js +8 -2
  1413. package/src/components/block-switcher/index.js +5 -3
  1414. package/src/components/block-switcher/style.scss +1 -1
  1415. package/src/components/block-toolbar/index.js +16 -9
  1416. package/src/components/block-toolbar/shuffle.js +19 -13
  1417. package/src/components/block-toolbar/style.scss +1 -1
  1418. package/src/components/block-toolbar/use-has-block-toolbar.js +5 -3
  1419. package/src/components/block-tools/block-selection-button.js +103 -34
  1420. package/src/components/block-tools/index.js +18 -1
  1421. package/src/components/block-tools/use-show-block-tools.js +4 -7
  1422. package/src/components/block-variation-transforms/index.js +3 -1
  1423. package/src/components/button-block-appender/content.scss +5 -1
  1424. package/src/components/button-block-appender/index.native.js +16 -1
  1425. package/src/components/default-block-appender/content.scss +3 -3
  1426. package/src/components/editor-styles/index.js +4 -2
  1427. package/src/components/global-styles/advanced-panel.js +8 -2
  1428. package/src/components/global-styles/background-panel.js +595 -0
  1429. package/src/components/global-styles/color-panel.js +2 -1
  1430. package/src/components/global-styles/get-global-styles-changes.js +3 -0
  1431. package/src/components/global-styles/hooks.js +1 -0
  1432. package/src/components/global-styles/index.js +4 -0
  1433. package/src/components/global-styles/style.scss +72 -1
  1434. package/src/{hooks/test/background.js → components/global-styles/test/background-panel.js} +36 -1
  1435. package/src/components/global-styles/test/get-global-styles-changes.js +22 -3
  1436. package/src/components/global-styles/test/use-global-styles-output.js +12 -21
  1437. package/src/components/global-styles/use-global-styles-output.js +32 -21
  1438. package/src/components/global-styles/utils.js +1 -0
  1439. package/src/components/iframe/index.js +17 -14
  1440. package/src/components/image-editor/cropper.js +11 -2
  1441. package/src/components/image-editor/index.js +0 -2
  1442. package/src/components/inserter/block-patterns-tab/index.js +54 -39
  1443. package/src/components/inserter/block-patterns-tab/pattern-category-preview-panel.js +9 -31
  1444. package/src/components/inserter/block-patterns-tab/pattern-category-previews.js +2 -2
  1445. package/src/components/inserter/library.js +4 -0
  1446. package/src/components/inserter/menu.js +35 -17
  1447. package/src/components/inserter/search-items.js +37 -15
  1448. package/src/components/inserter/style.scss +88 -70
  1449. package/src/components/inserter/tabs.js +7 -2
  1450. package/src/components/inspector-controls-tabs/styles-tab.js +1 -1
  1451. package/src/components/keyboard-shortcuts/index.js +11 -0
  1452. package/src/components/link-control/style.scss +10 -2
  1453. package/src/components/link-control/test/index.js +1 -1
  1454. package/src/components/list-view/block-select-button.js +44 -3
  1455. package/src/components/list-view/block.js +1 -1
  1456. package/src/components/list-view/index.js +18 -1
  1457. package/src/components/list-view/style.scss +4 -4
  1458. package/src/components/list-view/use-list-view-collapse-items.js +33 -0
  1459. package/src/components/list-view/use-list-view-drop-zone.js +5 -0
  1460. package/src/components/recursion-provider/index.js +2 -2
  1461. package/src/components/rich-text/README.md +4 -0
  1462. package/src/components/rich-text/content.js +26 -19
  1463. package/src/components/rich-text/index.js +76 -15
  1464. package/src/components/rich-text/index.native.js +17 -12
  1465. package/src/components/rich-text/native/get-format-colors.native.js +1 -1
  1466. package/src/components/rich-text/native/index.native.js +2 -2
  1467. package/src/components/rich-text/use-undo-automatic-change.js +2 -6
  1468. package/src/components/rich-text/with-deprecations.js +0 -3
  1469. package/src/components/url-popover/image-url-input-ui.js +68 -51
  1470. package/src/components/use-block-commands/index.js +46 -28
  1471. package/src/components/use-block-display-information/index.js +8 -10
  1472. package/src/components/use-paste-styles/index.js +2 -0
  1473. package/src/hooks/anchor.js +11 -9
  1474. package/src/hooks/background.js +77 -538
  1475. package/src/hooks/block-renaming.js +0 -33
  1476. package/src/hooks/content-lock-ui.js +5 -7
  1477. package/src/hooks/index.js +6 -2
  1478. package/src/hooks/layout.js +57 -25
  1479. package/src/hooks/supports.js +24 -0
  1480. package/src/hooks/test/text-align.js +114 -0
  1481. package/src/hooks/test/use-typography-props.js +3 -1
  1482. package/src/hooks/text-align.js +178 -0
  1483. package/src/hooks/typography.js +2 -0
  1484. package/src/hooks/use-bindings-attributes.js +90 -161
  1485. package/src/hooks/use-typography-props.js +4 -1
  1486. package/src/hooks/use-zoom-out.js +46 -0
  1487. package/src/hooks/utils.js +41 -3
  1488. package/src/index.js +1 -0
  1489. package/src/layouts/definitions.js +6 -6
  1490. package/src/layouts/grid.js +106 -47
  1491. package/src/private-apis.js +13 -1
  1492. package/src/private-apis.native.js +2 -0
  1493. package/src/store/actions.js +22 -6
  1494. package/src/store/private-actions.js +18 -3
  1495. package/src/store/private-keys.js +1 -0
  1496. package/src/store/private-selectors.js +160 -41
  1497. package/src/store/reducer.js +22 -0
  1498. package/src/store/selectors.js +333 -262
  1499. package/src/store/test/private-actions.js +10 -0
  1500. package/src/store/test/private-selectors.js +13 -0
  1501. package/src/store/test/reducer.js +26 -0
  1502. package/src/store/test/selectors.js +90 -199
  1503. package/src/store/utils.js +13 -0
  1504. package/src/style.scss +0 -2
  1505. package/src/utils/transform-styles/index.js +2 -1
  1506. package/tsconfig.tsbuildinfo +1 -1
  1507. package/src/hooks/anchor.scss +0 -4
  1508. package/src/hooks/background.scss +0 -75
@@ -0,0 +1,145 @@
1
+ import { createElement } from "react";
2
+ /**
3
+ * External dependencies
4
+ */
5
+ import classnames from 'classnames';
6
+
7
+ /**
8
+ * WordPress dependencies
9
+ */
10
+ import { __ } from '@wordpress/i18n';
11
+ import { getBlockSupport, hasBlockSupport } from '@wordpress/blocks';
12
+ import { alignLeft, alignRight, alignCenter } from '@wordpress/icons';
13
+
14
+ /**
15
+ * Internal dependencies
16
+ */
17
+ import { AlignmentControl, BlockControls } from '../components';
18
+ import { useBlockEditingMode } from '../components/block-editing-mode';
19
+ import { cleanEmptyObject, shouldSkipSerialization } from './utils';
20
+ import { TYPOGRAPHY_SUPPORT_KEY } from './typography';
21
+ export const TEXT_ALIGN_SUPPORT_KEY = 'typography.textAlign';
22
+ const TEXT_ALIGNMENT_OPTIONS = [{
23
+ icon: alignLeft,
24
+ title: __('Align text left'),
25
+ align: 'left'
26
+ }, {
27
+ icon: alignCenter,
28
+ title: __('Align text center'),
29
+ align: 'center'
30
+ }, {
31
+ icon: alignRight,
32
+ title: __('Align text right'),
33
+ align: 'right'
34
+ }];
35
+ const VALID_TEXT_ALIGNMENTS = ['left', 'center', 'right'];
36
+
37
+ /**
38
+ * Returns the valid text alignments.
39
+ * Takes into consideration the text aligns supported by a block.
40
+ * Exported just for testing purposes, not exported outside the module.
41
+ *
42
+ * @param {?boolean|string[]} blockTextAlign Text aligns supported by the block.
43
+ *
44
+ * @return {string[]} Valid text alignments.
45
+ */
46
+ export function getValidTextAlignments(blockTextAlign) {
47
+ let validTextAlignments;
48
+ if (Array.isArray(blockTextAlign)) {
49
+ validTextAlignments = VALID_TEXT_ALIGNMENTS.filter(textAlign => blockTextAlign.includes(textAlign));
50
+ } else if (blockTextAlign === true) {
51
+ // `true` includes all alignments...
52
+ validTextAlignments = [...VALID_TEXT_ALIGNMENTS];
53
+ } else {
54
+ validTextAlignments = [];
55
+ }
56
+ return validTextAlignments;
57
+ }
58
+ function BlockEditTextAlignmentToolbarControlsPure({
59
+ style,
60
+ name: blockName,
61
+ setAttributes
62
+ }) {
63
+ const validTextAlignments = getValidTextAlignments(getBlockSupport(blockName, TEXT_ALIGN_SUPPORT_KEY));
64
+ const blockEditingMode = useBlockEditingMode();
65
+ if (!validTextAlignments.length || blockEditingMode !== 'default') {
66
+ return null;
67
+ }
68
+ const textAlignmentControls = TEXT_ALIGNMENT_OPTIONS.filter(control => validTextAlignments.includes(control.align));
69
+ const onChange = newTextAlignValue => {
70
+ const newStyle = {
71
+ ...style,
72
+ typography: {
73
+ ...style?.typography,
74
+ textAlign: newTextAlignValue
75
+ }
76
+ };
77
+ setAttributes({
78
+ style: cleanEmptyObject(newStyle)
79
+ });
80
+ };
81
+ return createElement(BlockControls, {
82
+ group: "block"
83
+ }, createElement(AlignmentControl, {
84
+ value: style?.typography?.textAlign,
85
+ onChange: onChange,
86
+ alignmentControls: textAlignmentControls
87
+ }));
88
+ }
89
+ export default {
90
+ edit: BlockEditTextAlignmentToolbarControlsPure,
91
+ useBlockProps,
92
+ addSaveProps: addAssignedTextAlign,
93
+ attributeKeys: ['style'],
94
+ hasSupport(name) {
95
+ return hasBlockSupport(name, TEXT_ALIGN_SUPPORT_KEY, false);
96
+ }
97
+ };
98
+ function useBlockProps({
99
+ name,
100
+ style
101
+ }) {
102
+ if (!style?.typography?.textAlign) {
103
+ return null;
104
+ }
105
+ const validTextAlignments = getValidTextAlignments(getBlockSupport(name, TEXT_ALIGN_SUPPORT_KEY));
106
+ if (!validTextAlignments.length) {
107
+ return null;
108
+ }
109
+ if (shouldSkipSerialization(name, TYPOGRAPHY_SUPPORT_KEY, 'textAlign')) {
110
+ return null;
111
+ }
112
+ const textAlign = style.typography.textAlign;
113
+ const className = classnames({
114
+ [`has-text-align-${textAlign}`]: textAlign
115
+ });
116
+ return {
117
+ className
118
+ };
119
+ }
120
+
121
+ /**
122
+ * Override props assigned to save component to inject text alignment class
123
+ * name if block supports it.
124
+ *
125
+ * @param {Object} props Additional props applied to save element.
126
+ * @param {Object} blockType Block type.
127
+ * @param {Object} attributes Block attributes.
128
+ *
129
+ * @return {Object} Filtered props applied to save element.
130
+ */
131
+ export function addAssignedTextAlign(props, blockType, attributes) {
132
+ if (!attributes?.style?.typography?.textAlign) {
133
+ return props;
134
+ }
135
+ const {
136
+ textAlign
137
+ } = attributes.style.typography;
138
+ const blockTextAlign = getBlockSupport(blockType, TEXT_ALIGN_SUPPORT_KEY);
139
+ const isTextAlignValid = getValidTextAlignments(blockTextAlign).includes(textAlign);
140
+ if (isTextAlignValid && !shouldSkipSerialization(blockType, TYPOGRAPHY_SUPPORT_KEY, 'textAlign')) {
141
+ props.className = classnames(`has-text-align-${textAlign}`, props.className);
142
+ }
143
+ return props;
144
+ }
145
+ //# sourceMappingURL=text-align.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["classnames","__","getBlockSupport","hasBlockSupport","alignLeft","alignRight","alignCenter","AlignmentControl","BlockControls","useBlockEditingMode","cleanEmptyObject","shouldSkipSerialization","TYPOGRAPHY_SUPPORT_KEY","TEXT_ALIGN_SUPPORT_KEY","TEXT_ALIGNMENT_OPTIONS","icon","title","align","VALID_TEXT_ALIGNMENTS","getValidTextAlignments","blockTextAlign","validTextAlignments","Array","isArray","filter","textAlign","includes","BlockEditTextAlignmentToolbarControlsPure","style","name","blockName","setAttributes","blockEditingMode","length","textAlignmentControls","control","onChange","newTextAlignValue","newStyle","typography","createElement","group","value","alignmentControls","edit","useBlockProps","addSaveProps","addAssignedTextAlign","attributeKeys","hasSupport","className","props","blockType","attributes","isTextAlignValid"],"sources":["@wordpress/block-editor/src/hooks/text-align.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { getBlockSupport, hasBlockSupport } from '@wordpress/blocks';\nimport { alignLeft, alignRight, alignCenter } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { AlignmentControl, BlockControls } from '../components';\nimport { useBlockEditingMode } from '../components/block-editing-mode';\nimport { cleanEmptyObject, shouldSkipSerialization } from './utils';\nimport { TYPOGRAPHY_SUPPORT_KEY } from './typography';\n\nexport const TEXT_ALIGN_SUPPORT_KEY = 'typography.textAlign';\n\nconst TEXT_ALIGNMENT_OPTIONS = [\n\t{\n\t\ticon: alignLeft,\n\t\ttitle: __( 'Align text left' ),\n\t\talign: 'left',\n\t},\n\t{\n\t\ticon: alignCenter,\n\t\ttitle: __( 'Align text center' ),\n\t\talign: 'center',\n\t},\n\t{\n\t\ticon: alignRight,\n\t\ttitle: __( 'Align text right' ),\n\t\talign: 'right',\n\t},\n];\n\nconst VALID_TEXT_ALIGNMENTS = [ 'left', 'center', 'right' ];\n\n/**\n * Returns the valid text alignments.\n * Takes into consideration the text aligns supported by a block.\n * Exported just for testing purposes, not exported outside the module.\n *\n * @param {?boolean|string[]} blockTextAlign Text aligns supported by the block.\n *\n * @return {string[]} Valid text alignments.\n */\nexport function getValidTextAlignments( blockTextAlign ) {\n\tlet validTextAlignments;\n\tif ( Array.isArray( blockTextAlign ) ) {\n\t\tvalidTextAlignments = VALID_TEXT_ALIGNMENTS.filter( ( textAlign ) =>\n\t\t\tblockTextAlign.includes( textAlign )\n\t\t);\n\t} else if ( blockTextAlign === true ) {\n\t\t// `true` includes all alignments...\n\t\tvalidTextAlignments = [ ...VALID_TEXT_ALIGNMENTS ];\n\t} else {\n\t\tvalidTextAlignments = [];\n\t}\n\n\treturn validTextAlignments;\n}\n\nfunction BlockEditTextAlignmentToolbarControlsPure( {\n\tstyle,\n\tname: blockName,\n\tsetAttributes,\n} ) {\n\tconst validTextAlignments = getValidTextAlignments(\n\t\tgetBlockSupport( blockName, TEXT_ALIGN_SUPPORT_KEY )\n\t);\n\tconst blockEditingMode = useBlockEditingMode();\n\tif ( ! validTextAlignments.length || blockEditingMode !== 'default' ) {\n\t\treturn null;\n\t}\n\n\tconst textAlignmentControls = TEXT_ALIGNMENT_OPTIONS.filter( ( control ) =>\n\t\tvalidTextAlignments.includes( control.align )\n\t);\n\n\tconst onChange = ( newTextAlignValue ) => {\n\t\tconst newStyle = {\n\t\t\t...style,\n\t\t\ttypography: {\n\t\t\t\t...style?.typography,\n\t\t\t\ttextAlign: newTextAlignValue,\n\t\t\t},\n\t\t};\n\n\t\tsetAttributes( { style: cleanEmptyObject( newStyle ) } );\n\t};\n\n\treturn (\n\t\t<BlockControls group=\"block\">\n\t\t\t<AlignmentControl\n\t\t\t\tvalue={ style?.typography?.textAlign }\n\t\t\t\tonChange={ onChange }\n\t\t\t\talignmentControls={ textAlignmentControls }\n\t\t\t/>\n\t\t</BlockControls>\n\t);\n}\n\nexport default {\n\tedit: BlockEditTextAlignmentToolbarControlsPure,\n\tuseBlockProps,\n\taddSaveProps: addAssignedTextAlign,\n\tattributeKeys: [ 'style' ],\n\thasSupport( name ) {\n\t\treturn hasBlockSupport( name, TEXT_ALIGN_SUPPORT_KEY, false );\n\t},\n};\n\nfunction useBlockProps( { name, style } ) {\n\tif ( ! style?.typography?.textAlign ) {\n\t\treturn null;\n\t}\n\n\tconst validTextAlignments = getValidTextAlignments(\n\t\tgetBlockSupport( name, TEXT_ALIGN_SUPPORT_KEY )\n\t);\n\n\tif ( ! validTextAlignments.length ) {\n\t\treturn null;\n\t}\n\n\tif (\n\t\tshouldSkipSerialization( name, TYPOGRAPHY_SUPPORT_KEY, 'textAlign' )\n\t) {\n\t\treturn null;\n\t}\n\n\tconst textAlign = style.typography.textAlign;\n\n\tconst className = classnames( {\n\t\t[ `has-text-align-${ textAlign }` ]: textAlign,\n\t} );\n\treturn { className };\n}\n\n/**\n * Override props assigned to save component to inject text alignment class\n * name if block supports it.\n *\n * @param {Object} props Additional props applied to save element.\n * @param {Object} blockType Block type.\n * @param {Object} attributes Block attributes.\n *\n * @return {Object} Filtered props applied to save element.\n */\nexport function addAssignedTextAlign( props, blockType, attributes ) {\n\tif ( ! attributes?.style?.typography?.textAlign ) {\n\t\treturn props;\n\t}\n\n\tconst { textAlign } = attributes.style.typography;\n\tconst blockTextAlign = getBlockSupport( blockType, TEXT_ALIGN_SUPPORT_KEY );\n\tconst isTextAlignValid =\n\t\tgetValidTextAlignments( blockTextAlign ).includes( textAlign );\n\tif (\n\t\tisTextAlignValid &&\n\t\t! shouldSkipSerialization(\n\t\t\tblockType,\n\t\t\tTYPOGRAPHY_SUPPORT_KEY,\n\t\t\t'textAlign'\n\t\t)\n\t) {\n\t\tprops.className = classnames(\n\t\t\t`has-text-align-${ textAlign }`,\n\t\t\tprops.className\n\t\t);\n\t}\n\treturn props;\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,eAAe,EAAEC,eAAe,QAAQ,mBAAmB;AACpE,SAASC,SAAS,EAAEC,UAAU,EAAEC,WAAW,QAAQ,kBAAkB;;AAErE;AACA;AACA;AACA,SAASC,gBAAgB,EAAEC,aAAa,QAA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,IAAI,EAAEhB,sBAAuB,CAC/C,CAAC;EAED,IAAK,CAAEQ,mBAAmB,CAACY,MAAM,EAAG;IACnC,OAAO,IAAI;EACZ;EAEA,IACCtB,uBAAuB,CAAEkB,IAAI,EAAEjB,sBAAsB,EAAE,WAAY,CAAC,EACnE;IACD,OAAO,IAAI;EACZ;EAEA,MAAMa,SAAS,GAAGG,KAAK,CAACW,UAAU,CAACd,SAAS;EAE5C,MAAMyB,SAAS,GAAGlD,UAAU,CAAE;IAC7B,CAAG,kBAAkByB,SAAW,EAAC,GAAIA;EACtC,CAAE,CAAC;EACH,OAAO;IAAEyB;EAAU,CAAC;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASH,oBAAoBA,CAAEI,KAAK,EAAEC,SAAS,EAAEC,UAAU,EAAG;EACpE,IAAK,CAAEA,UAAU,EAAEzB,KAAK,EAAEW,UAAU,EAAEd,SAAS,EAAG;IACjD,OAAO0B,KAAK;EACb;EAEA,MAAM;IAAE1B;EAAU,CAAC,GAAG4B,UAAU,CAACzB,KAAK,CAACW,UAAU;EACjD,MAAMnB,cAAc,GAAGlB,eAAe,CAAEkD,SAAS,EAAEvC,sBAAuB,CAAC;EAC3E,MAAMyC,gBAAgB,GACrBnC,sBAAsB,CAAEC,cAAe,CAAC,CAACM,QAAQ,CAAED,SAAU,CAAC;EAC/D,IACC6B,gBAAgB,IAChB,CAAE3C,uBAAuB,CACxByC,SAAS,EACTxC,sBAAsB,EACtB,WACD,CAAC,EACA;IACDuC,KAAK,CAACD,SAAS,GAAGlD,UAAU,CAC1B,kBAAkByB,SAAW,EAAC,EAC/B0B,KAAK,CAACD,SACP,CAAC;EACF;EACA,OAAOC,KAAK;AACb","ignoreList":[]}
@@ -14,6 +14,7 @@ import { default as StylesTypographyPanel, useHasTypographyPanel } from '../comp
14
14
  import { LINE_HEIGHT_SUPPORT_KEY } from './line-height';
15
15
  import { FONT_FAMILY_SUPPORT_KEY } from './font-family';
16
16
  import { FONT_SIZE_SUPPORT_KEY } from './font-size';
17
+ import { TEXT_ALIGN_SUPPORT_KEY } from './text-align';
17
18
  import { cleanEmptyObject } from './utils';
18
19
  import { store as blockEditorStore } from '../store';
19
20
  function omit(object, keys) {
@@ -27,7 +28,7 @@ const FONT_STYLE_SUPPORT_KEY = 'typography.__experimentalFontStyle';
27
28
  const FONT_WEIGHT_SUPPORT_KEY = 'typography.__experimentalFontWeight';
28
29
  const WRITING_MODE_SUPPORT_KEY = 'typography.__experimentalWritingMode';
29
30
  export const TYPOGRAPHY_SUPPORT_KEY = 'typography';
30
- export const TYPOGRAPHY_SUPPORT_KEYS = [LINE_HEIGHT_SUPPORT_KEY, FONT_SIZE_SUPPORT_KEY, FONT_STYLE_SUPPORT_KEY, FONT_WEIGHT_SUPPORT_KEY, FONT_FAMILY_SUPPORT_KEY, TEXT_COLUMNS_SUPPORT_KEY, TEXT_DECORATION_SUPPORT_KEY, WRITING_MODE_SUPPORT_KEY, TEXT_TRANSFORM_SUPPORT_KEY, LETTER_SPACING_SUPPORT_KEY];
31
+ export const TYPOGRAPHY_SUPPORT_KEYS = [LINE_HEIGHT_SUPPORT_KEY, FONT_SIZE_SUPPORT_KEY, FONT_STYLE_SUPPORT_KEY, FONT_WEIGHT_SUPPORT_KEY, FONT_FAMILY_SUPPORT_KEY, TEXT_ALIGN_SUPPORT_KEY, TEXT_COLUMNS_SUPPORT_KEY, TEXT_DECORATION_SUPPORT_KEY, WRITING_MODE_SUPPORT_KEY, TEXT_TRANSFORM_SUPPORT_KEY, LETTER_SPACING_SUPPORT_KEY];
31
32
  function styleToAttributes(style) {
32
33
  const updatedStyle = {
33
34
  ...omit(style, ['fontFamily'])
@@ -1 +1 @@
1
- {"version":3,"names":["getBlockSupport","hasBlockSupport","useMemo","useCallback","useSelect","InspectorControls","default","StylesTypographyPanel","useHasTypographyPanel","LINE_HEIGHT_SUPPORT_KEY","FONT_FAMILY_SUPPORT_KEY","FONT_SIZE_SUPPORT_KEY","cleanEmptyObject","store","blockEditorStore","omit","object","keys","Object","fromEntries","entries","filter","key","includes","LETTER_SPACING_SUPPORT_KEY","TEXT_TRANSFORM_SUPPORT_KEY","TEXT_DECORATION_SUPPORT_KEY","TEXT_COLUMNS_SUPPORT_KEY","FONT_STYLE_SUPPORT_KEY","FONT_WEIGHT_SUPPORT_KEY","WRITING_MODE_SUPPORT_KEY","TYPOGRAPHY_SUPPORT_KEY","TYPOGRAPHY_SUPPORT_KEYS","styleToAttributes","style","updatedStyle","fontSizeValue","typography","fontSize","fontFamilyValue","fontFamily","fontSizeSlug","startsWith","substring","length","undefined","fontFamilySlug","attributesToStyle","attributes","TypographyInspectorControl","children","resetAllFilter","attributesResetAllFilter","existingStyle","createElement","group","TypographyPanel","clientId","name","setAttributes","settings","selector","select","getBlockAttributes","isEnabled","value","onChange","newStyle","defaultControls","as","panelId","hasTypographySupport","blockName","some"],"sources":["@wordpress/block-editor/src/hooks/typography.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getBlockSupport, hasBlockSupport } from '@wordpress/blocks';\nimport { useMemo, useCallback } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport InspectorControls from '../components/inspector-controls';\nimport {\n\tdefault as StylesTypographyPanel,\n\tuseHasTypographyPanel,\n} from '../components/global-styles/typography-panel';\n\nimport { LINE_HEIGHT_SUPPORT_KEY } from './line-height';\nimport { FONT_FAMILY_SUPPORT_KEY } from './font-family';\nimport { FONT_SIZE_SUPPORT_KEY } from './font-size';\nimport { cleanEmptyObject } from './utils';\nimport { store as blockEditorStore } from '../store';\n\nfunction omit( object, keys ) {\n\treturn Object.fromEntries(\n\t\tObject.entries( object ).filter( ( [ key ] ) => ! keys.includes( key ) )\n\t);\n}\n\nconst LETTER_SPACING_SUPPORT_KEY = 'typography.__experimentalLetterSpacing';\nconst TEXT_TRANSFORM_SUPPORT_KEY = 'typography.__experimentalTextTransform';\nconst TEXT_DECORATION_SUPPORT_KEY = 'typography.__experimentalTextDecoration';\nconst TEXT_COLUMNS_SUPPORT_KEY = 'typography.textColumns';\nconst FONT_STYLE_SUPPORT_KEY = 'typography.__experimentalFontStyle';\nconst FONT_WEIGHT_SUPPORT_KEY = 'typography.__experimentalFontWeight';\nconst WRITING_MODE_SUPPORT_KEY = 'typography.__experimentalWritingMode';\nexport const TYPOGRAPHY_SUPPORT_KEY = 'typography';\nexport const TYPOGRAPHY_SUPPORT_KEYS = [\n\tLINE_HEIGHT_SUPPORT_KEY,\n\tFONT_SIZE_SUPPORT_KEY,\n\tFONT_STYLE_SUPPORT_KEY,\n\tFONT_WEIGHT_SUPPORT_KEY,\n\tFONT_FAMILY_SUPPORT_KEY,\n\tTEXT_COLUMNS_SUPPORT_KEY,\n\tTEXT_DECORATION_SUPPORT_KEY,\n\tWRITING_MODE_SUPPORT_KEY,\n\tTEXT_TRANSFORM_SUPPORT_KEY,\n\tLETTER_SPACING_SUPPORT_KEY,\n];\n\nfunction styleToAttributes( style ) {\n\tconst updatedStyle = { ...omit( style, [ 'fontFamily' ] ) };\n\tconst fontSizeValue = style?.typography?.fontSize;\n\tconst fontFamilyValue = style?.typography?.fontFamily;\n\tconst fontSizeSlug = fontSizeValue?.startsWith( 'var:preset|font-size|' )\n\t\t? fontSizeValue.substring( 'var:preset|font-size|'.length )\n\t\t: undefined;\n\tconst fontFamilySlug = fontFamilyValue?.startsWith(\n\t\t'var:preset|font-family|'\n\t)\n\t\t? fontFamilyValue.substring( 'var:preset|font-family|'.length )\n\t\t: undefined;\n\tupdatedStyle.typography = {\n\t\t...omit( updatedStyle.typography, [ 'fontFamily' ] ),\n\t\tfontSize: fontSizeSlug ? undefined : fontSizeValue,\n\t};\n\treturn {\n\t\tstyle: cleanEmptyObject( updatedStyle ),\n\t\tfontFamily: fontFamilySlug,\n\t\tfontSize: fontSizeSlug,\n\t};\n}\n\nfunction attributesToStyle( attributes ) {\n\treturn {\n\t\t...attributes.style,\n\t\ttypography: {\n\t\t\t...attributes.style?.typography,\n\t\t\tfontFamily: attributes.fontFamily\n\t\t\t\t? 'var:preset|font-family|' + attributes.fontFamily\n\t\t\t\t: undefined,\n\t\t\tfontSize: attributes.fontSize\n\t\t\t\t? 'var:preset|font-size|' + attributes.fontSize\n\t\t\t\t: attributes.style?.typography?.fontSize,\n\t\t},\n\t};\n}\n\nfunction TypographyInspectorControl( { children, resetAllFilter } ) {\n\tconst attributesResetAllFilter = useCallback(\n\t\t( attributes ) => {\n\t\t\tconst existingStyle = attributesToStyle( attributes );\n\t\t\tconst updatedStyle = resetAllFilter( existingStyle );\n\t\t\treturn {\n\t\t\t\t...attributes,\n\t\t\t\t...styleToAttributes( updatedStyle ),\n\t\t\t};\n\t\t},\n\t\t[ resetAllFilter ]\n\t);\n\n\treturn (\n\t\t<InspectorControls\n\t\t\tgroup=\"typography\"\n\t\t\tresetAllFilter={ attributesResetAllFilter }\n\t\t>\n\t\t\t{ children }\n\t\t</InspectorControls>\n\t);\n}\n\nexport function TypographyPanel( { clientId, name, setAttributes, settings } ) {\n\tfunction selector( select ) {\n\t\tconst { style, fontFamily, fontSize } =\n\t\t\tselect( blockEditorStore ).getBlockAttributes( clientId ) || {};\n\t\treturn { style, fontFamily, fontSize };\n\t}\n\tconst { style, fontFamily, fontSize } = useSelect( selector, [ clientId ] );\n\tconst isEnabled = useHasTypographyPanel( settings );\n\tconst value = useMemo(\n\t\t() => attributesToStyle( { style, fontFamily, fontSize } ),\n\t\t[ style, fontSize, fontFamily ]\n\t);\n\n\tconst onChange = ( newStyle ) => {\n\t\tsetAttributes( styleToAttributes( newStyle ) );\n\t};\n\n\tif ( ! isEnabled ) {\n\t\treturn null;\n\t}\n\n\tconst defaultControls = getBlockSupport( name, [\n\t\tTYPOGRAPHY_SUPPORT_KEY,\n\t\t'__experimentalDefaultControls',\n\t] );\n\n\treturn (\n\t\t<StylesTypographyPanel\n\t\t\tas={ TypographyInspectorControl }\n\t\t\tpanelId={ clientId }\n\t\t\tsettings={ settings }\n\t\t\tvalue={ value }\n\t\t\tonChange={ onChange }\n\t\t\tdefaultControls={ defaultControls }\n\t\t/>\n\t);\n}\n\nexport const hasTypographySupport = ( blockName ) => {\n\treturn TYPOGRAPHY_SUPPORT_KEYS.some( ( key ) =>\n\t\thasBlockSupport( blockName, key )\n\t);\n};\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,eAAe,EAAEC,eAAe,QAAQ,mBAAmB;AACpE,SAASC,OAAO,EAAEC,WAAW,QAAQ,oBAAoB;AACzD,SAASC,SAAS,QAAQ,iBAAiB;;AAE3C;AACA;AACA;AACA,OAAOC,iBAAiB,MAAM,kCAAkC;AAChE,SACCC,OAAO,IAAIC,qBAAqB,EAChCC,qBAAqB,QACf,8CAA8C;AAErD,SAASC,uBAAuB,QAAQ,eAAe;AACvD,SAASC,uBAAuB,QAAQ,eAAe;AACvD,SAASC,qBAAqB,QAAQ,aAAa;AACnD,SAASC,gBAAgB,QAAQ,SAAS;AAC1C,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,UAAU;AAEpD,SAASC,IAAIA,CAAEC,MAAM,EAAEC,IAAI,EAAG;EAC7B,OAAOC,MAAM,CAACC,WAAW,CACxBD,MAAM,CAACE,OAAO,CAAEJ,MAAO,CAAC,CAACK,MAAM,CAAE,CAAE,CAAEC,GAAG,CAAE,KAAM,CAAEL,IAAI,CAACM,QAAQ,CAAED,GAAI,CAAE,CACxE,CAAC;AACF;AAEA,MAAME,0BAA0B,GAAG,wCAAwC;AAC3E,MAAMC,0BAA0B,GAAG,wCAAwC;AAC3E,MAAMC,2BAA2B,GAAG,yCAAyC;AAC7E,MAAMC,wBAAwB,GAAG,wBAAwB;AACzD,MAAMC,sBAAsB,GAAG,oCAAoC;AACnE,MAAMC,uBAAuB,GAAG,qCAAqC;AACrE,MAAMC,wBAAwB,GAAG,sCAAsC;AACvE,OAAO,MAAMC,sBAAsB,GAAG,YAAY;AAClD,OAAO,MAAMC,uBAAuB,GAAG,CACtCvB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EF;EAAS,CAAE,CAAC,EAC1D,CAAEJ,KAAK,EAAEI,QAAQ,EAAEE,UAAU,CAC9B,CAAC;EAED,MAAM0B,QAAQ,GAAKC,QAAQ,IAAM;IAChCR,aAAa,CAAE1B,iBAAiB,CAAEkC,QAAS,CAAE,CAAC;EAC/C,CAAC;EAED,IAAK,CAAEH,SAAS,EAAG;IAClB,OAAO,IAAI;EACZ;EAEA,MAAMI,eAAe,GAAGpE,eAAe,CAAE0D,IAAI,EAAE,CAC9C3B,sBAAsB,EACtB,+BAA+B,CAC9B,CAAC;EAEH,OACCuB,aAAA,CAAC/C,qBAAqB;IACrB8D,EAAE,EAAGpB,0BAA4B;IACjCqB,OAAO,EAAGb,QAAU;IACpBG,QAAQ,EAAGA,QAAU;IACrBK,KAAK,EAAGA,KAAO;IACfC,QAAQ,EAAGA,QAAU;IACrBE,eAAe,EAAGA;EAAiB,CACnC,CAAC;AAEJ;AAEA,OAAO,MAAMG,oBAAoB,GAAKC,SAAS,IAAM;EACpD,OAAOxC,uBAAuB,CAACyC,IAAI,CAAInD,GAAG,IACzCrB,eAAe,CAAEuE,SAAS,EAAElD,GAAI,CACjC,CAAC;AACF,CAAC"}
1
+ {"version":3,"names":["getBlockSupport","hasBlockSupport","useMemo","useCallback","useSelect","InspectorControls","default","StylesTypographyPanel","useHasTypographyPanel","LINE_HEIGHT_SUPPORT_KEY","FONT_FAMILY_SUPPORT_KEY","FONT_SIZE_SUPPORT_KEY","TEXT_ALIGN_SUPPORT_KEY","cleanEmptyObject","store","blockEditorStore","omit","object","keys","Object","fromEntries","entries","filter","key","includes","LETTER_SPACING_SUPPORT_KEY","TEXT_TRANSFORM_SUPPORT_KEY","TEXT_DECORATION_SUPPORT_KEY","TEXT_COLUMNS_SUPPORT_KEY","FONT_STYLE_SUPPORT_KEY","FONT_WEIGHT_SUPPORT_KEY","WRITING_MODE_SUPPORT_KEY","TYPOGRAPHY_SUPPORT_KEY","TYPOGRAPHY_SUPPORT_KEYS","styleToAttributes","style","updatedStyle","fontSizeValue","typography","fontSize","fontFamilyValue","fontFamily","fontSizeSlug","startsWith","substring","length","undefined","fontFamilySlug","attributesToStyle","attributes","TypographyInspectorControl","children","resetAllFilter","attributesResetAllFilter","existingStyle","createElement","group","TypographyPanel","clientId","name","setAttributes","settings","selector","select","getBlockAttributes","isEnabled","value","onChange","newStyle","defaultControls","as","panelId","hasTypographySupport","blockName","some"],"sources":["@wordpress/block-editor/src/hooks/typography.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getBlockSupport, hasBlockSupport } from '@wordpress/blocks';\nimport { useMemo, useCallback } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport InspectorControls from '../components/inspector-controls';\nimport {\n\tdefault as StylesTypographyPanel,\n\tuseHasTypographyPanel,\n} from '../components/global-styles/typography-panel';\n\nimport { LINE_HEIGHT_SUPPORT_KEY } from './line-height';\nimport { FONT_FAMILY_SUPPORT_KEY } from './font-family';\nimport { FONT_SIZE_SUPPORT_KEY } from './font-size';\nimport { TEXT_ALIGN_SUPPORT_KEY } from './text-align';\nimport { cleanEmptyObject } from './utils';\nimport { store as blockEditorStore } from '../store';\n\nfunction omit( object, keys ) {\n\treturn Object.fromEntries(\n\t\tObject.entries( object ).filter( ( [ key ] ) => ! keys.includes( key ) )\n\t);\n}\n\nconst LETTER_SPACING_SUPPORT_KEY = 'typography.__experimentalLetterSpacing';\nconst TEXT_TRANSFORM_SUPPORT_KEY = 'typography.__experimentalTextTransform';\nconst TEXT_DECORATION_SUPPORT_KEY = 'typography.__experimentalTextDecoration';\nconst TEXT_COLUMNS_SUPPORT_KEY = 'typography.textColumns';\nconst FONT_STYLE_SUPPORT_KEY = 'typography.__experimentalFontStyle';\nconst FONT_WEIGHT_SUPPORT_KEY = 'typography.__experimentalFontWeight';\nconst WRITING_MODE_SUPPORT_KEY = 'typography.__experimentalWritingMode';\nexport const TYPOGRAPHY_SUPPORT_KEY = 'typography';\nexport const TYPOGRAPHY_SUPPORT_KEYS = [\n\tLINE_HEIGHT_SUPPORT_KEY,\n\tFONT_SIZE_SUPPORT_KEY,\n\tFONT_STYLE_SUPPORT_KEY,\n\tFONT_WEIGHT_SUPPORT_KEY,\n\tFONT_FAMILY_SUPPORT_KEY,\n\tTEXT_ALIGN_SUPPORT_KEY,\n\tTEXT_COLUMNS_SUPPORT_KEY,\n\tTEXT_DECORATION_SUPPORT_KEY,\n\tWRITING_MODE_SUPPORT_KEY,\n\tTEXT_TRANSFORM_SUPPORT_KEY,\n\tLETTER_SPACING_SUPPORT_KEY,\n];\n\nfunction styleToAttributes( style ) {\n\tconst updatedStyle = { ...omit( style, [ 'fontFamily' ] ) };\n\tconst fontSizeValue = style?.typography?.fontSize;\n\tconst fontFamilyValue = style?.typography?.fontFamily;\n\tconst fontSizeSlug = fontSizeValue?.startsWith( 'var:preset|font-size|' )\n\t\t? fontSizeValue.substring( 'var:preset|font-size|'.length )\n\t\t: undefined;\n\tconst fontFamilySlug = fontFamilyValue?.startsWith(\n\t\t'var:preset|font-family|'\n\t)\n\t\t? fontFamilyValue.substring( 'var:preset|font-family|'.length )\n\t\t: undefined;\n\tupdatedStyle.typography = {\n\t\t...omit( updatedStyle.typography, [ 'fontFamily' ] ),\n\t\tfontSize: fontSizeSlug ? undefined : fontSizeValue,\n\t};\n\treturn {\n\t\tstyle: cleanEmptyObject( updatedStyle ),\n\t\tfontFamily: fontFamilySlug,\n\t\tfontSize: fontSizeSlug,\n\t};\n}\n\nfunction attributesToStyle( attributes ) {\n\treturn {\n\t\t...attributes.style,\n\t\ttypography: {\n\t\t\t...attributes.style?.typography,\n\t\t\tfontFamily: attributes.fontFamily\n\t\t\t\t? 'var:preset|font-family|' + attributes.fontFamily\n\t\t\t\t: undefined,\n\t\t\tfontSize: attributes.fontSize\n\t\t\t\t? 'var:preset|font-size|' + attributes.fontSize\n\t\t\t\t: attributes.style?.typography?.fontSize,\n\t\t},\n\t};\n}\n\nfunction TypographyInspectorControl( { children, resetAllFilter } ) {\n\tconst attributesResetAllFilter = useCallback(\n\t\t( attributes ) => {\n\t\t\tconst existingStyle = attributesToStyle( attributes );\n\t\t\tconst updatedStyle = resetAllFilter( existingStyle );\n\t\t\treturn {\n\t\t\t\t...attributes,\n\t\t\t\t...styleToAttributes( updatedStyle ),\n\t\t\t};\n\t\t},\n\t\t[ resetAllFilter ]\n\t);\n\n\treturn (\n\t\t<InspectorControls\n\t\t\tgroup=\"typography\"\n\t\t\tresetAllFilter={ attributesResetAllFilter }\n\t\t>\n\t\t\t{ children }\n\t\t</InspectorControls>\n\t);\n}\n\nexport function TypographyPanel( { clientId, name, setAttributes, settings } ) {\n\tfunction selector( select ) {\n\t\tconst { style, fontFamily, fontSize } =\n\t\t\tselect( blockEditorStore ).getBlockAttributes( clientId ) || {};\n\t\treturn { style, fontFamily, fontSize };\n\t}\n\tconst { style, fontFamily, fontSize } = useSelect( selector, [ clientId ] );\n\tconst isEnabled = useHasTypographyPanel( settings );\n\tconst value = useMemo(\n\t\t() => attributesToStyle( { style, fontFamily, fontSize } ),\n\t\t[ style, fontSize, fontFamily ]\n\t);\n\n\tconst onChange = ( newStyle ) => {\n\t\tsetAttributes( styleToAttributes( newStyle ) );\n\t};\n\n\tif ( ! isEnabled ) {\n\t\treturn null;\n\t}\n\n\tconst defaultControls = getBlockSupport( name, [\n\t\tTYPOGRAPHY_SUPPORT_KEY,\n\t\t'__experimentalDefaultControls',\n\t] );\n\n\treturn (\n\t\t<StylesTypographyPanel\n\t\t\tas={ TypographyInspectorControl }\n\t\t\tpanelId={ clientId }\n\t\t\tsettings={ settings }\n\t\t\tvalue={ value }\n\t\t\tonChange={ onChange }\n\t\t\tdefaultControls={ defaultControls }\n\t\t/>\n\t);\n}\n\nexport const hasTypographySupport = ( blockName ) => {\n\treturn TYPOGRAPHY_SUPPORT_KEYS.some( ( key ) =>\n\t\thasBlockSupport( blockName, key )\n\t);\n};\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,e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C;EAED,IAAK,CAAEH,SAAS,EAAG;IAClB,OAAO,IAAI;EACZ;EAEA,MAAMI,eAAe,GAAGrE,eAAe,CAAE2D,IAAI,EAAE,CAC9C3B,sBAAsB,EACtB,+BAA+B,CAC9B,CAAC;EAEH,OACCuB,aAAA,CAAChD,qBAAqB;IACrB+D,EAAE,EAAGpB,0BAA4B;IACjCqB,OAAO,EAAGb,QAAU;IACpBG,QAAQ,EAAGA,QAAU;IACrBK,KAAK,EAAGA,KAAO;IACfC,QAAQ,EAAGA,QAAU;IACrBE,eAAe,EAAGA;EAAiB,CACnC,CAAC;AAEJ;AAEA,OAAO,MAAMG,oBAAoB,GAAKC,SAAS,IAAM;EACpD,OAAOxC,uBAAuB,CAACyC,IAAI,CAAInD,GAAG,IACzCtB,eAAe,CAAEwE,SAAS,EAAElD,GAAI,CACjC,CAAC;AACF,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["useSelect","memo","PanelBody","__","InspectorControls","useHasTypographyPanel","store","blockEditorStore","LINE_HEIGHT_SUPPORT_KEY","LineHeightEdit","FONT_SIZE_SUPPORT_KEY","FontSizeEdit","TYPOGRAPHY_SUPPORT_KEY","TYPOGRAPHY_SUPPORT_KEYS","TypographyPanelPure","clientId","setAttributes","settings","selector","select","style","fontFamily","fontSize","getBlockAttributes","isEnabled","props","attributes","createElement","title","TypographyPanel"],"sources":["@wordpress/block-editor/src/hooks/typography.native.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { memo } from '@wordpress/element';\nimport { PanelBody } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport InspectorControls from '../components/inspector-controls';\nimport { useHasTypographyPanel } from '../components/global-styles/typography-panel';\n\nimport { store as blockEditorStore } from '../store';\n\nimport { LINE_HEIGHT_SUPPORT_KEY, LineHeightEdit } from './line-height';\nimport { FONT_SIZE_SUPPORT_KEY, FontSizeEdit } from './font-size';\n\nexport const TYPOGRAPHY_SUPPORT_KEY = 'typography';\nexport const TYPOGRAPHY_SUPPORT_KEYS = [\n\tLINE_HEIGHT_SUPPORT_KEY,\n\tFONT_SIZE_SUPPORT_KEY,\n];\n\nfunction TypographyPanelPure( { clientId, setAttributes, settings } ) {\n\tfunction selector( select ) {\n\t\tconst { style, fontFamily, fontSize } =\n\t\t\tselect( blockEditorStore ).getBlockAttributes( clientId ) || {};\n\t\treturn { style, fontFamily, fontSize };\n\t}\n\tconst { style, fontSize } = useSelect( selector, [ clientId ] );\n\tconst isEnabled = useHasTypographyPanel( settings );\n\n\tif ( ! isEnabled ) {\n\t\treturn null;\n\t}\n\n\tconst props = {\n\t\tattributes: {\n\t\t\tfontSize,\n\t\t\tstyle,\n\t\t},\n\t\tsetAttributes,\n\t};\n\n\treturn (\n\t\t<InspectorControls>\n\t\t\t<PanelBody title={ __( 'Typography' ) }>\n\t\t\t\t<FontSizeEdit { ...props } />\n\t\t\t\t<LineHeightEdit { ...props } />\n\t\t\t</PanelBody>\n\t\t</InspectorControls>\n\t);\n}\n\n// We don't want block controls to re-render when typing inside a block. `pure`\n// will prevent re-renders unless props change, so only pass the needed props\n// and not the whole attributes object.\nexport const TypographyPanel = memo( TypographyPanelPure );\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,IAAI,QAAQ,oBAAoB;AACzC,SAASC,SAAS,QAAQ,uBAAuB;AACjD,SAASC,EAAE,QAAQ,iBAAiB;;AAEpC;AACA;AACA;AACA,OAAOC,iBAAiB,MAAM,kCAAkC;AAChE,SAASC,qBAAqB,QAAQ,8CAA8C;AAEpF,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,UAAU;AAEpD,SAASC,uBAAuB,EAAEC,cAAc,QAAQ,eAAe;AACvE,SAASC,qBAAqB,EAAEC,YAAY,QAAQ,aAAa;AAEjE,OAAO,MAAMC,sBAAsB,GAAG,YAAY;AAClD,OAAO,MAAMC,uBAAuB,GAAG,CACtCL,uBAAuB,EACvBE,qBAAqB,CACrB;AAED,SAASI,mBAAmBA,CAAE;EAAEC,QAAQ;EAAEC,aAAa;EAAEC;AAAS,CAAC,EAAG;EACrE,SAASC,QAAQA,CAAEC,MAAM,EAAG;IAC3B,MAAM;MAAEC,KAAK;MAAEC,UAAU;MAAEC;IAAS,CAAC,GACpCH,MAAM,CAAEZ,gBAAiB,CAAC,CAACgB,kBAAkB,CAAER,QAAS,CAAC,IAAI,CAAC,CAAC;IAChE,OAAO;MAAEK,KAAK;MAAEC,UAAU;MAAEC;IAAS,CAAC;EACvC;EACA,MAAM;IAAEF,KAAK;IAAEE;EAAS,CAAC,GAAGtB,SAAS,CAAEkB,QAAQ,EAAE,CAAEH,QAAQ,CAAG,CAAC;EAC/D,MAAMS,SAAS,GAAGnB,qBAAqB,CAAEY,QAAS,CAAC;EAEnD,IAAK,CAAEO,SAAS,EAAG;IAClB,OAAO,IAAI;EACZ;EAEA,MAAMC,KAAK,GAAG;IACbC,UAAU,EAAE;MACXJ,QAAQ;MACRF;IACD,CAAC;IACDJ;EACD,CAAC;EAED,OACCW,aAAA,CAACvB,iBAAiB,QACjBuB,aAAA,CAACzB,SAAS;IAAC0B,KAAK,EAAGzB,EAAE,CAAE,YAAa;EAAG,GACtCwB,aAAA,CAAChB,YAAY;IAAA,GAAMc;EAAK,CAAI,CAAC,EAC7BE,aAAA,CAAClB,cAAc;IAAA,GAAMgB;EAAK,CAAI,CACpB,CACO,CAAC;AAEtB;;AAEA;AACA;AACA;AACA,OAAO,MAAMI,eAAe,GAAG5B,IAAI,CAAEa,mBAAoB,CAAC"}
1
+ {"version":3,"names":["useSelect","memo","PanelBody","__","InspectorControls","useHasTypographyPanel","store","blockEditorStore","LINE_HEIGHT_SUPPORT_KEY","LineHeightEdit","FONT_SIZE_SUPPORT_KEY","FontSizeEdit","TYPOGRAPHY_SUPPORT_KEY","TYPOGRAPHY_SUPPORT_KEYS","TypographyPanelPure","clientId","setAttributes","settings","selector","select","style","fontFamily","fontSize","getBlockAttributes","isEnabled","props","attributes","createElement","title","TypographyPanel"],"sources":["@wordpress/block-editor/src/hooks/typography.native.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { memo } from '@wordpress/element';\nimport { PanelBody } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport InspectorControls from '../components/inspector-controls';\nimport { useHasTypographyPanel } from '../components/global-styles/typography-panel';\n\nimport { store as blockEditorStore } from '../store';\n\nimport { LINE_HEIGHT_SUPPORT_KEY, LineHeightEdit } from './line-height';\nimport { FONT_SIZE_SUPPORT_KEY, FontSizeEdit } from './font-size';\n\nexport const TYPOGRAPHY_SUPPORT_KEY = 'typography';\nexport const TYPOGRAPHY_SUPPORT_KEYS = [\n\tLINE_HEIGHT_SUPPORT_KEY,\n\tFONT_SIZE_SUPPORT_KEY,\n];\n\nfunction TypographyPanelPure( { clientId, setAttributes, settings } ) {\n\tfunction selector( select ) {\n\t\tconst { style, fontFamily, fontSize } =\n\t\t\tselect( blockEditorStore ).getBlockAttributes( clientId ) || {};\n\t\treturn { style, fontFamily, fontSize };\n\t}\n\tconst { style, fontSize } = useSelect( selector, [ clientId ] );\n\tconst isEnabled = useHasTypographyPanel( settings );\n\n\tif ( ! isEnabled ) {\n\t\treturn null;\n\t}\n\n\tconst props = {\n\t\tattributes: {\n\t\t\tfontSize,\n\t\t\tstyle,\n\t\t},\n\t\tsetAttributes,\n\t};\n\n\treturn (\n\t\t<InspectorControls>\n\t\t\t<PanelBody title={ __( 'Typography' ) }>\n\t\t\t\t<FontSizeEdit { ...props } />\n\t\t\t\t<LineHeightEdit { ...props } />\n\t\t\t</PanelBody>\n\t\t</InspectorControls>\n\t);\n}\n\n// We don't want block controls to re-render when typing inside a block. `pure`\n// will prevent re-renders unless props change, so only pass the needed props\n// and not the whole attributes object.\nexport const TypographyPanel = memo( TypographyPanelPure );\n"],"mappings":";A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a;EAAG,GACtCwB,aAAA,CAAChB,YAAY;IAAA,GAAMc;EAAK,CAAI,CAAC,EAC7BE,aAAA,CAAClB,cAAc;IAAA,GAAMgB;EAAK,CAAI,CACpB,CACO,CAAC;AAEtB;;AAEA;AACA;AACA;AACA,OAAO,MAAMI,eAAe,GAAG5B,IAAI,CAAEa,mBAAoB,CAAC","ignoreList":[]}
@@ -2,12 +2,11 @@ import { createElement, Fragment } from "react";
2
2
  /**
3
3
  * WordPress dependencies
4
4
  */
5
- import { getBlockType, store as blocksStore } from '@wordpress/blocks';
5
+ import { store as blocksStore } from '@wordpress/blocks';
6
6
  import { createHigherOrderComponent } from '@wordpress/compose';
7
- import { useSelect } from '@wordpress/data';
8
- import { useLayoutEffect, useCallback, useState } from '@wordpress/element';
7
+ import { useRegistry, useSelect } from '@wordpress/data';
8
+ import { useCallback } from '@wordpress/element';
9
9
  import { addFilter } from '@wordpress/hooks';
10
- import { RichTextData } from '@wordpress/rich-text';
11
10
 
12
11
  /**
13
12
  * Internal dependencies
@@ -53,144 +52,81 @@ export function canBindBlock(blockName) {
53
52
  export function canBindAttribute(blockName, attributeName) {
54
53
  return canBindBlock(blockName) && BLOCK_BINDINGS_ALLOWED_BLOCKS[blockName].includes(attributeName);
55
54
  }
56
-
57
- /**
58
- * This component is responsible for detecting and
59
- * propagating data changes from the source to the block.
60
- *
61
- * @param {Object} props - The component props.
62
- * @param {string} props.attrName - The attribute name.
63
- * @param {Object} props.blockProps - The block props with bound attribute.
64
- * @param {Object} props.source - Source handler.
65
- * @param {Object} props.args - The arguments to pass to the source.
66
- * @param {Function} props.onPropValueChange - The function to call when the attribute value changes.
67
- * @return {null} Data-handling component. Render nothing.
68
- */
69
- const BindingConnector = ({
70
- args,
71
- attrName,
72
- blockProps,
73
- source,
74
- onPropValueChange
75
- }) => {
76
- const {
77
- placeholder,
78
- value: propValue
79
- } = source.useSource(blockProps, args);
55
+ export const withBlockBindingSupport = createHigherOrderComponent(BlockEdit => props => {
56
+ const registry = useRegistry();
57
+ const sources = useSelect(select => unlock(select(blocksStore)).getAllBlockBindingsSources());
58
+ const bindings = props.attributes.metadata?.bindings;
80
59
  const {
81
- name: blockName
82
- } = blockProps;
83
- const attrValue = blockProps.attributes[attrName];
84
- const updateBoundAttibute = useCallback((newAttrValue, prevAttrValue) => {
85
- /*
86
- * If the attribute is a RichTextData instance,
87
- * (core/paragraph, core/heading, core/button, etc.)
88
- * compare its HTML representation with the new value.
89
- *
90
- * To do: it looks like a workaround.
91
- * Consider improving the attribute and metadata fields types.
92
- */
93
- if (prevAttrValue instanceof RichTextData) {
94
- // Bail early if the Rich Text value is the same.
95
- if (prevAttrValue.toHTMLString() === newAttrValue) {
96
- return;
97
- }
98
-
99
- /*
100
- * To preserve the value type,
101
- * convert the new value to a RichTextData instance.
102
- */
103
- newAttrValue = RichTextData.fromHTMLString(newAttrValue);
104
- }
105
- if (prevAttrValue === newAttrValue) {
60
+ name,
61
+ clientId,
62
+ context
63
+ } = props;
64
+ const boundAttributes = useSelect(() => {
65
+ if (!bindings) {
106
66
  return;
107
67
  }
108
- onPropValueChange({
109
- [attrName]: newAttrValue
110
- });
111
- }, [attrName, onPropValueChange]);
112
- useLayoutEffect(() => {
113
- if (typeof propValue !== 'undefined') {
114
- updateBoundAttibute(propValue, attrValue);
115
- } else if (placeholder) {
116
- /*
117
- * Placeholder fallback.
118
- * If the attribute is `src` or `href`,
119
- * a placeholder can't be used because it is not a valid url.
120
- * Adding this workaround until
121
- * attributes and metadata fields types are improved and include `url`.
122
- */
123
- const htmlAttribute = getBlockType(blockName).attributes[attrName].attribute;
124
- if (htmlAttribute === 'src' || htmlAttribute === 'href') {
125
- updateBoundAttibute(null);
126
- return;
68
+ const attributes = {};
69
+ for (const [attributeName, boundAttribute] of Object.entries(bindings)) {
70
+ const source = sources[boundAttribute.source];
71
+ if (!source?.getValue || !canBindAttribute(name, attributeName)) {
72
+ continue;
73
+ }
74
+ const args = {
75
+ registry,
76
+ context,
77
+ clientId,
78
+ attributeName,
79
+ args: boundAttribute.args
80
+ };
81
+ attributes[attributeName] = source.getValue(args);
82
+ if (attributes[attributeName] === undefined) {
83
+ if (attributeName === 'url') {
84
+ attributes[attributeName] = null;
85
+ } else {
86
+ attributes[attributeName] = source.getPlaceholder?.(args);
87
+ }
127
88
  }
128
- updateBoundAttibute(placeholder);
129
- }
130
- }, [updateBoundAttibute, propValue, attrValue, placeholder, blockName, attrName]);
131
- return null;
132
- };
133
-
134
- /**
135
- * BlockBindingBridge acts like a component wrapper
136
- * that connects the bound attributes of a block
137
- * to the source handlers.
138
- * For this, it creates a BindingConnector for each bound attribute.
139
- *
140
- * @param {Object} props - The component props.
141
- * @param {Object} props.blockProps - The BlockEdit props object.
142
- * @param {Object} props.bindings - The block bindings settings.
143
- * @param {Function} props.onPropValueChange - The function to call when the attribute value changes.
144
- * @return {null} Data-handling component. Render nothing.
145
- */
146
- function BlockBindingBridge({
147
- blockProps,
148
- bindings,
149
- onPropValueChange
150
- }) {
151
- const blockBindingsSources = unlock(useSelect(blocksStore)).getAllBlockBindingsSources();
152
- return createElement(Fragment, null, Object.entries(bindings).map(([attrName, boundAttribute]) => {
153
- // Bail early if the block doesn't have a valid source handler.
154
- const source = blockBindingsSources[boundAttribute.source];
155
- if (!source?.useSource) {
156
- return null;
157
89
  }
158
- return createElement(BindingConnector, {
159
- key: attrName,
160
- attrName: attrName,
161
- source: source,
162
- blockProps: blockProps,
163
- args: boundAttribute.args,
164
- onPropValueChange: onPropValueChange
90
+ return attributes;
91
+ }, [bindings, name, clientId, context, registry, sources]);
92
+ const {
93
+ setAttributes
94
+ } = props;
95
+ const _setAttributes = useCallback(nextAttributes => {
96
+ registry.batch(() => {
97
+ if (!bindings) {
98
+ return setAttributes(nextAttributes);
99
+ }
100
+ const keptAttributes = {
101
+ ...nextAttributes
102
+ };
103
+ for (const [attributeName, boundAttribute] of Object.entries(bindings)) {
104
+ const source = sources[boundAttribute.source];
105
+ if (!source?.setValue || !canBindAttribute(name, attributeName)) {
106
+ continue;
107
+ }
108
+ source.setValue({
109
+ registry,
110
+ context,
111
+ clientId,
112
+ attributeName,
113
+ args: boundAttribute.args,
114
+ value: nextAttributes[attributeName]
115
+ });
116
+ delete keptAttributes[attributeName];
117
+ }
118
+ if (Object.keys(keptAttributes).length) {
119
+ setAttributes(keptAttributes);
120
+ }
165
121
  });
166
- }));
167
- }
168
- const withBlockBindingSupport = createHigherOrderComponent(BlockEdit => props => {
169
- /*
170
- * Collect and update the bound attributes
171
- * in a separate state.
172
- */
173
- const [boundAttributes, setBoundAttributes] = useState({});
174
- const updateBoundAttributes = useCallback(newAttributes => setBoundAttributes(prev => ({
175
- ...prev,
176
- ...newAttributes
177
- })), []);
178
-
179
- /*
180
- * Create binding object filtering
181
- * only the attributes that can be bound.
182
- */
183
- const bindings = Object.fromEntries(Object.entries(props.attributes.metadata?.bindings || {}).filter(([attrName]) => canBindAttribute(props.name, attrName)));
184
- return createElement(Fragment, null, Object.keys(bindings).length > 0 && createElement(BlockBindingBridge, {
185
- blockProps: props,
186
- bindings: bindings,
187
- onPropValueChange: updateBoundAttributes
188
- }), createElement(BlockEdit, {
122
+ }, [registry, bindings, name, clientId, context, setAttributes, sources]);
123
+ return createElement(Fragment, null, createElement(BlockEdit, {
189
124
  ...props,
190
125
  attributes: {
191
126
  ...props.attributes,
192
127
  ...boundAttributes
193
- }
128
+ },
129
+ setAttributes: _setAttributes
194
130
  }));
195
131
  }, 'withBlockBindingSupport');
196
132
 
@@ -1 +1 @@
1
- {"version":3,"names":["getBlockType","store","blocksStore","createHigherOrderComponent","useSelect","useLayoutEffect","useCallback","useState","addFilter","RichTextData","unlock","BLOCK_BINDINGS_ALLOWED_BLOCKS","canBindBlock","blockName","canBindAttribute","attributeName","includes","BindingConnector","args","attrName","blockProps","source","onPropValueChange","placeholder","value","propValue","useSource","name","attrValue","attributes","updateBoundAttibute","newAttrValue","prevAttrValue","toHTMLString","fromHTMLString","htmlAttribute","attribute","BlockBindingBridge","bindings","blockBindingsSources","getAllBlockBindingsSources","createElement","Fragment","Object","entries","map","boundAttribute","key","withBlockBindingSupport","BlockEdit","props","boundAttributes","setBoundAttributes","updateBoundAttributes","newAttributes","prev","fromEntries","metadata","filter","keys","length","shimAttributeSource","settings","edit"],"sources":["@wordpress/block-editor/src/hooks/use-bindings-attributes.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getBlockType, store as blocksStore } from '@wordpress/blocks';\nimport { createHigherOrderComponent } from '@wordpress/compose';\nimport { useSelect } from '@wordpress/data';\nimport { useLayoutEffect, useCallback, useState } from '@wordpress/element';\nimport { addFilter } from '@wordpress/hooks';\nimport { RichTextData } from '@wordpress/rich-text';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../lock-unlock';\n\n/** @typedef {import('@wordpress/compose').WPHigherOrderComponent} WPHigherOrderComponent */\n/** @typedef {import('@wordpress/blocks').WPBlockSettings} WPBlockSettings */\n\n/**\n * Given a binding of block attributes, returns a higher order component that\n * overrides its `attributes` and `setAttributes` props to sync any changes needed.\n *\n * @return {WPHigherOrderComponent} Higher-order component.\n */\n\nconst BLOCK_BINDINGS_ALLOWED_BLOCKS = {\n\t'core/paragraph': [ 'content' ],\n\t'core/heading': [ 'content' ],\n\t'core/image': [ 'url', 'title', 'alt' ],\n\t'core/button': [ 'url', 'text', 'linkTarget' ],\n};\n\n/**\n * Based on the given block name,\n * check if it is possible to bind the block.\n *\n * @param {string} blockName - The block name.\n * @return {boolean} Whether it is possible to bind the block to sources.\n */\nexport function canBindBlock( blockName ) {\n\treturn blockName in BLOCK_BINDINGS_ALLOWED_BLOCKS;\n}\n\n/**\n * Based on the given block name and attribute name,\n * check if it is possible to bind the block attribute.\n *\n * @param {string} blockName - The block name.\n * @param {string} attributeName - The attribute name.\n * @return {boolean} Whether it is possible to bind the block attribute.\n */\nexport function canBindAttribute( blockName, attributeName ) {\n\treturn (\n\t\tcanBindBlock( blockName ) &&\n\t\tBLOCK_BINDINGS_ALLOWED_BLOCKS[ blockName ].includes( attributeName )\n\t);\n}\n\n/**\n * This component is responsible for detecting and\n * propagating data changes from the source to the block.\n *\n * @param {Object} props - The component props.\n * @param {string} props.attrName - The attribute name.\n * @param {Object} props.blockProps - The block props with bound attribute.\n * @param {Object} props.source - Source handler.\n * @param {Object} props.args - The arguments to pass to the source.\n * @param {Function} props.onPropValueChange - The function to call when the attribute value changes.\n * @return {null} Data-handling component. Render nothing.\n */\nconst BindingConnector = ( {\n\targs,\n\tattrName,\n\tblockProps,\n\tsource,\n\tonPropValueChange,\n} ) => {\n\tconst { placeholder, value: propValue } = source.useSource(\n\t\tblockProps,\n\t\targs\n\t);\n\n\tconst { name: blockName } = blockProps;\n\tconst attrValue = blockProps.attributes[ attrName ];\n\n\tconst updateBoundAttibute = useCallback(\n\t\t( newAttrValue, prevAttrValue ) => {\n\t\t\t/*\n\t\t\t * If the attribute is a RichTextData instance,\n\t\t\t * (core/paragraph, core/heading, core/button, etc.)\n\t\t\t * compare its HTML representation with the new value.\n\t\t\t *\n\t\t\t * To do: it looks like a workaround.\n\t\t\t * Consider improving the attribute and metadata fields types.\n\t\t\t */\n\t\t\tif ( prevAttrValue instanceof RichTextData ) {\n\t\t\t\t// Bail early if the Rich Text value is the same.\n\t\t\t\tif ( prevAttrValue.toHTMLString() === newAttrValue ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t/*\n\t\t\t\t * To preserve the value type,\n\t\t\t\t * convert the new value to a RichTextData instance.\n\t\t\t\t */\n\t\t\t\tnewAttrValue = RichTextData.fromHTMLString( newAttrValue );\n\t\t\t}\n\n\t\t\tif ( prevAttrValue === newAttrValue ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tonPropValueChange( { [ attrName ]: newAttrValue } );\n\t\t},\n\t\t[ attrName, onPropValueChange ]\n\t);\n\n\tuseLayoutEffect( () => {\n\t\tif ( typeof propValue !== 'undefined' ) {\n\t\t\tupdateBoundAttibute( propValue, attrValue );\n\t\t} else if ( placeholder ) {\n\t\t\t/*\n\t\t\t * Placeholder fallback.\n\t\t\t * If the attribute is `src` or `href`,\n\t\t\t * a placeholder can't be used because it is not a valid url.\n\t\t\t * Adding this workaround until\n\t\t\t * attributes and metadata fields types are improved and include `url`.\n\t\t\t */\n\t\t\tconst htmlAttribute =\n\t\t\t\tgetBlockType( blockName ).attributes[ attrName ].attribute;\n\n\t\t\tif ( htmlAttribute === 'src' || htmlAttribute === 'href' ) {\n\t\t\t\tupdateBoundAttibute( null );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tupdateBoundAttibute( placeholder );\n\t\t}\n\t}, [\n\t\tupdateBoundAttibute,\n\t\tpropValue,\n\t\tattrValue,\n\t\tplaceholder,\n\t\tblockName,\n\t\tattrName,\n\t] );\n\n\treturn null;\n};\n\n/**\n * BlockBindingBridge acts like a component wrapper\n * that connects the bound attributes of a block\n * to the source handlers.\n * For this, it creates a BindingConnector for each bound attribute.\n *\n * @param {Object} props - The component props.\n * @param {Object} props.blockProps - The BlockEdit props object.\n * @param {Object} props.bindings - The block bindings settings.\n * @param {Function} props.onPropValueChange - The function to call when the attribute value changes.\n * @return {null} Data-handling component. Render nothing.\n */\nfunction BlockBindingBridge( { blockProps, bindings, onPropValueChange } ) {\n\tconst blockBindingsSources = unlock(\n\t\tuseSelect( blocksStore )\n\t).getAllBlockBindingsSources();\n\n\treturn (\n\t\t<>\n\t\t\t{ Object.entries( bindings ).map(\n\t\t\t\t( [ attrName, boundAttribute ] ) => {\n\t\t\t\t\t// Bail early if the block doesn't have a valid source handler.\n\t\t\t\t\tconst source =\n\t\t\t\t\t\tblockBindingsSources[ boundAttribute.source ];\n\t\t\t\t\tif ( ! source?.useSource ) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<BindingConnector\n\t\t\t\t\t\t\tkey={ attrName }\n\t\t\t\t\t\t\tattrName={ attrName }\n\t\t\t\t\t\t\tsource={ source }\n\t\t\t\t\t\t\tblockProps={ blockProps }\n\t\t\t\t\t\t\targs={ boundAttribute.args }\n\t\t\t\t\t\t\tonPropValueChange={ onPropValueChange }\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\nconst withBlockBindingSupport = createHigherOrderComponent(\n\t( BlockEdit ) => ( props ) => {\n\t\t/*\n\t\t * Collect and update the bound attributes\n\t\t * in a separate state.\n\t\t */\n\t\tconst [ boundAttributes, setBoundAttributes ] = useState( {} );\n\t\tconst updateBoundAttributes = useCallback(\n\t\t\t( newAttributes ) =>\n\t\t\t\tsetBoundAttributes( ( prev ) => ( {\n\t\t\t\t\t...prev,\n\t\t\t\t\t...newAttributes,\n\t\t\t\t} ) ),\n\t\t\t[]\n\t\t);\n\n\t\t/*\n\t\t * Create binding object filtering\n\t\t * only the attributes that can be bound.\n\t\t */\n\t\tconst bindings = Object.fromEntries(\n\t\t\tObject.entries( props.attributes.metadata?.bindings || {} ).filter(\n\t\t\t\t( [ attrName ] ) => canBindAttribute( props.name, attrName )\n\t\t\t)\n\t\t);\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{ Object.keys( bindings ).length > 0 && (\n\t\t\t\t\t<BlockBindingBridge\n\t\t\t\t\t\tblockProps={ props }\n\t\t\t\t\t\tbindings={ bindings }\n\t\t\t\t\t\tonPropValueChange={ updateBoundAttributes }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\n\t\t\t\t<BlockEdit\n\t\t\t\t\t{ ...props }\n\t\t\t\t\tattributes={ { ...props.attributes, ...boundAttributes } }\n\t\t\t\t/>\n\t\t\t</>\n\t\t);\n\t},\n\t'withBlockBindingSupport'\n);\n\n/**\n * Filters a registered block's settings to enhance a block's `edit` component\n * to upgrade bound attributes.\n *\n * @param {WPBlockSettings} settings - Registered block settings.\n * @param {string} name - Block name.\n * @return {WPBlockSettings} Filtered block settings.\n */\nfunction shimAttributeSource( settings, name ) {\n\tif ( ! canBindBlock( name ) ) {\n\t\treturn settings;\n\t}\n\n\treturn {\n\t\t...settings,\n\t\tedit: withBlockBindingSupport( settings.edit ),\n\t};\n}\n\naddFilter(\n\t'blocks.registerBlockType',\n\t'core/editor/custom-sources-backwards-compatibility/shim-attribute-source',\n\tshimAttributeSource\n);\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,YAAY,EAAEC,KAAK,IAAIC,WAAW,QAAQ,mBAAmB;AACtE,SAASC,0BAA0B,QAAQ,oBAAoB;AAC/D,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,eAAe,EAAEC,WAAW,EAAEC,QAAQ,QAAQ,oBAAoB;AAC3E,SAASC,SAAS,QAAQ,kBAAkB;AAC5C,SAASC,YAAY,QAAQ,sBAAsB;;AAEnD;AACA;AACA;AACA,SAASC,MAAM,QAAQ,gBAAgB;;AAEvC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAMC,6BAA6B,GAAG;EACrC,gBAAgB,EAAE,CAAE,SAAS,CAAE;EAC/B,cAAc,EAAE,CAAE,SAAS,CAAE;EAC7B,YAAY,EAAE,CAAE,KAAK,EAAE,OAAO,EAAE,KAAK,CAAE;EACvC,aAAa,EAAE,CAAE,KAAK,EAAE,MAAM,EAAE,YAAY;AAC7C,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,YAAYA,CAAEC,SAAS,EAAG;EACzC,OAAOA,SAAS,IAAIF,6BAA6B;AAClD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASG,gBAAgBA,CAAED,SAAS,EAAEE,aAAa,EAAG;EAC5D,OACCH,YAAY,CAAEC,SAAU,CAAC,IACzBF,6BAA6B,CAAEE,SAAS,CAAE,CAACG,QAAQ,CAAED,aAAc,CAAC;AAEtE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAME,gBAAgB,GAAGA,CAAE;EAC1BC,IAAI;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AAGD;EACJ,CAAC,CAAG,CAAC,EACN,EACD,CAAC;;EAED;AACF;AACA;AACA;EACE,MAAMhB,QAAQ,GAAGK,MAAM,CAACa,WAAW,CAClCb,MAAM,CAACC,OAAO,CAAEM,KAAK,CAACrB,UAAU,CAAC4B,QAAQ,EAAEnB,QAAQ,IAAI,CAAC,CAAE,CAAC,CAACoB,MAAM,CACjE,CAAE,CAAEvC,QAAQ,CAAE,KAAML,gBAAgB,CAAEoC,KAAK,CAACvB,IAAI,EAAER,QAAS,CAC5D,CACD,CAAC;EAED,OACCsB,aAAA,CAAAC,QAAA,QACGC,MAAM,CAACgB,IAAI,CAAErB,QAAS,CAAC,CAACsB,MAAM,GAAG,CAAC,IACnCnB,aAAA,CAACJ,kBAAkB;IAClBjB,UAAU,EAAG8B,KAAO;IACpBZ,QAAQ,EAAGA,QAAU;IACrBhB,iBAAiB,EAAG+B;EAAuB,CAC3C,CACD,EAEDZ,aAAA,CAACQ,SAAS;IAAA,GACJC,KAAK;IACVrB,UAAU,EAAG;MAAE,GAAGqB,KAAK,CAACrB,UAAU;MAAE,GAAGsB;IAAgB;EAAG,CAC1D,CACA,CAAC;AAEL,CAAC,EACD,yBACD,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASU,mBAAmBA,CAAEC,QAAQ,EAAEnC,IAAI,EAAG;EAC9C,IAAK,CAAEf,YAAY,CAAEe,IAAK,CAAC,EAAG;IAC7B,OAAOmC,QAAQ;EAChB;EAEA,OAAO;IACN,GAAGA,QAAQ;IACXC,IAAI,EAAEf,uBAAuB,CAAEc,QAAQ,CAACC,IAAK;EAC9C,CAAC;AACF;AAEAvD,SAAS,CACR,0BAA0B,EAC1B,0EAA0E,EAC1EqD,mBACD,CAAC"}
1
+ {"version":3,"names":["store","blocksStore","createHigherOrderComponent","useRegistry","useSelect","useCallback","addFilter","unlock","BLOCK_BINDINGS_ALLOWED_BLOCKS","canBindBlock","blockName","canBindAttribute","attributeName","includes","withBlockBindingSupport","BlockEdit","props","registry","sources","select","getAllBlockBindingsSources","bindings","attributes","metadata","name","clientId","context","boundAttributes","boundAttribute","Object","entries","source","getValue","args","undefined","getPlaceholder","setAttributes","_setAttributes","nextAttributes","batch","keptAttributes","setValue","value","keys","length","createElement","Fragment","shimAttributeSource","settings","edit"],"sources":["@wordpress/block-editor/src/hooks/use-bindings-attributes.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport { createHigherOrderComponent } from '@wordpress/compose';\nimport { useRegistry, useSelect } from '@wordpress/data';\nimport { useCallback } from '@wordpress/element';\nimport { addFilter } from '@wordpress/hooks';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../lock-unlock';\n\n/** @typedef {import('@wordpress/compose').WPHigherOrderComponent} WPHigherOrderComponent */\n/** @typedef {import('@wordpress/blocks').WPBlockSettings} WPBlockSettings */\n\n/**\n * Given a binding of block attributes, returns a higher order component that\n * overrides its `attributes` and `setAttributes` props to sync any changes needed.\n *\n * @return {WPHigherOrderComponent} Higher-order component.\n */\n\nconst BLOCK_BINDINGS_ALLOWED_BLOCKS = {\n\t'core/paragraph': [ 'content' ],\n\t'core/heading': [ 'content' ],\n\t'core/image': [ 'url', 'title', 'alt' ],\n\t'core/button': [ 'url', 'text', 'linkTarget' ],\n};\n\n/**\n * Based on the given block name,\n * check if it is possible to bind the block.\n *\n * @param {string} blockName - The block name.\n * @return {boolean} Whether it is possible to bind the block to sources.\n */\nexport function canBindBlock( blockName ) {\n\treturn blockName in BLOCK_BINDINGS_ALLOWED_BLOCKS;\n}\n\n/**\n * Based on the given block name and attribute name,\n * check if it is possible to bind the block attribute.\n *\n * @param {string} blockName - The block name.\n * @param {string} attributeName - The attribute name.\n * @return {boolean} Whether it is possible to bind the block attribute.\n */\nexport function canBindAttribute( blockName, attributeName ) {\n\treturn (\n\t\tcanBindBlock( blockName ) &&\n\t\tBLOCK_BINDINGS_ALLOWED_BLOCKS[ blockName ].includes( attributeName )\n\t);\n}\n\nexport const withBlockBindingSupport = createHigherOrderComponent(\n\t( BlockEdit ) => ( props ) => {\n\t\tconst registry = useRegistry();\n\t\tconst sources = useSelect( ( select ) =>\n\t\t\tunlock( select( blocksStore ) ).getAllBlockBindingsSources()\n\t\t);\n\t\tconst bindings = props.attributes.metadata?.bindings;\n\t\tconst { name, clientId, context } = props;\n\t\tconst boundAttributes = useSelect( () => {\n\t\t\tif ( ! bindings ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst attributes = {};\n\n\t\t\tfor ( const [ attributeName, boundAttribute ] of Object.entries(\n\t\t\t\tbindings\n\t\t\t) ) {\n\t\t\t\tconst source = sources[ boundAttribute.source ];\n\t\t\t\tif (\n\t\t\t\t\t! source?.getValue ||\n\t\t\t\t\t! canBindAttribute( name, attributeName )\n\t\t\t\t) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tconst args = {\n\t\t\t\t\tregistry,\n\t\t\t\t\tcontext,\n\t\t\t\t\tclientId,\n\t\t\t\t\tattributeName,\n\t\t\t\t\targs: boundAttribute.args,\n\t\t\t\t};\n\n\t\t\t\tattributes[ attributeName ] = source.getValue( args );\n\n\t\t\t\tif ( attributes[ attributeName ] === undefined ) {\n\t\t\t\t\tif ( attributeName === 'url' ) {\n\t\t\t\t\t\tattributes[ attributeName ] = null;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tattributes[ attributeName ] =\n\t\t\t\t\t\t\tsource.getPlaceholder?.( args );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn attributes;\n\t\t}, [ bindings, name, clientId, context, registry, sources ] );\n\n\t\tconst { setAttributes } = props;\n\n\t\tconst _setAttributes = useCallback(\n\t\t\t( nextAttributes ) => {\n\t\t\t\tregistry.batch( () => {\n\t\t\t\t\tif ( ! bindings ) {\n\t\t\t\t\t\treturn setAttributes( nextAttributes );\n\t\t\t\t\t}\n\n\t\t\t\t\tconst keptAttributes = { ...nextAttributes };\n\n\t\t\t\t\tfor ( const [\n\t\t\t\t\t\tattributeName,\n\t\t\t\t\t\tboundAttribute,\n\t\t\t\t\t] of Object.entries( bindings ) ) {\n\t\t\t\t\t\tconst source = sources[ boundAttribute.source ];\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t! source?.setValue ||\n\t\t\t\t\t\t\t! canBindAttribute( name, attributeName )\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tsource.setValue( {\n\t\t\t\t\t\t\tregistry,\n\t\t\t\t\t\t\tcontext,\n\t\t\t\t\t\t\tclientId,\n\t\t\t\t\t\t\tattributeName,\n\t\t\t\t\t\t\targs: boundAttribute.args,\n\t\t\t\t\t\t\tvalue: nextAttributes[ attributeName ],\n\t\t\t\t\t\t} );\n\t\t\t\t\t\tdelete keptAttributes[ attributeName ];\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( Object.keys( keptAttributes ).length ) {\n\t\t\t\t\t\tsetAttributes( keptAttributes );\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t},\n\t\t\t[\n\t\t\t\tregistry,\n\t\t\t\tbindings,\n\t\t\t\tname,\n\t\t\t\tclientId,\n\t\t\t\tcontext,\n\t\t\t\tsetAttributes,\n\t\t\t\tsources,\n\t\t\t]\n\t\t);\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<BlockEdit\n\t\t\t\t\t{ ...props }\n\t\t\t\t\tattributes={ { ...props.attributes, ...boundAttributes } }\n\t\t\t\t\tsetAttributes={ _setAttributes }\n\t\t\t\t/>\n\t\t\t</>\n\t\t);\n\t},\n\t'withBlockBindingSupport'\n);\n\n/**\n * Filters a registered block's settings to enhance a block's `edit` component\n * to upgrade bound attributes.\n *\n * @param {WPBlockSettings} settings - Registered block settings.\n * @param {string} name - Block name.\n * @return {WPBlockSettings} Filtered block settings.\n */\nfunction shimAttributeSource( settings, name ) {\n\tif ( ! canBindBlock( name ) ) {\n\t\treturn settings;\n\t}\n\n\treturn {\n\t\t...settings,\n\t\tedit: withBlockBindingSupport( settings.edit ),\n\t};\n}\n\naddFilter(\n\t'blocks.registerBlockType',\n\t'core/editor/custom-sources-backwards-compatibility/shim-attribute-source',\n\tshimAttributeSource\n);\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,KAAK,IAAIC,WAAW,QAAQ,mBAAmB;AACxD,SAASC,0BAA0B,QAAQ,oBAAoB;AAC/D,SAASC,WAAW,EAAEC,SAAS,QAAQ,iBAAiB;AACxD,SAASC,WAAW,QAAQ,oBAAoB;AAChD,SAASC,SAAS,QAAQ,kBAAkB;;AAE5C;AACA;AACA;AACA,SAASC,MAAM,QAAQ,gBAAgB;;AAEvC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAMC,6BAA6B,GAAG;EACrC,gBAAgB,EAAE,CAAE,SAAS,CAAE;EAC/B,cAAc,EAAE,CAAE,SAAS,CAAE;EAC7B,YAAY,EAAE,CAAE,KAAK,EAAE,OAAO,EAAE,KAAK,CAAE;EACvC,aAAa,EAAE,CAAE,KAAK,EAAE,MAAM,EAAE,YAAY;AAC7C,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,YAAYA,CAAEC,SAAS,EAAG;EACzC,OAAOA,SAAS,IAAIF,6BAA6B;AAClD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASG,gBAAgBA,CAAED,SAAS,EAAEE,aAAa,EAAG;EAC5D,OACCH,YAAY,CAAEC,SAAU,CAAC,IACzBF,6BAA6B,CAAEE,SAAS,CAAE,CAACG,QAAQ,CAAED,aAAc,CAAC;AAEtE;AAEA,OAAO,MAAME,uBAAuB,GAAGZ,0BAA0B,CAC9Da,SAAS,IAAQC,KAAK,IAAM;EAC7B,MAAMC,QAAQ,GAAGd,WAAW,CAAC,CAAC;EAC9B,MAAMe,OAAO,GAAGd,SAAS,CAAIe,MAAM,IA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CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASU,mBAAmBA,CAAEC,QAAQ,EAAExB,IAAI,EAAG;EAC9C,IAAK,CAAEf,YAAY,CAAEe,IAAK,CAAC,EAAG;IAC7B,OAAOwB,QAAQ;EAChB;EAEA,OAAO;IACN,GAAGA,QAAQ;IACXC,IAAI,EAAEnC,uBAAuB,CAAEkC,QAAQ,CAACC,IAAK;EAC9C,CAAC;AACF;AAEA3C,SAAS,CACR,0BAA0B,EAC1B,0EAA0E,EAC1EyC,mBACD,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["getInlineStyles","getBorderClasses","getMultiOriginColor","useMultipleOriginColorsAndGradients","getBorderClassesAndStyles","attributes","border","style","className","undefined","useBorderProps","colors","borderProps","borderColor","borderColorObject","namedColor","color"],"sources":["@wordpress/block-editor/src/hooks/use-border-props.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport { getInlineStyles } from './style';\nimport { getBorderClasses, getMultiOriginColor } from './border';\nimport useMultipleOriginColorsAndGradients from '../components/colors-gradients/use-multiple-origin-colors-and-gradients';\n\n// This utility is intended to assist where the serialization of the border\n// block support is being skipped for a block but the border related CSS classes\n// & styles still need to be generated so they can be applied to inner elements.\n\n/**\n * Provides the CSS class names and inline styles for a block's border support\n * attributes.\n *\n * @param {Object} attributes Block attributes.\n * @return {Object} Border block support derived CSS classes & styles.\n */\nexport function getBorderClassesAndStyles( attributes ) {\n\tconst border = attributes.style?.border || {};\n\tconst className = getBorderClasses( attributes );\n\n\treturn {\n\t\tclassName: className || undefined,\n\t\tstyle: getInlineStyles( { border } ),\n\t};\n}\n\n/**\n * Derives the border related props for a block from its border block support\n * attributes.\n *\n * Inline styles are forced for named colors to ensure these selections are\n * reflected when themes do not load their color stylesheets in the editor.\n *\n * @param {Object} attributes Block attributes.\n *\n * @return {Object} ClassName & style props from border block support.\n */\nexport function useBorderProps( attributes ) {\n\tconst { colors } = useMultipleOriginColorsAndGradients();\n\tconst borderProps = getBorderClassesAndStyles( attributes );\n\tconst { borderColor } = attributes;\n\n\t// Force inline styles to apply named border colors when themes do not load\n\t// their color stylesheets in the editor.\n\tif ( borderColor ) {\n\t\tconst borderColorObject = getMultiOriginColor( {\n\t\t\tcolors,\n\t\t\tnamedColor: borderColor,\n\t\t} );\n\n\t\tborderProps.style.borderColor = borderColorObject.color;\n\t}\n\n\treturn borderProps;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,eAAe,QAAQ,SAAS;AACzC,SAASC,gBAAgB,EAAEC,mBAAmB,QAAQ,UAAU;AAChE,OAAOC,mCAAmC,MAAM,yEAAyE;;AAEzH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,yBAAyBA,CAAEC,UAAU,EAAG;EACvD,MAAMC,MAAM,GAAGD,UAAU,CAACE,KAAK,EAAED,MAAM,IAAI,CAAC,CAAC;EAC7C,MAAME,SAAS,GAAGP,gBAAgB,CAAEI,UAAW,CAAC;EAEhD,OAAO;IACNG,SAAS,EAAEA,SAAS,IAAIC,SAAS;IACjCF,KAAK,EAAEP,eAAe,CAAE;MAAEM;IAAO,CAAE;EACpC,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASI,cAAcA,CAAEL,UAAU,EAAG;EAC5C,MAAM;IAAEM;EAAO,CAAC,GAAGR,mCAAmC,CAAC,CAAC;EACxD,MAAMS,WAAW,GAAGR,yBAAyB,CAAEC,UAAW,CAAC;EAC3D,MAAM;IAAEQ;EAAY,CAAC,GAAGR,UAAU;;EAElC;EACA;EACA,IAAKQ,WAAW,EAAG;IAClB,MAAMC,iBAAiB,GAAGZ,mBAAmB,CAAE;MAC9CS,MAAM;MACNI,UAAU,EAAEF;IACb,CAAE,CAAC;IAEHD,WAAW,CAACL,KAAK,CAACM,WAAW,GAAGC,iBAAiB,CAACE,KAAK;EACxD;EAEA,OAAOJ,WAAW;AACnB"}
1
+ {"version":3,"names":["getInlineStyles","getBorderClasses","getMultiOriginColor","useMultipleOriginColorsAndGradients","getBorderClassesAndStyles","attributes","border","style","className","undefined","useBorderProps","colors","borderProps","borderColor","borderColorObject","namedColor","color"],"sources":["@wordpress/block-editor/src/hooks/use-border-props.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport { getInlineStyles } from './style';\nimport { getBorderClasses, getMultiOriginColor } from './border';\nimport useMultipleOriginColorsAndGradients from '../components/colors-gradients/use-multiple-origin-colors-and-gradients';\n\n// This utility is intended to assist where the serialization of the border\n// block support is being skipped for a block but the border related CSS classes\n// & styles still need to be generated so they can be applied to inner elements.\n\n/**\n * Provides the CSS class names and inline styles for a block's border support\n * attributes.\n *\n * @param {Object} attributes Block attributes.\n * @return {Object} Border block support derived CSS classes & styles.\n */\nexport function getBorderClassesAndStyles( attributes ) {\n\tconst border = attributes.style?.border || {};\n\tconst className = getBorderClasses( attributes );\n\n\treturn {\n\t\tclassName: className || undefined,\n\t\tstyle: getInlineStyles( { border } ),\n\t};\n}\n\n/**\n * Derives the border related props for a block from its border block support\n * attributes.\n *\n * Inline styles are forced for named colors to ensure these selections are\n * reflected when themes do not load their color stylesheets in the editor.\n *\n * @param {Object} attributes Block attributes.\n *\n * @return {Object} ClassName & style props from border block support.\n */\nexport function useBorderProps( attributes ) {\n\tconst { colors } = useMultipleOriginColorsAndGradients();\n\tconst borderProps = getBorderClassesAndStyles( attributes );\n\tconst { borderColor } = attributes;\n\n\t// Force inline styles to apply named border colors when themes do not load\n\t// their color stylesheets in the editor.\n\tif ( borderColor ) {\n\t\tconst borderColorObject = getMultiOriginColor( {\n\t\t\tcolors,\n\t\t\tnamedColor: borderColor,\n\t\t} );\n\n\t\tborderProps.style.borderColor = borderColorObject.color;\n\t}\n\n\treturn borderProps;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,eAAe,QAAQ,SAAS;AACzC,SAASC,gBAAgB,EAAEC,mBAAmB,QAAQ,UAAU;AAChE,OAAOC,mCAAmC,MAAM,yEAAyE;;AAEzH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,yBAAyBA,CAAEC,UAAU,EAAG;EACvD,MAAMC,MAAM,GAAGD,UAAU,CAACE,KAAK,EAAED,MAAM,IAAI,CAAC,CAAC;EAC7C,MAAME,SAAS,GAAGP,gBAAgB,CAAEI,UAAW,CAAC;EAEhD,OAAO;IACNG,SAAS,EAAEA,SAAS,IAAIC,SAAS;IACjCF,KAAK,EAAEP,eAAe,CAAE;MAAEM;IAAO,CAAE;EACpC,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASI,cAAcA,CAAEL,UAAU,EAAG;EAC5C,MAAM;IAAEM;EAAO,CAAC,GAAGR,mCAAmC,CAAC,CAAC;EACxD,MAAMS,WAAW,GAAGR,yBAAyB,CAAEC,UAAW,CAAC;EAC3D,MAAM;IAAEQ;EAAY,CAAC,GAAGR,UAAU;;EAElC;EACA;EACA,IAAKQ,WAAW,EAAG;IAClB,MAAMC,iBAAiB,GAAGZ,mBAAmB,CAAE;MAC9CS,MAAM;MACNI,UAAU,EAAEF;IACb,CAAE,CAAC;IAEHD,WAAW,CAACL,KAAK,CAACM,WAAW,GAAGC,iBAAiB,CAACE,KAAK;EACxD;EAEA,OAAOJ,WAAW;AACnB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["useState","useEffect","useCachedTruthy","value","cachedValue","setCachedValue"],"sources":["@wordpress/block-editor/src/hooks/use-cached-truthy.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useState, useEffect } from '@wordpress/element';\n\n/**\n * Keeps an up-to-date copy of the passed value and returns it. If value becomes falsy, it will return the last truthy copy.\n *\n * @param {any} value\n * @return {any} value\n */\nexport function useCachedTruthy( value ) {\n\tconst [ cachedValue, setCachedValue ] = useState( value );\n\tuseEffect( () => {\n\t\tif ( value ) {\n\t\t\tsetCachedValue( value );\n\t\t}\n\t}, [ value ] );\n\treturn cachedValue;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,QAAQ,EAAEC,SAAS,QAAQ,oBAAoB;;AAExD;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,eAAeA,CAAEC,KAAK,EAAG;EACxC,MAAM,CAAEC,WAAW,EAAEC,cAAc,CAAE,GAAGL,QAAQ,CAAEG,KAAM,CAAC;EACzDF,SAAS,CAAE,MAAM;IAChB,IAAKE,KAAK,EAAG;MACZE,cAAc,CAAEF,KAAM,CAAC;IACxB;EACD,CAAC,EAAE,CAAEA,KAAK,CAAG,CAAC;EACd,OAAOC,WAAW;AACnB"}
1
+ {"version":3,"names":["useState","useEffect","useCachedTruthy","value","cachedValue","setCachedValue"],"sources":["@wordpress/block-editor/src/hooks/use-cached-truthy.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useState, useEffect } from '@wordpress/element';\n\n/**\n * Keeps an up-to-date copy of the passed value and returns it. If value becomes falsy, it will return the last truthy copy.\n *\n * @param {any} value\n * @return {any} value\n */\nexport function useCachedTruthy( value ) {\n\tconst [ cachedValue, setCachedValue ] = useState( value );\n\tuseEffect( () => {\n\t\tif ( value ) {\n\t\t\tsetCachedValue( value );\n\t\t}\n\t}, [ value ] );\n\treturn cachedValue;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,QAAQ,EAAEC,SAAS,QAAQ,oBAAoB;;AAExD;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,eAAeA,CAAEC,KAAK,EAAG;EACxC,MAAM,CAAEC,WAAW,EAAEC,cAAc,CAAE,GAAGL,QAAQ,CAAEG,KAAM,CAAC;EACzDF,SAAS,CAAE,MAAM;IAChB,IAAKE,KAAK,EAAG;MACZE,cAAc,CAAEF,KAAM,CAAC;IACxB;EACD,CAAC,EAAE,CAAEA,KAAK,CAAG,CAAC;EACd,OAAOC,WAAW;AACnB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["classnames","useMemo","getInlineStyles","getColorClassName","getColorObjectByAttributeValues","__experimentalGetGradientClass","getGradientValueBySlug","useSettings","getColorClassesAndStyles","attributes","backgroundColor","textColor","gradient","style","backgroundClass","textClass","gradientClass","hasGradient","color","className","text","background","elements","link","colorStyles","styleProp","undefined","useColorProps","userPalette","themePalette","defaultPalette","userGradients","themeGradients","defaultGradients","colors","gradients","colorProps","backgroundColorObject","textColorObject"],"sources":["@wordpress/block-editor/src/hooks/use-color-props.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { getInlineStyles } from './style';\nimport {\n\tgetColorClassName,\n\tgetColorObjectByAttributeValues,\n} from '../components/colors';\nimport {\n\t__experimentalGetGradientClass,\n\tgetGradientValueBySlug,\n} from '../components/gradients';\nimport { useSettings } from '../components/use-settings';\n\n// The code in this file has largely been lifted from the color block support\n// hook.\n//\n// This utility is intended to assist where the serialization of the colors\n// block support is being skipped for a block but the color related CSS classes\n// & styles still need to be generated so they can be applied to inner elements.\n\n/**\n * Provides the CSS class names and inline styles for a block's color support\n * attributes.\n *\n * @param {Object} attributes Block attributes.\n *\n * @return {Object} Color block support derived CSS classes & styles.\n */\nexport function getColorClassesAndStyles( attributes ) {\n\tconst { backgroundColor, textColor, gradient, style } = attributes;\n\n\t// Collect color CSS classes.\n\tconst backgroundClass = getColorClassName(\n\t\t'background-color',\n\t\tbackgroundColor\n\t);\n\tconst textClass = getColorClassName( 'color', textColor );\n\n\tconst gradientClass = __experimentalGetGradientClass( gradient );\n\tconst hasGradient = gradientClass || style?.color?.gradient;\n\n\t// Determine color CSS class name list.\n\tconst className = classnames( textClass, gradientClass, {\n\t\t// Don't apply the background class if there's a gradient.\n\t\t[ backgroundClass ]: ! hasGradient && !! backgroundClass,\n\t\t'has-text-color': textColor || style?.color?.text,\n\t\t'has-background':\n\t\t\tbackgroundColor ||\n\t\t\tstyle?.color?.background ||\n\t\t\tgradient ||\n\t\t\tstyle?.color?.gradient,\n\t\t'has-link-color': style?.elements?.link?.color,\n\t} );\n\n\t// Collect inline styles for colors.\n\tconst colorStyles = style?.color || {};\n\tconst styleProp = getInlineStyles( { color: colorStyles } );\n\n\treturn {\n\t\tclassName: className || undefined,\n\t\tstyle: styleProp,\n\t};\n}\n\n/**\n * Determines the color related props for a block derived from its color block\n * support attributes.\n *\n * Inline styles are forced for named colors to ensure these selections are\n * reflected when themes do not load their color stylesheets in the editor.\n *\n * @param {Object} attributes Block attributes.\n *\n * @return {Object} ClassName & style props from colors block support.\n */\nexport function useColorProps( attributes ) {\n\tconst { backgroundColor, textColor, gradient } = attributes;\n\n\tconst [\n\t\tuserPalette,\n\t\tthemePalette,\n\t\tdefaultPalette,\n\t\tuserGradients,\n\t\tthemeGradients,\n\t\tdefaultGradients,\n\t] = useSettings(\n\t\t'color.palette.custom',\n\t\t'color.palette.theme',\n\t\t'color.palette.default',\n\t\t'color.gradients.custom',\n\t\t'color.gradients.theme',\n\t\t'color.gradients.default'\n\t);\n\n\tconst colors = useMemo(\n\t\t() => [\n\t\t\t...( userPalette || [] ),\n\t\t\t...( themePalette || [] ),\n\t\t\t...( defaultPalette || [] ),\n\t\t],\n\t\t[ userPalette, themePalette, defaultPalette ]\n\t);\n\tconst gradients = useMemo(\n\t\t() => [\n\t\t\t...( userGradients || [] ),\n\t\t\t...( themeGradients || [] ),\n\t\t\t...( defaultGradients || [] ),\n\t\t],\n\t\t[ userGradients, themeGradients, defaultGradients ]\n\t);\n\n\tconst colorProps = getColorClassesAndStyles( attributes );\n\n\t// Force inline styles to apply colors when themes do not load their color\n\t// stylesheets in the editor.\n\tif ( backgroundColor ) {\n\t\tconst backgroundColorObject = getColorObjectByAttributeValues(\n\t\t\tcolors,\n\t\t\tbackgroundColor\n\t\t);\n\n\t\tcolorProps.style.backgroundColor = backgroundColorObject.color;\n\t}\n\n\tif ( gradient ) {\n\t\tcolorProps.style.background = getGradientValueBySlug(\n\t\t\tgradients,\n\t\t\tgradient\n\t\t);\n\t}\n\n\tif ( textColor ) {\n\t\tconst textColorObject = getColorObjectByAttributeValues(\n\t\t\tcolors,\n\t\t\ttextColor\n\t\t);\n\n\t\tcolorProps.style.color = textColorObject.color;\n\t}\n\n\treturn colorProps;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,OAAO,QAAQ,oBAAoB;;AAE5C;AACA;AACA;AACA,SAASC,eAAe,QAAQ,SAAS;AACzC,SACCC,iBAAiB,EACjBC,+BAA+B,QACzB,sBAAsB;AAC7B,SACCC,8BAA8B,EAC9BC,sBAAsB,QAChB,yBAAyB;AAChC,SAASC,WAAW,QAAQ,4BAA4B;;AAExD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,wBAAwBA,CAAEC,UAAU,EAAG;EACtD,MAAM;IAAEC,eAAe;IAAEC,SAAS;IAAEC,QAAQ;IAAEC;EAAM,CAAC,GAAGJ,UAAU;;EAElE;EACA,MAAMK,eAAe,GAAGX,iBAAiB,CACxC,kBAAkB,EAClBO,eACD,CAAC;EACD,MAAMK,SAAS,GAAGZ,iBAAiB,CAAE,OAAO,EAAEQ,SAAU,CAAC;EAEzD,MAAMK,aAAa,GAAGX,8BAA8B,CAAEO,QAAS,CAAC;EAChE,MAAMK,WAAW,GAAGD,aAAa,IAAIH,KAAK,EAAEK,KAAK,EAAEN,QAAQ;;EAE3D;EACA,MAAMO,SAAS,GAAGnB,UAAU,CAAEe,SAAS,EAAEC,aAAa,EAAE;IACvD;IACA,CAAEF,eAAe,GAAI,CAAEG,WAAW,IAAI,CAAC,CAAEH,eAAe;IACxD,gBAAgB,EAAEH,SAAS,IAAIE,KAAK,EAAEK,KAAK,EAAEE,IAAI;IACjD,g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AgB,CAClD,CAAC;EAED,MAAMG,UAAU,GAAG5B,wBAAwB,CAAEC,UAAW,CAAC;;EAEzD;EACA;EACA,IAAKC,eAAe,EAAG;IACtB,MAAM2B,qBAAqB,GAAGjC,+BAA+B,CAC5D8B,MAAM,EACNxB,eACD,CAAC;IAED0B,UAAU,CAACvB,KAAK,CAACH,eAAe,GAAG2B,qBAAqB,CAACnB,KAAK;EAC/D;EAEA,IAAKN,QAAQ,EAAG;IACfwB,UAAU,CAACvB,KAAK,CAACQ,UAAU,GAAGf,sBAAsB,CACnD6B,SAAS,EACTvB,QACD,CAAC;EACF;EAEA,IAAKD,SAAS,EAAG;IAChB,MAAM2B,eAAe,GAAGlC,+BAA+B,CACtD8B,MAAM,EACNvB,SACD,CAAC;IAEDyB,UAAU,CAACvB,KAAK,CAACK,KAAK,GAAGoB,eAAe,CAACpB,KAAK;EAC/C;EAEA,OAAOkB,UAAU;AAClB"}
1
+ {"version":3,"names":["classnames","useMemo","getInlineStyles","getColorClassName","getColorObjectByAttributeValues","__experimentalGetGradientClass","getGradientValueBySlug","useSettings","getColorClassesAndStyles","attributes","backgroundColor","textColor","gradient","style","backgroundClass","textClass","gradientClass","hasGradient","color","className","text","background","elements","link","colorStyles","styleProp","undefined","useColorProps","userPalette","themePalette","defaultPalette","userGradients","themeGradients","defaultGradients","colors","gradients","colorProps","backgroundColorObject","textColorObject"],"sources":["@wordpress/block-editor/src/hooks/use-color-props.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { getInlineStyles } from './style';\nimport {\n\tgetColorClassName,\n\tgetColorObjectByAttributeValues,\n} from '../components/colors';\nimport {\n\t__experimentalGetGradientClass,\n\tgetGradientValueBySlug,\n} from '../components/gradients';\nimport { useSettings } from '../components/use-settings';\n\n// The code in this file has largely been lifted from the color block support\n// hook.\n//\n// This utility is intended to assist where the serialization of the colors\n// block support is being skipped for a block but the color related CSS classes\n// & styles still need to be generated so they can be applied to inner elements.\n\n/**\n * Provides the CSS class names and inline styles for a block's color support\n * attributes.\n *\n * @param {Object} attributes Block attributes.\n *\n * @return {Object} Color block support derived CSS classes & styles.\n */\nexport function getColorClassesAndStyles( attributes ) {\n\tconst { backgroundColor, textColor, gradient, style } = attributes;\n\n\t// Collect color CSS classes.\n\tconst backgroundClass = getColorClassName(\n\t\t'background-color',\n\t\tbackgroundColor\n\t);\n\tconst textClass = getColorClassName( 'color', textColor );\n\n\tconst gradientClass = __experimentalGetGradientClass( gradient );\n\tconst hasGradient = gradientClass || style?.color?.gradient;\n\n\t// Determine color CSS class name list.\n\tconst className = classnames( textClass, gradientClass, {\n\t\t// Don't apply the background class if there's a gradient.\n\t\t[ backgroundClass ]: ! hasGradient && !! backgroundClass,\n\t\t'has-text-color': textColor || style?.color?.text,\n\t\t'has-background':\n\t\t\tbackgroundColor ||\n\t\t\tstyle?.color?.background ||\n\t\t\tgradient ||\n\t\t\tstyle?.color?.gradient,\n\t\t'has-link-color': style?.elements?.link?.color,\n\t} );\n\n\t// Collect inline styles for colors.\n\tconst colorStyles = style?.color || {};\n\tconst styleProp = getInlineStyles( { color: colorStyles } );\n\n\treturn {\n\t\tclassName: className || undefined,\n\t\tstyle: styleProp,\n\t};\n}\n\n/**\n * Determines the color related props for a block derived from its color block\n * support attributes.\n *\n * Inline styles are forced for named colors to ensure these selections are\n * reflected when themes do not load their color stylesheets in the editor.\n *\n * @param {Object} attributes Block attributes.\n *\n * @return {Object} ClassName & style props from colors block support.\n */\nexport function useColorProps( attributes ) {\n\tconst { backgroundColor, textColor, gradient } = attributes;\n\n\tconst [\n\t\tuserPalette,\n\t\tthemePalette,\n\t\tdefaultPalette,\n\t\tuserGradients,\n\t\tthemeGradients,\n\t\tdefaultGradients,\n\t] = useSettings(\n\t\t'color.palette.custom',\n\t\t'color.palette.theme',\n\t\t'color.palette.default',\n\t\t'color.gradients.custom',\n\t\t'color.gradients.theme',\n\t\t'color.gradients.default'\n\t);\n\n\tconst colors = useMemo(\n\t\t() => [\n\t\t\t...( userPalette || [] ),\n\t\t\t...( themePalette || [] ),\n\t\t\t...( defaultPalette || [] ),\n\t\t],\n\t\t[ userPalette, themePalette, defaultPalette ]\n\t);\n\tconst gradients = useMemo(\n\t\t() => [\n\t\t\t...( userGradients || [] ),\n\t\t\t...( themeGradients || [] ),\n\t\t\t...( defaultGradients || [] ),\n\t\t],\n\t\t[ userGradients, themeGradients, defaultGradients ]\n\t);\n\n\tconst colorProps = getColorClassesAndStyles( attributes );\n\n\t// Force inline styles to apply colors when themes do not load their color\n\t// stylesheets in the editor.\n\tif ( backgroundColor ) {\n\t\tconst backgroundColorObject = getColorObjectByAttributeValues(\n\t\t\tcolors,\n\t\t\tbackgroundColor\n\t\t);\n\n\t\tcolorProps.style.backgroundColor = backgroundColorObject.color;\n\t}\n\n\tif ( gradient ) {\n\t\tcolorProps.style.background = getGradientValueBySlug(\n\t\t\tgradients,\n\t\t\tgradient\n\t\t);\n\t}\n\n\tif ( textColor ) {\n\t\tconst textColorObject = getColorObjectByAttributeValues(\n\t\t\tcolors,\n\t\t\ttextColor\n\t\t);\n\n\t\tcolorProps.style.color = textColorObject.color;\n\t}\n\n\treturn colorProps;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,OAAO,QAAQ,oBAAoB;;AAE5C;AACA;AACA;AACA,SAASC,eAAe,QAAQ,SAAS;AACzC,SACCC,iBAAiB,EACjBC,+BAA+B,QACzB,sBAAsB;AAC7B,SACCC,8BAA8B,EAC9BC,sBAAsB,QAChB,yBAAyB;AAChC,SAASC,WAAW,QAAQ,4BAA4B;;AAExD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,wBAAwBA,CAAEC,UAAU,EAAG;EACtD,MAAM;IAAEC,eAAe;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