@wordpress/block-editor 12.23.0 → 12.25.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 (1674) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/README.md +5 -1
  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 +3 -1
  7. package/build/components/alignment-control/ui.js.map +1 -1
  8. package/build/components/autocomplete/index.js.map +1 -1
  9. package/build/components/block-actions/index.js.map +1 -1
  10. package/build/components/block-alignment-control/constants.js.map +1 -1
  11. package/build/components/block-alignment-control/index.js.map +1 -1
  12. package/build/components/block-alignment-control/ui.js.map +1 -1
  13. package/build/components/block-alignment-control/ui.native.js.map +1 -1
  14. package/build/components/block-alignment-control/use-available-alignments.js.map +1 -1
  15. package/build/components/block-alignment-matrix-control/index.js.map +1 -1
  16. package/build/components/block-bindings-toolbar-indicator/index.js.map +1 -1
  17. package/build/components/block-breadcrumb/index.js.map +1 -1
  18. package/build/components/block-canvas/index.js.map +1 -1
  19. package/build/components/block-caption/index.native.js.map +1 -1
  20. package/build/components/block-card/index.js.map +1 -1
  21. package/build/components/block-compare/block-view.js.map +1 -1
  22. package/build/components/block-compare/index.js.map +1 -1
  23. package/build/components/block-content-overlay/index.js.map +1 -1
  24. package/build/components/block-context/index.js.map +1 -1
  25. package/build/components/block-controls/fill.js.map +1 -1
  26. package/build/components/block-controls/groups.js.map +1 -1
  27. package/build/components/block-controls/hook.js.map +1 -1
  28. package/build/components/block-controls/index.js.map +1 -1
  29. package/build/components/block-controls/slot.js.map +1 -1
  30. package/build/components/block-controls/slot.native.js.map +1 -1
  31. package/build/components/block-controls/use-has-block-controls.js.map +1 -1
  32. package/build/components/block-draggable/draggable-chip.js.map +1 -1
  33. package/build/components/block-draggable/draggable-chip.native.js.map +1 -1
  34. package/build/components/block-draggable/dropping-insertion-point.native.js +1 -1
  35. package/build/components/block-draggable/dropping-insertion-point.native.js.map +1 -1
  36. package/build/components/block-draggable/index.js.map +1 -1
  37. package/build/components/block-draggable/index.native.js +1 -1
  38. package/build/components/block-draggable/index.native.js.map +1 -1
  39. package/build/components/block-draggable/use-scroll-when-dragging.js.map +1 -1
  40. package/build/components/block-draggable/use-scroll-when-dragging.native.js.map +1 -1
  41. package/build/components/block-edit/context.js +2 -1
  42. package/build/components/block-edit/context.js.map +1 -1
  43. package/build/components/block-edit/edit.js.map +1 -1
  44. package/build/components/block-edit/edit.native.js.map +1 -1
  45. package/build/components/block-edit/index.js +4 -2
  46. package/build/components/block-edit/index.js.map +1 -1
  47. package/build/components/block-edit-visually-button/index.js.map +1 -1
  48. package/build/components/block-editing-mode/index.js.map +1 -1
  49. package/build/components/block-full-height-alignment-control/index.js.map +1 -1
  50. package/build/components/block-heading-level-dropdown/heading-level-icon.js.map +1 -1
  51. package/build/components/block-heading-level-dropdown/index.js.map +1 -1
  52. package/build/components/block-heading-level-dropdown/index.native.js.map +1 -1
  53. package/build/components/block-icon/index.js.map +1 -1
  54. package/build/components/block-icon/index.native.js.map +1 -1
  55. package/build/components/block-info-slot-fill/index.js.map +1 -1
  56. package/build/components/block-inspector/index.js +5 -4
  57. package/build/components/block-inspector/index.js.map +1 -1
  58. package/build/components/block-inspector/useBlockInspectorAnimationSettings.js.map +1 -1
  59. package/build/components/block-list/block-crash-boundary.js.map +1 -1
  60. package/build/components/block-list/block-crash-boundary.native.js.map +1 -1
  61. package/build/components/block-list/block-crash-warning.js.map +1 -1
  62. package/build/components/block-list/block-crash-warning.native.js.map +1 -1
  63. package/build/components/block-list/block-html.js.map +1 -1
  64. package/build/components/block-list/block-invalid-warning.js.map +1 -1
  65. package/build/components/block-list/block-invalid-warning.native.js.map +1 -1
  66. package/build/components/block-list/block-list-context.native.js.map +1 -1
  67. package/build/components/block-list/block-list-item-cell.native.js.map +1 -1
  68. package/build/components/block-list/block-list-item.native.js.map +1 -1
  69. package/build/components/block-list/block-outline.native.js.map +1 -1
  70. package/build/components/block-list/block-selection-button.native.js.map +1 -1
  71. package/build/components/block-list/block.js +44 -35
  72. package/build/components/block-list/block.js.map +1 -1
  73. package/build/components/block-list/block.native.js +2 -2
  74. package/build/components/block-list/block.native.js.map +1 -1
  75. package/build/components/block-list/grid-item.native.js.map +1 -1
  76. package/build/components/block-list/index.js +18 -6
  77. package/build/components/block-list/index.js.map +1 -1
  78. package/build/components/block-list/index.native.js +1 -9
  79. package/build/components/block-list/index.native.js.map +1 -1
  80. package/build/components/block-list/insertion-point.native.js.map +1 -1
  81. package/build/components/block-list/layout.js.map +1 -1
  82. package/build/components/block-list/private-block-context.js.map +1 -1
  83. package/build/components/block-list/subdirectory-icon.js.map +1 -1
  84. package/build/components/block-list/use-block-props/index.js +8 -7
  85. package/build/components/block-list/use-block-props/index.js.map +1 -1
  86. package/build/components/block-list/use-block-props/index.native.js.map +1 -1
  87. package/build/components/block-list/use-block-props/use-block-refs.js +17 -46
  88. package/build/components/block-list/use-block-props/use-block-refs.js.map +1 -1
  89. package/build/components/block-list/use-block-props/use-focus-first-element.js +3 -2
  90. package/build/components/block-list/use-block-props/use-focus-first-element.js.map +1 -1
  91. package/build/components/block-list/use-block-props/use-focus-handler.js.map +1 -1
  92. package/build/components/block-list/use-block-props/use-intersection-observer.js.map +1 -1
  93. package/build/components/block-list/use-block-props/use-is-hovered.js +10 -14
  94. package/build/components/block-list/use-block-props/use-is-hovered.js.map +1 -1
  95. package/build/components/block-list/use-block-props/use-nav-mode-exit.js.map +1 -1
  96. package/build/components/block-list/use-block-props/use-selected-block-event-handlers.js.map +1 -1
  97. package/build/components/block-list/use-in-between-inserter.js.map +1 -1
  98. package/build/components/block-list/use-scroll-upon-insertion.native.js.map +1 -1
  99. package/build/components/block-list-appender/index.js.map +1 -1
  100. package/build/components/block-list-appender/index.native.js.map +1 -1
  101. package/build/components/block-lock/index.js.map +1 -1
  102. package/build/components/block-lock/menu-item.js.map +1 -1
  103. package/build/components/block-lock/modal.js.map +1 -1
  104. package/build/components/block-lock/toolbar.js.map +1 -1
  105. package/build/components/block-lock/use-block-lock.js.map +1 -1
  106. package/build/components/block-media-update-progress/index.native.js.map +1 -1
  107. package/build/components/block-mover/button.js.map +1 -1
  108. package/build/components/block-mover/index.js.map +1 -1
  109. package/build/components/block-mover/index.native.js +3 -1
  110. package/build/components/block-mover/index.native.js.map +1 -1
  111. package/build/components/block-mover/mover-description.js.map +1 -1
  112. package/build/components/block-mover/mover-description.native.js.map +1 -1
  113. package/build/components/block-navigation/dropdown.js.map +1 -1
  114. package/build/components/block-parent-selector/index.js.map +1 -1
  115. package/build/components/block-pattern-setup/constants.js.map +1 -1
  116. package/build/components/block-pattern-setup/index.js.map +1 -1
  117. package/build/components/block-pattern-setup/setup-toolbar.js.map +1 -1
  118. package/build/components/block-pattern-setup/use-patterns-setup.js.map +1 -1
  119. package/build/components/block-patterns-list/index.js.map +1 -1
  120. package/build/components/block-patterns-paging/index.js +8 -4
  121. package/build/components/block-patterns-paging/index.js.map +1 -1
  122. package/build/components/block-popover/cover.js.map +1 -1
  123. package/build/components/block-popover/drop-zone.js.map +1 -1
  124. package/build/components/block-popover/inbetween.js.map +1 -1
  125. package/build/components/block-popover/index.js.map +1 -1
  126. package/build/components/block-popover/use-popover-scroll.js.map +1 -1
  127. package/build/components/block-preview/auto.js.map +1 -1
  128. package/build/components/block-preview/index.js.map +1 -1
  129. package/build/components/block-quick-navigation/index.js.map +1 -1
  130. package/build/components/block-removal-warning-modal/index.js.map +1 -1
  131. package/build/components/block-rename/index.js.map +1 -1
  132. package/build/components/block-rename/is-empty-string.js.map +1 -1
  133. package/build/components/block-rename/modal.js +13 -9
  134. package/build/components/block-rename/modal.js.map +1 -1
  135. package/build/components/block-rename/rename-control.js +3 -1
  136. package/build/components/block-rename/rename-control.js.map +1 -1
  137. package/build/components/block-rename/use-block-rename.js.map +1 -1
  138. package/build/components/block-selection-clearer/index.js.map +1 -1
  139. package/build/components/block-settings/button.native.js.map +1 -1
  140. package/build/components/block-settings/container.native.js.map +1 -1
  141. package/build/components/block-settings/index.native.js +1 -1
  142. package/build/components/block-settings/index.native.js.map +1 -1
  143. package/build/components/block-settings-menu/block-html-convert-button.js.map +1 -1
  144. package/build/components/block-settings-menu/block-mode-toggle.js.map +1 -1
  145. package/build/components/block-settings-menu/block-parent-selector-menu-item.js.map +1 -1
  146. package/build/components/block-settings-menu/block-settings-dropdown.js +0 -25
  147. package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  148. package/build/components/block-settings-menu/block-settings-menu-first-item.js.map +1 -1
  149. package/build/components/block-settings-menu/index.js.map +1 -1
  150. package/build/components/block-settings-menu-controls/index.js.map +1 -1
  151. package/build/components/block-styles/index.js.map +1 -1
  152. package/build/components/block-styles/index.native.js.map +1 -1
  153. package/build/components/block-styles/menu-items.js.map +1 -1
  154. package/build/components/block-styles/preview-panel.js.map +1 -1
  155. package/build/components/block-styles/preview.native.js.map +1 -1
  156. package/build/components/block-styles/use-styles-for-block.js.map +1 -1
  157. package/build/components/block-styles/utils.js.map +1 -1
  158. package/build/components/block-switcher/block-styles-menu.js.map +1 -1
  159. package/build/components/block-switcher/block-transformations-menu.js.map +1 -1
  160. package/build/components/block-switcher/block-transformations-menu.native.js.map +1 -1
  161. package/build/components/block-switcher/block-variation-transformations.js.map +1 -1
  162. package/build/components/block-switcher/index.js.map +1 -1
  163. package/build/components/block-switcher/pattern-transformations-menu.js +3 -1
  164. package/build/components/block-switcher/pattern-transformations-menu.js.map +1 -1
  165. package/build/components/block-switcher/preview-block-popover.js.map +1 -1
  166. package/build/components/block-switcher/use-transformed-patterns.js +6 -2
  167. package/build/components/block-switcher/use-transformed-patterns.js.map +1 -1
  168. package/build/components/block-switcher/utils.js +15 -5
  169. package/build/components/block-switcher/utils.js.map +1 -1
  170. package/build/components/block-title/index.js.map +1 -1
  171. package/build/components/block-title/use-block-display-title.js.map +1 -1
  172. package/build/components/block-toolbar/block-name-context.js.map +1 -1
  173. package/build/components/block-toolbar/block-toolbar-last-item.js.map +1 -1
  174. package/build/components/block-toolbar/block-toolbar-menu.native.js.map +1 -1
  175. package/build/components/block-toolbar/index.js +1 -1
  176. package/build/components/block-toolbar/index.js.map +1 -1
  177. package/build/components/block-toolbar/index.native.js.map +1 -1
  178. package/build/components/block-toolbar/shuffle.js.map +1 -1
  179. package/build/components/block-toolbar/use-has-block-toolbar.js +20 -12
  180. package/build/components/block-toolbar/use-has-block-toolbar.js.map +1 -1
  181. package/build/components/block-toolbar/utils.js.map +1 -1
  182. package/build/components/block-tools/block-selection-button.js +16 -12
  183. package/build/components/block-tools/block-selection-button.js.map +1 -1
  184. package/build/components/block-tools/block-toolbar-breadcrumb.js.map +1 -1
  185. package/build/components/block-tools/block-toolbar-popover.js.map +1 -1
  186. package/build/components/block-tools/empty-block-inserter.js.map +1 -1
  187. package/build/components/block-tools/index.js +4 -2
  188. package/build/components/block-tools/index.js.map +1 -1
  189. package/build/components/block-tools/insertion-point.js.map +1 -1
  190. package/build/components/block-tools/use-block-toolbar-popover-props.js.map +1 -1
  191. package/build/components/block-tools/use-selected-block-tool-props.js.map +1 -1
  192. package/build/components/block-tools/use-show-block-tools.js +9 -18
  193. package/build/components/block-tools/use-show-block-tools.js.map +1 -1
  194. package/build/components/block-tools/zoom-out-mode-inserters.js +5 -1
  195. package/build/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
  196. package/build/components/block-types-list/index.js.map +1 -1
  197. package/build/components/block-types-list/index.native.js.map +1 -1
  198. package/build/components/block-variation-picker/index.js +3 -2
  199. package/build/components/block-variation-picker/index.js.map +1 -1
  200. package/build/components/block-variation-picker/index.native.js.map +1 -1
  201. package/build/components/block-variation-transforms/index.js +7 -2
  202. package/build/components/block-variation-transforms/index.js.map +1 -1
  203. package/build/components/block-vertical-alignment-control/icons.js.map +1 -1
  204. package/build/components/block-vertical-alignment-control/index.js.map +1 -1
  205. package/build/components/block-vertical-alignment-control/ui.js.map +1 -1
  206. package/build/components/border-radius-control/all-input-control.js.map +1 -1
  207. package/build/components/border-radius-control/index.js.map +1 -1
  208. package/build/components/border-radius-control/input-controls.js.map +1 -1
  209. package/build/components/border-radius-control/linked-button.js.map +1 -1
  210. package/build/components/border-radius-control/utils.js.map +1 -1
  211. package/build/components/button-block-appender/index.js.map +1 -1
  212. package/build/components/button-block-appender/index.native.js +11 -1
  213. package/build/components/button-block-appender/index.native.js.map +1 -1
  214. package/build/components/caption/index.native.js.map +1 -1
  215. package/build/components/child-layout-control/index.js.map +1 -1
  216. package/build/components/color-palette/control.js.map +1 -1
  217. package/build/components/color-palette/index.js.map +1 -1
  218. package/build/components/color-palette/with-color-context.js.map +1 -1
  219. package/build/components/color-style-selector/index.js.map +1 -1
  220. package/build/components/colors/index.js +1 -1
  221. package/build/components/colors/index.js.map +1 -1
  222. package/build/components/colors/utils.js.map +1 -1
  223. package/build/components/colors/with-colors.js.map +1 -1
  224. package/build/components/colors-gradients/control.js.map +1 -1
  225. package/build/components/colors-gradients/dropdown.js.map +1 -1
  226. package/build/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
  227. package/build/components/colors-gradients/panel-color-gradient-settings.native.js.map +1 -1
  228. package/build/components/colors-gradients/use-multiple-origin-colors-and-gradients.js.map +1 -1
  229. package/build/components/contrast-checker/index.js.map +1 -1
  230. package/build/components/contrast-checker/index.native.js.map +1 -1
  231. package/build/components/convert-to-group-buttons/index.js.map +1 -1
  232. package/build/components/convert-to-group-buttons/index.native.js.map +1 -1
  233. package/build/components/convert-to-group-buttons/toolbar.js.map +1 -1
  234. package/build/components/convert-to-group-buttons/use-convert-to-group-button-props.js.map +1 -1
  235. package/build/components/copy-handler/index.js.map +1 -1
  236. package/build/components/date-format-picker/index.js.map +1 -1
  237. package/build/components/default-block-appender/index.js.map +1 -1
  238. package/build/components/default-block-appender/index.native.js.map +1 -1
  239. package/build/components/dimensions-tool/aspect-ratio-tool.js.map +1 -1
  240. package/build/components/dimensions-tool/index.js.map +1 -1
  241. package/build/components/dimensions-tool/scale-tool.js.map +1 -1
  242. package/build/components/dimensions-tool/width-height-tool.js +6 -2
  243. package/build/components/dimensions-tool/width-height-tool.js.map +1 -1
  244. package/build/components/duotone/utils.js.map +1 -1
  245. package/build/components/duotone-control/index.js.map +1 -1
  246. package/build/components/editable-text/index.js.map +1 -1
  247. package/build/components/editor-styles/index.js +2 -1
  248. package/build/components/editor-styles/index.js.map +1 -1
  249. package/build/components/floating-toolbar/index.native.js +9 -5
  250. package/build/components/floating-toolbar/index.native.js.map +1 -1
  251. package/build/components/floating-toolbar/nav-up-icon.js.map +1 -1
  252. package/build/components/font-appearance-control/index.js.map +1 -1
  253. package/build/components/font-family/index.js.map +1 -1
  254. package/build/components/font-sizes/fluid-utils.js.map +1 -1
  255. package/build/components/font-sizes/font-size-picker.js.map +1 -1
  256. package/build/components/font-sizes/index.js.map +1 -1
  257. package/build/components/font-sizes/index.native.js.map +1 -1
  258. package/build/components/font-sizes/utils.js.map +1 -1
  259. package/build/components/font-sizes/with-font-sizes.js.map +1 -1
  260. package/build/components/global-styles/advanced-panel.js.map +1 -1
  261. package/build/components/global-styles/background-panel.js +20 -17
  262. package/build/components/global-styles/background-panel.js.map +1 -1
  263. package/build/components/global-styles/border-panel.js.map +1 -1
  264. package/build/components/global-styles/color-panel.js +3 -1
  265. package/build/components/global-styles/color-panel.js.map +1 -1
  266. package/build/components/global-styles/color-panel.native.js.map +1 -1
  267. package/build/components/global-styles/context.js.map +1 -1
  268. package/build/components/global-styles/dimensions-panel.js +16 -0
  269. package/build/components/global-styles/dimensions-panel.js.map +1 -1
  270. package/build/components/global-styles/filters-panel.js.map +1 -1
  271. package/build/components/global-styles/get-block-css-selector.js.map +1 -1
  272. package/build/components/global-styles/get-global-styles-changes.js.map +1 -1
  273. package/build/components/global-styles/hooks.js +3 -2
  274. package/build/components/global-styles/hooks.js.map +1 -1
  275. package/build/components/global-styles/image-settings-panel.js.map +1 -1
  276. package/build/components/global-styles/index.js +1 -1
  277. package/build/components/global-styles/index.js.map +1 -1
  278. package/build/components/global-styles/shadow-panel-components.js.map +1 -1
  279. package/build/components/global-styles/typography-panel.js +23 -23
  280. package/build/components/global-styles/typography-panel.js.map +1 -1
  281. package/build/components/global-styles/typography-utils.js.map +1 -1
  282. package/build/components/global-styles/use-global-styles-output.js +153 -136
  283. package/build/components/global-styles/use-global-styles-output.js.map +1 -1
  284. package/build/components/global-styles/utils.js +45 -0
  285. package/build/components/global-styles/utils.js.map +1 -1
  286. package/build/components/gradients/index.js.map +1 -1
  287. package/build/components/gradients/index.native.js.map +1 -1
  288. package/build/components/gradients/use-gradient.js.map +1 -1
  289. package/build/components/gradients/with-gradient.js.map +1 -1
  290. package/build/components/grid-visualizer/grid-item-resizer.js.map +1 -1
  291. package/build/components/grid-visualizer/grid-visualizer.js.map +1 -1
  292. package/build/components/grid-visualizer/index.js.map +1 -1
  293. package/build/components/grid-visualizer/utils.js.map +1 -1
  294. package/build/components/height-control/index.js.map +1 -1
  295. package/build/components/iframe/get-compatibility-styles.js.map +1 -1
  296. package/build/components/iframe/index.js +12 -13
  297. package/build/components/iframe/index.js.map +1 -1
  298. package/build/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
  299. package/build/components/image-editor/constants.js.map +1 -1
  300. package/build/components/image-editor/context.js.map +1 -1
  301. package/build/components/image-editor/cropper.js +6 -2
  302. package/build/components/image-editor/cropper.js.map +1 -1
  303. package/build/components/image-editor/form-controls.js.map +1 -1
  304. package/build/components/image-editor/index.js +0 -2
  305. package/build/components/image-editor/index.js.map +1 -1
  306. package/build/components/image-editor/rotation-button.js.map +1 -1
  307. package/build/components/image-editor/use-save-image.js.map +1 -1
  308. package/build/components/image-editor/use-transform-image.js.map +1 -1
  309. package/build/components/image-editor/zoom-dropdown.js.map +1 -1
  310. package/build/components/image-link-destinations/index.native.js.map +1 -1
  311. package/build/components/image-size-control/index.js.map +1 -1
  312. package/build/components/image-size-control/use-dimension-handler.js.map +1 -1
  313. package/build/components/index.js +1 -1
  314. package/build/components/index.js.map +1 -1
  315. package/build/components/index.native.js +1 -1
  316. package/build/components/index.native.js.map +1 -1
  317. package/build/components/inner-blocks/button-block-appender.js.map +1 -1
  318. package/build/components/inner-blocks/constants.native.js.map +1 -1
  319. package/build/components/inner-blocks/default-block-appender.js.map +1 -1
  320. package/build/components/inner-blocks/index.js +16 -2
  321. package/build/components/inner-blocks/index.js.map +1 -1
  322. package/build/components/inner-blocks/index.native.js.map +1 -1
  323. package/build/components/inner-blocks/use-block-context.js.map +1 -1
  324. package/build/components/inner-blocks/use-inner-block-template-sync.js.map +1 -1
  325. package/build/components/inner-blocks/use-nested-settings-update.js.map +1 -1
  326. package/build/components/inner-blocks/warning-max-depth-exceeded.native.js.map +1 -1
  327. package/build/components/inner-blocks/with-client-id.js.map +1 -1
  328. package/build/components/inserter/block-patterns-explorer/index.js.map +1 -1
  329. package/build/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js.map +1 -1
  330. package/build/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
  331. package/build/components/inserter/block-patterns-tab/index.js +19 -25
  332. package/build/components/inserter/block-patterns-tab/index.js.map +1 -1
  333. package/build/components/inserter/block-patterns-tab/pattern-category-preview-panel.js +2 -24
  334. package/build/components/inserter/block-patterns-tab/pattern-category-preview-panel.js.map +1 -1
  335. package/build/components/inserter/block-patterns-tab/pattern-category-previews.js +1 -3
  336. package/build/components/inserter/block-patterns-tab/pattern-category-previews.js.map +1 -1
  337. package/build/components/inserter/block-patterns-tab/patterns-filter.js.map +1 -1
  338. package/build/components/inserter/block-patterns-tab/use-pattern-categories.js.map +1 -1
  339. package/build/components/inserter/block-patterns-tab/utils.js.map +1 -1
  340. package/build/components/inserter/block-types-tab.js +4 -0
  341. package/build/components/inserter/block-types-tab.js.map +1 -1
  342. package/build/components/inserter/block-types-tab.native.js.map +1 -1
  343. package/build/components/inserter/category-tabs/index.js +56 -0
  344. package/build/components/inserter/category-tabs/index.js.map +1 -0
  345. package/build/components/inserter/hooks/use-block-type-impressions.native.js.map +1 -1
  346. package/build/components/inserter/hooks/use-block-types-state.js.map +1 -1
  347. package/build/components/inserter/hooks/use-clipboard-block.native.js.map +1 -1
  348. package/build/components/inserter/hooks/use-insertion-point.js.map +1 -1
  349. package/build/components/inserter/hooks/use-patterns-paging.js.map +1 -1
  350. package/build/components/inserter/hooks/use-patterns-state.js.map +1 -1
  351. package/build/components/inserter/index.js.map +1 -1
  352. package/build/components/inserter/index.native.js.map +1 -1
  353. package/build/components/inserter/library.js.map +1 -1
  354. package/build/components/inserter/media-tab/hooks.js.map +1 -1
  355. package/build/components/inserter/media-tab/index.js +2 -2
  356. package/build/components/inserter/media-tab/index.js.map +1 -1
  357. package/build/components/inserter/media-tab/media-list.js.map +1 -1
  358. package/build/components/inserter/media-tab/media-panel.js +0 -25
  359. package/build/components/inserter/media-tab/media-panel.js.map +1 -1
  360. package/build/components/inserter/media-tab/media-preview.js +13 -3
  361. package/build/components/inserter/media-tab/media-preview.js.map +1 -1
  362. package/build/components/inserter/media-tab/media-tab.js +15 -29
  363. package/build/components/inserter/media-tab/media-tab.js.map +1 -1
  364. package/build/components/inserter/media-tab/utils.js.map +1 -1
  365. package/build/components/inserter/menu.js +73 -77
  366. package/build/components/inserter/menu.js.map +1 -1
  367. package/build/components/inserter/menu.native.js.map +1 -1
  368. package/build/components/inserter/mobile-tab-navigation.js.map +1 -1
  369. package/build/components/inserter/no-results.js.map +1 -1
  370. package/build/components/inserter/no-results.native.js.map +1 -1
  371. package/build/components/inserter/panel.js.map +1 -1
  372. package/build/components/inserter/preview-panel.js.map +1 -1
  373. package/build/components/inserter/quick-inserter.js.map +1 -1
  374. package/build/components/inserter/reusable-block-rename-hint.js.map +1 -1
  375. package/build/components/inserter/reusable-blocks-tab.native.js.map +1 -1
  376. package/build/components/inserter/search-items.js.map +1 -1
  377. package/build/components/inserter/search-results.js.map +1 -1
  378. package/build/components/inserter/search-results.native.js.map +1 -1
  379. package/build/components/inserter/tabs.js +13 -9
  380. package/build/components/inserter/tabs.js.map +1 -1
  381. package/build/components/inserter/tabs.native.js.map +1 -1
  382. package/build/components/inserter/tips.js.map +1 -1
  383. package/build/components/inserter/utils.native.js.map +1 -1
  384. package/build/components/inserter-button/index.native.js.map +1 -1
  385. package/build/components/inserter-button/sparkles.js.map +1 -1
  386. package/build/components/inserter-draggable-blocks/index.js.map +1 -1
  387. package/build/components/inserter-list-item/index.js.map +1 -1
  388. package/build/components/inserter-listbox/context.js.map +1 -1
  389. package/build/components/inserter-listbox/group.js.map +1 -1
  390. package/build/components/inserter-listbox/index.js.map +1 -1
  391. package/build/components/inserter-listbox/item.js.map +1 -1
  392. package/build/components/inserter-listbox/row.js.map +1 -1
  393. package/build/components/inserter-menu-extension/index.js.map +1 -1
  394. package/build/components/inspector-controls/block-support-slot-container.js.map +1 -1
  395. package/build/components/inspector-controls/block-support-tools-panel.js.map +1 -1
  396. package/build/components/inspector-controls/fill.js.map +1 -1
  397. package/build/components/inspector-controls/fill.native.js.map +1 -1
  398. package/build/components/inspector-controls/groups.js.map +1 -1
  399. package/build/components/inspector-controls/index.js.map +1 -1
  400. package/build/components/inspector-controls/slot.js.map +1 -1
  401. package/build/components/inspector-controls/slot.native.js.map +1 -1
  402. package/build/components/inspector-controls-tabs/advanced-controls-panel.js +1 -1
  403. package/build/components/inspector-controls-tabs/advanced-controls-panel.js.map +1 -1
  404. package/build/components/inspector-controls-tabs/advanced-controls-panel.native.js.map +1 -1
  405. package/build/components/inspector-controls-tabs/index.js.map +1 -1
  406. package/build/components/inspector-controls-tabs/position-controls-panel.js.map +1 -1
  407. package/build/components/inspector-controls-tabs/settings-tab-hint.js.map +1 -1
  408. package/build/components/inspector-controls-tabs/settings-tab.js.map +1 -1
  409. package/build/components/inspector-controls-tabs/styles-tab.js +1 -1
  410. package/build/components/inspector-controls-tabs/styles-tab.js.map +1 -1
  411. package/build/components/inspector-controls-tabs/use-inspector-controls-tabs.js.map +1 -1
  412. package/build/components/inspector-controls-tabs/use-is-list-view-tab-disabled.js.map +1 -1
  413. package/build/components/inspector-controls-tabs/utils.js.map +1 -1
  414. package/build/components/inspector-popover-header/index.js.map +1 -1
  415. package/build/components/justify-content-control/index.js.map +1 -1
  416. package/build/components/justify-content-control/ui.js.map +1 -1
  417. package/build/components/keyboard-shortcuts/index.js.map +1 -1
  418. package/build/components/letter-spacing-control/index.js.map +1 -1
  419. package/build/components/line-height-control/index.js +6 -2
  420. package/build/components/line-height-control/index.js.map +1 -1
  421. package/build/components/line-height-control/index.native.js.map +1 -1
  422. package/build/components/line-height-control/utils.js.map +1 -1
  423. package/build/components/link-control/constants.js.map +1 -1
  424. package/build/components/link-control/index.js.map +1 -1
  425. package/build/components/link-control/is-url-like.js.map +1 -1
  426. package/build/components/link-control/link-preview.js.map +1 -1
  427. package/build/components/link-control/search-create-button.js.map +1 -1
  428. package/build/components/link-control/search-input.js.map +1 -1
  429. package/build/components/link-control/search-item.js +9 -3
  430. package/build/components/link-control/search-item.js.map +1 -1
  431. package/build/components/link-control/search-results.js.map +1 -1
  432. package/build/components/link-control/settings-drawer.js.map +1 -1
  433. package/build/components/link-control/settings.js.map +1 -1
  434. package/build/components/link-control/use-create-page.js.map +1 -1
  435. package/build/components/link-control/use-internal-value.js.map +1 -1
  436. package/build/components/link-control/use-rich-url-data.js.map +1 -1
  437. package/build/components/link-control/use-search-handler.js.map +1 -1
  438. package/build/components/link-control/viewer-slot.js.map +1 -1
  439. package/build/components/list-view/appender.js.map +1 -1
  440. package/build/components/list-view/aria-referenced-text.js.map +1 -1
  441. package/build/components/list-view/block-contents.js.map +1 -1
  442. package/build/components/list-view/block-select-button.js +5 -142
  443. package/build/components/list-view/block-select-button.js.map +1 -1
  444. package/build/components/list-view/block.js +166 -14
  445. package/build/components/list-view/block.js.map +1 -1
  446. package/build/components/list-view/branch.js.map +1 -1
  447. package/build/components/list-view/context.js.map +1 -1
  448. package/build/components/list-view/drop-indicator.js.map +1 -1
  449. package/build/components/list-view/expander.js.map +1 -1
  450. package/build/components/list-view/index.js +1 -1
  451. package/build/components/list-view/index.js.map +1 -1
  452. package/build/components/list-view/leaf.js.map +1 -1
  453. package/build/components/list-view/use-block-selection.js.map +1 -1
  454. package/build/components/list-view/use-clipboard-handler.js.map +1 -1
  455. package/build/components/list-view/use-list-view-block-indexes.js.map +1 -1
  456. package/build/components/list-view/use-list-view-client-ids.js.map +1 -1
  457. package/build/components/list-view/use-list-view-collapse-items.js.map +1 -1
  458. package/build/components/list-view/use-list-view-drop-zone.js +6 -1
  459. package/build/components/list-view/use-list-view-drop-zone.js.map +1 -1
  460. package/build/components/list-view/use-list-view-expand-selected-item.js.map +1 -1
  461. package/build/components/list-view/use-list-view-images.js.map +1 -1
  462. package/build/components/list-view/use-list-view-scroll-into-view.js.map +1 -1
  463. package/build/components/list-view/utils.js +3 -1
  464. package/build/components/list-view/utils.js.map +1 -1
  465. package/build/components/media-placeholder/index.js +3 -3
  466. package/build/components/media-placeholder/index.js.map +1 -1
  467. package/build/components/media-placeholder/index.native.js.map +1 -1
  468. package/build/components/media-replace-flow/index.js.map +1 -1
  469. package/build/components/media-replace-flow/index.native.js.map +1 -1
  470. package/build/components/media-upload/check.js.map +1 -1
  471. package/build/components/media-upload/constants.native.js.map +1 -1
  472. package/build/components/media-upload/index.js.map +1 -1
  473. package/build/components/media-upload/index.native.js.map +1 -1
  474. package/build/components/media-upload-progress/constants.js.map +1 -1
  475. package/build/components/media-upload-progress/index.native.js.map +1 -1
  476. package/build/components/multi-selection-inspector/index.js.map +1 -1
  477. package/build/components/navigable-toolbar/index.js +3 -1
  478. package/build/components/navigable-toolbar/index.js.map +1 -1
  479. package/build/components/observe-typing/index.js.map +1 -1
  480. package/build/components/panel-color-settings/index.js.map +1 -1
  481. package/build/components/plain-text/index.js.map +1 -1
  482. package/build/components/plain-text/index.native.js.map +1 -1
  483. package/build/components/preview-options/index.js.map +1 -1
  484. package/build/components/provider/block-refs-provider.js +3 -4
  485. package/build/components/provider/block-refs-provider.js.map +1 -1
  486. package/build/components/provider/index.js.map +1 -1
  487. package/build/components/provider/index.native.js.map +1 -1
  488. package/build/components/provider/use-block-sync.js +3 -12
  489. package/build/components/provider/use-block-sync.js.map +1 -1
  490. package/build/components/provider/with-registry-provider.js.map +1 -1
  491. package/build/components/publish-date-time-picker/index.js.map +1 -1
  492. package/build/components/recursion-provider/index.js +2 -2
  493. package/build/components/recursion-provider/index.js.map +1 -1
  494. package/build/components/resizable-box-popover/index.js.map +1 -1
  495. package/build/components/resolution-tool/index.js.map +1 -1
  496. package/build/components/responsive-block-control/index.js.map +1 -1
  497. package/build/components/responsive-block-control/label.js.map +1 -1
  498. package/build/components/rich-text/content.js +26 -19
  499. package/build/components/rich-text/content.js.map +1 -1
  500. package/build/components/rich-text/embed-handler-picker.native.js.map +1 -1
  501. package/build/components/rich-text/event-listeners/before-input-rules.js +93 -0
  502. package/build/components/rich-text/event-listeners/before-input-rules.js.map +1 -0
  503. package/build/components/rich-text/event-listeners/delete.js +58 -0
  504. package/build/components/rich-text/event-listeners/delete.js.map +1 -0
  505. package/build/components/rich-text/event-listeners/enter.js +98 -0
  506. package/build/components/rich-text/event-listeners/enter.js.map +1 -0
  507. package/build/components/rich-text/event-listeners/firefox-compat.js +36 -0
  508. package/build/components/rich-text/event-listeners/firefox-compat.js.map +1 -0
  509. package/build/components/rich-text/event-listeners/index.js +44 -0
  510. package/build/components/rich-text/event-listeners/index.js.map +1 -0
  511. package/build/components/rich-text/event-listeners/input-events.js +22 -0
  512. package/build/components/rich-text/event-listeners/input-events.js.map +1 -0
  513. package/build/components/rich-text/event-listeners/input-rules.js +135 -0
  514. package/build/components/rich-text/event-listeners/input-rules.js.map +1 -0
  515. package/build/components/rich-text/event-listeners/insert-replacement-text.js +33 -0
  516. package/build/components/rich-text/event-listeners/insert-replacement-text.js.map +1 -0
  517. package/build/components/rich-text/event-listeners/paste-handler.js +146 -0
  518. package/build/components/rich-text/event-listeners/paste-handler.js.map +1 -0
  519. package/build/components/rich-text/event-listeners/remove-browser-shortcuts.js +27 -0
  520. package/build/components/rich-text/event-listeners/remove-browser-shortcuts.js.map +1 -0
  521. package/build/components/rich-text/event-listeners/shortcuts.js +22 -0
  522. package/build/components/rich-text/event-listeners/shortcuts.js.map +1 -0
  523. package/build/components/rich-text/event-listeners/undo-automatic-change.js +51 -0
  524. package/build/components/rich-text/event-listeners/undo-automatic-change.js.map +1 -0
  525. package/build/components/rich-text/file-paste-handler.native.js.map +1 -1
  526. package/build/components/rich-text/format-edit.js.map +1 -1
  527. package/build/components/rich-text/format-toolbar/index.js.map +1 -1
  528. package/build/components/rich-text/format-toolbar/index.native.js.map +1 -1
  529. package/build/components/rich-text/format-toolbar-container.js.map +1 -1
  530. package/build/components/rich-text/format-toolbar-container.native.js.map +1 -1
  531. package/build/components/rich-text/get-rich-text-values.js.map +1 -1
  532. package/build/components/rich-text/index.js +51 -31
  533. package/build/components/rich-text/index.js.map +1 -1
  534. package/build/components/rich-text/index.native.js +16 -4
  535. package/build/components/rich-text/index.native.js.map +1 -1
  536. package/build/components/rich-text/input-event.js.map +1 -1
  537. package/build/components/rich-text/input-event.native.js.map +1 -1
  538. package/build/components/rich-text/multiline.js +6 -2
  539. package/build/components/rich-text/multiline.js.map +1 -1
  540. package/build/components/rich-text/native/format-edit.js.map +1 -1
  541. package/build/components/rich-text/native/get-format-colors.native.js.map +1 -1
  542. package/build/components/rich-text/native/index.js.map +1 -1
  543. package/build/components/rich-text/native/index.native.js +12 -0
  544. package/build/components/rich-text/native/index.native.js.map +1 -1
  545. package/build/components/rich-text/native/toolbar-button-with-options.native.js.map +1 -1
  546. package/build/components/rich-text/native/use-format-types.js.map +1 -1
  547. package/build/components/rich-text/prevent-event-discovery.js.map +1 -1
  548. package/build/components/rich-text/remove-browser-shortcuts.native.js.map +1 -1
  549. package/build/components/rich-text/shortcut.js.map +1 -1
  550. package/build/components/rich-text/shortcut.native.js.map +1 -1
  551. package/build/components/rich-text/split-value.js.map +1 -1
  552. package/build/components/rich-text/toolbar-button.js.map +1 -1
  553. package/build/components/rich-text/use-format-types.js +8 -4
  554. package/build/components/rich-text/use-format-types.js.map +1 -1
  555. package/build/components/rich-text/use-mark-persistent.js.map +1 -1
  556. package/build/components/rich-text/utils.js.map +1 -1
  557. package/build/components/rich-text/with-deprecations.js.map +1 -1
  558. package/build/components/segmented-text-control/index.js +62 -0
  559. package/build/components/segmented-text-control/index.js.map +1 -0
  560. package/build/components/selection-scroll-into-view/index.js.map +1 -1
  561. package/build/components/skip-to-selected-block/index.js.map +1 -1
  562. package/build/components/spacing-sizes-control/hooks/use-spacing-sizes.js.map +1 -1
  563. package/build/components/spacing-sizes-control/index.js.map +1 -1
  564. package/build/components/spacing-sizes-control/input-controls/axial.js.map +1 -1
  565. package/build/components/spacing-sizes-control/input-controls/separated.js.map +1 -1
  566. package/build/components/spacing-sizes-control/input-controls/single.js.map +1 -1
  567. package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js +16 -2
  568. package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
  569. package/build/components/spacing-sizes-control/sides-dropdown/index.js.map +1 -1
  570. package/build/components/spacing-sizes-control/utils.js.map +1 -1
  571. package/build/components/text-alignment-control/index.js +76 -0
  572. package/build/components/text-alignment-control/index.js.map +1 -0
  573. package/build/components/text-decoration-control/index.js +21 -25
  574. package/build/components/text-decoration-control/index.js.map +1 -1
  575. package/build/components/text-transform-control/index.js +18 -22
  576. package/build/components/text-transform-control/index.js.map +1 -1
  577. package/build/components/tool-selector/index.js.map +1 -1
  578. package/build/components/typewriter/index.js.map +1 -1
  579. package/build/components/ungroup-button/index.native.js.map +1 -1
  580. package/build/components/unit-control/index.js.map +1 -1
  581. package/build/components/unsupported-block-details/index.native.js.map +1 -1
  582. package/build/components/url-input/button.js.map +1 -1
  583. package/build/components/url-input/index.js.map +1 -1
  584. package/build/components/url-input/index.native.js.map +1 -1
  585. package/build/components/url-popover/image-url-input-ui.js.map +1 -1
  586. package/build/components/url-popover/index.js.map +1 -1
  587. package/build/components/url-popover/link-editor.js.map +1 -1
  588. package/build/components/url-popover/link-viewer-url.js.map +1 -1
  589. package/build/components/url-popover/link-viewer.js.map +1 -1
  590. package/build/components/use-block-commands/index.js +20 -2
  591. package/build/components/use-block-commands/index.js.map +1 -1
  592. package/build/components/use-block-display-information/index.js +9 -3
  593. package/build/components/use-block-display-information/index.js.map +1 -1
  594. package/build/components/use-block-drop-zone/index.js.map +1 -1
  595. package/build/components/use-block-drop-zone/index.native.js.map +1 -1
  596. package/build/components/use-flash-editable-blocks/index.js.map +1 -1
  597. package/build/components/use-moving-animation/index.js.map +1 -1
  598. package/build/components/use-on-block-drop/index.js +3 -1
  599. package/build/components/use-on-block-drop/index.js.map +1 -1
  600. package/build/components/use-on-block-drop/index.native.js.map +1 -1
  601. package/build/components/use-on-block-drop/types.js.map +1 -1
  602. package/build/components/use-paste-styles/index.js +1 -0
  603. package/build/components/use-paste-styles/index.js.map +1 -1
  604. package/build/components/use-resize-canvas/index.js.map +1 -1
  605. package/build/components/use-settings/index.js.map +1 -1
  606. package/build/components/use-unsupported-block-editor/index.native.js.map +1 -1
  607. package/build/components/video-player/gridicon-play.native.js.map +1 -1
  608. package/build/components/video-player/index.native.js.map +1 -1
  609. package/build/components/warning/index.js.map +1 -1
  610. package/build/components/warning/index.native.js.map +1 -1
  611. package/build/components/writing-flow/index.js.map +1 -1
  612. package/build/components/writing-flow/use-arrow-nav.js.map +1 -1
  613. package/build/components/writing-flow/use-click-selection.js.map +1 -1
  614. package/build/components/writing-flow/use-clipboard-handler.js.map +1 -1
  615. package/build/components/writing-flow/use-drag-selection.js +3 -1
  616. package/build/components/writing-flow/use-drag-selection.js.map +1 -1
  617. package/build/components/writing-flow/use-input.js.map +1 -1
  618. package/build/components/writing-flow/use-multi-selection.js.map +1 -1
  619. package/build/components/writing-flow/use-select-all.js.map +1 -1
  620. package/build/components/writing-flow/use-selection-observer.js.map +1 -1
  621. package/build/components/writing-flow/use-tab-nav.js +3 -1
  622. package/build/components/writing-flow/use-tab-nav.js.map +1 -1
  623. package/build/components/writing-flow/utils.js.map +1 -1
  624. package/build/components/writing-mode-control/index.js +16 -20
  625. package/build/components/writing-mode-control/index.js.map +1 -1
  626. package/build/elements/index.js.map +1 -1
  627. package/build/hooks/align.js.map +1 -1
  628. package/build/hooks/align.native.js +1 -1
  629. package/build/hooks/align.native.js.map +1 -1
  630. package/build/hooks/anchor.js.map +1 -1
  631. package/build/hooks/aria-label.js.map +1 -1
  632. package/build/hooks/background.js +3 -3
  633. package/build/hooks/background.js.map +1 -1
  634. package/build/hooks/block-hooks.js.map +1 -1
  635. package/build/hooks/block-renaming.js +0 -37
  636. package/build/hooks/block-renaming.js.map +1 -1
  637. package/build/hooks/border.js.map +1 -1
  638. package/build/hooks/color.js +1 -1
  639. package/build/hooks/color.js.map +1 -1
  640. package/build/hooks/compat.js.map +1 -1
  641. package/build/hooks/content-lock-ui.js +5 -5
  642. package/build/hooks/content-lock-ui.js.map +1 -1
  643. package/build/hooks/contrast-checker.js.map +1 -1
  644. package/build/hooks/custom-class-name.js.map +1 -1
  645. package/build/hooks/custom-class-name.native.js.map +1 -1
  646. package/build/hooks/dimensions.js.map +1 -1
  647. package/build/hooks/duotone.js +3 -1
  648. package/build/hooks/duotone.js.map +1 -1
  649. package/build/hooks/font-family.js.map +1 -1
  650. package/build/hooks/font-size.js.map +1 -1
  651. package/build/hooks/gap.js.map +1 -1
  652. package/build/hooks/generated-class-name.js.map +1 -1
  653. package/build/hooks/index.js +6 -5
  654. package/build/hooks/index.js.map +1 -1
  655. package/build/hooks/index.native.js.map +1 -1
  656. package/build/hooks/layout-child.js.map +1 -1
  657. package/build/hooks/layout.js +38 -19
  658. package/build/hooks/layout.js.map +1 -1
  659. package/build/hooks/layout.native.js.map +1 -1
  660. package/build/hooks/line-height.js.map +1 -1
  661. package/build/hooks/lock.js.map +1 -1
  662. package/build/hooks/metadata.js.map +1 -1
  663. package/build/hooks/position.js.map +1 -1
  664. package/build/hooks/settings.js.map +1 -1
  665. package/build/hooks/spacing-visualizer.js.map +1 -1
  666. package/build/hooks/style.js.map +1 -1
  667. package/build/hooks/supports.js +27 -4
  668. package/build/hooks/supports.js.map +1 -1
  669. package/build/hooks/text-align.js +156 -0
  670. package/build/hooks/text-align.js.map +1 -0
  671. package/build/hooks/typography.js +3 -2
  672. package/build/hooks/typography.js.map +1 -1
  673. package/build/hooks/typography.native.js.map +1 -1
  674. package/build/hooks/use-bindings-attributes.js +66 -129
  675. package/build/hooks/use-bindings-attributes.js.map +1 -1
  676. package/build/hooks/use-border-props.js.map +1 -1
  677. package/build/hooks/use-cached-truthy.js.map +1 -1
  678. package/build/hooks/use-color-props.js.map +1 -1
  679. package/build/hooks/use-editor-wrapper-styles.native.js.map +1 -1
  680. package/build/hooks/use-shadow-props.js.map +1 -1
  681. package/build/hooks/use-spacing-props.js.map +1 -1
  682. package/build/hooks/use-typography-props.js +2 -1
  683. package/build/hooks/use-typography-props.js.map +1 -1
  684. package/build/hooks/use-zoom-out.js +22 -15
  685. package/build/hooks/use-zoom-out.js.map +1 -1
  686. package/build/hooks/utils.js +37 -8
  687. package/build/hooks/utils.js.map +1 -1
  688. package/build/index.js.map +1 -1
  689. package/build/index.native.js.map +1 -1
  690. package/build/layouts/constrained.js.map +1 -1
  691. package/build/layouts/definitions.js +8 -6
  692. package/build/layouts/definitions.js.map +1 -1
  693. package/build/layouts/flex.js.map +1 -1
  694. package/build/layouts/flow.js.map +1 -1
  695. package/build/layouts/grid.js +52 -9
  696. package/build/layouts/grid.js.map +1 -1
  697. package/build/layouts/index.js.map +1 -1
  698. package/build/layouts/utils.js.map +1 -1
  699. package/build/lock-unlock.js.map +1 -1
  700. package/build/private-apis.js +5 -3
  701. package/build/private-apis.js.map +1 -1
  702. package/build/private-apis.native.js +1 -1
  703. package/build/private-apis.native.js.map +1 -1
  704. package/build/store/actions.js +47 -9
  705. package/build/store/actions.js.map +1 -1
  706. package/build/store/array.js.map +1 -1
  707. package/build/store/constants.js.map +1 -1
  708. package/build/store/defaults.js.map +1 -1
  709. package/build/store/defaults.native.js.map +1 -1
  710. package/build/store/get-block-settings.js.map +1 -1
  711. package/build/store/index.js +1 -1
  712. package/build/store/index.js.map +1 -1
  713. package/build/store/private-actions.js +5 -2
  714. package/build/store/private-actions.js.map +1 -1
  715. package/build/store/private-keys.js.map +1 -1
  716. package/build/store/private-selectors.js +121 -44
  717. package/build/store/private-selectors.js.map +1 -1
  718. package/build/store/reducer.js +11 -8
  719. package/build/store/reducer.js.map +1 -1
  720. package/build/store/selectors.js +143 -88
  721. package/build/store/selectors.js.map +1 -1
  722. package/build/store/undo-ignore.js.map +1 -1
  723. package/build/store/utils.js.map +1 -1
  724. package/build/utils/dom.js.map +1 -1
  725. package/build/utils/get-px-from-css-unit.js.map +1 -1
  726. package/build/utils/index.js.map +1 -1
  727. package/build/utils/math.js.map +1 -1
  728. package/build/utils/object.js +17 -0
  729. package/build/utils/object.js.map +1 -1
  730. package/build/utils/order-inserter-block-items.js +6 -2
  731. package/build/utils/order-inserter-block-items.js.map +1 -1
  732. package/build/utils/pasting.js +6 -2
  733. package/build/utils/pasting.js.map +1 -1
  734. package/build/utils/selection.js.map +1 -1
  735. package/build/utils/sorting.js.map +1 -1
  736. package/build/utils/transform-styles/index.js +1 -1
  737. package/build/utils/transform-styles/index.js.map +1 -1
  738. package/build/utils/use-notify-copy.js.map +1 -1
  739. package/build-module/autocompleters/block.js.map +1 -1
  740. package/build-module/autocompleters/link.js.map +1 -1
  741. package/build-module/components/alignment-control/index.js.map +1 -1
  742. package/build-module/components/alignment-control/ui.js +3 -1
  743. package/build-module/components/alignment-control/ui.js.map +1 -1
  744. package/build-module/components/autocomplete/index.js.map +1 -1
  745. package/build-module/components/block-actions/index.js.map +1 -1
  746. package/build-module/components/block-alignment-control/constants.js.map +1 -1
  747. package/build-module/components/block-alignment-control/index.js.map +1 -1
  748. package/build-module/components/block-alignment-control/ui.js.map +1 -1
  749. package/build-module/components/block-alignment-control/ui.native.js.map +1 -1
  750. package/build-module/components/block-alignment-control/use-available-alignments.js.map +1 -1
  751. package/build-module/components/block-alignment-matrix-control/index.js.map +1 -1
  752. package/build-module/components/block-bindings-toolbar-indicator/index.js.map +1 -1
  753. package/build-module/components/block-breadcrumb/index.js.map +1 -1
  754. package/build-module/components/block-canvas/index.js.map +1 -1
  755. package/build-module/components/block-caption/index.native.js.map +1 -1
  756. package/build-module/components/block-card/index.js.map +1 -1
  757. package/build-module/components/block-compare/block-view.js.map +1 -1
  758. package/build-module/components/block-compare/index.js.map +1 -1
  759. package/build-module/components/block-content-overlay/index.js.map +1 -1
  760. package/build-module/components/block-context/index.js.map +1 -1
  761. package/build-module/components/block-controls/fill.js.map +1 -1
  762. package/build-module/components/block-controls/groups.js.map +1 -1
  763. package/build-module/components/block-controls/hook.js.map +1 -1
  764. package/build-module/components/block-controls/index.js.map +1 -1
  765. package/build-module/components/block-controls/slot.js.map +1 -1
  766. package/build-module/components/block-controls/slot.native.js.map +1 -1
  767. package/build-module/components/block-controls/use-has-block-controls.js.map +1 -1
  768. package/build-module/components/block-draggable/draggable-chip.js.map +1 -1
  769. package/build-module/components/block-draggable/draggable-chip.native.js.map +1 -1
  770. package/build-module/components/block-draggable/dropping-insertion-point.native.js.map +1 -1
  771. package/build-module/components/block-draggable/index.js.map +1 -1
  772. package/build-module/components/block-draggable/index.native.js.map +1 -1
  773. package/build-module/components/block-draggable/use-scroll-when-dragging.js.map +1 -1
  774. package/build-module/components/block-draggable/use-scroll-when-dragging.native.js.map +1 -1
  775. package/build-module/components/block-edit/context.js +1 -0
  776. package/build-module/components/block-edit/context.js.map +1 -1
  777. package/build-module/components/block-edit/edit.js.map +1 -1
  778. package/build-module/components/block-edit/edit.native.js.map +1 -1
  779. package/build-module/components/block-edit/index.js +5 -3
  780. package/build-module/components/block-edit/index.js.map +1 -1
  781. package/build-module/components/block-edit-visually-button/index.js.map +1 -1
  782. package/build-module/components/block-editing-mode/index.js.map +1 -1
  783. package/build-module/components/block-full-height-alignment-control/index.js.map +1 -1
  784. package/build-module/components/block-heading-level-dropdown/heading-level-icon.js.map +1 -1
  785. package/build-module/components/block-heading-level-dropdown/index.js.map +1 -1
  786. package/build-module/components/block-heading-level-dropdown/index.native.js.map +1 -1
  787. package/build-module/components/block-icon/index.js.map +1 -1
  788. package/build-module/components/block-icon/index.native.js.map +1 -1
  789. package/build-module/components/block-info-slot-fill/index.js.map +1 -1
  790. package/build-module/components/block-inspector/index.js +5 -4
  791. package/build-module/components/block-inspector/index.js.map +1 -1
  792. package/build-module/components/block-inspector/useBlockInspectorAnimationSettings.js.map +1 -1
  793. package/build-module/components/block-list/block-crash-boundary.js.map +1 -1
  794. package/build-module/components/block-list/block-crash-boundary.native.js.map +1 -1
  795. package/build-module/components/block-list/block-crash-warning.js.map +1 -1
  796. package/build-module/components/block-list/block-crash-warning.native.js.map +1 -1
  797. package/build-module/components/block-list/block-html.js.map +1 -1
  798. package/build-module/components/block-list/block-invalid-warning.js.map +1 -1
  799. package/build-module/components/block-list/block-invalid-warning.native.js.map +1 -1
  800. package/build-module/components/block-list/block-list-context.native.js.map +1 -1
  801. package/build-module/components/block-list/block-list-item-cell.native.js.map +1 -1
  802. package/build-module/components/block-list/block-list-item.native.js.map +1 -1
  803. package/build-module/components/block-list/block-outline.native.js.map +1 -1
  804. package/build-module/components/block-list/block-selection-button.native.js.map +1 -1
  805. package/build-module/components/block-list/block.js +44 -35
  806. package/build-module/components/block-list/block.js.map +1 -1
  807. package/build-module/components/block-list/block.native.js +2 -2
  808. package/build-module/components/block-list/block.native.js.map +1 -1
  809. package/build-module/components/block-list/grid-item.native.js.map +1 -1
  810. package/build-module/components/block-list/index.js +18 -6
  811. package/build-module/components/block-list/index.js.map +1 -1
  812. package/build-module/components/block-list/index.native.js +1 -9
  813. package/build-module/components/block-list/index.native.js.map +1 -1
  814. package/build-module/components/block-list/insertion-point.native.js.map +1 -1
  815. package/build-module/components/block-list/layout.js.map +1 -1
  816. package/build-module/components/block-list/private-block-context.js.map +1 -1
  817. package/build-module/components/block-list/subdirectory-icon.js.map +1 -1
  818. package/build-module/components/block-list/use-block-props/index.js +8 -7
  819. package/build-module/components/block-list/use-block-props/index.js.map +1 -1
  820. package/build-module/components/block-list/use-block-props/index.native.js.map +1 -1
  821. package/build-module/components/block-list/use-block-props/use-block-refs.js +19 -48
  822. package/build-module/components/block-list/use-block-props/use-block-refs.js.map +1 -1
  823. package/build-module/components/block-list/use-block-props/use-focus-first-element.js +3 -2
  824. package/build-module/components/block-list/use-block-props/use-focus-first-element.js.map +1 -1
  825. package/build-module/components/block-list/use-block-props/use-focus-handler.js.map +1 -1
  826. package/build-module/components/block-list/use-block-props/use-intersection-observer.js.map +1 -1
  827. package/build-module/components/block-list/use-block-props/use-is-hovered.js +10 -14
  828. package/build-module/components/block-list/use-block-props/use-is-hovered.js.map +1 -1
  829. package/build-module/components/block-list/use-block-props/use-nav-mode-exit.js.map +1 -1
  830. package/build-module/components/block-list/use-block-props/use-selected-block-event-handlers.js.map +1 -1
  831. package/build-module/components/block-list/use-in-between-inserter.js.map +1 -1
  832. package/build-module/components/block-list/use-scroll-upon-insertion.native.js.map +1 -1
  833. package/build-module/components/block-list-appender/index.js.map +1 -1
  834. package/build-module/components/block-list-appender/index.native.js.map +1 -1
  835. package/build-module/components/block-lock/index.js.map +1 -1
  836. package/build-module/components/block-lock/menu-item.js.map +1 -1
  837. package/build-module/components/block-lock/modal.js.map +1 -1
  838. package/build-module/components/block-lock/toolbar.js.map +1 -1
  839. package/build-module/components/block-lock/use-block-lock.js.map +1 -1
  840. package/build-module/components/block-media-update-progress/index.native.js.map +1 -1
  841. package/build-module/components/block-mover/button.js.map +1 -1
  842. package/build-module/components/block-mover/index.js.map +1 -1
  843. package/build-module/components/block-mover/index.native.js +3 -1
  844. package/build-module/components/block-mover/index.native.js.map +1 -1
  845. package/build-module/components/block-mover/mover-description.js.map +1 -1
  846. package/build-module/components/block-mover/mover-description.native.js.map +1 -1
  847. package/build-module/components/block-navigation/dropdown.js.map +1 -1
  848. package/build-module/components/block-parent-selector/index.js.map +1 -1
  849. package/build-module/components/block-pattern-setup/constants.js.map +1 -1
  850. package/build-module/components/block-pattern-setup/index.js.map +1 -1
  851. package/build-module/components/block-pattern-setup/setup-toolbar.js.map +1 -1
  852. package/build-module/components/block-pattern-setup/use-patterns-setup.js.map +1 -1
  853. package/build-module/components/block-patterns-list/index.js.map +1 -1
  854. package/build-module/components/block-patterns-paging/index.js +8 -4
  855. package/build-module/components/block-patterns-paging/index.js.map +1 -1
  856. package/build-module/components/block-popover/cover.js.map +1 -1
  857. package/build-module/components/block-popover/drop-zone.js.map +1 -1
  858. package/build-module/components/block-popover/inbetween.js.map +1 -1
  859. package/build-module/components/block-popover/index.js.map +1 -1
  860. package/build-module/components/block-popover/use-popover-scroll.js.map +1 -1
  861. package/build-module/components/block-preview/auto.js.map +1 -1
  862. package/build-module/components/block-preview/index.js.map +1 -1
  863. package/build-module/components/block-quick-navigation/index.js.map +1 -1
  864. package/build-module/components/block-removal-warning-modal/index.js.map +1 -1
  865. package/build-module/components/block-rename/index.js.map +1 -1
  866. package/build-module/components/block-rename/is-empty-string.js.map +1 -1
  867. package/build-module/components/block-rename/modal.js +14 -10
  868. package/build-module/components/block-rename/modal.js.map +1 -1
  869. package/build-module/components/block-rename/rename-control.js +3 -1
  870. package/build-module/components/block-rename/rename-control.js.map +1 -1
  871. package/build-module/components/block-rename/use-block-rename.js.map +1 -1
  872. package/build-module/components/block-selection-clearer/index.js.map +1 -1
  873. package/build-module/components/block-settings/button.native.js.map +1 -1
  874. package/build-module/components/block-settings/container.native.js.map +1 -1
  875. package/build-module/components/block-settings/index.native.js.map +1 -1
  876. package/build-module/components/block-settings-menu/block-html-convert-button.js.map +1 -1
  877. package/build-module/components/block-settings-menu/block-mode-toggle.js.map +1 -1
  878. package/build-module/components/block-settings-menu/block-parent-selector-menu-item.js.map +1 -1
  879. package/build-module/components/block-settings-menu/block-settings-dropdown.js +1 -26
  880. package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  881. package/build-module/components/block-settings-menu/block-settings-menu-first-item.js.map +1 -1
  882. package/build-module/components/block-settings-menu/index.js.map +1 -1
  883. package/build-module/components/block-settings-menu-controls/index.js.map +1 -1
  884. package/build-module/components/block-styles/index.js.map +1 -1
  885. package/build-module/components/block-styles/index.native.js.map +1 -1
  886. package/build-module/components/block-styles/menu-items.js.map +1 -1
  887. package/build-module/components/block-styles/preview-panel.js.map +1 -1
  888. package/build-module/components/block-styles/preview.native.js.map +1 -1
  889. package/build-module/components/block-styles/use-styles-for-block.js.map +1 -1
  890. package/build-module/components/block-styles/utils.js.map +1 -1
  891. package/build-module/components/block-switcher/block-styles-menu.js.map +1 -1
  892. package/build-module/components/block-switcher/block-transformations-menu.js.map +1 -1
  893. package/build-module/components/block-switcher/block-transformations-menu.native.js.map +1 -1
  894. package/build-module/components/block-switcher/block-variation-transformations.js.map +1 -1
  895. package/build-module/components/block-switcher/index.js.map +1 -1
  896. package/build-module/components/block-switcher/pattern-transformations-menu.js +3 -1
  897. package/build-module/components/block-switcher/pattern-transformations-menu.js.map +1 -1
  898. package/build-module/components/block-switcher/preview-block-popover.js.map +1 -1
  899. package/build-module/components/block-switcher/use-transformed-patterns.js +6 -2
  900. package/build-module/components/block-switcher/use-transformed-patterns.js.map +1 -1
  901. package/build-module/components/block-switcher/utils.js +15 -5
  902. package/build-module/components/block-switcher/utils.js.map +1 -1
  903. package/build-module/components/block-title/index.js.map +1 -1
  904. package/build-module/components/block-title/use-block-display-title.js.map +1 -1
  905. package/build-module/components/block-toolbar/block-name-context.js.map +1 -1
  906. package/build-module/components/block-toolbar/block-toolbar-last-item.js.map +1 -1
  907. package/build-module/components/block-toolbar/block-toolbar-menu.native.js.map +1 -1
  908. package/build-module/components/block-toolbar/index.js +1 -1
  909. package/build-module/components/block-toolbar/index.js.map +1 -1
  910. package/build-module/components/block-toolbar/index.native.js.map +1 -1
  911. package/build-module/components/block-toolbar/shuffle.js.map +1 -1
  912. package/build-module/components/block-toolbar/use-has-block-toolbar.js +20 -12
  913. package/build-module/components/block-toolbar/use-has-block-toolbar.js.map +1 -1
  914. package/build-module/components/block-toolbar/utils.js.map +1 -1
  915. package/build-module/components/block-tools/block-selection-button.js +16 -12
  916. package/build-module/components/block-tools/block-selection-button.js.map +1 -1
  917. package/build-module/components/block-tools/block-toolbar-breadcrumb.js.map +1 -1
  918. package/build-module/components/block-tools/block-toolbar-popover.js.map +1 -1
  919. package/build-module/components/block-tools/empty-block-inserter.js.map +1 -1
  920. package/build-module/components/block-tools/index.js +3 -1
  921. package/build-module/components/block-tools/index.js.map +1 -1
  922. package/build-module/components/block-tools/insertion-point.js.map +1 -1
  923. package/build-module/components/block-tools/use-block-toolbar-popover-props.js.map +1 -1
  924. package/build-module/components/block-tools/use-selected-block-tool-props.js.map +1 -1
  925. package/build-module/components/block-tools/use-show-block-tools.js +9 -18
  926. package/build-module/components/block-tools/use-show-block-tools.js.map +1 -1
  927. package/build-module/components/block-tools/zoom-out-mode-inserters.js +5 -1
  928. package/build-module/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
  929. package/build-module/components/block-types-list/index.js.map +1 -1
  930. package/build-module/components/block-types-list/index.native.js.map +1 -1
  931. package/build-module/components/block-variation-picker/index.js +3 -2
  932. package/build-module/components/block-variation-picker/index.js.map +1 -1
  933. package/build-module/components/block-variation-picker/index.native.js.map +1 -1
  934. package/build-module/components/block-variation-transforms/index.js +7 -2
  935. package/build-module/components/block-variation-transforms/index.js.map +1 -1
  936. package/build-module/components/block-vertical-alignment-control/icons.js.map +1 -1
  937. package/build-module/components/block-vertical-alignment-control/index.js.map +1 -1
  938. package/build-module/components/block-vertical-alignment-control/ui.js.map +1 -1
  939. package/build-module/components/border-radius-control/all-input-control.js.map +1 -1
  940. package/build-module/components/border-radius-control/index.js.map +1 -1
  941. package/build-module/components/border-radius-control/input-controls.js.map +1 -1
  942. package/build-module/components/border-radius-control/linked-button.js.map +1 -1
  943. package/build-module/components/border-radius-control/utils.js.map +1 -1
  944. package/build-module/components/button-block-appender/index.js.map +1 -1
  945. package/build-module/components/button-block-appender/index.native.js +11 -1
  946. package/build-module/components/button-block-appender/index.native.js.map +1 -1
  947. package/build-module/components/caption/index.native.js.map +1 -1
  948. package/build-module/components/child-layout-control/index.js.map +1 -1
  949. package/build-module/components/color-palette/control.js.map +1 -1
  950. package/build-module/components/color-palette/index.js.map +1 -1
  951. package/build-module/components/color-palette/with-color-context.js.map +1 -1
  952. package/build-module/components/color-style-selector/index.js.map +1 -1
  953. package/build-module/components/colors/index.js.map +1 -1
  954. package/build-module/components/colors/utils.js.map +1 -1
  955. package/build-module/components/colors/with-colors.js.map +1 -1
  956. package/build-module/components/colors-gradients/control.js.map +1 -1
  957. package/build-module/components/colors-gradients/dropdown.js.map +1 -1
  958. package/build-module/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
  959. package/build-module/components/colors-gradients/panel-color-gradient-settings.native.js.map +1 -1
  960. package/build-module/components/colors-gradients/use-multiple-origin-colors-and-gradients.js.map +1 -1
  961. package/build-module/components/contrast-checker/index.js.map +1 -1
  962. package/build-module/components/contrast-checker/index.native.js.map +1 -1
  963. package/build-module/components/convert-to-group-buttons/index.js.map +1 -1
  964. package/build-module/components/convert-to-group-buttons/index.native.js.map +1 -1
  965. package/build-module/components/convert-to-group-buttons/toolbar.js.map +1 -1
  966. package/build-module/components/convert-to-group-buttons/use-convert-to-group-button-props.js.map +1 -1
  967. package/build-module/components/copy-handler/index.js.map +1 -1
  968. package/build-module/components/date-format-picker/index.js.map +1 -1
  969. package/build-module/components/default-block-appender/index.js.map +1 -1
  970. package/build-module/components/default-block-appender/index.native.js.map +1 -1
  971. package/build-module/components/dimensions-tool/aspect-ratio-tool.js.map +1 -1
  972. package/build-module/components/dimensions-tool/index.js.map +1 -1
  973. package/build-module/components/dimensions-tool/scale-tool.js.map +1 -1
  974. package/build-module/components/dimensions-tool/width-height-tool.js.map +1 -1
  975. package/build-module/components/duotone/utils.js.map +1 -1
  976. package/build-module/components/duotone-control/index.js.map +1 -1
  977. package/build-module/components/editable-text/index.js.map +1 -1
  978. package/build-module/components/editor-styles/index.js +3 -2
  979. package/build-module/components/editor-styles/index.js.map +1 -1
  980. package/build-module/components/floating-toolbar/index.native.js +9 -5
  981. package/build-module/components/floating-toolbar/index.native.js.map +1 -1
  982. package/build-module/components/floating-toolbar/nav-up-icon.js.map +1 -1
  983. package/build-module/components/font-appearance-control/index.js.map +1 -1
  984. package/build-module/components/font-family/index.js.map +1 -1
  985. package/build-module/components/font-sizes/fluid-utils.js.map +1 -1
  986. package/build-module/components/font-sizes/font-size-picker.js.map +1 -1
  987. package/build-module/components/font-sizes/index.js.map +1 -1
  988. package/build-module/components/font-sizes/index.native.js.map +1 -1
  989. package/build-module/components/font-sizes/utils.js.map +1 -1
  990. package/build-module/components/font-sizes/with-font-sizes.js.map +1 -1
  991. package/build-module/components/global-styles/advanced-panel.js.map +1 -1
  992. package/build-module/components/global-styles/background-panel.js +20 -17
  993. package/build-module/components/global-styles/background-panel.js.map +1 -1
  994. package/build-module/components/global-styles/border-panel.js.map +1 -1
  995. package/build-module/components/global-styles/color-panel.js +3 -1
  996. package/build-module/components/global-styles/color-panel.js.map +1 -1
  997. package/build-module/components/global-styles/color-panel.native.js.map +1 -1
  998. package/build-module/components/global-styles/context.js.map +1 -1
  999. package/build-module/components/global-styles/dimensions-panel.js +17 -1
  1000. package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
  1001. package/build-module/components/global-styles/filters-panel.js.map +1 -1
  1002. package/build-module/components/global-styles/get-block-css-selector.js.map +1 -1
  1003. package/build-module/components/global-styles/get-global-styles-changes.js.map +1 -1
  1004. package/build-module/components/global-styles/hooks.js +3 -2
  1005. package/build-module/components/global-styles/hooks.js.map +1 -1
  1006. package/build-module/components/global-styles/image-settings-panel.js.map +1 -1
  1007. package/build-module/components/global-styles/index.js.map +1 -1
  1008. package/build-module/components/global-styles/shadow-panel-components.js.map +1 -1
  1009. package/build-module/components/global-styles/typography-panel.js +24 -24
  1010. package/build-module/components/global-styles/typography-panel.js.map +1 -1
  1011. package/build-module/components/global-styles/typography-utils.js.map +1 -1
  1012. package/build-module/components/global-styles/use-global-styles-output.js +153 -136
  1013. package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
  1014. package/build-module/components/global-styles/utils.js +44 -0
  1015. package/build-module/components/global-styles/utils.js.map +1 -1
  1016. package/build-module/components/gradients/index.js.map +1 -1
  1017. package/build-module/components/gradients/index.native.js.map +1 -1
  1018. package/build-module/components/gradients/use-gradient.js.map +1 -1
  1019. package/build-module/components/gradients/with-gradient.js.map +1 -1
  1020. package/build-module/components/grid-visualizer/grid-item-resizer.js.map +1 -1
  1021. package/build-module/components/grid-visualizer/grid-visualizer.js.map +1 -1
  1022. package/build-module/components/grid-visualizer/index.js.map +1 -1
  1023. package/build-module/components/grid-visualizer/utils.js.map +1 -1
  1024. package/build-module/components/height-control/index.js.map +1 -1
  1025. package/build-module/components/iframe/get-compatibility-styles.js.map +1 -1
  1026. package/build-module/components/iframe/index.js +12 -13
  1027. package/build-module/components/iframe/index.js.map +1 -1
  1028. package/build-module/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
  1029. package/build-module/components/image-editor/constants.js.map +1 -1
  1030. package/build-module/components/image-editor/context.js.map +1 -1
  1031. package/build-module/components/image-editor/cropper.js +7 -3
  1032. package/build-module/components/image-editor/cropper.js.map +1 -1
  1033. package/build-module/components/image-editor/form-controls.js.map +1 -1
  1034. package/build-module/components/image-editor/index.js +0 -2
  1035. package/build-module/components/image-editor/index.js.map +1 -1
  1036. package/build-module/components/image-editor/rotation-button.js.map +1 -1
  1037. package/build-module/components/image-editor/use-save-image.js.map +1 -1
  1038. package/build-module/components/image-editor/use-transform-image.js.map +1 -1
  1039. package/build-module/components/image-editor/zoom-dropdown.js.map +1 -1
  1040. package/build-module/components/image-link-destinations/index.native.js.map +1 -1
  1041. package/build-module/components/image-size-control/index.js.map +1 -1
  1042. package/build-module/components/image-size-control/use-dimension-handler.js.map +1 -1
  1043. package/build-module/components/index.js.map +1 -1
  1044. package/build-module/components/index.native.js.map +1 -1
  1045. package/build-module/components/inner-blocks/button-block-appender.js.map +1 -1
  1046. package/build-module/components/inner-blocks/constants.native.js.map +1 -1
  1047. package/build-module/components/inner-blocks/default-block-appender.js.map +1 -1
  1048. package/build-module/components/inner-blocks/index.js +16 -2
  1049. package/build-module/components/inner-blocks/index.js.map +1 -1
  1050. package/build-module/components/inner-blocks/index.native.js.map +1 -1
  1051. package/build-module/components/inner-blocks/use-block-context.js.map +1 -1
  1052. package/build-module/components/inner-blocks/use-inner-block-template-sync.js.map +1 -1
  1053. package/build-module/components/inner-blocks/use-nested-settings-update.js.map +1 -1
  1054. package/build-module/components/inner-blocks/warning-max-depth-exceeded.native.js.map +1 -1
  1055. package/build-module/components/inner-blocks/with-client-id.js.map +1 -1
  1056. package/build-module/components/inserter/block-patterns-explorer/index.js.map +1 -1
  1057. package/build-module/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js.map +1 -1
  1058. package/build-module/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
  1059. package/build-module/components/inserter/block-patterns-tab/index.js +20 -26
  1060. package/build-module/components/inserter/block-patterns-tab/index.js.map +1 -1
  1061. package/build-module/components/inserter/block-patterns-tab/pattern-category-preview-panel.js +2 -24
  1062. package/build-module/components/inserter/block-patterns-tab/pattern-category-preview-panel.js.map +1 -1
  1063. package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js +2 -4
  1064. package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js.map +1 -1
  1065. package/build-module/components/inserter/block-patterns-tab/patterns-filter.js.map +1 -1
  1066. package/build-module/components/inserter/block-patterns-tab/use-pattern-categories.js.map +1 -1
  1067. package/build-module/components/inserter/block-patterns-tab/utils.js.map +1 -1
  1068. package/build-module/components/inserter/block-types-tab.js +4 -0
  1069. package/build-module/components/inserter/block-types-tab.js.map +1 -1
  1070. package/build-module/components/inserter/block-types-tab.native.js.map +1 -1
  1071. package/build-module/components/inserter/category-tabs/index.js +49 -0
  1072. package/build-module/components/inserter/category-tabs/index.js.map +1 -0
  1073. package/build-module/components/inserter/hooks/use-block-type-impressions.native.js.map +1 -1
  1074. package/build-module/components/inserter/hooks/use-block-types-state.js.map +1 -1
  1075. package/build-module/components/inserter/hooks/use-clipboard-block.native.js.map +1 -1
  1076. package/build-module/components/inserter/hooks/use-insertion-point.js.map +1 -1
  1077. package/build-module/components/inserter/hooks/use-patterns-paging.js.map +1 -1
  1078. package/build-module/components/inserter/hooks/use-patterns-state.js.map +1 -1
  1079. package/build-module/components/inserter/index.js.map +1 -1
  1080. package/build-module/components/inserter/index.native.js.map +1 -1
  1081. package/build-module/components/inserter/library.js.map +1 -1
  1082. package/build-module/components/inserter/media-tab/hooks.js.map +1 -1
  1083. package/build-module/components/inserter/media-tab/index.js +1 -1
  1084. package/build-module/components/inserter/media-tab/index.js.map +1 -1
  1085. package/build-module/components/inserter/media-tab/media-list.js.map +1 -1
  1086. package/build-module/components/inserter/media-tab/media-panel.js +0 -24
  1087. package/build-module/components/inserter/media-tab/media-panel.js.map +1 -1
  1088. package/build-module/components/inserter/media-tab/media-preview.js +13 -3
  1089. package/build-module/components/inserter/media-tab/media-preview.js.map +1 -1
  1090. package/build-module/components/inserter/media-tab/media-tab.js +17 -31
  1091. package/build-module/components/inserter/media-tab/media-tab.js.map +1 -1
  1092. package/build-module/components/inserter/media-tab/utils.js.map +1 -1
  1093. package/build-module/components/inserter/menu.js +75 -79
  1094. package/build-module/components/inserter/menu.js.map +1 -1
  1095. package/build-module/components/inserter/menu.native.js.map +1 -1
  1096. package/build-module/components/inserter/mobile-tab-navigation.js.map +1 -1
  1097. package/build-module/components/inserter/no-results.js.map +1 -1
  1098. package/build-module/components/inserter/no-results.native.js.map +1 -1
  1099. package/build-module/components/inserter/panel.js.map +1 -1
  1100. package/build-module/components/inserter/preview-panel.js.map +1 -1
  1101. package/build-module/components/inserter/quick-inserter.js.map +1 -1
  1102. package/build-module/components/inserter/reusable-block-rename-hint.js.map +1 -1
  1103. package/build-module/components/inserter/reusable-blocks-tab.native.js.map +1 -1
  1104. package/build-module/components/inserter/search-items.js.map +1 -1
  1105. package/build-module/components/inserter/search-results.js.map +1 -1
  1106. package/build-module/components/inserter/search-results.native.js.map +1 -1
  1107. package/build-module/components/inserter/tabs.js +13 -9
  1108. package/build-module/components/inserter/tabs.js.map +1 -1
  1109. package/build-module/components/inserter/tabs.native.js.map +1 -1
  1110. package/build-module/components/inserter/tips.js.map +1 -1
  1111. package/build-module/components/inserter/utils.native.js.map +1 -1
  1112. package/build-module/components/inserter-button/index.native.js.map +1 -1
  1113. package/build-module/components/inserter-button/sparkles.js.map +1 -1
  1114. package/build-module/components/inserter-draggable-blocks/index.js.map +1 -1
  1115. package/build-module/components/inserter-list-item/index.js.map +1 -1
  1116. package/build-module/components/inserter-listbox/context.js.map +1 -1
  1117. package/build-module/components/inserter-listbox/group.js.map +1 -1
  1118. package/build-module/components/inserter-listbox/index.js.map +1 -1
  1119. package/build-module/components/inserter-listbox/item.js.map +1 -1
  1120. package/build-module/components/inserter-listbox/row.js.map +1 -1
  1121. package/build-module/components/inserter-menu-extension/index.js.map +1 -1
  1122. package/build-module/components/inspector-controls/block-support-slot-container.js.map +1 -1
  1123. package/build-module/components/inspector-controls/block-support-tools-panel.js.map +1 -1
  1124. package/build-module/components/inspector-controls/fill.js.map +1 -1
  1125. package/build-module/components/inspector-controls/fill.native.js.map +1 -1
  1126. package/build-module/components/inspector-controls/groups.js.map +1 -1
  1127. package/build-module/components/inspector-controls/index.js.map +1 -1
  1128. package/build-module/components/inspector-controls/slot.js.map +1 -1
  1129. package/build-module/components/inspector-controls/slot.native.js.map +1 -1
  1130. package/build-module/components/inspector-controls-tabs/advanced-controls-panel.js.map +1 -1
  1131. package/build-module/components/inspector-controls-tabs/advanced-controls-panel.native.js.map +1 -1
  1132. package/build-module/components/inspector-controls-tabs/index.js.map +1 -1
  1133. package/build-module/components/inspector-controls-tabs/position-controls-panel.js.map +1 -1
  1134. package/build-module/components/inspector-controls-tabs/settings-tab-hint.js.map +1 -1
  1135. package/build-module/components/inspector-controls-tabs/settings-tab.js.map +1 -1
  1136. package/build-module/components/inspector-controls-tabs/styles-tab.js +1 -1
  1137. package/build-module/components/inspector-controls-tabs/styles-tab.js.map +1 -1
  1138. package/build-module/components/inspector-controls-tabs/use-inspector-controls-tabs.js.map +1 -1
  1139. package/build-module/components/inspector-controls-tabs/use-is-list-view-tab-disabled.js.map +1 -1
  1140. package/build-module/components/inspector-controls-tabs/utils.js.map +1 -1
  1141. package/build-module/components/inspector-popover-header/index.js.map +1 -1
  1142. package/build-module/components/justify-content-control/index.js.map +1 -1
  1143. package/build-module/components/justify-content-control/ui.js.map +1 -1
  1144. package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
  1145. package/build-module/components/letter-spacing-control/index.js.map +1 -1
  1146. package/build-module/components/line-height-control/index.js +6 -2
  1147. package/build-module/components/line-height-control/index.js.map +1 -1
  1148. package/build-module/components/line-height-control/index.native.js.map +1 -1
  1149. package/build-module/components/line-height-control/utils.js.map +1 -1
  1150. package/build-module/components/link-control/constants.js.map +1 -1
  1151. package/build-module/components/link-control/index.js.map +1 -1
  1152. package/build-module/components/link-control/is-url-like.js.map +1 -1
  1153. package/build-module/components/link-control/link-preview.js.map +1 -1
  1154. package/build-module/components/link-control/search-create-button.js.map +1 -1
  1155. package/build-module/components/link-control/search-input.js.map +1 -1
  1156. package/build-module/components/link-control/search-item.js +9 -3
  1157. package/build-module/components/link-control/search-item.js.map +1 -1
  1158. package/build-module/components/link-control/search-results.js.map +1 -1
  1159. package/build-module/components/link-control/settings-drawer.js.map +1 -1
  1160. package/build-module/components/link-control/settings.js.map +1 -1
  1161. package/build-module/components/link-control/use-create-page.js.map +1 -1
  1162. package/build-module/components/link-control/use-internal-value.js.map +1 -1
  1163. package/build-module/components/link-control/use-rich-url-data.js.map +1 -1
  1164. package/build-module/components/link-control/use-search-handler.js.map +1 -1
  1165. package/build-module/components/link-control/viewer-slot.js.map +1 -1
  1166. package/build-module/components/list-view/appender.js.map +1 -1
  1167. package/build-module/components/list-view/aria-referenced-text.js.map +1 -1
  1168. package/build-module/components/list-view/block-contents.js.map +1 -1
  1169. package/build-module/components/list-view/block-select-button.js +7 -144
  1170. package/build-module/components/list-view/block-select-button.js.map +1 -1
  1171. package/build-module/components/list-view/block.js +167 -15
  1172. package/build-module/components/list-view/block.js.map +1 -1
  1173. package/build-module/components/list-view/branch.js.map +1 -1
  1174. package/build-module/components/list-view/context.js.map +1 -1
  1175. package/build-module/components/list-view/drop-indicator.js.map +1 -1
  1176. package/build-module/components/list-view/expander.js.map +1 -1
  1177. package/build-module/components/list-view/index.js +1 -1
  1178. package/build-module/components/list-view/index.js.map +1 -1
  1179. package/build-module/components/list-view/leaf.js.map +1 -1
  1180. package/build-module/components/list-view/use-block-selection.js.map +1 -1
  1181. package/build-module/components/list-view/use-clipboard-handler.js.map +1 -1
  1182. package/build-module/components/list-view/use-list-view-block-indexes.js.map +1 -1
  1183. package/build-module/components/list-view/use-list-view-client-ids.js.map +1 -1
  1184. package/build-module/components/list-view/use-list-view-collapse-items.js.map +1 -1
  1185. package/build-module/components/list-view/use-list-view-drop-zone.js +6 -1
  1186. package/build-module/components/list-view/use-list-view-drop-zone.js.map +1 -1
  1187. package/build-module/components/list-view/use-list-view-expand-selected-item.js.map +1 -1
  1188. package/build-module/components/list-view/use-list-view-images.js.map +1 -1
  1189. package/build-module/components/list-view/use-list-view-scroll-into-view.js.map +1 -1
  1190. package/build-module/components/list-view/utils.js +3 -1
  1191. package/build-module/components/list-view/utils.js.map +1 -1
  1192. package/build-module/components/media-placeholder/index.js +3 -3
  1193. package/build-module/components/media-placeholder/index.js.map +1 -1
  1194. package/build-module/components/media-placeholder/index.native.js.map +1 -1
  1195. package/build-module/components/media-replace-flow/index.js.map +1 -1
  1196. package/build-module/components/media-replace-flow/index.native.js.map +1 -1
  1197. package/build-module/components/media-upload/check.js.map +1 -1
  1198. package/build-module/components/media-upload/constants.native.js.map +1 -1
  1199. package/build-module/components/media-upload/index.js.map +1 -1
  1200. package/build-module/components/media-upload/index.native.js.map +1 -1
  1201. package/build-module/components/media-upload-progress/constants.js.map +1 -1
  1202. package/build-module/components/media-upload-progress/index.native.js.map +1 -1
  1203. package/build-module/components/multi-selection-inspector/index.js.map +1 -1
  1204. package/build-module/components/navigable-toolbar/index.js +3 -1
  1205. package/build-module/components/navigable-toolbar/index.js.map +1 -1
  1206. package/build-module/components/observe-typing/index.js.map +1 -1
  1207. package/build-module/components/panel-color-settings/index.js.map +1 -1
  1208. package/build-module/components/plain-text/index.js.map +1 -1
  1209. package/build-module/components/plain-text/index.native.js.map +1 -1
  1210. package/build-module/components/preview-options/index.js.map +1 -1
  1211. package/build-module/components/provider/block-refs-provider.js +3 -4
  1212. package/build-module/components/provider/block-refs-provider.js.map +1 -1
  1213. package/build-module/components/provider/index.js.map +1 -1
  1214. package/build-module/components/provider/index.native.js.map +1 -1
  1215. package/build-module/components/provider/use-block-sync.js +4 -13
  1216. package/build-module/components/provider/use-block-sync.js.map +1 -1
  1217. package/build-module/components/provider/with-registry-provider.js.map +1 -1
  1218. package/build-module/components/publish-date-time-picker/index.js.map +1 -1
  1219. package/build-module/components/recursion-provider/index.js +2 -2
  1220. package/build-module/components/recursion-provider/index.js.map +1 -1
  1221. package/build-module/components/resizable-box-popover/index.js.map +1 -1
  1222. package/build-module/components/resolution-tool/index.js.map +1 -1
  1223. package/build-module/components/responsive-block-control/index.js.map +1 -1
  1224. package/build-module/components/responsive-block-control/label.js.map +1 -1
  1225. package/build-module/components/rich-text/content.js +25 -19
  1226. package/build-module/components/rich-text/content.js.map +1 -1
  1227. package/build-module/components/rich-text/embed-handler-picker.native.js.map +1 -1
  1228. package/build-module/components/rich-text/event-listeners/before-input-rules.js +86 -0
  1229. package/build-module/components/rich-text/event-listeners/before-input-rules.js.map +1 -0
  1230. package/build-module/components/rich-text/event-listeners/delete.js +51 -0
  1231. package/build-module/components/rich-text/event-listeners/delete.js.map +1 -0
  1232. package/build-module/components/rich-text/event-listeners/enter.js +92 -0
  1233. package/build-module/components/rich-text/event-listeners/enter.js.map +1 -0
  1234. package/build-module/components/rich-text/event-listeners/firefox-compat.js +29 -0
  1235. package/build-module/components/rich-text/event-listeners/firefox-compat.js.map +1 -0
  1236. package/build-module/components/rich-text/event-listeners/index.js +36 -0
  1237. package/build-module/components/rich-text/event-listeners/index.js.map +1 -0
  1238. package/build-module/components/rich-text/event-listeners/input-events.js +15 -0
  1239. package/build-module/components/rich-text/event-listeners/input-events.js.map +1 -0
  1240. package/build-module/components/rich-text/event-listeners/input-rules.js +127 -0
  1241. package/build-module/components/rich-text/event-listeners/input-rules.js.map +1 -0
  1242. package/build-module/components/rich-text/event-listeners/insert-replacement-text.js +27 -0
  1243. package/build-module/components/rich-text/event-listeners/insert-replacement-text.js.map +1 -0
  1244. package/build-module/components/rich-text/event-listeners/paste-handler.js +142 -0
  1245. package/build-module/components/rich-text/event-listeners/paste-handler.js.map +1 -0
  1246. package/build-module/components/rich-text/event-listeners/remove-browser-shortcuts.js +21 -0
  1247. package/build-module/components/rich-text/event-listeners/remove-browser-shortcuts.js.map +1 -0
  1248. package/build-module/components/rich-text/event-listeners/shortcuts.js +15 -0
  1249. package/build-module/components/rich-text/event-listeners/shortcuts.js.map +1 -0
  1250. package/build-module/components/rich-text/event-listeners/undo-automatic-change.js +45 -0
  1251. package/build-module/components/rich-text/event-listeners/undo-automatic-change.js.map +1 -0
  1252. package/build-module/components/rich-text/file-paste-handler.native.js.map +1 -1
  1253. package/build-module/components/rich-text/format-edit.js.map +1 -1
  1254. package/build-module/components/rich-text/format-toolbar/index.js.map +1 -1
  1255. package/build-module/components/rich-text/format-toolbar/index.native.js.map +1 -1
  1256. package/build-module/components/rich-text/format-toolbar-container.js.map +1 -1
  1257. package/build-module/components/rich-text/format-toolbar-container.native.js.map +1 -1
  1258. package/build-module/components/rich-text/get-rich-text-values.js.map +1 -1
  1259. package/build-module/components/rich-text/index.js +54 -34
  1260. package/build-module/components/rich-text/index.js.map +1 -1
  1261. package/build-module/components/rich-text/index.native.js +16 -4
  1262. package/build-module/components/rich-text/index.native.js.map +1 -1
  1263. package/build-module/components/rich-text/input-event.js.map +1 -1
  1264. package/build-module/components/rich-text/input-event.native.js.map +1 -1
  1265. package/build-module/components/rich-text/multiline.js +6 -2
  1266. package/build-module/components/rich-text/multiline.js.map +1 -1
  1267. package/build-module/components/rich-text/native/format-edit.js.map +1 -1
  1268. package/build-module/components/rich-text/native/get-format-colors.native.js.map +1 -1
  1269. package/build-module/components/rich-text/native/index.js.map +1 -1
  1270. package/build-module/components/rich-text/native/index.native.js +12 -0
  1271. package/build-module/components/rich-text/native/index.native.js.map +1 -1
  1272. package/build-module/components/rich-text/native/toolbar-button-with-options.native.js.map +1 -1
  1273. package/build-module/components/rich-text/native/use-format-types.js.map +1 -1
  1274. package/build-module/components/rich-text/prevent-event-discovery.js.map +1 -1
  1275. package/build-module/components/rich-text/remove-browser-shortcuts.native.js.map +1 -1
  1276. package/build-module/components/rich-text/shortcut.js.map +1 -1
  1277. package/build-module/components/rich-text/shortcut.native.js.map +1 -1
  1278. package/build-module/components/rich-text/split-value.js.map +1 -1
  1279. package/build-module/components/rich-text/toolbar-button.js.map +1 -1
  1280. package/build-module/components/rich-text/use-format-types.js +8 -4
  1281. package/build-module/components/rich-text/use-format-types.js.map +1 -1
  1282. package/build-module/components/rich-text/use-mark-persistent.js.map +1 -1
  1283. package/build-module/components/rich-text/utils.js.map +1 -1
  1284. package/build-module/components/rich-text/with-deprecations.js.map +1 -1
  1285. package/build-module/components/segmented-text-control/index.js +55 -0
  1286. package/build-module/components/segmented-text-control/index.js.map +1 -0
  1287. package/build-module/components/selection-scroll-into-view/index.js.map +1 -1
  1288. package/build-module/components/skip-to-selected-block/index.js.map +1 -1
  1289. package/build-module/components/spacing-sizes-control/hooks/use-spacing-sizes.js.map +1 -1
  1290. package/build-module/components/spacing-sizes-control/index.js.map +1 -1
  1291. package/build-module/components/spacing-sizes-control/input-controls/axial.js.map +1 -1
  1292. package/build-module/components/spacing-sizes-control/input-controls/separated.js.map +1 -1
  1293. package/build-module/components/spacing-sizes-control/input-controls/single.js.map +1 -1
  1294. package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js +16 -2
  1295. package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
  1296. package/build-module/components/spacing-sizes-control/sides-dropdown/index.js.map +1 -1
  1297. package/build-module/components/spacing-sizes-control/utils.js.map +1 -1
  1298. package/build-module/components/text-alignment-control/index.js +68 -0
  1299. package/build-module/components/text-alignment-control/index.js.map +1 -0
  1300. package/build-module/components/text-decoration-control/index.js +21 -25
  1301. package/build-module/components/text-decoration-control/index.js.map +1 -1
  1302. package/build-module/components/text-transform-control/index.js +18 -22
  1303. package/build-module/components/text-transform-control/index.js.map +1 -1
  1304. package/build-module/components/tool-selector/index.js.map +1 -1
  1305. package/build-module/components/typewriter/index.js.map +1 -1
  1306. package/build-module/components/ungroup-button/index.native.js.map +1 -1
  1307. package/build-module/components/unit-control/index.js.map +1 -1
  1308. package/build-module/components/unsupported-block-details/index.native.js.map +1 -1
  1309. package/build-module/components/url-input/button.js.map +1 -1
  1310. package/build-module/components/url-input/index.js.map +1 -1
  1311. package/build-module/components/url-input/index.native.js.map +1 -1
  1312. package/build-module/components/url-popover/image-url-input-ui.js.map +1 -1
  1313. package/build-module/components/url-popover/index.js.map +1 -1
  1314. package/build-module/components/url-popover/link-editor.js.map +1 -1
  1315. package/build-module/components/url-popover/link-viewer-url.js.map +1 -1
  1316. package/build-module/components/url-popover/link-viewer.js.map +1 -1
  1317. package/build-module/components/use-block-commands/index.js +20 -2
  1318. package/build-module/components/use-block-commands/index.js.map +1 -1
  1319. package/build-module/components/use-block-display-information/index.js +9 -3
  1320. package/build-module/components/use-block-display-information/index.js.map +1 -1
  1321. package/build-module/components/use-block-drop-zone/index.js.map +1 -1
  1322. package/build-module/components/use-block-drop-zone/index.native.js.map +1 -1
  1323. package/build-module/components/use-flash-editable-blocks/index.js.map +1 -1
  1324. package/build-module/components/use-moving-animation/index.js.map +1 -1
  1325. package/build-module/components/use-on-block-drop/index.js +3 -1
  1326. package/build-module/components/use-on-block-drop/index.js.map +1 -1
  1327. package/build-module/components/use-on-block-drop/index.native.js.map +1 -1
  1328. package/build-module/components/use-on-block-drop/types.js.map +1 -1
  1329. package/build-module/components/use-paste-styles/index.js +2 -1
  1330. package/build-module/components/use-paste-styles/index.js.map +1 -1
  1331. package/build-module/components/use-resize-canvas/index.js.map +1 -1
  1332. package/build-module/components/use-settings/index.js.map +1 -1
  1333. package/build-module/components/use-unsupported-block-editor/index.native.js.map +1 -1
  1334. package/build-module/components/video-player/gridicon-play.native.js.map +1 -1
  1335. package/build-module/components/video-player/index.native.js.map +1 -1
  1336. package/build-module/components/warning/index.js.map +1 -1
  1337. package/build-module/components/warning/index.native.js.map +1 -1
  1338. package/build-module/components/writing-flow/index.js.map +1 -1
  1339. package/build-module/components/writing-flow/use-arrow-nav.js.map +1 -1
  1340. package/build-module/components/writing-flow/use-click-selection.js.map +1 -1
  1341. package/build-module/components/writing-flow/use-clipboard-handler.js.map +1 -1
  1342. package/build-module/components/writing-flow/use-drag-selection.js +3 -1
  1343. package/build-module/components/writing-flow/use-drag-selection.js.map +1 -1
  1344. package/build-module/components/writing-flow/use-input.js.map +1 -1
  1345. package/build-module/components/writing-flow/use-multi-selection.js.map +1 -1
  1346. package/build-module/components/writing-flow/use-select-all.js.map +1 -1
  1347. package/build-module/components/writing-flow/use-selection-observer.js.map +1 -1
  1348. package/build-module/components/writing-flow/use-tab-nav.js +3 -1
  1349. package/build-module/components/writing-flow/use-tab-nav.js.map +1 -1
  1350. package/build-module/components/writing-flow/utils.js.map +1 -1
  1351. package/build-module/components/writing-mode-control/index.js +16 -20
  1352. package/build-module/components/writing-mode-control/index.js.map +1 -1
  1353. package/build-module/elements/index.js.map +1 -1
  1354. package/build-module/hooks/align.js.map +1 -1
  1355. package/build-module/hooks/align.native.js.map +1 -1
  1356. package/build-module/hooks/anchor.js.map +1 -1
  1357. package/build-module/hooks/aria-label.js.map +1 -1
  1358. package/build-module/hooks/background.js +2 -2
  1359. package/build-module/hooks/background.js.map +1 -1
  1360. package/build-module/hooks/block-hooks.js.map +1 -1
  1361. package/build-module/hooks/block-renaming.js +0 -36
  1362. package/build-module/hooks/block-renaming.js.map +1 -1
  1363. package/build-module/hooks/border.js.map +1 -1
  1364. package/build-module/hooks/color.js.map +1 -1
  1365. package/build-module/hooks/compat.js.map +1 -1
  1366. package/build-module/hooks/content-lock-ui.js +5 -5
  1367. package/build-module/hooks/content-lock-ui.js.map +1 -1
  1368. package/build-module/hooks/contrast-checker.js.map +1 -1
  1369. package/build-module/hooks/custom-class-name.js.map +1 -1
  1370. package/build-module/hooks/custom-class-name.native.js.map +1 -1
  1371. package/build-module/hooks/dimensions.js.map +1 -1
  1372. package/build-module/hooks/duotone.js +3 -1
  1373. package/build-module/hooks/duotone.js.map +1 -1
  1374. package/build-module/hooks/font-family.js.map +1 -1
  1375. package/build-module/hooks/font-size.js.map +1 -1
  1376. package/build-module/hooks/gap.js.map +1 -1
  1377. package/build-module/hooks/generated-class-name.js.map +1 -1
  1378. package/build-module/hooks/index.js +5 -4
  1379. package/build-module/hooks/index.js.map +1 -1
  1380. package/build-module/hooks/index.native.js.map +1 -1
  1381. package/build-module/hooks/layout-child.js.map +1 -1
  1382. package/build-module/hooks/layout.js +38 -19
  1383. package/build-module/hooks/layout.js.map +1 -1
  1384. package/build-module/hooks/layout.native.js.map +1 -1
  1385. package/build-module/hooks/line-height.js.map +1 -1
  1386. package/build-module/hooks/lock.js.map +1 -1
  1387. package/build-module/hooks/metadata.js.map +1 -1
  1388. package/build-module/hooks/position.js.map +1 -1
  1389. package/build-module/hooks/settings.js.map +1 -1
  1390. package/build-module/hooks/spacing-visualizer.js.map +1 -1
  1391. package/build-module/hooks/style.js.map +1 -1
  1392. package/build-module/hooks/supports.js +22 -1
  1393. package/build-module/hooks/supports.js.map +1 -1
  1394. package/build-module/hooks/text-align.js +145 -0
  1395. package/build-module/hooks/text-align.js.map +1 -0
  1396. package/build-module/hooks/typography.js +2 -1
  1397. package/build-module/hooks/typography.js.map +1 -1
  1398. package/build-module/hooks/typography.native.js.map +1 -1
  1399. package/build-module/hooks/use-bindings-attributes.js +68 -132
  1400. package/build-module/hooks/use-bindings-attributes.js.map +1 -1
  1401. package/build-module/hooks/use-border-props.js.map +1 -1
  1402. package/build-module/hooks/use-cached-truthy.js.map +1 -1
  1403. package/build-module/hooks/use-color-props.js.map +1 -1
  1404. package/build-module/hooks/use-editor-wrapper-styles.native.js.map +1 -1
  1405. package/build-module/hooks/use-shadow-props.js.map +1 -1
  1406. package/build-module/hooks/use-spacing-props.js.map +1 -1
  1407. package/build-module/hooks/use-typography-props.js +2 -1
  1408. package/build-module/hooks/use-typography-props.js.map +1 -1
  1409. package/build-module/hooks/use-zoom-out.js +23 -16
  1410. package/build-module/hooks/use-zoom-out.js.map +1 -1
  1411. package/build-module/hooks/utils.js +38 -9
  1412. package/build-module/hooks/utils.js.map +1 -1
  1413. package/build-module/index.js.map +1 -1
  1414. package/build-module/index.native.js.map +1 -1
  1415. package/build-module/layouts/constrained.js.map +1 -1
  1416. package/build-module/layouts/definitions.js +8 -6
  1417. package/build-module/layouts/definitions.js.map +1 -1
  1418. package/build-module/layouts/flex.js.map +1 -1
  1419. package/build-module/layouts/flow.js.map +1 -1
  1420. package/build-module/layouts/grid.js +52 -9
  1421. package/build-module/layouts/grid.js.map +1 -1
  1422. package/build-module/layouts/index.js.map +1 -1
  1423. package/build-module/layouts/utils.js.map +1 -1
  1424. package/build-module/lock-unlock.js.map +1 -1
  1425. package/build-module/private-apis.js +4 -2
  1426. package/build-module/private-apis.js.map +1 -1
  1427. package/build-module/private-apis.native.js.map +1 -1
  1428. package/build-module/store/actions.js +47 -9
  1429. package/build-module/store/actions.js.map +1 -1
  1430. package/build-module/store/array.js.map +1 -1
  1431. package/build-module/store/constants.js.map +1 -1
  1432. package/build-module/store/defaults.js.map +1 -1
  1433. package/build-module/store/defaults.native.js.map +1 -1
  1434. package/build-module/store/get-block-settings.js.map +1 -1
  1435. package/build-module/store/index.js.map +1 -1
  1436. package/build-module/store/private-actions.js +5 -2
  1437. package/build-module/store/private-actions.js.map +1 -1
  1438. package/build-module/store/private-keys.js.map +1 -1
  1439. package/build-module/store/private-selectors.js +113 -37
  1440. package/build-module/store/private-selectors.js.map +1 -1
  1441. package/build-module/store/reducer.js +11 -8
  1442. package/build-module/store/reducer.js.map +1 -1
  1443. package/build-module/store/selectors.js +116 -62
  1444. package/build-module/store/selectors.js.map +1 -1
  1445. package/build-module/store/undo-ignore.js.map +1 -1
  1446. package/build-module/store/utils.js.map +1 -1
  1447. package/build-module/utils/dom.js.map +1 -1
  1448. package/build-module/utils/get-px-from-css-unit.js.map +1 -1
  1449. package/build-module/utils/index.js.map +1 -1
  1450. package/build-module/utils/math.js.map +1 -1
  1451. package/build-module/utils/object.js +16 -0
  1452. package/build-module/utils/object.js.map +1 -1
  1453. package/build-module/utils/order-inserter-block-items.js +6 -2
  1454. package/build-module/utils/order-inserter-block-items.js.map +1 -1
  1455. package/build-module/utils/pasting.js +6 -2
  1456. package/build-module/utils/pasting.js.map +1 -1
  1457. package/build-module/utils/selection.js.map +1 -1
  1458. package/build-module/utils/sorting.js.map +1 -1
  1459. package/build-module/utils/transform-styles/index.js.map +1 -1
  1460. package/build-module/utils/use-notify-copy.js.map +1 -1
  1461. package/build-style/content-rtl.css +77 -86
  1462. package/build-style/content.css +77 -86
  1463. package/build-style/default-editor-styles-rtl.css +1 -1
  1464. package/build-style/default-editor-styles.css +1 -1
  1465. package/build-style/style-rtl.css +158 -242
  1466. package/build-style/style.css +158 -242
  1467. package/package.json +32 -33
  1468. package/src/components/alignment-control/ui.js +3 -1
  1469. package/src/components/block-bindings-toolbar-indicator/style.scss +2 -5
  1470. package/src/components/block-canvas/style.scss +1 -3
  1471. package/src/components/block-draggable/test/helpers.native.js +8 -8
  1472. package/src/components/block-edit/context.js +1 -0
  1473. package/src/components/block-edit/index.js +4 -0
  1474. package/src/components/block-inspector/index.js +7 -6
  1475. package/src/components/block-list/block.js +47 -35
  1476. package/src/components/block-list/block.native.js +3 -2
  1477. package/src/components/block-list/content.scss +46 -20
  1478. package/src/components/block-list/index.js +26 -10
  1479. package/src/components/block-list/index.native.js +1 -6
  1480. package/src/components/block-list/use-block-props/index.js +17 -5
  1481. package/src/components/block-list/use-block-props/use-block-refs.js +17 -57
  1482. package/src/components/block-list/use-block-props/use-focus-first-element.js +7 -3
  1483. package/src/components/block-list/use-block-props/use-is-hovered.js +11 -16
  1484. package/src/components/block-mover/index.native.js +3 -1
  1485. package/src/components/block-patterns-list/style.scss +1 -3
  1486. package/src/components/block-patterns-paging/index.js +4 -0
  1487. package/src/components/block-preview/style.scss +13 -15
  1488. package/src/components/block-rename/modal.js +17 -13
  1489. package/src/components/block-rename/rename-control.js +8 -1
  1490. package/src/components/block-settings-menu/block-settings-dropdown.js +1 -51
  1491. package/src/components/block-switcher/pattern-transformations-menu.js +3 -1
  1492. package/src/components/block-switcher/use-transformed-patterns.js +6 -2
  1493. package/src/components/block-switcher/utils.js +14 -5
  1494. package/src/components/block-toolbar/index.js +26 -22
  1495. package/src/components/block-toolbar/style.scss +8 -11
  1496. package/src/components/block-toolbar/use-has-block-toolbar.js +26 -19
  1497. package/src/components/block-tools/block-selection-button.js +55 -43
  1498. package/src/components/block-tools/index.js +3 -1
  1499. package/src/components/block-tools/use-show-block-tools.js +36 -51
  1500. package/src/components/block-tools/zoom-out-mode-inserters.js +5 -1
  1501. package/src/components/block-variation-picker/content.scss +22 -72
  1502. package/src/components/block-variation-picker/index.js +3 -2
  1503. package/src/components/block-variation-transforms/index.js +6 -2
  1504. package/src/components/button-block-appender/index.native.js +16 -1
  1505. package/src/components/default-block-appender/content.scss +1 -1
  1506. package/src/components/editor-styles/index.js +4 -2
  1507. package/src/components/floating-toolbar/index.native.js +5 -2
  1508. package/src/components/global-styles/background-panel.js +31 -29
  1509. package/src/components/global-styles/color-panel.js +3 -1
  1510. package/src/components/global-styles/dimensions-panel.js +18 -1
  1511. package/src/components/global-styles/hooks.js +2 -0
  1512. package/src/components/global-styles/style.scss +2 -8
  1513. package/src/components/global-styles/test/use-global-styles-output.js +8 -17
  1514. package/src/components/global-styles/test/utils.js +21 -0
  1515. package/src/components/global-styles/typography-panel.js +27 -23
  1516. package/src/components/global-styles/use-global-styles-output.js +216 -192
  1517. package/src/components/global-styles/utils.js +55 -0
  1518. package/src/components/iframe/index.js +20 -27
  1519. package/src/components/image-editor/cropper.js +11 -2
  1520. package/src/components/image-editor/index.js +0 -2
  1521. package/src/components/inner-blocks/index.js +14 -1
  1522. package/src/components/inserter/block-patterns-tab/index.js +32 -68
  1523. package/src/components/inserter/block-patterns-tab/pattern-category-preview-panel.js +9 -36
  1524. package/src/components/inserter/block-patterns-tab/pattern-category-previews.js +2 -2
  1525. package/src/components/inserter/block-types-tab.js +5 -0
  1526. package/src/components/inserter/category-tabs/index.js +74 -0
  1527. package/src/components/inserter/media-tab/index.js +1 -1
  1528. package/src/components/inserter/media-tab/media-panel.js +0 -22
  1529. package/src/components/inserter/media-tab/media-preview.js +15 -7
  1530. package/src/components/inserter/media-tab/media-tab.js +44 -83
  1531. package/src/components/inserter/menu.js +155 -122
  1532. package/src/components/inserter/style.scss +161 -217
  1533. package/src/components/inserter/tabs.js +12 -15
  1534. package/src/components/inspector-controls-tabs/styles-tab.js +1 -1
  1535. package/src/components/line-height-control/index.js +6 -2
  1536. package/src/components/link-control/search-item.js +9 -3
  1537. package/src/components/link-control/style.scss +10 -2
  1538. package/src/components/link-control/test/index.js +1 -1
  1539. package/src/components/list-view/block-select-button.js +73 -237
  1540. package/src/components/list-view/block.js +218 -28
  1541. package/src/components/list-view/index.js +1 -1
  1542. package/src/components/list-view/style.scss +20 -28
  1543. package/src/components/list-view/use-list-view-drop-zone.js +6 -1
  1544. package/src/components/list-view/utils.js +3 -1
  1545. package/src/components/media-placeholder/content.scss +0 -11
  1546. package/src/components/media-placeholder/index.js +3 -3
  1547. package/src/components/navigable-toolbar/index.js +3 -1
  1548. package/src/components/provider/block-refs-provider.js +3 -8
  1549. package/src/components/provider/test/use-block-sync.js +7 -0
  1550. package/src/components/provider/use-block-sync.js +3 -20
  1551. package/src/components/recursion-provider/index.js +2 -2
  1552. package/src/components/rich-text/README.md +4 -0
  1553. package/src/components/rich-text/content.js +26 -19
  1554. package/src/components/rich-text/event-listeners/before-input-rules.js +92 -0
  1555. package/src/components/rich-text/event-listeners/delete.js +53 -0
  1556. package/src/components/rich-text/event-listeners/enter.js +104 -0
  1557. package/src/components/rich-text/event-listeners/firefox-compat.js +31 -0
  1558. package/src/components/rich-text/event-listeners/index.js +56 -0
  1559. package/src/components/rich-text/event-listeners/input-events.js +13 -0
  1560. package/src/components/rich-text/event-listeners/input-rules.js +146 -0
  1561. package/src/components/rich-text/event-listeners/insert-replacement-text.js +28 -0
  1562. package/src/components/rich-text/event-listeners/paste-handler.js +169 -0
  1563. package/src/components/rich-text/event-listeners/remove-browser-shortcuts.js +24 -0
  1564. package/src/components/rich-text/event-listeners/shortcuts.js +13 -0
  1565. package/src/components/rich-text/event-listeners/undo-automatic-change.js +45 -0
  1566. package/src/components/rich-text/index.js +53 -36
  1567. package/src/components/rich-text/index.native.js +14 -1
  1568. package/src/components/rich-text/multiline.js +6 -2
  1569. package/src/components/rich-text/native/index.native.js +11 -0
  1570. package/src/components/rich-text/use-format-types.js +6 -2
  1571. package/src/components/segmented-text-control/index.js +63 -0
  1572. package/src/components/{writing-mode-control → segmented-text-control}/style.scss +2 -5
  1573. package/src/components/spacing-sizes-control/input-controls/spacing-input-control.js +16 -1
  1574. package/src/components/text-alignment-control/index.js +91 -0
  1575. package/src/components/text-alignment-control/stories/index.story.js +39 -0
  1576. package/src/components/text-decoration-control/index.js +20 -33
  1577. package/src/components/text-transform-control/index.js +17 -30
  1578. package/src/components/use-block-commands/index.js +46 -28
  1579. package/src/components/use-block-display-information/index.js +9 -3
  1580. package/src/components/use-on-block-drop/index.js +3 -1
  1581. package/src/components/use-paste-styles/index.js +2 -0
  1582. package/src/components/writing-flow/use-drag-selection.js +3 -1
  1583. package/src/components/writing-flow/use-tab-nav.js +3 -1
  1584. package/src/components/writing-mode-control/index.js +15 -28
  1585. package/src/hooks/background.js +2 -2
  1586. package/src/hooks/block-renaming.js +0 -33
  1587. package/src/hooks/content-lock-ui.js +5 -7
  1588. package/src/hooks/duotone.js +3 -1
  1589. package/src/hooks/index.js +5 -2
  1590. package/src/hooks/layout.js +57 -25
  1591. package/src/hooks/supports.js +24 -0
  1592. package/src/hooks/test/text-align.js +114 -0
  1593. package/src/hooks/test/use-typography-props.js +3 -1
  1594. package/src/hooks/text-align.js +178 -0
  1595. package/src/hooks/typography.js +2 -0
  1596. package/src/hooks/use-bindings-attributes.js +90 -161
  1597. package/src/hooks/use-typography-props.js +4 -1
  1598. package/src/hooks/use-zoom-out.js +25 -15
  1599. package/src/hooks/utils.js +57 -5
  1600. package/src/layouts/definitions.js +6 -6
  1601. package/src/layouts/grid.js +106 -47
  1602. package/src/private-apis.js +4 -2
  1603. package/src/store/actions.js +52 -12
  1604. package/src/store/private-actions.js +6 -3
  1605. package/src/store/private-selectors.js +155 -39
  1606. package/src/store/reducer.js +13 -23
  1607. package/src/store/selectors.js +162 -93
  1608. package/src/style.scss +1 -2
  1609. package/src/utils/object.js +16 -0
  1610. package/src/utils/order-inserter-block-items.js +6 -2
  1611. package/src/utils/pasting.js +6 -2
  1612. package/tsconfig.tsbuildinfo +1 -1
  1613. package/build/components/block-list/use-block-props/use-block-moving-mode-class-names.js +0 -54
  1614. package/build/components/block-list/use-block-props/use-block-moving-mode-class-names.js.map +0 -1
  1615. package/build/components/rich-text/use-before-input-rules.js +0 -98
  1616. package/build/components/rich-text/use-before-input-rules.js.map +0 -1
  1617. package/build/components/rich-text/use-delete.js +0 -64
  1618. package/build/components/rich-text/use-delete.js.map +0 -1
  1619. package/build/components/rich-text/use-enter.js +0 -109
  1620. package/build/components/rich-text/use-enter.js.map +0 -1
  1621. package/build/components/rich-text/use-firefox-compat.js +0 -44
  1622. package/build/components/rich-text/use-firefox-compat.js.map +0 -1
  1623. package/build/components/rich-text/use-input-events.js +0 -25
  1624. package/build/components/rich-text/use-input-events.js.map +0 -1
  1625. package/build/components/rich-text/use-input-rules.js +0 -139
  1626. package/build/components/rich-text/use-input-rules.js.map +0 -1
  1627. package/build/components/rich-text/use-insert-replacement-text.js +0 -38
  1628. package/build/components/rich-text/use-insert-replacement-text.js.map +0 -1
  1629. package/build/components/rich-text/use-paste-handler.js +0 -158
  1630. package/build/components/rich-text/use-paste-handler.js.map +0 -1
  1631. package/build/components/rich-text/use-remove-browser-shortcuts.js +0 -32
  1632. package/build/components/rich-text/use-remove-browser-shortcuts.js.map +0 -1
  1633. package/build/components/rich-text/use-shortcuts.js +0 -25
  1634. package/build/components/rich-text/use-shortcuts.js.map +0 -1
  1635. package/build/components/rich-text/use-undo-automatic-change.js +0 -53
  1636. package/build/components/rich-text/use-undo-automatic-change.js.map +0 -1
  1637. package/build-module/components/block-list/use-block-props/use-block-moving-mode-class-names.js +0 -47
  1638. package/build-module/components/block-list/use-block-props/use-block-moving-mode-class-names.js.map +0 -1
  1639. package/build-module/components/rich-text/use-before-input-rules.js +0 -92
  1640. package/build-module/components/rich-text/use-before-input-rules.js.map +0 -1
  1641. package/build-module/components/rich-text/use-delete.js +0 -57
  1642. package/build-module/components/rich-text/use-delete.js.map +0 -1
  1643. package/build-module/components/rich-text/use-enter.js +0 -102
  1644. package/build-module/components/rich-text/use-enter.js.map +0 -1
  1645. package/build-module/components/rich-text/use-firefox-compat.js +0 -37
  1646. package/build-module/components/rich-text/use-firefox-compat.js.map +0 -1
  1647. package/build-module/components/rich-text/use-input-events.js +0 -18
  1648. package/build-module/components/rich-text/use-input-events.js.map +0 -1
  1649. package/build-module/components/rich-text/use-input-rules.js +0 -132
  1650. package/build-module/components/rich-text/use-input-rules.js.map +0 -1
  1651. package/build-module/components/rich-text/use-insert-replacement-text.js +0 -32
  1652. package/build-module/components/rich-text/use-insert-replacement-text.js.map +0 -1
  1653. package/build-module/components/rich-text/use-paste-handler.js +0 -152
  1654. package/build-module/components/rich-text/use-paste-handler.js.map +0 -1
  1655. package/build-module/components/rich-text/use-remove-browser-shortcuts.js +0 -26
  1656. package/build-module/components/rich-text/use-remove-browser-shortcuts.js.map +0 -1
  1657. package/build-module/components/rich-text/use-shortcuts.js +0 -18
  1658. package/build-module/components/rich-text/use-shortcuts.js.map +0 -1
  1659. package/build-module/components/rich-text/use-undo-automatic-change.js +0 -46
  1660. package/build-module/components/rich-text/use-undo-automatic-change.js.map +0 -1
  1661. package/src/components/block-list/use-block-props/use-block-moving-mode-class-names.js +0 -55
  1662. package/src/components/rich-text/use-before-input-rules.js +0 -99
  1663. package/src/components/rich-text/use-delete.js +0 -59
  1664. package/src/components/rich-text/use-enter.js +0 -110
  1665. package/src/components/rich-text/use-firefox-compat.js +0 -39
  1666. package/src/components/rich-text/use-input-events.js +0 -19
  1667. package/src/components/rich-text/use-input-rules.js +0 -150
  1668. package/src/components/rich-text/use-insert-replacement-text.js +0 -31
  1669. package/src/components/rich-text/use-paste-handler.js +0 -180
  1670. package/src/components/rich-text/use-remove-browser-shortcuts.js +0 -29
  1671. package/src/components/rich-text/use-shortcuts.js +0 -19
  1672. package/src/components/rich-text/use-undo-automatic-change.js +0 -50
  1673. package/src/components/text-decoration-control/style.scss +0 -18
  1674. package/src/components/text-transform-control/style.scss +0 -18
@@ -1 +1 @@
1
- {"version":3,"names":["_blocks","require","_element","ALIGN_SUPPORT_KEY","ALIGN_WIDE_SUPPORT_KEY","BORDER_SUPPORT_KEY","COLOR_SUPPORT_KEY","CUSTOM_CLASS_NAME_SUPPORT_KEY","FONT_FAMILY_SUPPORT_KEY","FONT_SIZE_SUPPORT_KEY","LINE_HEIGHT_SUPPORT_KEY","FONT_STYLE_SUPPORT_KEY","FONT_WEIGHT_SUPPORT_KEY","TEXT_COLUMNS_SUPPORT_KEY","TEXT_DECORATION_SUPPORT_KEY","WRITING_MODE_SUPPORT_KEY","TEXT_TRANSFORM_SUPPORT_KEY","LETTER_SPACING_SUPPORT_KEY","LAYOUT_SUPPORT_KEY","TYPOGRAPHY_SUPPORT_KEYS","EFFECTS_SUPPORT_KEYS","SPACING_SUPPORT_KEY","styleSupportKeys","hasAlignSupport","nameOrType","hasBlockSupport","exports","getAlignSupport","getBlockSupport","hasAlignWideSupport","getAlignWideSupport","hasBorderSupport","feature","Platform","OS","support","color","radius","width","style","getBorderSupport","hasColorSupport","colorSupport","link","gradient","background","text","hasLinkColorSupport","hasGradientSupport","gradients","hasBackgroundColorSupport","hasTextColorSupport","getColorSupport","hasCustomClassNameSupport","getCustomClassNameSupport","hasFontFamilySupport","getFontFamilySupport","hasFontSizeSupport","getFontSizeSupport","hasLayoutSupport","getLayoutSupport","hasStyleSupport","some","key"],"sources":["@wordpress/block-editor/src/hooks/supports.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getBlockSupport, hasBlockSupport } from '@wordpress/blocks';\nimport { Platform } from '@wordpress/element';\n\nconst ALIGN_SUPPORT_KEY = 'align';\nconst ALIGN_WIDE_SUPPORT_KEY = 'alignWide';\nconst BORDER_SUPPORT_KEY = '__experimentalBorder';\nconst COLOR_SUPPORT_KEY = 'color';\nconst CUSTOM_CLASS_NAME_SUPPORT_KEY = 'customClassName';\nconst FONT_FAMILY_SUPPORT_KEY = 'typography.__experimentalFontFamily';\nconst FONT_SIZE_SUPPORT_KEY = 'typography.fontSize';\nconst LINE_HEIGHT_SUPPORT_KEY = 'typography.lineHeight';\n/**\n * Key within block settings' support array indicating support for font style.\n */\nconst FONT_STYLE_SUPPORT_KEY = 'typography.__experimentalFontStyle';\n/**\n * Key within block settings' support array indicating support for font weight.\n */\nconst FONT_WEIGHT_SUPPORT_KEY = 'typography.__experimentalFontWeight';\n/**\n * Key within block settings' supports array indicating support for text\n * columns e.g. settings found in `block.json`.\n */\nconst TEXT_COLUMNS_SUPPORT_KEY = 'typography.textColumns';\n/**\n * Key within block settings' supports array indicating support for text\n * decorations e.g. settings found in `block.json`.\n */\nconst TEXT_DECORATION_SUPPORT_KEY = 'typography.__experimentalTextDecoration';\n/**\n * Key within block settings' supports array indicating support for writing mode\n * e.g. settings found in `block.json`.\n */\nconst WRITING_MODE_SUPPORT_KEY = 'typography.__experimentalWritingMode';\n/**\n * Key within block settings' supports array indicating support for text\n * transforms e.g. settings found in `block.json`.\n */\nconst TEXT_TRANSFORM_SUPPORT_KEY = 'typography.__experimentalTextTransform';\n\n/**\n * Key within block settings' supports array indicating support for letter-spacing\n * e.g. settings found in `block.json`.\n */\nconst LETTER_SPACING_SUPPORT_KEY = 'typography.__experimentalLetterSpacing';\nconst LAYOUT_SUPPORT_KEY = 'layout';\nconst TYPOGRAPHY_SUPPORT_KEYS = [\n\tLINE_HEIGHT_SUPPORT_KEY,\n\tFONT_SIZE_SUPPORT_KEY,\n\tFONT_STYLE_SUPPORT_KEY,\n\tFONT_WEIGHT_SUPPORT_KEY,\n\tFONT_FAMILY_SUPPORT_KEY,\n\tTEXT_COLUMNS_SUPPORT_KEY,\n\tTEXT_DECORATION_SUPPORT_KEY,\n\tTEXT_TRANSFORM_SUPPORT_KEY,\n\tWRITING_MODE_SUPPORT_KEY,\n\tLETTER_SPACING_SUPPORT_KEY,\n];\nconst EFFECTS_SUPPORT_KEYS = [ 'shadow' ];\nconst SPACING_SUPPORT_KEY = 'spacing';\nconst styleSupportKeys = [\n\t...EFFECTS_SUPPORT_KEYS,\n\t...TYPOGRAPHY_SUPPORT_KEYS,\n\tBORDER_SUPPORT_KEY,\n\tCOLOR_SUPPORT_KEY,\n\tSPACING_SUPPORT_KEY,\n];\n\n/**\n * Returns true if the block defines support for align.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasAlignSupport = ( nameOrType ) =>\n\thasBlockSupport( nameOrType, ALIGN_SUPPORT_KEY );\n\n/**\n * Returns the block support value for align, if defined.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {unknown} The block support value.\n */\nexport const getAlignSupport = ( nameOrType ) =>\n\tgetBlockSupport( nameOrType, ALIGN_SUPPORT_KEY );\n\n/**\n * Returns true if the block defines support for align wide.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasAlignWideSupport = ( nameOrType ) =>\n\thasBlockSupport( nameOrType, ALIGN_WIDE_SUPPORT_KEY );\n\n/**\n * Returns the block support value for align wide, if defined.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {unknown} The block support value.\n */\nexport const getAlignWideSupport = ( nameOrType ) =>\n\tgetBlockSupport( nameOrType, ALIGN_WIDE_SUPPORT_KEY );\n\n/**\n * Determine whether there is block support for border properties.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @param {string} feature Border feature to check support for.\n *\n * @return {boolean} Whether there is support.\n */\nexport function hasBorderSupport( nameOrType, feature = 'any' ) {\n\tif ( Platform.OS !== 'web' ) {\n\t\treturn false;\n\t}\n\n\tconst support = getBlockSupport( nameOrType, BORDER_SUPPORT_KEY );\n\n\tif ( support === true ) {\n\t\treturn true;\n\t}\n\n\tif ( feature === 'any' ) {\n\t\treturn !! (\n\t\t\tsupport?.color ||\n\t\t\tsupport?.radius ||\n\t\t\tsupport?.width ||\n\t\t\tsupport?.style\n\t\t);\n\t}\n\n\treturn !! support?.[ feature ];\n}\n\n/**\n * Get block support for border properties.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @param {string} feature Border feature to get.\n *\n * @return {unknown} The block support.\n */\nexport const getBorderSupport = ( nameOrType, feature ) =>\n\tgetBlockSupport( nameOrType, [ BORDER_SUPPORT_KEY, feature ] );\n\n/**\n * Returns true if the block defines support for color.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasColorSupport = ( nameOrType ) => {\n\tconst colorSupport = getBlockSupport( nameOrType, COLOR_SUPPORT_KEY );\n\treturn (\n\t\tcolorSupport &&\n\t\t( colorSupport.link === true ||\n\t\t\tcolorSupport.gradient === true ||\n\t\t\tcolorSupport.background !== false ||\n\t\t\tcolorSupport.text !== false )\n\t);\n};\n\n/**\n * Returns true if the block defines support for link color.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasLinkColorSupport = ( nameOrType ) => {\n\tif ( Platform.OS !== 'web' ) {\n\t\treturn false;\n\t}\n\n\tconst colorSupport = getBlockSupport( nameOrType, COLOR_SUPPORT_KEY );\n\n\treturn (\n\t\tcolorSupport !== null &&\n\t\ttypeof colorSupport === 'object' &&\n\t\t!! colorSupport.link\n\t);\n};\n\n/**\n * Returns true if the block defines support for gradient color.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasGradientSupport = ( nameOrType ) => {\n\tconst colorSupport = getBlockSupport( nameOrType, COLOR_SUPPORT_KEY );\n\n\treturn (\n\t\tcolorSupport !== null &&\n\t\ttypeof colorSupport === 'object' &&\n\t\t!! colorSupport.gradients\n\t);\n};\n\n/**\n * Returns true if the block defines support for background color.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasBackgroundColorSupport = ( nameOrType ) => {\n\tconst colorSupport = getBlockSupport( nameOrType, COLOR_SUPPORT_KEY );\n\n\treturn colorSupport && colorSupport.background !== false;\n};\n\n/**\n * Returns true if the block defines support for background color.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasTextColorSupport = ( nameOrType ) => {\n\tconst colorSupport = getBlockSupport( nameOrType, COLOR_SUPPORT_KEY );\n\n\treturn colorSupport && colorSupport.text !== false;\n};\n\n/**\n * Get block support for color properties.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @param {string} feature Color feature to get.\n *\n * @return {unknown} The block support.\n */\nexport const getColorSupport = ( nameOrType, feature ) =>\n\tgetBlockSupport( nameOrType, [ COLOR_SUPPORT_KEY, feature ] );\n\n/**\n * Returns true if the block defines support for custom class name.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasCustomClassNameSupport = ( nameOrType ) =>\n\thasBlockSupport( nameOrType, CUSTOM_CLASS_NAME_SUPPORT_KEY, true );\n\n/**\n * Returns the block support value for custom class name, if defined.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {unknown} The block support value.\n */\nexport const getCustomClassNameSupport = ( nameOrType ) =>\n\tgetBlockSupport( nameOrType, CUSTOM_CLASS_NAME_SUPPORT_KEY, true );\n\n/**\n * Returns true if the block defines support for font family.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasFontFamilySupport = ( nameOrType ) =>\n\thasBlockSupport( nameOrType, FONT_FAMILY_SUPPORT_KEY );\n\n/**\n * Returns the block support value for font family, if defined.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {unknown} The block support value.\n */\nexport const getFontFamilySupport = ( nameOrType ) =>\n\tgetBlockSupport( nameOrType, FONT_FAMILY_SUPPORT_KEY );\n\n/**\n * Returns true if the block defines support for font size.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasFontSizeSupport = ( nameOrType ) =>\n\thasBlockSupport( nameOrType, FONT_SIZE_SUPPORT_KEY );\n\n/**\n * Returns the block support value for font size, if defined.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {unknown} The block support value.\n */\nexport const getFontSizeSupport = ( nameOrType ) =>\n\tgetBlockSupport( nameOrType, FONT_SIZE_SUPPORT_KEY );\n\n/**\n * Returns true if the block defines support for layout.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasLayoutSupport = ( nameOrType ) =>\n\thasBlockSupport( nameOrType, LAYOUT_SUPPORT_KEY );\n\n/**\n * Returns the block support value for layout, if defined.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {unknown} The block support value.\n */\nexport const getLayoutSupport = ( nameOrType ) =>\n\tgetBlockSupport( nameOrType, LAYOUT_SUPPORT_KEY );\n\n/**\n * Returns true if the block defines support for style.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasStyleSupport = ( nameOrType ) =>\n\tstyleSupportKeys.some( ( key ) => hasBlockSupport( nameOrType, key ) );\n"],"mappings":";;;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAJA;AACA;AACA;;AAIA,MAAME,iBAAiB,GAAG,OAAO;AACjC,MAAMC,sBAAsB,GAAG,WAAW;AAC1C,MAAMC,kBAAkB,GAAG,sBAAsB;AACjD,MAAMC,iBAAiB,GAAG,OAAO;AACjC,MAAMC,6BAA6B,GAAG,iBAAiB;AACvD,MAAMC,uBAAuB,GAAG,qCAAqC;AACrE,MAAMC,qBAAqB,GAAG,qBAAqB;AACnD,MAAMC,uBAAuB,GAAG,uBAAuB;AACvD;AACA;AACA;AACA,MAAMC,sBAAsB,GAAG,oCAAoC;AACnE;AACA;AACA;AACA,MAAMC,uBAAuB,GAAG,qCAAqC;AACrE;AACA;AACA;AACA;AACA,MAAMC,wBAAwB,GAAG,wBAAwB;AACzD;AACA;AACA;AACA;AACA,MAAMC,2BAA2B,GAAG,yCAAyC;AAC7E;AACA;AACA;AACA;AACA,MAAMC,wBAAwB,GAAG,sCAAsC;AACvE;AACA;AACA;AACA;AACA,MAAMC,0BAA0B,GAAG,wCAAwC;;AAE3E;AACA;AACA;AACA;AACA,MAAMC,0BAA0B,GAAG,wCAAwC;AAC3E,MAAMC,kBAAkB,GAA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IAAAI,uBAAe,EAAEJ,UAAU,EAAEN,kBAAmB,CAAC;;AAElD;AACA;AACA;AACA;AACA;AACA;AALAQ,OAAA,CAAAkC,gBAAA,GAAAA,gBAAA;AAMO,MAAMC,eAAe,GAAKrC,UAAU,IAC1CF,gBAAgB,CAACwC,IAAI,CAAIC,GAAG,IAAM,IAAAtC,uBAAe,EAAED,UAAU,EAAEuC,GAAI,CAAE,CAAC;AAACrC,OAAA,CAAAmC,eAAA,GAAAA,eAAA"}
1
+ {"version":3,"names":["_blocks","require","_element","ALIGN_SUPPORT_KEY","ALIGN_WIDE_SUPPORT_KEY","BORDER_SUPPORT_KEY","COLOR_SUPPORT_KEY","CUSTOM_CLASS_NAME_SUPPORT_KEY","FONT_FAMILY_SUPPORT_KEY","FONT_SIZE_SUPPORT_KEY","LINE_HEIGHT_SUPPORT_KEY","FONT_STYLE_SUPPORT_KEY","FONT_WEIGHT_SUPPORT_KEY","TEXT_ALIGN_SUPPORT_KEY","TEXT_COLUMNS_SUPPORT_KEY","TEXT_DECORATION_SUPPORT_KEY","WRITING_MODE_SUPPORT_KEY","TEXT_TRANSFORM_SUPPORT_KEY","LETTER_SPACING_SUPPORT_KEY","LAYOUT_SUPPORT_KEY","TYPOGRAPHY_SUPPORT_KEYS","EFFECTS_SUPPORT_KEYS","SPACING_SUPPORT_KEY","styleSupportKeys","hasAlignSupport","nameOrType","hasBlockSupport","exports","getAlignSupport","getBlockSupport","hasAlignWideSupport","getAlignWideSupport","hasBorderSupport","feature","Platform","OS","support","color","radius","width","style","getBorderSupport","hasColorSupport","colorSupport","link","gradient","background","text","hasLinkColorSupport","hasGradientSupport","gradients","hasBackgroundColorSupport","hasTextAlignSupport","getTextAlignSupport","hasTextColorSupport","getColorSupport","hasCustomClassNameSupport","getCustomClassNameSupport","hasFontFamilySupport","getFontFamilySupport","hasFontSizeSupport","getFontSizeSupport","hasLayoutSupport","getLayoutSupport","hasStyleSupport","some","key"],"sources":["@wordpress/block-editor/src/hooks/supports.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getBlockSupport, hasBlockSupport } from '@wordpress/blocks';\nimport { Platform } from '@wordpress/element';\n\nconst ALIGN_SUPPORT_KEY = 'align';\nconst ALIGN_WIDE_SUPPORT_KEY = 'alignWide';\nconst BORDER_SUPPORT_KEY = '__experimentalBorder';\nconst COLOR_SUPPORT_KEY = 'color';\nconst CUSTOM_CLASS_NAME_SUPPORT_KEY = 'customClassName';\nconst FONT_FAMILY_SUPPORT_KEY = 'typography.__experimentalFontFamily';\nconst FONT_SIZE_SUPPORT_KEY = 'typography.fontSize';\nconst LINE_HEIGHT_SUPPORT_KEY = 'typography.lineHeight';\n/**\n * Key within block settings' support array indicating support for font style.\n */\nconst FONT_STYLE_SUPPORT_KEY = 'typography.__experimentalFontStyle';\n/**\n * Key within block settings' support array indicating support for font weight.\n */\nconst FONT_WEIGHT_SUPPORT_KEY = 'typography.__experimentalFontWeight';\n/**\n * Key within block settings' supports array indicating support for text\n * align e.g. settings found in `block.json`.\n */\nconst TEXT_ALIGN_SUPPORT_KEY = 'typography.textAlign';\n/**\n * Key within block settings' supports array indicating support for text\n * columns e.g. settings found in `block.json`.\n */\nconst TEXT_COLUMNS_SUPPORT_KEY = 'typography.textColumns';\n/**\n * Key within block settings' supports array indicating support for text\n * decorations e.g. settings found in `block.json`.\n */\nconst TEXT_DECORATION_SUPPORT_KEY = 'typography.__experimentalTextDecoration';\n/**\n * Key within block settings' supports array indicating support for writing mode\n * e.g. settings found in `block.json`.\n */\nconst WRITING_MODE_SUPPORT_KEY = 'typography.__experimentalWritingMode';\n/**\n * Key within block settings' supports array indicating support for text\n * transforms e.g. settings found in `block.json`.\n */\nconst TEXT_TRANSFORM_SUPPORT_KEY = 'typography.__experimentalTextTransform';\n\n/**\n * Key within block settings' supports array indicating support for letter-spacing\n * e.g. settings found in `block.json`.\n */\nconst LETTER_SPACING_SUPPORT_KEY = 'typography.__experimentalLetterSpacing';\nconst LAYOUT_SUPPORT_KEY = 'layout';\nconst TYPOGRAPHY_SUPPORT_KEYS = [\n\tLINE_HEIGHT_SUPPORT_KEY,\n\tFONT_SIZE_SUPPORT_KEY,\n\tFONT_STYLE_SUPPORT_KEY,\n\tFONT_WEIGHT_SUPPORT_KEY,\n\tFONT_FAMILY_SUPPORT_KEY,\n\tTEXT_ALIGN_SUPPORT_KEY,\n\tTEXT_COLUMNS_SUPPORT_KEY,\n\tTEXT_DECORATION_SUPPORT_KEY,\n\tTEXT_TRANSFORM_SUPPORT_KEY,\n\tWRITING_MODE_SUPPORT_KEY,\n\tLETTER_SPACING_SUPPORT_KEY,\n];\nconst EFFECTS_SUPPORT_KEYS = [ 'shadow' ];\nconst SPACING_SUPPORT_KEY = 'spacing';\nconst styleSupportKeys = [\n\t...EFFECTS_SUPPORT_KEYS,\n\t...TYPOGRAPHY_SUPPORT_KEYS,\n\tBORDER_SUPPORT_KEY,\n\tCOLOR_SUPPORT_KEY,\n\tSPACING_SUPPORT_KEY,\n];\n\n/**\n * Returns true if the block defines support for align.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasAlignSupport = ( nameOrType ) =>\n\thasBlockSupport( nameOrType, ALIGN_SUPPORT_KEY );\n\n/**\n * Returns the block support value for align, if defined.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {unknown} The block support value.\n */\nexport const getAlignSupport = ( nameOrType ) =>\n\tgetBlockSupport( nameOrType, ALIGN_SUPPORT_KEY );\n\n/**\n * Returns true if the block defines support for align wide.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasAlignWideSupport = ( nameOrType ) =>\n\thasBlockSupport( nameOrType, ALIGN_WIDE_SUPPORT_KEY );\n\n/**\n * Returns the block support value for align wide, if defined.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {unknown} The block support value.\n */\nexport const getAlignWideSupport = ( nameOrType ) =>\n\tgetBlockSupport( nameOrType, ALIGN_WIDE_SUPPORT_KEY );\n\n/**\n * Determine whether there is block support for border properties.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @param {string} feature Border feature to check support for.\n *\n * @return {boolean} Whether there is support.\n */\nexport function hasBorderSupport( nameOrType, feature = 'any' ) {\n\tif ( Platform.OS !== 'web' ) {\n\t\treturn false;\n\t}\n\n\tconst support = getBlockSupport( nameOrType, BORDER_SUPPORT_KEY );\n\n\tif ( support === true ) {\n\t\treturn true;\n\t}\n\n\tif ( feature === 'any' ) {\n\t\treturn !! (\n\t\t\tsupport?.color ||\n\t\t\tsupport?.radius ||\n\t\t\tsupport?.width ||\n\t\t\tsupport?.style\n\t\t);\n\t}\n\n\treturn !! support?.[ feature ];\n}\n\n/**\n * Get block support for border properties.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @param {string} feature Border feature to get.\n *\n * @return {unknown} The block support.\n */\nexport const getBorderSupport = ( nameOrType, feature ) =>\n\tgetBlockSupport( nameOrType, [ BORDER_SUPPORT_KEY, feature ] );\n\n/**\n * Returns true if the block defines support for color.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasColorSupport = ( nameOrType ) => {\n\tconst colorSupport = getBlockSupport( nameOrType, COLOR_SUPPORT_KEY );\n\treturn (\n\t\tcolorSupport &&\n\t\t( colorSupport.link === true ||\n\t\t\tcolorSupport.gradient === true ||\n\t\t\tcolorSupport.background !== false ||\n\t\t\tcolorSupport.text !== false )\n\t);\n};\n\n/**\n * Returns true if the block defines support for link color.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasLinkColorSupport = ( nameOrType ) => {\n\tif ( Platform.OS !== 'web' ) {\n\t\treturn false;\n\t}\n\n\tconst colorSupport = getBlockSupport( nameOrType, COLOR_SUPPORT_KEY );\n\n\treturn (\n\t\tcolorSupport !== null &&\n\t\ttypeof colorSupport === 'object' &&\n\t\t!! colorSupport.link\n\t);\n};\n\n/**\n * Returns true if the block defines support for gradient color.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasGradientSupport = ( nameOrType ) => {\n\tconst colorSupport = getBlockSupport( nameOrType, COLOR_SUPPORT_KEY );\n\n\treturn (\n\t\tcolorSupport !== null &&\n\t\ttypeof colorSupport === 'object' &&\n\t\t!! colorSupport.gradients\n\t);\n};\n\n/**\n * Returns true if the block defines support for background color.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasBackgroundColorSupport = ( nameOrType ) => {\n\tconst colorSupport = getBlockSupport( nameOrType, COLOR_SUPPORT_KEY );\n\n\treturn colorSupport && colorSupport.background !== false;\n};\n\n/**\n * Returns true if the block defines support for text-align.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasTextAlignSupport = ( nameOrType ) =>\n\thasBlockSupport( nameOrType, TEXT_ALIGN_SUPPORT_KEY );\n\n/**\n * Returns the block support value for text-align, if defined.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {unknown} The block support value.\n */\nexport const getTextAlignSupport = ( nameOrType ) =>\n\tgetBlockSupport( nameOrType, TEXT_ALIGN_SUPPORT_KEY );\n\n/**\n * Returns true if the block defines support for background color.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasTextColorSupport = ( nameOrType ) => {\n\tconst colorSupport = getBlockSupport( nameOrType, COLOR_SUPPORT_KEY );\n\n\treturn colorSupport && colorSupport.text !== false;\n};\n\n/**\n * Get block support for color properties.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @param {string} feature Color feature to get.\n *\n * @return {unknown} The block support.\n */\nexport const getColorSupport = ( nameOrType, feature ) =>\n\tgetBlockSupport( nameOrType, [ COLOR_SUPPORT_KEY, feature ] );\n\n/**\n * Returns true if the block defines support for custom class name.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasCustomClassNameSupport = ( nameOrType ) =>\n\thasBlockSupport( nameOrType, CUSTOM_CLASS_NAME_SUPPORT_KEY, true );\n\n/**\n * Returns the block support value for custom class name, if defined.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {unknown} The block support value.\n */\nexport const getCustomClassNameSupport = ( nameOrType ) =>\n\tgetBlockSupport( nameOrType, CUSTOM_CLASS_NAME_SUPPORT_KEY, true );\n\n/**\n * Returns true if the block defines support for font family.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasFontFamilySupport = ( nameOrType ) =>\n\thasBlockSupport( nameOrType, FONT_FAMILY_SUPPORT_KEY );\n\n/**\n * Returns the block support value for font family, if defined.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {unknown} The block support value.\n */\nexport const getFontFamilySupport = ( nameOrType ) =>\n\tgetBlockSupport( nameOrType, FONT_FAMILY_SUPPORT_KEY );\n\n/**\n * Returns true if the block defines support for font size.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasFontSizeSupport = ( nameOrType ) =>\n\thasBlockSupport( nameOrType, FONT_SIZE_SUPPORT_KEY );\n\n/**\n * Returns the block support value for font size, if defined.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {unknown} The block support value.\n */\nexport const getFontSizeSupport = ( nameOrType ) =>\n\tgetBlockSupport( nameOrType, FONT_SIZE_SUPPORT_KEY );\n\n/**\n * Returns true if the block defines support for layout.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasLayoutSupport = ( nameOrType ) =>\n\thasBlockSupport( nameOrType, LAYOUT_SUPPORT_KEY );\n\n/**\n * Returns the block support value for layout, if defined.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {unknown} The block support value.\n */\nexport const getLayoutSupport = ( nameOrType ) =>\n\tgetBlockSupport( nameOrType, LAYOUT_SUPPORT_KEY );\n\n/**\n * Returns true if the block defines support for style.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasStyleSupport = ( nameOrType ) =>\n\tstyleSupportKeys.some( ( key ) => hasBlockSupport( nameOrType, key ) );\n"],"mappings":";;;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAJA;AACA;AACA;;AAIA,MAAME,iBAAiB,GAAG,OAAO;AACjC,MAAMC,sBAAsB,GAAG,WAAW;AAC1C,MAAMC,kBAAkB,GAAG,sBAAsB;AACjD,MAAMC,iBAAiB,GAAG,OAAO;AACjC,MAAMC,6BAA6B,GAAG,iBAAiB;AACvD,MAAMC,uBAAuB,GAAG,qCAAqC;AACrE,MAAMC,qBAAqB,GAAG,qBAAqB;AACnD,MAAMC,uBAAuB,GAAG,uBAAuB;AACvD;AACA;AACA;AACA,MAAMC,sBAAsB,GAAG,oCAAoC;AACnE;AACA;AACA;AACA,MAAMC,uBAAuB,GAAG,qCAAqC;AACrE;AACA;AACA;AACA;AACA,MAAMC,sBAAsB,GAAG,sBAAsB;AACrD;AACA;AACA;AACA;AACA,MAAMC,wBAAwB,GAAG,wBAAwB;AACzD;AACA;AACA;AACA;AACA,MAAMC,2BAA2B,GAAG,yCAAyC;AAC7E;AACA;AACA;AACA;AACA,MAAMC,wBAAwB,GAAG,sCAAsC;AACvE;AACA;AACA;AACA;AACA,MAAMC,0BAA0B,GAAG,wCAAwC;;AAE3E;AACA;AACA;AACA;AACA,MAAMC,0BAA0B,GAAG,wCAAwC;AAC3E,MAAMC,kBAAkB,GAAG,QAAQ;AACnC,MAAMC,uBAAuB,GAAG,CAC/BV,uBAAuB,EACvBD,qBAAqB,EACrBE,sBAAsB,EACtBC,uBAAuB,EACvBJ,uBAAuB,EACvBK,sBAAsB,EACtBC,wBAAwB,EACxBC,2BAA2B,EAC3BE,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GAAKrC,UAAU,IAC3C,IAAAC,uBAAe,EAAED,UAAU,EAAEN,kBAAmB,CAAC;;AAElD;AACA;AACA;AACA;AACA;AACA;AALAQ,OAAA,CAAAmC,gBAAA,GAAAA,gBAAA;AAMO,MAAMC,gBAAgB,GAAKtC,UAAU,IAC3C,IAAAI,uBAAe,EAAEJ,UAAU,EAAEN,kBAAmB,CAAC;;AAElD;AACA;AACA;AACA;AACA;AACA;AALAQ,OAAA,CAAAoC,gBAAA,GAAAA,gBAAA;AAMO,MAAMC,eAAe,GAAKvC,UAAU,IAC1CF,gBAAgB,CAAC0C,IAAI,CAAIC,GAAG,IAAM,IAAAxC,uBAAe,EAAED,UAAU,EAAEyC,GAAI,CAAE,CAAC;AAACvC,OAAA,CAAAqC,eAAA,GAAAA,eAAA","ignoreList":[]}
@@ -0,0 +1,156 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.TEXT_ALIGN_SUPPORT_KEY = void 0;
8
+ exports.addAssignedTextAlign = addAssignedTextAlign;
9
+ exports.default = void 0;
10
+ exports.getValidTextAlignments = getValidTextAlignments;
11
+ var _react = require("react");
12
+ var _classnames = _interopRequireDefault(require("classnames"));
13
+ var _i18n = require("@wordpress/i18n");
14
+ var _blocks = require("@wordpress/blocks");
15
+ var _icons = require("@wordpress/icons");
16
+ var _components = require("../components");
17
+ var _blockEditingMode = require("../components/block-editing-mode");
18
+ var _utils = require("./utils");
19
+ var _typography = require("./typography");
20
+ /**
21
+ * External dependencies
22
+ */
23
+
24
+ /**
25
+ * WordPress dependencies
26
+ */
27
+
28
+ /**
29
+ * Internal dependencies
30
+ */
31
+
32
+ const TEXT_ALIGN_SUPPORT_KEY = exports.TEXT_ALIGN_SUPPORT_KEY = 'typography.textAlign';
33
+ const TEXT_ALIGNMENT_OPTIONS = [{
34
+ icon: _icons.alignLeft,
35
+ title: (0, _i18n.__)('Align text left'),
36
+ align: 'left'
37
+ }, {
38
+ icon: _icons.alignCenter,
39
+ title: (0, _i18n.__)('Align text center'),
40
+ align: 'center'
41
+ }, {
42
+ icon: _icons.alignRight,
43
+ title: (0, _i18n.__)('Align text right'),
44
+ align: 'right'
45
+ }];
46
+ const VALID_TEXT_ALIGNMENTS = ['left', 'center', 'right'];
47
+
48
+ /**
49
+ * Returns the valid text alignments.
50
+ * Takes into consideration the text aligns supported by a block.
51
+ * Exported just for testing purposes, not exported outside the module.
52
+ *
53
+ * @param {?boolean|string[]} blockTextAlign Text aligns supported by the block.
54
+ *
55
+ * @return {string[]} Valid text alignments.
56
+ */
57
+ function getValidTextAlignments(blockTextAlign) {
58
+ let validTextAlignments;
59
+ if (Array.isArray(blockTextAlign)) {
60
+ validTextAlignments = VALID_TEXT_ALIGNMENTS.filter(textAlign => blockTextAlign.includes(textAlign));
61
+ } else if (blockTextAlign === true) {
62
+ // `true` includes all alignments...
63
+ validTextAlignments = [...VALID_TEXT_ALIGNMENTS];
64
+ } else {
65
+ validTextAlignments = [];
66
+ }
67
+ return validTextAlignments;
68
+ }
69
+ function BlockEditTextAlignmentToolbarControlsPure({
70
+ style,
71
+ name: blockName,
72
+ setAttributes
73
+ }) {
74
+ const validTextAlignments = getValidTextAlignments((0, _blocks.getBlockSupport)(blockName, TEXT_ALIGN_SUPPORT_KEY));
75
+ const blockEditingMode = (0, _blockEditingMode.useBlockEditingMode)();
76
+ if (!validTextAlignments.length || blockEditingMode !== 'default') {
77
+ return null;
78
+ }
79
+ const textAlignmentControls = TEXT_ALIGNMENT_OPTIONS.filter(control => validTextAlignments.includes(control.align));
80
+ const onChange = newTextAlignValue => {
81
+ const newStyle = {
82
+ ...style,
83
+ typography: {
84
+ ...style?.typography,
85
+ textAlign: newTextAlignValue
86
+ }
87
+ };
88
+ setAttributes({
89
+ style: (0, _utils.cleanEmptyObject)(newStyle)
90
+ });
91
+ };
92
+ return (0, _react.createElement)(_components.BlockControls, {
93
+ group: "block"
94
+ }, (0, _react.createElement)(_components.AlignmentControl, {
95
+ value: style?.typography?.textAlign,
96
+ onChange: onChange,
97
+ alignmentControls: textAlignmentControls
98
+ }));
99
+ }
100
+ var _default = exports.default = {
101
+ edit: BlockEditTextAlignmentToolbarControlsPure,
102
+ useBlockProps,
103
+ addSaveProps: addAssignedTextAlign,
104
+ attributeKeys: ['style'],
105
+ hasSupport(name) {
106
+ return (0, _blocks.hasBlockSupport)(name, TEXT_ALIGN_SUPPORT_KEY, false);
107
+ }
108
+ };
109
+ function useBlockProps({
110
+ name,
111
+ style
112
+ }) {
113
+ if (!style?.typography?.textAlign) {
114
+ return null;
115
+ }
116
+ const validTextAlignments = getValidTextAlignments((0, _blocks.getBlockSupport)(name, TEXT_ALIGN_SUPPORT_KEY));
117
+ if (!validTextAlignments.length) {
118
+ return null;
119
+ }
120
+ if ((0, _utils.shouldSkipSerialization)(name, _typography.TYPOGRAPHY_SUPPORT_KEY, 'textAlign')) {
121
+ return null;
122
+ }
123
+ const textAlign = style.typography.textAlign;
124
+ const className = (0, _classnames.default)({
125
+ [`has-text-align-${textAlign}`]: textAlign
126
+ });
127
+ return {
128
+ className
129
+ };
130
+ }
131
+
132
+ /**
133
+ * Override props assigned to save component to inject text alignment class
134
+ * name if block supports it.
135
+ *
136
+ * @param {Object} props Additional props applied to save element.
137
+ * @param {Object} blockType Block type.
138
+ * @param {Object} attributes Block attributes.
139
+ *
140
+ * @return {Object} Filtered props applied to save element.
141
+ */
142
+ function addAssignedTextAlign(props, blockType, attributes) {
143
+ if (!attributes?.style?.typography?.textAlign) {
144
+ return props;
145
+ }
146
+ const {
147
+ textAlign
148
+ } = attributes.style.typography;
149
+ const blockTextAlign = (0, _blocks.getBlockSupport)(blockType, TEXT_ALIGN_SUPPORT_KEY);
150
+ const isTextAlignValid = getValidTextAlignments(blockTextAlign).includes(textAlign);
151
+ if (isTextAlignValid && !(0, _utils.shouldSkipSerialization)(blockType, _typography.TYPOGRAPHY_SUPPORT_KEY, 'textAlign')) {
152
+ props.className = (0, _classnames.default)(`has-text-align-${textAlign}`, props.className);
153
+ }
154
+ return props;
155
+ }
156
+ //# sourceMappingURL=text-align.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_classnames","_interopRequireDefault","require","_i18n","_blocks","_icons","_components","_blockEditingMode","_utils","_typography","TEXT_ALIGN_SUPPORT_KEY","exports","TEXT_ALIGNMENT_OPTIONS","icon","alignLeft","title","__","align","alignCenter","alignRight","VALID_TEXT_ALIGNMENTS","getValidTextAlignments","blockTextAlign","validTextAlignments","Array","isArray","filter","textAlign","includes","BlockEditTextAlignmentToolbarControlsPure","style","name","blockName","setAttributes","getBlockSupport","blockEditingMode","useBlockEditingMode","length","textAlignmentControls","control","onChange","newTextAlignValue","newStyle","typography","cleanEmptyObject","_react","createElement","BlockControls","group","AlignmentControl","value","alignmentControls","_default","default","edit","useBlockProps","addSaveProps","addAssignedTextAlign","attributeKeys","hasSupport","hasBlockSupport","shouldSkipSerialization","TYPOGRAPHY_SUPPORT_KEY","className","classnames","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\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uB,CAAC;EAC3E,MAAM0D,gBAAgB,GACrB/C,sBAAsB,CAAEC,cAAe,CAAC,CAACM,QAAQ,CAAED,SAAU,CAAC;EAC/D,IACCyC,gBAAgB,IAChB,CAAE,IAAAP,8BAAuB,EACxBK,SAAS,EACTJ,kCAAsB,EACtB,WACD,CAAC,EACA;IACDG,KAAK,CAACF,SAAS,GAAG,IAAAC,mBAAU,EAC1B,kBAAkBrC,SAAW,EAAC,EAC/BsC,KAAK,CAACF,SACP,CAAC;EACF;EACA,OAAOE,KAAK;AACb","ignoreList":[]}
@@ -16,10 +16,11 @@ var _typographyPanel = _interopRequireWildcard(require("../components/global-sty
16
16
  var _lineHeight = require("./line-height");
17
17
  var _fontFamily = require("./font-family");
18
18
  var _fontSize = require("./font-size");
19
+ var _textAlign = require("./text-align");
19
20
  var _utils = require("./utils");
20
21
  var _store = require("../store");
21
22
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
22
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
23
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
23
24
  /**
24
25
  * WordPress dependencies
25
26
  */
@@ -39,7 +40,7 @@ const FONT_STYLE_SUPPORT_KEY = 'typography.__experimentalFontStyle';
39
40
  const FONT_WEIGHT_SUPPORT_KEY = 'typography.__experimentalFontWeight';
40
41
  const WRITING_MODE_SUPPORT_KEY = 'typography.__experimentalWritingMode';
41
42
  const TYPOGRAPHY_SUPPORT_KEY = exports.TYPOGRAPHY_SUPPORT_KEY = 'typography';
42
- const TYPOGRAPHY_SUPPORT_KEYS = exports.TYPOGRAPHY_SUPPORT_KEYS = [_lineHeight.LINE_HEIGHT_SUPPORT_KEY, _fontSize.FONT_SIZE_SUPPORT_KEY, FONT_STYLE_SUPPORT_KEY, FONT_WEIGHT_SUPPORT_KEY, _fontFamily.FONT_FAMILY_SUPPORT_KEY, TEXT_COLUMNS_SUPPORT_KEY, TEXT_DECORATION_SUPPORT_KEY, WRITING_MODE_SUPPORT_KEY, TEXT_TRANSFORM_SUPPORT_KEY, LETTER_SPACING_SUPPORT_KEY];
43
+ const TYPOGRAPHY_SUPPORT_KEYS = exports.TYPOGRAPHY_SUPPORT_KEYS = [_lineHeight.LINE_HEIGHT_SUPPORT_KEY, _fontSize.FONT_SIZE_SUPPORT_KEY, FONT_STYLE_SUPPORT_KEY, FONT_WEIGHT_SUPPORT_KEY, _fontFamily.FONT_FAMILY_SUPPORT_KEY, _textAlign.TEXT_ALIGN_SUPPORT_KEY, TEXT_COLUMNS_SUPPORT_KEY, TEXT_DECORATION_SUPPORT_KEY, WRITING_MODE_SUPPORT_KEY, TEXT_TRANSFORM_SUPPORT_KEY, LETTER_SPACING_SUPPORT_KEY];
43
44
  function styleToAttributes(style) {
44
45
  const updatedStyle = {
45
46
  ...omit(style, ['fontFamily'])
@@ -1 +1 @@
1
- {"version":3,"names":["_blocks","require","_element","_data","_inspectorControls","_interopRequireDefault","_typographyPanel","_interopRequireWildcard","_lineHeight","_fontFamily","_fontSize","_utils","_store","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","omit","object","keys","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","exports","TYPOGRAPHY_SUPPORT_KEYS","LINE_HEIGHT_SUPPORT_KEY","FONT_SIZE_SUPPORT_KEY","FONT_FAMILY_SUPPORT_KEY","styleToAttributes","style","updatedStyle","fontSizeValue","typography","fontSize","fontFamilyValue","fontFamily","fontSizeSlug","startsWith","substring","length","undefined","fontFamilySlug","cleanEmptyObject","attributesToStyle","attributes","TypographyInspectorControl","children","resetAllFilter","attributesResetAllFilter","useCallback","existingStyle","_react","createElement","group","TypographyPanel","clientId","name","setAttributes","settings","selector","select","blockEditorStore","getBlockAttributes","useSelect","isEnabled","useHasTypographyPanel","value","useMemo","onChange","newStyle","defaultControls","getBlockSupport","as","panelId","hasTypographySupport","blockName","some","hasBlockSupport"],"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":";;;;;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAKA,IAAAG,kBAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,gBAAA,GAAAC,uBAAA,CAAAN,OAAA;AAKA,IAAAO,WAAA,GAAAP,OAAA;AACA,IAAAQ,WAAA,GAAAR,OAAA;AACA,IAAAS,SAAA,GAAAT,OAAA;AACA,IAAAU,MAAA,GAAAV,OAAA;AACA,IAAAW,MAAA,GAAAX,OAAA;AAAqD,SAAAY,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAP,wBAAAO,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA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QAAQ,CAAG,CAAC;EAC3E,MAAMS,SAAS,GAAG,IAAAC,sCAAqB,EAAEP,QAAS,CAAC;EACnD,MAAMQ,KAAK,GAAG,IAAAC,gBAAO,EACpB,MAAMxB,iBAAiB,CAAE;IAAEd,KAAK;IAAEM,UAAU;IAAEF;EAAS,CAAE,CAAC,EAC1D,CAAEJ,KAAK,EAAEI,QAAQ,EAAEE,UAAU,CAC9B,CAAC;EAED,MAAMiC,QAAQ,GAAKC,QAAQ,IAAM;IAChCZ,aAAa,CAAE7B,iBAAiB,CAAEyC,QAAS,CAAE,CAAC;EAC/C,CAAC;EAED,IAAK,CAAEL,SAAS,EAAG;IAClB,OAAO,IAAI;EACZ;EAEA,MAAMM,eAAe,GAAG,IAAAC,uBAAe,EAAEf,IAAI,EAAE,CAC9ClC,sBAAsB,EACtB,+BAA+B,CAC9B,CAAC;EAEH,OACC,IAAA6B,MAAA,CAAAC,aAAA,EAACzE,gBAAA,CAAAa,OAAqB;IACrBgF,EAAE,EAAG3B,0BAA4B;IACjC4B,OAAO,EAAGlB,QAAU;IACpBG,QAAQ,EAAGA,QAAU;IACrBQ,KAAK,EAAGA,KAAO;IACfE,QAAQ,EAAGA,QAAU;IACrBE,eAAe,EAAGA;EAAiB,CACnC,CAAC;AAEJ;AAEO,MAAMI,oBAAoB,GAAKC,SAAS,IAAM;EACpD,OAAOnD,uBAAuB,CAACoD,IAAI,CAAI/D,GAAG,IACzC,IAAAgE,uBAAe,EAAEF,SAAS,EAAE9D,GAAI,CACjC,CAAC;AACF,CAAC;AAACU,OAAA,CAAAmD,oBAAA,GAAAA,oBAAA"}
1
+ {"version":3,"names":["_blocks","require","_element","_data","_inspectorControls","_interopRequireDefault","_typographyPanel","_interopRequireWildcard","_lineHeight","_fontFamily","_fontSize","_textAlign","_utils","_store","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","omit","object","keys","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","exports","TYPOGRAPHY_SUPPORT_KEYS","LINE_HEIGHT_SUPPORT_KEY","FONT_SIZE_SUPPORT_KEY","FONT_FAMILY_SUPPORT_KEY","TEXT_ALIGN_SUPPORT_KEY","styleToAttributes","style","updatedStyle","fontSizeValue","typography","fontSize","fontFamilyValue","fontFamily","fontSizeSlug","startsWith","substring","length","undefined","fontFamilySlug","cleanEmptyObject","attributesToStyle","attributes","TypographyInspectorControl","children","resetAllFilter","attributesResetAllFilter","useCallback","existingStyle","_react","createElement","group","TypographyPanel","clientId","name","setAttributes","settings","selector","select","blockEditorStore","getBlockAttributes","useSelect","isEnabled","useHasTypographyPanel","value","useMemo","onChange","newStyle","defaultControls","getBlockSupport","as","panelId","hasTypographySupport","blockName","some","hasBlockSupport"],"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":";;;;;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAKA,IAAAG,kBAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,gBAAA,GAAAC,uBAAA,CAAAN,OAAA;AAKA,IAAAO,WAAA,GAAAP,OAAA;AACA,IAAAQ,WAAA,GAAAR,OAAA;AACA,IAAAS,SAAA,GAAAT,OAAA;AACA,IAAAU,UAAA,GAAAV,OAAA;AACA,IAAAW,MAAA,GAAAX,OAAA;AACA,IAAAY,MAAA,GAAAZ,OAAA;AAAqD,SAAAa,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAR,wBAAAQ,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAA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,IAAAC,sCAAqB,EAAEP,QAAS,CAAC;EACnD,MAAMQ,KAAK,GAAG,IAAAC,gBAAO,EACpB,MAAMxB,iBAAiB,CAAE;IAAEd,KAAK;IAAEM,UAAU;IAAEF;EAAS,CAAE,CAAC,EAC1D,CAAEJ,KAAK,EAAEI,QAAQ,EAAEE,UAAU,CAC9B,CAAC;EAED,MAAMiC,QAAQ,GAAKC,QAAQ,IAAM;IAChCZ,aAAa,CAAE7B,iBAAiB,CAAEyC,QAAS,CAAE,CAAC;EAC/C,CAAC;EAED,IAAK,CAAEL,SAAS,EAAG;IAClB,OAAO,IAAI;EACZ;EAEA,MAAMM,eAAe,GAAG,IAAAC,uBAAe,EAAEf,IAAI,EAAE,CAC9CnC,sBAAsB,EACtB,+BAA+B,CAC9B,CAAC;EAEH,OACC,IAAA8B,MAAA,CAAAC,aAAA,EAAC1E,gBAAA,CAAAc,OAAqB;IACrBgF,EAAE,EAAG3B,0BAA4B;IACjC4B,OAAO,EAAGlB,QAAU;IACpBG,QAAQ,EAAGA,QAAU;IACrBQ,KAAK,EAAGA,KAAO;IACfE,QAAQ,EAAGA,QAAU;IACrBE,eAAe,EAAGA;EAAiB,CACnC,CAAC;AAEJ;AAEO,MAAMI,oBAAoB,GAAKC,SAAS,IAAM;EACpD,OAAOpD,uBAAuB,CAACqD,IAAI,CAAIhE,GAAG,IACzC,IAAAiE,uBAAe,EAAEF,SAAS,EAAE/D,GAAI,CACjC,CAAC;AACF,CAAC;AAACU,OAAA,CAAAoD,oBAAA,GAAAA,oBAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_data","require","_element","_components","_i18n","_inspectorControls","_interopRequireDefault","_typographyPanel","_store","_lineHeight","_fontSize","TYPOGRAPHY_SUPPORT_KEY","exports","TYPOGRAPHY_SUPPORT_KEYS","LINE_HEIGHT_SUPPORT_KEY","FONT_SIZE_SUPPORT_KEY","TypographyPanelPure","clientId","setAttributes","settings","selector","select","style","fontFamily","fontSize","blockEditorStore","getBlockAttributes","useSelect","isEnabled","useHasTypographyPanel","props","attributes","_react","createElement","default","PanelBody","title","__","FontSizeEdit","LineHeightEdit","TypographyPanel","memo"],"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 T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AA6B,OAAiB,QACjB,IAAAF,MAAA,CAAAC,aAAA,EAAC9B,WAAA,CAAAgC,SAAS;IAACC,KAAK,EAAG,IAAAC,QAAE,EAAE,YAAa;EAAG,GACtC,IAAAL,MAAA,CAAAC,aAAA,EAACvB,SAAA,CAAA4B,YAAY;IAAA,GAAMR;EAAK,CAAI,CAAC,EAC7B,IAAAE,MAAA,CAAAC,aAAA,EAACxB,WAAA,CAAA8B,cAAc;IAAA,GAAMT;EAAK,CAAI,CACpB,CACO,CAAC;AAEtB;;AAEA;AACA;AACA;AACO,MAAMU,eAAe,GAAA5B,OAAA,CAAA4B,eAAA,GAAG,IAAAC,aAAI,EAAEzB,mBAAoB,CAAC"}
1
+ {"version":3,"names":["_data","require","_element","_components","_i18n","_inspectorControls","_interopRequireDefault","_typographyPanel","_store","_lineHeight","_fontSize","TYPOGRAPHY_SUPPORT_KEY","exports","TYPOGRAPHY_SUPPORT_KEYS","LINE_HEIGHT_SUPPORT_KEY","FONT_SIZE_SUPPORT_KEY","TypographyPanelPure","clientId","setAttributes","settings","selector","select","style","fontFamily","fontSize","blockEditorStore","getBlockAttributes","useSelect","isEnabled","useHasTypographyPanel","props","attributes","_react","createElement","default","PanelBody","title","__","FontSizeEdit","LineHeightEdit","TypographyPanel","memo"],"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":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AAKA,IAAAI,kBAAA,GAAAC,sBAAA,CAAAL,OAAA;AACA,IAAAM,gBAAA,GAAAN,OAAA;AAEA,IAAAO,MAAA,GAAAP,OAAA;AAEA,IAAAQ,WAAA,GAAAR,OAAA;AACA,IAAAS,SAAA,GAAAT,OAAA;AAjBA;AACA;AACA;;AAMA;AACA;AACA;;AASO,MAAMU,sBAAsB,GAAAC,OAAA,CAAAD,sBAAA,GAAG,YAAY;AAC3C,MAAME,uBAAuB,GAAAD,OAAA,CAAAC,uBAAA,GAAG,CACtCC,mCAAuB,EACvBC,+BAAqB,CACrB;AAED,SAASC,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,CAAEI,YAAiB,CAAC,CAACC,kBAAkB,CAAET,QAAS,CAAC,IAAI,CAAC,CAAC;IAChE,OAAO;MAAEK,KAAK;MAAEC,UAAU;MAAEC;IAAS,CAAC;EACvC;EACA,MAAM;IAAEF,KAAK;IAAEE;EAAS,CAAC,GAAG,IAAAG,eAAS,EAAEP,QAAQ,EAAE,CAAEH,QAAQ,CAAG,CAAC;EAC/D,MAAMW,SAAS,GAAG,IAAAC,sCAAqB,EAAEV,QAAS,CAAC;EAEnD,IAAK,CAAES,SAAS,EAAG;IAClB,OAAO,IAAI;EACZ;EAEA,MAAME,KAAK,GAAG;IACbC,UAAU,EAAE;MACXP,QAAQ;MACRF;IACD,CAAC;IACDJ;EACD,CAAC;EAED,OACC,IAAAc,MAAA,CAAAC,aAAA,EAAC5B,kBAAA,CAAA6B,OAAiB,QACjB,IAAAF,MAAA,CAAAC,aAAA,EAAC9B,WAAA,CAAAgC,SAAS;IAACC,KAAK,EAAG,IAAAC,QAAE,EAAE,YAAa;EAAG,GACtC,IAAAL,MAAA,CAAAC,aAAA,EAACvB,SAAA,CAAA4B,YAAY;IAAA,GAAMR;EAAK,CAAI,CAAC,EAC7B,IAAAE,MAAA,CAAAC,aAAA,EAACxB,WAAA,CAAA8B,cAAc;IAAA,GAAMT;EAAK,CAAI,CACpB,CACO,CAAC;AAEtB;;AAEA;AACA;AACA;AACO,MAAMU,eAAe,GAAA5B,OAAA,CAAA4B,eAAA,GAAG,IAAAC,aAAI,EAAEzB,mBAAoB,CAAC","ignoreList":[]}
@@ -5,13 +5,13 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.canBindAttribute = canBindAttribute;
7
7
  exports.canBindBlock = canBindBlock;
8
+ exports.withBlockBindingSupport = void 0;
8
9
  var _react = require("react");
9
10
  var _blocks = require("@wordpress/blocks");
10
11
  var _compose = require("@wordpress/compose");
11
12
  var _data = require("@wordpress/data");
12
13
  var _element = require("@wordpress/element");
13
14
  var _hooks = require("@wordpress/hooks");
14
- var _richText = require("@wordpress/rich-text");
15
15
  var _lockUnlock = require("../lock-unlock");
16
16
  /**
17
17
  * WordPress dependencies
@@ -60,144 +60,81 @@ function canBindBlock(blockName) {
60
60
  function canBindAttribute(blockName, attributeName) {
61
61
  return canBindBlock(blockName) && BLOCK_BINDINGS_ALLOWED_BLOCKS[blockName].includes(attributeName);
62
62
  }
63
-
64
- /**
65
- * This component is responsible for detecting and
66
- * propagating data changes from the source to the block.
67
- *
68
- * @param {Object} props - The component props.
69
- * @param {string} props.attrName - The attribute name.
70
- * @param {Object} props.blockProps - The block props with bound attribute.
71
- * @param {Object} props.source - Source handler.
72
- * @param {Object} props.args - The arguments to pass to the source.
73
- * @param {Function} props.onPropValueChange - The function to call when the attribute value changes.
74
- * @return {null} Data-handling component. Render nothing.
75
- */
76
- const BindingConnector = ({
77
- args,
78
- attrName,
79
- blockProps,
80
- source,
81
- onPropValueChange
82
- }) => {
83
- const {
84
- placeholder,
85
- value: propValue
86
- } = source.useSource(blockProps, args);
63
+ const withBlockBindingSupport = exports.withBlockBindingSupport = (0, _compose.createHigherOrderComponent)(BlockEdit => props => {
64
+ const registry = (0, _data.useRegistry)();
65
+ const sources = (0, _data.useSelect)(select => (0, _lockUnlock.unlock)(select(_blocks.store)).getAllBlockBindingsSources());
66
+ const bindings = props.attributes.metadata?.bindings;
87
67
  const {
88
- name: blockName
89
- } = blockProps;
90
- const attrValue = blockProps.attributes[attrName];
91
- const updateBoundAttibute = (0, _element.useCallback)((newAttrValue, prevAttrValue) => {
92
- /*
93
- * If the attribute is a RichTextData instance,
94
- * (core/paragraph, core/heading, core/button, etc.)
95
- * compare its HTML representation with the new value.
96
- *
97
- * To do: it looks like a workaround.
98
- * Consider improving the attribute and metadata fields types.
99
- */
100
- if (prevAttrValue instanceof _richText.RichTextData) {
101
- // Bail early if the Rich Text value is the same.
102
- if (prevAttrValue.toHTMLString() === newAttrValue) {
103
- return;
104
- }
105
-
106
- /*
107
- * To preserve the value type,
108
- * convert the new value to a RichTextData instance.
109
- */
110
- newAttrValue = _richText.RichTextData.fromHTMLString(newAttrValue);
111
- }
112
- if (prevAttrValue === newAttrValue) {
68
+ name,
69
+ clientId,
70
+ context
71
+ } = props;
72
+ const boundAttributes = (0, _data.useSelect)(() => {
73
+ if (!bindings) {
113
74
  return;
114
75
  }
115
- onPropValueChange({
116
- [attrName]: newAttrValue
117
- });
118
- }, [attrName, onPropValueChange]);
119
- (0, _element.useLayoutEffect)(() => {
120
- if (typeof propValue !== 'undefined') {
121
- updateBoundAttibute(propValue, attrValue);
122
- } else if (placeholder) {
123
- /*
124
- * Placeholder fallback.
125
- * If the attribute is `src` or `href`,
126
- * a placeholder can't be used because it is not a valid url.
127
- * Adding this workaround until
128
- * attributes and metadata fields types are improved and include `url`.
129
- */
130
- const htmlAttribute = (0, _blocks.getBlockType)(blockName).attributes[attrName].attribute;
131
- if (htmlAttribute === 'src' || htmlAttribute === 'href') {
132
- updateBoundAttibute(null);
133
- return;
76
+ const attributes = {};
77
+ for (const [attributeName, boundAttribute] of Object.entries(bindings)) {
78
+ const source = sources[boundAttribute.source];
79
+ if (!source?.getValue || !canBindAttribute(name, attributeName)) {
80
+ continue;
81
+ }
82
+ const args = {
83
+ registry,
84
+ context,
85
+ clientId,
86
+ attributeName,
87
+ args: boundAttribute.args
88
+ };
89
+ attributes[attributeName] = source.getValue(args);
90
+ if (attributes[attributeName] === undefined) {
91
+ if (attributeName === 'url') {
92
+ attributes[attributeName] = null;
93
+ } else {
94
+ attributes[attributeName] = source.getPlaceholder?.(args);
95
+ }
134
96
  }
135
- updateBoundAttibute(placeholder);
136
- }
137
- }, [updateBoundAttibute, propValue, attrValue, placeholder, blockName, attrName]);
138
- return null;
139
- };
140
-
141
- /**
142
- * BlockBindingBridge acts like a component wrapper
143
- * that connects the bound attributes of a block
144
- * to the source handlers.
145
- * For this, it creates a BindingConnector for each bound attribute.
146
- *
147
- * @param {Object} props - The component props.
148
- * @param {Object} props.blockProps - The BlockEdit props object.
149
- * @param {Object} props.bindings - The block bindings settings.
150
- * @param {Function} props.onPropValueChange - The function to call when the attribute value changes.
151
- * @return {null} Data-handling component. Render nothing.
152
- */
153
- function BlockBindingBridge({
154
- blockProps,
155
- bindings,
156
- onPropValueChange
157
- }) {
158
- const blockBindingsSources = (0, _lockUnlock.unlock)((0, _data.useSelect)(_blocks.store)).getAllBlockBindingsSources();
159
- return (0, _react.createElement)(_react.Fragment, null, Object.entries(bindings).map(([attrName, boundAttribute]) => {
160
- // Bail early if the block doesn't have a valid source handler.
161
- const source = blockBindingsSources[boundAttribute.source];
162
- if (!source?.useSource) {
163
- return null;
164
97
  }
165
- return (0, _react.createElement)(BindingConnector, {
166
- key: attrName,
167
- attrName: attrName,
168
- source: source,
169
- blockProps: blockProps,
170
- args: boundAttribute.args,
171
- onPropValueChange: onPropValueChange
98
+ return attributes;
99
+ }, [bindings, name, clientId, context, registry, sources]);
100
+ const {
101
+ setAttributes
102
+ } = props;
103
+ const _setAttributes = (0, _element.useCallback)(nextAttributes => {
104
+ registry.batch(() => {
105
+ if (!bindings) {
106
+ return setAttributes(nextAttributes);
107
+ }
108
+ const keptAttributes = {
109
+ ...nextAttributes
110
+ };
111
+ for (const [attributeName, boundAttribute] of Object.entries(bindings)) {
112
+ const source = sources[boundAttribute.source];
113
+ if (!source?.setValue || !canBindAttribute(name, attributeName)) {
114
+ continue;
115
+ }
116
+ source.setValue({
117
+ registry,
118
+ context,
119
+ clientId,
120
+ attributeName,
121
+ args: boundAttribute.args,
122
+ value: nextAttributes[attributeName]
123
+ });
124
+ delete keptAttributes[attributeName];
125
+ }
126
+ if (Object.keys(keptAttributes).length) {
127
+ setAttributes(keptAttributes);
128
+ }
172
129
  });
173
- }));
174
- }
175
- const withBlockBindingSupport = (0, _compose.createHigherOrderComponent)(BlockEdit => props => {
176
- /*
177
- * Collect and update the bound attributes
178
- * in a separate state.
179
- */
180
- const [boundAttributes, setBoundAttributes] = (0, _element.useState)({});
181
- const updateBoundAttributes = (0, _element.useCallback)(newAttributes => setBoundAttributes(prev => ({
182
- ...prev,
183
- ...newAttributes
184
- })), []);
185
-
186
- /*
187
- * Create binding object filtering
188
- * only the attributes that can be bound.
189
- */
190
- const bindings = Object.fromEntries(Object.entries(props.attributes.metadata?.bindings || {}).filter(([attrName]) => canBindAttribute(props.name, attrName)));
191
- return (0, _react.createElement)(_react.Fragment, null, Object.keys(bindings).length > 0 && (0, _react.createElement)(BlockBindingBridge, {
192
- blockProps: props,
193
- bindings: bindings,
194
- onPropValueChange: updateBoundAttributes
195
- }), (0, _react.createElement)(BlockEdit, {
130
+ }, [registry, bindings, name, clientId, context, setAttributes, sources]);
131
+ return (0, _react.createElement)(_react.Fragment, null, (0, _react.createElement)(BlockEdit, {
196
132
  ...props,
197
133
  attributes: {
198
134
  ...props.attributes,
199
135
  ...boundAttributes
200
- }
136
+ },
137
+ setAttributes: _setAttributes
201
138
  }));
202
139
  }, 'withBlockBindingSupport');
203
140