@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
@@ -32,7 +32,8 @@ function ListViewBlockSelectButton({
32
32
  draggable,
33
33
  isExpanded,
34
34
  ariaDescribedBy,
35
- visibilityLabel
35
+ visibilityLabel,
36
+ isDisabled = false
36
37
  }, ref) {
37
38
  const blockInformation = useBlockDisplayInformation(clientId);
38
39
  const blockTitle = useBlockDisplayTitle({
@@ -52,94 +53,99 @@ function ListViewBlockSelectButton({
52
53
  onClick(event);
53
54
  }
54
55
  }
55
- return /* @__PURE__ */ jsxs(
56
- "a",
57
- {
58
- className: clsx(
59
- "block-editor-list-view-block-select-button",
60
- className
61
- ),
62
- onClick,
63
- onContextMenu,
64
- onKeyDown,
65
- onMouseDown,
66
- ref,
67
- tabIndex,
68
- onFocus,
69
- onDragStart: onDragStartHandler,
70
- onDragEnd,
71
- draggable,
72
- href: `#block-${clientId}`,
73
- "aria-describedby": ariaDescribedBy,
74
- "aria-expanded": isExpanded,
75
- children: [
76
- /* @__PURE__ */ jsx(ListViewExpander, { onClick: onToggleExpanded }),
77
- /* @__PURE__ */ jsx(
78
- BlockIcon,
79
- {
80
- icon: blockInformation?.icon,
81
- showColors: true,
82
- context: "list-view"
83
- }
56
+ return (
57
+ // Disabled list view items intentionally omit href so TreeGrid skips them.
58
+ // eslint-disable-next-line jsx-a11y/anchor-is-valid
59
+ /* @__PURE__ */ jsxs(
60
+ "a",
61
+ {
62
+ className: clsx(
63
+ "block-editor-list-view-block-select-button",
64
+ className
84
65
  ),
85
- /* @__PURE__ */ jsxs(
86
- HStack,
87
- {
88
- alignment: "center",
89
- className: "block-editor-list-view-block-select-button__label-wrapper",
90
- justify: "flex-start",
91
- spacing: 1,
92
- children: [
93
- /* @__PURE__ */ jsx("span", { className: "block-editor-list-view-block-select-button__title", children: /* @__PURE__ */ jsx(Truncate, { ellipsizeMode: "auto", children: blockTitle }) }),
94
- blockInformation?.anchor && /* @__PURE__ */ jsx("span", { className: "block-editor-list-view-block-select-button__anchor-wrapper", children: /* @__PURE__ */ jsx(WCBadge, { className: "block-editor-list-view-block-select-button__anchor", children: blockInformation.anchor }) }),
95
- isSticky && /* @__PURE__ */ jsx("span", { className: "block-editor-list-view-block-select-button__sticky", children: /* @__PURE__ */ jsx(Icon, { icon: pinSmall }) }),
96
- images.length ? /* @__PURE__ */ jsx(
97
- "span",
98
- {
99
- className: "block-editor-list-view-block-select-button__images",
100
- "aria-hidden": true,
101
- children: images.map((image, index) => /* @__PURE__ */ jsx(
102
- "span",
103
- {
104
- className: "block-editor-list-view-block-select-button__image",
105
- style: {
106
- backgroundImage: `url(${image.url})`,
107
- zIndex: images.length - index
108
- // Ensure the first image is on top, and subsequent images are behind.
109
- }
110
- },
111
- image.clientId
112
- ))
113
- }
114
- ) : null,
115
- !!visibilityLabel && // The tooltip below is a sighted-hover affordance for
116
- // the (decorative) visibility icon. The same
117
- // `visibilityLabel` is exposed to assistive technology
118
- // via the row's `aria-describedby`, which references the
119
- // hidden `AriaReferencedText` rendered by the parent
120
- // `ListViewBlock`.
121
- /* @__PURE__ */ jsxs(Tooltip.Root, { children: [
122
- /* @__PURE__ */ jsx(
123
- Tooltip.Trigger,
66
+ onClick,
67
+ onContextMenu,
68
+ onKeyDown,
69
+ onMouseDown,
70
+ ref,
71
+ tabIndex,
72
+ onFocus,
73
+ onDragStart: onDragStartHandler,
74
+ onDragEnd,
75
+ draggable,
76
+ href: isDisabled ? void 0 : `#block-${clientId}`,
77
+ "aria-disabled": isDisabled ? true : void 0,
78
+ "aria-describedby": ariaDescribedBy,
79
+ "aria-expanded": isExpanded,
80
+ children: [
81
+ /* @__PURE__ */ jsx(ListViewExpander, { onClick: onToggleExpanded }),
82
+ /* @__PURE__ */ jsx(
83
+ BlockIcon,
84
+ {
85
+ icon: blockInformation?.icon,
86
+ showColors: true,
87
+ context: "list-view"
88
+ }
89
+ ),
90
+ /* @__PURE__ */ jsxs(
91
+ HStack,
92
+ {
93
+ alignment: "center",
94
+ className: "block-editor-list-view-block-select-button__label-wrapper",
95
+ justify: "flex-start",
96
+ spacing: 1,
97
+ children: [
98
+ /* @__PURE__ */ jsx("span", { className: "block-editor-list-view-block-select-button__title", children: /* @__PURE__ */ jsx(Truncate, { ellipsizeMode: "auto", children: blockTitle }) }),
99
+ blockInformation?.anchor && /* @__PURE__ */ jsx("span", { className: "block-editor-list-view-block-select-button__anchor-wrapper", children: /* @__PURE__ */ jsx(WCBadge, { className: "block-editor-list-view-block-select-button__anchor", children: blockInformation.anchor }) }),
100
+ isSticky && /* @__PURE__ */ jsx("span", { className: "block-editor-list-view-block-select-button__sticky", children: /* @__PURE__ */ jsx(Icon, { icon: pinSmall }) }),
101
+ images.length ? /* @__PURE__ */ jsx(
102
+ "span",
124
103
  {
125
- render: /* @__PURE__ */ jsx(
104
+ className: "block-editor-list-view-block-select-button__images",
105
+ "aria-hidden": true,
106
+ children: images.map((image, index) => /* @__PURE__ */ jsx(
126
107
  "span",
127
108
  {
128
- className: "block-editor-list-view-block-select-button__block-visibility",
129
- "aria-hidden": "true",
130
- children: /* @__PURE__ */ jsx(Icon, { icon: unseen })
131
- }
132
- )
109
+ className: "block-editor-list-view-block-select-button__image",
110
+ style: {
111
+ backgroundImage: `url(${image.url})`,
112
+ zIndex: images.length - index
113
+ // Ensure the first image is on top, and subsequent images are behind.
114
+ }
115
+ },
116
+ image.clientId
117
+ ))
133
118
  }
134
- ),
135
- /* @__PURE__ */ jsx(Tooltip.Popup, { children: visibilityLabel })
136
- ] }),
137
- shouldShowLockIcon && /* @__PURE__ */ jsx("span", { className: "block-editor-list-view-block-select-button__lock", children: /* @__PURE__ */ jsx(Icon, { icon: lock }) })
138
- ]
139
- }
140
- )
141
- ]
142
- }
119
+ ) : null,
120
+ !!visibilityLabel && // The tooltip below is a sighted-hover affordance for
121
+ // the (decorative) visibility icon. The same
122
+ // `visibilityLabel` is exposed to assistive technology
123
+ // via the row's `aria-describedby`, which references the
124
+ // hidden `AriaReferencedText` rendered by the parent
125
+ // `ListViewBlock`.
126
+ /* @__PURE__ */ jsxs(Tooltip.Root, { children: [
127
+ /* @__PURE__ */ jsx(
128
+ Tooltip.Trigger,
129
+ {
130
+ render: /* @__PURE__ */ jsx(
131
+ "span",
132
+ {
133
+ className: "block-editor-list-view-block-select-button__block-visibility",
134
+ "aria-hidden": "true",
135
+ children: /* @__PURE__ */ jsx(Icon, { icon: unseen })
136
+ }
137
+ )
138
+ }
139
+ ),
140
+ /* @__PURE__ */ jsx(Tooltip.Popup, { children: visibilityLabel })
141
+ ] }),
142
+ shouldShowLockIcon && /* @__PURE__ */ jsx("span", { className: "block-editor-list-view-block-select-button__lock", children: /* @__PURE__ */ jsx(Icon, { icon: lock }) })
143
+ ]
144
+ }
145
+ )
146
+ ]
147
+ }
148
+ )
143
149
  );
144
150
  }
145
151
  var block_select_button_default = forwardRef(ListViewBlockSelectButton);
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/list-view/block-select-button.js"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalHStack as HStack,\n\t__experimentalTruncate as Truncate,\n\tprivateApis as componentsPrivateApis,\n} from '@wordpress/components';\nimport { forwardRef } from '@wordpress/element';\nimport { Icon, lockSmall as lock, pinSmall, unseen } from '@wordpress/icons';\nimport { SPACE, ENTER } from '@wordpress/keycodes';\n\nimport { Tooltip } from '@wordpress/ui';\n\n/**\n * Internal dependencies\n */\nimport BlockIcon from '../block-icon';\nimport useBlockDisplayInformation from '../use-block-display-information';\nimport useBlockDisplayTitle from '../block-title/use-block-display-title';\nimport ListViewExpander from './expander';\nimport { useBlockLock } from '../block-lock';\nimport useListViewImages from './use-list-view-images';\nimport { unlock } from '../../lock-unlock';\n\nconst { Badge: WCBadge } = unlock( componentsPrivateApis );\n\nfunction ListViewBlockSelectButton(\n\t{\n\t\tclassName,\n\t\tblock: { clientId },\n\t\tonClick,\n\t\tonContextMenu,\n\t\tonMouseDown,\n\t\tonToggleExpanded,\n\t\ttabIndex,\n\t\tonFocus,\n\t\tonDragStart,\n\t\tonDragEnd,\n\t\tdraggable,\n\t\tisExpanded,\n\t\tariaDescribedBy,\n\t\tvisibilityLabel,\n\t},\n\tref\n) {\n\tconst blockInformation = useBlockDisplayInformation( clientId );\n\tconst blockTitle = useBlockDisplayTitle( {\n\t\tclientId,\n\t\tcontext: 'list-view',\n\t} );\n\tconst { isLocked } = useBlockLock( clientId );\n\n\tconst shouldShowLockIcon = isLocked;\n\tconst isSticky = blockInformation?.positionType === 'sticky';\n\tconst images = useListViewImages( { clientId, isExpanded } );\n\n\t// The `href` attribute triggers the browser's native HTML drag operations.\n\t// When the link is dragged, the element's outerHTML is set in DataTransfer object as text/html.\n\t// We need to clear any HTML drag data to prevent `pasteHandler` from firing\n\t// inside the `useOnBlockDrop` hook.\n\tconst onDragStartHandler = ( event ) => {\n\t\tevent.dataTransfer.clearData();\n\t\tonDragStart?.( event );\n\t};\n\n\t/**\n\t * @param {KeyboardEvent} event\n\t */\n\tfunction onKeyDown( event ) {\n\t\tif ( event.keyCode === ENTER || event.keyCode === SPACE ) {\n\t\t\tonClick( event );\n\t\t}\n\t}\n\n\treturn (\n\t\t<a\n\t\t\tclassName={ clsx(\n\t\t\t\t'block-editor-list-view-block-select-button',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\tonClick={ onClick }\n\t\t\tonContextMenu={ onContextMenu }\n\t\t\tonKeyDown={ onKeyDown }\n\t\t\tonMouseDown={ onMouseDown }\n\t\t\tref={ ref }\n\t\t\ttabIndex={ tabIndex }\n\t\t\tonFocus={ onFocus }\n\t\t\tonDragStart={ onDragStartHandler }\n\t\t\tonDragEnd={ onDragEnd }\n\t\t\tdraggable={ draggable }\n\t\t\thref={ `#block-${ clientId }` }\n\t\t\taria-describedby={ ariaDescribedBy }\n\t\t\taria-expanded={ isExpanded }\n\t\t>\n\t\t\t<ListViewExpander onClick={ onToggleExpanded } />\n\t\t\t<BlockIcon\n\t\t\t\ticon={ blockInformation?.icon }\n\t\t\t\tshowColors\n\t\t\t\tcontext=\"list-view\"\n\t\t\t/>\n\t\t\t<HStack\n\t\t\t\talignment=\"center\"\n\t\t\t\tclassName=\"block-editor-list-view-block-select-button__label-wrapper\"\n\t\t\t\tjustify=\"flex-start\"\n\t\t\t\tspacing={ 1 }\n\t\t\t>\n\t\t\t\t<span className=\"block-editor-list-view-block-select-button__title\">\n\t\t\t\t\t<Truncate ellipsizeMode=\"auto\">{ blockTitle }</Truncate>\n\t\t\t\t</span>\n\t\t\t\t{ blockInformation?.anchor && (\n\t\t\t\t\t<span className=\"block-editor-list-view-block-select-button__anchor-wrapper\">\n\t\t\t\t\t\t<WCBadge className=\"block-editor-list-view-block-select-button__anchor\">\n\t\t\t\t\t\t\t{ blockInformation.anchor }\n\t\t\t\t\t\t</WCBadge>\n\t\t\t\t\t</span>\n\t\t\t\t) }\n\t\t\t\t{ isSticky && (\n\t\t\t\t\t<span className=\"block-editor-list-view-block-select-button__sticky\">\n\t\t\t\t\t\t<Icon icon={ pinSmall } />\n\t\t\t\t\t</span>\n\t\t\t\t) }\n\t\t\t\t{ images.length ? (\n\t\t\t\t\t<span\n\t\t\t\t\t\tclassName=\"block-editor-list-view-block-select-button__images\"\n\t\t\t\t\t\taria-hidden\n\t\t\t\t\t>\n\t\t\t\t\t\t{ images.map( ( image, index ) => (\n\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\tclassName=\"block-editor-list-view-block-select-button__image\"\n\t\t\t\t\t\t\t\tkey={ image.clientId }\n\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\tbackgroundImage: `url(${ image.url })`,\n\t\t\t\t\t\t\t\t\tzIndex: images.length - index, // Ensure the first image is on top, and subsequent images are behind.\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) ) }\n\t\t\t\t\t</span>\n\t\t\t\t) : null }\n\t\t\t\t{ !! visibilityLabel && (\n\t\t\t\t\t// The tooltip below is a sighted-hover affordance for\n\t\t\t\t\t// the (decorative) visibility icon. The same\n\t\t\t\t\t// `visibilityLabel` is exposed to assistive technology\n\t\t\t\t\t// via the row's `aria-describedby`, which references the\n\t\t\t\t\t// hidden `AriaReferencedText` rendered by the parent\n\t\t\t\t\t// `ListViewBlock`.\n\t\t\t\t\t<Tooltip.Root>\n\t\t\t\t\t\t<Tooltip.Trigger\n\t\t\t\t\t\t\trender={\n\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\tclassName=\"block-editor-list-view-block-select-button__block-visibility\"\n\t\t\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Icon icon={ unseen } />\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Tooltip.Popup>{ visibilityLabel }</Tooltip.Popup>\n\t\t\t\t\t</Tooltip.Root>\n\t\t\t\t) }\n\t\t\t\t{ shouldShowLockIcon && (\n\t\t\t\t\t<span className=\"block-editor-list-view-block-select-button__lock\">\n\t\t\t\t\t\t<Icon icon={ lock } />\n\t\t\t\t\t</span>\n\t\t\t\t) }\n\t\t\t</HStack>\n\t\t</a>\n\t);\n}\n\nexport default forwardRef( ListViewBlockSelectButton );\n"],
5
- "mappings": ";AAGA,OAAO,UAAU;AAKjB;AAAA,EACC,wBAAwB;AAAA,EACxB,0BAA0B;AAAA,EAC1B,eAAe;AAAA,OACT;AACP,SAAS,kBAAkB;AAC3B,SAAS,MAAM,aAAa,MAAM,UAAU,cAAc;AAC1D,SAAS,OAAO,aAAa;AAE7B,SAAS,eAAe;AAKxB,OAAO,eAAe;AACtB,OAAO,gCAAgC;AACvC,OAAO,0BAA0B;AACjC,OAAO,sBAAsB;AAC7B,SAAS,o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/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalHStack as HStack,\n\t__experimentalTruncate as Truncate,\n\tprivateApis as componentsPrivateApis,\n} from '@wordpress/components';\nimport { forwardRef } from '@wordpress/element';\nimport { Icon, lockSmall as lock, pinSmall, unseen } from '@wordpress/icons';\nimport { SPACE, ENTER } from '@wordpress/keycodes';\n\nimport { Tooltip } from '@wordpress/ui';\n\n/**\n * Internal dependencies\n */\nimport BlockIcon from '../block-icon';\nimport useBlockDisplayInformation from '../use-block-display-information';\nimport useBlockDisplayTitle from '../block-title/use-block-display-title';\nimport ListViewExpander from './expander';\nimport { useBlockLock } from '../block-lock';\nimport useListViewImages from './use-list-view-images';\nimport { unlock } from '../../lock-unlock';\n\nconst { Badge: WCBadge } = unlock( componentsPrivateApis );\n\nfunction ListViewBlockSelectButton(\n\t{\n\t\tclassName,\n\t\tblock: { clientId },\n\t\tonClick,\n\t\tonContextMenu,\n\t\tonMouseDown,\n\t\tonToggleExpanded,\n\t\ttabIndex,\n\t\tonFocus,\n\t\tonDragStart,\n\t\tonDragEnd,\n\t\tdraggable,\n\t\tisExpanded,\n\t\tariaDescribedBy,\n\t\tvisibilityLabel,\n\t\tisDisabled = false,\n\t},\n\tref\n) {\n\tconst blockInformation = useBlockDisplayInformation( clientId );\n\tconst blockTitle = useBlockDisplayTitle( {\n\t\tclientId,\n\t\tcontext: 'list-view',\n\t} );\n\tconst { isLocked } = useBlockLock( clientId );\n\n\tconst shouldShowLockIcon = isLocked;\n\tconst isSticky = blockInformation?.positionType === 'sticky';\n\tconst images = useListViewImages( { clientId, isExpanded } );\n\n\t// The `href` attribute triggers the browser's native HTML drag operations.\n\t// When the link is dragged, the element's outerHTML is set in DataTransfer object as text/html.\n\t// We need to clear any HTML drag data to prevent `pasteHandler` from firing\n\t// inside the `useOnBlockDrop` hook.\n\tconst onDragStartHandler = ( event ) => {\n\t\tevent.dataTransfer.clearData();\n\t\tonDragStart?.( event );\n\t};\n\n\t/**\n\t * @param {KeyboardEvent} event\n\t */\n\tfunction onKeyDown( event ) {\n\t\tif ( event.keyCode === ENTER || event.keyCode === SPACE ) {\n\t\t\tonClick( event );\n\t\t}\n\t}\n\n\treturn (\n\t\t// Disabled list view items intentionally omit href so TreeGrid skips them.\n\t\t// eslint-disable-next-line jsx-a11y/anchor-is-valid\n\t\t<a\n\t\t\tclassName={ clsx(\n\t\t\t\t'block-editor-list-view-block-select-button',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\tonClick={ onClick }\n\t\t\tonContextMenu={ onContextMenu }\n\t\t\tonKeyDown={ onKeyDown }\n\t\t\tonMouseDown={ onMouseDown }\n\t\t\tref={ ref }\n\t\t\ttabIndex={ tabIndex }\n\t\t\tonFocus={ onFocus }\n\t\t\tonDragStart={ onDragStartHandler }\n\t\t\tonDragEnd={ onDragEnd }\n\t\t\tdraggable={ draggable }\n\t\t\thref={ isDisabled ? undefined : `#block-${ clientId }` }\n\t\t\taria-disabled={ isDisabled ? true : undefined }\n\t\t\taria-describedby={ ariaDescribedBy }\n\t\t\taria-expanded={ isExpanded }\n\t\t>\n\t\t\t<ListViewExpander onClick={ onToggleExpanded } />\n\t\t\t<BlockIcon\n\t\t\t\ticon={ blockInformation?.icon }\n\t\t\t\tshowColors\n\t\t\t\tcontext=\"list-view\"\n\t\t\t/>\n\t\t\t<HStack\n\t\t\t\talignment=\"center\"\n\t\t\t\tclassName=\"block-editor-list-view-block-select-button__label-wrapper\"\n\t\t\t\tjustify=\"flex-start\"\n\t\t\t\tspacing={ 1 }\n\t\t\t>\n\t\t\t\t<span className=\"block-editor-list-view-block-select-button__title\">\n\t\t\t\t\t<Truncate ellipsizeMode=\"auto\">{ blockTitle }</Truncate>\n\t\t\t\t</span>\n\t\t\t\t{ blockInformation?.anchor && (\n\t\t\t\t\t<span className=\"block-editor-list-view-block-select-button__anchor-wrapper\">\n\t\t\t\t\t\t<WCBadge className=\"block-editor-list-view-block-select-button__anchor\">\n\t\t\t\t\t\t\t{ blockInformation.anchor }\n\t\t\t\t\t\t</WCBadge>\n\t\t\t\t\t</span>\n\t\t\t\t) }\n\t\t\t\t{ isSticky && (\n\t\t\t\t\t<span className=\"block-editor-list-view-block-select-button__sticky\">\n\t\t\t\t\t\t<Icon icon={ pinSmall } />\n\t\t\t\t\t</span>\n\t\t\t\t) }\n\t\t\t\t{ images.length ? (\n\t\t\t\t\t<span\n\t\t\t\t\t\tclassName=\"block-editor-list-view-block-select-button__images\"\n\t\t\t\t\t\taria-hidden\n\t\t\t\t\t>\n\t\t\t\t\t\t{ images.map( ( image, index ) => (\n\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\tclassName=\"block-editor-list-view-block-select-button__image\"\n\t\t\t\t\t\t\t\tkey={ image.clientId }\n\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\tbackgroundImage: `url(${ image.url })`,\n\t\t\t\t\t\t\t\t\tzIndex: images.length - index, // Ensure the first image is on top, and subsequent images are behind.\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) ) }\n\t\t\t\t\t</span>\n\t\t\t\t) : null }\n\t\t\t\t{ !! visibilityLabel && (\n\t\t\t\t\t// The tooltip below is a sighted-hover affordance for\n\t\t\t\t\t// the (decorative) visibility icon. The same\n\t\t\t\t\t// `visibilityLabel` is exposed to assistive technology\n\t\t\t\t\t// via the row's `aria-describedby`, which references the\n\t\t\t\t\t// hidden `AriaReferencedText` rendered by the parent\n\t\t\t\t\t// `ListViewBlock`.\n\t\t\t\t\t<Tooltip.Root>\n\t\t\t\t\t\t<Tooltip.Trigger\n\t\t\t\t\t\t\trender={\n\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\tclassName=\"block-editor-list-view-block-select-button__block-visibility\"\n\t\t\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Icon icon={ unseen } />\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Tooltip.Popup>{ visibilityLabel }</Tooltip.Popup>\n\t\t\t\t\t</Tooltip.Root>\n\t\t\t\t) }\n\t\t\t\t{ shouldShowLockIcon && (\n\t\t\t\t\t<span className=\"block-editor-list-view-block-select-button__lock\">\n\t\t\t\t\t\t<Icon icon={ lock } />\n\t\t\t\t\t</span>\n\t\t\t\t) }\n\t\t\t</HStack>\n\t\t</a>\n\t);\n}\n\nexport default forwardRef( ListViewBlockSelectButton );\n"],
5
+ "mappings": ";AAGA,OAAO,UAAU;AAKjB;AAAA,EACC,wBAAwB;AAAA,EACxB,0BAA0B;AAAA,EAC1B,eAAe;AAAA,OACT;AACP,SAAS,kBAAkB;AAC3B,SAAS,MAAM,aAAa,MAAM,UAAU,cAAc;AAC1D,SAAS,OAAO,aAAa;AAE7B,SAAS,eAAe;AAKxB,OAAO,eAAe;AACtB,OAAO,gCAAgC;AACvC,OAAO,0BAA0B;AACjC,OAAO,sBAAsB;AAC7B,SAAS,oBAAoB;AAC7B,OAAO,uBAAuB;AAC9B,SAAS,cAAc;AA4EpB,cAmDE,YAnDF;AA1EH,IAAM,EAAE,OAAO,QAAQ,IAAI,OAAQ,qBAAsB;AAEzD,SAAS,0BACR;AAAA,EACC;AAAA,EACA,OAAO,EAAE,SAAS;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,aAAa;AACd,GACA,KACC;AACD,QAAM,mBAAmB,2BAA4B,QAAS;AAC9D,QAAM,aAAa,qBAAsB;AAAA,IACxC;AAAA,IACA,SAAS;AAAA,EACV,CAAE;AACF,QAAM,EAAE,SAAS,IAAI,aAAc,QAAS;AAE5C,QAAM,qBAAqB;AAC3B,QAAM,WAAW,kBAAkB,iBAAiB;AACpD,QAAM,SAAS,kBAAmB,EAAE,UA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V,OAAQ;AAAA,0BACP,iBAAiB,OAAQ,MAAM,GAAI;AAAA,0BACnC,QAAQ,OAAO,SAAS;AAAA;AAAA,wBACzB;AAAA;AAAA,sBAJM,MAAM;AAAA,oBAKb,CACC;AAAA;AAAA,gBACH,IACG;AAAA,gBACF,CAAC,CAAE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAOJ,qBAAC,QAAQ,MAAR,EACA;AAAA;AAAA,oBAAC,QAAQ;AAAA,oBAAR;AAAA,sBACA,QACC;AAAA,wBAAC;AAAA;AAAA,0BACA,WAAU;AAAA,0BACV,eAAY;AAAA,0BAEZ,8BAAC,QAAK,MAAO,QAAS;AAAA;AAAA,sBACvB;AAAA;AAAA,kBAEF;AAAA,kBACA,oBAAC,QAAQ,OAAR,EAAgB,2BAAiB;AAAA,mBACnC;AAAA,gBAEC,sBACD,oBAAC,UAAK,WAAU,oDACf,8BAAC,QAAK,MAAO,MAAO,GACrB;AAAA;AAAA;AAAA,UAEF;AAAA;AAAA;AAAA,IACD;AAAA;AAEF;AAEA,IAAO,8BAAQ,WAAY,yBAA0B;",
6
6
  "names": []
7
7
  }
@@ -82,7 +82,8 @@ function ListViewBlock({
82
82
  removeBlocks,
83
83
  insertAfterBlock,
84
84
  insertBeforeBlock,
85
- showViewportModal
85
+ showViewportModal,
86
+ stopEditingContentOnlySection
86
87
  } = unlock(useDispatch(blockEditorStore));
87
88
  const debouncedToggleBlockHighlight = useDebounce(
88
89
  toggleBlockHighlight,
@@ -105,19 +106,37 @@ function ListViewBlock({
105
106
  const { getGroupingBlockName } = useSelect(blocksStore);
106
107
  const blockInformation = useBlockDisplayInformation(clientId);
107
108
  const pasteStyles = usePasteStyles();
108
- const { block, blockName, allowRightClickOverrides } = useSelect(
109
+ const {
110
+ block,
111
+ blockName,
112
+ blockEditingMode,
113
+ allowRightClickOverrides,
114
+ editedSection,
115
+ viewportSettings,
116
+ blockVisibilitySetting
117
+ } = useSelect(
109
118
  (select) => {
110
- const { getBlock, getBlockName, getSettings } = unlock(
111
- select(blockEditorStore)
112
- );
119
+ const {
120
+ getBlock,
121
+ getBlockName,
122
+ getBlockEditingMode: getBlockEditingModeForClientId,
123
+ getSettings,
124
+ getEditedContentOnlySection
125
+ } = unlock(select(blockEditorStore));
126
+ const settings = getSettings();
113
127
  return {
114
128
  block: getBlock(clientId),
115
129
  blockName: getBlockName(clientId),
116
- allowRightClickOverrides: getSettings().allowRightClickOverrides
130
+ blockEditingMode: getBlockEditingModeForClientId(clientId),
131
+ allowRightClickOverrides: settings.allowRightClickOverrides,
132
+ editedSection: getEditedContentOnlySection(),
133
+ viewportSettings: settings.__experimentalFeatures?.viewport,
134
+ blockVisibilitySetting: settings.__experimentalFeatures?.blockVisibility?.allowEditing
117
135
  };
118
136
  },
119
137
  [clientId]
120
138
  );
139
+ const isDisabled = blockEditingMode === "disabled";
121
140
  const { canRename } = useBlockRename(blockName);
122
141
  const showBlockActions = (
123
142
  // When a block hides its toolbar it also hides the block settings menu,
@@ -159,6 +178,12 @@ function ListViewBlock({
159
178
  if (event.target.closest("[role=dialog]")) {
160
179
  return;
161
180
  }
181
+ if (editedSection && isMatch("core/block-editor/unselect", event)) {
182
+ event.stopPropagation();
183
+ event.preventDefault();
184
+ stopEditingContentOnlySection();
185
+ return;
186
+ }
162
187
  const isDeleteKey = [BACKSPACE, DELETE].includes(event.keyCode);
163
188
  if (isMatch("core/block-editor/unselect", event) && selectedClientIds.length > 0) {
164
189
  event.stopPropagation();
@@ -264,6 +289,9 @@ function ListViewBlock({
264
289
  updateFocusAndSelection(newlySelectedBlocks[0], false);
265
290
  }
266
291
  } else if (isMatch("core/block-editor/toggle-block-visibility", event)) {
292
+ if (blockVisibilitySetting === false) {
293
+ return;
294
+ }
267
295
  event.preventDefault();
268
296
  const { blocksToUpdate } = getBlocksToUpdate();
269
297
  const blocks = getBlocksByClientId(blocksToUpdate);
@@ -382,10 +410,12 @@ function ListViewBlock({
382
410
  isLocked
383
411
  );
384
412
  const blockVisibilityDescription = getBlockVisibilityLabel(
385
- block?.attributes?.metadata?.blockVisibility
413
+ block?.attributes?.metadata?.blockVisibility,
414
+ viewportSettings
386
415
  );
387
416
  const hasSiblings = siblingBlockCount > 0;
388
- const hasRenderedMovers = showBlockMovers && hasSiblings;
417
+ const canShowBlockActions = showBlockActions && !isDisabled;
418
+ const hasRenderedMovers = showBlockMovers && hasSiblings && !isDisabled;
389
419
  const moverCellClassName = clsx(
390
420
  "block-editor-list-view-block__mover-cell",
391
421
  { "is-visible": isHovered || isSelected }
@@ -397,7 +427,7 @@ function ListViewBlock({
397
427
  let colSpan;
398
428
  if (hasRenderedMovers) {
399
429
  colSpan = 2;
400
- } else if (!showBlockActions) {
430
+ } else if (!canShowBlockActions) {
401
431
  colSpan = 3;
402
432
  }
403
433
  const classes = clsx({
@@ -409,25 +439,34 @@ function ListViewBlock({
409
439
  "is-dragging": isDragged,
410
440
  "has-single-cell": !showBlockActions,
411
441
  "is-synced": blockInformation?.isSynced,
412
- "is-draggable": canMoveBlock,
442
+ "is-draggable": canMoveBlock && !isDisabled,
413
443
  "is-displacement-normal": displacement === "normal",
414
444
  "is-displacement-up": displacement === "up",
415
445
  "is-displacement-down": displacement === "down",
416
446
  "is-after-dragged-blocks": isAfterDraggedBlocks,
417
- "is-nesting": isNesting
447
+ "is-nesting": isNesting,
448
+ "is-disabled": isDisabled
418
449
  });
419
450
  const dropdownClientIds = selectedClientIds.includes(clientId) ? selectedClientIds : [clientId];
420
- const currentlyEditingBlockInCanvas = isSelected && selectedClientIds.length === 1;
451
+ const getListViewBlockTabIndex = (rovingTabIndex) => {
452
+ if (isDisabled) {
453
+ return -1;
454
+ }
455
+ if (isSelected && selectedClientIds.length === 1) {
456
+ return 0;
457
+ }
458
+ return rovingTabIndex;
459
+ };
421
460
  return /* @__PURE__ */ jsxs(
422
461
  ListViewLeaf,
423
462
  {
424
463
  className: classes,
425
464
  isDragged,
426
465
  onKeyDown,
427
- onMouseEnter,
428
- onMouseLeave,
429
- onFocus: onMouseEnter,
430
- onBlur: onMouseLeave,
466
+ onMouseEnter: isDisabled ? void 0 : onMouseEnter,
467
+ onMouseLeave: isDisabled ? void 0 : onMouseLeave,
468
+ onFocus: isDisabled ? void 0 : onMouseEnter,
469
+ onBlur: isDisabled ? void 0 : onMouseLeave,
431
470
  level,
432
471
  position,
433
472
  rowCount,
@@ -450,20 +489,21 @@ function ListViewBlock({
450
489
  {
451
490
  block,
452
491
  onClick: selectEditorBlock,
453
- onContextMenu,
492
+ onContextMenu: isDisabled ? void 0 : onContextMenu,
454
493
  onMouseDown,
455
- onToggleExpanded: toggleExpanded,
494
+ onToggleExpanded: isDisabled ? void 0 : toggleExpanded,
456
495
  isSelected,
457
496
  position,
458
497
  siblingBlockCount,
459
498
  level,
460
499
  ref,
461
- tabIndex: currentlyEditingBlockInCanvas ? 0 : tabIndex,
500
+ tabIndex: getListViewBlockTabIndex(tabIndex),
462
501
  onFocus,
463
502
  isExpanded: canEditBlock ? isExpanded : void 0,
464
503
  selectedClientIds,
465
504
  ariaDescribedBy: descriptionId,
466
- visibilityLabel: blockVisibilityDescription
505
+ visibilityLabel: blockVisibilityDescription,
506
+ isDisabled
467
507
  }
468
508
  ),
469
509
  /* @__PURE__ */ jsx(AriaReferencedText, { id: descriptionId, children: [
@@ -503,7 +543,7 @@ function ListViewBlock({
503
543
  ]
504
544
  }
505
545
  ) }),
506
- showBlockActions && BlockSettingsMenu && /* @__PURE__ */ jsx(
546
+ canShowBlockActions && BlockSettingsMenu && /* @__PURE__ */ jsx(
507
547
  TreeGridCell,
508
548
  {
509
549
  className: listViewBlockSettingsClassName,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/list-view/block.js"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\thasBlockSupport,\n\tswitchToBlockType,\n\tstore as blocksStore,\n} from '@wordpress/blocks';\nimport {\n\t__experimentalTreeGridCell as TreeGridCell,\n\t__experimentalTreeGridItem as TreeGridItem,\n} from '@wordpress/components';\nimport { useInstanceId, useDebounce } from '@wordpress/compose';\nimport { moreVertical } from '@wordpress/icons';\nimport {\n\tuseCallback,\n\tuseMemo,\n\tuseState,\n\tuseRef,\n\tmemo,\n} from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { BACKSPACE, DELETE } from '@wordpress/keycodes';\nimport { isShallowEqual } from '@wordpress/is-shallow-equal';\nimport { __unstableUseShortcutEventMatch as useShortcutEventMatch } from '@wordpress/keyboard-shortcuts';\nimport { speak } from '@wordpress/a11y';\n\n/**\n * Internal dependencies\n */\nimport ListViewLeaf from './leaf';\nimport useListViewScrollIntoView from './use-list-view-scroll-into-view';\nimport {\n\tBlockMoverUpButton,\n\tBlockMoverDownButton,\n} from '../block-mover/button';\nimport ListViewBlockContents from './block-contents';\nimport { useListViewContext } from './context';\nimport {\n\tgetBlockPositionDescription,\n\tgetBlockPropertiesDescription,\n\tfocusListItem,\n} from './utils';\nimport { store as blockEditorStore } from '../../store';\nimport useBlockDisplayInformation from '../use-block-display-information';\nimport { useBlockLock } from '../block-lock';\nimport { useBlockRename, BlockRenameModal } from '../block-rename';\nimport AriaReferencedText from './aria-referenced-text';\nimport { unlock } from '../../lock-unlock';\nimport usePasteStyles from '../use-paste-styles';\nimport { getBlockVisibilityLabel } from '../block-visibility';\n\nfunction ListViewBlock( {\n\tblock: { clientId },\n\tdisplacement,\n\tisAfterDraggedBlocks,\n\tisDragged,\n\tisNesting,\n\tisSelected,\n\tisBranchSelected,\n\tselectBlock,\n\tposition,\n\tlevel,\n\trowCount,\n\tsiblingBlockCount,\n\tshowBlockMovers,\n\tpath,\n\tisExpanded,\n\tselectedClientIds,\n\tisSyncedBranch,\n} ) {\n\tconst cellRef = useRef( null );\n\tconst rowRef = useRef( null );\n\tconst settingsRef = useRef( null );\n\tconst [ isHovered, setIsHovered ] = useState( false );\n\tconst [ settingsAnchorRect, setSettingsAnchorRect ] = useState();\n\tconst [ isRenameModalOpen, setIsRenameModalOpen ] = useState( false );\n\tconst { isLocked } = useBlockLock( clientId );\n\n\tconst isFirstSelectedBlock =\n\t\tisSelected && selectedClientIds[ 0 ] === clientId;\n\tconst isLastSelectedBlock =\n\t\tisSelected &&\n\t\tselectedClientIds[ selectedClientIds.length - 1 ] === clientId;\n\n\tconst {\n\t\ttoggleBlockHighlight,\n\t\tduplicateBlocks,\n\t\tmultiSelect,\n\t\treplaceBlocks,\n\t\tremoveBlocks,\n\t\tinsertAfterBlock,\n\t\tinsertBeforeBlock,\n\t\tshowViewportModal,\n\t} = unlock( useDispatch( blockEditorStore ) );\n\n\tconst debouncedToggleBlockHighlight = useDebounce(\n\t\ttoggleBlockHighlight,\n\t\t50\n\t);\n\n\tconst {\n\t\tcanInsertBlockType,\n\t\tgetSelectedBlockClientIds,\n\t\tgetPreviousBlockClientId,\n\t\tgetBlockRootClientId,\n\t\tgetBlockOrder,\n\t\tgetBlockParents,\n\t\tgetBlockEditingMode,\n\t\tgetBlocksByClientId,\n\t\tcanEditBlock,\n\t\tcanMoveBlock,\n\t\tcanRemoveBlocks,\n\t\tisGroupable,\n\t} = useSelect( blockEditorStore );\n\tconst { getGroupingBlockName } = useSelect( blocksStore );\n\n\tconst blockInformation = useBlockDisplayInformation( clientId );\n\n\tconst pasteStyles = usePasteStyles();\n\n\tconst { block, blockName, allowRightClickOverrides } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlock, getBlockName, getSettings } = unlock(\n\t\t\t\tselect( blockEditorStore )\n\t\t\t);\n\n\t\t\treturn {\n\t\t\t\tblock: getBlock( clientId ),\n\t\t\t\tblockName: getBlockName( clientId ),\n\t\t\t\tallowRightClickOverrides:\n\t\t\t\t\tgetSettings().allowRightClickOverrides,\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\tconst { canRename } = useBlockRename( blockName );\n\n\tconst showBlockActions =\n\t\t// When a block hides its toolbar it also hides the block settings menu,\n\t\t// since that menu is part of the toolbar in the editor canvas.\n\t\t// List View respects this by also hiding the block settings menu.\n\t\thasBlockSupport( blockName, '__experimentalToolbar', true );\n\tconst instanceId = useInstanceId( ListViewBlock );\n\tconst descriptionId = `list-view-block-select-button__description-${ instanceId }`;\n\n\tconst {\n\t\texpand,\n\t\tcollapse,\n\t\tcollapseAll,\n\t\tBlockSettingsMenu,\n\t\tlistViewInstanceId,\n\t\texpandedState,\n\t\tsetInsertedBlock,\n\t\ttreeGridElementRef,\n\t\trootClientId,\n\t} = useListViewContext();\n\tconst isMatch = useShortcutEventMatch();\n\n\t// Determine which blocks to update:\n\t// If the current (focused) block is part of the block selection, use the whole selection.\n\t// If the focused block is not part of the block selection, only update the focused block.\n\tfunction getBlocksToUpdate() {\n\t\tconst selectedBlockClientIds = getSelectedBlockClientIds();\n\t\tconst isUpdatingSelectedBlocks =\n\t\t\tselectedBlockClientIds.includes( clientId );\n\t\tconst firstBlockClientId = isUpdatingSelectedBlocks\n\t\t\t? selectedBlockClientIds[ 0 ]\n\t\t\t: clientId;\n\t\tconst firstBlockRootClientId =\n\t\t\tgetBlockRootClientId( firstBlockClientId );\n\n\t\tconst blocksToUpdate = isUpdatingSelectedBlocks\n\t\t\t? selectedBlockClientIds\n\t\t\t: [ clientId ];\n\n\t\treturn {\n\t\t\tblocksToUpdate,\n\t\t\tfirstBlockClientId,\n\t\t\tfirstBlockRootClientId,\n\t\t\tselectedBlockClientIds,\n\t\t};\n\t}\n\n\t/**\n\t * @param {KeyboardEvent} event\n\t */\n\tasync function onKeyDown( event ) {\n\t\tif ( event.defaultPrevented ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Do not handle events if it comes from modals;\n\t\t// retain the default behavior for these keys.\n\t\tif ( event.target.closest( '[role=dialog]' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst isDeleteKey = [ BACKSPACE, DELETE ].includes( event.keyCode );\n\n\t\t// If multiple blocks are selected, deselect all blocks when the user\n\t\t// presses the escape key.\n\t\tif (\n\t\t\tisMatch( 'core/block-editor/unselect', event ) &&\n\t\t\tselectedClientIds.length > 0\n\t\t) {\n\t\t\tevent.stopPropagation();\n\t\t\tevent.preventDefault();\n\t\t\tselectBlock( event, undefined );\n\t\t} else if (\n\t\t\tisDeleteKey ||\n\t\t\tisMatch( 'core/block-editor/remove', event )\n\t\t) {\n\t\t\tconst {\n\t\t\t\tblocksToUpdate: blocksToDelete,\n\t\t\t\tfirstBlockClientId,\n\t\t\t\tfirstBlockRootClientId,\n\t\t\t\tselectedBlockClientIds,\n\t\t\t} = getBlocksToUpdate();\n\n\t\t\t// Don't update the selection if the blocks cannot be deleted.\n\t\t\tif ( ! canRemoveBlocks( blocksToDelete ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlet blockToFocus =\n\t\t\t\tgetPreviousBlockClientId( firstBlockClientId ) ??\n\t\t\t\t// If the previous block is not found (when the first block is deleted),\n\t\t\t\t// fallback to focus the parent block.\n\t\t\t\tfirstBlockRootClientId;\n\n\t\t\tremoveBlocks( blocksToDelete, false );\n\n\t\t\t// Update the selection if the original selection has been removed.\n\t\t\tconst shouldUpdateSelection =\n\t\t\t\tselectedBlockClientIds.length > 0 &&\n\t\t\t\tgetSelectedBlockClientIds().length === 0;\n\n\t\t\t// If there's no previous block nor parent block, focus the first block.\n\t\t\tif ( ! blockToFocus ) {\n\t\t\t\tblockToFocus = getBlockOrder()[ 0 ];\n\t\t\t}\n\n\t\t\tupdateFocusAndSelection( blockToFocus, shouldUpdateSelection );\n\t\t} else if ( isMatch( 'core/block-editor/paste-styles', event ) ) {\n\t\t\tevent.preventDefault();\n\n\t\t\tconst { blocksToUpdate } = getBlocksToUpdate();\n\t\t\tconst blocks = getBlocksByClientId( blocksToUpdate );\n\n\t\t\tpasteStyles( blocks );\n\t\t} else if ( isMatch( 'core/block-editor/duplicate', event ) ) {\n\t\t\tevent.preventDefault();\n\n\t\t\tconst { blocksToUpdate, firstBlockRootClientId } =\n\t\t\t\tgetBlocksToUpdate();\n\n\t\t\tconst canDuplicate = getBlocksByClientId( blocksToUpdate ).every(\n\t\t\t\t( blockToUpdate ) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t!! blockToUpdate &&\n\t\t\t\t\t\thasBlockSupport(\n\t\t\t\t\t\t\tblockToUpdate.name,\n\t\t\t\t\t\t\t'multiple',\n\t\t\t\t\t\t\ttrue\n\t\t\t\t\t\t) &&\n\t\t\t\t\t\tcanInsertBlockType(\n\t\t\t\t\t\t\tblockToUpdate.name,\n\t\t\t\t\t\t\tfirstBlockRootClientId\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t);\n\n\t\t\tif ( canDuplicate ) {\n\t\t\t\tconst updatedBlocks = await duplicateBlocks(\n\t\t\t\t\tblocksToUpdate,\n\t\t\t\t\tfalse\n\t\t\t\t);\n\n\t\t\t\tif ( updatedBlocks?.length ) {\n\t\t\t\t\t// If blocks have been duplicated, focus the first duplicated block.\n\t\t\t\t\tupdateFocusAndSelection( updatedBlocks[ 0 ], false );\n\t\t\t\t}\n\t\t\t}\n\t\t} else if ( isMatch( 'core/block-editor/insert-before', event ) ) {\n\t\t\tevent.preventDefault();\n\n\t\t\tconst { blocksToUpdate } = getBlocksToUpdate();\n\t\t\tawait insertBeforeBlock( blocksToUpdate[ 0 ] );\n\t\t\tconst newlySelectedBlocks = getSelectedBlockClientIds();\n\n\t\t\t// Focus the first block of the newly inserted blocks, to keep focus within the list view.\n\t\t\tupdateFocusAndSelection( newlySelectedBlocks[ 0 ], false );\n\t\t} else if ( isMatch( 'core/block-editor/insert-after', event ) ) {\n\t\t\tevent.preventDefault();\n\n\t\t\tconst { blocksToUpdate } = getBlocksToUpdate();\n\t\t\tawait insertAfterBlock( blocksToUpdate.at( -1 ) );\n\t\t\tconst newlySelectedBlocks = getSelectedBlockClientIds();\n\n\t\t\t// Focus the first block of the newly inserted blocks, to keep focus within the list view.\n\t\t\tupdateFocusAndSelection( newlySelectedBlocks[ 0 ], false );\n\t\t} else if ( isMatch( 'core/block-editor/select-all', event ) ) {\n\t\t\tevent.preventDefault();\n\n\t\t\tconst { firstBlockRootClientId, selectedBlockClientIds } =\n\t\t\t\tgetBlocksToUpdate();\n\t\t\tconst blockClientIds = getBlockOrder( firstBlockRootClientId );\n\t\t\tif ( ! blockClientIds.length ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// If we have selected all sibling nested blocks, try selecting up a level.\n\t\t\t// This is a similar implementation to that used by `useSelectAll`.\n\t\t\t// `isShallowEqual` is used for the list view instead of a length check,\n\t\t\t// as the array of siblings of the currently focused block may be a different\n\t\t\t// set of blocks from the current block selection if the user is focused\n\t\t\t// on a different part of the list view from the block selection.\n\t\t\tif ( isShallowEqual( selectedBlockClientIds, blockClientIds ) ) {\n\t\t\t\t// Only select up a level if the first block is not the root block.\n\t\t\t\t// This ensures that the block selection can't break out of the root block\n\t\t\t\t// used by the list view, if the list view is only showing a partial hierarchy.\n\t\t\t\tif (\n\t\t\t\t\tfirstBlockRootClientId &&\n\t\t\t\t\tfirstBlockRootClientId !== rootClientId\n\t\t\t\t) {\n\t\t\t\t\tupdateFocusAndSelection( firstBlockRootClientId, true );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Select all while passing `null` to skip focusing to the editor canvas,\n\t\t\t// and retain focus within the list view.\n\t\t\tmultiSelect(\n\t\t\t\tblockClientIds[ 0 ],\n\t\t\t\tblockClientIds[ blockClientIds.length - 1 ],\n\t\t\t\tnull\n\t\t\t);\n\t\t} else if ( isMatch( 'core/block-editor/collapse-list-view', event ) ) {\n\t\t\tevent.preventDefault();\n\t\t\tconst { firstBlockClientId } = getBlocksToUpdate();\n\t\t\tconst blockParents = getBlockParents( firstBlockClientId, false );\n\t\t\t// Collapse all blocks.\n\t\t\tcollapseAll();\n\t\t\t// Expand all parents of the current block.\n\t\t\texpand( blockParents );\n\t\t} else if ( isMatch( 'core/block-editor/group', event ) ) {\n\t\t\tconst { blocksToUpdate } = getBlocksToUpdate();\n\t\t\tif ( blocksToUpdate.length > 1 && isGroupable( blocksToUpdate ) ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tconst blocks = getBlocksByClientId( blocksToUpdate );\n\t\t\t\tconst groupingBlockName = getGroupingBlockName();\n\t\t\t\tconst newBlocks = switchToBlockType(\n\t\t\t\t\tblocks,\n\t\t\t\t\tgroupingBlockName\n\t\t\t\t);\n\t\t\t\treplaceBlocks( blocksToUpdate, newBlocks );\n\t\t\t\tspeak( __( 'Selected blocks are grouped.' ) );\n\t\t\t\tconst newlySelectedBlocks = getSelectedBlockClientIds();\n\t\t\t\t// Focus the first block of the newly inserted blocks, to keep focus within the list view.\n\t\t\t\tupdateFocusAndSelection( newlySelectedBlocks[ 0 ], false );\n\t\t\t}\n\t\t} else if (\n\t\t\tisMatch( 'core/block-editor/toggle-block-visibility', event )\n\t\t) {\n\t\t\tevent.preventDefault();\n\t\t\tconst { blocksToUpdate } = getBlocksToUpdate();\n\t\t\tconst blocks = getBlocksByClientId( blocksToUpdate );\n\t\t\tconst supportsBlockVisibility = blocks.every( ( _block ) =>\n\t\t\t\thasBlockSupport( _block.name, 'visibility', true )\n\t\t\t);\n\n\t\t\tif ( ! supportsBlockVisibility ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Don't allow visibility toggle for blocks that\n\t\t\t// are not in the default editing mode.\n\t\t\tif (\n\t\t\t\tblocksToUpdate.some(\n\t\t\t\t\t( id ) => getBlockEditingMode( id ) !== 'default'\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Open the visibility breakpoints modal.\n\t\t\tshowViewportModal( blocksToUpdate );\n\t\t} else if ( isMatch( 'core/block-editor/rename', event ) ) {\n\t\t\tconst { blocksToUpdate } = getBlocksToUpdate();\n\t\t\tconst isContentOnly =\n\t\t\t\tgetBlockEditingMode( blocksToUpdate[ 0 ] ) === 'contentOnly';\n\t\t\tif ( blocksToUpdate.length === 1 && canRename && ! isContentOnly ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tsetIsRenameModalOpen( true );\n\t\t\t}\n\t\t}\n\t}\n\n\tconst onMouseEnter = useCallback( () => {\n\t\tsetIsHovered( true );\n\t\tdebouncedToggleBlockHighlight( clientId, true );\n\t}, [ clientId, setIsHovered, debouncedToggleBlockHighlight ] );\n\tconst onMouseLeave = useCallback( () => {\n\t\tsetIsHovered( false );\n\t\tdebouncedToggleBlockHighlight( clientId, false );\n\t}, [ clientId, setIsHovered, debouncedToggleBlockHighlight ] );\n\n\tconst selectEditorBlock = useCallback(\n\t\t( event ) => {\n\t\t\t// For keyboard activation (Enter/Space on a link), transfer focus\n\t\t\t// to the canvas with the caret at the end of the block.\n\t\t\t// For mouse clicks, keep focus in the list view so that subsequent\n\t\t\t// keyboard operations (arrow navigation, copy/paste) still work.\n\t\t\tconst isKeyboardActivation = event?.detail === 0;\n\t\t\tselectBlock( event, clientId, isKeyboardActivation ? -1 : null );\n\t\t\tevent.preventDefault();\n\t\t},\n\t\t[ clientId, selectBlock ]\n\t);\n\n\tconst updateFocusAndSelection = useCallback(\n\t\t( focusClientId, shouldSelectBlock ) => {\n\t\t\tif ( shouldSelectBlock ) {\n\t\t\t\tselectBlock( undefined, focusClientId, null, null );\n\t\t\t}\n\n\t\t\tfocusListItem( focusClientId, treeGridElementRef?.current );\n\t\t},\n\t\t[ selectBlock, treeGridElementRef ]\n\t);\n\n\tconst toggleExpanded = useCallback(\n\t\t( event ) => {\n\t\t\t// Prevent shift+click from opening link in a new window when toggling.\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t\tif ( isExpanded === true ) {\n\t\t\t\tcollapse( clientId );\n\t\t\t} else if ( isExpanded === false ) {\n\t\t\t\texpand( clientId );\n\t\t\t}\n\t\t},\n\t\t[ clientId, expand, collapse, isExpanded ]\n\t);\n\n\t// Allow right-clicking an item in the List View to open up the block settings dropdown.\n\tconst onContextMenu = useCallback(\n\t\t( event ) => {\n\t\t\tconst { ownerDocument } = settingsRef?.current || {};\n\t\t\tif ( ! ownerDocument || ! ownerDocument.hasFocus() ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( showBlockActions && allowRightClickOverrides ) {\n\t\t\t\tsettingsRef.current?.click();\n\t\t\t\t// Ensure the position of the settings dropdown is at the cursor.\n\t\t\t\tsetSettingsAnchorRect(\n\t\t\t\t\tnew window.DOMRect( event.clientX, event.clientY, 0, 0 )\n\t\t\t\t);\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t},\n\t\t[ allowRightClickOverrides, settingsRef, showBlockActions ]\n\t);\n\n\tconst onMouseDown = useCallback(\n\t\t( event ) => {\n\t\t\t// Prevent right-click from focusing the block,\n\t\t\t// because focus will be handled when opening the block settings dropdown.\n\t\t\tif ( allowRightClickOverrides && event.button === 2 ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t},\n\t\t[ allowRightClickOverrides ]\n\t);\n\n\tconst settingsPopoverAnchor = useMemo( () => {\n\t\tconst { ownerDocument } = rowRef?.current || {};\n\n\t\t// If no custom position is set, the settings dropdown will be anchored to the\n\t\t// DropdownMenu toggle button.\n\t\tif ( ! settingsAnchorRect || ! ownerDocument ) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\t// Position the settings dropdown at the cursor when right-clicking a block.\n\t\treturn {\n\t\t\townerDocument,\n\t\t\tgetBoundingClientRect() {\n\t\t\t\treturn settingsAnchorRect;\n\t\t\t},\n\t\t};\n\t}, [ settingsAnchorRect ] );\n\n\tconst clearSettingsAnchorRect = useCallback( () => {\n\t\t// Clear the custom position for the settings dropdown so that it is restored back\n\t\t// to being anchored to the DropdownMenu toggle button.\n\t\tsetSettingsAnchorRect( undefined );\n\t}, [ setSettingsAnchorRect ] );\n\n\t// Pass in a ref to the row, so that it can be scrolled\n\t// into view when selected. For long lists, the placeholder for the\n\t// selected block is also observed, within ListViewLeafPlaceholder.\n\tuseListViewScrollIntoView( {\n\t\tisSelected,\n\t\trowItemRef: rowRef,\n\t\tselectedClientIds,\n\t} );\n\n\t// When switching between rendering modes (such as template preview and content only),\n\t// it is possible for a block to temporarily be unavailable. In this case, we should not\n\t// render the leaf, to avoid errors further down the tree.\n\tif ( ! block ) {\n\t\treturn null;\n\t}\n\n\tconst blockPositionDescription = getBlockPositionDescription(\n\t\tposition,\n\t\tsiblingBlockCount,\n\t\tlevel\n\t);\n\n\tconst blockPropertiesDescription = getBlockPropertiesDescription(\n\t\tblockInformation,\n\t\tisLocked\n\t);\n\n\t// Determine label based on where block is hidden (not when/current viewport)\n\tconst blockVisibilityDescription = getBlockVisibilityLabel(\n\t\tblock?.attributes?.metadata?.blockVisibility\n\t);\n\n\tconst hasSiblings = siblingBlockCount > 0;\n\tconst hasRenderedMovers = showBlockMovers && hasSiblings;\n\tconst moverCellClassName = clsx(\n\t\t'block-editor-list-view-block__mover-cell',\n\t\t{ 'is-visible': isHovered || isSelected }\n\t);\n\n\tconst listViewBlockSettingsClassName = clsx(\n\t\t'block-editor-list-view-block__menu-cell',\n\t\t{ 'is-visible': isHovered || isFirstSelectedBlock }\n\t);\n\n\tlet colSpan;\n\tif ( hasRenderedMovers ) {\n\t\tcolSpan = 2;\n\t} else if ( ! showBlockActions ) {\n\t\tcolSpan = 3;\n\t}\n\n\tconst classes = clsx( {\n\t\t'is-selected': isSelected,\n\t\t'is-first-selected': isFirstSelectedBlock,\n\t\t'is-last-selected': isLastSelectedBlock,\n\t\t'is-branch-selected': isBranchSelected,\n\t\t'is-synced-branch': isSyncedBranch,\n\t\t'is-dragging': isDragged,\n\t\t'has-single-cell': ! showBlockActions,\n\t\t'is-synced': blockInformation?.isSynced,\n\t\t'is-draggable': canMoveBlock,\n\t\t'is-displacement-normal': displacement === 'normal',\n\t\t'is-displacement-up': displacement === 'up',\n\t\t'is-displacement-down': displacement === 'down',\n\t\t'is-after-dragged-blocks': isAfterDraggedBlocks,\n\t\t'is-nesting': isNesting,\n\t} );\n\n\t// Only include all selected blocks if the currently clicked on block\n\t// is one of the selected blocks. This ensures that if a user attempts\n\t// to alter a block that isn't part of the selection, they're still able\n\t// to do so.\n\tconst dropdownClientIds = selectedClientIds.includes( clientId )\n\t\t? selectedClientIds\n\t\t: [ clientId ];\n\n\t// Detect if there is a block in the canvas currently being edited and multi-selection is not happening.\n\tconst currentlyEditingBlockInCanvas =\n\t\tisSelected && selectedClientIds.length === 1;\n\n\treturn (\n\t\t<ListViewLeaf\n\t\t\tclassName={ classes }\n\t\t\tisDragged={ isDragged }\n\t\t\tonKeyDown={ onKeyDown }\n\t\t\tonMouseEnter={ onMouseEnter }\n\t\t\tonMouseLeave={ onMouseLeave }\n\t\t\tonFocus={ onMouseEnter }\n\t\t\tonBlur={ onMouseLeave }\n\t\t\tlevel={ level }\n\t\t\tposition={ position }\n\t\t\trowCount={ rowCount }\n\t\t\tpath={ path }\n\t\t\tid={ `list-view-${ listViewInstanceId }-block-${ clientId }` }\n\t\t\tdata-block={ clientId }\n\t\t\tdata-expanded={ canEditBlock ? isExpanded : undefined }\n\t\t\tref={ rowRef }\n\t\t>\n\t\t\t<TreeGridCell\n\t\t\t\tclassName=\"block-editor-list-view-block__contents-cell\"\n\t\t\t\tcolSpan={ colSpan }\n\t\t\t\tref={ cellRef }\n\t\t\t\taria-selected={ !! isSelected }\n\t\t\t>\n\t\t\t\t{ ( { ref, tabIndex, onFocus } ) => (\n\t\t\t\t\t<div className=\"block-editor-list-view-block__contents-container\">\n\t\t\t\t\t\t<ListViewBlockContents\n\t\t\t\t\t\t\tblock={ block }\n\t\t\t\t\t\t\tonClick={ selectEditorBlock }\n\t\t\t\t\t\t\tonContextMenu={ onContextMenu }\n\t\t\t\t\t\t\tonMouseDown={ onMouseDown }\n\t\t\t\t\t\t\tonToggleExpanded={ toggleExpanded }\n\t\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t\t\tposition={ position }\n\t\t\t\t\t\t\tsiblingBlockCount={ siblingBlockCount }\n\t\t\t\t\t\t\tlevel={ level }\n\t\t\t\t\t\t\tref={ ref }\n\t\t\t\t\t\t\ttabIndex={\n\t\t\t\t\t\t\t\tcurrentlyEditingBlockInCanvas ? 0 : tabIndex\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tonFocus={ onFocus }\n\t\t\t\t\t\t\tisExpanded={ canEditBlock ? isExpanded : undefined }\n\t\t\t\t\t\t\tselectedClientIds={ selectedClientIds }\n\t\t\t\t\t\t\tariaDescribedBy={ descriptionId }\n\t\t\t\t\t\t\tvisibilityLabel={ blockVisibilityDescription }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<AriaReferencedText id={ descriptionId }>\n\t\t\t\t\t\t\t{ [\n\t\t\t\t\t\t\t\tblockPositionDescription,\n\t\t\t\t\t\t\t\tblockPropertiesDescription,\n\t\t\t\t\t\t\t\tblockVisibilityDescription,\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t.filter( Boolean )\n\t\t\t\t\t\t\t\t.join( ' ' ) }\n\t\t\t\t\t\t</AriaReferencedText>\n\t\t\t\t\t</div>\n\t\t\t\t) }\n\t\t\t</TreeGridCell>\n\t\t\t{ hasRenderedMovers && (\n\t\t\t\t<>\n\t\t\t\t\t<TreeGridCell\n\t\t\t\t\t\tclassName={ moverCellClassName }\n\t\t\t\t\t\twithoutGridItem\n\t\t\t\t\t>\n\t\t\t\t\t\t<TreeGridItem>\n\t\t\t\t\t\t\t{ ( { ref, tabIndex, onFocus } ) => (\n\t\t\t\t\t\t\t\t<BlockMoverUpButton\n\t\t\t\t\t\t\t\t\torientation=\"vertical\"\n\t\t\t\t\t\t\t\t\tclientIds={ [ clientId ] }\n\t\t\t\t\t\t\t\t\tref={ ref }\n\t\t\t\t\t\t\t\t\ttabIndex={ tabIndex }\n\t\t\t\t\t\t\t\t\tonFocus={ onFocus }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</TreeGridItem>\n\t\t\t\t\t\t<TreeGridItem>\n\t\t\t\t\t\t\t{ ( { ref, tabIndex, onFocus } ) => (\n\t\t\t\t\t\t\t\t<BlockMoverDownButton\n\t\t\t\t\t\t\t\t\torientation=\"vertical\"\n\t\t\t\t\t\t\t\t\tclientIds={ [ clientId ] }\n\t\t\t\t\t\t\t\t\tref={ ref }\n\t\t\t\t\t\t\t\t\ttabIndex={ tabIndex }\n\t\t\t\t\t\t\t\t\tonFocus={ onFocus }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</TreeGridItem>\n\t\t\t\t\t</TreeGridCell>\n\t\t\t\t</>\n\t\t\t) }\n\n\t\t\t{ showBlockActions && BlockSettingsMenu && (\n\t\t\t\t<TreeGridCell\n\t\t\t\t\tclassName={ listViewBlockSettingsClassName }\n\t\t\t\t\taria-selected={ !! isSelected }\n\t\t\t\t\tref={ settingsRef }\n\t\t\t\t>\n\t\t\t\t\t{ ( { ref, tabIndex, onFocus } ) => (\n\t\t\t\t\t\t<BlockSettingsMenu\n\t\t\t\t\t\t\tclientIds={ dropdownClientIds }\n\t\t\t\t\t\t\tblock={ block }\n\t\t\t\t\t\t\ticon={ moreVertical }\n\t\t\t\t\t\t\tlabel={ __( 'Options' ) }\n\t\t\t\t\t\t\tpopoverProps={ {\n\t\t\t\t\t\t\t\tanchor: settingsPopoverAnchor, // Used to position the settings at the cursor on right-click.\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\ttoggleProps={ {\n\t\t\t\t\t\t\t\tref,\n\t\t\t\t\t\t\t\tclassName: 'block-editor-list-view-block__menu',\n\t\t\t\t\t\t\t\ttabIndex,\n\t\t\t\t\t\t\t\tonClick: clearSettingsAnchorRect,\n\t\t\t\t\t\t\t\tonFocus,\n\t\t\t\t\t\t\t\tsize: 'small',\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tdisableOpenOnArrowDown\n\t\t\t\t\t\t\texpand={ expand }\n\t\t\t\t\t\t\texpandedState={ expandedState }\n\t\t\t\t\t\t\tsetInsertedBlock={ setInsertedBlock }\n\t\t\t\t\t\t\t__experimentalSelectBlock={\n\t\t\t\t\t\t\t\tupdateFocusAndSelection\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tisContentOnlyListView={\n\t\t\t\t\t\t\t\t!! rootClientId &&\n\t\t\t\t\t\t\t\tgetBlockEditingMode( rootClientId ) ===\n\t\t\t\t\t\t\t\t\t'contentOnly'\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</TreeGridCell>\n\t\t\t) }\n\t\t\t{ isRenameModalOpen && (\n\t\t\t\t<BlockRenameModal\n\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\tonClose={ () => setIsRenameModalOpen( false ) }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</ListViewLeaf>\n\t);\n}\n\nexport default memo( ListViewBlock );\n"],
5
- "mappings": ";AAGA,OAAO,UAAU;AAKjB;AAAA,EACC;AAAA,EACA;AAAA,EACA,SAAS;AAAA,OACH;AACP;AAAA,EACC,8BAA8B;AAAA,EAC9B,8BAA8B;AAAA,OACxB;AACP,SAAS,eAAe,mBAAmB;AAC3C,SAAS,oBAAoB;AAC7B;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACM;AACP,SAAS,aAAa,iBAAiB;AACvC,SAAS,UAAU;AACnB,SAAS,WAAW,cAAc;AAClC,SAAS,sBAAsB;AAC/B,SAAS,mCAAmC,6BAA6B;AACzE,SAAS,aAAa;AAKtB,OAAO,kBAAkB;AACzB,OAAO,+BAA+B;AACtC;AAAA,EACC;AAAA,EACA;AAAA,OACM;AACP,OAAO,2BAA2B;AAClC,SAAS,0BAA0B;AACnC;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,OACM;AACP,SAAS,SAAS,wBAAwB;AAC1C,OAAO,gCAAgC;AACvC,SAAS,oB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,EAAE,KAAK,UAAU,QAAQ,MAC5B;AAAA,gBAAC;AAAA;AAAA,kBACA,aAAY;AAAA,kBACZ,WAAY,CAAE,QAAS;AAAA,kBACvB;AAAA,kBACA;AAAA,kBACA;AAAA;AAAA,cACD,GAEF;AAAA;AAAA;AAAA,QACD,GACD;AAAA,QAGC,oBAAoB,qBACrB;AAAA,UAAC;AAAA;AAAA,YACA,WAAY;AAAA,YACZ,iBAAgB,CAAC,CAAE;AAAA,YACnB,KAAM;AAAA,YAEJ,WAAE,EAAE,KAAK,UAAU,QAAQ,MAC5B;AAAA,cAAC;AAAA;AAAA,gBACA,WAAY;AAAA,gBACZ;AAAA,gBACA,MAAO;AAAA,gBACP,OAAQ,GAAI,SAAU;AAAA,gBACtB,cAAe;AAAA,kBACd,QAAQ;AAAA;AAAA,gBACT;AAAA,gBACA,aAAc;AAAA,kBACb;AAAA,kBACA,WAAW;AAAA,kBACX;AAAA,kBACA,SAAS;AAAA,kBACT;AAAA,kBACA,MAAM;AAAA,gBACP;AAAA,gBACA,wBAAsB;AAAA,gBACtB;AAAA,gBACA;AAAA,gBACA;AAAA,gBACA,2BACC;AAAA,gBAED,uBACC,CAAC,CAAE,gBACH,oBAAqB,YAAa,MACjC;AAAA;AAAA,YAEH;AAAA;AAAA,QAEF;AAAA,QAEC,qBACD;AAAA,UAAC;AAAA;AAAA,YACA;AAAA,YACA,SAAU,MAAM,qBAAsB,KAAM;AAAA;AAAA,QAC7C;AAAA;AAAA;AAAA,EAEF;AAEF;AAEA,IAAO,gBAAQ,KAAM,aAAc;",
4
+ "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\thasBlockSupport,\n\tswitchToBlockType,\n\tstore as blocksStore,\n} from '@wordpress/blocks';\nimport {\n\t__experimentalTreeGridCell as TreeGridCell,\n\t__experimentalTreeGridItem as TreeGridItem,\n} from '@wordpress/components';\nimport { useInstanceId, useDebounce } from '@wordpress/compose';\nimport { moreVertical } from '@wordpress/icons';\nimport {\n\tuseCallback,\n\tuseMemo,\n\tuseState,\n\tuseRef,\n\tmemo,\n} from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { BACKSPACE, DELETE } from '@wordpress/keycodes';\nimport { isShallowEqual } from '@wordpress/is-shallow-equal';\nimport { __unstableUseShortcutEventMatch as useShortcutEventMatch } from '@wordpress/keyboard-shortcuts';\nimport { speak } from '@wordpress/a11y';\n\n/**\n * Internal dependencies\n */\nimport ListViewLeaf from './leaf';\nimport useListViewScrollIntoView from './use-list-view-scroll-into-view';\nimport {\n\tBlockMoverUpButton,\n\tBlockMoverDownButton,\n} from '../block-mover/button';\nimport ListViewBlockContents from './block-contents';\nimport { useListViewContext } from './context';\nimport {\n\tgetBlockPositionDescription,\n\tgetBlockPropertiesDescription,\n\tfocusListItem,\n} from './utils';\nimport { store as blockEditorStore } from '../../store';\nimport useBlockDisplayInformation from '../use-block-display-information';\nimport { useBlockLock } from '../block-lock';\nimport { useBlockRename, BlockRenameModal } from '../block-rename';\nimport AriaReferencedText from './aria-referenced-text';\nimport { unlock } from '../../lock-unlock';\nimport usePasteStyles from '../use-paste-styles';\nimport { getBlockVisibilityLabel } from '../block-visibility';\n\nfunction ListViewBlock( {\n\tblock: { clientId },\n\tdisplacement,\n\tisAfterDraggedBlocks,\n\tisDragged,\n\tisNesting,\n\tisSelected,\n\tisBranchSelected,\n\tselectBlock,\n\tposition,\n\tlevel,\n\trowCount,\n\tsiblingBlockCount,\n\tshowBlockMovers,\n\tpath,\n\tisExpanded,\n\tselectedClientIds,\n\tisSyncedBranch,\n} ) {\n\tconst cellRef = useRef( null );\n\tconst rowRef = useRef( null );\n\tconst settingsRef = useRef( null );\n\tconst [ isHovered, setIsHovered ] = useState( false );\n\tconst [ settingsAnchorRect, setSettingsAnchorRect ] = useState();\n\tconst [ isRenameModalOpen, setIsRenameModalOpen ] = useState( false );\n\tconst { isLocked } = useBlockLock( clientId );\n\n\tconst isFirstSelectedBlock =\n\t\tisSelected && selectedClientIds[ 0 ] === clientId;\n\tconst isLastSelectedBlock =\n\t\tisSelected &&\n\t\tselectedClientIds[ selectedClientIds.length - 1 ] === clientId;\n\n\tconst {\n\t\ttoggleBlockHighlight,\n\t\tduplicateBlocks,\n\t\tmultiSelect,\n\t\treplaceBlocks,\n\t\tremoveBlocks,\n\t\tinsertAfterBlock,\n\t\tinsertBeforeBlock,\n\t\tshowViewportModal,\n\t\tstopEditingContentOnlySection,\n\t} = unlock( useDispatch( blockEditorStore ) );\n\n\tconst debouncedToggleBlockHighlight = useDebounce(\n\t\ttoggleBlockHighlight,\n\t\t50\n\t);\n\n\tconst {\n\t\tcanInsertBlockType,\n\t\tgetSelectedBlockClientIds,\n\t\tgetPreviousBlockClientId,\n\t\tgetBlockRootClientId,\n\t\tgetBlockOrder,\n\t\tgetBlockParents,\n\t\tgetBlockEditingMode,\n\t\tgetBlocksByClientId,\n\t\tcanEditBlock,\n\t\tcanMoveBlock,\n\t\tcanRemoveBlocks,\n\t\tisGroupable,\n\t} = useSelect( blockEditorStore );\n\tconst { getGroupingBlockName } = useSelect( blocksStore );\n\n\tconst blockInformation = useBlockDisplayInformation( clientId );\n\n\tconst pasteStyles = usePasteStyles();\n\n\tconst {\n\t\tblock,\n\t\tblockName,\n\t\tblockEditingMode,\n\t\tallowRightClickOverrides,\n\t\teditedSection,\n\t\tviewportSettings,\n\t\tblockVisibilitySetting,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlock,\n\t\t\t\tgetBlockName,\n\t\t\t\tgetBlockEditingMode: getBlockEditingModeForClientId,\n\t\t\t\tgetSettings,\n\t\t\t\tgetEditedContentOnlySection,\n\t\t\t} = unlock( select( blockEditorStore ) );\n\t\t\tconst settings = getSettings();\n\n\t\t\treturn {\n\t\t\t\tblock: getBlock( clientId ),\n\t\t\t\tblockName: getBlockName( clientId ),\n\t\t\t\tblockEditingMode: getBlockEditingModeForClientId( clientId ),\n\t\t\t\tallowRightClickOverrides: settings.allowRightClickOverrides,\n\t\t\t\teditedSection: getEditedContentOnlySection(),\n\t\t\t\tviewportSettings: settings.__experimentalFeatures?.viewport,\n\t\t\t\tblockVisibilitySetting:\n\t\t\t\t\tsettings.__experimentalFeatures?.blockVisibility\n\t\t\t\t\t\t?.allowEditing,\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tconst isDisabled = blockEditingMode === 'disabled';\n\tconst { canRename } = useBlockRename( blockName );\n\n\tconst showBlockActions =\n\t\t// When a block hides its toolbar it also hides the block settings menu,\n\t\t// since that menu is part of the toolbar in the editor canvas.\n\t\t// List View respects this by also hiding the block settings menu.\n\t\thasBlockSupport( blockName, '__experimentalToolbar', true );\n\tconst instanceId = useInstanceId( ListViewBlock );\n\tconst descriptionId = `list-view-block-select-button__description-${ instanceId }`;\n\n\tconst {\n\t\texpand,\n\t\tcollapse,\n\t\tcollapseAll,\n\t\tBlockSettingsMenu,\n\t\tlistViewInstanceId,\n\t\texpandedState,\n\t\tsetInsertedBlock,\n\t\ttreeGridElementRef,\n\t\trootClientId,\n\t} = useListViewContext();\n\tconst isMatch = useShortcutEventMatch();\n\n\t// Determine which blocks to update:\n\t// If the current (focused) block is part of the block selection, use the whole selection.\n\t// If the focused block is not part of the block selection, only update the focused block.\n\tfunction getBlocksToUpdate() {\n\t\tconst selectedBlockClientIds = getSelectedBlockClientIds();\n\t\tconst isUpdatingSelectedBlocks =\n\t\t\tselectedBlockClientIds.includes( clientId );\n\t\tconst firstBlockClientId = isUpdatingSelectedBlocks\n\t\t\t? selectedBlockClientIds[ 0 ]\n\t\t\t: clientId;\n\t\tconst firstBlockRootClientId =\n\t\t\tgetBlockRootClientId( firstBlockClientId );\n\n\t\tconst blocksToUpdate = isUpdatingSelectedBlocks\n\t\t\t? selectedBlockClientIds\n\t\t\t: [ clientId ];\n\n\t\treturn {\n\t\t\tblocksToUpdate,\n\t\t\tfirstBlockClientId,\n\t\t\tfirstBlockRootClientId,\n\t\t\tselectedBlockClientIds,\n\t\t};\n\t}\n\n\t/**\n\t * @param {KeyboardEvent} event\n\t */\n\tasync function onKeyDown( event ) {\n\t\tif ( event.defaultPrevented ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Do not handle events if it comes from modals;\n\t\t// retain the default behavior for these keys.\n\t\tif ( event.target.closest( '[role=dialog]' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( editedSection && isMatch( 'core/block-editor/unselect', event ) ) {\n\t\t\tevent.stopPropagation();\n\t\t\tevent.preventDefault();\n\t\t\tstopEditingContentOnlySection();\n\t\t\treturn;\n\t\t}\n\n\t\tconst isDeleteKey = [ BACKSPACE, DELETE ].includes( event.keyCode );\n\n\t\t// If multiple blocks are selected, deselect all blocks when the user\n\t\t// presses the escape key.\n\t\tif (\n\t\t\tisMatch( 'core/block-editor/unselect', event ) &&\n\t\t\tselectedClientIds.length > 0\n\t\t) {\n\t\t\tevent.stopPropagation();\n\t\t\tevent.preventDefault();\n\t\t\tselectBlock( event, undefined );\n\t\t} else if (\n\t\t\tisDeleteKey ||\n\t\t\tisMatch( 'core/block-editor/remove', event )\n\t\t) {\n\t\t\tconst {\n\t\t\t\tblocksToUpdate: blocksToDelete,\n\t\t\t\tfirstBlockClientId,\n\t\t\t\tfirstBlockRootClientId,\n\t\t\t\tselectedBlockClientIds,\n\t\t\t} = getBlocksToUpdate();\n\n\t\t\t// Don't update the selection if the blocks cannot be deleted.\n\t\t\tif ( ! canRemoveBlocks( blocksToDelete ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlet blockToFocus =\n\t\t\t\tgetPreviousBlockClientId( firstBlockClientId ) ??\n\t\t\t\t// If the previous block is not found (when the first block is deleted),\n\t\t\t\t// fallback to focus the parent block.\n\t\t\t\tfirstBlockRootClientId;\n\n\t\t\tremoveBlocks( blocksToDelete, false );\n\n\t\t\t// Update the selection if the original selection has been removed.\n\t\t\tconst shouldUpdateSelection =\n\t\t\t\tselectedBlockClientIds.length > 0 &&\n\t\t\t\tgetSelectedBlockClientIds().length === 0;\n\n\t\t\t// If there's no previous block nor parent block, focus the first block.\n\t\t\tif ( ! blockToFocus ) {\n\t\t\t\tblockToFocus = getBlockOrder()[ 0 ];\n\t\t\t}\n\n\t\t\tupdateFocusAndSelection( blockToFocus, shouldUpdateSelection );\n\t\t} else if ( isMatch( 'core/block-editor/paste-styles', event ) ) {\n\t\t\tevent.preventDefault();\n\n\t\t\tconst { blocksToUpdate } = getBlocksToUpdate();\n\t\t\tconst blocks = getBlocksByClientId( blocksToUpdate );\n\n\t\t\tpasteStyles( blocks );\n\t\t} else if ( isMatch( 'core/block-editor/duplicate', event ) ) {\n\t\t\tevent.preventDefault();\n\n\t\t\tconst { blocksToUpdate, firstBlockRootClientId } =\n\t\t\t\tgetBlocksToUpdate();\n\n\t\t\tconst canDuplicate = getBlocksByClientId( blocksToUpdate ).every(\n\t\t\t\t( blockToUpdate ) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t!! blockToUpdate &&\n\t\t\t\t\t\thasBlockSupport(\n\t\t\t\t\t\t\tblockToUpdate.name,\n\t\t\t\t\t\t\t'multiple',\n\t\t\t\t\t\t\ttrue\n\t\t\t\t\t\t) &&\n\t\t\t\t\t\tcanInsertBlockType(\n\t\t\t\t\t\t\tblockToUpdate.name,\n\t\t\t\t\t\t\tfirstBlockRootClientId\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t);\n\n\t\t\tif ( canDuplicate ) {\n\t\t\t\tconst updatedBlocks = await duplicateBlocks(\n\t\t\t\t\tblocksToUpdate,\n\t\t\t\t\tfalse\n\t\t\t\t);\n\n\t\t\t\tif ( updatedBlocks?.length ) {\n\t\t\t\t\t// If blocks have been duplicated, focus the first duplicated block.\n\t\t\t\t\tupdateFocusAndSelection( updatedBlocks[ 0 ], false );\n\t\t\t\t}\n\t\t\t}\n\t\t} else if ( isMatch( 'core/block-editor/insert-before', event ) ) {\n\t\t\tevent.preventDefault();\n\n\t\t\tconst { blocksToUpdate } = getBlocksToUpdate();\n\t\t\tawait insertBeforeBlock( blocksToUpdate[ 0 ] );\n\t\t\tconst newlySelectedBlocks = getSelectedBlockClientIds();\n\n\t\t\t// Focus the first block of the newly inserted blocks, to keep focus within the list view.\n\t\t\tupdateFocusAndSelection( newlySelectedBlocks[ 0 ], false );\n\t\t} else if ( isMatch( 'core/block-editor/insert-after', event ) ) {\n\t\t\tevent.preventDefault();\n\n\t\t\tconst { blocksToUpdate } = getBlocksToUpdate();\n\t\t\tawait insertAfterBlock( blocksToUpdate.at( -1 ) );\n\t\t\tconst newlySelectedBlocks = getSelectedBlockClientIds();\n\n\t\t\t// Focus the first block of the newly inserted blocks, to keep focus within the list view.\n\t\t\tupdateFocusAndSelection( newlySelectedBlocks[ 0 ], false );\n\t\t} else if ( isMatch( 'core/block-editor/select-all', event ) ) {\n\t\t\tevent.preventDefault();\n\n\t\t\tconst { firstBlockRootClientId, selectedBlockClientIds } =\n\t\t\t\tgetBlocksToUpdate();\n\t\t\tconst blockClientIds = getBlockOrder( firstBlockRootClientId );\n\t\t\tif ( ! blockClientIds.length ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// If we have selected all sibling nested blocks, try selecting up a level.\n\t\t\t// This is a similar implementation to that used by `useSelectAll`.\n\t\t\t// `isShallowEqual` is used for the list view instead of a length check,\n\t\t\t// as the array of siblings of the currently focused block may be a different\n\t\t\t// set of blocks from the current block selection if the user is focused\n\t\t\t// on a different part of the list view from the block selection.\n\t\t\tif ( isShallowEqual( selectedBlockClientIds, blockClientIds ) ) {\n\t\t\t\t// Only select up a level if the first block is not the root block.\n\t\t\t\t// This ensures that the block selection can't break out of the root block\n\t\t\t\t// used by the list view, if the list view is only showing a partial hierarchy.\n\t\t\t\tif (\n\t\t\t\t\tfirstBlockRootClientId &&\n\t\t\t\t\tfirstBlockRootClientId !== rootClientId\n\t\t\t\t) {\n\t\t\t\t\tupdateFocusAndSelection( firstBlockRootClientId, true );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Select all while passing `null` to skip focusing to the editor canvas,\n\t\t\t// and retain focus within the list view.\n\t\t\tmultiSelect(\n\t\t\t\tblockClientIds[ 0 ],\n\t\t\t\tblockClientIds[ blockClientIds.length - 1 ],\n\t\t\t\tnull\n\t\t\t);\n\t\t} else if ( isMatch( 'core/block-editor/collapse-list-view', event ) ) {\n\t\t\tevent.preventDefault();\n\t\t\tconst { firstBlockClientId } = getBlocksToUpdate();\n\t\t\tconst blockParents = getBlockParents( firstBlockClientId, false );\n\t\t\t// Collapse all blocks.\n\t\t\tcollapseAll();\n\t\t\t// Expand all parents of the current block.\n\t\t\texpand( blockParents );\n\t\t} else if ( isMatch( 'core/block-editor/group', event ) ) {\n\t\t\tconst { blocksToUpdate } = getBlocksToUpdate();\n\t\t\tif ( blocksToUpdate.length > 1 && isGroupable( blocksToUpdate ) ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tconst blocks = getBlocksByClientId( blocksToUpdate );\n\t\t\t\tconst groupingBlockName = getGroupingBlockName();\n\t\t\t\tconst newBlocks = switchToBlockType(\n\t\t\t\t\tblocks,\n\t\t\t\t\tgroupingBlockName\n\t\t\t\t);\n\t\t\t\treplaceBlocks( blocksToUpdate, newBlocks );\n\t\t\t\tspeak( __( 'Selected blocks are grouped.' ) );\n\t\t\t\tconst newlySelectedBlocks = getSelectedBlockClientIds();\n\t\t\t\t// Focus the first block of the newly inserted blocks, to keep focus within the list view.\n\t\t\t\tupdateFocusAndSelection( newlySelectedBlocks[ 0 ], false );\n\t\t\t}\n\t\t} else if (\n\t\t\tisMatch( 'core/block-editor/toggle-block-visibility', event )\n\t\t) {\n\t\t\tif ( blockVisibilitySetting === false ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tevent.preventDefault();\n\t\t\tconst { blocksToUpdate } = getBlocksToUpdate();\n\t\t\tconst blocks = getBlocksByClientId( blocksToUpdate );\n\t\t\tconst supportsBlockVisibility = blocks.every( ( _block ) =>\n\t\t\t\thasBlockSupport( _block.name, 'visibility', true )\n\t\t\t);\n\n\t\t\tif ( ! supportsBlockVisibility ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Don't allow visibility toggle for blocks that\n\t\t\t// are not in the default editing mode.\n\t\t\tif (\n\t\t\t\tblocksToUpdate.some(\n\t\t\t\t\t( id ) => getBlockEditingMode( id ) !== 'default'\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Open the visibility breakpoints modal.\n\t\t\tshowViewportModal( blocksToUpdate );\n\t\t} else if ( isMatch( 'core/block-editor/rename', event ) ) {\n\t\t\tconst { blocksToUpdate } = getBlocksToUpdate();\n\t\t\tconst isContentOnly =\n\t\t\t\tgetBlockEditingMode( blocksToUpdate[ 0 ] ) === 'contentOnly';\n\t\t\tif ( blocksToUpdate.length === 1 && canRename && ! isContentOnly ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tsetIsRenameModalOpen( true );\n\t\t\t}\n\t\t}\n\t}\n\n\tconst onMouseEnter = useCallback( () => {\n\t\tsetIsHovered( true );\n\t\tdebouncedToggleBlockHighlight( clientId, true );\n\t}, [ clientId, setIsHovered, debouncedToggleBlockHighlight ] );\n\tconst onMouseLeave = useCallback( () => {\n\t\tsetIsHovered( false );\n\t\tdebouncedToggleBlockHighlight( clientId, false );\n\t}, [ clientId, setIsHovered, debouncedToggleBlockHighlight ] );\n\n\tconst selectEditorBlock = useCallback(\n\t\t( event ) => {\n\t\t\t// For keyboard activation (Enter/Space on a link), transfer focus\n\t\t\t// to the canvas with the caret at the end of the block.\n\t\t\t// For mouse clicks, keep focus in the list view so that subsequent\n\t\t\t// keyboard operations (arrow navigation, copy/paste) still work.\n\t\t\tconst isKeyboardActivation = event?.detail === 0;\n\t\t\tselectBlock( event, clientId, isKeyboardActivation ? -1 : null );\n\t\t\tevent.preventDefault();\n\t\t},\n\t\t[ clientId, selectBlock ]\n\t);\n\n\tconst updateFocusAndSelection = useCallback(\n\t\t( focusClientId, shouldSelectBlock ) => {\n\t\t\tif ( shouldSelectBlock ) {\n\t\t\t\tselectBlock( undefined, focusClientId, null, null );\n\t\t\t}\n\n\t\t\tfocusListItem( focusClientId, treeGridElementRef?.current );\n\t\t},\n\t\t[ selectBlock, treeGridElementRef ]\n\t);\n\n\tconst toggleExpanded = useCallback(\n\t\t( event ) => {\n\t\t\t// Prevent shift+click from opening link in a new window when toggling.\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t\tif ( isExpanded === true ) {\n\t\t\t\tcollapse( clientId );\n\t\t\t} else if ( isExpanded === false ) {\n\t\t\t\texpand( clientId );\n\t\t\t}\n\t\t},\n\t\t[ clientId, expand, collapse, isExpanded ]\n\t);\n\n\t// Allow right-clicking an item in the List View to open up the block settings dropdown.\n\tconst onContextMenu = useCallback(\n\t\t( event ) => {\n\t\t\tconst { ownerDocument } = settingsRef?.current || {};\n\t\t\tif ( ! ownerDocument || ! ownerDocument.hasFocus() ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( showBlockActions && allowRightClickOverrides ) {\n\t\t\t\tsettingsRef.current?.click();\n\t\t\t\t// Ensure the position of the settings dropdown is at the cursor.\n\t\t\t\tsetSettingsAnchorRect(\n\t\t\t\t\tnew window.DOMRect( event.clientX, event.clientY, 0, 0 )\n\t\t\t\t);\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t},\n\t\t[ allowRightClickOverrides, settingsRef, showBlockActions ]\n\t);\n\n\tconst onMouseDown = useCallback(\n\t\t( event ) => {\n\t\t\t// Prevent right-click from focusing the block,\n\t\t\t// because focus will be handled when opening the block settings dropdown.\n\t\t\tif ( allowRightClickOverrides && event.button === 2 ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t},\n\t\t[ allowRightClickOverrides ]\n\t);\n\n\tconst settingsPopoverAnchor = useMemo( () => {\n\t\tconst { ownerDocument } = rowRef?.current || {};\n\n\t\t// If no custom position is set, the settings dropdown will be anchored to the\n\t\t// DropdownMenu toggle button.\n\t\tif ( ! settingsAnchorRect || ! ownerDocument ) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\t// Position the settings dropdown at the cursor when right-clicking a block.\n\t\treturn {\n\t\t\townerDocument,\n\t\t\tgetBoundingClientRect() {\n\t\t\t\treturn settingsAnchorRect;\n\t\t\t},\n\t\t};\n\t}, [ settingsAnchorRect ] );\n\n\tconst clearSettingsAnchorRect = useCallback( () => {\n\t\t// Clear the custom position for the settings dropdown so that it is restored back\n\t\t// to being anchored to the DropdownMenu toggle button.\n\t\tsetSettingsAnchorRect( undefined );\n\t}, [ setSettingsAnchorRect ] );\n\n\t// Pass in a ref to the row, so that it can be scrolled\n\t// into view when selected. For long lists, the placeholder for the\n\t// selected block is also observed, within ListViewLeafPlaceholder.\n\tuseListViewScrollIntoView( {\n\t\tisSelected,\n\t\trowItemRef: rowRef,\n\t\tselectedClientIds,\n\t} );\n\n\t// When switching between rendering modes (such as template preview and content only),\n\t// it is possible for a block to temporarily be unavailable. In this case, we should not\n\t// render the leaf, to avoid errors further down the tree.\n\tif ( ! block ) {\n\t\treturn null;\n\t}\n\n\tconst blockPositionDescription = getBlockPositionDescription(\n\t\tposition,\n\t\tsiblingBlockCount,\n\t\tlevel\n\t);\n\n\tconst blockPropertiesDescription = getBlockPropertiesDescription(\n\t\tblockInformation,\n\t\tisLocked\n\t);\n\n\t// Determine label based on where block is hidden (not when/current viewport)\n\tconst blockVisibilityDescription = getBlockVisibilityLabel(\n\t\tblock?.attributes?.metadata?.blockVisibility,\n\t\tviewportSettings\n\t);\n\n\tconst hasSiblings = siblingBlockCount > 0;\n\tconst canShowBlockActions = showBlockActions && ! isDisabled;\n\tconst hasRenderedMovers = showBlockMovers && hasSiblings && ! isDisabled;\n\tconst moverCellClassName = clsx(\n\t\t'block-editor-list-view-block__mover-cell',\n\t\t{ 'is-visible': isHovered || isSelected }\n\t);\n\n\tconst listViewBlockSettingsClassName = clsx(\n\t\t'block-editor-list-view-block__menu-cell',\n\t\t{ 'is-visible': isHovered || isFirstSelectedBlock }\n\t);\n\n\tlet colSpan;\n\tif ( hasRenderedMovers ) {\n\t\tcolSpan = 2;\n\t} else if ( ! canShowBlockActions ) {\n\t\tcolSpan = 3;\n\t}\n\n\tconst classes = clsx( {\n\t\t'is-selected': isSelected,\n\t\t'is-first-selected': isFirstSelectedBlock,\n\t\t'is-last-selected': isLastSelectedBlock,\n\t\t'is-branch-selected': isBranchSelected,\n\t\t'is-synced-branch': isSyncedBranch,\n\t\t'is-dragging': isDragged,\n\t\t'has-single-cell': ! showBlockActions,\n\t\t'is-synced': blockInformation?.isSynced,\n\t\t'is-draggable': canMoveBlock && ! isDisabled,\n\t\t'is-displacement-normal': displacement === 'normal',\n\t\t'is-displacement-up': displacement === 'up',\n\t\t'is-displacement-down': displacement === 'down',\n\t\t'is-after-dragged-blocks': isAfterDraggedBlocks,\n\t\t'is-nesting': isNesting,\n\t\t'is-disabled': isDisabled,\n\t} );\n\n\t// Only include all selected blocks if the currently clicked on block\n\t// is one of the selected blocks. This ensures that if a user attempts\n\t// to alter a block that isn't part of the selection, they're still able\n\t// to do so.\n\tconst dropdownClientIds = selectedClientIds.includes( clientId )\n\t\t? selectedClientIds\n\t\t: [ clientId ];\n\n\tconst getListViewBlockTabIndex = ( rovingTabIndex ) => {\n\t\tif ( isDisabled ) {\n\t\t\treturn -1;\n\t\t}\n\n\t\t// Detect if there is a block in the canvas currently being edited and multi-selection is not happening.\n\t\tif ( isSelected && selectedClientIds.length === 1 ) {\n\t\t\treturn 0;\n\t\t}\n\n\t\treturn rovingTabIndex;\n\t};\n\n\treturn (\n\t\t<ListViewLeaf\n\t\t\tclassName={ classes }\n\t\t\tisDragged={ isDragged }\n\t\t\tonKeyDown={ onKeyDown }\n\t\t\tonMouseEnter={ isDisabled ? undefined : onMouseEnter }\n\t\t\tonMouseLeave={ isDisabled ? undefined : onMouseLeave }\n\t\t\tonFocus={ isDisabled ? undefined : onMouseEnter }\n\t\t\tonBlur={ isDisabled ? undefined : onMouseLeave }\n\t\t\tlevel={ level }\n\t\t\tposition={ position }\n\t\t\trowCount={ rowCount }\n\t\t\tpath={ path }\n\t\t\tid={ `list-view-${ listViewInstanceId }-block-${ clientId }` }\n\t\t\tdata-block={ clientId }\n\t\t\tdata-expanded={ canEditBlock ? isExpanded : undefined }\n\t\t\tref={ rowRef }\n\t\t>\n\t\t\t<TreeGridCell\n\t\t\t\tclassName=\"block-editor-list-view-block__contents-cell\"\n\t\t\t\tcolSpan={ colSpan }\n\t\t\t\tref={ cellRef }\n\t\t\t\taria-selected={ !! isSelected }\n\t\t\t>\n\t\t\t\t{ ( { ref, tabIndex, onFocus } ) => (\n\t\t\t\t\t<div className=\"block-editor-list-view-block__contents-container\">\n\t\t\t\t\t\t<ListViewBlockContents\n\t\t\t\t\t\t\tblock={ block }\n\t\t\t\t\t\t\tonClick={ selectEditorBlock }\n\t\t\t\t\t\t\tonContextMenu={\n\t\t\t\t\t\t\t\tisDisabled ? undefined : onContextMenu\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tonMouseDown={ onMouseDown }\n\t\t\t\t\t\t\tonToggleExpanded={\n\t\t\t\t\t\t\t\tisDisabled ? undefined : toggleExpanded\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t\t\tposition={ position }\n\t\t\t\t\t\t\tsiblingBlockCount={ siblingBlockCount }\n\t\t\t\t\t\t\tlevel={ level }\n\t\t\t\t\t\t\tref={ ref }\n\t\t\t\t\t\t\ttabIndex={ getListViewBlockTabIndex( tabIndex ) }\n\t\t\t\t\t\t\tonFocus={ onFocus }\n\t\t\t\t\t\t\tisExpanded={ canEditBlock ? isExpanded : undefined }\n\t\t\t\t\t\t\tselectedClientIds={ selectedClientIds }\n\t\t\t\t\t\t\tariaDescribedBy={ descriptionId }\n\t\t\t\t\t\t\tvisibilityLabel={ blockVisibilityDescription }\n\t\t\t\t\t\t\tisDisabled={ isDisabled }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<AriaReferencedText id={ descriptionId }>\n\t\t\t\t\t\t\t{ [\n\t\t\t\t\t\t\t\tblockPositionDescription,\n\t\t\t\t\t\t\t\tblockPropertiesDescription,\n\t\t\t\t\t\t\t\tblockVisibilityDescription,\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t.filter( Boolean )\n\t\t\t\t\t\t\t\t.join( ' ' ) }\n\t\t\t\t\t\t</AriaReferencedText>\n\t\t\t\t\t</div>\n\t\t\t\t) }\n\t\t\t</TreeGridCell>\n\t\t\t{ hasRenderedMovers && (\n\t\t\t\t<>\n\t\t\t\t\t<TreeGridCell\n\t\t\t\t\t\tclassName={ moverCellClassName }\n\t\t\t\t\t\twithoutGridItem\n\t\t\t\t\t>\n\t\t\t\t\t\t<TreeGridItem>\n\t\t\t\t\t\t\t{ ( { ref, tabIndex, onFocus } ) => (\n\t\t\t\t\t\t\t\t<BlockMoverUpButton\n\t\t\t\t\t\t\t\t\torientation=\"vertical\"\n\t\t\t\t\t\t\t\t\tclientIds={ [ clientId ] }\n\t\t\t\t\t\t\t\t\tref={ ref }\n\t\t\t\t\t\t\t\t\ttabIndex={ tabIndex }\n\t\t\t\t\t\t\t\t\tonFocus={ onFocus }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</TreeGridItem>\n\t\t\t\t\t\t<TreeGridItem>\n\t\t\t\t\t\t\t{ ( { ref, tabIndex, onFocus } ) => (\n\t\t\t\t\t\t\t\t<BlockMoverDownButton\n\t\t\t\t\t\t\t\t\torientation=\"vertical\"\n\t\t\t\t\t\t\t\t\tclientIds={ [ clientId ] }\n\t\t\t\t\t\t\t\t\tref={ ref }\n\t\t\t\t\t\t\t\t\ttabIndex={ tabIndex }\n\t\t\t\t\t\t\t\t\tonFocus={ onFocus }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</TreeGridItem>\n\t\t\t\t\t</TreeGridCell>\n\t\t\t\t</>\n\t\t\t) }\n\n\t\t\t{ canShowBlockActions && BlockSettingsMenu && (\n\t\t\t\t<TreeGridCell\n\t\t\t\t\tclassName={ listViewBlockSettingsClassName }\n\t\t\t\t\taria-selected={ !! isSelected }\n\t\t\t\t\tref={ settingsRef }\n\t\t\t\t>\n\t\t\t\t\t{ ( { ref, tabIndex, onFocus } ) => (\n\t\t\t\t\t\t<BlockSettingsMenu\n\t\t\t\t\t\t\tclientIds={ dropdownClientIds }\n\t\t\t\t\t\t\tblock={ block }\n\t\t\t\t\t\t\ticon={ moreVertical }\n\t\t\t\t\t\t\tlabel={ __( 'Options' ) }\n\t\t\t\t\t\t\tpopoverProps={ {\n\t\t\t\t\t\t\t\tanchor: settingsPopoverAnchor, // Used to position the settings at the cursor on right-click.\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\ttoggleProps={ {\n\t\t\t\t\t\t\t\tref,\n\t\t\t\t\t\t\t\tclassName: 'block-editor-list-view-block__menu',\n\t\t\t\t\t\t\t\ttabIndex,\n\t\t\t\t\t\t\t\tonClick: clearSettingsAnchorRect,\n\t\t\t\t\t\t\t\tonFocus,\n\t\t\t\t\t\t\t\tsize: 'small',\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tdisableOpenOnArrowDown\n\t\t\t\t\t\t\texpand={ expand }\n\t\t\t\t\t\t\texpandedState={ expandedState }\n\t\t\t\t\t\t\tsetInsertedBlock={ setInsertedBlock }\n\t\t\t\t\t\t\t__experimentalSelectBlock={\n\t\t\t\t\t\t\t\tupdateFocusAndSelection\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tisContentOnlyListView={\n\t\t\t\t\t\t\t\t!! rootClientId &&\n\t\t\t\t\t\t\t\tgetBlockEditingMode( rootClientId ) ===\n\t\t\t\t\t\t\t\t\t'contentOnly'\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</TreeGridCell>\n\t\t\t) }\n\t\t\t{ isRenameModalOpen && (\n\t\t\t\t<BlockRenameModal\n\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\tonClose={ () => setIsRenameModalOpen( false ) }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</ListViewLeaf>\n\t);\n}\n\nexport default memo( ListViewBlock );\n"],
5
+ "mappings": ";AAGA,OAAO,UAAU;AAKjB;AAAA,EACC;AAAA,EACA;AAAA,EACA,SAAS;AAAA,OACH;AACP;AAAA,EACC,8BAA8B;AAAA,EAC9B,8BAA8B;AAAA,OACxB;AACP,SAAS,eAAe,mBAAmB;AAC3C,SAAS,oBAAoB;AAC7B;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACM;AACP,SAAS,aAAa,iBAAiB;AACvC,SAAS,UAAU;AACnB,SAAS,WAAW,cAAc;AAClC,SAAS,sBAAsB;AAC/B,SAAS,mCAAmC,6BAA6B;AACzE,SAAS,aAAa;AAKtB,OAAO,kBAAkB;AACzB,OAAO,+BAA+B;AACtC;AAAA,EACC;AAAA,EACA;AAAA,OACM;AACP,OAAO,2BAA2B;AAClC,SAAS,0BAA0B;AACnC;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,OACM;AACP,SAAS,SAAS,wBAAwB;AAC1C,OAAO,gCAAgC;AACvC,SAAS,oBAAoB;AAC7B,SAAS,gBAAgB,wBAAwB;AACjD,OAAO,wBAAwB;AAC/B,SAAS,cAAc;AACvB,OAAO,oBAAoB;AAC3B,SAAS,+BAA+B;AAwlBnC,SAqCD,UApCE,KADD;AAtlBL,SAAS,cAAe;AAAA,EACvB,OAAO,EAAE,SAAS;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,E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AAA,YAEH;AAAA;AAAA,QAEF;AAAA,QAEC,qBACD;AAAA,UAAC;AAAA;AAAA,YACA;AAAA,YACA,SAAU,MAAM,qBAAsB,KAAM;AAAA;AAAA,QAC7C;AAAA;AAAA;AAAA,EAEF;AAEF;AAEA,IAAO,gBAAQ,KAAM,aAAc;",
6
6
  "names": []
7
7
  }
@@ -15,7 +15,7 @@ function ListViewExpander({ onClick }) {
15
15
  "span",
16
16
  {
17
17
  className: "block-editor-list-view__expander",
18
- onClick: (event) => onClick(event, { forceToggle: true }),
18
+ onClick: onClick ? (event) => onClick(event, { forceToggle: true }) : void 0,
19
19
  "aria-hidden": "true",
20
20
  "data-testid": "list-view-expander",
21
21
  children: /* @__PURE__ */ jsx(Icon, { icon: isRTL() ? chevronLeftSmall : chevronRightSmall })