@wordpress/block-editor 15.22.1 → 16.0.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 (700) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/build/autocompleters/block.cjs +10 -2
  3. package/build/autocompleters/block.cjs.map +2 -2
  4. package/build/components/background-image-control/index.cjs +0 -2
  5. package/build/components/background-image-control/index.cjs.map +2 -2
  6. package/build/components/block-canvas/index.cjs +6 -1
  7. package/build/components/block-canvas/index.cjs.map +2 -2
  8. package/build/components/block-controls/groups.cjs +3 -1
  9. package/build/components/block-controls/groups.cjs.map +2 -2
  10. package/build/components/block-edit/edit.cjs +10 -18
  11. package/build/components/block-edit/edit.cjs.map +2 -2
  12. package/build/components/block-inspector/edit-contents.cjs +3 -0
  13. package/build/components/block-inspector/edit-contents.cjs.map +3 -3
  14. package/build/components/block-inspector/index.cjs +18 -36
  15. package/build/components/block-inspector/index.cjs.map +2 -2
  16. package/build/components/block-list/block-invalid-warning.cjs +8 -19
  17. package/build/components/block-list/block-invalid-warning.cjs.map +2 -2
  18. package/build/components/block-list/block.cjs +9 -3
  19. package/build/components/block-list/block.cjs.map +3 -3
  20. package/build/components/block-list/index.cjs +1 -3
  21. package/build/components/block-list/index.cjs.map +2 -2
  22. package/build/components/block-list/use-block-props/index.cjs +3 -1
  23. package/build/components/block-list/use-block-props/index.cjs.map +2 -2
  24. package/build/components/block-list/use-block-props/use-focus-first-element.cjs +9 -4
  25. package/build/components/block-list/use-block-props/use-focus-first-element.cjs.map +2 -2
  26. package/build/components/block-list/use-block-props/use-focus-handler.cjs +12 -4
  27. package/build/components/block-list/use-block-props/use-focus-handler.cjs.map +2 -2
  28. package/build/components/block-styles/use-styles-for-block.cjs +2 -1
  29. package/build/components/block-styles/use-styles-for-block.cjs.map +2 -2
  30. package/build/components/block-title/use-block-display-title.cjs +7 -2
  31. package/build/components/block-title/use-block-display-title.cjs.map +2 -2
  32. package/build/components/block-toolbar/block-toolbar-icon.cjs +10 -14
  33. package/build/components/block-toolbar/block-toolbar-icon.cjs.map +2 -2
  34. package/build/components/block-toolbar/index.cjs +43 -24
  35. package/build/components/block-toolbar/index.cjs.map +2 -2
  36. package/build/components/block-tools/index.cjs +7 -2
  37. package/build/components/block-tools/index.cjs.map +2 -2
  38. package/build/components/block-variation-transforms/index.cjs +0 -1
  39. package/build/components/block-variation-transforms/index.cjs.map +2 -2
  40. package/build/components/block-visibility/modal.cjs +20 -6
  41. package/build/components/block-visibility/modal.cjs.map +2 -2
  42. package/build/components/block-visibility/use-block-visibility.cjs +16 -6
  43. package/build/components/block-visibility/use-block-visibility.cjs.map +3 -3
  44. package/build/components/block-visibility/utils.cjs +15 -2
  45. package/build/components/block-visibility/utils.cjs.map +3 -3
  46. package/build/components/block-visibility/viewport-menu-item.cjs +7 -1
  47. package/build/components/block-visibility/viewport-menu-item.cjs.map +2 -2
  48. package/build/components/block-visibility/viewport-toolbar.cjs +5 -0
  49. package/build/components/block-visibility/viewport-toolbar.cjs.map +2 -2
  50. package/build/components/block-visibility/viewport-visibility-info.cjs +5 -1
  51. package/build/components/block-visibility/viewport-visibility-info.cjs.map +2 -2
  52. package/build/components/child-layout-control/index.cjs +0 -6
  53. package/build/components/child-layout-control/index.cjs.map +2 -2
  54. package/build/components/colors-gradients/control.cjs +5 -5
  55. package/build/components/colors-gradients/control.cjs.map +2 -2
  56. package/build/components/date-format-picker/index.cjs +0 -1
  57. package/build/components/date-format-picker/index.cjs.map +2 -2
  58. package/build/components/dimensions-tool/aspect-ratio-tool.cjs +1 -2
  59. package/build/components/dimensions-tool/aspect-ratio-tool.cjs.map +2 -2
  60. package/build/components/dimensions-tool/scale-tool.cjs +0 -1
  61. package/build/components/dimensions-tool/scale-tool.cjs.map +2 -2
  62. package/build/components/dimensions-tool/width-height-tool.cjs +2 -4
  63. package/build/components/dimensions-tool/width-height-tool.cjs.map +2 -2
  64. package/build/components/font-appearance-control/index.cjs +6 -25
  65. package/build/components/font-appearance-control/index.cjs.map +3 -3
  66. package/build/components/font-family/index.cjs +6 -15
  67. package/build/components/font-family/index.cjs.map +3 -3
  68. package/build/components/font-sizes/font-size-picker.cjs +1 -2
  69. package/build/components/font-sizes/font-size-picker.cjs.map +2 -2
  70. package/build/components/global-styles/border-panel.cjs +0 -1
  71. package/build/components/global-styles/border-panel.cjs.map +2 -2
  72. package/build/components/global-styles/dimensions-panel.cjs +0 -3
  73. package/build/components/global-styles/dimensions-panel.cjs.map +2 -2
  74. package/build/components/global-styles/state-control-badges.cjs +39 -3
  75. package/build/components/global-styles/state-control-badges.cjs.map +2 -2
  76. package/build/components/global-styles/typography-panel.cjs +4 -11
  77. package/build/components/global-styles/typography-panel.cjs.map +2 -2
  78. package/build/components/height-control/index.cjs +0 -2
  79. package/build/components/height-control/index.cjs.map +2 -2
  80. package/build/components/html-element-control/index.cjs +0 -1
  81. package/build/components/html-element-control/index.cjs.map +2 -2
  82. package/build/components/image-editor/index.cjs +5 -0
  83. package/build/components/image-editor/index.cjs.map +3 -3
  84. package/build/components/image-editor/zoom-dropdown.cjs +0 -1
  85. package/build/components/image-editor/zoom-dropdown.cjs.map +2 -2
  86. package/build/components/image-size-control/index.cjs +3 -7
  87. package/build/components/image-size-control/index.cjs.map +2 -2
  88. package/build/components/inner-content/index.cjs +107 -0
  89. package/build/components/inner-content/index.cjs.map +7 -0
  90. package/build/components/inserter/hooks/use-block-types-state.cjs +10 -2
  91. package/build/components/inserter/hooks/use-block-types-state.cjs.map +2 -2
  92. package/build/components/inserter/media-tab/hooks.cjs +67 -12
  93. package/build/components/inserter/media-tab/hooks.cjs.map +2 -2
  94. package/build/components/inserter/media-tab/media-list.cjs +3 -1
  95. package/build/components/inserter/media-tab/media-list.cjs.map +2 -2
  96. package/build/components/inserter/media-tab/media-panel.cjs +287 -28
  97. package/build/components/inserter/media-tab/media-panel.cjs.map +3 -3
  98. package/build/components/inserter/media-tab/media-preview.cjs +32 -17
  99. package/build/components/inserter/media-tab/media-preview.cjs.map +2 -2
  100. package/build/components/inserter/media-tab/media-tab.cjs +26 -6
  101. package/build/components/inserter/media-tab/media-tab.cjs.map +2 -2
  102. package/build/components/inserter/mobile-tab-navigation.cjs +6 -1
  103. package/build/components/inserter/mobile-tab-navigation.cjs.map +2 -2
  104. package/build/components/inserter/no-results.cjs +2 -2
  105. package/build/components/inserter/no-results.cjs.map +2 -2
  106. package/build/components/inserter/preview-panel.cjs +2 -1
  107. package/build/components/inserter/preview-panel.cjs.map +2 -2
  108. package/build/components/inserter-list-item/index.cjs +8 -2
  109. package/build/components/inserter-list-item/index.cjs.map +2 -2
  110. package/build/components/keyboard-shortcuts/index.cjs +19 -11
  111. package/build/components/keyboard-shortcuts/index.cjs.map +2 -2
  112. package/build/components/letter-spacing-control/index.cjs +0 -24
  113. package/build/components/letter-spacing-control/index.cjs.map +3 -3
  114. package/build/components/line-height-control/index.cjs +6 -22
  115. package/build/components/line-height-control/index.cjs.map +3 -3
  116. package/build/components/list-view/block-select-button.cjs +90 -84
  117. package/build/components/list-view/block-select-button.cjs.map +2 -2
  118. package/build/components/list-view/block.cjs +61 -21
  119. package/build/components/list-view/block.cjs.map +2 -2
  120. package/build/components/list-view/expander.cjs +1 -1
  121. package/build/components/list-view/expander.cjs.map +2 -2
  122. package/build/components/list-view/use-list-view-client-ids.cjs +2 -2
  123. package/build/components/list-view/use-list-view-client-ids.cjs.map +2 -2
  124. package/build/components/media-placeholder/index.cjs +0 -1
  125. package/build/components/media-placeholder/index.cjs.map +2 -2
  126. package/build/components/observe-typing/index.cjs +4 -3
  127. package/build/components/observe-typing/index.cjs.map +2 -2
  128. package/build/components/preset-input-control/custom-value-controls.cjs +1 -3
  129. package/build/components/preset-input-control/custom-value-controls.cjs.map +2 -2
  130. package/build/components/preset-input-control/index.cjs +1 -3
  131. package/build/components/preset-input-control/index.cjs.map +2 -2
  132. package/build/components/resolution-tool/index.cjs +1 -2
  133. package/build/components/resolution-tool/index.cjs.map +2 -2
  134. package/build/components/rich-text/event-listeners/before-input-rules.cjs +3 -4
  135. package/build/components/rich-text/event-listeners/before-input-rules.cjs.map +3 -3
  136. package/build/components/rich-text/event-listeners/delete.cjs +2 -3
  137. package/build/components/rich-text/event-listeners/delete.cjs.map +3 -3
  138. package/build/components/rich-text/event-listeners/enter.cjs +3 -2
  139. package/build/components/rich-text/event-listeners/enter.cjs.map +3 -3
  140. package/build/components/rich-text/event-listeners/input-events.cjs +3 -3
  141. package/build/components/rich-text/event-listeners/input-events.cjs.map +3 -3
  142. package/build/components/rich-text/event-listeners/input-rules.cjs +3 -4
  143. package/build/components/rich-text/event-listeners/input-rules.cjs.map +3 -3
  144. package/build/components/rich-text/event-listeners/insert-replacement-text.cjs +3 -3
  145. package/build/components/rich-text/event-listeners/insert-replacement-text.cjs.map +3 -3
  146. package/build/components/rich-text/event-listeners/paste-handler.cjs +2 -1
  147. package/build/components/rich-text/event-listeners/paste-handler.cjs.map +3 -3
  148. package/build/components/rich-text/event-listeners/remove-browser-shortcuts.cjs +3 -3
  149. package/build/components/rich-text/event-listeners/remove-browser-shortcuts.cjs.map +3 -3
  150. package/build/components/rich-text/event-listeners/shortcuts.cjs +3 -3
  151. package/build/components/rich-text/event-listeners/shortcuts.cjs.map +3 -3
  152. package/build/components/rich-text/event-listeners/undo-automatic-change.cjs +3 -3
  153. package/build/components/rich-text/event-listeners/undo-automatic-change.cjs.map +3 -3
  154. package/build/components/rich-text/index.cjs +66 -17
  155. package/build/components/rich-text/index.cjs.map +2 -2
  156. package/build/components/text-alignment-control/index.cjs +0 -1
  157. package/build/components/text-alignment-control/index.cjs.map +2 -2
  158. package/build/components/text-decoration-control/index.cjs +0 -1
  159. package/build/components/text-decoration-control/index.cjs.map +2 -2
  160. package/build/components/text-indent-control/index.cjs +0 -8
  161. package/build/components/text-indent-control/index.cjs.map +2 -2
  162. package/build/components/text-transform-control/index.cjs +0 -1
  163. package/build/components/text-transform-control/index.cjs.map +2 -2
  164. package/build/components/typewriter/index.cjs +129 -136
  165. package/build/components/typewriter/index.cjs.map +3 -3
  166. package/build/components/use-block-commands/index.cjs +21 -17
  167. package/build/components/use-block-commands/index.cjs.map +2 -2
  168. package/build/components/use-block-display-information/index.cjs +10 -8
  169. package/build/components/use-block-display-information/index.cjs.map +2 -2
  170. package/build/components/use-on-block-drop/index.cjs +3 -7
  171. package/build/components/use-on-block-drop/index.cjs.map +2 -2
  172. package/build/components/use-resize-canvas/index.cjs +16 -53
  173. package/build/components/use-resize-canvas/index.cjs.map +3 -3
  174. package/build/components/writing-flow/index.cjs +12 -1
  175. package/build/components/writing-flow/index.cjs.map +3 -3
  176. package/build/components/writing-flow/use-arrow-nav.cjs +18 -5
  177. package/build/components/writing-flow/use-arrow-nav.cjs.map +2 -2
  178. package/build/components/writing-flow/use-click-selection.cjs +2 -2
  179. package/build/components/writing-flow/use-click-selection.cjs.map +2 -2
  180. package/build/components/writing-flow/use-clipboard-handler.cjs +4 -1
  181. package/build/components/writing-flow/use-clipboard-handler.cjs.map +2 -2
  182. package/build/components/writing-flow/use-drag-selection.cjs +3 -8
  183. package/build/components/writing-flow/use-drag-selection.cjs.map +2 -2
  184. package/build/components/writing-flow/use-editable-root.cjs +112 -0
  185. package/build/components/writing-flow/use-editable-root.cjs.map +7 -0
  186. package/build/components/writing-flow/use-home-end.cjs +64 -0
  187. package/build/components/writing-flow/use-home-end.cjs.map +7 -0
  188. package/build/components/writing-flow/use-input.cjs +15 -5
  189. package/build/components/writing-flow/use-input.cjs.map +2 -2
  190. package/build/components/writing-flow/use-multi-selection.cjs +2 -2
  191. package/build/components/writing-flow/use-multi-selection.cjs.map +2 -2
  192. package/build/components/writing-flow/use-select-all.cjs +14 -2
  193. package/build/components/writing-flow/use-select-all.cjs.map +2 -2
  194. package/build/components/writing-flow/use-selection-observer.cjs +126 -20
  195. package/build/components/writing-flow/use-selection-observer.cjs.map +3 -3
  196. package/build/components/writing-flow/utils.cjs +39 -2
  197. package/build/components/writing-flow/utils.cjs.map +2 -2
  198. package/build/components/writing-mode-control/index.cjs +0 -1
  199. package/build/components/writing-mode-control/index.cjs.map +2 -2
  200. package/build/hooks/background.cjs +3 -2
  201. package/build/hooks/background.cjs.map +2 -2
  202. package/build/hooks/block-fields/rich-text/index.cjs +2 -3
  203. package/build/hooks/block-fields/rich-text/index.cjs.map +3 -3
  204. package/build/hooks/elements.cjs +1 -1
  205. package/build/hooks/elements.cjs.map +2 -2
  206. package/build/hooks/font-size.cjs +1 -2
  207. package/build/hooks/font-size.cjs.map +2 -2
  208. package/build/hooks/grid-visualizer.cjs +5 -3
  209. package/build/hooks/grid-visualizer.cjs.map +2 -2
  210. package/build/hooks/layout-child.cjs +22 -12
  211. package/build/hooks/layout-child.cjs.map +3 -3
  212. package/build/hooks/layout.cjs +33 -16
  213. package/build/hooks/layout.cjs.map +3 -3
  214. package/build/hooks/position.cjs +36 -16
  215. package/build/hooks/position.cjs.map +2 -2
  216. package/build/hooks/states.cjs +32 -23
  217. package/build/hooks/states.cjs.map +3 -3
  218. package/build/hooks/style.cjs +31 -9
  219. package/build/hooks/style.cjs.map +3 -3
  220. package/build/hooks/text-align.cjs +36 -6
  221. package/build/hooks/text-align.cjs.map +3 -3
  222. package/build/hooks/typography.cjs +1 -1
  223. package/build/hooks/typography.cjs.map +2 -2
  224. package/build/layouts/constrained.cjs +35 -27
  225. package/build/layouts/constrained.cjs.map +2 -2
  226. package/build/layouts/flex.cjs +27 -22
  227. package/build/layouts/flex.cjs.map +2 -2
  228. package/build/layouts/grid.cjs +51 -11
  229. package/build/layouts/grid.cjs.map +2 -2
  230. package/build/private-apis.cjs +4 -2
  231. package/build/private-apis.cjs.map +3 -3
  232. package/build/store/actions.cjs +2 -2
  233. package/build/store/actions.cjs.map +2 -2
  234. package/build/store/private-actions.cjs +16 -0
  235. package/build/store/private-actions.cjs.map +2 -2
  236. package/build/store/private-keys.cjs +3 -3
  237. package/build/store/private-keys.cjs.map +2 -2
  238. package/build/store/private-selectors.cjs +109 -12
  239. package/build/store/private-selectors.cjs.map +3 -3
  240. package/build/store/reducer.cjs +19 -3
  241. package/build/store/reducer.cjs.map +2 -2
  242. package/build/store/selectors.cjs +13 -0
  243. package/build/store/selectors.cjs.map +2 -2
  244. package/build/utils/block-bindings.cjs +29 -0
  245. package/build/utils/block-bindings.cjs.map +2 -2
  246. package/build/utils/dom.cjs +14 -0
  247. package/build/utils/dom.cjs.map +2 -2
  248. package/build-module/autocompleters/block.mjs +10 -2
  249. package/build-module/autocompleters/block.mjs.map +2 -2
  250. package/build-module/components/background-image-control/index.mjs +0 -2
  251. package/build-module/components/background-image-control/index.mjs.map +2 -2
  252. package/build-module/components/block-canvas/index.mjs +7 -2
  253. package/build-module/components/block-canvas/index.mjs.map +2 -2
  254. package/build-module/components/block-controls/groups.mjs +3 -1
  255. package/build-module/components/block-controls/groups.mjs.map +2 -2
  256. package/build-module/components/block-edit/edit.mjs +11 -18
  257. package/build-module/components/block-edit/edit.mjs.map +2 -2
  258. package/build-module/components/block-inspector/edit-contents.mjs +4 -1
  259. package/build-module/components/block-inspector/edit-contents.mjs.map +2 -2
  260. package/build-module/components/block-inspector/index.mjs +18 -36
  261. package/build-module/components/block-inspector/index.mjs.map +2 -2
  262. package/build-module/components/block-list/block-invalid-warning.mjs +8 -19
  263. package/build-module/components/block-list/block-invalid-warning.mjs.map +2 -2
  264. package/build-module/components/block-list/block.mjs +9 -3
  265. package/build-module/components/block-list/block.mjs.map +3 -3
  266. package/build-module/components/block-list/index.mjs +1 -3
  267. package/build-module/components/block-list/index.mjs.map +2 -2
  268. package/build-module/components/block-list/use-block-props/index.mjs +3 -1
  269. package/build-module/components/block-list/use-block-props/index.mjs.map +2 -2
  270. package/build-module/components/block-list/use-block-props/use-focus-first-element.mjs +9 -4
  271. package/build-module/components/block-list/use-block-props/use-focus-first-element.mjs.map +2 -2
  272. package/build-module/components/block-list/use-block-props/use-focus-handler.mjs +12 -4
  273. package/build-module/components/block-list/use-block-props/use-focus-handler.mjs.map +2 -2
  274. package/build-module/components/block-styles/use-styles-for-block.mjs +2 -1
  275. package/build-module/components/block-styles/use-styles-for-block.mjs.map +2 -2
  276. package/build-module/components/block-title/use-block-display-title.mjs +7 -2
  277. package/build-module/components/block-title/use-block-display-title.mjs.map +2 -2
  278. package/build-module/components/block-toolbar/block-toolbar-icon.mjs +10 -14
  279. package/build-module/components/block-toolbar/block-toolbar-icon.mjs.map +2 -2
  280. package/build-module/components/block-toolbar/index.mjs +43 -24
  281. package/build-module/components/block-toolbar/index.mjs.map +2 -2
  282. package/build-module/components/block-tools/index.mjs +7 -2
  283. package/build-module/components/block-tools/index.mjs.map +2 -2
  284. package/build-module/components/block-variation-transforms/index.mjs +0 -1
  285. package/build-module/components/block-variation-transforms/index.mjs.map +2 -2
  286. package/build-module/components/block-visibility/modal.mjs +22 -10
  287. package/build-module/components/block-visibility/modal.mjs.map +2 -2
  288. package/build-module/components/block-visibility/use-block-visibility.mjs +17 -7
  289. package/build-module/components/block-visibility/use-block-visibility.mjs.map +2 -2
  290. package/build-module/components/block-visibility/utils.mjs +18 -3
  291. package/build-module/components/block-visibility/utils.mjs.map +2 -2
  292. package/build-module/components/block-visibility/viewport-menu-item.mjs +7 -1
  293. package/build-module/components/block-visibility/viewport-menu-item.mjs.map +2 -2
  294. package/build-module/components/block-visibility/viewport-toolbar.mjs +5 -0
  295. package/build-module/components/block-visibility/viewport-toolbar.mjs.map +2 -2
  296. package/build-module/components/block-visibility/viewport-visibility-info.mjs +5 -1
  297. package/build-module/components/block-visibility/viewport-visibility-info.mjs.map +2 -2
  298. package/build-module/components/child-layout-control/index.mjs +0 -6
  299. package/build-module/components/child-layout-control/index.mjs.map +2 -2
  300. package/build-module/components/colors-gradients/control.mjs +5 -5
  301. package/build-module/components/colors-gradients/control.mjs.map +2 -2
  302. package/build-module/components/date-format-picker/index.mjs +0 -1
  303. package/build-module/components/date-format-picker/index.mjs.map +2 -2
  304. package/build-module/components/dimensions-tool/aspect-ratio-tool.mjs +1 -2
  305. package/build-module/components/dimensions-tool/aspect-ratio-tool.mjs.map +2 -2
  306. package/build-module/components/dimensions-tool/scale-tool.mjs +0 -1
  307. package/build-module/components/dimensions-tool/scale-tool.mjs.map +2 -2
  308. package/build-module/components/dimensions-tool/width-height-tool.mjs +2 -4
  309. package/build-module/components/dimensions-tool/width-height-tool.mjs.map +2 -2
  310. package/build-module/components/font-appearance-control/index.mjs +6 -15
  311. package/build-module/components/font-appearance-control/index.mjs.map +2 -2
  312. package/build-module/components/font-family/index.mjs +6 -15
  313. package/build-module/components/font-family/index.mjs.map +2 -2
  314. package/build-module/components/font-sizes/font-size-picker.mjs +1 -2
  315. package/build-module/components/font-sizes/font-size-picker.mjs.map +2 -2
  316. package/build-module/components/global-styles/border-panel.mjs +0 -1
  317. package/build-module/components/global-styles/border-panel.mjs.map +2 -2
  318. package/build-module/components/global-styles/dimensions-panel.mjs +0 -3
  319. package/build-module/components/global-styles/dimensions-panel.mjs.map +2 -2
  320. package/build-module/components/global-styles/state-control-badges.mjs +41 -5
  321. package/build-module/components/global-styles/state-control-badges.mjs.map +2 -2
  322. package/build-module/components/global-styles/typography-panel.mjs +4 -11
  323. package/build-module/components/global-styles/typography-panel.mjs.map +2 -2
  324. package/build-module/components/height-control/index.mjs +0 -2
  325. package/build-module/components/height-control/index.mjs.map +2 -2
  326. package/build-module/components/html-element-control/index.mjs +0 -1
  327. package/build-module/components/html-element-control/index.mjs.map +2 -2
  328. package/build-module/components/image-editor/index.mjs +5 -0
  329. package/build-module/components/image-editor/index.mjs.map +2 -2
  330. package/build-module/components/image-editor/zoom-dropdown.mjs +0 -1
  331. package/build-module/components/image-editor/zoom-dropdown.mjs.map +2 -2
  332. package/build-module/components/image-size-control/index.mjs +3 -7
  333. package/build-module/components/image-size-control/index.mjs.map +2 -2
  334. package/build-module/components/inner-content/index.mjs +82 -0
  335. package/build-module/components/inner-content/index.mjs.map +7 -0
  336. package/build-module/components/inserter/hooks/use-block-types-state.mjs +10 -2
  337. package/build-module/components/inserter/hooks/use-block-types-state.mjs.map +2 -2
  338. package/build-module/components/inserter/media-tab/hooks.mjs +66 -12
  339. package/build-module/components/inserter/media-tab/hooks.mjs.map +2 -2
  340. package/build-module/components/inserter/media-tab/media-list.mjs +3 -1
  341. package/build-module/components/inserter/media-tab/media-list.mjs.map +2 -2
  342. package/build-module/components/inserter/media-tab/media-panel.mjs +297 -32
  343. package/build-module/components/inserter/media-tab/media-panel.mjs.map +2 -2
  344. package/build-module/components/inserter/media-tab/media-preview.mjs +33 -18
  345. package/build-module/components/inserter/media-tab/media-preview.mjs.map +2 -2
  346. package/build-module/components/inserter/media-tab/media-tab.mjs +27 -7
  347. package/build-module/components/inserter/media-tab/media-tab.mjs.map +2 -2
  348. package/build-module/components/inserter/mobile-tab-navigation.mjs +6 -1
  349. package/build-module/components/inserter/mobile-tab-navigation.mjs.map +2 -2
  350. package/build-module/components/inserter/no-results.mjs +2 -2
  351. package/build-module/components/inserter/no-results.mjs.map +2 -2
  352. package/build-module/components/inserter/preview-panel.mjs +2 -1
  353. package/build-module/components/inserter/preview-panel.mjs.map +2 -2
  354. package/build-module/components/inserter-list-item/index.mjs +8 -2
  355. package/build-module/components/inserter-list-item/index.mjs.map +2 -2
  356. package/build-module/components/keyboard-shortcuts/index.mjs +19 -11
  357. package/build-module/components/keyboard-shortcuts/index.mjs.map +2 -2
  358. package/build-module/components/letter-spacing-control/index.mjs +0 -14
  359. package/build-module/components/letter-spacing-control/index.mjs.map +2 -2
  360. package/build-module/components/line-height-control/index.mjs +6 -12
  361. package/build-module/components/line-height-control/index.mjs.map +2 -2
  362. package/build-module/components/list-view/block-select-button.mjs +90 -84
  363. package/build-module/components/list-view/block-select-button.mjs.map +2 -2
  364. package/build-module/components/list-view/block.mjs +61 -21
  365. package/build-module/components/list-view/block.mjs.map +2 -2
  366. package/build-module/components/list-view/expander.mjs +1 -1
  367. package/build-module/components/list-view/expander.mjs.map +2 -2
  368. package/build-module/components/list-view/use-list-view-client-ids.mjs +2 -2
  369. package/build-module/components/list-view/use-list-view-client-ids.mjs.map +2 -2
  370. package/build-module/components/media-placeholder/index.mjs +0 -1
  371. package/build-module/components/media-placeholder/index.mjs.map +2 -2
  372. package/build-module/components/observe-typing/index.mjs +4 -3
  373. package/build-module/components/observe-typing/index.mjs.map +2 -2
  374. package/build-module/components/preset-input-control/custom-value-controls.mjs +1 -3
  375. package/build-module/components/preset-input-control/custom-value-controls.mjs.map +2 -2
  376. package/build-module/components/preset-input-control/index.mjs +1 -3
  377. package/build-module/components/preset-input-control/index.mjs.map +2 -2
  378. package/build-module/components/resolution-tool/index.mjs +1 -2
  379. package/build-module/components/resolution-tool/index.mjs.map +2 -2
  380. package/build-module/components/rich-text/event-listeners/before-input-rules.mjs +8 -5
  381. package/build-module/components/rich-text/event-listeners/before-input-rules.mjs.map +2 -2
  382. package/build-module/components/rich-text/event-listeners/delete.mjs +7 -4
  383. package/build-module/components/rich-text/event-listeners/delete.mjs.map +2 -2
  384. package/build-module/components/rich-text/event-listeners/enter.mjs +8 -3
  385. package/build-module/components/rich-text/event-listeners/enter.mjs.map +2 -2
  386. package/build-module/components/rich-text/event-listeners/input-events.mjs +3 -3
  387. package/build-module/components/rich-text/event-listeners/input-events.mjs.map +2 -2
  388. package/build-module/components/rich-text/event-listeners/input-rules.mjs +8 -5
  389. package/build-module/components/rich-text/event-listeners/input-rules.mjs.map +2 -2
  390. package/build-module/components/rich-text/event-listeners/insert-replacement-text.mjs +3 -3
  391. package/build-module/components/rich-text/event-listeners/insert-replacement-text.mjs.map +2 -2
  392. package/build-module/components/rich-text/event-listeners/paste-handler.mjs +8 -2
  393. package/build-module/components/rich-text/event-listeners/paste-handler.mjs.map +2 -2
  394. package/build-module/components/rich-text/event-listeners/remove-browser-shortcuts.mjs +3 -3
  395. package/build-module/components/rich-text/event-listeners/remove-browser-shortcuts.mjs.map +2 -2
  396. package/build-module/components/rich-text/event-listeners/shortcuts.mjs +3 -3
  397. package/build-module/components/rich-text/event-listeners/shortcuts.mjs.map +2 -2
  398. package/build-module/components/rich-text/event-listeners/undo-automatic-change.mjs +3 -3
  399. package/build-module/components/rich-text/event-listeners/undo-automatic-change.mjs.map +2 -2
  400. package/build-module/components/rich-text/index.mjs +64 -13
  401. package/build-module/components/rich-text/index.mjs.map +2 -2
  402. package/build-module/components/text-alignment-control/index.mjs +0 -1
  403. package/build-module/components/text-alignment-control/index.mjs.map +2 -2
  404. package/build-module/components/text-decoration-control/index.mjs +0 -1
  405. package/build-module/components/text-decoration-control/index.mjs.map +2 -2
  406. package/build-module/components/text-indent-control/index.mjs +0 -8
  407. package/build-module/components/text-indent-control/index.mjs.map +2 -2
  408. package/build-module/components/text-transform-control/index.mjs +0 -1
  409. package/build-module/components/text-transform-control/index.mjs.map +2 -2
  410. package/build-module/components/typewriter/index.mjs +129 -136
  411. package/build-module/components/typewriter/index.mjs.map +2 -2
  412. package/build-module/components/use-block-commands/index.mjs +21 -17
  413. package/build-module/components/use-block-commands/index.mjs.map +2 -2
  414. package/build-module/components/use-block-display-information/index.mjs +10 -8
  415. package/build-module/components/use-block-display-information/index.mjs.map +2 -2
  416. package/build-module/components/use-on-block-drop/index.mjs +4 -7
  417. package/build-module/components/use-on-block-drop/index.mjs.map +2 -2
  418. package/build-module/components/use-resize-canvas/index.mjs +6 -53
  419. package/build-module/components/use-resize-canvas/index.mjs.map +2 -2
  420. package/build-module/components/writing-flow/index.mjs +12 -1
  421. package/build-module/components/writing-flow/index.mjs.map +2 -2
  422. package/build-module/components/writing-flow/use-arrow-nav.mjs +19 -6
  423. package/build-module/components/writing-flow/use-arrow-nav.mjs.map +2 -2
  424. package/build-module/components/writing-flow/use-click-selection.mjs +2 -2
  425. package/build-module/components/writing-flow/use-click-selection.mjs.map +2 -2
  426. package/build-module/components/writing-flow/use-clipboard-handler.mjs +5 -2
  427. package/build-module/components/writing-flow/use-clipboard-handler.mjs.map +2 -2
  428. package/build-module/components/writing-flow/use-drag-selection.mjs +1 -6
  429. package/build-module/components/writing-flow/use-drag-selection.mjs.map +2 -2
  430. package/build-module/components/writing-flow/use-editable-root.mjs +86 -0
  431. package/build-module/components/writing-flow/use-editable-root.mjs.map +7 -0
  432. package/build-module/components/writing-flow/use-home-end.mjs +43 -0
  433. package/build-module/components/writing-flow/use-home-end.mjs.map +7 -0
  434. package/build-module/components/writing-flow/use-input.mjs +15 -5
  435. package/build-module/components/writing-flow/use-input.mjs.map +2 -2
  436. package/build-module/components/writing-flow/use-multi-selection.mjs +2 -2
  437. package/build-module/components/writing-flow/use-multi-selection.mjs.map +2 -2
  438. package/build-module/components/writing-flow/use-select-all.mjs +19 -3
  439. package/build-module/components/writing-flow/use-select-all.mjs.map +2 -2
  440. package/build-module/components/writing-flow/use-selection-observer.mjs +128 -19
  441. package/build-module/components/writing-flow/use-selection-observer.mjs.map +2 -2
  442. package/build-module/components/writing-flow/utils.mjs +35 -1
  443. package/build-module/components/writing-flow/utils.mjs.map +2 -2
  444. package/build-module/components/writing-mode-control/index.mjs +0 -1
  445. package/build-module/components/writing-mode-control/index.mjs.map +2 -2
  446. package/build-module/hooks/background.mjs +3 -2
  447. package/build-module/hooks/background.mjs.map +2 -2
  448. package/build-module/hooks/block-fields/rich-text/index.mjs +2 -6
  449. package/build-module/hooks/block-fields/rich-text/index.mjs.map +2 -2
  450. package/build-module/hooks/elements.mjs +1 -1
  451. package/build-module/hooks/elements.mjs.map +2 -2
  452. package/build-module/hooks/font-size.mjs +1 -2
  453. package/build-module/hooks/font-size.mjs.map +2 -2
  454. package/build-module/hooks/grid-visualizer.mjs +5 -3
  455. package/build-module/hooks/grid-visualizer.mjs.map +2 -2
  456. package/build-module/hooks/layout-child.mjs +22 -12
  457. package/build-module/hooks/layout-child.mjs.map +2 -2
  458. package/build-module/hooks/layout.mjs +32 -16
  459. package/build-module/hooks/layout.mjs.map +2 -2
  460. package/build-module/hooks/position.mjs +38 -18
  461. package/build-module/hooks/position.mjs.map +2 -2
  462. package/build-module/hooks/states.mjs +32 -23
  463. package/build-module/hooks/states.mjs.map +2 -2
  464. package/build-module/hooks/style.mjs +40 -11
  465. package/build-module/hooks/style.mjs.map +2 -2
  466. package/build-module/hooks/text-align.mjs +39 -10
  467. package/build-module/hooks/text-align.mjs.map +2 -2
  468. package/build-module/hooks/typography.mjs +1 -1
  469. package/build-module/hooks/typography.mjs.map +2 -2
  470. package/build-module/layouts/constrained.mjs +35 -27
  471. package/build-module/layouts/constrained.mjs.map +2 -2
  472. package/build-module/layouts/flex.mjs +27 -22
  473. package/build-module/layouts/flex.mjs.map +2 -2
  474. package/build-module/layouts/grid.mjs +52 -11
  475. package/build-module/layouts/grid.mjs.map +2 -2
  476. package/build-module/private-apis.mjs +5 -3
  477. package/build-module/private-apis.mjs.map +2 -2
  478. package/build-module/store/actions.mjs +3 -3
  479. package/build-module/store/actions.mjs.map +2 -2
  480. package/build-module/store/private-actions.mjs +14 -0
  481. package/build-module/store/private-actions.mjs.map +2 -2
  482. package/build-module/store/private-keys.mjs +2 -2
  483. package/build-module/store/private-keys.mjs.map +2 -2
  484. package/build-module/store/private-selectors.mjs +106 -12
  485. package/build-module/store/private-selectors.mjs.map +2 -2
  486. package/build-module/store/reducer.mjs +17 -3
  487. package/build-module/store/reducer.mjs.map +2 -2
  488. package/build-module/store/selectors.mjs +13 -0
  489. package/build-module/store/selectors.mjs.map +2 -2
  490. package/build-module/utils/block-bindings.mjs +28 -0
  491. package/build-module/utils/block-bindings.mjs.map +2 -2
  492. package/build-module/utils/dom.mjs +13 -0
  493. package/build-module/utils/dom.mjs.map +2 -2
  494. package/build-style/content-rtl.css +15 -14
  495. package/build-style/content.css +15 -14
  496. package/build-style/default-editor-styles-rtl.css +1 -1
  497. package/build-style/default-editor-styles.css +1 -1
  498. package/build-style/style-rtl.css +144 -47
  499. package/build-style/style.css +144 -47
  500. package/build-types/components/block-context/index.d.ts +7 -0
  501. package/build-types/components/block-context/index.d.ts.map +1 -1
  502. package/build-types/utils/block-bindings.d.ts +19 -0
  503. package/build-types/utils/block-bindings.d.ts.map +1 -1
  504. package/build-types/utils/dom.d.ts +11 -0
  505. package/build-types/utils/dom.d.ts.map +1 -1
  506. package/build-types/utils/get-px-from-css-unit.d.ts +2 -2
  507. package/build-types/utils/get-px-from-css-unit.d.ts.map +1 -1
  508. package/build-types/utils/pasting.d.ts +1 -1
  509. package/build-types/utils/pasting.d.ts.map +1 -1
  510. package/package.json +46 -44
  511. package/src/autocompleters/block.js +10 -3
  512. package/src/autocompleters/test/block.js +53 -0
  513. package/src/components/background-image-control/index.js +0 -2
  514. package/src/components/block-canvas/index.js +9 -2
  515. package/src/components/block-card/style.scss +1 -1
  516. package/src/components/block-controls/groups.js +2 -0
  517. package/src/components/block-edit/edit.js +13 -31
  518. package/src/components/block-inspector/edit-contents.js +5 -1
  519. package/src/components/block-inspector/index.js +25 -44
  520. package/src/components/block-list/block-invalid-warning.js +8 -19
  521. package/src/components/block-list/block.js +6 -0
  522. package/src/components/block-list/index.js +0 -2
  523. package/src/components/block-list/use-block-props/index.js +2 -0
  524. package/src/components/block-list/use-block-props/use-focus-first-element.js +23 -4
  525. package/src/components/block-list/use-block-props/use-focus-handler.js +34 -9
  526. package/src/components/block-lock/style.scss +1 -1
  527. package/src/components/block-manager/style.scss +1 -1
  528. package/src/components/block-navigation/style.scss +1 -1
  529. package/src/components/block-patterns-list/stories/index.story.jsx +1 -1
  530. package/src/components/block-quick-navigation/style.scss +1 -3
  531. package/src/components/block-styles/style.scss +2 -2
  532. package/src/components/block-styles/use-styles-for-block.js +1 -0
  533. package/src/components/block-title/use-block-display-title.js +7 -2
  534. package/src/components/block-toolbar/block-toolbar-icon.js +11 -16
  535. package/src/components/block-toolbar/index.js +41 -18
  536. package/src/components/block-toolbar/test/block-toolbar-icon.js +32 -9
  537. package/src/components/block-tools/index.js +7 -0
  538. package/src/components/block-types-list/style.scss +0 -1
  539. package/src/components/block-variation-transforms/index.js +0 -1
  540. package/src/components/block-visibility/modal.js +24 -10
  541. package/src/components/block-visibility/style.scss +1 -1
  542. package/src/components/block-visibility/test/use-block-visibility.js +128 -35
  543. package/src/components/block-visibility/test/utils.js +11 -0
  544. package/src/components/block-visibility/use-block-visibility.js +33 -11
  545. package/src/components/block-visibility/utils.js +31 -6
  546. package/src/components/block-visibility/viewport-menu-item.js +10 -1
  547. package/src/components/block-visibility/viewport-toolbar.js +6 -0
  548. package/src/components/block-visibility/viewport-visibility-info.js +5 -1
  549. package/src/components/button-block-appender/content.scss +1 -7
  550. package/src/components/child-layout-control/index.js +0 -6
  551. package/src/components/color-palette/test/__snapshots__/control.js.snap +13 -108
  552. package/src/components/colors-gradients/control.js +4 -4
  553. package/src/components/colors-gradients/style.scss +2 -2
  554. package/src/components/date-format-picker/index.js +0 -1
  555. package/src/components/dimensions-tool/aspect-ratio-tool.js +0 -1
  556. package/src/components/dimensions-tool/scale-tool.js +0 -1
  557. package/src/components/dimensions-tool/width-height-tool.js +0 -2
  558. package/src/components/font-appearance-control/index.js +6 -19
  559. package/src/components/font-family/README.md +0 -9
  560. package/src/components/font-family/index.js +6 -19
  561. package/src/components/font-family/stories/index.story.jsx +1 -2
  562. package/src/components/font-sizes/font-size-picker.js +0 -1
  563. package/src/components/global-styles/border-panel.js +0 -1
  564. package/src/components/global-styles/dimensions-panel.js +0 -3
  565. package/src/components/global-styles/state-control-badges.js +45 -6
  566. package/src/components/global-styles/style.scss +5 -0
  567. package/src/components/global-styles/test/state-control-badges.js +65 -0
  568. package/src/components/global-styles/typography-panel.js +0 -7
  569. package/src/components/height-control/index.js +0 -2
  570. package/src/components/html-element-control/index.js +0 -1
  571. package/src/components/iframe/content.scss +3 -3
  572. package/src/components/image-editor/index.js +22 -0
  573. package/src/components/image-editor/zoom-dropdown.js +0 -1
  574. package/src/components/image-size-control/index.js +0 -4
  575. package/src/components/inner-content/index.js +119 -0
  576. package/src/components/inner-content/test/index.js +81 -0
  577. package/src/components/inserter/hooks/use-block-types-state.js +10 -2
  578. package/src/components/inserter/media-tab/hooks.js +114 -16
  579. package/src/components/inserter/media-tab/media-list.js +2 -0
  580. package/src/components/inserter/media-tab/media-panel.js +354 -19
  581. package/src/components/inserter/media-tab/media-preview.js +34 -17
  582. package/src/components/inserter/media-tab/media-tab.js +20 -2
  583. package/src/components/inserter/media-tab/test/hooks.js +267 -0
  584. package/src/components/inserter/media-tab/test/media-panel.js +127 -0
  585. package/src/components/inserter/mobile-tab-navigation.js +6 -1
  586. package/src/components/inserter/no-results.js +2 -2
  587. package/src/components/inserter/preview-panel.js +1 -0
  588. package/src/components/inserter/style.scss +115 -3
  589. package/src/components/inserter-list-item/index.js +8 -2
  590. package/src/components/inserter-list-item/style.scss +0 -15
  591. package/src/components/keyboard-shortcuts/index.js +28 -11
  592. package/src/components/letter-spacing-control/README.md +0 -8
  593. package/src/components/letter-spacing-control/index.js +5 -23
  594. package/src/components/letter-spacing-control/stories/index.story.jsx +0 -12
  595. package/src/components/line-height-control/README.md +0 -8
  596. package/src/components/line-height-control/index.js +6 -16
  597. package/src/components/line-height-control/stories/index.story.jsx +0 -1
  598. package/src/components/line-height-control/test/index.js +1 -7
  599. package/src/components/link-control/style.scss +2 -2
  600. package/src/components/link-control/test/index.js +6 -6
  601. package/src/components/link-picker/style.scss +1 -2
  602. package/src/components/link-picker/test/index.js +3 -1
  603. package/src/components/list-view/block-select-button.js +5 -1
  604. package/src/components/list-view/block.js +69 -23
  605. package/src/components/list-view/expander.js +5 -1
  606. package/src/components/list-view/style.scss +23 -5
  607. package/src/components/list-view/use-list-view-client-ids.js +2 -2
  608. package/src/components/media-placeholder/index.js +0 -1
  609. package/src/components/multi-selection-inspector/style.scss +1 -1
  610. package/src/components/observe-typing/index.js +9 -4
  611. package/src/components/preset-input-control/custom-value-controls.js +0 -2
  612. package/src/components/preset-input-control/index.js +0 -2
  613. package/src/components/resolution-tool/index.js +0 -1
  614. package/src/components/responsive-block-control/style.scss +1 -1
  615. package/src/components/responsive-block-control/test/index.js +1 -5
  616. package/src/components/rich-text/event-listeners/before-input-rules.js +8 -5
  617. package/src/components/rich-text/event-listeners/delete.js +7 -4
  618. package/src/components/rich-text/event-listeners/enter.js +10 -4
  619. package/src/components/rich-text/event-listeners/input-events.js +4 -3
  620. package/src/components/rich-text/event-listeners/input-rules.js +8 -5
  621. package/src/components/rich-text/event-listeners/insert-replacement-text.js +4 -3
  622. package/src/components/rich-text/event-listeners/paste-handler.js +15 -3
  623. package/src/components/rich-text/event-listeners/remove-browser-shortcuts.js +4 -3
  624. package/src/components/rich-text/event-listeners/shortcuts.js +4 -3
  625. package/src/components/rich-text/event-listeners/undo-automatic-change.js +4 -3
  626. package/src/components/rich-text/index.js +94 -25
  627. package/src/components/skip-to-selected-block/style.scss +1 -1
  628. package/src/components/text-alignment-control/index.js +0 -1
  629. package/src/components/text-decoration-control/index.js +0 -1
  630. package/src/components/text-indent-control/index.js +7 -16
  631. package/src/components/text-transform-control/index.js +0 -1
  632. package/src/components/typewriter/index.js +228 -224
  633. package/src/components/use-block-commands/index.js +27 -17
  634. package/src/components/use-block-display-information/index.js +9 -13
  635. package/src/components/use-block-display-information/test/index.js +47 -9
  636. package/src/components/use-on-block-drop/index.js +4 -7
  637. package/src/components/use-resize-canvas/index.js +10 -71
  638. package/src/components/writing-flow/index.js +15 -1
  639. package/src/components/writing-flow/use-arrow-nav.js +39 -12
  640. package/src/components/writing-flow/use-click-selection.js +2 -3
  641. package/src/components/writing-flow/use-clipboard-handler.js +5 -2
  642. package/src/components/writing-flow/use-drag-selection.js +1 -14
  643. package/src/components/writing-flow/use-editable-root.js +182 -0
  644. package/src/components/writing-flow/use-home-end.js +63 -0
  645. package/src/components/writing-flow/use-input.js +25 -8
  646. package/src/components/writing-flow/use-multi-selection.js +2 -3
  647. package/src/components/writing-flow/use-select-all.js +33 -3
  648. package/src/components/writing-flow/use-selection-observer.js +197 -38
  649. package/src/components/writing-flow/utils.js +83 -0
  650. package/src/components/writing-mode-control/index.js +0 -1
  651. package/src/hooks/background.js +7 -9
  652. package/src/hooks/block-fields/link/styles.scss +1 -6
  653. package/src/hooks/block-fields/media/styles.scss +1 -6
  654. package/src/hooks/block-fields/rich-text/index.js +6 -9
  655. package/src/hooks/block-hooks.scss +15 -0
  656. package/src/hooks/elements.js +0 -1
  657. package/src/hooks/font-size.js +0 -1
  658. package/src/hooks/grid-visualizer.js +40 -36
  659. package/src/hooks/layout-child.js +19 -9
  660. package/src/hooks/layout.js +53 -35
  661. package/src/hooks/position.js +44 -23
  662. package/src/hooks/states.js +55 -28
  663. package/src/hooks/style.js +67 -17
  664. package/src/hooks/test/cross-origin-isolation.js +0 -4
  665. package/src/hooks/test/layout.js +75 -1
  666. package/src/hooks/test/style.js +29 -0
  667. package/src/hooks/test/text-align.js +34 -1
  668. package/src/hooks/text-align.js +41 -10
  669. package/src/hooks/typography.js +0 -1
  670. package/src/layouts/constrained.js +56 -29
  671. package/src/layouts/flex.js +5 -4
  672. package/src/layouts/grid.js +59 -9
  673. package/src/layouts/test/constrained.js +91 -0
  674. package/src/layouts/test/grid.js +71 -0
  675. package/src/private-apis.js +4 -2
  676. package/src/store/actions.js +43 -14
  677. package/src/store/private-actions.js +31 -0
  678. package/src/store/private-keys.js +1 -1
  679. package/src/store/private-selectors.js +209 -16
  680. package/src/store/reducer.js +37 -2
  681. package/src/store/selectors.js +41 -0
  682. package/src/store/test/actions.js +1 -1
  683. package/src/store/test/private-selectors.js +547 -10
  684. package/src/store/test/reducer.js +41 -13
  685. package/src/store/test/selectors.js +133 -0
  686. package/src/style.scss +1 -0
  687. package/src/utils/block-bindings.ts +50 -0
  688. package/src/utils/dom.ts +33 -0
  689. package/src/utils/test/block-bindings.js +181 -0
  690. package/build/components/rich-text/input-event.cjs +0 -50
  691. package/build/components/rich-text/input-event.cjs.map +0 -7
  692. package/build/components/rich-text/shortcut.cjs +0 -51
  693. package/build/components/rich-text/shortcut.cjs.map +0 -7
  694. package/build-module/components/rich-text/input-event.mjs +0 -25
  695. package/build-module/components/rich-text/input-event.mjs.map +0 -7
  696. package/build-module/components/rich-text/shortcut.mjs +0 -26
  697. package/build-module/components/rich-text/shortcut.mjs.map +0 -7
  698. package/src/components/rich-text/input-event.js +0 -31
  699. package/src/components/rich-text/shortcut.js +0 -32
  700. package/src/components/use-resize-canvas/README.md +0 -37
@@ -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 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,CAAC,GACvD;AACD,MAAI,mBAAmB;AAEvB,MAAK,OAAO,OAAQ,kBAAkB,yBAA0B,GAAI;AACnE,0BAAA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,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;",
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\n/**\n * Sets the globally selected viewport style state. When set to a value other\n * than 'default', block style edits in the inspector apply to that viewport.\n * Driven by the editor's device preview while Responsive editing is enabled.\n *\n * @param {string} viewport The selected viewport state (e.g. 'default', 'tablet', 'mobile').\n *\n * @return {Object} Action object.\n */\nexport function setStyleStateViewport( viewport ) {\n\treturn {\n\t\ttype: 'SET_STYLE_STATE_VIEWPORT',\n\t\tviewport,\n\t};\n}\n\n/**\n * Sets whether Responsive editing is enabled. When enabled, the device preview\n * also drives which viewport block style edits are applied to. Session-only.\n *\n * @param {boolean} enabled Whether Responsive editing is enabled.\n *\n * @return {Object} Action object.\n */\nexport function setResponsiveEditing( enabled ) {\n\treturn {\n\t\ttype: 'SET_RESPONSIVE_EDITING',\n\t\tenabled,\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;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,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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BAA4B;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;AAWO,SAAS,sBAAuB,UAAW;AACjD,SAAO;AAAA,IACN,MAAM;AAAA,IACN;AAAA,EACD;AACD;AAUO,SAAS,qBAAsB,SAAU;AAC/C,SAAO;AAAA,IACN,MAAM;AAAA,IACN;AAAA,EACD;AACD;",
6
6
  "names": ["deprecated", "flattenBlocks"]
7
7
  }
@@ -28,8 +28,8 @@ __export(private_keys_exports, {
28
28
  isNavigationOverlayContextKey: () => isNavigationOverlayContextKey,
29
29
  isNavigationPostEditorKey: () => isNavigationPostEditorKey,
30
30
  mediaEditKey: () => mediaEditKey,
31
+ mediaSideloadFromUrlKey: () => mediaSideloadFromUrlKey,
31
32
  mediaUploadOnSuccessKey: () => mediaUploadOnSuccessKey,
32
- onViewportStateChangeKey: () => onViewportStateChangeKey,
33
33
  openMediaEditorModalKey: () => openMediaEditorModalKey,
34
34
  reusableBlocksSelectKey: () => reusableBlocksSelectKey,
35
35
  sectionRootClientIdKey: () => sectionRootClientIdKey,
@@ -49,12 +49,12 @@ var mediaEditKey = /* @__PURE__ */ Symbol("mediaEditKey");
49
49
  var getMediaSelectKey = /* @__PURE__ */ Symbol("getMediaSelect");
50
50
  var isIsolatedEditorKey = /* @__PURE__ */ Symbol("isIsolatedEditor");
51
51
  var deviceTypeKey = /* @__PURE__ */ Symbol("deviceTypeKey");
52
- var onViewportStateChangeKey = /* @__PURE__ */ Symbol("onViewportStateChangeKey");
53
52
  var isNavigationOverlayContextKey = /* @__PURE__ */ Symbol(
54
53
  "isNavigationOverlayContext"
55
54
  );
56
55
  var isNavigationPostEditorKey = /* @__PURE__ */ Symbol("isNavigationPostEditor");
57
56
  var mediaUploadOnSuccessKey = /* @__PURE__ */ Symbol("mediaUploadOnSuccess");
57
+ var mediaSideloadFromUrlKey = /* @__PURE__ */ Symbol("mediaSideloadFromUrl");
58
58
  var openMediaEditorModalKey = /* @__PURE__ */ Symbol("openMediaEditorModal");
59
59
  // Annotate the CommonJS export names for ESM import in node:
60
60
  0 && (module.exports = {
@@ -66,8 +66,8 @@ var openMediaEditorModalKey = /* @__PURE__ */ Symbol("openMediaEditorModal");
66
66
  isNavigationOverlayContextKey,
67
67
  isNavigationPostEditorKey,
68
68
  mediaEditKey,
69
+ mediaSideloadFromUrlKey,
69
70
  mediaUploadOnSuccessKey,
70
- onViewportStateChangeKey,
71
71
  openMediaEditorModalKey,
72
72
  reusableBlocksSelectKey,
73
73
  sectionRootClientIdKey,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/store/private-keys.js"],
4
- "sourcesContent": ["export const globalStylesDataKey = Symbol( 'globalStylesDataKey' );\nexport const globalStylesLinksDataKey = Symbol( 'globalStylesLinks' );\nexport const selectBlockPatternsKey = Symbol( 'selectBlockPatternsKey' );\nexport const reusableBlocksSelectKey = Symbol( 'reusableBlocksSelect' );\nexport const userPatternCategoriesSelectKey = Symbol(\n\t'userPatternCategoriesSelect'\n);\nexport const sectionRootClientIdKey = Symbol( 'sectionRootClientIdKey' );\nexport const mediaEditKey = Symbol( 'mediaEditKey' );\nexport const getMediaSelectKey = Symbol( 'getMediaSelect' );\nexport const isIsolatedEditorKey = Symbol( 'isIsolatedEditor' );\nexport const deviceTypeKey = Symbol( 'deviceTypeKey' );\nexport const onViewportStateChangeKey = Symbol( 'onViewportStateChangeKey' );\nexport const isNavigationOverlayContextKey = Symbol(\n\t'isNavigationOverlayContext'\n);\nexport const isNavigationPostEditorKey = Symbol( 'isNavigationPostEditor' );\nexport const mediaUploadOnSuccessKey = Symbol( 'mediaUploadOnSuccess' );\nexport const openMediaEditorModalKey = Symbol( 'openMediaEditorModal' );\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,IAAM,sBAAsB,uBAAQ,qBAAsB;AAC1D,IAAM,2BAA2B,uBAAQ,mBAAoB;AAC7D,IAAM,yBAAyB,uBAAQ,wBAAyB;AAChE,IAAM,0BAA0B,uBAAQ,sBAAuB;AAC/D,IAAM,iCAAiC;AAAA,EAC7C;AACD;AACO,IAAM,yBAAyB,uBAAQ,wBAAyB;AAChE,IAAM,eAAe,uBAAQ,cAAe;AAC5C,IAAM,oBAAoB,uBAAQ,gBAAiB;AACnD,IAAM,sBAAsB,uBAAQ,kBAAmB;AACvD,IAAM,gBAAgB,uBAAQ,eAAgB;AAC9C,IAAM,2BAA2B,uBAAQ,0BAA2B;AACpE,IAAM,gCAAgC;AAAA,EAC5C;AACD;AACO,IAAM,4BAA4B,uBAAQ,wBAAyB;AACnE,IAAM,0BAA0B,uBAAQ,sBAAuB;AAC/D,IAAM,0BAA0B,uBAAQ,sBAAuB;",
4
+ "sourcesContent": ["export const globalStylesDataKey = Symbol( 'globalStylesDataKey' );\nexport const globalStylesLinksDataKey = Symbol( 'globalStylesLinks' );\nexport const selectBlockPatternsKey = Symbol( 'selectBlockPatternsKey' );\nexport const reusableBlocksSelectKey = Symbol( 'reusableBlocksSelect' );\nexport const userPatternCategoriesSelectKey = Symbol(\n\t'userPatternCategoriesSelect'\n);\nexport const sectionRootClientIdKey = Symbol( 'sectionRootClientIdKey' );\nexport const mediaEditKey = Symbol( 'mediaEditKey' );\nexport const getMediaSelectKey = Symbol( 'getMediaSelect' );\nexport const isIsolatedEditorKey = Symbol( 'isIsolatedEditor' );\nexport const deviceTypeKey = Symbol( 'deviceTypeKey' );\nexport const isNavigationOverlayContextKey = Symbol(\n\t'isNavigationOverlayContext'\n);\nexport const isNavigationPostEditorKey = Symbol( 'isNavigationPostEditor' );\nexport const mediaUploadOnSuccessKey = Symbol( 'mediaUploadOnSuccess' );\nexport const mediaSideloadFromUrlKey = Symbol( 'mediaSideloadFromUrl' );\nexport const openMediaEditorModalKey = Symbol( 'openMediaEditorModal' );\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,IAAM,sBAAsB,uBAAQ,qBAAsB;AAC1D,IAAM,2BAA2B,uBAAQ,mBAAoB;AAC7D,IAAM,yBAAyB,uBAAQ,wBAAyB;AAChE,IAAM,0BAA0B,uBAAQ,sBAAuB;AAC/D,IAAM,iCAAiC;AAAA,EAC7C;AACD;AACO,IAAM,yBAAyB,uBAAQ,wBAAyB;AAChE,IAAM,eAAe,uBAAQ,cAAe;AAC5C,IAAM,oBAAoB,uBAAQ,gBAAiB;AACnD,IAAM,sBAAsB,uBAAQ,kBAAmB;AACvD,IAAM,gBAAgB,uBAAQ,eAAgB;AAC9C,IAAM,gCAAgC;AAAA,EAC5C;AACD;AACO,IAAM,4BAA4B,uBAAQ,wBAAyB;AACnE,IAAM,0BAA0B,uBAAQ,sBAAuB;AAC/D,IAAM,0BAA0B,uBAAQ,sBAAuB;AAC/D,IAAM,0BAA0B,uBAAQ,sBAAuB;",
6
6
  "names": []
7
7
  }
@@ -38,6 +38,7 @@ __export(private_selectors_exports, {
38
38
  getInsertionPoint: () => getInsertionPoint,
39
39
  getLastFocus: () => getLastFocus,
40
40
  getLastInsertedBlocksClientIds: () => getLastInsertedBlocksClientIds,
41
+ getListViewClientIdsTree: () => getListViewClientIdsTree,
41
42
  getListViewExpandRevision: () => getListViewExpandRevision,
42
43
  getParentSectionBlock: () => getParentSectionBlock,
43
44
  getPatternBySlug: () => getPatternBySlug,
@@ -48,6 +49,7 @@ __export(private_selectors_exports, {
48
49
  getSectionRootClientId: () => getSectionRootClientId,
49
50
  getSelectedBlockStyleState: () => getSelectedBlockStyleState,
50
51
  getStyleOverrides: () => getStyleOverrides,
52
+ getStyleStateViewport: () => getStyleStateViewport,
51
53
  getViewportModalClientIds: () => getViewportModalClientIds,
52
54
  getZoomLevel: () => getZoomLevel,
53
55
  hasAllowedPatterns: () => hasAllowedPatterns,
@@ -68,6 +70,7 @@ __export(private_selectors_exports, {
68
70
  isLockedBlock: () => isLockedBlock,
69
71
  isMoveLockedBlock: () => isMoveLockedBlock,
70
72
  isRemoveLockedBlock: () => isRemoveLockedBlock,
73
+ isResponsiveEditing: () => isResponsiveEditing,
71
74
  isSectionBlock: () => isSectionBlock,
72
75
  isSelectedBlockStyleStateShownOnCanvas: () => isSelectedBlockStyleStateShownOnCanvas,
73
76
  isWithinEditedContentOnlySection: () => isWithinEditedContentOnlySection,
@@ -77,6 +80,7 @@ __export(private_selectors_exports, {
77
80
  module.exports = __toCommonJS(private_selectors_exports);
78
81
  var import_data = require("@wordpress/data");
79
82
  var import_blocks = require("@wordpress/blocks");
83
+ var import_global_styles_engine = require("@wordpress/global-styles-engine");
80
84
  var import_selectors = require("./selectors.cjs");
81
85
  var import_utils = require("./utils.cjs");
82
86
  var import_constants = require("./constants.cjs");
@@ -85,6 +89,15 @@ var import_private_keys = require("./private-keys.cjs");
85
89
  var import_constants2 = require("../components/block-visibility/constants.cjs");
86
90
  var import_get_block_settings = require("./get-block-settings.cjs");
87
91
  var { isContentBlock } = (0, import_lock_unlock.unlock)(import_blocks.privateApis);
92
+ var { getViewportBreakpoints } = (0, import_lock_unlock.unlock)(import_global_styles_engine.privateApis);
93
+ function isViewportAvailable(state, viewport) {
94
+ if (viewport === import_constants2.BLOCK_VISIBILITY_VIEWPORTS.desktop.key) {
95
+ return true;
96
+ }
97
+ return getViewportBreakpoints(
98
+ (0, import_selectors.getSettings)(state)?.__experimentalFeatures?.viewport
99
+ )[viewport] !== void 0;
100
+ }
88
101
  function isBlockInterfaceHidden(state) {
89
102
  return state.isBlockInterfaceHidden;
90
103
  }
@@ -128,15 +141,16 @@ var getClientIdsTree = (0, import_data.createSelector)(
128
141
  getClientIdsTreeUnmemoized,
129
142
  (state) => [state.blocks.order]
130
143
  );
131
- function getEnabledClientIdsTreeUnmemoized(state, rootClientId) {
144
+ function getFilteredClientIdsTreeUnmemoized(state, rootClientId, includesBlock) {
132
145
  const blockOrder = (0, import_selectors.getBlockOrder)(state, rootClientId);
133
146
  const result = [];
134
147
  for (const clientId of blockOrder) {
135
- const innerBlocks = getEnabledClientIdsTreeUnmemoized(
148
+ const innerBlocks = getFilteredClientIdsTreeUnmemoized(
136
149
  state,
137
- clientId
150
+ clientId,
151
+ includesBlock
138
152
  );
139
- if ((0, import_selectors.getBlockEditingMode)(state, clientId) !== "disabled") {
153
+ if (includesBlock(state, clientId)) {
140
154
  result.push({ clientId, innerBlocks });
141
155
  } else {
142
156
  result.push(...innerBlocks);
@@ -144,6 +158,58 @@ function getEnabledClientIdsTreeUnmemoized(state, rootClientId) {
144
158
  }
145
159
  return result;
146
160
  }
161
+ function getEnabledClientIdsTreeUnmemoized(state, rootClientId) {
162
+ return getFilteredClientIdsTreeUnmemoized(
163
+ state,
164
+ rootClientId,
165
+ (_state, clientId) => (0, import_selectors.getBlockEditingMode)(_state, clientId) !== "disabled"
166
+ );
167
+ }
168
+ function hasExplicitDisabledParent(state, clientId) {
169
+ let parent = state.blocks.parents.get(clientId);
170
+ while (parent !== void 0) {
171
+ const parentBlockEditingMode = state.blocks.blockEditingModes.get(parent);
172
+ if (parentBlockEditingMode) {
173
+ return parentBlockEditingMode === "disabled";
174
+ }
175
+ parent = state.blocks.parents.get(parent);
176
+ }
177
+ return false;
178
+ }
179
+ function getListViewClientIdsTreeUnmemoized(state, rootClientId) {
180
+ return getFilteredClientIdsTreeUnmemoized(
181
+ state,
182
+ rootClientId,
183
+ (_state, clientId) => {
184
+ if ((0, import_selectors.getBlockEditingMode)(_state, clientId) !== "disabled") {
185
+ return true;
186
+ }
187
+ const explicitBlockEditingMode = _state.blocks.blockEditingModes.get(clientId);
188
+ if (explicitBlockEditingMode) {
189
+ return explicitBlockEditingMode !== "disabled";
190
+ }
191
+ if (hasExplicitDisabledParent(_state, clientId)) {
192
+ return false;
193
+ }
194
+ if (_state.editedContentOnlySection) {
195
+ if (isWithinEditedContentOnlySection(_state, clientId)) {
196
+ return false;
197
+ }
198
+ const parentSectionBlock = getParentSectionBlock(
199
+ _state,
200
+ clientId
201
+ );
202
+ if (!parentSectionBlock) {
203
+ return true;
204
+ }
205
+ if (isContentBlock((0, import_selectors.getBlockName)(_state, clientId))) {
206
+ return true;
207
+ }
208
+ }
209
+ return false;
210
+ }
211
+ );
212
+ }
147
213
  var getEnabledClientIdsTree = (0, import_data.createRegistrySelector)(
148
214
  () => (0, import_data.createSelector)(getEnabledClientIdsTreeUnmemoized, (state) => [
149
215
  state.blocks.order,
@@ -151,6 +217,19 @@ var getEnabledClientIdsTree = (0, import_data.createRegistrySelector)(
151
217
  state.blocks.blockEditingModes
152
218
  ])
153
219
  );
220
+ var getListViewClientIdsTree = (0, import_data.createRegistrySelector)(
221
+ () => (0, import_data.createSelector)(getListViewClientIdsTreeUnmemoized, (state) => [
222
+ state.blocks.order,
223
+ state.derivedBlockEditingModes,
224
+ state.blocks.blockEditingModes,
225
+ state.blocks.parents,
226
+ state.blocks.byClientId,
227
+ state.blocks.attributes,
228
+ state.blockListSettings,
229
+ state.editedContentOnlySection,
230
+ state.settings
231
+ ])
232
+ );
154
233
  var getEnabledBlockParents = (0, import_data.createSelector)(
155
234
  (state, clientId, ascending = false) => {
156
235
  return (0, import_selectors.getBlockParents)(state, clientId, ascending).filter(
@@ -455,7 +534,7 @@ var isBlockHiddenAnywhere = (state, clientId) => {
455
534
  }
456
535
  if (typeof blockVisibility?.viewport === "object" && blockVisibility?.viewport !== null) {
457
536
  return Object.values(import_constants2.BLOCK_VISIBILITY_VIEWPORTS).some(
458
- (viewport) => blockVisibility?.viewport?.[viewport.key] === false
537
+ (viewport) => isViewportAvailable(state, viewport.key) && blockVisibility?.viewport?.[viewport.key] === false
459
538
  );
460
539
  }
461
540
  return false;
@@ -485,7 +564,8 @@ var isBlockHiddenAtViewport = (state, clientId, viewport) => {
485
564
  const attributes = state.blocks.attributes.get(clientId);
486
565
  const blockVisibilityViewport = attributes?.metadata?.blockVisibility?.viewport;
487
566
  if (typeof blockVisibilityViewport === "object" && blockVisibilityViewport !== null && typeof viewport === "string") {
488
- return blockVisibilityViewport?.[viewport.toLowerCase()] === false;
567
+ const viewportKey = viewport.toLowerCase();
568
+ return isViewportAvailable(state, viewportKey) && blockVisibilityViewport?.[viewportKey] === false;
489
569
  }
490
570
  return false;
491
571
  };
@@ -560,12 +640,26 @@ var DEFAULT_BLOCK_STYLE_STATE = {
560
640
  viewport: "default",
561
641
  pseudo: "default"
562
642
  };
563
- function getSelectedBlockStyleState(state, clientId) {
564
- if (state.selectedBlockStyleState?.clientId !== clientId) {
565
- return DEFAULT_BLOCK_STYLE_STATE;
566
- }
567
- return state.selectedBlockStyleState.value ?? DEFAULT_BLOCK_STYLE_STATE;
568
- }
643
+ function getStyleStateViewport(state) {
644
+ return state.styleStateViewport ?? DEFAULT_BLOCK_STYLE_STATE.viewport;
645
+ }
646
+ function isResponsiveEditing(state) {
647
+ return state.isResponsiveEditing;
648
+ }
649
+ var getSelectedBlockStyleState = (0, import_data.createSelector)(
650
+ (state, clientId) => {
651
+ const perBlockState = state.selectedBlockStyleState?.clientId === clientId ? state.selectedBlockStyleState.value ?? DEFAULT_BLOCK_STYLE_STATE : DEFAULT_BLOCK_STYLE_STATE;
652
+ return {
653
+ ...perBlockState,
654
+ // The viewport is tracked globally, so inject it here. This way
655
+ // consumers receive a single combined state object instead of
656
+ // merging the global viewport themselves, and selectors derived
657
+ // from this stay consistent.
658
+ viewport: getStyleStateViewport(state)
659
+ };
660
+ },
661
+ (state) => [state.styleStateViewport, state.selectedBlockStyleState]
662
+ );
569
663
  function hasSelectedStyleState(state, clientId) {
570
664
  const selectedState = getSelectedBlockStyleState(state, clientId);
571
665
  return selectedState.viewport !== DEFAULT_BLOCK_STYLE_STATE.viewport || selectedState.pseudo !== DEFAULT_BLOCK_STYLE_STATE.pseudo;
@@ -596,6 +690,7 @@ function isSelectedBlockStyleStateShownOnCanvas(state, clientId) {
596
690
  getInsertionPoint,
597
691
  getLastFocus,
598
692
  getLastInsertedBlocksClientIds,
693
+ getListViewClientIdsTree,
599
694
  getListViewExpandRevision,
600
695
  getParentSectionBlock,
601
696
  getPatternBySlug,
@@ -606,6 +701,7 @@ function isSelectedBlockStyleStateShownOnCanvas(state, clientId) {
606
701
  getSectionRootClientId,
607
702
  getSelectedBlockStyleState,
608
703
  getStyleOverrides,
704
+ getStyleStateViewport,
609
705
  getViewportModalClientIds,
610
706
  getZoomLevel,
611
707
  hasAllowedPatterns,
@@ -626,6 +722,7 @@ function isSelectedBlockStyleStateShownOnCanvas(state, clientId) {
626
722
  isLockedBlock,
627
723
  isMoveLockedBlock,
628
724
  isRemoveLockedBlock,
725
+ isResponsiveEditing,
629
726
  isSectionBlock,
630
727
  isSelectedBlockStyleStateShownOnCanvas,
631
728
  isWithinEditedContentOnlySection,