@wordpress/block-editor 12.19.5 → 12.21.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 (443) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/build/components/block-canvas/index.js +2 -0
  3. package/build/components/block-canvas/index.js.map +1 -1
  4. package/build/components/block-heading-level-dropdown/index.js +14 -17
  5. package/build/components/block-heading-level-dropdown/index.js.map +1 -1
  6. package/build/components/block-inspector/index.js +0 -3
  7. package/build/components/block-inspector/index.js.map +1 -1
  8. package/build/components/block-list/block-invalid-warning.native.js.map +1 -1
  9. package/build/components/block-list/block-list-item.native.js +1 -1
  10. package/build/components/block-list/block-list-item.native.js.map +1 -1
  11. package/build/components/block-list/block-outline.native.js +23 -7
  12. package/build/components/block-list/block-outline.native.js.map +1 -1
  13. package/build/components/block-list/block-selection-button.native.js.map +1 -1
  14. package/build/components/block-list/block.native.js +0 -3
  15. package/build/components/block-list/block.native.js.map +1 -1
  16. package/build/components/block-list/index.js +9 -9
  17. package/build/components/block-list/index.js.map +1 -1
  18. package/build/components/block-mover/index.native.js.map +1 -1
  19. package/build/components/block-popover/cover.js +68 -0
  20. package/build/components/block-popover/cover.js.map +1 -0
  21. package/build/components/block-popover/drop-zone.js +2 -3
  22. package/build/components/block-popover/drop-zone.js.map +1 -1
  23. package/build/components/block-popover/index.js +1 -19
  24. package/build/components/block-popover/index.js.map +1 -1
  25. package/build/components/block-preview/index.js +2 -1
  26. package/build/components/block-preview/index.js.map +1 -1
  27. package/build/components/block-removal-warning-modal/index.js +2 -4
  28. package/build/components/block-removal-warning-modal/index.js.map +1 -1
  29. package/build/components/block-rename/modal.js.map +1 -1
  30. package/build/components/block-settings-menu/block-parent-selector-menu-item.js +54 -0
  31. package/build/components/block-settings-menu/block-parent-selector-menu-item.js.map +1 -0
  32. package/build/components/block-settings-menu/block-settings-dropdown.js +9 -37
  33. package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  34. package/build/components/block-switcher/block-transformations-menu.native.js.map +1 -1
  35. package/build/components/block-toolbar/block-toolbar-menu.native.js.map +1 -1
  36. package/build/components/block-toolbar/index.js +7 -5
  37. package/build/components/block-toolbar/index.js.map +1 -1
  38. package/build/components/block-toolbar/shuffle.js +89 -0
  39. package/build/components/block-toolbar/shuffle.js.map +1 -0
  40. package/build/components/block-toolbar/use-has-block-toolbar.js +43 -0
  41. package/build/components/block-toolbar/use-has-block-toolbar.js.map +1 -0
  42. package/build/components/block-tools/block-selection-button.js +5 -1
  43. package/build/components/block-tools/block-selection-button.js.map +1 -1
  44. package/build/components/block-tools/empty-block-inserter.js +2 -5
  45. package/build/components/block-tools/empty-block-inserter.js.map +1 -1
  46. package/build/components/block-tools/index.js +9 -26
  47. package/build/components/block-tools/index.js.map +1 -1
  48. package/build/components/block-tools/use-show-block-tools.js +60 -0
  49. package/build/components/block-tools/use-show-block-tools.js.map +1 -0
  50. package/build/components/caption/index.native.js.map +1 -1
  51. package/build/components/child-layout-control/index.js +37 -5
  52. package/build/components/child-layout-control/index.js.map +1 -1
  53. package/build/components/color-palette/control.js.map +1 -1
  54. package/build/components/colors-gradients/control.js +1 -1
  55. package/build/components/colors-gradients/control.js.map +1 -1
  56. package/build/components/date-format-picker/index.js +0 -1
  57. package/build/components/date-format-picker/index.js.map +1 -1
  58. package/build/components/font-appearance-control/index.js +1 -2
  59. package/build/components/font-appearance-control/index.js.map +1 -1
  60. package/build/components/global-styles/border-panel.js.map +1 -1
  61. package/build/components/global-styles/color-panel.js +1 -1
  62. package/build/components/global-styles/color-panel.js.map +1 -1
  63. package/build/components/global-styles/dimensions-panel.js +30 -19
  64. package/build/components/global-styles/dimensions-panel.js.map +1 -1
  65. package/build/components/global-styles/image-settings-panel.js.map +1 -1
  66. package/build/components/global-styles/typography-utils.js +7 -5
  67. package/build/components/global-styles/typography-utils.js.map +1 -1
  68. package/build/components/global-styles/use-global-styles-output.js +15 -15
  69. package/build/components/global-styles/use-global-styles-output.js.map +1 -1
  70. package/build/components/global-styles/utils.js +1 -1
  71. package/build/components/global-styles/utils.js.map +1 -1
  72. package/build/components/grid-visualizer/grid-item-resizer.js +77 -0
  73. package/build/components/grid-visualizer/grid-item-resizer.js.map +1 -0
  74. package/build/components/grid-visualizer/grid-visualizer.js +81 -0
  75. package/build/components/grid-visualizer/grid-visualizer.js.map +1 -0
  76. package/build/components/grid-visualizer/index.js +20 -0
  77. package/build/components/grid-visualizer/index.js.map +1 -0
  78. package/build/components/grid-visualizer/utils.js +10 -0
  79. package/build/components/grid-visualizer/utils.js.map +1 -0
  80. package/build/components/iframe/index.js +61 -16
  81. package/build/components/iframe/index.js.map +1 -1
  82. package/build/components/index.native.js +7 -0
  83. package/build/components/index.native.js.map +1 -1
  84. package/build/components/inner-blocks/use-nested-settings-update.js +8 -2
  85. package/build/components/inner-blocks/use-nested-settings-update.js.map +1 -1
  86. package/build/components/inserter/media-tab/media-preview.js.map +1 -1
  87. package/build/components/inserter/menu.js +9 -3
  88. package/build/components/inserter/menu.js.map +1 -1
  89. package/build/components/inserter/menu.native.js.map +1 -1
  90. package/build/components/inserter/mobile-tab-navigation.js +1 -1
  91. package/build/components/inserter/mobile-tab-navigation.js.map +1 -1
  92. package/build/components/inserter/search-results.js +3 -2
  93. package/build/components/inserter/search-results.js.map +1 -1
  94. package/build/components/inserter/tabs.js +2 -1
  95. package/build/components/inserter/tabs.js.map +1 -1
  96. package/build/components/inspector-controls/block-support-tools-panel.js.map +1 -1
  97. package/build/components/inspector-controls-tabs/index.js +1 -1
  98. package/build/components/inspector-controls-tabs/index.js.map +1 -1
  99. package/build/components/inspector-controls-tabs/styles-tab.js +0 -4
  100. package/build/components/inspector-controls-tabs/styles-tab.js.map +1 -1
  101. package/build/components/link-control/search-input.js.map +1 -1
  102. package/build/components/list-view/branch.js.map +1 -1
  103. package/build/components/list-view/drop-indicator.js.map +1 -1
  104. package/build/components/list-view/index.js.map +1 -1
  105. package/build/components/observe-typing/index.js +5 -10
  106. package/build/components/observe-typing/index.js.map +1 -1
  107. package/build/components/panel-color-settings/index.js.map +1 -1
  108. package/build/components/provider/index.js.map +1 -1
  109. package/build/components/resizable-box-popover/index.js +3 -5
  110. package/build/components/resizable-box-popover/index.js.map +1 -1
  111. package/build/components/responsive-block-control/index.js +1 -1
  112. package/build/components/responsive-block-control/index.js.map +1 -1
  113. package/build/components/rich-text/format-toolbar-container.js +1 -31
  114. package/build/components/rich-text/format-toolbar-container.js.map +1 -1
  115. package/build/components/rich-text/index.js +1 -2
  116. package/build/components/rich-text/index.js.map +1 -1
  117. package/build/components/skip-to-selected-block/index.js +7 -14
  118. package/build/components/skip-to-selected-block/index.js.map +1 -1
  119. package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js +0 -1
  120. package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
  121. package/build/components/url-input/index.js +5 -8
  122. package/build/components/url-input/index.js.map +1 -1
  123. package/build/hooks/background.js.map +1 -1
  124. package/build/hooks/block-hooks.js.map +1 -1
  125. package/build/hooks/dimensions.js +3 -4
  126. package/build/hooks/dimensions.js.map +1 -1
  127. package/build/hooks/font-size.js +6 -7
  128. package/build/hooks/font-size.js.map +1 -1
  129. package/build/hooks/index.js +1 -1
  130. package/build/hooks/index.js.map +1 -1
  131. package/build/hooks/layout-child.js +89 -1
  132. package/build/hooks/layout-child.js.map +1 -1
  133. package/build/hooks/layout.js +11 -4
  134. package/build/hooks/layout.js.map +1 -1
  135. package/build/hooks/line-height.js.map +1 -1
  136. package/build/hooks/position.js +0 -1
  137. package/build/hooks/position.js.map +1 -1
  138. package/build/hooks/spacing-visualizer.js +115 -0
  139. package/build/hooks/spacing-visualizer.js.map +1 -0
  140. package/build/hooks/use-typography-props.js +1 -2
  141. package/build/hooks/use-typography-props.js.map +1 -1
  142. package/build/layouts/grid.js +111 -14
  143. package/build/layouts/grid.js.map +1 -1
  144. package/build/private-apis.js +2 -2
  145. package/build/private-apis.js.map +1 -1
  146. package/build/store/actions.js +4 -36
  147. package/build/store/actions.js.map +1 -1
  148. package/build/store/private-actions.js +29 -45
  149. package/build/store/private-actions.js.map +1 -1
  150. package/build/store/reducer.js +2 -4
  151. package/build/store/reducer.js.map +1 -1
  152. package/build/store/selectors.js +27 -15
  153. package/build/store/selectors.js.map +1 -1
  154. package/build/utils/calculate-scale.js +17 -0
  155. package/build/utils/calculate-scale.js.map +1 -0
  156. package/build-module/components/block-canvas/index.js +2 -0
  157. package/build-module/components/block-canvas/index.js.map +1 -1
  158. package/build-module/components/block-heading-level-dropdown/index.js +14 -17
  159. package/build-module/components/block-heading-level-dropdown/index.js.map +1 -1
  160. package/build-module/components/block-inspector/index.js +1 -4
  161. package/build-module/components/block-inspector/index.js.map +1 -1
  162. package/build-module/components/block-list/block-invalid-warning.native.js.map +1 -1
  163. package/build-module/components/block-list/block-list-item.native.js +1 -1
  164. package/build-module/components/block-list/block-list-item.native.js.map +1 -1
  165. package/build-module/components/block-list/block-outline.native.js +23 -7
  166. package/build-module/components/block-list/block-outline.native.js.map +1 -1
  167. package/build-module/components/block-list/block-selection-button.native.js.map +1 -1
  168. package/build-module/components/block-list/block.native.js +0 -3
  169. package/build-module/components/block-list/block.native.js.map +1 -1
  170. package/build-module/components/block-list/index.js +9 -9
  171. package/build-module/components/block-list/index.js.map +1 -1
  172. package/build-module/components/block-mover/index.native.js.map +1 -1
  173. package/build-module/components/block-popover/cover.js +60 -0
  174. package/build-module/components/block-popover/cover.js.map +1 -0
  175. package/build-module/components/block-popover/drop-zone.js +2 -3
  176. package/build-module/components/block-popover/drop-zone.js.map +1 -1
  177. package/build-module/components/block-popover/index.js +1 -19
  178. package/build-module/components/block-popover/index.js.map +1 -1
  179. package/build-module/components/block-preview/index.js +2 -1
  180. package/build-module/components/block-preview/index.js.map +1 -1
  181. package/build-module/components/block-removal-warning-modal/index.js +3 -5
  182. package/build-module/components/block-removal-warning-modal/index.js.map +1 -1
  183. package/build-module/components/block-rename/modal.js.map +1 -1
  184. package/build-module/components/block-settings-menu/block-parent-selector-menu-item.js +46 -0
  185. package/build-module/components/block-settings-menu/block-parent-selector-menu-item.js.map +1 -0
  186. package/build-module/components/block-settings-menu/block-settings-dropdown.js +12 -40
  187. package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  188. package/build-module/components/block-switcher/block-transformations-menu.native.js.map +1 -1
  189. package/build-module/components/block-toolbar/block-toolbar-menu.native.js.map +1 -1
  190. package/build-module/components/block-toolbar/index.js +7 -6
  191. package/build-module/components/block-toolbar/index.js.map +1 -1
  192. package/build-module/components/block-toolbar/shuffle.js +82 -0
  193. package/build-module/components/block-toolbar/shuffle.js.map +1 -0
  194. package/build-module/components/block-toolbar/use-has-block-toolbar.js +36 -0
  195. package/build-module/components/block-toolbar/use-has-block-toolbar.js.map +1 -0
  196. package/build-module/components/block-tools/block-selection-button.js +5 -1
  197. package/build-module/components/block-tools/block-selection-button.js.map +1 -1
  198. package/build-module/components/block-tools/empty-block-inserter.js +2 -5
  199. package/build-module/components/block-tools/empty-block-inserter.js.map +1 -1
  200. package/build-module/components/block-tools/index.js +9 -26
  201. package/build-module/components/block-tools/index.js.map +1 -1
  202. package/build-module/components/block-tools/use-show-block-tools.js +54 -0
  203. package/build-module/components/block-tools/use-show-block-tools.js.map +1 -0
  204. package/build-module/components/caption/index.native.js.map +1 -1
  205. package/build-module/components/child-layout-control/index.js +38 -6
  206. package/build-module/components/child-layout-control/index.js.map +1 -1
  207. package/build-module/components/color-palette/control.js.map +1 -1
  208. package/build-module/components/colors-gradients/control.js +1 -1
  209. package/build-module/components/colors-gradients/control.js.map +1 -1
  210. package/build-module/components/date-format-picker/index.js +0 -1
  211. package/build-module/components/date-format-picker/index.js.map +1 -1
  212. package/build-module/components/font-appearance-control/index.js +1 -2
  213. package/build-module/components/font-appearance-control/index.js.map +1 -1
  214. package/build-module/components/global-styles/border-panel.js.map +1 -1
  215. package/build-module/components/global-styles/color-panel.js +1 -1
  216. package/build-module/components/global-styles/color-panel.js.map +1 -1
  217. package/build-module/components/global-styles/dimensions-panel.js +30 -19
  218. package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
  219. package/build-module/components/global-styles/image-settings-panel.js.map +1 -1
  220. package/build-module/components/global-styles/typography-utils.js +7 -5
  221. package/build-module/components/global-styles/typography-utils.js.map +1 -1
  222. package/build-module/components/global-styles/use-global-styles-output.js +16 -16
  223. package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
  224. package/build-module/components/global-styles/utils.js +2 -2
  225. package/build-module/components/global-styles/utils.js.map +1 -1
  226. package/build-module/components/grid-visualizer/grid-item-resizer.js +69 -0
  227. package/build-module/components/grid-visualizer/grid-item-resizer.js.map +1 -0
  228. package/build-module/components/grid-visualizer/grid-visualizer.js +73 -0
  229. package/build-module/components/grid-visualizer/grid-visualizer.js.map +1 -0
  230. package/build-module/components/grid-visualizer/index.js +3 -0
  231. package/build-module/components/grid-visualizer/index.js.map +1 -0
  232. package/build-module/components/grid-visualizer/utils.js +4 -0
  233. package/build-module/components/grid-visualizer/utils.js.map +1 -0
  234. package/build-module/components/iframe/index.js +61 -16
  235. package/build-module/components/iframe/index.js.map +1 -1
  236. package/build-module/components/index.native.js +1 -1
  237. package/build-module/components/index.native.js.map +1 -1
  238. package/build-module/components/inner-blocks/use-nested-settings-update.js +8 -2
  239. package/build-module/components/inner-blocks/use-nested-settings-update.js.map +1 -1
  240. package/build-module/components/inserter/media-tab/media-preview.js.map +1 -1
  241. package/build-module/components/inserter/menu.js +9 -3
  242. package/build-module/components/inserter/menu.js.map +1 -1
  243. package/build-module/components/inserter/menu.native.js.map +1 -1
  244. package/build-module/components/inserter/mobile-tab-navigation.js +1 -1
  245. package/build-module/components/inserter/mobile-tab-navigation.js.map +1 -1
  246. package/build-module/components/inserter/search-results.js +3 -2
  247. package/build-module/components/inserter/search-results.js.map +1 -1
  248. package/build-module/components/inserter/tabs.js +2 -1
  249. package/build-module/components/inserter/tabs.js.map +1 -1
  250. package/build-module/components/inspector-controls/block-support-tools-panel.js.map +1 -1
  251. package/build-module/components/inspector-controls-tabs/index.js +1 -1
  252. package/build-module/components/inspector-controls-tabs/index.js.map +1 -1
  253. package/build-module/components/inspector-controls-tabs/styles-tab.js +0 -4
  254. package/build-module/components/inspector-controls-tabs/styles-tab.js.map +1 -1
  255. package/build-module/components/link-control/search-input.js.map +1 -1
  256. package/build-module/components/list-view/branch.js.map +1 -1
  257. package/build-module/components/list-view/drop-indicator.js.map +1 -1
  258. package/build-module/components/list-view/index.js.map +1 -1
  259. package/build-module/components/observe-typing/index.js +5 -10
  260. package/build-module/components/observe-typing/index.js.map +1 -1
  261. package/build-module/components/panel-color-settings/index.js.map +1 -1
  262. package/build-module/components/provider/index.js.map +1 -1
  263. package/build-module/components/resizable-box-popover/index.js +3 -5
  264. package/build-module/components/resizable-box-popover/index.js.map +1 -1
  265. package/build-module/components/responsive-block-control/index.js +1 -1
  266. package/build-module/components/responsive-block-control/index.js.map +1 -1
  267. package/build-module/components/rich-text/format-toolbar-container.js +1 -31
  268. package/build-module/components/rich-text/format-toolbar-container.js.map +1 -1
  269. package/build-module/components/rich-text/index.js +1 -2
  270. package/build-module/components/rich-text/index.js.map +1 -1
  271. package/build-module/components/skip-to-selected-block/index.js +8 -14
  272. package/build-module/components/skip-to-selected-block/index.js.map +1 -1
  273. package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js +0 -1
  274. package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
  275. package/build-module/components/url-input/index.js +5 -8
  276. package/build-module/components/url-input/index.js.map +1 -1
  277. package/build-module/hooks/background.js.map +1 -1
  278. package/build-module/hooks/block-hooks.js.map +1 -1
  279. package/build-module/hooks/dimensions.js +1 -2
  280. package/build-module/hooks/dimensions.js.map +1 -1
  281. package/build-module/hooks/font-size.js +7 -8
  282. package/build-module/hooks/font-size.js.map +1 -1
  283. package/build-module/hooks/index.js +1 -1
  284. package/build-module/hooks/index.js.map +1 -1
  285. package/build-module/hooks/layout-child.js +89 -1
  286. package/build-module/hooks/layout-child.js.map +1 -1
  287. package/build-module/hooks/layout.js +11 -4
  288. package/build-module/hooks/layout.js.map +1 -1
  289. package/build-module/hooks/line-height.js.map +1 -1
  290. package/build-module/hooks/position.js +0 -1
  291. package/build-module/hooks/position.js.map +1 -1
  292. package/build-module/hooks/spacing-visualizer.js +106 -0
  293. package/build-module/hooks/spacing-visualizer.js.map +1 -0
  294. package/build-module/hooks/use-typography-props.js +2 -3
  295. package/build-module/hooks/use-typography-props.js.map +1 -1
  296. package/build-module/layouts/grid.js +113 -16
  297. package/build-module/layouts/grid.js.map +1 -1
  298. package/build-module/private-apis.js +2 -2
  299. package/build-module/private-apis.js.map +1 -1
  300. package/build-module/store/actions.js +4 -36
  301. package/build-module/store/actions.js.map +1 -1
  302. package/build-module/store/private-actions.js +29 -45
  303. package/build-module/store/private-actions.js.map +1 -1
  304. package/build-module/store/reducer.js +2 -4
  305. package/build-module/store/reducer.js.map +1 -1
  306. package/build-module/store/selectors.js +23 -13
  307. package/build-module/store/selectors.js.map +1 -1
  308. package/build-module/utils/calculate-scale.js +11 -0
  309. package/build-module/utils/calculate-scale.js.map +1 -0
  310. package/build-style/content-rtl.css +7 -2
  311. package/build-style/content.css +7 -2
  312. package/build-style/style-rtl.css +55 -25
  313. package/build-style/style.css +55 -25
  314. package/package.json +31 -32
  315. package/src/components/block-canvas/index.js +2 -0
  316. package/src/components/block-draggable/test/index.native.js +2 -2
  317. package/src/components/block-heading-level-dropdown/index.js +17 -25
  318. package/src/components/block-inspector/index.js +0 -11
  319. package/src/components/block-list/block-invalid-warning.native.js +1 -1
  320. package/src/components/block-list/block-list-item.native.js +1 -1
  321. package/src/components/block-list/block-outline.native.js +36 -21
  322. package/src/components/block-list/block-selection-button.native.js +1 -3
  323. package/src/components/block-list/block.native.js +0 -3
  324. package/src/components/block-list/content.scss +5 -1
  325. package/src/components/block-list/index.js +55 -55
  326. package/src/components/block-list/test/block-outline.native.js +255 -0
  327. package/src/components/block-mover/index.native.js +1 -1
  328. package/src/components/block-popover/cover.js +63 -0
  329. package/src/components/block-popover/drop-zone.js +3 -4
  330. package/src/components/block-popover/index.js +1 -28
  331. package/src/components/block-preview/index.js +3 -1
  332. package/src/components/block-removal-warning-modal/index.js +5 -19
  333. package/src/components/block-rename/modal.js +1 -1
  334. package/src/components/block-settings-menu/block-parent-selector-menu-item.js +50 -0
  335. package/src/components/block-settings-menu/block-settings-dropdown.js +9 -50
  336. package/src/components/block-styles/style.scss +0 -4
  337. package/src/components/block-switcher/block-transformations-menu.native.js +1 -1
  338. package/src/components/block-toolbar/block-toolbar-menu.native.js +2 -2
  339. package/src/components/block-toolbar/index.js +5 -11
  340. package/src/components/block-toolbar/shuffle.js +93 -0
  341. package/src/components/block-toolbar/use-has-block-toolbar.js +49 -0
  342. package/src/components/block-tools/block-selection-button.js +4 -0
  343. package/src/components/block-tools/empty-block-inserter.js +3 -6
  344. package/src/components/block-tools/index.js +13 -36
  345. package/src/components/block-tools/use-show-block-tools.js +73 -0
  346. package/src/components/caption/index.native.js +1 -1
  347. package/src/components/child-layout-control/index.js +85 -44
  348. package/src/components/color-palette/control.js +1 -1
  349. package/src/components/colors-gradients/control.js +1 -1
  350. package/src/components/colors-gradients/test/control.js +2 -2
  351. package/src/components/contrast-checker/test/index.js +10 -10
  352. package/src/components/date-format-picker/index.js +0 -1
  353. package/src/components/default-block-appender/content.scss +5 -2
  354. package/src/components/font-appearance-control/index.js +0 -1
  355. package/src/components/global-styles/border-panel.js +2 -2
  356. package/src/components/global-styles/color-panel.js +1 -1
  357. package/src/components/global-styles/dimensions-panel.js +36 -24
  358. package/src/components/global-styles/image-settings-panel.js +1 -1
  359. package/src/components/global-styles/test/typography-utils.js +231 -81
  360. package/src/components/global-styles/test/use-global-styles-output.js +3 -2
  361. package/src/components/global-styles/typography-utils.js +10 -7
  362. package/src/components/global-styles/use-global-styles-output.js +14 -16
  363. package/src/components/global-styles/utils.js +2 -8
  364. package/src/components/grid-visualizer/grid-item-resizer.js +100 -0
  365. package/src/components/grid-visualizer/grid-visualizer.js +81 -0
  366. package/src/components/grid-visualizer/index.js +2 -0
  367. package/src/components/grid-visualizer/style.scss +33 -0
  368. package/src/components/grid-visualizer/utils.js +5 -0
  369. package/src/components/iframe/index.js +78 -31
  370. package/src/components/index.native.js +1 -0
  371. package/src/components/inner-blocks/use-nested-settings-update.js +12 -2
  372. package/src/components/inserter/media-tab/media-preview.js +1 -1
  373. package/src/components/inserter/menu.js +10 -4
  374. package/src/components/inserter/menu.native.js +3 -3
  375. package/src/components/inserter/mobile-tab-navigation.js +1 -1
  376. package/src/components/inserter/search-results.js +2 -1
  377. package/src/components/inserter/style.scss +10 -0
  378. package/src/components/inserter/tabs.js +2 -1
  379. package/src/components/inspector-controls/block-support-tools-panel.js +2 -2
  380. package/src/components/inspector-controls-tabs/index.js +1 -1
  381. package/src/components/inspector-controls-tabs/styles-tab.js +0 -7
  382. package/src/components/line-height-control/test/index.js +1 -1
  383. package/src/components/link-control/search-input.js +1 -1
  384. package/src/components/list-view/branch.js +1 -1
  385. package/src/components/list-view/drop-indicator.js +1 -1
  386. package/src/components/list-view/index.js +1 -1
  387. package/src/components/observe-typing/index.js +7 -10
  388. package/src/components/panel-color-settings/index.js +1 -1
  389. package/src/components/panel-color-settings/test/index.js +3 -3
  390. package/src/components/provider/index.js +1 -4
  391. package/src/components/resizable-box-popover/index.js +4 -6
  392. package/src/components/responsive-block-control/README.md +4 -4
  393. package/src/components/responsive-block-control/index.js +1 -1
  394. package/src/components/responsive-block-control/test/index.js +5 -5
  395. package/src/components/rich-text/format-toolbar-container.js +1 -48
  396. package/src/components/rich-text/index.js +1 -2
  397. package/src/components/skip-to-selected-block/index.js +10 -13
  398. package/src/components/spacing-sizes-control/input-controls/spacing-input-control.js +4 -5
  399. package/src/components/url-input/index.js +6 -15
  400. package/src/hooks/anchor.scss +1 -1
  401. package/src/hooks/background.js +1 -1
  402. package/src/hooks/block-hooks.js +1 -1
  403. package/src/hooks/dimensions.js +1 -2
  404. package/src/hooks/font-size.js +7 -12
  405. package/src/hooks/index.js +1 -0
  406. package/src/hooks/layout-child.js +91 -1
  407. package/src/hooks/layout.js +12 -1
  408. package/src/hooks/line-height.js +1 -1
  409. package/src/hooks/position.js +0 -1
  410. package/src/hooks/spacing-visualizer.js +126 -0
  411. package/src/hooks/{padding.scss → spacing.scss} +1 -1
  412. package/src/hooks/use-typography-props.js +2 -8
  413. package/src/layouts/grid.js +137 -53
  414. package/src/layouts/test/grid.js +16 -2
  415. package/src/private-apis.js +2 -2
  416. package/src/store/actions.js +4 -42
  417. package/src/store/private-actions.js +34 -69
  418. package/src/store/reducer.js +2 -8
  419. package/src/store/selectors.js +41 -46
  420. package/src/store/test/actions.js +0 -105
  421. package/src/style.scss +2 -2
  422. package/src/utils/calculate-scale.js +20 -0
  423. package/build/components/default-style-picker/index.js +0 -70
  424. package/build/components/default-style-picker/index.js.map +0 -1
  425. package/build/hooks/margin.js +0 -86
  426. package/build/hooks/margin.js.map +0 -1
  427. package/build/hooks/padding.js +0 -78
  428. package/build/hooks/padding.js.map +0 -1
  429. package/build/utils/use-can-block-toolbar-be-focused.js +0 -46
  430. package/build/utils/use-can-block-toolbar-be-focused.js.map +0 -1
  431. package/build-module/components/default-style-picker/index.js +0 -63
  432. package/build-module/components/default-style-picker/index.js.map +0 -1
  433. package/build-module/hooks/margin.js +0 -78
  434. package/build-module/hooks/margin.js.map +0 -1
  435. package/build-module/hooks/padding.js +0 -70
  436. package/build-module/hooks/padding.js.map +0 -1
  437. package/build-module/utils/use-can-block-toolbar-be-focused.js +0 -40
  438. package/build-module/utils/use-can-block-toolbar-be-focused.js.map +0 -1
  439. package/src/components/block-settings-menu/style.scss +0 -3
  440. package/src/components/default-style-picker/index.js +0 -70
  441. package/src/hooks/margin.js +0 -91
  442. package/src/hooks/padding.js +0 -82
  443. package/src/utils/use-can-block-toolbar-be-focused.js +0 -48
@@ -1 +1 @@
1
- {"version":3,"names":["Platform","undoIgnoreBlocks","castArray","maybeArray","Array","isArray","privateSettings","__experimentalUpdateSettings","settings","stripExperimentalSettings","reset","cleanSettings","OS","key","includes","type","hideBlockInterface","showBlockInterface","privateRemoveBlocks","clientIds","selectPrevious","forceRemove","select","dispatch","registry","length","rootClientId","getBlockRootClientId","canRemoveBlocks","rules","getBlockRemovalRules","blockNamesForPrompt","Set","queue","messageType","clientId","shift","blockName","getBlockName","add","parentPatternBlocks","getBlockParentsByBlockName","blockAttributes","getBlockAttributes","metadata","bindings","JSON","stringify","innerBlocks","getBlockOrder","push","size","displayBlockRemovalPrompt","from","selectPreviousBlock","batch","ensureDefaultBlock","count","getBlockCount","__unstableHasCustomAppender","getSettings","insertDefaultBlock","clearBlockRemovalPrompt","setBlockRemovalRules","setOpenedBlockSettingsMenu","setStyleOverride","id","style","deleteStyleOverride","syncDerivedUpdates","callback","isPersistentChange","undefined","updatedBlocks","getBlocks","setLastFocus","lastFocus","stopEditingAsBlocks","focusModeToRevert","__unstableGetTemporarilyEditingFocusModeToRevert","__unstableMarkNextChangeAsNotPersistent","updateBlockAttributes","templateLock","updateBlockListSettings","getBlockListSettings","updateSettings","focusMode","__unstableSetTemporarilyEditingAsBlocks","startDragging","stopDragging"],"sources":["@wordpress/block-editor/src/store/private-actions.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Platform } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { undoIgnoreBlocks } from './undo-ignore';\n\nconst castArray = ( maybeArray ) =>\n\tArray.isArray( maybeArray ) ? maybeArray : [ maybeArray ];\n\n/**\n * A list of private/experimental block editor settings that\n * should not become a part of the WordPress public API.\n * BlockEditorProvider will remove these settings from the\n * settings object it receives.\n *\n * @see https://github.com/WordPress/gutenberg/pull/46131\n */\nconst privateSettings = [\n\t'inserterMediaCategories',\n\t'blockInspectorAnimation',\n];\n\n/**\n * Action that updates the block editor settings and\n * conditionally preserves the experimental ones.\n *\n * @param {Object} settings Updated settings\n * @param {Object} options Options object.\n * @param {boolean} options.stripExperimentalSettings Whether to strip experimental settings.\n * @param {boolean} options.reset Whether to reset the settings.\n * @return {Object} Action object\n */\nexport function __experimentalUpdateSettings(\n\tsettings,\n\t{ stripExperimentalSettings = false, reset = false } = {}\n) {\n\tlet cleanSettings = settings;\n\t// There are no plugins in the mobile apps, so there is no\n\t// need to strip the experimental settings:\n\tif ( stripExperimentalSettings && Platform.OS === 'web' ) {\n\t\tcleanSettings = {};\n\t\tfor ( const key in settings ) {\n\t\t\tif ( ! privateSettings.includes( key ) ) {\n\t\t\t\tcleanSettings[ key ] = settings[ key ];\n\t\t\t}\n\t\t}\n\t}\n\treturn {\n\t\ttype: 'UPDATE_SETTINGS',\n\t\tsettings: cleanSettings,\n\t\treset,\n\t};\n}\n\n/**\n * Hides the block interface (eg. toolbar, outline, etc.)\n *\n * @return {Object} Action object.\n */\nexport function hideBlockInterface() {\n\treturn {\n\t\ttype: 'HIDE_BLOCK_INTERFACE',\n\t};\n}\n\n/**\n * Shows the block interface (eg. toolbar, outline, etc.)\n *\n * @return {Object} Action object.\n */\nexport function showBlockInterface() {\n\treturn {\n\t\ttype: 'SHOW_BLOCK_INTERFACE',\n\t};\n}\n\n/**\n * Yields action objects used in signalling that the blocks corresponding to\n * the set of specified client IDs are to be removed.\n *\n * Compared to `removeBlocks`, this private interface exposes an additional\n * parameter; see `forceRemove`.\n *\n * @param {string|string[]} clientIds Client IDs of blocks to remove.\n * @param {boolean} selectPrevious True if the previous block\n * or the immediate parent\n * (if no previous block exists)\n * should be selected\n * when a block is removed.\n * @param {boolean} forceRemove Whether to force the operation,\n * bypassing any checks for certain\n * block types.\n */\nexport const privateRemoveBlocks =\n\t( clientIds, selectPrevious = true, forceRemove = false ) =>\n\t( { select, dispatch, registry } ) => {\n\t\tif ( ! clientIds || ! clientIds.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\tclientIds = castArray( clientIds );\n\t\tconst rootClientId = select.getBlockRootClientId( clientIds[ 0 ] );\n\t\tconst canRemoveBlocks = select.canRemoveBlocks(\n\t\t\tclientIds,\n\t\t\trootClientId\n\t\t);\n\n\t\tif ( ! canRemoveBlocks ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// In certain editing contexts, we'd like to prevent accidental removal\n\t\t// of important blocks. For example, in the site editor, the Query Loop\n\t\t// block is deemed important. In such cases, we'll ask the user for\n\t\t// confirmation that they intended to remove such block(s). However,\n\t\t// the editor instance is responsible for presenting those confirmation\n\t\t// prompts to the user. Any instance opting into removal prompts must\n\t\t// register using `setBlockRemovalRules()`.\n\t\t//\n\t\t// @see https://github.com/WordPress/gutenberg/pull/51145\n\t\tconst rules = ! forceRemove && select.getBlockRemovalRules();\n\t\tif ( rules ) {\n\t\t\tconst blockNamesForPrompt = new Set();\n\n\t\t\t// Given a list of client IDs of blocks that the user intended to\n\t\t\t// remove, perform a tree search (BFS) to find all block names\n\t\t\t// corresponding to \"important\" blocks, i.e. blocks that require a\n\t\t\t// removal prompt.\n\t\t\tconst queue = [ ...clientIds ];\n\t\t\tlet messageType = 'templates';\n\t\t\twhile ( queue.length ) {\n\t\t\t\tconst clientId = queue.shift();\n\t\t\t\tconst blockName = select.getBlockName( clientId );\n\t\t\t\tif ( rules[ blockName ] ) {\n\t\t\t\t\tblockNamesForPrompt.add( blockName );\n\t\t\t\t}\n\n\t\t\t\tif ( rules[ 'bindings/core/pattern-overrides' ] ) {\n\t\t\t\t\tconst parentPatternBlocks =\n\t\t\t\t\t\tselect.getBlockParentsByBlockName(\n\t\t\t\t\t\t\tclientId,\n\t\t\t\t\t\t\t'core/block'\n\t\t\t\t\t\t);\n\t\t\t\t\t// We only need to run this check when editing the original pattern, not pattern instances.\n\t\t\t\t\tif ( parentPatternBlocks?.length > 0 ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tconst blockAttributes =\n\t\t\t\t\t\tselect.getBlockAttributes( clientId );\n\t\t\t\t\tif (\n\t\t\t\t\t\tblockAttributes?.metadata?.bindings &&\n\t\t\t\t\t\tJSON.stringify(\n\t\t\t\t\t\t\tblockAttributes.metadata.bindings\n\t\t\t\t\t\t).includes( 'core/pattern-overrides' )\n\t\t\t\t\t) {\n\t\t\t\t\t\tblockNamesForPrompt.add( blockName );\n\t\t\t\t\t\tmessageType = 'patternOverrides';\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tconst innerBlocks = select.getBlockOrder( clientId );\n\t\t\t\tqueue.push( ...innerBlocks );\n\t\t\t}\n\n\t\t\t// If any such blocks were found, trigger the removal prompt and\n\t\t\t// skip any other steps (thus postponing actual removal).\n\t\t\tif ( blockNamesForPrompt.size ) {\n\t\t\t\tdispatch(\n\t\t\t\t\tdisplayBlockRemovalPrompt(\n\t\t\t\t\t\tclientIds,\n\t\t\t\t\t\tselectPrevious,\n\t\t\t\t\t\tArray.from( blockNamesForPrompt ),\n\t\t\t\t\t\tmessageType\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tif ( selectPrevious ) {\n\t\t\tdispatch.selectPreviousBlock( clientIds[ 0 ], selectPrevious );\n\t\t}\n\n\t\t// We're batching these two actions because an extra `undo/redo` step can\n\t\t// be created, based on whether we insert a default block or not.\n\t\tregistry.batch( () => {\n\t\t\tdispatch( { type: 'REMOVE_BLOCKS', clientIds } );\n\t\t\t// To avoid a focus loss when removing the last block, assure there is\n\t\t\t// always a default block if the last of the blocks have been removed.\n\t\t\tdispatch( ensureDefaultBlock() );\n\t\t} );\n\t};\n\n/**\n * Action which will insert a default block insert action if there\n * are no other blocks at the root of the editor. This action should be used\n * in actions which may result in no blocks remaining in the editor (removal,\n * replacement, etc).\n */\nexport const ensureDefaultBlock =\n\t() =>\n\t( { select, dispatch } ) => {\n\t\t// To avoid a focus loss when removing the last block, assure there is\n\t\t// always a default block if the last of the blocks have been removed.\n\t\tconst count = select.getBlockCount();\n\t\tif ( count > 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If there's an custom appender, don't insert default block.\n\t\t// We have to remember to manually move the focus elsewhere to\n\t\t// prevent it from being lost though.\n\t\tconst { __unstableHasCustomAppender } = select.getSettings();\n\t\tif ( __unstableHasCustomAppender ) {\n\t\t\treturn;\n\t\t}\n\n\t\tdispatch.insertDefaultBlock();\n\t};\n\n/**\n * Returns an action object used in signalling that a block removal prompt must\n * be displayed.\n *\n * Contrast with `setBlockRemovalRules`.\n *\n * @param {string|string[]} clientIds Client IDs of blocks to remove.\n * @param {boolean} selectPrevious True if the previous block\n * or the immediate parent\n * (if no previous block exists)\n * should be selected\n * when a block is removed.\n * @param {string[]} blockNamesForPrompt Names of the blocks that\n * triggered the need for\n * confirmation before removal.\n * @param {string} messageType The type of message to display.\n *\n * @return {Object} Action object.\n */\nfunction displayBlockRemovalPrompt(\n\tclientIds,\n\tselectPrevious,\n\tblockNamesForPrompt,\n\tmessageType\n) {\n\treturn {\n\t\ttype: 'DISPLAY_BLOCK_REMOVAL_PROMPT',\n\t\tclientIds,\n\t\tselectPrevious,\n\t\tblockNamesForPrompt,\n\t\tmessageType,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that a block removal prompt must\n * be cleared, either be cause the user has confirmed or canceled the request\n * for removal.\n *\n * @return {Object} Action object.\n */\nexport function clearBlockRemovalPrompt() {\n\treturn {\n\t\ttype: 'CLEAR_BLOCK_REMOVAL_PROMPT',\n\t};\n}\n\n/**\n * Returns an action object used to set up any rules that a block editor may\n * provide in order to prevent a user from accidentally removing certain\n * blocks. These rules are then used to display a confirmation prompt to the\n * user. For instance, in the Site Editor, the Query Loop block is important\n * enough to warrant such confirmation.\n *\n * IMPORTANT: Registering rules implicitly signals to the `privateRemoveBlocks`\n * action that the editor will be responsible for displaying block removal\n * prompts and confirming deletions. This action is meant to be used by\n * component `BlockRemovalWarningModal` only.\n *\n * The data is a record whose keys are block types (e.g. 'core/query') and\n * whose values are the explanation to be shown to users (e.g. 'Query Loop\n * displays a list of posts or pages.').\n *\n * Contrast with `displayBlockRemovalPrompt`.\n *\n * @param {Record<string,string>|false} rules Block removal rules.\n * @return {Object} Action object.\n */\nexport function setBlockRemovalRules( rules = false ) {\n\treturn {\n\t\ttype: 'SET_BLOCK_REMOVAL_RULES',\n\t\trules,\n\t};\n}\n\n/**\n * Sets the client ID of the block settings menu that is currently open.\n *\n * @param {?string} clientId The block client ID.\n * @return {Object} Action object.\n */\nexport function setOpenedBlockSettingsMenu( clientId ) {\n\treturn {\n\t\ttype: 'SET_OPENED_BLOCK_SETTINGS_MENU',\n\t\tclientId,\n\t};\n}\n\nexport function setStyleOverride( id, style ) {\n\treturn {\n\t\ttype: 'SET_STYLE_OVERRIDE',\n\t\tid,\n\t\tstyle,\n\t};\n}\n\nexport function deleteStyleOverride( id ) {\n\treturn {\n\t\ttype: 'DELETE_STYLE_OVERRIDE',\n\t\tid,\n\t};\n}\n\n/**\n * A higher-order action that mark every change inside a callback as \"non-persistent\"\n * and ignore pushing to the undo history stack. It's primarily used for synchronized\n * derived updates from the block editor without affecting the undo history.\n *\n * @param {() => void} callback The synchronous callback to derive updates.\n */\nexport function syncDerivedUpdates( callback ) {\n\treturn ( { dispatch, select, registry } ) => {\n\t\tregistry.batch( () => {\n\t\t\t// Mark every change in the `callback` as non-persistent.\n\t\t\tdispatch( {\n\t\t\t\ttype: 'SET_EXPLICIT_PERSISTENT',\n\t\t\t\tisPersistentChange: false,\n\t\t\t} );\n\t\t\tcallback();\n\t\t\tdispatch( {\n\t\t\t\ttype: 'SET_EXPLICIT_PERSISTENT',\n\t\t\t\tisPersistentChange: undefined,\n\t\t\t} );\n\n\t\t\t// Ignore pushing undo stack for the updated blocks.\n\t\t\tconst updatedBlocks = select.getBlocks();\n\t\t\tundoIgnoreBlocks.add( updatedBlocks );\n\t\t} );\n\t};\n}\n\n/**\n * Action that sets the element that had focus when focus leaves the editor canvas.\n *\n * @param {Object} lastFocus The last focused element.\n *\n *\n * @return {Object} Action object.\n */\nexport function setLastFocus( lastFocus = null ) {\n\treturn {\n\t\ttype: 'LAST_FOCUS',\n\t\tlastFocus,\n\t};\n}\n\n/**\n * Action that stops temporarily editing as blocks.\n *\n * @param {string} clientId The block's clientId.\n */\nexport function stopEditingAsBlocks( clientId ) {\n\treturn ( { select, dispatch } ) => {\n\t\tconst focusModeToRevert =\n\t\t\tselect.__unstableGetTemporarilyEditingFocusModeToRevert();\n\t\tdispatch.__unstableMarkNextChangeAsNotPersistent();\n\t\tdispatch.updateBlockAttributes( clientId, {\n\t\t\ttemplateLock: 'contentOnly',\n\t\t} );\n\t\tdispatch.updateBlockListSettings( clientId, {\n\t\t\t...select.getBlockListSettings( clientId ),\n\t\t\ttemplateLock: 'contentOnly',\n\t\t} );\n\t\tdispatch.updateSettings( { focusMode: focusModeToRevert } );\n\t\tdispatch.__unstableSetTemporarilyEditingAsBlocks();\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the user has begun to drag.\n *\n * @return {Object} Action object.\n */\nexport function startDragging() {\n\treturn {\n\t\ttype: 'START_DRAGGING',\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the user has stopped dragging.\n *\n * @return {Object} Action object.\n */\nexport function stopDragging() {\n\treturn {\n\t\ttype: 'STOP_DRAGGING',\n\t};\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,QAAQ,QAAQ,oBAAoB;;AAE7C;AACA;AACA;AACA,SAASC,gBAAgB,QAAQ,eAAe;AAEhD,MAAMC,SAAS,GAAKC,UAAU,IAC7BC,KAAK,CAACC,OAAO,CAAEF,UAAW,CAAC,GAAGA,UAAU,GAAG,CAAEA,UAAU,CAAE;;AAE1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMG,eAAe,GAAG,CACvB,yBAAyB,EACzB,yBAAyB,CACzB;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,4BAA4BA,CAC3CC,QAAQ,EACR;EAAEC,yBAAyB,GAAG,KAAK;EAAEC,KAAK,GAAG;AAAM,CAAC,GAAG,CAAC,CAAC,EACxD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,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASE,YAAYA,CAAEC,SAAS,GAAG,IAAI,EAAG;EAChD,OAAO;IACN7D,IAAI,EAAE,YAAY;IAClB6D;EACD,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,mBAAmBA,CAAE1C,QAAQ,EAAG;EAC/C,OAAO,CAAE;IAAEb,MAAM;IAAEC;EAAS,CAAC,KAAM;IAClC,MAAMuD,iBAAiB,GACtBxD,MAAM,CAACyD,gDAAgD,CAAC,CAAC;IAC1DxD,QAAQ,CAACyD,uCAAuC,CAAC,CAAC;IAClDzD,QAAQ,CAAC0D,qBAAqB,CAAE9C,QAAQ,EAAE;MACzC+C,YAAY,EAAE;IACf,CAAE,CAAC;IACH3D,QAAQ,CAAC4D,uBAAuB,CAAEhD,QAAQ,EAAE;MAC3C,GAAGb,MAAM,CAAC8D,oBAAoB,CAAEjD,QAAS,CAAC;MAC1C+C,YAAY,EAAE;IACf,CAAE,CAAC;IACH3D,QAAQ,CAAC8D,cAAc,CAAE;MAAEC,SAAS,EAAER;IAAkB,CAAE,CAAC;IAC3DvD,QAAQ,CAACgE,uCAAuC,CAAC,CAAC;EACnD,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,aAAaA,CAAA,EAAG;EAC/B,OAAO;IACNzE,IAAI,EAAE;EACP,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAAS0E,YAAYA,CAAA,EAAG;EAC9B,OAAO;IACN1E,IAAI,EAAE;EACP,CAAC;AACF"}
1
+ {"version":3,"names":["Platform","undoIgnoreBlocks","castArray","maybeArray","Array","isArray","privateSettings","__experimentalUpdateSettings","settings","stripExperimentalSettings","reset","cleanSettings","OS","key","includes","type","hideBlockInterface","showBlockInterface","privateRemoveBlocks","clientIds","selectPrevious","forceRemove","select","dispatch","registry","length","rootClientId","getBlockRootClientId","canRemoveBlocks","rules","getBlockRemovalRules","flattenBlocks","blocks","result","stack","innerBlocks","block","shift","push","blockList","map","getBlock","flattenedBlocks","message","rule","callback","displayBlockRemovalPrompt","selectPreviousBlock","batch","ensureDefaultBlock","count","getBlockCount","__unstableHasCustomAppender","getSettings","insertDefaultBlock","clearBlockRemovalPrompt","setBlockRemovalRules","setOpenedBlockSettingsMenu","clientId","setStyleOverride","id","style","deleteStyleOverride","syncDerivedUpdates","isPersistentChange","undefined","updatedBlocks","getBlocks","add","setLastFocus","lastFocus","stopEditingAsBlocks","focusModeToRevert","__unstableGetTemporarilyEditingFocusModeToRevert","__unstableMarkNextChangeAsNotPersistent","updateBlockAttributes","templateLock","updateBlockListSettings","getBlockListSettings","updateSettings","focusMode","__unstableSetTemporarilyEditingAsBlocks","startDragging","stopDragging"],"sources":["@wordpress/block-editor/src/store/private-actions.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Platform } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { undoIgnoreBlocks } from './undo-ignore';\n\nconst castArray = ( maybeArray ) =>\n\tArray.isArray( maybeArray ) ? maybeArray : [ maybeArray ];\n\n/**\n * A list of private/experimental block editor settings that\n * should not become a part of the WordPress public API.\n * BlockEditorProvider will remove these settings from the\n * settings object it receives.\n *\n * @see https://github.com/WordPress/gutenberg/pull/46131\n */\nconst privateSettings = [\n\t'inserterMediaCategories',\n\t'blockInspectorAnimation',\n];\n\n/**\n * Action that updates the block editor settings and\n * conditionally preserves the experimental ones.\n *\n * @param {Object} settings Updated settings\n * @param {Object} options Options object.\n * @param {boolean} options.stripExperimentalSettings Whether to strip experimental settings.\n * @param {boolean} options.reset Whether to reset the settings.\n * @return {Object} Action object\n */\nexport function __experimentalUpdateSettings(\n\tsettings,\n\t{ stripExperimentalSettings = false, reset = false } = {}\n) {\n\tlet cleanSettings = settings;\n\t// There are no plugins in the mobile apps, so there is no\n\t// need to strip the experimental settings:\n\tif ( stripExperimentalSettings && Platform.OS === 'web' ) {\n\t\tcleanSettings = {};\n\t\tfor ( const key in settings ) {\n\t\t\tif ( ! privateSettings.includes( key ) ) {\n\t\t\t\tcleanSettings[ key ] = settings[ key ];\n\t\t\t}\n\t\t}\n\t}\n\treturn {\n\t\ttype: 'UPDATE_SETTINGS',\n\t\tsettings: cleanSettings,\n\t\treset,\n\t};\n}\n\n/**\n * Hides the block interface (eg. toolbar, outline, etc.)\n *\n * @return {Object} Action object.\n */\nexport function hideBlockInterface() {\n\treturn {\n\t\ttype: 'HIDE_BLOCK_INTERFACE',\n\t};\n}\n\n/**\n * Shows the block interface (eg. toolbar, outline, etc.)\n *\n * @return {Object} Action object.\n */\nexport function showBlockInterface() {\n\treturn {\n\t\ttype: 'SHOW_BLOCK_INTERFACE',\n\t};\n}\n\n/**\n * Yields action objects used in signalling that the blocks corresponding to\n * the set of specified client IDs are to be removed.\n *\n * Compared to `removeBlocks`, this private interface exposes an additional\n * parameter; see `forceRemove`.\n *\n * @param {string|string[]} clientIds Client IDs of blocks to remove.\n * @param {boolean} selectPrevious True if the previous block\n * or the immediate parent\n * (if no previous block exists)\n * should be selected\n * when a block is removed.\n * @param {boolean} forceRemove Whether to force the operation,\n * bypassing any checks for certain\n * block types.\n */\nexport const privateRemoveBlocks =\n\t( clientIds, selectPrevious = true, forceRemove = false ) =>\n\t( { select, dispatch, registry } ) => {\n\t\tif ( ! clientIds || ! clientIds.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\tclientIds = castArray( clientIds );\n\t\tconst rootClientId = select.getBlockRootClientId( clientIds[ 0 ] );\n\t\tconst canRemoveBlocks = select.canRemoveBlocks(\n\t\t\tclientIds,\n\t\t\trootClientId\n\t\t);\n\n\t\tif ( ! canRemoveBlocks ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// In certain editing contexts, we'd like to prevent accidental removal\n\t\t// of important blocks. For example, in the site editor, the Query Loop\n\t\t// block is deemed important. In such cases, we'll ask the user for\n\t\t// confirmation that they intended to remove such block(s). However,\n\t\t// the editor instance is responsible for presenting those confirmation\n\t\t// prompts to the user. Any instance opting into removal prompts must\n\t\t// register using `setBlockRemovalRules()`.\n\t\t//\n\t\t// @see https://github.com/WordPress/gutenberg/pull/51145\n\t\tconst rules = ! forceRemove && select.getBlockRemovalRules();\n\n\t\tif ( rules ) {\n\t\t\tfunction flattenBlocks( blocks ) {\n\t\t\t\tconst result = [];\n\t\t\t\tconst stack = [ ...blocks ];\n\t\t\t\twhile ( stack.length ) {\n\t\t\t\t\tconst { innerBlocks, ...block } = stack.shift();\n\t\t\t\t\tstack.push( ...innerBlocks );\n\t\t\t\t\tresult.push( block );\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t}\n\n\t\t\tconst blockList = clientIds.map( select.getBlock );\n\t\t\tconst flattenedBlocks = flattenBlocks( blockList );\n\n\t\t\t// Find the first message and use it.\n\t\t\tlet message;\n\t\t\tfor ( const rule of rules ) {\n\t\t\t\tmessage = rule.callback( flattenedBlocks );\n\t\t\t\tif ( message ) {\n\t\t\t\t\tdispatch(\n\t\t\t\t\t\tdisplayBlockRemovalPrompt(\n\t\t\t\t\t\t\tclientIds,\n\t\t\t\t\t\t\tselectPrevious,\n\t\t\t\t\t\t\tmessage\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( selectPrevious ) {\n\t\t\tdispatch.selectPreviousBlock( clientIds[ 0 ], selectPrevious );\n\t\t}\n\n\t\t// We're batching these two actions because an extra `undo/redo` step can\n\t\t// be created, based on whether we insert a default block or not.\n\t\tregistry.batch( () => {\n\t\t\tdispatch( { type: 'REMOVE_BLOCKS', clientIds } );\n\t\t\t// To avoid a focus loss when removing the last block, assure there is\n\t\t\t// always a default block if the last of the blocks have been removed.\n\t\t\tdispatch( ensureDefaultBlock() );\n\t\t} );\n\t};\n\n/**\n * Action which will insert a default block insert action if there\n * are no other blocks at the root of the editor. This action should be used\n * in actions which may result in no blocks remaining in the editor (removal,\n * replacement, etc).\n */\nexport const ensureDefaultBlock =\n\t() =>\n\t( { select, dispatch } ) => {\n\t\t// To avoid a focus loss when removing the last block, assure there is\n\t\t// always a default block if the last of the blocks have been removed.\n\t\tconst count = select.getBlockCount();\n\t\tif ( count > 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If there's an custom appender, don't insert default block.\n\t\t// We have to remember to manually move the focus elsewhere to\n\t\t// prevent it from being lost though.\n\t\tconst { __unstableHasCustomAppender } = select.getSettings();\n\t\tif ( __unstableHasCustomAppender ) {\n\t\t\treturn;\n\t\t}\n\n\t\tdispatch.insertDefaultBlock();\n\t};\n\n/**\n * Returns an action object used in signalling that a block removal prompt must\n * be displayed.\n *\n * Contrast with `setBlockRemovalRules`.\n *\n * @param {string|string[]} clientIds Client IDs of blocks to remove.\n * @param {boolean} selectPrevious True if the previous block or the\n * immediate parent (if no previous\n * block exists) should be selected\n * when a block is removed.\n * @param {string} message Message to display in the prompt.\n *\n * @return {Object} Action object.\n */\nfunction displayBlockRemovalPrompt( clientIds, selectPrevious, message ) {\n\treturn {\n\t\ttype: 'DISPLAY_BLOCK_REMOVAL_PROMPT',\n\t\tclientIds,\n\t\tselectPrevious,\n\t\tmessage,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that a block removal prompt must\n * be cleared, either be cause the user has confirmed or canceled the request\n * for removal.\n *\n * @return {Object} Action object.\n */\nexport function clearBlockRemovalPrompt() {\n\treturn {\n\t\ttype: 'CLEAR_BLOCK_REMOVAL_PROMPT',\n\t};\n}\n\n/**\n * Returns an action object used to set up any rules that a block editor may\n * provide in order to prevent a user from accidentally removing certain\n * blocks. These rules are then used to display a confirmation prompt to the\n * user. For instance, in the Site Editor, the Query Loop block is important\n * enough to warrant such confirmation.\n *\n * IMPORTANT: Registering rules implicitly signals to the `privateRemoveBlocks`\n * action that the editor will be responsible for displaying block removal\n * prompts and confirming deletions. This action is meant to be used by\n * component `BlockRemovalWarningModal` only.\n *\n * The data is a record whose keys are block types (e.g. 'core/query') and\n * whose values are the explanation to be shown to users (e.g. 'Query Loop\n * displays a list of posts or pages.').\n *\n * Contrast with `displayBlockRemovalPrompt`.\n *\n * @param {Record<string,string>|false} rules Block removal rules.\n * @return {Object} Action object.\n */\nexport function setBlockRemovalRules( rules = false ) {\n\treturn {\n\t\ttype: 'SET_BLOCK_REMOVAL_RULES',\n\t\trules,\n\t};\n}\n\n/**\n * Sets the client ID of the block settings menu that is currently open.\n *\n * @param {?string} clientId The block client ID.\n * @return {Object} Action object.\n */\nexport function setOpenedBlockSettingsMenu( clientId ) {\n\treturn {\n\t\ttype: 'SET_OPENED_BLOCK_SETTINGS_MENU',\n\t\tclientId,\n\t};\n}\n\nexport function setStyleOverride( id, style ) {\n\treturn {\n\t\ttype: 'SET_STYLE_OVERRIDE',\n\t\tid,\n\t\tstyle,\n\t};\n}\n\nexport function deleteStyleOverride( id ) {\n\treturn {\n\t\ttype: 'DELETE_STYLE_OVERRIDE',\n\t\tid,\n\t};\n}\n\n/**\n * A higher-order action that mark every change inside a callback as \"non-persistent\"\n * and ignore pushing to the undo history stack. It's primarily used for synchronized\n * derived updates from the block editor without affecting the undo history.\n *\n * @param {() => void} callback The synchronous callback to derive updates.\n */\nexport function syncDerivedUpdates( callback ) {\n\treturn ( { dispatch, select, registry } ) => {\n\t\tregistry.batch( () => {\n\t\t\t// Mark every change in the `callback` as non-persistent.\n\t\t\tdispatch( {\n\t\t\t\ttype: 'SET_EXPLICIT_PERSISTENT',\n\t\t\t\tisPersistentChange: false,\n\t\t\t} );\n\t\t\tcallback();\n\t\t\tdispatch( {\n\t\t\t\ttype: 'SET_EXPLICIT_PERSISTENT',\n\t\t\t\tisPersistentChange: undefined,\n\t\t\t} );\n\n\t\t\t// Ignore pushing undo stack for the updated blocks.\n\t\t\tconst updatedBlocks = select.getBlocks();\n\t\t\tundoIgnoreBlocks.add( updatedBlocks );\n\t\t} );\n\t};\n}\n\n/**\n * Action that sets the element that had focus when focus leaves the editor canvas.\n *\n * @param {Object} lastFocus The last focused element.\n *\n *\n * @return {Object} Action object.\n */\nexport function setLastFocus( lastFocus = null ) {\n\treturn {\n\t\ttype: 'LAST_FOCUS',\n\t\tlastFocus,\n\t};\n}\n\n/**\n * Action that stops temporarily editing as blocks.\n *\n * @param {string} clientId The block's clientId.\n */\nexport function stopEditingAsBlocks( clientId ) {\n\treturn ( { select, dispatch } ) => {\n\t\tconst focusModeToRevert =\n\t\t\tselect.__unstableGetTemporarilyEditingFocusModeToRevert();\n\t\tdispatch.__unstableMarkNextChangeAsNotPersistent();\n\t\tdispatch.updateBlockAttributes( clientId, {\n\t\t\ttemplateLock: 'contentOnly',\n\t\t} );\n\t\tdispatch.updateBlockListSettings( clientId, {\n\t\t\t...select.getBlockListSettings( clientId ),\n\t\t\ttemplateLock: 'contentOnly',\n\t\t} );\n\t\tdispatch.updateSettings( { focusMode: focusModeToRevert } );\n\t\tdispatch.__unstableSetTemporarilyEditingAsBlocks();\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the user has begun to drag.\n *\n * @return {Object} Action object.\n */\nexport function startDragging() {\n\treturn {\n\t\ttype: 'START_DRAGGING',\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the user has stopped dragging.\n *\n * @return {Object} Action object.\n */\nexport function stopDragging() {\n\treturn {\n\t\ttype: 'STOP_DRAGGING',\n\t};\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,QAAQ,QAAQ,oBAAoB;;AAE7C;AACA;AACA;AACA,SAASC,gBAAgB,QAAQ,eAAe;AAEhD,MAAMC,SAAS,GAAKC,UAAU,IAC7BC,KAAK,CAACC,OAAO,CAAEF,UAAW,CAAC,GAAGA,UAAU,GAAG,CAAEA,UAAU,CAAE;;AAE1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMG,eAAe,GAAG,CACvB,yBAAyB,EACzB,yBAAyB,CACzB;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC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AAQ,CAACoD,qBAAqB,CAAEjB,QAAQ,EAAE;MACzCkB,YAAY,EAAE;IACf,CAAE,CAAC;IACHrD,QAAQ,CAACsD,uBAAuB,CAAEnB,QAAQ,EAAE;MAC3C,GAAGpC,MAAM,CAACwD,oBAAoB,CAAEpB,QAAS,CAAC;MAC1CkB,YAAY,EAAE;IACf,CAAE,CAAC;IACHrD,QAAQ,CAACwD,cAAc,CAAE;MAAEC,SAAS,EAAER;IAAkB,CAAE,CAAC;IAC3DjD,QAAQ,CAAC0D,uCAAuC,CAAC,CAAC;EACnD,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,aAAaA,CAAA,EAAG;EAC/B,OAAO;IACNnE,IAAI,EAAE;EACP,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASoE,YAAYA,CAAA,EAAG;EAC9B,OAAO;IACNpE,IAAI,EAAE;EACP,CAAC;AACF"}
@@ -1313,14 +1313,12 @@ function removalPromptData(state = false, action) {
1313
1313
  const {
1314
1314
  clientIds,
1315
1315
  selectPrevious,
1316
- blockNamesForPrompt,
1317
- messageType
1316
+ message
1318
1317
  } = action;
1319
1318
  return {
1320
1319
  clientIds,
1321
1320
  selectPrevious,
1322
- blockNamesForPrompt,
1323
- messageType
1321
+ message
1324
1322
  };
1325
1323
  case 'CLEAR_BLOCK_REMOVAL_PROMPT':
1326
1324
  return false;