@wordpress/block-editor 14.5.0 → 14.6.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 (431) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/README.md +0 -8
  3. package/build/autocompleters/block.js +13 -5
  4. package/build/autocompleters/block.js.map +1 -1
  5. package/build/components/block-canvas/index.js +10 -0
  6. package/build/components/block-canvas/index.js.map +1 -1
  7. package/build/components/block-card/index.js +2 -2
  8. package/build/components/block-card/index.js.map +1 -1
  9. package/build/components/block-full-height-alignment-control/index.js +1 -1
  10. package/build/components/block-full-height-alignment-control/index.js.map +1 -1
  11. package/build/components/block-list/block.js +1 -1
  12. package/build/components/block-list/block.js.map +1 -1
  13. package/build/components/block-list/block.native.js +1 -7
  14. package/build/components/block-list/block.native.js.map +1 -1
  15. package/build/components/block-list/index.js +5 -5
  16. package/build/components/block-list/index.js.map +1 -1
  17. package/build/components/block-list/use-block-props/index.js +1 -2
  18. package/build/components/block-list/use-block-props/index.js.map +1 -1
  19. package/build/components/block-list/use-block-props/use-focus-first-element.js +4 -3
  20. package/build/components/block-list/use-block-props/use-focus-first-element.js.map +1 -1
  21. package/build/components/block-list/use-block-props/use-selected-block-event-handlers.js +3 -6
  22. package/build/components/block-list/use-block-props/use-selected-block-event-handlers.js.map +1 -1
  23. package/build/components/block-list/use-in-between-inserter.js +1 -1
  24. package/build/components/block-list/use-in-between-inserter.js.map +1 -1
  25. package/build/components/block-patterns-paging/index.js +1 -1
  26. package/build/components/block-patterns-paging/index.js.map +1 -1
  27. package/build/components/block-popover/index.js +2 -45
  28. package/build/components/block-popover/index.js.map +1 -1
  29. package/build/components/block-preview/index.js +2 -2
  30. package/build/components/block-preview/index.js.map +1 -1
  31. package/build/components/block-settings-menu/block-settings-dropdown.js +5 -0
  32. package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  33. package/build/components/block-settings-menu/index.js +4 -3
  34. package/build/components/block-settings-menu/index.js.map +1 -1
  35. package/build/components/block-toolbar/change-design.js +122 -0
  36. package/build/components/block-toolbar/change-design.js.map +1 -0
  37. package/build/components/block-toolbar/index.js +19 -7
  38. package/build/components/block-toolbar/index.js.map +1 -1
  39. package/build/components/block-tools/index.js +4 -10
  40. package/build/components/block-tools/index.js.map +1 -1
  41. package/build/components/block-tools/insertion-point.js +4 -3
  42. package/build/components/block-tools/insertion-point.js.map +1 -1
  43. package/build/components/block-tools/use-show-block-tools.js +3 -9
  44. package/build/components/block-tools/use-show-block-tools.js.map +1 -1
  45. package/build/components/block-tools/zoom-out-mode-inserters.js +20 -29
  46. package/build/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
  47. package/build/components/block-variation-transforms/index.js +2 -2
  48. package/build/components/block-variation-transforms/index.js.map +1 -1
  49. package/build/components/block-vertical-alignment-control/ui.js +6 -10
  50. package/build/components/block-vertical-alignment-control/ui.js.map +1 -1
  51. package/build/components/border-radius-control/linked-button.js +7 -10
  52. package/build/components/border-radius-control/linked-button.js.map +1 -1
  53. package/build/components/collab/block-comment-icon-slot.js +18 -0
  54. package/build/components/collab/block-comment-icon-slot.js.map +1 -0
  55. package/build/components/collab/block-comment-icon-toolbar-slot.js +18 -0
  56. package/build/components/collab/block-comment-icon-toolbar-slot.js.map +1 -0
  57. package/build/components/colors-gradients/use-multiple-origin-colors-and-gradients.js +7 -1
  58. package/build/components/colors-gradients/use-multiple-origin-colors-and-gradients.js.map +1 -1
  59. package/build/components/convert-to-group-buttons/toolbar.js +4 -4
  60. package/build/components/convert-to-group-buttons/toolbar.js.map +1 -1
  61. package/build/components/global-styles/color-panel.js +1 -4
  62. package/build/components/global-styles/color-panel.js.map +1 -1
  63. package/build/components/global-styles/use-global-styles-context.native.js +6 -0
  64. package/build/components/global-styles/use-global-styles-context.native.js.map +1 -1
  65. package/build/components/iframe/index.js +17 -22
  66. package/build/components/iframe/index.js.map +1 -1
  67. package/build/components/image-size-control/index.js +61 -20
  68. package/build/components/image-size-control/index.js.map +1 -1
  69. package/build/components/inner-blocks/index.js +9 -5
  70. package/build/components/inner-blocks/index.js.map +1 -1
  71. package/build/components/inserter/block-patterns-tab/pattern-category-previews.js +2 -2
  72. package/build/components/inserter/block-patterns-tab/pattern-category-previews.js.map +1 -1
  73. package/build/components/inserter/block-patterns-tab/patterns-filter.js +1 -1
  74. package/build/components/inserter/block-patterns-tab/patterns-filter.js.map +1 -1
  75. package/build/components/inserter/category-tabs/index.js +15 -2
  76. package/build/components/inserter/category-tabs/index.js.map +1 -1
  77. package/build/components/inserter/menu.js +4 -2
  78. package/build/components/inserter/menu.js.map +1 -1
  79. package/build/components/inserter-button/index.native.js +1 -1
  80. package/build/components/inserter-button/index.native.js.map +1 -1
  81. package/build/components/inspector-controls-tabs/index.js +0 -2
  82. package/build/components/inspector-controls-tabs/index.js.map +1 -1
  83. package/build/components/inspector-controls-tabs/utils.js +3 -6
  84. package/build/components/inspector-controls-tabs/utils.js.map +1 -1
  85. package/build/components/link-control/link-preview.js +12 -9
  86. package/build/components/link-control/link-preview.js.map +1 -1
  87. package/build/components/list-view/appender.js +4 -3
  88. package/build/components/list-view/appender.js.map +1 -1
  89. package/build/components/list-view/branch.js +6 -5
  90. package/build/components/list-view/branch.js.map +1 -1
  91. package/build/components/list-view/index.js +1 -2
  92. package/build/components/list-view/index.js.map +1 -1
  93. package/build/components/provider/index.js +1 -1
  94. package/build/components/provider/index.js.map +1 -1
  95. package/build/components/rich-text/event-listeners/index.js +3 -1
  96. package/build/components/rich-text/event-listeners/index.js.map +1 -1
  97. package/build/components/rich-text/index.native.js +2 -6
  98. package/build/components/rich-text/index.native.js.map +1 -1
  99. package/build/components/spacing-sizes-control/index.js +2 -2
  100. package/build/components/spacing-sizes-control/index.js.map +1 -1
  101. package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js +3 -3
  102. package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
  103. package/build/components/spacing-sizes-control/linked-button.js +1 -5
  104. package/build/components/spacing-sizes-control/linked-button.js.map +1 -1
  105. package/build/components/tool-selector/index.js +1 -4
  106. package/build/components/tool-selector/index.js.map +1 -1
  107. package/build/components/url-input/index.js +1 -1
  108. package/build/components/url-input/index.js.map +1 -1
  109. package/build/components/use-block-commands/index.js +1 -1
  110. package/build/components/use-block-commands/index.js.map +1 -1
  111. package/build/components/use-block-drop-zone/index.js +5 -5
  112. package/build/components/use-block-drop-zone/index.js.map +1 -1
  113. package/build/components/use-block-drop-zone/index.native.js +0 -1
  114. package/build/components/use-block-drop-zone/index.native.js.map +1 -1
  115. package/build/components/use-moving-animation/index.js +1 -3
  116. package/build/components/use-moving-animation/index.js.map +1 -1
  117. package/build/components/use-settings/index.js +1 -3
  118. package/build/components/use-settings/index.js.map +1 -1
  119. package/build/components/writing-flow/index.js +5 -3
  120. package/build/components/writing-flow/index.js.map +1 -1
  121. package/build/components/writing-flow/use-tab-nav.js +2 -3
  122. package/build/components/writing-flow/use-tab-nav.js.map +1 -1
  123. package/build/hooks/block-bindings.js +19 -8
  124. package/build/hooks/block-bindings.js.map +1 -1
  125. package/build/hooks/contrast-checker.js +0 -1
  126. package/build/hooks/contrast-checker.js.map +1 -1
  127. package/build/hooks/duotone.js +2 -2
  128. package/build/hooks/duotone.js.map +1 -1
  129. package/build/hooks/style.js +4 -1
  130. package/build/hooks/style.js.map +1 -1
  131. package/build/hooks/use-zoom-out.js +13 -22
  132. package/build/hooks/use-zoom-out.js.map +1 -1
  133. package/build/index.js +0 -7
  134. package/build/index.js.map +1 -1
  135. package/build/private-apis.js +6 -3
  136. package/build/private-apis.js.map +1 -1
  137. package/build/store/actions.js +2 -33
  138. package/build/store/actions.js.map +1 -1
  139. package/build/store/defaults.js +1 -1
  140. package/build/store/defaults.js.map +1 -1
  141. package/build/store/private-actions.js +57 -8
  142. package/build/store/private-actions.js.map +1 -1
  143. package/build/store/private-selectors.js +9 -21
  144. package/build/store/private-selectors.js.map +1 -1
  145. package/build/store/reducer.js +16 -6
  146. package/build/store/reducer.js.map +1 -1
  147. package/build/store/selectors.js +44 -7
  148. package/build/store/selectors.js.map +1 -1
  149. package/build/utils/dom.js +16 -1
  150. package/build/utils/dom.js.map +1 -1
  151. package/build/utils/get-font-styles-and-weights.js +1 -1
  152. package/build/utils/get-font-styles-and-weights.js.map +1 -1
  153. package/build/utils/transform-styles/index.js +4 -3
  154. package/build/utils/transform-styles/index.js.map +1 -1
  155. package/build-module/autocompleters/block.js +14 -6
  156. package/build-module/autocompleters/block.js.map +1 -1
  157. package/build-module/components/block-canvas/index.js +11 -1
  158. package/build-module/components/block-canvas/index.js.map +1 -1
  159. package/build-module/components/block-card/index.js +3 -3
  160. package/build-module/components/block-card/index.js.map +1 -1
  161. package/build-module/components/block-full-height-alignment-control/index.js +1 -1
  162. package/build-module/components/block-full-height-alignment-control/index.js.map +1 -1
  163. package/build-module/components/block-list/block.js +1 -1
  164. package/build-module/components/block-list/block.js.map +1 -1
  165. package/build-module/components/block-list/block.native.js +1 -7
  166. package/build-module/components/block-list/block.native.js.map +1 -1
  167. package/build-module/components/block-list/index.js +5 -5
  168. package/build-module/components/block-list/index.js.map +1 -1
  169. package/build-module/components/block-list/use-block-props/index.js +1 -2
  170. package/build-module/components/block-list/use-block-props/index.js.map +1 -1
  171. package/build-module/components/block-list/use-block-props/use-focus-first-element.js +4 -3
  172. package/build-module/components/block-list/use-block-props/use-focus-first-element.js.map +1 -1
  173. package/build-module/components/block-list/use-block-props/use-selected-block-event-handlers.js +3 -6
  174. package/build-module/components/block-list/use-block-props/use-selected-block-event-handlers.js.map +1 -1
  175. package/build-module/components/block-list/use-in-between-inserter.js +1 -1
  176. package/build-module/components/block-list/use-in-between-inserter.js.map +1 -1
  177. package/build-module/components/block-patterns-paging/index.js +1 -1
  178. package/build-module/components/block-patterns-paging/index.js.map +1 -1
  179. package/build-module/components/block-popover/index.js +2 -45
  180. package/build-module/components/block-popover/index.js.map +1 -1
  181. package/build-module/components/block-preview/index.js +2 -2
  182. package/build-module/components/block-preview/index.js.map +1 -1
  183. package/build-module/components/block-settings-menu/block-settings-dropdown.js +5 -0
  184. package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  185. package/build-module/components/block-settings-menu/index.js +5 -4
  186. package/build-module/components/block-settings-menu/index.js.map +1 -1
  187. package/build-module/components/block-toolbar/change-design.js +114 -0
  188. package/build-module/components/block-toolbar/change-design.js.map +1 -0
  189. package/build-module/components/block-toolbar/index.js +19 -7
  190. package/build-module/components/block-toolbar/index.js.map +1 -1
  191. package/build-module/components/block-tools/index.js +4 -10
  192. package/build-module/components/block-tools/index.js.map +1 -1
  193. package/build-module/components/block-tools/insertion-point.js +4 -3
  194. package/build-module/components/block-tools/insertion-point.js.map +1 -1
  195. package/build-module/components/block-tools/use-show-block-tools.js +3 -9
  196. package/build-module/components/block-tools/use-show-block-tools.js.map +1 -1
  197. package/build-module/components/block-tools/zoom-out-mode-inserters.js +20 -29
  198. package/build-module/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
  199. package/build-module/components/block-variation-transforms/index.js +2 -2
  200. package/build-module/components/block-variation-transforms/index.js.map +1 -1
  201. package/build-module/components/block-vertical-alignment-control/ui.js +6 -10
  202. package/build-module/components/block-vertical-alignment-control/ui.js.map +1 -1
  203. package/build-module/components/border-radius-control/linked-button.js +8 -11
  204. package/build-module/components/border-radius-control/linked-button.js.map +1 -1
  205. package/build-module/components/collab/block-comment-icon-slot.js +11 -0
  206. package/build-module/components/collab/block-comment-icon-slot.js.map +1 -0
  207. package/build-module/components/collab/block-comment-icon-toolbar-slot.js +11 -0
  208. package/build-module/components/collab/block-comment-icon-toolbar-slot.js.map +1 -0
  209. package/build-module/components/colors-gradients/use-multiple-origin-colors-and-gradients.js +7 -1
  210. package/build-module/components/colors-gradients/use-multiple-origin-colors-and-gradients.js.map +1 -1
  211. package/build-module/components/convert-to-group-buttons/toolbar.js +4 -4
  212. package/build-module/components/convert-to-group-buttons/toolbar.js.map +1 -1
  213. package/build-module/components/global-styles/color-panel.js +2 -5
  214. package/build-module/components/global-styles/color-panel.js.map +1 -1
  215. package/build-module/components/global-styles/use-global-styles-context.native.js +6 -0
  216. package/build-module/components/global-styles/use-global-styles-context.native.js.map +1 -1
  217. package/build-module/components/iframe/index.js +17 -22
  218. package/build-module/components/iframe/index.js.map +1 -1
  219. package/build-module/components/image-size-control/index.js +62 -21
  220. package/build-module/components/image-size-control/index.js.map +1 -1
  221. package/build-module/components/inner-blocks/index.js +9 -5
  222. package/build-module/components/inner-blocks/index.js.map +1 -1
  223. package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js +2 -2
  224. package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js.map +1 -1
  225. package/build-module/components/inserter/block-patterns-tab/patterns-filter.js +1 -1
  226. package/build-module/components/inserter/block-patterns-tab/patterns-filter.js.map +1 -1
  227. package/build-module/components/inserter/category-tabs/index.js +15 -2
  228. package/build-module/components/inserter/category-tabs/index.js.map +1 -1
  229. package/build-module/components/inserter/menu.js +5 -3
  230. package/build-module/components/inserter/menu.js.map +1 -1
  231. package/build-module/components/inserter-button/index.native.js +1 -1
  232. package/build-module/components/inserter-button/index.native.js.map +1 -1
  233. package/build-module/components/inspector-controls-tabs/index.js +0 -2
  234. package/build-module/components/inspector-controls-tabs/index.js.map +1 -1
  235. package/build-module/components/inspector-controls-tabs/utils.js +3 -6
  236. package/build-module/components/inspector-controls-tabs/utils.js.map +1 -1
  237. package/build-module/components/link-control/link-preview.js +13 -10
  238. package/build-module/components/link-control/link-preview.js.map +1 -1
  239. package/build-module/components/list-view/appender.js +4 -3
  240. package/build-module/components/list-view/appender.js.map +1 -1
  241. package/build-module/components/list-view/branch.js +7 -6
  242. package/build-module/components/list-view/branch.js.map +1 -1
  243. package/build-module/components/list-view/index.js +1 -2
  244. package/build-module/components/list-view/index.js.map +1 -1
  245. package/build-module/components/provider/index.js +1 -1
  246. package/build-module/components/provider/index.js.map +1 -1
  247. package/build-module/components/rich-text/event-listeners/index.js +4 -2
  248. package/build-module/components/rich-text/event-listeners/index.js.map +1 -1
  249. package/build-module/components/rich-text/index.native.js +2 -6
  250. package/build-module/components/rich-text/index.native.js.map +1 -1
  251. package/build-module/components/spacing-sizes-control/index.js +3 -3
  252. package/build-module/components/spacing-sizes-control/index.js.map +1 -1
  253. package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js +4 -4
  254. package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
  255. package/build-module/components/spacing-sizes-control/linked-button.js +2 -6
  256. package/build-module/components/spacing-sizes-control/linked-button.js.map +1 -1
  257. package/build-module/components/tool-selector/index.js +1 -4
  258. package/build-module/components/tool-selector/index.js.map +1 -1
  259. package/build-module/components/url-input/index.js +1 -1
  260. package/build-module/components/url-input/index.js.map +1 -1
  261. package/build-module/components/use-block-commands/index.js +1 -1
  262. package/build-module/components/use-block-commands/index.js.map +1 -1
  263. package/build-module/components/use-block-drop-zone/index.js +5 -5
  264. package/build-module/components/use-block-drop-zone/index.js.map +1 -1
  265. package/build-module/components/use-block-drop-zone/index.native.js +0 -1
  266. package/build-module/components/use-block-drop-zone/index.native.js.map +1 -1
  267. package/build-module/components/use-moving-animation/index.js +1 -3
  268. package/build-module/components/use-moving-animation/index.js.map +1 -1
  269. package/build-module/components/use-settings/index.js +1 -3
  270. package/build-module/components/use-settings/index.js.map +1 -1
  271. package/build-module/components/writing-flow/index.js +5 -3
  272. package/build-module/components/writing-flow/index.js.map +1 -1
  273. package/build-module/components/writing-flow/use-tab-nav.js +2 -3
  274. package/build-module/components/writing-flow/use-tab-nav.js.map +1 -1
  275. package/build-module/hooks/block-bindings.js +20 -9
  276. package/build-module/hooks/block-bindings.js.map +1 -1
  277. package/build-module/hooks/contrast-checker.js +0 -1
  278. package/build-module/hooks/contrast-checker.js.map +1 -1
  279. package/build-module/hooks/duotone.js +2 -2
  280. package/build-module/hooks/duotone.js.map +1 -1
  281. package/build-module/hooks/style.js +4 -1
  282. package/build-module/hooks/style.js.map +1 -1
  283. package/build-module/hooks/use-zoom-out.js +15 -23
  284. package/build-module/hooks/use-zoom-out.js.map +1 -1
  285. package/build-module/index.js +1 -1
  286. package/build-module/index.js.map +1 -1
  287. package/build-module/private-apis.js +7 -5
  288. package/build-module/private-apis.js.map +1 -1
  289. package/build-module/store/actions.js +2 -33
  290. package/build-module/store/actions.js.map +1 -1
  291. package/build-module/store/defaults.js +1 -1
  292. package/build-module/store/defaults.js.map +1 -1
  293. package/build-module/store/private-actions.js +54 -7
  294. package/build-module/store/private-actions.js.map +1 -1
  295. package/build-module/store/private-selectors.js +9 -20
  296. package/build-module/store/private-selectors.js.map +1 -1
  297. package/build-module/store/reducer.js +16 -6
  298. package/build-module/store/reducer.js.map +1 -1
  299. package/build-module/store/selectors.js +45 -8
  300. package/build-module/store/selectors.js.map +1 -1
  301. package/build-module/utils/dom.js +16 -1
  302. package/build-module/utils/dom.js.map +1 -1
  303. package/build-module/utils/get-font-styles-and-weights.js +2 -2
  304. package/build-module/utils/get-font-styles-and-weights.js.map +1 -1
  305. package/build-module/utils/transform-styles/index.js +3 -2
  306. package/build-module/utils/transform-styles/index.js.map +1 -1
  307. package/build-style/content-rtl.css +9 -4
  308. package/build-style/content.css +9 -4
  309. package/build-style/style-rtl.css +33 -22
  310. package/build-style/style.css +33 -22
  311. package/build-types/utils/dom.d.ts.map +1 -1
  312. package/package.json +33 -32
  313. package/src/autocompleters/block.js +16 -7
  314. package/src/components/block-canvas/index.js +17 -1
  315. package/src/components/block-canvas/style.scss +2 -0
  316. package/src/components/block-card/index.js +3 -3
  317. package/src/components/block-full-height-alignment-control/index.js +1 -1
  318. package/src/components/block-inspector/style.scss +0 -6
  319. package/src/components/block-list/block.js +1 -2
  320. package/src/components/block-list/block.native.js +0 -4
  321. package/src/components/block-list/content.scss +1 -1
  322. package/src/components/block-list/index.js +4 -4
  323. package/src/components/block-list/use-block-props/index.js +0 -2
  324. package/src/components/block-list/use-block-props/use-focus-first-element.js +5 -3
  325. package/src/components/block-list/use-block-props/use-selected-block-event-handlers.js +7 -20
  326. package/src/components/block-list/use-in-between-inserter.js +1 -1
  327. package/src/components/block-patterns-list/stories/fixtures.js +834 -0
  328. package/src/components/block-patterns-list/stories/index.story.js +81 -0
  329. package/src/components/block-patterns-list/style.scss +2 -0
  330. package/src/components/block-patterns-paging/index.js +1 -1
  331. package/src/components/block-popover/index.js +0 -62
  332. package/src/components/block-preview/index.js +2 -2
  333. package/src/components/block-settings-menu/block-settings-dropdown.js +4 -0
  334. package/src/components/block-settings-menu/index.js +3 -0
  335. package/src/components/block-toolbar/change-design.js +133 -0
  336. package/src/components/block-toolbar/index.js +25 -8
  337. package/src/components/block-toolbar/style.scss +16 -0
  338. package/src/components/block-tools/index.js +4 -17
  339. package/src/components/block-tools/insertion-point.js +4 -3
  340. package/src/components/block-tools/style.scss +0 -20
  341. package/src/components/block-tools/use-show-block-tools.js +0 -13
  342. package/src/components/block-tools/zoom-out-mode-inserters.js +25 -40
  343. package/src/components/block-variation-transforms/index.js +2 -2
  344. package/src/components/block-vertical-alignment-control/ui.js +11 -15
  345. package/src/components/border-radius-control/linked-button.js +9 -11
  346. package/src/components/collab/block-comment-icon-slot.js +12 -0
  347. package/src/components/collab/block-comment-icon-toolbar-slot.js +12 -0
  348. package/src/components/colors-gradients/use-multiple-origin-colors-and-gradients.js +7 -1
  349. package/src/components/convert-to-group-buttons/toolbar.js +4 -4
  350. package/src/components/global-styles/color-panel.js +2 -10
  351. package/src/components/global-styles/test/use-global-styles-context.native.js +1 -0
  352. package/src/components/global-styles/use-global-styles-context.native.js +6 -0
  353. package/src/components/iframe/content.scss +4 -9
  354. package/src/components/iframe/index.js +31 -34
  355. package/src/components/iframe/style.scss +2 -3
  356. package/src/components/image-size-control/index.js +74 -43
  357. package/src/components/image-size-control/test/index.js +5 -63
  358. package/src/components/inner-blocks/index.js +12 -6
  359. package/src/components/inserter/block-patterns-tab/pattern-category-previews.js +2 -3
  360. package/src/components/inserter/block-patterns-tab/patterns-filter.js +1 -1
  361. package/src/components/inserter/category-tabs/index.js +16 -2
  362. package/src/components/inserter/menu.js +6 -4
  363. package/src/components/inserter/style.scss +13 -0
  364. package/src/components/inserter-button/index.native.js +1 -1
  365. package/src/components/inspector-controls-tabs/index.js +1 -6
  366. package/src/components/inspector-controls-tabs/utils.js +0 -3
  367. package/src/components/link-control/link-preview.js +15 -8
  368. package/src/components/link-control/test/index.js +63 -24
  369. package/src/components/list-view/appender.js +5 -6
  370. package/src/components/list-view/branch.js +8 -6
  371. package/src/components/list-view/index.js +1 -2
  372. package/src/components/provider/index.js +1 -3
  373. package/src/components/provider/test/experimental-provider.js +43 -1
  374. package/src/components/rich-text/event-listeners/index.js +4 -2
  375. package/src/components/rich-text/index.native.js +0 -2
  376. package/src/components/spacing-sizes-control/index.js +3 -3
  377. package/src/components/spacing-sizes-control/input-controls/spacing-input-control.js +4 -4
  378. package/src/components/spacing-sizes-control/linked-button.js +2 -12
  379. package/src/components/tool-selector/index.js +1 -5
  380. package/src/components/url-input/index.js +1 -1
  381. package/src/components/use-block-commands/index.js +1 -1
  382. package/src/components/use-block-drop-zone/index.js +5 -5
  383. package/src/components/use-block-drop-zone/index.native.js +0 -1
  384. package/src/components/use-moving-animation/index.js +0 -1
  385. package/src/components/use-settings/index.js +0 -1
  386. package/src/components/writing-flow/index.js +5 -3
  387. package/src/components/writing-flow/use-tab-nav.js +1 -2
  388. package/src/hooks/block-bindings.js +48 -31
  389. package/src/hooks/contrast-checker.js +0 -1
  390. package/src/hooks/duotone.js +2 -2
  391. package/src/hooks/style.js +7 -3
  392. package/src/hooks/use-zoom-out.js +14 -34
  393. package/src/index.js +0 -1
  394. package/src/private-apis.js +6 -3
  395. package/src/store/actions.js +3 -52
  396. package/src/store/defaults.js +2 -1
  397. package/src/store/private-actions.js +71 -8
  398. package/src/store/private-selectors.js +9 -19
  399. package/src/store/reducer.js +25 -11
  400. package/src/store/selectors.js +59 -8
  401. package/src/store/test/actions.js +41 -0
  402. package/src/store/test/reducer.js +23 -0
  403. package/src/utils/dom.js +22 -2
  404. package/src/utils/get-font-styles-and-weights.js +2 -2
  405. package/src/utils/transform-styles/index.js +3 -2
  406. package/tsconfig.tsbuildinfo +1 -1
  407. package/build/components/block-list/use-block-props/use-zoom-out-mode-exit.js +0 -57
  408. package/build/components/block-list/use-block-props/use-zoom-out-mode-exit.js.map +0 -1
  409. package/build/components/block-toolbar/shuffle.js +0 -110
  410. package/build/components/block-toolbar/shuffle.js.map +0 -1
  411. package/build/components/block-tools/zoom-out-popover.js +0 -58
  412. package/build/components/block-tools/zoom-out-popover.js.map +0 -1
  413. package/build/components/block-tools/zoom-out-toolbar.js +0 -132
  414. package/build/components/block-tools/zoom-out-toolbar.js.map +0 -1
  415. package/build/components/block-vertical-alignment-control/icons.js +0 -48
  416. package/build/components/block-vertical-alignment-control/icons.js.map +0 -1
  417. package/build-module/components/block-list/use-block-props/use-zoom-out-mode-exit.js +0 -51
  418. package/build-module/components/block-list/use-block-props/use-zoom-out-mode-exit.js.map +0 -1
  419. package/build-module/components/block-toolbar/shuffle.js +0 -103
  420. package/build-module/components/block-toolbar/shuffle.js.map +0 -1
  421. package/build-module/components/block-tools/zoom-out-popover.js +0 -49
  422. package/build-module/components/block-tools/zoom-out-popover.js.map +0 -1
  423. package/build-module/components/block-tools/zoom-out-toolbar.js +0 -124
  424. package/build-module/components/block-tools/zoom-out-toolbar.js.map +0 -1
  425. package/build-module/components/block-vertical-alignment-control/icons.js +0 -41
  426. package/build-module/components/block-vertical-alignment-control/icons.js.map +0 -1
  427. package/src/components/block-list/use-block-props/use-zoom-out-mode-exit.js +0 -65
  428. package/src/components/block-toolbar/shuffle.js +0 -111
  429. package/src/components/block-tools/zoom-out-popover.js +0 -47
  430. package/src/components/block-tools/zoom-out-toolbar.js +0 -135
  431. package/src/components/block-vertical-alignment-control/icons.js +0 -34
@@ -1 +1 @@
1
- {"version":3,"names":["_i18n","require","PREFERENCES_DEFAULTS","exports","insertUsage","SETTINGS_DEFAULTS","alignWide","supportsLayout","colors","name","__","slug","color","fontSizes","_x","size","imageDefaultSize","imageSizes","imageEditing","maxWidth","allowedBlockTypes","maxUploadFileSize","allowedMimeTypes","canLockBlocks","enableOpenverseMediaCategory","clearBlockSelection","__experimentalCanUserUseUnfilteredHTML","__experimentalBlockDirectory","__mobileEnablePageTemplates","__experimentalBlockPatterns","__experimentalBlockPatternCategories","__unstableIsPreviewMode","blockInspectorAnimation","animationParent","enterDirection","generateAnchors","gradients","gradient","__unstableResolvedAssets","styles","scripts"],"sources":["@wordpress/block-editor/src/store/defaults.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\n\nexport const PREFERENCES_DEFAULTS = {\n\tinsertUsage: {},\n};\n\n/**\n * The default editor settings\n *\n * @typedef {Object} SETTINGS_DEFAULT\n * @property {boolean} alignWide Enable/Disable Wide/Full Alignments\n * @property {boolean} supportsLayout Enable/disable layouts support in container blocks.\n * @property {boolean} imageEditing Image Editing settings set to false to disable.\n * @property {Array} imageSizes Available image sizes\n * @property {number} maxWidth Max width to constraint resizing\n * @property {boolean|Array} allowedBlockTypes Allowed block types\n * @property {boolean} hasFixedToolbar Whether or not the editor toolbar is fixed\n * @property {boolean} distractionFree Whether or not the editor UI is distraction free\n * @property {boolean} focusMode Whether the focus mode is enabled or not\n * @property {Array} styles Editor Styles\n * @property {boolean} keepCaretInsideBlock Whether caret should move between blocks in edit mode\n * @property {string} bodyPlaceholder Empty post placeholder\n * @property {string} titlePlaceholder Empty title placeholder\n * @property {boolean} canLockBlocks Whether the user can manage Block Lock state\n * @property {boolean} codeEditingEnabled Whether or not the user can switch to the code editor\n * @property {boolean} generateAnchors Enable/Disable auto anchor generation for Heading blocks\n * @property {boolean} enableOpenverseMediaCategory Enable/Disable the Openverse media category in the inserter.\n * @property {boolean} clearBlockSelection Whether the block editor should clear selection on mousedown when a block is not clicked.\n * @property {boolean} __experimentalCanUserUseUnfilteredHTML Whether the user should be able to use unfiltered HTML or the HTML should be filtered e.g., to remove elements considered insecure like iframes.\n * @property {boolean} __experimentalBlockDirectory Whether the user has enabled the Block Directory\n * @property {Array} __experimentalBlockPatterns Array of objects representing the block patterns\n * @property {Array} __experimentalBlockPatternCategories Array of objects representing the block pattern categories\n */\nexport const SETTINGS_DEFAULTS = {\n\talignWide: false,\n\tsupportsLayout: true,\n\n\t// colors setting is not used anymore now defaults are passed from theme.json on the server and core has its own defaults.\n\t// The setting is only kept for backward compatibility purposes.\n\tcolors: [\n\t\t{\n\t\t\tname: __( 'Black' ),\n\t\t\tslug: 'black',\n\t\t\tcolor: '#000000',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Cyan bluish gray' ),\n\t\t\tslug: 'cyan-bluish-gray',\n\t\t\tcolor: '#abb8c3',\n\t\t},\n\t\t{\n\t\t\tname: __( 'White' ),\n\t\t\tslug: 'white',\n\t\t\tcolor: '#ffffff',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Pale pink' ),\n\t\t\tslug: 'pale-pink',\n\t\t\tcolor: '#f78da7',\n\t\t},\n\t\t{ name: __( 'Vivid red' ), slug: 'vivid-red', color: '#cf2e2e' },\n\t\t{\n\t\t\tname: __( 'Luminous vivid orange' ),\n\t\t\tslug: 'luminous-vivid-orange',\n\t\t\tcolor: '#ff6900',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Luminous vivid amber' ),\n\t\t\tslug: 'luminous-vivid-amber',\n\t\t\tcolor: '#fcb900',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Light green cyan' ),\n\t\t\tslug: 'light-green-cyan',\n\t\t\tcolor: '#7bdcb5',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Vivid green cyan' ),\n\t\t\tslug: 'vivid-green-cyan',\n\t\t\tcolor: '#00d084',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Pale cyan blue' ),\n\t\t\tslug: 'pale-cyan-blue',\n\t\t\tcolor: '#8ed1fc',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Vivid cyan blue' ),\n\t\t\tslug: 'vivid-cyan-blue',\n\t\t\tcolor: '#0693e3',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Vivid purple' ),\n\t\t\tslug: 'vivid-purple',\n\t\t\tcolor: '#9b51e0',\n\t\t},\n\t],\n\t// fontSizes setting is not used anymore now defaults are passed from theme.json on the server and core has its own defaults.\n\t// The setting is only kept for backward compatibility purposes.\n\tfontSizes: [\n\t\t{\n\t\t\tname: _x( 'Small', 'font size name' ),\n\t\t\tsize: 13,\n\t\t\tslug: 'small',\n\t\t},\n\t\t{\n\t\t\tname: _x( 'Normal', 'font size name' ),\n\t\t\tsize: 16,\n\t\t\tslug: 'normal',\n\t\t},\n\t\t{\n\t\t\tname: _x( 'Medium', 'font size name' ),\n\t\t\tsize: 20,\n\t\t\tslug: 'medium',\n\t\t},\n\t\t{\n\t\t\tname: _x( 'Large', 'font size name' ),\n\t\t\tsize: 36,\n\t\t\tslug: 'large',\n\t\t},\n\t\t{\n\t\t\tname: _x( 'Huge', 'font size name' ),\n\t\t\tsize: 42,\n\t\t\tslug: 'huge',\n\t\t},\n\t],\n\n\t// Image default size slug.\n\timageDefaultSize: 'large',\n\n\timageSizes: [\n\t\t{ slug: 'thumbnail', name: __( 'Thumbnail' ) },\n\t\t{ slug: 'medium', name: __( 'Medium' ) },\n\t\t{ slug: 'large', name: __( 'Large' ) },\n\t\t{ slug: 'full', name: __( 'Full Size' ) },\n\t],\n\n\t// Allow plugin to disable Image Editor if need be.\n\timageEditing: true,\n\n\t// This is current max width of the block inner area\n\t// It's used to constraint image resizing and this value could be overridden later by themes\n\tmaxWidth: 580,\n\n\t// Allowed block types for the editor, defaulting to true (all supported).\n\tallowedBlockTypes: true,\n\n\t// Maximum upload size in bytes allowed for the site.\n\tmaxUploadFileSize: 0,\n\n\t// List of allowed mime types and file extensions.\n\tallowedMimeTypes: null,\n\n\t// Allows to disable block locking interface.\n\tcanLockBlocks: true,\n\n\t// Allows to disable Openverse media category in the inserter.\n\tenableOpenverseMediaCategory: true,\n\n\tclearBlockSelection: true,\n\n\t__experimentalCanUserUseUnfilteredHTML: false,\n\t__experimentalBlockDirectory: false,\n\t__mobileEnablePageTemplates: false,\n\t__experimentalBlockPatterns: [],\n\t__experimentalBlockPatternCategories: [],\n\t__unstableIsPreviewMode: false,\n\n\t// These settings will be completely revamped in the future.\n\t// The goal is to evolve this into an API which will instruct\n\t// the block inspector to animate transitions between what it\n\t// displays based on the relationship between the selected block\n\t// and its parent, and only enable it if the parent is controlling\n\t// its children blocks.\n\tblockInspectorAnimation: {\n\t\tanimationParent: 'core/navigation',\n\t\t'core/navigation': { enterDirection: 'leftToRight' },\n\t\t'core/navigation-submenu': { enterDirection: 'rightToLeft' },\n\t\t'core/navigation-link': { enterDirection: 'rightToLeft' },\n\t\t'core/search': { enterDirection: 'rightToLeft' },\n\t\t'core/social-links': { enterDirection: 'rightToLeft' },\n\t\t'core/page-list': { enterDirection: 'rightToLeft' },\n\t\t'core/spacer': { enterDirection: 'rightToLeft' },\n\t\t'core/home-link': { enterDirection: 'rightToLeft' },\n\t\t'core/site-title': { enterDirection: 'rightToLeft' },\n\t\t'core/site-logo': { enterDirection: 'rightToLeft' },\n\t},\n\n\tgenerateAnchors: false,\n\t// gradients setting is not used anymore now defaults are passed from theme.json on the server and core has its own defaults.\n\t// The setting is only kept for backward compatibility purposes.\n\tgradients: [\n\t\t{\n\t\t\tname: __( 'Vivid cyan blue to vivid purple' ),\n\t\t\tgradient:\n\t\t\t\t'linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)',\n\t\t\tslug: 'vivid-cyan-blue-to-vivid-purple',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Light green cyan to vivid green cyan' ),\n\t\t\tgradient:\n\t\t\t\t'linear-gradient(135deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%)',\n\t\t\tslug: 'light-green-cyan-to-vivid-green-cyan',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Luminous vivid amber to luminous vivid orange' ),\n\t\t\tgradient:\n\t\t\t\t'linear-gradient(135deg,rgba(252,185,0,1) 0%,rgba(255,105,0,1) 100%)',\n\t\t\tslug: 'luminous-vivid-amber-to-luminous-vivid-orange',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Luminous vivid orange to vivid red' ),\n\t\t\tgradient:\n\t\t\t\t'linear-gradient(135deg,rgba(255,105,0,1) 0%,rgb(207,46,46) 100%)',\n\t\t\tslug: 'luminous-vivid-orange-to-vivid-red',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Very light gray to cyan bluish gray' ),\n\t\t\tgradient:\n\t\t\t\t'linear-gradient(135deg,rgb(238,238,238) 0%,rgb(169,184,195) 100%)',\n\t\t\tslug: 'very-light-gray-to-cyan-bluish-gray',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Cool to warm spectrum' ),\n\t\t\tgradient:\n\t\t\t\t'linear-gradient(135deg,rgb(74,234,220) 0%,rgb(151,120,209) 20%,rgb(207,42,186) 40%,rgb(238,44,130) 60%,rgb(251,105,98) 80%,rgb(254,248,76) 100%)',\n\t\t\tslug: 'cool-to-warm-spectrum',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Blush light purple' ),\n\t\t\tgradient:\n\t\t\t\t'linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)',\n\t\t\tslug: 'blush-light-purple',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Blush bordeaux' ),\n\t\t\tgradient:\n\t\t\t\t'linear-gradient(135deg,rgb(254,205,165) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%)',\n\t\t\tslug: 'blush-bordeaux',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Luminous dusk' ),\n\t\t\tgradient:\n\t\t\t\t'linear-gradient(135deg,rgb(255,203,112) 0%,rgb(199,81,192) 50%,rgb(65,88,208) 100%)',\n\t\t\tslug: 'luminous-dusk',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Pale ocean' ),\n\t\t\tgradient:\n\t\t\t\t'linear-gradient(135deg,rgb(255,245,203) 0%,rgb(182,227,212) 50%,rgb(51,167,181) 100%)',\n\t\t\tslug: 'pale-ocean',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Electric grass' ),\n\t\t\tgradient:\n\t\t\t\t'linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)',\n\t\t\tslug: 'electric-grass',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Midnight' ),\n\t\t\tgradient:\n\t\t\t\t'linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)',\n\t\t\tslug: 'midnight',\n\t\t},\n\t],\n\n\t__unstableResolvedAssets: { styles: [], scripts: [] },\n};\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGO,MAAMC,oBAAoB,GAAAC,OAAA,CAAAD,oBAAA,GAAG;EACnCE,WAAW,EAAE,CAAC;AACf,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,iBAAiB,GAAAF,OAAA,CAAAE,iBAAA,GAAG;EAChCC,SAAS,EAAE,KAAK;EAChBC,cAAc,EAAE,IAAI;EAEpB;EACA;EACAC,MAAM,EAAE,CACP;IACCC,IAAI,EAAE,IAAAC,QAAE,EAAE,OAAQ,CAAC;IACnBC,IAAI,EAAE,OAAO;IACbC,KAAK,EAAE;EACR,CAAC,EACD;IACCH,IAAI,EAAE,IAAAC,QAAE,EAAE,kBAAmB,CAAC;IAC9BC,IAAI,EAAE,kBAAkB;IACxBC,KAAK,EAAE;EACR,CAAC,EACD;IACCH,IAAI,EAAE,IAAAC,QAAE,EAAE,OAAQ,CAAC;IACnBC,IAAI,EAAE,OAAO;IACbC,KAAK,EAAE;EACR,CAAC,EACD;IACCH,IAAI,EAAE,IAAAC,QAAE,EAAE,WAAY,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IAAI,EAAE;EACP,CAAC,EACD;IACCF,IAAI,EAAE,IAAAC,QAAE,EAAE,uBAAwB,CAAC;IACnC2B,QAAQ,EACP,kJAAkJ;IACnJ1B,IAAI,EAAE;EACP,CAAC,EACD;IACCF,IAAI,EAAE,IAAAC,QAAE,EAAE,oBAAqB,CAAC;IAChC2B,QAAQ,EACP,mEAAmE;IACpE1B,IAAI,EAAE;EACP,CAAC,EACD;IACCF,IAAI,EAAE,IAAAC,QAAE,EAAE,gBAAiB,CAAC;IAC5B2B,QAAQ,EACP,mFAAmF;IACpF1B,IAAI,EAAE;EACP,CAAC,EACD;IACCF,IAAI,EAAE,IAAAC,QAAE,EAAE,eAAgB,CAAC;IAC3B2B,QAAQ,EACP,qFAAqF;IACtF1B,IAAI,EAAE;EACP,CAAC,EACD;IACCF,IAAI,EAAE,IAAAC,QAAE,EAAE,YAAa,CAAC;IACxB2B,QAAQ,EACP,uFAAuF;IACxF1B,IAAI,EAAE;EACP,CAAC,EACD;IACCF,IAAI,EAAE,IAAAC,QAAE,EAAE,gBAAiB,CAAC;IAC5B2B,QAAQ,EACP,mEAAmE;IACpE1B,IAAI,EAAE;EACP,CAAC,EACD;IACCF,IAAI,EAAE,IAAAC,QAAE,EAAE,UAAW,CAAC;IACtB2B,QAAQ,EACP,8DAA8D;IAC/D1B,IAAI,EAAE;EACP,CAAC,CACD;EAED2B,wBAAwB,EAAE;IAAEC,MAAM,EAAE,EAAE;IAAEC,OAAO,EAAE;EAAG;AACrD,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_i18n","require","PREFERENCES_DEFAULTS","exports","insertUsage","SETTINGS_DEFAULTS","alignWide","supportsLayout","colors","name","__","slug","color","fontSizes","_x","size","imageDefaultSize","imageSizes","imageEditing","maxWidth","allowedBlockTypes","maxUploadFileSize","allowedMimeTypes","canLockBlocks","enableOpenverseMediaCategory","clearBlockSelection","__experimentalCanUserUseUnfilteredHTML","__experimentalBlockDirectory","__mobileEnablePageTemplates","__experimentalBlockPatterns","__experimentalBlockPatternCategories","isPreviewMode","blockInspectorAnimation","animationParent","enterDirection","generateAnchors","gradients","gradient","__unstableResolvedAssets","styles","scripts"],"sources":["@wordpress/block-editor/src/store/defaults.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\n\nexport const PREFERENCES_DEFAULTS = {\n\tinsertUsage: {},\n};\n\n/**\n * The default editor settings\n *\n * @typedef {Object} SETTINGS_DEFAULT\n * @property {boolean} alignWide Enable/Disable Wide/Full Alignments\n * @property {boolean} supportsLayout Enable/disable layouts support in container blocks.\n * @property {boolean} imageEditing Image Editing settings set to false to disable.\n * @property {Array} imageSizes Available image sizes\n * @property {number} maxWidth Max width to constraint resizing\n * @property {boolean|Array} allowedBlockTypes Allowed block types\n * @property {boolean} hasFixedToolbar Whether or not the editor toolbar is fixed\n * @property {boolean} distractionFree Whether or not the editor UI is distraction free\n * @property {boolean} focusMode Whether the focus mode is enabled or not\n * @property {Array} styles Editor Styles\n * @property {boolean} keepCaretInsideBlock Whether caret should move between blocks in edit mode\n * @property {string} bodyPlaceholder Empty post placeholder\n * @property {string} titlePlaceholder Empty title placeholder\n * @property {boolean} canLockBlocks Whether the user can manage Block Lock state\n * @property {boolean} codeEditingEnabled Whether or not the user can switch to the code editor\n * @property {boolean} generateAnchors Enable/Disable auto anchor generation for Heading blocks\n * @property {boolean} enableOpenverseMediaCategory Enable/Disable the Openverse media category in the inserter.\n * @property {boolean} clearBlockSelection Whether the block editor should clear selection on mousedown when a block is not clicked.\n * @property {boolean} __experimentalCanUserUseUnfilteredHTML Whether the user should be able to use unfiltered HTML or the HTML should be filtered e.g., to remove elements considered insecure like iframes.\n * @property {boolean} __experimentalBlockDirectory Whether the user has enabled the Block Directory\n * @property {Array} __experimentalBlockPatterns Array of objects representing the block patterns\n * @property {Array} __experimentalBlockPatternCategories Array of objects representing the block pattern categories\n */\nexport const SETTINGS_DEFAULTS = {\n\talignWide: false,\n\tsupportsLayout: true,\n\n\t// colors setting is not used anymore now defaults are passed from theme.json on the server and core has its own defaults.\n\t// The setting is only kept for backward compatibility purposes.\n\tcolors: [\n\t\t{\n\t\t\tname: __( 'Black' ),\n\t\t\tslug: 'black',\n\t\t\tcolor: '#000000',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Cyan bluish gray' ),\n\t\t\tslug: 'cyan-bluish-gray',\n\t\t\tcolor: '#abb8c3',\n\t\t},\n\t\t{\n\t\t\tname: __( 'White' ),\n\t\t\tslug: 'white',\n\t\t\tcolor: '#ffffff',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Pale pink' ),\n\t\t\tslug: 'pale-pink',\n\t\t\tcolor: '#f78da7',\n\t\t},\n\t\t{ name: __( 'Vivid red' ), slug: 'vivid-red', color: '#cf2e2e' },\n\t\t{\n\t\t\tname: __( 'Luminous vivid orange' ),\n\t\t\tslug: 'luminous-vivid-orange',\n\t\t\tcolor: '#ff6900',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Luminous vivid amber' ),\n\t\t\tslug: 'luminous-vivid-amber',\n\t\t\tcolor: '#fcb900',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Light green cyan' ),\n\t\t\tslug: 'light-green-cyan',\n\t\t\tcolor: '#7bdcb5',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Vivid green cyan' ),\n\t\t\tslug: 'vivid-green-cyan',\n\t\t\tcolor: '#00d084',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Pale cyan blue' ),\n\t\t\tslug: 'pale-cyan-blue',\n\t\t\tcolor: '#8ed1fc',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Vivid cyan blue' ),\n\t\t\tslug: 'vivid-cyan-blue',\n\t\t\tcolor: '#0693e3',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Vivid purple' ),\n\t\t\tslug: 'vivid-purple',\n\t\t\tcolor: '#9b51e0',\n\t\t},\n\t],\n\t// fontSizes setting is not used anymore now defaults are passed from theme.json on the server and core has its own defaults.\n\t// The setting is only kept for backward compatibility purposes.\n\tfontSizes: [\n\t\t{\n\t\t\tname: _x( 'Small', 'font size name' ),\n\t\t\tsize: 13,\n\t\t\tslug: 'small',\n\t\t},\n\t\t{\n\t\t\tname: _x( 'Normal', 'font size name' ),\n\t\t\tsize: 16,\n\t\t\tslug: 'normal',\n\t\t},\n\t\t{\n\t\t\tname: _x( 'Medium', 'font size name' ),\n\t\t\tsize: 20,\n\t\t\tslug: 'medium',\n\t\t},\n\t\t{\n\t\t\tname: _x( 'Large', 'font size name' ),\n\t\t\tsize: 36,\n\t\t\tslug: 'large',\n\t\t},\n\t\t{\n\t\t\tname: _x( 'Huge', 'font size name' ),\n\t\t\tsize: 42,\n\t\t\tslug: 'huge',\n\t\t},\n\t],\n\n\t// Image default size slug.\n\timageDefaultSize: 'large',\n\n\timageSizes: [\n\t\t{ slug: 'thumbnail', name: __( 'Thumbnail' ) },\n\t\t{ slug: 'medium', name: __( 'Medium' ) },\n\t\t{ slug: 'large', name: __( 'Large' ) },\n\t\t{ slug: 'full', name: __( 'Full Size' ) },\n\t],\n\n\t// Allow plugin to disable Image Editor if need be.\n\timageEditing: true,\n\n\t// This is current max width of the block inner area\n\t// It's used to constraint image resizing and this value could be overridden later by themes\n\tmaxWidth: 580,\n\n\t// Allowed block types for the editor, defaulting to true (all supported).\n\tallowedBlockTypes: true,\n\n\t// Maximum upload size in bytes allowed for the site.\n\tmaxUploadFileSize: 0,\n\n\t// List of allowed mime types and file extensions.\n\tallowedMimeTypes: null,\n\n\t// Allows to disable block locking interface.\n\tcanLockBlocks: true,\n\n\t// Allows to disable Openverse media category in the inserter.\n\tenableOpenverseMediaCategory: true,\n\n\tclearBlockSelection: true,\n\n\t__experimentalCanUserUseUnfilteredHTML: false,\n\t__experimentalBlockDirectory: false,\n\t__mobileEnablePageTemplates: false,\n\t__experimentalBlockPatterns: [],\n\t__experimentalBlockPatternCategories: [],\n\n\tisPreviewMode: false,\n\n\t// These settings will be completely revamped in the future.\n\t// The goal is to evolve this into an API which will instruct\n\t// the block inspector to animate transitions between what it\n\t// displays based on the relationship between the selected block\n\t// and its parent, and only enable it if the parent is controlling\n\t// its children blocks.\n\tblockInspectorAnimation: {\n\t\tanimationParent: 'core/navigation',\n\t\t'core/navigation': { enterDirection: 'leftToRight' },\n\t\t'core/navigation-submenu': { enterDirection: 'rightToLeft' },\n\t\t'core/navigation-link': { enterDirection: 'rightToLeft' },\n\t\t'core/search': { enterDirection: 'rightToLeft' },\n\t\t'core/social-links': { enterDirection: 'rightToLeft' },\n\t\t'core/page-list': { enterDirection: 'rightToLeft' },\n\t\t'core/spacer': { enterDirection: 'rightToLeft' },\n\t\t'core/home-link': { enterDirection: 'rightToLeft' },\n\t\t'core/site-title': { enterDirection: 'rightToLeft' },\n\t\t'core/site-logo': { enterDirection: 'rightToLeft' },\n\t},\n\n\tgenerateAnchors: false,\n\t// gradients setting is not used anymore now defaults are passed from theme.json on the server and core has its own defaults.\n\t// The setting is only kept for backward compatibility purposes.\n\tgradients: [\n\t\t{\n\t\t\tname: __( 'Vivid cyan blue to vivid purple' ),\n\t\t\tgradient:\n\t\t\t\t'linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)',\n\t\t\tslug: 'vivid-cyan-blue-to-vivid-purple',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Light green cyan to vivid green cyan' ),\n\t\t\tgradient:\n\t\t\t\t'linear-gradient(135deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%)',\n\t\t\tslug: 'light-green-cyan-to-vivid-green-cyan',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Luminous vivid amber to luminous vivid orange' ),\n\t\t\tgradient:\n\t\t\t\t'linear-gradient(135deg,rgba(252,185,0,1) 0%,rgba(255,105,0,1) 100%)',\n\t\t\tslug: 'luminous-vivid-amber-to-luminous-vivid-orange',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Luminous vivid orange to vivid red' ),\n\t\t\tgradient:\n\t\t\t\t'linear-gradient(135deg,rgba(255,105,0,1) 0%,rgb(207,46,46) 100%)',\n\t\t\tslug: 'luminous-vivid-orange-to-vivid-red',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Very light gray to cyan bluish gray' ),\n\t\t\tgradient:\n\t\t\t\t'linear-gradient(135deg,rgb(238,238,238) 0%,rgb(169,184,195) 100%)',\n\t\t\tslug: 'very-light-gray-to-cyan-bluish-gray',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Cool to warm spectrum' ),\n\t\t\tgradient:\n\t\t\t\t'linear-gradient(135deg,rgb(74,234,220) 0%,rgb(151,120,209) 20%,rgb(207,42,186) 40%,rgb(238,44,130) 60%,rgb(251,105,98) 80%,rgb(254,248,76) 100%)',\n\t\t\tslug: 'cool-to-warm-spectrum',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Blush light purple' ),\n\t\t\tgradient:\n\t\t\t\t'linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)',\n\t\t\tslug: 'blush-light-purple',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Blush bordeaux' ),\n\t\t\tgradient:\n\t\t\t\t'linear-gradient(135deg,rgb(254,205,165) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%)',\n\t\t\tslug: 'blush-bordeaux',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Luminous dusk' ),\n\t\t\tgradient:\n\t\t\t\t'linear-gradient(135deg,rgb(255,203,112) 0%,rgb(199,81,192) 50%,rgb(65,88,208) 100%)',\n\t\t\tslug: 'luminous-dusk',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Pale ocean' ),\n\t\t\tgradient:\n\t\t\t\t'linear-gradient(135deg,rgb(255,245,203) 0%,rgb(182,227,212) 50%,rgb(51,167,181) 100%)',\n\t\t\tslug: 'pale-ocean',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Electric grass' ),\n\t\t\tgradient:\n\t\t\t\t'linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)',\n\t\t\tslug: 'electric-grass',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Midnight' ),\n\t\t\tgradient:\n\t\t\t\t'linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)',\n\t\t\tslug: 'midnight',\n\t\t},\n\t],\n\n\t__unstableResolvedAssets: { styles: [], scripts: [] },\n};\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGO,MAAMC,oBAAoB,GAAAC,OAAA,CAAAD,oBAAA,GAAG;EACnCE,WAAW,EAAE,CAAC;AACf,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,iBAAiB,GAAAF,OAAA,CAAAE,iBAAA,GAAG;EAChCC,SAAS,EAAE,KAAK;EAChBC,cAAc,EAAE,IAAI;EAEpB;EACA;EACAC,MAAM,EAAE,CACP;IACCC,IAAI,EAAE,IAAAC,QAAE,EAAE,OAAQ,CAAC;IACnBC,IAAI,EAAE,OAAO;IACbC,KAAK,EAAE;EACR,CAAC,EACD;IACCH,IAAI,EAAE,IAAAC,QAAE,EAAE,kBAAmB,CAAC;IAC9BC,IAAI,EAAE,kBAAkB;IACxBC,KAAK,EAAE;EACR,CAAC,EACD;IACCH,IAAI,EAAE,IAAAC,QAAE,EAAE,OAAQ,CAAC;IACnBC,IAAI,EAAE,OAAO;IACbC,KAAK,EAAE;EACR,CAAC,EACD;IACCH,IAAI,EAAE,IAAAC,QAAE,EAAE,WAAY,CAAC;IACvBC,IAAI,EAAE,WAAW;IACjBC,KAAK,EAAE;EACR,CAAC,EACD;IAAEH,IAAI,EAAE,IAAAC,QAAE,EAAE,WAAY,CAAC;IAAEC,IAAI,EAAE,WAAW;IAAEC,KAAK,EAAE;EAAU,CAAC,EAChE;IACCH,IAAI,EAAE,IAAAC,QAAE,EA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ACP,mEAAmE;IACpE1B,IAAI,EAAE;EACP,CAAC,EACD;IACCF,IAAI,EAAE,IAAAC,QAAE,EAAE,gBAAiB,CAAC;IAC5B2B,QAAQ,EACP,mFAAmF;IACpF1B,IAAI,EAAE;EACP,CAAC,EACD;IACCF,IAAI,EAAE,IAAAC,QAAE,EAAE,eAAgB,CAAC;IAC3B2B,QAAQ,EACP,qFAAqF;IACtF1B,IAAI,EAAE;EACP,CAAC,EACD;IACCF,IAAI,EAAE,IAAAC,QAAE,EAAE,YAAa,CAAC;IACxB2B,QAAQ,EACP,uFAAuF;IACxF1B,IAAI,EAAE;EACP,CAAC,EACD;IACCF,IAAI,EAAE,IAAAC,QAAE,EAAE,gBAAiB,CAAC;IAC5B2B,QAAQ,EACP,mEAAmE;IACpE1B,IAAI,EAAE;EACP,CAAC,EACD;IACCF,IAAI,EAAE,IAAAC,QAAE,EAAE,UAAW,CAAC;IACtB2B,QAAQ,EACP,8DAA8D;IAC/D1B,IAAI,EAAE;EACP,CAAC,CACD;EAED2B,wBAAwB,EAAE;IAAEC,MAAM,EAAE,EAAE;IAAEC,OAAO,EAAE;EAAG;AACrD,CAAC","ignoreList":[]}
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
@@ -16,12 +17,15 @@ exports.setInsertionPoint = setInsertionPoint;
16
17
  exports.setLastFocus = setLastFocus;
17
18
  exports.setOpenedBlockSettingsMenu = setOpenedBlockSettingsMenu;
18
19
  exports.setStyleOverride = setStyleOverride;
19
- exports.setZoomLevel = setZoomLevel;
20
+ exports.setZoomLevel = void 0;
20
21
  exports.showBlockInterface = showBlockInterface;
21
22
  exports.startDragging = startDragging;
22
23
  exports.stopDragging = stopDragging;
23
24
  exports.stopEditingAsBlocks = stopEditingAsBlocks;
24
25
  var _element = require("@wordpress/element");
26
+ var _deprecated = _interopRequireDefault(require("@wordpress/deprecated"));
27
+ var _a11y = require("@wordpress/a11y");
28
+ var _i18n = require("@wordpress/i18n");
25
29
  var _index = require("./index");
26
30
  var _lockUnlock = require("../lock-unlock");
27
31
  /**
@@ -58,14 +62,27 @@ function __experimentalUpdateSettings(settings, {
58
62
  stripExperimentalSettings = false,
59
63
  reset = false
60
64
  } = {}) {
61
- let cleanSettings = settings;
65
+ let incomingSettings = settings;
66
+ if (Object.hasOwn(incomingSettings, '__unstableIsPreviewMode')) {
67
+ (0, _deprecated.default)("__unstableIsPreviewMode argument in wp.data.dispatch('core/block-editor').updateSettings", {
68
+ since: '6.8',
69
+ alternative: 'isPreviewMode'
70
+ });
71
+ incomingSettings = {
72
+ ...incomingSettings
73
+ };
74
+ incomingSettings.isPreviewMode = incomingSettings.__unstableIsPreviewMode;
75
+ delete incomingSettings.__unstableIsPreviewMode;
76
+ }
77
+ let cleanSettings = incomingSettings;
78
+
62
79
  // There are no plugins in the mobile apps, so there is no
63
80
  // need to strip the experimental settings:
64
81
  if (stripExperimentalSettings && _element.Platform.OS === 'web') {
65
82
  cleanSettings = {};
66
- for (const key in settings) {
83
+ for (const key in incomingSettings) {
67
84
  if (!privateSettings.includes(key)) {
68
- cleanSettings[key] = settings[key];
85
+ cleanSettings[key] = incomingSettings[key];
69
86
  }
70
87
  }
71
88
  }
@@ -427,17 +444,49 @@ const modifyContentLockBlock = clientId => ({
427
444
  * @return {Object} Action object.
428
445
  */
429
446
  exports.modifyContentLockBlock = modifyContentLockBlock;
430
- function setZoomLevel(zoom = 100) {
431
- return {
447
+ const setZoomLevel = (zoom = 100) => ({
448
+ select,
449
+ dispatch
450
+ }) => {
451
+ // When switching to zoom-out mode, we need to select the parent section
452
+ if (zoom !== 100) {
453
+ const firstSelectedClientId = select.getBlockSelectionStart();
454
+ const sectionRootClientId = select.getSectionRootClientId();
455
+ if (firstSelectedClientId) {
456
+ let sectionClientId;
457
+ if (sectionRootClientId) {
458
+ const sectionClientIds = select.getBlockOrder(sectionRootClientId);
459
+
460
+ // If the selected block is a section block, use it.
461
+ if (sectionClientIds?.includes(firstSelectedClientId)) {
462
+ sectionClientId = firstSelectedClientId;
463
+ } else {
464
+ // If the selected block is not a section block, find
465
+ // the parent section that contains the selected block.
466
+ sectionClientId = select.getBlockParents(firstSelectedClientId).find(parent => sectionClientIds.includes(parent));
467
+ }
468
+ } else {
469
+ sectionClientId = select.getBlockHierarchyRootClientId(firstSelectedClientId);
470
+ }
471
+ if (sectionClientId) {
472
+ dispatch.selectBlock(sectionClientId);
473
+ } else {
474
+ dispatch.clearSelectedBlock();
475
+ }
476
+ (0, _a11y.speak)((0, _i18n.__)('You are currently in zoom-out mode.'));
477
+ }
478
+ }
479
+ dispatch({
432
480
  type: 'SET_ZOOM_LEVEL',
433
481
  zoom
434
- };
435
- }
482
+ });
483
+ };
436
484
 
437
485
  /**
438
486
  * Resets the Zoom state.
439
487
  * @return {Object} Action object.
440
488
  */
489
+ exports.setZoomLevel = setZoomLevel;
441
490
  function resetZoomLevel() {
442
491
  return {
443
492
  type: 'RESET_ZOOM_LEVEL'
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_index","_lockUnlock","castArray","maybeArray","Array","isArray","privateSettings","__experimentalUpdateSettings","settings","stripExperimentalSettings","reset","cleanSettings","Platform","OS","key","includes","type","hideBlockInterface","showBlockInterface","privateRemoveBlocks","clientIds","selectPrevious","forceRemove","select","dispatch","registry","length","canRemoveBlocks","rules","getBlockRemovalRules","flattenBlocks","blocks","result","stack","innerBlocks","block","shift","push","blockList","map","getBlock","flattenedBlocks","message","rule","callback","displayBlockRemovalPrompt","selectPreviousBlock","batch","ensureDefaultBlock","exports","count","getBlockCount","__unstableHasCustomAppender","getSettings","insertDefaultBlock","clearBlockRemovalPrompt","setBlockRemovalRules","setOpenedBlockSettingsMenu","clientId","setStyleOverride","id","style","deleteStyleOverride","setLastFocus","lastFocus","stopEditingAsBlocks","focusModeToRevert","unlock","blockEditorStore","getTemporarilyEditingFocusModeToRevert","__unstableMarkNextChangeAsNotPersistent","updateBlockAttributes","templateLock","updateBlockListSettings","getBlockListSettings","updateSettings","focusMode","__unstableSetTemporarilyEditingAsBlocks","startDragging","stopDragging","expandBlock","setInsertionPoint","value","modifyContentLockBlock","selectBlock","undefined","setZoomLevel","zoom","resetZoomLevel"],"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 { store as blockEditorStore } from './index';\nimport { unlock } from '../lock-unlock';\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 canRemoveBlocks = select.canRemoveBlocks( clientIds );\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 * 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, registry } ) => {\n\t\tconst focusModeToRevert = unlock(\n\t\t\tregistry.select( blockEditorStore )\n\t\t).getTemporarilyEditingFocusModeToRevert();\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\n/**\n * @param {string|null} clientId The block's clientId, or `null` to clear.\n *\n * @return {Object} Action object.\n */\nexport function expandBlock( clientId ) {\n\treturn {\n\t\ttype: 'SET_BLOCK_EXPANDED_IN_LIST_VIEW',\n\t\tclientId,\n\t};\n}\n\n/**\n * @param {Object} value\n * @param {string} value.rootClientId The root client ID to insert at.\n * @param {number} value.index The index to insert at.\n *\n * @return {Object} Action object.\n */\nexport function setInsertionPoint( value ) {\n\treturn {\n\t\ttype: 'SET_INSERTION_POINT',\n\t\tvalue,\n\t};\n}\n\n/**\n * Temporarily modify/unlock the content-only block for editions.\n *\n * @param {string} clientId The client id of the block.\n */\nexport const modifyContentLockBlock =\n\t( clientId ) =>\n\t( { select, dispatch } ) => {\n\t\tdispatch.selectBlock( clientId );\n\t\tdispatch.__unstableMarkNextChangeAsNotPersistent();\n\t\tdispatch.updateBlockAttributes( clientId, {\n\t\t\ttemplateLock: undefined,\n\t\t} );\n\t\tdispatch.updateBlockListSettings( clientId, {\n\t\t\t...select.getBlockListSettings( clientId ),\n\t\t\ttemplateLock: false,\n\t\t} );\n\t\tconst focusModeToRevert = select.getSettings().focusMode;\n\t\tdispatch.updateSettings( { focusMode: true } );\n\t\tdispatch.__unstableSetTemporarilyEditingAsBlocks(\n\t\t\tclientId,\n\t\t\tfocusModeToRevert\n\t\t);\n\t};\n\n/**\n * Sets the zoom level.\n *\n * @param {number} zoom the new zoom level\n * @return {Object} Action object.\n */\nexport function setZoomLevel( zoom = 100 ) {\n\treturn {\n\t\ttype: 'SET_ZOOM_LEVEL',\n\t\tzoom,\n\t};\n}\n\n/**\n * Resets the Zoom state.\n * @return {Object} Action object.\n */\nexport function resetZoomLevel() {\n\treturn {\n\t\ttype: 'RESET_ZOOM_LEVEL',\n\t};\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AAKA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AATA;AACA;AACA;;AAGA;AACA;AACA;;AAIA,MAAMG,SAAS,GAAKC,UAAU,IAC7BC,KAAK,CAACC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AjB,OAAA,CAAAkC,sBAAA,GAAAA,sBAAA;AAMO,SAASG,YAAYA,CAAEC,IAAI,GAAG,GAAG,EAAG;EAC1C,OAAO;IACNvE,IAAI,EAAE,gBAAgB;IACtBuE;EACD,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACO,SAASC,cAAcA,CAAA,EAAG;EAChC,OAAO;IACNxE,IAAI,EAAE;EACP,CAAC;AACF","ignoreList":[]}
1
+ {"version":3,"names":["_element","require","_deprecated","_interopRequireDefault","_a11y","_i18n","_index","_lockUnlock","castArray","maybeArray","Array","isArray","privateSettings","__experimentalUpdateSettings","settings","stripExperimentalSettings","reset","incomingSettings","Object","hasOwn","deprecated","since","alternative","isPreviewMode","__unstableIsPreviewMode","cleanSettings","Platform","OS","key","includes","type","hideBlockInterface","showBlockInterface","privateRemoveBlocks","clientIds","selectPrevious","forceRemove","select","dispatch","registry","length","canRemoveBlocks","rules","getBlockRemovalRules","flattenBlocks","blocks","result","stack","innerBlocks","block","shift","push","blockList","map","getBlock","flattenedBlocks","message","rule","callback","displayBlockRemovalPrompt","selectPreviousBlock","batch","ensureDefaultBlock","exports","count","getBlockCount","__unstableHasCustomAppender","getSettings","insertDefaultBlock","clearBlockRemovalPrompt","setBlockRemovalRules","setOpenedBlockSettingsMenu","clientId","setStyleOverride","id","style","deleteStyleOverride","setLastFocus","lastFocus","stopEditingAsBlocks","focusModeToRevert","unlock","blockEditorStore","getTemporarilyEditingFocusModeToRevert","__unstableMarkNextChangeAsNotPersistent","updateBlockAttributes","templateLock","updateBlockListSettings","getBlockListSettings","updateSettings","focusMode","__unstableSetTemporarilyEditingAsBlocks","startDragging","stopDragging","expandBlock","setInsertionPoint","value","modifyContentLockBlock","selectBlock","undefined","setZoomLevel","zoom","firstSelectedClientId","getBlockSelectionStart","sectionRootClientId","getSectionRootClientId","sectionClientId","sectionClientIds","getBlockOrder","getBlockParents","find","parent","getBlockHierarchyRootClientId","clearSelectedBlock","speak","__","resetZoomLevel"],"sources":["@wordpress/block-editor/src/store/private-actions.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Platform } from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\nimport { speak } from '@wordpress/a11y';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from './index';\nimport { unlock } from '../lock-unlock';\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 incomingSettings = settings;\n\n\tif ( Object.hasOwn( incomingSettings, '__unstableIsPreviewMode' ) ) {\n\t\tdeprecated(\n\t\t\t\"__unstableIsPreviewMode argument in wp.data.dispatch('core/block-editor').updateSettings\",\n\t\t\t{\n\t\t\t\tsince: '6.8',\n\t\t\t\talternative: 'isPreviewMode',\n\t\t\t}\n\t\t);\n\n\t\tincomingSettings = { ...incomingSettings };\n\t\tincomingSettings.isPreviewMode =\n\t\t\tincomingSettings.__unstableIsPreviewMode;\n\t\tdelete incomingSettings.__unstableIsPreviewMode;\n\t}\n\n\tlet cleanSettings = incomingSettings;\n\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 incomingSettings ) {\n\t\t\tif ( ! privateSettings.includes( key ) ) {\n\t\t\t\tcleanSettings[ key ] = incomingSettings[ 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 canRemoveBlocks = select.canRemoveBlocks( clientIds );\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 * 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, registry } ) => {\n\t\tconst focusModeToRevert = unlock(\n\t\t\tregistry.select( blockEditorStore )\n\t\t).getTemporarilyEditingFocusModeToRevert();\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\n/**\n * @param {string|null} clientId The block's clientId, or `null` to clear.\n *\n * @return {Object} Action object.\n */\nexport function expandBlock( clientId ) {\n\treturn {\n\t\ttype: 'SET_BLOCK_EXPANDED_IN_LIST_VIEW',\n\t\tclientId,\n\t};\n}\n\n/**\n * @param {Object} value\n * @param {string} value.rootClientId The root client ID to insert at.\n * @param {number} value.index The index to insert at.\n *\n * @return {Object} Action object.\n */\nexport function setInsertionPoint( value ) {\n\treturn {\n\t\ttype: 'SET_INSERTION_POINT',\n\t\tvalue,\n\t};\n}\n\n/**\n * Temporarily modify/unlock the content-only block for editions.\n *\n * @param {string} clientId The client id of the block.\n */\nexport const modifyContentLockBlock =\n\t( clientId ) =>\n\t( { select, dispatch } ) => {\n\t\tdispatch.selectBlock( clientId );\n\t\tdispatch.__unstableMarkNextChangeAsNotPersistent();\n\t\tdispatch.updateBlockAttributes( clientId, {\n\t\t\ttemplateLock: undefined,\n\t\t} );\n\t\tdispatch.updateBlockListSettings( clientId, {\n\t\t\t...select.getBlockListSettings( clientId ),\n\t\t\ttemplateLock: false,\n\t\t} );\n\t\tconst focusModeToRevert = select.getSettings().focusMode;\n\t\tdispatch.updateSettings( { focusMode: true } );\n\t\tdispatch.__unstableSetTemporarilyEditingAsBlocks(\n\t\t\tclientId,\n\t\t\tfocusModeToRevert\n\t\t);\n\t};\n\n/**\n * Sets the zoom level.\n *\n * @param {number} zoom the new zoom level\n * @return {Object} Action object.\n */\nexport const setZoomLevel =\n\t( zoom = 100 ) =>\n\t( { select, dispatch } ) => {\n\t\t// When switching to zoom-out mode, we need to select the parent section\n\t\tif ( zoom !== 100 ) {\n\t\t\tconst firstSelectedClientId = select.getBlockSelectionStart();\n\t\t\tconst sectionRootClientId = select.getSectionRootClientId();\n\n\t\t\tif ( firstSelectedClientId ) {\n\t\t\t\tlet sectionClientId;\n\n\t\t\t\tif ( sectionRootClientId ) {\n\t\t\t\t\tconst sectionClientIds =\n\t\t\t\t\t\tselect.getBlockOrder( sectionRootClientId );\n\n\t\t\t\t\t// If the selected block is a section block, use it.\n\t\t\t\t\tif ( sectionClientIds?.includes( firstSelectedClientId ) ) {\n\t\t\t\t\t\tsectionClientId = firstSelectedClientId;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// If the selected block is not a section block, find\n\t\t\t\t\t\t// the parent section that contains the selected block.\n\t\t\t\t\t\tsectionClientId = select\n\t\t\t\t\t\t\t.getBlockParents( firstSelectedClientId )\n\t\t\t\t\t\t\t.find( ( parent ) =>\n\t\t\t\t\t\t\t\tsectionClientIds.includes( parent )\n\t\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tsectionClientId = select.getBlockHierarchyRootClientId(\n\t\t\t\t\t\tfirstSelectedClientId\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tif ( sectionClientId ) {\n\t\t\t\t\tdispatch.selectBlock( sectionClientId );\n\t\t\t\t} else {\n\t\t\t\t\tdispatch.clearSelectedBlock();\n\t\t\t\t}\n\n\t\t\t\tspeak( __( 'You are currently in zoom-out mode.' ) );\n\t\t\t}\n\t\t}\n\n\t\tdispatch( {\n\t\t\ttype: 'SET_ZOOM_LEVEL',\n\t\t\tzoom,\n\t\t} );\n\t};\n\n/**\n * Resets the Zoom state.\n * @return {Object} Action object.\n */\nexport function resetZoomLevel() {\n\treturn {\n\t\ttype: 'RESET_ZOOM_LEVEL',\n\t};\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AAKA,IAAA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kF,MAAO,CACnC,CAAC;QACH;MACD,CAAC,MAAM;QACNL,eAAe,GAAGrE,MAAM,CAAC2E,6BAA6B,CACrDV,qBACD,CAAC;MACF;MAEA,IAAKI,eAAe,EAAG;QACtBpE,QAAQ,CAAC4D,WAAW,CAAEQ,eAAgB,CAAC;MACxC,CAAC,MAAM;QACNpE,QAAQ,CAAC2E,kBAAkB,CAAC,CAAC;MAC9B;MAEA,IAAAC,WAAK,EAAE,IAAAC,QAAE,EAAE,qCAAsC,CAAE,CAAC;IACrD;EACD;EAEA7E,QAAQ,CAAE;IACTR,IAAI,EAAE,gBAAgB;IACtBuE;EACD,CAAE,CAAC;AACJ,CAAC;;AAEF;AACA;AACA;AACA;AAHAtC,OAAA,CAAAqC,YAAA,GAAAA,YAAA;AAIO,SAASgB,cAAcA,CAAA,EAAG;EAChC,OAAO;IACNtF,IAAI,EAAE;EACP,CAAC;AACF","ignoreList":[]}
@@ -38,7 +38,6 @@ exports.isDragging = isDragging;
38
38
  exports.isResolvingPatterns = void 0;
39
39
  exports.isSectionBlock = isSectionBlock;
40
40
  exports.isZoomOut = isZoomOut;
41
- exports.isZoomOutMode = isZoomOutMode;
42
41
  var _data = require("@wordpress/data");
43
42
  var _selectors = require("./selectors");
44
43
  var _utils = require("./utils");
@@ -121,7 +120,7 @@ function getEnabledClientIdsTreeUnmemoized(state, rootClientId) {
121
120
  *
122
121
  * @return {Object[]} Tree of block objects with only clientID and innerBlocks set.
123
122
  */
124
- const getEnabledClientIdsTree = exports.getEnabledClientIdsTree = (0, _data.createSelector)(getEnabledClientIdsTreeUnmemoized, state => [state.blocks.order, state.blockEditingModes, state.settings.templateLock, state.blockListSettings, state.editorMode, getSectionRootClientId(state)]);
123
+ const getEnabledClientIdsTree = exports.getEnabledClientIdsTree = (0, _data.createSelector)(getEnabledClientIdsTreeUnmemoized, state => [state.blocks.order, state.blockEditingModes, state.settings.templateLock, state.blockListSettings, state.editorMode, state.zoomLevel, getSectionRootClientId(state)]);
125
124
 
126
125
  /**
127
126
  * Returns a list of a given block's ancestors, from top to bottom. Blocks with
@@ -467,17 +466,6 @@ const getBlockStyles = exports.getBlockStyles = (0, _data.createSelector)((state
467
466
  return styles;
468
467
  }, {}), (state, clientIds) => [...clientIds.map(clientId => state.blocks.attributes.get(clientId)?.style)]);
469
468
 
470
- /**
471
- * Returns whether zoom out mode is enabled.
472
- *
473
- * @param {Object} state Editor state.
474
- *
475
- * @return {boolean} Is zoom out mode enabled.
476
- */
477
- function isZoomOutMode(state) {
478
- return state.editorMode === 'zoom-out';
479
- }
480
-
481
469
  /**
482
470
  * Retrieves the client ID of the block which contains the blocks
483
471
  * acting as "sections" in the editor. This is typically the "main content"
@@ -492,23 +480,23 @@ function getSectionRootClientId(state) {
492
480
  }
493
481
 
494
482
  /**
495
- * Returns the zoom out state.
483
+ * Returns whether the editor is considered zoomed out.
496
484
  *
497
485
  * @param {Object} state Global application state.
498
- * @return {boolean} The zoom out state.
486
+ * @return {boolean} Whether the editor is zoomed.
499
487
  */
500
- function getZoomLevel(state) {
501
- return state.zoomLevel;
488
+ function isZoomOut(state) {
489
+ return state.zoomLevel === 'auto-scaled' || state.zoomLevel < 100;
502
490
  }
503
491
 
504
492
  /**
505
- * Returns whether the editor is considered zoomed out.
493
+ * Returns whether the zoom level.
506
494
  *
507
495
  * @param {Object} state Global application state.
508
- * @return {boolean} Whether the editor is zoomed.
496
+ * @return {number|"auto-scaled"} Zoom level.
509
497
  */
510
- function isZoomOut(state) {
511
- return getZoomLevel(state) < 100;
498
+ function getZoomLevel(state) {
499
+ return state.zoomLevel;
512
500
  }
513
501
 
514
502
  /**
@@ -1 +1 @@
1
- {"version":3,"names":["_data","require","_selectors","_utils","_utils2","_constants","_lockUnlock","_privateKeys","_getBlockSettings","isBlockInterfaceHidden","state","getLastInsertedBlocksClientIds","lastBlockInserted","clientIds","getBlockWithoutAttributes","clientId","blocks","byClientId","get","isBlockSubtreeDisabled","isChildSubtreeDisabled","childClientId","getBlockEditingMode","getBlockOrder","every","exports","getEnabledClientIdsTreeUnmemoized","rootClientId","blockOrder","result","innerBlocks","push","getEnabledClientIdsTree","createSelector","order","blockEditingModes","settings","templateLock","blockListSettings","editorMode","getSectionRootClientId","getEnabledBlockParents","ascending","getBlockParents","filter","parent","parents","getRemovalPromptData","removalPromptData","getBlockRemovalRules","blockRemovalRules","getOpenedBlockSettingsMenu","openedBlockSettingsMenu","getStyleOverrides","getClientIdsWithDescendants","clientIdMap","reduce","acc","index","styleOverrides","sort","overrideA","overrideB","_clientIdMap$clientId","_clientIdMap$clientId2","clientIdA","clientIdB","aIndex","bIndex","getRegisteredInserterMediaCategories","registeredInserterMediaCategories","getInserterMediaCategories","inserterMediaCategories","allowedMimeTypes","enableOpenverseMediaCategory","length","coreInserterMediaCategoriesNames","map","name","mergedCategories","includes","category","Object","values","some","mimeType","startsWith","mediaType","hasAllowedPatterns","createRegistrySelector","select","getAllPatterns","unlock","STORE_NAME","patterns","allowedBlockTypes","getSettings","pattern","inserter","grammar","getGrammar","checkAllowListRecursive","blockName","canInsertBlockType","getAllPatternsDependants","getInsertBlockTypeDependants","mapUserPattern","userPattern","__experimentalUserPatternCategories","id","type","INSERTER_PATTERN_TYPES","user","title","raw","categories","wp_pattern_category","catId","find","slug","content","syncStatus","wp_pattern_sync_status","getPatternBySlug","patternName","_state$settings$__exp","_state$settings$selec","_id","parseInt","slice","block","getReusableBlocks","__experimentalBlockPatterns","selectBlockPatternsKey","__experimentalReusableBlocks","_state$settings$__exp2","_state$settings$selec2","x","arr","findIndex","y","isResolvingPatterns","blockPatternsSelect","reusableBlocksSelect","reusableBlocksSelectKey","undefined","EMPTY_ARRAY","_ref","getLastFocus","lastFocus","isDragging","getExpandedBlock","expandedBlock","getContentLockingParent","current","getTemplateLock","getParentSectionBlock","isSectionBlock","sectionRootClientId","sectionClientIds","getBlockName","isNavigationMode","getTemporarilyEditingAsBlocks","temporarilyEditingAsBlocks","getTemporarilyEditingFocusModeToRevert","temporarilyEditingFocusModeRevert","getBlockStyles","styles","attributes","style","isZoomOutMode","sectionRootClientIdKey","getZoomLevel","zoomLevel","isZoomOut","getClosestAllowedInsertionPoint","blockNames","Array","isArray","areBlockNamesAllowedInClientId","currentName","parentClientId","getBlockRootClientId","getClosestAllowedInsertionPointForPattern","isAllowed","names","getInsertionPoint","insertionPoint"],"sources":["@wordpress/block-editor/src/store/private-selectors.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createSelector, createRegistrySelector } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport {\n\tgetBlockOrder,\n\tgetBlockParents,\n\tgetBlockEditingMode,\n\tgetSettings,\n\tcanInsertBlockType,\n\tgetBlockName,\n\tgetTemplateLock,\n\tgetClientIdsWithDescendants,\n\tisNavigationMode,\n\tgetBlockRootClientId,\n} from './selectors';\nimport {\n\tcheckAllowListRecursive,\n\tgetAllPatternsDependants,\n\tgetInsertBlockTypeDependants,\n\tgetGrammar,\n} from './utils';\nimport { INSERTER_PATTERN_TYPES } from '../components/inserter/block-patterns-tab/utils';\nimport { STORE_NAME } from './constants';\nimport { unlock } from '../lock-unlock';\nimport {\n\tselectBlockPatternsKey,\n\treusableBlocksSelectKey,\n\tsectionRootClientIdKey,\n} from './private-keys';\n\nexport { getBlockSettings } from './get-block-settings';\n\n/**\n * Returns true if the block interface is hidden, or false otherwise.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the block toolbar is hidden.\n */\nexport function isBlockInterfaceHidden( state ) {\n\treturn state.isBlockInterfaceHidden;\n}\n\n/**\n * Gets the client ids of the last inserted blocks.\n *\n * @param {Object} state Global application state.\n * @return {Array|undefined} Client Ids of the last inserted block(s).\n */\nexport function getLastInsertedBlocksClientIds( state ) {\n\treturn state?.lastBlockInserted?.clientIds;\n}\n\nexport function getBlockWithoutAttributes( state, clientId ) {\n\treturn state.blocks.byClientId.get( clientId );\n}\n\n/**\n * Returns true if all of the descendants of a block with the given client ID\n * have an editing mode of 'disabled', or false otherwise.\n *\n * @param {Object} state Global application state.\n * @param {string} clientId The block client ID.\n *\n * @return {boolean} Whether the block descendants are disabled.\n */\nexport const isBlockSubtreeDisabled = ( state, clientId ) => {\n\tconst isChildSubtreeDisabled = ( childClientId ) => {\n\t\treturn (\n\t\t\tgetBlockEditingMode( state, childClientId ) === 'disabled' &&\n\t\t\tgetBlockOrder( state, childClientId ).every(\n\t\t\t\tisChildSubtreeDisabled\n\t\t\t)\n\t\t);\n\t};\n\treturn getBlockOrder( state, clientId ).every( isChildSubtreeDisabled );\n};\n\nfunction getEnabledClientIdsTreeUnmemoized( state, rootClientId ) {\n\tconst blockOrder = getBlockOrder( state, rootClientId );\n\tconst result = [];\n\n\tfor ( const clientId of blockOrder ) {\n\t\tconst innerBlocks = getEnabledClientIdsTreeUnmemoized(\n\t\t\tstate,\n\t\t\tclientId\n\t\t);\n\t\tif ( getBlockEditingMode( state, clientId ) !== 'disabled' ) {\n\t\t\tresult.push( { clientId, innerBlocks } );\n\t\t} else {\n\t\t\tresult.push( ...innerBlocks );\n\t\t}\n\t}\n\n\treturn result;\n}\n\n/**\n * Returns a tree of block objects with only clientID and innerBlocks set.\n * Blocks with a 'disabled' editing mode are not included.\n *\n * @param {Object} state Global application state.\n * @param {?string} rootClientId Optional root client ID of block list.\n *\n * @return {Object[]} Tree of block objects with only clientID and innerBlocks set.\n */\nexport const getEnabledClientIdsTree = createSelector(\n\tgetEnabledClientIdsTreeUnmemoized,\n\t( state ) => [\n\t\tstate.blocks.order,\n\t\tstate.blockEditingModes,\n\t\tstate.settings.templateLock,\n\t\tstate.blockListSettings,\n\t\tstate.editorMode,\n\t\tgetSectionRootClientId( state ),\n\t]\n);\n\n/**\n * Returns a list of a given block's ancestors, from top to bottom. Blocks with\n * a 'disabled' editing mode are excluded.\n *\n * @see getBlockParents\n *\n * @param {Object} state Global application state.\n * @param {string} clientId The block client ID.\n * @param {boolean} ascending Order results from bottom to top (true) or top\n * to bottom (false).\n */\nexport const getEnabledBlockParents = createSelector(\n\t( state, clientId, ascending = false ) => {\n\t\treturn getBlockParents( state, clientId, ascending ).filter(\n\t\t\t( parent ) => getBlockEditingMode( state, parent ) !== 'disabled'\n\t\t);\n\t},\n\t( state ) => [\n\t\tstate.blocks.parents,\n\t\tstate.blockEditingModes,\n\t\tstate.settings.templateLock,\n\t\tstate.blockListSettings,\n\t]\n);\n\n/**\n * Selector that returns the data needed to display a prompt when certain\n * blocks are removed, or `false` if no such prompt is requested.\n *\n * @param {Object} state Global application state.\n *\n * @return {Object|false} Data for removal prompt display, if any.\n */\nexport function getRemovalPromptData( state ) {\n\treturn state.removalPromptData;\n}\n\n/**\n * Returns true if removal prompt exists, or false otherwise.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether removal prompt exists.\n */\nexport function getBlockRemovalRules( state ) {\n\treturn state.blockRemovalRules;\n}\n\n/**\n * Returns the client ID of the block settings menu that is currently open.\n *\n * @param {Object} state Global application state.\n * @return {string|null} The client ID of the block menu that is currently open.\n */\nexport function getOpenedBlockSettingsMenu( state ) {\n\treturn state.openedBlockSettingsMenu;\n}\n\n/**\n * Returns all style overrides, intended to be merged with global editor styles.\n *\n * Overrides are sorted to match the order of the blocks they relate to. This\n * is useful to maintain correct CSS cascade order.\n *\n * @param {Object} state Global application state.\n *\n * @return {Array} An array of style ID to style override pairs.\n */\nexport const getStyleOverrides = createSelector(\n\t( state ) => {\n\t\tconst clientIds = getClientIdsWithDescendants( state );\n\t\tconst clientIdMap = clientIds.reduce( ( acc, clientId, index ) => {\n\t\t\tacc[ clientId ] = index;\n\t\t\treturn acc;\n\t\t}, {} );\n\n\t\treturn [ ...state.styleOverrides ].sort( ( overrideA, overrideB ) => {\n\t\t\t// Once the overrides Map is spread to an array, the first element\n\t\t\t// is the key, while the second is the override itself including\n\t\t\t// the clientId to sort by.\n\t\t\tconst [ , { clientId: clientIdA } ] = overrideA;\n\t\t\tconst [ , { clientId: clientIdB } ] = overrideB;\n\n\t\t\tconst aIndex = clientIdMap[ clientIdA ] ?? -1;\n\t\t\tconst bIndex = clientIdMap[ clientIdB ] ?? -1;\n\n\t\t\treturn aIndex - bIndex;\n\t\t} );\n\t},\n\t( state ) => [ state.blocks.order, state.styleOverrides ]\n);\n\n/** @typedef {import('./actions').InserterMediaCategory} InserterMediaCategory */\n/**\n * Returns the registered inserter media categories through the public API.\n *\n * @param {Object} state Editor state.\n *\n * @return {InserterMediaCategory[]} Inserter media categories.\n */\nexport function getRegisteredInserterMediaCategories( state ) {\n\treturn state.registeredInserterMediaCategories;\n}\n\n/**\n * Returns an array containing the allowed inserter media categories.\n * It merges the registered media categories from extenders with the\n * core ones. It also takes into account the allowed `mime_types`, which\n * can be altered by `upload_mimes` filter and restrict some of them.\n *\n * @param {Object} state Global application state.\n *\n * @return {InserterMediaCategory[]} Client IDs of descendants.\n */\nexport const getInserterMediaCategories = createSelector(\n\t( state ) => {\n\t\tconst {\n\t\t\tsettings: {\n\t\t\t\tinserterMediaCategories,\n\t\t\t\tallowedMimeTypes,\n\t\t\t\tenableOpenverseMediaCategory,\n\t\t\t},\n\t\t\tregisteredInserterMediaCategories,\n\t\t} = state;\n\t\t// The allowed `mime_types` can be altered by `upload_mimes` filter and restrict\n\t\t// some of them. In this case we shouldn't add the category to the available media\n\t\t// categories list in the inserter.\n\t\tif (\n\t\t\t( ! inserterMediaCategories &&\n\t\t\t\t! registeredInserterMediaCategories.length ) ||\n\t\t\t! allowedMimeTypes\n\t\t) {\n\t\t\treturn;\n\t\t}\n\t\tconst coreInserterMediaCategoriesNames =\n\t\t\tinserterMediaCategories?.map( ( { name } ) => name ) || [];\n\t\tconst mergedCategories = [\n\t\t\t...( inserterMediaCategories || [] ),\n\t\t\t...( registeredInserterMediaCategories || [] ).filter(\n\t\t\t\t( { name } ) =>\n\t\t\t\t\t! coreInserterMediaCategoriesNames.includes( name )\n\t\t\t),\n\t\t];\n\t\treturn mergedCategories.filter( ( category ) => {\n\t\t\t// Check if Openverse category is enabled.\n\t\t\tif (\n\t\t\t\t! enableOpenverseMediaCategory &&\n\t\t\t\tcategory.name === 'openverse'\n\t\t\t) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn Object.values( allowedMimeTypes ).some( ( mimeType ) =>\n\t\t\t\tmimeType.startsWith( `${ category.mediaType }/` )\n\t\t\t);\n\t\t} );\n\t},\n\t( state ) => [\n\t\tstate.settings.inserterMediaCategories,\n\t\tstate.settings.allowedMimeTypes,\n\t\tstate.settings.enableOpenverseMediaCategory,\n\t\tstate.registeredInserterMediaCategories,\n\t]\n);\n\n/**\n * Returns whether there is at least one allowed pattern for inner blocks children.\n * This is useful for deferring the parsing of all patterns until needed.\n *\n * @param {Object} state Editor state.\n * @param {string} [rootClientId=null] Target root client ID.\n *\n * @return {boolean} If there is at least one allowed pattern.\n */\nexport const hasAllowedPatterns = createRegistrySelector( ( select ) =>\n\tcreateSelector(\n\t\t( state, rootClientId = null ) => {\n\t\t\tconst { getAllPatterns } = unlock( select( STORE_NAME ) );\n\t\t\tconst patterns = getAllPatterns();\n\t\t\tconst { allowedBlockTypes } = getSettings( state );\n\t\t\treturn patterns.some( ( pattern ) => {\n\t\t\t\tconst { inserter = true } = pattern;\n\t\t\t\tif ( ! inserter ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tconst grammar = getGrammar( pattern );\n\t\t\t\treturn (\n\t\t\t\t\tcheckAllowListRecursive( grammar, allowedBlockTypes ) &&\n\t\t\t\t\tgrammar.every( ( { name: blockName } ) =>\n\t\t\t\t\t\tcanInsertBlockType( state, blockName, rootClientId )\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t} );\n\t\t},\n\t\t( state, rootClientId ) => [\n\t\t\t...getAllPatternsDependants( select )( state ),\n\t\t\t...getInsertBlockTypeDependants( state, rootClientId ),\n\t\t]\n\t)\n);\n\nfunction mapUserPattern(\n\tuserPattern,\n\t__experimentalUserPatternCategories = []\n) {\n\treturn {\n\t\tname: `core/block/${ userPattern.id }`,\n\t\tid: userPattern.id,\n\t\ttype: INSERTER_PATTERN_TYPES.user,\n\t\ttitle: userPattern.title.raw,\n\t\tcategories: userPattern.wp_pattern_category.map( ( catId ) => {\n\t\t\tconst category = __experimentalUserPatternCategories.find(\n\t\t\t\t( { id } ) => id === catId\n\t\t\t);\n\t\t\treturn category ? category.slug : catId;\n\t\t} ),\n\t\tcontent: userPattern.content.raw,\n\t\tsyncStatus: userPattern.wp_pattern_sync_status,\n\t};\n}\n\nexport const getPatternBySlug = createRegistrySelector( ( select ) =>\n\tcreateSelector(\n\t\t( state, patternName ) => {\n\t\t\t// Only fetch reusable blocks if we know we need them. To do: maybe\n\t\t\t// use the entity record API to retrieve the block by slug.\n\t\t\tif ( patternName?.startsWith( 'core/block/' ) ) {\n\t\t\t\tconst _id = parseInt(\n\t\t\t\t\tpatternName.slice( 'core/block/'.length ),\n\t\t\t\t\t10\n\t\t\t\t);\n\t\t\t\tconst block = unlock( select( STORE_NAME ) )\n\t\t\t\t\t.getReusableBlocks()\n\t\t\t\t\t.find( ( { id } ) => id === _id );\n\n\t\t\t\tif ( ! block ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\treturn mapUserPattern(\n\t\t\t\t\tblock,\n\t\t\t\t\tstate.settings.__experimentalUserPatternCategories\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn [\n\t\t\t\t// This setting is left for back compat.\n\t\t\t\t...( state.settings.__experimentalBlockPatterns ?? [] ),\n\t\t\t\t...( state.settings[ selectBlockPatternsKey ]?.( select ) ??\n\t\t\t\t\t[] ),\n\t\t\t].find( ( { name } ) => name === patternName );\n\t\t},\n\t\t( state, patternName ) =>\n\t\t\tpatternName?.startsWith( 'core/block/' )\n\t\t\t\t? [\n\t\t\t\t\t\tunlock( select( STORE_NAME ) ).getReusableBlocks(),\n\t\t\t\t\t\tstate.settings.__experimentalReusableBlocks,\n\t\t\t\t ]\n\t\t\t\t: [\n\t\t\t\t\t\tstate.settings.__experimentalBlockPatterns,\n\t\t\t\t\t\tstate.settings[ selectBlockPatternsKey ]?.( select ),\n\t\t\t\t ]\n\t)\n);\n\nexport const getAllPatterns = createRegistrySelector( ( select ) =>\n\tcreateSelector( ( state ) => {\n\t\treturn [\n\t\t\t...unlock( select( STORE_NAME ) )\n\t\t\t\t.getReusableBlocks()\n\t\t\t\t.map( ( userPattern ) =>\n\t\t\t\t\tmapUserPattern(\n\t\t\t\t\t\tuserPattern,\n\t\t\t\t\t\tstate.settings.__experimentalUserPatternCategories\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t// This setting is left for back compat.\n\t\t\t...( state.settings.__experimentalBlockPatterns ?? [] ),\n\t\t\t...( state.settings[ selectBlockPatternsKey ]?.( select ) ?? [] ),\n\t\t].filter(\n\t\t\t( x, index, arr ) =>\n\t\t\t\tindex === arr.findIndex( ( y ) => x.name === y.name )\n\t\t);\n\t}, getAllPatternsDependants( select ) )\n);\n\nexport const isResolvingPatterns = createRegistrySelector( ( select ) =>\n\tcreateSelector( ( state ) => {\n\t\tconst blockPatternsSelect = state.settings[ selectBlockPatternsKey ];\n\t\tconst reusableBlocksSelect = state.settings[ reusableBlocksSelectKey ];\n\t\treturn (\n\t\t\t( blockPatternsSelect\n\t\t\t\t? blockPatternsSelect( select ) === undefined\n\t\t\t\t: false ) ||\n\t\t\t( reusableBlocksSelect\n\t\t\t\t? reusableBlocksSelect( select ) === undefined\n\t\t\t\t: false )\n\t\t);\n\t}, getAllPatternsDependants( select ) )\n);\n\nconst EMPTY_ARRAY = [];\n\nexport const getReusableBlocks = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\tconst reusableBlocksSelect = state.settings[ reusableBlocksSelectKey ];\n\t\treturn (\n\t\t\t( reusableBlocksSelect\n\t\t\t\t? reusableBlocksSelect( select )\n\t\t\t\t: state.settings.__experimentalReusableBlocks ) ?? EMPTY_ARRAY\n\t\t);\n\t}\n);\n\n/**\n * Returns the element of the last element that had focus when focus left the editor canvas.\n *\n * @param {Object} state Block editor state.\n *\n * @return {Object} Element.\n */\nexport function getLastFocus( state ) {\n\treturn state.lastFocus;\n}\n\n/**\n * Returns true if the user is dragging anything, or false otherwise. It is possible for a\n * user to be dragging data from outside of the editor, so this selector is separate from\n * the `isDraggingBlocks` selector which only returns true if the user is dragging blocks.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether user is dragging.\n */\nexport function isDragging( state ) {\n\treturn state.isDragging;\n}\n\n/**\n * Retrieves the expanded block from the state.\n *\n * @param {Object} state Block editor state.\n *\n * @return {string|null} The client ID of the expanded block, if set.\n */\nexport function getExpandedBlock( state ) {\n\treturn state.expandedBlock;\n}\n\n/**\n * Retrieves the client ID of the ancestor block that is content locking the block\n * with the provided client ID.\n *\n * @param {Object} state Global application state.\n * @param {string} clientId Client Id of the block.\n *\n * @return {?string} Client ID of the ancestor block that is content locking the block.\n */\nexport const getContentLockingParent = ( state, clientId ) => {\n\tlet current = clientId;\n\tlet result;\n\twhile ( ! result && ( current = state.blocks.parents.get( current ) ) ) {\n\t\tif ( getTemplateLock( state, current ) === 'contentOnly' ) {\n\t\t\tresult = current;\n\t\t}\n\t}\n\treturn result;\n};\n\n/**\n * Retrieves the client ID of the parent section block.\n *\n * @param {Object} state Global application state.\n * @param {string} clientId Client Id of the block.\n *\n * @return {?string} Client ID of the ancestor block that is content locking the block.\n */\nexport const getParentSectionBlock = ( state, clientId ) => {\n\tlet current = clientId;\n\tlet result;\n\twhile ( ! result && ( current = state.blocks.parents.get( current ) ) ) {\n\t\tif ( isSectionBlock( state, current ) ) {\n\t\t\tresult = current;\n\t\t}\n\t}\n\treturn result;\n};\n\n/**\n * Retrieves the client ID is a content locking parent\n *\n * @param {Object} state Global application state.\n * @param {string} clientId Client Id of the block.\n *\n * @return {boolean} Whether the block is a content locking parent.\n */\nexport function isSectionBlock( state, clientId ) {\n\tconst sectionRootClientId = getSectionRootClientId( state );\n\tconst sectionClientIds = getBlockOrder( state, sectionRootClientId );\n\treturn (\n\t\tgetBlockName( state, clientId ) === 'core/block' ||\n\t\tgetTemplateLock( state, clientId ) === 'contentOnly' ||\n\t\t( isNavigationMode( state ) && sectionClientIds.includes( clientId ) )\n\t);\n}\n\n/**\n * Retrieves the client ID of the block that is content locked but is\n * currently being temporarily edited as a non-locked block.\n *\n * @param {Object} state Global application state.\n *\n * @return {?string} The client ID of the block being temporarily edited as a non-locked block.\n */\nexport function getTemporarilyEditingAsBlocks( state ) {\n\treturn state.temporarilyEditingAsBlocks;\n}\n\n/**\n * Returns the focus mode that should be reapplied when the user stops editing\n * a content locked blocks as a block without locking.\n *\n * @param {Object} state Global application state.\n *\n * @return {?string} The focus mode that should be re-set when temporarily editing as blocks stops.\n */\nexport function getTemporarilyEditingFocusModeToRevert( state ) {\n\treturn state.temporarilyEditingFocusModeRevert;\n}\n\n/**\n * Returns the style attributes of multiple blocks.\n *\n * @param {Object} state Global application state.\n * @param {string[]} clientIds An array of block client IDs.\n *\n * @return {Object} An object where keys are client IDs and values are the corresponding block styles or undefined.\n */\nexport const getBlockStyles = createSelector(\n\t( state, clientIds ) =>\n\t\tclientIds.reduce( ( styles, clientId ) => {\n\t\t\tstyles[ clientId ] = state.blocks.attributes.get( clientId )?.style;\n\t\t\treturn styles;\n\t\t}, {} ),\n\t( state, clientIds ) => [\n\t\t...clientIds.map(\n\t\t\t( clientId ) => state.blocks.attributes.get( clientId )?.style\n\t\t),\n\t]\n);\n\n/**\n * Returns whether zoom out mode is enabled.\n *\n * @param {Object} state Editor state.\n *\n * @return {boolean} Is zoom out mode enabled.\n */\nexport function isZoomOutMode( state ) {\n\treturn state.editorMode === 'zoom-out';\n}\n\n/**\n * Retrieves the client ID of the block which contains the blocks\n * acting as \"sections\" in the editor. This is typically the \"main content\"\n * of the template/post.\n *\n * @param {Object} state Editor state.\n *\n * @return {string|undefined} The section root client ID or undefined if not set.\n */\nexport function getSectionRootClientId( state ) {\n\treturn state.settings?.[ sectionRootClientIdKey ];\n}\n\n/**\n * Returns the zoom out state.\n *\n * @param {Object} state Global application state.\n * @return {boolean} The zoom out state.\n */\nexport function getZoomLevel( state ) {\n\treturn state.zoomLevel;\n}\n\n/**\n * Returns whether the editor is considered zoomed out.\n *\n * @param {Object} state Global application state.\n * @return {boolean} Whether the editor is zoomed.\n */\nexport function isZoomOut( state ) {\n\treturn getZoomLevel( state ) < 100;\n}\n\n/**\n * Finds the closest block where the block is allowed to be inserted.\n *\n * @param {Object} state Editor state.\n * @param {string[] | string} name Block name or names.\n * @param {string} clientId Default insertion point.\n *\n * @return {string} clientID of the closest container when the block name can be inserted.\n */\nexport function getClosestAllowedInsertionPoint( state, name, clientId = '' ) {\n\tconst blockNames = Array.isArray( name ) ? name : [ name ];\n\tconst areBlockNamesAllowedInClientId = ( id ) =>\n\t\tblockNames.every( ( currentName ) =>\n\t\t\tcanInsertBlockType( state, currentName, id )\n\t\t);\n\n\t// If we're trying to insert at the root level and it's not allowed\n\t// Try the section root instead.\n\tif ( ! clientId ) {\n\t\tif ( areBlockNamesAllowedInClientId( clientId ) ) {\n\t\t\treturn clientId;\n\t\t}\n\n\t\tconst sectionRootClientId = getSectionRootClientId( state );\n\t\tif (\n\t\t\tsectionRootClientId &&\n\t\t\tareBlockNamesAllowedInClientId( sectionRootClientId )\n\t\t) {\n\t\t\treturn sectionRootClientId;\n\t\t}\n\t\treturn null;\n\t}\n\n\t// Traverse the block tree up until we find a place where we can insert.\n\tlet current = clientId;\n\twhile ( current !== null && ! areBlockNamesAllowedInClientId( current ) ) {\n\t\tconst parentClientId = getBlockRootClientId( state, current );\n\t\tcurrent = parentClientId;\n\t}\n\n\treturn current;\n}\n\nexport function getClosestAllowedInsertionPointForPattern(\n\tstate,\n\tpattern,\n\tclientId\n) {\n\tconst { allowedBlockTypes } = getSettings( state );\n\tconst isAllowed = checkAllowListRecursive(\n\t\tgetGrammar( pattern ),\n\t\tallowedBlockTypes\n\t);\n\tif ( ! isAllowed ) {\n\t\treturn null;\n\t}\n\tconst names = getGrammar( pattern ).map( ( { blockName: name } ) => name );\n\treturn getClosestAllowedInsertionPoint( state, names, clientId );\n}\n\n/**\n * Where the point where the next block will be inserted into.\n *\n * @param {Object} state\n * @return {Object} where the insertion point in the block editor is or null if none is set.\n */\nexport function getInsertionPoint( state ) {\n\treturn state.insertionPoint;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAKA,IAAAC,UAAA,GAAAD,OAAA;AAYA,IAAAE,MAAA,GAAAF,OAAA;AAMA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AAMA,IAAAO,iBAAA,GAAAP,OAAA;AAnCA;AACA;AACA;;AAGA;AACA;AACA;;AA8BA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASQ,sBAAsBA,CAAEC,KAAK,EAAG;EAC/C,OAAOA,KAAK,CAACD,sBAAsB;AACpC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACO,SAASE,8BAA8BA,CAAED,KAAK,EAAG;EACvD,OAAOA,KAAK,EAAEE,iBAAiB,EAAEC,SAAS;AAC3C;AAEO,SAASC,yBAAyBA,CAAEJ,KAAK,EAAEK,QAAQ,EAAG;EAC5D,OAAOL,KAAK,CAACM,MAAM,CAACC,UAAU,CAACC,GAAG,CAAEH,QAAS,CAAC;AAC/C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMI,sBAAsB,GAAGA,CAAET,KAAK,EAAEK,QAAQ,KAAM;EAC5D,MAAMK,sBAAsB,GAAKC,aAAa,IAAM;IACnD,OACC,IAAAC,8BAAmB,EAAEZ,KAAK,EAAEW,aAAc,CAAC,KAAK,UAAU,IAC1D,IAAAE,wBAAa,EAAEb,KAAK,EAAEW,aAAc,CAAC,CAACG,KAAK,CAC1CJ,sBACD,CAAC;EAEH,CAAC;EACD,OAAO,IAAAG,wBAAa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EACD,MAAM;IAAEgF;EAAkB,CAAC,GAAG,IAAAC,sBAAW,EAAEtF,KAAM,CAAC;EAClD,MAAM8K,SAAS,GAAG,IAAAnF,8BAAuB,EACxC,IAAAD,iBAAU,EAAEH,OAAQ,CAAC,EACrBF,iBACD,CAAC;EACD,IAAK,CAAEyF,SAAS,EAAG;IAClB,OAAO,IAAI;EACZ;EACA,MAAMC,KAAK,GAAG,IAAArF,iBAAU,EAAEH,OAAQ,CAAC,CAACpB,GAAG,CAAE,CAAE;IAAEyB,SAAS,EAAExB;EAAK,CAAC,KAAMA,IAAK,CAAC;EAC1E,OAAOiG,+BAA+B,CAAErK,KAAK,EAAE+K,KAAK,EAAE1K,QAAS,CAAC;AACjE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS2K,iBAAiBA,CAAEhL,KAAK,EAAG;EAC1C,OAAOA,KAAK,CAACiL,cAAc;AAC5B","ignoreList":[]}
1
+ {"version":3,"names":["_data","require","_selectors","_utils","_utils2","_constants","_lockUnlock","_privateKeys","_getBlockSettings","isBlockInterfaceHidden","state","getLastInsertedBlocksClientIds","lastBlockInserted","clientIds","getBlockWithoutAttributes","clientId","blocks","byClientId","get","isBlockSubtreeDisabled","isChildSubtreeDisabled","childClientId","getBlockEditingMode","getBlockOrder","every","exports","getEnabledClientIdsTreeUnmemoized","rootClientId","blockOrder","result","innerBlocks","push","getEnabledClientIdsTree","createSelector","order","blockEditingModes","settings","templateLock","blockListSettings","editorMode","zoomLevel","getSectionRootClientId","getEnabledBlockParents","ascending","getBlockParents","filter","parent","parents","getRemovalPromptData","removalPromptData","getBlockRemovalRules","blockRemovalRules","getOpenedBlockSettingsMenu","openedBlockSettingsMenu","getStyleOverrides","getClientIdsWithDescendants","clientIdMap","reduce","acc","index","styleOverrides","sort","overrideA","overrideB","_clientIdMap$clientId","_clientIdMap$clientId2","clientIdA","clientIdB","aIndex","bIndex","getRegisteredInserterMediaCategories","registeredInserterMediaCategories","getInserterMediaCategories","inserterMediaCategories","allowedMimeTypes","enableOpenverseMediaCategory","length","coreInserterMediaCategoriesNames","map","name","mergedCategories","includes","category","Object","values","some","mimeType","startsWith","mediaType","hasAllowedPatterns","createRegistrySelector","select","getAllPatterns","unlock","STORE_NAME","patterns","allowedBlockTypes","getSettings","pattern","inserter","grammar","getGrammar","checkAllowListRecursive","blockName","canInsertBlockType","getAllPatternsDependants","getInsertBlockTypeDependants","mapUserPattern","userPattern","__experimentalUserPatternCategories","id","type","INSERTER_PATTERN_TYPES","user","title","raw","categories","wp_pattern_category","catId","find","slug","content","syncStatus","wp_pattern_sync_status","getPatternBySlug","patternName","_state$settings$__exp","_state$settings$selec","_id","parseInt","slice","block","getReusableBlocks","__experimentalBlockPatterns","selectBlockPatternsKey","__experimentalReusableBlocks","_state$settings$__exp2","_state$settings$selec2","x","arr","findIndex","y","isResolvingPatterns","blockPatternsSelect","reusableBlocksSelect","reusableBlocksSelectKey","undefined","EMPTY_ARRAY","_ref","getLastFocus","lastFocus","isDragging","getExpandedBlock","expandedBlock","getContentLockingParent","current","getTemplateLock","getParentSectionBlock","isSectionBlock","sectionRootClientId","sectionClientIds","getBlockName","isNavigationMode","getTemporarilyEditingAsBlocks","temporarilyEditingAsBlocks","getTemporarilyEditingFocusModeToRevert","temporarilyEditingFocusModeRevert","getBlockStyles","styles","attributes","style","sectionRootClientIdKey","isZoomOut","getZoomLevel","getClosestAllowedInsertionPoint","blockNames","Array","isArray","areBlockNamesAllowedInClientId","currentName","parentClientId","getBlockRootClientId","getClosestAllowedInsertionPointForPattern","isAllowed","names","getInsertionPoint","insertionPoint"],"sources":["@wordpress/block-editor/src/store/private-selectors.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createSelector, createRegistrySelector } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport {\n\tgetBlockOrder,\n\tgetBlockParents,\n\tgetBlockEditingMode,\n\tgetSettings,\n\tcanInsertBlockType,\n\tgetBlockName,\n\tgetTemplateLock,\n\tgetClientIdsWithDescendants,\n\tisNavigationMode,\n\tgetBlockRootClientId,\n} from './selectors';\nimport {\n\tcheckAllowListRecursive,\n\tgetAllPatternsDependants,\n\tgetInsertBlockTypeDependants,\n\tgetGrammar,\n} from './utils';\nimport { INSERTER_PATTERN_TYPES } from '../components/inserter/block-patterns-tab/utils';\nimport { STORE_NAME } from './constants';\nimport { unlock } from '../lock-unlock';\nimport {\n\tselectBlockPatternsKey,\n\treusableBlocksSelectKey,\n\tsectionRootClientIdKey,\n} from './private-keys';\n\nexport { getBlockSettings } from './get-block-settings';\n\n/**\n * Returns true if the block interface is hidden, or false otherwise.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the block toolbar is hidden.\n */\nexport function isBlockInterfaceHidden( state ) {\n\treturn state.isBlockInterfaceHidden;\n}\n\n/**\n * Gets the client ids of the last inserted blocks.\n *\n * @param {Object} state Global application state.\n * @return {Array|undefined} Client Ids of the last inserted block(s).\n */\nexport function getLastInsertedBlocksClientIds( state ) {\n\treturn state?.lastBlockInserted?.clientIds;\n}\n\nexport function getBlockWithoutAttributes( state, clientId ) {\n\treturn state.blocks.byClientId.get( clientId );\n}\n\n/**\n * Returns true if all of the descendants of a block with the given client ID\n * have an editing mode of 'disabled', or false otherwise.\n *\n * @param {Object} state Global application state.\n * @param {string} clientId The block client ID.\n *\n * @return {boolean} Whether the block descendants are disabled.\n */\nexport const isBlockSubtreeDisabled = ( state, clientId ) => {\n\tconst isChildSubtreeDisabled = ( childClientId ) => {\n\t\treturn (\n\t\t\tgetBlockEditingMode( state, childClientId ) === 'disabled' &&\n\t\t\tgetBlockOrder( state, childClientId ).every(\n\t\t\t\tisChildSubtreeDisabled\n\t\t\t)\n\t\t);\n\t};\n\treturn getBlockOrder( state, clientId ).every( isChildSubtreeDisabled );\n};\n\nfunction getEnabledClientIdsTreeUnmemoized( state, rootClientId ) {\n\tconst blockOrder = getBlockOrder( state, rootClientId );\n\tconst result = [];\n\n\tfor ( const clientId of blockOrder ) {\n\t\tconst innerBlocks = getEnabledClientIdsTreeUnmemoized(\n\t\t\tstate,\n\t\t\tclientId\n\t\t);\n\t\tif ( getBlockEditingMode( state, clientId ) !== 'disabled' ) {\n\t\t\tresult.push( { clientId, innerBlocks } );\n\t\t} else {\n\t\t\tresult.push( ...innerBlocks );\n\t\t}\n\t}\n\n\treturn result;\n}\n\n/**\n * Returns a tree of block objects with only clientID and innerBlocks set.\n * Blocks with a 'disabled' editing mode are not included.\n *\n * @param {Object} state Global application state.\n * @param {?string} rootClientId Optional root client ID of block list.\n *\n * @return {Object[]} Tree of block objects with only clientID and innerBlocks set.\n */\nexport const getEnabledClientIdsTree = createSelector(\n\tgetEnabledClientIdsTreeUnmemoized,\n\t( state ) => [\n\t\tstate.blocks.order,\n\t\tstate.blockEditingModes,\n\t\tstate.settings.templateLock,\n\t\tstate.blockListSettings,\n\t\tstate.editorMode,\n\t\tstate.zoomLevel,\n\t\tgetSectionRootClientId( state ),\n\t]\n);\n\n/**\n * Returns a list of a given block's ancestors, from top to bottom. Blocks with\n * a 'disabled' editing mode are excluded.\n *\n * @see getBlockParents\n *\n * @param {Object} state Global application state.\n * @param {string} clientId The block client ID.\n * @param {boolean} ascending Order results from bottom to top (true) or top\n * to bottom (false).\n */\nexport const getEnabledBlockParents = createSelector(\n\t( state, clientId, ascending = false ) => {\n\t\treturn getBlockParents( state, clientId, ascending ).filter(\n\t\t\t( parent ) => getBlockEditingMode( state, parent ) !== 'disabled'\n\t\t);\n\t},\n\t( state ) => [\n\t\tstate.blocks.parents,\n\t\tstate.blockEditingModes,\n\t\tstate.settings.templateLock,\n\t\tstate.blockListSettings,\n\t]\n);\n\n/**\n * Selector that returns the data needed to display a prompt when certain\n * blocks are removed, or `false` if no such prompt is requested.\n *\n * @param {Object} state Global application state.\n *\n * @return {Object|false} Data for removal prompt display, if any.\n */\nexport function getRemovalPromptData( state ) {\n\treturn state.removalPromptData;\n}\n\n/**\n * Returns true if removal prompt exists, or false otherwise.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether removal prompt exists.\n */\nexport function getBlockRemovalRules( state ) {\n\treturn state.blockRemovalRules;\n}\n\n/**\n * Returns the client ID of the block settings menu that is currently open.\n *\n * @param {Object} state Global application state.\n * @return {string|null} The client ID of the block menu that is currently open.\n */\nexport function getOpenedBlockSettingsMenu( state ) {\n\treturn state.openedBlockSettingsMenu;\n}\n\n/**\n * Returns all style overrides, intended to be merged with global editor styles.\n *\n * Overrides are sorted to match the order of the blocks they relate to. This\n * is useful to maintain correct CSS cascade order.\n *\n * @param {Object} state Global application state.\n *\n * @return {Array} An array of style ID to style override pairs.\n */\nexport const getStyleOverrides = createSelector(\n\t( state ) => {\n\t\tconst clientIds = getClientIdsWithDescendants( state );\n\t\tconst clientIdMap = clientIds.reduce( ( acc, clientId, index ) => {\n\t\t\tacc[ clientId ] = index;\n\t\t\treturn acc;\n\t\t}, {} );\n\n\t\treturn [ ...state.styleOverrides ].sort( ( overrideA, overrideB ) => {\n\t\t\t// Once the overrides Map is spread to an array, the first element\n\t\t\t// is the key, while the second is the override itself including\n\t\t\t// the clientId to sort by.\n\t\t\tconst [ , { clientId: clientIdA } ] = overrideA;\n\t\t\tconst [ , { clientId: clientIdB } ] = overrideB;\n\n\t\t\tconst aIndex = clientIdMap[ clientIdA ] ?? -1;\n\t\t\tconst bIndex = clientIdMap[ clientIdB ] ?? -1;\n\n\t\t\treturn aIndex - bIndex;\n\t\t} );\n\t},\n\t( state ) => [ state.blocks.order, state.styleOverrides ]\n);\n\n/** @typedef {import('./actions').InserterMediaCategory} InserterMediaCategory */\n/**\n * Returns the registered inserter media categories through the public API.\n *\n * @param {Object} state Editor state.\n *\n * @return {InserterMediaCategory[]} Inserter media categories.\n */\nexport function getRegisteredInserterMediaCategories( state ) {\n\treturn state.registeredInserterMediaCategories;\n}\n\n/**\n * Returns an array containing the allowed inserter media categories.\n * It merges the registered media categories from extenders with the\n * core ones. It also takes into account the allowed `mime_types`, which\n * can be altered by `upload_mimes` filter and restrict some of them.\n *\n * @param {Object} state Global application state.\n *\n * @return {InserterMediaCategory[]} Client IDs of descendants.\n */\nexport const getInserterMediaCategories = createSelector(\n\t( state ) => {\n\t\tconst {\n\t\t\tsettings: {\n\t\t\t\tinserterMediaCategories,\n\t\t\t\tallowedMimeTypes,\n\t\t\t\tenableOpenverseMediaCategory,\n\t\t\t},\n\t\t\tregisteredInserterMediaCategories,\n\t\t} = state;\n\t\t// The allowed `mime_types` can be altered by `upload_mimes` filter and restrict\n\t\t// some of them. In this case we shouldn't add the category to the available media\n\t\t// categories list in the inserter.\n\t\tif (\n\t\t\t( ! inserterMediaCategories &&\n\t\t\t\t! registeredInserterMediaCategories.length ) ||\n\t\t\t! allowedMimeTypes\n\t\t) {\n\t\t\treturn;\n\t\t}\n\t\tconst coreInserterMediaCategoriesNames =\n\t\t\tinserterMediaCategories?.map( ( { name } ) => name ) || [];\n\t\tconst mergedCategories = [\n\t\t\t...( inserterMediaCategories || [] ),\n\t\t\t...( registeredInserterMediaCategories || [] ).filter(\n\t\t\t\t( { name } ) =>\n\t\t\t\t\t! coreInserterMediaCategoriesNames.includes( name )\n\t\t\t),\n\t\t];\n\t\treturn mergedCategories.filter( ( category ) => {\n\t\t\t// Check if Openverse category is enabled.\n\t\t\tif (\n\t\t\t\t! enableOpenverseMediaCategory &&\n\t\t\t\tcategory.name === 'openverse'\n\t\t\t) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn Object.values( allowedMimeTypes ).some( ( mimeType ) =>\n\t\t\t\tmimeType.startsWith( `${ category.mediaType }/` )\n\t\t\t);\n\t\t} );\n\t},\n\t( state ) => [\n\t\tstate.settings.inserterMediaCategories,\n\t\tstate.settings.allowedMimeTypes,\n\t\tstate.settings.enableOpenverseMediaCategory,\n\t\tstate.registeredInserterMediaCategories,\n\t]\n);\n\n/**\n * Returns whether there is at least one allowed pattern for inner blocks children.\n * This is useful for deferring the parsing of all patterns until needed.\n *\n * @param {Object} state Editor state.\n * @param {string} [rootClientId=null] Target root client ID.\n *\n * @return {boolean} If there is at least one allowed pattern.\n */\nexport const hasAllowedPatterns = createRegistrySelector( ( select ) =>\n\tcreateSelector(\n\t\t( state, rootClientId = null ) => {\n\t\t\tconst { getAllPatterns } = unlock( select( STORE_NAME ) );\n\t\t\tconst patterns = getAllPatterns();\n\t\t\tconst { allowedBlockTypes } = getSettings( state );\n\t\t\treturn patterns.some( ( pattern ) => {\n\t\t\t\tconst { inserter = true } = pattern;\n\t\t\t\tif ( ! inserter ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tconst grammar = getGrammar( pattern );\n\t\t\t\treturn (\n\t\t\t\t\tcheckAllowListRecursive( grammar, allowedBlockTypes ) &&\n\t\t\t\t\tgrammar.every( ( { name: blockName } ) =>\n\t\t\t\t\t\tcanInsertBlockType( state, blockName, rootClientId )\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t} );\n\t\t},\n\t\t( state, rootClientId ) => [\n\t\t\t...getAllPatternsDependants( select )( state ),\n\t\t\t...getInsertBlockTypeDependants( state, rootClientId ),\n\t\t]\n\t)\n);\n\nfunction mapUserPattern(\n\tuserPattern,\n\t__experimentalUserPatternCategories = []\n) {\n\treturn {\n\t\tname: `core/block/${ userPattern.id }`,\n\t\tid: userPattern.id,\n\t\ttype: INSERTER_PATTERN_TYPES.user,\n\t\ttitle: userPattern.title.raw,\n\t\tcategories: userPattern.wp_pattern_category.map( ( catId ) => {\n\t\t\tconst category = __experimentalUserPatternCategories.find(\n\t\t\t\t( { id } ) => id === catId\n\t\t\t);\n\t\t\treturn category ? category.slug : catId;\n\t\t} ),\n\t\tcontent: userPattern.content.raw,\n\t\tsyncStatus: userPattern.wp_pattern_sync_status,\n\t};\n}\n\nexport const getPatternBySlug = createRegistrySelector( ( select ) =>\n\tcreateSelector(\n\t\t( state, patternName ) => {\n\t\t\t// Only fetch reusable blocks if we know we need them. To do: maybe\n\t\t\t// use the entity record API to retrieve the block by slug.\n\t\t\tif ( patternName?.startsWith( 'core/block/' ) ) {\n\t\t\t\tconst _id = parseInt(\n\t\t\t\t\tpatternName.slice( 'core/block/'.length ),\n\t\t\t\t\t10\n\t\t\t\t);\n\t\t\t\tconst block = unlock( select( STORE_NAME ) )\n\t\t\t\t\t.getReusableBlocks()\n\t\t\t\t\t.find( ( { id } ) => id === _id );\n\n\t\t\t\tif ( ! block ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\treturn mapUserPattern(\n\t\t\t\t\tblock,\n\t\t\t\t\tstate.settings.__experimentalUserPatternCategories\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn [\n\t\t\t\t// This setting is left for back compat.\n\t\t\t\t...( state.settings.__experimentalBlockPatterns ?? [] ),\n\t\t\t\t...( state.settings[ selectBlockPatternsKey ]?.( select ) ??\n\t\t\t\t\t[] ),\n\t\t\t].find( ( { name } ) => name === patternName );\n\t\t},\n\t\t( state, patternName ) =>\n\t\t\tpatternName?.startsWith( 'core/block/' )\n\t\t\t\t? [\n\t\t\t\t\t\tunlock( select( STORE_NAME ) ).getReusableBlocks(),\n\t\t\t\t\t\tstate.settings.__experimentalReusableBlocks,\n\t\t\t\t ]\n\t\t\t\t: [\n\t\t\t\t\t\tstate.settings.__experimentalBlockPatterns,\n\t\t\t\t\t\tstate.settings[ selectBlockPatternsKey ]?.( select ),\n\t\t\t\t ]\n\t)\n);\n\nexport const getAllPatterns = createRegistrySelector( ( select ) =>\n\tcreateSelector( ( state ) => {\n\t\treturn [\n\t\t\t...unlock( select( STORE_NAME ) )\n\t\t\t\t.getReusableBlocks()\n\t\t\t\t.map( ( userPattern ) =>\n\t\t\t\t\tmapUserPattern(\n\t\t\t\t\t\tuserPattern,\n\t\t\t\t\t\tstate.settings.__experimentalUserPatternCategories\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t// This setting is left for back compat.\n\t\t\t...( state.settings.__experimentalBlockPatterns ?? [] ),\n\t\t\t...( state.settings[ selectBlockPatternsKey ]?.( select ) ?? [] ),\n\t\t].filter(\n\t\t\t( x, index, arr ) =>\n\t\t\t\tindex === arr.findIndex( ( y ) => x.name === y.name )\n\t\t);\n\t}, getAllPatternsDependants( select ) )\n);\n\nexport const isResolvingPatterns = createRegistrySelector( ( select ) =>\n\tcreateSelector( ( state ) => {\n\t\tconst blockPatternsSelect = state.settings[ selectBlockPatternsKey ];\n\t\tconst reusableBlocksSelect = state.settings[ reusableBlocksSelectKey ];\n\t\treturn (\n\t\t\t( blockPatternsSelect\n\t\t\t\t? blockPatternsSelect( select ) === undefined\n\t\t\t\t: false ) ||\n\t\t\t( reusableBlocksSelect\n\t\t\t\t? reusableBlocksSelect( select ) === undefined\n\t\t\t\t: false )\n\t\t);\n\t}, getAllPatternsDependants( select ) )\n);\n\nconst EMPTY_ARRAY = [];\n\nexport const getReusableBlocks = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\tconst reusableBlocksSelect = state.settings[ reusableBlocksSelectKey ];\n\t\treturn (\n\t\t\t( reusableBlocksSelect\n\t\t\t\t? reusableBlocksSelect( select )\n\t\t\t\t: state.settings.__experimentalReusableBlocks ) ?? EMPTY_ARRAY\n\t\t);\n\t}\n);\n\n/**\n * Returns the element of the last element that had focus when focus left the editor canvas.\n *\n * @param {Object} state Block editor state.\n *\n * @return {Object} Element.\n */\nexport function getLastFocus( state ) {\n\treturn state.lastFocus;\n}\n\n/**\n * Returns true if the user is dragging anything, or false otherwise. It is possible for a\n * user to be dragging data from outside of the editor, so this selector is separate from\n * the `isDraggingBlocks` selector which only returns true if the user is dragging blocks.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether user is dragging.\n */\nexport function isDragging( state ) {\n\treturn state.isDragging;\n}\n\n/**\n * Retrieves the expanded block from the state.\n *\n * @param {Object} state Block editor state.\n *\n * @return {string|null} The client ID of the expanded block, if set.\n */\nexport function getExpandedBlock( state ) {\n\treturn state.expandedBlock;\n}\n\n/**\n * Retrieves the client ID of the ancestor block that is content locking the block\n * with the provided client ID.\n *\n * @param {Object} state Global application state.\n * @param {string} clientId Client Id of the block.\n *\n * @return {?string} Client ID of the ancestor block that is content locking the block.\n */\nexport const getContentLockingParent = ( state, clientId ) => {\n\tlet current = clientId;\n\tlet result;\n\twhile ( ! result && ( current = state.blocks.parents.get( current ) ) ) {\n\t\tif ( getTemplateLock( state, current ) === 'contentOnly' ) {\n\t\t\tresult = current;\n\t\t}\n\t}\n\treturn result;\n};\n\n/**\n * Retrieves the client ID of the parent section block.\n *\n * @param {Object} state Global application state.\n * @param {string} clientId Client Id of the block.\n *\n * @return {?string} Client ID of the ancestor block that is content locking the block.\n */\nexport const getParentSectionBlock = ( state, clientId ) => {\n\tlet current = clientId;\n\tlet result;\n\twhile ( ! result && ( current = state.blocks.parents.get( current ) ) ) {\n\t\tif ( isSectionBlock( state, current ) ) {\n\t\t\tresult = current;\n\t\t}\n\t}\n\treturn result;\n};\n\n/**\n * Retrieves the client ID is a content locking parent\n *\n * @param {Object} state Global application state.\n * @param {string} clientId Client Id of the block.\n *\n * @return {boolean} Whether the block is a content locking parent.\n */\nexport function isSectionBlock( state, clientId ) {\n\tconst sectionRootClientId = getSectionRootClientId( state );\n\tconst sectionClientIds = getBlockOrder( state, sectionRootClientId );\n\treturn (\n\t\tgetBlockName( state, clientId ) === 'core/block' ||\n\t\tgetTemplateLock( state, clientId ) === 'contentOnly' ||\n\t\t( isNavigationMode( state ) && sectionClientIds.includes( clientId ) )\n\t);\n}\n\n/**\n * Retrieves the client ID of the block that is content locked but is\n * currently being temporarily edited as a non-locked block.\n *\n * @param {Object} state Global application state.\n *\n * @return {?string} The client ID of the block being temporarily edited as a non-locked block.\n */\nexport function getTemporarilyEditingAsBlocks( state ) {\n\treturn state.temporarilyEditingAsBlocks;\n}\n\n/**\n * Returns the focus mode that should be reapplied when the user stops editing\n * a content locked blocks as a block without locking.\n *\n * @param {Object} state Global application state.\n *\n * @return {?string} The focus mode that should be re-set when temporarily editing as blocks stops.\n */\nexport function getTemporarilyEditingFocusModeToRevert( state ) {\n\treturn state.temporarilyEditingFocusModeRevert;\n}\n\n/**\n * Returns the style attributes of multiple blocks.\n *\n * @param {Object} state Global application state.\n * @param {string[]} clientIds An array of block client IDs.\n *\n * @return {Object} An object where keys are client IDs and values are the corresponding block styles or undefined.\n */\nexport const getBlockStyles = createSelector(\n\t( state, clientIds ) =>\n\t\tclientIds.reduce( ( styles, clientId ) => {\n\t\t\tstyles[ clientId ] = state.blocks.attributes.get( clientId )?.style;\n\t\t\treturn styles;\n\t\t}, {} ),\n\t( state, clientIds ) => [\n\t\t...clientIds.map(\n\t\t\t( clientId ) => state.blocks.attributes.get( clientId )?.style\n\t\t),\n\t]\n);\n\n/**\n * Retrieves the client ID of the block which contains the blocks\n * acting as \"sections\" in the editor. This is typically the \"main content\"\n * of the template/post.\n *\n * @param {Object} state Editor state.\n *\n * @return {string|undefined} The section root client ID or undefined if not set.\n */\nexport function getSectionRootClientId( state ) {\n\treturn state.settings?.[ sectionRootClientIdKey ];\n}\n\n/**\n * Returns whether the editor is considered zoomed out.\n *\n * @param {Object} state Global application state.\n * @return {boolean} Whether the editor is zoomed.\n */\nexport function isZoomOut( state ) {\n\treturn state.zoomLevel === 'auto-scaled' || state.zoomLevel < 100;\n}\n\n/**\n * Returns whether the zoom level.\n *\n * @param {Object} state Global application state.\n * @return {number|\"auto-scaled\"} Zoom level.\n */\nexport function getZoomLevel( state ) {\n\treturn state.zoomLevel;\n}\n\n/**\n * Finds the closest block where the block is allowed to be inserted.\n *\n * @param {Object} state Editor state.\n * @param {string[] | string} name Block name or names.\n * @param {string} clientId Default insertion point.\n *\n * @return {string} clientID of the closest container when the block name can be inserted.\n */\nexport function getClosestAllowedInsertionPoint( state, name, clientId = '' ) {\n\tconst blockNames = Array.isArray( name ) ? name : [ name ];\n\tconst areBlockNamesAllowedInClientId = ( id ) =>\n\t\tblockNames.every( ( currentName ) =>\n\t\t\tcanInsertBlockType( state, currentName, id )\n\t\t);\n\n\t// If we're trying to insert at the root level and it's not allowed\n\t// Try the section root instead.\n\tif ( ! clientId ) {\n\t\tif ( areBlockNamesAllowedInClientId( clientId ) ) {\n\t\t\treturn clientId;\n\t\t}\n\n\t\tconst sectionRootClientId = getSectionRootClientId( state );\n\t\tif (\n\t\t\tsectionRootClientId &&\n\t\t\tareBlockNamesAllowedInClientId( sectionRootClientId )\n\t\t) {\n\t\t\treturn sectionRootClientId;\n\t\t}\n\t\treturn null;\n\t}\n\n\t// Traverse the block tree up until we find a place where we can insert.\n\tlet current = clientId;\n\twhile ( current !== null && ! areBlockNamesAllowedInClientId( current ) ) {\n\t\tconst parentClientId = getBlockRootClientId( state, current );\n\t\tcurrent = parentClientId;\n\t}\n\n\treturn current;\n}\n\nexport function getClosestAllowedInsertionPointForPattern(\n\tstate,\n\tpattern,\n\tclientId\n) {\n\tconst { allowedBlockTypes } = getSettings( state );\n\tconst isAllowed = checkAllowListRecursive(\n\t\tgetGrammar( pattern ),\n\t\tallowedBlockTypes\n\t);\n\tif ( ! isAllowed ) {\n\t\treturn null;\n\t}\n\tconst names = getGrammar( pattern ).map( ( { blockName: name } ) => name );\n\treturn getClosestAllowedInsertionPoint( state, names, clientId );\n}\n\n/**\n * Where the point where the next block will be inserted into.\n *\n * @param {Object} state\n * @return {Object} where the insertion point in the block editor is or null if none is set.\n */\nexport function getInsertionPoint( state ) {\n\treturn state.insertionPoint;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAKA,IAAAC,UAAA,GAAAD,OAAA;AAYA,IAAAE,MAAA,GAAAF,OAAA;AAMA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AAMA,IAAAO,iBAAA,GAAAP,OAAA;AAnCA;AACA;AACA;;AAGA;AACA;AACA;;AA8BA;AACA;AACA;AACA;AACA;AACA;AACA;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ports.zoomLevel = zoomLevel;
41
41
  var _es = _interopRequireDefault(require("fast-deep-equal/es6"));
42
42
  var _compose = require("@wordpress/compose");
43
43
  var _data = require("@wordpress/data");
44
+ var _deprecated = _interopRequireDefault(require("@wordpress/deprecated"));
44
45
  var _blocks = require("@wordpress/blocks");
45
46
  var _defaults = require("./defaults");
46
47
  var _array = require("./array");
@@ -1500,16 +1501,25 @@ function template(state = {
1500
1501
  function settings(state = _defaults.SETTINGS_DEFAULTS, action) {
1501
1502
  switch (action.type) {
1502
1503
  case 'UPDATE_SETTINGS':
1503
- if (action.reset) {
1504
- return {
1504
+ {
1505
+ const updatedSettings = action.reset ? {
1505
1506
  ..._defaults.SETTINGS_DEFAULTS,
1506
1507
  ...action.settings
1508
+ } : {
1509
+ ...state,
1510
+ ...action.settings
1507
1511
  };
1512
+ Object.defineProperty(updatedSettings, '__unstableIsPreviewMode', {
1513
+ get() {
1514
+ (0, _deprecated.default)('__unstableIsPreviewMode', {
1515
+ since: '6.8',
1516
+ alternative: 'isPreviewMode'
1517
+ });
1518
+ return this.isPreviewMode;
1519
+ }
1520
+ });
1521
+ return updatedSettings;
1508
1522
  }
1509
- return {
1510
- ...state,
1511
- ...action.settings
1512
- };
1513
1523
  }
1514
1524
  return state;
1515
1525
  }