@wordpress/block-editor 12.18.1 → 12.19.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 (912) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/build/autocompleters/block.js +1 -2
  3. package/build/autocompleters/block.js.map +1 -1
  4. package/build/autocompleters/link.js +1 -2
  5. package/build/autocompleters/link.js.map +1 -1
  6. package/build/components/alignment-control/ui.js +1 -2
  7. package/build/components/alignment-control/ui.js.map +1 -1
  8. package/build/components/autocomplete/index.js +1 -2
  9. package/build/components/autocomplete/index.js.map +1 -1
  10. package/build/components/block-alignment-control/constants.js +2 -4
  11. package/build/components/block-alignment-control/constants.js.map +1 -1
  12. package/build/components/block-alignment-control/ui.js +1 -2
  13. package/build/components/block-alignment-control/ui.js.map +1 -1
  14. package/build/components/block-alignment-control/ui.native.js +1 -2
  15. package/build/components/block-alignment-control/ui.native.js.map +1 -1
  16. package/build/components/block-alignment-matrix-control/index.js +1 -2
  17. package/build/components/block-alignment-matrix-control/index.js.map +1 -1
  18. package/build/components/block-breadcrumb/index.js +1 -2
  19. package/build/components/block-breadcrumb/index.js.map +1 -1
  20. package/build/components/block-canvas/index.js +1 -2
  21. package/build/components/block-canvas/index.js.map +1 -1
  22. package/build/components/block-caption/index.native.js +1 -2
  23. package/build/components/block-caption/index.native.js.map +1 -1
  24. package/build/components/block-card/index.js +1 -2
  25. package/build/components/block-card/index.js.map +1 -1
  26. package/build/components/block-compare/index.js +1 -2
  27. package/build/components/block-compare/index.js.map +1 -1
  28. package/build/components/block-context/index.js +1 -2
  29. package/build/components/block-context/index.js.map +1 -1
  30. package/build/components/block-controls/groups.js +1 -2
  31. package/build/components/block-controls/groups.js.map +1 -1
  32. package/build/components/block-controls/index.js +1 -2
  33. package/build/components/block-controls/index.js.map +1 -1
  34. package/build/components/block-draggable/dropping-insertion-point.native.js +2 -2
  35. package/build/components/block-draggable/dropping-insertion-point.native.js.map +1 -1
  36. package/build/components/block-draggable/index.js +1 -2
  37. package/build/components/block-draggable/index.js.map +1 -1
  38. package/build/components/block-draggable/index.native.js +3 -4
  39. package/build/components/block-draggable/index.native.js.map +1 -1
  40. package/build/components/block-edit/context.js +4 -8
  41. package/build/components/block-edit/context.js.map +1 -1
  42. package/build/components/block-edit/edit.js +1 -2
  43. package/build/components/block-edit/edit.js.map +1 -1
  44. package/build/components/block-edit/edit.native.js +1 -2
  45. package/build/components/block-edit/edit.native.js.map +1 -1
  46. package/build/components/block-full-height-alignment-control/index.js +1 -2
  47. package/build/components/block-full-height-alignment-control/index.js.map +1 -1
  48. package/build/components/block-icon/index.js +1 -2
  49. package/build/components/block-icon/index.js.map +1 -1
  50. package/build/components/block-icon/index.native.js +1 -2
  51. package/build/components/block-icon/index.native.js.map +1 -1
  52. package/build/components/block-info-slot-fill/index.js +1 -2
  53. package/build/components/block-info-slot-fill/index.js.map +1 -1
  54. package/build/components/block-inspector/index.js +11 -9
  55. package/build/components/block-inspector/index.js.map +1 -1
  56. package/build/components/block-list/block-crash-boundary.js +1 -2
  57. package/build/components/block-list/block-crash-boundary.js.map +1 -1
  58. package/build/components/block-list/block-html.js +1 -2
  59. package/build/components/block-list/block-html.js.map +1 -1
  60. package/build/components/block-list/block-list-context.native.js +1 -2
  61. package/build/components/block-list/block-list-context.native.js.map +1 -1
  62. package/build/components/block-list/block-list-item-cell.native.js +1 -2
  63. package/build/components/block-list/block-list-item-cell.native.js.map +1 -1
  64. package/build/components/block-list/block-list-item.native.js +1 -2
  65. package/build/components/block-list/block-list-item.native.js.map +1 -1
  66. package/build/components/block-list/block-outline.native.js +1 -2
  67. package/build/components/block-list/block-outline.native.js.map +1 -1
  68. package/build/components/block-list/block-selection-button.native.js +1 -2
  69. package/build/components/block-list/block-selection-button.native.js.map +1 -1
  70. package/build/components/block-list/block.js +32 -21
  71. package/build/components/block-list/block.js.map +1 -1
  72. package/build/components/block-list/block.native.js +7 -6
  73. package/build/components/block-list/block.native.js.map +1 -1
  74. package/build/components/block-list/grid-item.native.js +1 -2
  75. package/build/components/block-list/grid-item.native.js.map +1 -1
  76. package/build/components/block-list/index.js +19 -9
  77. package/build/components/block-list/index.js.map +1 -1
  78. package/build/components/block-list/insertion-point.native.js +1 -2
  79. package/build/components/block-list/insertion-point.native.js.map +1 -1
  80. package/build/components/block-list/layout.js +2 -4
  81. package/build/components/block-list/layout.js.map +1 -1
  82. package/build/components/block-list/private-block-context.js +1 -2
  83. package/build/components/block-list/private-block-context.js.map +1 -1
  84. package/build/components/block-list/subdirectory-icon.js +1 -2
  85. package/build/components/block-list/subdirectory-icon.js.map +1 -1
  86. package/build/components/block-list/use-block-props/index.js +8 -1
  87. package/build/components/block-list/use-block-props/index.js.map +1 -1
  88. package/build/components/block-list/use-scroll-upon-insertion.native.js +1 -2
  89. package/build/components/block-list/use-scroll-upon-insertion.native.js.map +1 -1
  90. package/build/components/block-list-appender/index.js +5 -52
  91. package/build/components/block-list-appender/index.js.map +1 -1
  92. package/build/components/block-media-update-progress/index.native.js +11 -22
  93. package/build/components/block-media-update-progress/index.native.js.map +1 -1
  94. package/build/components/block-mover/button.js +2 -4
  95. package/build/components/block-mover/button.js.map +1 -1
  96. package/build/components/block-mover/index.js +1 -2
  97. package/build/components/block-mover/index.js.map +1 -1
  98. package/build/components/block-mover/index.native.js +3 -6
  99. package/build/components/block-mover/index.native.js.map +1 -1
  100. package/build/components/block-mover/mover-description.native.js +0 -2
  101. package/build/components/block-mover/mover-description.native.js.map +1 -1
  102. package/build/components/block-navigation/dropdown.js +1 -2
  103. package/build/components/block-navigation/dropdown.js.map +1 -1
  104. package/build/components/block-pattern-setup/constants.js +1 -2
  105. package/build/components/block-pattern-setup/constants.js.map +1 -1
  106. package/build/components/block-pattern-setup/index.js +1 -2
  107. package/build/components/block-pattern-setup/index.js.map +1 -1
  108. package/build/components/block-pattern-setup/setup-toolbar.js +1 -2
  109. package/build/components/block-pattern-setup/setup-toolbar.js.map +1 -1
  110. package/build/components/block-pattern-setup/use-patterns-setup.js +1 -2
  111. package/build/components/block-pattern-setup/use-patterns-setup.js.map +1 -1
  112. package/build/components/block-patterns-list/index.js +1 -2
  113. package/build/components/block-patterns-list/index.js.map +1 -1
  114. package/build/components/block-popover/drop-zone.js +1 -2
  115. package/build/components/block-popover/drop-zone.js.map +1 -1
  116. package/build/components/block-popover/inbetween.js +2 -4
  117. package/build/components/block-popover/inbetween.js.map +1 -1
  118. package/build/components/block-popover/index.js +1 -2
  119. package/build/components/block-popover/index.js.map +1 -1
  120. package/build/components/block-popover/use-popover-scroll.js +1 -2
  121. package/build/components/block-popover/use-popover-scroll.js.map +1 -1
  122. package/build/components/block-preview/auto.js +2 -1
  123. package/build/components/block-preview/auto.js.map +1 -1
  124. package/build/components/block-preview/index.js +1 -2
  125. package/build/components/block-preview/index.js.map +1 -1
  126. package/build/components/block-removal-warning-modal/index.js +4 -2
  127. package/build/components/block-removal-warning-modal/index.js.map +1 -1
  128. package/build/components/block-settings/button.native.js +1 -2
  129. package/build/components/block-settings/button.native.js.map +1 -1
  130. package/build/components/block-settings/container.native.js +1 -2
  131. package/build/components/block-settings/container.native.js.map +1 -1
  132. package/build/components/block-settings/index.native.js +2 -2
  133. package/build/components/block-settings/index.native.js.map +1 -1
  134. package/build/components/block-settings-menu/block-html-convert-button.js +1 -2
  135. package/build/components/block-settings-menu/block-html-convert-button.js.map +1 -1
  136. package/build/components/block-settings-menu/block-mode-toggle.js +1 -2
  137. package/build/components/block-settings-menu/block-mode-toggle.js.map +1 -1
  138. package/build/components/block-settings-menu/block-settings-dropdown.js +1 -2
  139. package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  140. package/build/components/block-settings-menu/block-settings-menu-first-item.js +1 -2
  141. package/build/components/block-settings-menu/block-settings-menu-first-item.js.map +1 -1
  142. package/build/components/block-settings-menu/index.js +1 -2
  143. package/build/components/block-settings-menu/index.js.map +1 -1
  144. package/build/components/block-settings-menu-controls/index.js +1 -2
  145. package/build/components/block-settings-menu-controls/index.js.map +1 -1
  146. package/build/components/block-styles/index.js +1 -2
  147. package/build/components/block-styles/index.js.map +1 -1
  148. package/build/components/block-styles/index.native.js +1 -2
  149. package/build/components/block-styles/index.native.js.map +1 -1
  150. package/build/components/block-styles/preview.native.js +1 -2
  151. package/build/components/block-styles/preview.native.js.map +1 -1
  152. package/build/components/block-switcher/block-transformations-menu.js +1 -2
  153. package/build/components/block-switcher/block-transformations-menu.js.map +1 -1
  154. package/build/components/block-switcher/block-transformations-menu.native.js +1 -2
  155. package/build/components/block-switcher/block-transformations-menu.native.js.map +1 -1
  156. package/build/components/block-switcher/block-variation-transformations.js +1 -2
  157. package/build/components/block-switcher/block-variation-transformations.js.map +1 -1
  158. package/build/components/block-switcher/index.js +13 -11
  159. package/build/components/block-switcher/index.js.map +1 -1
  160. package/build/components/block-switcher/pattern-transformations-menu.js +1 -2
  161. package/build/components/block-switcher/pattern-transformations-menu.js.map +1 -1
  162. package/build/components/block-switcher/use-transformed-patterns.js +1 -2
  163. package/build/components/block-switcher/use-transformed-patterns.js.map +1 -1
  164. package/build/components/block-title/use-block-display-title.js +21 -28
  165. package/build/components/block-title/use-block-display-title.js.map +1 -1
  166. package/build/components/block-toolbar/block-name-context.js +1 -2
  167. package/build/components/block-toolbar/block-name-context.js.map +1 -1
  168. package/build/components/block-toolbar/block-toolbar-last-item.js +1 -2
  169. package/build/components/block-toolbar/block-toolbar-last-item.js.map +1 -1
  170. package/build/components/block-toolbar/block-toolbar-menu.native.js +1 -2
  171. package/build/components/block-toolbar/block-toolbar-menu.native.js.map +1 -1
  172. package/build/components/block-tools/block-selection-button.js +20 -18
  173. package/build/components/block-tools/block-selection-button.js.map +1 -1
  174. package/build/components/block-tools/index.js +4 -12
  175. package/build/components/block-tools/index.js.map +1 -1
  176. package/build/components/block-tools/insertion-point.js +1 -2
  177. package/build/components/block-tools/insertion-point.js.map +1 -1
  178. package/build/components/block-tools/zoom-out-mode-inserters.js +1 -2
  179. package/build/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
  180. package/build/components/block-types-list/index.js +1 -2
  181. package/build/components/block-types-list/index.js.map +1 -1
  182. package/build/components/block-variation-picker/index.js +1 -2
  183. package/build/components/block-variation-picker/index.js.map +1 -1
  184. package/build/components/block-variation-picker/index.native.js +1 -2
  185. package/build/components/block-variation-picker/index.native.js.map +1 -1
  186. package/build/components/block-variation-transforms/index.js +1 -2
  187. package/build/components/block-variation-transforms/index.js.map +1 -1
  188. package/build/components/block-vertical-alignment-control/icons.js +5 -10
  189. package/build/components/block-vertical-alignment-control/icons.js.map +1 -1
  190. package/build/components/block-vertical-alignment-control/ui.js +1 -2
  191. package/build/components/block-vertical-alignment-control/ui.js.map +1 -1
  192. package/build/components/button-block-appender/index.js +2 -4
  193. package/build/components/button-block-appender/index.js.map +1 -1
  194. package/build/components/button-block-appender/index.native.js +1 -2
  195. package/build/components/button-block-appender/index.native.js.map +1 -1
  196. package/build/components/caption/index.native.js +1 -2
  197. package/build/components/caption/index.native.js.map +1 -1
  198. package/build/components/color-palette/index.js +1 -2
  199. package/build/components/color-palette/index.js.map +1 -1
  200. package/build/components/color-palette/with-color-context.js +1 -2
  201. package/build/components/color-palette/with-color-context.js.map +1 -1
  202. package/build/components/color-style-selector/index.js +1 -2
  203. package/build/components/color-style-selector/index.js.map +1 -1
  204. package/build/components/colors/index.js +2 -2
  205. package/build/components/colors/index.js.map +1 -1
  206. package/build/components/colors-gradients/control.js +1 -3
  207. package/build/components/colors-gradients/control.js.map +1 -1
  208. package/build/components/colors-gradients/panel-color-gradient-settings.js +1 -2
  209. package/build/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
  210. package/build/components/contrast-checker/index.js +1 -2
  211. package/build/components/contrast-checker/index.js.map +1 -1
  212. package/build/components/contrast-checker/index.native.js +1 -2
  213. package/build/components/contrast-checker/index.native.js.map +1 -1
  214. package/build/components/convert-to-group-buttons/toolbar.js +1 -2
  215. package/build/components/convert-to-group-buttons/toolbar.js.map +1 -1
  216. package/build/components/default-block-appender/index.js +31 -40
  217. package/build/components/default-block-appender/index.js.map +1 -1
  218. package/build/components/default-block-appender/index.native.js +1 -2
  219. package/build/components/default-block-appender/index.native.js.map +1 -1
  220. package/build/components/dimensions-tool/aspect-ratio-tool.js +2 -2
  221. package/build/components/dimensions-tool/aspect-ratio-tool.js.map +1 -1
  222. package/build/components/dimensions-tool/index.js +1 -2
  223. package/build/components/dimensions-tool/index.js.map +1 -1
  224. package/build/components/duotone-control/index.js +1 -2
  225. package/build/components/duotone-control/index.js.map +1 -1
  226. package/build/components/editable-text/index.js +1 -2
  227. package/build/components/editable-text/index.js.map +1 -1
  228. package/build/components/floating-toolbar/index.native.js +1 -2
  229. package/build/components/floating-toolbar/index.native.js.map +1 -1
  230. package/build/components/floating-toolbar/nav-up-icon.js +1 -2
  231. package/build/components/floating-toolbar/nav-up-icon.js.map +1 -1
  232. package/build/components/font-sizes/font-size-picker.js +1 -2
  233. package/build/components/font-sizes/font-size-picker.js.map +1 -1
  234. package/build/components/global-styles/border-panel.js +56 -8
  235. package/build/components/global-styles/border-panel.js.map +1 -1
  236. package/build/components/global-styles/color-panel.native.js +1 -2
  237. package/build/components/global-styles/color-panel.native.js.map +1 -1
  238. package/build/components/global-styles/context.js +2 -4
  239. package/build/components/global-styles/context.js.map +1 -1
  240. package/build/components/global-styles/get-global-styles-changes.js +2 -4
  241. package/build/components/global-styles/get-global-styles-changes.js.map +1 -1
  242. package/build/components/global-styles/hooks.js +2 -3
  243. package/build/components/global-styles/hooks.js.map +1 -1
  244. package/build/components/global-styles/index.js +2 -15
  245. package/build/components/global-styles/index.js.map +1 -1
  246. package/build/components/global-styles/shadow-panel-components.js +133 -0
  247. package/build/components/global-styles/shadow-panel-components.js.map +1 -0
  248. package/build/components/global-styles/typography-panel.js +18 -36
  249. package/build/components/global-styles/typography-panel.js.map +1 -1
  250. package/build/components/global-styles/use-global-styles-output.js +1 -1
  251. package/build/components/global-styles/use-global-styles-output.js.map +1 -1
  252. package/build/components/global-styles/utils.js +38 -14
  253. package/build/components/global-styles/utils.js.map +1 -1
  254. package/build/components/iframe/index.js +1 -2
  255. package/build/components/iframe/index.js.map +1 -1
  256. package/build/components/image-editor/constants.js +3 -6
  257. package/build/components/image-editor/constants.js.map +1 -1
  258. package/build/components/image-link-destinations/index.native.js +1 -2
  259. package/build/components/image-link-destinations/index.native.js.map +1 -1
  260. package/build/components/index.js +2 -2
  261. package/build/components/index.js.map +1 -1
  262. package/build/components/index.native.js +2 -2
  263. package/build/components/index.native.js.map +1 -1
  264. package/build/components/inner-blocks/button-block-appender.js +1 -2
  265. package/build/components/inner-blocks/button-block-appender.js.map +1 -1
  266. package/build/components/inner-blocks/constants.native.js +1 -2
  267. package/build/components/inner-blocks/constants.native.js.map +1 -1
  268. package/build/components/inner-blocks/default-block-appender.js +1 -2
  269. package/build/components/inner-blocks/default-block-appender.js.map +1 -1
  270. package/build/components/inner-blocks/index.js +33 -30
  271. package/build/components/inner-blocks/index.js.map +1 -1
  272. package/build/components/inner-blocks/index.native.js +2 -6
  273. package/build/components/inner-blocks/index.native.js.map +1 -1
  274. package/build/components/inner-blocks/use-inner-block-template-sync.js +2 -3
  275. package/build/components/inner-blocks/use-inner-block-template-sync.js.map +1 -1
  276. package/build/components/inner-blocks/warning-max-depth-exceeded.native.js +1 -2
  277. package/build/components/inner-blocks/warning-max-depth-exceeded.native.js.map +1 -1
  278. package/build/components/inner-blocks/with-client-id.js +1 -2
  279. package/build/components/inner-blocks/with-client-id.js.map +1 -1
  280. package/build/components/inserter/block-patterns-explorer/index.js +1 -2
  281. package/build/components/inserter/block-patterns-explorer/index.js.map +1 -1
  282. package/build/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js +1 -2
  283. package/build/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js.map +1 -1
  284. package/build/components/inserter/block-patterns-explorer/pattern-list.js +1 -2
  285. package/build/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
  286. package/build/components/inserter/block-patterns-tab/index.js +1 -2
  287. package/build/components/inserter/block-patterns-tab/index.js.map +1 -1
  288. package/build/components/inserter/block-patterns-tab/patterns-filter.js +4 -4
  289. package/build/components/inserter/block-patterns-tab/patterns-filter.js.map +1 -1
  290. package/build/components/inserter/block-patterns-tab/utils.js +5 -9
  291. package/build/components/inserter/block-patterns-tab/utils.js.map +1 -1
  292. package/build/components/inserter/block-types-tab.js +1 -2
  293. package/build/components/inserter/block-types-tab.js.map +1 -1
  294. package/build/components/inserter/block-types-tab.native.js +1 -2
  295. package/build/components/inserter/block-types-tab.native.js.map +1 -1
  296. package/build/components/inserter/hooks/use-block-type-impressions.native.js +1 -2
  297. package/build/components/inserter/hooks/use-block-type-impressions.native.js.map +1 -1
  298. package/build/components/inserter/hooks/use-block-types-state.js +1 -2
  299. package/build/components/inserter/hooks/use-block-types-state.js.map +1 -1
  300. package/build/components/inserter/hooks/use-insertion-point.js +1 -2
  301. package/build/components/inserter/hooks/use-insertion-point.js.map +1 -1
  302. package/build/components/inserter/hooks/use-patterns-state.js +1 -2
  303. package/build/components/inserter/hooks/use-patterns-state.js.map +1 -1
  304. package/build/components/inserter/index.js +2 -4
  305. package/build/components/inserter/index.js.map +1 -1
  306. package/build/components/inserter/index.native.js +1 -2
  307. package/build/components/inserter/index.native.js.map +1 -1
  308. package/build/components/inserter/library.js +1 -2
  309. package/build/components/inserter/library.js.map +1 -1
  310. package/build/components/inserter/media-tab/media-list.js +1 -2
  311. package/build/components/inserter/media-tab/media-list.js.map +1 -1
  312. package/build/components/inserter/media-tab/media-tab.js +1 -2
  313. package/build/components/inserter/media-tab/media-tab.js.map +1 -1
  314. package/build/components/inserter/menu.js +1 -2
  315. package/build/components/inserter/menu.js.map +1 -1
  316. package/build/components/inserter/menu.native.js +1 -2
  317. package/build/components/inserter/menu.native.js.map +1 -1
  318. package/build/components/inserter/no-results.js +1 -2
  319. package/build/components/inserter/no-results.js.map +1 -1
  320. package/build/components/inserter/no-results.native.js +1 -2
  321. package/build/components/inserter/no-results.native.js.map +1 -1
  322. package/build/components/inserter/panel.js +1 -2
  323. package/build/components/inserter/panel.js.map +1 -1
  324. package/build/components/inserter/preview-panel.js +1 -2
  325. package/build/components/inserter/preview-panel.js.map +1 -1
  326. package/build/components/inserter/quick-inserter.js +3 -2
  327. package/build/components/inserter/quick-inserter.js.map +1 -1
  328. package/build/components/inserter/reusable-blocks-tab.native.js +1 -2
  329. package/build/components/inserter/reusable-blocks-tab.native.js.map +1 -1
  330. package/build/components/inserter/search-items.js +0 -1
  331. package/build/components/inserter/search-items.js.map +1 -1
  332. package/build/components/inserter/search-results.js +1 -2
  333. package/build/components/inserter/search-results.js.map +1 -1
  334. package/build/components/inserter/search-results.native.js +1 -2
  335. package/build/components/inserter/search-results.native.js.map +1 -1
  336. package/build/components/inserter/tabs.js +1 -2
  337. package/build/components/inserter/tabs.js.map +1 -1
  338. package/build/components/inserter/tabs.native.js +1 -2
  339. package/build/components/inserter/tabs.native.js.map +1 -1
  340. package/build/components/inserter/tips.js +1 -2
  341. package/build/components/inserter/tips.js.map +1 -1
  342. package/build/components/inserter-button/index.native.js +1 -2
  343. package/build/components/inserter-button/index.native.js.map +1 -1
  344. package/build/components/inserter-button/sparkles.js +1 -2
  345. package/build/components/inserter-button/sparkles.js.map +1 -1
  346. package/build/components/inserter-draggable-blocks/index.js +11 -2
  347. package/build/components/inserter-draggable-blocks/index.js.map +1 -1
  348. package/build/components/inserter-list-item/index.js +1 -2
  349. package/build/components/inserter-list-item/index.js.map +1 -1
  350. package/build/components/inserter-listbox/context.js +1 -2
  351. package/build/components/inserter-listbox/context.js.map +1 -1
  352. package/build/components/inserter-listbox/group.js +1 -2
  353. package/build/components/inserter-listbox/group.js.map +1 -1
  354. package/build/components/inserter-listbox/index.js +1 -2
  355. package/build/components/inserter-listbox/index.js.map +1 -1
  356. package/build/components/inserter-listbox/item.js +1 -2
  357. package/build/components/inserter-listbox/item.js.map +1 -1
  358. package/build/components/inserter-listbox/row.js +1 -2
  359. package/build/components/inserter-listbox/row.js.map +1 -1
  360. package/build/components/inserter-menu-extension/index.js +1 -2
  361. package/build/components/inserter-menu-extension/index.js.map +1 -1
  362. package/build/components/inspector-controls/groups.js +1 -2
  363. package/build/components/inspector-controls/groups.js.map +1 -1
  364. package/build/components/inspector-controls/index.js +1 -2
  365. package/build/components/inspector-controls/index.js.map +1 -1
  366. package/build/components/inspector-controls-tabs/advanced-controls-panel.js +3 -4
  367. package/build/components/inspector-controls-tabs/advanced-controls-panel.js.map +1 -1
  368. package/build/components/inspector-controls-tabs/position-controls-panel.js +1 -2
  369. package/build/components/inspector-controls-tabs/position-controls-panel.js.map +1 -1
  370. package/build/components/inspector-controls-tabs/settings-tab.js +1 -2
  371. package/build/components/inspector-controls-tabs/settings-tab.js.map +1 -1
  372. package/build/components/inspector-controls-tabs/styles-tab.js +6 -6
  373. package/build/components/inspector-controls-tabs/styles-tab.js.map +1 -1
  374. package/build/components/inspector-controls-tabs/use-is-list-view-tab-disabled.js +1 -2
  375. package/build/components/inspector-controls-tabs/use-is-list-view-tab-disabled.js.map +1 -1
  376. package/build/components/inspector-controls-tabs/utils.js +3 -6
  377. package/build/components/inspector-controls-tabs/utils.js.map +1 -1
  378. package/build/components/justify-content-control/ui.js +1 -2
  379. package/build/components/justify-content-control/ui.js.map +1 -1
  380. package/build/components/keyboard-shortcuts/index.js +1 -2
  381. package/build/components/keyboard-shortcuts/index.js.map +1 -1
  382. package/build/components/line-height-control/index.js +1 -2
  383. package/build/components/line-height-control/index.js.map +1 -1
  384. package/build/components/line-height-control/utils.js +4 -8
  385. package/build/components/line-height-control/utils.js.map +1 -1
  386. package/build/components/link-control/constants.js +7 -14
  387. package/build/components/link-control/constants.js.map +1 -1
  388. package/build/components/link-control/index.js +2 -16
  389. package/build/components/link-control/index.js.map +1 -1
  390. package/build/components/link-control/link-preview.js +13 -15
  391. package/build/components/link-control/link-preview.js.map +1 -1
  392. package/build/components/link-control/search-create-button.js +1 -2
  393. package/build/components/link-control/search-create-button.js.map +1 -1
  394. package/build/components/link-control/search-input.js +1 -2
  395. package/build/components/link-control/search-input.js.map +1 -1
  396. package/build/components/link-control/search-item.js +1 -2
  397. package/build/components/link-control/search-item.js.map +1 -1
  398. package/build/components/link-control/settings-drawer.js +1 -2
  399. package/build/components/link-control/settings-drawer.js.map +1 -1
  400. package/build/components/link-control/settings.js +1 -2
  401. package/build/components/link-control/settings.js.map +1 -1
  402. package/build/components/link-control/use-create-page.js +0 -1
  403. package/build/components/link-control/use-create-page.js.map +1 -1
  404. package/build/components/link-control/use-rich-url-data.js +1 -2
  405. package/build/components/link-control/use-rich-url-data.js.map +1 -1
  406. package/build/components/link-control/viewer-slot.js +1 -2
  407. package/build/components/link-control/viewer-slot.js.map +1 -1
  408. package/build/components/list-view/appender.js +1 -2
  409. package/build/components/list-view/appender.js.map +1 -1
  410. package/build/components/list-view/block-contents.js +1 -2
  411. package/build/components/list-view/block-contents.js.map +1 -1
  412. package/build/components/list-view/block-select-button.js +1 -2
  413. package/build/components/list-view/block-select-button.js.map +1 -1
  414. package/build/components/list-view/block.js +33 -28
  415. package/build/components/list-view/block.js.map +1 -1
  416. package/build/components/list-view/branch.js +1 -2
  417. package/build/components/list-view/branch.js.map +1 -1
  418. package/build/components/list-view/context.js +1 -2
  419. package/build/components/list-view/context.js.map +1 -1
  420. package/build/components/list-view/index.js +20 -17
  421. package/build/components/list-view/index.js.map +1 -1
  422. package/build/components/list-view/leaf.js +1 -2
  423. package/build/components/list-view/leaf.js.map +1 -1
  424. package/build/components/list-view/use-clipboard-handler.js +159 -0
  425. package/build/components/list-view/use-clipboard-handler.js.map +1 -0
  426. package/build/components/list-view/use-list-view-drop-zone.js +1 -2
  427. package/build/components/list-view/use-list-view-drop-zone.js.map +1 -1
  428. package/build/components/list-view/utils.js +4 -4
  429. package/build/components/list-view/utils.js.map +1 -1
  430. package/build/components/media-placeholder/index.js +1 -2
  431. package/build/components/media-placeholder/index.js.map +1 -1
  432. package/build/components/media-placeholder/index.native.js +1 -2
  433. package/build/components/media-placeholder/index.native.js.map +1 -1
  434. package/build/components/media-replace-flow/index.js +1 -2
  435. package/build/components/media-replace-flow/index.js.map +1 -1
  436. package/build/components/media-replace-flow/index.native.js +1 -2
  437. package/build/components/media-replace-flow/index.native.js.map +1 -1
  438. package/build/components/media-upload/check.js +1 -2
  439. package/build/components/media-upload/check.js.map +1 -1
  440. package/build/components/media-upload/constants.native.js +8 -16
  441. package/build/components/media-upload/constants.native.js.map +1 -1
  442. package/build/components/media-upload/index.js +1 -2
  443. package/build/components/media-upload/index.js.map +1 -1
  444. package/build/components/media-upload/index.native.js +1 -2
  445. package/build/components/media-upload/index.native.js.map +1 -1
  446. package/build/components/media-upload-progress/constants.js +6 -12
  447. package/build/components/media-upload-progress/constants.js.map +1 -1
  448. package/build/components/media-upload-progress/index.native.js +1 -2
  449. package/build/components/media-upload-progress/index.native.js.map +1 -1
  450. package/build/components/multi-selection-inspector/index.js +1 -2
  451. package/build/components/multi-selection-inspector/index.js.map +1 -1
  452. package/build/components/navigable-toolbar/index.js +5 -2
  453. package/build/components/navigable-toolbar/index.js.map +1 -1
  454. package/build/components/observe-typing/index.js +1 -2
  455. package/build/components/observe-typing/index.js.map +1 -1
  456. package/build/components/panel-color-settings/index.js +1 -2
  457. package/build/components/panel-color-settings/index.js.map +1 -1
  458. package/build/components/plain-text/index.js +1 -2
  459. package/build/components/plain-text/index.js.map +1 -1
  460. package/build/components/provider/block-refs-provider.js +1 -2
  461. package/build/components/provider/block-refs-provider.js.map +1 -1
  462. package/build/components/provider/index.js +3 -5
  463. package/build/components/provider/index.js.map +1 -1
  464. package/build/components/provider/index.native.js +2 -4
  465. package/build/components/provider/index.native.js.map +1 -1
  466. package/build/components/provider/with-registry-provider.js +1 -2
  467. package/build/components/provider/with-registry-provider.js.map +1 -1
  468. package/build/components/publish-date-time-picker/index.js +1 -2
  469. package/build/components/publish-date-time-picker/index.js.map +1 -1
  470. package/build/components/responsive-block-control/index.js +3 -7
  471. package/build/components/responsive-block-control/index.js.map +1 -1
  472. package/build/components/rich-text/embed-handler-picker.native.js +1 -2
  473. package/build/components/rich-text/embed-handler-picker.native.js.map +1 -1
  474. package/build/components/rich-text/format-edit.js +1 -2
  475. package/build/components/rich-text/format-edit.js.map +1 -1
  476. package/build/components/rich-text/format-toolbar/index.js +1 -2
  477. package/build/components/rich-text/format-toolbar/index.js.map +1 -1
  478. package/build/components/rich-text/format-toolbar/index.native.js +1 -2
  479. package/build/components/rich-text/format-toolbar/index.native.js.map +1 -1
  480. package/build/components/rich-text/format-toolbar-container.js +1 -2
  481. package/build/components/rich-text/format-toolbar-container.js.map +1 -1
  482. package/build/components/rich-text/format-toolbar-container.native.js +1 -2
  483. package/build/components/rich-text/format-toolbar-container.native.js.map +1 -1
  484. package/build/components/rich-text/index.js +7 -8
  485. package/build/components/rich-text/index.js.map +1 -1
  486. package/build/components/rich-text/index.native.js +1 -2
  487. package/build/components/rich-text/index.native.js.map +1 -1
  488. package/build/components/rich-text/multiline.js +1 -2
  489. package/build/components/rich-text/multiline.js.map +1 -1
  490. package/build/components/rich-text/native/index.native.js +1 -6
  491. package/build/components/rich-text/native/index.native.js.map +1 -1
  492. package/build/components/rich-text/native/toolbar-button-with-options.native.js +1 -2
  493. package/build/components/rich-text/native/toolbar-button-with-options.native.js.map +1 -1
  494. package/build/components/skip-to-selected-block/index.js +1 -2
  495. package/build/components/skip-to-selected-block/index.js.map +1 -1
  496. package/build/components/spacing-sizes-control/index.js +3 -1
  497. package/build/components/spacing-sizes-control/index.js.map +1 -1
  498. package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js +0 -1
  499. package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
  500. package/build/components/spacing-sizes-control/utils.js +5 -10
  501. package/build/components/spacing-sizes-control/utils.js.map +1 -1
  502. package/build/components/tool-selector/index.js +1 -2
  503. package/build/components/tool-selector/index.js.map +1 -1
  504. package/build/components/typewriter/index.js +1 -2
  505. package/build/components/typewriter/index.js.map +1 -1
  506. package/build/components/ungroup-button/index.native.js +1 -2
  507. package/build/components/ungroup-button/index.native.js.map +1 -1
  508. package/build/components/unsupported-block-details/index.native.js +1 -2
  509. package/build/components/unsupported-block-details/index.native.js.map +1 -1
  510. package/build/components/url-input/button.js +1 -2
  511. package/build/components/url-input/button.js.map +1 -1
  512. package/build/components/url-input/index.js +1 -2
  513. package/build/components/url-input/index.js.map +1 -1
  514. package/build/components/url-popover/image-url-input-ui.js +66 -35
  515. package/build/components/url-popover/image-url-input-ui.js.map +1 -1
  516. package/build/components/url-popover/index.js +8 -6
  517. package/build/components/url-popover/index.js.map +1 -1
  518. package/build/components/url-popover/link-editor.js +2 -1
  519. package/build/components/url-popover/link-editor.js.map +1 -1
  520. package/build/components/url-popover/link-viewer.js +2 -1
  521. package/build/components/url-popover/link-viewer.js.map +1 -1
  522. package/build/components/use-block-drop-zone/index.js +15 -5
  523. package/build/components/use-block-drop-zone/index.js.map +1 -1
  524. package/build/components/use-flash-editable-blocks/index.js +60 -0
  525. package/build/components/use-flash-editable-blocks/index.js.map +1 -0
  526. package/build/components/use-moving-animation/index.js +1 -2
  527. package/build/components/use-moving-animation/index.js.map +1 -1
  528. package/build/components/use-on-block-drop/index.js +4 -4
  529. package/build/components/use-on-block-drop/index.js.map +1 -1
  530. package/build/components/use-settings/index.js +3 -162
  531. package/build/components/use-settings/index.js.map +1 -1
  532. package/build/components/video-player/gridicon-play.native.js +1 -2
  533. package/build/components/video-player/gridicon-play.native.js.map +1 -1
  534. package/build/components/video-player/index.native.js +2 -4
  535. package/build/components/video-player/index.native.js.map +1 -1
  536. package/build/components/warning/index.js +1 -2
  537. package/build/components/warning/index.js.map +1 -1
  538. package/build/components/warning/index.native.js +1 -2
  539. package/build/components/warning/index.native.js.map +1 -1
  540. package/build/components/writing-flow/index.js +1 -2
  541. package/build/components/writing-flow/index.js.map +1 -1
  542. package/build/components/writing-flow/use-clipboard-handler.js +3 -48
  543. package/build/components/writing-flow/use-clipboard-handler.js.map +1 -1
  544. package/build/components/writing-flow/use-drag-selection.js +13 -2
  545. package/build/components/writing-flow/use-drag-selection.js.map +1 -1
  546. package/build/components/writing-flow/utils.js +86 -0
  547. package/build/components/writing-flow/utils.js.map +1 -0
  548. package/build/hooks/align.js +1 -2
  549. package/build/hooks/align.js.map +1 -1
  550. package/build/hooks/align.native.js +2 -2
  551. package/build/hooks/align.native.js.map +1 -1
  552. package/build/hooks/anchor.js +1 -2
  553. package/build/hooks/anchor.js.map +1 -1
  554. package/build/hooks/aria-label.js +1 -2
  555. package/build/hooks/aria-label.js.map +1 -1
  556. package/build/hooks/background.js +52 -14
  557. package/build/hooks/background.js.map +1 -1
  558. package/build/hooks/block-hooks.js +1 -2
  559. package/build/hooks/block-hooks.js.map +1 -1
  560. package/build/hooks/block-renaming.js +1 -2
  561. package/build/hooks/block-renaming.js.map +1 -1
  562. package/build/hooks/border.js +42 -7
  563. package/build/hooks/border.js.map +1 -1
  564. package/build/hooks/color.js +4 -6
  565. package/build/hooks/color.js.map +1 -1
  566. package/build/hooks/content-lock-ui.js +1 -2
  567. package/build/hooks/content-lock-ui.js.map +1 -1
  568. package/build/hooks/custom-class-name.js +1 -2
  569. package/build/hooks/custom-class-name.js.map +1 -1
  570. package/build/hooks/custom-class-name.native.js +1 -2
  571. package/build/hooks/custom-class-name.native.js.map +1 -1
  572. package/build/hooks/dimensions.js +5 -10
  573. package/build/hooks/dimensions.js.map +1 -1
  574. package/build/hooks/duotone.js +1 -3
  575. package/build/hooks/duotone.js.map +1 -1
  576. package/build/hooks/font-family.js +2 -4
  577. package/build/hooks/font-family.js.map +1 -1
  578. package/build/hooks/font-size.js +25 -31
  579. package/build/hooks/font-size.js.map +1 -1
  580. package/build/hooks/index.js +2 -8
  581. package/build/hooks/index.js.map +1 -1
  582. package/build/hooks/index.native.js +0 -6
  583. package/build/hooks/index.native.js.map +1 -1
  584. package/build/hooks/layout-child.js +1 -2
  585. package/build/hooks/layout-child.js.map +1 -1
  586. package/build/hooks/layout.js +2 -4
  587. package/build/hooks/layout.js.map +1 -1
  588. package/build/hooks/line-height.js +1 -2
  589. package/build/hooks/line-height.js.map +1 -1
  590. package/build/hooks/position.js +1 -2
  591. package/build/hooks/position.js.map +1 -1
  592. package/build/hooks/style.js +3 -8
  593. package/build/hooks/style.js.map +1 -1
  594. package/build/hooks/typography.js +4 -6
  595. package/build/hooks/typography.js.map +1 -1
  596. package/build/hooks/typography.native.js +3 -6
  597. package/build/hooks/typography.native.js.map +1 -1
  598. package/build/hooks/use-bindings-attributes.js +12 -11
  599. package/build/hooks/use-bindings-attributes.js.map +1 -1
  600. package/build/hooks/use-shadow-props.js +0 -15
  601. package/build/hooks/use-shadow-props.js.map +1 -1
  602. package/build/hooks/utils.js +3 -6
  603. package/build/hooks/utils.js.map +1 -1
  604. package/build/index.js +0 -7
  605. package/build/index.js.map +1 -1
  606. package/build/layouts/constrained.js +1 -2
  607. package/build/layouts/constrained.js.map +1 -1
  608. package/build/layouts/definitions.js +1 -2
  609. package/build/layouts/definitions.js.map +1 -1
  610. package/build/layouts/flex.js +1 -2
  611. package/build/layouts/flex.js.map +1 -1
  612. package/build/layouts/flow.js +1 -2
  613. package/build/layouts/flow.js.map +1 -1
  614. package/build/layouts/grid.js +1 -2
  615. package/build/layouts/grid.js.map +1 -1
  616. package/build/private-apis.js +8 -5
  617. package/build/private-apis.js.map +1 -1
  618. package/build/private-apis.native.js +3 -4
  619. package/build/private-apis.native.js.map +1 -1
  620. package/build/store/actions.js +2 -4
  621. package/build/store/actions.js.map +1 -1
  622. package/build/store/constants.js +1 -2
  623. package/build/store/constants.js.map +1 -1
  624. package/build/store/defaults.js +2 -4
  625. package/build/store/defaults.js.map +1 -1
  626. package/build/store/defaults.native.js +1 -2
  627. package/build/store/defaults.native.js.map +1 -1
  628. package/build/store/get-block-settings.js +180 -0
  629. package/build/store/get-block-settings.js.map +1 -0
  630. package/build/store/index.js +4 -6
  631. package/build/store/index.js.map +1 -1
  632. package/build/store/private-actions.js +37 -3
  633. package/build/store/private-actions.js.map +1 -1
  634. package/build/store/private-selectors.js +55 -29
  635. package/build/store/private-selectors.js.map +1 -1
  636. package/build/store/reducer.js +27 -6
  637. package/build/store/reducer.js.map +1 -1
  638. package/build/store/selectors.js +98 -102
  639. package/build/store/selectors.js.map +1 -1
  640. package/build/store/undo-ignore.js +1 -2
  641. package/build/store/undo-ignore.js.map +1 -1
  642. package/build/utils/object.js +0 -17
  643. package/build/utils/object.js.map +1 -1
  644. package/build/utils/selection.js +1 -2
  645. package/build/utils/selection.js.map +1 -1
  646. package/build/utils/transform-styles/index.js +3 -4
  647. package/build/utils/transform-styles/index.js.map +1 -1
  648. package/build-module/components/block-breadcrumb/index.js +0 -1
  649. package/build-module/components/block-breadcrumb/index.js.map +1 -1
  650. package/build-module/components/block-inspector/index.js +10 -7
  651. package/build-module/components/block-inspector/index.js.map +1 -1
  652. package/build-module/components/block-list/block.js +32 -20
  653. package/build-module/components/block-list/block.js.map +1 -1
  654. package/build-module/components/block-list/block.native.js +6 -4
  655. package/build-module/components/block-list/block.native.js.map +1 -1
  656. package/build-module/components/block-list/index.js +18 -7
  657. package/build-module/components/block-list/index.js.map +1 -1
  658. package/build-module/components/block-list/use-block-props/index.js +8 -1
  659. package/build-module/components/block-list/use-block-props/index.js.map +1 -1
  660. package/build-module/components/block-list-appender/index.js +5 -51
  661. package/build-module/components/block-list-appender/index.js.map +1 -1
  662. package/build-module/components/block-mover/mover-description.native.js +0 -2
  663. package/build-module/components/block-mover/mover-description.native.js.map +1 -1
  664. package/build-module/components/block-popover/inbetween.js +0 -1
  665. package/build-module/components/block-popover/inbetween.js.map +1 -1
  666. package/build-module/components/block-preview/auto.js +2 -1
  667. package/build-module/components/block-preview/auto.js.map +1 -1
  668. package/build-module/components/block-removal-warning-modal/index.js +4 -2
  669. package/build-module/components/block-removal-warning-modal/index.js.map +1 -1
  670. package/build-module/components/block-switcher/index.js +12 -9
  671. package/build-module/components/block-switcher/index.js.map +1 -1
  672. package/build-module/components/block-title/use-block-display-title.js +22 -28
  673. package/build-module/components/block-title/use-block-display-title.js.map +1 -1
  674. package/build-module/components/block-tools/block-selection-button.js +20 -17
  675. package/build-module/components/block-tools/block-selection-button.js.map +1 -1
  676. package/build-module/components/block-tools/index.js +2 -10
  677. package/build-module/components/block-tools/index.js.map +1 -1
  678. package/build-module/components/colors-gradients/control.js +0 -1
  679. package/build-module/components/colors-gradients/control.js.map +1 -1
  680. package/build-module/components/default-block-appender/index.js +30 -37
  681. package/build-module/components/default-block-appender/index.js.map +1 -1
  682. package/build-module/components/global-styles/border-panel.js +57 -9
  683. package/build-module/components/global-styles/border-panel.js.map +1 -1
  684. package/build-module/components/global-styles/get-global-styles-changes.js +2 -4
  685. package/build-module/components/global-styles/get-global-styles-changes.js.map +1 -1
  686. package/build-module/components/global-styles/hooks.js +2 -3
  687. package/build-module/components/global-styles/hooks.js.map +1 -1
  688. package/build-module/components/global-styles/index.js +0 -1
  689. package/build-module/components/global-styles/index.js.map +1 -1
  690. package/build-module/components/global-styles/shadow-panel-components.js +121 -0
  691. package/build-module/components/global-styles/shadow-panel-components.js.map +1 -0
  692. package/build-module/components/global-styles/typography-panel.js +17 -35
  693. package/build-module/components/global-styles/typography-panel.js.map +1 -1
  694. package/build-module/components/global-styles/use-global-styles-output.js +2 -2
  695. package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
  696. package/build-module/components/global-styles/utils.js +30 -1
  697. package/build-module/components/global-styles/utils.js.map +1 -1
  698. package/build-module/components/inner-blocks/index.js +33 -29
  699. package/build-module/components/inner-blocks/index.js.map +1 -1
  700. package/build-module/components/inner-blocks/index.native.js +1 -4
  701. package/build-module/components/inner-blocks/index.native.js.map +1 -1
  702. package/build-module/components/inner-blocks/use-inner-block-template-sync.js +2 -3
  703. package/build-module/components/inner-blocks/use-inner-block-template-sync.js.map +1 -1
  704. package/build-module/components/inserter/block-patterns-tab/patterns-filter.js +4 -4
  705. package/build-module/components/inserter/block-patterns-tab/patterns-filter.js.map +1 -1
  706. package/build-module/components/inserter/block-patterns-tab/utils.js +2 -2
  707. package/build-module/components/inserter/block-patterns-tab/utils.js.map +1 -1
  708. package/build-module/components/inserter/quick-inserter.js +3 -2
  709. package/build-module/components/inserter/quick-inserter.js.map +1 -1
  710. package/build-module/components/inserter/search-items.js +0 -1
  711. package/build-module/components/inserter/search-items.js.map +1 -1
  712. package/build-module/components/inserter-draggable-blocks/index.js +12 -1
  713. package/build-module/components/inserter-draggable-blocks/index.js.map +1 -1
  714. package/build-module/components/inspector-controls-tabs/styles-tab.js +5 -4
  715. package/build-module/components/inspector-controls-tabs/styles-tab.js.map +1 -1
  716. package/build-module/components/link-control/index.js +1 -14
  717. package/build-module/components/link-control/index.js.map +1 -1
  718. package/build-module/components/link-control/link-preview.js +16 -18
  719. package/build-module/components/link-control/link-preview.js.map +1 -1
  720. package/build-module/components/link-control/use-create-page.js +0 -1
  721. package/build-module/components/link-control/use-create-page.js.map +1 -1
  722. package/build-module/components/list-view/block.js +32 -26
  723. package/build-module/components/list-view/block.js.map +1 -1
  724. package/build-module/components/list-view/index.js +17 -11
  725. package/build-module/components/list-view/index.js.map +1 -1
  726. package/build-module/components/list-view/use-clipboard-handler.js +153 -0
  727. package/build-module/components/list-view/use-clipboard-handler.js.map +1 -0
  728. package/build-module/components/list-view/utils.js +4 -4
  729. package/build-module/components/list-view/utils.js.map +1 -1
  730. package/build-module/components/navigable-toolbar/index.js +5 -2
  731. package/build-module/components/navigable-toolbar/index.js.map +1 -1
  732. package/build-module/components/provider/index.js +1 -1
  733. package/build-module/components/provider/index.js.map +1 -1
  734. package/build-module/components/responsive-block-control/index.js +3 -6
  735. package/build-module/components/responsive-block-control/index.js.map +1 -1
  736. package/build-module/components/rich-text/index.js +4 -2
  737. package/build-module/components/rich-text/index.js.map +1 -1
  738. package/build-module/components/rich-text/native/index.native.js +0 -4
  739. package/build-module/components/rich-text/native/index.native.js.map +1 -1
  740. package/build-module/components/spacing-sizes-control/index.js +4 -2
  741. package/build-module/components/spacing-sizes-control/index.js.map +1 -1
  742. package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js +0 -1
  743. package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
  744. package/build-module/components/url-popover/image-url-input-ui.js +69 -38
  745. package/build-module/components/url-popover/image-url-input-ui.js.map +1 -1
  746. package/build-module/components/url-popover/index.js +8 -5
  747. package/build-module/components/url-popover/index.js.map +1 -1
  748. package/build-module/components/url-popover/link-editor.js +2 -1
  749. package/build-module/components/url-popover/link-editor.js.map +1 -1
  750. package/build-module/components/url-popover/link-viewer.js +2 -1
  751. package/build-module/components/url-popover/link-viewer.js.map +1 -1
  752. package/build-module/components/use-block-drop-zone/index.js +15 -5
  753. package/build-module/components/use-block-drop-zone/index.js.map +1 -1
  754. package/build-module/components/use-flash-editable-blocks/index.js +53 -0
  755. package/build-module/components/use-flash-editable-blocks/index.js.map +1 -0
  756. package/build-module/components/use-on-block-drop/index.js +4 -4
  757. package/build-module/components/use-on-block-drop/index.js.map +1 -1
  758. package/build-module/components/use-settings/index.js +3 -159
  759. package/build-module/components/use-settings/index.js.map +1 -1
  760. package/build-module/components/writing-flow/use-clipboard-handler.js +4 -49
  761. package/build-module/components/writing-flow/use-clipboard-handler.js.map +1 -1
  762. package/build-module/components/writing-flow/use-drag-selection.js +13 -2
  763. package/build-module/components/writing-flow/use-drag-selection.js.map +1 -1
  764. package/build-module/components/writing-flow/utils.js +79 -0
  765. package/build-module/components/writing-flow/utils.js.map +1 -0
  766. package/build-module/hooks/background.js +48 -10
  767. package/build-module/hooks/background.js.map +1 -1
  768. package/build-module/hooks/border.js +38 -3
  769. package/build-module/hooks/border.js.map +1 -1
  770. package/build-module/hooks/duotone.js +0 -1
  771. package/build-module/hooks/duotone.js.map +1 -1
  772. package/build-module/hooks/font-size.js +23 -27
  773. package/build-module/hooks/font-size.js.map +1 -1
  774. package/build-module/hooks/index.js +1 -1
  775. package/build-module/hooks/index.js.map +1 -1
  776. package/build-module/hooks/index.native.js +1 -1
  777. package/build-module/hooks/index.native.js.map +1 -1
  778. package/build-module/hooks/style.js +3 -7
  779. package/build-module/hooks/style.js.map +1 -1
  780. package/build-module/hooks/use-bindings-attributes.js +10 -13
  781. package/build-module/hooks/use-bindings-attributes.js.map +1 -1
  782. package/build-module/hooks/use-shadow-props.js +0 -14
  783. package/build-module/hooks/use-shadow-props.js.map +1 -1
  784. package/build-module/hooks/utils.js +3 -6
  785. package/build-module/hooks/utils.js.map +1 -1
  786. package/build-module/index.js +1 -1
  787. package/build-module/index.js.map +1 -1
  788. package/build-module/private-apis.js +5 -1
  789. package/build-module/private-apis.js.map +1 -1
  790. package/build-module/store/get-block-settings.js +171 -0
  791. package/build-module/store/get-block-settings.js.map +1 -0
  792. package/build-module/store/private-actions.js +35 -3
  793. package/build-module/store/private-actions.js.map +1 -1
  794. package/build-module/store/private-selectors.js +42 -19
  795. package/build-module/store/private-selectors.js.map +1 -1
  796. package/build-module/store/reducer.js +24 -2
  797. package/build-module/store/reducer.js.map +1 -1
  798. package/build-module/store/selectors.js +65 -34
  799. package/build-module/store/selectors.js.map +1 -1
  800. package/build-module/utils/object.js +0 -16
  801. package/build-module/utils/object.js.map +1 -1
  802. package/build-style/content-rtl.css +23 -15
  803. package/build-style/content.css +23 -15
  804. package/build-style/style-rtl.css +97 -67
  805. package/build-style/style.css +97 -67
  806. package/package.json +31 -31
  807. package/src/components/block-canvas/style.scss +3 -3
  808. package/src/components/block-card/style.scss +3 -1
  809. package/src/components/block-controls/README.md +2 -2
  810. package/src/components/block-inspector/index.js +11 -9
  811. package/src/components/block-list/block.js +45 -20
  812. package/src/components/block-list/block.native.js +7 -4
  813. package/src/components/block-list/content.scss +23 -28
  814. package/src/components/block-list/index.js +49 -25
  815. package/src/components/block-list/use-block-props/index.js +8 -0
  816. package/src/components/block-list-appender/index.js +7 -74
  817. package/src/components/block-mover/style.scss +4 -3
  818. package/src/components/block-preview/auto.js +2 -1
  819. package/src/components/block-removal-warning-modal/index.js +17 -10
  820. package/src/components/block-switcher/index.js +22 -13
  821. package/src/components/block-title/test/index.js +86 -85
  822. package/src/components/block-title/use-block-display-title.js +25 -36
  823. package/src/components/block-toolbar/style.scss +8 -1
  824. package/src/components/block-tools/block-selection-button.js +23 -26
  825. package/src/components/block-tools/index.js +2 -12
  826. package/src/components/colors-gradients/control.js +0 -1
  827. package/src/components/default-block-appender/index.js +26 -38
  828. package/src/components/default-block-appender/test/index.js +24 -16
  829. package/src/components/font-sizes/README.MD +0 -9
  830. package/src/components/global-styles/border-panel.js +72 -1
  831. package/src/components/global-styles/get-global-styles-changes.js +2 -8
  832. package/src/components/global-styles/hooks.js +0 -2
  833. package/src/components/global-styles/index.js +0 -1
  834. package/src/components/global-styles/shadow-panel-components.js +125 -0
  835. package/src/components/global-styles/style.scss +8 -9
  836. package/src/components/global-styles/test/get-global-styles-changes.js +3 -3
  837. package/src/components/global-styles/test/use-global-styles-output.js +1 -1
  838. package/src/components/global-styles/test/utils.js +86 -0
  839. package/src/components/global-styles/typography-panel.js +14 -47
  840. package/src/components/global-styles/use-global-styles-output.js +5 -1
  841. package/src/components/global-styles/utils.js +36 -0
  842. package/src/components/inner-blocks/index.js +31 -32
  843. package/src/components/inner-blocks/index.native.js +3 -9
  844. package/src/components/inner-blocks/use-inner-block-template-sync.js +1 -3
  845. package/src/components/inserter/block-patterns-tab/patterns-filter.js +4 -10
  846. package/src/components/inserter/block-patterns-tab/utils.js +2 -2
  847. package/src/components/inserter/quick-inserter.js +4 -2
  848. package/src/components/inserter/style.scss +3 -13
  849. package/src/components/inserter-draggable-blocks/index.js +12 -1
  850. package/src/components/inspector-controls-tabs/styles-tab.js +4 -2
  851. package/src/components/link-control/index.js +1 -20
  852. package/src/components/link-control/link-preview.js +19 -24
  853. package/src/components/link-control/style.scss +5 -11
  854. package/src/components/link-control/test/index.js +11 -90
  855. package/src/components/list-view/block.js +49 -41
  856. package/src/components/list-view/index.js +22 -9
  857. package/src/components/list-view/use-clipboard-handler.js +199 -0
  858. package/src/components/list-view/utils.js +4 -4
  859. package/src/components/media-replace-flow/test/index.js +1 -1
  860. package/src/components/navigable-toolbar/index.js +8 -4
  861. package/src/components/provider/index.js +1 -1
  862. package/src/components/responsive-block-control/index.js +3 -5
  863. package/src/components/rich-text/index.js +4 -3
  864. package/src/components/spacing-sizes-control/index.js +2 -1
  865. package/src/components/url-input/style.scss +4 -2
  866. package/src/components/url-popover/image-url-input-ui.js +98 -37
  867. package/src/components/url-popover/index.js +75 -67
  868. package/src/components/url-popover/link-editor.js +1 -0
  869. package/src/components/url-popover/link-viewer.js +1 -0
  870. package/src/components/url-popover/style.scss +42 -31
  871. package/src/components/use-block-drop-zone/index.js +17 -3
  872. package/src/components/use-flash-editable-blocks/index.js +62 -0
  873. package/src/components/use-on-block-drop/index.js +11 -4
  874. package/src/components/use-settings/index.js +9 -232
  875. package/src/components/writing-flow/use-clipboard-handler.js +6 -78
  876. package/src/components/writing-flow/use-drag-selection.js +12 -3
  877. package/src/components/writing-flow/utils.js +103 -0
  878. package/src/hooks/background.js +53 -8
  879. package/src/hooks/border.js +47 -6
  880. package/src/hooks/font-size.js +33 -33
  881. package/src/hooks/index.js +1 -1
  882. package/src/hooks/index.native.js +1 -1
  883. package/src/hooks/style.js +5 -9
  884. package/src/hooks/test/background.js +50 -0
  885. package/src/hooks/test/font-size.js +164 -0
  886. package/src/hooks/use-bindings-attributes.js +10 -23
  887. package/src/hooks/use-shadow-props.js +0 -14
  888. package/src/hooks/utils.js +4 -16
  889. package/src/index.js +0 -1
  890. package/src/private-apis.js +4 -0
  891. package/src/store/get-block-settings.js +225 -0
  892. package/src/store/private-actions.js +44 -2
  893. package/src/store/private-selectors.js +53 -38
  894. package/src/store/reducer.js +29 -1
  895. package/src/store/selectors.js +74 -48
  896. package/src/store/test/get-block-settings.js +90 -0
  897. package/src/store/test/private-actions.js +18 -0
  898. package/src/store/test/private-selectors.js +19 -0
  899. package/src/store/test/reducer.js +19 -0
  900. package/src/utils/object.js +0 -16
  901. package/build/components/global-styles/effects-panel.js +0 -219
  902. package/build/components/global-styles/effects-panel.js.map +0 -1
  903. package/build/hooks/effects.js +0 -66
  904. package/build/hooks/effects.js.map +0 -1
  905. package/build-module/components/global-styles/effects-panel.js +0 -210
  906. package/build-module/components/global-styles/effects-panel.js.map +0 -1
  907. package/build-module/hooks/effects.js +0 -51
  908. package/build-module/hooks/effects.js.map +0 -1
  909. package/src/components/global-styles/effects-panel.js +0 -244
  910. package/src/components/use-settings/test/index.js +0 -141
  911. package/src/hooks/effects.js +0 -57
  912. package/src/hooks/test/effects.js +0 -39
@@ -58,6 +58,5 @@ function Grid(props) {
58
58
  }, _blockListItem.default.gridItem]
59
59
  }, children);
60
60
  }
61
- var _default = Grid;
62
- exports.default = _default;
61
+ var _default = exports.default = Grid;
63
62
  //# sourceMappingURL=grid-item.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNative","require","_blockListItem","_interopRequireDefault","Grid","props","numOfColumns","children","tileCount","index","maxWidth","lastTile","lastRow","Math","floor","row","rowLength","_react","createElement","View","style","width","styles","gridItem","_default","exports","default"],"sources":["@wordpress/block-editor/src/components/block-list/grid-item.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { View } from 'react-native';\n\n/**\n * Internal dependencies\n */\nimport styles from './block-list-item.scss';\n\nfunction Grid( props ) {\n\t/**\n\t * Since we don't have `calc()`, we must calculate our spacings here in\n\t * order to preserve even spacing between tiles and equal width for tiles\n\t * in a given row.\n\t *\n\t * In order to ensure equal sizing of tile contents, we distribute the\n\t * spacing such that each tile has an equal \"share\" of the fixed spacing. To\n\t * keep the tiles properly aligned within their rows, we calculate the left\n\t * and right paddings based on the tile's relative position within the row.\n\t *\n\t * Note: we use padding instead of margins so that the fixed spacing is\n\t * included within the relative spacing (i.e. width percentage), and\n\t * wrapping behavior is preserved.\n\t *\n\t * - The left most tile in a row must have left padding of zero.\n\t * - The right most tile in a row must have a right padding of zero.\n\t *\n\t * The values of these left and right paddings are interpolated for tiles in\n\t * between. The right padding is complementary with the left padding of the\n\t * next tile (i.e. the right padding of [tile n] + the left padding of\n\t * [tile n + 1] will be equal for all tiles except the last one in a given\n\t * row).\n\t *\n\t */\n\tconst { numOfColumns, children, tileCount, index, maxWidth } = props;\n\tconst lastTile = tileCount - 1;\n\tconst lastRow = Math.floor( lastTile / numOfColumns );\n\n\tconst row = Math.floor( index / numOfColumns );\n\tconst rowLength =\n\t\trow === lastRow ? ( lastTile % numOfColumns ) + 1 : numOfColumns;\n\n\treturn (\n\t\t<View\n\t\t\tstyle={ [\n\t\t\t\t{\n\t\t\t\t\twidth: maxWidth / rowLength,\n\t\t\t\t},\n\t\t\t\tstyles.gridItem,\n\t\t\t] }\n\t\t>\n\t\t\t{ children }\n\t\t</View>\n\t);\n}\n\nexport default Grid;\n"],"mappings":";;;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAKA,IAAAC,cAAA,GAAAC,sBAAA,CAAAF,OAAA;AARA;AACA;AACA;;AAGA;AACA;AACA;;AAGA,SAASG,IAAIA,CAAEC,KAAK,EAAG;EACtB;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACC,MAAM;IAAEC,YAAY;IAAEC,QAAQ;IAAEC,SAAS;IAAEC,KAAK;IAAEC;EAAS,CAAC,GAAGL,KAAK;EACpE,MAAMM,QAAQ,GAAGH,SAAS,GAAG,CAAC;EAC9B,MAAMI,OAAO,GAAGC,IAAI,CAACC,KAAK,CAAEH,QAAQ,GAAGL,YAAa,CAAC;EAErD,MAAMS,GAAG,GAAGF,IAAI,CAACC,KAAK,CAAEL,KAAK,GAAGH,YAAa,CAAC;EAC9C,MAAMU,SAAS,GACdD,GAAG,KAAKH,OAAO,GAAKD,QAAQ,GAAGL,YAAY,GAAK,CAAC,GAAGA,YAAY;EAEjE,OACC,IAAAW,MAAA,CAAAC,aAAA,EAAClB,YAAA,CAAAmB,IAAI;IACJC,KAAK,EAAG,CACP;MACCC,KAAK,EAAEX,QAAQ,GAAGM;IACnB,CAAC,EACDM,sBAAM,CAACC,QAAQ;EACb,GAEDhB,QACG,CAAC;AAET;AAAC,IAAAiB,QAAA,GAEcpB,IAAI;AAAAqB,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
1
+ {"version":3,"names":["_reactNative","require","_blockListItem","_interopRequireDefault","Grid","props","numOfColumns","children","tileCount","index","maxWidth","lastTile","lastRow","Math","floor","row","rowLength","_react","createElement","View","style","width","styles","gridItem","_default","exports","default"],"sources":["@wordpress/block-editor/src/components/block-list/grid-item.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { View } from 'react-native';\n\n/**\n * Internal dependencies\n */\nimport styles from './block-list-item.scss';\n\nfunction Grid( props ) {\n\t/**\n\t * Since we don't have `calc()`, we must calculate our spacings here in\n\t * order to preserve even spacing between tiles and equal width for tiles\n\t * in a given row.\n\t *\n\t * In order to ensure equal sizing of tile contents, we distribute the\n\t * spacing such that each tile has an equal \"share\" of the fixed spacing. To\n\t * keep the tiles properly aligned within their rows, we calculate the left\n\t * and right paddings based on the tile's relative position within the row.\n\t *\n\t * Note: we use padding instead of margins so that the fixed spacing is\n\t * included within the relative spacing (i.e. width percentage), and\n\t * wrapping behavior is preserved.\n\t *\n\t * - The left most tile in a row must have left padding of zero.\n\t * - The right most tile in a row must have a right padding of zero.\n\t *\n\t * The values of these left and right paddings are interpolated for tiles in\n\t * between. The right padding is complementary with the left padding of the\n\t * next tile (i.e. the right padding of [tile n] + the left padding of\n\t * [tile n + 1] will be equal for all tiles except the last one in a given\n\t * row).\n\t *\n\t */\n\tconst { numOfColumns, children, tileCount, index, maxWidth } = props;\n\tconst lastTile = tileCount - 1;\n\tconst lastRow = Math.floor( lastTile / numOfColumns );\n\n\tconst row = Math.floor( index / numOfColumns );\n\tconst rowLength =\n\t\trow === lastRow ? ( lastTile % numOfColumns ) + 1 : numOfColumns;\n\n\treturn (\n\t\t<View\n\t\t\tstyle={ [\n\t\t\t\t{\n\t\t\t\t\twidth: maxWidth / rowLength,\n\t\t\t\t},\n\t\t\t\tstyles.gridItem,\n\t\t\t] }\n\t\t>\n\t\t\t{ children }\n\t\t</View>\n\t);\n}\n\nexport default Grid;\n"],"mappings":";;;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAKA,IAAAC,cAAA,GAAAC,sBAAA,CAAAF,OAAA;AARA;AACA;AACA;;AAGA;AACA;AACA;;AAGA,SAASG,IAAIA,CAAEC,KAAK,EAAG;EACtB;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACC,MAAM;IAAEC,YAAY;IAAEC,QAAQ;IAAEC,SAAS;IAAEC,KAAK;IAAEC;EAAS,CAAC,GAAGL,KAAK;EACpE,MAAMM,QAAQ,GAAGH,SAAS,GAAG,CAAC;EAC9B,MAAMI,OAAO,GAAGC,IAAI,CAACC,KAAK,CAAEH,QAAQ,GAAGL,YAAa,CAAC;EAErD,MAAMS,GAAG,GAAGF,IAAI,CAACC,KAAK,CAAEL,KAAK,GAAGH,YAAa,CAAC;EAC9C,MAAMU,SAAS,GACdD,GAAG,KAAKH,OAAO,GAAKD,QAAQ,GAAGL,YAAY,GAAK,CAAC,GAAGA,YAAY;EAEjE,OACC,IAAAW,MAAA,CAAAC,aAAA,EAAClB,YAAA,CAAAmB,IAAI;IACJC,KAAK,EAAG,CACP;MACCC,KAAK,EAAEX,QAAQ,GAAGM;IACnB,CAAC,EACDM,sBAAM,CAACC,QAAQ;EACb,GAEDhB,QACG,CAAC;AAET;AAAC,IAAAiB,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEctB,IAAI"}
@@ -34,8 +34,7 @@ var _lockUnlock = require("../../lock-unlock");
34
34
  * Internal dependencies
35
35
  */
36
36
 
37
- const IntersectionObserver = (0, _element.createContext)();
38
- exports.IntersectionObserver = IntersectionObserver;
37
+ const IntersectionObserver = exports.IntersectionObserver = (0, _element.createContext)();
39
38
  const pendingBlockVisibilityUpdatesPerRegistry = new WeakMap();
40
39
  function Root({
41
40
  className,
@@ -136,29 +135,40 @@ function BlockList(settings) {
136
135
  function Items({
137
136
  placeholder,
138
137
  rootClientId,
139
- renderAppender,
138
+ renderAppender: CustomAppender,
140
139
  __experimentalAppenderTagName,
141
140
  layout = _layout.defaultLayout
142
141
  }) {
142
+ // Avoid passing CustomAppender to useSelect because it could be a new
143
+ // function on every render.
144
+ const hasAppender = CustomAppender !== false;
145
+ const hasCustomAppender = !!CustomAppender;
143
146
  const {
144
147
  order,
145
148
  selectedBlocks,
146
149
  visibleBlocks,
147
- temporarilyEditingAsBlocks
150
+ temporarilyEditingAsBlocks,
151
+ shouldRenderAppender
148
152
  } = (0, _data.useSelect)(select => {
149
153
  const {
150
154
  getBlockOrder,
155
+ getSelectedBlockClientId,
151
156
  getSelectedBlockClientIds,
152
157
  __unstableGetVisibleBlocks,
153
- __unstableGetTemporarilyEditingAsBlocks
158
+ __unstableGetTemporarilyEditingAsBlocks,
159
+ getTemplateLock,
160
+ getBlockEditingMode,
161
+ __unstableGetEditorMode
154
162
  } = select(_store.store);
163
+ const selectedBlockClientId = getSelectedBlockClientId();
155
164
  return {
156
165
  order: getBlockOrder(rootClientId),
157
166
  selectedBlocks: getSelectedBlockClientIds(),
158
167
  visibleBlocks: __unstableGetVisibleBlocks(),
159
- temporarilyEditingAsBlocks: __unstableGetTemporarilyEditingAsBlocks()
168
+ temporarilyEditingAsBlocks: __unstableGetTemporarilyEditingAsBlocks(),
169
+ shouldRenderAppender: hasAppender && (hasCustomAppender ? !getTemplateLock(rootClientId) && getBlockEditingMode(rootClientId) !== 'disabled' && __unstableGetEditorMode() !== 'zoom-out' : rootClientId === selectedBlockClientId || !rootClientId && !selectedBlockClientId)
160
170
  };
161
- }, [rootClientId]);
171
+ }, [rootClientId, hasAppender, hasCustomAppender]);
162
172
  return (0, _react.createElement)(_layout.LayoutProvider, {
163
173
  value: layout
164
174
  }, order.map(clientId => (0, _react.createElement)(_data.AsyncModeProvider, {
@@ -172,10 +182,10 @@ function Items({
172
182
  clientId: clientId
173
183
  }))), order.length < 1 && placeholder, !!temporarilyEditingAsBlocks && (0, _react.createElement)(StopEditingAsBlocksOnOutsideSelect, {
174
184
  clientId: temporarilyEditingAsBlocks
175
- }), (0, _react.createElement)(_blockListAppender.default, {
185
+ }), shouldRenderAppender && (0, _react.createElement)(_blockListAppender.default, {
176
186
  tagName: __experimentalAppenderTagName,
177
187
  rootClientId: rootClientId,
178
- renderAppender: renderAppender
188
+ CustomAppender: CustomAppender
179
189
  }));
180
190
  }
181
191
  function BlockListItems(props) {
@@ -1 +1 @@
1
- {"version":3,"names":["_classnames","_interopRequireDefault","require","_data","_compose","_element","_block","_blockListAppender","_useInBetweenInserter","_store","_layout","_blockSelectionClearer","_innerBlocks","_context","_observeTyping","_lockUnlock","IntersectionObserver","createContext","exports","pendingBlockVisibilityUpdatesPerRegistry","WeakMap","Root","className","settings","isLargeViewport","useViewportMatch","isOutlineMode","isFocusMode","editorMode","useSelect","select","getSettings","__unstableGetEditorMode","blockEditorStore","outlineMode","focusMode","registry","useRegistry","setBlockVisibility","useDispatch","delayedBlockVisibilityUpdates","useDebounce","useCallback","updates","get","forEach","id","isIntersecting","trailing","intersectionObserver","useMemo","Observer","window","entries","set","entry","clientId","target","getAttribute","push","innerBlocksProps","useInnerBlocksProps","ref","useMergeRefs","useBlockSelectionClearer","useInBetweenInserter","useTypingObserver","classnames","_react","createElement","Provider","value","StopEditingAsBlocksOnOutsideSelect","stopEditingAsBlocks","unlock","isBlockOrDescendantSelected","isBlockSelected","hasSelectedInnerBlock","useEffect","BlockList","BlockEditContextProvider","DEFAULT_BLOCK_EDIT_CONTEXT","Items","placeholder","rootClientId","renderAppender","__experimentalAppenderTagName","layout","defaultLayout","order","selectedBlocks","visibleBlocks","temporarilyEditingAsBlocks","getBlockOrder","getSelectedBlockClientIds","__unstableGetVisibleBlocks","__unstableGetTemporarilyEditingAsBlocks","LayoutProvider","map","AsyncModeProvider","key","has","includes","default","length","tagName","BlockListItems","props"],"sources":["@wordpress/block-editor/src/components/block-list/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tAsyncModeProvider,\n\tuseSelect,\n\tuseDispatch,\n\tuseRegistry,\n} from '@wordpress/data';\nimport {\n\tuseViewportMatch,\n\tuseMergeRefs,\n\tuseDebounce,\n} from '@wordpress/compose';\nimport {\n\tcreateContext,\n\tuseMemo,\n\tuseCallback,\n\tuseEffect,\n} from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport BlockListBlock from './block';\nimport BlockListAppender from '../block-list-appender';\nimport { useInBetweenInserter } from './use-in-between-inserter';\nimport { store as blockEditorStore } from '../../store';\nimport { LayoutProvider, defaultLayout } from './layout';\nimport { useBlockSelectionClearer } from '../block-selection-clearer';\nimport { useInnerBlocksProps } from '../inner-blocks';\nimport {\n\tBlockEditContextProvider,\n\tDEFAULT_BLOCK_EDIT_CONTEXT,\n} from '../block-edit/context';\nimport { useTypingObserver } from '../observe-typing';\nimport { unlock } from '../../lock-unlock';\n\nexport const IntersectionObserver = createContext();\nconst pendingBlockVisibilityUpdatesPerRegistry = new WeakMap();\n\nfunction Root( { className, ...settings } ) {\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tconst { isOutlineMode, isFocusMode, editorMode } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getSettings, __unstableGetEditorMode } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst { outlineMode, focusMode } = getSettings();\n\t\t\treturn {\n\t\t\t\tisOutlineMode: outlineMode,\n\t\t\t\tisFocusMode: focusMode,\n\t\t\t\teditorMode: __unstableGetEditorMode(),\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\tconst registry = useRegistry();\n\tconst { setBlockVisibility } = useDispatch( blockEditorStore );\n\n\tconst delayedBlockVisibilityUpdates = useDebounce(\n\t\tuseCallback( () => {\n\t\t\tconst updates = {};\n\t\t\tpendingBlockVisibilityUpdatesPerRegistry\n\t\t\t\t.get( registry )\n\t\t\t\t.forEach( ( [ id, isIntersecting ] ) => {\n\t\t\t\t\tupdates[ id ] = isIntersecting;\n\t\t\t\t} );\n\t\t\tsetBlockVisibility( updates );\n\t\t}, [ registry ] ),\n\t\t300,\n\t\t{\n\t\t\ttrailing: true,\n\t\t}\n\t);\n\tconst intersectionObserver = useMemo( () => {\n\t\tconst { IntersectionObserver: Observer } = window;\n\n\t\tif ( ! Observer ) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn new Observer( ( entries ) => {\n\t\t\tif ( ! pendingBlockVisibilityUpdatesPerRegistry.get( registry ) ) {\n\t\t\t\tpendingBlockVisibilityUpdatesPerRegistry.set( registry, [] );\n\t\t\t}\n\t\t\tfor ( const entry of entries ) {\n\t\t\t\tconst clientId = entry.target.getAttribute( 'data-block' );\n\t\t\t\tpendingBlockVisibilityUpdatesPerRegistry\n\t\t\t\t\t.get( registry )\n\t\t\t\t\t.push( [ clientId, entry.isIntersecting ] );\n\t\t\t}\n\t\t\tdelayedBlockVisibilityUpdates();\n\t\t} );\n\t}, [] );\n\tconst innerBlocksProps = useInnerBlocksProps(\n\t\t{\n\t\t\tref: useMergeRefs( [\n\t\t\t\tuseBlockSelectionClearer(),\n\t\t\t\tuseInBetweenInserter(),\n\t\t\t\tuseTypingObserver(),\n\t\t\t] ),\n\t\t\tclassName: classnames( 'is-root-container', className, {\n\t\t\t\t'is-outline-mode': isOutlineMode,\n\t\t\t\t'is-focus-mode': isFocusMode && isLargeViewport,\n\t\t\t\t'is-navigate-mode': editorMode === 'navigation',\n\t\t\t} ),\n\t\t},\n\t\tsettings\n\t);\n\treturn (\n\t\t<IntersectionObserver.Provider value={ intersectionObserver }>\n\t\t\t<div { ...innerBlocksProps } />\n\t\t</IntersectionObserver.Provider>\n\t);\n}\n\nfunction StopEditingAsBlocksOnOutsideSelect( { clientId } ) {\n\tconst { stopEditingAsBlocks } = unlock( useDispatch( blockEditorStore ) );\n\tconst isBlockOrDescendantSelected = useSelect(\n\t\t( select ) => {\n\t\t\tconst { isBlockSelected, hasSelectedInnerBlock } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\treturn (\n\t\t\t\tisBlockSelected( clientId ) ||\n\t\t\t\thasSelectedInnerBlock( clientId, true )\n\t\t\t);\n\t\t},\n\t\t[ clientId ]\n\t);\n\tuseEffect( () => {\n\t\tif ( ! isBlockOrDescendantSelected ) {\n\t\t\tstopEditingAsBlocks( clientId );\n\t\t}\n\t}, [ isBlockOrDescendantSelected, clientId, stopEditingAsBlocks ] );\n\treturn null;\n}\n\nexport default function BlockList( settings ) {\n\treturn (\n\t\t<BlockEditContextProvider value={ DEFAULT_BLOCK_EDIT_CONTEXT }>\n\t\t\t<Root { ...settings } />\n\t\t</BlockEditContextProvider>\n\t);\n}\n\nfunction Items( {\n\tplaceholder,\n\trootClientId,\n\trenderAppender,\n\t__experimentalAppenderTagName,\n\tlayout = defaultLayout,\n} ) {\n\tconst { order, selectedBlocks, visibleBlocks, temporarilyEditingAsBlocks } =\n\t\tuseSelect(\n\t\t\t( select ) => {\n\t\t\t\tconst {\n\t\t\t\t\tgetBlockOrder,\n\t\t\t\t\tgetSelectedBlockClientIds,\n\t\t\t\t\t__unstableGetVisibleBlocks,\n\t\t\t\t\t__unstableGetTemporarilyEditingAsBlocks,\n\t\t\t\t} = select( blockEditorStore );\n\t\t\t\treturn {\n\t\t\t\t\torder: getBlockOrder( rootClientId ),\n\t\t\t\t\tselectedBlocks: getSelectedBlockClientIds(),\n\t\t\t\t\tvisibleBlocks: __unstableGetVisibleBlocks(),\n\t\t\t\t\ttemporarilyEditingAsBlocks:\n\t\t\t\t\t\t__unstableGetTemporarilyEditingAsBlocks(),\n\t\t\t\t};\n\t\t\t},\n\t\t\t[ rootClientId ]\n\t\t);\n\n\treturn (\n\t\t<LayoutProvider value={ layout }>\n\t\t\t{ order.map( ( clientId ) => (\n\t\t\t\t<AsyncModeProvider\n\t\t\t\t\tkey={ clientId }\n\t\t\t\t\tvalue={\n\t\t\t\t\t\t// Only provide data asynchronously if the block is\n\t\t\t\t\t\t// not visible and not selected.\n\t\t\t\t\t\t! visibleBlocks.has( clientId ) &&\n\t\t\t\t\t\t! selectedBlocks.includes( clientId )\n\t\t\t\t\t}\n\t\t\t\t>\n\t\t\t\t\t<BlockListBlock\n\t\t\t\t\t\trootClientId={ rootClientId }\n\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t/>\n\t\t\t\t</AsyncModeProvider>\n\t\t\t) ) }\n\t\t\t{ order.length < 1 && placeholder }\n\t\t\t{ !! temporarilyEditingAsBlocks && (\n\t\t\t\t<StopEditingAsBlocksOnOutsideSelect\n\t\t\t\t\tclientId={ temporarilyEditingAsBlocks }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t<BlockListAppender\n\t\t\t\ttagName={ __experimentalAppenderTagName }\n\t\t\t\trootClientId={ rootClientId }\n\t\t\t\trenderAppender={ renderAppender }\n\t\t\t/>\n\t\t</LayoutProvider>\n\t);\n}\n\nexport function BlockListItems( props ) {\n\t// This component needs to always be synchronous as it's the one changing\n\t// the async mode depending on the block selection.\n\treturn (\n\t\t<AsyncModeProvider value={ false }>\n\t\t\t<Items { ...props } />\n\t\t</AsyncModeProvider>\n\t);\n}\n"],"mappings":";;;;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,KAAA,GAAAD,OAAA;AAMA,IAAAE,QAAA,GAAAF,OAAA;AAKA,IAAAG,QAAA,GAAAH,OAAA;AAUA,IAAAI,MAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,kBAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,qBAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,OA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c;IAC7BC,cAAc,EAAGA;EAAgB,CACjC,CACc,CAAC;AAEnB;AAEO,SAASqB,cAAcA,CAAEC,KAAK,EAAG;EACvC;EACA;EACA,OACC,IAAAvC,MAAA,CAAAC,aAAA,EAAClE,KAAA,CAAAgG,iBAAiB;IAAC5B,KAAK,EAAG;EAAO,GACjC,IAAAH,MAAA,CAAAC,aAAA,EAACa,KAAK;IAAA,GAAMyB;EAAK,CAAI,CACH,CAAC;AAEtB"}
1
+ {"version":3,"names":["_classnames","_interopRequireDefault","require","_data","_compose","_element","_block","_blockListAppender","_useInBetweenInserter","_store","_layout","_blockSelectionClearer","_innerBlocks","_context","_observeTyping","_lockUnlock","IntersectionObserver","exports","createContext","pendingBlockVisibilityUpdatesPerRegistry","WeakMap","Root","className","settings","isLargeViewport","useViewportMatch","isOutlineMode","isFocusMode","editorMode","useSelect","select","getSettings","__unstableGetEditorMode","blockEditorStore","outlineMode","focusMode","registry","useRegistry","setBlockVisibility","useDispatch","delayedBlockVisibilityUpdates","useDebounce","useCallback","updates","get","forEach","id","isIntersecting","trailing","intersectionObserver","useMemo","Observer","window","entries","set","entry","clientId","target","getAttribute","push","innerBlocksProps","useInnerBlocksProps","ref","useMergeRefs","useBlockSelectionClearer","useInBetweenInserter","useTypingObserver","classnames","_react","createElement","Provider","value","StopEditingAsBlocksOnOutsideSelect","stopEditingAsBlocks","unlock","isBlockOrDescendantSelected","isBlockSelected","hasSelectedInnerBlock","useEffect","BlockList","BlockEditContextProvider","DEFAULT_BLOCK_EDIT_CONTEXT","Items","placeholder","rootClientId","renderAppender","CustomAppender","__experimentalAppenderTagName","layout","defaultLayout","hasAppender","hasCustomAppender","order","selectedBlocks","visibleBlocks","temporarilyEditingAsBlocks","shouldRenderAppender","getBlockOrder","getSelectedBlockClientId","getSelectedBlockClientIds","__unstableGetVisibleBlocks","__unstableGetTemporarilyEditingAsBlocks","getTemplateLock","getBlockEditingMode","selectedBlockClientId","LayoutProvider","map","AsyncModeProvider","key","has","includes","default","length","tagName","BlockListItems","props"],"sources":["@wordpress/block-editor/src/components/block-list/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tAsyncModeProvider,\n\tuseSelect,\n\tuseDispatch,\n\tuseRegistry,\n} from '@wordpress/data';\nimport {\n\tuseViewportMatch,\n\tuseMergeRefs,\n\tuseDebounce,\n} from '@wordpress/compose';\nimport {\n\tcreateContext,\n\tuseMemo,\n\tuseCallback,\n\tuseEffect,\n} from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport BlockListBlock from './block';\nimport BlockListAppender from '../block-list-appender';\nimport { useInBetweenInserter } from './use-in-between-inserter';\nimport { store as blockEditorStore } from '../../store';\nimport { LayoutProvider, defaultLayout } from './layout';\nimport { useBlockSelectionClearer } from '../block-selection-clearer';\nimport { useInnerBlocksProps } from '../inner-blocks';\nimport {\n\tBlockEditContextProvider,\n\tDEFAULT_BLOCK_EDIT_CONTEXT,\n} from '../block-edit/context';\nimport { useTypingObserver } from '../observe-typing';\nimport { unlock } from '../../lock-unlock';\n\nexport const IntersectionObserver = createContext();\nconst pendingBlockVisibilityUpdatesPerRegistry = new WeakMap();\n\nfunction Root( { className, ...settings } ) {\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tconst { isOutlineMode, isFocusMode, editorMode } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getSettings, __unstableGetEditorMode } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst { outlineMode, focusMode } = getSettings();\n\t\t\treturn {\n\t\t\t\tisOutlineMode: outlineMode,\n\t\t\t\tisFocusMode: focusMode,\n\t\t\t\teditorMode: __unstableGetEditorMode(),\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\tconst registry = useRegistry();\n\tconst { setBlockVisibility } = useDispatch( blockEditorStore );\n\n\tconst delayedBlockVisibilityUpdates = useDebounce(\n\t\tuseCallback( () => {\n\t\t\tconst updates = {};\n\t\t\tpendingBlockVisibilityUpdatesPerRegistry\n\t\t\t\t.get( registry )\n\t\t\t\t.forEach( ( [ id, isIntersecting ] ) => {\n\t\t\t\t\tupdates[ id ] = isIntersecting;\n\t\t\t\t} );\n\t\t\tsetBlockVisibility( updates );\n\t\t}, [ registry ] ),\n\t\t300,\n\t\t{\n\t\t\ttrailing: true,\n\t\t}\n\t);\n\tconst intersectionObserver = useMemo( () => {\n\t\tconst { IntersectionObserver: Observer } = window;\n\n\t\tif ( ! Observer ) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn new Observer( ( entries ) => {\n\t\t\tif ( ! pendingBlockVisibilityUpdatesPerRegistry.get( registry ) ) {\n\t\t\t\tpendingBlockVisibilityUpdatesPerRegistry.set( registry, [] );\n\t\t\t}\n\t\t\tfor ( const entry of entries ) {\n\t\t\t\tconst clientId = entry.target.getAttribute( 'data-block' );\n\t\t\t\tpendingBlockVisibilityUpdatesPerRegistry\n\t\t\t\t\t.get( registry )\n\t\t\t\t\t.push( [ clientId, entry.isIntersecting ] );\n\t\t\t}\n\t\t\tdelayedBlockVisibilityUpdates();\n\t\t} );\n\t}, [] );\n\tconst innerBlocksProps = useInnerBlocksProps(\n\t\t{\n\t\t\tref: useMergeRefs( [\n\t\t\t\tuseBlockSelectionClearer(),\n\t\t\t\tuseInBetweenInserter(),\n\t\t\t\tuseTypingObserver(),\n\t\t\t] ),\n\t\t\tclassName: classnames( 'is-root-container', className, {\n\t\t\t\t'is-outline-mode': isOutlineMode,\n\t\t\t\t'is-focus-mode': isFocusMode && isLargeViewport,\n\t\t\t\t'is-navigate-mode': editorMode === 'navigation',\n\t\t\t} ),\n\t\t},\n\t\tsettings\n\t);\n\treturn (\n\t\t<IntersectionObserver.Provider value={ intersectionObserver }>\n\t\t\t<div { ...innerBlocksProps } />\n\t\t</IntersectionObserver.Provider>\n\t);\n}\n\nfunction StopEditingAsBlocksOnOutsideSelect( { clientId } ) {\n\tconst { stopEditingAsBlocks } = unlock( useDispatch( blockEditorStore ) );\n\tconst isBlockOrDescendantSelected = useSelect(\n\t\t( select ) => {\n\t\t\tconst { isBlockSelected, hasSelectedInnerBlock } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\treturn (\n\t\t\t\tisBlockSelected( clientId ) ||\n\t\t\t\thasSelectedInnerBlock( clientId, true )\n\t\t\t);\n\t\t},\n\t\t[ clientId ]\n\t);\n\tuseEffect( () => {\n\t\tif ( ! isBlockOrDescendantSelected ) {\n\t\t\tstopEditingAsBlocks( clientId );\n\t\t}\n\t}, [ isBlockOrDescendantSelected, clientId, stopEditingAsBlocks ] );\n\treturn null;\n}\n\nexport default function BlockList( settings ) {\n\treturn (\n\t\t<BlockEditContextProvider value={ DEFAULT_BLOCK_EDIT_CONTEXT }>\n\t\t\t<Root { ...settings } />\n\t\t</BlockEditContextProvider>\n\t);\n}\n\nfunction Items( {\n\tplaceholder,\n\trootClientId,\n\trenderAppender: CustomAppender,\n\t__experimentalAppenderTagName,\n\tlayout = defaultLayout,\n} ) {\n\t// Avoid passing CustomAppender to useSelect because it could be a new\n\t// function on every render.\n\tconst hasAppender = CustomAppender !== false;\n\tconst hasCustomAppender = !! CustomAppender;\n\tconst {\n\t\torder,\n\t\tselectedBlocks,\n\t\tvisibleBlocks,\n\t\ttemporarilyEditingAsBlocks,\n\t\tshouldRenderAppender,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlockOrder,\n\t\t\t\tgetSelectedBlockClientId,\n\t\t\t\tgetSelectedBlockClientIds,\n\t\t\t\t__unstableGetVisibleBlocks,\n\t\t\t\t__unstableGetTemporarilyEditingAsBlocks,\n\t\t\t\tgetTemplateLock,\n\t\t\t\tgetBlockEditingMode,\n\t\t\t\t__unstableGetEditorMode,\n\t\t\t} = select( blockEditorStore );\n\t\t\tconst selectedBlockClientId = getSelectedBlockClientId();\n\t\t\treturn {\n\t\t\t\torder: getBlockOrder( rootClientId ),\n\t\t\t\tselectedBlocks: getSelectedBlockClientIds(),\n\t\t\t\tvisibleBlocks: __unstableGetVisibleBlocks(),\n\t\t\t\ttemporarilyEditingAsBlocks:\n\t\t\t\t\t__unstableGetTemporarilyEditingAsBlocks(),\n\t\t\t\tshouldRenderAppender:\n\t\t\t\t\thasAppender &&\n\t\t\t\t\t( hasCustomAppender\n\t\t\t\t\t\t? ! getTemplateLock( rootClientId ) &&\n\t\t\t\t\t\t getBlockEditingMode( rootClientId ) !== 'disabled' &&\n\t\t\t\t\t\t __unstableGetEditorMode() !== 'zoom-out'\n\t\t\t\t\t\t: rootClientId === selectedBlockClientId ||\n\t\t\t\t\t\t ( ! rootClientId && ! selectedBlockClientId ) ),\n\t\t\t};\n\t\t},\n\t\t[ rootClientId, hasAppender, hasCustomAppender ]\n\t);\n\n\treturn (\n\t\t<LayoutProvider value={ layout }>\n\t\t\t{ order.map( ( clientId ) => (\n\t\t\t\t<AsyncModeProvider\n\t\t\t\t\tkey={ clientId }\n\t\t\t\t\tvalue={\n\t\t\t\t\t\t// Only provide data asynchronously if the block is\n\t\t\t\t\t\t// not visible and not selected.\n\t\t\t\t\t\t! visibleBlocks.has( clientId ) &&\n\t\t\t\t\t\t! selectedBlocks.includes( clientId )\n\t\t\t\t\t}\n\t\t\t\t>\n\t\t\t\t\t<BlockListBlock\n\t\t\t\t\t\trootClientId={ rootClientId }\n\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t/>\n\t\t\t\t</AsyncModeProvider>\n\t\t\t) ) }\n\t\t\t{ order.length < 1 && placeholder }\n\t\t\t{ !! temporarilyEditingAsBlocks && (\n\t\t\t\t<StopEditingAsBlocksOnOutsideSelect\n\t\t\t\t\tclientId={ temporarilyEditingAsBlocks }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ shouldRenderAppender && (\n\t\t\t\t<BlockListAppender\n\t\t\t\t\ttagName={ __experimentalAppenderTagName }\n\t\t\t\t\trootClientId={ rootClientId }\n\t\t\t\t\tCustomAppender={ CustomAppender }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</LayoutProvider>\n\t);\n}\n\nexport function BlockListItems( props ) {\n\t// This component needs to always be synchronous as it's the one changing\n\t// the async mode depending on the block selection.\n\treturn (\n\t\t<AsyncModeProvider value={ false }>\n\t\t\t<Items { ...props } />\n\t\t</AsyncModeProvider>\n\t);\n}\n"],"mappings":";;;;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,KAAA,GAAAD,OAAA;AAMA,IAAAE,QAAA,GAAAF,OAAA;AAKA,IAAAG,QAAA,GAAAH,OAAA;AAUA,IAAAI,MAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,kBAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,qBAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,OAAA,GAAAR,OAAA;AACA,IAAAS,sBAAA,GAAAT,OAAA;AACA,IAAAU,YAAA,GAAAV,OAAA;AACA,IAAAW,QAAA,GAAAX,OAAA;AAIA,IAAAY,cAAA,GAAAZ,OAAA;AACA,IAAAa,WAAA,GAAAb,OAAA;AAzCA;AACA;AACA;;AAGA;AACA;AACA;;AAmBA;AACA;AACA;;AAeO,MAAMc,oBAAoB,GAAAC,OAAA,CAAAD,oBAAA,GAAG,IAAAE,sBAAa,EAAC,CAAC;AACnD,MAAMC,wCAAwC,GAAG,IAAIC,OAAO,CAAC,CAAC;AAE9D,SAASC,IAAIA,CAAE;EAAEC,SAAS;EAAE,GAAGC;AAAS,CAAC,EAAG;EAC3C,MAAMC,eAAe,GAAG,IAAAC,yBAAgB,EAAE,QAAS,CAAC;EACpD,MAAM;IAAEC,aAAa;IAAEC,WAAW;IAAEC;EAAW,CAAC,GAAG,IAAAC,eAAS,EACzDC,MAAM,IAAM;IACb,MAAM;MAAEC,WAAW;MAAEC;IAAwB,CAAC,GAC7CF,MAAM,CAAEG,YAAiB,CAAC;IAC3B,MAAM;MAAEC,WAAW;MAAEC;IAAU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AAK,EAAG;EAAO,GACjC,IAAAH,MAAA,CAAAC,aAAA,EAACa,KAAK;IAAA,GAAMiC;EAAK,CAAI,CACH,CAAC;AAEtB"}
@@ -39,6 +39,5 @@ const BlockInsertionPoint = ({
39
39
  style: lineStyle
40
40
  }));
41
41
  };
42
- var _default = (0, _compose.withPreferredColorScheme)(BlockInsertionPoint);
43
- exports.default = _default;
42
+ var _default = exports.default = (0, _compose.withPreferredColorScheme)(BlockInsertionPoint);
44
43
  //# sourceMappingURL=insertion-point.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNative","require","_i18n","_compose","_style","_interopRequireDefault","BlockInsertionPoint","getStylesFromColorScheme","testID","lineStyle","styles","lineStyleAddHere","lineStyleAddHereDark","labelStyle","labelStyleAddHere","labelStyleAddHereDark","_react","createElement","View","style","containerStyleAddHere","Text","__","_default","withPreferredColorScheme","exports","default"],"sources":["@wordpress/block-editor/src/components/block-list/insertion-point.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { Text, View } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { withPreferredColorScheme } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\n\nconst BlockInsertionPoint = ( { getStylesFromColorScheme, testID } ) => {\n\tconst lineStyle = getStylesFromColorScheme(\n\t\tstyles.lineStyleAddHere,\n\t\tstyles.lineStyleAddHereDark\n\t);\n\tconst labelStyle = getStylesFromColorScheme(\n\t\tstyles.labelStyleAddHere,\n\t\tstyles.labelStyleAddHereDark\n\t);\n\n\treturn (\n\t\t<View style={ styles.containerStyleAddHere } testID={ testID }>\n\t\t\t<View style={ lineStyle }></View>\n\t\t\t<Text style={ labelStyle }>{ __( 'ADD BLOCK HERE' ) }</Text>\n\t\t\t<View style={ lineStyle }></View>\n\t\t</View>\n\t);\n};\n\nexport default withPreferredColorScheme( BlockInsertionPoint );\n"],"mappings":";;;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAKA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAKA,IAAAG,MAAA,GAAAC,sBAAA,CAAAJ,OAAA;AAdA;AACA;AACA;;AAGA;AACA;AACA;;AAIA;AACA;AACA;;AAGA,MAAMK,mBAAmB,GAAGA,CAAE;EAAEC,wBAAwB;EAAEC;AAAO,CAAC,KAAM;EACvE,MAAMC,SAAS,GAAGF,wBAAwB,CACzCG,cAAM,CAACC,gBAAgB,EACvBD,cAAM,CAACE,oBACR,CAAC;EACD,MAAMC,UAAU,GAAGN,wBAAwB,CAC1CG,cAAM,CAACI,iBAAiB,EACxBJ,cAAM,CAACK,qBACR,CAAC;EAED,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACjB,YAAA,CAAAkB,IAAI;IAACC,KAAK,EAAGT,cAAM,CAACU,qBAAuB;IAACZ,MAAM,EAAGA;EAAQ,GAC7D,IAAAQ,MAAA,CAAAC,aAAA,EAACjB,YAAA,CAAAkB,IAAI;IAACC,KAAK,EAAGV;EAAW,CAAO,CAAC,EACjC,IAAAO,MAAA,CAAAC,aAAA,EAACjB,YAAA,CAAAqB,IAAI;IAACF,KAAK,EAAGN;EAAY,GAAG,IAAAS,QAAE,EAAE,gBAAiB,CAAS,CAAC,EAC5D,IAAAN,MAAA,CAAAC,aAAA,EAACjB,YAAA,CAAAkB,IAAI;IAACC,KAAK,EAAGV;EAAW,CAAO,CAC3B,CAAC;AAET,CAAC;AAAC,IAAAc,QAAA,GAEa,IAAAC,iCAAwB,EAAElB,mBAAoB,CAAC;AAAAmB,OAAA,CAAAC,OAAA,GAAAH,QAAA"}
1
+ {"version":3,"names":["_reactNative","require","_i18n","_compose","_style","_interopRequireDefault","BlockInsertionPoint","getStylesFromColorScheme","testID","lineStyle","styles","lineStyleAddHere","lineStyleAddHereDark","labelStyle","labelStyleAddHere","labelStyleAddHereDark","_react","createElement","View","style","containerStyleAddHere","Text","__","_default","exports","default","withPreferredColorScheme"],"sources":["@wordpress/block-editor/src/components/block-list/insertion-point.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { Text, View } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { withPreferredColorScheme } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\n\nconst BlockInsertionPoint = ( { getStylesFromColorScheme, testID } ) => {\n\tconst lineStyle = getStylesFromColorScheme(\n\t\tstyles.lineStyleAddHere,\n\t\tstyles.lineStyleAddHereDark\n\t);\n\tconst labelStyle = getStylesFromColorScheme(\n\t\tstyles.labelStyleAddHere,\n\t\tstyles.labelStyleAddHereDark\n\t);\n\n\treturn (\n\t\t<View style={ styles.containerStyleAddHere } testID={ testID }>\n\t\t\t<View style={ lineStyle }></View>\n\t\t\t<Text style={ labelStyle }>{ __( 'ADD BLOCK HERE' ) }</Text>\n\t\t\t<View style={ lineStyle }></View>\n\t\t</View>\n\t);\n};\n\nexport default withPreferredColorScheme( BlockInsertionPoint );\n"],"mappings":";;;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAKA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAKA,IAAAG,MAAA,GAAAC,sBAAA,CAAAJ,OAAA;AAdA;AACA;AACA;;AAGA;AACA;AACA;;AAIA;AACA;AACA;;AAGA,MAAMK,mBAAmB,GAAGA,CAAE;EAAEC,wBAAwB;EAAEC;AAAO,CAAC,KAAM;EACvE,MAAMC,SAAS,GAAGF,wBAAwB,CACzCG,cAAM,CAACC,gBAAgB,EACvBD,cAAM,CAACE,oBACR,CAAC;EACD,MAAMC,UAAU,GAAGN,wBAAwB,CAC1CG,cAAM,CAACI,iBAAiB,EACxBJ,cAAM,CAACK,qBACR,CAAC;EAED,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACjB,YAAA,CAAAkB,IAAI;IAACC,KAAK,EAAGT,cAAM,CAACU,qBAAuB;IAACZ,MAAM,EAAGA;EAAQ,GAC7D,IAAAQ,MAAA,CAAAC,aAAA,EAACjB,YAAA,CAAAkB,IAAI;IAACC,KAAK,EAAGV;EAAW,CAAO,CAAC,EACjC,IAAAO,MAAA,CAAAC,aAAA,EAACjB,YAAA,CAAAqB,IAAI;IAACF,KAAK,EAAGN;EAAY,GAAG,IAAAS,QAAE,EAAE,gBAAiB,CAAS,CAAC,EAC5D,IAAAN,MAAA,CAAAC,aAAA,EAACjB,YAAA,CAAAkB,IAAI;IAACC,KAAK,EAAGV;EAAW,CAAO,CAC3B,CAAC;AAET,CAAC;AAAC,IAAAc,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEa,IAAAC,iCAAwB,EAAEpB,mBAAoB,CAAC"}
@@ -19,21 +19,19 @@ var _useSettings = require("../use-settings");
19
19
  * Internal dependencies
20
20
  */
21
21
 
22
- const defaultLayout = {
22
+ const defaultLayout = exports.defaultLayout = {
23
23
  type: 'default'
24
24
  };
25
- exports.defaultLayout = defaultLayout;
26
25
  const Layout = (0, _element.createContext)(defaultLayout);
27
26
 
28
27
  /**
29
28
  * Allows to define the layout.
30
29
  */
31
- const LayoutProvider = Layout.Provider;
30
+ const LayoutProvider = exports.LayoutProvider = Layout.Provider;
32
31
 
33
32
  /**
34
33
  * React hook used to retrieve the layout config.
35
34
  */
36
- exports.LayoutProvider = LayoutProvider;
37
35
  function useLayout() {
38
36
  return (0, _element.useContext)(Layout);
39
37
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_layouts","_useSettings","defaultLayout","type","exports","Layout","createContext","LayoutProvider","Provider","useLayout","useContext","LayoutStyle","layout","css","props","layoutType","getLayoutType","blockGapSupport","useSettings","hasBlockGapSupport","_react","createElement","layoutStyle","getLayoutStyle"],"sources":["@wordpress/block-editor/src/components/block-list/layout.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createContext, useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { getLayoutType } from '../../layouts';\nimport { useSettings } from '../use-settings';\n\nexport const defaultLayout = { type: 'default' };\n\nconst Layout = createContext( defaultLayout );\n\n/**\n * Allows to define the layout.\n */\nexport const LayoutProvider = Layout.Provider;\n\n/**\n * React hook used to retrieve the layout config.\n */\nexport function useLayout() {\n\treturn useContext( Layout );\n}\n\nexport function LayoutStyle( { layout = {}, css, ...props } ) {\n\tconst layoutType = getLayoutType( layout.type );\n\tconst [ blockGapSupport ] = useSettings( 'spacing.blockGap' );\n\tconst hasBlockGapSupport = blockGapSupport !== null;\n\n\tif ( layoutType ) {\n\t\tif ( css ) {\n\t\t\treturn <style>{ css }</style>;\n\t\t}\n\t\tconst layoutStyle = layoutType.getLayoutStyle?.( {\n\t\t\thasBlockGapSupport,\n\t\t\tlayout,\n\t\t\t...props,\n\t\t} );\n\t\tif ( layoutStyle ) {\n\t\t\treturn <style>{ layoutStyle }</style>;\n\t\t}\n\t}\n\treturn null;\n}\n"],"mappings":";;;;;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AATA;AACA;AACA;;AAGA;AACA;AACA;;AAIO,MAAMG,aAAa,GAAG;EAAEC,IAAI,EAAE;AAAU,CAAC;AAACC,OAAA,CAAAF,aAAA,GAAAA,aAAA;AAEjD,MAAMG,MAAM,GAAG,IAAAC,sBAAa,EAAEJ,aAAc,CAAC;;AAE7C;AACA;AACA;AACO,MAAMK,cAAc,GAAGF,MAAM,CAACG,QAAQ;;AAE7C;AACA;AACA;AAFAJ,OAAA,CAAAG,cAAA,GAAAA,cAAA;AAGO,SAASE,SAASA,CAAA,EAAG;EAC3B,OAAO,IAAAC,mBAAU,EAAEL,MAAO,CAAC;AAC5B;AAEO,SAASM,WAAWA,CAAE;EAAEC,MAAM,GAAG,CAAC,CAAC;EAAEC,GAAG;EAAE,GAAGC;AAAM,CAAC,EAAG;EAC7D,MAAMC,UAAU,GAAG,IAAAC,sBAAa,EAAEJ,MAAM,CAACT,IAAK,CAAC;EAC/C,MAAM,CAAEc,eAAe,CAAE,GAAG,IAAAC,wBAAW,EAAE,kBAAmB,CAAC;EAC7D,MAAMC,kBAAkB,GAAGF,eAAe,KAAK,IAAI;EAEnD,IAAKF,UAAU,EAAG;IACjB,IAAKF,GAAG,EAAG;MACV,OAAO,IAAAO,MAAA,CAAAC,aAAA,iBAASR,GAAY,CAAC;IAC9B;IACA,MAAMS,WAAW,GAAGP,UAAU,CAACQ,cAAc,GAAI;MAChDJ,kBAAkB;MAClBP,MAAM;MACN,GAAGE;IACJ,CAAE,CAAC;IACH,IAAKQ,WAAW,EAAG;MAClB,OAAO,IAAAF,MAAA,CAAAC,aAAA,iBAASC,WAAoB,CAAC;IACtC;EACD;EACA,OAAO,IAAI;AACZ"}
1
+ {"version":3,"names":["_element","require","_layouts","_useSettings","defaultLayout","exports","type","Layout","createContext","LayoutProvider","Provider","useLayout","useContext","LayoutStyle","layout","css","props","layoutType","getLayoutType","blockGapSupport","useSettings","hasBlockGapSupport","_react","createElement","layoutStyle","getLayoutStyle"],"sources":["@wordpress/block-editor/src/components/block-list/layout.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createContext, useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { getLayoutType } from '../../layouts';\nimport { useSettings } from '../use-settings';\n\nexport const defaultLayout = { type: 'default' };\n\nconst Layout = createContext( defaultLayout );\n\n/**\n * Allows to define the layout.\n */\nexport const LayoutProvider = Layout.Provider;\n\n/**\n * React hook used to retrieve the layout config.\n */\nexport function useLayout() {\n\treturn useContext( Layout );\n}\n\nexport function LayoutStyle( { layout = {}, css, ...props } ) {\n\tconst layoutType = getLayoutType( layout.type );\n\tconst [ blockGapSupport ] = useSettings( 'spacing.blockGap' );\n\tconst hasBlockGapSupport = blockGapSupport !== null;\n\n\tif ( layoutType ) {\n\t\tif ( css ) {\n\t\t\treturn <style>{ css }</style>;\n\t\t}\n\t\tconst layoutStyle = layoutType.getLayo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AoB,CAAC;IACtC;EACD;EACA,OAAO,IAAI;AACZ"}
@@ -9,6 +9,5 @@ var _element = require("@wordpress/element");
9
9
  * WordPress dependencies
10
10
  */
11
11
 
12
- const PrivateBlockContext = (0, _element.createContext)({});
13
- exports.PrivateBlockContext = PrivateBlockContext;
12
+ const PrivateBlockContext = exports.PrivateBlockContext = (0, _element.createContext)({});
14
13
  //# sourceMappingURL=private-block-context.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","PrivateBlockContext","createContext","exports"],"sources":["@wordpress/block-editor/src/components/block-list/private-block-context.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createContext } from '@wordpress/element';\n\nexport const PrivateBlockContext = createContext( {} );\n"],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGO,MAAMC,mBAAmB,GAAG,IAAAC,sBAAa,EAAE,CAAC,CAAE,CAAC;AAACC,OAAA,CAAAF,mBAAA,GAAAA,mBAAA"}
1
+ {"version":3,"names":["_element","require","PrivateBlockContext","exports","createContext"],"sources":["@wordpress/block-editor/src/components/block-list/private-block-context.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createContext } from '@wordpress/element';\n\nexport const PrivateBlockContext = createContext( {} );\n"],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGO,MAAMC,mBAAmB,GAAAC,OAAA,CAAAD,mBAAA,GAAG,IAAAE,sBAAa,EAAE,CAAC,CAAE,CAAC"}
@@ -23,6 +23,5 @@ const Subdirectory = ({
23
23
  d: "M19 15l-6 6-1.42-1.42L15.17 16H4V4h2v10h9.17l-3.59-3.58L13 9l6 6z",
24
24
  transform: (0, _i18n.isRTL)() ? 'scale(-1,1) translate(-20,0)' : undefined
25
25
  }));
26
- var _default = Subdirectory;
27
- exports.default = _default;
26
+ var _default = exports.default = Subdirectory;
28
27
  //# sourceMappingURL=subdirectory-icon.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_components","require","_i18n","Subdirectory","extraProps","_react","createElement","SVG","xmlns","width","height","viewBox","Path","d","transform","isRTL","undefined","_default","exports","default"],"sources":["@wordpress/block-editor/src/components/block-list/subdirectory-icon.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/components';\nimport { isRTL } from '@wordpress/i18n';\n\nconst Subdirectory = ( { ...extraProps } ) => (\n\t<SVG\n\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\twidth={ 14 }\n\t\theight={ 14 }\n\t\tviewBox=\"0 0 20 20\"\n\t\t{ ...extraProps }\n\t>\n\t\t<Path\n\t\t\td=\"M19 15l-6 6-1.42-1.42L15.17 16H4V4h2v10h9.17l-3.59-3.58L13 9l6 6z\"\n\t\t\ttransform={ isRTL() ? 'scale(-1,1) translate(-20,0)' : undefined }\n\t\t/>\n\t</SVG>\n);\nexport default Subdirectory;\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AAJA;AACA;AACA;;AAIA,MAAME,YAAY,GAAGA,CAAE;EAAE,GAAGC;AAAW,CAAC,KACvC,IAAAC,MAAA,CAAAC,aAAA,EAACN,WAAA,CAAAO,GAAG;EACHC,KAAK,EAAC,4BAA4B;EAClCC,KAAK,EAAG,EAAI;EACZC,MAAM,EAAG,EAAI;EACbC,OAAO,EAAC,WAAW;EAAA,GACdP;AAAU,GAEf,IAAAC,MAAA,CAAAC,aAAA,EAACN,WAAA,CAAAY,IAAI;EACJC,CAAC,EAAC,mEAAmE;EACrEC,SAAS,EAAG,IAAAC,WAAK,EAAC,CAAC,GAAG,8BAA8B,GAAGC;AAAW,CAClE,CACG,CACL;AAAC,IAAAC,QAAA,GACad,YAAY;AAAAe,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
1
+ {"version":3,"names":["_components","require","_i18n","Subdirectory","extraProps","_react","createElement","SVG","xmlns","width","height","viewBox","Path","d","transform","isRTL","undefined","_default","exports","default"],"sources":["@wordpress/block-editor/src/components/block-list/subdirectory-icon.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/components';\nimport { isRTL } from '@wordpress/i18n';\n\nconst Subdirectory = ( { ...extraProps } ) => (\n\t<SVG\n\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\twidth={ 14 }\n\t\theight={ 14 }\n\t\tviewBox=\"0 0 20 20\"\n\t\t{ ...extraProps }\n\t>\n\t\t<Path\n\t\t\td=\"M19 15l-6 6-1.42-1.42L15.17 16H4V4h2v10h9.17l-3.59-3.58L13 9l6 6z\"\n\t\t\ttransform={ isRTL() ? 'scale(-1,1) translate(-20,0)' : undefined }\n\t\t/>\n\t</SVG>\n);\nexport default Subdirectory;\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AAJA;AACA;AACA;;AAIA,MAAME,YAAY,GAAGA,CAAE;EAAE,GAAGC;AAAW,CAAC,KACvC,IAAAC,MAAA,CAAAC,aAAA,EAACN,WAAA,CAAAO,GAAG;EACHC,KAAK,EAAC,4BAA4B;EAClCC,KAAK,EAAG,EAAI;EACZC,MAAM,EAAG,EAAI;EACbC,OAAO,EAAC,WAAW;EAAA,GACdP;AAAU,GAEf,IAAAC,MAAA,CAAAC,aAAA,EAACN,WAAA,CAAAY,IAAI;EACJC,CAAC,EAAC,mEAAmE;EACrEC,SAAS,EAAG,IAAAC,WAAK,EAAC,CAAC,GAAG,8BAA8B,GAAGC;AAAW,CAClE,CACG,CACL;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GACahB,YAAY"}
@@ -21,6 +21,7 @@ var _useSelectedBlockEventHandlers = require("./use-selected-block-event-handler
21
21
  var _useNavModeExit = require("./use-nav-mode-exit");
22
22
  var _useBlockRefs = require("./use-block-refs");
23
23
  var _useIntersectionObserver = require("./use-intersection-observer");
24
+ var _useFlashEditableBlocks = require("../../use-flash-editable-blocks");
24
25
  /**
25
26
  * External dependencies
26
27
  */
@@ -104,8 +105,10 @@ function useBlockProps(props = {}, {
104
105
  isBlockMovingMode,
105
106
  canInsertMovingBlock,
106
107
  isEditingDisabled,
108
+ hasEditableOutline,
107
109
  isTemporarilyEditingAsBlocks,
108
- defaultClassName
110
+ defaultClassName,
111
+ templateLock
109
112
  } = (0, _element.useContext)(_privateBlockContext.PrivateBlockContext);
110
113
 
111
114
  // translators: %s: Type of block (i.e. Text, Image etc)
@@ -124,6 +127,9 @@ function useBlockProps(props = {}, {
124
127
  clientId
125
128
  }), (0, _compose.useDisabled)({
126
129
  isDisabled: !hasOverlay
130
+ }), (0, _useFlashEditableBlocks.useFlashEditableBlocks)({
131
+ clientId,
132
+ isEnabled: name === 'core/block' || templateLock === 'contentOnly'
127
133
  })]);
128
134
  const blockEditContext = (0, _context.useBlockEditContext)();
129
135
  // Ensures it warns only inside the `edit` implementation for the block.
@@ -157,6 +163,7 @@ function useBlockProps(props = {}, {
157
163
  'is-block-moving-mode': isBlockMovingMode,
158
164
  'can-insert-moving-block': canInsertMovingBlock,
159
165
  'is-editing-disabled': isEditingDisabled,
166
+ 'has-editable-outline': hasEditableOutline,
160
167
  'is-content-locked-temporarily-editing-as-blocks': isTemporarilyEditingAsBlocks
161
168
  }, className, props.className, wrapperProps.className, defaultClassName),
162
169
  style: {
@@ -1 +1 @@
1
- {"version":3,"names":["_classnames","_interopRequireDefault","require","_element","_i18n","_blocks","_compose","_warning","_useMovingAnimation","_privateBlockContext","_useFocusFirstElement","_useIsHovered","_context","_useFocusHandler","_useSelectedBlockEventHandlers","_useNavModeExit","_useBlockRefs","_useIntersectionObserver","useBlockProps","props","__unstableIsHtml","clientId","className","wrapperProps","isAligned","index","mode","name","blockApiVersion","blockTitle","isSelected","isSubtreeDisabled","isOutlineEnabled","hasOverlay","initialPosition","blockEditingMode","isHighlighted","isMultiSelected","isPartiallySelected","isReusable","isDragging","hasChildSelected","removeOutline","isBlockMovingMode","canInsertMovingBlock","isEditingDisabled","isTemporarilyEditingAsBlocks","defaultClassName","useContext","PrivateBlockContext","blockLabel","sprintf","__","htmlSuffix","mergedRefs","useMergeRefs","ref","useFocusFirstElement","useBlockRefProvider","useFocusHandler","useEventHandlers","useNavModeExit","useIsHovered","isEnabled","useIntersectionObserver","useMovingAnimation","triggerAnimationOnChange","useDisabled","isDisabled","blockEditContext","useBlockEditContext","SCRIPT_DEBUG","warning","tabIndex","id","role","inert","undefined","classnames","style","save","getBlockProps"],"sources":["@wordpress/block-editor/src/components/block-list/use-block-props/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useContext } from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { __unstableGetBlockProps as getBlockProps } from '@wordpress/blocks';\nimport { useMergeRefs, useDisabled } from '@wordpress/compose';\nimport warning from '@wordpress/warning';\n\n/**\n * Internal dependencies\n */\nimport useMovingAnimation from '../../use-moving-animation';\nimport { PrivateBlockContext } from '../private-block-context';\nimport { useFocusFirstElement } from './use-focus-first-element';\nimport { useIsHovered } from './use-is-hovered';\nimport { useBlockEditContext } from '../../block-edit/context';\nimport { useFocusHandler } from './use-focus-handler';\nimport { useEventHandlers } from './use-selected-block-event-handlers';\nimport { useNavModeExit } from './use-nav-mode-exit';\nimport { useBlockRefProvider } from './use-block-refs';\nimport { useIntersectionObserver } from './use-intersection-observer';\n\n/**\n * This hook is used to lightly mark an element as a block element. The element\n * should be the outermost element of a block. Call this hook and pass the\n * returned props to the element to mark as a block. If you define a ref for the\n * element, it is important to pass the ref to this hook, which the hook in turn\n * will pass to the component through the props it returns. Optionally, you can\n * also pass any other props through this hook, and they will be merged and\n * returned.\n *\n * Use of this hook on the outermost element of a block is required if using API >= v2.\n *\n * @example\n * ```js\n * import { useBlockProps } from '@wordpress/block-editor';\n *\n * export default function Edit() {\n *\n * const blockProps = useBlockProps(\n * className: 'my-custom-class',\n * style: {\n * color: '#222222',\n * backgroundColor: '#eeeeee'\n * }\n * )\n *\n * return (\n *\t <div { ...blockProps }>\n *\n * </div>\n * )\n * }\n *\n * ```\n *\n *\n * @param {Object} props Optional. Props to pass to the element. Must contain\n * the ref if one is defined.\n * @param {Object} options Options for internal use only.\n * @param {boolean} options.__unstableIsHtml\n *\n * @return {Object} Props to pass to the element to mark as a block.\n */\nexport function useBlockProps( props = {}, { __unstableIsHtml } = {} ) {\n\tconst {\n\t\tclientId,\n\t\tclassName,\n\t\twrapperProps = {},\n\t\tisAligned,\n\t\tindex,\n\t\tmode,\n\t\tname,\n\t\tblockApiVersion,\n\t\tblockTitle,\n\t\tisSelected,\n\t\tisSubtreeDisabled,\n\t\tisOutlineEnabled,\n\t\thasOverlay,\n\t\tinitialPosition,\n\t\tblockEditingMode,\n\t\tisHighlighted,\n\t\tisMultiSelected,\n\t\tisPartiallySelected,\n\t\tisReusable,\n\t\tisDragging,\n\t\thasChildSelected,\n\t\tremoveOutline,\n\t\tisBlockMovingMode,\n\t\tcanInsertMovingBlock,\n\t\tisEditingDisabled,\n\t\tisTemporarilyEditingAsBlocks,\n\t\tdefaultClassName,\n\t} = useContext( PrivateBlockContext );\n\n\t// translators: %s: Type of block (i.e. Text, Image etc)\n\tconst blockLabel = sprintf( __( 'Block: %s' ), blockTitle );\n\tconst htmlSuffix = mode === 'html' && ! __unstableIsHtml ? '-visual' : '';\n\tconst mergedRefs = useMergeRefs( [\n\t\tprops.ref,\n\t\tuseFocusFirstElement( { clientId, initialPosition } ),\n\t\tuseBlockRefProvider( clientId ),\n\t\tuseFocusHandler( clientId ),\n\t\tuseEventHandlers( { clientId, isSelected } ),\n\t\tuseNavModeExit( clientId ),\n\t\tuseIsHovered( { isEnabled: isOutlineEnabled } ),\n\t\tuseIntersectionObserver(),\n\t\tuseMovingAnimation( { triggerAnimationOnChange: index, clientId } ),\n\t\tuseDisabled( { isDisabled: ! hasOverlay } ),\n\t] );\n\n\tconst blockEditContext = useBlockEditContext();\n\t// Ensures it warns only inside the `edit` implementation for the block.\n\tif ( blockApiVersion < 2 && clientId === blockEditContext.clientId ) {\n\t\twarning(\n\t\t\t`Block type \"${ name }\" must support API version 2 or higher to work correctly with \"useBlockProps\" method.`\n\t\t);\n\t}\n\n\treturn {\n\t\ttabIndex: blockEditingMode === 'disabled' ? -1 : 0,\n\t\t...wrapperProps,\n\t\t...props,\n\t\tref: mergedRefs,\n\t\tid: `block-${ clientId }${ htmlSuffix }`,\n\t\trole: 'document',\n\t\t'aria-label': blockLabel,\n\t\t'data-block': clientId,\n\t\t'data-type': name,\n\t\t'data-title': blockTitle,\n\t\tinert: isSubtreeDisabled ? 'true' : undefined,\n\t\tclassName: classnames(\n\t\t\t'block-editor-block-list__block',\n\t\t\t{\n\t\t\t\t// The wp-block className is important for editor styles.\n\t\t\t\t'wp-block': ! isAligned,\n\t\t\t\t'has-block-overlay': hasOverlay,\n\t\t\t\t'is-selected': isSelected,\n\t\t\t\t'is-highlighted': isHighlighted,\n\t\t\t\t'is-multi-selected': isMultiSelected,\n\t\t\t\t'is-partially-selected': isPartiallySelected,\n\t\t\t\t'is-reusable': isReusable,\n\t\t\t\t'is-dragging': isDragging,\n\t\t\t\t'has-child-selected': hasChildSelected,\n\t\t\t\t'remove-outline': removeOutline,\n\t\t\t\t'is-block-moving-mode': isBlockMovingMode,\n\t\t\t\t'can-insert-moving-block': canInsertMovingBlock,\n\t\t\t\t'is-editing-disabled': isEditingDisabled,\n\t\t\t\t'is-content-locked-temporarily-editing-as-blocks':\n\t\t\t\t\tisTemporarilyEditingAsBlocks,\n\t\t\t},\n\t\t\tclassName,\n\t\t\tprops.className,\n\t\t\twrapperProps.className,\n\t\t\tdefaultClassName\n\t\t),\n\t\tstyle: { ...wrapperProps.style, ...props.style },\n\t};\n}\n\n/**\n * Call within a save function to get the props for the block wrapper.\n *\n * @param {Object} props Optional. Props to pass to the element.\n */\nuseBlockProps.save = getBlockProps;\n"],"mappings":";;;;;;;AAGA,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AC,GAAG,CAAC;IAClD,GAAGZ,YAAY;IACf,GAAGJ,KAAK;IACRqC,GAAG,EAAEF,UAAU;IACfoB,EAAE,EAAG,SAASrD,QAAU,GAAGgC,UAAY,EAAC;IACxCsB,IAAI,EAAE,UAAU;IAChB,YAAY,EAAEzB,UAAU;IACxB,YAAY,EAAE7B,QAAQ;IACtB,WAAW,EAAEM,IAAI;IACjB,YAAY,EAAEE,UAAU;IACxB+C,KAAK,EAAE7C,iBAAiB,GAAG,MAAM,GAAG8C,SAAS;IAC7CvD,SAAS,EAAE,IAAAwD,mBAAU,EACpB,gCAAgC,EAChC;MACC;MACA,UAAU,EAAE,CAAEtD,SAAS;MACvB,mBAAmB,EAAES,UAAU;MAC/B,aAAa,EAAEH,UAAU;MACzB,gBAAgB,EAAEM,aAAa;MAC/B,mBAAmB,EAAEC,eAAe;MACpC,uBAAuB,EAAEC,mBAAmB;MAC5C,aAAa,EAAEC,UAAU;MACzB,aAAa,EAAEC,UAAU;MACzB,oBAAoB,EAAEC,gBAAgB;MACtC,gBAAgB,EAAEC,aAAa;MAC/B,sBAAsB,EAAEC,iBAAiB;MACzC,yBAAyB,EAAEC,oBAAoB;MAC/C,qBAAqB,EAAEC,iBAAiB;MACxC,iDAAiD,EAChDC;IACF,CAAC,EACDxB,SAAS,EACTH,KAAK,CAACG,SAAS,EACfC,YAAY,CAACD,SAAS,EACtByB,gBACD,CAAC;IACDgC,KAAK,EAAE;MAAE,GAAGxD,YAAY,CAACwD,KAAK;MAAE,GAAG5D,KAAK,CAAC4D;IAAM;EAChD,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA7D,aAAa,CAAC8D,IAAI,GAAGC,+BAAa"}
1
+ {"version":3,"names":["_classnames","_interopRequireDefault","require","_element","_i18n","_blocks","_compose","_warning","_useMovingAnimation","_privateBlockContext","_useFocusFirstElement","_useIsHovered","_context","_useFocusHandler","_useSelectedBlockEventHandlers","_useNavModeExit","_useBlockRefs","_useIntersectionObserver","_useFlashEditableBlocks","useBlockProps","props","__unstableIsHtml","clientId","className","wrapperProps","isAligned","index","mode","name","blockApiVersion","blockTitle","isSelected","isSubtreeDisabled","isOutlineEnabled","hasOverlay","initialPosition","blockEditingMode","isHighlighted","isMultiSelected","isPartiallySelected","isReusable","isDragging","hasChildSelected","removeOutline","isBlockMovingMode","canInsertMovingBlock","isEditingDisabled","hasEditableOutline","isTemporarilyEditingAsBlocks","defaultClassName","templateLock","useContext","PrivateBlockContext","blockLabel","sprintf","__","htmlSuffix","mergedRefs","useMergeRefs","ref","useFocusFirstElement","useBlockRefProvider","useFocusHandler","useEventHandlers","useNavModeExit","useIsHovered","isEnabled","useIntersectionObserver","useMovingAnimation","triggerAnimationOnChange","useDisabled","isDisabled","useFlashEditableBlocks","blockEditContext","useBlockEditContext","SCRIPT_DEBUG","warning","tabIndex","id","role","inert","undefined","classnames","style","save","getBlockProps"],"sources":["@wordpress/block-editor/src/components/block-list/use-block-props/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useContext } from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { __unstableGetBlockProps as getBlockProps } from '@wordpress/blocks';\nimport { useMergeRefs, useDisabled } from '@wordpress/compose';\nimport warning from '@wordpress/warning';\n\n/**\n * Internal dependencies\n */\nimport useMovingAnimation from '../../use-moving-animation';\nimport { PrivateBlockContext } from '../private-block-context';\nimport { useFocusFirstElement } from './use-focus-first-element';\nimport { useIsHovered } from './use-is-hovered';\nimport { useBlockEditContext } from '../../block-edit/context';\nimport { useFocusHandler } from './use-focus-handler';\nimport { useEventHandlers } from './use-selected-block-event-handlers';\nimport { useNavModeExit } from './use-nav-mode-exit';\nimport { useBlockRefProvider } from './use-block-refs';\nimport { useIntersectionObserver } from './use-intersection-observer';\nimport { useFlashEditableBlocks } from '../../use-flash-editable-blocks';\n\n/**\n * This hook is used to lightly mark an element as a block element. The element\n * should be the outermost element of a block. Call this hook and pass the\n * returned props to the element to mark as a block. If you define a ref for the\n * element, it is important to pass the ref to this hook, which the hook in turn\n * will pass to the component through the props it returns. Optionally, you can\n * also pass any other props through this hook, and they will be merged and\n * returned.\n *\n * Use of this hook on the outermost element of a block is required if using API >= v2.\n *\n * @example\n * ```js\n * import { useBlockProps } from '@wordpress/block-editor';\n *\n * export default function Edit() {\n *\n * const blockProps = useBlockProps(\n * className: 'my-custom-class',\n * style: {\n * color: '#222222',\n * backgroundColor: '#eeeeee'\n * }\n * )\n *\n * return (\n *\t <div { ...blockProps }>\n *\n * </div>\n * )\n * }\n *\n * ```\n *\n *\n * @param {Object} props Optional. Props to pass to the element. Must contain\n * the ref if one is defined.\n * @param {Object} options Options for internal use only.\n * @param {boolean} options.__unstableIsHtml\n *\n * @return {Object} Props to pass to the element to mark as a block.\n */\nexport function useBlockProps( props = {}, { __unstableIsHtml } = {} ) {\n\tconst {\n\t\tclientId,\n\t\tclassName,\n\t\twrapperProps = {},\n\t\tisAligned,\n\t\tindex,\n\t\tmode,\n\t\tname,\n\t\tblockApiVersion,\n\t\tblockTitle,\n\t\tisSelected,\n\t\tisSubtreeDisabled,\n\t\tisOutlineEnabled,\n\t\thasOverlay,\n\t\tinitialPosition,\n\t\tblockEditingMode,\n\t\tisHighlighted,\n\t\tisMultiSelected,\n\t\tisPartiallySelected,\n\t\tisReusable,\n\t\tisDragging,\n\t\thasChildSelected,\n\t\tremoveOutline,\n\t\tisBlockMovingMode,\n\t\tcanInsertMovingBlock,\n\t\tisEditingDisabled,\n\t\thasEditableOutline,\n\t\tisTemporarilyEditingAsBlocks,\n\t\tdefaultClassName,\n\t\ttemplateLock,\n\t} = useContext( PrivateBlockContext );\n\n\t// translators: %s: Type of block (i.e. Text, Image etc)\n\tconst blockLabel = sprintf( __( 'Block: %s' ), blockTitle );\n\tconst htmlSuffix = mode === 'html' && ! __unstableIsHtml ? '-visual' : '';\n\tconst mergedRefs = useMergeRefs( [\n\t\tprops.ref,\n\t\tuseFocusFirstElement( { clientId, initialPosition } ),\n\t\tuseBlockRefProvider( clientId ),\n\t\tuseFocusHandler( clientId ),\n\t\tuseEventHandlers( { clientId, isSelected } ),\n\t\tuseNavModeExit( clientId ),\n\t\tuseIsHovered( { isEnabled: isOutlineEnabled } ),\n\t\tuseIntersectionObserver(),\n\t\tuseMovingAnimation( { triggerAnimationOnChange: index, clientId } ),\n\t\tuseDisabled( { isDisabled: ! hasOverlay } ),\n\t\tuseFlashEditableBlocks( {\n\t\t\tclientId,\n\t\t\tisEnabled: name === 'core/block' || templateLock === 'contentOnly',\n\t\t} ),\n\t] );\n\n\tconst blockEditContext = useBlockEditContext();\n\t// Ensures it warns only inside the `edit` implementation for the block.\n\tif ( blockApiVersion < 2 && clientId === blockEditContext.clientId ) {\n\t\twarning(\n\t\t\t`Block type \"${ name }\" must support API version 2 or higher to work correctly with \"useBlockProps\" method.`\n\t\t);\n\t}\n\n\treturn {\n\t\ttabIndex: blockEditingMode === 'disabled' ? -1 : 0,\n\t\t...wrapperProps,\n\t\t...props,\n\t\tref: mergedRefs,\n\t\tid: `block-${ clientId }${ htmlSuffix }`,\n\t\trole: 'document',\n\t\t'aria-label': blockLabel,\n\t\t'data-block': clientId,\n\t\t'data-type': name,\n\t\t'data-title': blockTitle,\n\t\tinert: isSubtreeDisabled ? 'true' : undefined,\n\t\tclassName: classnames(\n\t\t\t'block-editor-block-list__block',\n\t\t\t{\n\t\t\t\t// The wp-block className is important for editor styles.\n\t\t\t\t'wp-block': ! isAligned,\n\t\t\t\t'has-block-overlay': hasOverlay,\n\t\t\t\t'is-selected': isSelected,\n\t\t\t\t'is-highlighted': isHighlighted,\n\t\t\t\t'is-multi-selected': isMultiSelected,\n\t\t\t\t'is-partially-selected': isPartiallySelected,\n\t\t\t\t'is-reusable': isReusable,\n\t\t\t\t'is-dragging': isDragging,\n\t\t\t\t'has-child-selected': hasChildSelected,\n\t\t\t\t'remove-outline': removeOutline,\n\t\t\t\t'is-block-moving-mode': isBlockMovingMode,\n\t\t\t\t'can-insert-moving-block': canInsertMovingBlock,\n\t\t\t\t'is-editing-disabled': isEditingDisabled,\n\t\t\t\t'has-editable-outline': hasEditableOutline,\n\t\t\t\t'is-content-locked-temporarily-editing-as-blocks':\n\t\t\t\t\tisTemporarilyEditingAsBlocks,\n\t\t\t},\n\t\t\tclassName,\n\t\t\tprops.className,\n\t\t\twrapperProps.className,\n\t\t\tdefaultClassName\n\t\t),\n\t\tstyle: { ...wrapperProps.style, ...props.style },\n\t};\n}\n\n/**\n * Call within a save function to get the props for the block wrapper.\n *\n * @param {Object} props Optional. Props to pass to the element.\n */\nuseBlockProps.save = getBlockProps;\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAN,sBAAA,CAAAC,OAAA;AAKA,IAAAM,mBAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,oBAAA,GAAAP,OAAA;AACA,IAAAQ,qBAAA,GAAAR,OAAA;AACA,IAAAS,aAAA,GAAAT,OAAA;AACA,IAAAU,QAAA,GAAAV,OAAA;AACA,IAAAW,gBAAA,GAAAX,OAAA;AACA,IAAAY,8BAAA,GAAAZ,OAAA;AACA,IAAAa,eAAA,GAAAb,OAAA;AACA,IAAAc,aAAA,GAAAd,OAAA;AACA,IAAAe,wBAAA,GAAAf,OAAA;AACA,IAAAgB,uBAAA,GAAAhB,OAAA;AA3BA;AACA;AACA;;AAGA;AACA;AACA;;AAOA;AACA;AACA;;AAaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA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B,EAAEC,gBAAgB;MACtC,gBAAgB,EAAEC,aAAa;MAC/B,sBAAsB,EAAEC,iBAAiB;MACzC,yBAAyB,EAAEC,oBAAoB;MAC/C,qBAAqB,EAAEC,iBAAiB;MACxC,sBAAsB,EAAEC,kBAAkB;MAC1C,iDAAiD,EAChDC;IACF,CAAC,EACDzB,SAAS,EACTH,KAAK,CAACG,SAAS,EACfC,YAAY,CAACD,SAAS,EACtB0B,gBACD,CAAC;IACDkC,KAAK,EAAE;MAAE,GAAG3D,YAAY,CAAC2D,KAAK;MAAE,GAAG/D,KAAK,CAAC+D;IAAM;EAChD,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACAhE,aAAa,CAACiE,IAAI,GAAGC,+BAAa"}
@@ -36,6 +36,5 @@ const useScrollUponInsertion = ({
36
36
  lastScrollTo.clientId = clientId;
37
37
  }, [isSelected, scrollRef, wasBlockJustInserted, elementRef, isLayoutCalculated, clientId]);
38
38
  };
39
- var _default = useScrollUponInsertion;
40
- exports.default = _default;
39
+ var _default = exports.default = useScrollUponInsertion;
41
40
  //# sourceMappingURL=use-scroll-upon-insertion.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_data","_blockListContext","_store","useScrollUponInsertion","clientId","isSelected","isLayoutCalculated","elementRef","scrollRef","useBlockListContext","wasBlockJustInserted","useSelect","select","blockEditorStore","useEffect","lastScrollTo","current","alreadyScrolledTo","scrollToElement","_default","exports","default"],"sources":["@wordpress/block-editor/src/components/block-list/use-scroll-upon-insertion.native.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { useBlockListContext } from './block-list-context';\nimport { store as blockEditorStore } from '../../store';\n\nconst useScrollUponInsertion = ( {\n\tclientId,\n\tisSelected,\n\tisLayoutCalculated,\n\telementRef,\n} ) => {\n\tconst { scrollRef } = useBlockListContext();\n\tconst wasBlockJustInserted = useSelect(\n\t\t( select ) =>\n\t\t\t!! select( blockEditorStore ).wasBlockJustInserted(\n\t\t\t\tclientId,\n\t\t\t\t'inserter_menu'\n\t\t\t),\n\t\t[ clientId ]\n\t);\n\tuseEffect( () => {\n\t\tconst lastScrollTo = scrollRef?.lastScrollTo.current;\n\t\tconst alreadyScrolledTo = lastScrollTo?.clientId === clientId;\n\t\tif (\n\t\t\talreadyScrolledTo ||\n\t\t\t! isSelected ||\n\t\t\t! scrollRef ||\n\t\t\t! wasBlockJustInserted ||\n\t\t\t! isLayoutCalculated\n\t\t) {\n\t\t\treturn;\n\t\t}\n\t\tscrollRef.scrollToElement( elementRef );\n\t\tlastScrollTo.clientId = clientId;\n\t}, [\n\t\tisSelected,\n\t\tscrollRef,\n\t\twasBlockJustInserted,\n\t\telementRef,\n\t\tisLayoutCalculated,\n\t\tclientId,\n\t] );\n};\n\nexport default useScrollUponInsertion;\n"],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AAKA,IAAAE,iBAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAVA;AACA;AACA;;AAIA;AACA;AACA;;AAIA,MAAMI,sBAAsB,GAAGA,CAAE;EAChCC,QAAQ;EACRC,UAAU;EACVC,kBAAkB;EAClBC;AACD,CAAC,KAAM;EACN,MAAM;IAAEC;EAAU,CAAC,GAAG,IAAAC,qCAAmB,EAAC,CAAC;EAC3C,MAAMC,oBAAoB,GAAG,IAAAC,eAAS,EACnCC,MAAM,IACP,CAAC,CAAEA,MAAM,CAAEC,YAAiB,CAAC,CAACH,oBAAoB,CACjDN,QAAQ,EACR,eACD,CAAC,EACF,CAAEA,QAAQ,CACX,CAAC;EACD,IAAAU,kBAAS,EAAE,MAAM;IAChB,MAAMC,YAAY,GAAGP,SAAS,EAAEO,YAAY,CAACC,OAAO;IACpD,MAAMC,iBAAiB,GAAGF,YAAY,EAAEX,QAAQ,KAAKA,QAAQ;IAC7D,IACCa,iBAAiB,IACjB,CAAEZ,UAAU,IACZ,CAAEG,SAAS,IACX,CAAEE,oBAAoB,IACtB,CAAEJ,kBAAkB,EACnB;MACD;IACD;IACAE,SAAS,CAACU,eAAe,CAAEX,UAAW,CAAC;IACvCQ,YAAY,CAACX,QAAQ,GAAGA,QAAQ;EACjC,CAAC,EAAE,CACFC,UAAU,EACVG,SAAS,EACTE,oBAAoB,EACpBH,UAAU,EACVD,kBAAkB,EAClBF,QAAQ,CACP,CAAC;AACJ,CAAC;AAAC,IAAAe,QAAA,GAEahB,sBAAsB;AAAAiB,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
1
+ {"version":3,"names":["_element","require","_data","_blockListContext","_store","useScrollUponInsertion","clientId","isSelected","isLayoutCalculated","elementRef","scrollRef","useBlockListContext","wasBlockJustInserted","useSelect","select","blockEditorStore","useEffect","lastScrollTo","current","alreadyScrolledTo","scrollToElement","_default","exports","default"],"sources":["@wordpress/block-editor/src/components/block-list/use-scroll-upon-insertion.native.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { useBlockListContext } from './block-list-context';\nimport { store as blockEditorStore } from '../../store';\n\nconst useScrollUponInsertion = ( {\n\tclientId,\n\tisSelected,\n\tisLayoutCalculated,\n\telementRef,\n} ) => {\n\tconst { scrollRef } = useBlockListContext();\n\tconst wasBlockJustInserted = useSelect(\n\t\t( select ) =>\n\t\t\t!! select( blockEditorStore ).wasBlockJustInserted(\n\t\t\t\tclientId,\n\t\t\t\t'inserter_menu'\n\t\t\t),\n\t\t[ clientId ]\n\t);\n\tuseEffect( () => {\n\t\tconst lastScrollTo = scrollRef?.lastScrollTo.current;\n\t\tconst alreadyScrolledTo = lastScrollTo?.clientId === clientId;\n\t\tif (\n\t\t\talreadyScrolledTo ||\n\t\t\t! isSelected ||\n\t\t\t! scrollRef ||\n\t\t\t! wasBlockJustInserted ||\n\t\t\t! isLayoutCalculated\n\t\t) {\n\t\t\treturn;\n\t\t}\n\t\tscrollRef.scrollToElement( elementRef );\n\t\tlastScrollTo.clientId = clientId;\n\t}, [\n\t\tisSelected,\n\t\tscrollRef,\n\t\twasBlockJustInserted,\n\t\telementRef,\n\t\tisLayoutCalculated,\n\t\tclientId,\n\t] );\n};\n\nexport default useScrollUponInsertion;\n"],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AAKA,IAAAE,iBAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAVA;AACA;AACA;;AAIA;AACA;AACA;;AAIA,MAAMI,sBAAsB,GAAGA,CAAE;EAChCC,QAAQ;EACRC,UAAU;EACVC,kBAAkB;EAClBC;AACD,CAAC,KAAM;EACN,MAAM;IAAEC;EAAU,CAAC,GAAG,IAAAC,qCAAmB,EAAC,CAAC;EAC3C,MAAMC,oBAAoB,GAAG,IAAAC,eAAS,EACnCC,MAAM,IACP,CAAC,CAAEA,MAAM,CAAEC,YAAiB,CAAC,CAACH,oBAAoB,CACjDN,QAAQ,EACR,eACD,CAAC,EACF,CAAEA,QAAQ,CACX,CAAC;EACD,IAAAU,kBAAS,EAAE,MAAM;IAChB,MAAMC,YAAY,GAAGP,SAAS,EAAEO,YAAY,CAACC,OAAO;IACpD,MAAMC,iBAAiB,GAAGF,YAAY,EAAEX,QAAQ,KAAKA,QAAQ;IAC7D,IACCa,iBAAiB,IACjB,CAAEZ,UAAU,IACZ,CAAEG,SAAS,IACX,CAAEE,oBAAoB,IACtB,CAAEJ,kBAAkB,EACnB;MACD;IACD;IACAE,SAAS,CAACU,eAAe,CAAEX,UAAW,CAAC;IACvCQ,YAAY,CAACX,QAAQ,GAAGA,QAAQ;EACjC,CAAC,EAAE,CACFC,UAAU,EACVG,SAAS,EACTE,oBAAoB,EACpBH,UAAU,EACVD,kBAAkB,EAClBF,QAAQ,CACP,CAAC;AACJ,CAAC;AAAC,IAAAe,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEalB,sBAAsB"}
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.default = void 0;
7
+ exports.default = BlockListAppender;
8
8
  var _react = require("react");
9
9
  var _classnames = _interopRequireDefault(require("classnames"));
10
10
  var _data = require("@wordpress/data");
@@ -42,56 +42,12 @@ function DefaultAppender({
42
42
  className: "block-list-appender__toggle"
43
43
  });
44
44
  }
45
- function useAppender(rootClientId, CustomAppender) {
46
- const isVisible = (0, _data.useSelect)(select => {
47
- const {
48
- getTemplateLock,
49
- getSelectedBlockClientId,
50
- __unstableGetEditorMode,
51
- getBlockEditingMode
52
- } = select(_store.store);
53
- if (!CustomAppender) {
54
- const selectedBlockClientId = getSelectedBlockClientId();
55
- const isParentSelected = rootClientId === selectedBlockClientId || !rootClientId && !selectedBlockClientId;
56
- if (!isParentSelected) {
57
- return false;
58
- }
59
- }
60
- if (getTemplateLock(rootClientId) || getBlockEditingMode(rootClientId) === 'disabled' || __unstableGetEditorMode() === 'zoom-out') {
61
- return false;
62
- }
63
- return true;
64
- }, [rootClientId, CustomAppender]);
65
- if (!isVisible) {
66
- return null;
67
- }
68
- return CustomAppender ? (0, _react.createElement)(CustomAppender, null) : (0, _react.createElement)(DefaultAppender, {
69
- rootClientId: rootClientId
70
- });
71
- }
72
45
  function BlockListAppender({
73
46
  rootClientId,
74
- renderAppender,
47
+ CustomAppender,
75
48
  className,
76
49
  tagName: TagName = 'div'
77
50
  }) {
78
- if (renderAppender === false) {
79
- return null;
80
- }
81
- return (0, _react.createElement)(BlockListAppenderInner, {
82
- rootClientId: rootClientId,
83
- renderAppender: renderAppender,
84
- className: className,
85
- tagName: TagName
86
- });
87
- }
88
- function BlockListAppenderInner({
89
- rootClientId,
90
- renderAppender,
91
- className,
92
- tagName: TagName
93
- }) {
94
- const appender = useAppender(rootClientId, renderAppender);
95
51
  const isDragOver = (0, _data.useSelect)(select => {
96
52
  const {
97
53
  getBlockInsertionPoint,
@@ -104,9 +60,6 @@ function BlockListAppenderInner({
104
60
  // the DnD utility hooks.
105
61
  return isBlockInsertionPointVisible() && rootClientId === insertionPoint?.rootClientId && getBlockCount(rootClientId) === 0;
106
62
  }, [rootClientId]);
107
- if (!appender) {
108
- return null;
109
- }
110
63
  return (0, _react.createElement)(TagName
111
64
  // A `tabIndex` is used on the wrapping `div` element in order to
112
65
  // force a focus event to occur when an appender `button` element
@@ -136,8 +89,8 @@ function BlockListAppenderInner({
136
89
  // have commonly targeted that attribute for margins.
137
90
  ,
138
91
  "data-block": true
139
- }, appender);
92
+ }, CustomAppender ? (0, _react.createElement)(CustomAppender, null) : (0, _react.createElement)(DefaultAppender, {
93
+ rootClientId: rootClientId
94
+ }));
140
95
  }
141
- var _default = BlockListAppender;
142
- exports.default = _default;
143
96
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_classnames","_interopRequireDefault","require","_data","_blocks","_defaultBlockAppender","_buttonBlockAppender","_store","DefaultAppender","rootClientId","canInsertDefaultBlock","useSelect","select","blockEditorStore","canInsertBlockType","getDefaultBlockName","_react","createElement","default","className","useAppender","CustomAppender","isVisible","getTemplateLock","getSelectedBlockClientId","__unstableGetEditorMode","getBlockEditingMode","selectedBlockClientId","isParentSelected","BlockListAppender","renderAppender","tagName","TagName","BlockListAppenderInner","appender","isDragOver","getBlockInsertionPoint","isBlockInsertionPointVisible","getBlockCount","insertionPoint","tabIndex","classnames","contentEditable","_default","exports"],"sources":["@wordpress/block-editor/src/components/block-list-appender/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { getDefaultBlockName } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport DefaultBlockAppender from '../default-block-appender';\nimport ButtonBlockAppender from '../button-block-appender';\nimport { store as blockEditorStore } from '../../store';\n\nfunction DefaultAppender( { rootClientId } ) {\n\tconst canInsertDefaultBlock = useSelect( ( select ) =>\n\t\tselect( blockEditorStore ).canInsertBlockType(\n\t\t\tgetDefaultBlockName(),\n\t\t\trootClientId\n\t\t)\n\t);\n\n\tif ( canInsertDefaultBlock ) {\n\t\t// Render the default block appender if the context supports use\n\t\t// of the default appender.\n\t\treturn <DefaultBlockAppender rootClientId={ rootClientId } />;\n\t}\n\n\t// Fallback in case the default block can't be inserted.\n\treturn (\n\t\t<ButtonBlockAppender\n\t\t\trootClientId={ rootClientId }\n\t\t\tclassName=\"block-list-appender__toggle\"\n\t\t/>\n\t);\n}\n\nfunction useAppender( rootClientId, CustomAppender ) {\n\tconst isVisible = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetTemplateLock,\n\t\t\t\tgetSelectedBlockClientId,\n\t\t\t\t__unstableGetEditorMode,\n\t\t\t\tgetBlockEditingMode,\n\t\t\t} = select( blockEditorStore );\n\n\t\t\tif ( ! CustomAppender ) {\n\t\t\t\tconst selectedBlockClientId = getSelectedBlockClientId();\n\t\t\t\tconst isParentSelected =\n\t\t\t\t\trootClientId === selectedBlockClientId ||\n\t\t\t\t\t( ! rootClientId && ! selectedBlockClientId );\n\t\t\t\tif ( ! isParentSelected ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\tgetTemplateLock( rootClientId ) ||\n\t\t\t\tgetBlockEditingMode( rootClientId ) === 'disabled' ||\n\t\t\t\t__unstableGetEditorMode() === 'zoom-out'\n\t\t\t) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn true;\n\t\t},\n\t\t[ rootClientId, CustomAppender ]\n\t);\n\n\tif ( ! isVisible ) {\n\t\treturn null;\n\t}\n\n\treturn CustomAppender ? (\n\t\t<CustomAppender />\n\t) : (\n\t\t<DefaultAppender rootClientId={ rootClientId } />\n\t);\n}\n\nfunction BlockListAppender( {\n\trootClientId,\n\trenderAppender,\n\tclassName,\n\ttagName: TagName = 'div',\n} ) {\n\tif ( renderAppender === false ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<BlockListAppenderInner\n\t\t\trootClientId={ rootClientId }\n\t\t\trenderAppender={ renderAppender }\n\t\t\tclassName={ className }\n\t\t\ttagName={ TagName }\n\t\t/>\n\t);\n}\n\nfunction BlockListAppenderInner( {\n\trootClientId,\n\trenderAppender,\n\tclassName,\n\ttagName: TagName,\n} ) {\n\tconst appender = useAppender( rootClientId, renderAppender );\n\tconst isDragOver = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlockInsertionPoint,\n\t\t\t\tisBlockInsertionPointVisible,\n\t\t\t\tgetBlockCount,\n\t\t\t} = select( blockEditorStore );\n\t\t\tconst insertionPoint = getBlockInsertionPoint();\n\t\t\t// Ideally we should also check for `isDragging` but currently it\n\t\t\t// requires a lot more setup. We can revisit this once we refactor\n\t\t\t// the DnD utility hooks.\n\t\t\treturn (\n\t\t\t\tisBlockInsertionPointVisible() &&\n\t\t\t\trootClientId === insertionPoint?.rootClientId &&\n\t\t\t\tgetBlockCount( rootClientId ) === 0\n\t\t\t);\n\t\t},\n\t\t[ rootClientId ]\n\t);\n\n\tif ( ! appender ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<TagName\n\t\t\t// A `tabIndex` is used on the wrapping `div` element in order to\n\t\t\t// force a focus event to occur when an appender `button` element\n\t\t\t// is clicked. In some browsers (Firefox, Safari), button clicks do\n\t\t\t// not emit a focus event, which could cause this event to propagate\n\t\t\t// unexpectedly. The `tabIndex` ensures that the interaction is\n\t\t\t// captured as a focus, without also adding an extra tab stop.\n\t\t\t//\n\t\t\t// See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#Clicking_and_focus\n\t\t\ttabIndex={ -1 }\n\t\t\tclassName={ classnames( 'block-list-appender wp-block', className, {\n\t\t\t\t'is-drag-over': isDragOver,\n\t\t\t} ) }\n\t\t\t// Needed in case the whole editor is content editable (for multi\n\t\t\t// selection). It fixes an edge case where ArrowDown and ArrowRight\n\t\t\t// should collapse the selection to the end of that selection and\n\t\t\t// not into the appender.\n\t\t\tcontentEditable={ false }\n\t\t\t// The appender exists to let you add the first Paragraph before\n\t\t\t// any is inserted. To that end, this appender should visually be\n\t\t\t// presented as a block. That means theme CSS should style it as if\n\t\t\t// it were an empty paragraph block. That means a `wp-block` class to\n\t\t\t// ensure the width is correct, and a [data-block] attribute to ensure\n\t\t\t// the correct margin is applied, especially for classic themes which\n\t\t\t// have commonly targeted that attribute for margins.\n\t\t\tdata-block\n\t\t>\n\t\t\t{ appender }\n\t\t</TagName>\n\t);\n}\n\nexport default BlockListAppender;\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAKA,IAAAG,qBAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,oBAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AAhBA;AACA;AACA;;AAGA;AACA;AACA;;AAIA;AACA;AACA;;AAKA,SAASM,eAAeA,CAAE;EAAEC;AAAa,CAAC,EAAG;EAC5C,MAAMC,qBAAqB,GAAG,IAAAC,eAAS,EAAIC,MAAM,IAChDA,MAAM,CAAEC,YAAiB,CAAC,CAACC,kBAAkB,CAC5C,IAAAC,2BAAmB,EAAC,CAAC,EACrBN,YACD,CACD,CAAC;EAED,IAAKC,qBAAqB,EAAG;IAC5B;IACA;IACA,OAAO,IAAAM,MAAA,CAAAC,aAAA,EAACZ,qBAAA,CAAAa,OAAoB;MAACT,YAAY,EAAGA;IAAc,CAAE,CAAC;EAC9D;;EAEA;EACA,OACC,IAAAO,MAAA,CAAAC,aAAA,EAACX,oBAAA,CAAAY,OAAmB;IACnBT,YAAY,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B,cAAc,EAAGA,cAAgB;IACjCX,SAAS,EAAGA,SAAW;IACvBY,OAAO,EAAGC;EAAS,CACnB,CAAC;AAEJ;AAEA,SAASC,sBAAsBA,CAAE;EAChCxB,YAAY;EACZqB,cAAc;EACdX,SAAS;EACTY,OAAO,EAAEC;AACV,CAAC,EAAG;EACH,MAAME,QAAQ,GAAGd,WAAW,CAAEX,YAAY,EAAEqB,cAAe,CAAC;EAC5D,MAAMK,UAAU,GAAG,IAAAxB,eAAS,EACzBC,MAAM,IAAM;IACb,MAAM;MACLwB,sBAAsB;MACtBC,4BAA4B;MAC5BC;IACD,CAAC,GAAG1B,MAAM,CAAEC,YAAiB,CAAC;IAC9B,MAAM0B,cAAc,GAAGH,sBAAsB,CAAC,CAAC;IAC/C;IACA;IACA;IACA,OACCC,4BAA4B,CAAC,CAAC,IAC9B5B,YAAY,KAAK8B,cAAc,EAAE9B,YAAY,IAC7C6B,aAAa,CAAE7B,YAAa,CAAC,KAAK,CAAC;EAErC,CAAC,EACD,CAAEA,YAAY,CACf,CAAC;EAED,IAAK,CAAEyB,QAAQ,EAAG;IACjB,OAAO,IAAI;EACZ;EAEA,OACC,IAAAlB,MAAA,CAAAC,aAAA,EAACe;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAAA;IACAQ,QAAQ,EAAG,CAAC,CAAG;IACfrB,SAAS,EAAG,IAAAsB,mBAAU,EAAE,8BAA8B,EAAEtB,SAAS,EAAE;MAClE,cAAc,EAAEgB;IACjB,CAAE;IACF;IACA;IACA;IACA;IAAA;IACAO,eAAe,EAAG;IAClB;IACA;IACA;IACA;IACA;IACA;IACA;IAAA;IACA;EAAU,GAERR,QACM,CAAC;AAEZ;AAAC,IAAAS,QAAA,GAEcd,iBAAiB;AAAAe,OAAA,CAAA1B,OAAA,GAAAyB,QAAA"}
1
+ {"version":3,"names":["_classnames","_interopRequireDefault","require","_data","_blocks","_defaultBlockAppender","_buttonBlockAppender","_store","DefaultAppender","rootClientId","canInsertDefaultBlock","useSelect","select","blockEditorStore","canInsertBlockType","getDefaultBlockName","_react","createElement","default","className","BlockListAppender","CustomAppender","tagName","TagName","isDragOver","getBlockInsertionPoint","isBlockInsertionPointVisible","getBlockCount","insertionPoint","tabIndex","classnames","contentEditable"],"sources":["@wordpress/block-editor/src/components/block-list-appender/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { getDefaultBlockName } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport DefaultBlockAppender from '../default-block-appender';\nimport ButtonBlockAppender from '../button-block-appender';\nimport { store as blockEditorStore } from '../../store';\n\nfunction DefaultAppender( { rootClientId } ) {\n\tconst canInsertDefaultBlock = useSelect( ( select ) =>\n\t\tselect( blockEditorStore ).canInsertBlockType(\n\t\t\tgetDefaultBlockName(),\n\t\t\trootClientId\n\t\t)\n\t);\n\n\tif ( canInsertDefaultBlock ) {\n\t\t// Render the default block appender if the context supports use\n\t\t// of the default appender.\n\t\treturn <DefaultBlockAppender rootClientId={ rootClientId } />;\n\t}\n\n\t// Fallback in case the default block can't be inserted.\n\treturn (\n\t\t<ButtonBlockAppender\n\t\t\trootClientId={ rootClientId }\n\t\t\tclassName=\"block-list-appender__toggle\"\n\t\t/>\n\t);\n}\n\nexport default function BlockListAppender( {\n\trootClientId,\n\tCustomAppender,\n\tclassName,\n\ttagName: TagName = 'div',\n} ) {\n\tconst isDragOver = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlockInsertionPoint,\n\t\t\t\tisBlockInsertionPointVisible,\n\t\t\t\tgetBlockCount,\n\t\t\t} = select( blockEditorStore );\n\t\t\tconst insertionPoint = getBlockInsertionPoint();\n\t\t\t// Ideally we should also check for `isDragging` but currently it\n\t\t\t// requires a lot more setup. We can revisit this once we refactor\n\t\t\t// the DnD utility hooks.\n\t\t\treturn (\n\t\t\t\tisBlockInsertionPointVisible() &&\n\t\t\t\trootClientId === insertionPoint?.rootClientId &&\n\t\t\t\tgetBlockCount( rootClientId ) === 0\n\t\t\t);\n\t\t},\n\t\t[ rootClientId ]\n\t);\n\n\treturn (\n\t\t<TagName\n\t\t\t// A `tabIndex` is used on the wrapping `div` element in order to\n\t\t\t// force a focus event to occur when an appender `button` element\n\t\t\t// is clicked. In some browsers (Firefox, Safari), button clicks do\n\t\t\t// not emit a focus event, which could cause this event to propagate\n\t\t\t// unexpectedly. The `tabIndex` ensures that the interaction is\n\t\t\t// captured as a focus, without also adding an extra tab stop.\n\t\t\t//\n\t\t\t// See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#Clicking_and_focus\n\t\t\ttabIndex={ -1 }\n\t\t\tclassName={ classnames( 'block-list-appender wp-block', className, {\n\t\t\t\t'is-drag-over': isDragOver,\n\t\t\t} ) }\n\t\t\t// Needed in case the whole editor is content editable (for multi\n\t\t\t// selection). It fixes an edge case where ArrowDown and ArrowRight\n\t\t\t// should collapse the selection to the end of that selection and\n\t\t\t// not into the appender.\n\t\t\tcontentEditable={ false }\n\t\t\t// The appender exists to let you add the first Paragraph before\n\t\t\t// any is inserted. To that end, this appender should visually be\n\t\t\t// presented as a block. That means theme CSS should style it as if\n\t\t\t// it were an empty paragraph block. That means a `wp-block` class to\n\t\t\t// ensure the width is correct, and a [data-block] attribute to ensure\n\t\t\t// the correct margin is applied, especially for classic themes which\n\t\t\t// have commonly targeted that attribute for margins.\n\t\t\tdata-block\n\t\t>\n\t\t\t{ CustomAppender ? (\n\t\t\t\t<CustomAppender />\n\t\t\t) : (\n\t\t\t\t<DefaultAppender rootClientId={ rootClientId } />\n\t\t\t) }\n\t\t</TagName>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAKA,IAAAG,qBAAA,GAAAJ,sBAAA,CAAAC,OA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,EAAG,CAAC,CAAG;IACfV,SAAS,EAAG,IAAAW,mBAAU,EAAE,8BAA8B,EAAEX,SAAS,EAAE;MAClE,cAAc,EAAEK;IACjB,CAAE;IACF;IACA;IACA;IACA;IAAA;IACAO,eAAe,EAAG;IAClB;IACA;IACA;IACA;IACA;IACA;IACA;IAAA;IACA;EAAU,GAERV,cAAc,GACf,IAAAL,MAAA,CAAAC,aAAA,EAACI,cAAc,MAAE,CAAC,GAElB,IAAAL,MAAA,CAAAC,aAAA,EAACT,eAAe;IAACC,YAAY,EAAGA;EAAc,CAAE,CAEzC,CAAC;AAEZ"}
@@ -24,26 +24,16 @@ var _styles = _interopRequireDefault(require("./styles.scss"));
24
24
  * Internal dependencies
25
25
  */
26
26
 
27
- const MEDIA_UPLOAD_STATE_UPLOADING = 1;
28
- exports.MEDIA_UPLOAD_STATE_UPLOADING = MEDIA_UPLOAD_STATE_UPLOADING;
29
- const MEDIA_UPLOAD_STATE_SUCCEEDED = 2;
30
- exports.MEDIA_UPLOAD_STATE_SUCCEEDED = MEDIA_UPLOAD_STATE_SUCCEEDED;
31
- const MEDIA_UPLOAD_STATE_FAILED = 3;
32
- exports.MEDIA_UPLOAD_STATE_FAILED = MEDIA_UPLOAD_STATE_FAILED;
33
- const MEDIA_UPLOAD_STATE_RESET = 4;
34
- exports.MEDIA_UPLOAD_STATE_RESET = MEDIA_UPLOAD_STATE_RESET;
35
- const MEDIA_SAVE_STATE_SAVING = 5;
36
- exports.MEDIA_SAVE_STATE_SAVING = MEDIA_SAVE_STATE_SAVING;
37
- const MEDIA_SAVE_STATE_SUCCEEDED = 6;
38
- exports.MEDIA_SAVE_STATE_SUCCEEDED = MEDIA_SAVE_STATE_SUCCEEDED;
39
- const MEDIA_SAVE_STATE_FAILED = 7;
40
- exports.MEDIA_SAVE_STATE_FAILED = MEDIA_SAVE_STATE_FAILED;
41
- const MEDIA_SAVE_STATE_RESET = 8;
42
- exports.MEDIA_SAVE_STATE_RESET = MEDIA_SAVE_STATE_RESET;
43
- const MEDIA_SAVE_FINAL_STATE_RESULT = 9;
44
- exports.MEDIA_SAVE_FINAL_STATE_RESULT = MEDIA_SAVE_FINAL_STATE_RESULT;
45
- const MEDIA_SAVE_MEDIAID_CHANGED = 10;
46
- exports.MEDIA_SAVE_MEDIAID_CHANGED = MEDIA_SAVE_MEDIAID_CHANGED;
27
+ const MEDIA_UPLOAD_STATE_UPLOADING = exports.MEDIA_UPLOAD_STATE_UPLOADING = 1;
28
+ const MEDIA_UPLOAD_STATE_SUCCEEDED = exports.MEDIA_UPLOAD_STATE_SUCCEEDED = 2;
29
+ const MEDIA_UPLOAD_STATE_FAILED = exports.MEDIA_UPLOAD_STATE_FAILED = 3;
30
+ const MEDIA_UPLOAD_STATE_RESET = exports.MEDIA_UPLOAD_STATE_RESET = 4;
31
+ const MEDIA_SAVE_STATE_SAVING = exports.MEDIA_SAVE_STATE_SAVING = 5;
32
+ const MEDIA_SAVE_STATE_SUCCEEDED = exports.MEDIA_SAVE_STATE_SUCCEEDED = 6;
33
+ const MEDIA_SAVE_STATE_FAILED = exports.MEDIA_SAVE_STATE_FAILED = 7;
34
+ const MEDIA_SAVE_STATE_RESET = exports.MEDIA_SAVE_STATE_RESET = 8;
35
+ const MEDIA_SAVE_FINAL_STATE_RESULT = exports.MEDIA_SAVE_FINAL_STATE_RESULT = 9;
36
+ const MEDIA_SAVE_MEDIAID_CHANGED = exports.MEDIA_SAVE_MEDIAID_CHANGED = 10;
47
37
  class BlockMediaUpdateProgress extends _element.Component {
48
38
  constructor(props) {
49
39
  super(props);
@@ -291,6 +281,5 @@ class BlockMediaUpdateProgress extends _element.Component {
291
281
  }
292
282
  }
293
283
  exports.BlockMediaUpdateProgress = BlockMediaUpdateProgress;
294
- var _default = BlockMediaUpdateProgress;
295
- exports.default = _default;
284
+ var _default = exports.default = BlockMediaUpdateProgress;
296
285
  //# sourceMappingURL=index.native.js.map