@wordpress/block-editor 12.10.3 → 12.11.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 (1253) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/README.md +13 -11
  3. package/build/autocompleters/block.js +3 -2
  4. package/build/autocompleters/block.js.map +1 -1
  5. package/build/autocompleters/link.js +3 -3
  6. package/build/autocompleters/link.js.map +1 -1
  7. package/build/components/alignment-control/index.js +3 -3
  8. package/build/components/alignment-control/index.js.map +1 -1
  9. package/build/components/alignment-control/ui.js +2 -2
  10. package/build/components/alignment-control/ui.js.map +1 -1
  11. package/build/components/autocomplete/index.js +3 -2
  12. package/build/components/autocomplete/index.js.map +1 -1
  13. package/build/components/block-actions/index.js +2 -2
  14. package/build/components/block-actions/index.js.map +1 -1
  15. package/build/components/block-alignment-control/index.js +3 -3
  16. package/build/components/block-alignment-control/index.js.map +1 -1
  17. package/build/components/block-alignment-control/ui.js +4 -4
  18. package/build/components/block-alignment-control/ui.js.map +1 -1
  19. package/build/components/block-alignment-control/ui.native.js +2 -2
  20. package/build/components/block-alignment-control/ui.native.js.map +1 -1
  21. package/build/components/block-alignment-matrix-control/index.js +5 -5
  22. package/build/components/block-alignment-matrix-control/index.js.map +1 -1
  23. package/build/components/block-breadcrumb/index.js +12 -12
  24. package/build/components/block-breadcrumb/index.js.map +1 -1
  25. package/build/components/block-canvas/index.js +13 -15
  26. package/build/components/block-canvas/index.js.map +1 -1
  27. package/build/components/block-caption/index.native.js +3 -3
  28. package/build/components/block-caption/index.native.js.map +1 -1
  29. package/build/components/block-card/index.js +7 -7
  30. package/build/components/block-card/index.js.map +1 -1
  31. package/build/components/block-compare/block-view.js +9 -8
  32. package/build/components/block-compare/block-view.js.map +1 -1
  33. package/build/components/block-compare/index.js +5 -5
  34. package/build/components/block-compare/index.js.map +1 -1
  35. package/build/components/block-context/index.js +2 -1
  36. package/build/components/block-context/index.js.map +1 -1
  37. package/build/components/block-controls/fill.js +5 -5
  38. package/build/components/block-controls/fill.js.map +1 -1
  39. package/build/components/block-controls/index.js +3 -3
  40. package/build/components/block-controls/index.js.map +1 -1
  41. package/build/components/block-controls/slot.js +3 -2
  42. package/build/components/block-controls/slot.js.map +1 -1
  43. package/build/components/block-controls/slot.native.js +4 -4
  44. package/build/components/block-controls/slot.native.js.map +1 -1
  45. package/build/components/block-draggable/draggable-chip.js +6 -6
  46. package/build/components/block-draggable/draggable-chip.js.map +1 -1
  47. package/build/components/block-draggable/draggable-chip.native.js +4 -4
  48. package/build/components/block-draggable/draggable-chip.native.js.map +1 -1
  49. package/build/components/block-draggable/dropping-insertion-point.native.js +2 -2
  50. package/build/components/block-draggable/dropping-insertion-point.native.js.map +1 -1
  51. package/build/components/block-draggable/index.js +4 -3
  52. package/build/components/block-draggable/index.js.map +1 -1
  53. package/build/components/block-draggable/index.native.js +9 -8
  54. package/build/components/block-draggable/index.native.js.map +1 -1
  55. package/build/components/block-edit/edit.js +5 -4
  56. package/build/components/block-edit/edit.js.map +1 -1
  57. package/build/components/block-edit/edit.native.js +3 -2
  58. package/build/components/block-edit/edit.native.js.map +1 -1
  59. package/build/components/block-edit/index.js +3 -2
  60. package/build/components/block-edit/index.js.map +1 -1
  61. package/build/components/block-edit-visually-button/index.js +2 -2
  62. package/build/components/block-edit-visually-button/index.js.map +1 -1
  63. package/build/components/block-full-height-alignment-control/index.js +2 -2
  64. package/build/components/block-full-height-alignment-control/index.js.map +1 -1
  65. package/build/components/block-heading-level-dropdown/heading-level-icon.js +4 -4
  66. package/build/components/block-heading-level-dropdown/heading-level-icon.js.map +1 -1
  67. package/build/components/block-heading-level-dropdown/index.js +6 -6
  68. package/build/components/block-heading-level-dropdown/index.js.map +1 -1
  69. package/build/components/block-heading-level-dropdown/index.native.js +6 -6
  70. package/build/components/block-heading-level-dropdown/index.native.js.map +1 -1
  71. package/build/components/block-icon/index.js +4 -3
  72. package/build/components/block-icon/index.js.map +1 -1
  73. package/build/components/block-icon/index.native.js +3 -3
  74. package/build/components/block-icon/index.native.js.map +1 -1
  75. package/build/components/block-info-slot-fill/index.js +3 -3
  76. package/build/components/block-info-slot-fill/index.js.map +1 -1
  77. package/build/components/block-inspector/index.js +34 -34
  78. package/build/components/block-inspector/index.js.map +1 -1
  79. package/build/components/block-list/block-crash-warning.js +2 -2
  80. package/build/components/block-list/block-crash-warning.js.map +1 -1
  81. package/build/components/block-list/block-html.js +3 -2
  82. package/build/components/block-list/block-html.js.map +1 -1
  83. package/build/components/block-list/block-invalid-warning.js +6 -5
  84. package/build/components/block-list/block-invalid-warning.js.map +1 -1
  85. package/build/components/block-list/block-invalid-warning.native.js +3 -3
  86. package/build/components/block-list/block-invalid-warning.native.js.map +1 -1
  87. package/build/components/block-list/block-list-item-cell.native.js +3 -2
  88. package/build/components/block-list/block-list-item-cell.native.js.map +1 -1
  89. package/build/components/block-list/block-list-item.native.js +10 -10
  90. package/build/components/block-list/block-list-item.native.js.map +1 -1
  91. package/build/components/block-list/block-outline.native.js +2 -2
  92. package/build/components/block-list/block-outline.native.js.map +1 -1
  93. package/build/components/block-list/block-selection-button.native.js +9 -9
  94. package/build/components/block-list/block-selection-button.native.js.map +1 -1
  95. package/build/components/block-list/block.js +16 -15
  96. package/build/components/block-list/block.js.map +1 -1
  97. package/build/components/block-list/block.native.js +10 -9
  98. package/build/components/block-list/block.native.js.map +1 -1
  99. package/build/components/block-list/grid-item.native.js +2 -2
  100. package/build/components/block-list/grid-item.native.js.map +1 -1
  101. package/build/components/block-list/index.js +14 -13
  102. package/build/components/block-list/index.js.map +1 -1
  103. package/build/components/block-list/index.native.js +21 -20
  104. package/build/components/block-list/index.native.js.map +1 -1
  105. package/build/components/block-list/insertion-point.native.js +5 -5
  106. package/build/components/block-list/insertion-point.native.js.map +1 -1
  107. package/build/components/block-list/layout.js +3 -2
  108. package/build/components/block-list/layout.js.map +1 -1
  109. package/build/components/block-list/subdirectory-icon.js +3 -3
  110. package/build/components/block-list/subdirectory-icon.js.map +1 -1
  111. package/build/components/block-list-appender/index.js +5 -5
  112. package/build/components/block-list-appender/index.js.map +1 -1
  113. package/build/components/block-list-appender/index.native.js +4 -4
  114. package/build/components/block-list-appender/index.native.js.map +1 -1
  115. package/build/components/block-lock/menu-item.js +4 -3
  116. package/build/components/block-lock/menu-item.js.map +1 -1
  117. package/build/components/block-lock/modal.js +21 -20
  118. package/build/components/block-lock/modal.js.map +1 -1
  119. package/build/components/block-lock/toolbar.js +5 -4
  120. package/build/components/block-lock/toolbar.js.map +1 -1
  121. package/build/components/block-media-update-progress/index.native.js +5 -4
  122. package/build/components/block-media-update-progress/index.native.js.map +1 -1
  123. package/build/components/block-mover/button.js +6 -5
  124. package/build/components/block-mover/button.js.map +1 -1
  125. package/build/components/block-mover/index.js +7 -7
  126. package/build/components/block-mover/index.js.map +1 -1
  127. package/build/components/block-mover/index.native.js +5 -4
  128. package/build/components/block-mover/index.native.js.map +1 -1
  129. package/build/components/block-navigation/dropdown.js +8 -7
  130. package/build/components/block-navigation/dropdown.js.map +1 -1
  131. package/build/components/block-parent-selector/index.js +6 -5
  132. package/build/components/block-parent-selector/index.js.map +1 -1
  133. package/build/components/block-pattern-setup/index.js +20 -19
  134. package/build/components/block-pattern-setup/index.js.map +1 -1
  135. package/build/components/block-pattern-setup/setup-toolbar.js +12 -12
  136. package/build/components/block-pattern-setup/setup-toolbar.js.map +1 -1
  137. package/build/components/block-patterns-list/index.js +19 -18
  138. package/build/components/block-patterns-list/index.js.map +1 -1
  139. package/build/components/block-patterns-paging/index.js +12 -12
  140. package/build/components/block-patterns-paging/index.js.map +1 -1
  141. package/build/components/block-popover/drop-zone.js +3 -3
  142. package/build/components/block-popover/drop-zone.js.map +1 -1
  143. package/build/components/block-popover/inbetween.js +4 -3
  144. package/build/components/block-popover/inbetween.js.map +1 -1
  145. package/build/components/block-popover/index.js +4 -3
  146. package/build/components/block-popover/index.js.map +1 -1
  147. package/build/components/block-preview/auto.js +9 -8
  148. package/build/components/block-preview/auto.js.map +1 -1
  149. package/build/components/block-preview/index.js +7 -6
  150. package/build/components/block-preview/index.js.map +1 -1
  151. package/build/components/block-quick-navigation/index.js +7 -7
  152. package/build/components/block-quick-navigation/index.js.map +1 -1
  153. package/build/components/block-removal-warning-modal/index.js +7 -6
  154. package/build/components/block-removal-warning-modal/index.js.map +1 -1
  155. package/build/components/block-selection-clearer/index.js +2 -2
  156. package/build/components/block-selection-clearer/index.js.map +1 -1
  157. package/build/components/block-settings/button.native.js +3 -3
  158. package/build/components/block-settings/button.native.js.map +1 -1
  159. package/build/components/block-settings/container.native.js +12 -12
  160. package/build/components/block-settings/container.native.js.map +1 -1
  161. package/build/components/block-settings-menu/block-html-convert-button.js +21 -17
  162. package/build/components/block-settings-menu/block-html-convert-button.js.map +1 -1
  163. package/build/components/block-settings-menu/block-mode-toggle.js +2 -2
  164. package/build/components/block-settings-menu/block-mode-toggle.js.map +1 -1
  165. package/build/components/block-settings-menu/block-settings-dropdown.js +17 -16
  166. package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  167. package/build/components/block-settings-menu/index.js +2 -2
  168. package/build/components/block-settings-menu/index.js.map +1 -1
  169. package/build/components/block-settings-menu-controls/index.js +9 -9
  170. package/build/components/block-settings-menu-controls/index.js.map +1 -1
  171. package/build/components/block-styles/index.js +9 -8
  172. package/build/components/block-styles/index.js.map +1 -1
  173. package/build/components/block-styles/index.native.js +4 -3
  174. package/build/components/block-styles/index.native.js.map +1 -1
  175. package/build/components/block-styles/menu-items.js +4 -4
  176. package/build/components/block-styles/menu-items.js.map +1 -1
  177. package/build/components/block-styles/preview-panel.js +3 -2
  178. package/build/components/block-styles/preview-panel.js.map +1 -1
  179. package/build/components/block-styles/preview.native.js +8 -7
  180. package/build/components/block-styles/preview.native.js.map +1 -1
  181. package/build/components/block-switcher/block-styles-menu.js +3 -3
  182. package/build/components/block-switcher/block-styles-menu.js.map +1 -1
  183. package/build/components/block-switcher/block-transformations-menu.js +11 -10
  184. package/build/components/block-switcher/block-transformations-menu.js.map +1 -1
  185. package/build/components/block-switcher/block-transformations-menu.native.js +2 -2
  186. package/build/components/block-switcher/block-transformations-menu.native.js.map +1 -1
  187. package/build/components/block-switcher/block-variation-transformations.js +6 -5
  188. package/build/components/block-switcher/block-variation-transformations.js.map +1 -1
  189. package/build/components/block-switcher/index.js +17 -17
  190. package/build/components/block-switcher/index.js.map +1 -1
  191. package/build/components/block-switcher/pattern-transformations-menu.js +18 -17
  192. package/build/components/block-switcher/pattern-transformations-menu.js.map +1 -1
  193. package/build/components/block-switcher/preview-block-popover.js +7 -7
  194. package/build/components/block-switcher/preview-block-popover.js.map +1 -1
  195. package/build/components/block-toolbar/block-toolbar-menu.native.js +6 -5
  196. package/build/components/block-toolbar/block-toolbar-menu.native.js.map +1 -1
  197. package/build/components/block-toolbar/index.js +16 -15
  198. package/build/components/block-toolbar/index.js.map +1 -1
  199. package/build/components/block-toolbar/index.native.js +8 -7
  200. package/build/components/block-toolbar/index.native.js.map +1 -1
  201. package/build/components/block-tools/back-compat.js +3 -2
  202. package/build/components/block-tools/back-compat.js.map +1 -1
  203. package/build/components/block-tools/block-contextual-toolbar.js +6 -5
  204. package/build/components/block-tools/block-contextual-toolbar.js.map +1 -1
  205. package/build/components/block-tools/block-selection-button.js +11 -10
  206. package/build/components/block-tools/block-selection-button.js.map +1 -1
  207. package/build/components/block-tools/index.js +10 -9
  208. package/build/components/block-tools/index.js.map +1 -1
  209. package/build/components/block-tools/insertion-point.js +9 -8
  210. package/build/components/block-tools/insertion-point.js.map +1 -1
  211. package/build/components/block-tools/selected-block-popover.js +9 -8
  212. package/build/components/block-tools/selected-block-popover.js.map +1 -1
  213. package/build/components/block-tools/zoom-out-mode-inserters.js +5 -4
  214. package/build/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
  215. package/build/components/block-types-list/index.js +4 -4
  216. package/build/components/block-types-list/index.js.map +1 -1
  217. package/build/components/block-types-list/index.native.js +11 -10
  218. package/build/components/block-types-list/index.native.js.map +1 -1
  219. package/build/components/block-variation-picker/index.js +8 -8
  220. package/build/components/block-variation-picker/index.js.map +1 -1
  221. package/build/components/block-variation-picker/index.native.js +8 -8
  222. package/build/components/block-variation-picker/index.native.js.map +1 -1
  223. package/build/components/block-variation-transforms/index.js +10 -9
  224. package/build/components/block-variation-transforms/index.js.map +1 -1
  225. package/build/components/block-vertical-alignment-control/icons.js +11 -11
  226. package/build/components/block-vertical-alignment-control/icons.js.map +1 -1
  227. package/build/components/block-vertical-alignment-control/index.js +3 -3
  228. package/build/components/block-vertical-alignment-control/index.js.map +1 -1
  229. package/build/components/block-vertical-alignment-control/ui.js +2 -2
  230. package/build/components/block-vertical-alignment-control/ui.js.map +1 -1
  231. package/build/components/border-radius-control/all-input-control.js +2 -2
  232. package/build/components/border-radius-control/all-input-control.js.map +1 -1
  233. package/build/components/border-radius-control/index.js +10 -9
  234. package/build/components/border-radius-control/index.js.map +1 -1
  235. package/build/components/border-radius-control/input-controls.js +5 -5
  236. package/build/components/border-radius-control/input-controls.js.map +1 -1
  237. package/build/components/border-radius-control/linked-button.js +3 -3
  238. package/build/components/border-radius-control/linked-button.js.map +1 -1
  239. package/build/components/button-block-appender/index.js +7 -6
  240. package/build/components/button-block-appender/index.js.map +1 -1
  241. package/build/components/button-block-appender/index.native.js +5 -5
  242. package/build/components/button-block-appender/index.native.js.map +1 -1
  243. package/build/components/caption/index.native.js +3 -3
  244. package/build/components/caption/index.native.js.map +1 -1
  245. package/build/components/child-layout-control/index.js +8 -7
  246. package/build/components/child-layout-control/index.js.map +1 -1
  247. package/build/components/color-palette/control.js +2 -2
  248. package/build/components/color-palette/control.js.map +1 -1
  249. package/build/components/color-palette/with-color-context.js +2 -2
  250. package/build/components/color-palette/with-color-context.js.map +1 -1
  251. package/build/components/color-style-selector/index.js +9 -9
  252. package/build/components/color-style-selector/index.js.map +1 -1
  253. package/build/components/colors/with-colors.js +5 -4
  254. package/build/components/colors/with-colors.js.map +1 -1
  255. package/build/components/colors-gradients/control.js +12 -12
  256. package/build/components/colors-gradients/control.js.map +1 -1
  257. package/build/components/colors-gradients/dropdown.js +13 -13
  258. package/build/components/colors-gradients/dropdown.js.map +1 -1
  259. package/build/components/colors-gradients/panel-color-gradient-settings.js +7 -7
  260. package/build/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
  261. package/build/components/colors-gradients/panel-color-gradient-settings.native.js +5 -4
  262. package/build/components/colors-gradients/panel-color-gradient-settings.native.js.map +1 -1
  263. package/build/components/contrast-checker/index.js +3 -3
  264. package/build/components/contrast-checker/index.js.map +1 -1
  265. package/build/components/contrast-checker/index.native.js +6 -5
  266. package/build/components/contrast-checker/index.native.js.map +1 -1
  267. package/build/components/convert-to-group-buttons/index.js +3 -3
  268. package/build/components/convert-to-group-buttons/index.js.map +1 -1
  269. package/build/components/convert-to-group-buttons/toolbar.js +4 -4
  270. package/build/components/convert-to-group-buttons/toolbar.js.map +1 -1
  271. package/build/components/copy-handler/index.js +29 -209
  272. package/build/components/copy-handler/index.js.map +1 -1
  273. package/build/components/date-format-picker/index.js +9 -8
  274. package/build/components/date-format-picker/index.js.map +1 -1
  275. package/build/components/default-block-appender/index.js +4 -4
  276. package/build/components/default-block-appender/index.js.map +1 -1
  277. package/build/components/default-block-appender/index.native.js +4 -4
  278. package/build/components/default-block-appender/index.native.js.map +1 -1
  279. package/build/components/default-style-picker/index.js +4 -3
  280. package/build/components/default-style-picker/index.js.map +1 -1
  281. package/build/components/dimensions-tool/aspect-ratio-tool.js +3 -3
  282. package/build/components/dimensions-tool/aspect-ratio-tool.js.map +1 -1
  283. package/build/components/dimensions-tool/index.js +5 -4
  284. package/build/components/dimensions-tool/index.js.map +1 -1
  285. package/build/components/dimensions-tool/scale-tool.js +6 -5
  286. package/build/components/dimensions-tool/scale-tool.js.map +1 -1
  287. package/build/components/dimensions-tool/width-height-tool.js +7 -7
  288. package/build/components/dimensions-tool/width-height-tool.js.map +1 -1
  289. package/build/components/duotone-control/index.js +18 -10
  290. package/build/components/duotone-control/index.js.map +1 -1
  291. package/build/components/editable-text/index.js +3 -2
  292. package/build/components/editable-text/index.js.map +1 -1
  293. package/build/components/editor-styles/index.js +5 -4
  294. package/build/components/editor-styles/index.js.map +1 -1
  295. package/build/components/floating-toolbar/index.native.js +8 -7
  296. package/build/components/floating-toolbar/index.native.js.map +1 -1
  297. package/build/components/floating-toolbar/nav-up-icon.js +4 -4
  298. package/build/components/floating-toolbar/nav-up-icon.js.map +1 -1
  299. package/build/components/font-appearance-control/index.js +4 -3
  300. package/build/components/font-appearance-control/index.js.map +1 -1
  301. package/build/components/font-family/index.js +2 -2
  302. package/build/components/font-family/index.js.map +1 -1
  303. package/build/components/font-sizes/font-size-picker.js +2 -2
  304. package/build/components/font-sizes/font-size-picker.js.map +1 -1
  305. package/build/components/font-sizes/with-font-sizes.js +4 -3
  306. package/build/components/font-sizes/with-font-sizes.js.map +1 -1
  307. package/build/components/global-styles/advanced-panel.js +7 -6
  308. package/build/components/global-styles/advanced-panel.js.map +1 -1
  309. package/build/components/global-styles/border-panel.js +8 -7
  310. package/build/components/global-styles/border-panel.js.map +1 -1
  311. package/build/components/global-styles/color-panel.js +21 -20
  312. package/build/components/global-styles/color-panel.js.map +1 -1
  313. package/build/components/global-styles/color-panel.native.js +4 -3
  314. package/build/components/global-styles/color-panel.native.js.map +1 -1
  315. package/build/components/global-styles/dimensions-panel.js +27 -26
  316. package/build/components/global-styles/dimensions-panel.js.map +1 -1
  317. package/build/components/global-styles/effects-panel.js +23 -22
  318. package/build/components/global-styles/effects-panel.js.map +1 -1
  319. package/build/components/global-styles/filters-panel.js +17 -16
  320. package/build/components/global-styles/filters-panel.js.map +1 -1
  321. package/build/components/global-styles/image-settings-panel.js +4 -4
  322. package/build/components/global-styles/image-settings-panel.js.map +1 -1
  323. package/build/components/global-styles/typography-panel.js +22 -21
  324. package/build/components/global-styles/typography-panel.js.map +1 -1
  325. package/build/components/gradients/with-gradient.js +2 -2
  326. package/build/components/gradients/with-gradient.js.map +1 -1
  327. package/build/components/height-control/index.js +9 -8
  328. package/build/components/height-control/index.js.map +1 -1
  329. package/build/components/iframe/index.js +6 -5
  330. package/build/components/iframe/index.js.map +1 -1
  331. package/build/components/image-editor/aspect-ratio-dropdown.js +7 -7
  332. package/build/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
  333. package/build/components/image-editor/context.js +2 -1
  334. package/build/components/image-editor/context.js.map +1 -1
  335. package/build/components/image-editor/cropper.js +4 -4
  336. package/build/components/image-editor/cropper.js.map +1 -1
  337. package/build/components/image-editor/form-controls.js +3 -3
  338. package/build/components/image-editor/form-controls.js.map +1 -1
  339. package/build/components/image-editor/index.js +5 -5
  340. package/build/components/image-editor/index.js.map +1 -1
  341. package/build/components/image-editor/rotation-button.js +2 -2
  342. package/build/components/image-editor/rotation-button.js.map +1 -1
  343. package/build/components/image-editor/zoom-dropdown.js +4 -4
  344. package/build/components/image-editor/zoom-dropdown.js.map +1 -1
  345. package/build/components/image-size-control/index.js +9 -9
  346. package/build/components/image-size-control/index.js.map +1 -1
  347. package/build/components/index.js +1 -1
  348. package/build/components/index.js.map +1 -1
  349. package/build/components/inner-blocks/button-block-appender.js +2 -2
  350. package/build/components/inner-blocks/button-block-appender.js.map +1 -1
  351. package/build/components/inner-blocks/constants.native.js +13 -0
  352. package/build/components/inner-blocks/constants.native.js.map +1 -0
  353. package/build/components/inner-blocks/default-block-appender.js +2 -2
  354. package/build/components/inner-blocks/default-block-appender.js.map +1 -1
  355. package/build/components/inner-blocks/index.js +9 -8
  356. package/build/components/inner-blocks/index.js.map +1 -1
  357. package/build/components/inner-blocks/index.native.js +21 -8
  358. package/build/components/inner-blocks/index.native.js.map +1 -1
  359. package/build/components/inner-blocks/warning-max-depth-exceeded.native.js +95 -0
  360. package/build/components/inner-blocks/warning-max-depth-exceeded.native.js.map +1 -0
  361. package/build/components/inner-blocks/with-client-id.js +2 -2
  362. package/build/components/inner-blocks/with-client-id.js.map +1 -1
  363. package/build/components/inserter/block-patterns-explorer/explorer.js +7 -6
  364. package/build/components/inserter/block-patterns-explorer/explorer.js.map +1 -1
  365. package/build/components/inserter/block-patterns-explorer/patterns-list.js +6 -5
  366. package/build/components/inserter/block-patterns-explorer/patterns-list.js.map +1 -1
  367. package/build/components/inserter/block-patterns-explorer/sidebar.js +8 -8
  368. package/build/components/inserter/block-patterns-explorer/sidebar.js.map +1 -1
  369. package/build/components/inserter/block-patterns-filter.js +21 -19
  370. package/build/components/inserter/block-patterns-filter.js.map +1 -1
  371. package/build/components/inserter/block-patterns-tab.js +19 -18
  372. package/build/components/inserter/block-patterns-tab.js.map +1 -1
  373. package/build/components/inserter/block-types-tab.js +10 -9
  374. package/build/components/inserter/block-types-tab.js.map +1 -1
  375. package/build/components/inserter/block-types-tab.native.js +2 -1
  376. package/build/components/inserter/block-types-tab.native.js.map +1 -1
  377. package/build/components/inserter/index.js +9 -8
  378. package/build/components/inserter/index.js.map +1 -1
  379. package/build/components/inserter/index.native.js +11 -10
  380. package/build/components/inserter/index.native.js.map +1 -1
  381. package/build/components/inserter/library.js +3 -2
  382. package/build/components/inserter/library.js.map +1 -1
  383. package/build/components/inserter/media-tab/hooks.js +4 -33
  384. package/build/components/inserter/media-tab/hooks.js.map +1 -1
  385. package/build/components/inserter/media-tab/media-list.js +3 -3
  386. package/build/components/inserter/media-tab/media-list.js.map +1 -1
  387. package/build/components/inserter/media-tab/media-panel.js +7 -6
  388. package/build/components/inserter/media-tab/media-panel.js.map +1 -1
  389. package/build/components/inserter/media-tab/media-preview.js +18 -17
  390. package/build/components/inserter/media-tab/media-preview.js.map +1 -1
  391. package/build/components/inserter/media-tab/media-tab.js +12 -11
  392. package/build/components/inserter/media-tab/media-tab.js.map +1 -1
  393. package/build/components/inserter/media-tab/utils.js +2 -2
  394. package/build/components/inserter/media-tab/utils.js.map +1 -1
  395. package/build/components/inserter/menu.js +19 -18
  396. package/build/components/inserter/menu.js.map +1 -1
  397. package/build/components/inserter/menu.native.js +9 -8
  398. package/build/components/inserter/menu.native.js.map +1 -1
  399. package/build/components/inserter/mobile-tab-navigation.js +12 -12
  400. package/build/components/inserter/mobile-tab-navigation.js.map +1 -1
  401. package/build/components/inserter/no-results.js +4 -4
  402. package/build/components/inserter/no-results.js.map +1 -1
  403. package/build/components/inserter/no-results.native.js +4 -4
  404. package/build/components/inserter/no-results.native.js.map +1 -1
  405. package/build/components/inserter/panel.js +5 -5
  406. package/build/components/inserter/panel.js.map +1 -1
  407. package/build/components/inserter/preview-panel.js +8 -7
  408. package/build/components/inserter/preview-panel.js.map +1 -1
  409. package/build/components/inserter/quick-inserter.js +7 -6
  410. package/build/components/inserter/quick-inserter.js.map +1 -1
  411. package/build/components/inserter/reusable-block-rename-hint.js +5 -4
  412. package/build/components/inserter/reusable-block-rename-hint.js.map +1 -1
  413. package/build/components/inserter/reusable-blocks-tab.native.js +3 -2
  414. package/build/components/inserter/reusable-blocks-tab.native.js.map +1 -1
  415. package/build/components/inserter/search-results.js +11 -10
  416. package/build/components/inserter/search-results.js.map +1 -1
  417. package/build/components/inserter/search-results.native.js +4 -3
  418. package/build/components/inserter/search-results.native.js.map +1 -1
  419. package/build/components/inserter/tabs.js +2 -1
  420. package/build/components/inserter/tabs.js.map +1 -1
  421. package/build/components/inserter/tabs.native.js +7 -6
  422. package/build/components/inserter/tabs.native.js.map +1 -1
  423. package/build/components/inserter/tips.js +6 -5
  424. package/build/components/inserter/tips.js.map +1 -1
  425. package/build/components/inserter-draggable-blocks/index.js +3 -3
  426. package/build/components/inserter-draggable-blocks/index.js.map +1 -1
  427. package/build/components/inserter-list-item/index.js +9 -8
  428. package/build/components/inserter-list-item/index.js.map +1 -1
  429. package/build/components/inserter-listbox/group.js +2 -1
  430. package/build/components/inserter-listbox/group.js.map +1 -1
  431. package/build/components/inserter-listbox/index.js +2 -2
  432. package/build/components/inserter-listbox/index.js.map +1 -1
  433. package/build/components/inserter-listbox/item.js +5 -4
  434. package/build/components/inserter-listbox/item.js.map +1 -1
  435. package/build/components/inserter-listbox/row.js +2 -1
  436. package/build/components/inserter-listbox/row.js.map +1 -1
  437. package/build/components/inspector-controls/block-support-slot-container.js +3 -2
  438. package/build/components/inspector-controls/block-support-slot-container.js.map +1 -1
  439. package/build/components/inspector-controls/block-support-tools-panel.js +3 -2
  440. package/build/components/inspector-controls/block-support-tools-panel.js.map +1 -1
  441. package/build/components/inspector-controls/fill.js +7 -6
  442. package/build/components/inspector-controls/fill.js.map +1 -1
  443. package/build/components/inspector-controls/fill.native.js +4 -3
  444. package/build/components/inspector-controls/fill.native.js.map +1 -1
  445. package/build/components/inspector-controls/index.js +3 -3
  446. package/build/components/inspector-controls/index.js.map +1 -1
  447. package/build/components/inspector-controls/slot.js +5 -4
  448. package/build/components/inspector-controls/slot.js.map +1 -1
  449. package/build/components/inspector-controls/slot.native.js +2 -2
  450. package/build/components/inspector-controls/slot.native.js.map +1 -1
  451. package/build/components/inspector-controls-tabs/advanced-controls-panel.js +3 -3
  452. package/build/components/inspector-controls-tabs/advanced-controls-panel.js.map +1 -1
  453. package/build/components/inspector-controls-tabs/index.js +5 -5
  454. package/build/components/inspector-controls-tabs/index.js.map +1 -1
  455. package/build/components/inspector-controls-tabs/position-controls-panel.js +5 -4
  456. package/build/components/inspector-controls-tabs/position-controls-panel.js.map +1 -1
  457. package/build/components/inspector-controls-tabs/settings-tab-hint.js +5 -4
  458. package/build/components/inspector-controls-tabs/settings-tab-hint.js.map +1 -1
  459. package/build/components/inspector-controls-tabs/settings-tab.js +2 -2
  460. package/build/components/inspector-controls-tabs/settings-tab.js.map +1 -1
  461. package/build/components/inspector-controls-tabs/styles-tab.js +11 -11
  462. package/build/components/inspector-controls-tabs/styles-tab.js.map +1 -1
  463. package/build/components/inspector-popover-header/index.js +8 -8
  464. package/build/components/inspector-popover-header/index.js.map +1 -1
  465. package/build/components/justify-content-control/index.js +3 -3
  466. package/build/components/justify-content-control/index.js.map +1 -1
  467. package/build/components/justify-content-control/ui.js +2 -2
  468. package/build/components/justify-content-control/ui.js.map +1 -1
  469. package/build/components/letter-spacing-control/index.js +3 -3
  470. package/build/components/letter-spacing-control/index.js.map +1 -1
  471. package/build/components/line-height-control/index.js +3 -3
  472. package/build/components/line-height-control/index.js.map +1 -1
  473. package/build/components/line-height-control/index.native.js +2 -2
  474. package/build/components/line-height-control/index.native.js.map +1 -1
  475. package/build/components/link-control/index.js +18 -17
  476. package/build/components/link-control/index.js.map +1 -1
  477. package/build/components/link-control/link-preview.js +20 -20
  478. package/build/components/link-control/link-preview.js.map +1 -1
  479. package/build/components/link-control/search-create-button.js +4 -3
  480. package/build/components/link-control/search-create-button.js.map +1 -1
  481. package/build/components/link-control/search-input.js +5 -4
  482. package/build/components/link-control/search-input.js.map +1 -1
  483. package/build/components/link-control/search-item.js +5 -5
  484. package/build/components/link-control/search-item.js.map +1 -1
  485. package/build/components/link-control/search-results.js +7 -7
  486. package/build/components/link-control/search-results.js.map +1 -1
  487. package/build/components/link-control/settings-drawer.js +5 -4
  488. package/build/components/link-control/settings-drawer.js.map +1 -1
  489. package/build/components/link-control/settings.js +4 -4
  490. package/build/components/link-control/settings.js.map +1 -1
  491. package/build/components/list-view/appender.js +5 -4
  492. package/build/components/list-view/appender.js.map +1 -1
  493. package/build/components/list-view/aria-referenced-text.js +2 -1
  494. package/build/components/list-view/aria-referenced-text.js.map +1 -1
  495. package/build/components/list-view/block-contents.js +5 -4
  496. package/build/components/list-view/block-contents.js.map +1 -1
  497. package/build/components/list-view/block-select-button.js +16 -15
  498. package/build/components/list-view/block-select-button.js.map +1 -1
  499. package/build/components/list-view/block.js +15 -45
  500. package/build/components/list-view/block.js.map +1 -1
  501. package/build/components/list-view/branch.js +17 -9
  502. package/build/components/list-view/branch.js.map +1 -1
  503. package/build/components/list-view/drop-indicator.js +4 -3
  504. package/build/components/list-view/drop-indicator.js.map +1 -1
  505. package/build/components/list-view/expander.js +3 -3
  506. package/build/components/list-view/expander.js.map +1 -1
  507. package/build/components/list-view/index.js +16 -10
  508. package/build/components/list-view/index.js.map +1 -1
  509. package/build/components/list-view/leaf.js +3 -2
  510. package/build/components/list-view/leaf.js.map +1 -1
  511. package/build/components/list-view/utils.js +35 -0
  512. package/build/components/list-view/utils.js.map +1 -1
  513. package/build/components/media-placeholder/index.js +22 -21
  514. package/build/components/media-placeholder/index.js.map +1 -1
  515. package/build/components/media-placeholder/index.native.js +13 -12
  516. package/build/components/media-placeholder/index.native.js.map +1 -1
  517. package/build/components/media-replace-flow/index.js +14 -13
  518. package/build/components/media-replace-flow/index.js.map +1 -1
  519. package/build/components/media-replace-flow/index.native.js +2 -2
  520. package/build/components/media-replace-flow/index.native.js.map +1 -1
  521. package/build/components/media-upload/{constants.js → constants.native.js} +2 -4
  522. package/build/components/media-upload/constants.native.js.map +1 -0
  523. package/build/components/media-upload/index.js +1 -1
  524. package/build/components/media-upload/index.js.map +1 -1
  525. package/build/components/media-upload/index.native.js +12 -11
  526. package/build/components/media-upload/index.native.js.map +1 -1
  527. package/build/components/media-upload-progress/index.native.js +5 -4
  528. package/build/components/media-upload-progress/index.native.js.map +1 -1
  529. package/build/components/multi-selection-inspector/index.js +6 -6
  530. package/build/components/multi-selection-inspector/index.js.map +1 -1
  531. package/build/components/navigable-toolbar/index.js +4 -3
  532. package/build/components/navigable-toolbar/index.js.map +1 -1
  533. package/build/components/observe-typing/index.js +2 -2
  534. package/build/components/observe-typing/index.js.map +1 -1
  535. package/build/components/panel-color-settings/index.js +2 -2
  536. package/build/components/panel-color-settings/index.js.map +1 -1
  537. package/build/components/plain-text/index.js +4 -3
  538. package/build/components/plain-text/index.js.map +1 -1
  539. package/build/components/plain-text/index.native.js +4 -3
  540. package/build/components/plain-text/index.native.js.map +1 -1
  541. package/build/components/preview-options/index.js +5 -5
  542. package/build/components/preview-options/index.js.map +1 -1
  543. package/build/components/provider/block-refs-provider.js +2 -1
  544. package/build/components/provider/block-refs-provider.js.map +1 -1
  545. package/build/components/provider/index.js +4 -3
  546. package/build/components/provider/index.js.map +1 -1
  547. package/build/components/provider/index.native.js +3 -2
  548. package/build/components/provider/index.native.js.map +1 -1
  549. package/build/components/provider/use-block-sync.js +1 -1
  550. package/build/components/provider/use-block-sync.js.map +1 -1
  551. package/build/components/provider/with-registry-provider.js +4 -3
  552. package/build/components/provider/with-registry-provider.js.map +1 -1
  553. package/build/components/publish-date-time-picker/index.js +5 -4
  554. package/build/components/publish-date-time-picker/index.js.map +1 -1
  555. package/build/components/recursion-provider/index.js +2 -1
  556. package/build/components/recursion-provider/index.js.map +1 -1
  557. package/build/components/resizable-box-popover/index.js +3 -3
  558. package/build/components/resizable-box-popover/index.js.map +1 -1
  559. package/build/components/resolution-tool/index.js +3 -3
  560. package/build/components/resolution-tool/index.js.map +1 -1
  561. package/build/components/responsive-block-control/index.js +10 -9
  562. package/build/components/responsive-block-control/index.js.map +1 -1
  563. package/build/components/responsive-block-control/label.js +3 -3
  564. package/build/components/responsive-block-control/label.js.map +1 -1
  565. package/build/components/rich-text/content.js +3 -2
  566. package/build/components/rich-text/content.js.map +1 -1
  567. package/build/components/rich-text/embed-handler-picker.native.js +2 -1
  568. package/build/components/rich-text/embed-handler-picker.native.js.map +1 -1
  569. package/build/components/rich-text/format-edit.js +4 -3
  570. package/build/components/rich-text/format-edit.js.map +1 -1
  571. package/build/components/rich-text/format-toolbar/index.js +4 -4
  572. package/build/components/rich-text/format-toolbar/index.js.map +1 -1
  573. package/build/components/rich-text/format-toolbar/index.native.js +3 -3
  574. package/build/components/rich-text/format-toolbar/index.native.js.map +1 -1
  575. package/build/components/rich-text/format-toolbar-container.js +9 -9
  576. package/build/components/rich-text/format-toolbar-container.js.map +1 -1
  577. package/build/components/rich-text/format-toolbar-container.native.js +3 -3
  578. package/build/components/rich-text/format-toolbar-container.native.js.map +1 -1
  579. package/build/components/rich-text/get-rich-text-values.js +2 -1
  580. package/build/components/rich-text/get-rich-text-values.js.map +1 -1
  581. package/build/components/rich-text/index.js +9 -8
  582. package/build/components/rich-text/index.js.map +1 -1
  583. package/build/components/rich-text/index.native.js +8 -15
  584. package/build/components/rich-text/index.native.js.map +1 -1
  585. package/build/components/rich-text/multiline.js +3 -2
  586. package/build/components/rich-text/multiline.js.map +1 -1
  587. package/build/components/rich-text/toolbar-button.js +3 -3
  588. package/build/components/rich-text/toolbar-button.js.map +1 -1
  589. package/build/components/rich-text/use-paste-handler.js +5 -87
  590. package/build/components/rich-text/use-paste-handler.js.map +1 -1
  591. package/build/components/rich-text/utils.js +2 -5
  592. package/build/components/rich-text/utils.js.map +1 -1
  593. package/build/components/skip-to-selected-block/index.js +2 -2
  594. package/build/components/skip-to-selected-block/index.js.map +1 -1
  595. package/build/components/spacing-sizes-control/index.js +9 -8
  596. package/build/components/spacing-sizes-control/index.js.map +1 -1
  597. package/build/components/spacing-sizes-control/input-controls/axial.js +3 -3
  598. package/build/components/spacing-sizes-control/input-controls/axial.js.map +1 -1
  599. package/build/components/spacing-sizes-control/input-controls/separated.js +3 -3
  600. package/build/components/spacing-sizes-control/input-controls/separated.js.map +1 -1
  601. package/build/components/spacing-sizes-control/input-controls/single.js +2 -2
  602. package/build/components/spacing-sizes-control/input-controls/single.js.map +1 -1
  603. package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js +9 -8
  604. package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
  605. package/build/components/spacing-sizes-control/sides-dropdown/index.js +6 -6
  606. package/build/components/spacing-sizes-control/sides-dropdown/index.js.map +1 -1
  607. package/build/components/text-decoration-control/index.js +6 -6
  608. package/build/components/text-decoration-control/index.js.map +1 -1
  609. package/build/components/text-transform-control/index.js +6 -6
  610. package/build/components/text-transform-control/index.js.map +1 -1
  611. package/build/components/tool-selector/index.js +11 -10
  612. package/build/components/tool-selector/index.js.map +1 -1
  613. package/build/components/typewriter/index.js +3 -3
  614. package/build/components/typewriter/index.js.map +1 -1
  615. package/build/components/ungroup-button/index.native.js +2 -2
  616. package/build/components/ungroup-button/index.native.js.map +1 -1
  617. package/build/components/unit-control/index.js +2 -2
  618. package/build/components/unit-control/index.js.map +1 -1
  619. package/build/components/unsupported-block-details/index.native.js +127 -0
  620. package/build/components/unsupported-block-details/index.native.js.map +1 -0
  621. package/build/components/url-input/button.js +9 -8
  622. package/build/components/url-input/button.js.map +1 -1
  623. package/build/components/url-input/index.js +9 -8
  624. package/build/components/url-input/index.js.map +1 -1
  625. package/build/components/url-input/index.native.js +2 -2
  626. package/build/components/url-input/index.native.js.map +1 -1
  627. package/build/components/url-popover/image-url-input-ui.js +19 -18
  628. package/build/components/url-popover/image-url-input-ui.js.map +1 -1
  629. package/build/components/url-popover/index.js +8 -7
  630. package/build/components/url-popover/index.js.map +1 -1
  631. package/build/components/url-popover/link-editor.js +4 -4
  632. package/build/components/url-popover/link-editor.js.map +1 -1
  633. package/build/components/url-popover/link-viewer-url.js +3 -3
  634. package/build/components/url-popover/link-viewer-url.js.map +1 -1
  635. package/build/components/url-popover/link-viewer.js +4 -4
  636. package/build/components/url-popover/link-viewer.js.map +1 -1
  637. package/build/components/use-on-block-drop/index.js +2 -2
  638. package/build/components/use-on-block-drop/index.js.map +1 -1
  639. package/build/components/use-unsupported-block-editor/index.native.js +57 -0
  640. package/build/components/use-unsupported-block-editor/index.native.js.map +1 -0
  641. package/build/components/video-player/gridicon-play.native.js +3 -3
  642. package/build/components/video-player/gridicon-play.native.js.map +1 -1
  643. package/build/components/video-player/index.native.js +6 -5
  644. package/build/components/video-player/index.native.js.map +1 -1
  645. package/build/components/warning/index.js +10 -9
  646. package/build/components/warning/index.js.map +1 -1
  647. package/build/components/warning/index.native.js +6 -6
  648. package/build/components/warning/index.native.js.map +1 -1
  649. package/build/components/writing-flow/index.js +7 -5
  650. package/build/components/writing-flow/index.js.map +1 -1
  651. package/build/components/writing-flow/use-clipboard-handler.js +179 -0
  652. package/build/components/writing-flow/use-clipboard-handler.js.map +1 -0
  653. package/build/components/writing-flow/use-tab-nav.js +4 -3
  654. package/build/components/writing-flow/use-tab-nav.js.map +1 -1
  655. package/build/components/writing-mode-control/index.js +6 -6
  656. package/build/components/writing-mode-control/index.js.map +1 -1
  657. package/build/hooks/align.js +6 -6
  658. package/build/hooks/align.js.map +1 -1
  659. package/build/hooks/anchor.js +10 -9
  660. package/build/hooks/anchor.js.map +1 -1
  661. package/build/hooks/background.js +17 -16
  662. package/build/hooks/background.js.map +1 -1
  663. package/build/hooks/block-hooks.js +11 -10
  664. package/build/hooks/block-hooks.js.map +1 -1
  665. package/build/hooks/block-rename-ui.js +17 -16
  666. package/build/hooks/block-rename-ui.js.map +1 -1
  667. package/build/hooks/border.js +6 -5
  668. package/build/hooks/border.js.map +1 -1
  669. package/build/hooks/color.js +7 -6
  670. package/build/hooks/color.js.map +1 -1
  671. package/build/hooks/content-lock-ui.js +9 -8
  672. package/build/hooks/content-lock-ui.js.map +1 -1
  673. package/build/hooks/contrast-checker.js +2 -1
  674. package/build/hooks/contrast-checker.js.map +1 -1
  675. package/build/hooks/custom-class-name.js +7 -7
  676. package/build/hooks/custom-class-name.js.map +1 -1
  677. package/build/hooks/custom-fields.js +8 -8
  678. package/build/hooks/custom-fields.js.map +1 -1
  679. package/build/hooks/dimensions.js +5 -4
  680. package/build/hooks/dimensions.js.map +1 -1
  681. package/build/hooks/duotone.js +10 -9
  682. package/build/hooks/duotone.js.map +1 -1
  683. package/build/hooks/font-size.js +5 -5
  684. package/build/hooks/font-size.js.map +1 -1
  685. package/build/hooks/layout.js +14 -13
  686. package/build/hooks/layout.js.map +1 -1
  687. package/build/hooks/line-height.js +3 -3
  688. package/build/hooks/line-height.js.map +1 -1
  689. package/build/hooks/margin.js +3 -2
  690. package/build/hooks/margin.js.map +1 -1
  691. package/build/hooks/padding.js +3 -2
  692. package/build/hooks/padding.js.map +1 -1
  693. package/build/hooks/position.js +10 -9
  694. package/build/hooks/position.js.map +1 -1
  695. package/build/hooks/style.js +11 -10
  696. package/build/hooks/style.js.map +1 -1
  697. package/build/hooks/typography.js +4 -3
  698. package/build/hooks/typography.js.map +1 -1
  699. package/build/hooks/typography.native.js +4 -4
  700. package/build/hooks/typography.native.js.map +1 -1
  701. package/build/layouts/constrained.js +11 -11
  702. package/build/layouts/constrained.js.map +1 -1
  703. package/build/layouts/flex.js +18 -18
  704. package/build/layouts/flex.js.map +1 -1
  705. package/build/layouts/grid.js +10 -10
  706. package/build/layouts/grid.js.map +1 -1
  707. package/build/private-apis.js +2 -0
  708. package/build/private-apis.js.map +1 -1
  709. package/build/store/actions.js +8 -12
  710. package/build/store/actions.js.map +1 -1
  711. package/build/store/private-selectors.js +55 -1
  712. package/build/store/private-selectors.js.map +1 -1
  713. package/build/store/reducer.js +19 -1
  714. package/build/store/reducer.js.map +1 -1
  715. package/build/store/selectors.js +1 -1
  716. package/build/store/selectors.js.map +1 -1
  717. package/build/utils/pasting.js +46 -0
  718. package/build/utils/pasting.js.map +1 -1
  719. package/build/utils/transform-styles/transforms/wrap.js +5 -0
  720. package/build/utils/transform-styles/transforms/wrap.js.map +1 -1
  721. package/build/utils/use-notify-copy.js +53 -0
  722. package/build/utils/use-notify-copy.js.map +1 -0
  723. package/build-module/autocompleters/block.js +1 -1
  724. package/build-module/autocompleters/link.js +1 -1
  725. package/build-module/components/alignment-control/index.js +1 -1
  726. package/build-module/components/alignment-control/ui.js +1 -1
  727. package/build-module/components/autocomplete/index.js +1 -1
  728. package/build-module/components/block-actions/index.js +1 -1
  729. package/build-module/components/block-actions/index.js.map +1 -1
  730. package/build-module/components/block-alignment-control/index.js +1 -1
  731. package/build-module/components/block-alignment-control/ui.js +1 -1
  732. package/build-module/components/block-alignment-control/ui.native.js +1 -1
  733. package/build-module/components/block-alignment-matrix-control/index.js +1 -1
  734. package/build-module/components/block-breadcrumb/index.js +2 -2
  735. package/build-module/components/block-breadcrumb/index.js.map +1 -1
  736. package/build-module/components/block-canvas/index.js +7 -9
  737. package/build-module/components/block-canvas/index.js.map +1 -1
  738. package/build-module/components/block-caption/index.native.js +1 -1
  739. package/build-module/components/block-card/index.js +1 -1
  740. package/build-module/components/block-compare/block-view.js +1 -1
  741. package/build-module/components/block-compare/index.js +1 -1
  742. package/build-module/components/block-context/index.js +1 -1
  743. package/build-module/components/block-controls/fill.js +1 -1
  744. package/build-module/components/block-controls/index.js +1 -1
  745. package/build-module/components/block-controls/slot.js +1 -1
  746. package/build-module/components/block-controls/slot.native.js +1 -1
  747. package/build-module/components/block-draggable/draggable-chip.js +1 -1
  748. package/build-module/components/block-draggable/draggable-chip.native.js +1 -1
  749. package/build-module/components/block-draggable/dropping-insertion-point.native.js +1 -1
  750. package/build-module/components/block-draggable/index.js +1 -1
  751. package/build-module/components/block-draggable/index.native.js +1 -1
  752. package/build-module/components/block-edit/edit.js +1 -1
  753. package/build-module/components/block-edit/edit.native.js +1 -1
  754. package/build-module/components/block-edit/index.js +1 -1
  755. package/build-module/components/block-edit-visually-button/index.js +1 -1
  756. package/build-module/components/block-full-height-alignment-control/index.js +1 -1
  757. package/build-module/components/block-heading-level-dropdown/heading-level-icon.js +3 -3
  758. package/build-module/components/block-heading-level-dropdown/heading-level-icon.js.map +1 -1
  759. package/build-module/components/block-heading-level-dropdown/index.js +3 -3
  760. package/build-module/components/block-heading-level-dropdown/index.js.map +1 -1
  761. package/build-module/components/block-heading-level-dropdown/index.native.js +3 -3
  762. package/build-module/components/block-heading-level-dropdown/index.native.js.map +1 -1
  763. package/build-module/components/block-icon/index.js +1 -1
  764. package/build-module/components/block-icon/index.native.js +1 -1
  765. package/build-module/components/block-info-slot-fill/index.js +1 -1
  766. package/build-module/components/block-inspector/index.js +1 -1
  767. package/build-module/components/block-list/block-crash-warning.js +1 -1
  768. package/build-module/components/block-list/block-html.js +1 -1
  769. package/build-module/components/block-list/block-invalid-warning.js +1 -1
  770. package/build-module/components/block-list/block-invalid-warning.native.js +1 -1
  771. package/build-module/components/block-list/block-list-item-cell.native.js +1 -1
  772. package/build-module/components/block-list/block-list-item.native.js +3 -3
  773. package/build-module/components/block-list/block-list-item.native.js.map +1 -1
  774. package/build-module/components/block-list/block-outline.native.js +1 -1
  775. package/build-module/components/block-list/block-selection-button.native.js +1 -1
  776. package/build-module/components/block-list/block.js +1 -1
  777. package/build-module/components/block-list/block.native.js +1 -1
  778. package/build-module/components/block-list/grid-item.native.js +1 -1
  779. package/build-module/components/block-list/index.js +1 -1
  780. package/build-module/components/block-list/index.native.js +1 -1
  781. package/build-module/components/block-list/insertion-point.native.js +1 -1
  782. package/build-module/components/block-list/layout.js +1 -1
  783. package/build-module/components/block-list/subdirectory-icon.js +1 -1
  784. package/build-module/components/block-list-appender/index.js +1 -1
  785. package/build-module/components/block-list-appender/index.native.js +1 -1
  786. package/build-module/components/block-lock/menu-item.js +1 -1
  787. package/build-module/components/block-lock/modal.js +1 -1
  788. package/build-module/components/block-lock/toolbar.js +1 -1
  789. package/build-module/components/block-media-update-progress/index.native.js +1 -1
  790. package/build-module/components/block-mover/button.js +1 -1
  791. package/build-module/components/block-mover/index.js +1 -1
  792. package/build-module/components/block-mover/index.native.js +1 -1
  793. package/build-module/components/block-navigation/dropdown.js +1 -1
  794. package/build-module/components/block-parent-selector/index.js +2 -2
  795. package/build-module/components/block-parent-selector/index.js.map +1 -1
  796. package/build-module/components/block-pattern-setup/index.js +1 -1
  797. package/build-module/components/block-pattern-setup/setup-toolbar.js +1 -1
  798. package/build-module/components/block-patterns-list/index.js +1 -1
  799. package/build-module/components/block-patterns-paging/index.js +1 -1
  800. package/build-module/components/block-popover/drop-zone.js +1 -1
  801. package/build-module/components/block-popover/inbetween.js +1 -1
  802. package/build-module/components/block-popover/index.js +1 -1
  803. package/build-module/components/block-preview/auto.js +1 -1
  804. package/build-module/components/block-preview/index.js +2 -2
  805. package/build-module/components/block-preview/index.js.map +1 -1
  806. package/build-module/components/block-quick-navigation/index.js +1 -1
  807. package/build-module/components/block-removal-warning-modal/index.js +1 -1
  808. package/build-module/components/block-selection-clearer/index.js +1 -1
  809. package/build-module/components/block-settings/button.native.js +1 -1
  810. package/build-module/components/block-settings/container.native.js +1 -1
  811. package/build-module/components/block-settings-menu/block-html-convert-button.js +20 -17
  812. package/build-module/components/block-settings-menu/block-html-convert-button.js.map +1 -1
  813. package/build-module/components/block-settings-menu/block-mode-toggle.js +1 -1
  814. package/build-module/components/block-settings-menu/block-settings-dropdown.js +1 -1
  815. package/build-module/components/block-settings-menu/index.js +1 -1
  816. package/build-module/components/block-settings-menu-controls/index.js +2 -2
  817. package/build-module/components/block-settings-menu-controls/index.js.map +1 -1
  818. package/build-module/components/block-styles/index.js +1 -1
  819. package/build-module/components/block-styles/index.native.js +1 -1
  820. package/build-module/components/block-styles/menu-items.js +1 -1
  821. package/build-module/components/block-styles/preview-panel.js +1 -1
  822. package/build-module/components/block-styles/preview.native.js +1 -1
  823. package/build-module/components/block-switcher/block-styles-menu.js +1 -1
  824. package/build-module/components/block-switcher/block-transformations-menu.js +1 -1
  825. package/build-module/components/block-switcher/block-transformations-menu.native.js +1 -1
  826. package/build-module/components/block-switcher/block-variation-transformations.js +1 -1
  827. package/build-module/components/block-switcher/index.js +6 -6
  828. package/build-module/components/block-switcher/index.js.map +1 -1
  829. package/build-module/components/block-switcher/pattern-transformations-menu.js +1 -1
  830. package/build-module/components/block-switcher/preview-block-popover.js +1 -1
  831. package/build-module/components/block-toolbar/block-toolbar-menu.native.js +1 -1
  832. package/build-module/components/block-toolbar/index.js +1 -1
  833. package/build-module/components/block-toolbar/index.native.js +1 -1
  834. package/build-module/components/block-tools/back-compat.js +1 -1
  835. package/build-module/components/block-tools/block-contextual-toolbar.js +1 -1
  836. package/build-module/components/block-tools/block-selection-button.js +2 -2
  837. package/build-module/components/block-tools/block-selection-button.js.map +1 -1
  838. package/build-module/components/block-tools/index.js +1 -1
  839. package/build-module/components/block-tools/insertion-point.js +1 -1
  840. package/build-module/components/block-tools/selected-block-popover.js +1 -1
  841. package/build-module/components/block-tools/zoom-out-mode-inserters.js +1 -1
  842. package/build-module/components/block-types-list/index.js +1 -1
  843. package/build-module/components/block-types-list/index.native.js +1 -1
  844. package/build-module/components/block-variation-picker/index.js +1 -1
  845. package/build-module/components/block-variation-picker/index.native.js +1 -1
  846. package/build-module/components/block-variation-transforms/index.js +1 -1
  847. package/build-module/components/block-vertical-alignment-control/icons.js +1 -1
  848. package/build-module/components/block-vertical-alignment-control/index.js +1 -1
  849. package/build-module/components/block-vertical-alignment-control/ui.js +1 -1
  850. package/build-module/components/border-radius-control/all-input-control.js +1 -1
  851. package/build-module/components/border-radius-control/index.js +2 -2
  852. package/build-module/components/border-radius-control/index.js.map +1 -1
  853. package/build-module/components/border-radius-control/input-controls.js +1 -1
  854. package/build-module/components/border-radius-control/linked-button.js +1 -1
  855. package/build-module/components/button-block-appender/index.js +1 -1
  856. package/build-module/components/button-block-appender/index.native.js +1 -1
  857. package/build-module/components/caption/index.native.js +1 -1
  858. package/build-module/components/child-layout-control/index.js +2 -2
  859. package/build-module/components/child-layout-control/index.js.map +1 -1
  860. package/build-module/components/color-palette/control.js +1 -1
  861. package/build-module/components/color-palette/with-color-context.js +1 -1
  862. package/build-module/components/color-style-selector/index.js +1 -1
  863. package/build-module/components/colors/with-colors.js +2 -2
  864. package/build-module/components/colors/with-colors.js.map +1 -1
  865. package/build-module/components/colors-gradients/control.js +1 -1
  866. package/build-module/components/colors-gradients/dropdown.js +1 -1
  867. package/build-module/components/colors-gradients/panel-color-gradient-settings.js +1 -1
  868. package/build-module/components/colors-gradients/panel-color-gradient-settings.native.js +1 -1
  869. package/build-module/components/contrast-checker/index.js +1 -1
  870. package/build-module/components/contrast-checker/index.native.js +1 -1
  871. package/build-module/components/convert-to-group-buttons/index.js +1 -1
  872. package/build-module/components/convert-to-group-buttons/toolbar.js +1 -1
  873. package/build-module/components/copy-handler/index.js +25 -205
  874. package/build-module/components/copy-handler/index.js.map +1 -1
  875. package/build-module/components/date-format-picker/index.js +1 -1
  876. package/build-module/components/default-block-appender/index.js +1 -1
  877. package/build-module/components/default-block-appender/index.native.js +1 -1
  878. package/build-module/components/default-style-picker/index.js +1 -1
  879. package/build-module/components/dimensions-tool/aspect-ratio-tool.js +1 -1
  880. package/build-module/components/dimensions-tool/index.js +2 -2
  881. package/build-module/components/dimensions-tool/index.js.map +1 -1
  882. package/build-module/components/dimensions-tool/scale-tool.js +2 -2
  883. package/build-module/components/dimensions-tool/scale-tool.js.map +1 -1
  884. package/build-module/components/dimensions-tool/width-height-tool.js +3 -3
  885. package/build-module/components/dimensions-tool/width-height-tool.js.map +1 -1
  886. package/build-module/components/duotone-control/index.js +10 -2
  887. package/build-module/components/duotone-control/index.js.map +1 -1
  888. package/build-module/components/editable-text/index.js +1 -1
  889. package/build-module/components/editor-styles/index.js +1 -1
  890. package/build-module/components/floating-toolbar/index.native.js +1 -1
  891. package/build-module/components/floating-toolbar/nav-up-icon.js +1 -1
  892. package/build-module/components/font-appearance-control/index.js +2 -2
  893. package/build-module/components/font-appearance-control/index.js.map +1 -1
  894. package/build-module/components/font-family/index.js +1 -1
  895. package/build-module/components/font-sizes/font-size-picker.js +1 -1
  896. package/build-module/components/font-sizes/with-font-sizes.js +1 -1
  897. package/build-module/components/global-styles/advanced-panel.js +1 -1
  898. package/build-module/components/global-styles/border-panel.js +1 -1
  899. package/build-module/components/global-styles/color-panel.js +1 -1
  900. package/build-module/components/global-styles/color-panel.native.js +1 -1
  901. package/build-module/components/global-styles/dimensions-panel.js +1 -1
  902. package/build-module/components/global-styles/effects-panel.js +1 -1
  903. package/build-module/components/global-styles/filters-panel.js +1 -1
  904. package/build-module/components/global-styles/image-settings-panel.js +1 -1
  905. package/build-module/components/global-styles/typography-panel.js +1 -1
  906. package/build-module/components/gradients/with-gradient.js +1 -1
  907. package/build-module/components/height-control/index.js +2 -2
  908. package/build-module/components/height-control/index.js.map +1 -1
  909. package/build-module/components/iframe/index.js +1 -1
  910. package/build-module/components/image-editor/aspect-ratio-dropdown.js +1 -1
  911. package/build-module/components/image-editor/context.js +1 -1
  912. package/build-module/components/image-editor/cropper.js +1 -1
  913. package/build-module/components/image-editor/form-controls.js +1 -1
  914. package/build-module/components/image-editor/index.js +1 -1
  915. package/build-module/components/image-editor/rotation-button.js +1 -1
  916. package/build-module/components/image-editor/zoom-dropdown.js +1 -1
  917. package/build-module/components/image-size-control/index.js +1 -1
  918. package/build-module/components/index.js +1 -1
  919. package/build-module/components/index.js.map +1 -1
  920. package/build-module/components/inner-blocks/button-block-appender.js +1 -1
  921. package/build-module/components/inner-blocks/constants.native.js +6 -0
  922. package/build-module/components/inner-blocks/constants.native.js.map +1 -0
  923. package/build-module/components/inner-blocks/default-block-appender.js +1 -1
  924. package/build-module/components/inner-blocks/index.js +1 -1
  925. package/build-module/components/inner-blocks/index.native.js +13 -1
  926. package/build-module/components/inner-blocks/index.native.js.map +1 -1
  927. package/build-module/components/inner-blocks/warning-max-depth-exceeded.native.js +86 -0
  928. package/build-module/components/inner-blocks/warning-max-depth-exceeded.native.js.map +1 -0
  929. package/build-module/components/inner-blocks/with-client-id.js +1 -1
  930. package/build-module/components/inserter/block-patterns-explorer/explorer.js +1 -1
  931. package/build-module/components/inserter/block-patterns-explorer/patterns-list.js +1 -1
  932. package/build-module/components/inserter/block-patterns-explorer/sidebar.js +1 -1
  933. package/build-module/components/inserter/block-patterns-filter.js +14 -13
  934. package/build-module/components/inserter/block-patterns-filter.js.map +1 -1
  935. package/build-module/components/inserter/block-patterns-tab.js +2 -2
  936. package/build-module/components/inserter/block-patterns-tab.js.map +1 -1
  937. package/build-module/components/inserter/block-types-tab.js +1 -1
  938. package/build-module/components/inserter/block-types-tab.native.js +1 -1
  939. package/build-module/components/inserter/index.js +3 -3
  940. package/build-module/components/inserter/index.js.map +1 -1
  941. package/build-module/components/inserter/index.native.js +3 -3
  942. package/build-module/components/inserter/index.native.js.map +1 -1
  943. package/build-module/components/inserter/library.js +1 -1
  944. package/build-module/components/inserter/media-tab/hooks.js +5 -34
  945. package/build-module/components/inserter/media-tab/hooks.js.map +1 -1
  946. package/build-module/components/inserter/media-tab/media-list.js +1 -1
  947. package/build-module/components/inserter/media-tab/media-panel.js +1 -1
  948. package/build-module/components/inserter/media-tab/media-preview.js +1 -1
  949. package/build-module/components/inserter/media-tab/media-tab.js +1 -1
  950. package/build-module/components/inserter/media-tab/utils.js +1 -1
  951. package/build-module/components/inserter/menu.js +1 -1
  952. package/build-module/components/inserter/menu.native.js +1 -1
  953. package/build-module/components/inserter/mobile-tab-navigation.js +1 -1
  954. package/build-module/components/inserter/no-results.js +1 -1
  955. package/build-module/components/inserter/no-results.native.js +1 -1
  956. package/build-module/components/inserter/panel.js +1 -1
  957. package/build-module/components/inserter/preview-panel.js +1 -1
  958. package/build-module/components/inserter/quick-inserter.js +1 -1
  959. package/build-module/components/inserter/reusable-block-rename-hint.js +1 -1
  960. package/build-module/components/inserter/reusable-blocks-tab.native.js +1 -1
  961. package/build-module/components/inserter/search-results.js +1 -1
  962. package/build-module/components/inserter/search-results.native.js +1 -1
  963. package/build-module/components/inserter/tabs.js +1 -1
  964. package/build-module/components/inserter/tabs.native.js +1 -1
  965. package/build-module/components/inserter/tips.js +1 -1
  966. package/build-module/components/inserter-draggable-blocks/index.js +1 -1
  967. package/build-module/components/inserter-list-item/index.js +1 -1
  968. package/build-module/components/inserter-listbox/group.js +1 -1
  969. package/build-module/components/inserter-listbox/index.js +1 -1
  970. package/build-module/components/inserter-listbox/item.js +1 -1
  971. package/build-module/components/inserter-listbox/row.js +1 -1
  972. package/build-module/components/inspector-controls/block-support-slot-container.js +1 -1
  973. package/build-module/components/inspector-controls/block-support-tools-panel.js +1 -1
  974. package/build-module/components/inspector-controls/fill.js +1 -1
  975. package/build-module/components/inspector-controls/fill.native.js +1 -1
  976. package/build-module/components/inspector-controls/index.js +1 -1
  977. package/build-module/components/inspector-controls/slot.js +1 -1
  978. package/build-module/components/inspector-controls/slot.native.js +1 -1
  979. package/build-module/components/inspector-controls-tabs/advanced-controls-panel.js +1 -1
  980. package/build-module/components/inspector-controls-tabs/index.js +1 -1
  981. package/build-module/components/inspector-controls-tabs/position-controls-panel.js +1 -1
  982. package/build-module/components/inspector-controls-tabs/settings-tab-hint.js +1 -1
  983. package/build-module/components/inspector-controls-tabs/settings-tab.js +1 -1
  984. package/build-module/components/inspector-controls-tabs/styles-tab.js +1 -1
  985. package/build-module/components/inspector-popover-header/index.js +1 -1
  986. package/build-module/components/justify-content-control/index.js +1 -1
  987. package/build-module/components/justify-content-control/ui.js +1 -1
  988. package/build-module/components/letter-spacing-control/index.js +2 -2
  989. package/build-module/components/letter-spacing-control/index.js.map +1 -1
  990. package/build-module/components/line-height-control/index.js +1 -1
  991. package/build-module/components/line-height-control/index.native.js +1 -1
  992. package/build-module/components/link-control/index.js +1 -1
  993. package/build-module/components/link-control/link-preview.js +1 -1
  994. package/build-module/components/link-control/search-create-button.js +1 -1
  995. package/build-module/components/link-control/search-input.js +1 -1
  996. package/build-module/components/link-control/search-item.js +1 -1
  997. package/build-module/components/link-control/search-results.js +1 -1
  998. package/build-module/components/link-control/settings-drawer.js +1 -1
  999. package/build-module/components/link-control/settings.js +1 -1
  1000. package/build-module/components/list-view/appender.js +1 -1
  1001. package/build-module/components/list-view/aria-referenced-text.js +1 -1
  1002. package/build-module/components/list-view/block-contents.js +1 -1
  1003. package/build-module/components/list-view/block-select-button.js +1 -1
  1004. package/build-module/components/list-view/block.js +4 -35
  1005. package/build-module/components/list-view/block.js.map +1 -1
  1006. package/build-module/components/list-view/branch.js +9 -2
  1007. package/build-module/components/list-view/branch.js.map +1 -1
  1008. package/build-module/components/list-view/drop-indicator.js +1 -1
  1009. package/build-module/components/list-view/expander.js +1 -1
  1010. package/build-module/components/list-view/index.js +9 -4
  1011. package/build-module/components/list-view/index.js.map +1 -1
  1012. package/build-module/components/list-view/leaf.js +1 -1
  1013. package/build-module/components/list-view/utils.js +34 -0
  1014. package/build-module/components/list-view/utils.js.map +1 -1
  1015. package/build-module/components/media-placeholder/index.js +1 -1
  1016. package/build-module/components/media-placeholder/index.native.js +1 -1
  1017. package/build-module/components/media-replace-flow/index.js +1 -1
  1018. package/build-module/components/media-replace-flow/index.native.js +1 -1
  1019. package/build-module/components/media-upload/{constants.js → constants.native.js} +1 -2
  1020. package/build-module/components/media-upload/constants.native.js.map +1 -0
  1021. package/build-module/components/media-upload/index.js +1 -1
  1022. package/build-module/components/media-upload/index.js.map +1 -1
  1023. package/build-module/components/media-upload/index.native.js +7 -7
  1024. package/build-module/components/media-upload/index.native.js.map +1 -1
  1025. package/build-module/components/media-upload-progress/index.native.js +1 -1
  1026. package/build-module/components/multi-selection-inspector/index.js +1 -1
  1027. package/build-module/components/navigable-toolbar/index.js +1 -1
  1028. package/build-module/components/observe-typing/index.js +1 -1
  1029. package/build-module/components/panel-color-settings/index.js +1 -1
  1030. package/build-module/components/plain-text/index.js +1 -1
  1031. package/build-module/components/plain-text/index.native.js +1 -1
  1032. package/build-module/components/preview-options/index.js +1 -1
  1033. package/build-module/components/provider/block-refs-provider.js +1 -1
  1034. package/build-module/components/provider/index.js +1 -1
  1035. package/build-module/components/provider/index.native.js +1 -1
  1036. package/build-module/components/provider/use-block-sync.js +1 -1
  1037. package/build-module/components/provider/use-block-sync.js.map +1 -1
  1038. package/build-module/components/provider/with-registry-provider.js +1 -1
  1039. package/build-module/components/publish-date-time-picker/index.js +1 -1
  1040. package/build-module/components/recursion-provider/index.js +1 -1
  1041. package/build-module/components/resizable-box-popover/index.js +1 -1
  1042. package/build-module/components/resolution-tool/index.js +1 -1
  1043. package/build-module/components/responsive-block-control/index.js +1 -1
  1044. package/build-module/components/responsive-block-control/label.js +1 -1
  1045. package/build-module/components/rich-text/content.js +1 -1
  1046. package/build-module/components/rich-text/embed-handler-picker.native.js +1 -1
  1047. package/build-module/components/rich-text/format-edit.js +1 -1
  1048. package/build-module/components/rich-text/format-toolbar/index.js +1 -1
  1049. package/build-module/components/rich-text/format-toolbar/index.native.js +1 -1
  1050. package/build-module/components/rich-text/format-toolbar-container.js +1 -1
  1051. package/build-module/components/rich-text/format-toolbar-container.native.js +1 -1
  1052. package/build-module/components/rich-text/get-rich-text-values.js +1 -1
  1053. package/build-module/components/rich-text/index.js +1 -1
  1054. package/build-module/components/rich-text/index.native.js +2 -10
  1055. package/build-module/components/rich-text/index.native.js.map +1 -1
  1056. package/build-module/components/rich-text/multiline.js +1 -1
  1057. package/build-module/components/rich-text/toolbar-button.js +1 -1
  1058. package/build-module/components/rich-text/use-paste-handler.js +7 -89
  1059. package/build-module/components/rich-text/use-paste-handler.js.map +1 -1
  1060. package/build-module/components/rich-text/utils.js +1 -3
  1061. package/build-module/components/rich-text/utils.js.map +1 -1
  1062. package/build-module/components/skip-to-selected-block/index.js +1 -1
  1063. package/build-module/components/spacing-sizes-control/index.js +1 -1
  1064. package/build-module/components/spacing-sizes-control/input-controls/axial.js +1 -1
  1065. package/build-module/components/spacing-sizes-control/input-controls/separated.js +1 -1
  1066. package/build-module/components/spacing-sizes-control/input-controls/single.js +1 -1
  1067. package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js +1 -1
  1068. package/build-module/components/spacing-sizes-control/sides-dropdown/index.js +1 -1
  1069. package/build-module/components/text-decoration-control/index.js +2 -2
  1070. package/build-module/components/text-decoration-control/index.js.map +1 -1
  1071. package/build-module/components/text-transform-control/index.js +2 -2
  1072. package/build-module/components/text-transform-control/index.js.map +1 -1
  1073. package/build-module/components/tool-selector/index.js +1 -1
  1074. package/build-module/components/typewriter/index.js +2 -2
  1075. package/build-module/components/typewriter/index.js.map +1 -1
  1076. package/build-module/components/ungroup-button/index.native.js +1 -1
  1077. package/build-module/components/unit-control/index.js +1 -1
  1078. package/build-module/components/unsupported-block-details/index.native.js +118 -0
  1079. package/build-module/components/unsupported-block-details/index.native.js.map +1 -0
  1080. package/build-module/components/url-input/button.js +1 -1
  1081. package/build-module/components/url-input/index.js +1 -1
  1082. package/build-module/components/url-input/index.native.js +1 -1
  1083. package/build-module/components/url-popover/image-url-input-ui.js +1 -1
  1084. package/build-module/components/url-popover/index.js +1 -1
  1085. package/build-module/components/url-popover/link-editor.js +1 -1
  1086. package/build-module/components/url-popover/link-viewer-url.js +1 -1
  1087. package/build-module/components/url-popover/link-viewer.js +1 -1
  1088. package/build-module/components/use-on-block-drop/index.js +2 -2
  1089. package/build-module/components/use-on-block-drop/index.js.map +1 -1
  1090. package/build-module/components/use-unsupported-block-editor/index.native.js +51 -0
  1091. package/build-module/components/use-unsupported-block-editor/index.native.js.map +1 -0
  1092. package/build-module/components/video-player/gridicon-play.native.js +1 -1
  1093. package/build-module/components/video-player/index.native.js +1 -1
  1094. package/build-module/components/warning/index.js +1 -1
  1095. package/build-module/components/warning/index.native.js +1 -1
  1096. package/build-module/components/writing-flow/index.js +5 -4
  1097. package/build-module/components/writing-flow/index.js.map +1 -1
  1098. package/build-module/components/writing-flow/use-clipboard-handler.js +172 -0
  1099. package/build-module/components/writing-flow/use-clipboard-handler.js.map +1 -0
  1100. package/build-module/components/writing-flow/use-tab-nav.js +1 -1
  1101. package/build-module/components/writing-mode-control/index.js +2 -2
  1102. package/build-module/components/writing-mode-control/index.js.map +1 -1
  1103. package/build-module/hooks/align.js +1 -1
  1104. package/build-module/hooks/anchor.js +3 -3
  1105. package/build-module/hooks/anchor.js.map +1 -1
  1106. package/build-module/hooks/background.js +1 -1
  1107. package/build-module/hooks/block-hooks.js +1 -1
  1108. package/build-module/hooks/block-rename-ui.js +1 -1
  1109. package/build-module/hooks/border.js +1 -1
  1110. package/build-module/hooks/color.js +1 -1
  1111. package/build-module/hooks/content-lock-ui.js +1 -1
  1112. package/build-module/hooks/contrast-checker.js +1 -1
  1113. package/build-module/hooks/custom-class-name.js +3 -3
  1114. package/build-module/hooks/custom-class-name.js.map +1 -1
  1115. package/build-module/hooks/custom-fields.js +3 -3
  1116. package/build-module/hooks/custom-fields.js.map +1 -1
  1117. package/build-module/hooks/dimensions.js +1 -1
  1118. package/build-module/hooks/duotone.js +1 -1
  1119. package/build-module/hooks/font-size.js +2 -2
  1120. package/build-module/hooks/font-size.js.map +1 -1
  1121. package/build-module/hooks/layout.js +1 -1
  1122. package/build-module/hooks/line-height.js +2 -2
  1123. package/build-module/hooks/line-height.js.map +1 -1
  1124. package/build-module/hooks/margin.js +1 -1
  1125. package/build-module/hooks/padding.js +1 -1
  1126. package/build-module/hooks/position.js +3 -3
  1127. package/build-module/hooks/position.js.map +1 -1
  1128. package/build-module/hooks/style.js +1 -1
  1129. package/build-module/hooks/typography.js +1 -1
  1130. package/build-module/hooks/typography.native.js +1 -1
  1131. package/build-module/layouts/constrained.js +1 -1
  1132. package/build-module/layouts/flex.js +1 -1
  1133. package/build-module/layouts/grid.js +1 -1
  1134. package/build-module/private-apis.js +2 -0
  1135. package/build-module/private-apis.js.map +1 -1
  1136. package/build-module/store/actions.js +8 -12
  1137. package/build-module/store/actions.js.map +1 -1
  1138. package/build-module/store/private-selectors.js +52 -0
  1139. package/build-module/store/private-selectors.js.map +1 -1
  1140. package/build-module/store/reducer.js +18 -1
  1141. package/build-module/store/reducer.js.map +1 -1
  1142. package/build-module/store/selectors.js +1 -1
  1143. package/build-module/store/selectors.js.map +1 -1
  1144. package/build-module/utils/pasting.js +47 -0
  1145. package/build-module/utils/pasting.js.map +1 -1
  1146. package/build-module/utils/transform-styles/transforms/wrap.js +5 -0
  1147. package/build-module/utils/transform-styles/transforms/wrap.js.map +1 -1
  1148. package/build-module/utils/use-notify-copy.js +46 -0
  1149. package/build-module/utils/use-notify-copy.js.map +1 -0
  1150. package/build-style/content-rtl.css +10 -11
  1151. package/build-style/content.css +10 -11
  1152. package/build-style/default-editor-styles-rtl.css +1 -1
  1153. package/build-style/default-editor-styles.css +1 -1
  1154. package/build-style/style-rtl.css +11 -12
  1155. package/build-style/style.css +11 -12
  1156. package/package.json +31 -32
  1157. package/src/components/block-actions/index.js +1 -1
  1158. package/src/components/block-breadcrumb/index.js +1 -1
  1159. package/src/components/block-canvas/index.js +6 -12
  1160. package/src/components/block-context/README.md +1 -1
  1161. package/src/components/block-heading-level-dropdown/heading-level-icon.js +2 -2
  1162. package/src/components/block-heading-level-dropdown/index.js +2 -2
  1163. package/src/components/block-heading-level-dropdown/index.native.js +2 -2
  1164. package/src/components/block-list/block-list-item.native.js +2 -2
  1165. package/src/components/block-parent-selector/index.js +1 -1
  1166. package/src/components/block-preview/index.js +1 -1
  1167. package/src/components/block-settings-menu/block-html-convert-button.js +28 -19
  1168. package/src/components/block-settings-menu-controls/index.js +1 -1
  1169. package/src/components/block-switcher/index.js +17 -18
  1170. package/src/components/block-switcher/test/__snapshots__/index.js.snap +2 -2
  1171. package/src/components/block-tools/block-selection-button.js +1 -1
  1172. package/src/components/border-radius-control/index.js +1 -1
  1173. package/src/components/child-layout-control/index.js +1 -1
  1174. package/src/components/color-palette/test/__snapshots__/control.js.snap +1 -1
  1175. package/src/components/colors/with-colors.js +1 -1
  1176. package/src/components/copy-handler/README.md +2 -0
  1177. package/src/components/copy-handler/index.js +21 -291
  1178. package/src/components/dimensions-tool/index.js +1 -1
  1179. package/src/components/dimensions-tool/scale-tool.js +1 -1
  1180. package/src/components/dimensions-tool/width-height-tool.js +1 -1
  1181. package/src/components/duotone-control/index.js +14 -2
  1182. package/src/components/editable-text/README.md +2 -2
  1183. package/src/components/font-appearance-control/index.js +1 -1
  1184. package/src/components/font-family/README.md +1 -1
  1185. package/src/components/height-control/README.md +1 -1
  1186. package/src/components/height-control/index.js +1 -1
  1187. package/src/components/image-size-control/README.md +2 -2
  1188. package/src/components/index.js +1 -1
  1189. package/src/components/inner-blocks/constants.native.js +5 -0
  1190. package/src/components/inner-blocks/index.native.js +15 -0
  1191. package/src/components/inner-blocks/warning-max-depth-exceeded.native.js +100 -0
  1192. package/src/components/inserter/block-patterns-filter.js +22 -10
  1193. package/src/components/inserter/block-patterns-tab.js +0 -3
  1194. package/src/components/inserter/index.js +2 -2
  1195. package/src/components/inserter/index.native.js +2 -2
  1196. package/src/components/inserter/media-tab/hooks.js +10 -44
  1197. package/src/components/inserter/style.scss +1 -1
  1198. package/src/components/letter-spacing-control/index.js +1 -1
  1199. package/src/components/list-view/block.js +3 -43
  1200. package/src/components/list-view/branch.js +11 -1
  1201. package/src/components/list-view/index.js +8 -4
  1202. package/src/components/list-view/utils.js +37 -0
  1203. package/src/components/media-placeholder/README.md +3 -3
  1204. package/src/components/media-upload/{constants.js → constants.native.js} +0 -1
  1205. package/src/components/media-upload/index.js +1 -1
  1206. package/src/components/media-upload/index.native.js +9 -5
  1207. package/src/components/panel-color-settings/README.md +5 -1
  1208. package/src/components/plain-text/README.md +1 -1
  1209. package/src/components/provider/README.md +1 -1
  1210. package/src/components/provider/use-block-sync.js +1 -1
  1211. package/src/components/publish-date-time-picker/README.md +1 -1
  1212. package/src/components/responsive-block-control/README.md +1 -3
  1213. package/src/components/rich-text/README.md +3 -3
  1214. package/src/components/rich-text/index.native.js +0 -13
  1215. package/src/components/rich-text/use-paste-handler.js +5 -99
  1216. package/src/components/rich-text/utils.js +0 -3
  1217. package/src/components/text-decoration-control/index.js +1 -1
  1218. package/src/components/text-transform-control/index.js +1 -1
  1219. package/src/components/typewriter/index.js +1 -1
  1220. package/src/components/unit-control/README.md +1 -1
  1221. package/src/components/unsupported-block-details/index.native.js +183 -0
  1222. package/src/components/unsupported-block-details/style.native.scss +56 -0
  1223. package/src/components/url-input/README.md +4 -4
  1224. package/src/components/use-on-block-drop/index.js +2 -2
  1225. package/src/components/use-unsupported-block-editor/index.native.js +59 -0
  1226. package/src/components/writing-flow/index.js +4 -2
  1227. package/src/components/writing-flow/use-clipboard-handler.js +242 -0
  1228. package/src/components/writing-mode-control/index.js +1 -1
  1229. package/src/hooks/anchor.js +2 -2
  1230. package/src/hooks/custom-class-name.js +2 -2
  1231. package/src/hooks/custom-fields.js +2 -2
  1232. package/src/hooks/font-size.js +1 -1
  1233. package/src/hooks/line-height.js +1 -1
  1234. package/src/hooks/position.js +2 -2
  1235. package/src/private-apis.js +2 -0
  1236. package/src/store/actions.js +7 -11
  1237. package/src/store/private-selectors.js +72 -0
  1238. package/src/store/reducer.js +17 -0
  1239. package/src/store/selectors.js +1 -1
  1240. package/src/store/test/actions.js +10 -16
  1241. package/src/utils/pasting.js +51 -0
  1242. package/src/utils/transform-styles/transforms/test/__snapshots__/wrap.js.snap +13 -6
  1243. package/src/utils/transform-styles/transforms/test/wrap.js +9 -0
  1244. package/src/utils/transform-styles/transforms/wrap.js +5 -0
  1245. package/src/utils/use-notify-copy.js +63 -0
  1246. package/tsconfig.tsbuildinfo +1 -1
  1247. package/build/components/block-settings-menu/block-convert-button.js +0 -27
  1248. package/build/components/block-settings-menu/block-convert-button.js.map +0 -1
  1249. package/build/components/media-upload/constants.js.map +0 -1
  1250. package/build-module/components/block-settings-menu/block-convert-button.js +0 -20
  1251. package/build-module/components/block-settings-menu/block-convert-button.js.map +0 -1
  1252. package/build-module/components/media-upload/constants.js.map +0 -1
  1253. package/src/components/block-settings-menu/block-convert-button.js +0 -14
@@ -1 +1 @@
1
- {"version":3,"names":["__experimentalTreeGridRow","TreeGridRow","__experimentalTreeGridCell","TreeGridCell","memo","AsyncModeProvider","useSelect","Appender","ListViewBlock","useListViewContext","isClientIdSelected","store","blockEditorStore","useBlockDisplayInformation","countBlocks","block","expandedState","draggedClientIds","isExpandedByDefault","_expandedState$block$","isDragged","includes","clientId","isExpanded","innerBlocks","reduce","countReducer","count","_expandedState$block$2","length","noop","ListViewBranch","props","blocks","selectBlock","showBlockMovers","selectedClientIds","level","path","isBranchDragged","isBranchSelected","listPosition","fixedListWindow","parentId","shouldShowInnerBlocks","isSyncedBranch","showAppender","showAppenderProp","parentBlockInformation","syncedBranch","isSynced","canParentExpand","select","canEditBlock","filteredBlocks","filter","Boolean","blockCount","rowCount","nextPosition","createElement","Fragment","map","index","_expandedState$client","itemInView","blockInView","position","updatedPath","hasNestedBlocks","shouldExpand","undefined","isSelected","isSelectedBranch","showBlock","key","value","siblingBlockCount","className","setSize","positionInSet","treeGridCellProps","nestingLevel"],"sources":["@wordpress/block-editor/src/components/list-view/branch.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalTreeGridRow as TreeGridRow,\n\t__experimentalTreeGridCell as TreeGridCell,\n} from '@wordpress/components';\nimport { memo } from '@wordpress/element';\nimport { AsyncModeProvider, useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { Appender } from './appender';\nimport ListViewBlock from './block';\nimport { useListViewContext } from './context';\nimport { isClientIdSelected } from './utils';\nimport { store as blockEditorStore } from '../../store';\nimport useBlockDisplayInformation from '../use-block-display-information';\n\n/**\n * Given a block, returns the total number of blocks in that subtree. This is used to help determine\n * the list position of a block.\n *\n * When a block is collapsed, we do not count their children as part of that total. In the current drag\n * implementation dragged blocks and their children are not counted.\n *\n * @param {Object} block block tree\n * @param {Object} expandedState state that notes which branches are collapsed\n * @param {Array} draggedClientIds a list of dragged client ids\n * @param {boolean} isExpandedByDefault flag to determine the default fallback expanded state.\n * @return {number} block count\n */\nfunction countBlocks(\n\tblock,\n\texpandedState,\n\tdraggedClientIds,\n\tisExpandedByDefault\n) {\n\tconst isDragged = draggedClientIds?.includes( block.clientId );\n\tif ( isDragged ) {\n\t\treturn 0;\n\t}\n\tconst isExpanded = expandedState[ block.clientId ] ?? isExpandedByDefault;\n\n\tif ( isExpanded ) {\n\t\treturn (\n\t\t\t1 +\n\t\t\tblock.innerBlocks.reduce(\n\t\t\t\tcountReducer(\n\t\t\t\t\texpandedState,\n\t\t\t\t\tdraggedClientIds,\n\t\t\t\t\tisExpandedByDefault\n\t\t\t\t),\n\t\t\t\t0\n\t\t\t)\n\t\t);\n\t}\n\treturn 1;\n}\nconst countReducer =\n\t( expandedState, draggedClientIds, isExpandedByDefault ) =>\n\t( count, block ) => {\n\t\tconst isDragged = draggedClientIds?.includes( block.clientId );\n\t\tif ( isDragged ) {\n\t\t\treturn count;\n\t\t}\n\t\tconst isExpanded =\n\t\t\texpandedState[ block.clientId ] ?? isExpandedByDefault;\n\t\tif ( isExpanded && block.innerBlocks.length > 0 ) {\n\t\t\treturn (\n\t\t\t\tcount +\n\t\t\t\tcountBlocks(\n\t\t\t\t\tblock,\n\t\t\t\t\texpandedState,\n\t\t\t\t\tdraggedClientIds,\n\t\t\t\t\tisExpandedByDefault\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t\treturn count + 1;\n\t};\n\nconst noop = () => {};\n\nfunction ListViewBranch( props ) {\n\tconst {\n\t\tblocks,\n\t\tselectBlock = noop,\n\t\tshowBlockMovers,\n\t\tselectedClientIds,\n\t\tlevel = 1,\n\t\tpath = '',\n\t\tisBranchDragged = false,\n\t\tisBranchSelected = false,\n\t\tlistPosition = 0,\n\t\tfixedListWindow,\n\t\tisExpanded,\n\t\tparentId,\n\t\tshouldShowInnerBlocks = true,\n\t\tisSyncedBranch = false,\n\t\tshowAppender: showAppenderProp = true,\n\t} = props;\n\n\tconst parentBlockInformation = useBlockDisplayInformation( parentId );\n\tconst syncedBranch = isSyncedBranch || !! parentBlockInformation?.isSynced;\n\n\tconst canParentExpand = useSelect(\n\t\t( select ) => {\n\t\t\tif ( ! parentId ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn select( blockEditorStore ).canEditBlock( parentId );\n\t\t},\n\t\t[ parentId ]\n\t);\n\n\tconst { expandedState, draggedClientIds } = useListViewContext();\n\n\tif ( ! canParentExpand ) {\n\t\treturn null;\n\t}\n\n\t// Only show the appender at the first level.\n\tconst showAppender = showAppenderProp && level === 1;\n\tconst filteredBlocks = blocks.filter( Boolean );\n\tconst blockCount = filteredBlocks.length;\n\t// The appender means an extra row in List View, so add 1 to the row count.\n\tconst rowCount = showAppender ? blockCount + 1 : blockCount;\n\tlet nextPosition = listPosition;\n\n\treturn (\n\t\t<>\n\t\t\t{ filteredBlocks.map( ( block, index ) => {\n\t\t\t\tconst { clientId, innerBlocks } = block;\n\n\t\t\t\tif ( index > 0 ) {\n\t\t\t\t\tnextPosition += countBlocks(\n\t\t\t\t\t\tfilteredBlocks[ index - 1 ],\n\t\t\t\t\t\texpandedState,\n\t\t\t\t\t\tdraggedClientIds,\n\t\t\t\t\t\tisExpanded\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tconst { itemInView } = fixedListWindow;\n\t\t\t\tconst blockInView = itemInView( nextPosition );\n\n\t\t\t\tconst position = index + 1;\n\t\t\t\tconst updatedPath =\n\t\t\t\t\tpath.length > 0\n\t\t\t\t\t\t? `${ path }_${ position }`\n\t\t\t\t\t\t: `${ position }`;\n\t\t\t\tconst hasNestedBlocks = !! innerBlocks?.length;\n\n\t\t\t\tconst shouldExpand =\n\t\t\t\t\thasNestedBlocks && shouldShowInnerBlocks\n\t\t\t\t\t\t? expandedState[ clientId ] ?? isExpanded\n\t\t\t\t\t\t: undefined;\n\n\t\t\t\tconst isDragged = !! draggedClientIds?.includes( clientId );\n\n\t\t\t\t// Make updates to the selected or dragged blocks synchronous,\n\t\t\t\t// but asynchronous for any other block.\n\t\t\t\tconst isSelected = isClientIdSelected(\n\t\t\t\t\tclientId,\n\t\t\t\t\tselectedClientIds\n\t\t\t\t);\n\t\t\t\tconst isSelectedBranch =\n\t\t\t\t\tisBranchSelected || ( isSelected && hasNestedBlocks );\n\t\t\t\tconst showBlock =\n\t\t\t\t\tisDragged || blockInView || isSelected || isBranchDragged;\n\t\t\t\treturn (\n\t\t\t\t\t<AsyncModeProvider key={ clientId } value={ ! isSelected }>\n\t\t\t\t\t\t{ showBlock && (\n\t\t\t\t\t\t\t<ListViewBlock\n\t\t\t\t\t\t\t\tblock={ block }\n\t\t\t\t\t\t\t\tselectBlock={ selectBlock }\n\t\t\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t\t\t\tisBranchSelected={ isSelectedBranch }\n\t\t\t\t\t\t\t\tisDragged={ isDragged || isBranchDragged }\n\t\t\t\t\t\t\t\tlevel={ level }\n\t\t\t\t\t\t\t\tposition={ position }\n\t\t\t\t\t\t\t\trowCount={ rowCount }\n\t\t\t\t\t\t\t\tsiblingBlockCount={ blockCount }\n\t\t\t\t\t\t\t\tshowBlockMovers={ showBlockMovers }\n\t\t\t\t\t\t\t\tpath={ updatedPath }\n\t\t\t\t\t\t\t\tisExpanded={ shouldExpand }\n\t\t\t\t\t\t\t\tlistPosition={ nextPosition }\n\t\t\t\t\t\t\t\tselectedClientIds={ selectedClientIds }\n\t\t\t\t\t\t\t\tisSyncedBranch={ syncedBranch }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ ! showBlock && (\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td className=\"block-editor-list-view-placeholder\" />\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ hasNestedBlocks && shouldExpand && (\n\t\t\t\t\t\t\t<ListViewBranch\n\t\t\t\t\t\t\t\tparentId={ clientId }\n\t\t\t\t\t\t\t\tblocks={ innerBlocks }\n\t\t\t\t\t\t\t\tselectBlock={ selectBlock }\n\t\t\t\t\t\t\t\tshowBlockMovers={ showBlockMovers }\n\t\t\t\t\t\t\t\tlevel={ level + 1 }\n\t\t\t\t\t\t\t\tpath={ updatedPath }\n\t\t\t\t\t\t\t\tlistPosition={ nextPosition + 1 }\n\t\t\t\t\t\t\t\tfixedListWindow={ fixedListWindow }\n\t\t\t\t\t\t\t\tisBranchSelected={ isSelectedBranch }\n\t\t\t\t\t\t\t\tisBranchDragged={ isDragged || isBranchDragged }\n\t\t\t\t\t\t\t\tselectedClientIds={ selectedClientIds }\n\t\t\t\t\t\t\t\tisExpanded={ isExpanded }\n\t\t\t\t\t\t\t\tisSyncedBranch={ syncedBranch }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</AsyncModeProvider>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t\t{ showAppender && (\n\t\t\t\t<TreeGridRow\n\t\t\t\t\tlevel={ level }\n\t\t\t\t\tsetSize={ rowCount }\n\t\t\t\t\tpositionInSet={ rowCount }\n\t\t\t\t\tisExpanded={ true }\n\t\t\t\t>\n\t\t\t\t\t<TreeGridCell>\n\t\t\t\t\t\t{ ( treeGridCellProps ) => (\n\t\t\t\t\t\t\t<Appender\n\t\t\t\t\t\t\t\tclientId={ parentId }\n\t\t\t\t\t\t\t\tnestingLevel={ level }\n\t\t\t\t\t\t\t\tblockCount={ blockCount }\n\t\t\t\t\t\t\t\t{ ...treeGridCellProps }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</TreeGridCell>\n\t\t\t\t</TreeGridRow>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default memo( ListViewBranch );\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,yBAAyB,IAAIC,WAAW,EACxCC,0BAA0B,IAAIC,YAAY,QACpC,uBAAuB;AAC9B,SAASC,IAAI,QAAQ,oBAAoB;AACzC,SAASC,iBAAiB,EAAEC,SAAS,QAAQ,iBAAiB;;AAE9D;AACA;AACA;AACA,SAASC,QAAQ,QAAQ,YAAY;AACrC,OAAOC,aAAa,MAAM,SAAS;AACnC,SAASC,kBAAkB,QAAQ,WAAW;AAC9C,SAASC,kBAAkB,QAAQ,SAAS;AAC5C,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;AACvD,OAAOC,0BAA0B,MAAM,kCAAkC;;AAEzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,WAAWA,CACnBC,KAAK,EACLC,aAAa,EACbC,gBAAgB,EAChBC,mBAAmB,EAClB;EAAA,IAAAC,qBAAA;EACD,MAAMC,SAAS,GAAGH,gBAAgB,EAAEI,QAAQ,CAAEN,KAAK,CAACO,QAAS,CAAC;EAC9D,IAAKF,SAAS,EAAG;IAChB,OAAO,CAAC;EACT;EACA,MAAMG,UAAU,IAAAJ,qBAAA,GAAGH,aAAa,CAAED,KAAK,CAACO,QAAQ,CAAE,cAAAH,qBAAA,cAAAA,qBAAA,GAAID,mBAAmB;EAEzE,IAAKK,UAAU,EAAG;IACjB,OACC,CAAC,GACDR,KAAK,CAACS,WAAW,CAACC,MAAM,CACvBC,YAAY,CACXV,aAAa,EACbC,gBAAgB,EAChBC,mBACD,CAAC,EAC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EACCT,eAAe,IAAIC,YAAY,IAChCV,aAAA,CAAC7B,cAAc;MACdY,QAAQ,EAAGrB,QAAU;MACrBW,MAAM,EAAGT,WAAa;MACtBU,WAAW,EAAGA,WAAa;MAC3BC,eAAe,EAAGA,eAAiB;MACnCE,KAAK,EAAGA,KAAK,GAAG,CAAG;MACnBC,IAAI,EAAG8B,WAAa;MACpB3B,YAAY,EAAGkB,YAAY,GAAG,CAAG;MACjCjB,eAAe,EAAGA,eAAiB;MACnCF,gBAAgB,EAAGiC,gBAAkB;MACrClC,eAAe,EAAGnB,SAAS,IAAImB,eAAiB;MAChDH,iBAAiB,EAAGA,iBAAmB;MACvCb,UAAU,EAAGA,UAAY;MACzBsB,cAAc,EAAGI;IAAc,CAC/B,CAEgB,CAAC;EAEtB,CAAE,CAAC,EACDH,YAAY,IACbc,aAAA,CAAC3D,WAAW;IACXoC,KAAK,EAAGA,KAAO;IACf0C,OAAO,EAAGrB,QAAU;IACpBsB,aAAa,EAAGtB,QAAU;IAC1BnC,UAAU,EAAG;EAAM,GAEnBqC,aAAA,CAACzD,YAAY,QACR8E,iBAAiB,IACpBrB,aAAA,CAACrD,QAAQ;IACRe,QAAQ,EAAGqB,QAAU;IACrBuC,YAAY,EAAG7C,KAAO;IACtBoB,UAAU,EAAGA,UAAY;IAAA,GACpBwB;EAAiB,CACtB,CAEW,CACF,CAEb,CAAC;AAEL;AAEA,eAAe7E,IAAI,CAAE2B,cAAe,CAAC"}
1
+ {"version":3,"names":["__experimentalTreeGridRow","TreeGridRow","__experimentalTreeGridCell","TreeGridCell","memo","AsyncModeProvider","useSelect","Appender","ListViewBlock","useListViewContext","isClientIdSelected","store","blockEditorStore","useBlockDisplayInformation","countBlocks","block","expandedState","draggedClientIds","isExpandedByDefault","_expandedState$block$","isDragged","includes","clientId","isExpanded","innerBlocks","reduce","countReducer","count","_expandedState$block$2","length","noop","ListViewBranch","props","blocks","selectBlock","showBlockMovers","selectedClientIds","level","path","isBranchDragged","isBranchSelected","listPosition","fixedListWindow","parentId","shouldShowInnerBlocks","isSyncedBranch","showAppender","showAppenderProp","parentBlockInformation","syncedBranch","isSynced","canParentExpand","select","canEditBlock","filteredBlocks","filter","Boolean","blockCount","rowCount","nextPosition","createElement","Fragment","map","index","_expandedState$client","itemInView","blockInView","position","updatedPath","hasNestedBlocks","shouldExpand","undefined","isSelected","isSelectedBranch","showBlock","key","value","siblingBlockCount","className","setSize","positionInSet","treeGridCellProps","nestingLevel"],"sources":["@wordpress/block-editor/src/components/list-view/branch.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalTreeGridRow as TreeGridRow,\n\t__experimentalTreeGridCell as TreeGridCell,\n} from '@wordpress/components';\nimport { memo } from '@wordpress/element';\nimport { AsyncModeProvider, useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { Appender } from './appender';\nimport ListViewBlock from './block';\nimport { useListViewContext } from './context';\nimport { isClientIdSelected } from './utils';\nimport { store as blockEditorStore } from '../../store';\nimport useBlockDisplayInformation from '../use-block-display-information';\n\n/**\n * Given a block, returns the total number of blocks in that subtree. This is used to help determine\n * the list position of a block.\n *\n * When a block is collapsed, we do not count their children as part of that total. In the current drag\n * implementation dragged blocks and their children are not counted.\n *\n * @param {Object} block block tree\n * @param {Object} expandedState state that notes which branches are collapsed\n * @param {Array} draggedClientIds a list of dragged client ids\n * @param {boolean} isExpandedByDefault flag to determine the default fallback expanded state.\n * @return {number} block count\n */\nfunction countBlocks(\n\tblock,\n\texpandedState,\n\tdraggedClientIds,\n\tisExpandedByDefault\n) {\n\tconst isDragged = draggedClientIds?.includes( block.clientId );\n\tif ( isDragged ) {\n\t\treturn 0;\n\t}\n\tconst isExpanded = expandedState[ block.clientId ] ?? isExpandedByDefault;\n\n\tif ( isExpanded ) {\n\t\treturn (\n\t\t\t1 +\n\t\t\tblock.innerBlocks.reduce(\n\t\t\t\tcountReducer(\n\t\t\t\t\texpandedState,\n\t\t\t\t\tdraggedClientIds,\n\t\t\t\t\tisExpandedByDefault\n\t\t\t\t),\n\t\t\t\t0\n\t\t\t)\n\t\t);\n\t}\n\treturn 1;\n}\nconst countReducer =\n\t( expandedState, draggedClientIds, isExpandedByDefault ) =>\n\t( count, block ) => {\n\t\tconst isDragged = draggedClientIds?.includes( block.clientId );\n\t\tif ( isDragged ) {\n\t\t\treturn count;\n\t\t}\n\t\tconst isExpanded =\n\t\t\texpandedState[ block.clientId ] ?? isExpandedByDefault;\n\t\tif ( isExpanded && block.innerBlocks.length > 0 ) {\n\t\t\treturn (\n\t\t\t\tcount +\n\t\t\t\tcountBlocks(\n\t\t\t\t\tblock,\n\t\t\t\t\texpandedState,\n\t\t\t\t\tdraggedClientIds,\n\t\t\t\t\tisExpandedByDefault\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t\treturn count + 1;\n\t};\n\nconst noop = () => {};\n\nfunction ListViewBranch( props ) {\n\tconst {\n\t\tblocks,\n\t\tselectBlock = noop,\n\t\tshowBlockMovers,\n\t\tselectedClientIds,\n\t\tlevel = 1,\n\t\tpath = '',\n\t\tisBranchDragged = false,\n\t\tisBranchSelected = false,\n\t\tlistPosition = 0,\n\t\tfixedListWindow,\n\t\tisExpanded,\n\t\tparentId,\n\t\tshouldShowInnerBlocks = true,\n\t\tisSyncedBranch = false,\n\t\tshowAppender: showAppenderProp = true,\n\t} = props;\n\n\tconst parentBlockInformation = useBlockDisplayInformation( parentId );\n\tconst syncedBranch = isSyncedBranch || !! parentBlockInformation?.isSynced;\n\n\tconst canParentExpand = useSelect(\n\t\t( select ) => {\n\t\t\tif ( ! parentId ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn select( blockEditorStore ).canEditBlock( parentId );\n\t\t},\n\t\t[ parentId ]\n\t);\n\n\tconst { expandedState, draggedClientIds } = useListViewContext();\n\n\tif ( ! canParentExpand ) {\n\t\treturn null;\n\t}\n\n\t// Only show the appender at the first level.\n\tconst showAppender = showAppenderProp && level === 1;\n\tconst filteredBlocks = blocks.filter( Boolean );\n\tconst blockCount = filteredBlocks.length;\n\t// The appender means an extra row in List View, so add 1 to the row count.\n\tconst rowCount = showAppender ? blockCount + 1 : blockCount;\n\tlet nextPosition = listPosition;\n\n\treturn (\n\t\t<>\n\t\t\t{ filteredBlocks.map( ( block, index ) => {\n\t\t\t\tconst { clientId, innerBlocks } = block;\n\n\t\t\t\tif ( index > 0 ) {\n\t\t\t\t\tnextPosition += countBlocks(\n\t\t\t\t\t\tfilteredBlocks[ index - 1 ],\n\t\t\t\t\t\texpandedState,\n\t\t\t\t\t\tdraggedClientIds,\n\t\t\t\t\t\tisExpanded\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tconst { itemInView } = fixedListWindow;\n\t\t\t\tconst blockInView = itemInView( nextPosition );\n\n\t\t\t\tconst position = index + 1;\n\t\t\t\tconst updatedPath =\n\t\t\t\t\tpath.length > 0\n\t\t\t\t\t\t? `${ path }_${ position }`\n\t\t\t\t\t\t: `${ position }`;\n\t\t\t\tconst hasNestedBlocks = !! innerBlocks?.length;\n\n\t\t\t\tconst shouldExpand =\n\t\t\t\t\thasNestedBlocks && shouldShowInnerBlocks\n\t\t\t\t\t\t? expandedState[ clientId ] ?? isExpanded\n\t\t\t\t\t\t: undefined;\n\n\t\t\t\tconst isDragged = !! draggedClientIds?.includes( clientId );\n\n\t\t\t\t// Make updates to the selected or dragged blocks synchronous,\n\t\t\t\t// but asynchronous for any other block.\n\t\t\t\tconst isSelected = isClientIdSelected(\n\t\t\t\t\tclientId,\n\t\t\t\t\tselectedClientIds\n\t\t\t\t);\n\t\t\t\tconst isSelectedBranch =\n\t\t\t\t\tisBranchSelected || ( isSelected && hasNestedBlocks );\n\n\t\t\t\t// To avoid performance issues, we only render blocks that are in view,\n\t\t\t\t// or blocks that are selected or dragged. If a block is selected,\n\t\t\t\t// it is only counted if it is the first of the block selection.\n\t\t\t\t// This prevents the entire tree from being rendered when a branch is\n\t\t\t\t// selected, or a user selects all blocks, while still enabling scroll\n\t\t\t\t// into view behavior when selecting a block or opening the list view.\n\t\t\t\tconst showBlock =\n\t\t\t\t\tisDragged ||\n\t\t\t\t\tblockInView ||\n\t\t\t\t\tisBranchDragged ||\n\t\t\t\t\t( isSelected && clientId === selectedClientIds[ 0 ] );\n\t\t\t\treturn (\n\t\t\t\t\t<AsyncModeProvider key={ clientId } value={ ! isSelected }>\n\t\t\t\t\t\t{ showBlock && (\n\t\t\t\t\t\t\t<ListViewBlock\n\t\t\t\t\t\t\t\tblock={ block }\n\t\t\t\t\t\t\t\tselectBlock={ selectBlock }\n\t\t\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t\t\t\tisBranchSelected={ isSelectedBranch }\n\t\t\t\t\t\t\t\tisDragged={ isDragged || isBranchDragged }\n\t\t\t\t\t\t\t\tlevel={ level }\n\t\t\t\t\t\t\t\tposition={ position }\n\t\t\t\t\t\t\t\trowCount={ rowCount }\n\t\t\t\t\t\t\t\tsiblingBlockCount={ blockCount }\n\t\t\t\t\t\t\t\tshowBlockMovers={ showBlockMovers }\n\t\t\t\t\t\t\t\tpath={ updatedPath }\n\t\t\t\t\t\t\t\tisExpanded={ shouldExpand }\n\t\t\t\t\t\t\t\tlistPosition={ nextPosition }\n\t\t\t\t\t\t\t\tselectedClientIds={ selectedClientIds }\n\t\t\t\t\t\t\t\tisSyncedBranch={ syncedBranch }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ ! showBlock && (\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td className=\"block-editor-list-view-placeholder\" />\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ hasNestedBlocks && shouldExpand && (\n\t\t\t\t\t\t\t<ListViewBranch\n\t\t\t\t\t\t\t\tparentId={ clientId }\n\t\t\t\t\t\t\t\tblocks={ innerBlocks }\n\t\t\t\t\t\t\t\tselectBlock={ selectBlock }\n\t\t\t\t\t\t\t\tshowBlockMovers={ showBlockMovers }\n\t\t\t\t\t\t\t\tlevel={ level + 1 }\n\t\t\t\t\t\t\t\tpath={ updatedPath }\n\t\t\t\t\t\t\t\tlistPosition={ nextPosition + 1 }\n\t\t\t\t\t\t\t\tfixedListWindow={ fixedListWindow }\n\t\t\t\t\t\t\t\tisBranchSelected={ isSelectedBranch }\n\t\t\t\t\t\t\t\tisBranchDragged={ isDragged || isBranchDragged }\n\t\t\t\t\t\t\t\tselectedClientIds={ selectedClientIds }\n\t\t\t\t\t\t\t\tisExpanded={ isExpanded }\n\t\t\t\t\t\t\t\tisSyncedBranch={ syncedBranch }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</AsyncModeProvider>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t\t{ showAppender && (\n\t\t\t\t<TreeGridRow\n\t\t\t\t\tlevel={ level }\n\t\t\t\t\tsetSize={ rowCount }\n\t\t\t\t\tpositionInSet={ rowCount }\n\t\t\t\t\tisExpanded={ true }\n\t\t\t\t>\n\t\t\t\t\t<TreeGridCell>\n\t\t\t\t\t\t{ ( treeGridCellProps ) => (\n\t\t\t\t\t\t\t<Appender\n\t\t\t\t\t\t\t\tclientId={ parentId }\n\t\t\t\t\t\t\t\tnestingLevel={ level }\n\t\t\t\t\t\t\t\tblockCount={ blockCount }\n\t\t\t\t\t\t\t\t{ ...treeGridCellProps }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</TreeGridCell>\n\t\t\t\t</TreeGridRow>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default memo( ListViewBranch );\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,yBAAyB,IAAIC,WAAW,EACxCC,0BAA0B,IAAIC,YAAY,QACpC,uBAAuB;AAC9B,SAASC,IAAI,QAAQ,oBAAoB;AACzC,SAASC,iBAAiB,EAAEC,SAAS,QAAQ,iBAAiB;;AAE9D;AACA;AACA;AACA,SAASC,QAAQ,QAAQ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ACvCb,UAAU,EAAGA,UAAY;MACzBsB,cAAc,EAAGI;IAAc,CAC/B,CAEgB,CAAC;EAEtB,CAAE,CAAC,EACDH,YAAY,IACbc,aAAA,CAAC3D,WAAW;IACXoC,KAAK,EAAGA,KAAO;IACf0C,OAAO,EAAGrB,QAAU;IACpBsB,aAAa,EAAGtB,QAAU;IAC1BnC,UAAU,EAAG;EAAM,GAEnBqC,aAAA,CAACzD,YAAY,QACR8E,iBAAiB,IACpBrB,aAAA,CAACrD,QAAQ;IACRe,QAAQ,EAAGqB,QAAU;IACrBuC,YAAY,EAAG7C,KAAO;IACtBoB,UAAU,EAAGA,UAAY;IAAA,GACpBwB;EAAiB,CACtB,CAEW,CACF,CAEb,CAAC;AAEL;AAEA,eAAe7E,IAAI,CAAE2B,cAAe,CAAC"}
@@ -1,4 +1,4 @@
1
- import { createElement } from "@wordpress/element";
1
+ import { createElement } from "react";
2
2
  /**
3
3
  * WordPress dependencies
4
4
  */
@@ -1,4 +1,4 @@
1
- import { createElement } from "@wordpress/element";
1
+ import { createElement } from "react";
2
2
  /**
3
3
  * WordPress dependencies
4
4
  */
@@ -1,4 +1,4 @@
1
- import { createElement } from "@wordpress/element";
1
+ import { createElement } from "react";
2
2
  /**
3
3
  * WordPress dependencies
4
4
  */
@@ -21,6 +21,7 @@ import useListViewDropZone from './use-list-view-drop-zone';
21
21
  import useListViewExpandSelectedItem from './use-list-view-expand-selected-item';
22
22
  import { store as blockEditorStore } from '../../store';
23
23
  import { BlockSettingsDropdown } from '../block-settings-menu/block-settings-dropdown';
24
+ import { focusListItem } from './utils';
24
25
  const expanded = (state, action) => {
25
26
  if (Array.isArray(action.clientIds)) {
26
27
  return {
@@ -114,7 +115,6 @@ function ListViewComponent({
114
115
  });
115
116
  const elementRef = useRef();
116
117
  const treeGridRef = useMergeRefs([elementRef, dropZoneRef, ref]);
117
- const isMounted = useRef(false);
118
118
  const [insertedBlock, setInsertedBlock] = useState(null);
119
119
  const {
120
120
  setSelectedTreeId
@@ -136,7 +136,13 @@ function ListViewComponent({
136
136
  }
137
137
  }, [setSelectedTreeId, updateBlockSelection, onSelect, getBlock]);
138
138
  useEffect(() => {
139
- isMounted.current = true;
139
+ // If a blocks are already selected when the list view is initially
140
+ // mounted, shift focus to the first selected block.
141
+ if (selectedClientIds?.length) {
142
+ focusListItem(selectedClientIds[0], elementRef);
143
+ }
144
+ // Disable reason: Only focus on the selected item when the list view is mounted.
145
+ // eslint-disable-next-line react-hooks/exhaustive-deps
140
146
  }, []);
141
147
  const expand = useCallback(clientId => {
142
148
  if (!clientId) {
@@ -168,7 +174,6 @@ function ListViewComponent({
168
174
  }
169
175
  }, [updateBlockSelection]);
170
176
  const contextValue = useMemo(() => ({
171
- isTreeGridMounted: isMounted.current,
172
177
  draggedClientIds,
173
178
  expandedState,
174
179
  expand,
@@ -1 +1 @@
1
- {"version":3,"names":["useInstanceId","useMergeRefs","__experimentalUseFixedWindowList","useFixedWindowList","__experimentalTreeGrid","TreeGrid","AsyncModeProvider","useSelect","deprecated","useCallback","useEffect","useMemo","useRef","useReducer","forwardRef","useState","__","ListViewBranch","ListViewContext","ListViewDropIndicator","useBlockSelection","useListViewClientIds","useListViewDropZone","useListViewExpandSelectedItem","store","blockEditorStore","BlockSettingsDropdown","expanded","state","action","Array","isArray","clientIds","reduce","newState","id","type","BLOCK_LIST_ITEM_HEIGHT","ListViewComponent","blocks","dropZoneElement","showBlockMovers","isExpanded","showAppender","blockSettingsMenu","BlockSettingsMenu","rootClientId","description","onSelect","additionalBlockContent","AdditionalBlockContent","ref","since","alternative","instanceId","clientIdsTree","draggedClientIds","selectedClientIds","getBlock","visibleBlockCount","shouldShowInnerBlocks","select","getGlobalBlockCount","getClientIdsOfDescendants","__unstableGetEditorMode","draggedBlockCount","length","updateBlockSelection","expandedState","setExpandedState","dropZoneRef","target","blockDropTarget","elementRef","treeGridRef","isMounted","insertedBlock","setInsertedBlock","setSelectedTreeId","firstSelectedBlockClientId","selectEditorBlock","event","blockClientId","focusPosition","current","expand","clientId","collapse","expandRow","row","dataset","block","collapseRow","focusRow","startRow","endRow","shiftKey","contextValue","isTreeGridMounted","listViewInstanceId","treeGridElementRef","fixedListWindow","useWindowing","windowOverscan","createElement","value","listViewRef","className","onCollapseRow","onExpandRow","onFocusRow","applicationAriaLabel","Provider","parentId","selectBlock","PrivateListView","props","undefined"],"sources":["@wordpress/block-editor/src/components/list-view/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tuseInstanceId,\n\tuseMergeRefs,\n\t__experimentalUseFixedWindowList as useFixedWindowList,\n} from '@wordpress/compose';\nimport { __experimentalTreeGrid as TreeGrid } from '@wordpress/components';\nimport { AsyncModeProvider, useSelect } from '@wordpress/data';\nimport deprecated from '@wordpress/deprecated';\nimport {\n\tuseCallback,\n\tuseEffect,\n\tuseMemo,\n\tuseRef,\n\tuseReducer,\n\tforwardRef,\n\tuseState,\n} from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport ListViewBranch from './branch';\nimport { ListViewContext } from './context';\nimport ListViewDropIndicator from './drop-indicator';\nimport useBlockSelection from './use-block-selection';\nimport useListViewClientIds from './use-list-view-client-ids';\nimport useListViewDropZone from './use-list-view-drop-zone';\nimport useListViewExpandSelectedItem from './use-list-view-expand-selected-item';\nimport { store as blockEditorStore } from '../../store';\nimport { BlockSettingsDropdown } from '../block-settings-menu/block-settings-dropdown';\n\nconst expanded = ( state, action ) => {\n\tif ( Array.isArray( action.clientIds ) ) {\n\t\treturn {\n\t\t\t...state,\n\t\t\t...action.clientIds.reduce(\n\t\t\t\t( newState, id ) => ( {\n\t\t\t\t\t...newState,\n\t\t\t\t\t[ id ]: action.type === 'expand',\n\t\t\t\t} ),\n\t\t\t\t{}\n\t\t\t),\n\t\t};\n\t}\n\treturn state;\n};\n\nexport const BLOCK_LIST_ITEM_HEIGHT = 36;\n\n/** @typedef {import('react').ComponentType} ComponentType */\n/** @typedef {import('react').Ref<HTMLElement>} Ref */\n\n/**\n * Show a hierarchical list of blocks.\n *\n * @param {Object} props Components props.\n * @param {string} props.id An HTML element id for the root element of ListView.\n * @param {Array} props.blocks _deprecated_ Custom subset of block client IDs to be used instead of the default hierarchy.\n * @param {?HTMLElement} props.dropZoneElement Optional element to be used as the drop zone.\n * @param {?boolean} props.showBlockMovers Flag to enable block movers. Defaults to `false`.\n * @param {?boolean} props.isExpanded Flag to determine whether nested levels are expanded by default. Defaults to `false`.\n * @param {?boolean} props.showAppender Flag to show or hide the block appender. Defaults to `false`.\n * @param {?ComponentType} props.blockSettingsMenu Optional more menu substitution. Defaults to the standard `BlockSettingsDropdown` component.\n * @param {string} props.rootClientId The client id of the root block from which we determine the blocks to show in the list.\n * @param {string} props.description Optional accessible description for the tree grid component.\n * @param {?Function} props.onSelect Optional callback to be invoked when a block is selected. Receives the block object that was selected.\n * @param {?ComponentType} props.additionalBlockContent Component that renders additional block content UI.\n * @param {Ref} ref Forwarded ref\n */\nfunction ListViewComponent(\n\t{\n\t\tid,\n\t\tblocks,\n\t\tdropZoneElement,\n\t\tshowBlockMovers = false,\n\t\tisExpanded = false,\n\t\tshowAppender = false,\n\t\tblockSettingsMenu: BlockSettingsMenu = BlockSettingsDropdown,\n\t\trootClientId,\n\t\tdescription,\n\t\tonSelect,\n\t\tadditionalBlockContent: AdditionalBlockContent,\n\t},\n\tref\n) {\n\t// This can be removed once we no longer need to support the blocks prop.\n\tif ( blocks ) {\n\t\tdeprecated(\n\t\t\t'`blocks` property in `wp.blockEditor.__experimentalListView`',\n\t\t\t{\n\t\t\t\tsince: '6.3',\n\t\t\t\talternative: '`rootClientId` property',\n\t\t\t}\n\t\t);\n\t}\n\n\tconst instanceId = useInstanceId( ListViewComponent );\n\tconst { clientIdsTree, draggedClientIds, selectedClientIds } =\n\t\tuseListViewClientIds( { blocks, rootClientId } );\n\n\tconst { getBlock } = useSelect( blockEditorStore );\n\tconst { visibleBlockCount, shouldShowInnerBlocks } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetGlobalBlockCount,\n\t\t\t\tgetClientIdsOfDescendants,\n\t\t\t\t__unstableGetEditorMode,\n\t\t\t} = select( blockEditorStore );\n\t\t\tconst draggedBlockCount =\n\t\t\t\tdraggedClientIds?.length > 0\n\t\t\t\t\t? getClientIdsOfDescendants( draggedClientIds ).length + 1\n\t\t\t\t\t: 0;\n\t\t\treturn {\n\t\t\t\tvisibleBlockCount: getGlobalBlockCount() - draggedBlockCount,\n\t\t\t\tshouldShowInnerBlocks: __unstableGetEditorMode() !== 'zoom-out',\n\t\t\t};\n\t\t},\n\t\t[ draggedClientIds ]\n\t);\n\n\tconst { updateBlockSelection } = useBlockSelection();\n\n\tconst [ expandedState, setExpandedState ] = useReducer( expanded, {} );\n\n\tconst { ref: dropZoneRef, target: blockDropTarget } = useListViewDropZone( {\n\t\tdropZoneElement,\n\t} );\n\tconst elementRef = useRef();\n\tconst treeGridRef = useMergeRefs( [ elementRef, dropZoneRef, ref ] );\n\n\tconst isMounted = useRef( false );\n\n\tconst [ insertedBlock, setInsertedBlock ] = useState( null );\n\n\tconst { setSelectedTreeId } = useListViewExpandSelectedItem( {\n\t\tfirstSelectedBlockClientId: selectedClientIds[ 0 ],\n\t\tsetExpandedState,\n\t} );\n\tconst selectEditorBlock = useCallback(\n\t\t/**\n\t\t * @param {MouseEvent | KeyboardEvent | undefined} event\n\t\t * @param {string} blockClientId\n\t\t * @param {null | undefined | -1 | 1} focusPosition\n\t\t */\n\t\t( event, blockClientId, focusPosition ) => {\n\t\t\tupdateBlockSelection( event, blockClientId, null, focusPosition );\n\t\t\tsetSelectedTreeId( blockClientId );\n\t\t\tif ( onSelect ) {\n\t\t\t\tonSelect( getBlock( blockClientId ) );\n\t\t\t}\n\t\t},\n\t\t[ setSelectedTreeId, updateBlockSelection, onSelect, getBlock ]\n\t);\n\tuseEffect( () => {\n\t\tisMounted.current = true;\n\t}, [] );\n\n\tconst expand = useCallback(\n\t\t( clientId ) => {\n\t\t\tif ( ! clientId ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tsetExpandedState( { type: 'expand', clientIds: [ clientId ] } );\n\t\t},\n\t\t[ setExpandedState ]\n\t);\n\tconst collapse = useCallback(\n\t\t( clientId ) => {\n\t\t\tif ( ! clientId ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tsetExpandedState( { type: 'collapse', clientIds: [ clientId ] } );\n\t\t},\n\t\t[ setExpandedState ]\n\t);\n\tconst expandRow = useCallback(\n\t\t( row ) => {\n\t\t\texpand( row?.dataset?.block );\n\t\t},\n\t\t[ expand ]\n\t);\n\tconst collapseRow = useCallback(\n\t\t( row ) => {\n\t\t\tcollapse( row?.dataset?.block );\n\t\t},\n\t\t[ collapse ]\n\t);\n\tconst focusRow = useCallback(\n\t\t( event, startRow, endRow ) => {\n\t\t\tif ( event.shiftKey ) {\n\t\t\t\tupdateBlockSelection(\n\t\t\t\t\tevent,\n\t\t\t\t\tstartRow?.dataset?.block,\n\t\t\t\t\tendRow?.dataset?.block\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t\t[ updateBlockSelection ]\n\t);\n\n\tconst contextValue = useMemo(\n\t\t() => ( {\n\t\t\tisTreeGridMounted: isMounted.current,\n\t\t\tdraggedClientIds,\n\t\t\texpandedState,\n\t\t\texpand,\n\t\t\tcollapse,\n\t\t\tBlockSettingsMenu,\n\t\t\tlistViewInstanceId: instanceId,\n\t\t\tAdditionalBlockContent,\n\t\t\tinsertedBlock,\n\t\t\tsetInsertedBlock,\n\t\t\ttreeGridElementRef: elementRef,\n\t\t} ),\n\t\t[\n\t\t\tdraggedClientIds,\n\t\t\texpandedState,\n\t\t\texpand,\n\t\t\tcollapse,\n\t\t\tBlockSettingsMenu,\n\t\t\tinstanceId,\n\t\t\tAdditionalBlockContent,\n\t\t\tinsertedBlock,\n\t\t\tsetInsertedBlock,\n\t\t]\n\t);\n\n\t// List View renders a fixed number of items and relies on each having a fixed item height of 36px.\n\t// If this value changes, we should also change the itemHeight value set in useFixedWindowList.\n\t// See: https://github.com/WordPress/gutenberg/pull/35230 for additional context.\n\tconst [ fixedListWindow ] = useFixedWindowList(\n\t\telementRef,\n\t\tBLOCK_LIST_ITEM_HEIGHT,\n\t\tvisibleBlockCount,\n\t\t{\n\t\t\t// Ensure that the windowing logic is recalculated when the expanded state changes.\n\t\t\t// This is necessary because expanding a collapsed block in a short list view can\n\t\t\t// switch the list view to a tall list view with a scrollbar, and vice versa.\n\t\t\t// When this happens, the windowing logic needs to be recalculated to ensure that\n\t\t\t// the correct number of blocks are rendered, by rechecking for a scroll container.\n\t\t\texpandedState,\n\t\t\tuseWindowing: true,\n\t\t\twindowOverscan: 40,\n\t\t}\n\t);\n\n\t// If there are no blocks to show and we're not showing the appender, do not render the list view.\n\tif ( ! clientIdsTree.length && ! showAppender ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<AsyncModeProvider value={ true }>\n\t\t\t<ListViewDropIndicator\n\t\t\t\tlistViewRef={ elementRef }\n\t\t\t\tblockDropTarget={ blockDropTarget }\n\t\t\t/>\n\t\t\t<TreeGrid\n\t\t\t\tid={ id }\n\t\t\t\tclassName=\"block-editor-list-view-tree\"\n\t\t\t\taria-label={ __( 'Block navigation structure' ) }\n\t\t\t\tref={ treeGridRef }\n\t\t\t\tonCollapseRow={ collapseRow }\n\t\t\t\tonExpandRow={ expandRow }\n\t\t\t\tonFocusRow={ focusRow }\n\t\t\t\tapplicationAriaLabel={ __( 'Block navigation structure' ) }\n\t\t\t\t// eslint-disable-next-line jsx-a11y/aria-props\n\t\t\t\taria-description={ description }\n\t\t\t>\n\t\t\t\t<ListViewContext.Provider value={ contextValue }>\n\t\t\t\t\t<ListViewBranch\n\t\t\t\t\t\tblocks={ clientIdsTree }\n\t\t\t\t\t\tparentId={ rootClientId }\n\t\t\t\t\t\tselectBlock={ selectEditorBlock }\n\t\t\t\t\t\tshowBlockMovers={ showBlockMovers }\n\t\t\t\t\t\tfixedListWindow={ fixedListWindow }\n\t\t\t\t\t\tselectedClientIds={ selectedClientIds }\n\t\t\t\t\t\tisExpanded={ isExpanded }\n\t\t\t\t\t\tshouldShowInnerBlocks={ shouldShowInnerBlocks }\n\t\t\t\t\t\tshowAppender={ showAppender }\n\t\t\t\t\t/>\n\t\t\t\t</ListViewContext.Provider>\n\t\t\t</TreeGrid>\n\t\t</AsyncModeProvider>\n\t);\n}\n\n// This is the private API for the ListView component.\n// It allows access to all props, not just the public ones.\nexport const PrivateListView = forwardRef( ListViewComponent );\n\n// This is the public API for the ListView component.\n// We wrap the PrivateListView component to hide some props from the public API.\nexport default forwardRef( ( props, ref ) => {\n\treturn (\n\t\t<PrivateListView\n\t\t\tref={ ref }\n\t\t\t{ ...props }\n\t\t\tshowAppender={ false }\n\t\t\trootClientId={ null }\n\t\t\tonSelect={ null }\n\t\t\tadditionalBlockContent={ null }\n\t\t\tblockSettingsMenu={ undefined }\n\t\t/>\n\t);\n} );\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,aAAa,EACbC,YAAY,EACZC,gCAAgC,IAAIC,kBAAkB,QAChD,oBAAoB;AAC3B,SAASC,sBAAsB,IAAIC,QAAQ,QAAQ,uBAAuB;AAC1E,SAASC,iBAAiB,EAAEC,SAAS,QAAQ,iBAAiB;AAC9D,OAAOC,UAAU,MAAM,uBAAuB;AAC9C,SACCC,WAAW,EACXC,SAAS,EACTC,OAAO,EACPC,MAAM,EACNC,UAAU,EACVC,UAAU,EACVC,QAAQ,QACF,oBAAoB;AAC3B,SAASC,EAAE,QAAQ,iBAAiB;;AAEpC;AACA;AACA;AACA,OAAOC,cAAc,MAAM,UAAU;AACrC,SAASC,eAAe,QAAQ,WAAW;AAC3C,OAAOC,qBAAqB,MAAM,kBAAkB;AACpD,OAAOC,iBAAiB,MAAM,uBAAuB;AACrD,OAAOC,oBAAoB,MAAM,4BAA4B;AAC7D,OAAOC,mBAAmB,MAAM,2BAA2B;AAC3D,OAAOC,6BAA6B,MAAM,sCAAsC;AAChF,S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EAAiB,CACnC,CAAC,EACFgC,aAAA,CAACnG,QAAQ;IACR8B,EAAE,EAAGA,EAAI;IACTwE,SAAS,EAAC,6BAA6B;IACvC,cAAa3F,EAAE,CAAE,4BAA6B,CAAG;IACjDmC,GAAG,EAAGuB,WAAa;IACnBkC,aAAa,EAAGhB,WAAa;IAC7BiB,WAAW,EAAGrB,SAAW;IACzBsB,UAAU,EAAGjB,QAAU;IACvBkB,oBAAoB,EAAG/F,EAAE,CAAE,4BAA6B;IACxD;IAAA;IACA,oBAAmB+B;EAAa,GAEhCyD,aAAA,CAACtF,eAAe,CAAC8F,QAAQ;IAACP,KAAK,EAAGR;EAAc,GAC/CO,aAAA,CAACvF,cAAc;IACdsB,MAAM,EAAGgB,aAAe;IACxB0D,QAAQ,EAAGnE,YAAc;IACzBoE,WAAW,EAAGlC,iBAAmB;IACjCvC,eAAe,EAAGA,eAAiB;IACnC4D,eAAe,EAAGA,eAAiB;IACnC5C,iBAAiB,EAAGA,iBAAmB;IACvCf,UAAU,EAAGA,UAAY;IACzBkB,qBAAqB,EAAGA,qBAAuB;IAC/CjB,YAAY,EAAGA;EAAc,CAC7B,CACwB,CACjB,CACQ,CAAC;AAEtB;;AAEA;AACA;AACA,OAAO,MAAMwE,eAAe,GAAGrG,UAAU,CAAEwB,iBAAkB,CAAC;;AAE9D;AACA;AACA,eAAexB,UAAU,CAAE,CAAEsG,KAAK,EAAEjE,GAAG,KAAM;EAC5C,OACCqD,aAAA,CAACW,eAAe;IACfhE,GAAG,EAAGA,GAAK;IAAA,GACNiE,KAAK;IACVzE,YAAY,EAAG,KAAO;IACtBG,YAAY,EAAG,IAAM;IACrBE,QAAQ,EAAG,IAAM;IACjBC,sBAAsB,EAAG,IAAM;IAC/BL,iBAAiB,EAAGyE;EAAW,CAC/B,CAAC;AAEJ,CAAE,CAAC"}
1
+ {"version":3,"names":["useInstanceId","useMergeRefs","__experimentalUseFixedWindowList","useFixedWindowList","__experimentalTreeGrid","TreeGrid","AsyncModeProvider","useSelect","deprecated","useCallback","useEffect","useMemo","useRef","useReducer","forwardRef","useState","__","ListViewBranch","ListViewContext","ListViewDropIndicator","useBlockSelection","useListViewClientIds","useListViewDropZone","useListViewExpandSelectedItem","store","blockEditorStore","BlockSettingsDropdown","focusListItem","expanded","state","action","Array","isArray","clientIds","reduce","newState","id","type","BLOCK_LIST_ITEM_HEIGHT","ListViewComponent","blocks","dropZoneElement","showBlockMovers","isExpanded","showAppender","blockSettingsMenu","BlockSettingsMenu","rootClientId","description","onSelect","additionalBlockContent","AdditionalBlockContent","ref","since","alternative","instanceId","clientIdsTree","draggedClientIds","selectedClientIds","getBlock","visibleBlockCount","shouldShowInnerBlocks","select","getGlobalBlockCount","getClientIdsOfDescendants","__unstableGetEditorMode","draggedBlockCount","length","updateBlockSelection","expandedState","setExpandedState","dropZoneRef","target","blockDropTarget","elementRef","treeGridRef","insertedBlock","setInsertedBlock","setSelectedTreeId","firstSelectedBlockClientId","selectEditorBlock","event","blockClientId","focusPosition","expand","clientId","collapse","expandRow","row","dataset","block","collapseRow","focusRow","startRow","endRow","shiftKey","contextValue","listViewInstanceId","treeGridElementRef","fixedListWindow","useWindowing","windowOverscan","createElement","value","listViewRef","className","onCollapseRow","onExpandRow","onFocusRow","applicationAriaLabel","Provider","parentId","selectBlock","PrivateListView","props","undefined"],"sources":["@wordpress/block-editor/src/components/list-view/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tuseInstanceId,\n\tuseMergeRefs,\n\t__experimentalUseFixedWindowList as useFixedWindowList,\n} from '@wordpress/compose';\nimport { __experimentalTreeGrid as TreeGrid } from '@wordpress/components';\nimport { AsyncModeProvider, useSelect } from '@wordpress/data';\nimport deprecated from '@wordpress/deprecated';\nimport {\n\tuseCallback,\n\tuseEffect,\n\tuseMemo,\n\tuseRef,\n\tuseReducer,\n\tforwardRef,\n\tuseState,\n} from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport ListViewBranch from './branch';\nimport { ListViewContext } from './context';\nimport ListViewDropIndicator from './drop-indicator';\nimport useBlockSelection from './use-block-selection';\nimport useListViewClientIds from './use-list-view-client-ids';\nimport useListViewDropZone from './use-list-view-drop-zone';\nimport useListViewExpandSelectedItem from './use-list-view-expand-selected-item';\nimport { store as blockEditorStore } from '../../store';\nimport { BlockSettingsDropdown } from '../block-settings-menu/block-settings-dropdown';\nimport { focusListItem } from './utils';\n\nconst expanded = ( state, action ) => {\n\tif ( Array.isArray( action.clientIds ) ) {\n\t\treturn {\n\t\t\t...state,\n\t\t\t...action.clientIds.reduce(\n\t\t\t\t( newState, id ) => ( {\n\t\t\t\t\t...newState,\n\t\t\t\t\t[ id ]: action.type === 'expand',\n\t\t\t\t} ),\n\t\t\t\t{}\n\t\t\t),\n\t\t};\n\t}\n\treturn state;\n};\n\nexport const BLOCK_LIST_ITEM_HEIGHT = 36;\n\n/** @typedef {import('react').ComponentType} ComponentType */\n/** @typedef {import('react').Ref<HTMLElement>} Ref */\n\n/**\n * Show a hierarchical list of blocks.\n *\n * @param {Object} props Components props.\n * @param {string} props.id An HTML element id for the root element of ListView.\n * @param {Array} props.blocks _deprecated_ Custom subset of block client IDs to be used instead of the default hierarchy.\n * @param {?HTMLElement} props.dropZoneElement Optional element to be used as the drop zone.\n * @param {?boolean} props.showBlockMovers Flag to enable block movers. Defaults to `false`.\n * @param {?boolean} props.isExpanded Flag to determine whether nested levels are expanded by default. Defaults to `false`.\n * @param {?boolean} props.showAppender Flag to show or hide the block appender. Defaults to `false`.\n * @param {?ComponentType} props.blockSettingsMenu Optional more menu substitution. Defaults to the standard `BlockSettingsDropdown` component.\n * @param {string} props.rootClientId The client id of the root block from which we determine the blocks to show in the list.\n * @param {string} props.description Optional accessible description for the tree grid component.\n * @param {?Function} props.onSelect Optional callback to be invoked when a block is selected. Receives the block object that was selected.\n * @param {?ComponentType} props.additionalBlockContent Component that renders additional block content UI.\n * @param {Ref} ref Forwarded ref\n */\nfunction ListViewComponent(\n\t{\n\t\tid,\n\t\tblocks,\n\t\tdropZoneElement,\n\t\tshowBlockMovers = false,\n\t\tisExpanded = false,\n\t\tshowAppender = false,\n\t\tblockSettingsMenu: BlockSettingsMenu = BlockSettingsDropdown,\n\t\trootClientId,\n\t\tdescription,\n\t\tonSelect,\n\t\tadditionalBlockContent: AdditionalBlockContent,\n\t},\n\tref\n) {\n\t// This can be removed once we no longer need to support the blocks prop.\n\tif ( blocks ) {\n\t\tdeprecated(\n\t\t\t'`blocks` property in `wp.blockEditor.__experimentalListView`',\n\t\t\t{\n\t\t\t\tsince: '6.3',\n\t\t\t\talternative: '`rootClientId` property',\n\t\t\t}\n\t\t);\n\t}\n\n\tconst instanceId = useInstanceId( ListViewComponent );\n\tconst { clientIdsTree, draggedClientIds, selectedClientIds } =\n\t\tuseListViewClientIds( { blocks, rootClientId } );\n\n\tconst { getBlock } = useSelect( blockEditorStore );\n\tconst { visibleBlockCount, shouldShowInnerBlocks } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetGlobalBlockCount,\n\t\t\t\tgetClientIdsOfDescendants,\n\t\t\t\t__unstableGetEditorMode,\n\t\t\t} = select( blockEditorStore );\n\t\t\tconst draggedBlockCount =\n\t\t\t\tdraggedClientIds?.length > 0\n\t\t\t\t\t? getClientIdsOfDescendants( draggedClientIds ).length + 1\n\t\t\t\t\t: 0;\n\t\t\treturn {\n\t\t\t\tvisibleBlockCount: getGlobalBlockCount() - draggedBlockCount,\n\t\t\t\tshouldShowInnerBlocks: __unstableGetEditorMode() !== 'zoom-out',\n\t\t\t};\n\t\t},\n\t\t[ draggedClientIds ]\n\t);\n\n\tconst { updateBlockSelection } = useBlockSelection();\n\n\tconst [ expandedState, setExpandedState ] = useReducer( expanded, {} );\n\n\tconst { ref: dropZoneRef, target: blockDropTarget } = useListViewDropZone( {\n\t\tdropZoneElement,\n\t} );\n\tconst elementRef = useRef();\n\tconst treeGridRef = useMergeRefs( [ elementRef, dropZoneRef, ref ] );\n\n\tconst [ insertedBlock, setInsertedBlock ] = useState( null );\n\n\tconst { setSelectedTreeId } = useListViewExpandSelectedItem( {\n\t\tfirstSelectedBlockClientId: selectedClientIds[ 0 ],\n\t\tsetExpandedState,\n\t} );\n\tconst selectEditorBlock = useCallback(\n\t\t/**\n\t\t * @param {MouseEvent | KeyboardEvent | undefined} event\n\t\t * @param {string} blockClientId\n\t\t * @param {null | undefined | -1 | 1} focusPosition\n\t\t */\n\t\t( event, blockClientId, focusPosition ) => {\n\t\t\tupdateBlockSelection( event, blockClientId, null, focusPosition );\n\t\t\tsetSelectedTreeId( blockClientId );\n\t\t\tif ( onSelect ) {\n\t\t\t\tonSelect( getBlock( blockClientId ) );\n\t\t\t}\n\t\t},\n\t\t[ setSelectedTreeId, updateBlockSelection, onSelect, getBlock ]\n\t);\n\tuseEffect( () => {\n\t\t// If a blocks are already selected when the list view is initially\n\t\t// mounted, shift focus to the first selected block.\n\t\tif ( selectedClientIds?.length ) {\n\t\t\tfocusListItem( selectedClientIds[ 0 ], elementRef );\n\t\t}\n\t\t// Disable reason: Only focus on the selected item when the list view is mounted.\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [] );\n\n\tconst expand = useCallback(\n\t\t( clientId ) => {\n\t\t\tif ( ! clientId ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tsetExpandedState( { type: 'expand', clientIds: [ clientId ] } );\n\t\t},\n\t\t[ setExpandedState ]\n\t);\n\tconst collapse = useCallback(\n\t\t( clientId ) => {\n\t\t\tif ( ! clientId ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tsetExpandedState( { type: 'collapse', clientIds: [ clientId ] } );\n\t\t},\n\t\t[ setExpandedState ]\n\t);\n\tconst expandRow = useCallback(\n\t\t( row ) => {\n\t\t\texpand( row?.dataset?.block );\n\t\t},\n\t\t[ expand ]\n\t);\n\tconst collapseRow = useCallback(\n\t\t( row ) => {\n\t\t\tcollapse( row?.dataset?.block );\n\t\t},\n\t\t[ collapse ]\n\t);\n\tconst focusRow = useCallback(\n\t\t( event, startRow, endRow ) => {\n\t\t\tif ( event.shiftKey ) {\n\t\t\t\tupdateBlockSelection(\n\t\t\t\t\tevent,\n\t\t\t\t\tstartRow?.dataset?.block,\n\t\t\t\t\tendRow?.dataset?.block\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t\t[ updateBlockSelection ]\n\t);\n\n\tconst contextValue = useMemo(\n\t\t() => ( {\n\t\t\tdraggedClientIds,\n\t\t\texpandedState,\n\t\t\texpand,\n\t\t\tcollapse,\n\t\t\tBlockSettingsMenu,\n\t\t\tlistViewInstanceId: instanceId,\n\t\t\tAdditionalBlockContent,\n\t\t\tinsertedBlock,\n\t\t\tsetInsertedBlock,\n\t\t\ttreeGridElementRef: elementRef,\n\t\t} ),\n\t\t[\n\t\t\tdraggedClientIds,\n\t\t\texpandedState,\n\t\t\texpand,\n\t\t\tcollapse,\n\t\t\tBlockSettingsMenu,\n\t\t\tinstanceId,\n\t\t\tAdditionalBlockContent,\n\t\t\tinsertedBlock,\n\t\t\tsetInsertedBlock,\n\t\t]\n\t);\n\n\t// List View renders a fixed number of items and relies on each having a fixed item height of 36px.\n\t// If this value changes, we should also change the itemHeight value set in useFixedWindowList.\n\t// See: https://github.com/WordPress/gutenberg/pull/35230 for additional context.\n\tconst [ fixedListWindow ] = useFixedWindowList(\n\t\telementRef,\n\t\tBLOCK_LIST_ITEM_HEIGHT,\n\t\tvisibleBlockCount,\n\t\t{\n\t\t\t// Ensure that the windowing logic is recalculated when the expanded state changes.\n\t\t\t// This is necessary because expanding a collapsed block in a short list view can\n\t\t\t// switch the list view to a tall list view with a scrollbar, and vice versa.\n\t\t\t// When this happens, the windowing logic needs to be recalculated to ensure that\n\t\t\t// the correct number of blocks are rendered, by rechecking for a scroll container.\n\t\t\texpandedState,\n\t\t\tuseWindowing: true,\n\t\t\twindowOverscan: 40,\n\t\t}\n\t);\n\n\t// If there are no blocks to show and we're not showing the appender, do not render the list view.\n\tif ( ! clientIdsTree.length && ! showAppender ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<AsyncModeProvider value={ true }>\n\t\t\t<ListViewDropIndicator\n\t\t\t\tlistViewRef={ elementRef }\n\t\t\t\tblockDropTarget={ blockDropTarget }\n\t\t\t/>\n\t\t\t<TreeGrid\n\t\t\t\tid={ id }\n\t\t\t\tclassName=\"block-editor-list-view-tree\"\n\t\t\t\taria-label={ __( 'Block navigation structure' ) }\n\t\t\t\tref={ treeGridRef }\n\t\t\t\tonCollapseRow={ collapseRow }\n\t\t\t\tonExpandRow={ expandRow }\n\t\t\t\tonFocusRow={ focusRow }\n\t\t\t\tapplicationAriaLabel={ __( 'Block navigation structure' ) }\n\t\t\t\t// eslint-disable-next-line jsx-a11y/aria-props\n\t\t\t\taria-description={ description }\n\t\t\t>\n\t\t\t\t<ListViewContext.Provider value={ contextValue }>\n\t\t\t\t\t<ListViewBranch\n\t\t\t\t\t\tblocks={ clientIdsTree }\n\t\t\t\t\t\tparentId={ rootClientId }\n\t\t\t\t\t\tselectBlock={ selectEditorBlock }\n\t\t\t\t\t\tshowBlockMovers={ showBlockMovers }\n\t\t\t\t\t\tfixedListWindow={ fixedListWindow }\n\t\t\t\t\t\tselectedClientIds={ selectedClientIds }\n\t\t\t\t\t\tisExpanded={ isExpanded }\n\t\t\t\t\t\tshouldShowInnerBlocks={ shouldShowInnerBlocks }\n\t\t\t\t\t\tshowAppender={ showAppender }\n\t\t\t\t\t/>\n\t\t\t\t</ListViewContext.Provider>\n\t\t\t</TreeGrid>\n\t\t</AsyncModeProvider>\n\t);\n}\n\n// This is the private API for the ListView component.\n// It allows access to all props, not just the public ones.\nexport const PrivateListView = forwardRef( ListViewComponent );\n\n// This is the public API for the ListView component.\n// We wrap the PrivateListView component to hide some props from the public API.\nexport default forwardRef( ( props, ref ) => {\n\treturn (\n\t\t<PrivateListView\n\t\t\tref={ ref }\n\t\t\t{ ...props }\n\t\t\tshowAppender={ false }\n\t\t\tr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xBuD,QAAQ,EAAGhE,YAAc;IACzBiE,WAAW,EAAGhC,iBAAmB;IACjCtC,eAAe,EAAGA,eAAiB;IACnCyD,eAAe,EAAGA,eAAiB;IACnCzC,iBAAiB,EAAGA,iBAAmB;IACvCf,UAAU,EAAGA,UAAY;IACzBkB,qBAAqB,EAAGA,qBAAuB;IAC/CjB,YAAY,EAAGA;EAAc,CAC7B,CACwB,CACjB,CACQ,CAAC;AAEtB;;AAEA;AACA;AACA,OAAO,MAAMqE,eAAe,GAAGnG,UAAU,CAAEyB,iBAAkB,CAAC;;AAE9D;AACA;AACA,eAAezB,UAAU,CAAE,CAAEoG,KAAK,EAAE9D,GAAG,KAAM;EAC5C,OACCkD,aAAA,CAACW,eAAe;IACf7D,GAAG,EAAGA,GAAK;IAAA,GACN8D,KAAK;IACVtE,YAAY,EAAG,KAAO;IACtBG,YAAY,EAAG,IAAM;IACrBE,QAAQ,EAAG,IAAM;IACjBC,sBAAsB,EAAG,IAAM;IAC/BL,iBAAiB,EAAGsE;EAAW,CAC/B,CAAC;AAEJ,CAAE,CAAC"}
@@ -1,4 +1,4 @@
1
- import { createElement } from "@wordpress/element";
1
+ import { createElement } from "react";
2
2
  /**
3
3
  * External dependencies
4
4
  */
@@ -2,6 +2,7 @@
2
2
  * WordPress dependencies
3
3
  */
4
4
  import { __, sprintf } from '@wordpress/i18n';
5
+ import { focus } from '@wordpress/dom';
5
6
  export const getBlockPositionDescription = (position, siblingCount, level) => sprintf( /* translators: 1: The numerical position of the block. 2: The total number of blocks. 3. The level of nesting for the block. */
6
7
  __('Block %1$d of %2$d, Level %3$d'), position, siblingCount, level);
7
8
 
@@ -40,4 +41,37 @@ export function getCommonDepthClientIds(startId, endId, startParents, endParents
40
41
  end
41
42
  };
42
43
  }
44
+
45
+ /**
46
+ * Shift focus to the list view item associated with a particular clientId.
47
+ *
48
+ * @typedef {import('@wordpress/element').RefObject} RefObject
49
+ *
50
+ * @param {string} focusClientId The client ID of the block to focus.
51
+ * @param {RefObject<HTMLElement>} treeGridElementRef The container element to search within.
52
+ */
53
+ export function focusListItem(focusClientId, treeGridElementRef) {
54
+ const getFocusElement = () => {
55
+ const row = treeGridElementRef.current?.querySelector(`[role=row][data-block="${focusClientId}"]`);
56
+ if (!row) return null;
57
+ // Focus the first focusable in the row, which is the ListViewBlockSelectButton.
58
+ return focus.focusable.find(row)[0];
59
+ };
60
+ let focusElement = getFocusElement();
61
+ if (focusElement) {
62
+ focusElement.focus();
63
+ } else {
64
+ // The element hasn't been painted yet. Defer focusing on the next frame.
65
+ // This could happen when all blocks have been deleted and the default block
66
+ // hasn't been added to the editor yet.
67
+ window.requestAnimationFrame(() => {
68
+ focusElement = getFocusElement();
69
+
70
+ // Ignore if the element still doesn't exist.
71
+ if (focusElement) {
72
+ focusElement.focus();
73
+ }
74
+ });
75
+ }
76
+ }
43
77
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["__","sprintf","getBlockPositionDescription","position","siblingCount","level","isClientIdSelected","clientId","selectedBlockClientIds","Array","isArray","length","indexOf","getCommonDepthClientIds","startId","endId","startParents","endParents","startPath","endPath","depth","Math","min","start","end"],"sources":["@wordpress/block-editor/src/components/list-view/utils.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\n\nexport const getBlockPositionDescription = ( position, siblingCount, level ) =>\n\tsprintf(\n\t\t/* translators: 1: The numerical position of the block. 2: The total number of blocks. 3. The level of nesting for the block. */\n\t\t__( 'Block %1$d of %2$d, Level %3$d' ),\n\t\tposition,\n\t\tsiblingCount,\n\t\tlevel\n\t);\n\n/**\n * Returns true if the client ID occurs within the block selection or multi-selection,\n * or false otherwise.\n *\n * @param {string} clientId Block client ID.\n * @param {string|string[]} selectedBlockClientIds Selected block client ID, or an array of multi-selected blocks client IDs.\n *\n * @return {boolean} Whether the block is in multi-selection set.\n */\nexport const isClientIdSelected = ( clientId, selectedBlockClientIds ) =>\n\tArray.isArray( selectedBlockClientIds ) && selectedBlockClientIds.length\n\t\t? selectedBlockClientIds.indexOf( clientId ) !== -1\n\t\t: selectedBlockClientIds === clientId;\n\n/**\n * From a start and end clientId of potentially different nesting levels,\n * return the nearest-depth ids that have a common level of depth in the\n * nesting hierarchy. For multiple block selection, this ensure that the\n * selection is always at the same nesting level, and not split across\n * separate levels.\n *\n * @param {string} startId The first id of a selection.\n * @param {string} endId The end id of a selection, usually one that has been clicked on.\n * @param {string[]} startParents An array of ancestor ids for the start id, in descending order.\n * @param {string[]} endParents An array of ancestor ids for the end id, in descending order.\n * @return {Object} An object containing the start and end ids.\n */\nexport function getCommonDepthClientIds(\n\tstartId,\n\tendId,\n\tstartParents,\n\tendParents\n) {\n\tconst startPath = [ ...startParents, startId ];\n\tconst endPath = [ ...endParents, endId ];\n\tconst depth = Math.min( startPath.length, endPath.length ) - 1;\n\tconst start = startPath[ depth ];\n\tconst end = endPath[ depth ];\n\n\treturn {\n\t\tstart,\n\t\tend,\n\t};\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAE7C,OAAO,MAAMC,2BAA2B,GAAGA,CAAEC,QAAQ,EAAEC,YAAY,EAAEC,KAAK,KACzEJ,OAAO,EACN;AACAD,EAAE,CAAE,gCAAiC,CAAC,EACtCG,QAAQ,EACRC,YAAY,EACZC,KACD,CAAC;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,kBAAkB,GAAGA,CAAEC,QAAQ,EAAEC,sBAAsB,KACnEC,KAAK,CAACC,OAAO,CAAEF,sBAAuB,CAAC,IAAIA,sBAAsB,CAACG,MAAM,GACrEH,sBAAsB,CAACI,OAAO,CAAEL,QAAS,CAAC,KAAK,CAAC,CAAC,GACjDC,sBAAsB,KAAKD,QAAQ;;AAEvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASM,uBAAuBA,CACtCC,OAAO,EACPC,KAAK,EACLC,YAAY,EACZC,UAAU,EACT;EACD,MAAMC,SAAS,GAAG,CAAE,GAAGF,YAAY,EAAEF,OAAO,CAAE;EAC9C,MAAMK,OAAO,GAAG,CAAE,GAAGF,UAAU,EAAEF,KAAK,CAAE;EACxC,MAAMK,KAAK,GAAGC,IAAI,CAACC,GAAG,CAAEJ,SAAS,CAACP,MAAM,EAAEQ,OAAO,CAACR,MAAO,CAAC,GAAG,CAAC;EAC9D,MAAMY,KAAK,GAAGL,SAAS,CAAEE,KAAK,CAAE;EAChC,MAAMI,GAAG,GAAGL,OAAO,CAAEC,KAAK,CAAE;EAE5B,OAAO;IACNG,KAAK;IACLC;EACD,CAAC;AACF"}
1
+ {"version":3,"names":["__","sprintf","focus","getBlockPositionDescription","position","siblingCount","level","isClientIdSelected","clientId","selectedBlockClientIds","Array","isArray","length","indexOf","getCommonDepthClientIds","startId","endId","startParents","endParents","startPath","endPath","depth","Math","min","start","end","focusListItem","focusClientId","treeGridElementRef","getFocusElement","row","current","querySelector","focusable","find","focusElement","window","requestAnimationFrame"],"sources":["@wordpress/block-editor/src/components/list-view/utils.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { focus } from '@wordpress/dom';\n\nexport const getBlockPositionDescription = ( position, siblingCount, level ) =>\n\tsprintf(\n\t\t/* translators: 1: The numerical position of the block. 2: The total number of blocks. 3. The level of nesting for the block. */\n\t\t__( 'Block %1$d of %2$d, Level %3$d' ),\n\t\tposition,\n\t\tsiblingCount,\n\t\tlevel\n\t);\n\n/**\n * Returns true if the client ID occurs within the block selection or multi-selection,\n * or false otherwise.\n *\n * @param {string} clientId Block client ID.\n * @param {string|string[]} selectedBlockClientIds Selected block client ID, or an array of multi-selected blocks client IDs.\n *\n * @return {boolean} Whether the block is in multi-selection set.\n */\nexport const isClientIdSelected = ( clientId, selectedBlockClientIds ) =>\n\tArray.isArray( selectedBlockClientIds ) && selectedBlockClientIds.length\n\t\t? selectedBlockClientIds.indexOf( clientId ) !== -1\n\t\t: selectedBlockClientIds === clientId;\n\n/**\n * From a start and end clientId of potentially different nesting levels,\n * return the nearest-depth ids that have a common level of depth in the\n * nesting hierarchy. For multiple block selection, this ensure that the\n * selection is always at the same nesting level, and not split across\n * separate levels.\n *\n * @param {string} startId The first id of a selection.\n * @param {string} endId The end id of a selection, usually one that has been clicked on.\n * @param {string[]} startParents An array of ancestor ids for the start id, in descending order.\n * @param {string[]} endParents An array of ancestor ids for the end id, in descending order.\n * @return {Object} An object containing the start and end ids.\n */\nexport function getCommonDepthClientIds(\n\tstartId,\n\tendId,\n\tstartParents,\n\tendParents\n) {\n\tconst startPath = [ ...startParents, startId ];\n\tconst endPath = [ ...endParents, endId ];\n\tconst depth = Math.min( startPath.length, endPath.length ) - 1;\n\tconst start = startPath[ depth ];\n\tconst end = endPath[ depth ];\n\n\treturn {\n\t\tstart,\n\t\tend,\n\t};\n}\n\n/**\n * Shift focus to the list view item associated with a particular clientId.\n *\n * @typedef {import('@wordpress/element').RefObject} RefObject\n *\n * @param {string} focusClientId The client ID of the block to focus.\n * @param {RefObject<HTMLElement>} treeGridElementRef The container element to search within.\n */\nexport function focusListItem( focusClientId, treeGridElementRef ) {\n\tconst getFocusElement = () => {\n\t\tconst row = treeGridElementRef.current?.querySelector(\n\t\t\t`[role=row][data-block=\"${ focusClientId }\"]`\n\t\t);\n\t\tif ( ! row ) return null;\n\t\t// Focus the first focusable in the row, which is the ListViewBlockSelectButton.\n\t\treturn focus.focusable.find( row )[ 0 ];\n\t};\n\n\tlet focusElement = getFocusElement();\n\tif ( focusElement ) {\n\t\tfocusElement.focus();\n\t} else {\n\t\t// The element hasn't been painted yet. Defer focusing on the next frame.\n\t\t// This could happen when all blocks have been deleted and the default block\n\t\t// hasn't been added to the editor yet.\n\t\twindow.requestAnimationFrame( () => {\n\t\t\tfocusElement = getFocusElement();\n\n\t\t\t// Ignore if the element still doesn't exist.\n\t\t\tif ( focusEl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Aa,EAAEC,kBAAkB,EAAG;EAClE,MAAMC,eAAe,GAAGA,CAAA,KAAM;IAC7B,MAAMC,GAAG,GAAGF,kBAAkB,CAACG,OAAO,EAAEC,aAAa,CACnD,0BAA0BL,aAAe,IAC3C,CAAC;IACD,IAAK,CAAEG,GAAG,EAAG,OAAO,IAAI;IACxB;IACA,OAAO5B,KAAK,CAAC+B,SAAS,CAACC,IAAI,CAAEJ,GAAI,CAAC,CAAE,CAAC,CAAE;EACxC,CAAC;EAED,IAAIK,YAAY,GAAGN,eAAe,CAAC,CAAC;EACpC,IAAKM,YAAY,EAAG;IACnBA,YAAY,CAACjC,KAAK,CAAC,CAAC;EACrB,CAAC,MAAM;IACN;IACA;IACA;IACAkC,MAAM,CAACC,qBAAqB,CAAE,MAAM;MACnCF,YAAY,GAAGN,eAAe,CAAC,CAAC;;MAEhC;MACA,IAAKM,YAAY,EAAG;QACnBA,YAAY,CAACjC,KAAK,CAAC,CAAC;MACrB;IACD,CAAE,CAAC;EACJ;AACD"}
@@ -1,4 +1,4 @@
1
- import { createElement, Fragment } from "@wordpress/element";
1
+ import { createElement, Fragment } from "react";
2
2
  /**
3
3
  * External dependencies
4
4
  */
@@ -1,4 +1,4 @@
1
- import { createElement, Fragment } from "@wordpress/element";
1
+ import { createElement, Fragment } from "react";
2
2
  /**
3
3
  * External dependencies
4
4
  */
@@ -1,4 +1,4 @@
1
- import { createElement, Fragment } from "@wordpress/element";
1
+ import { createElement, Fragment } from "react";
2
2
  /**
3
3
  * External dependencies
4
4
  */
@@ -1,4 +1,4 @@
1
- import { createElement } from "@wordpress/element";
1
+ import { createElement } from "react";
2
2
  /**
3
3
  * External dependencies
4
4
  */
@@ -8,7 +8,6 @@ export const MEDIA_TYPE_AUDIO = 'audio';
8
8
  export const MEDIA_TYPE_ANY = 'any';
9
9
  export const OPTION_TAKE_VIDEO = __('Take a Video');
10
10
  export const OPTION_TAKE_PHOTO = __('Take a Photo');
11
- export const OPTION_TAKE_PHOTO_OR_VIDEO = __('Take a Photo or Video');
12
11
  export const OPTION_INSERT_FROM_URL = __('Insert from URL');
13
12
  export const OPTION_WORDPRESS_MEDIA_LIBRARY = __('WordPress Media Library');
14
- //# sourceMappingURL=constants.js.map
13
+ //# sourceMappingURL=constants.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["__","MEDIA_TYPE_IMAGE","MEDIA_TYPE_VIDEO","MEDIA_TYPE_AUDIO","MEDIA_TYPE_ANY","OPTION_TAKE_VIDEO","OPTION_TAKE_PHOTO","OPTION_INSERT_FROM_URL","OPTION_WORDPRESS_MEDIA_LIBRARY"],"sources":["@wordpress/block-editor/src/components/media-upload/constants.native.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\nexport const MEDIA_TYPE_IMAGE = 'image';\nexport const MEDIA_TYPE_VIDEO = 'video';\nexport const MEDIA_TYPE_AUDIO = 'audio';\nexport const MEDIA_TYPE_ANY = 'any';\n\nexport const OPTION_TAKE_VIDEO = __( 'Take a Video' );\nexport const OPTION_TAKE_PHOTO = __( 'Take a Photo' );\nexport const OPTION_INSERT_FROM_URL = __( 'Insert from URL' );\nexport const OPTION_WORDPRESS_MEDIA_LIBRARY = __( 'WordPress Media Library' );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AAEpC,OAAO,MAAMC,gBAAgB,GAAG,OAAO;AACvC,OAAO,MAAMC,gBAAgB,GAAG,OAAO;AACvC,OAAO,MAAMC,gBAAgB,GAAG,OAAO;AACvC,OAAO,MAAMC,cAAc,GAAG,KAAK;AAEnC,OAAO,MAAMC,iBAAiB,GAAGL,EAAE,CAAE,cAAe,CAAC;AACrD,OAAO,MAAMM,iBAAiB,GAAGN,EAAE,CAAE,cAAe,CAAC;AACrD,OAAO,MAAMO,sBAAsB,GAAGP,EAAE,CAAE,iBAAkB,CAAC;AAC7D,OAAO,MAAMQ,8BAA8B,GAAGR,EAAE,CAAE,yBAA0B,CAAC"}
@@ -8,7 +8,7 @@ import { withFilters } from '@wordpress/components';
8
8
  * an integration with the core blocks that handle media files. By default it renders nothing but
9
9
  * it provides a way to have it overridden with the `editor.MediaUpload` filter.
10
10
  *
11
- * @return {WPComponent} The component to be rendered.
11
+ * @return {Component} The component to be rendered.
12
12
  */
13
13
  const MediaUpload = () => null;
14
14
 
@@ -1 +1 @@
1
- {"version":3,"names":["withFilters","MediaUpload"],"sources":["@wordpress/block-editor/src/components/media-upload/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { withFilters } from '@wordpress/components';\n\n/**\n * This is a placeholder for the media upload component necessary to make it possible to provide\n * an integration with the core blocks that handle media files. By default it renders nothing but\n * it provides a way to have it overridden with the `editor.MediaUpload` filter.\n *\n * @return {WPComponent} The component to be rendered.\n */\nconst MediaUpload = () => null;\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/media-upload/README.md\n */\nexport default withFilters( 'editor.MediaUpload' )( MediaUpload );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,WAAW,QAAQ,uBAAuB;;AAEnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,WAAW,GAAGA,CAAA,KAAM,IAAI;;AAE9B;AACA;AACA;AACA,eAAeD,WAAW,CAAE,oBAAqB,CAAC,CAAEC,WAAY,CAAC"}
1
+ {"version":3,"names":["withFilters","MediaUpload"],"sources":["@wordpress/block-editor/src/components/media-upload/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { withFilters } from '@wordpress/components';\n\n/**\n * This is a placeholder for the media upload component necessary to make it possible to provide\n * an integration with the core blocks that handle media files. By default it renders nothing but\n * it provides a way to have it overridden with the `editor.MediaUpload` filter.\n *\n * @return {Component} The component to be rendered.\n */\nconst MediaUpload = () => null;\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/media-upload/README.md\n */\nexport default withFilters( 'editor.MediaUpload' )( MediaUpload );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,WAAW,QAAQ,uBAAuB;;AAEnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,WAAW,GAAGA,CAAA,KAAM,IAAI;;AAE9B;AACA;AACA;AACA,eAAeD,WAAW,CAAE,oBAAqB,CAAC,CAAEC,WAAY,CAAC"}
@@ -1,4 +1,4 @@
1
- import { createElement, Fragment } from "@wordpress/element";
1
+ import { createElement, Fragment } from "react";
2
2
  /**
3
3
  * External dependencies
4
4
  */
@@ -19,7 +19,7 @@ import { withSelect } from '@wordpress/data';
19
19
  /**
20
20
  * Internal dependencies
21
21
  */
22
- import { MEDIA_TYPE_IMAGE, MEDIA_TYPE_VIDEO, MEDIA_TYPE_AUDIO, MEDIA_TYPE_ANY } from './constants';
22
+ import { MEDIA_TYPE_IMAGE, MEDIA_TYPE_VIDEO, MEDIA_TYPE_AUDIO, MEDIA_TYPE_ANY, OPTION_TAKE_VIDEO, OPTION_TAKE_PHOTO, OPTION_INSERT_FROM_URL, OPTION_WORDPRESS_MEDIA_LIBRARY } from './constants';
23
23
  import styles from './style.scss';
24
24
  const URL_MEDIA_SOURCE = 'URL';
25
25
  const PICKER_OPENING_DELAY = 200;
@@ -70,7 +70,7 @@ export class MediaUpload extends Component {
70
70
  // ID is the value sent to native.
71
71
  value: mediaSources.deviceCamera + '-IMAGE',
72
72
  // This is needed to diferenciate image-camera from video-camera sources.
73
- label: __('Take a Photo'),
73
+ label: OPTION_TAKE_PHOTO,
74
74
  requiresModal: true,
75
75
  types: [MEDIA_TYPE_IMAGE],
76
76
  icon: capturePhoto
@@ -78,7 +78,7 @@ export class MediaUpload extends Component {
78
78
  const cameraVideoSource = {
79
79
  id: mediaSources.deviceCamera,
80
80
  value: mediaSources.deviceCamera,
81
- label: __('Take a Video'),
81
+ label: OPTION_TAKE_VIDEO,
82
82
  requiresModal: true,
83
83
  types: [MEDIA_TYPE_VIDEO],
84
84
  icon: captureVideo
@@ -94,7 +94,7 @@ export class MediaUpload extends Component {
94
94
  const siteLibrarySource = {
95
95
  id: mediaSources.siteMediaLibrary,
96
96
  value: mediaSources.siteMediaLibrary,
97
- label: __('WordPress Media Library'),
97
+ label: OPTION_WORDPRESS_MEDIA_LIBRARY,
98
98
  requiresModal: true,
99
99
  types: [MEDIA_TYPE_IMAGE, MEDIA_TYPE_VIDEO, MEDIA_TYPE_AUDIO, MEDIA_TYPE_ANY],
100
100
  icon: wordpress,
@@ -103,7 +103,7 @@ export class MediaUpload extends Component {
103
103
  const urlSource = {
104
104
  id: URL_MEDIA_SOURCE,
105
105
  value: URL_MEDIA_SOURCE,
106
- label: __('Insert from URL'),
106
+ label: OPTION_INSERT_FROM_URL,
107
107
  types: [MEDIA_TYPE_AUDIO, MEDIA_TYPE_IMAGE, MEDIA_TYPE_VIDEO],
108
108
  icon: globe
109
109
  };
@@ -261,7 +261,7 @@ function URLInput(props) {
261
261
  autoCorrect: false,
262
262
  autoComplete: Platform.isIOS ? 'url' : 'off',
263
263
  keyboardType: "url",
264
- label: __('Insert from URL'),
264
+ label: OPTION_INSERT_FROM_URL,
265
265
  onChange: props.onChange,
266
266
  placeholder: __('Type a URL'),
267
267
  value: props.value
@@ -1 +1 @@
1
- {"version":3,"names":["Platform","Component","React","__","BottomSheet","PanelBody","Picker","TextControl","getOtherMediaOptions","requestMediaPicker","mediaSources","capturePhoto","captureVideo","image","wordpress","mobile","globe","store","blockEditorStore","compose","withSelect","MEDIA_TYPE_IMAGE","MEDIA_TYPE_VIDEO","MEDIA_TYPE_AUDIO","MEDIA_TYPE_ANY","styles","URL_MEDIA_SOURCE","PICKER_OPENING_DELAY","MediaUpload","pickerTimeout","constructor","props","onPickerPresent","bind","onPickerSelect","getAllSources","state","url","showURLInput","otherMediaOptions","componentDidMount","allowedTypes","autoOpen","otherMediaOptionsWithIcons","map","option","requiresModal","types","id","value","setState","componentWillUnmount","clearTimeout","onSelectURL","cameraImageSource","deviceCamera","label","icon","cameraVideoSource","deviceLibrarySource","deviceLibrary","siteLibrarySource","siteMediaLibrary","mediaLibrary","urlSource","internalSources","concat","getMediaOptionsItems","__experimentalOnlyMediaLibrary","isAudioBlockMediaUploadEnabled","filter","source","every","allowedType","includes","some","getChooseFromDeviceIcon","isIOS","OS","picker","setTimeout","presentPicker","onSelect","multiple","mediaSource","shift","type","media","render","isReplacingMedia","isOneType","length","isImage","isVideo","isAudio","isAnyType","isImageOrVideo","pickerTitle","getMediaOptions","createElement","title","hideCancelButton","ref","instance","options","onChange","testID","Fragment","URLInput","isVisible","onClose","open","hideHeader","style","autoFocus","autoCapitalize","autoCorrect","autoComplete","keyboardType","placeholder","select","capabilities","getSettings"],"sources":["@wordpress/block-editor/src/components/media-upload/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { Platform } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { Component, React } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tBottomSheet,\n\tPanelBody,\n\tPicker,\n\tTextControl,\n} from '@wordpress/components';\nimport {\n\tgetOtherMediaOptions,\n\trequestMediaPicker,\n\tmediaSources,\n} from '@wordpress/react-native-bridge';\nimport {\n\tcapturePhoto,\n\tcaptureVideo,\n\timage,\n\twordpress,\n\tmobile,\n\tglobe,\n} from '@wordpress/icons';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { compose } from '@wordpress/compose';\nimport { withSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport {\n\tMEDIA_TYPE_IMAGE,\n\tMEDIA_TYPE_VIDEO,\n\tMEDIA_TYPE_AUDIO,\n\tMEDIA_TYPE_ANY,\n} from './constants';\nimport styles from './style.scss';\n\nconst URL_MEDIA_SOURCE = 'URL';\n\nconst PICKER_OPENING_DELAY = 200;\n\nexport class MediaUpload extends Component {\n\tpickerTimeout;\n\n\tconstructor( props ) {\n\t\tsuper( props );\n\t\tthis.onPickerPresent = this.onPickerPresent.bind( this );\n\t\tthis.onPickerSelect = this.onPickerSelect.bind( this );\n\t\tthis.getAllSources = this.getAllSources.bind( this );\n\t\tthis.state = {\n\t\t\turl: '',\n\t\t\tshowURLInput: false,\n\t\t\totherMediaOptions: [],\n\t\t};\n\t}\n\n\tcomponentDidMount() {\n\t\tconst { allowedTypes = [], autoOpen } = this.props;\n\t\tgetOtherMediaOptions( allowedTypes, ( otherMediaOptions ) => {\n\t\t\tconst otherMediaOptionsWithIcons = otherMediaOptions.map(\n\t\t\t\t( option ) => {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...option,\n\t\t\t\t\t\trequiresModal: true,\n\t\t\t\t\t\ttypes: allowedTypes,\n\t\t\t\t\t\tid: option.value,\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t);\n\n\t\t\tthis.setState( { otherMediaOptions: otherMediaOptionsWithIcons } );\n\t\t} );\n\n\t\tif ( autoOpen ) {\n\t\t\tthis.onPickerPresent();\n\t\t}\n\t}\n\n\tcomponentWillUnmount() {\n\t\tclearTimeout( this.pickerTimeout );\n\t}\n\n\tgetAllSources() {\n\t\tconst { onSelectURL } = this.props;\n\n\t\tconst cameraImageSource = {\n\t\t\tid: mediaSources.deviceCamera, // ID is the value sent to native.\n\t\t\tvalue: mediaSources.deviceCamera + '-IMAGE', // This is needed to diferenciate image-camera from video-camera sources.\n\t\t\tlabel: __( 'Take a Photo' ),\n\t\t\trequiresModal: true,\n\t\t\ttypes: [ MEDIA_TYPE_IMAGE ],\n\t\t\ticon: capturePhoto,\n\t\t};\n\n\t\tconst cameraVideoSource = {\n\t\t\tid: mediaSources.deviceCamera,\n\t\t\tvalue: mediaSources.deviceCamera,\n\t\t\tlabel: __( 'Take a Video' ),\n\t\t\trequiresModal: true,\n\t\t\ttypes: [ MEDIA_TYPE_VIDEO ],\n\t\t\ticon: captureVideo,\n\t\t};\n\n\t\tconst deviceLibrarySource = {\n\t\t\tid: mediaSources.deviceLibrary,\n\t\t\tvalue: mediaSources.deviceLibrary,\n\t\t\tlabel: __( 'Choose from device' ),\n\t\t\trequiresModal: true,\n\t\t\ttypes: [ MEDIA_TYPE_IMAGE, MEDIA_TYPE_VIDEO ],\n\t\t\ticon: image,\n\t\t};\n\n\t\tconst siteLibrarySource = {\n\t\t\tid: mediaSources.siteMediaLibrary,\n\t\t\tvalue: mediaSources.siteMediaLibrary,\n\t\t\tlabel: __( 'WordPress Media Library' ),\n\t\t\trequiresModal: true,\n\t\t\ttypes: [\n\t\t\t\tMEDIA_TYPE_IMAGE,\n\t\t\t\tMEDIA_TYPE_VIDEO,\n\t\t\t\tMEDIA_TYPE_AUDIO,\n\t\t\t\tMEDIA_TYPE_ANY,\n\t\t\t],\n\t\t\ticon: wordpress,\n\t\t\tmediaLibrary: true,\n\t\t};\n\n\t\tconst urlSource = {\n\t\t\tid: URL_MEDIA_SOURCE,\n\t\t\tvalue: URL_MEDIA_SOURCE,\n\t\t\tlabel: __( 'Insert from URL' ),\n\t\t\ttypes: [ MEDIA_TYPE_AUDIO, MEDIA_TYPE_IMAGE, MEDIA_TYPE_VIDEO ],\n\t\t\ticon: globe,\n\t\t};\n\n\t\t// Only include `urlSource` option if `onSelectURL` prop is present, in order to match the web behavior.\n\t\tconst internalSources = [\n\t\t\tdeviceLibrarySource,\n\t\t\tcameraImageSource,\n\t\t\tcameraVideoSource,\n\t\t\tsiteLibrarySource,\n\t\t\t...( onSelectURL ? [ urlSource ] : [] ),\n\t\t];\n\n\t\treturn internalSources.concat( this.state.otherMediaOptions );\n\t}\n\n\tgetMediaOptionsItems() {\n\t\tconst {\n\t\t\tallowedTypes = [],\n\t\t\t__experimentalOnlyMediaLibrary,\n\t\t\tisAudioBlockMediaUploadEnabled,\n\t\t} = this.props;\n\n\t\treturn this.getAllSources()\n\t\t\t.filter( ( source ) => {\n\t\t\t\tif ( __experimentalOnlyMediaLibrary ) {\n\t\t\t\t\treturn source.mediaLibrary;\n\t\t\t\t} else if (\n\t\t\t\t\tallowedTypes.every(\n\t\t\t\t\t\t( allowedType ) =>\n\t\t\t\t\t\t\tallowedType === MEDIA_TYPE_AUDIO &&\n\t\t\t\t\t\t\tsource.types.includes( allowedType )\n\t\t\t\t\t) &&\n\t\t\t\t\tsource.id !== URL_MEDIA_SOURCE\n\t\t\t\t) {\n\t\t\t\t\treturn isAudioBlockMediaUploadEnabled === true;\n\t\t\t\t}\n\n\t\t\t\treturn allowedTypes.some( ( allowedType ) =>\n\t\t\t\t\tsource.types.includes( allowedType )\n\t\t\t\t);\n\t\t\t} )\n\t\t\t.map( ( source ) => {\n\t\t\t\treturn {\n\t\t\t\t\t...source,\n\t\t\t\t\ticon: source.icon || this.getChooseFromDeviceIcon(),\n\t\t\t\t};\n\t\t\t} );\n\t}\n\n\tgetChooseFromDeviceIcon() {\n\t\treturn mobile;\n\t}\n\n\tonPickerPresent() {\n\t\tconst { autoOpen } = this.props;\n\t\tconst isIOS = Platform.OS === 'ios';\n\n\t\tif ( this.picker ) {\n\t\t\t// the delay below is required because on iOS this action sheet gets dismissed by the close event of the Inserter\n\t\t\t// so this delay allows the Inserter to be closed fully before presenting action sheet.\n\t\t\tif ( autoOpen && isIOS ) {\n\t\t\t\tthis.pickerTimeout = setTimeout(\n\t\t\t\t\t() => this.picker.presentPicker(),\n\t\t\t\t\tPICKER_OPENING_DELAY\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tthis.picker.presentPicker();\n\t\t\t}\n\t\t}\n\t}\n\n\tonPickerSelect( value ) {\n\t\tconst { allowedTypes = [], onSelect, multiple = false } = this.props;\n\n\t\tif ( value === URL_MEDIA_SOURCE ) {\n\t\t\tthis.setState( { showURLInput: true } );\n\t\t\treturn;\n\t\t}\n\n\t\tconst mediaSource = this.getAllSources()\n\t\t\t.filter( ( source ) => source.value === value )\n\t\t\t.shift();\n\t\tconst types = allowedTypes.filter( ( type ) =>\n\t\t\tmediaSource.types.includes( type )\n\t\t);\n\n\t\trequestMediaPicker( mediaSource.id, types, multiple, ( media ) => {\n\t\t\tif ( ( multiple && media ) || ( media && media.id ) ) {\n\t\t\t\tonSelect( media );\n\t\t\t}\n\t\t} );\n\t}\n\n\trender() {\n\t\tconst { allowedTypes = [], isReplacingMedia, multiple } = this.props;\n\t\tconst isOneType = allowedTypes.length === 1;\n\t\tconst isImage = isOneType && allowedTypes.includes( MEDIA_TYPE_IMAGE );\n\t\tconst isVideo = isOneType && allowedTypes.includes( MEDIA_TYPE_VIDEO );\n\t\tconst isAudio = isOneType && allowedTypes.includes( MEDIA_TYPE_AUDIO );\n\t\tconst isAnyType = isOneType && allowedTypes.includes( MEDIA_TYPE_ANY );\n\n\t\tconst isImageOrVideo =\n\t\t\tallowedTypes.length === 2 &&\n\t\t\tallowedTypes.includes( MEDIA_TYPE_IMAGE ) &&\n\t\t\tallowedTypes.includes( MEDIA_TYPE_VIDEO );\n\n\t\tlet pickerTitle;\n\t\tif ( isImage ) {\n\t\t\tif ( isReplacingMedia ) {\n\t\t\t\tpickerTitle = __( 'Replace image' );\n\t\t\t} else {\n\t\t\t\tpickerTitle = multiple\n\t\t\t\t\t? __( 'Choose images' )\n\t\t\t\t\t: __( 'Choose image' );\n\t\t\t}\n\t\t} else if ( isVideo ) {\n\t\t\tif ( isReplacingMedia ) {\n\t\t\t\tpickerTitle = __( 'Replace video' );\n\t\t\t} else {\n\t\t\t\tpickerTitle = __( 'Choose video' );\n\t\t\t}\n\t\t} else if ( isImageOrVideo ) {\n\t\t\tif ( isReplacingMedia ) {\n\t\t\t\tpickerTitle = __( 'Replace image or video' );\n\t\t\t} else {\n\t\t\t\tpickerTitle = __( 'Choose image or video' );\n\t\t\t}\n\t\t} else if ( isAudio ) {\n\t\t\tif ( isReplacingMedia ) {\n\t\t\t\tpickerTitle = __( 'Replace audio' );\n\t\t\t} else {\n\t\t\t\tpickerTitle = __( 'Choose audio' );\n\t\t\t}\n\t\t} else if ( isAnyType ) {\n\t\t\tpickerTitle = __( 'Choose file' );\n\t\t\tif ( isReplacingMedia ) {\n\t\t\t\tpickerTitle = __( 'Replace file' );\n\t\t\t} else {\n\t\t\t\tpickerTitle = __( 'Choose file' );\n\t\t\t}\n\t\t}\n\n\t\tconst getMediaOptions = () => (\n\t\t\t<Picker\n\t\t\t\ttitle={ pickerTitle }\n\t\t\t\thideCancelButton\n\t\t\t\tref={ ( instance ) => ( this.picker = instance ) }\n\t\t\t\toptions={ this.getMediaOptionsItems() }\n\t\t\t\tonChange={ this.onPickerSelect }\n\t\t\t\ttestID=\"media-options-picker\"\n\t\t\t/>\n\t\t);\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<URLInput\n\t\t\t\t\tisVisible={ this.state.showURLInput }\n\t\t\t\t\tonClose={ () => {\n\t\t\t\t\t\tif ( this.state.url !== '' ) {\n\t\t\t\t\t\t\tthis.props.onSelectURL( this.state.url );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.setState( { showURLInput: false, url: '' } );\n\t\t\t\t\t} }\n\t\t\t\t\tonChange={ ( url ) => {\n\t\t\t\t\t\tthis.setState( { url } );\n\t\t\t\t\t} }\n\t\t\t\t\tvalue={ this.state.url }\n\t\t\t\t/>\n\t\t\t\t{ this.props.render( {\n\t\t\t\t\topen: this.onPickerPresent,\n\t\t\t\t\tgetMediaOptions,\n\t\t\t\t} ) }\n\t\t\t</>\n\t\t);\n\t}\n}\n\nfunction URLInput( props ) {\n\treturn (\n\t\t<BottomSheet\n\t\t\thideHeader\n\t\t\tisVisible={ props.isVisible }\n\t\t\tonClose={ props.onClose }\n\t\t>\n\t\t\t<PanelBody style={ styles[ 'media-upload__link-input' ] }>\n\t\t\t\t<TextControl\n\t\t\t\t\t// eslint-disable-next-line jsx-a11y/no-autofocus\n\t\t\t\t\tautoFocus\n\t\t\t\t\tautoCapitalize=\"none\"\n\t\t\t\t\tautoCorrect={ false }\n\t\t\t\t\tautoComplete={ Platform.isIOS ? 'url' : 'off' }\n\t\t\t\t\tkeyboardType=\"url\"\n\t\t\t\t\tlabel={ __( 'Insert from URL' ) }\n\t\t\t\t\tonChange={ props.onChange }\n\t\t\t\t\tplaceholder={ __( 'Type a URL' ) }\n\t\t\t\t\tvalue={ props.value }\n\t\t\t\t/>\n\t\t\t</PanelBody>\n\t\t</BottomSheet>\n\t);\n}\n\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\tconst { capabilities } = select( blockEditorStore ).getSettings();\n\t\treturn {\n\t\t\tisAudioBlockMediaUploadEnabled:\n\t\t\t\tcapabilities?.isAudioBlockMediaUploadEnabled === true,\n\t\t};\n\t} ),\n] )( MediaUpload );\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,QAAQ,QAAQ,cAAc;;AAEvC;AACA;AACA;AACA,SAASC,SAAS,EAAEC,KAAK,QAAQ,oBAAoB;AACrD,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SACCC,WAAW,EACXC,SAAS,EACTC,MAAM,EACNC,WAAW,QACL,uBAAuB;AAC9B,SACCC,oBAAoB,EACpBC,kBAAkB,EAClBC,YAAY,QACN,gCAAgC;AACvC,SACCC,YAAY,EACZC,YAAY,EACZC,KAAK,EACLC,SAAS,EACTC,MAAM,EACNC,KAAK,QACC,kBAAkB;AACzB,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,yBAAyB;AACnE,SAASC,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,UAAU,QAAQ,iBAAiB;;AAE5C;AACA;AACA;AACA,SACCC,gBAAgB,EAChBC,gBAAgB,EAChBC,gBAAgB,EAChBC,cAAc,QACR,aAAa;AACpB,OAAOC,MAAM,MAAM,cAAc;AAEjC,MAAMC,gBAAgB,GAAG,KAAK;AAE9B,MAAMC,oBAAoB,GAAG,GAAG;AAEhC,OAAO,MAAMC,WAAW,SAAS3B,SAAS,CAAC;EAC1C4B,aAAa;EAEbC,WAAWA,CAAEC,KAAK,EAAG;IACpB,KAAK,CAAEA,KAAM,CAAC;IACd,IAAI,CAACC,eAAe,GAAG,IAAI,CAACA,eAAe,CAACC,IAAI,CAAE,IAAK,CAAC;IACxD,IAAI,CAACC,cAAc,GAAG,IAAI,CAACA,cAAc,CAACD,I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AG;EAC1B,OACCoE,aAAA,CAAC/F,WAAW;IACX4G,UAAU;IACVH,SAAS,EAAG9E,KAAK,CAAC8E,SAAW;IAC7BC,OAAO,EAAG/E,KAAK,CAAC+E;EAAS,GAEzBX,aAAA,CAAC9F,SAAS;IAAC4G,KAAK,EAAGxF,MAAM,CAAE,0BAA0B;EAAI,GACxD0E,aAAA,CAAC5F;EACA;EAAA;IACA2G,SAAS;IACTC,cAAc,EAAC,MAAM;IACrBC,WAAW,EAAG,KAAO;IACrBC,YAAY,EAAGrH,QAAQ,CAAC6E,KAAK,GAAG,KAAK,GAAG,KAAO;IAC/CyC,YAAY,EAAC,KAAK;IAClB9D,KAAK,EAAGrD,EAAE,CAAE,iBAAkB,CAAG;IACjCsG,QAAQ,EAAG1E,KAAK,CAAC0E,QAAU;IAC3Bc,WAAW,EAAGpH,EAAE,CAAE,YAAa,CAAG;IAClC8C,KAAK,EAAGlB,KAAK,CAACkB;EAAO,CACrB,CACS,CACC,CAAC;AAEhB;AAEA,eAAe9B,OAAO,CAAE,CACvBC,UAAU,CAAIoG,MAAM,IAAM;EACzB,MAAM;IAAEC;EAAa,CAAC,GAAGD,MAAM,CAAEtG,gBAAiB,CAAC,CAACwG,WAAW,CAAC,CAAC;EACjE,OAAO;IACNrD,8BAA8B,EAC7BoD,YAAY,EAAEpD,8BAA8B,KAAK;EACnD,CAAC;AACF,CAAE,CAAC,CACF,CAAC,CAAEzC,WAAY,CAAC"}
1
+ {"version":3,"names":["Platform","Component","React","__","BottomSheet","PanelBody","Picker","TextControl","getOtherMediaOptions","requestMediaPicker","mediaSources","capturePhoto","captureVideo","image","wordpress","mobile","globe","store","blockEditorStore","compose","withSelect","MEDIA_TYPE_IMAGE","MEDIA_TYPE_VIDEO","MEDIA_TYPE_AUDIO","MEDIA_TYPE_ANY","OPTION_TAKE_VIDEO","OPTION_TAKE_PHOTO","OPTION_INSERT_FROM_URL","OPTION_WORDPRESS_MEDIA_LIBRARY","styles","URL_MEDIA_SOURCE","PICKER_OPENING_DELAY","MediaUpload","pickerTimeout","constructor","props","onPickerPresent","bind","onPickerSelect","getAllSources","state","url","showURLInput","otherMediaOptions","componentDidMount","allowedTypes","autoOpen","otherMediaOptionsWithIcons","map","option","requiresModal","types","id","value","setState","componentWillUnmount","clearTimeout","onSelectURL","cameraImageSource","deviceCamera","label","icon","cameraVideoSource","deviceLibrarySource","deviceLibrary","siteLibrarySource","siteMediaLibrary","mediaLibrary","urlSource","internalSources","concat","getMediaOptionsItems","__experimentalOnlyMediaLibrary","isAudioBlockMediaUploadEnabled","filter","source","every","allowedType","includes","some","getChooseFromDeviceIcon","isIOS","OS","picker","setTimeout","presentPicker","onSelect","multiple","mediaSource","shift","type","media","render","isReplacingMedia","isOneType","length","isImage","isVideo","isAudio","isAnyType","isImageOrVideo","pickerTitle","getMediaOptions","createElement","title","hideCancelButton","ref","instance","options","onChange","testID","Fragment","URLInput","isVisible","onClose","open","hideHeader","style","autoFocus","autoCapitalize","autoCorrect","autoComplete","keyboardType","placeholder","select","capabilities","getSettings"],"sources":["@wordpress/block-editor/src/components/media-upload/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { Platform } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { Component, React } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tBottomSheet,\n\tPanelBody,\n\tPicker,\n\tTextControl,\n} from '@wordpress/components';\nimport {\n\tgetOtherMediaOptions,\n\trequestMediaPicker,\n\tmediaSources,\n} from '@wordpress/react-native-bridge';\nimport {\n\tcapturePhoto,\n\tcaptureVideo,\n\timage,\n\twordpress,\n\tmobile,\n\tglobe,\n} from '@wordpress/icons';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { compose } from '@wordpress/compose';\nimport { withSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport {\n\tMEDIA_TYPE_IMAGE,\n\tMEDIA_TYPE_VIDEO,\n\tMEDIA_TYPE_AUDIO,\n\tMEDIA_TYPE_ANY,\n\tOPTION_TAKE_VIDEO,\n\tOPTION_TAKE_PHOTO,\n\tOPTION_INSERT_FROM_URL,\n\tOPTION_WORDPRESS_MEDIA_LIBRARY,\n} from './constants';\nimport styles from './style.scss';\n\nconst URL_MEDIA_SOURCE = 'URL';\n\nconst PICKER_OPENING_DELAY = 200;\n\nexport class MediaUpload extends Component {\n\tpickerTimeout;\n\n\tconstructor( props ) {\n\t\tsuper( props );\n\t\tthis.onPickerPresent = this.onPickerPresent.bind( this );\n\t\tthis.onPickerSelect = this.onPickerSelect.bind( this );\n\t\tthis.getAllSources = this.getAllSources.bind( this );\n\t\tthis.state = {\n\t\t\turl: '',\n\t\t\tshowURLInput: false,\n\t\t\totherMediaOptions: [],\n\t\t};\n\t}\n\n\tcomponentDidMount() {\n\t\tconst { allowedTypes = [], autoOpen } = this.props;\n\t\tgetOtherMediaOptions( allowedTypes, ( otherMediaOptions ) => {\n\t\t\tconst otherMediaOptionsWithIcons = otherMediaOptions.map(\n\t\t\t\t( option ) => {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...option,\n\t\t\t\t\t\trequiresModal: true,\n\t\t\t\t\t\ttypes: allowedTypes,\n\t\t\t\t\t\tid: option.value,\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t);\n\n\t\t\tthis.setState( { otherMediaOptions: otherMediaOptionsWithIcons } );\n\t\t} );\n\n\t\tif ( autoOpen ) {\n\t\t\tthis.onPickerPresent();\n\t\t}\n\t}\n\n\tcomponentWillUnmount() {\n\t\tclearTimeout( this.pickerTimeout );\n\t}\n\n\tgetAllSources() {\n\t\tconst { onSelectURL } = this.props;\n\n\t\tconst cameraImageSource = {\n\t\t\tid: mediaSources.deviceCamera, // ID is the value sent to native.\n\t\t\tvalue: mediaSources.deviceCamera + '-IMAGE', // This is needed to diferenciate image-camera from video-camera sources.\n\t\t\tlabel: OPTION_TAKE_PHOTO,\n\t\t\trequiresModal: true,\n\t\t\ttypes: [ MEDIA_TYPE_IMAGE ],\n\t\t\ticon: capturePhoto,\n\t\t};\n\n\t\tconst cameraVideoSource = {\n\t\t\tid: mediaSources.deviceCamera,\n\t\t\tvalue: mediaSources.deviceCamera,\n\t\t\tlabel: OPTION_TAKE_VIDEO,\n\t\t\trequiresModal: true,\n\t\t\ttypes: [ MEDIA_TYPE_VIDEO ],\n\t\t\ticon: captureVideo,\n\t\t};\n\n\t\tconst deviceLibrarySource = {\n\t\t\tid: mediaSources.deviceLibrary,\n\t\t\tvalue: mediaSources.deviceLibrary,\n\t\t\tlabel: __( 'Choose from device' ),\n\t\t\trequiresModal: true,\n\t\t\ttypes: [ MEDIA_TYPE_IMAGE, MEDIA_TYPE_VIDEO ],\n\t\t\ticon: image,\n\t\t};\n\n\t\tconst siteLibrarySource = {\n\t\t\tid: mediaSources.siteMediaLibrary,\n\t\t\tvalue: mediaSources.siteMediaLibrary,\n\t\t\tlabel: OPTION_WORDPRESS_MEDIA_LIBRARY,\n\t\t\trequiresModal: true,\n\t\t\ttypes: [\n\t\t\t\tMEDIA_TYPE_IMAGE,\n\t\t\t\tMEDIA_TYPE_VIDEO,\n\t\t\t\tMEDIA_TYPE_AUDIO,\n\t\t\t\tMEDIA_TYPE_ANY,\n\t\t\t],\n\t\t\ticon: wordpress,\n\t\t\tmediaLibrary: true,\n\t\t};\n\n\t\tconst urlSource = {\n\t\t\tid: URL_MEDIA_SOURCE,\n\t\t\tvalue: URL_MEDIA_SOURCE,\n\t\t\tlabel: OPTION_INSERT_FROM_URL,\n\t\t\ttypes: [ MEDIA_TYPE_AUDIO, MEDIA_TYPE_IMAGE, MEDIA_TYPE_VIDEO ],\n\t\t\ticon: globe,\n\t\t};\n\n\t\t// Only include `urlSource` option if `onSelectURL` prop is present, in order to match the web behavior.\n\t\tconst internalSources = [\n\t\t\tdeviceLibrarySource,\n\t\t\tcameraImageSource,\n\t\t\tcameraVideoSource,\n\t\t\tsiteLibrarySource,\n\t\t\t...( onSelectURL ? [ urlSource ] : [] ),\n\t\t];\n\n\t\treturn internalSources.concat( this.state.otherMediaOptions );\n\t}\n\n\tgetMediaOptionsItems() {\n\t\tconst {\n\t\t\tallowedTypes = [],\n\t\t\t__experimentalOnlyMediaLibrary,\n\t\t\tisAudioBlockMediaUploadEnabled,\n\t\t} = this.props;\n\n\t\treturn this.getAllSources()\n\t\t\t.filter( ( source ) => {\n\t\t\t\tif ( __experimentalOnlyMediaLibrary ) {\n\t\t\t\t\treturn source.mediaLibrary;\n\t\t\t\t} else if (\n\t\t\t\t\tallowedTypes.every(\n\t\t\t\t\t\t( allowedType ) =>\n\t\t\t\t\t\t\tallowedType === MEDIA_TYPE_AUDIO &&\n\t\t\t\t\t\t\tsource.types.includes( allowedType )\n\t\t\t\t\t) &&\n\t\t\t\t\tsource.id !== URL_MEDIA_SOURCE\n\t\t\t\t) {\n\t\t\t\t\treturn isAudioBlockMediaUploadEnabled === true;\n\t\t\t\t}\n\n\t\t\t\treturn allowedTypes.some( ( allowedType ) =>\n\t\t\t\t\tsource.types.includes( allowedType )\n\t\t\t\t);\n\t\t\t} )\n\t\t\t.map( ( source ) => {\n\t\t\t\treturn {\n\t\t\t\t\t...source,\n\t\t\t\t\ticon: source.icon || this.getChooseFromDeviceIcon(),\n\t\t\t\t};\n\t\t\t} );\n\t}\n\n\tgetChooseFromDeviceIcon() {\n\t\treturn mobile;\n\t}\n\n\tonPickerPresent() {\n\t\tconst { autoOpen } = this.props;\n\t\tconst isIOS = Platform.OS === 'ios';\n\n\t\tif ( this.picker ) {\n\t\t\t// the delay below is required because on iOS this action sheet gets dismissed by the close event of the Inserter\n\t\t\t// so this delay allows the Inserter to be closed fully before presenting action sheet.\n\t\t\tif ( autoOpen && isIOS ) {\n\t\t\t\tthis.pickerTimeout = setTimeout(\n\t\t\t\t\t() => this.picker.presentPicker(),\n\t\t\t\t\tPICKER_OPENING_DELAY\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tthis.picker.presentPicker();\n\t\t\t}\n\t\t}\n\t}\n\n\tonPickerSelect( value ) {\n\t\tconst { allowedTypes = [], onSelect, multiple = false } = this.props;\n\n\t\tif ( value === URL_MEDIA_SOURCE ) {\n\t\t\tthis.setState( { showURLInput: true } );\n\t\t\treturn;\n\t\t}\n\n\t\tconst mediaSource = this.getAllSources()\n\t\t\t.filter( ( source ) => source.value === value )\n\t\t\t.shift();\n\t\tconst types = allowedTypes.filter( ( type ) =>\n\t\t\tmediaSource.types.includes( type )\n\t\t);\n\n\t\trequestMediaPicker( mediaSource.id, types, multiple, ( media ) => {\n\t\t\tif ( ( multiple && media ) || ( media && media.id ) ) {\n\t\t\t\tonSelect( media );\n\t\t\t}\n\t\t} );\n\t}\n\n\trender() {\n\t\tconst { allowedTypes = [], isReplacingMedia, multiple } = this.props;\n\t\tconst isOneType = allowedTypes.length === 1;\n\t\tconst isImage = isOneType && allowedTypes.includes( MEDIA_TYPE_IMAGE );\n\t\tconst isVideo = isOneType && allowedTypes.includes( MEDIA_TYPE_VIDEO );\n\t\tconst isAudio = isOneType && allowedTypes.includes( MEDIA_TYPE_AUDIO );\n\t\tconst isAnyType = isOneType && allowedTypes.includes( MEDIA_TYPE_ANY );\n\n\t\tconst isImageOrVideo =\n\t\t\tallowedTypes.length === 2 &&\n\t\t\tallowedTypes.includes( MEDIA_TYPE_IMAGE ) &&\n\t\t\tallowedTypes.includes( MEDIA_TYPE_VIDEO );\n\n\t\tlet pickerTitle;\n\t\tif ( isImage ) {\n\t\t\tif ( isReplacingMedia ) {\n\t\t\t\tpickerTitle = __( 'Replace image' );\n\t\t\t} else {\n\t\t\t\tpickerTitle = multiple\n\t\t\t\t\t? __( 'Choose images' )\n\t\t\t\t\t: __( 'Choose image' );\n\t\t\t}\n\t\t} else if ( isVideo ) {\n\t\t\tif ( isReplacingMedia ) {\n\t\t\t\tpickerTitle = __( 'Replace video' );\n\t\t\t} else {\n\t\t\t\tpickerTitle = __( 'Choose video' );\n\t\t\t}\n\t\t} else if ( isImageOrVideo ) {\n\t\t\tif ( isReplacingMedia ) {\n\t\t\t\tpickerTitle = __( 'Replace image or video' );\n\t\t\t} else {\n\t\t\t\tpickerTitle = __( 'Choose image or video' );\n\t\t\t}\n\t\t} else if ( isAudio ) {\n\t\t\tif ( isReplacingMedia ) {\n\t\t\t\tpickerTitle = __( 'Replace audio' );\n\t\t\t} else {\n\t\t\t\tpickerTitle = __( 'Choose audio' );\n\t\t\t}\n\t\t} else if ( isAnyType ) {\n\t\t\tpickerTitle = __( 'Choose file' );\n\t\t\tif ( isReplacingMedia ) {\n\t\t\t\tpickerTitle = __( 'Replace file' );\n\t\t\t} else {\n\t\t\t\tpickerTitle = __( 'Choose file' );\n\t\t\t}\n\t\t}\n\n\t\tconst getMediaOptions = () => (\n\t\t\t<Picker\n\t\t\t\ttitle={ pickerTitle }\n\t\t\t\thideCancelButton\n\t\t\t\tref={ ( instance ) => ( this.picker = instance ) }\n\t\t\t\toptions={ this.getMediaOptionsItems() }\n\t\t\t\tonChange={ this.onPickerSelect }\n\t\t\t\ttestID=\"media-options-picker\"\n\t\t\t/>\n\t\t);\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<URLInput\n\t\t\t\t\tisVisible={ this.state.showURLInput }\n\t\t\t\t\tonClose={ () => {\n\t\t\t\t\t\tif ( this.state.url !== '' ) {\n\t\t\t\t\t\t\tthis.props.onSelectURL( this.state.url );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.setState( { showURLInput: false, url: '' } );\n\t\t\t\t\t} }\n\t\t\t\t\tonChange={ ( url ) => {\n\t\t\t\t\t\tthis.setState( { url } );\n\t\t\t\t\t} }\n\t\t\t\t\tvalue={ this.state.url }\n\t\t\t\t/>\n\t\t\t\t{ this.props.render( {\n\t\t\t\t\topen: this.onPickerPresent,\n\t\t\t\t\tgetMediaOptions,\n\t\t\t\t} ) }\n\t\t\t</>\n\t\t);\n\t}\n}\n\nfunction URLInput( props ) {\n\treturn (\n\t\t<BottomSheet\n\t\t\thideHeader\n\t\t\tisVisible={ props.isVisible }\n\t\t\tonClose={ props.onClose }\n\t\t>\n\t\t\t<PanelBody style={ styles[ 'media-upload__link-input' ] }>\n\t\t\t\t<TextControl\n\t\t\t\t\t// eslint-disable-next-line jsx-a11y/no-autofocus\n\t\t\t\t\tautoFocus\n\t\t\t\t\tautoCapitalize=\"none\"\n\t\t\t\t\tautoCorrect={ false }\n\t\t\t\t\tautoComplete={ Platform.isIOS ? 'url' : 'off' }\n\t\t\t\t\tkeyboardType=\"url\"\n\t\t\t\t\tlabel={ OPTION_INSERT_FROM_URL }\n\t\t\t\t\tonChange={ props.onChange }\n\t\t\t\t\tplaceholder={ __( 'Type a URL' ) }\n\t\t\t\t\tvalue={ props.value }\n\t\t\t\t/>\n\t\t\t</PanelBody>\n\t\t</BottomSheet>\n\t);\n}\n\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\tconst { capabilities } = select( blockEditorStore ).getSettings();\n\t\treturn {\n\t\t\tisAudioBlockMediaUploadEnabled:\n\t\t\t\tcapabilities?.isAudioBlockMediaUploadEnabled === true,\n\t\t};\n\t} ),\n] )( MediaUpload );\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,QAAQ,QAAQ,cAAc;;AAEvC;AACA;AACA;AACA,SAASC,SAAS,EAAEC,KAAK,QAAQ,oBAAoB;AACrD,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SACCC,WAAW,EACXC,SAAS,EACTC,MAAM,EACNC,WAAW,QACL,uBAAuB;AAC9B,SACCC,oBAAoB,EACpBC,kBAAkB,EAClBC,YAAY,QACN,gCAAgC;AACvC,SACCC,YAAY,EACZC,YAAY,EACZC,KAAK,EACLC,SAAS,EACTC,MAAM,EACNC,KAAK,QACC,kBAAkB;AACzB,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,yBAAyB;AACnE,SAASC,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,UAAU,QAAQ,iBAAiB;;AAE5C;AACA;AACA;AACA,SACCC,gBAAgB,EAChBC,gBAAgB,EAChBC,gBAAgB,EAChB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,WAAY,CAAC"}
@@ -1,4 +1,4 @@
1
- import { createElement } from "@wordpress/element";
1
+ import { createElement } from "react";
2
2
  /**
3
3
  * External dependencies
4
4
  */
@@ -1,4 +1,4 @@
1
- import { createElement } from "@wordpress/element";
1
+ import { createElement } from "react";
2
2
  /**
3
3
  * WordPress dependencies
4
4
  */
@@ -1,4 +1,4 @@
1
- import { createElement } from "@wordpress/element";
1
+ import { createElement } from "react";
2
2
  /**
3
3
  * WordPress dependencies
4
4
  */
@@ -1,4 +1,4 @@
1
- import { createElement } from "@wordpress/element";
1
+ import { createElement } from "react";
2
2
  /**
3
3
  * WordPress dependencies
4
4
  */
@@ -1,4 +1,4 @@
1
- import { createElement } from "@wordpress/element";
1
+ import { createElement } from "react";
2
2
  /**
3
3
  * Internal dependencies
4
4
  */
@@ -1,4 +1,4 @@
1
- import { createElement } from "@wordpress/element";
1
+ import { createElement } from "react";
2
2
  /**
3
3
  * External dependencies
4
4
  */
@@ -1,4 +1,4 @@
1
- import { createElement } from "@wordpress/element";
1
+ import { createElement } from "react";
2
2
  /**
3
3
  * External dependencies
4
4
  */
@@ -1,4 +1,4 @@
1
- import { createElement, Fragment } from "@wordpress/element";
1
+ import { createElement, Fragment } from "react";
2
2
  /**
3
3
  * External dependencies
4
4
  */
@@ -1,4 +1,4 @@
1
- import { createElement } from "@wordpress/element";
1
+ import { createElement } from "react";
2
2
  /**
3
3
  * WordPress dependencies
4
4
  */
@@ -1,4 +1,4 @@
1
- import { createElement } from "@wordpress/element";
1
+ import { createElement } from "react";
2
2
  /**
3
3
  * WordPress dependencies
4
4
  */