@wordpress/block-editor 15.21.0 → 15.22.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 (836) hide show
  1. package/CHANGELOG.md +23 -1
  2. package/README.md +2 -2
  3. package/build/components/block-card/index.cjs +4 -5
  4. package/build/components/block-card/index.cjs.map +2 -2
  5. package/build/components/block-compare/index.cjs +2 -2
  6. package/build/components/block-compare/index.cjs.map +2 -2
  7. package/build/components/block-editing-mode/index.cjs +13 -7
  8. package/build/components/block-editing-mode/index.cjs.map +2 -2
  9. package/build/components/block-inspector/index.cjs +35 -20
  10. package/build/components/block-inspector/index.cjs.map +2 -2
  11. package/build/components/block-mover/mover-description.cjs +6 -6
  12. package/build/components/block-mover/mover-description.cjs.map +1 -1
  13. package/build/components/block-patterns-list/index.cjs +1 -1
  14. package/build/components/block-patterns-list/index.cjs.map +2 -2
  15. package/build/components/block-patterns-paging/index.cjs +4 -4
  16. package/build/components/block-patterns-paging/index.cjs.map +2 -2
  17. package/build/components/block-popover/use-popover-scroll.cjs.map +1 -1
  18. package/build/components/block-quick-navigation/index.cjs +7 -5
  19. package/build/components/block-quick-navigation/index.cjs.map +2 -2
  20. package/build/components/block-rename/modal.cjs +0 -1
  21. package/build/components/block-rename/modal.cjs.map +2 -2
  22. package/build/components/block-switcher/block-transformations-menu.cjs +16 -15
  23. package/build/components/block-switcher/block-transformations-menu.cjs.map +2 -2
  24. package/build/components/block-switcher/index.cjs +4 -4
  25. package/build/components/block-switcher/index.cjs.map +2 -2
  26. package/build/components/block-toolbar/block-toolbar-icon.cjs +14 -6
  27. package/build/components/block-toolbar/block-toolbar-icon.cjs.map +2 -2
  28. package/build/components/block-toolbar/edit-section-button.cjs.map +1 -1
  29. package/build/components/block-tools/use-block-toolbar-popover-props.cjs +10 -4
  30. package/build/components/block-tools/use-block-toolbar-popover-props.cjs.map +2 -2
  31. package/build/components/child-layout-control/index.cjs +51 -19
  32. package/build/components/child-layout-control/index.cjs.map +2 -2
  33. package/build/components/colors-gradients/control.cjs +25 -14
  34. package/build/components/colors-gradients/control.cjs.map +2 -2
  35. package/build/components/colors-gradients/dropdown.cjs +4 -1
  36. package/build/components/colors-gradients/dropdown.cjs.map +3 -3
  37. package/build/components/contrast-checker/index.cjs +22 -4
  38. package/build/components/contrast-checker/index.cjs.map +2 -2
  39. package/build/components/date-format-picker/index.cjs +0 -1
  40. package/build/components/date-format-picker/index.cjs.map +2 -2
  41. package/build/components/dimensions-tool/index.cjs +4 -5
  42. package/build/components/dimensions-tool/index.cjs.map +2 -2
  43. package/build/components/dimensions-tool/scale-tool.cjs +1 -1
  44. package/build/components/dimensions-tool/scale-tool.cjs.map +2 -2
  45. package/build/components/global-styles/advanced-panel.cjs +23 -15
  46. package/build/components/global-styles/advanced-panel.cjs.map +2 -2
  47. package/build/components/global-styles/background-panel.cjs +154 -26
  48. package/build/components/global-styles/background-panel.cjs.map +3 -3
  49. package/build/components/global-styles/border-panel.cjs +2 -0
  50. package/build/components/global-styles/border-panel.cjs.map +2 -2
  51. package/build/components/global-styles/color-gradient-dropdown-item.cjs +227 -0
  52. package/build/components/global-styles/color-gradient-dropdown-item.cjs.map +7 -0
  53. package/build/components/global-styles/color-panel.cjs +98 -375
  54. package/build/components/global-styles/color-panel.cjs.map +3 -3
  55. package/build/components/global-styles/dimensions-panel.cjs +2 -5
  56. package/build/components/global-styles/dimensions-panel.cjs.map +2 -2
  57. package/build/components/global-styles/hooks.cjs +34 -0
  58. package/build/components/global-styles/hooks.cjs.map +2 -2
  59. package/build/components/global-styles/shadow-panel-components.cjs.map +2 -2
  60. package/build/components/global-styles/typography-panel.cjs +82 -10
  61. package/build/components/global-styles/typography-panel.cjs.map +3 -3
  62. package/build/components/grid/grid-item-resizer.cjs.map +1 -1
  63. package/build/components/grid/grid-visualizer.cjs.map +1 -1
  64. package/build/components/iframe/index.cjs +6 -3
  65. package/build/components/iframe/index.cjs.map +3 -3
  66. package/build/components/image-editor/use-transform-image.cjs.map +1 -1
  67. package/build/components/inner-blocks/use-inner-block-template-sync.cjs +3 -1
  68. package/build/components/inner-blocks/use-inner-block-template-sync.cjs.map +2 -2
  69. package/build/components/inserter/get-appender-label.cjs.map +1 -1
  70. package/build/components/inserter/hooks/use-patterns-state.cjs +1 -1
  71. package/build/components/inserter/hooks/use-patterns-state.cjs.map +2 -2
  72. package/build/components/inserter/index.cjs +179 -220
  73. package/build/components/inserter/index.cjs.map +3 -3
  74. package/build/components/inserter/media-tab/media-preview.cjs.map +2 -2
  75. package/build/components/inserter/search-items.cjs.map +1 -1
  76. package/build/components/inserter/search-results.cjs +1 -1
  77. package/build/components/inserter/search-results.cjs.map +2 -2
  78. package/build/components/inspector-controls/fill.cjs +1 -3
  79. package/build/components/inspector-controls/fill.cjs.map +2 -2
  80. package/build/components/inspector-controls/groups.cjs +2 -0
  81. package/build/components/inspector-controls/groups.cjs.map +2 -2
  82. package/build/components/inspector-controls-tabs/index.cjs.map +2 -2
  83. package/build/components/inspector-controls-tabs/styles-tab.cjs +76 -32
  84. package/build/components/inspector-controls-tabs/styles-tab.cjs.map +2 -2
  85. package/build/components/keyboard-shortcuts/index.cjs.map +1 -1
  86. package/build/components/line-height-control/index.cjs.map +1 -1
  87. package/build/components/link-control/index.cjs +2 -3
  88. package/build/components/link-control/index.cjs.map +2 -2
  89. package/build/components/link-control/normalize-url.cjs.map +1 -1
  90. package/build/components/list-view/block-select-button.cjs +9 -20
  91. package/build/components/list-view/block-select-button.cjs.map +3 -3
  92. package/build/components/list-view/block.cjs +2 -1
  93. package/build/components/list-view/block.cjs.map +2 -2
  94. package/build/components/list-view/utils.cjs.map +1 -1
  95. package/build/components/preset-input-control/custom-value-controls.cjs.map +2 -2
  96. package/build/components/provider/index.cjs.map +1 -1
  97. package/build/components/provider/use-block-sync.cjs +14 -3
  98. package/build/components/provider/use-block-sync.cjs.map +2 -2
  99. package/build/components/rich-text/event-listeners/before-input-rules.cjs +5 -5
  100. package/build/components/rich-text/event-listeners/before-input-rules.cjs.map +3 -3
  101. package/build/components/rich-text/event-listeners/delete.cjs +4 -4
  102. package/build/components/rich-text/event-listeners/delete.cjs.map +3 -3
  103. package/build/components/rich-text/event-listeners/enter.cjs +7 -2
  104. package/build/components/rich-text/event-listeners/enter.cjs.map +2 -2
  105. package/build/components/rich-text/event-listeners/input-events.cjs +4 -4
  106. package/build/components/rich-text/event-listeners/input-events.cjs.map +3 -3
  107. package/build/components/rich-text/event-listeners/input-rules.cjs +17 -4
  108. package/build/components/rich-text/event-listeners/input-rules.cjs.map +3 -3
  109. package/build/components/rich-text/event-listeners/insert-replacement-text.cjs +4 -4
  110. package/build/components/rich-text/event-listeners/insert-replacement-text.cjs.map +3 -3
  111. package/build/components/rich-text/event-listeners/paste-handler.cjs.map +1 -1
  112. package/build/components/rich-text/event-listeners/remove-browser-shortcuts.cjs +4 -4
  113. package/build/components/rich-text/event-listeners/remove-browser-shortcuts.cjs.map +3 -3
  114. package/build/components/rich-text/event-listeners/shortcuts.cjs +4 -4
  115. package/build/components/rich-text/event-listeners/shortcuts.cjs.map +3 -3
  116. package/build/components/rich-text/event-listeners/undo-automatic-change.cjs +4 -4
  117. package/build/components/rich-text/event-listeners/undo-automatic-change.cjs.map +3 -3
  118. package/build/components/rich-text/index.cjs +1 -23
  119. package/build/components/rich-text/index.cjs.map +2 -2
  120. package/build/components/rich-text/prevent-event-discovery.cjs +1 -1
  121. package/build/components/rich-text/prevent-event-discovery.cjs.map +1 -1
  122. package/build/components/url-popover/image-url-input-ui.cjs +0 -2
  123. package/build/components/url-popover/image-url-input-ui.cjs.map +2 -2
  124. package/build/components/use-block-commands/index.cjs +5 -5
  125. package/build/components/use-block-commands/index.cjs.map +2 -2
  126. package/build/components/use-block-display-information/index.cjs +10 -3
  127. package/build/components/use-block-display-information/index.cjs.map +2 -2
  128. package/build/components/writing-flow/use-tab-nav.cjs.map +1 -1
  129. package/build/hooks/anchor.cjs +12 -17
  130. package/build/hooks/anchor.cjs.map +2 -2
  131. package/build/hooks/background.cjs +124 -75
  132. package/build/hooks/background.cjs.map +3 -3
  133. package/build/hooks/block-fields/index.cjs +13 -2
  134. package/build/hooks/block-fields/index.cjs.map +2 -2
  135. package/build/hooks/border.cjs +0 -3
  136. package/build/hooks/border.cjs.map +2 -2
  137. package/build/hooks/color.cjs +0 -165
  138. package/build/hooks/color.cjs.map +3 -3
  139. package/build/hooks/contrast-checker.cjs +31 -28
  140. package/build/hooks/contrast-checker.cjs.map +3 -3
  141. package/build/hooks/custom-class-name.cjs +0 -1
  142. package/build/hooks/custom-class-name.cjs.map +2 -2
  143. package/build/hooks/dimensions.cjs +13 -5
  144. package/build/hooks/dimensions.cjs.map +2 -2
  145. package/build/hooks/elements.cjs +142 -0
  146. package/build/hooks/elements.cjs.map +7 -0
  147. package/build/hooks/fit-text.cjs +11 -0
  148. package/build/hooks/fit-text.cjs.map +2 -2
  149. package/build/hooks/grid-visualizer.cjs +21 -11
  150. package/build/hooks/grid-visualizer.cjs.map +2 -2
  151. package/build/hooks/layout-child.cjs +65 -10
  152. package/build/hooks/layout-child.cjs.map +2 -2
  153. package/build/hooks/layout.cjs +6 -3
  154. package/build/hooks/layout.cjs.map +2 -2
  155. package/build/hooks/list-view.cjs +10 -7
  156. package/build/hooks/list-view.cjs.map +2 -2
  157. package/build/hooks/position.cjs +19 -22
  158. package/build/hooks/position.cjs.map +2 -2
  159. package/build/hooks/spacing-visualizer.cjs.map +1 -1
  160. package/build/hooks/state-utils.cjs.map +1 -1
  161. package/build/hooks/states.cjs +2 -2
  162. package/build/hooks/states.cjs.map +2 -2
  163. package/build/hooks/style.cjs +50 -6
  164. package/build/hooks/style.cjs.map +2 -2
  165. package/build/hooks/supports.cjs +0 -7
  166. package/build/hooks/supports.cjs.map +2 -2
  167. package/build/hooks/typography.cjs +62 -10
  168. package/build/hooks/typography.cjs.map +3 -3
  169. package/build/layouts/flex.cjs +99 -6
  170. package/build/layouts/flex.cjs.map +2 -2
  171. package/build/private-apis.cjs +4 -0
  172. package/build/private-apis.cjs.map +2 -2
  173. package/build/store/actions.cjs +7 -3
  174. package/build/store/actions.cjs.map +2 -2
  175. package/build/store/private-actions.cjs +1 -2
  176. package/build/store/private-actions.cjs.map +2 -2
  177. package/build/store/private-selectors.cjs +42 -2
  178. package/build/store/private-selectors.cjs.map +2 -2
  179. package/build/store/reducer.cjs +14 -6
  180. package/build/store/reducer.cjs.map +2 -2
  181. package/build/store/selectors.cjs +60 -41
  182. package/build/store/selectors.cjs.map +2 -2
  183. package/build/utils/block-bindings.cjs +9 -9
  184. package/build/utils/block-bindings.cjs.map +3 -3
  185. package/build/utils/color-values.cjs +10 -1
  186. package/build/utils/color-values.cjs.map +3 -3
  187. package/build/utils/dom.cjs +2 -5
  188. package/build/utils/dom.cjs.map +3 -3
  189. package/build/utils/fit-text-frontend.cjs +6 -2
  190. package/build/utils/fit-text-frontend.cjs.map +3 -3
  191. package/build/utils/fit-text-utils.cjs +1 -1
  192. package/build/utils/fit-text-utils.cjs.map +3 -3
  193. package/build/utils/format-font-style.cjs +1 -1
  194. package/build/utils/format-font-style.cjs.map +3 -3
  195. package/build/utils/format-font-weight.cjs +1 -1
  196. package/build/utils/format-font-weight.cjs.map +3 -3
  197. package/build/utils/get-editor-region.cjs +4 -2
  198. package/build/utils/get-editor-region.cjs.map +3 -3
  199. package/build/utils/get-font-styles-and-weights.cjs +8 -12
  200. package/build/utils/get-font-styles-and-weights.cjs.map +3 -3
  201. package/build/utils/get-px-from-css-unit.cjs +1 -1
  202. package/build/utils/get-px-from-css-unit.cjs.map +1 -1
  203. package/build/utils/index.cjs +1 -1
  204. package/build/utils/index.cjs.map +1 -1
  205. package/build/utils/math.cjs +1 -1
  206. package/build/utils/math.cjs.map +3 -3
  207. package/build/utils/object.cjs +8 -8
  208. package/build/utils/object.cjs.map +3 -3
  209. package/build/utils/order-inserter-block-items.cjs +1 -1
  210. package/build/utils/order-inserter-block-items.cjs.map +3 -3
  211. package/build/utils/pasting.cjs +4 -2
  212. package/build/utils/pasting.cjs.map +3 -3
  213. package/build/utils/selection.cjs +3 -2
  214. package/build/utils/selection.cjs.map +3 -3
  215. package/build/utils/sorting.cjs +9 -3
  216. package/build/utils/sorting.cjs.map +3 -3
  217. package/build/utils/transform-styles/index.cjs +3 -2
  218. package/build/utils/transform-styles/index.cjs.map +3 -3
  219. package/build/utils/transform-styles/postcss-urlrebase.d.cjs +2 -0
  220. package/build/utils/transform-styles/postcss-urlrebase.d.cjs.map +7 -0
  221. package/build/{components/rich-text/native/index.cjs → utils/transform-styles/types.cjs} +4 -13
  222. package/build/utils/transform-styles/types.cjs.map +7 -0
  223. package/build/utils/types.cjs +19 -0
  224. package/build/utils/types.cjs.map +7 -0
  225. package/build-module/components/block-card/index.mjs +5 -6
  226. package/build-module/components/block-card/index.mjs.map +2 -2
  227. package/build-module/components/block-compare/index.mjs +1 -1
  228. package/build-module/components/block-compare/index.mjs.map +2 -2
  229. package/build-module/components/block-editing-mode/index.mjs +14 -8
  230. package/build-module/components/block-editing-mode/index.mjs.map +2 -2
  231. package/build-module/components/block-inspector/index.mjs +35 -21
  232. package/build-module/components/block-inspector/index.mjs.map +2 -2
  233. package/build-module/components/block-mover/mover-description.mjs +6 -6
  234. package/build-module/components/block-mover/mover-description.mjs.map +1 -1
  235. package/build-module/components/block-patterns-list/index.mjs +1 -1
  236. package/build-module/components/block-patterns-list/index.mjs.map +2 -2
  237. package/build-module/components/block-patterns-paging/index.mjs +4 -4
  238. package/build-module/components/block-patterns-paging/index.mjs.map +2 -2
  239. package/build-module/components/block-popover/use-popover-scroll.mjs.map +1 -1
  240. package/build-module/components/block-quick-navigation/index.mjs +8 -6
  241. package/build-module/components/block-quick-navigation/index.mjs.map +2 -2
  242. package/build-module/components/block-rename/modal.mjs +0 -1
  243. package/build-module/components/block-rename/modal.mjs.map +2 -2
  244. package/build-module/components/block-switcher/block-transformations-menu.mjs +16 -15
  245. package/build-module/components/block-switcher/block-transformations-menu.mjs.map +2 -2
  246. package/build-module/components/block-switcher/index.mjs +4 -4
  247. package/build-module/components/block-switcher/index.mjs.map +2 -2
  248. package/build-module/components/block-toolbar/block-toolbar-icon.mjs +14 -6
  249. package/build-module/components/block-toolbar/block-toolbar-icon.mjs.map +2 -2
  250. package/build-module/components/block-toolbar/edit-section-button.mjs.map +1 -1
  251. package/build-module/components/block-tools/use-block-toolbar-popover-props.mjs +10 -4
  252. package/build-module/components/block-tools/use-block-toolbar-popover-props.mjs.map +2 -2
  253. package/build-module/components/child-layout-control/index.mjs +51 -19
  254. package/build-module/components/child-layout-control/index.mjs.map +2 -2
  255. package/build-module/components/colors-gradients/control.mjs +27 -15
  256. package/build-module/components/colors-gradients/control.mjs.map +2 -2
  257. package/build-module/components/colors-gradients/dropdown.mjs +4 -1
  258. package/build-module/components/colors-gradients/dropdown.mjs.map +2 -2
  259. package/build-module/components/contrast-checker/index.mjs +18 -4
  260. package/build-module/components/contrast-checker/index.mjs.map +2 -2
  261. package/build-module/components/date-format-picker/index.mjs +0 -1
  262. package/build-module/components/date-format-picker/index.mjs.map +2 -2
  263. package/build-module/components/dimensions-tool/index.mjs +4 -5
  264. package/build-module/components/dimensions-tool/index.mjs.map +2 -2
  265. package/build-module/components/dimensions-tool/scale-tool.mjs +1 -1
  266. package/build-module/components/dimensions-tool/scale-tool.mjs.map +2 -2
  267. package/build-module/components/global-styles/advanced-panel.mjs +23 -15
  268. package/build-module/components/global-styles/advanced-panel.mjs.map +2 -2
  269. package/build-module/components/global-styles/background-panel.mjs +157 -29
  270. package/build-module/components/global-styles/background-panel.mjs.map +2 -2
  271. package/build-module/components/global-styles/border-panel.mjs +2 -0
  272. package/build-module/components/global-styles/border-panel.mjs.map +2 -2
  273. package/build-module/components/global-styles/color-gradient-dropdown-item.mjs +207 -0
  274. package/build-module/components/global-styles/color-gradient-dropdown-item.mjs.map +7 -0
  275. package/build-module/components/global-styles/color-panel.mjs +106 -387
  276. package/build-module/components/global-styles/color-panel.mjs.map +3 -3
  277. package/build-module/components/global-styles/dimensions-panel.mjs +3 -7
  278. package/build-module/components/global-styles/dimensions-panel.mjs.map +2 -2
  279. package/build-module/components/global-styles/hooks.mjs +33 -0
  280. package/build-module/components/global-styles/hooks.mjs.map +2 -2
  281. package/build-module/components/global-styles/shadow-panel-components.mjs.map +2 -2
  282. package/build-module/components/global-styles/typography-panel.mjs +84 -10
  283. package/build-module/components/global-styles/typography-panel.mjs.map +2 -2
  284. package/build-module/components/grid/grid-item-resizer.mjs.map +1 -1
  285. package/build-module/components/grid/grid-visualizer.mjs.map +1 -1
  286. package/build-module/components/iframe/index.mjs +6 -3
  287. package/build-module/components/iframe/index.mjs.map +2 -2
  288. package/build-module/components/image-editor/use-transform-image.mjs.map +1 -1
  289. package/build-module/components/inner-blocks/use-inner-block-template-sync.mjs +3 -1
  290. package/build-module/components/inner-blocks/use-inner-block-template-sync.mjs.map +2 -2
  291. package/build-module/components/inserter/get-appender-label.mjs.map +1 -1
  292. package/build-module/components/inserter/hooks/use-patterns-state.mjs +1 -1
  293. package/build-module/components/inserter/hooks/use-patterns-state.mjs.map +2 -2
  294. package/build-module/components/inserter/index.mjs +185 -222
  295. package/build-module/components/inserter/index.mjs.map +3 -3
  296. package/build-module/components/inserter/media-tab/media-preview.mjs.map +2 -2
  297. package/build-module/components/inserter/search-items.mjs.map +1 -1
  298. package/build-module/components/inserter/search-results.mjs +1 -1
  299. package/build-module/components/inserter/search-results.mjs.map +2 -2
  300. package/build-module/components/inspector-controls/fill.mjs +1 -3
  301. package/build-module/components/inspector-controls/fill.mjs.map +2 -2
  302. package/build-module/components/inspector-controls/groups.mjs +2 -0
  303. package/build-module/components/inspector-controls/groups.mjs.map +2 -2
  304. package/build-module/components/inspector-controls-tabs/index.mjs.map +2 -2
  305. package/build-module/components/inspector-controls-tabs/styles-tab.mjs +76 -32
  306. package/build-module/components/inspector-controls-tabs/styles-tab.mjs.map +2 -2
  307. package/build-module/components/keyboard-shortcuts/index.mjs.map +1 -1
  308. package/build-module/components/line-height-control/index.mjs.map +1 -1
  309. package/build-module/components/link-control/index.mjs +2 -3
  310. package/build-module/components/link-control/index.mjs.map +2 -2
  311. package/build-module/components/link-control/normalize-url.mjs.map +1 -1
  312. package/build-module/components/list-view/block-select-button.mjs +10 -27
  313. package/build-module/components/list-view/block-select-button.mjs.map +2 -2
  314. package/build-module/components/list-view/block.mjs +2 -1
  315. package/build-module/components/list-view/block.mjs.map +2 -2
  316. package/build-module/components/list-view/utils.mjs.map +1 -1
  317. package/build-module/components/preset-input-control/custom-value-controls.mjs.map +2 -2
  318. package/build-module/components/provider/index.mjs.map +1 -1
  319. package/build-module/components/provider/use-block-sync.mjs +14 -3
  320. package/build-module/components/provider/use-block-sync.mjs.map +2 -2
  321. package/build-module/components/rich-text/event-listeners/before-input-rules.mjs +5 -5
  322. package/build-module/components/rich-text/event-listeners/before-input-rules.mjs.map +2 -2
  323. package/build-module/components/rich-text/event-listeners/delete.mjs +4 -4
  324. package/build-module/components/rich-text/event-listeners/delete.mjs.map +2 -2
  325. package/build-module/components/rich-text/event-listeners/enter.mjs +7 -2
  326. package/build-module/components/rich-text/event-listeners/enter.mjs.map +2 -2
  327. package/build-module/components/rich-text/event-listeners/input-events.mjs +4 -4
  328. package/build-module/components/rich-text/event-listeners/input-events.mjs.map +2 -2
  329. package/build-module/components/rich-text/event-listeners/input-rules.mjs +17 -4
  330. package/build-module/components/rich-text/event-listeners/input-rules.mjs.map +2 -2
  331. package/build-module/components/rich-text/event-listeners/insert-replacement-text.mjs +4 -4
  332. package/build-module/components/rich-text/event-listeners/insert-replacement-text.mjs.map +2 -2
  333. package/build-module/components/rich-text/event-listeners/paste-handler.mjs.map +1 -1
  334. package/build-module/components/rich-text/event-listeners/remove-browser-shortcuts.mjs +4 -4
  335. package/build-module/components/rich-text/event-listeners/remove-browser-shortcuts.mjs.map +2 -2
  336. package/build-module/components/rich-text/event-listeners/shortcuts.mjs +4 -4
  337. package/build-module/components/rich-text/event-listeners/shortcuts.mjs.map +2 -2
  338. package/build-module/components/rich-text/event-listeners/undo-automatic-change.mjs +4 -4
  339. package/build-module/components/rich-text/event-listeners/undo-automatic-change.mjs.map +2 -2
  340. package/build-module/components/rich-text/index.mjs +1 -23
  341. package/build-module/components/rich-text/index.mjs.map +2 -2
  342. package/build-module/components/rich-text/prevent-event-discovery.mjs +1 -1
  343. package/build-module/components/rich-text/prevent-event-discovery.mjs.map +1 -1
  344. package/build-module/components/url-popover/image-url-input-ui.mjs +0 -2
  345. package/build-module/components/url-popover/image-url-input-ui.mjs.map +2 -2
  346. package/build-module/components/use-block-commands/index.mjs +5 -5
  347. package/build-module/components/use-block-commands/index.mjs.map +2 -2
  348. package/build-module/components/use-block-display-information/index.mjs +10 -3
  349. package/build-module/components/use-block-display-information/index.mjs.map +2 -2
  350. package/build-module/components/writing-flow/use-tab-nav.mjs.map +1 -1
  351. package/build-module/hooks/anchor.mjs +12 -17
  352. package/build-module/hooks/anchor.mjs.map +2 -2
  353. package/build-module/hooks/background.mjs +123 -75
  354. package/build-module/hooks/background.mjs.map +2 -2
  355. package/build-module/hooks/block-fields/index.mjs +13 -2
  356. package/build-module/hooks/block-fields/index.mjs.map +2 -2
  357. package/build-module/hooks/border.mjs +1 -4
  358. package/build-module/hooks/border.mjs.map +2 -2
  359. package/build-module/hooks/color.mjs +2 -178
  360. package/build-module/hooks/color.mjs.map +2 -2
  361. package/build-module/hooks/contrast-checker.mjs +32 -19
  362. package/build-module/hooks/contrast-checker.mjs.map +2 -2
  363. package/build-module/hooks/custom-class-name.mjs +0 -1
  364. package/build-module/hooks/custom-class-name.mjs.map +2 -2
  365. package/build-module/hooks/dimensions.mjs +13 -6
  366. package/build-module/hooks/dimensions.mjs.map +2 -2
  367. package/build-module/hooks/elements.mjs +115 -0
  368. package/build-module/hooks/elements.mjs.map +7 -0
  369. package/build-module/hooks/fit-text.mjs +11 -0
  370. package/build-module/hooks/fit-text.mjs.map +2 -2
  371. package/build-module/hooks/grid-visualizer.mjs +21 -11
  372. package/build-module/hooks/grid-visualizer.mjs.map +2 -2
  373. package/build-module/hooks/layout-child.mjs +68 -10
  374. package/build-module/hooks/layout-child.mjs.map +2 -2
  375. package/build-module/hooks/layout.mjs +6 -3
  376. package/build-module/hooks/layout.mjs.map +2 -2
  377. package/build-module/hooks/list-view.mjs +10 -7
  378. package/build-module/hooks/list-view.mjs.map +2 -2
  379. package/build-module/hooks/position.mjs +20 -23
  380. package/build-module/hooks/position.mjs.map +2 -2
  381. package/build-module/hooks/spacing-visualizer.mjs.map +1 -1
  382. package/build-module/hooks/state-utils.mjs.map +1 -1
  383. package/build-module/hooks/states.mjs +2 -2
  384. package/build-module/hooks/states.mjs.map +2 -2
  385. package/build-module/hooks/style.mjs +53 -8
  386. package/build-module/hooks/style.mjs.map +2 -2
  387. package/build-module/hooks/supports.mjs +0 -7
  388. package/build-module/hooks/supports.mjs.map +2 -2
  389. package/build-module/hooks/typography.mjs +62 -10
  390. package/build-module/hooks/typography.mjs.map +2 -2
  391. package/build-module/layouts/flex.mjs +105 -7
  392. package/build-module/layouts/flex.mjs.map +2 -2
  393. package/build-module/private-apis.mjs +8 -0
  394. package/build-module/private-apis.mjs.map +2 -2
  395. package/build-module/store/actions.mjs +7 -3
  396. package/build-module/store/actions.mjs.map +2 -2
  397. package/build-module/store/private-actions.mjs +1 -2
  398. package/build-module/store/private-actions.mjs.map +2 -2
  399. package/build-module/store/private-selectors.mjs +39 -1
  400. package/build-module/store/private-selectors.mjs.map +2 -2
  401. package/build-module/store/reducer.mjs +14 -6
  402. package/build-module/store/reducer.mjs.map +2 -2
  403. package/build-module/store/selectors.mjs +62 -42
  404. package/build-module/store/selectors.mjs.map +2 -2
  405. package/build-module/utils/block-bindings.mjs +9 -9
  406. package/build-module/utils/block-bindings.mjs.map +3 -3
  407. package/build-module/utils/color-values.mjs +9 -1
  408. package/build-module/utils/color-values.mjs.map +3 -3
  409. package/build-module/utils/dom.mjs +2 -5
  410. package/build-module/utils/dom.mjs.map +3 -3
  411. package/build-module/utils/fit-text-frontend.mjs +6 -2
  412. package/build-module/utils/fit-text-frontend.mjs.map +3 -3
  413. package/build-module/utils/fit-text-utils.mjs +1 -1
  414. package/build-module/utils/fit-text-utils.mjs.map +3 -3
  415. package/build-module/utils/format-font-style.mjs +1 -1
  416. package/build-module/utils/format-font-style.mjs.map +3 -3
  417. package/build-module/utils/format-font-weight.mjs +1 -1
  418. package/build-module/utils/format-font-weight.mjs.map +3 -3
  419. package/build-module/utils/get-editor-region.mjs +4 -2
  420. package/build-module/utils/get-editor-region.mjs.map +3 -3
  421. package/build-module/utils/get-font-styles-and-weights.mjs +8 -12
  422. package/build-module/utils/get-font-styles-and-weights.mjs.map +3 -3
  423. package/build-module/utils/get-px-from-css-unit.mjs +1 -1
  424. package/build-module/utils/get-px-from-css-unit.mjs.map +1 -1
  425. package/build-module/utils/index.mjs +1 -1
  426. package/build-module/utils/index.mjs.map +1 -1
  427. package/build-module/utils/math.mjs +1 -1
  428. package/build-module/utils/math.mjs.map +3 -3
  429. package/build-module/utils/object.mjs +8 -8
  430. package/build-module/utils/object.mjs.map +3 -3
  431. package/build-module/utils/order-inserter-block-items.mjs +1 -1
  432. package/build-module/utils/order-inserter-block-items.mjs.map +3 -3
  433. package/build-module/utils/pasting.mjs +4 -2
  434. package/build-module/utils/pasting.mjs.map +3 -3
  435. package/build-module/utils/selection.mjs +3 -2
  436. package/build-module/utils/selection.mjs.map +3 -3
  437. package/build-module/utils/sorting.mjs +9 -3
  438. package/build-module/utils/sorting.mjs.map +3 -3
  439. package/build-module/utils/transform-styles/index.mjs +3 -2
  440. package/build-module/utils/transform-styles/index.mjs.map +3 -3
  441. package/build-module/utils/transform-styles/postcss-urlrebase.d.mjs +1 -0
  442. package/build-module/utils/transform-styles/postcss-urlrebase.d.mjs.map +7 -0
  443. package/build-module/utils/transform-styles/types.mjs +1 -0
  444. package/build-module/utils/transform-styles/types.mjs.map +7 -0
  445. package/build-module/utils/types.mjs +1 -0
  446. package/build-module/utils/types.mjs.map +7 -0
  447. package/build-style/content-rtl.css +14 -0
  448. package/build-style/content.css +14 -0
  449. package/build-style/style-rtl.css +60 -49
  450. package/build-style/style.css +60 -49
  451. package/build-types/utils/block-bindings.d.ts +27 -0
  452. package/build-types/utils/block-bindings.d.ts.map +1 -0
  453. package/build-types/utils/color-values.d.ts +40 -0
  454. package/build-types/utils/color-values.d.ts.map +1 -0
  455. package/build-types/utils/dom.d.ts +19 -19
  456. package/build-types/utils/dom.d.ts.map +1 -1
  457. package/build-types/utils/fit-text-frontend.d.ts +7 -0
  458. package/build-types/utils/fit-text-frontend.d.ts.map +1 -0
  459. package/build-types/utils/fit-text-utils.d.ts +15 -0
  460. package/build-types/utils/fit-text-utils.d.ts.map +1 -0
  461. package/build-types/utils/format-font-style.d.ts +12 -0
  462. package/build-types/utils/format-font-style.d.ts.map +1 -0
  463. package/build-types/utils/format-font-weight.d.ts +12 -0
  464. package/build-types/utils/format-font-weight.d.ts.map +1 -0
  465. package/build-types/utils/get-editor-region.d.ts +9 -0
  466. package/build-types/utils/get-editor-region.d.ts.map +1 -0
  467. package/build-types/utils/get-font-styles-and-weights.d.ts +16 -0
  468. package/build-types/utils/get-font-styles-and-weights.d.ts.map +1 -0
  469. package/build-types/utils/get-px-from-css-unit.d.ts +10 -0
  470. package/build-types/utils/get-px-from-css-unit.d.ts.map +1 -0
  471. package/build-types/utils/index.d.ts +3 -0
  472. package/build-types/utils/index.d.ts.map +1 -0
  473. package/build-types/utils/math.d.ts +61 -0
  474. package/build-types/utils/math.d.ts.map +1 -0
  475. package/build-types/utils/object.d.ts +39 -0
  476. package/build-types/utils/object.d.ts.map +1 -0
  477. package/build-types/utils/order-inserter-block-items.d.ts +13 -0
  478. package/build-types/utils/order-inserter-block-items.d.ts.map +1 -0
  479. package/build-types/utils/pasting.d.ts +28 -0
  480. package/build-types/utils/pasting.d.ts.map +1 -0
  481. package/build-types/utils/selection.d.ts +21 -0
  482. package/build-types/utils/selection.d.ts.map +1 -0
  483. package/build-types/utils/sorting.d.ts +17 -0
  484. package/build-types/utils/sorting.d.ts.map +1 -0
  485. package/build-types/utils/transform-styles/index.d.ts +15 -0
  486. package/build-types/utils/transform-styles/index.d.ts.map +1 -0
  487. package/build-types/utils/transform-styles/types.d.ts +13 -0
  488. package/build-types/utils/transform-styles/types.d.ts.map +1 -0
  489. package/build-types/utils/types.d.ts +28 -0
  490. package/build-types/utils/types.d.ts.map +1 -0
  491. package/package.json +55 -46
  492. package/src/components/alignment-control/test/__snapshots__/index.js.snap +6 -0
  493. package/src/components/block-alignment-control/test/__snapshots__/index.js.snap +5 -0
  494. package/src/components/block-breadcrumb/README.md +2 -2
  495. package/src/components/block-card/index.js +7 -13
  496. package/src/components/block-compare/README.md +6 -6
  497. package/src/components/block-compare/index.js +1 -3
  498. package/src/components/block-editing-mode/index.js +17 -9
  499. package/src/components/block-icon/test/__snapshots__/index.js.snap +1 -0
  500. package/src/components/block-inspector/index.js +22 -20
  501. package/src/components/block-patterns-list/index.js +1 -2
  502. package/src/components/block-preview/README.md +1 -1
  503. package/src/components/block-quick-navigation/index.js +7 -7
  504. package/src/components/block-rename/modal.js +0 -1
  505. package/src/components/block-switcher/block-transformations-menu.js +16 -18
  506. package/src/components/block-switcher/index.js +4 -4
  507. package/src/components/block-toolbar/block-toolbar-icon.js +22 -6
  508. package/src/components/block-toolbar/test/block-toolbar-icon.js +99 -0
  509. package/src/components/block-tools/use-block-toolbar-popover-props.js +10 -4
  510. package/src/components/block-types-list/README.md +0 -19
  511. package/src/components/block-vertical-alignment-control/test/__snapshots__/index.js.snap +4 -0
  512. package/src/components/child-layout-control/index.js +65 -20
  513. package/src/components/child-layout-control/test/index.js +64 -0
  514. package/src/components/colors-gradients/control.js +29 -12
  515. package/src/components/colors-gradients/dropdown.js +4 -1
  516. package/src/components/colors-gradients/style.scss +39 -2
  517. package/src/components/contrast-checker/README.md +9 -0
  518. package/src/components/contrast-checker/index.js +42 -3
  519. package/src/components/date-format-picker/index.js +0 -1
  520. package/src/components/default-block-appender/content.scss +3 -0
  521. package/src/components/dimensions-tool/index.js +4 -9
  522. package/src/components/dimensions-tool/scale-tool.js +1 -2
  523. package/src/components/dimensions-tool/test/index.js +89 -11
  524. package/src/components/global-styles/advanced-panel.js +5 -1
  525. package/src/components/global-styles/background-panel.js +203 -36
  526. package/src/components/global-styles/border-panel.js +2 -0
  527. package/src/components/global-styles/color-gradient-dropdown-item.js +258 -0
  528. package/src/components/global-styles/color-panel.js +125 -487
  529. package/src/components/global-styles/dimensions-panel.js +13 -18
  530. package/src/components/global-styles/hooks.js +45 -0
  531. package/src/components/global-styles/shadow-panel-components.js +0 -1
  532. package/src/components/global-styles/test/background-panel.js +56 -0
  533. package/src/components/global-styles/test/color-panel.js +172 -118
  534. package/src/components/global-styles/test/typography-panel.js +167 -0
  535. package/src/components/global-styles/typography-panel.js +100 -11
  536. package/src/components/iframe/index.js +8 -3
  537. package/src/components/inner-blocks/use-inner-block-template-sync.js +3 -1
  538. package/src/components/inserter/hooks/use-patterns-state.js +1 -1
  539. package/src/components/inserter/index.js +257 -288
  540. package/src/components/inserter/media-tab/media-preview.js +0 -1
  541. package/src/components/inserter/search-results.js +1 -3
  542. package/src/components/inspector-controls/README.md +0 -2
  543. package/src/components/inspector-controls/fill.js +6 -8
  544. package/src/components/inspector-controls/groups.js +2 -0
  545. package/src/components/inspector-controls-tabs/index.js +0 -1
  546. package/src/components/inspector-controls-tabs/styles-tab.js +78 -28
  547. package/src/components/justify-content-control/README.md +1 -1
  548. package/src/components/link-control/index.js +0 -1
  549. package/src/components/link-control/test/index.js +2 -3
  550. package/src/components/list-view/block-select-button.js +9 -29
  551. package/src/components/list-view/block.js +1 -0
  552. package/src/components/media-placeholder/README.md +1 -29
  553. package/src/components/media-upload/README.md +0 -19
  554. package/src/components/preset-input-control/custom-value-controls.js +0 -1
  555. package/src/components/provider/test/use-block-sync.js +40 -0
  556. package/src/components/provider/use-block-sync.js +15 -3
  557. package/src/components/rich-text/content.scss +2 -0
  558. package/src/components/rich-text/event-listeners/before-input-rules.js +5 -4
  559. package/src/components/rich-text/event-listeners/delete.js +9 -4
  560. package/src/components/rich-text/event-listeners/enter.js +9 -2
  561. package/src/components/rich-text/event-listeners/input-events.js +13 -4
  562. package/src/components/rich-text/event-listeners/input-rules.js +20 -4
  563. package/src/components/rich-text/event-listeners/insert-replacement-text.js +9 -4
  564. package/src/components/rich-text/event-listeners/remove-browser-shortcuts.js +9 -4
  565. package/src/components/rich-text/event-listeners/shortcuts.js +13 -4
  566. package/src/components/rich-text/event-listeners/undo-automatic-change.js +5 -4
  567. package/src/components/rich-text/index.js +1 -33
  568. package/src/components/unit-control/README.md +1 -1
  569. package/src/components/url-popover/README.md +1 -1
  570. package/src/components/url-popover/image-url-input-ui.js +0 -2
  571. package/src/components/use-block-commands/index.js +5 -5
  572. package/src/components/use-block-display-information/index.js +15 -2
  573. package/src/components/use-block-display-information/test/index.js +140 -0
  574. package/src/hooks/anchor.js +9 -18
  575. package/src/hooks/background.js +210 -133
  576. package/src/hooks/background.scss +0 -35
  577. package/src/hooks/block-fields/index.js +27 -2
  578. package/src/hooks/border.js +1 -5
  579. package/src/hooks/color.js +2 -210
  580. package/src/hooks/color.scss +3 -9
  581. package/src/hooks/contrast-checker.js +60 -17
  582. package/src/hooks/custom-class-name.js +0 -1
  583. package/src/hooks/dimensions.js +15 -8
  584. package/src/hooks/elements.js +140 -0
  585. package/src/hooks/elements.scss +8 -0
  586. package/src/hooks/fit-text.js +16 -0
  587. package/src/hooks/grid-visualizer.js +59 -45
  588. package/src/hooks/layout-child.js +92 -14
  589. package/src/hooks/layout.js +6 -3
  590. package/src/hooks/list-view.js +10 -11
  591. package/src/hooks/position.js +23 -27
  592. package/src/hooks/states.js +2 -2
  593. package/src/hooks/style.js +91 -9
  594. package/src/hooks/supports.js +0 -9
  595. package/src/hooks/test/background.js +59 -0
  596. package/src/hooks/test/block-style-state.js +14 -14
  597. package/src/hooks/test/dimensions.js +71 -0
  598. package/src/hooks/test/layout-child.js +165 -0
  599. package/src/hooks/test/layout.js +6 -6
  600. package/src/hooks/test/style.js +133 -11
  601. package/src/hooks/typography.js +70 -6
  602. package/src/layouts/flex.js +118 -15
  603. package/src/private-apis.js +8 -0
  604. package/src/store/actions.js +13 -3
  605. package/src/store/private-actions.js +1 -4
  606. package/src/store/private-selectors.js +89 -0
  607. package/src/store/reducer.js +19 -7
  608. package/src/store/selectors.js +91 -53
  609. package/src/store/test/actions.js +21 -0
  610. package/src/store/test/private-selectors.js +166 -7
  611. package/src/store/test/reducer.js +107 -10
  612. package/src/store/test/selectors.js +77 -0
  613. package/src/style.scss +1 -0
  614. package/src/utils/block-bindings.ts +51 -0
  615. package/src/utils/color-values.ts +63 -0
  616. package/src/utils/{dom.js → dom.ts} +27 -27
  617. package/src/utils/{fit-text-frontend.js → fit-text-frontend.ts} +12 -4
  618. package/src/utils/{fit-text-utils.js → fit-text-utils.ts} +15 -7
  619. package/src/utils/{format-font-style.js → format-font-style.ts} +10 -3
  620. package/src/utils/{format-font-weight.js → format-font-weight.ts} +10 -3
  621. package/src/utils/{get-editor-region.js → get-editor-region.ts} +10 -6
  622. package/src/utils/{get-font-styles-and-weights.js → get-font-styles-and-weights.ts} +21 -17
  623. package/src/utils/{math.js → math.ts} +37 -30
  624. package/src/utils/object.ts +89 -0
  625. package/src/utils/{order-inserter-block-items.js → order-inserter-block-items.ts} +8 -5
  626. package/src/utils/{pasting.js → pasting.ts} +18 -11
  627. package/src/utils/{selection.js → selection.ts} +11 -4
  628. package/src/utils/sorting.ts +81 -0
  629. package/src/utils/test/color-values.js +44 -1
  630. package/src/utils/transform-styles/{index.js → index.ts} +25 -25
  631. package/src/utils/transform-styles/postcss-urlrebase.d.ts +15 -0
  632. package/src/utils/transform-styles/types.ts +13 -0
  633. package/src/utils/types.ts +29 -0
  634. package/build/components/media-upload-progress/constants.cjs +0 -46
  635. package/build/components/media-upload-progress/constants.cjs.map +0 -7
  636. package/build/components/rich-text/native/format-edit.cjs +0 -60
  637. package/build/components/rich-text/native/format-edit.cjs.map +0 -7
  638. package/build/components/rich-text/native/index.cjs.map +0 -7
  639. package/build/components/rich-text/native/use-format-types.cjs +0 -139
  640. package/build/components/rich-text/native/use-format-types.cjs.map +0 -7
  641. package/build-module/components/media-upload-progress/constants.mjs +0 -16
  642. package/build-module/components/media-upload-progress/constants.mjs.map +0 -7
  643. package/build-module/components/rich-text/native/format-edit.mjs +0 -39
  644. package/build-module/components/rich-text/native/format-edit.mjs.map +0 -7
  645. package/build-module/components/rich-text/native/index.mjs +0 -7
  646. package/build-module/components/rich-text/native/index.mjs.map +0 -7
  647. package/build-module/components/rich-text/native/use-format-types.mjs +0 -114
  648. package/build-module/components/rich-text/native/use-format-types.mjs.map +0 -7
  649. package/src/components/audio-player/audio-url-parser.native.js +0 -20
  650. package/src/components/audio-player/index.native.js +0 -225
  651. package/src/components/audio-player/styles.native.scss +0 -114
  652. package/src/components/audio-player/test/audio-url-parser.native.js +0 -53
  653. package/src/components/block-alignment-control/test/index.native.js +0 -37
  654. package/src/components/block-alignment-control/ui.native.js +0 -86
  655. package/src/components/block-caption/README.md +0 -104
  656. package/src/components/block-caption/index.native.js +0 -89
  657. package/src/components/block-caption/styles.native.scss +0 -7
  658. package/src/components/block-controls/slot.native.js +0 -33
  659. package/src/components/block-draggable/draggable-chip.native.js +0 -49
  660. package/src/components/block-draggable/dropping-insertion-point.native.js +0 -181
  661. package/src/components/block-draggable/dropping-insertion-point.native.scss +0 -8
  662. package/src/components/block-draggable/index.native.js +0 -467
  663. package/src/components/block-draggable/style.native.scss +0 -19
  664. package/src/components/block-draggable/test/__snapshots__/index.native.js.snap +0 -73
  665. package/src/components/block-draggable/test/helpers.native.js +0 -182
  666. package/src/components/block-draggable/test/index.native.js +0 -419
  667. package/src/components/block-draggable/use-scroll-when-dragging.native.js +0 -135
  668. package/src/components/block-edit/edit.native.js +0 -49
  669. package/src/components/block-edit/test/edit.native.js +0 -65
  670. package/src/components/block-heading-level-dropdown/index.native.js +0 -68
  671. package/src/components/block-icon/index.native.js +0 -47
  672. package/src/components/block-icon/style.native.scss +0 -7
  673. package/src/components/block-list/block-crash-boundary.native.js +0 -43
  674. package/src/components/block-list/block-crash-warning.native.js +0 -21
  675. package/src/components/block-list/block-invalid-warning.native.js +0 -70
  676. package/src/components/block-list/block-list-context.native.js +0 -172
  677. package/src/components/block-list/block-list-item-cell.native.js +0 -62
  678. package/src/components/block-list/block-list-item.native.js +0 -209
  679. package/src/components/block-list/block-list-item.native.scss +0 -16
  680. package/src/components/block-list/block-outline.native.js +0 -77
  681. package/src/components/block-list/block-selection-button.native.js +0 -100
  682. package/src/components/block-list/block-selection-button.native.scss +0 -34
  683. package/src/components/block-list/block.native.js +0 -716
  684. package/src/components/block-list/block.native.scss +0 -62
  685. package/src/components/block-list/grid-item.native.js +0 -58
  686. package/src/components/block-list/index.native.js +0 -437
  687. package/src/components/block-list/insertion-point.native.js +0 -36
  688. package/src/components/block-list/style.native.scss +0 -117
  689. package/src/components/block-list/test/block-invalid-warning.native.js +0 -62
  690. package/src/components/block-list/test/block-list-context.native.js +0 -243
  691. package/src/components/block-list/test/block-outline.native.js +0 -255
  692. package/src/components/block-list/test/fixtures/block-list-context.native.js +0 -79
  693. package/src/components/block-list/test/index.native.js +0 -205
  694. package/src/components/block-list/use-block-props/index.native.js +0 -10
  695. package/src/components/block-list/use-scroll-upon-insertion.native.js +0 -52
  696. package/src/components/block-list-appender/index.native.js +0 -70
  697. package/src/components/block-list-appender/style.native.scss +0 -8
  698. package/src/components/block-media-update-progress/README.md +0 -100
  699. package/src/components/block-media-update-progress/index.native.js +0 -299
  700. package/src/components/block-media-update-progress/styles.native.scss +0 -9
  701. package/src/components/block-media-update-progress/test/index.native.js +0 -543
  702. package/src/components/block-mover/index.native.js +0 -193
  703. package/src/components/block-mover/mover-description.native.js +0 -155
  704. package/src/components/block-mover/test/__snapshots__/index.native.js.snap +0 -218
  705. package/src/components/block-mover/test/index.native.js +0 -186
  706. package/src/components/block-settings/button.native.js +0 -41
  707. package/src/components/block-settings/container.native.js +0 -91
  708. package/src/components/block-settings/container.native.scss +0 -4
  709. package/src/components/block-settings/index.native.js +0 -5
  710. package/src/components/block-styles/index.native.js +0 -94
  711. package/src/components/block-styles/preview.native.js +0 -109
  712. package/src/components/block-styles/style.native.scss +0 -64
  713. package/src/components/block-switcher/block-transformations-menu.native.js +0 -91
  714. package/src/components/block-toolbar/block-toolbar-menu.native.js +0 -477
  715. package/src/components/block-toolbar/index.native.js +0 -126
  716. package/src/components/block-toolbar/test/__snapshots__/block-toolbar-menu.native.js.snap +0 -125
  717. package/src/components/block-toolbar/test/block-toolbar-menu.native.js +0 -405
  718. package/src/components/block-toolbar/test/index.native.js +0 -36
  719. package/src/components/block-types-list/index.native.js +0 -175
  720. package/src/components/block-types-list/style.native.scss +0 -25
  721. package/src/components/block-variation-picker/index.native.js +0 -107
  722. package/src/components/block-variation-picker/style.native.scss +0 -32
  723. package/src/components/button-block-appender/index.native.js +0 -92
  724. package/src/components/button-block-appender/styles.native.scss +0 -43
  725. package/src/components/caption/README.md +0 -44
  726. package/src/components/caption/index.native.js +0 -61
  727. package/src/components/colors-gradients/panel-color-gradient-settings.native.js +0 -59
  728. package/src/components/contrast-checker/index.native.js +0 -113
  729. package/src/components/contrast-checker/style.native.scss +0 -26
  730. package/src/components/convert-to-group-buttons/index.native.js +0 -79
  731. package/src/components/default-block-appender/index.native.js +0 -113
  732. package/src/components/default-block-appender/style.native.scss +0 -18
  733. package/src/components/floating-toolbar/floatingToolbar.android.scss +0 -4
  734. package/src/components/floating-toolbar/floatingToolbar.ios.scss +0 -3
  735. package/src/components/floating-toolbar/index.native.js +0 -141
  736. package/src/components/floating-toolbar/styles.native.scss +0 -43
  737. package/src/components/font-sizes/index.native.js +0 -7
  738. package/src/components/global-styles/color-panel.native.js +0 -207
  739. package/src/components/global-styles/test/use-global-styles-context.native.js +0 -435
  740. package/src/components/global-styles/use-global-styles-context.native.js +0 -592
  741. package/src/components/gradients/index.native.js +0 -2
  742. package/src/components/image-link-destinations/index.native.js +0 -152
  743. package/src/components/image-link-destinations/style.native.scss +0 -16
  744. package/src/components/index.native.js +0 -108
  745. package/src/components/inner-blocks/constants.native.js +0 -5
  746. package/src/components/inner-blocks/index.native.js +0 -221
  747. package/src/components/inner-blocks/warning-max-depth-exceeded.native.js +0 -124
  748. package/src/components/inserter/block-types-tab.native.js +0 -76
  749. package/src/components/inserter/hooks/use-block-type-impressions.native.js +0 -47
  750. package/src/components/inserter/hooks/use-clipboard-block.native.js +0 -40
  751. package/src/components/inserter/index.native.js +0 -424
  752. package/src/components/inserter/menu.native.js +0 -237
  753. package/src/components/inserter/no-results.native.js +0 -49
  754. package/src/components/inserter/reusable-blocks-tab.native.js +0 -45
  755. package/src/components/inserter/search-results.native.js +0 -67
  756. package/src/components/inserter/style.native.scss +0 -83
  757. package/src/components/inserter/tabs.native.js +0 -152
  758. package/src/components/inserter/test/__snapshots__/index.native.js.snap +0 -117
  759. package/src/components/inserter/test/fixtures/index.native.js +0 -12
  760. package/src/components/inserter/test/index.native.js +0 -273
  761. package/src/components/inserter/test/reusable-blocks-tab.native.js +0 -62
  762. package/src/components/inserter/test/utils.native.js +0 -37
  763. package/src/components/inserter/utils.native.js +0 -46
  764. package/src/components/inserter-button/index.native.js +0 -108
  765. package/src/components/inserter-button/style.native.scss +0 -72
  766. package/src/components/inspector-controls/fill.native.js +0 -62
  767. package/src/components/inspector-controls/slot.native.js +0 -35
  768. package/src/components/inspector-controls-tabs/advanced-controls-panel.native.js +0 -31
  769. package/src/components/line-height-control/index.native.js +0 -28
  770. package/src/components/media-placeholder/index.native.js +0 -258
  771. package/src/components/media-placeholder/styles.native.scss +0 -108
  772. package/src/components/media-replace-flow/index.native.js +0 -12
  773. package/src/components/media-upload/constants.native.js +0 -14
  774. package/src/components/media-upload/index.native.js +0 -356
  775. package/src/components/media-upload/style.native.scss +0 -4
  776. package/src/components/media-upload/test/index.native.js +0 -172
  777. package/src/components/media-upload-progress/README.md +0 -100
  778. package/src/components/media-upload-progress/constants.js +0 -6
  779. package/src/components/media-upload-progress/index.native.js +0 -233
  780. package/src/components/media-upload-progress/styles.native.scss +0 -15
  781. package/src/components/media-upload-progress/test/index.native.js +0 -220
  782. package/src/components/plain-text/index.native.js +0 -164
  783. package/src/components/plain-text/style.native.scss +0 -10
  784. package/src/components/provider/index.native.js +0 -32
  785. package/src/components/rich-text/embed-handler-picker.native.js +0 -65
  786. package/src/components/rich-text/file-paste-handler.native.js +0 -3
  787. package/src/components/rich-text/format-toolbar/index.native.js +0 -21
  788. package/src/components/rich-text/format-toolbar-container.native.js +0 -16
  789. package/src/components/rich-text/index.native.js +0 -701
  790. package/src/components/rich-text/input-event.native.js +0 -10
  791. package/src/components/rich-text/native/format-edit.js +0 -44
  792. package/src/components/rich-text/native/get-format-colors.native.js +0 -47
  793. package/src/components/rich-text/native/index.js +0 -1
  794. package/src/components/rich-text/native/index.native.js +0 -1389
  795. package/src/components/rich-text/native/style.native.scss +0 -28
  796. package/src/components/rich-text/native/test/__snapshots__/index.native.js.snap +0 -79
  797. package/src/components/rich-text/native/test/index.native.js +0 -345
  798. package/src/components/rich-text/native/test/performance/rich-text.native.js +0 -44
  799. package/src/components/rich-text/native/toolbar-button-with-options.native.js +0 -61
  800. package/src/components/rich-text/native/use-format-types.js +0 -146
  801. package/src/components/rich-text/remove-browser-shortcuts.native.js +0 -1
  802. package/src/components/rich-text/shortcut.native.js +0 -10
  803. package/src/components/ungroup-button/README.md +0 -23
  804. package/src/components/ungroup-button/index.native.js +0 -77
  805. package/src/components/unsupported-block-details/index.native.js +0 -187
  806. package/src/components/unsupported-block-details/style.native.scss +0 -56
  807. package/src/components/url-input/index.native.js +0 -33
  808. package/src/components/use-block-drop-zone/index.native.js +0 -207
  809. package/src/components/use-on-block-drop/index.native.js +0 -115
  810. package/src/components/use-unsupported-block-editor/index.native.js +0 -59
  811. package/src/components/video-player/gridicon-play.native.js +0 -13
  812. package/src/components/video-player/index.native.js +0 -133
  813. package/src/components/video-player/styles.native.scss +0 -29
  814. package/src/components/warning/index.native.js +0 -64
  815. package/src/components/warning/style.native.scss +0 -47
  816. package/src/hooks/align.native.js +0 -49
  817. package/src/hooks/custom-class-name.native.js +0 -70
  818. package/src/hooks/index.native.js +0 -36
  819. package/src/hooks/layout.native.js +0 -23
  820. package/src/hooks/test/__snapshots__/align.native.js.snap +0 -73
  821. package/src/hooks/test/__snapshots__/anchor.native.js.snap +0 -7
  822. package/src/hooks/test/align.native.js +0 -134
  823. package/src/hooks/test/anchor.native.js +0 -32
  824. package/src/hooks/test/use-editor-wrapper-styles.native.js +0 -282
  825. package/src/hooks/typography.native.js +0 -60
  826. package/src/hooks/use-editor-wrapper-styles.native.js +0 -250
  827. package/src/hooks/use-editor-wrapper-styles.native.scss +0 -12
  828. package/src/index.native.js +0 -6
  829. package/src/private-apis.native.js +0 -21
  830. package/src/store/defaults.native.js +0 -23
  831. package/src/utils/block-bindings.js +0 -46
  832. package/src/utils/color-values.js +0 -28
  833. package/src/utils/object.js +0 -67
  834. package/src/utils/sorting.js +0 -54
  835. /package/src/utils/{get-px-from-css-unit.js → get-px-from-css-unit.ts} +0 -0
  836. /package/src/utils/{index.js → index.ts} +0 -0
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/store/private-actions.js"],
4
- "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\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\t'mediaSideload',\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\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 * 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 * Mark a contentOnly section as being edited.\n *\n * @param {string} clientId The client id of the block.\n */\nexport function editContentOnlySection( clientId ) {\n\treturn {\n\t\ttype: 'EDIT_CONTENT_ONLY_SECTION',\n\t\tclientId,\n\t};\n}\n\n/**\n * Action that stops editing a contentOnly section.\n */\nexport function stopEditingContentOnlySection() {\n\treturn {\n\t\ttype: 'EDIT_CONTENT_ONLY_SECTION',\n\t};\n}\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\n/**\n * Action that toggles the spotlighted block state.\n *\n * @param {string} clientId The block's clientId.\n * @param {boolean} hasBlockSpotlight The spotlight state.\n * @return {Object} Action object.\n */\nexport function toggleBlockSpotlight( clientId, hasBlockSpotlight ) {\n\treturn {\n\t\ttype: 'TOGGLE_BLOCK_SPOTLIGHT',\n\t\tclientId,\n\t\thasBlockSpotlight,\n\t};\n}\n\n/**\n * Opens the list view content panel popover.\n *\n * @return {Object} Action object.\n */\nexport function openListViewContentPanel() {\n\treturn {\n\t\ttype: 'OPEN_LIST_VIEW_CONTENT_PANEL',\n\t};\n}\n\n/**\n * Closes the list view content panel popover.\n *\n * @return {Object} Action object.\n */\nexport function closeListViewContentPanel() {\n\treturn {\n\t\ttype: 'CLOSE_LIST_VIEW_CONTENT_PANEL',\n\t};\n}\n\n/**\n * Returns an action object used to open the viewport modal\n * for the given client IDs.\n *\n * @param {string[]} clientIds Client IDs of blocks to configure viewport settings for.\n * @return {Object} Action object.\n */\nexport function showViewportModal( clientIds ) {\n\treturn {\n\t\ttype: 'SHOW_VIEWPORT_MODAL',\n\t\tclientIds,\n\t};\n}\n\n/**\n * Returns an action object used to close the viewport modal.\n *\n * @return {Object} Action object.\n */\nexport function hideViewportModal() {\n\treturn {\n\t\ttype: 'HIDE_VIEWPORT_MODAL',\n\t};\n}\n\n/**\n * Requests to open a specific inspector tab, optionally with additional options.\n * This action signals intent to switch to a particular tab in the block inspector.\n *\n * @param {string} tabName The name of the tab to open (e.g., 'list-view', 'settings', 'styles').\n * @param {Object} [options] Optional configuration.\n * @param {string} [options.openPanel] Client ID of a specific panel to open (for tabs that support panels).\n *\n * @return {Object} Action object.\n */\nexport function requestInspectorTab( tabName, options = {} ) {\n\treturn {\n\t\ttype: 'REQUEST_INSPECTOR_TAB',\n\t\ttabName,\n\t\toptions,\n\t};\n}\n\n/**\n * Clears the requested inspector tab state after it has been handled.\n *\n * @return {Object} Action object.\n */\nexport function clearRequestedInspectorTab() {\n\treturn {\n\t\ttype: 'CLEAR_REQUESTED_INSPECTOR_TAB',\n\t};\n}\n\n/**\n * Sets the selected style state for a block's style controls.\n *\n * @param {string} clientId The block client ID.\n * @param {Object} value The selected state value.\n *\n * @return {Object} Action object.\n */\nexport function setSelectedBlockStyleState( clientId, value ) {\n\treturn {\n\t\ttype: 'SET_SELECTED_BLOCK_STYLE_STATE',\n\t\tclientId,\n\t\tvalue,\n\t};\n}\n\n/**\n * Sets whether the selected style state is shown on the canvas.\n *\n * @param {string} clientId The block client ID.\n * @param {boolean} value Whether to show the selected state on the canvas.\n *\n * @return {Object} Action object.\n */\nexport function setSelectedBlockStyleStateCanvasPreview( clientId, value ) {\n\treturn {\n\t\ttype: 'SET_SELECTED_BLOCK_STYLE_STATE_CANVAS_PREVIEW',\n\t\tclientId,\n\t\tvalue,\n\t};\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAAyB;AACzB,wBAAuB;AACvB,kBAAsB;AACtB,kBAAmB;AAEnB,IAAM,YAAY,CAAE,eACnB,MAAM,QAAS,UAAW,IAAI,aAAa,CAAE,UAAW;AAUzD,IAAM,kBAAkB;AAAA,EACvB;AAAA,EACA;AAAA,EACA;AACD;AAYO,SAAS,6BACf,UACA,EAAE,4BAA4B,OAAO,QAAQ,MAAM,IAAI,CAAC,GACvD;AACD,MAAI,mBAAmB;AAEvB,MAAK,OAAO,OAAQ,kBAAkB,yBAA0B,GAAI;AACnE,0BAAAA;AAAA,MACC;AAAA,MACA;AAAA,QACC,OAAO;AAAA,QACP,aAAa;AAAA,MACd;AAAA,IACD;AAEA,uBAAmB,EAAE,GAAG,iBAAiB;AACzC,qBAAiB,gBAChB,iBAAiB;AAClB,WAAO,iBAAiB;AAAA,EACzB;AAEA,MAAI,gBAAgB;AAIpB,MAAK,6BAA6B,wBAAS,OAAO,OAAQ;AACzD,oBAAgB,CAAC;AACjB,eAAY,OAAO,kBAAmB;AACrC,UAAK,CAAE,gBAAgB,SAAU,GAAI,GAAI;AACxC,sBAAe,GAAI,IAAI,iBAAkB,GAAI;AAAA,MAC9C;AAAA,IACD;AAAA,EACD;AACA,SAAO;AAAA,IACN,MAAM;AAAA,IACN,UAAU;AAAA,IACV;AAAA,EACD;AACD;AAOO,SAAS,qBAAqB;AACpC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AAOO,SAAS,6BAA6B;AAC5C,SAAO;AAAA,IACN,MAAM;AAAA,EACP;AACD;AAUO,SAAS,2BAA4B,UAAU,OAAQ;AAC7D,SAAO;AAAA,IACN,MAAM;AAAA,IACN;AAAA,IACA;AAAA,EACD;AACD;AAUO,SAAS,wCAAyC,UAAU,OAAQ;AAC1E,SAAO;AAAA,IACN,MAAM;AAAA,IACN;AAAA,IACA;AAAA,EACD;AACD;",
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { speak } from '@wordpress/a11y';\nimport { __ } from '@wordpress/i18n';\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\t'mediaSideload',\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\tif ( stripExperimentalSettings ) {\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\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 * 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 * Mark a contentOnly section as being edited.\n *\n * @param {string} clientId The client id of the block.\n */\nexport function editContentOnlySection( clientId ) {\n\treturn {\n\t\ttype: 'EDIT_CONTENT_ONLY_SECTION',\n\t\tclientId,\n\t};\n}\n\n/**\n * Action that stops editing a contentOnly section.\n */\nexport function stopEditingContentOnlySection() {\n\treturn {\n\t\ttype: 'EDIT_CONTENT_ONLY_SECTION',\n\t};\n}\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\n/**\n * Action that toggles the spotlighted block state.\n *\n * @param {string} clientId The block's clientId.\n * @param {boolean} hasBlockSpotlight The spotlight state.\n * @return {Object} Action object.\n */\nexport function toggleBlockSpotlight( clientId, hasBlockSpotlight ) {\n\treturn {\n\t\ttype: 'TOGGLE_BLOCK_SPOTLIGHT',\n\t\tclientId,\n\t\thasBlockSpotlight,\n\t};\n}\n\n/**\n * Opens the list view content panel popover.\n *\n * @return {Object} Action object.\n */\nexport function openListViewContentPanel() {\n\treturn {\n\t\ttype: 'OPEN_LIST_VIEW_CONTENT_PANEL',\n\t};\n}\n\n/**\n * Closes the list view content panel popover.\n *\n * @return {Object} Action object.\n */\nexport function closeListViewContentPanel() {\n\treturn {\n\t\ttype: 'CLOSE_LIST_VIEW_CONTENT_PANEL',\n\t};\n}\n\n/**\n * Returns an action object used to open the viewport modal\n * for the given client IDs.\n *\n * @param {string[]} clientIds Client IDs of blocks to configure viewport settings for.\n * @return {Object} Action object.\n */\nexport function showViewportModal( clientIds ) {\n\treturn {\n\t\ttype: 'SHOW_VIEWPORT_MODAL',\n\t\tclientIds,\n\t};\n}\n\n/**\n * Returns an action object used to close the viewport modal.\n *\n * @return {Object} Action object.\n */\nexport function hideViewportModal() {\n\treturn {\n\t\ttype: 'HIDE_VIEWPORT_MODAL',\n\t};\n}\n\n/**\n * Requests to open a specific inspector tab, optionally with additional options.\n * This action signals intent to switch to a particular tab in the block inspector.\n *\n * @param {string} tabName The name of the tab to open (e.g., 'list-view', 'settings', 'styles').\n * @param {Object} [options] Optional configuration.\n * @param {string} [options.openPanel] Client ID of a specific panel to open (for tabs that support panels).\n *\n * @return {Object} Action object.\n */\nexport function requestInspectorTab( tabName, options = {} ) {\n\treturn {\n\t\ttype: 'REQUEST_INSPECTOR_TAB',\n\t\ttabName,\n\t\toptions,\n\t};\n}\n\n/**\n * Clears the requested inspector tab state after it has been handled.\n *\n * @return {Object} Action object.\n */\nexport function clearRequestedInspectorTab() {\n\treturn {\n\t\ttype: 'CLEAR_REQUESTED_INSPECTOR_TAB',\n\t};\n}\n\n/**\n * Sets the selected style state for a block's style controls.\n *\n * @param {string} clientId The block client ID.\n * @param {Object} value The selected state value.\n *\n * @return {Object} Action object.\n */\nexport function setSelectedBlockStyleState( clientId, value ) {\n\treturn {\n\t\ttype: 'SET_SELECTED_BLOCK_STYLE_STATE',\n\t\tclientId,\n\t\tvalue,\n\t};\n}\n\n/**\n * Sets whether the selected style state is shown on the canvas.\n *\n * @param {string} clientId The block client ID.\n * @param {boolean} value Whether to show the selected state on the canvas.\n *\n * @return {Object} Action object.\n */\nexport function setSelectedBlockStyleStateCanvasPreview( clientId, value ) {\n\treturn {\n\t\ttype: 'SET_SELECTED_BLOCK_STYLE_STATE_CANVAS_PREVIEW',\n\t\tclientId,\n\t\tvalue,\n\t};\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,wBAAuB;AACvB,kBAAsB;AACtB,kBAAmB;AAEnB,IAAM,YAAY,CAAE,eACnB,MAAM,QAAS,UAAW,IAAI,aAAa,CAAE,UAAW;AAUzD,IAAM,kBAAkB;AAAA,EACvB;AAAA,EACA;AAAA,EACA;AACD;AAYO,SAAS,6BACf,UACA,EAAE,4BAA4B,OAAO,QAAQ,MAAM,IAAI,CAA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ACD,CAAE;AACH;AAMM,SAAS,iBAAiB;AAChC,SAAO;AAAA,IACN,MAAM;AAAA,EACP;AACD;AASO,SAAS,qBAAsB,UAAU,mBAAoB;AACnE,SAAO;AAAA,IACN,MAAM;AAAA,IACN;AAAA,IACA;AAAA,EACD;AACD;AAOO,SAAS,2BAA2B;AAC1C,SAAO;AAAA,IACN,MAAM;AAAA,EACP;AACD;AAOO,SAAS,4BAA4B;AAC3C,SAAO;AAAA,IACN,MAAM;AAAA,EACP;AACD;AASO,SAAS,kBAAmB,WAAY;AAC9C,SAAO;AAAA,IACN,MAAM;AAAA,IACN;AAAA,EACD;AACD;AAOO,SAAS,oBAAoB;AACnC,SAAO;AAAA,IACN,MAAM;AAAA,EACP;AACD;AAYO,SAAS,oBAAqB,SAAS,UAAU,CAAC,GAAI;AAC5D,SAAO;AAAA,IACN,MAAM;AAAA,IACN;AAAA,IACA;AAAA,EACD;AACD;AAOO,SAAS,6BAA6B;AAC5C,SAAO;AAAA,IACN,MAAM;AAAA,EACP;AACD;AAUO,SAAS,2BAA4B,UAAU,OAAQ;AAC7D,SAAO;AAAA,IACN,MAAM;AAAA,IACN;AAAA,IACA;AAAA,EACD;AACD;AAUO,SAAS,wCAAyC,UAAU,OAAQ;AAC1E,SAAO;AAAA,IACN,MAAM;AAAA,IACN;AAAA,IACA;AAAA,EACD;AACD;",
6
6
  "names": ["deprecated", "flattenBlocks"]
7
7
  }
@@ -25,6 +25,8 @@ __export(private_selectors_exports, {
25
25
  getBlockSettings: () => import_get_block_settings.getBlockSettings,
26
26
  getBlockStyles: () => getBlockStyles,
27
27
  getBlockWithoutAttributes: () => getBlockWithoutAttributes,
28
+ getClientIdWithClientIdsTree: () => getClientIdWithClientIdsTree,
29
+ getClientIdsTree: () => getClientIdsTree,
28
30
  getClosestAllowedInsertionPoint: () => getClosestAllowedInsertionPoint,
29
31
  getClosestAllowedInsertionPointForPattern: () => getClosestAllowedInsertionPointForPattern,
30
32
  getContentLockingParent: () => getContentLockingParent,
@@ -69,7 +71,8 @@ __export(private_selectors_exports, {
69
71
  isSectionBlock: () => isSectionBlock,
70
72
  isSelectedBlockStyleStateShownOnCanvas: () => isSelectedBlockStyleStateShownOnCanvas,
71
73
  isWithinEditedContentOnlySection: () => isWithinEditedContentOnlySection,
72
- isZoomOut: () => isZoomOut
74
+ isZoomOut: () => isZoomOut,
75
+ shouldRenderBlockListView: () => shouldRenderBlockListView
73
76
  });
74
77
  module.exports = __toCommonJS(private_selectors_exports);
75
78
  var import_data = require("@wordpress/data");
@@ -106,6 +109,25 @@ function isContainerInsertableToInContentOnlyMode(state, blockName, rootClientId
106
109
  const isRootBlockMain = getSectionRootClientId(state) === rootClientId;
107
110
  return isRootBlockMain || isContainerContentBlock && isBlockContentBlock;
108
111
  }
112
+ function getClientIdWithClientIdsTreeUnmemoized(state, clientId) {
113
+ return {
114
+ clientId,
115
+ innerBlocks: getClientIdsTreeUnmemoized(state, clientId)
116
+ };
117
+ }
118
+ function getClientIdsTreeUnmemoized(state, rootClientId = "") {
119
+ return (0, import_selectors.getBlockOrder)(state, rootClientId).map(
120
+ (clientId) => getClientIdWithClientIdsTreeUnmemoized(state, clientId)
121
+ );
122
+ }
123
+ var getClientIdWithClientIdsTree = (0, import_data.createSelector)(
124
+ getClientIdWithClientIdsTreeUnmemoized,
125
+ (state) => [state.blocks.order]
126
+ );
127
+ var getClientIdsTree = (0, import_data.createSelector)(
128
+ getClientIdsTreeUnmemoized,
129
+ (state) => [state.blocks.order]
130
+ );
109
131
  function getEnabledClientIdsTreeUnmemoized(state, rootClientId) {
110
132
  const blockOrder = (0, import_selectors.getBlockOrder)(state, rootClientId);
111
133
  const result = [];
@@ -513,6 +535,21 @@ function isListViewPanelOpened(state, clientId) {
513
535
  function getListViewExpandRevision(state) {
514
536
  return state.listViewExpandRevision || 0;
515
537
  }
538
+ function shouldRenderBlockListView(state, clientId) {
539
+ const blockName = (0, import_selectors.getBlockName)(state, clientId);
540
+ if (blockName === "core/navigation") {
541
+ return true;
542
+ }
543
+ if (!(0, import_blocks.hasBlockSupport)(blockName, "listView")) {
544
+ return false;
545
+ }
546
+ const allowedBlocks = (0, import_selectors.getBlockListSettings)(
547
+ state,
548
+ clientId
549
+ )?.allowedBlocks;
550
+ const isEmptyAndNoAllowedBlocks = (0, import_selectors.getBlockOrder)(state, clientId).length === 0 && (allowedBlocks === false || Array.isArray(allowedBlocks) && allowedBlocks.length === 0);
551
+ return !isEmptyAndNoAllowedBlocks;
552
+ }
516
553
  function getViewportModalClientIds(state) {
517
554
  return state.viewportModalClientIds;
518
555
  }
@@ -546,6 +583,8 @@ function isSelectedBlockStyleStateShownOnCanvas(state, clientId) {
546
583
  getBlockSettings,
547
584
  getBlockStyles,
548
585
  getBlockWithoutAttributes,
586
+ getClientIdWithClientIdsTree,
587
+ getClientIdsTree,
549
588
  getClosestAllowedInsertionPoint,
550
589
  getClosestAllowedInsertionPointForPattern,
551
590
  getContentLockingParent,
@@ -590,6 +629,7 @@ function isSelectedBlockStyleStateShownOnCanvas(state, clientId) {
590
629
  isSectionBlock,
591
630
  isSelectedBlockStyleStateShownOnCanvas,
592
631
  isWithinEditedContentOnlySection,
593
- isZoomOut
632
+ isZoomOut,
633
+ shouldRenderBlockListView
594
634
  });
595
635
  //# sourceMappingURL=private-selectors.cjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/store/private-selectors.js"],
4
- "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { createSelector, createRegistrySelector } from '@wordpress/data';\nimport {\n\thasBlockSupport,\n\tprivateApis as blocksPrivateApis,\n} from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport {\n\tgetBlockOrder,\n\tgetBlockParents,\n\tgetBlockEditingMode,\n\tgetSettings,\n\tcanInsertBlockType,\n\tgetBlockName,\n\tgetTemplateLock,\n\tgetClientIdsWithDescendants,\n\tgetBlockRootClientId,\n\tgetBlockAttributes,\n} from './selectors';\nimport {\n\tcheckAllowListRecursive,\n\tgetAllPatternsDependants,\n\tgetInsertBlockTypeDependants,\n\tgetGrammar,\n\tmapUserPattern,\n} from './utils';\nimport { STORE_NAME } from './constants';\nimport { unlock } from '../lock-unlock';\nimport {\n\tselectBlockPatternsKey,\n\treusableBlocksSelectKey,\n\tuserPatternCategoriesSelectKey,\n\tsectionRootClientIdKey,\n\tisIsolatedEditorKey,\n} from './private-keys';\nimport { BLOCK_VISIBILITY_VIEWPORTS } from '../components/block-visibility/constants';\n\nconst { isContentBlock } = unlock( blocksPrivateApis );\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\n/**\n * Determines if a container (clientId) allows insertion of blocks, considering contentOnly mode restrictions.\n *\n * @param {Object} state Editor state.\n * @param {string} blockName The block name to insert.\n * @param {string} rootClientId The client ID of the root container block.\n * @return {boolean} Whether the container allows insertion.\n */\nexport function isContainerInsertableToInContentOnlyMode(\n\tstate,\n\tblockName,\n\trootClientId\n) {\n\tconst isBlockContentBlock = isContentBlock( blockName );\n\tconst rootBlockName = getBlockName( state, rootClientId );\n\tconst isContainerContentBlock = isContentBlock( rootBlockName );\n\tconst isRootBlockMain = getSectionRootClientId( state ) === rootClientId;\n\n\t// In contentOnly mode, containers shouldn't be inserted into unless:\n\t// 1. they are a section root;\n\t// 2. they are a content block and the block to be inserted is also content.\n\treturn (\n\t\tisRootBlockMain || ( isContainerContentBlock && isBlockContentBlock )\n\t);\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 = createRegistrySelector( () =>\n\tcreateSelector( getEnabledClientIdsTreeUnmemoized, ( state ) => [\n\t\tstate.blocks.order,\n\t\tstate.derivedBlockEditingModes,\n\t\tstate.blocks.blockEditingModes,\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.blocks.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 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( select )( state, rootClientId ),\n\t\t]\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[ userPatternCategoriesSelectKey ]?.(\n\t\t\t\t\t\tselect\n\t\t\t\t\t) ?? state.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[ userPatternCategoriesSelectKey ]?.(\n\t\t\t\t\t\t\tselect\n\t\t\t\t\t\t) ?? state.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\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 * Checks whether a block meets the raw criteria to be a section block,\n * without considering contextual factors like nesting or the edited\n * content-only section. Used internally by `isSectionBlock` and\n * `getParentSectionBlock` to avoid circular calls between them.\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 candidate section block.\n */\nfunction isSectionBlockCandidate( state, clientId ) {\n\tconst blockName = getBlockName( state, clientId );\n\tif ( blockName === 'core/block' ) {\n\t\treturn true;\n\t}\n\n\tconst attributes = getBlockAttributes( state, clientId );\n\tconst isTemplatePart = blockName === 'core/template-part';\n\n\t// When in an isolated editing context (e.g., editing a template part or pattern directly),\n\t// don't treat nested unsynced patterns as section blocks.\n\tconst isIsolatedEditor = state.settings?.[ isIsolatedEditorKey ];\n\n\tconst disableContentOnlyForUnsyncedPatterns =\n\t\tstate.settings?.disableContentOnlyForUnsyncedPatterns;\n\n\tconst disableContentOnlyForTemplateParts =\n\t\tstate.settings?.disableContentOnlyForTemplateParts;\n\n\tif (\n\t\t( ( ! disableContentOnlyForUnsyncedPatterns &&\n\t\t\tattributes?.metadata?.patternName ) ||\n\t\t\t( isTemplatePart && ! disableContentOnlyForTemplateParts ) ) &&\n\t\t! isIsolatedEditor\n\t) {\n\t\treturn true;\n\t}\n\n\t// TemplateLock cascades to all inner parent blocks. Only the top-level\n\t// block that's contentOnly templateLocked is the true contentLocker,\n\t// all the others are mere imitators.\n\tconst hasContentOnlyTemplateLock =\n\t\tgetTemplateLock( state, clientId ) === 'contentOnly';\n\tconst rootClientId = getBlockRootClientId( state, clientId );\n\tconst hasRootContentOnlyTemplateLock =\n\t\tgetTemplateLock( state, rootClientId ) === 'contentOnly';\n\tif ( hasContentOnlyTemplateLock && ! hasRootContentOnlyTemplateLock ) {\n\t\treturn true;\n\t}\n\n\treturn false;\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 a contentOnly section.\n */\nexport const getParentSectionBlock = ( state, clientId ) => {\n\t// If this block is within the edited content-only section,\n\t// it has no parent section \u2014 it's temporarily fully editable.\n\tif ( isWithinEditedContentOnlySection( state, clientId ) ) {\n\t\treturn undefined;\n\t}\n\n\tlet current = clientId;\n\tlet result;\n\n\t// If sections are nested, return the top level section block.\n\t// Don't return early.\n\twhile ( ( current = state.blocks.parents.get( current ) ) ) {\n\t\tif ( isSectionBlockCandidate( state, current ) ) {\n\t\t\tresult = current;\n\t\t}\n\t}\n\treturn result;\n};\n\n/**\n * Returns whether the block is a contentOnly section.\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 contentOnly section.\n */\nexport function isSectionBlock( state, clientId ) {\n\t// isWithinEditedContentOnlySection -\n\t// If the section is being edited or a parent section is being edited,\n\t// this block is temporarily not considered a section.\n\t//\n\t// getParentSectionBlock -\n\t// Only the top level section is considered the section,\n\t// a nested section is managed by its parent section.\n\tif (\n\t\tisWithinEditedContentOnlySection( state, clientId ) ||\n\t\tgetParentSectionBlock( state, clientId )\n\t) {\n\t\treturn false;\n\t}\n\n\treturn isSectionBlockCandidate( state, clientId );\n}\n\n/**\n * Retrieves the client ID of the block that is a contentOnly section but is\n * currently being temporarily edited (contentOnly is deactivated).\n *\n * @param {Object} state Global application state.\n *\n * @return {?string} The client ID of the block being temporarily edited.\n */\nexport function getEditedContentOnlySection( state ) {\n\treturn state.editedContentOnlySection;\n}\n\nexport function isWithinEditedContentOnlySection( state, clientId ) {\n\tif ( ! state.editedContentOnlySection ) {\n\t\treturn false;\n\t}\n\n\tif ( state.editedContentOnlySection === clientId ) {\n\t\treturn true;\n\t}\n\n\tlet current = clientId;\n\twhile ( ( current = state.blocks.parents.get( current ) ) ) {\n\t\tif ( state.editedContentOnlySection === current ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\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\n/**\n * Returns true if the block is hidden anywhere, or false otherwise.\n *\n * This selector checks whether a block has visibility metadata set that would\n * hide it at any viewport or everywhere. It's useful for flagging blocks that\n * have visibility restrictions.\n *\n * A block is considered hidden anywhere if:\n * - blockVisibility is false (hidden everywhere)\n * - blockVisibility.viewport has any viewport set to false (hidden at specific screen sizes)\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 hidden anywhere.\n */\nexport const isBlockHiddenAnywhere = ( state, clientId ) => {\n\tconst blockName = getBlockName( state, clientId );\n\tif ( ! hasBlockSupport( blockName, 'visibility', true ) ) {\n\t\treturn false;\n\t}\n\tconst attributes = state.blocks.attributes.get( clientId );\n\tconst blockVisibility = attributes?.metadata?.blockVisibility;\n\n\tif ( blockVisibility === false ) {\n\t\treturn true;\n\t}\n\n\tif (\n\t\ttypeof blockVisibility?.viewport === 'object' &&\n\t\tblockVisibility?.viewport !== null\n\t) {\n\t\t// Check if the block is hidden at any viewport.\n\t\treturn Object.values( BLOCK_VISIBILITY_VIEWPORTS ).some(\n\t\t\t( viewport ) =>\n\t\t\t\tblockVisibility?.viewport?.[ viewport.key ] === false\n\t\t);\n\t}\n\treturn false;\n};\n\n/**\n * Returns true if the block is hidden everywhere (blockVisibility is false).\n *\n * A block is considered hidden everywhere when blockVisibility is explicitly\n * set to false, which means it's hidden on all viewports.\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 hidden everywhere.\n */\nexport const isBlockHiddenEverywhere = ( state, clientId ) => {\n\tconst blockName = getBlockName( state, clientId );\n\tif ( ! hasBlockSupport( blockName, 'visibility', true ) ) {\n\t\treturn false;\n\t}\n\tconst attributes = state.blocks.attributes.get( clientId );\n\tconst blockVisibility = attributes?.metadata?.blockVisibility;\n\n\tif ( blockVisibility === false ) {\n\t\treturn true;\n\t}\n\treturn false;\n};\n\n/**\n * Returns true if any parent block (immediate or further up the chain) is hidden everywhere.\n *\n * Checks all parent blocks in the hierarchy and returns true if any of them\n * is hidden everywhere.\n *\n * @param {Object} state Global application state.\n * @param {string} clientId Client ID of the block.\n *\n * @return {boolean} Whether any parent block is hidden everywhere.\n */\nexport const isBlockParentHiddenEverywhere = ( state, clientId ) => {\n\tconst parents = getBlockParents( state, clientId );\n\treturn parents.some( ( parentId ) =>\n\t\tisBlockHiddenEverywhere( state, parentId )\n\t);\n};\n\n/**\n * Returns true if the block is hidden at the given viewport.\n *\n * A block is considered hidden at a viewport if:\n * - blockVisibility is false (hidden everywhere)\n * - blockVisibility is an object with the specified viewport set to false\n *\n * @param {Object} state Global application state.\n * @param {string} clientId Client ID of the block.\n * @param {string} viewport Viewport to check ('desktop', 'tablet', 'mobile').\n *\n * @return {boolean} Whether the block is hidden at the viewport.\n */\nexport const isBlockHiddenAtViewport = ( state, clientId, viewport ) => {\n\tif ( isBlockHiddenEverywhere( state, clientId ) ) {\n\t\treturn true;\n\t}\n\n\tconst attributes = state.blocks.attributes.get( clientId );\n\tconst blockVisibilityViewport =\n\t\tattributes?.metadata?.blockVisibility?.viewport;\n\tif (\n\t\ttypeof blockVisibilityViewport === 'object' &&\n\t\tblockVisibilityViewport !== null &&\n\t\ttypeof viewport === 'string'\n\t) {\n\t\treturn blockVisibilityViewport?.[ viewport.toLowerCase() ] === false;\n\t}\n\treturn false;\n};\n\n/**\n * Returns true if any parent block (immediate or further up the chain) is hidden at the given viewport.\n *\n * Checks all parent blocks in the hierarchy and returns true if any of them\n * is hidden at the specified viewport.\n *\n * @param {Object} state Global application state.\n * @param {string} clientId Client ID of the block.\n * @param {string} viewport Viewport to check ('desktop', 'tablet', 'mobile').\n *\n * @return {boolean} Whether any parent block is hidden at the viewport.\n */\nexport const isBlockParentHiddenAtViewport = ( state, clientId, viewport ) => {\n\tconst parents = getBlockParents( state, clientId );\n\treturn parents.some( ( parentId ) =>\n\t\tisBlockHiddenAtViewport( state, parentId, viewport )\n\t);\n};\n\n/**\n * Returns true if there is a spotlighted block.\n *\n * The spotlight is also active when a contentOnly section is being edited, the selector\n * also returns true if this is the case.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the block is currently spotlighted.\n */\nexport function hasBlockSpotlight( state ) {\n\treturn !! state.hasBlockSpotlight || !! state.editedContentOnlySection;\n}\n\n/**\n * Returns whether a block is locked to prevent editing.\n *\n * This selector only reasons about block lock, not associated features\n * like `blockEditingMode` that might prevent user modifications to a block.\n * Currently there's also no way to prevent editing via `templateLock`.\n *\n * This distinction is important as this selector specifically drives the block lock UI\n * that a user interacts with. `blockEditingModes` aren't included as a user can't change\n * them.\n *\n * @param {Object} state Global application state.\n * @param {string} clientId ClientId of the block.\n *\n * @return {boolean} Whether the block is currently locked.\n */\nexport function isEditLockedBlock( state, clientId ) {\n\tconst attributes = getBlockAttributes( state, clientId );\n\treturn !! attributes?.lock?.edit;\n}\n\n/**\n * Returns whether a block is locked to prevent moving.\n *\n * This selector only reasons about templateLock and block lock, not associated features\n * like `blockEditingMode` that might prevent user modifications to a block.\n *\n * This distinction is important as this selector specifically drives the block lock UI\n * that a user interacts with. `blockEditingModes` are excluded as a user can't change\n * them.\n *\n * @param {Object} state Global application state.\n * @param {string} clientId ClientId of the block.\n *\n * @return {boolean} Whether the block is currently locked.\n */\nexport function isMoveLockedBlock( state, clientId ) {\n\tconst attributes = getBlockAttributes( state, clientId );\n\t// If a block explicitly has `move` set to `false`, it turns off\n\t// any locking that might be inherited from a parent.\n\tif ( attributes?.lock?.move !== undefined ) {\n\t\treturn !! attributes?.lock?.move;\n\t}\n\n\tconst rootClientId = getBlockRootClientId( state, clientId );\n\tconst templateLock = getTemplateLock( state, rootClientId );\n\n\t// While `contentOnly` templateLock does sometimes prevent moving, a user can't modify\n\t// this, so don't include it in this function. See the `canMoveBlock` selector\n\t// as an alternative.\n\treturn templateLock === 'all';\n}\n\n/**\n * Returns whether a block is locked to prevent removal.\n *\n * This selector only reasons about templateLock and block lock, not associated features\n * like `blockEditingMode` that might prevent user modifications to a block.\n *\n * This distinction is important as this selector specifically drives the block lock UI\n * that a user interacts with. `blockEditingModes` are excluded as a user can't change\n * them.\n *\n * @param {Object} state Global application state.\n * @param {string} clientId ClientId of the block.\n *\n * @return {boolean} Whether the block is currently locked.\n */\nexport function isRemoveLockedBlock( state, clientId ) {\n\tconst attributes = getBlockAttributes( state, clientId );\n\tif ( attributes?.lock?.remove !== undefined ) {\n\t\treturn !! attributes?.lock?.remove;\n\t}\n\n\tconst rootClientId = getBlockRootClientId( state, clientId );\n\tconst templateLock = getTemplateLock( state, rootClientId );\n\n\t// While `contentOnly` templateLock does sometimes prevent removal, a user can't modify\n\t// this, so don't include it in this function. See the `canRemoveBlock` selector\n\t// as an alternative.\n\treturn templateLock === 'all' || templateLock === 'insert';\n}\n\n/**\n * Returns whether a block is locked.\n *\n * This selector only reasons about templateLock and block lock, not associated features\n * like `blockEditingMode` that might prevent user modifications to a block.\n *\n * This distinction is important as this selector specifically drives the block lock UI\n * that a user interacts with. `blockEditingModes` are excluded as a user can't change\n * them.\n *\n * @param {Object} state Global application state.\n * @param {string} clientId ClientId of the block.\n *\n * @return {boolean} Whether the block is currently locked.\n */\nexport function isLockedBlock( state, clientId ) {\n\treturn (\n\t\tisEditLockedBlock( state, clientId ) ||\n\t\tisMoveLockedBlock( state, clientId ) ||\n\t\tisRemoveLockedBlock( state, clientId )\n\t);\n}\n\n/**\n * Returns whether the list view content panel popover is open.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the popover is open.\n */\nexport function isListViewContentPanelOpen( state ) {\n\treturn state.listViewContentPanelOpen;\n}\n\n/**\n * Returns whether a List View panel is opened.\n *\n * @param {Object} state Global application state.\n * @param {string} clientId Client ID of the block.\n *\n * @return {boolean} Whether the panel is opened.\n */\nexport function isListViewPanelOpened( state, clientId ) {\n\t// If allOpen flag is set, all panels are open\n\tif ( state.openedListViewPanels?.allOpen ) {\n\t\treturn true;\n\t}\n\treturn state.openedListViewPanels?.panels?.[ clientId ] === true;\n}\n\n/**\n * Returns the List View expand revision number.\n *\n * This counter is used in the ListView component's key prop to force remounting.\n *\n * @param {Object} state Global application state.\n *\n * @return {number} The expand revision number.\n */\nexport function getListViewExpandRevision( state ) {\n\treturn state.listViewExpandRevision || 0;\n}\n\n/**\n * Returns the client IDs for the viewport modal, or null if\n * the modal is not open.\n *\n * @param {Object} state Global application state.\n *\n * @return {string[]|null} Client IDs for the visibility modal, or null.\n */\nexport function getViewportModalClientIds( state ) {\n\treturn state.viewportModalClientIds;\n}\n\n/**\n * Returns the requested inspector tab state, if any.\n *\n * @param {Object} state Global application state.\n *\n * @return {Object|null} The requested tab state with tabName and options, or null if no request is pending.\n */\nexport function getRequestedInspectorTab( state ) {\n\treturn state.requestedInspectorTab;\n}\n\nconst DEFAULT_BLOCK_STYLE_STATE = {\n\tviewport: 'default',\n\tpseudo: 'default',\n};\n\n/**\n * Returns the selected style state for a block's style controls.\n *\n * @param {Object} state Global application state.\n * @param {string} clientId The block client ID.\n *\n * @return {Object} The selected block style state.\n */\nexport function getSelectedBlockStyleState( state, clientId ) {\n\tif ( state.selectedBlockStyleState?.clientId !== clientId ) {\n\t\treturn DEFAULT_BLOCK_STYLE_STATE;\n\t}\n\n\treturn state.selectedBlockStyleState.value ?? DEFAULT_BLOCK_STYLE_STATE;\n}\n\n/**\n * Returns whether a non-default style state is selected for a block.\n *\n * @param {Object} state Global application state.\n * @param {string} clientId The block client ID.\n *\n * @return {boolean} Whether a non-default block style state is selected.\n */\nexport function hasSelectedStyleState( state, clientId ) {\n\tconst selectedState = getSelectedBlockStyleState( state, clientId );\n\n\treturn (\n\t\tselectedState.viewport !== DEFAULT_BLOCK_STYLE_STATE.viewport ||\n\t\tselectedState.pseudo !== DEFAULT_BLOCK_STYLE_STATE.pseudo\n\t);\n}\n\n/**\n * Returns whether the selected style state is shown on the canvas.\n *\n * @param {Object} state Global application state.\n * @param {string} clientId The block client ID.\n *\n * @return {boolean} Whether the selected style state is shown on the canvas.\n */\nexport function isSelectedBlockStyleStateShownOnCanvas( state, clientId ) {\n\tif ( state.selectedBlockStyleState?.clientId !== clientId ) {\n\t\treturn true;\n\t}\n\n\treturn state.selectedBlockStyleState.showStateOnCanvas ?? true;\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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;AACnD,SAAO,MAAM;AACd;AAUO,SAAS,sBAAuB,OAAO,UAAW;AAExD,MAAK,MAAM,sBAAsB,SAAU;AAC1C,WAAO;AAAA,EACR;AACA,SAAO,MAAM,sBAAsB,SAAU,QAAS,MAAM;AAC7D;AAWO,SAAS,0BAA2B,OAAQ;AAClD,SAAO,MAAM,0BAA0B;AACxC;AAUO,SAAS,0BAA2B,OAAQ;AAClD,SAAO,MAAM;AACd;AASO,SAAS,yBAA0B,OAAQ;AACjD,SAAO,MAAM;AACd;AAEA,IAAM,4BAA4B;AAAA,EACjC,UAAU;AAAA,EACV,QAAQ;AACT;AAUO,SAAS,2BAA4B,OAAO,UAAW;AAC7D,MAAK,MAAM,yBAAyB,aAAa,UAAW;AAC3D,WAAO;AAAA,EACR;AAEA,SAAO,MAAM,wBAAwB,SAAS;AAC/C;AAUO,SAAS,sBAAuB,OAAO,UAAW;AACxD,QAAM,gBAAgB,2BAA4B,OAAO,QAAS;AAElE,SACC,cAAc,aAAa,0BAA0B,YACrD,cAAc,WAAW,0BAA0B;AAErD;AAUO,SAAS,uCAAwC,OAAO,UAAW;AACzE,MAAK,MAAM,yBAAyB,aAAa,UAAW;AAC3D,WAAO;AAAA,EACR;AAEA,SAAO,MAAM,wBAAwB,qBAAqB;AAC3D;",
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { createSelector, createRegistrySelector } from '@wordpress/data';\nimport {\n\thasBlockSupport,\n\tprivateApis as blocksPrivateApis,\n} from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport {\n\tgetBlockOrder,\n\tgetBlockParents,\n\tgetBlockEditingMode,\n\tgetBlockListSettings,\n\tgetSettings,\n\tcanInsertBlockType,\n\tgetBlockName,\n\tgetTemplateLock,\n\tgetClientIdsWithDescendants,\n\tgetBlockRootClientId,\n\tgetBlockAttributes,\n} from './selectors';\nimport {\n\tcheckAllowListRecursive,\n\tgetAllPatternsDependants,\n\tgetInsertBlockTypeDependants,\n\tgetGrammar,\n\tmapUserPattern,\n} from './utils';\nimport { STORE_NAME } from './constants';\nimport { unlock } from '../lock-unlock';\nimport {\n\tselectBlockPatternsKey,\n\treusableBlocksSelectKey,\n\tuserPatternCategoriesSelectKey,\n\tsectionRootClientIdKey,\n\tisIsolatedEditorKey,\n} from './private-keys';\nimport { BLOCK_VISIBILITY_VIEWPORTS } from '../components/block-visibility/constants';\n\nconst { isContentBlock } = unlock( blocksPrivateApis );\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\n/**\n * Determines if a container (clientId) allows insertion of blocks, considering contentOnly mode restrictions.\n *\n * @param {Object} state Editor state.\n * @param {string} blockName The block name to insert.\n * @param {string} rootClientId The client ID of the root container block.\n * @return {boolean} Whether the container allows insertion.\n */\nexport function isContainerInsertableToInContentOnlyMode(\n\tstate,\n\tblockName,\n\trootClientId\n) {\n\tconst isBlockContentBlock = isContentBlock( blockName );\n\tconst rootBlockName = getBlockName( state, rootClientId );\n\tconst isContainerContentBlock = isContentBlock( rootBlockName );\n\tconst isRootBlockMain = getSectionRootClientId( state ) === rootClientId;\n\n\t// In contentOnly mode, containers shouldn't be inserted into unless:\n\t// 1. they are a section root;\n\t// 2. they are a content block and the block to be inserted is also content.\n\treturn (\n\t\tisRootBlockMain || ( isContainerContentBlock && isBlockContentBlock )\n\t);\n}\n\nfunction getClientIdWithClientIdsTreeUnmemoized( state, clientId ) {\n\treturn {\n\t\tclientId,\n\t\tinnerBlocks: getClientIdsTreeUnmemoized( state, clientId ),\n\t};\n}\n\nfunction getClientIdsTreeUnmemoized( state, rootClientId = '' ) {\n\treturn getBlockOrder( state, rootClientId ).map( ( clientId ) =>\n\t\tgetClientIdWithClientIdsTreeUnmemoized( state, clientId )\n\t);\n}\n\n/**\n * Returns a stripped down block object containing only its client ID,\n * and its inner blocks' client IDs.\n *\n * @param {Object} state Editor state.\n * @param {string} clientId Client ID of the block to get.\n *\n * @return {Object} Client IDs of the post blocks.\n */\nexport const getClientIdWithClientIdsTree = createSelector(\n\tgetClientIdWithClientIdsTreeUnmemoized,\n\t( state ) => [ state.blocks.order ]\n);\n\n/**\n * Returns the block tree represented in the block-editor store from the\n * given root, consisting of stripped down block objects containing only\n * their client IDs, and their inner blocks' client IDs.\n *\n * @param {Object} state Editor state.\n * @param {?string} rootClientId Optional root client ID of block list.\n *\n * @return {Object[]} Client IDs of the post blocks.\n */\nexport const getClientIdsTree = createSelector(\n\tgetClientIdsTreeUnmemoized,\n\t( state ) => [ state.blocks.order ]\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 = createRegistrySelector( () =>\n\tcreateSelector( getEnabledClientIdsTreeUnmemoized, ( state ) => [\n\t\tstate.blocks.order,\n\t\tstate.derivedBlockEditingModes,\n\t\tstate.blocks.blockEditingModes,\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.blocks.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 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( select )( state, rootClientId ),\n\t\t]\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[ userPatternCategoriesSelectKey ]?.(\n\t\t\t\t\t\tselect\n\t\t\t\t\t) ?? state.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[ userPatternCategoriesSelectKey ]?.(\n\t\t\t\t\t\t\tselect\n\t\t\t\t\t\t) ?? state.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\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 * Checks whether a block meets the raw criteria to be a section block,\n * without considering contextual factors like nesting or the edited\n * content-only section. Used internally by `isSectionBlock` and\n * `getParentSectionBlock` to avoid circular calls between them.\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 candidate section block.\n */\nfunction isSectionBlockCandidate( state, clientId ) {\n\tconst blockName = getBlockName( state, clientId );\n\tif ( blockName === 'core/block' ) {\n\t\treturn true;\n\t}\n\n\tconst attributes = getBlockAttributes( state, clientId );\n\tconst isTemplatePart = blockName === 'core/template-part';\n\n\t// When in an isolated editing context (e.g., editing a template part or pattern directly),\n\t// don't treat nested unsynced patterns as section blocks.\n\tconst isIsolatedEditor = state.settings?.[ isIsolatedEditorKey ];\n\n\tconst disableContentOnlyForUnsyncedPatterns =\n\t\tstate.settings?.disableContentOnlyForUnsyncedPatterns;\n\n\tconst disableContentOnlyForTemplateParts =\n\t\tstate.settings?.disableContentOnlyForTemplateParts;\n\n\tif (\n\t\t( ( ! disableContentOnlyForUnsyncedPatterns &&\n\t\t\tattributes?.metadata?.patternName ) ||\n\t\t\t( isTemplatePart && ! disableContentOnlyForTemplateParts ) ) &&\n\t\t! isIsolatedEditor\n\t) {\n\t\treturn true;\n\t}\n\n\t// TemplateLock cascades to all inner parent blocks. Only the top-level\n\t// block that's contentOnly templateLocked is the true contentLocker,\n\t// all the others are mere imitators.\n\tconst hasContentOnlyTemplateLock =\n\t\tgetTemplateLock( state, clientId ) === 'contentOnly';\n\tconst rootClientId = getBlockRootClientId( state, clientId );\n\tconst hasRootContentOnlyTemplateLock =\n\t\tgetTemplateLock( state, rootClientId ) === 'contentOnly';\n\tif ( hasContentOnlyTemplateLock && ! hasRootContentOnlyTemplateLock ) {\n\t\treturn true;\n\t}\n\n\treturn false;\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 a contentOnly section.\n */\nexport const getParentSectionBlock = ( state, clientId ) => {\n\t// If this block is within the edited content-only section,\n\t// it has no parent section — it's temporarily fully editable.\n\tif ( isWithinEditedContentOnlySection( state, clientId ) ) {\n\t\treturn undefined;\n\t}\n\n\tlet current = clientId;\n\tlet result;\n\n\t// If sections are nested, return the top level section block.\n\t// Don't return early.\n\twhile ( ( current = state.blocks.parents.get( current ) ) ) {\n\t\tif ( isSectionBlockCandidate( state, current ) ) {\n\t\t\tresult = current;\n\t\t}\n\t}\n\treturn result;\n};\n\n/**\n * Returns whether the block is a contentOnly section.\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 contentOnly section.\n */\nexport function isSectionBlock( state, clientId ) {\n\t// isWithinEditedContentOnlySection -\n\t// If the section is being edited or a parent section is being edited,\n\t// this block is temporarily not considered a section.\n\t//\n\t// getParentSectionBlock -\n\t// Only the top level section is considered the section,\n\t// a nested section is managed by its parent section.\n\tif (\n\t\tisWithinEditedContentOnlySection( state, clientId ) ||\n\t\tgetParentSectionBlock( state, clientId )\n\t) {\n\t\treturn false;\n\t}\n\n\treturn isSectionBlockCandidate( state, clientId );\n}\n\n/**\n * Retrieves the client ID of the block that is a contentOnly section but is\n * currently being temporarily edited (contentOnly is deactivated).\n *\n * @param {Object} state Global application state.\n *\n * @return {?string} The client ID of the block being temporarily edited.\n */\nexport function getEditedContentOnlySection( state ) {\n\treturn state.editedContentOnlySection;\n}\n\nexport function isWithinEditedContentOnlySection( state, clientId ) {\n\tif ( ! state.editedContentOnlySection ) {\n\t\treturn false;\n\t}\n\n\tif ( state.editedContentOnlySection === clientId ) {\n\t\treturn true;\n\t}\n\n\tlet current = clientId;\n\twhile ( ( current = state.blocks.parents.get( current ) ) ) {\n\t\tif ( state.editedContentOnlySection === current ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\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\n/**\n * Returns true if the block is hidden anywhere, or false otherwise.\n *\n * This selector checks whether a block has visibility metadata set that would\n * hide it at any viewport or everywhere. It's useful for flagging blocks that\n * have visibility restrictions.\n *\n * A block is considered hidden anywhere if:\n * - blockVisibility is false (hidden everywhere)\n * - blockVisibility.viewport has any viewport set to false (hidden at specific screen sizes)\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 hidden anywhere.\n */\nexport const isBlockHiddenAnywhere = ( state, clientId ) => {\n\tconst blockName = getBlockName( state, clientId );\n\tif ( ! hasBlockSupport( blockName, 'visibility', true ) ) {\n\t\treturn false;\n\t}\n\tconst attributes = state.blocks.attributes.get( clientId );\n\tconst blockVisibility = attributes?.metadata?.blockVisibility;\n\n\tif ( blockVisibility === false ) {\n\t\treturn true;\n\t}\n\n\tif (\n\t\ttypeof blockVisibility?.viewport === 'object' &&\n\t\tblockVisibility?.viewport !== null\n\t) {\n\t\t// Check if the block is hidden at any viewport.\n\t\treturn Object.values( BLOCK_VISIBILITY_VIEWPORTS ).some(\n\t\t\t( viewport ) =>\n\t\t\t\tblockVisibility?.viewport?.[ viewport.key ] === false\n\t\t);\n\t}\n\treturn false;\n};\n\n/**\n * Returns true if the block is hidden everywhere (blockVisibility is false).\n *\n * A block is considered hidden everywhere when blockVisibility is explicitly\n * set to false, which means it's hidden on all viewports.\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 hidden everywhere.\n */\nexport const isBlockHiddenEverywhere = ( state, clientId ) => {\n\tconst blockName = getBlockName( state, clientId );\n\tif ( ! hasBlockSupport( blockName, 'visibility', true ) ) {\n\t\treturn false;\n\t}\n\tconst attributes = state.blocks.attributes.get( clientId );\n\tconst blockVisibility = attributes?.metadata?.blockVisibility;\n\n\tif ( blockVisibility === false ) {\n\t\treturn true;\n\t}\n\treturn false;\n};\n\n/**\n * Returns true if any parent block (immediate or further up the chain) is hidden everywhere.\n *\n * Checks all parent blocks in the hierarchy and returns true if any of them\n * is hidden everywhere.\n *\n * @param {Object} state Global application state.\n * @param {string} clientId Client ID of the block.\n *\n * @return {boolean} Whether any parent block is hidden everywhere.\n */\nexport const isBlockParentHiddenEverywhere = ( state, clientId ) => {\n\tconst parents = getBlockParents( state, clientId );\n\treturn parents.some( ( parentId ) =>\n\t\tisBlockHiddenEverywhere( state, parentId )\n\t);\n};\n\n/**\n * Returns true if the block is hidden at the given viewport.\n *\n * A block is considered hidden at a viewport if:\n * - blockVisibility is false (hidden everywhere)\n * - blockVisibility is an object with the specified viewport set to false\n *\n * @param {Object} state Global application state.\n * @param {string} clientId Client ID of the block.\n * @param {string} viewport Viewport to check ('desktop', 'tablet', 'mobile').\n *\n * @return {boolean} Whether the block is hidden at the viewport.\n */\nexport const isBlockHiddenAtViewport = ( state, clientId, viewport ) => {\n\tif ( isBlockHiddenEverywhere( state, clientId ) ) {\n\t\treturn true;\n\t}\n\n\tconst attributes = state.blocks.attributes.get( clientId );\n\tconst blockVisibilityViewport =\n\t\tattributes?.metadata?.blockVisibility?.viewport;\n\tif (\n\t\ttypeof blockVisibilityViewport === 'object' &&\n\t\tblockVisibilityViewport !== null &&\n\t\ttypeof viewport === 'string'\n\t) {\n\t\treturn blockVisibilityViewport?.[ viewport.toLowerCase() ] === false;\n\t}\n\treturn false;\n};\n\n/**\n * Returns true if any parent block (immediate or further up the chain) is hidden at the given viewport.\n *\n * Checks all parent blocks in the hierarchy and returns true if any of them\n * is hidden at the specified viewport.\n *\n * @param {Object} state Global application state.\n * @param {string} clientId Client ID of the block.\n * @param {string} viewport Viewport to check ('desktop', 'tablet', 'mobile').\n *\n * @return {boolean} Whether any parent block is hidden at the viewport.\n */\nexport const isBlockParentHiddenAtViewport = ( state, clientId, viewport ) => {\n\tconst parents = getBlockParents( state, clientId );\n\treturn parents.some( ( parentId ) =>\n\t\tisBlockHiddenAtViewport( state, parentId, viewport )\n\t);\n};\n\n/**\n * Returns true if there is a spotlighted block.\n *\n * The spotlight is also active when a contentOnly section is being edited, the selector\n * also returns true if this is the case.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the block is currently spotlighted.\n */\nexport function hasBlockSpotlight( state ) {\n\treturn !! state.hasBlockSpotlight || !! state.editedContentOnlySection;\n}\n\n/**\n * Returns whether a block is locked to prevent editing.\n *\n * This selector only reasons about block lock, not associated features\n * like `blockEditingMode` that might prevent user modifications to a block.\n * Currently there's also no way to prevent editing via `templateLock`.\n *\n * This distinction is important as this selector specifically drives the block lock UI\n * that a user interacts with. `blockEditingModes` aren't included as a user can't change\n * them.\n *\n * @param {Object} state Global application state.\n * @param {string} clientId ClientId of the block.\n *\n * @return {boolean} Whether the block is currently locked.\n */\nexport function isEditLockedBlock( state, clientId ) {\n\tconst attributes = getBlockAttributes( state, clientId );\n\treturn !! attributes?.lock?.edit;\n}\n\n/**\n * Returns whether a block is locked to prevent moving.\n *\n * This selector only reasons about templateLock and block lock, not associated features\n * like `blockEditingMode` that might prevent user modifications to a block.\n *\n * This distinction is important as this selector specifically drives the block lock UI\n * that a user interacts with. `blockEditingModes` are excluded as a user can't change\n * them.\n *\n * @param {Object} state Global application state.\n * @param {string} clientId ClientId of the block.\n *\n * @return {boolean} Whether the block is currently locked.\n */\nexport function isMoveLockedBlock( state, clientId ) {\n\tconst attributes = getBlockAttributes( state, clientId );\n\t// If a block explicitly has `move` set to `false`, it turns off\n\t// any locking that might be inherited from a parent.\n\tif ( attributes?.lock?.move !== undefined ) {\n\t\treturn !! attributes?.lock?.move;\n\t}\n\n\tconst rootClientId = getBlockRootClientId( state, clientId );\n\tconst templateLock = getTemplateLock( state, rootClientId );\n\n\t// While `contentOnly` templateLock does sometimes prevent moving, a user can't modify\n\t// this, so don't include it in this function. See the `canMoveBlock` selector\n\t// as an alternative.\n\treturn templateLock === 'all';\n}\n\n/**\n * Returns whether a block is locked to prevent removal.\n *\n * This selector only reasons about templateLock and block lock, not associated features\n * like `blockEditingMode` that might prevent user modifications to a block.\n *\n * This distinction is important as this selector specifically drives the block lock UI\n * that a user interacts with. `blockEditingModes` are excluded as a user can't change\n * them.\n *\n * @param {Object} state Global application state.\n * @param {string} clientId ClientId of the block.\n *\n * @return {boolean} Whether the block is currently locked.\n */\nexport function isRemoveLockedBlock( state, clientId ) {\n\tconst attributes = getBlockAttributes( state, clientId );\n\tif ( attributes?.lock?.remove !== undefined ) {\n\t\treturn !! attributes?.lock?.remove;\n\t}\n\n\tconst rootClientId = getBlockRootClientId( state, clientId );\n\tconst templateLock = getTemplateLock( state, rootClientId );\n\n\t// While `contentOnly` templateLock does sometimes prevent removal, a user can't modify\n\t// this, so don't include it in this function. See the `canRemoveBlock` selector\n\t// as an alternative.\n\treturn templateLock === 'all' || templateLock === 'insert';\n}\n\n/**\n * Returns whether a block is locked.\n *\n * This selector only reasons about templateLock and block lock, not associated features\n * like `blockEditingMode` that might prevent user modifications to a block.\n *\n * This distinction is important as this selector specifically drives the block lock UI\n * that a user interacts with. `blockEditingModes` are excluded as a user can't change\n * them.\n *\n * @param {Object} state Global application state.\n * @param {string} clientId ClientId of the block.\n *\n * @return {boolean} Whether the block is currently locked.\n */\nexport function isLockedBlock( state, clientId ) {\n\treturn (\n\t\tisEditLockedBlock( state, clientId ) ||\n\t\tisMoveLockedBlock( state, clientId ) ||\n\t\tisRemoveLockedBlock( state, clientId )\n\t);\n}\n\n/**\n * Returns whether the list view content panel popover is open.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the popover is open.\n */\nexport function isListViewContentPanelOpen( state ) {\n\treturn state.listViewContentPanelOpen;\n}\n\n/**\n * Returns whether a List View panel is opened.\n *\n * @param {Object} state Global application state.\n * @param {string} clientId Client ID of the block.\n *\n * @return {boolean} Whether the panel is opened.\n */\nexport function isListViewPanelOpened( state, clientId ) {\n\t// If allOpen flag is set, all panels are open\n\tif ( state.openedListViewPanels?.allOpen ) {\n\t\treturn true;\n\t}\n\treturn state.openedListViewPanels?.panels?.[ clientId ] === true;\n}\n\n/**\n * Returns the List View expand revision number.\n *\n * This counter is used in the ListView component's key prop to force remounting.\n *\n * @param {Object} state Global application state.\n *\n * @return {number} The expand revision number.\n */\nexport function getListViewExpandRevision( state ) {\n\treturn state.listViewExpandRevision || 0;\n}\n\n/**\n * Returns whether a block instance participates in List View-specific UI for\n * its inner blocks.\n *\n * Intentionally private: this is the derived participation logic (block type\n * `listView` support and the `core/navigation` special case) shared by the List\n * View consumers. A `listView`-supporting block drops out when it has no inner\n * blocks and its `allowedBlocks` (`[]` or `false`) permits no block: the nested\n * List View panel would render no rows and no appender, so it is hidden rather\n * than shown empty. This is a signal, not a guarantee — a child naming this\n * block as its `parent` stays insertable regardless (see `canInsertBlockType`);\n * that edge case is accepted to keep the check cheap. Keeping the read internal\n * lets this computation evolve without a back-compat commitment.\n *\n * @param {Object} state Global application state.\n * @param {string} clientId Client ID of the block.\n *\n * @return {boolean} Whether the block participates in List View-specific UI.\n */\nexport function shouldRenderBlockListView( state, clientId ) {\n\tconst blockName = getBlockName( state, clientId );\n\n\t// The navigation block always participates; its List View is core to how it\n\t// is edited, regardless of how its menu is locked or populated.\n\tif ( blockName === 'core/navigation' ) {\n\t\treturn true;\n\t}\n\n\tif ( ! hasBlockSupport( blockName, 'listView' ) ) {\n\t\treturn false;\n\t}\n\n\t// `allowedBlocks` permits no block when it is `[]` or `false`; an unset value\n\t// is unrestricted and is intentionally not matched.\n\tconst allowedBlocks = getBlockListSettings(\n\t\tstate,\n\t\tclientId\n\t)?.allowedBlocks;\n\tconst isEmptyAndNoAllowedBlocks =\n\t\tgetBlockOrder( state, clientId ).length === 0 &&\n\t\t( allowedBlocks === false ||\n\t\t\t( Array.isArray( allowedBlocks ) && allowedBlocks.length === 0 ) );\n\n\treturn ! isEmptyAndNoAllowedBlocks;\n}\n\n/**\n * Returns the client IDs for the viewport modal, or null if\n * the modal is not open.\n *\n * @param {Object} state Global application state.\n *\n * @return {string[]|null} Client IDs for the visibility modal, or null.\n */\nexport function getViewportModalClientIds( state ) {\n\treturn state.viewportModalClientIds;\n}\n\n/**\n * Returns the requested inspector tab state, if any.\n *\n * @param {Object} state Global application state.\n *\n * @return {Object|null} The requested tab state with tabName and options, or null if no request is pending.\n */\nexport function getRequestedInspectorTab( state ) {\n\treturn state.requestedInspectorTab;\n}\n\nconst DEFAULT_BLOCK_STYLE_STATE = {\n\tviewport: 'default',\n\tpseudo: 'default',\n};\n\n/**\n * Returns the selected style state for a block's style controls.\n *\n * @param {Object} state Global application state.\n * @param {string} clientId The block client ID.\n *\n * @return {Object} The selected block style state.\n */\nexport function getSelectedBlockStyleState( state, clientId ) {\n\tif ( state.selectedBlockStyleState?.clientId !== clientId ) {\n\t\treturn DEFAULT_BLOCK_STYLE_STATE;\n\t}\n\n\treturn state.selectedBlockStyleState.value ?? DEFAULT_BLOCK_STYLE_STATE;\n}\n\n/**\n * Returns whether a non-default style state is selected for a block.\n *\n * @param {Object} state Global application state.\n * @param {string} clientId The block client ID.\n *\n * @return {boolean} Whether a non-default block style state is selected.\n */\nexport function hasSelectedStyleState( state, clientId ) {\n\tconst selectedState = getSelectedBlockStyleState( state, clientId );\n\n\treturn (\n\t\tselectedState.viewport !== DEFAULT_BLOCK_STYLE_STATE.viewport ||\n\t\tselectedState.pseudo !== DEFAULT_BLOCK_STYLE_STATE.pseudo\n\t);\n}\n\n/**\n * Returns whether the selected style state is shown on the canvas.\n *\n * @param {Object} state Global application state.\n * @param {string} clientId The block client ID.\n *\n * @return {boolean} Whether the selected style state is shown on the canvas.\n */\nexport function isSelectedBlockStyleStateShownOnCanvas( state, clientId ) {\n\tif ( state.selectedBlockStyleState?.clientId !== clientId ) {\n\t\treturn true;\n\t}\n\n\treturn state.selectedBlockStyleState.showStateOnCanvas ??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IA,QAAM,oBAAgB;AAAA,IACrB;AAAA,IACA;AAAA,EACD,GAAG;AACH,QAAM,gCACL,gCAAe,OAAO,QAAS,EAAE,WAAW,MAC1C,kBAAkB,SACjB,MAAM,QAAS,aAAc,KAAK,cAAc,WAAW;AAE/D,SAAO,CAAE;AACV;AAUO,SAAS,0BAA2B,OAAQ;AAClD,SAAO,MAAM;AACd;AASO,SAAS,yBAA0B,OAAQ;AACjD,SAAO,MAAM;AACd;AAEA,IAAM,4BAA4B;AAAA,EACjC,UAAU;AAAA,EACV,QAAQ;AACT;AAUO,SAAS,2BAA4B,OAAO,UAAW;AAC7D,MAAK,MAAM,yBAAyB,aAAa,UAAW;AAC3D,WAAO;AAAA,EACR;AAEA,SAAO,MAAM,wBAAwB,SAAS;AAC/C;AAUO,SAAS,sBAAuB,OAAO,UAAW;AACxD,QAAM,gBAAgB,2BAA4B,OAAO,QAAS;AAElE,SACC,cAAc,aAAa,0BAA0B,YACrD,cAAc,WAAW,0BAA0B;AAErD;AAUO,SAAS,uCAAwC,OAAO,UAAW;AACzE,MAAK,MAAM,yBAAyB,aAAa,UAAW;AAC3D,WAAO;AAAA,EACR;AAEA,SAAO,MAAM,wBAAwB,qBAAqB;AAC3D;",
6
6
  "names": ["import_constants", "blocksPrivateApis", "getAllPatterns"]
7
7
  }
@@ -329,21 +329,29 @@ var withBlockTree = (reducer) => (state = {}, action) => {
329
329
  };
330
330
  function withPersistentBlockChange(reducer) {
331
331
  let lastAction;
332
- let markNextChangeAsNotPersistent = false;
332
+ let nextHistoryMode;
333
333
  return (state, action) => {
334
334
  const nextState = reducer(state, action);
335
- const wasMarkedAsNotPersistent = markNextChangeAsNotPersistent;
336
- markNextChangeAsNotPersistent = action.type === "MARK_NEXT_CHANGE_AS_NOT_PERSISTENT";
337
- const isExplicitPersistentChange = action.type === "MARK_LAST_CHANGE_AS_PERSISTENT" || wasMarkedAsNotPersistent;
335
+ const pendingHistoryMode = nextHistoryMode;
336
+ nextHistoryMode = action.type === "MARK_NEXT_CHANGE_AS_NOT_PERSISTENT" ? action.history ?? "merge" : void 0;
337
+ const isExplicitPersistentChange = action.type === "MARK_LAST_CHANGE_AS_PERSISTENT" || pendingHistoryMode;
338
338
  if (state === nextState && !isExplicitPersistentChange) {
339
339
  if (state.isPersistentChange !== void 0) {
340
340
  return state;
341
341
  }
342
342
  return { ...nextState, isPersistentChange: true };
343
343
  }
344
- const isPersistentChange = isExplicitPersistentChange ? !wasMarkedAsNotPersistent : !isUpdatingSameBlockAttribute(action, lastAction);
344
+ const isPersistentChange = isExplicitPersistentChange ? !pendingHistoryMode : !isUpdatingSameBlockAttribute(action, lastAction);
345
345
  lastAction = action;
346
- return { ...nextState, isPersistentChange };
346
+ if (pendingHistoryMode === "ignore") {
347
+ return {
348
+ ...nextState,
349
+ isPersistentChange,
350
+ lastBlockChangeHistoryMode: "ignore"
351
+ };
352
+ }
353
+ const { lastBlockChangeHistoryMode, ...blockChange } = nextState;
354
+ return { ...blockChange, isPersistentChange };
347
355
  };
348
356
  }
349
357
  function withIgnoredBlockChange(reducer) {