@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":["_components","require","_icons","_utils","checkIcon","_react","createElement","Icon","icon","check","size","SidesDropdown","label","labelProp","onChange","sides","value","length","supportedItems","getSupportedMenuItems","sideIcon","custom","customItem","menuItems","DropdownMenu","className","toggleProps","onClose","Fragment","MenuGroup","Object","entries","map","slug","isSelected","MenuItem","key","iconPosition","role","onClick","suffix","undefined","VIEWS"],"sources":["@wordpress/block-editor/src/components/spacing-sizes-control/sides-dropdown/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { DropdownMenu, Icon, MenuGroup, MenuItem } from '@wordpress/components';\nimport { check } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { getSupportedMenuItems, VIEWS } from '../utils';\n\nconst checkIcon = <Icon icon={ check } size={ 24 } />;\n\nexport default function SidesDropdown( {\n\tlabel: labelProp,\n\tonChange,\n\tsides,\n\tvalue,\n} ) {\n\tif ( ! sides || ! sides.length ) {\n\t\treturn;\n\t}\n\n\tconst supportedItems = getSupportedMenuItems( sides );\n\tconst sideIcon = supportedItems[ value ].icon;\n\tconst { custom: customItem, ...menuItems } = supportedItems;\n\n\treturn (\n\t\t<DropdownMenu\n\t\t\ticon={ sideIcon }\n\t\t\tlabel={ labelProp }\n\t\t\tclassName=\"spacing-sizes-control__dropdown\"\n\t\t\ttoggleProps={ { size: 'small' } }\n\t\t>\n\t\t\t{ ( { onClose } ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t{ Object.entries( menuItems ).map(\n\t\t\t\t\t\t\t\t( [ slug, { label, icon } ] ) => {\n\t\t\t\t\t\t\t\t\tconst isSelected = value === slug;\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\t\t\t\tkey={ slug }\n\t\t\t\t\t\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\t\t\t\t\t\ticonPosition=\"left\"\n\t\t\t\t\t\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t\t\t\t\t\t\trole=\"menuitemradio\"\n\t\t\t\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\t\t\t\tonChange( slug );\n\t\t\t\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\t\tsuffix={\n\t\t\t\t\t\t\t\t\t\t\t\tisSelected\n\t\t\t\t\t\t\t\t\t\t\t\t\t? checkIcon\n\t\t\t\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ label }\n\t\t\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t{ !! customItem && (\n\t\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\t\ticon={ customItem.icon }\n\t\t\t\t\t\t\t\t\ticonPosition=\"left\"\n\t\t\t\t\t\t\t\t\tisSelected={ value === VIEWS.custom }\n\t\t\t\t\t\t\t\t\trole=\"menuitemradio\"\n\t\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\t\tonChange( VIEWS.custom );\n\t\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\tsuffix={\n\t\t\t\t\t\t\t\t\t\tvalue === VIEWS.custom\n\t\t\t\t\t\t\t\t\t\t\t? checkIcon\n\t\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ customItem.label }\n\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</>\n\t\t\t\t);\n\t\t\t} }\n\t\t</DropdownMenu>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OA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AI,EAAGA,IAAM;QACb6B,YAAY,EAAC,MAAM;QACnBH,UAAU,EAAGA,UAAY;QACzBI,IAAI,EAAC,eAAe;QACpBC,OAAO,EAAGA,CAAA,KAAM;UACfzB,QAAQ,CAAEmB,IAAK,CAAC;UAChBN,OAAO,CAAC,CAAC;QACV,CAAG;QACHa,MAAM,EACLN,UAAU,GACP9B,SAAS,GACTqC;MACH,GAEC7B,KACO,CAAC;IAEb,CACD,CACU,CAAC,EACV,CAAC,CAAEU,UAAU,IACd,IAAAjB,MAAA,CAAAC,aAAA,EAACN,WAAA,CAAA6B,SAAS,QACT,IAAAxB,MAAA,CAAAC,aAAA,EAACN,WAAA,CAAAmC,QAAQ;MACR3B,IAAI,EAAGc,UAAU,CAACd,IAAM;MACxB6B,YAAY,EAAC,MAAM;MACnBH,UAAU,EAAGlB,KAAK,KAAK0B,YAAK,CAACrB,MAAQ;MACrCiB,IAAI,EAAC,eAAe;MACpBC,OAAO,EAAGA,CAAA,KAAM;QACfzB,QAAQ,CAAE4B,YAAK,CAACrB,MAAO,CAAC;QACxBM,OAAO,CAAC,CAAC;MACV,CAAG;MACHa,MAAM,EACLxB,KAAK,KAAK0B,YAAK,CAACrB,MAAM,GACnBjB,SAAS,GACTqC;IACH,GAECnB,UAAU,CAACV,KACJ,CACA,CAEX,CAAC;EAEL,CACa,CAAC;AAEjB"}
1
+ {"version":3,"names":["_components","require","_icons","_utils","checkIcon","_react","createElement","Icon","icon","check","size","SidesDropdown","label","labelProp","onChange","sides","value","length","supportedItems","getSupportedMenuItems","sideIcon","custom","customItem","menuItems","DropdownMenu","className","toggleProps","onClose","Fragment","MenuGroup","Object","entries","map","slug","isSelected","MenuItem","key","iconPosition","role","onClick","suffix","undefined","VIEWS"],"sources":["@wordpress/block-editor/src/components/spacing-sizes-control/sides-dropdown/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { DropdownMenu, Icon, MenuGroup, MenuItem } from '@wordpress/components';\nimport { check } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { getSupportedMenuItems, VIEWS } from '../utils';\n\nconst checkIcon = <Icon icon={ check } size={ 24 } />;\n\nexport default function SidesDropdown( {\n\tlabel: labelProp,\n\tonChange,\n\tsides,\n\tvalue,\n} ) {\n\tif ( ! sides || ! sides.length ) {\n\t\treturn;\n\t}\n\n\tconst supportedItems = getSupportedMenuItems( sides );\n\tconst sideIcon = supportedItems[ value ].icon;\n\tconst { custom: customItem, ...menuItems } = supportedItems;\n\n\treturn (\n\t\t<DropdownMenu\n\t\t\ticon={ sideIcon }\n\t\t\tlabel={ labelProp }\n\t\t\tclassName=\"spacing-sizes-control__dropdown\"\n\t\t\ttoggleProps={ { size: 'small' } }\n\t\t>\n\t\t\t{ ( { onClose } ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t{ Object.entries( menuItems ).map(\n\t\t\t\t\t\t\t\t( [ slug, { label, icon } ] ) => {\n\t\t\t\t\t\t\t\t\tconst isSelected = value === slug;\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\t\t\t\tkey={ slug }\n\t\t\t\t\t\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\t\t\t\t\t\ticonPosition=\"left\"\n\t\t\t\t\t\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t\t\t\t\t\t\trole=\"menuitemradio\"\n\t\t\t\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\t\t\t\tonChange( slug );\n\t\t\t\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\t\tsuffix={\n\t\t\t\t\t\t\t\t\t\t\t\tisSelected\n\t\t\t\t\t\t\t\t\t\t\t\t\t? checkIcon\n\t\t\t\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ label }\n\t\t\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t{ !! customItem && (\n\t\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\t\ticon={ customItem.icon }\n\t\t\t\t\t\t\t\t\ticonPosition=\"left\"\n\t\t\t\t\t\t\t\t\tisSelected={ value === VIEWS.custom }\n\t\t\t\t\t\t\t\t\trole=\"menuitemradio\"\n\t\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\t\tonChange( VIEWS.custom );\n\t\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\tsuffix={\n\t\t\t\t\t\t\t\t\t\tvalue === VIEWS.custom\n\t\t\t\t\t\t\t\t\t\t\t? checkIcon\n\t\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ customItem.label }\n\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</>\n\t\t\t\t);\n\t\t\t} }\n\t\t</DropdownMenu>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAKA,IAAAE,MAAA,GAAAF,OAAA;AATA;AACA;AACA;;AAIA;AACA;AACA;;AAGA,MAAMG,SAAS,GAAG,IAAAC,MAAA,CAAAC,aAAA,EAACN,WAAA,CAAAO,IAAI;EAACC,IAAI,EAAGC,YAAO;EAACC,IAAI,EAAG;AAAI,CAAE,CA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MAAM,EACLN,UAAU,GACP9B,SAAS,GACTqC;MACH,GAEC7B,KACO,CAAC;IAEb,CACD,CACU,CAAC,EACV,CAAC,CAAEU,UAAU,IACd,IAAAjB,MAAA,CAAAC,aAAA,EAACN,WAAA,CAAA6B,SAAS,QACT,IAAAxB,MAAA,CAAAC,aAAA,EAACN,WAAA,CAAAmC,QAAQ;MACR3B,IAAI,EAAGc,UAAU,CAACd,IAAM;MACxB6B,YAAY,EAAC,MAAM;MACnBH,UAAU,EAAGlB,KAAK,KAAK0B,YAAK,CAACrB,MAAQ;MACrCiB,IAAI,EAAC,eAAe;MACpBC,OAAO,EAAGA,CAAA,KAAM;QACfzB,QAAQ,CAAE4B,YAAK,CAACrB,MAAO,CAAC;QACxBM,OAAO,CAAC,CAAC;MACV,CAAG;MACHa,MAAM,EACLxB,KAAK,KAAK0B,YAAK,CAACrB,MAAM,GACnBjB,SAAS,GACTqC;IACH,GAECnB,UAAU,CAACV,KACJ,CACA,CAEX,CAAC;EAEL,CACa,CAAC;AAEjB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_i18n","require","_icons","ALL_SIDES","exports","DEFAULT_VALUES","top","undefined","right","bottom","left","ICONS","custom","sidesAll","axial","horizontal","sidesHorizontal","vertical","sidesVertical","sidesTop","sidesRight","sidesBottom","sidesLeft","LABELS","default","__","mixed","VIEWS","isValueSpacingPreset","value","includes","getCustomValueFromPreset","spacingSizes","slug","getSpacingPresetSlug","spacingSize","find","size","String","getPresetValueFromCustomValue","spacingMatch","getSpacingPresetCssVar","match","getSliderValueFromPreset","presetValue","parseFloat","sliderValue","findIndex","NaN","mode","arr","sort","a","b","filter","v","length","pop","getAllRawValue","values","Object","isValuesMixed","sides","Set","isValuesDefined","hasAxisSupport","axis","hasHorizontalSupport","hasVerticalSupport","getSupportedMenuItems","menuItems","label","icon","numberOfIndividualSides","forEach","side","hasBalancedSidesSupport","counts","getInitialView","sideValues","Boolean","hasMatchingAxialValues","hasNoValuesAndBalancedSides","entries","some","key"],"sources":["@wordpress/block-editor/src/components/spacing-sizes-control/utils.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tsidesAll,\n\tsidesBottom,\n\tsidesHorizontal,\n\tsidesLeft,\n\tsidesRight,\n\tsidesTop,\n\tsidesVertical,\n} from '@wordpress/icons';\n\nexport const ALL_SIDES = [ 'top', 'right', 'bottom', 'left' ];\n\nexport const DEFAULT_VALUES = {\n\ttop: undefined,\n\tright: undefined,\n\tbottom: undefined,\n\tleft: undefined,\n};\n\nexport const ICONS = {\n\tcustom: sidesAll,\n\taxial: sidesAll,\n\thorizontal: sidesHorizontal,\n\tvertical: sidesVertical,\n\ttop: sidesTop,\n\tright: sidesRight,\n\tbottom: sidesBottom,\n\tleft: sidesLeft,\n};\n\nexport const LABELS = {\n\tdefault: __( 'Spacing control' ),\n\ttop: __( 'Top' ),\n\tbottom: __( 'Bottom' ),\n\tleft: __( 'Left' ),\n\tright: __( 'Right' ),\n\tmixed: __( 'Mixed' ),\n\tvertical: __( 'Vertical' ),\n\thorizontal: __( 'Horizontal' ),\n\taxial: __( 'Horizontal & vertical' ),\n\tcustom: __( 'Custom' ),\n};\n\nexport const VIEWS = {\n\taxial: 'axial',\n\ttop: 'top',\n\tright: 'right',\n\tbottom: 'bottom',\n\tleft: 'left',\n\tcustom: 'custom',\n};\n\n/**\n * Checks is given value is a spacing preset.\n *\n * @param {string} value Value to check\n *\n * @return {boolean} Return true if value is string in format var:preset|spacing|.\n */\nexport function isValueSpacingPreset( value ) {\n\tif ( ! value?.includes ) {\n\t\treturn false;\n\t}\n\treturn value === '0' || value.includes( 'var:preset|spacing|' );\n}\n\n/**\n * Converts a spacing preset into a custom value.\n *\n * @param {string} value Value to convert\n * @param {Array} spacingSizes Array of the current spacing preset objects\n *\n * @return {string} Mapping of the spacing preset to its equivalent custom value.\n */\nexport function getCustomValueFromPreset( value, spacingSizes ) {\n\tif ( ! isValueSpacingPreset( value ) ) {\n\t\treturn value;\n\t}\n\n\tconst slug = getSpacingPresetSlug( value );\n\tconst spacingSize = spacingSizes.find(\n\t\t( size ) => String( size.slug ) === slug\n\t);\n\n\treturn spacingSize?.size;\n}\n\n/**\n * Converts a custom value to preset value if one can be found.\n *\n * Returns value as-is if no match is found.\n *\n * @param {string} value Value to convert\n * @param {Array} spacingSizes Array of the current spacing preset objects\n *\n * @return {string} The preset value if it can be found.\n */\nexport function getPresetValueFromCustomValue( value, spacingSizes ) {\n\t// Return value as-is if it is undefined or is already a preset, or '0';\n\tif ( ! value || isValueSpacingPreset( value ) || value === '0' ) {\n\t\treturn value;\n\t}\n\n\tconst spacingMatch = spacingSizes.find(\n\t\t( size ) => String( size.size ) === String( value )\n\t);\n\n\tif ( spacingMatch?.slug ) {\n\t\treturn `var:preset|spacing|${ spacingMatch.slug }`;\n\t}\n\n\treturn value;\n}\n\n/**\n * Converts a spacing preset into a custom value.\n *\n * @param {string} value Value to convert.\n *\n * @return {string | undefined} CSS var string for given spacing preset value.\n */\nexport function getSpacingPresetCssVar( value ) {\n\tif ( ! value ) {\n\t\treturn;\n\t}\n\n\tconst slug = value.match( /var:preset\\|spacing\\|(.+)/ );\n\n\tif ( ! slug ) {\n\t\treturn value;\n\t}\n\n\treturn `var(--wp--preset--spacing--${ slug[ 1 ] })`;\n}\n\n/**\n * Returns the slug section of the given spacing preset string.\n *\n * @param {string} value Value to extract slug from.\n *\n * @return {string|undefined} The int value of the slug from given spacing preset.\n */\nexport function getSpacingPresetSlug( value ) {\n\tif ( ! value ) {\n\t\treturn;\n\t}\n\n\tif ( value === '0' || value === 'default' ) {\n\t\treturn value;\n\t}\n\n\tconst slug = value.match( /var:preset\\|spacing\\|(.+)/ );\n\n\treturn slug ? slug[ 1 ] : undefined;\n}\n\n/**\n * Converts spacing preset value into a Range component value .\n *\n * @param {string} presetValue Value to convert to Range value.\n * @param {Array} spacingSizes Array of current spacing preset value objects.\n *\n * @return {number} The int value for use in Range control.\n */\nexport function getSliderValueFromPreset( presetValue, spacingSizes ) {\n\tif ( presetValue === undefined ) {\n\t\treturn 0;\n\t}\n\tconst slug =\n\t\tparseFloat( presetValue, 10 ) === 0\n\t\t\t? '0'\n\t\t\t: getSpacingPresetSlug( presetValue );\n\tconst sliderValue = spacingSizes.findIndex( ( spacingSize ) => {\n\t\treturn String( spacingSize.slug ) === slug;\n\t} );\n\n\t// Returning NaN rather than undefined as undefined makes range control thumb sit in center\n\treturn sliderValue !== -1 ? sliderValue : NaN;\n}\n\n/**\n * Gets an items with the most occurrence within an array\n * https://stackoverflow.com/a/20762713\n *\n * @param {Array<any>} arr Array of items to check.\n * @return {any} The item with the most occurrences.\n */\nfunction mode( arr ) {\n\treturn arr\n\t\t.sort(\n\t\t\t( a, b ) =>\n\t\t\t\tarr.filter( ( v ) => v === a ).length -\n\t\t\t\tarr.filter( ( v ) => v === b ).length\n\t\t)\n\t\t.pop();\n}\n\n/**\n * Gets the 'all' input value from values data.\n *\n * @param {Object} values Box spacing values\n *\n * @return {string} The most common value from all sides of box.\n */\nexport function getAllRawValue( values = {} ) {\n\treturn mode( Object.values( values ) );\n}\n\n/**\n * Checks to determine if values are mixed.\n *\n * @param {Object} values Box values.\n * @param {Array} sides Sides that values relate to.\n *\n * @return {boolean} Whether values are mixed.\n */\nexport function isValuesMixed( values = {}, sides = ALL_SIDES ) {\n\treturn (\n\t\t( Object.values( values ).length >= 1 &&\n\t\t\tObject.values( values ).length < sides.length ) ||\n\t\tnew Set( Object.values( values ) ).size > 1\n\t);\n}\n\n/**\n * Checks to determine if values are defined.\n *\n * @param {Object} values Box values.\n *\n * @return {boolean} Whether values are defined.\n */\nexport function isValuesDefined( values ) {\n\tif ( values === undefined || values === null ) {\n\t\treturn false;\n\t}\n\treturn Object.values( values ).filter( ( value ) => !! value ).length > 0;\n}\n\n/**\n * Determines whether a particular axis has support. If no axis is\n * specified, this function checks if either axis is supported.\n *\n * @param {Array} sides Supported sides.\n * @param {string} axis Which axis to check.\n *\n * @return {boolean} Whether there is support for the specified axis or both axes.\n */\nexport function hasAxisSupport( sides, axis ) {\n\tif ( ! sides || ! sides.length ) {\n\t\treturn false;\n\t}\n\n\tconst hasHorizontalSupport =\n\t\tsides.includes( 'horizontal' ) ||\n\t\t( sides.includes( 'left' ) && sides.includes( 'right' ) );\n\n\tconst hasVerticalSupport =\n\t\tsides.includes( 'vertical' ) ||\n\t\t( sides.includes( 'top' ) && sides.includes( 'bottom' ) );\n\n\tif ( axis === 'horizontal' ) {\n\t\treturn hasHorizontalSupport;\n\t}\n\n\tif ( axis === 'vertical' ) {\n\t\treturn hasVerticalSupport;\n\t}\n\n\treturn hasHorizontalSupport || hasVerticalSupport;\n}\n\n/**\n * Determines which menu options should be included in the SidePicker.\n *\n * @param {Array} sides Supported sides.\n *\n * @return {Object} Menu options with each option containing label & icon.\n */\nexport function getSupportedMenuItems( sides ) {\n\tif ( ! sides || ! sides.length ) {\n\t\treturn {};\n\t}\n\n\tconst menuItems = {};\n\n\t// Determine the primary \"side\" menu options.\n\tconst hasHorizontalSupport = hasAxisSupport( sides, 'horizontal' );\n\tconst hasVerticalSupport = hasAxisSupport( sides, 'vertical' );\n\n\tif ( hasHorizontalSupport && hasVerticalSupport ) {\n\t\tmenuItems.axial = { label: LABELS.axial, icon: ICONS.axial };\n\t} else if ( hasHorizontalSupport ) {\n\t\tmenuItems.axial = { label: LABELS.horizontal, icon: ICONS.horizontal };\n\t} else if ( hasVerticalSupport ) {\n\t\tmenuItems.axial = { label: LABELS.vertical, icon: ICONS.vertical };\n\t}\n\n\t// Track whether we have any individual sides so we can omit the custom\n\t// option if required.\n\tlet numberOfIndividualSides = 0;\n\n\tALL_SIDES.forEach( ( side ) => {\n\t\tif ( sides.includes( side ) ) {\n\t\t\tnumberOfIndividualSides += 1;\n\t\t\tmenuItems[ side ] = {\n\t\t\t\tlabel: LABELS[ side ],\n\t\t\t\ticon: ICONS[ side ],\n\t\t\t};\n\t\t}\n\t} );\n\n\t// Add custom item if there are enough sides to warrant a separated view.\n\tif ( numberOfIndividualSides > 1 ) {\n\t\tmenuItems.custom = { label: LABELS.custom, icon: ICONS.custom };\n\t}\n\n\treturn menuItems;\n}\n\n/**\n * Checks if the supported sides are balanced for each axis.\n * - Horizontal - both left and right sides are supported.\n * - Vertical - both top and bottom are supported.\n *\n * @param {Array} sides The supported sides which may be axes as well.\n *\n * @return {boolean} Whether or not the supported sides are balanced.\n */\nexport function hasBalancedSidesSupport( sides = [] ) {\n\tconst counts = { top: 0, right: 0, bottom: 0, left: 0 };\n\tsides.forEach( ( side ) => ( counts[ side ] += 1 ) );\n\n\treturn (\n\t\t( counts.top + counts.bottom ) % 2 === 0 &&\n\t\t( counts.left + counts.right ) % 2 === 0\n\t);\n}\n\n/**\n * Determines which view the SpacingSizesControl should default to on its\n * first render; Axial, Custom, or Single side.\n *\n * @param {Object} values Current side values.\n * @param {Array} sides Supported sides.\n *\n * @return {string} View to display.\n */\nexport function getInitialView( values = {}, sides ) {\n\tconst { top, right, bottom, left } = values;\n\tconst sideValues = [ top, right, bottom, left ].filter( Boolean );\n\n\t// Axial ( Horizontal & vertical ).\n\t// - Has axial side support\n\t// - Has axial side values which match\n\t// - Has no values and the supported sides are balanced\n\tconst hasMatchingAxialValues =\n\t\ttop === bottom && left === right && ( !! top || !! left );\n\tconst hasNoValuesAndBalancedSides =\n\t\t! sideValues.length && hasBalancedSidesSupport( sides );\n\n\tif (\n\t\thasAxisSupport( sides ) &&\n\t\t( hasMatchingAxialValues || hasNoValuesAndBalancedSides )\n\t) {\n\t\treturn VIEWS.axial;\n\t}\n\n\t// Single side.\n\t// - Ensure the side returned is the first side that has a value.\n\tif ( sideValues.length === 1 ) {\n\t\tlet side;\n\n\t\tObject.entries( values ).some( ( [ key, value ] ) => {\n\t\t\tside = key;\n\t\t\treturn value !== undefined;\n\t\t} );\n\n\t\treturn side;\n\t}\n\n\t// Only single side supported and no value defined.\n\tif ( sides?.length === 1 && ! sideValues.length ) {\n\t\treturn sides[ 0 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AK,CAAE,CAAC,CAAE;EAClB;;EAEA;EACA,OAAOnC,KAAK,CAACf,MAAM;AACpB"}
1
+ {"version":3,"names":["_i18n","require","_icons","ALL_SIDES","exports","DEFAULT_VALUES","top","undefined","right","bottom","left","ICONS","custom","sidesAll","axial","horizontal","sidesHorizontal","vertical","sidesVertical","sidesTop","sidesRight","sidesBottom","sidesLeft","LABELS","default","__","mixed","VIEWS","isValueSpacingPreset","value","includes","getCustomValueFromPreset","spacingSizes","slug","getSpacingPresetSlug","spacingSize","find","size","String","getPresetValueFromCustomValue","spacingMatch","getSpacingPresetCssVar","match","getSliderValueFromPreset","presetValue","parseFloat","sliderValue","findIndex","NaN","mode","arr","sort","a","b","filter","v","length","pop","getAllRawValue","values","Object","isValuesMixed","sides","Set","isValuesDefined","hasAxisSupport","axis","hasHorizontalSupport","hasVerticalSupport","getSupportedMenuItems","menuItems","label","icon","numberOfIndividualSides","forEach","side","hasBalancedSidesSupport","counts","getInitialView","sideValues","Boolean","hasMatchingAxialValues","hasNoValuesAndBalancedSides","entries","some","key"],"sources":["@wordpress/block-editor/src/components/spacing-sizes-control/utils.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tsidesAll,\n\tsidesBottom,\n\tsidesHorizontal,\n\tsidesLeft,\n\tsidesRight,\n\tsidesTop,\n\tsidesVertical,\n} from '@wordpress/icons';\n\nexport const ALL_SIDES = [ 'top', 'right', 'bottom', 'left' ];\n\nexport const DEFAULT_VALUES = {\n\ttop: undefined,\n\tright: undefined,\n\tbottom: undefined,\n\tleft: undefined,\n};\n\nexport const ICONS = {\n\tcustom: sidesAll,\n\taxial: sidesAll,\n\thorizontal: sidesHorizontal,\n\tvertical: sidesVertical,\n\ttop: sidesTop,\n\tright: sidesRight,\n\tbottom: sidesBottom,\n\tleft: sidesLeft,\n};\n\nexport const LABELS = {\n\tdefault: __( 'Spacing control' ),\n\ttop: __( 'Top' ),\n\tbottom: __( 'Bottom' ),\n\tleft: __( 'Left' ),\n\tright: __( 'Right' ),\n\tmixed: __( 'Mixed' ),\n\tvertical: __( 'Vertical' ),\n\thorizontal: __( 'Horizontal' ),\n\taxial: __( 'Horizontal & vertical' ),\n\tcustom: __( 'Custom' ),\n};\n\nexport const VIEWS = {\n\taxial: 'axial',\n\ttop: 'top',\n\tright: 'right',\n\tbottom: 'bottom',\n\tleft: 'left',\n\tcustom: 'custom',\n};\n\n/**\n * Checks is given value is a spacing preset.\n *\n * @param {string} value Value to check\n *\n * @return {boolean} Return true if value is string in format var:preset|spacing|.\n */\nexport function isValueSpacingPreset( value ) {\n\tif ( ! value?.includes ) {\n\t\treturn false;\n\t}\n\treturn value === '0' || value.includes( 'var:preset|spacing|' );\n}\n\n/**\n * Converts a spacing preset into a custom value.\n *\n * @param {string} value Value to convert\n * @param {Array} spacingSizes Array of the current spacing preset objects\n *\n * @return {string} Mapping of the spacing preset to its equivalent custom value.\n */\nexport function getCustomValueFromPreset( value, spacingSizes ) {\n\tif ( ! isValueSpacingPreset( value ) ) {\n\t\treturn value;\n\t}\n\n\tconst slug = getSpacingPresetSlug( value );\n\tconst spacingSize = spacingSizes.find(\n\t\t( size ) => String( size.slug ) === slug\n\t);\n\n\treturn spacingSize?.size;\n}\n\n/**\n * Converts a custom value to preset value if one can be found.\n *\n * Returns value as-is if no match is found.\n *\n * @param {string} value Value to convert\n * @param {Array} spacingSizes Array of the current spacing preset objects\n *\n * @return {string} The preset value if it can be found.\n */\nexport function getPresetValueFromCustomValue( value, spacingSizes ) {\n\t// Return value as-is if it is undefined or is already a preset, or '0';\n\tif ( ! value || isValueSpacingPreset( value ) || value === '0' ) {\n\t\treturn value;\n\t}\n\n\tconst spacingMatch = spacingSizes.find(\n\t\t( size ) => String( size.size ) === String( value )\n\t);\n\n\tif ( spacingMatch?.slug ) {\n\t\treturn `var:preset|spacing|${ spacingMatch.slug }`;\n\t}\n\n\treturn value;\n}\n\n/**\n * Converts a spacing preset into a custom value.\n *\n * @param {string} value Value to convert.\n *\n * @return {string | undefined} CSS var string for given spacing preset value.\n */\nexport function getSpacingPresetCssVar( value ) {\n\tif ( ! value ) {\n\t\treturn;\n\t}\n\n\tconst slug = value.match( /var:preset\\|spacing\\|(.+)/ );\n\n\tif ( ! slug ) {\n\t\treturn value;\n\t}\n\n\treturn `var(--wp--preset--spacing--${ slug[ 1 ] })`;\n}\n\n/**\n * Returns the slug section of the given spacing preset string.\n *\n * @param {string} value Value to extract slug from.\n *\n * @return {string|undefined} The int value of the slug from given spacing preset.\n */\nexport function getSpacingPresetSlug( value ) {\n\tif ( ! value ) {\n\t\treturn;\n\t}\n\n\tif ( value === '0' || value === 'default' ) {\n\t\treturn value;\n\t}\n\n\tconst slug = value.match( /var:preset\\|spacing\\|(.+)/ );\n\n\treturn slug ? slug[ 1 ] : undefined;\n}\n\n/**\n * Converts spacing preset value into a Range component value .\n *\n * @param {string} presetValue Value to convert to Range value.\n * @param {Array} spacingSizes Array of current spacing preset value objects.\n *\n * @return {number} The int value for use in Range control.\n */\nexport function getSliderValueFromPreset( presetValue, spacingSizes ) {\n\tif ( presetValue === undefined ) {\n\t\treturn 0;\n\t}\n\tconst slug =\n\t\tparseFloat( presetValue, 10 ) === 0\n\t\t\t? '0'\n\t\t\t: getSpacingPresetSlug( presetValue );\n\tconst sliderValue = spacingSizes.findIndex( ( spacingSize ) => {\n\t\treturn String( spacingSize.slug ) === slug;\n\t} );\n\n\t// Returning NaN rather than undefined as undefined makes range control thumb sit in center\n\treturn sliderValue !== -1 ? sliderValue : NaN;\n}\n\n/**\n * Gets an items with the most occurrence within an array\n * https://stackoverflow.com/a/20762713\n *\n * @param {Array<any>} arr Array of items to check.\n * @return {any} The item with the most occurrences.\n */\nfunction mode( arr ) {\n\treturn arr\n\t\t.sort(\n\t\t\t( a, b ) =>\n\t\t\t\tarr.filter( ( v ) => v === a ).length -\n\t\t\t\tarr.filter( ( v ) => v === b ).length\n\t\t)\n\t\t.pop();\n}\n\n/**\n * Gets the 'all' input value from values data.\n *\n * @param {Object} values Box spacing values\n *\n * @return {string} The most common value from all sides of box.\n */\nexport function getAllRawValue( values = {} ) {\n\treturn mode( Object.values( values ) );\n}\n\n/**\n * Checks to determine if values are mixed.\n *\n * @param {Object} values Box values.\n * @param {Array} sides Sides that values relate to.\n *\n * @return {boolean} Whether values are mixed.\n */\nexport function isValuesMixed( values = {}, sides = ALL_SIDES ) {\n\treturn (\n\t\t( Object.values( values ).length >= 1 &&\n\t\t\tObject.values( values ).length < sides.length ) ||\n\t\tnew Set( Object.values( values ) ).size > 1\n\t);\n}\n\n/**\n * Checks to determine if values are defined.\n *\n * @param {Object} values Box values.\n *\n * @return {boolean} Whether values are defined.\n */\nexport function isValuesDefined( values ) {\n\tif ( values === undefined || values === null ) {\n\t\treturn false;\n\t}\n\treturn Object.values( values ).filter( ( value ) => !! value ).length > 0;\n}\n\n/**\n * Determines whether a particular axis has support. If no axis is\n * specified, this function checks if either axis is supported.\n *\n * @param {Array} sides Supported sides.\n * @param {string} axis Which axis to check.\n *\n * @return {boolean} Whether there is support for the specified axis or both axes.\n */\nexport function hasAxisSupport( sides, axis ) {\n\tif ( ! sides || ! sides.length ) {\n\t\treturn false;\n\t}\n\n\tconst hasHorizontalSupport =\n\t\tsides.includes( 'horizontal' ) ||\n\t\t( sides.includes( 'left' ) && sides.includes( 'right' ) );\n\n\tconst hasVerticalSupport =\n\t\tsides.includes( 'vertical' ) ||\n\t\t( sides.includes( 'top' ) && sides.includes( 'bottom' ) );\n\n\tif ( axis === 'horizontal' ) {\n\t\treturn hasHorizontalSupport;\n\t}\n\n\tif ( axis === 'vertical' ) {\n\t\treturn hasVerticalSupport;\n\t}\n\n\treturn hasHorizontalSupport || hasVerticalSupport;\n}\n\n/**\n * Determines which menu options should be included in the SidePicker.\n *\n * @param {Array} sides Supported sides.\n *\n * @return {Object} Menu options with each option containing label & icon.\n */\nexport function getSupportedMenuItems( sides ) {\n\tif ( ! sides || ! sides.length ) {\n\t\treturn {};\n\t}\n\n\tconst menuItems = {};\n\n\t// Determine the primary \"side\" menu options.\n\tconst hasHorizontalSupport = hasAxisSupport( sides, 'horizontal' );\n\tconst hasVerticalSupport = hasAxisSupport( sides, 'vertical' );\n\n\tif ( hasHorizontalSupport && hasVerticalSupport ) {\n\t\tmenuItems.axial = { label: LABELS.axial, icon: ICONS.axial };\n\t} else if ( hasHorizontalSupport ) {\n\t\tmenuItems.axial = { label: LABELS.horizontal, icon: ICONS.horizontal };\n\t} else if ( hasVerticalSupport ) {\n\t\tmenuItems.axial = { label: LABELS.vertical, icon: ICONS.vertical };\n\t}\n\n\t// Track whether we have any individual sides so we can omit the custom\n\t// option if required.\n\tlet numberOfIndividualSides = 0;\n\n\tALL_SIDES.forEach( ( side ) => {\n\t\tif ( sides.includes( side ) ) {\n\t\t\tnumberOfIndividualSides += 1;\n\t\t\tmenuItems[ side ] = {\n\t\t\t\tlabel: LABELS[ side ],\n\t\t\t\ticon: ICONS[ side ],\n\t\t\t};\n\t\t}\n\t} );\n\n\t// Add custom item if there are enough sides to warrant a separated view.\n\tif ( numberOfIndividualSides > 1 ) {\n\t\tmenuItems.custom = { label: LABELS.custom, icon: ICONS.custom };\n\t}\n\n\treturn menuItems;\n}\n\n/**\n * Checks if the supported sides are balanced for each axis.\n * - Horizontal - both left and right sides are supported.\n * - Vertical - both top and bottom are supported.\n *\n * @param {Array} sides The supported sides which may be axes as well.\n *\n * @return {boolean} Whether or not the supported sides are balanced.\n */\nexport function hasBalancedSidesSupport( sides = [] ) {\n\tconst counts = { top: 0, right: 0, bottom: 0, left: 0 };\n\tsides.forEach( ( side ) => ( counts[ side ] += 1 ) );\n\n\treturn (\n\t\t( counts.top + counts.bottom ) % 2 === 0 &&\n\t\t( counts.left + counts.right ) % 2 === 0\n\t);\n}\n\n/**\n * Determines which view the SpacingSizesControl should default to on its\n * first render; Axial, Custom, or Single side.\n *\n * @param {Object} values Current side values.\n * @param {Array} sides Supported sides.\n *\n * @return {string} View to display.\n */\nexport function getInitialView( values = {}, sides ) {\n\tconst { top, right, bottom, left } = values;\n\tconst sideValues = [ top, right, bottom, left ].filter( Boolean );\n\n\t// Axial ( Horizontal & vertical ).\n\t// - Has axial side support\n\t// - Has axial side values which match\n\t// - Has no values and the supported sides are balanced\n\tconst hasMatchingAxialValues =\n\t\ttop === bottom && left === right && ( !! top || !! left );\n\tconst hasNoValuesAndBalancedSides =\n\t\t! sideValues.length && hasBalancedSidesSupport( sides );\n\n\tif (\n\t\thasAxisSupport( sides ) &&\n\t\t( hasMatchingAxialValues || hasNoValuesAndBalancedSides )\n\t) {\n\t\treturn VIEWS.axial;\n\t}\n\n\t// Single side.\n\t// - Ensure the side returned is the first side that has a value.\n\tif ( sideValues.length === 1 ) {\n\t\tlet side;\n\n\t\tObject.entries( values ).some( ( [ key, value ] ) => {\n\t\t\tside = key;\n\t\t\treturn value !== undefined;\n\t\t} );\n\n\t\treturn side;\n\t}\n\n\t// Only single side supported and no value defined.\n\tif ( sides?.length === 1 && ! sideValues.length ) {\n\t\treturn sides[ 0 ];\n\t}\n\n\t// Default to the Custom (separated sides) view.\n\treturn VIEWS.custom;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAJA;AACA;AACA;;AAYO,MAAME,SAAS,GAAAC,OAAA,CAAAD,SAAA,GAAG,CAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,CAAE;AAEtD,MAAME,cAAc,GAAAD,OAAA,CAAAC,cAAA,GAAG;EAC7BC,GAAG,EAAEC,SAAS;EACdC,KAAK,EAAED,SAAS;EAChBE,MAAM,EAAEF,SAAS;EACjBG,IAAI,EAAEH;AACP,CAAC;AAEM,MAAMI,KAAK,GAAAP,OAAA,CAAAO,KAAA,GAAG;EACpBC,MAAM,EAAEC,eAAQ;EAChBC,KAAK,EAAED,eAAQ;EACfE,UAAU,EAAEC,sBAAe;EAC3BC,QAAQ,EAA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I,CAAC,CAAEI,IAAI,CAAE;EAC1D,MAAMwE,2BAA2B,GAChC,CAAEH,UAAU,CAACvB,MAAM,IAAIoB,uBAAuB,CAAEd,KAAM,CAAC;EAExD,IACCG,cAAc,CAAEH,KAAM,CAAC,KACrBmB,sBAAsB,IAAIC,2BAA2B,CAAE,EACxD;IACD,OAAOvD,KAAK,CAACb,KAAK;EACnB;;EAEA;EACA;EACA,IAAKiE,UAAU,CAACvB,MAAM,KAAK,CAAC,EAAG;IAC9B,IAAImB,IAAI;IAERf,MAAM,CAACuB,OAAO,CAAExB,MAAO,CAAC,CAACyB,IAAI,CAAE,CAAE,CAAEC,GAAG,EAAExD,KAAK,CAAE,KAAM;MACpD8C,IAAI,GAAGU,GAAG;MACV,OAAOxD,KAAK,KAAKtB,SAAS;IAC3B,CAAE,CAAC;IAEH,OAAOoE,IAAI;EACZ;;EAEA;EACA,IAAKb,KAAK,EAAEN,MAAM,KAAK,CAAC,IAAI,CAAEuB,UAAU,CAACvB,MAAM,EAAG;IACjD,OAAOM,KAAK,CAAE,CAAC,CAAE;EAClB;;EAEA;EACA,OAAOnC,KAAK,CAACf,MAAM;AACpB","ignoreList":[]}
@@ -0,0 +1,76 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = TextAlignmentControl;
8
+ var _react = require("react");
9
+ var _classnames = _interopRequireDefault(require("classnames"));
10
+ var _i18n = require("@wordpress/i18n");
11
+ var _icons = require("@wordpress/icons");
12
+ var _element = require("@wordpress/element");
13
+ var _segmentedTextControl = _interopRequireDefault(require("../segmented-text-control"));
14
+ /**
15
+ * External dependencies
16
+ */
17
+
18
+ /**
19
+ * WordPress dependencies
20
+ */
21
+
22
+ /**
23
+ * Internal dependencies
24
+ */
25
+
26
+ const TEXT_ALIGNMENT_OPTIONS = [{
27
+ label: (0, _i18n.__)('Align text left'),
28
+ value: 'left',
29
+ icon: _icons.alignLeft
30
+ }, {
31
+ label: (0, _i18n.__)('Align text center'),
32
+ value: 'center',
33
+ icon: _icons.alignCenter
34
+ }, {
35
+ label: (0, _i18n.__)('Align text right'),
36
+ value: 'right',
37
+ icon: _icons.alignRight
38
+ }, {
39
+ label: (0, _i18n.__)('Justify text'),
40
+ value: 'justify',
41
+ icon: _icons.alignJustify
42
+ }];
43
+ const DEFAULT_OPTIONS = ['left', 'center', 'right'];
44
+
45
+ /**
46
+ * Control to facilitate text alignment selections.
47
+ *
48
+ * @param {Object} props Component props.
49
+ * @param {string} props.className Class name to add to the control.
50
+ * @param {string} props.value Currently selected text alignment.
51
+ * @param {Function} props.onChange Handles change in text alignment selection.
52
+ * @param {string[]} props.options Array of text alignment options to display.
53
+ *
54
+ * @return {Element} Text alignment control.
55
+ */
56
+ function TextAlignmentControl({
57
+ className,
58
+ value,
59
+ onChange,
60
+ options = DEFAULT_OPTIONS
61
+ }) {
62
+ const validOptions = (0, _element.useMemo)(() => TEXT_ALIGNMENT_OPTIONS.filter(option => options.includes(option.value)), [options]);
63
+ if (!validOptions.length) {
64
+ return null;
65
+ }
66
+ return (0, _react.createElement)(_segmentedTextControl.default, {
67
+ label: (0, _i18n.__)('Text alignment'),
68
+ options: validOptions,
69
+ className: (0, _classnames.default)('block-editor-text-alignment-control', className),
70
+ value: value,
71
+ onChange: newValue => {
72
+ onChange(newValue === value ? undefined : newValue);
73
+ }
74
+ });
75
+ }
76
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_classnames","_interopRequireDefault","require","_i18n","_icons","_element","_segmentedTextControl","TEXT_ALIGNMENT_OPTIONS","label","__","value","icon","alignLeft","alignCenter","alignRight","alignJustify","DEFAULT_OPTIONS","TextAlignmentControl","className","onChange","options","validOptions","useMemo","filter","option","includes","length","_react","createElement","default","classnames","newValue","undefined"],"sources":["@wordpress/block-editor/src/components/text-alignment-control/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\talignLeft,\n\talignCenter,\n\talignRight,\n\talignJustify,\n} from '@wordpress/icons';\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport SegmentedTextControl from '../segmented-text-control';\n\nconst TEXT_ALIGNMENT_OPTIONS = [\n\t{\n\t\tlabel: __( 'Align text left' ),\n\t\tvalue: 'left',\n\t\ticon: alignLeft,\n\t},\n\t{\n\t\tlabel: __( 'Align text center' ),\n\t\tvalue: 'center',\n\t\ticon: alignCenter,\n\t},\n\t{\n\t\tlabel: __( 'Align text right' ),\n\t\tvalue: 'right',\n\t\ticon: alignRight,\n\t},\n\t{\n\t\tlabel: __( 'Justify text' ),\n\t\tvalue: 'justify',\n\t\ticon: alignJustify,\n\t},\n];\n\nconst DEFAULT_OPTIONS = [ 'left', 'center', 'right' ];\n\n/**\n * Control to facilitate text alignment selections.\n *\n * @param {Object} props Component props.\n * @param {string} props.className Class name to add to the control.\n * @param {string} props.value Currently selected text alignment.\n * @param {Function} props.onChange Handles change in text alignment selection.\n * @param {string[]} props.options Array of text alignment options to display.\n *\n * @return {Element} Text alignment control.\n */\nexport default function TextAlignmentControl( {\n\tclassName,\n\tvalue,\n\tonChange,\n\toptions = DEFAULT_OPTIONS,\n} ) {\n\tconst validOptions = useMemo(\n\t\t() =>\n\t\t\tTEXT_ALIGNMENT_OPTIONS.filter( ( option ) =>\n\t\t\t\toptions.includes( option.value )\n\t\t\t),\n\t\t[ options ]\n\t);\n\n\tif ( ! validOptions.length ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<SegmentedTextControl\n\t\t\tlabel={ __( 'Text alignment' ) }\n\t\t\toptions={ validOptions }\n\t\t\tclassName={ classnames(\n\t\t\t\t'block-editor-text-alignment-control',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\tvalue={ value }\n\t\t\tonChange={ ( newValue ) => {\n\t\t\t\ton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CAACK,MAAM,EAAG;IAC5B,OAAO,IAAI;EACZ;EAEA,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACtB,qBAAA,CAAAuB,OAAoB;IACpBrB,KAAK,EAAG,IAAAC,QAAE,EAAE,gBAAiB,CAAG;IAChCW,OAAO,EAAGC,YAAc;IACxBH,SAAS,EAAG,IAAAY,mBAAU,EACrB,qCAAqC,EACrCZ,SACD,CAAG;IACHR,KAAK,EAAGA,KAAO;IACfS,QAAQ,EAAKY,QAAQ,IAAM;MAC1BZ,QAAQ,CAAEY,QAAQ,KAAKrB,KAAK,GAAGsB,SAAS,GAAGD,QAAS,CAAC;IACtD;EAAG,CACH,CAAC;AAEJ","ignoreList":[]}
@@ -7,9 +7,9 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.default = TextDecorationControl;
8
8
  var _react = require("react");
9
9
  var _classnames = _interopRequireDefault(require("classnames"));
10
- var _components = require("@wordpress/components");
11
10
  var _icons = require("@wordpress/icons");
12
11
  var _i18n = require("@wordpress/i18n");
12
+ var _segmentedTextControl = _interopRequireDefault(require("../segmented-text-control"));
13
13
  /**
14
14
  * External dependencies
15
15
  */
@@ -18,16 +18,20 @@ var _i18n = require("@wordpress/i18n");
18
18
  * WordPress dependencies
19
19
  */
20
20
 
21
+ /**
22
+ * Internal dependencies
23
+ */
24
+
21
25
  const TEXT_DECORATIONS = [{
22
- name: (0, _i18n.__)('None'),
26
+ label: (0, _i18n.__)('None'),
23
27
  value: 'none',
24
28
  icon: _icons.reset
25
29
  }, {
26
- name: (0, _i18n.__)('Underline'),
30
+ label: (0, _i18n.__)('Underline'),
27
31
  value: 'underline',
28
32
  icon: _icons.formatUnderline
29
33
  }, {
30
- name: (0, _i18n.__)('Strikethrough'),
34
+ label: (0, _i18n.__)('Strikethrough'),
31
35
  value: 'line-through',
32
36
  icon: _icons.formatStrikethrough
33
37
  }];
@@ -35,10 +39,10 @@ const TEXT_DECORATIONS = [{
35
39
  /**
36
40
  * Control to facilitate text decoration selections.
37
41
  *
38
- * @param {Object} props Component props.
39
- * @param {string} props.value Currently selected text decoration.
40
- * @param {Function} props.onChange Handles change in text decoration selection.
41
- * @param {string} [props.className] Additional class name to apply.
42
+ * @param {Object} props Component props.
43
+ * @param {string} props.value Currently selected text decoration.
44
+ * @param {Function} props.onChange Handles change in text decoration selection.
45
+ * @param {string} props.className Additional class name to apply.
42
46
  *
43
47
  * @return {Element} Text decoration control.
44
48
  */
@@ -47,22 +51,14 @@ function TextDecorationControl({
47
51
  onChange,
48
52
  className
49
53
  }) {
50
- return (0, _react.createElement)("fieldset", {
51
- className: (0, _classnames.default)('block-editor-text-decoration-control', className)
52
- }, (0, _react.createElement)(_components.BaseControl.VisualLabel, {
53
- as: "legend"
54
- }, (0, _i18n.__)('Decoration')), (0, _react.createElement)("div", {
55
- className: "block-editor-text-decoration-control__buttons"
56
- }, TEXT_DECORATIONS.map(textDecoration => {
57
- return (0, _react.createElement)(_components.Button, {
58
- key: textDecoration.value,
59
- icon: textDecoration.icon,
60
- label: textDecoration.name,
61
- isPressed: textDecoration.value === value,
62
- onClick: () => {
63
- onChange(textDecoration.value === value ? undefined : textDecoration.value);
64
- }
65
- });
66
- })));
54
+ return (0, _react.createElement)(_segmentedTextControl.default, {
55
+ label: (0, _i18n.__)('Decoration'),
56
+ options: TEXT_DECORATIONS,
57
+ className: (0, _classnames.default)('block-editor-text-decoration-control', className),
58
+ value: value,
59
+ onChange: newValue => {
60
+ onChange(newValue === value ? undefined : newValue);
61
+ }
62
+ });
67
63
  }
68
64
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_classnames","_interopRequireDefault","require","_components","_icons","_i18n","TEXT_DECORATIONS","name","__","value","icon","reset","formatUnderline","formatStrikethrough","TextDecorationControl","onChange","className","_react","createElement","classnames","BaseControl","VisualLabel","as","map","textDecoration","Button","key","label","isPressed","onClick","undefined"],"sources":["@wordpress/block-editor/src/components/text-decoration-control/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { BaseControl, Button } from '@wordpress/components';\nimport { reset, formatStrikethrough, formatUnderline } from '@wordpress/icons';\nimport { __ } from '@wordpress/i18n';\n\nconst TEXT_DECORATIONS = [\n\t{\n\t\tname: __( 'None' ),\n\t\tvalue: 'none',\n\t\ticon: reset,\n\t},\n\t{\n\t\tname: __( 'Underline' ),\n\t\tvalue: 'underline',\n\t\ticon: formatUnderline,\n\t},\n\t{\n\t\tname: __( 'Strikethrough' ),\n\t\tvalue: 'line-through',\n\t\ticon: formatStrikethrough,\n\t},\n];\n\n/**\n * Control to facilitate text decoration selections.\n *\n * @param {Object} props Component props.\n * @param {string} props.value Currently selected text decoration.\n * @param {Function} props.onChange Handles change in text decoration selection.\n * @param {string} [props.className] Additional class name to apply.\n *\n * @return {Element} Text decoration control.\n */\nexport default function TextDecorationControl( {\n\tvalue,\n\tonChange,\n\tclassName,\n} ) {\n\treturn (\n\t\t<fieldset\n\t\t\tclassName={ classnames(\n\t\t\t\t'block-editor-text-decoration-control',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t>\n\t\t\t<BaseControl.VisualLabel as=\"legend\">\n\t\t\t\t{ __( 'Decoration' ) }\n\t\t\t</BaseControl.VisualLabel>\n\t\t\t<div className=\"block-editor-text-decoration-control__buttons\">\n\t\t\t\t{ TEXT_DECORATIONS.map( ( textDecoration ) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tkey={ textDecoration.value }\n\t\t\t\t\t\t\ticon={ textDecoration.icon }\n\t\t\t\t\t\t\tlabel={ textDecoration.name }\n\t\t\t\t\t\t\tisPressed={ textDecoration.value === value }\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tonChange(\n\t\t\t\t\t\t\t\t\ttextDecoration.value === value\n\t\t\t\t\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t\t\t\t\t: textDecoration.value\n\t\t\t\t\t\t\t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AAGF,cAAc,CAACf,KAAO;MAC5BC,IAAI,EAAGc,cAAc,CAACd,IAAM;MAC5BiB,KAAK,EAAGH,cAAc,CAACjB,IAAM;MAC7BqB,SAAS,EAAGJ,cAAc,CAACf,KAAK,KAAKA,KAAO;MAC5CoB,OAAO,EAAGA,CAAA,KAAM;QACfd,QAAQ,CACPS,cAAc,CAACf,KAAK,KAAKA,KAAK,GAC3BqB,SAAS,GACTN,cAAc,CAACf,KACnB,CAAC;MACF;IAAG,CACH,CAAC;EAEJ,CAAE,CACE,CACI,CAAC;AAEb"}
1
+ {"version":3,"names":["_classnames","_interopRequireDefault","require","_icons","_i18n","_segmentedTextControl","TEXT_DECORATIONS","label","__","value","icon","reset","formatUnderline","formatStrikethrough","TextDecorationControl","onChange","className","_react","createElement","default","options","classnames","newValue","undefined"],"sources":["@wordpress/block-editor/src/components/text-decoration-control/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { reset, formatStrikethrough, formatUnderline } from '@wordpress/icons';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport SegmentedTextControl from '../segmented-text-control';\n\nconst TEXT_DECORATIONS = [\n\t{\n\t\tlabel: __( 'None' ),\n\t\tvalue: 'none',\n\t\ticon: reset,\n\t},\n\t{\n\t\tlabel: __( 'Underline' ),\n\t\tvalue: 'underline',\n\t\ticon: formatUnderline,\n\t},\n\t{\n\t\tlabel: __( 'Strikethrough' ),\n\t\tvalue: 'line-through',\n\t\ticon: formatStrikethrough,\n\t},\n];\n\n/**\n * Control to facilitate text decoration selections.\n *\n * @param {Object} props Component props.\n * @param {string} props.value Currently selected text decoration.\n * @param {Function} props.onChange Handles change in text decoration selection.\n * @param {string} props.className Additional class name to apply.\n *\n * @return {Element} Text decoration control.\n */\nexport default function TextDecorationControl( {\n\tvalue,\n\tonChange,\n\tclassName,\n} ) {\n\treturn (\n\t\t<SegmentedTextControl\n\t\t\tlabel={ __( 'Decoration' ) }\n\t\t\toptions={ TEXT_DECORATIONS }\n\t\t\tclassName={ classnames(\n\t\t\t\t'block-editor-text-decoration-control',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\tvalue={ value }\n\t\t\tonChange={ ( newValue ) => {\n\t\t\t\tonChange( newValue === value ? undefined : newValue );\n\t\t\t} }\n\t\t/>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAKA,IAAAG,qBAAA,GAAAJ,sBAAA,CAAAC,OAAA;AAdA;AACA;AACA;;AAGA;AACA;AACA;;AAIA;AACA;AACA;;AAGA,MAAMI,gBAAgB,GAAG,CACxB;EACCC,KAAK,EAAE,IAAAC,QAAE,EAAE,MAAO,CAAC;EACnBC,KAAK,EAAE,MAAM;EACbC,IAAI,EAAEC;AACP,CAAC,EACD;EACCJ,KAAK,EAAE,IAAAC,QAAE,EAAE,WAAY,CAAC;EACxBC,KAAK,EAAE,WAAW;EAClBC,IAAI,EAAEE;AACP,CAAC,EACD;EACCL,KAAK,EAAE,IAAAC,QAAE,EAAE,eAAgB,CAAC;EAC5BC,KAAK,EAAE,cAAc;EACrBC,IAAI,EAAEG;AACP,CAAC,CACD;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASC,qBAAqBA,CAAE;EAC9CL,KAAK;EACLM,QAAQ;EACRC;AACD,CAAC,EAAG;EACH,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACb,qBAAA,CAAAc,OAAoB;IACpBZ,KAAK,EAAG,IAAAC,QAAE,EAAE,YAAa,CAAG;IAC5BY,OAAO,EAAGd,gBAAkB;IAC5BU,SAAS,EAAG,IAAAK,mBAAU,EACrB,sCAAsC,EACtCL,SACD,CAAG;IACHP,KAAK,EAAGA,KAAO;IACfM,QAAQ,EAAKO,QAAQ,IAAM;MAC1BP,QAAQ,CAAEO,QAAQ,KAAKb,KAAK,GAAGc,SAAS,GAAGD,QAAS,CAAC;IACtD;EAAG,CACH,CAAC;AAEJ","ignoreList":[]}
@@ -7,9 +7,9 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.default = TextTransformControl;
8
8
  var _react = require("react");
9
9
  var _classnames = _interopRequireDefault(require("classnames"));
10
- var _components = require("@wordpress/components");
11
10
  var _i18n = require("@wordpress/i18n");
12
11
  var _icons = require("@wordpress/icons");
12
+ var _segmentedTextControl = _interopRequireDefault(require("../segmented-text-control"));
13
13
  /**
14
14
  * External dependencies
15
15
  */
@@ -18,20 +18,24 @@ var _icons = require("@wordpress/icons");
18
18
  * WordPress dependencies
19
19
  */
20
20
 
21
+ /**
22
+ * Internal dependencies
23
+ */
24
+
21
25
  const TEXT_TRANSFORMS = [{
22
- name: (0, _i18n.__)('None'),
26
+ label: (0, _i18n.__)('None'),
23
27
  value: 'none',
24
28
  icon: _icons.reset
25
29
  }, {
26
- name: (0, _i18n.__)('Uppercase'),
30
+ label: (0, _i18n.__)('Uppercase'),
27
31
  value: 'uppercase',
28
32
  icon: _icons.formatUppercase
29
33
  }, {
30
- name: (0, _i18n.__)('Lowercase'),
34
+ label: (0, _i18n.__)('Lowercase'),
31
35
  value: 'lowercase',
32
36
  icon: _icons.formatLowercase
33
37
  }, {
34
- name: (0, _i18n.__)('Capitalize'),
38
+ label: (0, _i18n.__)('Capitalize'),
35
39
  value: 'capitalize',
36
40
  icon: _icons.formatCapitalize
37
41
  }];
@@ -51,22 +55,14 @@ function TextTransformControl({
51
55
  value,
52
56
  onChange
53
57
  }) {
54
- return (0, _react.createElement)("fieldset", {
55
- className: (0, _classnames.default)('block-editor-text-transform-control', className)
56
- }, (0, _react.createElement)(_components.BaseControl.VisualLabel, {
57
- as: "legend"
58
- }, (0, _i18n.__)('Letter case')), (0, _react.createElement)("div", {
59
- className: "block-editor-text-transform-control__buttons"
60
- }, TEXT_TRANSFORMS.map(textTransform => {
61
- return (0, _react.createElement)(_components.Button, {
62
- key: textTransform.value,
63
- icon: textTransform.icon,
64
- label: textTransform.name,
65
- isPressed: textTransform.value === value,
66
- onClick: () => {
67
- onChange(textTransform.value === value ? undefined : textTransform.value);
68
- }
69
- });
70
- })));
58
+ return (0, _react.createElement)(_segmentedTextControl.default, {
59
+ label: (0, _i18n.__)('Letter case'),
60
+ options: TEXT_TRANSFORMS,
61
+ className: (0, _classnames.default)('block-editor-text-transform-control', className),
62
+ value: value,
63
+ onChange: newValue => {
64
+ onChange(newValue === value ? undefined : newValue);
65
+ }
66
+ });
71
67
  }
72
68
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_classnames","_interopRequireDefault","require","_components","_i18n","_icons","TEXT_TRANSFORMS","name","__","value","icon","reset","formatUppercase","formatLowercase","formatCapitalize","TextTransformControl","className","onChange","_react","createElement","classnames","BaseControl","VisualLabel","as","map","textTransform","Button","key","label","isPressed","onClick","undefined"],"sources":["@wordpress/block-editor/src/components/text-transform-control/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { BaseControl, Button } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport {\n\treset,\n\tformatCapitalize,\n\tformatLowercase,\n\tformatUppercase,\n} from '@wordpress/icons';\n\nconst TEXT_TRANSFORMS = [\n\t{\n\t\tname: __( 'None' ),\n\t\tvalue: 'none',\n\t\ticon: reset,\n\t},\n\t{\n\t\tname: __( 'Uppercase' ),\n\t\tvalue: 'uppercase',\n\t\ticon: formatUppercase,\n\t},\n\t{\n\t\tname: __( 'Lowercase' ),\n\t\tvalue: 'lowercase',\n\t\ticon: formatLowercase,\n\t},\n\t{\n\t\tname: __( 'Capitalize' ),\n\t\tvalue: 'capitalize',\n\t\ticon: formatCapitalize,\n\t},\n];\n\n/**\n * Control to facilitate text transform selections.\n *\n * @param {Object} props Component props.\n * @param {string} props.className Class name to add to the control.\n * @param {string} props.value Currently selected text transform.\n * @param {Function} props.onChange Handles change in text transform selection.\n *\n * @return {Element} Text transform control.\n */\nexport default function TextTransformControl( { className, value, onChange } ) {\n\treturn (\n\t\t<fieldset\n\t\t\tclassName={ classnames(\n\t\t\t\t'block-editor-text-transform-control',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t>\n\t\t\t<BaseControl.VisualLabel as=\"legend\">\n\t\t\t\t{ __( 'Letter case' ) }\n\t\t\t</BaseControl.VisualLabel>\n\t\t\t<div className=\"block-editor-text-transform-control__buttons\">\n\t\t\t\t{ TEXT_TRANSFORMS.map( ( textTransform ) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tkey={ textTransform.value }\n\t\t\t\t\t\t\ticon={ textTransform.icon }\n\t\t\t\t\t\t\tlabel={ textTransform.name }\n\t\t\t\t\t\t\tisPressed={ textTransform.value === value }\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tonChange(\n\t\t\t\t\t\t\t\t\ttextTransform.value === value\n\t\t\t\t\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t\t\t\t\t: textTransform.value\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t/>\n\t\t\t\t\t);\n\t\t\t\t} ) }\n\t\t\t</div>\n\t\t</fieldset>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAVA;AACA;AACA;;AAGA;AACA;AACA;;AAUA,MAAMI,eAAe,GAAG,CACvB;EACCC,IAAI,EAAE,IAAAC,QAAE,EAAE,MAAO,CAAC;EAClBC,KAAK,EAAE,MAAM;EACbC,IAAI,EAAEC;AACP,CAAC,EACD;EACCJ,IAAI,EAAE,IAAAC,QAAE,EAAE,WA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_interopRequireDefault","require","_i18n","_icons","_segmentedTextControl","TEXT_TRANSFORMS","label","__","value","icon","reset","formatUppercase","formatLowercase","formatCapitalize","TextTransformControl","className","onChange","_react","createElement","default","options","classnames","newValue","undefined"],"sources":["@wordpress/block-editor/src/components/text-transform-control/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\treset,\n\tformatCapitalize,\n\tformatLowercase,\n\tformatUppercase,\n} from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport SegmentedTextControl from '../segmented-text-control';\n\nconst TEXT_TRANSFORMS = [\n\t{\n\t\tlabel: __( 'None' ),\n\t\tvalue: 'none',\n\t\ticon: reset,\n\t},\n\t{\n\t\tlabel: __( 'Uppercase' ),\n\t\tvalue: 'uppercase',\n\t\ticon: formatUppercase,\n\t},\n\t{\n\t\tlabel: __( 'Lowercase' ),\n\t\tvalue: 'lowercase',\n\t\ticon: formatLowercase,\n\t},\n\t{\n\t\tlabel: __( 'Capitalize' ),\n\t\tvalue: 'capitalize',\n\t\ticon: formatCapitalize,\n\t},\n];\n\n/**\n * Control to facilitate text transform selections.\n *\n * @param {Object} props Component props.\n * @param {string} props.className Class name to add to the control.\n * @param {string} props.value Currently selected text transform.\n * @param {Function} props.onChange Handles change in text transform selection.\n *\n * @return {Element} Text transform control.\n */\nexport default function TextTransformControl( { className, value, onChange } ) {\n\treturn (\n\t\t<SegmentedTextControl\n\t\t\tlabel={ __( 'Letter case' ) }\n\t\t\toptions={ TEXT_TRANSFORMS }\n\t\t\tclassName={ classnames(\n\t\t\t\t'block-editor-text-transform-control',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\tvalue={ value }\n\t\t\tonChange={ ( newValue ) => {\n\t\t\t\tonChange( newValue === value ? undefined : newValue );\n\t\t\t} }\n\t\t/>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAUA,IAAAG,qBAAA,GAAAJ,sBAAA,CAAAC,OAAA;AAnBA;AACA;AACA;;AAGA;AACA;AACA;;AASA;AACA;AACA;;AAGA,MAAMI,eAAe,GAAG,CACvB;EACCC,KAAK,EAAE,IAAAC,QAAE,EAAE,MAAO,CAAC;EACnBC,KAAK,EAAE,MAAM;EACbC,IAAI,EAAEC;AACP,CAAC,EACD;EACCJ,KAAK,EAAE,IAAAC,QAAE,EAAE,WAAY,CAAC;EACxBC,KAAK,EAAE,WAAW;EAClBC,IAAI,EAAEE;AACP,CAAC,EACD;EACCL,KAAK,EAAE,IAAAC,QAAE,EAAE,WAAY,CAAC;EACxBC,KAAK,EAAE,WAAW;EAClBC,IAAI,EAAEG;AACP,CAAC,EACD;EACCN,KAAK,EAAE,IAAAC,QAAE,EAAE,YAAa,CAAC;EACzBC,KAAK,EAAE,YAAY;EACnBC,IAAI,EAAEI;AACP,CAAC,CACD;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASC,oBAAoBA,CAAE;EAAEC,SAAS;EAAEP,KAAK;EAAEQ;AAAS,CAAC,EAAG;EAC9E,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACd,qBAAA,CAAAe,OAAoB;IACpBb,KAAK,EAAG,IAAAC,QAAE,EAAE,aAAc,CAAG;IAC7Ba,OAAO,EAAGf,eAAiB;IAC3BU,SAAS,EAAG,IAAAM,mBAAU,EACrB,qCAAqC,EACrCN,SACD,CAAG;IACHP,KAAK,EAAGA,KAAO;IACfQ,QAAQ,EAAKM,QAAQ,IAAM;MAC1BN,QAAQ,CAAEM,QAAQ,KAAKd,KAAK,GAAGe,SAAS,GAAGD,QAAS,CAAC;IACtD;EAAG,CACH,CAAC;AAEJ","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_components","require","_i18n","_data","_element","_icons","_store","selectIcon","_react","createElement","SVG","xmlns","width","height","viewBox","Path","d","ToolSelector","props","ref","mode","useSelect","select","blockEditorStore","__unstableGetEditorMode","__unstableSetEditorMode","useDispatch","Dropdown","renderToggle","isOpen","onToggle","Button","icon","editIcon","onClick","label","__","popoverProps","placement","renderContent","Fragment","NavigableMenu","role","MenuItemsChoice","value","onSelect","choices","Icon","className","_default","exports","default","forwardRef"],"sources":["@wordpress/block-editor/src/components/tool-selector/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tDropdown,\n\tButton,\n\tMenuItemsChoice,\n\tSVG,\n\tPath,\n\tNavigableMenu,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { forwardRef } from '@wordpress/element';\nimport { Icon, edit as editIcon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\n\nconst selectIcon = (\n\t<SVG\n\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\twidth=\"24\"\n\t\theight=\"24\"\n\t\tviewBox=\"0 0 24 24\"\n\t>\n\t\t<Path d=\"M9.4 20.5L5.2 3.8l14.6 9-2 .3c-.2 0-.4.1-.7.1-.9.2-1.6.3-2.2.5-.8.3-1.4.5-1.8.8-.4.3-.8.8-1.3 1.5-.4.5-.8 1.2-1.2 2l-.3.6-.9 1.9zM7.6 7.1l2.4 9.3c.2-.4.5-.8.7-1.1.6-.8 1.1-1.4 1.6-1.8.5-.4 1.3-.8 2.2-1.1l1.2-.3-8.1-5z\" />\n\t</SVG>\n);\n\nfunction ToolSelector( props, ref ) {\n\tconst mode = useSelect(\n\t\t( select ) => select( blockEditorStore ).__unstableGetEditorMode(),\n\t\t[]\n\t);\n\tconst { __unstableSetEditorMode } = useDispatch( blockEditorStore );\n\n\treturn (\n\t\t<Dropdown\n\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t<Button\n\t\t\t\t\t{ ...props }\n\t\t\t\t\tref={ ref }\n\t\t\t\t\ticon={ mode === 'navigation' ? selectIcon : editIcon }\n\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\taria-haspopup=\"true\"\n\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\t\t\tlabel={ __( 'Tools' ) }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\tpopoverProps={ { placement: 'bottom-start' } }\n\t\t\trenderContent={ () => (\n\t\t\t\t<>\n\t\t\t\t\t<NavigableMenu role=\"menu\" aria-label={ __( 'Tools' ) }>\n\t\t\t\t\t\t<MenuItemsChoice\n\t\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\t\tmode === 'navigation' ? 'navigation' : 'edit'\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tonSelect={ __unstableSetEditorMode }\n\t\t\t\t\t\t\tchoices={ [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tvalue: 'edit',\n\t\t\t\t\t\t\t\t\tlabel: (\n\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t<Icon icon={ editIcon } />\n\t\t\t\t\t\t\t\t\t\t\t{ __( 'Edit' ) }\n\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tvalue: 'navigation',\n\t\t\t\t\t\t\t\t\tlabel: (\n\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t{ selectIcon }\n\t\t\t\t\t\t\t\t\t\t\t{ __( 'Select' ) }\n\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t] }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</NavigableMenu>\n\t\t\t\t\t<div className=\"block-editor-tool-selector__help\">\n\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t'Tools provide different interactions for selecting, navigating, and editing blocks. Toggle between select and edit by pressing Escape and Enter.'\n\t\t\t\t\t\t) }\n\t\t\t\t\t</div>\n\t\t\t\t</>\n\t\t\t) }\n\t\t/>\n\t);\n}\n\nexport default forwardRef( ToolSelector );\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAQA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AAKA,IAAAK,MAAA,GAAAL,OAAA;AAnBA;AACA;AACA;;AAcA;AACA;AACA;;AAGA,MAAMM,UAAU,GACf,IAAAC,MAAA,CAAAC,aAAA,EAACT,WAAA,CAAAU,GAAG;EACHC,KAAK,EAAC,4BAA4B;EAClCC,KAAK,EAAC,IAAI;EACVC,MAAM,EAAC,IAAI;EACXC,OAAO,EAAC;AAAW,GAEnB,IAAAN,MAAA,CAAAC,aAAA,EAACT,WAAA,CAAAe,IAAI;EAACC,CAAC,EAAC;AAA2N,CAAE,CACjO,CACL;AAED,SAASC,YAAYA,CAAEC,KAAK,EAAEC,GAAG,EAAG;EACnC,MAAMC,IAAI,GAAG,IAAAC,eAAS,EACnBC,MAAM,IAAMA,MAAM,CAAEC,YAAiB,CAAC,CAACC,uBAAuB,CAAC,CAAC,EAClE,EACD,CAAC;EACD,MAAM;IAAEC;EAAwB,CAAC,GAAG,IAAAC,iBAAW,EAAEH,YAAiB,CAAC;EAEnE,OACC,IAAAf,MAAA,CAAAC,aAAA,EAACT,WAAA,CAAA2B,QAAQ;IACRC,YAAY,EAAGA,CAAE;MAAEC,MAAM;MAAEC;IAAS,CAAC,KACpC,IAAAtB,MAAA,CAAAC,aAAA,EAACT,WAAA,CAAA+B,MAAM;MAAA,GACDb,KAAK;MACVC,GAAG,EAAGA,GAAK;MACXa,IAAI,EAAGZ,IAAI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C,mBAAU,EAAEnC,YAAa,CAAC"}
1
+ {"version":3,"names":["_components","require","_i18n","_data","_element","_icons","_store","selectIcon","_react","createElement","SVG","xmlns","width","height","viewBox","Path","d","ToolSelector","props","ref","mode","useSelect","select","blockEditorStore","__unstableGetEditorMode","__unstableSetEditorMode","useDispatch","Dropdown","renderToggle","isOpen","onToggle","Button","icon","editIcon","onClick","label","__","popoverProps","placement","renderContent","Fragment","NavigableMenu","role","MenuItemsChoice","value","onSelect","choices","Icon","className","_default","exports","default","forwardRef"],"sources":["@wordpress/block-editor/src/components/tool-selector/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tDropdown,\n\tButton,\n\tMenuItemsChoice,\n\tSVG,\n\tPath,\n\tNavigableMenu,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { forwardRef } from '@wordpress/element';\nimport { Icon, edit as editIcon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\n\nconst selectIcon = (\n\t<SVG\n\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\twidth=\"24\"\n\t\theight=\"24\"\n\t\tviewBox=\"0 0 24 24\"\n\t>\n\t\t<Path d=\"M9.4 20.5L5.2 3.8l14.6 9-2 .3c-.2 0-.4.1-.7.1-.9.2-1.6.3-2.2.5-.8.3-1.4.5-1.8.8-.4.3-.8.8-1.3 1.5-.4.5-.8 1.2-1.2 2l-.3.6-.9 1.9zM7.6 7.1l2.4 9.3c.2-.4.5-.8.7-1.1.6-.8 1.1-1.4 1.6-1.8.5-.4 1.3-.8 2.2-1.1l1.2-.3-8.1-5z\" />\n\t</SVG>\n);\n\nfunction ToolSelector( props, ref ) {\n\tconst mode = useSelect(\n\t\t( select ) => select( blockEditorStore ).__unstableGetEditorMode(),\n\t\t[]\n\t);\n\tconst { __unstableSetEditorMode } = useDispatch( blockEditorStore );\n\n\treturn (\n\t\t<Dropdown\n\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t<Button\n\t\t\t\t\t{ ...props }\n\t\t\t\t\tref={ ref }\n\t\t\t\t\ticon={ mode === 'navigation' ? selectIcon : editIcon }\n\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\taria-haspopup=\"true\"\n\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\t\t\tlabel={ __( 'Tools' ) }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\tpopoverProps={ { placement: 'bottom-start' } }\n\t\t\trenderContent={ () => (\n\t\t\t\t<>\n\t\t\t\t\t<NavigableMenu role=\"menu\" aria-label={ __( 'Tools' ) }>\n\t\t\t\t\t\t<MenuItemsChoice\n\t\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\t\tmode === 'navigation' ? 'navigation' : 'edit'\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tonSelect={ __unstableSetEditorMode }\n\t\t\t\t\t\t\tchoices={ [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tvalue: 'edit',\n\t\t\t\t\t\t\t\t\tlabel: (\n\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t<Icon icon={ editIcon } />\n\t\t\t\t\t\t\t\t\t\t\t{ __( 'Edit' ) }\n\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tvalue: 'navigation',\n\t\t\t\t\t\t\t\t\tlabel: (\n\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t{ selectIcon }\n\t\t\t\t\t\t\t\t\t\t\t{ __( 'Select' ) }\n\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t] }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</NavigableMenu>\n\t\t\t\t\t<div className=\"block-editor-tool-selector__help\">\n\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t'Tools provide different interactions for selecting, navigating, and editing blocks. Toggle between select and edit by pressing Escape and Enter.'\n\t\t\t\t\t\t) }\n\t\t\t\t\t</div>\n\t\t\t\t</>\n\t\t\t) }\n\t\t/>\n\t);\n}\n\nexport default forwardRef( ToolSelector );\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAQA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AAKA,IAAAK,MAAA,GAAAL,OAAA;AAnBA;AACA;AACA;;AAcA;AACA;AACA;;AAGA,MAAMM,UAAU,GACf,IAAAC,MAAA,CAAAC,aAAA,EAACT,WAAA,CAAAU,GAAG;EACHC,KAAK,EAAC,4BAA4B;EAClCC,KAAK,EAAC,IAAI;EACVC,MAAM,EAAC,IAAI;EACXC,OAAO,EAAC;AAAW,GAEnB,IAAAN,MAAA,CAAAC,aAAA,EAACT,WAAA,CAAAe,IAAI;EAACC,CAAC,EAAC;AAA2N,CAAE,CACjO,CACL;AAED,SAASC,YAAYA,CAAEC,KAAK,EAAEC,GAAG,EAAG;EACnC,MAAMC,IAAI,GAAG,IAAAC,eAAS,EACnBC,MAAM,IAAMA,MAAM,CAAEC,YAAiB,CAAC,CAACC,uBAAuB,CAAC,CAAC,EAClE,EACD,CAAC;EACD,MAAM;IAAEC;EAAwB,CAAC,GAAG,IAAAC,iBAAW,EAAEH,YAAiB,CAAC;EAEnE,OACC,IAAAf,MAAA,CAAAC,aAAA,EAACT,WAAA,CAAA2B,QAAQ;IACRC,YAAY,EAAGA,CAAE;MAAEC,MAAM;MAAEC;IAAS,CAAC,KACpC,IAAAtB,MAAA,CAAAC,aAAA,EAACT,WAAA,CAAA+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A,CACH,CAAC;AAEJ;AAAC,IAAAa,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEc,IAAAC,mBAAU,EAAEnC,YAAa,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_compose","require","_dom","_data","_keycodes","_store","isIE","window","navigator","userAgent","indexOf","arrowKeyCodes","Set","UP","DOWN","LEFT","RIGHT","initialTriggerPercentage","useTypewriter","hasSelectedBlock","useSelect","select","blockEditorStore","useRefEffect","node","ownerDocument","defaultView","scrollResizeRafId","onKeyDownRafId","caretRect","onScrollResize","requestAnimationFrame","computeCaretRectangle","onKeyDown","event","cancelAnimationFrame","maintainCaretPosition","keyCode","isSelectionEligibleForScroll","currentCaretRect","computeCaretRect","has","diff","top","scrollContainer","getScrollContainer","windowScroll","body","documentElement","scrollY","scrollTop","scrollContainerY","getBoundingClientRect","relativeScrollPosition","innerHeight","isLastEditableNode","scrollContainerHeight","clientHeight","height","scrollBy","addSelectionChangeListener","addEventListener","computeCaretRectOnSelectionChange","removeEventListener","contains","activeElement","isContentEditable","editableNodes","querySelectorAll","lastEditableNode","length","Typewriter","children","_react","createElement","ref","className","TypewriterOrIEBypass","props","_default","exports","default"],"sources":["@wordpress/block-editor/src/components/typewriter/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useRefEffect } from '@wordpress/compose';\nimport { computeCaretRect, getScrollContainer } from '@wordpress/dom';\nimport { useSelect } from '@wordpress/data';\nimport { UP, DOWN, LEFT, RIGHT } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\n\nconst isIE = window.navigator.userAgent.indexOf( 'Trident' ) !== -1;\nconst arrowKeyCodes = new Set( [ UP, DOWN, LEFT, RIGHT ] );\nconst initialTriggerPercentage = 0.75;\n\nexport function useTypewriter() {\n\tconst hasSelectedBlock = useSelect(\n\t\t( select ) => select( blockEditorStore ).hasSelectedBlock(),\n\t\t[]\n\t);\n\n\treturn useRefEffect(\n\t\t( node ) => {\n\t\t\tif ( ! hasSelectedBlock ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst { ownerDocument } = node;\n\t\t\tconst { defaultView } = ownerDocument;\n\n\t\t\tlet scrollResizeRafId;\n\t\t\tlet onKeyDownRafId;\n\n\t\t\tlet caretRect;\n\n\t\t\tfunction onScrollResize() {\n\t\t\t\tif ( scrollResizeRafId ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tscrollResizeRafId = defaultView.requestAnimationFrame( () => {\n\t\t\t\t\tcomputeCaretRectangle();\n\t\t\t\t\tscrollResizeRafId = null;\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tfunction onKeyDown( event ) {\n\t\t\t\t// Ensure the any remaining request is cancelled.\n\t\t\t\tif ( onKeyDownRafId ) {\n\t\t\t\t\tdefaultView.cancelAnimationFrame( onKeyDownRafId );\n\t\t\t\t}\n\n\t\t\t\t// Use an animation frame for a smooth result.\n\t\t\t\tonKeyDownRafId = defaultView.requestAnimationFrame( () => {\n\t\t\t\t\tmaintainCaretPosition( event );\n\t\t\t\t\tonKeyDownRafId = null;\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Maintains the scroll position after a selection change caused by a\n\t\t\t * keyboard event.\n\t\t\t *\n\t\t\t * @param {KeyboardEvent} event Keyboard event.\n\t\t\t */\n\t\t\tfunction maintainCaretPosition( { keyCode } ) {\n\t\t\t\tif ( ! isSelectionEligibleForScroll() ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst currentCaretRect = computeCaretRect( defaultView );\n\n\t\t\t\tif ( ! currentCaretRect ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// If for some reason there is no position set to be scrolled to, let\n\t\t\t\t// this be the position to be scrolled to in the future.\n\t\t\t\tif ( ! caretRect ) {\n\t\t\t\t\tcaretRect = currentCaretRect;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Even though enabling the typewriter effect for arrow keys results in\n\t\t\t\t// a pleasant experience, it may not be the case for everyone, so, for\n\t\t\t\t// now, let's disable it.\n\t\t\t\tif ( arrowKeyCodes.has( keyCode ) ) {\n\t\t\t\t\t// Reset the caret position to maintain.\n\t\t\t\t\tcaretRect = currentCaretRect;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst diff = currentCaretRect.top - caretRect.top;\n\n\t\t\t\tif ( diff === 0 ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst scrollContainer = getScrollContainer( node );\n\n\t\t\t\t// The page must be scrollable.\n\t\t\t\tif ( ! scrollContainer ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst windowScroll =\n\t\t\t\t\tscrollContainer === ownerDocument.body ||\n\t\t\t\t\tscrollContainer === ownerDocument.documentElement;\n\t\t\t\tconst scrollY = windowScroll\n\t\t\t\t\t? defaultView.scrollY\n\t\t\t\t\t: scrollContainer.scrollTop;\n\t\t\t\tconst scrollContainerY = windowScroll\n\t\t\t\t\t? 0\n\t\t\t\t\t: scrollContainer.getBoundingClientRect().top;\n\t\t\t\tconst relativeScrollPosition = windowScroll\n\t\t\t\t\t? caretRect.top / defaultView.innerHeight\n\t\t\t\t\t: ( caretRect.top - scrollContainerY ) /\n\t\t\t\t\t ( defaultView.innerHeight - scrollContainerY );\n\n\t\t\t\t// If the scroll position is at the start, the active editable element\n\t\t\t\t// is the last one, and the caret is positioned within the initial\n\t\t\t\t// trigger percentage of the page, do not scroll the page.\n\t\t\t\t// The typewriter effect should not kick in until an empty page has been\n\t\t\t\t// filled with the initial trigger percentage or the user scrolls\n\t\t\t\t// intentionally down.\n\t\t\t\tif (\n\t\t\t\t\tscrollY === 0 &&\n\t\t\t\t\trelativeScrollPosition < initialTriggerPercentage &&\n\t\t\t\t\tisLastEditableNode()\n\t\t\t\t) {\n\t\t\t\t\t// Reset the caret position to maintain.\n\t\t\t\t\tcaretRect = currentCaretRect;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst scrollContainerHeight = windowScroll\n\t\t\t\t\t? defaultView.innerHeight\n\t\t\t\t\t: scrollContainer.clientHeight;\n\n\t\t\t\t// Abort if the target scroll position would scroll the caret out of\n\t\t\t\t// view.\n\t\t\t\tif (\n\t\t\t\t\t// The caret is under the lower fold.\n\t\t\t\t\tcaretRect.top + caretRect.height >\n\t\t\t\t\t\tscrollContainerY + scrollContainerHeight ||\n\t\t\t\t\t// The caret is above the upper fold.\n\t\t\t\t\tcaretRect.top < scrollContainerY\n\t\t\t\t) {\n\t\t\t\t\t// Reset the caret position to maintain.\n\t\t\t\t\tcaretRect = currentCaretRect;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( windowScroll ) {\n\t\t\t\t\tdefaultView.scrollBy( 0, diff );\n\t\t\t\t} else {\n\t\t\t\t\tscrollContainer.scrollTop += diff;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Adds a `selectionchange` listener to reset the scroll position to be\n\t\t\t * maintained.\n\t\t\t */\n\t\t\tfunction addSelectionChangeListener() {\n\t\t\t\townerDocument.addEventListener(\n\t\t\t\t\t'selectionchange',\n\t\t\t\t\tcomputeCaretRectOnSelectionChange\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Resets the scroll position to be maintained during a `selectionchange`\n\t\t\t * event. Also removes the listener, so it acts as a one-time listener.\n\t\t\t */\n\t\t\tfunction computeCaretRectOnSelectionChange() {\n\t\t\t\townerDocument.removeEventListener(\n\t\t\t\t\t'selectionchange',\n\t\t\t\t\tcomputeCaretRectOnSelectionChange\n\t\t\t\t);\n\t\t\t\tcomputeCaretRectangle();\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Resets the scroll position to be maintained.\n\t\t\t */\n\t\t\tfunction computeCaretRectangle() {\n\t\t\t\tif ( isSelectionEligibleForScroll() ) {\n\t\t\t\t\tcaretRect = computeCaretRect( defaultView );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Checks if the current situation is elegible for scroll:\n\t\t\t * - There should be one and only one block selected.\n\t\t\t * - The component must contain the selection.\n\t\t\t * - The active element must be contenteditable.\n\t\t\t */\n\t\t\tfunction isSelectionEligibleForScroll() {\n\t\t\t\treturn (\n\t\t\t\t\tnode.contains( ownerDocument.activeElement ) &&\n\t\t\t\t\townerDocument.activeElement.isContentEditable\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tfunction isLastEditableNode() {\n\t\t\t\tconst editableNodes = node.querySelectorAll(\n\t\t\t\t\t'[contenteditable=\"true\"]'\n\t\t\t\t);\n\t\t\t\tconst lastEditableNode =\n\t\t\t\t\teditableNodes[ editableNodes.length - 1 ];\n\t\t\t\treturn lastEditableNode === ownerDocument.activeElement;\n\t\t\t}\n\n\t\t\t// When the user scrolls or resizes, the scroll position should be\n\t\t\t// reset.\n\t\t\tdefaultView.addEventListener( 'scroll', onScrollResize, true );\n\t\t\tdefaultView.addEventListener( 'resize', onScrollResize, true );\n\n\t\t\tnode.addEventListener( 'keydown', onKeyDown );\n\t\t\tnode.addEventListener( 'keyup', maintainCaretPosition );\n\t\t\tnode.addEventListener( 'mousedown', addSelectionChangeListener );\n\t\t\tnode.addEventListener( 'touchstart', addSelectionChangeListener );\n\n\t\t\treturn () => {\n\t\t\t\tdefaultView.removeEventListener(\n\t\t\t\t\t'scroll',\n\t\t\t\t\tonScrollResize,\n\t\t\t\t\ttrue\n\t\t\t\t);\n\t\t\t\tdefaultView.removeEventListener(\n\t\t\t\t\t'resize',\n\t\t\t\t\tonScrollResize,\n\t\t\t\t\ttrue\n\t\t\t\t);\n\n\t\t\t\tnode.removeEventListener( 'keydown', onKeyDown );\n\t\t\t\tnode.removeEventListener( 'keyup', maintainCaretPosition );\n\t\t\t\tnode.removeEventListener(\n\t\t\t\t\t'mousedown',\n\t\t\t\t\taddSelectionChangeListener\n\t\t\t\t);\n\t\t\t\tnode.removeEventListener(\n\t\t\t\t\t'touchstart',\n\t\t\t\t\taddSelectionChangeListener\n\t\t\t\t);\n\n\t\t\t\townerDocument.removeEventListener(\n\t\t\t\t\t'selectionchange',\n\t\t\t\t\tcomputeCaretRectOnSelectionChange\n\t\t\t\t);\n\n\t\t\t\tdefaultView.cancelAnimationFrame( scrollResizeRafId );\n\t\t\t\tdefaultView.cancelAnimationFrame( onKeyDownRafId );\n\t\t\t};\n\t\t},\n\t\t[ hasSelectedBlock ]\n\t);\n}\n\nfunction Typewriter( { children } ) {\n\treturn (\n\t\t<div ref={ useTypewriter() } className=\"block-editor__typewriter\">\n\t\t\t{ children }\n\t\t</div>\n\t);\n}\n\n/**\n * The exported component. The implementation of Typewriter faced technical\n * challenges in Internet Explorer, and is simply skipped, rendering the given\n * props children instead.\n *\n * @type {Component}\n */\nconst TypewriterOrIEBypass = isIE ? ( props ) => props.children : Typewriter;\n\n/**\n * Ensures that the text selection keeps the same vertical distance from the\n * viewport during keyboard events within this component. The vertical distance\n * can vary. It is the last clicked or scrolled to position.\n */\nexport default TypewriterOrIEBypass;\n"],"mappings":";;;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,IAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AAKA,IAAAI,MAAA,GAAAJ,OAAA;AAXA;AACA;AACA;;AAMA;AACA;AACA;;AAGA,MAAMK,IAAI,GAAGC,MAAM,CAACC,SAAS,CAACC,SAAS,CAACC,OAAO,CAAE,SAAU,CAAC,KAAK,CAAC,CAAC;AACnE,MAAMC,aAAa,GAAG,IAAIC,GAAG,CAAE,CAAEC,YAAE,EAAEC,cAAI,EAAEC,cAAI,EAAEC,eAAK,CAAG,CAAC;AAC1D,MAAMC,wBAAwB,GAAG,IAAI;AAE9B,SAASC,aAAaA,CAAA,EAAG;EAC/B,MAAMC,gBAAgB,GAAG,IAAAC,eAAS,EAC/BC,MAAM,IAA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AEzB,qBAAsB,CAAC;IACvDZ,IAAI,CAACqC,gBAAgB,CAAE,WAAW,EAAED,0BAA2B,CAAC;IAChEpC,IAAI,CAACqC,gBAAgB,CAAE,YAAY,EAAED,0BAA2B,CAAC;IAEjE,OAAO,MAAM;MACZlC,WAAW,CAACqC,mBAAmB,CAC9B,QAAQ,EACRjC,cAAc,EACd,IACD,CAAC;MACDJ,WAAW,CAACqC,mBAAmB,CAC9B,QAAQ,EACRjC,cAAc,EACd,IACD,CAAC;MAEDN,IAAI,CAACuC,mBAAmB,CAAE,SAAS,EAAE9B,SAAU,CAAC;MAChDT,IAAI,CAACuC,mBAAmB,CAAE,OAAO,EAAE3B,qBAAsB,CAAC;MAC1DZ,IAAI,CAACuC,mBAAmB,CACvB,WAAW,EACXH,0BACD,CAAC;MACDpC,IAAI,CAACuC,mBAAmB,CACvB,YAAY,EACZH,0BACD,CAAC;MAEDnC,aAAa,CAACsC,mBAAmB,CAChC,iBAAiB,EACjBD,iCACD,CAAC;MAEDpC,WAAW,CAACS,oBAAoB,CAAER,iBAAkB,CAAC;MACrDD,WAAW,CAACS,oBAAoB,CAAEP,cAAe,CAAC;IACnD,CAAC;EACF,CAAC,EACD,CAAET,gBAAgB,CACnB,CAAC;AACF;AAEA,SAASoD,UAAUA,CAAE;EAAEC;AAAS,CAAC,EAAG;EACnC,OACC,IAAAC,MAAA,CAAAC,aAAA;IAAKC,GAAG,EAAGzD,aAAa,CAAC,CAAG;IAAC0D,SAAS,EAAC;EAA0B,GAC9DJ,QACE,CAAC;AAER;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMK,oBAAoB,GAAGvE,IAAI,GAAKwE,KAAK,IAAMA,KAAK,CAACN,QAAQ,GAAGD,UAAU;;AAE5E;AACA;AACA;AACA;AACA;AAJA,IAAAQ,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAKeJ,oBAAoB"}
1
+ {"version":3,"names":["_compose","require","_dom","_data","_keycodes","_store","isIE","window","navigator","userAgent","indexOf","arrowKeyCodes","Set","UP","DOWN","LEFT","RIGHT","initialTriggerPercentage","useTypewriter","hasSelectedBlock","useSelect","select","blockEditorStore","useRefEffect","node","ownerDocument","defaultView","scrollResizeRafId","onKeyDownRafId","caretRect","onScrollResize","requestAnimationFrame","computeCaretRectangle","onKeyDown","event","cancelAnimationFrame","maintainCaretPosition","keyCode","isSelectionEligibleForScroll","currentCaretRect","computeCaretRect","has","diff","top","scrollContainer","getScrollContainer","windowScroll","body","documentElement","scrollY","scrollTop","scrollContainerY","getBoundingClientRect","relativeScrollPosition","innerHeight","isLastEditableNode","scrollContainerHeight","clientHeight","height","scrollBy","addSelectionChangeListener","addEventListener","computeCaretRectOnSelectionChange","removeEventListener","contains","activeElement","isContentEditable","editableNodes","querySelectorAll","lastEditableNode","length","Typewriter","children","_react","createElement","ref","className","TypewriterOrIEBypass","props","_default","exports","default"],"sources":["@wordpress/block-editor/src/components/typewriter/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useRefEffect } from '@wordpress/compose';\nimport { computeCaretRect, getScrollContainer } from '@wordpress/dom';\nimport { useSelect } from '@wordpress/data';\nimport { UP, DOWN, LEFT, RIGHT } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\n\nconst isIE = window.navigator.userAgent.indexOf( 'Trident' ) !== -1;\nconst arrowKeyCodes = new Set( [ UP, DOWN, LEFT, RIGHT ] );\nconst initialTriggerPercentage = 0.75;\n\nexport function useTypewriter() {\n\tconst hasSelectedBlock = useSelect(\n\t\t( select ) => select( blockEditorStore ).hasSelectedBlock(),\n\t\t[]\n\t);\n\n\treturn useRefEffect(\n\t\t( node ) => {\n\t\t\tif ( ! hasSelectedBlock ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst { ownerDocument } = node;\n\t\t\tconst { defaultView } = ownerDocument;\n\n\t\t\tlet scrollResizeRafId;\n\t\t\tlet onKeyDownRafId;\n\n\t\t\tlet caretRect;\n\n\t\t\tfunction onScrollResize() {\n\t\t\t\tif ( scrollResizeRafId ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tscrollResizeRafId = defaultView.requestAnimationFrame( () => {\n\t\t\t\t\tcomputeCaretRectangle();\n\t\t\t\t\tscrollResizeRafId = null;\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tfunction onKeyDown( event ) {\n\t\t\t\t// Ensure the any remaining request is cancelled.\n\t\t\t\tif ( onKeyDownRafId ) {\n\t\t\t\t\tdefaultView.cancelAnimationFrame( onKeyDownRafId );\n\t\t\t\t}\n\n\t\t\t\t// Use an animation frame for a smooth result.\n\t\t\t\tonKeyDownRafId = defaultView.requestAnimationFrame( () => {\n\t\t\t\t\tmaintainCaretPosition( event );\n\t\t\t\t\tonKeyDownRafId = null;\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Maintains the scroll position after a selection change caused by a\n\t\t\t * keyboard event.\n\t\t\t *\n\t\t\t * @param {KeyboardEvent} event Keyboard event.\n\t\t\t */\n\t\t\tfunction maintainCaretPosition( { keyCode } ) {\n\t\t\t\tif ( ! isSelectionEligibleForScroll() ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst currentCaretRect = computeCaretRect( defaultView );\n\n\t\t\t\tif ( ! currentCaretRect ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// If for some reason there is no position set to be scrolled to, let\n\t\t\t\t// this be the position to be scrolled to in the future.\n\t\t\t\tif ( ! caretRect ) {\n\t\t\t\t\tcaretRect = currentCaretRect;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Even though enabling the typewriter effect for arrow keys results in\n\t\t\t\t// a pleasant experience, it may not be the case for everyone, so, for\n\t\t\t\t// now, let's disable it.\n\t\t\t\tif ( arrowKeyCodes.has( keyCode ) ) {\n\t\t\t\t\t// Reset the caret position to maintain.\n\t\t\t\t\tcaretRect = currentCaretRect;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst diff = currentCaretRect.top - caretRect.top;\n\n\t\t\t\tif ( diff === 0 ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst scrollContainer = getScrollContainer( node );\n\n\t\t\t\t// The page must be scrollable.\n\t\t\t\tif ( ! scrollContainer ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst windowScroll =\n\t\t\t\t\tscrollContainer === ownerDocument.body ||\n\t\t\t\t\tscrollContainer === ownerDocument.documentElement;\n\t\t\t\tconst scrollY = windowScroll\n\t\t\t\t\t? defaultView.scrollY\n\t\t\t\t\t: scrollContainer.scrollTop;\n\t\t\t\tconst scrollContainerY = windowScroll\n\t\t\t\t\t? 0\n\t\t\t\t\t: scrollContainer.getBoundingClientRect().top;\n\t\t\t\tconst relativeScrollPosition = windowScroll\n\t\t\t\t\t? caretRect.top / defaultView.innerHeight\n\t\t\t\t\t: ( caretRect.top - scrollContainerY ) /\n\t\t\t\t\t ( defaultView.innerHeight - scrollContainerY );\n\n\t\t\t\t// If the scroll position is at the start, the active editable element\n\t\t\t\t// is the last one, and the caret is positioned within the initial\n\t\t\t\t// trigger percentage of the page, do not scroll the page.\n\t\t\t\t// The typewriter effect should not kick in until an empty page has been\n\t\t\t\t// filled with the initial trigger percentage or the user scrolls\n\t\t\t\t// intentionally down.\n\t\t\t\tif (\n\t\t\t\t\tscrollY === 0 &&\n\t\t\t\t\trelativeScrollPosition < initialTriggerPercentage &&\n\t\t\t\t\tisLastEditableNode()\n\t\t\t\t) {\n\t\t\t\t\t// Reset the caret position to maintain.\n\t\t\t\t\tcaretRect = currentCaretRect;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst scrollContainerHeight = windowScroll\n\t\t\t\t\t? defaultView.innerHeight\n\t\t\t\t\t: scrollContainer.clientHeight;\n\n\t\t\t\t// Abort if the target scroll position would scroll the caret out of\n\t\t\t\t// view.\n\t\t\t\tif (\n\t\t\t\t\t// The caret is under the lower fold.\n\t\t\t\t\tcaretRect.top + caretRect.height >\n\t\t\t\t\t\tscrollContainerY + scrollContainerHeight ||\n\t\t\t\t\t// The caret is above the upper fold.\n\t\t\t\t\tcaretRect.top < scrollContainerY\n\t\t\t\t) {\n\t\t\t\t\t// Reset the caret position to maintain.\n\t\t\t\t\tcaretRect = currentCaretRect;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( windowScroll ) {\n\t\t\t\t\tdefaultView.scrollBy( 0, diff );\n\t\t\t\t} else {\n\t\t\t\t\tscrollContainer.scrollTop += diff;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Adds a `selectionchange` listener to reset the scroll position to be\n\t\t\t * maintained.\n\t\t\t */\n\t\t\tfunction addSelectionChangeListener() {\n\t\t\t\townerDocument.addEventListener(\n\t\t\t\t\t'selectionchange',\n\t\t\t\t\tcomputeCaretRectOnSelectionChange\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Resets the scroll position to be maintained during a `selectionchange`\n\t\t\t * event. Also removes the listener, so it acts as a one-time listener.\n\t\t\t */\n\t\t\tfunction computeCaretRectOnSelectionChange() {\n\t\t\t\townerDocument.removeEventListener(\n\t\t\t\t\t'selectionchange',\n\t\t\t\t\tcomputeCaretRectOnSelectionChange\n\t\t\t\t);\n\t\t\t\tcomputeCaretRectangle();\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Resets the scroll position to be maintained.\n\t\t\t */\n\t\t\tfunction computeCaretRectangle() {\n\t\t\t\tif ( isSelectionEligibleForScroll() ) {\n\t\t\t\t\tcaretRect = computeCaretRect( defaultView );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Checks if the current situation is elegible for scroll:\n\t\t\t * - There should be one and only one block selected.\n\t\t\t * - The component must contain the selection.\n\t\t\t * - The active element must be contenteditable.\n\t\t\t */\n\t\t\tfunction isSelectionEligibleForScroll() {\n\t\t\t\treturn (\n\t\t\t\t\tnode.contains( ownerDocument.activeElement ) &&\n\t\t\t\t\townerDocument.activeElement.isContentEditable\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tfunction isLastEditableNode() {\n\t\t\t\tconst editableNodes = node.querySelectorAll(\n\t\t\t\t\t'[contenteditable=\"true\"]'\n\t\t\t\t);\n\t\t\t\tconst lastEditableNode =\n\t\t\t\t\teditableNodes[ editableNodes.length - 1 ];\n\t\t\t\treturn lastEditableNode === ownerDocument.activeElement;\n\t\t\t}\n\n\t\t\t// When the user scrolls or resizes, the scroll position should be\n\t\t\t// reset.\n\t\t\tdefaultView.addEventListener( 'scroll', onScrollResize, true );\n\t\t\tdefaultView.addEventListener( 'resize', onScrollResize, true );\n\n\t\t\tnode.addEventListener( 'keydown', onKeyDown );\n\t\t\tnode.addEventListener( 'keyup', maintainCaretPosition );\n\t\t\tnode.addEventListener( 'mousedown', addSelectionChangeListener );\n\t\t\tnode.addEventListener( 'touchstart', addSelectionChangeListener );\n\n\t\t\treturn () => {\n\t\t\t\tdefaultView.removeEventListener(\n\t\t\t\t\t'scroll',\n\t\t\t\t\tonScrollResize,\n\t\t\t\t\ttrue\n\t\t\t\t);\n\t\t\t\tdefaultView.removeEventListener(\n\t\t\t\t\t'resize',\n\t\t\t\t\tonScrollResize,\n\t\t\t\t\ttrue\n\t\t\t\t);\n\n\t\t\t\tnode.removeEventListener( 'keydown', onKeyDown );\n\t\t\t\tnode.removeEventListener( 'keyup', maintainCaretPosition );\n\t\t\t\tnode.removeEventListener(\n\t\t\t\t\t'mousedown',\n\t\t\t\t\taddSelectionChangeListener\n\t\t\t\t);\n\t\t\t\tnode.removeEventListener(\n\t\t\t\t\t'touchstart',\n\t\t\t\t\taddSelectionChangeListener\n\t\t\t\t);\n\n\t\t\t\townerDocument.removeEventListener(\n\t\t\t\t\t'selectionchange',\n\t\t\t\t\tcomputeCaretRectOnSelectionChange\n\t\t\t\t);\n\n\t\t\t\tdefaultView.cancelAnimationFrame( scrollResizeRafId );\n\t\t\t\tdefaultView.cancelAnimationFrame( onKeyDownRafId );\n\t\t\t};\n\t\t},\n\t\t[ hasSelectedBlock ]\n\t);\n}\n\nfunction Typewriter( { children } ) {\n\treturn (\n\t\t<div ref={ useTypewriter() } className=\"block-editor__typewriter\">\n\t\t\t{ children }\n\t\t</div>\n\t);\n}\n\n/**\n * The exported component. The implementation of Typewriter faced technical\n * challenges in Internet Explorer, and is simply skipped, rendering the given\n * props children instead.\n *\n * @type {Component}\n */\nconst TypewriterOrIEBypass = isIE ? ( props ) => props.children : Typewriter;\n\n/**\n * Ensures that the text selection keeps the same vertical distance from the\n * viewport during keyboard events within this component. The vertical distance\n * can vary. It is the last clicked or scrolled to position.\n */\nexport default TypewriterOrIEBypass;\n"],"mappings":";;;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,IAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AAKA,IAAAI,MAAA,GAAAJ,OAAA;AAXA;AACA;AACA;;AAMA;AACA;AACA;;AAGA,MAAMK,IAAI,GAAGC,MAAM,CAACC,SAAS,CAACC,SAAS,CAACC,OAAO,CAAE,SAAU,CAAC,KAAK,CAAC,CAAC;AACnE,MAAMC,aAAa,GAAG,IAAIC,GAAG,CAAE,CAAEC,YAAE,EAAEC,cAAI,EAAEC,cAAI,EAAEC,eAAK,CAAG,CAAC;AAC1D,MAAMC,wBAAwB,GAAG,IAAI;AAE9B,SAASC,aAAaA,CAAA,EAAG;EAC/B,MAAMC,gBAAgB,GAAG,IAAAC,eAAS,EAC/BC,MAAM,IAAMA,MAAM,CAAEC,YAAiB,CAAC,CAACH,gBAAgB,CAAC,CAAC,EAC3D,EACD,CAAC;EAED,OAAO,IAAAI,qBAAY,EAChBC,IAAI,IAAM;IACX,IAAK,CAAEL,gBAAgB,EAAG;MACzB;IACD;IAEA,MAAM;MAAEM;IAAc,CA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mB,CAC9B,QAAQ,EACRjC,cAAc,EACd,IACD,CAAC;MACDJ,WAAW,CAACqC,mBAAmB,CAC9B,QAAQ,EACRjC,cAAc,EACd,IACD,CAAC;MAEDN,IAAI,CAACuC,mBAAmB,CAAE,SAAS,EAAE9B,SAAU,CAAC;MAChDT,IAAI,CAACuC,mBAAmB,CAAE,OAAO,EAAE3B,qBAAsB,CAAC;MAC1DZ,IAAI,CAACuC,mBAAmB,CACvB,WAAW,EACXH,0BACD,CAAC;MACDpC,IAAI,CAACuC,mBAAmB,CACvB,YAAY,EACZH,0BACD,CAAC;MAEDnC,aAAa,CAACsC,mBAAmB,CAChC,iBAAiB,EACjBD,iCACD,CAAC;MAEDpC,WAAW,CAACS,oBAAoB,CAAER,iBAAkB,CAAC;MACrDD,WAAW,CAACS,oBAAoB,CAAEP,cAAe,CAAC;IACnD,CAAC;EACF,CAAC,EACD,CAAET,gBAAgB,CACnB,CAAC;AACF;AAEA,SAASoD,UAAUA,CAAE;EAAEC;AAAS,CAAC,EAAG;EACnC,OACC,IAAAC,MAAA,CAAAC,aAAA;IAAKC,GAAG,EAAGzD,aAAa,CAAC,CAAG;IAAC0D,SAAS,EAAC;EAA0B,GAC9DJ,QACE,CAAC;AAER;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMK,oBAAoB,GAAGvE,IAAI,GAAKwE,KAAK,IAAMA,KAAK,CAACN,QAAQ,GAAGD,UAAU;;AAE5E;AACA;AACA;AACA;AACA;AAJA,IAAAQ,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAKeJ,oBAAoB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_blocks","require","_components","_i18n","_data","_compose","_icons","_store","noop","EMPTY_BLOCKS_LIST","UngroupButton","onConvertFromGroup","isUngroupable","_react","createElement","ToolbarGroup","ToolbarButton","title","__","icon","ungroup","onClick","_default","exports","default","compose","withSelect","select","getSelectedBlockClientId","getBlock","blockEditorStore","getGroupingBlockName","blocksStore","selectedId","selectedBlock","groupingBlockName","innerBlocks","length","name","clientId","withDispatch","dispatch","onToggle","replaceBlocks"],"sources":["@wordpress/block-editor/src/components/ungroup-button/index.native.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport { ToolbarGroup, ToolbarButton } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { compose } from '@wordpress/compose';\nimport { ungroup } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\n\nconst noop = () => {};\nconst EMPTY_BLOCKS_LIST = [];\n\nexport function UngroupButton( { onConvertFromGroup, isUngroupable = false } ) {\n\tif ( ! isUngroupable ) {\n\t\treturn null;\n\t}\n\treturn (\n\t\t<ToolbarGroup>\n\t\t\t<ToolbarButton\n\t\t\t\ttitle={ __( 'Ungroup' ) }\n\t\t\t\ticon={ ungroup }\n\t\t\t\tonClick={ onConvertFromGroup }\n\t\t\t/>\n\t\t</ToolbarGroup>\n\t);\n}\n\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\tconst { getSelectedBlockClientId, getBlock } =\n\t\t\tselect( blockEditorStore );\n\n\t\tconst { getGroupingBlockName } = select( blocksStore );\n\n\t\tconst selectedId = getSelectedBlockClientId();\n\t\tconst selectedBlock = getBlock( selectedId );\n\n\t\tconst groupingBlockName = getGroupingBlockName();\n\n\t\tconst isUngroupable =\n\t\t\tselectedBlock &&\n\t\t\tselectedBlock.innerBlocks &&\n\t\t\tselectedBlock.innerBlocks.length > 0 &&\n\t\t\tselectedBlock.name === groupingBlockName;\n\n\t\tconst innerBlocks = isUngroupable\n\t\t\t? selectedBlock.innerBlocks\n\t\t\t: EMPTY_BLOCKS_LIST;\n\n\t\treturn {\n\t\t\tisUngroupable,\n\t\t\tclientId: selectedId,\n\t\t\tinnerBlocks,\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch, { clientId, innerBlocks, onToggle = noop } ) => {\n\t\tconst { replaceBlocks } = dispatch( blockEditorStore );\n\n\t\treturn {\n\t\t\tonConvertFromGroup() {\n\t\t\t\tif ( ! innerBlocks.length ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\treplaceBlocks( clientId, innerBlocks );\n\n\t\t\t\tonToggle();\n\t\t\t},\n\t\t};\n\t} ),\n] )( UngroupButton );\n"],"mappings":";;;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AAKA,IAAAM,MAAA,GAAAN,OAAA;AAbA;AACA;AACA;;AAQA;AACA;AACA;;AAGA,MAAMO,IAAI,GAAGA,CAAA,KAAM,CAAC,CAAC;AACrB,MAAMC,iBAAiB,GAAG,EAAE;AAErB,SAASC,aAAaA,CAAE;EAAEC,kBAAkB;EAAEC,aAAa,GAAG;AAAM,CAAC,EAAG;EAC9E,IAAK,CAAEA,aAAa,EAAG;IACtB,OAAO,IAAI;EACZ;EACA,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACZ,WAAA,CAAAa,YAAY,QACZ,IAAAF,MAAA,CAAAC,aAAA,EAACZ,WAAA,CAAAc,aAAa;IACbC,KAAK,EAAG,IAAAC,QAAE,EAAE,SAAU,CAAG;IACzBC,IAAI,EAAGC,cAAS;IAChBC,OAAO,EAAGV;EAAoB,CAC9B,CACY,CAAC;AAEjB;AAAC,IAAAW,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEc,IAAAC,gBAAO,EAAE,CACvB,IAAAC,gBAAU,EAAIC,MAAM,IAAM;EACzB,MAAM;IAAEC,wBAAwB;IAAEC;EAAS,CAAC,GAC3CF,MAAM,CAAEG,YAAiB,CAAC;EAE3B,MAAM;IAAEC;EAAqB,CAAC,GAAGJ,MAAM,CAAEK,aAAY,CAAC;EAEtD,MAAMC,UAAU,GAAGL,wBAAwB,CAAC,CAAC;EAC7C,MAAMM,aAAa,GAAGL,QAAQ,CAAEI,UAAW,CAAC;EAE5C,MAAME,iBAAiB,GAAGJ,oBAAoB,CAAC,CAAC;EAEhD,MAAMnB,aAAa,GAClBsB,aAAa,IACbA,aAAa,CAACE,WAAW,IACzBF,aAAa,CAACE,WAAW,CAACC,MAAM,GAAG,CAAC,IACpCH,aAAa,CAACI,IAAI,KAAKH,iBAAiB;EAEzC,MAAMC,WAAW,GAAGxB,aAAa,GAC9BsB,aAAa,CAACE,WAAW,GACzB3B,iBAAiB;EAEpB,OAAO;IACNG,aAAa;IACb2B,QAAQ,EAAEN,UAAU;IACpBG;EACD,CAAC;AACF,CAAE,CAAC,EACH,IAAAI,kBAAY,EAAE,CAAEC,QAAQ,EAAE;EAAEF,QAAQ;EAAEH,WAAW;EAAEM,QAAQ,GAAGlC;AAAK,CAAC,KAAM;EACzE,MAAM;IAAEmC;EAAc,CAAC,GAAGF,QAAQ,CAAEX,YAAiB,CAAC;EAEtD,OAAO;IACNnB,kBAAkBA,CAAA,EAAG;MACpB,IAAK,CAAEyB,WAAW,CAACC,MAAM,EAAG;QAC3B;MACD;MAEAM,aAAa,CAAEJ,QAAQ,EAAEH,WAAY,CAAC;MAEtCM,QAAQ,CAAC,CAAC;IACX;EACD,CAAC;AACF,CAAE,CAAC,CACF,CAAC,CAAEhC,aAAc,CAAC"}
1
+ {"version":3,"names":["_blocks","require","_components","_i18n","_data","_compose","_icons","_store","noop","EMPTY_BLOCKS_LIST","UngroupButton","onConvertFromGroup","isUngroupable","_react","createElement","ToolbarGroup","ToolbarButton","title","__","icon","ungroup","onClick","_default","exports","default","compose","withSelect","select","getSelectedBlockClientId","getBlock","blockEditorStore","getGroupingBlockName","blocksStore","selectedId","selectedBlock","groupingBlockName","innerBlocks","length","name","clientId","withDispatch","dispatch","onToggle","replaceBlocks"],"sources":["@wordpress/block-editor/src/components/ungroup-button/index.native.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport { ToolbarGroup, ToolbarButton } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { compose } from '@wordpress/compose';\nimport { ungroup } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\n\nconst noop = () => {};\nconst EMPTY_BLOCKS_LIST = [];\n\nexport function UngroupButton( { onConvertFromGroup, isUngroupable = false } ) {\n\tif ( ! isUngroupable ) {\n\t\treturn null;\n\t}\n\treturn (\n\t\t<ToolbarGroup>\n\t\t\t<ToolbarButton\n\t\t\t\ttitle={ __( 'Ungroup' ) }\n\t\t\t\ticon={ ungroup }\n\t\t\t\tonClick={ onConvertFromGroup }\n\t\t\t/>\n\t\t</ToolbarGroup>\n\t);\n}\n\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\tconst { getSelectedBlockClientId, getBlock } =\n\t\t\tselect( blockEditorStore );\n\n\t\tconst { getGroupingBlockName } = select( blocksStore );\n\n\t\tconst selectedId = getSelectedBlockClientId();\n\t\tconst selectedBlock = getBlock( selectedId );\n\n\t\tconst groupingBlockName = getGroupingBlockName();\n\n\t\tconst isUngroupable =\n\t\t\tselectedBlock &&\n\t\t\tselectedBlock.innerBlocks &&\n\t\t\tselectedBlock.innerBlocks.length > 0 &&\n\t\t\tselectedBlock.name === groupingBlockName;\n\n\t\tconst innerBlocks = isUngroupable\n\t\t\t? selectedBlock.innerBlocks\n\t\t\t: EMPTY_BLOCKS_LIST;\n\n\t\treturn {\n\t\t\tisUngroupable,\n\t\t\tclientId: selectedId,\n\t\t\tinnerBlocks,\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch, { clientId, innerBlocks, onToggle = noop } ) => {\n\t\tconst { replaceBlocks } = dispatch( blockEditorStore );\n\n\t\treturn {\n\t\t\tonConvertFromGroup() {\n\t\t\t\tif (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AQ,CAAEI,UAAW,CAAC;EAE5C,MAAME,iBAAiB,GAAGJ,oBAAoB,CAAC,CAAC;EAEhD,MAAMnB,aAAa,GAClBsB,aAAa,IACbA,aAAa,CAACE,WAAW,IACzBF,aAAa,CAACE,WAAW,CAACC,MAAM,GAAG,CAAC,IACpCH,aAAa,CAACI,IAAI,KAAKH,iBAAiB;EAEzC,MAAMC,WAAW,GAAGxB,aAAa,GAC9BsB,aAAa,CAACE,WAAW,GACzB3B,iBAAiB;EAEpB,OAAO;IACNG,aAAa;IACb2B,QAAQ,EAAEN,UAAU;IACpBG;EACD,CAAC;AACF,CAAE,CAAC,EACH,IAAAI,kBAAY,EAAE,CAAEC,QAAQ,EAAE;EAAEF,QAAQ;EAAEH,WAAW;EAAEM,QAAQ,GAAGlC;AAAK,CAAC,KAAM;EACzE,MAAM;IAAEmC;EAAc,CAAC,GAAGF,QAAQ,CAAEX,YAAiB,CAAC;EAEtD,OAAO;IACNnB,kBAAkBA,CAAA,EAAG;MACpB,IAAK,CAAEyB,WAAW,CAACC,MAAM,EAAG;QAC3B;MACD;MAEAM,aAAa,CAAEJ,QAAQ,EAAEH,WAAY,CAAC;MAEtCM,QAAQ,CAAC,CAAC;IACX;EACD,CAAC;AACF,CAAE,CAAC,CACF,CAAC,CAAEhC,aAAc,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_components","require","_useSettings","UnitControl","units","unitsProp","props","availableUnits","useSettings","useCustomUnits","_react","createElement","__experimentalUnitControl"],"sources":["@wordpress/block-editor/src/components/unit-control/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalUseCustomUnits as useCustomUnits,\n\t__experimentalUnitControl as BaseUnitControl,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { useSettings } from '../use-settings';\n\nexport default function UnitControl( { units: unitsProp, ...props } ) {\n\tconst [ availableUnits ] = useSettings( 'spacing.units' );\n\tconst units = useCustomUnits( {\n\t\tavailableUnits: availableUnits || [ '%', 'px', 'em', 'rem', 'vw' ],\n\t\tunits: unitsProp,\n\t} );\n\n\treturn <BaseUnitControl units={ units } { ...props } />;\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAQA,IAAAC,YAAA,GAAAD,OAAA;AAXA;AACA;AACA;;AAMA;AACA;AACA;;AAGe,SAASE,WAAWA,CAAE;EAAEC,KAAK,EAAEC,SAAS;EAAE,GAAGC;AAAM,CAAC,EAAG;EACrE,MAAM,CAAEC,cAAc,CAAE,GAAG,IAAAC,wBAAW,EAAE,eAAgB,CAAC;EACzD,MAAMJ,KAAK,GAAG,IAAAK,wCAAc,EAAE;IAC7BF,cAAc,EAAEA,cAAc,IAAI,CAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,CAAE;IAClEH,KAAK,EAAEC;EACR,CAAE,CAAC;EAEH,OAAO,IAAAK,MAAA,CAAAC,aAAA,EAACX,WAAA,CAAAY,yBAAe;IAACR,KAAK,EAAGA,KAAO;IAAA,GAAME;EAAK,CAAI,CAAC;AACxD"}
1
+ {"version":3,"names":["_components","require","_useSettings","UnitControl","units","unitsProp","props","availableUnits","useSettings","useCustomUnits","_react","createElement","__experimentalUnitControl"],"sources":["@wordpress/block-editor/src/components/unit-control/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalUseCustomUnits as useCustomUnits,\n\t__experimentalUnitControl as BaseUnitControl,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { useSettings } from '../use-settings';\n\nexport default function UnitControl( { units: unitsProp, ...props } ) {\n\tconst [ availableUnits ] = useSettings( 'spacing.units' );\n\tconst units = useCustomUnits( {\n\t\tavailableUnits: availableUnits || [ '%', 'px', 'em', 'rem', 'vw' ],\n\t\tunits: unitsProp,\n\t} );\n\n\treturn <BaseUnitControl units={ units } { ...props } />;\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAQA,IAAAC,YAAA,GAAAD,OAAA;AAXA;AACA;AACA;;AAMA;AACA;AACA;;AAGe,SAASE,WAAWA,CAAE;EAAEC,KAAK,EAAEC,SAAS;EAAE,GAAGC;AAAM,CAAC,EAAG;EACrE,MAAM,CAAEC,cAAc,CAAE,GAAG,IAAAC,wBAAW,EAAE,eAAgB,CAAC;EACzD,MAAMJ,KAAK,GAAG,IAAAK,wCAAc,EAAE;IAC7BF,cAAc,EAAEA,cAAc,IAAI,CAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,CAAE;IAClEH,KAAK,EAAEC;EACR,CAAE,CAAC;EAEH,OAAO,IAAAK,MAAA,CAAAC,aAAA,EAACX,WAAA,CAAAY,yBAAe;IAACR,KAAK,EAAGA,KAAO;IAAA,GAAME;EAAK,CAAI,CAAC;AACxD","ignoreList":[]}