@wordpress/block-editor 12.10.3 → 12.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1253) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/README.md +13 -11
  3. package/build/autocompleters/block.js +3 -2
  4. package/build/autocompleters/block.js.map +1 -1
  5. package/build/autocompleters/link.js +3 -3
  6. package/build/autocompleters/link.js.map +1 -1
  7. package/build/components/alignment-control/index.js +3 -3
  8. package/build/components/alignment-control/index.js.map +1 -1
  9. package/build/components/alignment-control/ui.js +2 -2
  10. package/build/components/alignment-control/ui.js.map +1 -1
  11. package/build/components/autocomplete/index.js +3 -2
  12. package/build/components/autocomplete/index.js.map +1 -1
  13. package/build/components/block-actions/index.js +2 -2
  14. package/build/components/block-actions/index.js.map +1 -1
  15. package/build/components/block-alignment-control/index.js +3 -3
  16. package/build/components/block-alignment-control/index.js.map +1 -1
  17. package/build/components/block-alignment-control/ui.js +4 -4
  18. package/build/components/block-alignment-control/ui.js.map +1 -1
  19. package/build/components/block-alignment-control/ui.native.js +2 -2
  20. package/build/components/block-alignment-control/ui.native.js.map +1 -1
  21. package/build/components/block-alignment-matrix-control/index.js +5 -5
  22. package/build/components/block-alignment-matrix-control/index.js.map +1 -1
  23. package/build/components/block-breadcrumb/index.js +12 -12
  24. package/build/components/block-breadcrumb/index.js.map +1 -1
  25. package/build/components/block-canvas/index.js +13 -15
  26. package/build/components/block-canvas/index.js.map +1 -1
  27. package/build/components/block-caption/index.native.js +3 -3
  28. package/build/components/block-caption/index.native.js.map +1 -1
  29. package/build/components/block-card/index.js +7 -7
  30. package/build/components/block-card/index.js.map +1 -1
  31. package/build/components/block-compare/block-view.js +9 -8
  32. package/build/components/block-compare/block-view.js.map +1 -1
  33. package/build/components/block-compare/index.js +5 -5
  34. package/build/components/block-compare/index.js.map +1 -1
  35. package/build/components/block-context/index.js +2 -1
  36. package/build/components/block-context/index.js.map +1 -1
  37. package/build/components/block-controls/fill.js +5 -5
  38. package/build/components/block-controls/fill.js.map +1 -1
  39. package/build/components/block-controls/index.js +3 -3
  40. package/build/components/block-controls/index.js.map +1 -1
  41. package/build/components/block-controls/slot.js +3 -2
  42. package/build/components/block-controls/slot.js.map +1 -1
  43. package/build/components/block-controls/slot.native.js +4 -4
  44. package/build/components/block-controls/slot.native.js.map +1 -1
  45. package/build/components/block-draggable/draggable-chip.js +6 -6
  46. package/build/components/block-draggable/draggable-chip.js.map +1 -1
  47. package/build/components/block-draggable/draggable-chip.native.js +4 -4
  48. package/build/components/block-draggable/draggable-chip.native.js.map +1 -1
  49. package/build/components/block-draggable/dropping-insertion-point.native.js +2 -2
  50. package/build/components/block-draggable/dropping-insertion-point.native.js.map +1 -1
  51. package/build/components/block-draggable/index.js +4 -3
  52. package/build/components/block-draggable/index.js.map +1 -1
  53. package/build/components/block-draggable/index.native.js +9 -8
  54. package/build/components/block-draggable/index.native.js.map +1 -1
  55. package/build/components/block-edit/edit.js +5 -4
  56. package/build/components/block-edit/edit.js.map +1 -1
  57. package/build/components/block-edit/edit.native.js +3 -2
  58. package/build/components/block-edit/edit.native.js.map +1 -1
  59. package/build/components/block-edit/index.js +3 -2
  60. package/build/components/block-edit/index.js.map +1 -1
  61. package/build/components/block-edit-visually-button/index.js +2 -2
  62. package/build/components/block-edit-visually-button/index.js.map +1 -1
  63. package/build/components/block-full-height-alignment-control/index.js +2 -2
  64. package/build/components/block-full-height-alignment-control/index.js.map +1 -1
  65. package/build/components/block-heading-level-dropdown/heading-level-icon.js +4 -4
  66. package/build/components/block-heading-level-dropdown/heading-level-icon.js.map +1 -1
  67. package/build/components/block-heading-level-dropdown/index.js +6 -6
  68. package/build/components/block-heading-level-dropdown/index.js.map +1 -1
  69. package/build/components/block-heading-level-dropdown/index.native.js +6 -6
  70. package/build/components/block-heading-level-dropdown/index.native.js.map +1 -1
  71. package/build/components/block-icon/index.js +4 -3
  72. package/build/components/block-icon/index.js.map +1 -1
  73. package/build/components/block-icon/index.native.js +3 -3
  74. package/build/components/block-icon/index.native.js.map +1 -1
  75. package/build/components/block-info-slot-fill/index.js +3 -3
  76. package/build/components/block-info-slot-fill/index.js.map +1 -1
  77. package/build/components/block-inspector/index.js +34 -34
  78. package/build/components/block-inspector/index.js.map +1 -1
  79. package/build/components/block-list/block-crash-warning.js +2 -2
  80. package/build/components/block-list/block-crash-warning.js.map +1 -1
  81. package/build/components/block-list/block-html.js +3 -2
  82. package/build/components/block-list/block-html.js.map +1 -1
  83. package/build/components/block-list/block-invalid-warning.js +6 -5
  84. package/build/components/block-list/block-invalid-warning.js.map +1 -1
  85. package/build/components/block-list/block-invalid-warning.native.js +3 -3
  86. package/build/components/block-list/block-invalid-warning.native.js.map +1 -1
  87. package/build/components/block-list/block-list-item-cell.native.js +3 -2
  88. package/build/components/block-list/block-list-item-cell.native.js.map +1 -1
  89. package/build/components/block-list/block-list-item.native.js +10 -10
  90. package/build/components/block-list/block-list-item.native.js.map +1 -1
  91. package/build/components/block-list/block-outline.native.js +2 -2
  92. package/build/components/block-list/block-outline.native.js.map +1 -1
  93. package/build/components/block-list/block-selection-button.native.js +9 -9
  94. package/build/components/block-list/block-selection-button.native.js.map +1 -1
  95. package/build/components/block-list/block.js +16 -15
  96. package/build/components/block-list/block.js.map +1 -1
  97. package/build/components/block-list/block.native.js +10 -9
  98. package/build/components/block-list/block.native.js.map +1 -1
  99. package/build/components/block-list/grid-item.native.js +2 -2
  100. package/build/components/block-list/grid-item.native.js.map +1 -1
  101. package/build/components/block-list/index.js +14 -13
  102. package/build/components/block-list/index.js.map +1 -1
  103. package/build/components/block-list/index.native.js +21 -20
  104. package/build/components/block-list/index.native.js.map +1 -1
  105. package/build/components/block-list/insertion-point.native.js +5 -5
  106. package/build/components/block-list/insertion-point.native.js.map +1 -1
  107. package/build/components/block-list/layout.js +3 -2
  108. package/build/components/block-list/layout.js.map +1 -1
  109. package/build/components/block-list/subdirectory-icon.js +3 -3
  110. package/build/components/block-list/subdirectory-icon.js.map +1 -1
  111. package/build/components/block-list-appender/index.js +5 -5
  112. package/build/components/block-list-appender/index.js.map +1 -1
  113. package/build/components/block-list-appender/index.native.js +4 -4
  114. package/build/components/block-list-appender/index.native.js.map +1 -1
  115. package/build/components/block-lock/menu-item.js +4 -3
  116. package/build/components/block-lock/menu-item.js.map +1 -1
  117. package/build/components/block-lock/modal.js +21 -20
  118. package/build/components/block-lock/modal.js.map +1 -1
  119. package/build/components/block-lock/toolbar.js +5 -4
  120. package/build/components/block-lock/toolbar.js.map +1 -1
  121. package/build/components/block-media-update-progress/index.native.js +5 -4
  122. package/build/components/block-media-update-progress/index.native.js.map +1 -1
  123. package/build/components/block-mover/button.js +6 -5
  124. package/build/components/block-mover/button.js.map +1 -1
  125. package/build/components/block-mover/index.js +7 -7
  126. package/build/components/block-mover/index.js.map +1 -1
  127. package/build/components/block-mover/index.native.js +5 -4
  128. package/build/components/block-mover/index.native.js.map +1 -1
  129. package/build/components/block-navigation/dropdown.js +8 -7
  130. package/build/components/block-navigation/dropdown.js.map +1 -1
  131. package/build/components/block-parent-selector/index.js +6 -5
  132. package/build/components/block-parent-selector/index.js.map +1 -1
  133. package/build/components/block-pattern-setup/index.js +20 -19
  134. package/build/components/block-pattern-setup/index.js.map +1 -1
  135. package/build/components/block-pattern-setup/setup-toolbar.js +12 -12
  136. package/build/components/block-pattern-setup/setup-toolbar.js.map +1 -1
  137. package/build/components/block-patterns-list/index.js +19 -18
  138. package/build/components/block-patterns-list/index.js.map +1 -1
  139. package/build/components/block-patterns-paging/index.js +12 -12
  140. package/build/components/block-patterns-paging/index.js.map +1 -1
  141. package/build/components/block-popover/drop-zone.js +3 -3
  142. package/build/components/block-popover/drop-zone.js.map +1 -1
  143. package/build/components/block-popover/inbetween.js +4 -3
  144. package/build/components/block-popover/inbetween.js.map +1 -1
  145. package/build/components/block-popover/index.js +4 -3
  146. package/build/components/block-popover/index.js.map +1 -1
  147. package/build/components/block-preview/auto.js +9 -8
  148. package/build/components/block-preview/auto.js.map +1 -1
  149. package/build/components/block-preview/index.js +7 -6
  150. package/build/components/block-preview/index.js.map +1 -1
  151. package/build/components/block-quick-navigation/index.js +7 -7
  152. package/build/components/block-quick-navigation/index.js.map +1 -1
  153. package/build/components/block-removal-warning-modal/index.js +7 -6
  154. package/build/components/block-removal-warning-modal/index.js.map +1 -1
  155. package/build/components/block-selection-clearer/index.js +2 -2
  156. package/build/components/block-selection-clearer/index.js.map +1 -1
  157. package/build/components/block-settings/button.native.js +3 -3
  158. package/build/components/block-settings/button.native.js.map +1 -1
  159. package/build/components/block-settings/container.native.js +12 -12
  160. package/build/components/block-settings/container.native.js.map +1 -1
  161. package/build/components/block-settings-menu/block-html-convert-button.js +21 -17
  162. package/build/components/block-settings-menu/block-html-convert-button.js.map +1 -1
  163. package/build/components/block-settings-menu/block-mode-toggle.js +2 -2
  164. package/build/components/block-settings-menu/block-mode-toggle.js.map +1 -1
  165. package/build/components/block-settings-menu/block-settings-dropdown.js +17 -16
  166. package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  167. package/build/components/block-settings-menu/index.js +2 -2
  168. package/build/components/block-settings-menu/index.js.map +1 -1
  169. package/build/components/block-settings-menu-controls/index.js +9 -9
  170. package/build/components/block-settings-menu-controls/index.js.map +1 -1
  171. package/build/components/block-styles/index.js +9 -8
  172. package/build/components/block-styles/index.js.map +1 -1
  173. package/build/components/block-styles/index.native.js +4 -3
  174. package/build/components/block-styles/index.native.js.map +1 -1
  175. package/build/components/block-styles/menu-items.js +4 -4
  176. package/build/components/block-styles/menu-items.js.map +1 -1
  177. package/build/components/block-styles/preview-panel.js +3 -2
  178. package/build/components/block-styles/preview-panel.js.map +1 -1
  179. package/build/components/block-styles/preview.native.js +8 -7
  180. package/build/components/block-styles/preview.native.js.map +1 -1
  181. package/build/components/block-switcher/block-styles-menu.js +3 -3
  182. package/build/components/block-switcher/block-styles-menu.js.map +1 -1
  183. package/build/components/block-switcher/block-transformations-menu.js +11 -10
  184. package/build/components/block-switcher/block-transformations-menu.js.map +1 -1
  185. package/build/components/block-switcher/block-transformations-menu.native.js +2 -2
  186. package/build/components/block-switcher/block-transformations-menu.native.js.map +1 -1
  187. package/build/components/block-switcher/block-variation-transformations.js +6 -5
  188. package/build/components/block-switcher/block-variation-transformations.js.map +1 -1
  189. package/build/components/block-switcher/index.js +17 -17
  190. package/build/components/block-switcher/index.js.map +1 -1
  191. package/build/components/block-switcher/pattern-transformations-menu.js +18 -17
  192. package/build/components/block-switcher/pattern-transformations-menu.js.map +1 -1
  193. package/build/components/block-switcher/preview-block-popover.js +7 -7
  194. package/build/components/block-switcher/preview-block-popover.js.map +1 -1
  195. package/build/components/block-toolbar/block-toolbar-menu.native.js +6 -5
  196. package/build/components/block-toolbar/block-toolbar-menu.native.js.map +1 -1
  197. package/build/components/block-toolbar/index.js +16 -15
  198. package/build/components/block-toolbar/index.js.map +1 -1
  199. package/build/components/block-toolbar/index.native.js +8 -7
  200. package/build/components/block-toolbar/index.native.js.map +1 -1
  201. package/build/components/block-tools/back-compat.js +3 -2
  202. package/build/components/block-tools/back-compat.js.map +1 -1
  203. package/build/components/block-tools/block-contextual-toolbar.js +6 -5
  204. package/build/components/block-tools/block-contextual-toolbar.js.map +1 -1
  205. package/build/components/block-tools/block-selection-button.js +11 -10
  206. package/build/components/block-tools/block-selection-button.js.map +1 -1
  207. package/build/components/block-tools/index.js +10 -9
  208. package/build/components/block-tools/index.js.map +1 -1
  209. package/build/components/block-tools/insertion-point.js +9 -8
  210. package/build/components/block-tools/insertion-point.js.map +1 -1
  211. package/build/components/block-tools/selected-block-popover.js +9 -8
  212. package/build/components/block-tools/selected-block-popover.js.map +1 -1
  213. package/build/components/block-tools/zoom-out-mode-inserters.js +5 -4
  214. package/build/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
  215. package/build/components/block-types-list/index.js +4 -4
  216. package/build/components/block-types-list/index.js.map +1 -1
  217. package/build/components/block-types-list/index.native.js +11 -10
  218. package/build/components/block-types-list/index.native.js.map +1 -1
  219. package/build/components/block-variation-picker/index.js +8 -8
  220. package/build/components/block-variation-picker/index.js.map +1 -1
  221. package/build/components/block-variation-picker/index.native.js +8 -8
  222. package/build/components/block-variation-picker/index.native.js.map +1 -1
  223. package/build/components/block-variation-transforms/index.js +10 -9
  224. package/build/components/block-variation-transforms/index.js.map +1 -1
  225. package/build/components/block-vertical-alignment-control/icons.js +11 -11
  226. package/build/components/block-vertical-alignment-control/icons.js.map +1 -1
  227. package/build/components/block-vertical-alignment-control/index.js +3 -3
  228. package/build/components/block-vertical-alignment-control/index.js.map +1 -1
  229. package/build/components/block-vertical-alignment-control/ui.js +2 -2
  230. package/build/components/block-vertical-alignment-control/ui.js.map +1 -1
  231. package/build/components/border-radius-control/all-input-control.js +2 -2
  232. package/build/components/border-radius-control/all-input-control.js.map +1 -1
  233. package/build/components/border-radius-control/index.js +10 -9
  234. package/build/components/border-radius-control/index.js.map +1 -1
  235. package/build/components/border-radius-control/input-controls.js +5 -5
  236. package/build/components/border-radius-control/input-controls.js.map +1 -1
  237. package/build/components/border-radius-control/linked-button.js +3 -3
  238. package/build/components/border-radius-control/linked-button.js.map +1 -1
  239. package/build/components/button-block-appender/index.js +7 -6
  240. package/build/components/button-block-appender/index.js.map +1 -1
  241. package/build/components/button-block-appender/index.native.js +5 -5
  242. package/build/components/button-block-appender/index.native.js.map +1 -1
  243. package/build/components/caption/index.native.js +3 -3
  244. package/build/components/caption/index.native.js.map +1 -1
  245. package/build/components/child-layout-control/index.js +8 -7
  246. package/build/components/child-layout-control/index.js.map +1 -1
  247. package/build/components/color-palette/control.js +2 -2
  248. package/build/components/color-palette/control.js.map +1 -1
  249. package/build/components/color-palette/with-color-context.js +2 -2
  250. package/build/components/color-palette/with-color-context.js.map +1 -1
  251. package/build/components/color-style-selector/index.js +9 -9
  252. package/build/components/color-style-selector/index.js.map +1 -1
  253. package/build/components/colors/with-colors.js +5 -4
  254. package/build/components/colors/with-colors.js.map +1 -1
  255. package/build/components/colors-gradients/control.js +12 -12
  256. package/build/components/colors-gradients/control.js.map +1 -1
  257. package/build/components/colors-gradients/dropdown.js +13 -13
  258. package/build/components/colors-gradients/dropdown.js.map +1 -1
  259. package/build/components/colors-gradients/panel-color-gradient-settings.js +7 -7
  260. package/build/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
  261. package/build/components/colors-gradients/panel-color-gradient-settings.native.js +5 -4
  262. package/build/components/colors-gradients/panel-color-gradient-settings.native.js.map +1 -1
  263. package/build/components/contrast-checker/index.js +3 -3
  264. package/build/components/contrast-checker/index.js.map +1 -1
  265. package/build/components/contrast-checker/index.native.js +6 -5
  266. package/build/components/contrast-checker/index.native.js.map +1 -1
  267. package/build/components/convert-to-group-buttons/index.js +3 -3
  268. package/build/components/convert-to-group-buttons/index.js.map +1 -1
  269. package/build/components/convert-to-group-buttons/toolbar.js +4 -4
  270. package/build/components/convert-to-group-buttons/toolbar.js.map +1 -1
  271. package/build/components/copy-handler/index.js +29 -209
  272. package/build/components/copy-handler/index.js.map +1 -1
  273. package/build/components/date-format-picker/index.js +9 -8
  274. package/build/components/date-format-picker/index.js.map +1 -1
  275. package/build/components/default-block-appender/index.js +4 -4
  276. package/build/components/default-block-appender/index.js.map +1 -1
  277. package/build/components/default-block-appender/index.native.js +4 -4
  278. package/build/components/default-block-appender/index.native.js.map +1 -1
  279. package/build/components/default-style-picker/index.js +4 -3
  280. package/build/components/default-style-picker/index.js.map +1 -1
  281. package/build/components/dimensions-tool/aspect-ratio-tool.js +3 -3
  282. package/build/components/dimensions-tool/aspect-ratio-tool.js.map +1 -1
  283. package/build/components/dimensions-tool/index.js +5 -4
  284. package/build/components/dimensions-tool/index.js.map +1 -1
  285. package/build/components/dimensions-tool/scale-tool.js +6 -5
  286. package/build/components/dimensions-tool/scale-tool.js.map +1 -1
  287. package/build/components/dimensions-tool/width-height-tool.js +7 -7
  288. package/build/components/dimensions-tool/width-height-tool.js.map +1 -1
  289. package/build/components/duotone-control/index.js +18 -10
  290. package/build/components/duotone-control/index.js.map +1 -1
  291. package/build/components/editable-text/index.js +3 -2
  292. package/build/components/editable-text/index.js.map +1 -1
  293. package/build/components/editor-styles/index.js +5 -4
  294. package/build/components/editor-styles/index.js.map +1 -1
  295. package/build/components/floating-toolbar/index.native.js +8 -7
  296. package/build/components/floating-toolbar/index.native.js.map +1 -1
  297. package/build/components/floating-toolbar/nav-up-icon.js +4 -4
  298. package/build/components/floating-toolbar/nav-up-icon.js.map +1 -1
  299. package/build/components/font-appearance-control/index.js +4 -3
  300. package/build/components/font-appearance-control/index.js.map +1 -1
  301. package/build/components/font-family/index.js +2 -2
  302. package/build/components/font-family/index.js.map +1 -1
  303. package/build/components/font-sizes/font-size-picker.js +2 -2
  304. package/build/components/font-sizes/font-size-picker.js.map +1 -1
  305. package/build/components/font-sizes/with-font-sizes.js +4 -3
  306. package/build/components/font-sizes/with-font-sizes.js.map +1 -1
  307. package/build/components/global-styles/advanced-panel.js +7 -6
  308. package/build/components/global-styles/advanced-panel.js.map +1 -1
  309. package/build/components/global-styles/border-panel.js +8 -7
  310. package/build/components/global-styles/border-panel.js.map +1 -1
  311. package/build/components/global-styles/color-panel.js +21 -20
  312. package/build/components/global-styles/color-panel.js.map +1 -1
  313. package/build/components/global-styles/color-panel.native.js +4 -3
  314. package/build/components/global-styles/color-panel.native.js.map +1 -1
  315. package/build/components/global-styles/dimensions-panel.js +27 -26
  316. package/build/components/global-styles/dimensions-panel.js.map +1 -1
  317. package/build/components/global-styles/effects-panel.js +23 -22
  318. package/build/components/global-styles/effects-panel.js.map +1 -1
  319. package/build/components/global-styles/filters-panel.js +17 -16
  320. package/build/components/global-styles/filters-panel.js.map +1 -1
  321. package/build/components/global-styles/image-settings-panel.js +4 -4
  322. package/build/components/global-styles/image-settings-panel.js.map +1 -1
  323. package/build/components/global-styles/typography-panel.js +22 -21
  324. package/build/components/global-styles/typography-panel.js.map +1 -1
  325. package/build/components/gradients/with-gradient.js +2 -2
  326. package/build/components/gradients/with-gradient.js.map +1 -1
  327. package/build/components/height-control/index.js +9 -8
  328. package/build/components/height-control/index.js.map +1 -1
  329. package/build/components/iframe/index.js +6 -5
  330. package/build/components/iframe/index.js.map +1 -1
  331. package/build/components/image-editor/aspect-ratio-dropdown.js +7 -7
  332. package/build/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
  333. package/build/components/image-editor/context.js +2 -1
  334. package/build/components/image-editor/context.js.map +1 -1
  335. package/build/components/image-editor/cropper.js +4 -4
  336. package/build/components/image-editor/cropper.js.map +1 -1
  337. package/build/components/image-editor/form-controls.js +3 -3
  338. package/build/components/image-editor/form-controls.js.map +1 -1
  339. package/build/components/image-editor/index.js +5 -5
  340. package/build/components/image-editor/index.js.map +1 -1
  341. package/build/components/image-editor/rotation-button.js +2 -2
  342. package/build/components/image-editor/rotation-button.js.map +1 -1
  343. package/build/components/image-editor/zoom-dropdown.js +4 -4
  344. package/build/components/image-editor/zoom-dropdown.js.map +1 -1
  345. package/build/components/image-size-control/index.js +9 -9
  346. package/build/components/image-size-control/index.js.map +1 -1
  347. package/build/components/index.js +1 -1
  348. package/build/components/index.js.map +1 -1
  349. package/build/components/inner-blocks/button-block-appender.js +2 -2
  350. package/build/components/inner-blocks/button-block-appender.js.map +1 -1
  351. package/build/components/inner-blocks/constants.native.js +13 -0
  352. package/build/components/inner-blocks/constants.native.js.map +1 -0
  353. package/build/components/inner-blocks/default-block-appender.js +2 -2
  354. package/build/components/inner-blocks/default-block-appender.js.map +1 -1
  355. package/build/components/inner-blocks/index.js +9 -8
  356. package/build/components/inner-blocks/index.js.map +1 -1
  357. package/build/components/inner-blocks/index.native.js +21 -8
  358. package/build/components/inner-blocks/index.native.js.map +1 -1
  359. package/build/components/inner-blocks/warning-max-depth-exceeded.native.js +95 -0
  360. package/build/components/inner-blocks/warning-max-depth-exceeded.native.js.map +1 -0
  361. package/build/components/inner-blocks/with-client-id.js +2 -2
  362. package/build/components/inner-blocks/with-client-id.js.map +1 -1
  363. package/build/components/inserter/block-patterns-explorer/explorer.js +7 -6
  364. package/build/components/inserter/block-patterns-explorer/explorer.js.map +1 -1
  365. package/build/components/inserter/block-patterns-explorer/patterns-list.js +6 -5
  366. package/build/components/inserter/block-patterns-explorer/patterns-list.js.map +1 -1
  367. package/build/components/inserter/block-patterns-explorer/sidebar.js +8 -8
  368. package/build/components/inserter/block-patterns-explorer/sidebar.js.map +1 -1
  369. package/build/components/inserter/block-patterns-filter.js +21 -19
  370. package/build/components/inserter/block-patterns-filter.js.map +1 -1
  371. package/build/components/inserter/block-patterns-tab.js +19 -18
  372. package/build/components/inserter/block-patterns-tab.js.map +1 -1
  373. package/build/components/inserter/block-types-tab.js +10 -9
  374. package/build/components/inserter/block-types-tab.js.map +1 -1
  375. package/build/components/inserter/block-types-tab.native.js +2 -1
  376. package/build/components/inserter/block-types-tab.native.js.map +1 -1
  377. package/build/components/inserter/index.js +9 -8
  378. package/build/components/inserter/index.js.map +1 -1
  379. package/build/components/inserter/index.native.js +11 -10
  380. package/build/components/inserter/index.native.js.map +1 -1
  381. package/build/components/inserter/library.js +3 -2
  382. package/build/components/inserter/library.js.map +1 -1
  383. package/build/components/inserter/media-tab/hooks.js +4 -33
  384. package/build/components/inserter/media-tab/hooks.js.map +1 -1
  385. package/build/components/inserter/media-tab/media-list.js +3 -3
  386. package/build/components/inserter/media-tab/media-list.js.map +1 -1
  387. package/build/components/inserter/media-tab/media-panel.js +7 -6
  388. package/build/components/inserter/media-tab/media-panel.js.map +1 -1
  389. package/build/components/inserter/media-tab/media-preview.js +18 -17
  390. package/build/components/inserter/media-tab/media-preview.js.map +1 -1
  391. package/build/components/inserter/media-tab/media-tab.js +12 -11
  392. package/build/components/inserter/media-tab/media-tab.js.map +1 -1
  393. package/build/components/inserter/media-tab/utils.js +2 -2
  394. package/build/components/inserter/media-tab/utils.js.map +1 -1
  395. package/build/components/inserter/menu.js +19 -18
  396. package/build/components/inserter/menu.js.map +1 -1
  397. package/build/components/inserter/menu.native.js +9 -8
  398. package/build/components/inserter/menu.native.js.map +1 -1
  399. package/build/components/inserter/mobile-tab-navigation.js +12 -12
  400. package/build/components/inserter/mobile-tab-navigation.js.map +1 -1
  401. package/build/components/inserter/no-results.js +4 -4
  402. package/build/components/inserter/no-results.js.map +1 -1
  403. package/build/components/inserter/no-results.native.js +4 -4
  404. package/build/components/inserter/no-results.native.js.map +1 -1
  405. package/build/components/inserter/panel.js +5 -5
  406. package/build/components/inserter/panel.js.map +1 -1
  407. package/build/components/inserter/preview-panel.js +8 -7
  408. package/build/components/inserter/preview-panel.js.map +1 -1
  409. package/build/components/inserter/quick-inserter.js +7 -6
  410. package/build/components/inserter/quick-inserter.js.map +1 -1
  411. package/build/components/inserter/reusable-block-rename-hint.js +5 -4
  412. package/build/components/inserter/reusable-block-rename-hint.js.map +1 -1
  413. package/build/components/inserter/reusable-blocks-tab.native.js +3 -2
  414. package/build/components/inserter/reusable-blocks-tab.native.js.map +1 -1
  415. package/build/components/inserter/search-results.js +11 -10
  416. package/build/components/inserter/search-results.js.map +1 -1
  417. package/build/components/inserter/search-results.native.js +4 -3
  418. package/build/components/inserter/search-results.native.js.map +1 -1
  419. package/build/components/inserter/tabs.js +2 -1
  420. package/build/components/inserter/tabs.js.map +1 -1
  421. package/build/components/inserter/tabs.native.js +7 -6
  422. package/build/components/inserter/tabs.native.js.map +1 -1
  423. package/build/components/inserter/tips.js +6 -5
  424. package/build/components/inserter/tips.js.map +1 -1
  425. package/build/components/inserter-draggable-blocks/index.js +3 -3
  426. package/build/components/inserter-draggable-blocks/index.js.map +1 -1
  427. package/build/components/inserter-list-item/index.js +9 -8
  428. package/build/components/inserter-list-item/index.js.map +1 -1
  429. package/build/components/inserter-listbox/group.js +2 -1
  430. package/build/components/inserter-listbox/group.js.map +1 -1
  431. package/build/components/inserter-listbox/index.js +2 -2
  432. package/build/components/inserter-listbox/index.js.map +1 -1
  433. package/build/components/inserter-listbox/item.js +5 -4
  434. package/build/components/inserter-listbox/item.js.map +1 -1
  435. package/build/components/inserter-listbox/row.js +2 -1
  436. package/build/components/inserter-listbox/row.js.map +1 -1
  437. package/build/components/inspector-controls/block-support-slot-container.js +3 -2
  438. package/build/components/inspector-controls/block-support-slot-container.js.map +1 -1
  439. package/build/components/inspector-controls/block-support-tools-panel.js +3 -2
  440. package/build/components/inspector-controls/block-support-tools-panel.js.map +1 -1
  441. package/build/components/inspector-controls/fill.js +7 -6
  442. package/build/components/inspector-controls/fill.js.map +1 -1
  443. package/build/components/inspector-controls/fill.native.js +4 -3
  444. package/build/components/inspector-controls/fill.native.js.map +1 -1
  445. package/build/components/inspector-controls/index.js +3 -3
  446. package/build/components/inspector-controls/index.js.map +1 -1
  447. package/build/components/inspector-controls/slot.js +5 -4
  448. package/build/components/inspector-controls/slot.js.map +1 -1
  449. package/build/components/inspector-controls/slot.native.js +2 -2
  450. package/build/components/inspector-controls/slot.native.js.map +1 -1
  451. package/build/components/inspector-controls-tabs/advanced-controls-panel.js +3 -3
  452. package/build/components/inspector-controls-tabs/advanced-controls-panel.js.map +1 -1
  453. package/build/components/inspector-controls-tabs/index.js +5 -5
  454. package/build/components/inspector-controls-tabs/index.js.map +1 -1
  455. package/build/components/inspector-controls-tabs/position-controls-panel.js +5 -4
  456. package/build/components/inspector-controls-tabs/position-controls-panel.js.map +1 -1
  457. package/build/components/inspector-controls-tabs/settings-tab-hint.js +5 -4
  458. package/build/components/inspector-controls-tabs/settings-tab-hint.js.map +1 -1
  459. package/build/components/inspector-controls-tabs/settings-tab.js +2 -2
  460. package/build/components/inspector-controls-tabs/settings-tab.js.map +1 -1
  461. package/build/components/inspector-controls-tabs/styles-tab.js +11 -11
  462. package/build/components/inspector-controls-tabs/styles-tab.js.map +1 -1
  463. package/build/components/inspector-popover-header/index.js +8 -8
  464. package/build/components/inspector-popover-header/index.js.map +1 -1
  465. package/build/components/justify-content-control/index.js +3 -3
  466. package/build/components/justify-content-control/index.js.map +1 -1
  467. package/build/components/justify-content-control/ui.js +2 -2
  468. package/build/components/justify-content-control/ui.js.map +1 -1
  469. package/build/components/letter-spacing-control/index.js +3 -3
  470. package/build/components/letter-spacing-control/index.js.map +1 -1
  471. package/build/components/line-height-control/index.js +3 -3
  472. package/build/components/line-height-control/index.js.map +1 -1
  473. package/build/components/line-height-control/index.native.js +2 -2
  474. package/build/components/line-height-control/index.native.js.map +1 -1
  475. package/build/components/link-control/index.js +18 -17
  476. package/build/components/link-control/index.js.map +1 -1
  477. package/build/components/link-control/link-preview.js +20 -20
  478. package/build/components/link-control/link-preview.js.map +1 -1
  479. package/build/components/link-control/search-create-button.js +4 -3
  480. package/build/components/link-control/search-create-button.js.map +1 -1
  481. package/build/components/link-control/search-input.js +5 -4
  482. package/build/components/link-control/search-input.js.map +1 -1
  483. package/build/components/link-control/search-item.js +5 -5
  484. package/build/components/link-control/search-item.js.map +1 -1
  485. package/build/components/link-control/search-results.js +7 -7
  486. package/build/components/link-control/search-results.js.map +1 -1
  487. package/build/components/link-control/settings-drawer.js +5 -4
  488. package/build/components/link-control/settings-drawer.js.map +1 -1
  489. package/build/components/link-control/settings.js +4 -4
  490. package/build/components/link-control/settings.js.map +1 -1
  491. package/build/components/list-view/appender.js +5 -4
  492. package/build/components/list-view/appender.js.map +1 -1
  493. package/build/components/list-view/aria-referenced-text.js +2 -1
  494. package/build/components/list-view/aria-referenced-text.js.map +1 -1
  495. package/build/components/list-view/block-contents.js +5 -4
  496. package/build/components/list-view/block-contents.js.map +1 -1
  497. package/build/components/list-view/block-select-button.js +16 -15
  498. package/build/components/list-view/block-select-button.js.map +1 -1
  499. package/build/components/list-view/block.js +15 -45
  500. package/build/components/list-view/block.js.map +1 -1
  501. package/build/components/list-view/branch.js +17 -9
  502. package/build/components/list-view/branch.js.map +1 -1
  503. package/build/components/list-view/drop-indicator.js +4 -3
  504. package/build/components/list-view/drop-indicator.js.map +1 -1
  505. package/build/components/list-view/expander.js +3 -3
  506. package/build/components/list-view/expander.js.map +1 -1
  507. package/build/components/list-view/index.js +16 -10
  508. package/build/components/list-view/index.js.map +1 -1
  509. package/build/components/list-view/leaf.js +3 -2
  510. package/build/components/list-view/leaf.js.map +1 -1
  511. package/build/components/list-view/utils.js +35 -0
  512. package/build/components/list-view/utils.js.map +1 -1
  513. package/build/components/media-placeholder/index.js +22 -21
  514. package/build/components/media-placeholder/index.js.map +1 -1
  515. package/build/components/media-placeholder/index.native.js +13 -12
  516. package/build/components/media-placeholder/index.native.js.map +1 -1
  517. package/build/components/media-replace-flow/index.js +14 -13
  518. package/build/components/media-replace-flow/index.js.map +1 -1
  519. package/build/components/media-replace-flow/index.native.js +2 -2
  520. package/build/components/media-replace-flow/index.native.js.map +1 -1
  521. package/build/components/media-upload/{constants.js → constants.native.js} +2 -4
  522. package/build/components/media-upload/constants.native.js.map +1 -0
  523. package/build/components/media-upload/index.js +1 -1
  524. package/build/components/media-upload/index.js.map +1 -1
  525. package/build/components/media-upload/index.native.js +12 -11
  526. package/build/components/media-upload/index.native.js.map +1 -1
  527. package/build/components/media-upload-progress/index.native.js +5 -4
  528. package/build/components/media-upload-progress/index.native.js.map +1 -1
  529. package/build/components/multi-selection-inspector/index.js +6 -6
  530. package/build/components/multi-selection-inspector/index.js.map +1 -1
  531. package/build/components/navigable-toolbar/index.js +4 -3
  532. package/build/components/navigable-toolbar/index.js.map +1 -1
  533. package/build/components/observe-typing/index.js +2 -2
  534. package/build/components/observe-typing/index.js.map +1 -1
  535. package/build/components/panel-color-settings/index.js +2 -2
  536. package/build/components/panel-color-settings/index.js.map +1 -1
  537. package/build/components/plain-text/index.js +4 -3
  538. package/build/components/plain-text/index.js.map +1 -1
  539. package/build/components/plain-text/index.native.js +4 -3
  540. package/build/components/plain-text/index.native.js.map +1 -1
  541. package/build/components/preview-options/index.js +5 -5
  542. package/build/components/preview-options/index.js.map +1 -1
  543. package/build/components/provider/block-refs-provider.js +2 -1
  544. package/build/components/provider/block-refs-provider.js.map +1 -1
  545. package/build/components/provider/index.js +4 -3
  546. package/build/components/provider/index.js.map +1 -1
  547. package/build/components/provider/index.native.js +3 -2
  548. package/build/components/provider/index.native.js.map +1 -1
  549. package/build/components/provider/use-block-sync.js +1 -1
  550. package/build/components/provider/use-block-sync.js.map +1 -1
  551. package/build/components/provider/with-registry-provider.js +4 -3
  552. package/build/components/provider/with-registry-provider.js.map +1 -1
  553. package/build/components/publish-date-time-picker/index.js +5 -4
  554. package/build/components/publish-date-time-picker/index.js.map +1 -1
  555. package/build/components/recursion-provider/index.js +2 -1
  556. package/build/components/recursion-provider/index.js.map +1 -1
  557. package/build/components/resizable-box-popover/index.js +3 -3
  558. package/build/components/resizable-box-popover/index.js.map +1 -1
  559. package/build/components/resolution-tool/index.js +3 -3
  560. package/build/components/resolution-tool/index.js.map +1 -1
  561. package/build/components/responsive-block-control/index.js +10 -9
  562. package/build/components/responsive-block-control/index.js.map +1 -1
  563. package/build/components/responsive-block-control/label.js +3 -3
  564. package/build/components/responsive-block-control/label.js.map +1 -1
  565. package/build/components/rich-text/content.js +3 -2
  566. package/build/components/rich-text/content.js.map +1 -1
  567. package/build/components/rich-text/embed-handler-picker.native.js +2 -1
  568. package/build/components/rich-text/embed-handler-picker.native.js.map +1 -1
  569. package/build/components/rich-text/format-edit.js +4 -3
  570. package/build/components/rich-text/format-edit.js.map +1 -1
  571. package/build/components/rich-text/format-toolbar/index.js +4 -4
  572. package/build/components/rich-text/format-toolbar/index.js.map +1 -1
  573. package/build/components/rich-text/format-toolbar/index.native.js +3 -3
  574. package/build/components/rich-text/format-toolbar/index.native.js.map +1 -1
  575. package/build/components/rich-text/format-toolbar-container.js +9 -9
  576. package/build/components/rich-text/format-toolbar-container.js.map +1 -1
  577. package/build/components/rich-text/format-toolbar-container.native.js +3 -3
  578. package/build/components/rich-text/format-toolbar-container.native.js.map +1 -1
  579. package/build/components/rich-text/get-rich-text-values.js +2 -1
  580. package/build/components/rich-text/get-rich-text-values.js.map +1 -1
  581. package/build/components/rich-text/index.js +9 -8
  582. package/build/components/rich-text/index.js.map +1 -1
  583. package/build/components/rich-text/index.native.js +8 -15
  584. package/build/components/rich-text/index.native.js.map +1 -1
  585. package/build/components/rich-text/multiline.js +3 -2
  586. package/build/components/rich-text/multiline.js.map +1 -1
  587. package/build/components/rich-text/toolbar-button.js +3 -3
  588. package/build/components/rich-text/toolbar-button.js.map +1 -1
  589. package/build/components/rich-text/use-paste-handler.js +5 -87
  590. package/build/components/rich-text/use-paste-handler.js.map +1 -1
  591. package/build/components/rich-text/utils.js +2 -5
  592. package/build/components/rich-text/utils.js.map +1 -1
  593. package/build/components/skip-to-selected-block/index.js +2 -2
  594. package/build/components/skip-to-selected-block/index.js.map +1 -1
  595. package/build/components/spacing-sizes-control/index.js +9 -8
  596. package/build/components/spacing-sizes-control/index.js.map +1 -1
  597. package/build/components/spacing-sizes-control/input-controls/axial.js +3 -3
  598. package/build/components/spacing-sizes-control/input-controls/axial.js.map +1 -1
  599. package/build/components/spacing-sizes-control/input-controls/separated.js +3 -3
  600. package/build/components/spacing-sizes-control/input-controls/separated.js.map +1 -1
  601. package/build/components/spacing-sizes-control/input-controls/single.js +2 -2
  602. package/build/components/spacing-sizes-control/input-controls/single.js.map +1 -1
  603. package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js +9 -8
  604. package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
  605. package/build/components/spacing-sizes-control/sides-dropdown/index.js +6 -6
  606. package/build/components/spacing-sizes-control/sides-dropdown/index.js.map +1 -1
  607. package/build/components/text-decoration-control/index.js +6 -6
  608. package/build/components/text-decoration-control/index.js.map +1 -1
  609. package/build/components/text-transform-control/index.js +6 -6
  610. package/build/components/text-transform-control/index.js.map +1 -1
  611. package/build/components/tool-selector/index.js +11 -10
  612. package/build/components/tool-selector/index.js.map +1 -1
  613. package/build/components/typewriter/index.js +3 -3
  614. package/build/components/typewriter/index.js.map +1 -1
  615. package/build/components/ungroup-button/index.native.js +2 -2
  616. package/build/components/ungroup-button/index.native.js.map +1 -1
  617. package/build/components/unit-control/index.js +2 -2
  618. package/build/components/unit-control/index.js.map +1 -1
  619. package/build/components/unsupported-block-details/index.native.js +127 -0
  620. package/build/components/unsupported-block-details/index.native.js.map +1 -0
  621. package/build/components/url-input/button.js +9 -8
  622. package/build/components/url-input/button.js.map +1 -1
  623. package/build/components/url-input/index.js +9 -8
  624. package/build/components/url-input/index.js.map +1 -1
  625. package/build/components/url-input/index.native.js +2 -2
  626. package/build/components/url-input/index.native.js.map +1 -1
  627. package/build/components/url-popover/image-url-input-ui.js +19 -18
  628. package/build/components/url-popover/image-url-input-ui.js.map +1 -1
  629. package/build/components/url-popover/index.js +8 -7
  630. package/build/components/url-popover/index.js.map +1 -1
  631. package/build/components/url-popover/link-editor.js +4 -4
  632. package/build/components/url-popover/link-editor.js.map +1 -1
  633. package/build/components/url-popover/link-viewer-url.js +3 -3
  634. package/build/components/url-popover/link-viewer-url.js.map +1 -1
  635. package/build/components/url-popover/link-viewer.js +4 -4
  636. package/build/components/url-popover/link-viewer.js.map +1 -1
  637. package/build/components/use-on-block-drop/index.js +2 -2
  638. package/build/components/use-on-block-drop/index.js.map +1 -1
  639. package/build/components/use-unsupported-block-editor/index.native.js +57 -0
  640. package/build/components/use-unsupported-block-editor/index.native.js.map +1 -0
  641. package/build/components/video-player/gridicon-play.native.js +3 -3
  642. package/build/components/video-player/gridicon-play.native.js.map +1 -1
  643. package/build/components/video-player/index.native.js +6 -5
  644. package/build/components/video-player/index.native.js.map +1 -1
  645. package/build/components/warning/index.js +10 -9
  646. package/build/components/warning/index.js.map +1 -1
  647. package/build/components/warning/index.native.js +6 -6
  648. package/build/components/warning/index.native.js.map +1 -1
  649. package/build/components/writing-flow/index.js +7 -5
  650. package/build/components/writing-flow/index.js.map +1 -1
  651. package/build/components/writing-flow/use-clipboard-handler.js +179 -0
  652. package/build/components/writing-flow/use-clipboard-handler.js.map +1 -0
  653. package/build/components/writing-flow/use-tab-nav.js +4 -3
  654. package/build/components/writing-flow/use-tab-nav.js.map +1 -1
  655. package/build/components/writing-mode-control/index.js +6 -6
  656. package/build/components/writing-mode-control/index.js.map +1 -1
  657. package/build/hooks/align.js +6 -6
  658. package/build/hooks/align.js.map +1 -1
  659. package/build/hooks/anchor.js +10 -9
  660. package/build/hooks/anchor.js.map +1 -1
  661. package/build/hooks/background.js +17 -16
  662. package/build/hooks/background.js.map +1 -1
  663. package/build/hooks/block-hooks.js +11 -10
  664. package/build/hooks/block-hooks.js.map +1 -1
  665. package/build/hooks/block-rename-ui.js +17 -16
  666. package/build/hooks/block-rename-ui.js.map +1 -1
  667. package/build/hooks/border.js +6 -5
  668. package/build/hooks/border.js.map +1 -1
  669. package/build/hooks/color.js +7 -6
  670. package/build/hooks/color.js.map +1 -1
  671. package/build/hooks/content-lock-ui.js +9 -8
  672. package/build/hooks/content-lock-ui.js.map +1 -1
  673. package/build/hooks/contrast-checker.js +2 -1
  674. package/build/hooks/contrast-checker.js.map +1 -1
  675. package/build/hooks/custom-class-name.js +7 -7
  676. package/build/hooks/custom-class-name.js.map +1 -1
  677. package/build/hooks/custom-fields.js +8 -8
  678. package/build/hooks/custom-fields.js.map +1 -1
  679. package/build/hooks/dimensions.js +5 -4
  680. package/build/hooks/dimensions.js.map +1 -1
  681. package/build/hooks/duotone.js +10 -9
  682. package/build/hooks/duotone.js.map +1 -1
  683. package/build/hooks/font-size.js +5 -5
  684. package/build/hooks/font-size.js.map +1 -1
  685. package/build/hooks/layout.js +14 -13
  686. package/build/hooks/layout.js.map +1 -1
  687. package/build/hooks/line-height.js +3 -3
  688. package/build/hooks/line-height.js.map +1 -1
  689. package/build/hooks/margin.js +3 -2
  690. package/build/hooks/margin.js.map +1 -1
  691. package/build/hooks/padding.js +3 -2
  692. package/build/hooks/padding.js.map +1 -1
  693. package/build/hooks/position.js +10 -9
  694. package/build/hooks/position.js.map +1 -1
  695. package/build/hooks/style.js +11 -10
  696. package/build/hooks/style.js.map +1 -1
  697. package/build/hooks/typography.js +4 -3
  698. package/build/hooks/typography.js.map +1 -1
  699. package/build/hooks/typography.native.js +4 -4
  700. package/build/hooks/typography.native.js.map +1 -1
  701. package/build/layouts/constrained.js +11 -11
  702. package/build/layouts/constrained.js.map +1 -1
  703. package/build/layouts/flex.js +18 -18
  704. package/build/layouts/flex.js.map +1 -1
  705. package/build/layouts/grid.js +10 -10
  706. package/build/layouts/grid.js.map +1 -1
  707. package/build/private-apis.js +2 -0
  708. package/build/private-apis.js.map +1 -1
  709. package/build/store/actions.js +8 -12
  710. package/build/store/actions.js.map +1 -1
  711. package/build/store/private-selectors.js +55 -1
  712. package/build/store/private-selectors.js.map +1 -1
  713. package/build/store/reducer.js +19 -1
  714. package/build/store/reducer.js.map +1 -1
  715. package/build/store/selectors.js +1 -1
  716. package/build/store/selectors.js.map +1 -1
  717. package/build/utils/pasting.js +46 -0
  718. package/build/utils/pasting.js.map +1 -1
  719. package/build/utils/transform-styles/transforms/wrap.js +5 -0
  720. package/build/utils/transform-styles/transforms/wrap.js.map +1 -1
  721. package/build/utils/use-notify-copy.js +53 -0
  722. package/build/utils/use-notify-copy.js.map +1 -0
  723. package/build-module/autocompleters/block.js +1 -1
  724. package/build-module/autocompleters/link.js +1 -1
  725. package/build-module/components/alignment-control/index.js +1 -1
  726. package/build-module/components/alignment-control/ui.js +1 -1
  727. package/build-module/components/autocomplete/index.js +1 -1
  728. package/build-module/components/block-actions/index.js +1 -1
  729. package/build-module/components/block-actions/index.js.map +1 -1
  730. package/build-module/components/block-alignment-control/index.js +1 -1
  731. package/build-module/components/block-alignment-control/ui.js +1 -1
  732. package/build-module/components/block-alignment-control/ui.native.js +1 -1
  733. package/build-module/components/block-alignment-matrix-control/index.js +1 -1
  734. package/build-module/components/block-breadcrumb/index.js +2 -2
  735. package/build-module/components/block-breadcrumb/index.js.map +1 -1
  736. package/build-module/components/block-canvas/index.js +7 -9
  737. package/build-module/components/block-canvas/index.js.map +1 -1
  738. package/build-module/components/block-caption/index.native.js +1 -1
  739. package/build-module/components/block-card/index.js +1 -1
  740. package/build-module/components/block-compare/block-view.js +1 -1
  741. package/build-module/components/block-compare/index.js +1 -1
  742. package/build-module/components/block-context/index.js +1 -1
  743. package/build-module/components/block-controls/fill.js +1 -1
  744. package/build-module/components/block-controls/index.js +1 -1
  745. package/build-module/components/block-controls/slot.js +1 -1
  746. package/build-module/components/block-controls/slot.native.js +1 -1
  747. package/build-module/components/block-draggable/draggable-chip.js +1 -1
  748. package/build-module/components/block-draggable/draggable-chip.native.js +1 -1
  749. package/build-module/components/block-draggable/dropping-insertion-point.native.js +1 -1
  750. package/build-module/components/block-draggable/index.js +1 -1
  751. package/build-module/components/block-draggable/index.native.js +1 -1
  752. package/build-module/components/block-edit/edit.js +1 -1
  753. package/build-module/components/block-edit/edit.native.js +1 -1
  754. package/build-module/components/block-edit/index.js +1 -1
  755. package/build-module/components/block-edit-visually-button/index.js +1 -1
  756. package/build-module/components/block-full-height-alignment-control/index.js +1 -1
  757. package/build-module/components/block-heading-level-dropdown/heading-level-icon.js +3 -3
  758. package/build-module/components/block-heading-level-dropdown/heading-level-icon.js.map +1 -1
  759. package/build-module/components/block-heading-level-dropdown/index.js +3 -3
  760. package/build-module/components/block-heading-level-dropdown/index.js.map +1 -1
  761. package/build-module/components/block-heading-level-dropdown/index.native.js +3 -3
  762. package/build-module/components/block-heading-level-dropdown/index.native.js.map +1 -1
  763. package/build-module/components/block-icon/index.js +1 -1
  764. package/build-module/components/block-icon/index.native.js +1 -1
  765. package/build-module/components/block-info-slot-fill/index.js +1 -1
  766. package/build-module/components/block-inspector/index.js +1 -1
  767. package/build-module/components/block-list/block-crash-warning.js +1 -1
  768. package/build-module/components/block-list/block-html.js +1 -1
  769. package/build-module/components/block-list/block-invalid-warning.js +1 -1
  770. package/build-module/components/block-list/block-invalid-warning.native.js +1 -1
  771. package/build-module/components/block-list/block-list-item-cell.native.js +1 -1
  772. package/build-module/components/block-list/block-list-item.native.js +3 -3
  773. package/build-module/components/block-list/block-list-item.native.js.map +1 -1
  774. package/build-module/components/block-list/block-outline.native.js +1 -1
  775. package/build-module/components/block-list/block-selection-button.native.js +1 -1
  776. package/build-module/components/block-list/block.js +1 -1
  777. package/build-module/components/block-list/block.native.js +1 -1
  778. package/build-module/components/block-list/grid-item.native.js +1 -1
  779. package/build-module/components/block-list/index.js +1 -1
  780. package/build-module/components/block-list/index.native.js +1 -1
  781. package/build-module/components/block-list/insertion-point.native.js +1 -1
  782. package/build-module/components/block-list/layout.js +1 -1
  783. package/build-module/components/block-list/subdirectory-icon.js +1 -1
  784. package/build-module/components/block-list-appender/index.js +1 -1
  785. package/build-module/components/block-list-appender/index.native.js +1 -1
  786. package/build-module/components/block-lock/menu-item.js +1 -1
  787. package/build-module/components/block-lock/modal.js +1 -1
  788. package/build-module/components/block-lock/toolbar.js +1 -1
  789. package/build-module/components/block-media-update-progress/index.native.js +1 -1
  790. package/build-module/components/block-mover/button.js +1 -1
  791. package/build-module/components/block-mover/index.js +1 -1
  792. package/build-module/components/block-mover/index.native.js +1 -1
  793. package/build-module/components/block-navigation/dropdown.js +1 -1
  794. package/build-module/components/block-parent-selector/index.js +2 -2
  795. package/build-module/components/block-parent-selector/index.js.map +1 -1
  796. package/build-module/components/block-pattern-setup/index.js +1 -1
  797. package/build-module/components/block-pattern-setup/setup-toolbar.js +1 -1
  798. package/build-module/components/block-patterns-list/index.js +1 -1
  799. package/build-module/components/block-patterns-paging/index.js +1 -1
  800. package/build-module/components/block-popover/drop-zone.js +1 -1
  801. package/build-module/components/block-popover/inbetween.js +1 -1
  802. package/build-module/components/block-popover/index.js +1 -1
  803. package/build-module/components/block-preview/auto.js +1 -1
  804. package/build-module/components/block-preview/index.js +2 -2
  805. package/build-module/components/block-preview/index.js.map +1 -1
  806. package/build-module/components/block-quick-navigation/index.js +1 -1
  807. package/build-module/components/block-removal-warning-modal/index.js +1 -1
  808. package/build-module/components/block-selection-clearer/index.js +1 -1
  809. package/build-module/components/block-settings/button.native.js +1 -1
  810. package/build-module/components/block-settings/container.native.js +1 -1
  811. package/build-module/components/block-settings-menu/block-html-convert-button.js +20 -17
  812. package/build-module/components/block-settings-menu/block-html-convert-button.js.map +1 -1
  813. package/build-module/components/block-settings-menu/block-mode-toggle.js +1 -1
  814. package/build-module/components/block-settings-menu/block-settings-dropdown.js +1 -1
  815. package/build-module/components/block-settings-menu/index.js +1 -1
  816. package/build-module/components/block-settings-menu-controls/index.js +2 -2
  817. package/build-module/components/block-settings-menu-controls/index.js.map +1 -1
  818. package/build-module/components/block-styles/index.js +1 -1
  819. package/build-module/components/block-styles/index.native.js +1 -1
  820. package/build-module/components/block-styles/menu-items.js +1 -1
  821. package/build-module/components/block-styles/preview-panel.js +1 -1
  822. package/build-module/components/block-styles/preview.native.js +1 -1
  823. package/build-module/components/block-switcher/block-styles-menu.js +1 -1
  824. package/build-module/components/block-switcher/block-transformations-menu.js +1 -1
  825. package/build-module/components/block-switcher/block-transformations-menu.native.js +1 -1
  826. package/build-module/components/block-switcher/block-variation-transformations.js +1 -1
  827. package/build-module/components/block-switcher/index.js +6 -6
  828. package/build-module/components/block-switcher/index.js.map +1 -1
  829. package/build-module/components/block-switcher/pattern-transformations-menu.js +1 -1
  830. package/build-module/components/block-switcher/preview-block-popover.js +1 -1
  831. package/build-module/components/block-toolbar/block-toolbar-menu.native.js +1 -1
  832. package/build-module/components/block-toolbar/index.js +1 -1
  833. package/build-module/components/block-toolbar/index.native.js +1 -1
  834. package/build-module/components/block-tools/back-compat.js +1 -1
  835. package/build-module/components/block-tools/block-contextual-toolbar.js +1 -1
  836. package/build-module/components/block-tools/block-selection-button.js +2 -2
  837. package/build-module/components/block-tools/block-selection-button.js.map +1 -1
  838. package/build-module/components/block-tools/index.js +1 -1
  839. package/build-module/components/block-tools/insertion-point.js +1 -1
  840. package/build-module/components/block-tools/selected-block-popover.js +1 -1
  841. package/build-module/components/block-tools/zoom-out-mode-inserters.js +1 -1
  842. package/build-module/components/block-types-list/index.js +1 -1
  843. package/build-module/components/block-types-list/index.native.js +1 -1
  844. package/build-module/components/block-variation-picker/index.js +1 -1
  845. package/build-module/components/block-variation-picker/index.native.js +1 -1
  846. package/build-module/components/block-variation-transforms/index.js +1 -1
  847. package/build-module/components/block-vertical-alignment-control/icons.js +1 -1
  848. package/build-module/components/block-vertical-alignment-control/index.js +1 -1
  849. package/build-module/components/block-vertical-alignment-control/ui.js +1 -1
  850. package/build-module/components/border-radius-control/all-input-control.js +1 -1
  851. package/build-module/components/border-radius-control/index.js +2 -2
  852. package/build-module/components/border-radius-control/index.js.map +1 -1
  853. package/build-module/components/border-radius-control/input-controls.js +1 -1
  854. package/build-module/components/border-radius-control/linked-button.js +1 -1
  855. package/build-module/components/button-block-appender/index.js +1 -1
  856. package/build-module/components/button-block-appender/index.native.js +1 -1
  857. package/build-module/components/caption/index.native.js +1 -1
  858. package/build-module/components/child-layout-control/index.js +2 -2
  859. package/build-module/components/child-layout-control/index.js.map +1 -1
  860. package/build-module/components/color-palette/control.js +1 -1
  861. package/build-module/components/color-palette/with-color-context.js +1 -1
  862. package/build-module/components/color-style-selector/index.js +1 -1
  863. package/build-module/components/colors/with-colors.js +2 -2
  864. package/build-module/components/colors/with-colors.js.map +1 -1
  865. package/build-module/components/colors-gradients/control.js +1 -1
  866. package/build-module/components/colors-gradients/dropdown.js +1 -1
  867. package/build-module/components/colors-gradients/panel-color-gradient-settings.js +1 -1
  868. package/build-module/components/colors-gradients/panel-color-gradient-settings.native.js +1 -1
  869. package/build-module/components/contrast-checker/index.js +1 -1
  870. package/build-module/components/contrast-checker/index.native.js +1 -1
  871. package/build-module/components/convert-to-group-buttons/index.js +1 -1
  872. package/build-module/components/convert-to-group-buttons/toolbar.js +1 -1
  873. package/build-module/components/copy-handler/index.js +25 -205
  874. package/build-module/components/copy-handler/index.js.map +1 -1
  875. package/build-module/components/date-format-picker/index.js +1 -1
  876. package/build-module/components/default-block-appender/index.js +1 -1
  877. package/build-module/components/default-block-appender/index.native.js +1 -1
  878. package/build-module/components/default-style-picker/index.js +1 -1
  879. package/build-module/components/dimensions-tool/aspect-ratio-tool.js +1 -1
  880. package/build-module/components/dimensions-tool/index.js +2 -2
  881. package/build-module/components/dimensions-tool/index.js.map +1 -1
  882. package/build-module/components/dimensions-tool/scale-tool.js +2 -2
  883. package/build-module/components/dimensions-tool/scale-tool.js.map +1 -1
  884. package/build-module/components/dimensions-tool/width-height-tool.js +3 -3
  885. package/build-module/components/dimensions-tool/width-height-tool.js.map +1 -1
  886. package/build-module/components/duotone-control/index.js +10 -2
  887. package/build-module/components/duotone-control/index.js.map +1 -1
  888. package/build-module/components/editable-text/index.js +1 -1
  889. package/build-module/components/editor-styles/index.js +1 -1
  890. package/build-module/components/floating-toolbar/index.native.js +1 -1
  891. package/build-module/components/floating-toolbar/nav-up-icon.js +1 -1
  892. package/build-module/components/font-appearance-control/index.js +2 -2
  893. package/build-module/components/font-appearance-control/index.js.map +1 -1
  894. package/build-module/components/font-family/index.js +1 -1
  895. package/build-module/components/font-sizes/font-size-picker.js +1 -1
  896. package/build-module/components/font-sizes/with-font-sizes.js +1 -1
  897. package/build-module/components/global-styles/advanced-panel.js +1 -1
  898. package/build-module/components/global-styles/border-panel.js +1 -1
  899. package/build-module/components/global-styles/color-panel.js +1 -1
  900. package/build-module/components/global-styles/color-panel.native.js +1 -1
  901. package/build-module/components/global-styles/dimensions-panel.js +1 -1
  902. package/build-module/components/global-styles/effects-panel.js +1 -1
  903. package/build-module/components/global-styles/filters-panel.js +1 -1
  904. package/build-module/components/global-styles/image-settings-panel.js +1 -1
  905. package/build-module/components/global-styles/typography-panel.js +1 -1
  906. package/build-module/components/gradients/with-gradient.js +1 -1
  907. package/build-module/components/height-control/index.js +2 -2
  908. package/build-module/components/height-control/index.js.map +1 -1
  909. package/build-module/components/iframe/index.js +1 -1
  910. package/build-module/components/image-editor/aspect-ratio-dropdown.js +1 -1
  911. package/build-module/components/image-editor/context.js +1 -1
  912. package/build-module/components/image-editor/cropper.js +1 -1
  913. package/build-module/components/image-editor/form-controls.js +1 -1
  914. package/build-module/components/image-editor/index.js +1 -1
  915. package/build-module/components/image-editor/rotation-button.js +1 -1
  916. package/build-module/components/image-editor/zoom-dropdown.js +1 -1
  917. package/build-module/components/image-size-control/index.js +1 -1
  918. package/build-module/components/index.js +1 -1
  919. package/build-module/components/index.js.map +1 -1
  920. package/build-module/components/inner-blocks/button-block-appender.js +1 -1
  921. package/build-module/components/inner-blocks/constants.native.js +6 -0
  922. package/build-module/components/inner-blocks/constants.native.js.map +1 -0
  923. package/build-module/components/inner-blocks/default-block-appender.js +1 -1
  924. package/build-module/components/inner-blocks/index.js +1 -1
  925. package/build-module/components/inner-blocks/index.native.js +13 -1
  926. package/build-module/components/inner-blocks/index.native.js.map +1 -1
  927. package/build-module/components/inner-blocks/warning-max-depth-exceeded.native.js +86 -0
  928. package/build-module/components/inner-blocks/warning-max-depth-exceeded.native.js.map +1 -0
  929. package/build-module/components/inner-blocks/with-client-id.js +1 -1
  930. package/build-module/components/inserter/block-patterns-explorer/explorer.js +1 -1
  931. package/build-module/components/inserter/block-patterns-explorer/patterns-list.js +1 -1
  932. package/build-module/components/inserter/block-patterns-explorer/sidebar.js +1 -1
  933. package/build-module/components/inserter/block-patterns-filter.js +14 -13
  934. package/build-module/components/inserter/block-patterns-filter.js.map +1 -1
  935. package/build-module/components/inserter/block-patterns-tab.js +2 -2
  936. package/build-module/components/inserter/block-patterns-tab.js.map +1 -1
  937. package/build-module/components/inserter/block-types-tab.js +1 -1
  938. package/build-module/components/inserter/block-types-tab.native.js +1 -1
  939. package/build-module/components/inserter/index.js +3 -3
  940. package/build-module/components/inserter/index.js.map +1 -1
  941. package/build-module/components/inserter/index.native.js +3 -3
  942. package/build-module/components/inserter/index.native.js.map +1 -1
  943. package/build-module/components/inserter/library.js +1 -1
  944. package/build-module/components/inserter/media-tab/hooks.js +5 -34
  945. package/build-module/components/inserter/media-tab/hooks.js.map +1 -1
  946. package/build-module/components/inserter/media-tab/media-list.js +1 -1
  947. package/build-module/components/inserter/media-tab/media-panel.js +1 -1
  948. package/build-module/components/inserter/media-tab/media-preview.js +1 -1
  949. package/build-module/components/inserter/media-tab/media-tab.js +1 -1
  950. package/build-module/components/inserter/media-tab/utils.js +1 -1
  951. package/build-module/components/inserter/menu.js +1 -1
  952. package/build-module/components/inserter/menu.native.js +1 -1
  953. package/build-module/components/inserter/mobile-tab-navigation.js +1 -1
  954. package/build-module/components/inserter/no-results.js +1 -1
  955. package/build-module/components/inserter/no-results.native.js +1 -1
  956. package/build-module/components/inserter/panel.js +1 -1
  957. package/build-module/components/inserter/preview-panel.js +1 -1
  958. package/build-module/components/inserter/quick-inserter.js +1 -1
  959. package/build-module/components/inserter/reusable-block-rename-hint.js +1 -1
  960. package/build-module/components/inserter/reusable-blocks-tab.native.js +1 -1
  961. package/build-module/components/inserter/search-results.js +1 -1
  962. package/build-module/components/inserter/search-results.native.js +1 -1
  963. package/build-module/components/inserter/tabs.js +1 -1
  964. package/build-module/components/inserter/tabs.native.js +1 -1
  965. package/build-module/components/inserter/tips.js +1 -1
  966. package/build-module/components/inserter-draggable-blocks/index.js +1 -1
  967. package/build-module/components/inserter-list-item/index.js +1 -1
  968. package/build-module/components/inserter-listbox/group.js +1 -1
  969. package/build-module/components/inserter-listbox/index.js +1 -1
  970. package/build-module/components/inserter-listbox/item.js +1 -1
  971. package/build-module/components/inserter-listbox/row.js +1 -1
  972. package/build-module/components/inspector-controls/block-support-slot-container.js +1 -1
  973. package/build-module/components/inspector-controls/block-support-tools-panel.js +1 -1
  974. package/build-module/components/inspector-controls/fill.js +1 -1
  975. package/build-module/components/inspector-controls/fill.native.js +1 -1
  976. package/build-module/components/inspector-controls/index.js +1 -1
  977. package/build-module/components/inspector-controls/slot.js +1 -1
  978. package/build-module/components/inspector-controls/slot.native.js +1 -1
  979. package/build-module/components/inspector-controls-tabs/advanced-controls-panel.js +1 -1
  980. package/build-module/components/inspector-controls-tabs/index.js +1 -1
  981. package/build-module/components/inspector-controls-tabs/position-controls-panel.js +1 -1
  982. package/build-module/components/inspector-controls-tabs/settings-tab-hint.js +1 -1
  983. package/build-module/components/inspector-controls-tabs/settings-tab.js +1 -1
  984. package/build-module/components/inspector-controls-tabs/styles-tab.js +1 -1
  985. package/build-module/components/inspector-popover-header/index.js +1 -1
  986. package/build-module/components/justify-content-control/index.js +1 -1
  987. package/build-module/components/justify-content-control/ui.js +1 -1
  988. package/build-module/components/letter-spacing-control/index.js +2 -2
  989. package/build-module/components/letter-spacing-control/index.js.map +1 -1
  990. package/build-module/components/line-height-control/index.js +1 -1
  991. package/build-module/components/line-height-control/index.native.js +1 -1
  992. package/build-module/components/link-control/index.js +1 -1
  993. package/build-module/components/link-control/link-preview.js +1 -1
  994. package/build-module/components/link-control/search-create-button.js +1 -1
  995. package/build-module/components/link-control/search-input.js +1 -1
  996. package/build-module/components/link-control/search-item.js +1 -1
  997. package/build-module/components/link-control/search-results.js +1 -1
  998. package/build-module/components/link-control/settings-drawer.js +1 -1
  999. package/build-module/components/link-control/settings.js +1 -1
  1000. package/build-module/components/list-view/appender.js +1 -1
  1001. package/build-module/components/list-view/aria-referenced-text.js +1 -1
  1002. package/build-module/components/list-view/block-contents.js +1 -1
  1003. package/build-module/components/list-view/block-select-button.js +1 -1
  1004. package/build-module/components/list-view/block.js +4 -35
  1005. package/build-module/components/list-view/block.js.map +1 -1
  1006. package/build-module/components/list-view/branch.js +9 -2
  1007. package/build-module/components/list-view/branch.js.map +1 -1
  1008. package/build-module/components/list-view/drop-indicator.js +1 -1
  1009. package/build-module/components/list-view/expander.js +1 -1
  1010. package/build-module/components/list-view/index.js +9 -4
  1011. package/build-module/components/list-view/index.js.map +1 -1
  1012. package/build-module/components/list-view/leaf.js +1 -1
  1013. package/build-module/components/list-view/utils.js +34 -0
  1014. package/build-module/components/list-view/utils.js.map +1 -1
  1015. package/build-module/components/media-placeholder/index.js +1 -1
  1016. package/build-module/components/media-placeholder/index.native.js +1 -1
  1017. package/build-module/components/media-replace-flow/index.js +1 -1
  1018. package/build-module/components/media-replace-flow/index.native.js +1 -1
  1019. package/build-module/components/media-upload/{constants.js → constants.native.js} +1 -2
  1020. package/build-module/components/media-upload/constants.native.js.map +1 -0
  1021. package/build-module/components/media-upload/index.js +1 -1
  1022. package/build-module/components/media-upload/index.js.map +1 -1
  1023. package/build-module/components/media-upload/index.native.js +7 -7
  1024. package/build-module/components/media-upload/index.native.js.map +1 -1
  1025. package/build-module/components/media-upload-progress/index.native.js +1 -1
  1026. package/build-module/components/multi-selection-inspector/index.js +1 -1
  1027. package/build-module/components/navigable-toolbar/index.js +1 -1
  1028. package/build-module/components/observe-typing/index.js +1 -1
  1029. package/build-module/components/panel-color-settings/index.js +1 -1
  1030. package/build-module/components/plain-text/index.js +1 -1
  1031. package/build-module/components/plain-text/index.native.js +1 -1
  1032. package/build-module/components/preview-options/index.js +1 -1
  1033. package/build-module/components/provider/block-refs-provider.js +1 -1
  1034. package/build-module/components/provider/index.js +1 -1
  1035. package/build-module/components/provider/index.native.js +1 -1
  1036. package/build-module/components/provider/use-block-sync.js +1 -1
  1037. package/build-module/components/provider/use-block-sync.js.map +1 -1
  1038. package/build-module/components/provider/with-registry-provider.js +1 -1
  1039. package/build-module/components/publish-date-time-picker/index.js +1 -1
  1040. package/build-module/components/recursion-provider/index.js +1 -1
  1041. package/build-module/components/resizable-box-popover/index.js +1 -1
  1042. package/build-module/components/resolution-tool/index.js +1 -1
  1043. package/build-module/components/responsive-block-control/index.js +1 -1
  1044. package/build-module/components/responsive-block-control/label.js +1 -1
  1045. package/build-module/components/rich-text/content.js +1 -1
  1046. package/build-module/components/rich-text/embed-handler-picker.native.js +1 -1
  1047. package/build-module/components/rich-text/format-edit.js +1 -1
  1048. package/build-module/components/rich-text/format-toolbar/index.js +1 -1
  1049. package/build-module/components/rich-text/format-toolbar/index.native.js +1 -1
  1050. package/build-module/components/rich-text/format-toolbar-container.js +1 -1
  1051. package/build-module/components/rich-text/format-toolbar-container.native.js +1 -1
  1052. package/build-module/components/rich-text/get-rich-text-values.js +1 -1
  1053. package/build-module/components/rich-text/index.js +1 -1
  1054. package/build-module/components/rich-text/index.native.js +2 -10
  1055. package/build-module/components/rich-text/index.native.js.map +1 -1
  1056. package/build-module/components/rich-text/multiline.js +1 -1
  1057. package/build-module/components/rich-text/toolbar-button.js +1 -1
  1058. package/build-module/components/rich-text/use-paste-handler.js +7 -89
  1059. package/build-module/components/rich-text/use-paste-handler.js.map +1 -1
  1060. package/build-module/components/rich-text/utils.js +1 -3
  1061. package/build-module/components/rich-text/utils.js.map +1 -1
  1062. package/build-module/components/skip-to-selected-block/index.js +1 -1
  1063. package/build-module/components/spacing-sizes-control/index.js +1 -1
  1064. package/build-module/components/spacing-sizes-control/input-controls/axial.js +1 -1
  1065. package/build-module/components/spacing-sizes-control/input-controls/separated.js +1 -1
  1066. package/build-module/components/spacing-sizes-control/input-controls/single.js +1 -1
  1067. package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js +1 -1
  1068. package/build-module/components/spacing-sizes-control/sides-dropdown/index.js +1 -1
  1069. package/build-module/components/text-decoration-control/index.js +2 -2
  1070. package/build-module/components/text-decoration-control/index.js.map +1 -1
  1071. package/build-module/components/text-transform-control/index.js +2 -2
  1072. package/build-module/components/text-transform-control/index.js.map +1 -1
  1073. package/build-module/components/tool-selector/index.js +1 -1
  1074. package/build-module/components/typewriter/index.js +2 -2
  1075. package/build-module/components/typewriter/index.js.map +1 -1
  1076. package/build-module/components/ungroup-button/index.native.js +1 -1
  1077. package/build-module/components/unit-control/index.js +1 -1
  1078. package/build-module/components/unsupported-block-details/index.native.js +118 -0
  1079. package/build-module/components/unsupported-block-details/index.native.js.map +1 -0
  1080. package/build-module/components/url-input/button.js +1 -1
  1081. package/build-module/components/url-input/index.js +1 -1
  1082. package/build-module/components/url-input/index.native.js +1 -1
  1083. package/build-module/components/url-popover/image-url-input-ui.js +1 -1
  1084. package/build-module/components/url-popover/index.js +1 -1
  1085. package/build-module/components/url-popover/link-editor.js +1 -1
  1086. package/build-module/components/url-popover/link-viewer-url.js +1 -1
  1087. package/build-module/components/url-popover/link-viewer.js +1 -1
  1088. package/build-module/components/use-on-block-drop/index.js +2 -2
  1089. package/build-module/components/use-on-block-drop/index.js.map +1 -1
  1090. package/build-module/components/use-unsupported-block-editor/index.native.js +51 -0
  1091. package/build-module/components/use-unsupported-block-editor/index.native.js.map +1 -0
  1092. package/build-module/components/video-player/gridicon-play.native.js +1 -1
  1093. package/build-module/components/video-player/index.native.js +1 -1
  1094. package/build-module/components/warning/index.js +1 -1
  1095. package/build-module/components/warning/index.native.js +1 -1
  1096. package/build-module/components/writing-flow/index.js +5 -4
  1097. package/build-module/components/writing-flow/index.js.map +1 -1
  1098. package/build-module/components/writing-flow/use-clipboard-handler.js +172 -0
  1099. package/build-module/components/writing-flow/use-clipboard-handler.js.map +1 -0
  1100. package/build-module/components/writing-flow/use-tab-nav.js +1 -1
  1101. package/build-module/components/writing-mode-control/index.js +2 -2
  1102. package/build-module/components/writing-mode-control/index.js.map +1 -1
  1103. package/build-module/hooks/align.js +1 -1
  1104. package/build-module/hooks/anchor.js +3 -3
  1105. package/build-module/hooks/anchor.js.map +1 -1
  1106. package/build-module/hooks/background.js +1 -1
  1107. package/build-module/hooks/block-hooks.js +1 -1
  1108. package/build-module/hooks/block-rename-ui.js +1 -1
  1109. package/build-module/hooks/border.js +1 -1
  1110. package/build-module/hooks/color.js +1 -1
  1111. package/build-module/hooks/content-lock-ui.js +1 -1
  1112. package/build-module/hooks/contrast-checker.js +1 -1
  1113. package/build-module/hooks/custom-class-name.js +3 -3
  1114. package/build-module/hooks/custom-class-name.js.map +1 -1
  1115. package/build-module/hooks/custom-fields.js +3 -3
  1116. package/build-module/hooks/custom-fields.js.map +1 -1
  1117. package/build-module/hooks/dimensions.js +1 -1
  1118. package/build-module/hooks/duotone.js +1 -1
  1119. package/build-module/hooks/font-size.js +2 -2
  1120. package/build-module/hooks/font-size.js.map +1 -1
  1121. package/build-module/hooks/layout.js +1 -1
  1122. package/build-module/hooks/line-height.js +2 -2
  1123. package/build-module/hooks/line-height.js.map +1 -1
  1124. package/build-module/hooks/margin.js +1 -1
  1125. package/build-module/hooks/padding.js +1 -1
  1126. package/build-module/hooks/position.js +3 -3
  1127. package/build-module/hooks/position.js.map +1 -1
  1128. package/build-module/hooks/style.js +1 -1
  1129. package/build-module/hooks/typography.js +1 -1
  1130. package/build-module/hooks/typography.native.js +1 -1
  1131. package/build-module/layouts/constrained.js +1 -1
  1132. package/build-module/layouts/flex.js +1 -1
  1133. package/build-module/layouts/grid.js +1 -1
  1134. package/build-module/private-apis.js +2 -0
  1135. package/build-module/private-apis.js.map +1 -1
  1136. package/build-module/store/actions.js +8 -12
  1137. package/build-module/store/actions.js.map +1 -1
  1138. package/build-module/store/private-selectors.js +52 -0
  1139. package/build-module/store/private-selectors.js.map +1 -1
  1140. package/build-module/store/reducer.js +18 -1
  1141. package/build-module/store/reducer.js.map +1 -1
  1142. package/build-module/store/selectors.js +1 -1
  1143. package/build-module/store/selectors.js.map +1 -1
  1144. package/build-module/utils/pasting.js +47 -0
  1145. package/build-module/utils/pasting.js.map +1 -1
  1146. package/build-module/utils/transform-styles/transforms/wrap.js +5 -0
  1147. package/build-module/utils/transform-styles/transforms/wrap.js.map +1 -1
  1148. package/build-module/utils/use-notify-copy.js +46 -0
  1149. package/build-module/utils/use-notify-copy.js.map +1 -0
  1150. package/build-style/content-rtl.css +10 -11
  1151. package/build-style/content.css +10 -11
  1152. package/build-style/default-editor-styles-rtl.css +1 -1
  1153. package/build-style/default-editor-styles.css +1 -1
  1154. package/build-style/style-rtl.css +11 -12
  1155. package/build-style/style.css +11 -12
  1156. package/package.json +31 -32
  1157. package/src/components/block-actions/index.js +1 -1
  1158. package/src/components/block-breadcrumb/index.js +1 -1
  1159. package/src/components/block-canvas/index.js +6 -12
  1160. package/src/components/block-context/README.md +1 -1
  1161. package/src/components/block-heading-level-dropdown/heading-level-icon.js +2 -2
  1162. package/src/components/block-heading-level-dropdown/index.js +2 -2
  1163. package/src/components/block-heading-level-dropdown/index.native.js +2 -2
  1164. package/src/components/block-list/block-list-item.native.js +2 -2
  1165. package/src/components/block-parent-selector/index.js +1 -1
  1166. package/src/components/block-preview/index.js +1 -1
  1167. package/src/components/block-settings-menu/block-html-convert-button.js +28 -19
  1168. package/src/components/block-settings-menu-controls/index.js +1 -1
  1169. package/src/components/block-switcher/index.js +17 -18
  1170. package/src/components/block-switcher/test/__snapshots__/index.js.snap +2 -2
  1171. package/src/components/block-tools/block-selection-button.js +1 -1
  1172. package/src/components/border-radius-control/index.js +1 -1
  1173. package/src/components/child-layout-control/index.js +1 -1
  1174. package/src/components/color-palette/test/__snapshots__/control.js.snap +1 -1
  1175. package/src/components/colors/with-colors.js +1 -1
  1176. package/src/components/copy-handler/README.md +2 -0
  1177. package/src/components/copy-handler/index.js +21 -291
  1178. package/src/components/dimensions-tool/index.js +1 -1
  1179. package/src/components/dimensions-tool/scale-tool.js +1 -1
  1180. package/src/components/dimensions-tool/width-height-tool.js +1 -1
  1181. package/src/components/duotone-control/index.js +14 -2
  1182. package/src/components/editable-text/README.md +2 -2
  1183. package/src/components/font-appearance-control/index.js +1 -1
  1184. package/src/components/font-family/README.md +1 -1
  1185. package/src/components/height-control/README.md +1 -1
  1186. package/src/components/height-control/index.js +1 -1
  1187. package/src/components/image-size-control/README.md +2 -2
  1188. package/src/components/index.js +1 -1
  1189. package/src/components/inner-blocks/constants.native.js +5 -0
  1190. package/src/components/inner-blocks/index.native.js +15 -0
  1191. package/src/components/inner-blocks/warning-max-depth-exceeded.native.js +100 -0
  1192. package/src/components/inserter/block-patterns-filter.js +22 -10
  1193. package/src/components/inserter/block-patterns-tab.js +0 -3
  1194. package/src/components/inserter/index.js +2 -2
  1195. package/src/components/inserter/index.native.js +2 -2
  1196. package/src/components/inserter/media-tab/hooks.js +10 -44
  1197. package/src/components/inserter/style.scss +1 -1
  1198. package/src/components/letter-spacing-control/index.js +1 -1
  1199. package/src/components/list-view/block.js +3 -43
  1200. package/src/components/list-view/branch.js +11 -1
  1201. package/src/components/list-view/index.js +8 -4
  1202. package/src/components/list-view/utils.js +37 -0
  1203. package/src/components/media-placeholder/README.md +3 -3
  1204. package/src/components/media-upload/{constants.js → constants.native.js} +0 -1
  1205. package/src/components/media-upload/index.js +1 -1
  1206. package/src/components/media-upload/index.native.js +9 -5
  1207. package/src/components/panel-color-settings/README.md +5 -1
  1208. package/src/components/plain-text/README.md +1 -1
  1209. package/src/components/provider/README.md +1 -1
  1210. package/src/components/provider/use-block-sync.js +1 -1
  1211. package/src/components/publish-date-time-picker/README.md +1 -1
  1212. package/src/components/responsive-block-control/README.md +1 -3
  1213. package/src/components/rich-text/README.md +3 -3
  1214. package/src/components/rich-text/index.native.js +0 -13
  1215. package/src/components/rich-text/use-paste-handler.js +5 -99
  1216. package/src/components/rich-text/utils.js +0 -3
  1217. package/src/components/text-decoration-control/index.js +1 -1
  1218. package/src/components/text-transform-control/index.js +1 -1
  1219. package/src/components/typewriter/index.js +1 -1
  1220. package/src/components/unit-control/README.md +1 -1
  1221. package/src/components/unsupported-block-details/index.native.js +183 -0
  1222. package/src/components/unsupported-block-details/style.native.scss +56 -0
  1223. package/src/components/url-input/README.md +4 -4
  1224. package/src/components/use-on-block-drop/index.js +2 -2
  1225. package/src/components/use-unsupported-block-editor/index.native.js +59 -0
  1226. package/src/components/writing-flow/index.js +4 -2
  1227. package/src/components/writing-flow/use-clipboard-handler.js +242 -0
  1228. package/src/components/writing-mode-control/index.js +1 -1
  1229. package/src/hooks/anchor.js +2 -2
  1230. package/src/hooks/custom-class-name.js +2 -2
  1231. package/src/hooks/custom-fields.js +2 -2
  1232. package/src/hooks/font-size.js +1 -1
  1233. package/src/hooks/line-height.js +1 -1
  1234. package/src/hooks/position.js +2 -2
  1235. package/src/private-apis.js +2 -0
  1236. package/src/store/actions.js +7 -11
  1237. package/src/store/private-selectors.js +72 -0
  1238. package/src/store/reducer.js +17 -0
  1239. package/src/store/selectors.js +1 -1
  1240. package/src/store/test/actions.js +10 -16
  1241. package/src/utils/pasting.js +51 -0
  1242. package/src/utils/transform-styles/transforms/test/__snapshots__/wrap.js.snap +13 -6
  1243. package/src/utils/transform-styles/transforms/test/wrap.js +9 -0
  1244. package/src/utils/transform-styles/transforms/wrap.js +5 -0
  1245. package/src/utils/use-notify-copy.js +63 -0
  1246. package/tsconfig.tsbuildinfo +1 -1
  1247. package/build/components/block-settings-menu/block-convert-button.js +0 -27
  1248. package/build/components/block-settings-menu/block-convert-button.js.map +0 -1
  1249. package/build/components/media-upload/constants.js.map +0 -1
  1250. package/build-module/components/block-settings-menu/block-convert-button.js +0 -20
  1251. package/build-module/components/block-settings-menu/block-convert-button.js.map +0 -1
  1252. package/build-module/components/media-upload/constants.js.map +0 -1
  1253. package/src/components/block-settings-menu/block-convert-button.js +0 -14
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_reactNative","_blockEditor","_style","_interopRequireDefault","PlainText","Component","constructor","arguments","isAndroid","Platform","OS","onChangeTextInput","bind","onChangeRichText","componentDidMount","_input","isFocused","props","isSelected","timeoutID","setTimeout","focus","componentDidUpdate","prevProps","blur","componentWillUnmount","clearTimeout","getFontSize","style","fontSize","width","height","Dimensions","get","cssUnitOptions","parseFloat","getPxFromCssUnit","replaceLineBreakTags","value","replace","RegExp","event","onChange","nativeEvent","text","render","__experimentalVersion","onFocus","otherProps","textStyles","styles","disableFormattingProps","withoutInteractiveFormatting","disableEditingMenu","__unstableDisableFormats","disableSuggestions","forcePlainTextProps","preserveWhiteSpace","__unstablePastePlainText","multiline","fontProps","fontFamily","fontWeight","createElement","RichText","identifier","unstableOnFocus","TextInput","ref","x","onBlur","scrollEnabled","exports","default"],"sources":["@wordpress/block-editor/src/components/plain-text/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { TextInput, Platform, Dimensions } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { RichText, getPxFromCssUnit } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\n\nexport default class PlainText extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\t\tthis.isAndroid = Platform.OS === 'android';\n\n\t\tthis.onChangeTextInput = this.onChangeTextInput.bind( this );\n\t\tthis.onChangeRichText = this.onChangeRichText.bind( this );\n\t}\n\n\tcomponentDidMount() {\n\t\t// If isSelected is true, we should request the focus on this TextInput.\n\t\tif (\n\t\t\tthis._input &&\n\t\t\tthis._input.isFocused() === false &&\n\t\t\tthis.props.isSelected\n\t\t) {\n\t\t\tif ( this.isAndroid ) {\n\t\t\t\t/*\n\t\t\t\t * There seems to be an issue in React Native where the keyboard doesn't show if called shortly after rendering.\n\t\t\t\t * As a common work around this delay is used.\n\t\t\t\t * https://github.com/facebook/react-native/issues/19366#issuecomment-400603928\n\t\t\t\t */\n\t\t\t\tthis.timeoutID = setTimeout( () => {\n\t\t\t\t\tthis._input.focus();\n\t\t\t\t}, 100 );\n\t\t\t} else {\n\t\t\t\tthis._input.focus();\n\t\t\t}\n\t\t}\n\t}\n\n\tcomponentDidUpdate( prevProps ) {\n\t\tif ( ! this.props.isSelected && prevProps.isSelected ) {\n\t\t\tthis._input?.blur();\n\t\t}\n\t}\n\n\tcomponentWillUnmount() {\n\t\tif ( this.isAndroid ) {\n\t\t\tclearTimeout( this.timeoutID );\n\t\t}\n\t}\n\n\tfocus() {\n\t\tthis._input?.focus();\n\t}\n\n\tblur() {\n\t\tthis._input?.blur();\n\t}\n\n\tgetFontSize() {\n\t\tconst { style } = this.props;\n\n\t\tif ( ! style?.fontSize ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { width, height } = Dimensions.get( 'window' );\n\t\tconst cssUnitOptions = { height, width };\n\n\t\treturn {\n\t\t\tfontSize: parseFloat(\n\t\t\t\tgetPxFromCssUnit( style.fontSize, cssUnitOptions )\n\t\t\t),\n\t\t};\n\t}\n\n\treplaceLineBreakTags( value ) {\n\t\treturn value?.replace( RegExp( '<br>', 'gim' ), '\\n' );\n\t}\n\n\tonChangeTextInput( event ) {\n\t\tconst { onChange } = this.props;\n\t\tonChange( event.nativeEvent.text );\n\t}\n\n\tonChangeRichText( value ) {\n\t\tconst { onChange } = this.props;\n\t\t// The <br> tags have to be replaced with new line characters\n\t\t// as the content of plain text shouldn't contain HTML tags.\n\t\tonChange( this.replaceLineBreakTags( value ) );\n\t}\n\n\trender() {\n\t\tconst { style, __experimentalVersion, onFocus, ...otherProps } =\n\t\t\tthis.props;\n\t\tconst textStyles = [\n\t\t\tstyle || styles[ 'block-editor-plain-text' ],\n\t\t\tthis.getFontSize(),\n\t\t];\n\n\t\tif ( __experimentalVersion === 2 ) {\n\t\t\tconst disableFormattingProps = {\n\t\t\t\twithoutInteractiveFormatting: true,\n\t\t\t\tdisableEditingMenu: true,\n\t\t\t\t__unstableDisableFormats: true,\n\t\t\t\tdisableSuggestions: true,\n\t\t\t};\n\n\t\t\tconst forcePlainTextProps = {\n\t\t\t\tpreserveWhiteSpace: true,\n\t\t\t\t__unstablePastePlainText: true,\n\t\t\t\tmultiline: false,\n\t\t\t};\n\n\t\t\tconst fontProps = {\n\t\t\t\tfontFamily: style?.fontFamily,\n\t\t\t\tfontSize: style?.fontSize,\n\t\t\t\tfontWeight: style?.fontWeight,\n\t\t\t};\n\n\t\t\treturn (\n\t\t\t\t<RichText\n\t\t\t\t\t{ ...otherProps }\n\t\t\t\t\t{ ...disableFormattingProps }\n\t\t\t\t\t{ ...forcePlainTextProps }\n\t\t\t\t\t{ ...fontProps }\n\t\t\t\t\tidentifier=\"content\"\n\t\t\t\t\tstyle={ style }\n\t\t\t\t\tonChange={ this.onChangeRichText }\n\t\t\t\t\tunstableOnFocus={ onFocus }\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<TextInput\n\t\t\t\t{ ...this.props }\n\t\t\t\tref={ ( x ) => ( this._input = x ) }\n\t\t\t\tonChange={ this.onChangeTextInput }\n\t\t\t\tonFocus={ this.props.onFocus } // Always assign onFocus as a props.\n\t\t\t\tonBlur={ this.props.onBlur } // Always assign onBlur as a props.\n\t\t\t\tfontFamily={\n\t\t\t\t\t( this.props.style && this.props.style.fontFamily ) ||\n\t\t\t\t\tstyles[ 'block-editor-plain-text' ].fontFamily\n\t\t\t\t}\n\t\t\t\tstyle={ textStyles }\n\t\t\t\tscrollEnabled={ false }\n\t\t\t/>\n\t\t);\n\t}\n}\n"],"mappings":";;;;;;;AAQA,IAAAA,QAAA,GAAAC,OAAA;AALA,IAAAC,YAAA,GAAAD,OAAA;AAMA,IAAAE,YAAA,GAAAF,OAAA;AAKA,IAAAG,MAAA,GAAAC,sBAAA,CAAAJ,OAAA;AAdA;AACA;AACA;;AAGA;AACA;AACA;;AAIA;AACA;AACA;;AAGe,MAAMK,SAAS,SAASC,kBAAS,CAAC;EAChDC,WAAWA,CAAA,EAAG;IACb,KAAK,CAAE,GAAGC,SAAU,CAAC;IACrB,IAAI,CAACC,SAAS,GAAGC,qBAAQ,CAACC,EAAE,KAAK,SAAS;IAE1C,IAAI,CAACC,iBAAiB,GAAG,IAAI,CAACA,iBAAiB,CAACC,IAAI,CAAE,IAAK,CAAC;IAC5D,IAAI,CAACC,gBAAgB,GAAG,IAAI,CAACA,gBAAgB,CAACD,IAAI,CAAE,IAAK,CAAC;EAC3D;EAEAE,iBAAiBA,CAAA,EAAG;IACnB;IACA,IACC,IAAI,CAACC,MAAM,IACX,IAAI,CAACA,MAAM,CAACC,SAAS,CAAC,CAAC,KAAK,KAAK,IACjC,IAAI,CAACC,KAAK,CAACC,UAAU,EACpB;MACD,IAAK,IAAI,CAACV,SAAS,EAAG;QACrB;AACJ;AACA;AACA;AACA;QACI,IAAI,CAACW,SAAS,GAAGC,UAAU,CAAE,MAAM;UAClC,IAAI,CAACL,MAAM,CAACM,KAAK,CAAC,CAAC;QACpB,CAAC,EAAE,GAAI,CAAC;MACT,CAAC,MAAM;QACN,IAAI,CAACN,MAAM,CAACM,KAAK,CAAC,CAAC;MACpB;IACD;EACD;EAEAC,kBAAkBA,CAAEC,SAAS,EAAG;IAC/B,IAAK,CAAE,IAAI,C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,EAAG,IAAI,CAAC/B,iBAAmB;MACnCoC,OAAO,EAAG,IAAI,CAAC9B,KAAK,CAAC8B,OAAS,CAAC;MAAA;MAC/BuB,MAAM,EAAG,IAAI,CAACrD,KAAK,CAACqD,MAAQ,CAAC;MAAA;MAC7BT,UAAU,EACP,IAAI,CAAC5C,KAAK,CAACW,KAAK,IAAI,IAAI,CAACX,KAAK,CAACW,KAAK,CAACiC,UAAU,IACjDX,cAAM,CAAE,yBAAyB,CAAE,CAACW,UACpC;MACDjC,KAAK,EAAGqB,UAAY;MACpBsB,aAAa,EAAG;IAAO,CACvB,CAAC;EAEJ;AACD;AAACC,OAAA,CAAAC,OAAA,GAAArE,SAAA"}
1
+ {"version":3,"names":["_reactNative","require","_element","_blockEditor","_style","_interopRequireDefault","PlainText","Component","constructor","arguments","isAndroid","Platform","OS","onChangeTextInput","bind","onChangeRichText","componentDidMount","_input","isFocused","props","isSelected","timeoutID","setTimeout","focus","componentDidUpdate","prevProps","blur","componentWillUnmount","clearTimeout","getFontSize","style","fontSize","width","height","Dimensions","get","cssUnitOptions","parseFloat","getPxFromCssUnit","replaceLineBreakTags","value","replace","RegExp","event","onChange","nativeEvent","text","render","__experimentalVersion","onFocus","otherProps","textStyles","styles","disableFormattingProps","withoutInteractiveFormatting","disableEditingMenu","__unstableDisableFormats","disableSuggestions","forcePlainTextProps","preserveWhiteSpace","__unstablePastePlainText","multiline","fontProps","fontFamily","fontWeight","_react","createElement","RichText","identifier","unstableOnFocus","TextInput","ref","x","onBlur","scrollEnabled","exports","default"],"sources":["@wordpress/block-editor/src/components/plain-text/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { TextInput, Platform, Dimensions } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { RichText, getPxFromCssUnit } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\n\nexport default class PlainText extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\t\tthis.isAndroid = Platform.OS === 'android';\n\n\t\tthis.onChangeTextInput = this.onChangeTextInput.bind( this );\n\t\tthis.onChangeRichText = this.onChangeRichText.bind( this );\n\t}\n\n\tcomponentDidMount() {\n\t\t// If isSelected is true, we should request the focus on this TextInput.\n\t\tif (\n\t\t\tthis._input &&\n\t\t\tthis._input.isFocused() === false &&\n\t\t\tthis.props.isSelected\n\t\t) {\n\t\t\tif ( this.isAndroid ) {\n\t\t\t\t/*\n\t\t\t\t * There seems to be an issue in React Native where the keyboard doesn't show if called shortly after rendering.\n\t\t\t\t * As a common work around this delay is used.\n\t\t\t\t * https://github.com/facebook/react-native/issues/19366#issuecomment-400603928\n\t\t\t\t */\n\t\t\t\tthis.timeoutID = setTimeout( () => {\n\t\t\t\t\tthis._input.focus();\n\t\t\t\t}, 100 );\n\t\t\t} else {\n\t\t\t\tthis._input.focus();\n\t\t\t}\n\t\t}\n\t}\n\n\tcomponentDidUpdate( prevProps ) {\n\t\tif ( ! this.props.isSelected && prevProps.isSelected ) {\n\t\t\tthis._input?.blur();\n\t\t}\n\t}\n\n\tcomponentWillUnmount() {\n\t\tif ( this.isAndroid ) {\n\t\t\tclearTimeout( this.timeoutID );\n\t\t}\n\t}\n\n\tfocus() {\n\t\tthis._input?.focus();\n\t}\n\n\tblur() {\n\t\tthis._input?.blur();\n\t}\n\n\tgetFontSize() {\n\t\tconst { style } = this.props;\n\n\t\tif ( ! style?.fontSize ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { width, height } = Dimensions.get( 'window' );\n\t\tconst cssUnitOptions = { height, width };\n\n\t\treturn {\n\t\t\tfontSize: parseFloat(\n\t\t\t\tgetPxFromCssUnit( style.fontSize, cssUnitOptions )\n\t\t\t),\n\t\t};\n\t}\n\n\treplaceLineBreakTags( value ) {\n\t\treturn value?.replace( RegExp( '<br>', 'gim' ), '\\n' );\n\t}\n\n\tonChangeTextInput( event ) {\n\t\tconst { onChange } = this.props;\n\t\tonChange( event.nativeEvent.text );\n\t}\n\n\tonChangeRichText( value ) {\n\t\tconst { onChange } = this.props;\n\t\t// The <br> tags have to be replaced with new line characters\n\t\t// as the content of plain text shouldn't contain HTML tags.\n\t\tonChange( this.replaceLineBreakTags( value ) );\n\t}\n\n\trender() {\n\t\tconst { style, __experimentalVersion, onFocus, ...otherProps } =\n\t\t\tthis.props;\n\t\tconst textStyles = [\n\t\t\tstyle || styles[ 'block-editor-plain-text' ],\n\t\t\tthis.getFontSize(),\n\t\t];\n\n\t\tif ( __experimentalVersion === 2 ) {\n\t\t\tconst disableFormattingProps = {\n\t\t\t\twithoutInteractiveFormatting: true,\n\t\t\t\tdisableEditingMenu: true,\n\t\t\t\t__unstableDisableFormats: true,\n\t\t\t\tdisableSuggestions: true,\n\t\t\t};\n\n\t\t\tconst forcePlainTextProps = {\n\t\t\t\tpreserveWhiteSpace: true,\n\t\t\t\t__unstablePastePlainText: true,\n\t\t\t\tmultiline: false,\n\t\t\t};\n\n\t\t\tconst fontProps = {\n\t\t\t\tfontFamily: style?.fontFamily,\n\t\t\t\tfontSize: style?.fontSize,\n\t\t\t\tfontWeight: style?.fontWeight,\n\t\t\t};\n\n\t\t\treturn (\n\t\t\t\t<RichText\n\t\t\t\t\t{ ...otherProps }\n\t\t\t\t\t{ ...disableFormattingProps }\n\t\t\t\t\t{ ...forcePlainTextProps }\n\t\t\t\t\t{ ...fontProps }\n\t\t\t\t\tidentifier=\"content\"\n\t\t\t\t\tstyle={ style }\n\t\t\t\t\tonChange={ this.onChangeRichText }\n\t\t\t\t\tunstableOnFocus={ onFocus }\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<TextInput\n\t\t\t\t{ ...this.props }\n\t\t\t\tref={ ( x ) => ( this._input = x ) }\n\t\t\t\tonChange={ this.onChangeTextInput }\n\t\t\t\tonFocus={ this.props.onFocus } // Always assign onFocus as a props.\n\t\t\t\tonBlur={ this.props.onBlur } // Always assign onBlur as a props.\n\t\t\t\tfontFamily={\n\t\t\t\t\t( this.props.style && this.props.style.fontFamily ) ||\n\t\t\t\t\tstyles[ 'block-editor-plain-text' ].fontFamily\n\t\t\t\t}\n\t\t\t\tstyle={ textStyles }\n\t\t\t\tscrollEnabled={ false }\n\t\t\t/>\n\t\t);\n\t}\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAKA,IAAAG,MAAA,GAAAC,sBAAA,CAAAJ,OAAA;AAdA;AACA;AACA;;AAGA;AACA;AACA;;AAIA;AACA;AACA;;AAGe,MAAMK,SAAS,SAASC,kBAAS,CAAC;EAChDC,WAAWA,CAAA,EAAG;IACb,KAAK,CAAE,GAAGC,SAAU,CAAC;IACrB,IAAI,CAACC,SAAS,GAAGC,qBAAQ,CAACC,EAAE,KAAK,SAAS;IAE1C,IAAI,CAACC,iBAAiB,GAAG,IAAI,CAACA,iBAAiB,CAACC,IAAI,CAAE,IAAK,CAAC;IAC5D,IAAI,CAACC,gBAAgB,GAAG,IAAI,CAACA,gBAAgB,CAACD,IAAI,CAAE,IAAK,CAAC;EAC3D;EAEAE,iBAAiBA,CAAA,EAAG;IACnB;IACA,IACC,IAAI,CAACC,MAAM,IACX,IAAI,CAACA,MAAM,CAACC,SAAS,CAAC,CAAC,KAAK,KAAK,IACjC,IAAI,CAACC,KAAK,CAACC,UAAU,EACpB;MACD,IAAK,IAAI,CAACV,SAAS,EAAG;QACrB;AACJ;AACA;AACA;AACA;QACI,IAAI,CAACW,SAAS,GAAGC,UAAU,CAAE,MAAM;UAClC,IAAI,CAACL,MAAM,CAACM,KAAK,CAAC,CAAC;QACpB,CAAC,EAAE,GAAI,CAAC;MACT,CAAC,MAAM;QACN,IAAI,CAACN,MAAM,CAACM,KAAK,CAAC,CAAC;MACpB;IACD;EACD;EAEAC,kBAAkBA,CAAEC,SAAS,EAAG;IAC/B,IAAK,CAAE,IAAI,CAACN,KAA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,CAAC/B,iBAAmB;MACnCoC,OAAO,EAAG,IAAI,CAAC9B,KAAK,CAAC8B,OAAS,CAAC;MAAA;MAC/BwB,MAAM,EAAG,IAAI,CAACtD,KAAK,CAACsD,MAAQ,CAAC;MAAA;MAC7BV,UAAU,EACP,IAAI,CAAC5C,KAAK,CAACW,KAAK,IAAI,IAAI,CAACX,KAAK,CAACW,KAAK,CAACiC,UAAU,IACjDX,cAAM,CAAE,yBAAyB,CAAE,CAACW,UACpC;MACDjC,KAAK,EAAGqB,UAAY;MACpBuB,aAAa,EAAG;IAAO,CACvB,CAAC;EAEJ;AACD;AAACC,OAAA,CAAAC,OAAA,GAAAtE,SAAA"}
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = PreviewOptions;
8
- var _element = require("@wordpress/element");
8
+ var _react = require("react");
9
9
  var _classnames = _interopRequireDefault(require("classnames"));
10
10
  var _compose = require("@wordpress/compose");
11
11
  var _components = require("@wordpress/components");
@@ -48,7 +48,7 @@ function PreviewOptions({
48
48
  tablet: _icons.tablet,
49
49
  desktop: _icons.desktop
50
50
  };
51
- return (0, _element.createElement)(_components.DropdownMenu, {
51
+ return (0, _react.createElement)(_components.DropdownMenu, {
52
52
  className: "block-editor-post-preview__dropdown",
53
53
  popoverProps: popoverProps,
54
54
  toggleProps: toggleProps,
@@ -56,15 +56,15 @@ function PreviewOptions({
56
56
  icon: deviceIcons[deviceType.toLowerCase()],
57
57
  label: label || (0, _i18n.__)('Preview'),
58
58
  disableOpenOnArrowDown: !isEnabled
59
- }, renderProps => (0, _element.createElement)(_element.Fragment, null, (0, _element.createElement)(_components.MenuGroup, null, (0, _element.createElement)(_components.MenuItem, {
59
+ }, renderProps => (0, _react.createElement)(_react.Fragment, null, (0, _react.createElement)(_components.MenuGroup, null, (0, _react.createElement)(_components.MenuItem, {
60
60
  className: "block-editor-post-preview__button-resize",
61
61
  onClick: () => setDeviceType('Desktop'),
62
62
  icon: deviceType === 'Desktop' && _icons.check
63
- }, (0, _i18n.__)('Desktop')), (0, _element.createElement)(_components.MenuItem, {
63
+ }, (0, _i18n.__)('Desktop')), (0, _react.createElement)(_components.MenuItem, {
64
64
  className: "block-editor-post-preview__button-resize",
65
65
  onClick: () => setDeviceType('Tablet'),
66
66
  icon: deviceType === 'Tablet' && _icons.check
67
- }, (0, _i18n.__)('Tablet')), (0, _element.createElement)(_components.MenuItem, {
67
+ }, (0, _i18n.__)('Tablet')), (0, _react.createElement)(_components.MenuItem, {
68
68
  className: "block-editor-post-preview__button-resize",
69
69
  onClick: () => setDeviceType('Mobile'),
70
70
  icon: deviceType === 'Mobile' && _icons.check
@@ -1 +1 @@
1
- {"version":3,"names":["_classnames","_interopRequireDefault","require","_compose","_components","_i18n","_icons","PreviewOptions","children","viewLabel","className","isEnabled","deviceType","setDeviceType","label","isMobile","useViewportMatch","popoverProps","classnames","placement","toggleProps","disabled","__experimentalIsFocusable","menuProps","__","deviceIcons","mobile","tablet","desktop","_element","createElement","DropdownMenu","icon","toLowerCase","disableOpenOnArrowDown","renderProps","Fragment","MenuGroup","MenuItem","onClick","check"],"sources":["@wordpress/block-editor/src/components/preview-options/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useViewportMatch } from '@wordpress/compose';\nimport { DropdownMenu, MenuGroup, MenuItem } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { check, desktop, mobile, tablet } from '@wordpress/icons';\n\nexport default function PreviewOptions( {\n\tchildren,\n\tviewLabel,\n\tclassName,\n\tisEnabled = true,\n\tdeviceType,\n\tsetDeviceType,\n\tlabel,\n} ) {\n\tconst isMobile = useViewportMatch( 'small', '<' );\n\tif ( isMobile ) return null;\n\n\tconst popoverProps = {\n\t\tclassName: classnames(\n\t\t\tclassName,\n\t\t\t'block-editor-post-preview__dropdown-content'\n\t\t),\n\t\tplacement: 'bottom-end',\n\t};\n\tconst toggleProps = {\n\t\tclassName: 'block-editor-post-preview__button-toggle',\n\t\tdisabled: ! isEnabled,\n\t\t__experimentalIsFocusable: ! isEnabled,\n\t\tchildren: viewLabel,\n\t};\n\tconst menuProps = {\n\t\t'aria-label': __( 'View options' ),\n\t};\n\n\tconst deviceIcons = {\n\t\tmobile,\n\t\ttablet,\n\t\tdesktop,\n\t};\n\n\treturn (\n\t\t<DropdownMenu\n\t\t\tclassName=\"block-editor-post-preview__dropdown\"\n\t\t\tpopoverProps={ popoverProps }\n\t\t\ttoggleProps={ toggleProps }\n\t\t\tmenuProps={ menuProps }\n\t\t\ticon={ deviceIcons[ deviceType.toLowerCase() ] }\n\t\t\tlabel={ label || __( 'Preview' ) }\n\t\t\tdisableOpenOnArrowDown={ ! isEnabled }\n\t\t>\n\t\t\t{ ( renderProps ) => (\n\t\t\t\t<>\n\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\tclassName=\"block-editor-post-preview__button-resize\"\n\t\t\t\t\t\t\tonClick={ () => setDeviceType( 'Desktop' ) }\n\t\t\t\t\t\t\ticon={ deviceType === 'Desktop' && check }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Desktop' ) }\n\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\tclassName=\"block-editor-post-preview__button-resize\"\n\t\t\t\t\t\t\tonClick={ () => setDeviceType( 'Tablet' ) }\n\t\t\t\t\t\t\ticon={ deviceType === 'Tablet' && check }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Tablet' ) }\n\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\tclassName=\"block-editor-post-preview__button-resize\"\n\t\t\t\t\t\t\tonClick={ () => setDeviceType( 'Mobile' ) }\n\t\t\t\t\t\t\ticon={ deviceType === 'Mobile' && check }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'M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,EAAGA,SAAW;IACvBS,IAAI,EAAGP,WAAW,CAAEb,UAAU,CAACqB,WAAW,CAAC,CAAC,CAAI;IAChDnB,KAAK,EAAGA,KAAK,IAAI,IAAAU,QAAE,EAAE,SAAU,CAAG;IAClCU,sBAAsB,EAAG,CAAEvB;EAAW,GAElCwB,WAAW,IACd,IAAAN,QAAA,CAAAC,aAAA,EAAAD,QAAA,CAAAO,QAAA,QACC,IAAAP,QAAA,CAAAC,aAAA,EAAC1B,WAAA,CAAAiC,SAAS,QACT,IAAAR,QAAA,CAAAC,aAAA,EAAC1B,WAAA,CAAAkC,QAAQ;IACR5B,SAAS,EAAC,0CAA0C;IACpD6B,OAAO,EAAGA,CAAA,KAAM1B,aAAa,CAAE,SAAU,CAAG;IAC5CmB,IAAI,EAAGpB,UAAU,KAAK,SAAS,IAAI4B;EAAO,GAExC,IAAAhB,QAAE,EAAE,SAAU,CACP,CAAC,EACX,IAAAK,QAAA,CAAAC,aAAA,EAAC1B,WAAA,CAAAkC,QAAQ;IACR5B,SAAS,EAAC,0CAA0C;IACpD6B,OAAO,EAAGA,CAAA,KAAM1B,aAAa,CAAE,QAAS,CAAG;IAC3CmB,IAAI,EAAGpB,UAAU,KAAK,QAAQ,IAAI4B;EAAO,GAEvC,IAAAhB,QAAE,EAAE,QAAS,CACN,CAAC,EACX,IAAAK,QAAA,CAAAC,aAAA,EAAC1B,WAAA,CAAAkC,QAAQ;IACR5B,SAAS,EAAC,0CAA0C;IACpD6B,OAAO,EAAGA,CAAA,KAAM1B,aAAa,CAAE,QAAS,CAAG;IAC3CmB,IAAI,EAAGpB,UAAU,KAAK,QAAQ,IAAI4B;EAAO,GAEvC,IAAAhB,QAAE,EAAE,QAAS,CACN,CACA,CAAC,EACVhB,QAAQ,GAAI2B,WAAY,CACzB,CAEU,CAAC;AAEjB"}
1
+ {"version":3,"names":["_classnames","_interopRequireDefault","require","_compose","_components","_i18n","_icons","PreviewOptions","children","viewLabel","className","isEnabled","deviceType","setDeviceType","label","isMobile","useViewportMatch","popoverProps","classnames","placement","toggleProps","disabled","__experimentalIsFocusable","menuProps","__","deviceIcons","mobile","tablet","desktop","_react","createElement","DropdownMenu","icon","toLowerCase","disableOpenOnArrowDown","renderProps","Fragment","MenuGroup","MenuItem","onClick","check"],"sources":["@wordpress/block-editor/src/components/preview-options/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useViewportMatch } from '@wordpress/compose';\nimport { DropdownMenu, MenuGroup, MenuItem } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { check, desktop, mobile, tablet } from '@wordpress/icons';\n\nexport default function PreviewOptions( {\n\tchildren,\n\tviewLabel,\n\tclassName,\n\tisEnabled = true,\n\tdeviceType,\n\tsetDeviceType,\n\tlabel,\n} ) {\n\tconst isMobile = useViewportMatch( 'small', '<' );\n\tif ( isMobile ) return null;\n\n\tconst popoverProps = {\n\t\tclassName: classnames(\n\t\t\tclassName,\n\t\t\t'block-editor-post-preview__dropdown-content'\n\t\t),\n\t\tplacement: 'bottom-end',\n\t};\n\tconst toggleProps = {\n\t\tclassName: 'block-editor-post-preview__button-toggle',\n\t\tdisabled: ! isEnabled,\n\t\t__experimentalIsFocusable: ! isEnabled,\n\t\tchildren: viewLabel,\n\t};\n\tconst menuProps = {\n\t\t'aria-label': __( 'View options' ),\n\t};\n\n\tconst deviceIcons = {\n\t\tmobile,\n\t\ttablet,\n\t\tdesktop,\n\t};\n\n\treturn (\n\t\t<DropdownMenu\n\t\t\tclassName=\"block-editor-post-preview__dropdown\"\n\t\t\tpopoverProps={ popoverProps }\n\t\t\ttoggleProps={ toggleProps }\n\t\t\tmenuProps={ menuProps }\n\t\t\ticon={ deviceIcons[ deviceType.toLowerCase() ] }\n\t\t\tlabel={ label || __( 'Preview' ) }\n\t\t\tdisableOpenOnArrowDown={ ! isEnabled }\n\t\t>\n\t\t\t{ ( renderProps ) => (\n\t\t\t\t<>\n\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\tclassName=\"block-editor-post-preview__button-resize\"\n\t\t\t\t\t\t\tonClick={ () => setDeviceType( 'Desktop' ) }\n\t\t\t\t\t\t\ticon={ deviceType === 'Desktop' && check }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Desktop' ) }\n\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\tclassName=\"block-editor-post-preview__button-resize\"\n\t\t\t\t\t\t\tonClick={ () => setDeviceType( 'Tablet' ) }\n\t\t\t\t\t\t\ticon={ deviceType === 'Tablet' && check }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Tablet' ) }\n\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\tclassName=\"block-editor-post-preview__button-resize\"\n\t\t\t\t\t\t\tonClick={ () => setDeviceType( 'Mobile' ) }\n\t\t\t\t\t\t\ticon={ deviceType === 'Mobile' && check }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Mobile' ) }\n\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t{ children?.( renderProps ) }\n\t\t\t\t</>\n\t\t\t) }\n\t\t</DropdownMenu>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AAXA;AACA;AACA;;AAGA;AACA;AACA;;AAMe,SAASK,cAAcA,CAAE;EACvCC,QAAQ;EACRC,SAAS;EACTC,SAAS;EACTC,SAAS,GAAG,IAAI;EAChBC,UAAU;EACVC,aAAa;EACbC;AACD,CAAC,EAAG;EACH,MAAMC,QAAQ,GAAG,I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AAAhB,QAAE,EAAE,SAAU,CACP,CAAC,EACX,IAAAK,MAAA,CAAAC,aAAA,EAAC1B,WAAA,CAAAkC,QAAQ;IACR5B,SAAS,EAAC,0CAA0C;IACpD6B,OAAO,EAAGA,CAAA,KAAM1B,aAAa,CAAE,QAAS,CAAG;IAC3CmB,IAAI,EAAGpB,UAAU,KAAK,QAAQ,IAAI4B;EAAO,GAEvC,IAAAhB,QAAE,EAAE,QAAS,CACN,CAAC,EACX,IAAAK,MAAA,CAAAC,aAAA,EAAC1B,WAAA,CAAAkC,QAAQ;IACR5B,SAAS,EAAC,0CAA0C;IACpD6B,OAAO,EAAGA,CAAA,KAAM1B,aAAa,CAAE,QAAS,CAAG;IAC3CmB,IAAI,EAAGpB,UAAU,KAAK,QAAQ,IAAI4B;EAAO,GAEvC,IAAAhB,QAAE,EAAE,QAAS,CACN,CACA,CAAC,EACVhB,QAAQ,GAAI2B,WAAY,CACzB,CAEU,CAAC;AAEjB"}
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.BlockRefs = void 0;
7
7
  exports.BlockRefsProvider = BlockRefsProvider;
8
+ var _react = require("react");
8
9
  var _element = require("@wordpress/element");
9
10
  /**
10
11
  * WordPress dependencies
@@ -22,7 +23,7 @@ function BlockRefsProvider({
22
23
  refs: new Map(),
23
24
  callbacks: new Map()
24
25
  }), []);
25
- return (0, _element.createElement)(BlockRefs.Provider, {
26
+ return (0, _react.createElement)(BlockRefs.Provider, {
26
27
  value: value
27
28
  }, children);
28
29
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","BlockRefs","createContext","refs","Map","callbacks","exports","BlockRefsProvider","children","value","useMemo","createElement","Provider"],"sources":["@wordpress/block-editor/src/components/provider/block-refs-provider.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createContext, useMemo } from '@wordpress/element';\n\nexport const BlockRefs = createContext( {\n\trefs: new Map(),\n\tcallbacks: new Map(),\n} );\n\nexport function BlockRefsProvider( { children } ) {\n\tconst value = useMemo(\n\t\t() => ( { refs: new Map(), callbacks: new Map() } ),\n\t\t[]\n\t);\n\treturn (\n\t\t<BlockRefs.Provider value={ value }>{ children }</BlockRefs.Provider>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGO,MAAMC,SAAS,GAAG,IAAAC,sBAAa,EAAE;EACvCC,IAAI,EAAE,IAAIC,GAAG,CAAC,CAAC;EACfC,SAAS,EAAE,IAAID,GAAG,CAAC;AACpB,CAAE,CAAC;AAACE,OAAA,CAAAL,SAAA,GAAAA,SAAA;AAEG,SAASM,iBAAiBA,CAAE;EAAEC;AAAS,CAAC,EAAG;EACjD,MAAMC,KAAK,GAAG,IAAAC,gBAAO,EACpB,OAAQ;IAAEP,IAAI,EAAE,IAAIC,GAAG,CAAC,CAAC;IAAEC,SAAS,EAAE,IAAID,GAAG,CAAC;EAAE,CAAC,CAAE,EACnD,EACD,CAAC;EACD,OACC,IAAAL,QAAA,CAAAY,aAAA,EAACV,SAAS,CAACW,QAAQ;IAACH,KAAK,EAAGA;EAAO,GAAGD,QAA8B,CAAC;AAEvE"}
1
+ {"version":3,"names":["_element","require","BlockRefs","createContext","refs","Map","callbacks","exports","BlockRefsProvider","children","value","useMemo","_react","createElement","Provider"],"sources":["@wordpress/block-editor/src/components/provider/block-refs-provider.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createContext, useMemo } from '@wordpress/element';\n\nexport const BlockRefs = createContext( {\n\trefs: new Map(),\n\tcallbacks: new Map(),\n} );\n\nexport function BlockRefsProvider( { children } ) {\n\tconst value = useMemo(\n\t\t() => ( { refs: new Map(), callbacks: new Map() } ),\n\t\t[]\n\t);\n\treturn (\n\t\t<BlockRefs.Provider value={ value }>{ children }</BlockRefs.Provider>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGO,MAAMC,SAAS,GAAG,IAAAC,sBAAa,EAAE;EACvCC,IAAI,EAAE,IAAIC,GAAG,CAAC,CAAC;EACfC,SAAS,EAAE,IAAID,GAAG,CAAC;AACpB,CAAE,CAAC;AAACE,OAAA,CAAAL,SAAA,GAAAA,SAAA;AAEG,SAASM,iBAAiBA,CAAE;EAAEC;AAAS,CAAC,EAAG;EACjD,MAAMC,KAAK,GAAG,IAAAC,gBAAO,EACpB,OAAQ;IAAEP,IAAI,EAAE,IAAIC,GAAG,CAAC,CAAC;IAAEC,SAAS,EAAE,IAAID,GAAG,CAAC;EAAE,CAAC,CAAE,EACnD,EACD,CAAC;EACD,OACC,IAAAO,MAAA,CAAAC,aAAA,EAACX,SAAS,CAACY,QAAQ;IAACJ,KAAK,EAAGA;EAAO,GAAGD,QAA8B,CAAC;AAEvE"}
@@ -5,8 +5,9 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = exports.ExperimentalBlockEditorProvider = exports.BlockEditorProvider = void 0;
8
- var _element = require("@wordpress/element");
8
+ var _react = require("react");
9
9
  var _data = require("@wordpress/data");
10
+ var _element = require("@wordpress/element");
10
11
  var _components = require("@wordpress/components");
11
12
  var _withRegistryProvider = _interopRequireDefault(require("./with-registry-provider"));
12
13
  var _useBlockSync = _interopRequireDefault(require("./use-block-sync"));
@@ -45,11 +46,11 @@ const ExperimentalBlockEditorProvider = (0, _withRegistryProvider.default)(props
45
46
 
46
47
  // Syncs the entity provider with changes in the block-editor store.
47
48
  (0, _useBlockSync.default)(props);
48
- return (0, _element.createElement)(_components.SlotFillProvider, null, (0, _element.createElement)(_keyboardShortcuts.default.Register, null), (0, _element.createElement)(_blockRefsProvider.BlockRefsProvider, null, children));
49
+ return (0, _react.createElement)(_components.SlotFillProvider, null, (0, _react.createElement)(_keyboardShortcuts.default.Register, null), (0, _react.createElement)(_blockRefsProvider.BlockRefsProvider, null, children));
49
50
  });
50
51
  exports.ExperimentalBlockEditorProvider = ExperimentalBlockEditorProvider;
51
52
  const BlockEditorProvider = props => {
52
- return (0, _element.createElement)(ExperimentalBlockEditorProvider, {
53
+ return (0, _react.createElement)(ExperimentalBlockEditorProvider, {
53
54
  ...props,
54
55
  stripExperimentalSettings: true
55
56
  }, props.children);
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_data","_components","_withRegistryProvider","_interopRequireDefault","_useBlockSync","_store","_blockRefsProvider","_lockUnlock","_keyboardShortcuts","ExperimentalBlockEditorProvider","withRegistryProvider","props","children","settings","stripExperimentalSettings","__experimentalUpdateSettings","unlock","useDispatch","blockEditorStore","useEffect","__internalIsInitialized","reset","useBlockSync","createElement","SlotFillProvider","default","Register","BlockRefsProvider","exports","BlockEditorProvider","_default"],"sources":["@wordpress/block-editor/src/components/provider/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useDispatch } from '@wordpress/data';\nimport { useEffect } from '@wordpress/element';\nimport { SlotFillProvider } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport withRegistryProvider from './with-registry-provider';\nimport useBlockSync from './use-block-sync';\nimport { store as blockEditorStore } from '../../store';\nimport { BlockRefsProvider } from './block-refs-provider';\nimport { unlock } from '../../lock-unlock';\nimport KeyboardShortcuts from '../keyboard-shortcuts';\n\n/** @typedef {import('@wordpress/data').WPDataRegistry} WPDataRegistry */\n\nexport const ExperimentalBlockEditorProvider = withRegistryProvider(\n\t( props ) => {\n\t\tconst { children, settings, stripExperimentalSettings = false } = props;\n\n\t\tconst { __experimentalUpdateSettings } = unlock(\n\t\t\tuseDispatch( blockEditorStore )\n\t\t);\n\t\tuseEffect( () => {\n\t\t\t__experimentalUpdateSettings(\n\t\t\t\t{\n\t\t\t\t\t...settings,\n\t\t\t\t\t__internalIsInitialized: true,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tstripExperimentalSettings,\n\t\t\t\t\treset: true,\n\t\t\t\t}\n\t\t\t);\n\t\t}, [\n\t\t\tsettings,\n\t\t\tstripExperimentalSettings,\n\t\t\t__experimentalUpdateSettings,\n\t\t] );\n\n\t\t// Syncs the entity provider with changes in the block-editor store.\n\t\tuseBlockSync( props );\n\n\t\treturn (\n\t\t\t<SlotFillProvider>\n\t\t\t\t<KeyboardShortcuts.Register />\n\t\t\t\t<BlockRefsProvider>{ children }</BlockRefsProvider>\n\t\t\t</SlotFillProvider>\n\t\t);\n\t}\n);\n\nexport const BlockEditorProvider = ( props ) => {\n\treturn (\n\t\t<ExperimentalBlockEditorProvider\n\t\t\t{ ...props }\n\t\t\tstripExperimentalSettings={ true }\n\t\t>\n\t\t\t{ props.children }\n\t\t</ExperimentalBlockEditorProvider>\n\t);\n};\n\nexport default BlockEditorProvider;\n"],"mappings":";;;;;;;AAIA,IAAAA,QAAA,GAAAC,OAAA;AADA,IAAAC,KAAA,GAAAD,OAAA;AAEA,IAAAE,WAAA,GAAAF,OAAA;AAKA,IAAAG,qBAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,aAAA,GAAAD,sBAAA,CAAAJ,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,kBAAA,GAAAP,OAAA;AACA,IAAAQ,WAAA,GAAAR,OAAA;AACA,IAAAS,kBAAA,GAAAL,sBAAA,CAAAJ,OAAA;AAfA;AACA;AACA;;AAKA;AACA;AACA;;AAQA;;AAEO,MAAMU,+BAA+B,GAAG,IAAAC,6BAAoB,EAChEC,KAAK,IAAM;EACZ,MAAM;IAAEC,QAAQ;IAAEC,QAAQ;IAAEC,yBAAyB,GAAG;EAAM,CAAC,GAAGH,KAAK;EAEvE,MAAM;IAAEI;EAA6B,CAAC,GAAG,IAAAC,kBAAM,EAC9C,IAAAC,iBAAW,EAAEC,YAAiB,CAC/B,CAAC;EACD,IAAAC,kBAAS,EAAE,MAAM;IAChBJ,4BAA4B,CAC3B;MACC,GAAGF,QAAQ;MACXO,uBAAuB,EAAE;IAC1B,CAAC,EACD;MACCN,yBAAyB;MACzBO,KAAK,EAAE;IACR,CACD,CAAC;EACF,CAAC,EAAE,CACFR,QAAQ,EACRC,yBAAyB,EACzBC,4BAA4B,CAC3B,CAAC;;EAEH;EACA,IAAAO,qBAAY,EAAEX,KAAM,CAAC;EAErB,OACC,IAAAb,QAAA,CAAAyB,aAAA,EAACtB,WAAA,CAAAuB,gBAAgB,QAChB,IAAA1B,QAAA,CAAAyB,aAAA,EAACf,kBAAA,CAAAiB,OAAiB,CAACC,QAAQ,MAAE,CAAC,EAC9B,IAAA5B,QAAA,CAAAyB,aAAA,EAACjB,kBAAA,CAAAqB,iBAAiB,QAAGf,QAA6B,CACjC,CAAC;AAErB,CACD,CAAC;AAACgB,OAAA,CAAAnB,+BAAA,GAAAA,+BAAA;AAEK,MAAMoB,mBAAmB,GAAKlB,KAAK,IAAM;EAC/C,OACC,IAAAb,QAAA,CAAAyB,aAAA,EAACd,+BAA+B;IAAA,GAC1BE,KAAK;IACVG,yBAAyB,EAAG;EAAM,GAEhCH,KAAK,CAACC,QACwB,CAAC;AAEpC,CAAC;AAACgB,OAAA,CAAAC,mBAAA,GAAAA,mBAAA;AAAA,IAAAC,QAAA,GAEaD,mBAAmB;AAAAD,OAAA,CAAAH,OAAA,GAAAK,QAAA"}
1
+ {"version":3,"names":["_data","require","_element","_components","_withRegistryProvider","_interopRequireDefault","_useBlockSync","_store","_blockRefsProvider","_lockUnlock","_keyboardShortcuts","ExperimentalBlockEditorProvider","withRegistryProvider","props","children","settings","stripExperimentalSettings","__experimentalUpdateSettings","unlock","useDispatch","blockEditorStore","useEffect","__internalIsInitialized","reset","useBlockSync","_react","createElement","SlotFillProvider","default","Register","BlockRefsProvider","exports","BlockEditorProvider","_default"],"sources":["@wordpress/block-editor/src/components/provider/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useDispatch } from '@wordpress/data';\nimport { useEffect } from '@wordpress/element';\nimport { SlotFillProvider } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport withRegistryProvider from './with-registry-provider';\nimport useBlockSync from './use-block-sync';\nimport { store as blockEditorStore } from '../../store';\nimport { BlockRefsProvider } from './block-refs-provider';\nimport { unlock } from '../../lock-unlock';\nimport KeyboardShortcuts from '../keyboard-shortcuts';\n\n/** @typedef {import('@wordpress/data').WPDataRegistry} WPDataRegistry */\n\nexport const ExperimentalBlockEditorProvider = withRegistryProvider(\n\t( props ) => {\n\t\tconst { children, settings, stripExperimentalSettings = false } = props;\n\n\t\tconst { __experimentalUpdateSettings } = unlock(\n\t\t\tuseDispatch( blockEditorStore )\n\t\t);\n\t\tuseEffect( () => {\n\t\t\t__experimentalUpdateSettings(\n\t\t\t\t{\n\t\t\t\t\t...settings,\n\t\t\t\t\t__internalIsInitialized: true,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tstripExperimentalSettings,\n\t\t\t\t\treset: true,\n\t\t\t\t}\n\t\t\t);\n\t\t}, [\n\t\t\tsettings,\n\t\t\tstripExperimentalSettings,\n\t\t\t__experimentalUpdateSettings,\n\t\t] );\n\n\t\t// Syncs the entity provider with changes in the block-editor store.\n\t\tuseBlockSync( props );\n\n\t\treturn (\n\t\t\t<SlotFillProvider>\n\t\t\t\t<KeyboardShortcuts.Register />\n\t\t\t\t<BlockRefsProvider>{ children }</BlockRefsProvider>\n\t\t\t</SlotFillProvider>\n\t\t);\n\t}\n);\n\nexport const BlockEditorProvider = ( props ) => {\n\treturn (\n\t\t<ExperimentalBlockEditorProvider\n\t\t\t{ ...props }\n\t\t\tstripExperimentalSettings={ true }\n\t\t>\n\t\t\t{ props.children }\n\t\t</ExperimentalBlockEditorProvider>\n\t);\n};\n\nexport default BlockEditorProvider;\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAKA,IAAAG,qBAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,aAAA,GAAAD,sBAAA,CAAAJ,OAAA;AACA,IAAAM,MA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AAAA,mBAAA;AAAA,IAAAC,QAAA,GAEaD,mBAAmB;AAAAD,OAAA,CAAAH,OAAA,GAAAK,QAAA"}
@@ -5,8 +5,9 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = exports.ExperimentalBlockEditorProvider = void 0;
8
- var _element = require("@wordpress/element");
8
+ var _react = require("react");
9
9
  var _data = require("@wordpress/data");
10
+ var _element = require("@wordpress/element");
10
11
  var _withRegistryProvider = _interopRequireDefault(require("./with-registry-provider"));
11
12
  var _useBlockSync = _interopRequireDefault(require("./use-block-sync"));
12
13
  var _store = require("../../store");
@@ -35,7 +36,7 @@ const BlockEditorProvider = (0, _withRegistryProvider.default)(function (props)
35
36
 
36
37
  // Syncs the entity provider with changes in the block-editor store.
37
38
  (0, _useBlockSync.default)(props);
38
- return (0, _element.createElement)(_blockRefsProvider.BlockRefsProvider, null, children);
39
+ return (0, _react.createElement)(_blockRefsProvider.BlockRefsProvider, null, children);
39
40
  });
40
41
  exports.ExperimentalBlockEditorProvider = BlockEditorProvider;
41
42
  var _default = BlockEditorProvider;
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_data","_withRegistryProvider","_interopRequireDefault","_useBlockSync","_store","_blockRefsProvider","BlockEditorProvider","withRegistryProvider","props","children","settings","updateSettings","useDispatch","blockEditorStore","useEffect","useBlockSync","createElement","BlockRefsProvider","exports","ExperimentalBlockEditorProvider","_default","default"],"sources":["@wordpress/block-editor/src/components/provider/index.native.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useDispatch } from '@wordpress/data';\nimport { useEffect } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport withRegistryProvider from './with-registry-provider';\nimport useBlockSync from './use-block-sync';\nimport { store as blockEditorStore } from '../../store';\nimport { BlockRefsProvider } from './block-refs-provider';\n\n/** @typedef {import('@wordpress/data').WPDataRegistry} WPDataRegistry */\n\nconst BlockEditorProvider = withRegistryProvider( function ( props ) {\n\tconst { children, settings } = props;\n\n\tconst { updateSettings } = useDispatch( blockEditorStore );\n\tuseEffect( () => {\n\t\tupdateSettings( settings );\n\t}, [ settings ] );\n\n\t// Syncs the entity provider with changes in the block-editor store.\n\tuseBlockSync( props );\n\n\treturn <BlockRefsProvider>{ children }</BlockRefsProvider>;\n} );\n\nexport default BlockEditorProvider;\nexport { BlockEditorProvider as ExperimentalBlockEditorProvider };\n"],"mappings":";;;;;;;AAIA,IAAAA,QAAA,GAAAC,OAAA;AADA,IAAAC,KAAA,GAAAD,OAAA;AAMA,IAAAE,qBAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,aAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,kBAAA,GAAAN,OAAA;AAZA;AACA;AACA;;AAIA;AACA;AACA;;AAMA;;AAEA,MAAMO,mBAAmB,GAAG,IAAAC,6BAAoB,EAAE,UAAWC,KAAK,EAAG;EACpE,MAAM;IAAEC,QAAQ;IAAEC;EAAS,CAAC,GAAGF,KAAK;EAEpC,MAAM;IAAEG;EAAe,CAAC,GAAG,IAAAC,iBAAW,EAAEC,YAAiB,CAAC;EAC1D,IAAAC,kBAAS,EAAE,MAAM;IAChBH,cAAc,CAAED,QAAS,CAAC;EAC3B,CAAC,EAAE,CAAEA,QAAQ,CAAG,CAAC;;EAEjB;EACA,IAAAK,qBAAY,EAAEP,KAAM,CAAC;EAErB,OAAO,IAAAV,QAAA,CAAAkB,aAAA,EAACX,kBAAA,CAAAY,iBAAiB,QAAGR,QAA6B,CAAC;AAC3D,CAAE,CAAC;AAACS,OAAA,CAAAC,+BAAA,GAAAb,mBAAA;AAAA,IAAAc,QAAA,GAEWd,mBAAmB;AAAAY,OAAA,CAAAG,OAAA,GAAAD,QAAA"}
1
+ {"version":3,"names":["_data","require","_element","_withRegistryProvider","_interopRequireDefault","_useBlockSync","_store","_blockRefsProvider","BlockEditorProvider","withRegistryProvider","props","children","settings","updateSettings","useDispatch","blockEditorStore","useEffect","useBlockSync","_react","createElement","BlockRefsProvider","exports","ExperimentalBlockEditorProvider","_default","default"],"sources":["@wordpress/block-editor/src/components/provider/index.native.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useDispatch } from '@wordpress/data';\nimport { useEffect } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport withRegistryProvider from './with-registry-provider';\nimport useBlockSync from './use-block-sync';\nimport { store as blockEditorStore } from '../../store';\nimport { BlockRefsProvider } from './block-refs-provider';\n\n/** @typedef {import('@wordpress/data').WPDataRegistry} WPDataRegistry */\n\nconst BlockEditorProvider = withRegistryProvider( function ( props ) {\n\tconst { children, settings } = props;\n\n\tconst { updateSettings } = useDispatch( blockEditorStore );\n\tuseEffect( () => {\n\t\tupdateSettings( settings );\n\t}, [ settings ] );\n\n\t// Syncs the entity provider with changes in the block-editor store.\n\tuseBlockSync( props );\n\n\treturn <BlockRefsProvider>{ children }</BlockRefsProvider>;\n} );\n\nexport default BlockEditorProvider;\nexport { BlockEditorProvider as ExperimentalBlockEditorProvider };\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAKA,IAAAE,qBAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,aAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,kBAAA,GAAAN,OAAA;AAZA;AACA;AACA;;AAIA;AACA;AACA;;AAMA;;AAEA,MAAMO,mBAAmB,GAAG,IAAAC,6BAAoB,EAAE,UAAWC,KAAK,EAAG;EACpE,MAAM;IAAEC,QAAQ;IAAEC;EAAS,CAAC,GAAGF,KAAK;EAEpC,MAAM;IAAEG;EAAe,CAAC,GAAG,IAAAC,iBAAW,EAAEC,YAAiB,CAAC;EAC1D,IAAAC,kBAAS,EAAE,MAAM;IAChBH,cAAc,CAAED,QAAS,CAAC;EAC3B,CAAC,EAAE,CAAEA,QAAQ,CAAG,CAAC;;EAEjB;EACA,IAAAK,qBAAY,EAAEP,KAAM,CAAC;EAErB,OAAO,IAAAQ,MAAA,CAAAC,aAAA,EAACZ,kBAAA,CAAAa,iBAAiB,QAAGT,QAA6B,CAAC;AAC3D,CAAE,CAAC;AAACU,OAAA,CAAAC,+BAAA,GAAAd,mBAAA;AAAA,IAAAe,QAAA,GAEWf,mBAAmB;AAAAa,OAAA,CAAAG,OAAA,GAAAD,QAAA"}
@@ -261,7 +261,7 @@ function useBlockSync({
261
261
  });
262
262
  }
263
263
  previousAreBlocksDifferent = areBlocksDifferent;
264
- });
264
+ }, _store.store);
265
265
  return () => {
266
266
  subscribed.current = false;
267
267
  unsubscribe();
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_data","_blocks","_store","noop","useBlockSync","clientId","value","controlledBlocks","selection","controlledSelection","onChange","onInput","registry","useRegistry","resetBlocks","resetSelection","replaceInnerBlocks","selectBlock","setHasControlledInnerBlocks","__unstableMarkNextChangeAsNotPersistent","dispatch","blockEditorStore","hasSelectedBlock","getBlockName","getBlocks","getSelectionStart","getSelectionEnd","getBlock","select","isControlled","useSelect","areInnerBlocksControlled","pendingChanges","useRef","incoming","outgoing","subscribed","setControlledBlocks","batch","storeBlocks","map","block","cloneBlock","current","unsetControlledBlocks","onInputRef","onChangeRef","useEffect","includes","length","hadSelecton","selectionAnchor","selectionFocus","selectionStart","selectionEnd","initialPosition","selectionStillExists","getSelectedBlocksInitialCaretPosition","isLastBlockChangePersistent","__unstableIsLastBlockChangeIgnored","blocks","isPersistent","previousAreBlocksDifferent","unsubscribe","subscribe","isStillControlled","newIsPersistent","newBlocks","areBlocksDifferent","didPersistenceChange","push","updateParent"],"sources":["@wordpress/block-editor/src/components/provider/use-block-sync.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useEffect, useRef } from '@wordpress/element';\nimport { useRegistry, useSelect } from '@wordpress/data';\nimport { cloneBlock } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\n\nconst noop = () => {};\n\n/**\n * A function to call when the block value has been updated in the block-editor\n * store.\n *\n * @callback onBlockUpdate\n * @param {Object[]} blocks The updated blocks.\n * @param {Object} options The updated block options, such as selectionStart\n * and selectionEnd.\n */\n\n/**\n * useBlockSync is a side effect which handles bidirectional sync between the\n * block-editor store and a controlling data source which provides blocks. This\n * is most commonly used by the BlockEditorProvider to synchronize the contents\n * of the block-editor store with the root entity, like a post.\n *\n * Another example would be the template part block, which provides blocks from\n * a separate entity data source than a root entity. This hook syncs edits to\n * the template part in the block editor back to the entity and vice-versa.\n *\n * Here are some of its basic functions:\n * - Initalizes the block-editor store for the given clientID to the blocks\n * given via props.\n * - Adds incoming changes (like undo) to the block-editor store.\n * - Adds outgoing changes (like editing content) to the controlling entity,\n * determining if a change should be considered persistent or not.\n * - Handles edge cases and race conditions which occur in those operations.\n * - Ignores changes which happen to other entities (like nested inner block\n * controllers.\n * - Passes selection state from the block-editor store to the controlling entity.\n *\n * @param {Object} props Props for the block sync hook\n * @param {string} props.clientId The client ID of the inner block controller.\n * If none is passed, then it is assumed to be a\n * root controller rather than an inner block\n * controller.\n * @param {Object[]} props.value The control value for the blocks. This value\n * is used to initalize the block-editor store\n * and for resetting the blocks to incoming\n * changes like undo.\n * @param {Object} props.selection The selection state responsible to restore the selection on undo/redo.\n * @param {onBlockUpdate} props.onChange Function to call when a persistent\n * change has been made in the block-editor blocks\n * for the given clientId. For example, after\n * this function is called, an entity is marked\n * dirty because it has changes to save.\n * @param {onBlockUpdate} props.onInput Function to call when a non-persistent\n * change has been made in the block-editor blocks\n * for the given clientId. When this is called,\n * controlling sources do not become dirty.\n */\nexport default function useBlockSync( {\n\tclientId = null,\n\tvalue: controlledBlocks,\n\tselection: controlledSelection,\n\tonChange = noop,\n\tonInput = noop,\n} ) {\n\tconst registry = useRegistry();\n\n\tconst {\n\t\tresetBlocks,\n\t\tresetSelection,\n\t\treplaceInnerBlocks,\n\t\tselectBlock,\n\t\tsetHasControlledInnerBlocks,\n\t\t__unstableMarkNextChangeAsNotPersistent,\n\t} = registry.dispatch( blockEditorStore );\n\tconst {\n\t\thasSelectedBlock,\n\t\tgetBlockName,\n\t\tgetBlocks,\n\t\tgetSelectionStart,\n\t\tgetSelectionEnd,\n\t\tgetBlock,\n\t} = registry.select( blockEditorStore );\n\tconst isControlled = useSelect(\n\t\t( select ) => {\n\t\t\treturn (\n\t\t\t\t! clientId ||\n\t\t\t\tselect( blockEditorStore ).areInnerBlocksControlled( clientId )\n\t\t\t);\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tconst pendingChanges = useRef( { incoming: null, outgoing: [] } );\n\tconst subscribed = useRef( false );\n\n\tconst setControlledBlocks = () => {\n\t\tif ( ! controlledBlocks ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// We don't need to persist this change because we only replace\n\t\t// controlled inner blocks when the change was caused by an entity,\n\t\t// and so it would already be persisted.\n\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\tif ( clientId ) {\n\t\t\t// It is important to batch here because otherwise,\n\t\t\t// as soon as `setHasControlledInnerBlocks` is called\n\t\t\t// the effect to restore might be triggered\n\t\t\t// before the actual blocks get set properly in state.\n\t\t\tregistry.batch( () => {\n\t\t\t\tsetHasControlledInnerBlocks( clientId, true );\n\t\t\t\tconst storeBlocks = controlledBlocks.map( ( block ) =>\n\t\t\t\t\tcloneBlock( block )\n\t\t\t\t);\n\t\t\t\tif ( subscribed.current ) {\n\t\t\t\t\tpendingChanges.current.incoming = storeBlocks;\n\t\t\t\t}\n\t\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t\t\treplaceInnerBlocks( clientId, storeBlocks );\n\t\t\t} );\n\t\t} else {\n\t\t\tif ( subscribed.current ) {\n\t\t\t\tpendingChanges.current.incoming = controlledBlocks;\n\t\t\t}\n\t\t\tresetBlocks( controlledBlocks );\n\t\t}\n\t};\n\n\t// Clean up the changes made by setControlledBlocks() when the component\n\t// containing useBlockSync() unmounts.\n\tconst unsetControlledBlocks = () => {\n\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\tif ( clientId ) {\n\t\t\tsetHasControlledInnerBlocks( clientId, false );\n\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t\treplaceInnerBlocks( clientId, [] );\n\t\t} else {\n\t\t\tresetBlocks( [] );\n\t\t}\n\t};\n\n\t// Add a subscription to the block-editor registry to detect when changes\n\t// have been made. This lets us inform the data source of changes. This\n\t// is an effect so that the subscriber can run synchronously without\n\t// waiting for React renders for changes.\n\tconst onInputRef = useRef( onInput );\n\tconst onChangeRef = useRef( onChange );\n\tuseEffect( () => {\n\t\tonInputRef.current = onInput;\n\t\tonChangeRef.current = onChange;\n\t}, [ onInput, onChange ] );\n\n\t// Determine if blocks need to be reset when they change.\n\tuseEffect( () => {\n\t\tif ( pendingChanges.current.outgoing.includes( controlledBlocks ) ) {\n\t\t\t// Skip block reset if the value matches expected outbound sync\n\t\t\t// triggered by this component by a preceding change detection.\n\t\t\t// Only skip if the value matches expectation, since a reset should\n\t\t\t// still occur if the value is modified (not equal by reference),\n\t\t\t// to allow that the consumer may apply modifications to reflect\n\t\t\t// back on the editor.\n\t\t\tif (\n\t\t\t\tpendingChanges.current.outgoing[\n\t\t\t\t\tpendingChanges.current.outgoing.length - 1\n\t\t\t\t] === controlledBlocks\n\t\t\t) {\n\t\t\t\tpendingChanges.current.outgoing = [];\n\t\t\t}\n\t\t} else if ( getBlocks( clientId ) !== controlledBlocks ) {\n\t\t\t// Reset changing value in all other cases than the sync described\n\t\t\t// above. Since this can be reached in an update following an out-\n\t\t\t// bound sync, unset the outbound value to avoid considering it in\n\t\t\t// subsequent renders.\n\t\t\tpendingChanges.current.outgoing = [];\n\t\t\tconst hadSelecton = hasSelectedBlock();\n\t\t\tconst selectionAnchor = getSelectionStart();\n\t\t\tconst selectionFocus = getSelectionEnd();\n\t\t\tsetControlledBlocks();\n\n\t\t\tif ( controlledSelection ) {\n\t\t\t\tresetSelection(\n\t\t\t\t\tcontrolledSelection.selectionStart,\n\t\t\t\t\tcontrolledSelection.selectionEnd,\n\t\t\t\t\tcontrolledSelection.initialPosition\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tconst selectionStillExists = getBlock(\n\t\t\t\t\tselectionAnchor.clientId\n\t\t\t\t);\n\t\t\t\tif ( hadSelecton && ! selectionStillExists ) {\n\t\t\t\t\tselectBlock( clientId );\n\t\t\t\t} else {\n\t\t\t\t\tresetSelection( selectionAnchor, selectionFocus );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}, [ controlledBlocks, clientId ] );\n\n\tuseEffect( () => {\n\t\t// When the block becomes uncontrolled, it means its inner state has been reset\n\t\t// we need to take the blocks again from the external value property.\n\t\tif ( ! isControlled ) {\n\t\t\tpendingChanges.current.outgoing = [];\n\t\t\tsetControlledBlocks();\n\t\t}\n\t}, [ isControlled ] );\n\n\tuseEffect( () => {\n\t\tconst {\n\t\t\tgetSelectedBlocksInitialCaretPosition,\n\t\t\tisLastBlockChangePersistent,\n\t\t\t__unstableIsLastBlockChangeIgnored,\n\t\t\tareInnerBlocksControlled,\n\t\t} = registry.select( blockEditorStore );\n\n\t\tlet blocks = getBlocks( clientId );\n\t\tlet isPersistent = isLastBlockChangePersistent();\n\t\tlet previousAreBlocksDifferent = false;\n\n\t\tsubscribed.current = true;\n\t\tconst unsubscribe = registry.subscribe( () => {\n\t\t\t// Sometimes, when changing block lists, lingering subscriptions\n\t\t\t// might trigger before they are cleaned up. If the block for which\n\t\t\t// the subscription runs is no longer in the store, this would clear\n\t\t\t// its parent entity's block list. To avoid this, we bail out if\n\t\t\t// the subscription is triggering for a block (`clientId !== null`)\n\t\t\t// and its block name can't be found because it's not on the list.\n\t\t\t// (`getBlockName( clientId ) === null`).\n\t\t\tif ( clientId !== null && getBlockName( clientId ) === null )\n\t\t\t\treturn;\n\n\t\t\t// When RESET_BLOCKS on parent blocks get called, the controlled blocks\n\t\t\t// can reset to uncontrolled, in these situations, it means we need to populate\n\t\t\t// the blocks again from the external blocks (the value property here)\n\t\t\t// and we should stop triggering onChange\n\t\t\tconst isStillControlled =\n\t\t\t\t! clientId || areInnerBlocksControlled( clientId );\n\t\t\tif ( ! isStillControlled ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst newIsPersistent = isLastBlockChangePersistent();\n\t\t\tconst newBlocks = getBlocks( clientId );\n\t\t\tconst areBlocksDifferent = newBlocks !== blocks;\n\t\t\tblocks = newBlocks;\n\t\t\tif (\n\t\t\t\tareBlocksDifferent &&\n\t\t\t\t( pendingChanges.current.incoming ||\n\t\t\t\t\t__unstableIsLastBlockChangeIgnored() )\n\t\t\t) {\n\t\t\t\tpendingChanges.current.incoming = null;\n\t\t\t\tisPersistent = newIsPersistent;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Since we often dispatch an action to mark the previous action as\n\t\t\t// persistent, we need to make sure that the blocks changed on the\n\t\t\t// previous action before committing the change.\n\t\t\tconst didPersistenceChange =\n\t\t\t\tpreviousAreBlocksDifferent &&\n\t\t\t\t! areBlocksDifferent &&\n\t\t\t\tnewIsPersistent &&\n\t\t\t\t! isPersistent;\n\n\t\t\tif ( areBlocksDifferent || didPersistenceChange ) {\n\t\t\t\tisPersistent = newIsPersistent;\n\t\t\t\t// We know that onChange/onInput will update controlledBlocks.\n\t\t\t\t// We need to be aware that it was caused by an outgoing change\n\t\t\t\t// so that we do not treat it as an incoming change later on,\n\t\t\t\t// which would cause a block reset.\n\t\t\t\tpendingChanges.current.outgoing.push( blocks );\n\n\t\t\t\t// Inform the controlling entity that changes have been made to\n\t\t\t\t// the block-editor store they should be aware about.\n\t\t\t\tconst updateParent = isPersistent\n\t\t\t\t\t? onChangeRef.current\n\t\t\t\t\t: onInputRef.current;\n\t\t\t\tupdateParent( blocks, {\n\t\t\t\t\tselection: {\n\t\t\t\t\t\tselectionStart: getSelectionStart(),\n\t\t\t\t\t\tselectionEnd: getSelectionEnd(),\n\t\t\t\t\t\tinitialPosition:\n\t\t\t\t\t\t\tgetSelectedBlocksInitialCaretPosition(),\n\t\t\t\t\t},\n\t\t\t\t} );\n\t\t\t}\n\t\t\tpreviousAreBlocksDifferent = areBlocksDifferent;\n\t\t} );\n\n\t\treturn () => {\n\t\t\tsubscribed.current = false;\n\t\t\tunsubscribe();\n\t\t};\n\t}, [ registry, clientId ] );\n\n\tuseEffect( () => {\n\t\treturn () => {\n\t\t\tunsetControlledBlocks();\n\t\t};\n\t}, [] );\n}\n"],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAKA,IAAAG,MAAA,GAAAH,OAAA;AAVA;AACA;AACA;;AAKA;AACA;AACA;;AAGA,MAAMI,IAAI,GAAGA,CAAA,KAAM,CAAC,CAAC;;AAErB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASC,YAAYA,CAAE;EACrCC,QAAQ,GAAG,IAAI;EACfC,KAAK,EAAEC,gBAAgB;EACvBC,SAAS,EAAEC,mBAAmB;EAC9BC,QAAQ,GAAGP,IAAI;EACfQ,OAAO,GAAGR;AACX,CAAC,EAAG;EACH,MAAMS,QAAQ,GAAG,IAAAC,iBAAW,EAAC,CAAC;EAE9B,MAAM;IACLC,WAAW;IACXC,cAAc;IACdC,kBAAkB;IAClBC,WAAW;IACXC,2BAA2B;IAC3BC;EACD,CAAC,GAAGP,QAAQ,CAACQ,QAAQ,CAAEC,YAAiB,CAAC;EACzC,MAAM;IACLC,gBAAgB;IAChBC,YAAY;IACZC,SAAS;IACTC,iBAAiB;IACjBC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AS,EAAE,MAAM;IAChB,OAAO,MAAM;MACZH,qBAAqB,CAAC,CAAC;IACxB,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;AACR"}
1
+ {"version":3,"names":["_element","require","_data","_blocks","_store","noop","useBlockSync","clientId","value","controlledBlocks","selection","controlledSelection","onChange","onInput","registry","useRegistry","resetBlocks","resetSelection","replaceInnerBlocks","selectBlock","setHasControlledInnerBlocks","__unstableMarkNextChangeAsNotPersistent","dispatch","blockEditorStore","hasSelectedBlock","getBlockName","getBlocks","getSelectionStart","getSelectionEnd","getBlock","select","isControlled","useSelect","areInnerBlocksControlled","pendingChanges","useRef","incoming","outgoing","subscribed","setControlledBlocks","batch","storeBlocks","map","block","cloneBlock","current","unsetControlledBlocks","onInputRef","onChangeRef","useEffect","includes","length","hadSelecton","selectionAnchor","selectionFocus","selectionStart","selectionEnd","initialPosition","selectionStillExists","getSelectedBlocksInitialCaretPosition","isLastBlockChangePersistent","__unstableIsLastBlockChangeIgnored","blocks","isPersistent","previousAreBlocksDifferent","unsubscribe","subscribe","isStillControlled","newIsPersistent","newBlocks","areBlocksDifferent","didPersistenceChange","push","updateParent"],"sources":["@wordpress/block-editor/src/components/provider/use-block-sync.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useEffect, useRef } from '@wordpress/element';\nimport { useRegistry, useSelect } from '@wordpress/data';\nimport { cloneBlock } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\n\nconst noop = () => {};\n\n/**\n * A function to call when the block value has been updated in the block-editor\n * store.\n *\n * @callback onBlockUpdate\n * @param {Object[]} blocks The updated blocks.\n * @param {Object} options The updated block options, such as selectionStart\n * and selectionEnd.\n */\n\n/**\n * useBlockSync is a side effect which handles bidirectional sync between the\n * block-editor store and a controlling data source which provides blocks. This\n * is most commonly used by the BlockEditorProvider to synchronize the contents\n * of the block-editor store with the root entity, like a post.\n *\n * Another example would be the template part block, which provides blocks from\n * a separate entity data source than a root entity. This hook syncs edits to\n * the template part in the block editor back to the entity and vice-versa.\n *\n * Here are some of its basic functions:\n * - Initalizes the block-editor store for the given clientID to the blocks\n * given via props.\n * - Adds incoming changes (like undo) to the block-editor store.\n * - Adds outgoing changes (like editing content) to the controlling entity,\n * determining if a change should be considered persistent or not.\n * - Handles edge cases and race conditions which occur in those operations.\n * - Ignores changes which happen to other entities (like nested inner block\n * controllers.\n * - Passes selection state from the block-editor store to the controlling entity.\n *\n * @param {Object} props Props for the block sync hook\n * @param {string} props.clientId The client ID of the inner block controller.\n * If none is passed, then it is assumed to be a\n * root controller rather than an inner block\n * controller.\n * @param {Object[]} props.value The control value for the blocks. This value\n * is used to initalize the block-editor store\n * and for resetting the blocks to incoming\n * changes like undo.\n * @param {Object} props.selection The selection state responsible to restore the selection on undo/redo.\n * @param {onBlockUpdate} props.onChange Function to call when a persistent\n * change has been made in the block-editor blocks\n * for the given clientId. For example, after\n * this function is called, an entity is marked\n * dirty because it has changes to save.\n * @param {onBlockUpdate} props.onInput Function to call when a non-persistent\n * change has been made in the block-editor blocks\n * for the given clientId. When this is called,\n * controlling sources do not become dirty.\n */\nexport default function useBlockSync( {\n\tclientId = null,\n\tvalue: controlledBlocks,\n\tselection: controlledSelection,\n\tonChange = noop,\n\tonInput = noop,\n} ) {\n\tconst registry = useRegistry();\n\n\tconst {\n\t\tresetBlocks,\n\t\tresetSelection,\n\t\treplaceInnerBlocks,\n\t\tselectBlock,\n\t\tsetHasControlledInnerBlocks,\n\t\t__unstableMarkNextChangeAsNotPersistent,\n\t} = registry.dispatch( blockEditorStore );\n\tconst {\n\t\thasSelectedBlock,\n\t\tgetBlockName,\n\t\tgetBlocks,\n\t\tgetSelectionStart,\n\t\tgetSelectionEnd,\n\t\tgetBlock,\n\t} = registry.select( blockEditorStore );\n\tconst isControlled = useSelect(\n\t\t( select ) => {\n\t\t\treturn (\n\t\t\t\t! clientId ||\n\t\t\t\tselect( blockEditorStore ).areInnerBlocksControlled( clientId )\n\t\t\t);\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tconst pendingChanges = useRef( { incoming: null, outgoing: [] } );\n\tconst subscribed = useRef( false );\n\n\tconst setControlledBlocks = () => {\n\t\tif ( ! controlledBlocks ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// We don't need to persist this change because we only replace\n\t\t// controlled inner blocks when the change was caused by an entity,\n\t\t// and so it would already be persisted.\n\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\tif ( clientId ) {\n\t\t\t// It is important to batch here because otherwise,\n\t\t\t// as soon as `setHasControlledInnerBlocks` is called\n\t\t\t// the effect to restore might be triggered\n\t\t\t// before the actual blocks get set properly in state.\n\t\t\tregistry.batch( () => {\n\t\t\t\tsetHasControlledInnerBlocks( clientId, true );\n\t\t\t\tconst storeBlocks = controlledBlocks.map( ( block ) =>\n\t\t\t\t\tcloneBlock( block )\n\t\t\t\t);\n\t\t\t\tif ( subscribed.current ) {\n\t\t\t\t\tpendingChanges.current.incoming = storeBlocks;\n\t\t\t\t}\n\t\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t\t\treplaceInnerBlocks( clientId, storeBlocks );\n\t\t\t} );\n\t\t} else {\n\t\t\tif ( subscribed.current ) {\n\t\t\t\tpendingChanges.current.incoming = controlledBlocks;\n\t\t\t}\n\t\t\tresetBlocks( controlledBlocks );\n\t\t}\n\t};\n\n\t// Clean up the changes made by setControlledBlocks() when the component\n\t// containing useBlockSync() unmounts.\n\tconst unsetControlledBlocks = () => {\n\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\tif ( clientId ) {\n\t\t\tsetHasControlledInnerBlocks( clientId, false );\n\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t\treplaceInnerBlocks( clientId, [] );\n\t\t} else {\n\t\t\tresetBlocks( [] );\n\t\t}\n\t};\n\n\t// Add a subscription to the block-editor registry to detect when changes\n\t// have been made. This lets us inform the data source of changes. This\n\t// is an effect so that the subscriber can run synchronously without\n\t// waiting for React renders for changes.\n\tconst onInputRef = useRef( onInput );\n\tconst onChangeRef = useRef( onChange );\n\tuseEffect( () => {\n\t\tonInputRef.current = onInput;\n\t\tonChangeRef.current = onChange;\n\t}, [ onInput, onChange ] );\n\n\t// Determine if blocks need to be reset when they change.\n\tuseEffect( () => {\n\t\tif ( pendingChanges.current.outgoing.includes( controlledBlocks ) ) {\n\t\t\t// Skip block reset if the value matches expected outbound sync\n\t\t\t// triggered by this component by a preceding change detection.\n\t\t\t// Only skip if the value matches expectation, since a reset should\n\t\t\t// still occur if the value is modified (not equal by reference),\n\t\t\t// to allow that the consumer may apply modifications to reflect\n\t\t\t// back on the editor.\n\t\t\tif (\n\t\t\t\tpendingChanges.current.outgoing[\n\t\t\t\t\tpendingChanges.current.outgoing.length - 1\n\t\t\t\t] === controlledBlocks\n\t\t\t) {\n\t\t\t\tpendingChanges.current.outgoing = [];\n\t\t\t}\n\t\t} else if ( getBlocks( clientId ) !== controlledBlocks ) {\n\t\t\t// Reset changing value in all other cases than the sync described\n\t\t\t// above. Since this can be reached in an update following an out-\n\t\t\t// bound sync, unset the outbound value to avoid considering it in\n\t\t\t// subsequent renders.\n\t\t\tpendingChanges.current.outgoing = [];\n\t\t\tconst hadSelecton = hasSelectedBlock();\n\t\t\tconst selectionAnchor = getSelectionStart();\n\t\t\tconst selectionFocus = getSelectionEnd();\n\t\t\tsetControlledBlocks();\n\n\t\t\tif ( controlledSelection ) {\n\t\t\t\tresetSelection(\n\t\t\t\t\tcontrolledSelection.selectionStart,\n\t\t\t\t\tcontrolledSelection.selectionEnd,\n\t\t\t\t\tcontrolledSelection.initialPosition\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tconst selectionStillExists = getBlock(\n\t\t\t\t\tselectionAnchor.clientId\n\t\t\t\t);\n\t\t\t\tif ( hadSelecton && ! selectionStillExists ) {\n\t\t\t\t\tselectBlock( clientId );\n\t\t\t\t} else {\n\t\t\t\t\tresetSelection( selectionAnchor, selectionFocus );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}, [ controlledBlocks, clientId ] );\n\n\tuseEffect( () => {\n\t\t// When the block becomes uncontrolled, it means its inner state has been reset\n\t\t// we need to take the blocks again from the external value property.\n\t\tif ( ! isControlled ) {\n\t\t\tpendingChanges.current.outgoing = [];\n\t\t\tsetControlledBlocks();\n\t\t}\n\t}, [ isControlled ] );\n\n\tuseEffect( () => {\n\t\tconst {\n\t\t\tgetSelectedBlocksInitialCaretPosition,\n\t\t\tisLastBlockChangePersistent,\n\t\t\t__unstableIsLastBlockChangeIgnored,\n\t\t\tareInnerBlocksControlled,\n\t\t} = registry.select( blockEditorStore );\n\n\t\tlet blocks = getBlocks( clientId );\n\t\tlet isPersistent = isLastBlockChangePersistent();\n\t\tlet previousAreBlocksDifferent = false;\n\n\t\tsubscribed.current = true;\n\t\tconst unsubscribe = registry.subscribe( () => {\n\t\t\t// Sometimes, when changing block lists, lingering subscriptions\n\t\t\t// might trigger before they are cleaned up. If the block for which\n\t\t\t// the subscription runs is no longer in the store, this would clear\n\t\t\t// its parent entity's block list. To avoid this, we bail out if\n\t\t\t// the subscription is triggering for a block (`clientId !== null`)\n\t\t\t// and its block name can't be found because it's not on the list.\n\t\t\t// (`getBlockName( clientId ) === null`).\n\t\t\tif ( clientId !== null && getBlockName( clientId ) === null )\n\t\t\t\treturn;\n\n\t\t\t// When RESET_BLOCKS on parent blocks get called, the controlled blocks\n\t\t\t// can reset to uncontrolled, in these situations, it means we need to populate\n\t\t\t// the blocks again from the external blocks (the value property here)\n\t\t\t// and we should stop triggering onChange\n\t\t\tconst isStillControlled =\n\t\t\t\t! clientId || areInnerBlocksControlled( clientId );\n\t\t\tif ( ! isStillControlled ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst newIsPersistent = isLastBlockChangePersistent();\n\t\t\tconst newBlocks = getBlocks( clientId );\n\t\t\tconst areBlocksDifferent = newBlocks !== blocks;\n\t\t\tblocks = newBlocks;\n\t\t\tif (\n\t\t\t\tareBlocksDifferent &&\n\t\t\t\t( pendingChanges.current.incoming ||\n\t\t\t\t\t__unstableIsLastBlockChangeIgnored() )\n\t\t\t) {\n\t\t\t\tpendingChanges.current.incoming = null;\n\t\t\t\tisPersistent = newIsPersistent;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Since we often dispatch an action to mark the previous action as\n\t\t\t// persistent, we need to make sure that the blocks changed on the\n\t\t\t// previous action before committing the change.\n\t\t\tconst didPersistenceChange =\n\t\t\t\tpreviousAreBlocksDifferent &&\n\t\t\t\t! areBlocksDifferent &&\n\t\t\t\tnewIsPersistent &&\n\t\t\t\t! isPersistent;\n\n\t\t\tif ( areBlocksDifferent || didPersistenceChange ) {\n\t\t\t\tisPersistent = newIsPersistent;\n\t\t\t\t// We know that onChange/onInput will update controlledBlocks.\n\t\t\t\t// We need to be aware that it was caused by an outgoing change\n\t\t\t\t// so that we do not treat it as an incoming change later on,\n\t\t\t\t// which would cause a block reset.\n\t\t\t\tpendingChanges.current.outgoing.push( blocks );\n\n\t\t\t\t// Inform the controlling entity that changes have been made to\n\t\t\t\t// the block-editor store they should be aware about.\n\t\t\t\tconst updateParent = isPersistent\n\t\t\t\t\t? onChangeRef.current\n\t\t\t\t\t: onInputRef.current;\n\t\t\t\tupdateParent( blocks, {\n\t\t\t\t\tselection: {\n\t\t\t\t\t\tselectionStart: getSelectionStart(),\n\t\t\t\t\t\tselectionEnd: getSelectionEnd(),\n\t\t\t\t\t\tinitialPosition:\n\t\t\t\t\t\t\tgetSelectedBlocksInitialCaretPosition(),\n\t\t\t\t\t},\n\t\t\t\t} );\n\t\t\t}\n\t\t\tpreviousAreBlocksDifferent = areBlocksDifferent;\n\t\t}, blockEditorStore );\n\n\t\treturn () => {\n\t\t\tsubscribed.current = false;\n\t\t\tunsubscribe();\n\t\t};\n\t}, [ registry, clientId ] );\n\n\tuseEffect( () => {\n\t\treturn () => {\n\t\t\tunsetControlledBlocks();\n\t\t};\n\t}, [] );\n}\n"],"mappings":";;;;;;AAGA,IAAAA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AAE,EACtC;QACD3B,cAAc,CAACW,OAAO,CAACT,QAAQ,GAAG,IAAI;QACtC2B,YAAY,GAAGK,eAAe;QAC9B;MACD;;MAEA;MACA;MACA;MACA,MAAMG,oBAAoB,GACzBP,0BAA0B,IAC1B,CAAEM,kBAAkB,IACpBF,eAAe,IACf,CAAEL,YAAY;MAEf,IAAKO,kBAAkB,IAAIC,oBAAoB,EAAG;QACjDR,YAAY,GAAGK,eAAe;QAC9B;QACA;QACA;QACA;QACAlC,cAAc,CAACW,OAAO,CAACR,QAAQ,CAACmC,IAAI,CAAEV,MAAO,CAAC;;QAE9C;QACA;QACA,MAAMW,YAAY,GAAGV,YAAY,GAC9Bf,WAAW,CAACH,OAAO,GACnBE,UAAU,CAACF,OAAO;QACrB4B,YAAY,CAAEX,MAAM,EAAE;UACrBpD,SAAS,EAAE;YACV6C,cAAc,EAAE5B,iBAAiB,CAAC,CAAC;YACnC6B,YAAY,EAAE5B,eAAe,CAAC,CAAC;YAC/B6B,eAAe,EACdE,qCAAqC,CAAC;UACxC;QACD,CAAE,CAAC;MACJ;MACAK,0BAA0B,GAAGM,kBAAkB;IAChD,CAAC,EAAE/C,YAAiB,CAAC;IAErB,OAAO,MAAM;MACZe,UAAU,CAACO,OAAO,GAAG,KAAK;MAC1BoB,WAAW,CAAC,CAAC;IACd,CAAC;EACF,CAAC,EAAE,CAAEnD,QAAQ,EAAEP,QAAQ,CAAG,CAAC;EAE3B,IAAA0C,kBAAS,EAAE,MAAM;IAChB,OAAO,MAAM;MACZH,qBAAqB,CAAC,CAAC;IACxB,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;AACR"}
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
+ var _react = require("react");
7
8
  var _element = require("@wordpress/element");
8
9
  var _data = require("@wordpress/data");
9
10
  var _compose = require("@wordpress/compose");
@@ -24,7 +25,7 @@ const withRegistryProvider = (0, _compose.createHigherOrderComponent)(WrappedCom
24
25
  ...props
25
26
  }) => {
26
27
  if (!useSubRegistry) {
27
- return (0, _element.createElement)(WrappedComponent, {
28
+ return (0, _react.createElement)(WrappedComponent, {
28
29
  registry: registry,
29
30
  ...props
30
31
  });
@@ -38,9 +39,9 @@ const withRegistryProvider = (0, _compose.createHigherOrderComponent)(WrappedCom
38
39
  if (!subRegistry) {
39
40
  return null;
40
41
  }
41
- return (0, _element.createElement)(_data.RegistryProvider, {
42
+ return (0, _react.createElement)(_data.RegistryProvider, {
42
43
  value: subRegistry
43
- }, (0, _element.createElement)(WrappedComponent, {
44
+ }, (0, _react.createElement)(WrappedComponent, {
44
45
  registry: subRegistry,
45
46
  ...props
46
47
  }));
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_data","_compose","_store","_constants","withRegistryProvider","createHigherOrderComponent","WrappedComponent","withRegistry","useSubRegistry","registry","props","createElement","subRegistry","setSubRegistry","useState","useEffect","newRegistry","createRegistry","registerStore","blockEditorStoreName","storeConfig","RegistryProvider","value","_default","exports","default"],"sources":["@wordpress/block-editor/src/components/provider/with-registry-provider.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useState, useEffect } from '@wordpress/element';\nimport {\n\twithRegistry,\n\tcreateRegistry,\n\tRegistryProvider,\n} from '@wordpress/data';\nimport { createHigherOrderComponent } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { storeConfig } from '../../store';\nimport { STORE_NAME as blockEditorStoreName } from '../../store/constants';\n\nconst withRegistryProvider = createHigherOrderComponent(\n\t( WrappedComponent ) => {\n\t\treturn withRegistry(\n\t\t\t( { useSubRegistry = true, registry, ...props } ) => {\n\t\t\t\tif ( ! useSubRegistry ) {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<WrappedComponent registry={ registry } { ...props } />\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tconst [ subRegistry, setSubRegistry ] = useState( null );\n\t\t\t\tuseEffect( () => {\n\t\t\t\t\tconst newRegistry = createRegistry( {}, registry );\n\t\t\t\t\tnewRegistry.registerStore(\n\t\t\t\t\t\tblockEditorStoreName,\n\t\t\t\t\t\tstoreConfig\n\t\t\t\t\t);\n\t\t\t\t\tsetSubRegistry( newRegistry );\n\t\t\t\t}, [ registry ] );\n\n\t\t\t\tif ( ! subRegistry ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\treturn (\n\t\t\t\t\t<RegistryProvider value={ subRegistry }>\n\t\t\t\t\t\t<WrappedComponent\n\t\t\t\t\t\t\tregistry={ subRegistry }\n\t\t\t\t\t\t\t{ ...props }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</RegistryProvider>\n\t\t\t\t);\n\t\t\t}\n\t\t);\n\t},\n\t'withRegistryProvider'\n);\n\nexport default withRegistryProvider;\n"],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AAKA,IAAAE,QAAA,GAAAF,OAAA;AAKA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AAfA;AACA;AACA;;AASA;AACA;AACA;;AAIA,MAAMK,oBAAoB,GAAG,IAAAC,mCAA0B,EACpDC,gBAAgB,IAAM;EACvB,OAAO,IAAAC,kBAAY,EAClB,CAAE;IAAEC,cAAc,GAAG,IAAI;IAAEC,QAAQ;IAAE,GAAGC;EAAM,CAAC,KAAM;IACpD,IAAK,CAAEF,cAAc,EAAG;MACvB,OACC,IAAAV,QAAA,CAAAa,aAAA,EAACL,gBAAgB;QAACG,QAAQ,EAAGA,QAAU;QAAA,GAAMC;MAAK,CAAI,CAAC;IAEzD;IAEA,MAAM,CAAEE,WAAW,EAAEC,cAAc,CAAE,GAAG,IAAAC,iBAAQ,EAAE,IAAK,CAAC;IACxD,IAAAC,kBAAS,EAAE,MAAM;MAChB,MAAMC,WAAW,GAAG,IAAAC,oBAAc,EAAE,CAAC,CAAC,EAAER,QAAS,CAAC;MAClDO,WAAW,CAACE,aAAa,CACxBC,qBAAoB,EACpBC,kBACD,CAAC;MACDP,cAAc,CAAEG,WAAY,CAAC;IAC9B,CAAC,EAAE,CAAEP,QAAQ,CAAG,CAAC;IAEjB,IAAK,CAAEG,WAAW,EAAG;MACpB,OAAO,IAAI;IACZ;IAEA,OACC,IAAAd,QAAA,CAAAa,aAAA,EAACX,KAAA,CAAAqB,gBAAgB;MAACC,KAAK,EAAGV;IAAa,GACtC,IAAAd,QAAA,CAAAa,aAAA,EAACL,gBAAgB;MAChBG,QAAQ,EAAGG,WAAa;MAAA,GACnBF;IAAK,CACV,CACgB,CAAC;EAErB,CACD,CAAC;AACF,CAAC,EACD,sBACD,CAAC;AAAC,IAAAa,QAAA,GAEanB,oBAAoB;AAAAoB,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
1
+ {"version":3,"names":["_element","require","_data","_compose","_store","_constants","withRegistryProvider","createHigherOrderComponent","WrappedComponent","withRegistry","useSubRegistry","registry","props","_react","createElement","subRegistry","setSubRegistry","useState","useEffect","newRegistry","createRegistry","registerStore","blockEditorStoreName","storeConfig","RegistryProvider","value","_default","exports","default"],"sources":["@wordpress/block-editor/src/components/provider/with-registry-provider.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useState, useEffect } from '@wordpress/element';\nimport {\n\twithRegistry,\n\tcreateRegistry,\n\tRegistryProvider,\n} from '@wordpress/data';\nimport { createHigherOrderComponent } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { storeConfig } from '../../store';\nimport { STORE_NAME as blockEditorStoreName } from '../../store/constants';\n\nconst withRegistryProvider = createHigherOrderComponent(\n\t( WrappedComponent ) => {\n\t\treturn withRegistry(\n\t\t\t( { useSubRegistry = true, registry, ...props } ) => {\n\t\t\t\tif ( ! useSubRegistry ) {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<WrappedComponent registry={ registry } { ...props } />\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tconst [ subRegistry, setSubRegistry ] = useState( null );\n\t\t\t\tuseEffect( () => {\n\t\t\t\t\tconst newRegistry = createRegistry( {}, registry );\n\t\t\t\t\tnewRegistry.registerStore(\n\t\t\t\t\t\tblockEditorStoreName,\n\t\t\t\t\t\tstoreConfig\n\t\t\t\t\t);\n\t\t\t\t\tsetSubRegistry( newRegistry );\n\t\t\t\t}, [ registry ] );\n\n\t\t\t\tif ( ! subRegistry ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\treturn (\n\t\t\t\t\t<RegistryProvider value={ subRegistry }>\n\t\t\t\t\t\t<WrappedComponent\n\t\t\t\t\t\t\tregistry={ subRegistry }\n\t\t\t\t\t\t\t{ ...props }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</RegistryProvider>\n\t\t\t\t);\n\t\t\t}\n\t\t);\n\t},\n\t'withRegistryProvider'\n);\n\nexport default withRegistryProvider;\n"],"mappings":";;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AAKA,IAAAE,QAAA,GAAAF,OAAA;AAKA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AAfA;AACA;AACA;;AASA;AACA;AACA;;AAIA,MAAMK,oBAAoB,GAAG,IAAAC,mCAA0B,EACpDC,gBAAgB,IAAM;EACvB,OAAO,IAAAC,kBAAY,EAClB,CAAE;IAAEC,cAAc,GAAG,IAAI;IAAEC,QAAQ;IAAE,GAAGC;EAAM,CAAC,KAAM;IACpD,IAAK,CAAEF,cAAc,EAAG;MACvB,OACC,IAAAG,MAAA,CAAAC,aAAA,EAACN,gBAAgB;QAACG,QAAQ,EAAGA,QAAU;QAAA,GAAMC;MAAK,CAAI,CAAC;IAEzD;IAEA,MAAM,CAAEG,WAAW,EAAEC,cAAc,CAAE,GAAG,IAAAC,iBAAQ,EAAE,IAAK,CAAC;IACxD,IAAAC,kBAAS,EAAE,MAAM;MAChB,MAAMC,WAAW,GAAG,IAAAC,oBAAc,EAAE,CAAC,CAAC,EAAET,QAAS,CAAC;MAClDQ,WAAW,CAACE,aAAa,CACxBC,qBAAoB,EACpBC,kBACD,CAAC;MACDP,cAAc,CAAEG,WAAY,CAAC;IAC9B,CAAC,EAAE,CAAER,QAAQ,CAAG,CAAC;IAEjB,IAAK,CAAEI,WAAW,EAAG;MACpB,OAAO,IAAI;IACZ;IAEA,OACC,IAAAF,MAAA,CAAAC,aAAA,EAACZ,KAAA,CAAAsB,gBAAgB;MAACC,KAAK,EAAGV;IAAa,GACtC,IAAAF,MAAA,CAAAC,aAAA,EAACN,gBAAgB;MAChBG,QAAQ,EAAGI,WAAa;MAAA,GACnBH;IAAK,CACV,CACgB,CAAC;EAErB,CACD,CAAC;AACF,CAAC,EACD,sBACD,CAAC;AAAC,IAAAc,QAAA,GAEapB,oBAAoB;AAAAqB,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
@@ -5,9 +5,10 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = void 0;
8
- var _element = require("@wordpress/element");
8
+ var _react = require("react");
9
9
  var _components = require("@wordpress/components");
10
10
  var _i18n = require("@wordpress/i18n");
11
+ var _element = require("@wordpress/element");
11
12
  var _date = require("@wordpress/date");
12
13
  var _inspectorPopoverHeader = _interopRequireDefault(require("../inspector-popover-header"));
13
14
  /**
@@ -23,17 +24,17 @@ function PublishDateTimePicker({
23
24
  onChange,
24
25
  ...additionalProps
25
26
  }, ref) {
26
- return (0, _element.createElement)("div", {
27
+ return (0, _react.createElement)("div", {
27
28
  ref: ref,
28
29
  className: "block-editor-publish-date-time-picker"
29
- }, (0, _element.createElement)(_inspectorPopoverHeader.default, {
30
+ }, (0, _react.createElement)(_inspectorPopoverHeader.default, {
30
31
  title: (0, _i18n.__)('Publish'),
31
32
  actions: [{
32
33
  label: (0, _i18n.__)('Now'),
33
34
  onClick: () => onChange?.(null)
34
35
  }],
35
36
  onClose: onClose
36
- }), (0, _element.createElement)(_components.DateTimePicker, {
37
+ }), (0, _react.createElement)(_components.DateTimePicker, {
37
38
  startOfWeek: (0, _date.getSettings)().l10n.startOfWeek,
38
39
  onChange: onChange,
39
40
  ...additionalProps
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_components","_i18n","_date","_inspectorPopoverHeader","_interopRequireDefault","PublishDateTimePicker","onClose","onChange","additionalProps","ref","createElement","className","default","title","__","actions","label","onClick","DateTimePicker","startOfWeek","getSettings","l10n","_default","forwardRef","exports"],"sources":["@wordpress/block-editor/src/components/publish-date-time-picker/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { DateTimePicker } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { forwardRef } from '@wordpress/element';\nimport { getSettings } from '@wordpress/date';\n\n/**\n * Internal dependencies\n */\nimport InspectorPopoverHeader from '../inspector-popover-header';\n\nfunction PublishDateTimePicker(\n\t{ onClose, onChange, ...additionalProps },\n\tref\n) {\n\treturn (\n\t\t<div ref={ ref } className=\"block-editor-publish-date-time-picker\">\n\t\t\t<InspectorPopoverHeader\n\t\t\t\ttitle={ __( 'Publish' ) }\n\t\t\t\tactions={ [\n\t\t\t\t\t{\n\t\t\t\t\t\tlabel: __( 'Now' ),\n\t\t\t\t\t\tonClick: () => onChange?.( null ),\n\t\t\t\t\t},\n\t\t\t\t] }\n\t\t\t\tonClose={ onClose }\n\t\t\t/>\n\t\t\t<DateTimePicker\n\t\t\t\tstartOfWeek={ getSettings().l10n.startOfWeek }\n\t\t\t\tonChange={ onChange }\n\t\t\t\t{ ...additionalProps }\n\t\t\t/>\n\t\t</div>\n\t);\n}\n\nexport default forwardRef( PublishDateTimePicker );\n"],"mappings":";;;;;;;AAKA,IAAAA,QAAA,GAAAC,OAAA;AAFA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAEA,IAAAG,KAAA,GAAAH,OAAA;AAKA,IAAAI,uBAAA,GAAAC,sBAAA,CAAAL,OAAA;AAXA;AACA;AACA;;AAMA;AACA;AACA;;AAGA,SAASM,qBAAqBA,CAC7B;EAAEC,OAAO;EAAEC,QAAQ;EAAE,GAAGC;AAAgB,CAAC,EACzCC,GAAG,EACF;EACD,OACC,IAAAX,QAAA,CAAAY,aAAA;IAAKD,GAAG,EAAGA,GAAK;IAACE,SAAS,EAAC;EAAuC,GACjE,IAAAb,QAAA,CAAAY,aAAA,EAACP,uBAAA,CAAAS,OAAsB;IACtBC,KAAK,EAAG,IAAAC,QAAE,EAAE,SAAU,CAAG;IACzBC,OAAO,EAAG,CACT;MACCC,KAAK,EAAE,IAAAF,QAAE,EAAE,KAAM,CAAC;MAClBG,OAAO,EAAEA,CAAA,KAAMV,QAAQ,GAAI,IAAK;IACjC,CAAC,CACC;IACHD,OAAO,EAAGA;EAAS,CACnB,CAAC,EACF,IAAAR,QAAA,CAAAY,aAAA,EAACV,WAAA,CAAAkB,cAAc;IACdC,WAAW,EAAG,IAAAC,iBAAW,EAAC,CAAC,CAACC,IAAI,CAACF,WAAa;IAC9CZ,QAAQ,EAAGA,QAAU;IAAA,GAChBC;EAAe,CACpB,CACG,CAAC;AAER;AAAC,IAAAc,QAAA,GAEc,IAAAC,mBAAU,EAAElB,qBAAsB,CAAC;AAAAmB,OAAA,CAAAZ,OAAA,GAAAU,QAAA"}
1
+ {"version":3,"names":["_components","require","_i18n","_element","_date","_inspectorPopoverHeader","_interopRequireDefault","PublishDateTimePicker","onClose","onChange","additionalProps","ref","_react","createElement","className","default","title","__","actions","label","onClick","DateTimePicker","startOfWeek","getSettings","l10n","_default","forwardRef","exports"],"sources":["@wordpress/block-editor/src/components/publish-date-time-picker/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { DateTimePicker } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { forwardRef } from '@wordpress/element';\nimport { getSettings } from '@wordpress/date';\n\n/**\n * Internal dependencies\n */\nimport InspectorPopoverHeader from '../inspector-popover-header';\n\nfunction PublishDateTimePicker(\n\t{ onClose, onChange, ...additionalProps },\n\tref\n) {\n\treturn (\n\t\t<div ref={ ref } className=\"block-editor-publish-date-time-picker\">\n\t\t\t<InspectorPopoverHeader\n\t\t\t\ttitle={ __( 'Publish' ) }\n\t\t\t\tactions={ [\n\t\t\t\t\t{\n\t\t\t\t\t\tlabel: __( 'Now' ),\n\t\t\t\t\t\tonClick: () => onChange?.( null ),\n\t\t\t\t\t},\n\t\t\t\t] }\n\t\t\t\tonClose={ onClose }\n\t\t\t/>\n\t\t\t<DateTimePicker\n\t\t\t\tstartOfWeek={ getSettings().l10n.startOfWeek }\n\t\t\t\tonChange={ onChange }\n\t\t\t\t{ ...additionalProps }\n\t\t\t/>\n\t\t</div>\n\t);\n}\n\nexport default forwardRef( PublishDateTimePicker );\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AAKA,IAAAI,uBAAA,GAAAC,sBAAA,CAAAL,OAAA;AAXA;AACA;AACA;;AAMA;AACA;AACA;;AAGA,SAASM,qBAAqBA,CAC7B;EAAEC,OAAO;EAAEC,QAAQ;EAAE,GAAGC;AAAgB,CAAC,EACzCC,GAAG,EACF;EACD,OACC,IAAAC,MAAA,CAAAC,aAAA;IAAKF,GAAG,EAAGA,GAAK;IAACG,SAAS,EAAC;EAAuC,GACjE,IAAAF,MAAA,CAAAC,aAAA,EAACR,uBAAA,CAAAU,OAAsB;IACtBC,KAAK,EAAG,IAAAC,QAAE,EAAE,SAAU,CAAG;IACzBC,OAAO,EAAG,CACT;MACCC,KAAK,EAAE,IAAAF,QAAE,EAAE,KAAM,CAAC;MAClBG,OAAO,EAAEA,CAAA,KAAMX,QAAQ,GAAI,IAAK;IACjC,CAAC,CACC;IACHD,OAAO,EAAGA;EAAS,CACnB,CAAC,EACF,IAAAI,MAAA,CAAAC,aAAA,EAACb,WAAA,CAAAqB,cAAc;IACdC,WAAW,EAAG,IAAAC,iBAAW,EAAC,CAAC,CAACC,IAAI,CAACF,WAAa;IAC9Cb,QAAQ,EAAGA,QAAU;IAAA,GAChBC;EAAe,CACpB,CACG,CAAC;AAER;AAAC,IAAAe,QAAA,GAEc,IAAAC,mBAAU,EAAEnB,qBAAsB,CAAC;AAAAoB,OAAA,CAAAZ,OAAA,GAAAU,QAAA"}
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.RecursionProvider = RecursionProvider;
7
7
  exports.useHasRecursion = useHasRecursion;
8
+ var _react = require("react");
8
9
  var _element = require("@wordpress/element");
9
10
  var _context = require("../block-edit/context");
10
11
  /**
@@ -60,7 +61,7 @@ function RecursionProvider({
60
61
  } = (0, _context.useBlockEditContext)();
61
62
  blockName = blockName || name;
62
63
  const newRenderedBlocks = (0, _element.useMemo)(() => addToBlockType(previouslyRenderedBlocks, blockName, uniqueId), [previouslyRenderedBlocks, blockName, uniqueId]);
63
- return (0, _element.createElement)(RenderedRefsContext.Provider, {
64
+ return (0, _react.createElement)(RenderedRefsContext.Provider, {
64
65
  value: newRenderedBlocks
65
66
  }, children);
66
67
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_context","RenderedRefsContext","createContext","addToBlockType","renderedBlocks","blockName","uniqueId","result","Set","add","RecursionProvider","children","previouslyRenderedBlocks","useContext","name","useBlockEditContext","newRenderedBlocks","useMemo","createElement","Provider","value","useHasRecursion","Boolean","has"],"sources":["@wordpress/block-editor/src/components/recursion-provider/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createContext, useContext, useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { useBlockEditContext } from '../block-edit/context';\n\nconst RenderedRefsContext = createContext( {} );\n\n/**\n * Immutably adds an unique identifier to a set scoped for a given block type.\n *\n * @param {Object} renderedBlocks Rendered blocks grouped by block name\n * @param {string} blockName Name of the block.\n * @param {*} uniqueId Any value that acts as a unique identifier for a block instance.\n *\n * @return {Object} The list of rendered blocks grouped by block name.\n */\nfunction addToBlockType( renderedBlocks, blockName, uniqueId ) {\n\tconst result = {\n\t\t...renderedBlocks,\n\t\t[ blockName ]: renderedBlocks[ blockName ]\n\t\t\t? new Set( renderedBlocks[ blockName ] )\n\t\t\t: new Set(),\n\t};\n\tresult[ blockName ].add( uniqueId );\n\n\treturn result;\n}\n\n/**\n * A React context provider for use with the `useHasRecursion` hook to prevent recursive\n * renders.\n *\n * Wrap block content with this provider and provide the same `uniqueId` prop as used\n * with `useHasRecursion`.\n *\n * @param {Object} props\n * @param {*} props.uniqueId Any value that acts as a unique identifier for a block instance.\n * @param {string} props.blockName Optional block name.\n * @param {JSX.Element} props.children React children.\n *\n * @return {JSX.Element} A React element.\n */\nexport function RecursionProvider( { children, uniqueId, blockName = '' } ) {\n\tconst previouslyRenderedBlocks = useContext( RenderedRefsContext );\n\tconst { name } = useBlockEditContext();\n\n\tblockName = blockName || name;\n\n\tconst newRenderedBlocks = useMemo(\n\t\t() => addToBlockType( previouslyRenderedBlocks, blockName, uniqueId ),\n\t\t[ previouslyRenderedBlocks, blockName, uniqueId ]\n\t);\n\n\treturn (\n\t\t<RenderedRefsContext.Provider value={ newRenderedBlocks }>\n\t\t\t{ children }\n\t\t</RenderedRefsContext.Provider>\n\t);\n}\n\n/**\n * A React hook for keeping track of blocks previously rendered up in the block\n * tree. Blocks susceptible to recursion can use this hook in their `Edit`\n * function to prevent said recursion.\n *\n * Use this with the `RecursionProvider` component, using the same `uniqueId` value\n * for both the hook and the provider.\n *\n * @param {*} uniqueId Any value that acts as a unique identifier for a block instance.\n * @param {string} blockName Optional block name.\n *\n * @return {boolean} A boolean describing whether the provided id has already been rendered.\n */\nexport function useHasRecursion( uniqueId, blockName = '' ) {\n\tconst previouslyRenderedBlocks = useContext( RenderedRefsContext );\n\tconst { name } = useBlockEditContext();\n\tblockName = blockName || name;\n\treturn Boolean( previouslyRenderedBloc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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASU,eAAeA,CAAEf,QAAQ,EAAED,SAAS,GAAG,EAAE,EAAG;EAC3D,MAAMO,wBAAwB,GAAG,IAAAC,mBAAU,EAAEZ,mBAAoB,CAAC;EAClE,MAAM;IAAEa;EAAK,CAAC,GAAG,IAAAC,4BAAmB,EAAC,CAAC;EACtCV,SAAS,GAAGA,SAAS,IAAIS,IAAI;EAC7B,OAAOQ,OAAO,CAAEV,wBAAwB,CAAEP,SAAS,CAAE,EAAEkB,GAAG,CAAEjB,QAAS,CAAE,CAAC;AACzE"}
1
+ {"version":3,"names":["_element","require","_context","RenderedRefsContext","createContext","addToBlockType","renderedBlocks","blockName","uniqueId","result","Set","add","RecursionProvider","children","previouslyRenderedBlocks","useContext","name","useBlockEditContext","newRenderedBlocks","useMemo","_react","createElement","Provider","value","useHasRecursion","Boolean","has"],"sources":["@wordpress/block-editor/src/components/recursion-provider/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createContext, useContext, useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { useBlockEditContext } from '../block-edit/context';\n\nconst RenderedRefsContext = createContext( {} );\n\n/**\n * Immutably adds an unique identifier to a set scoped for a given block type.\n *\n * @param {Object} renderedBlocks Rendered blocks grouped by block name\n * @param {string} blockName Name of the block.\n * @param {*} uniqueId Any value that acts as a unique identifier for a block instance.\n *\n * @return {Object} The list of rendered blocks grouped by block name.\n */\nfunction addToBlockType( renderedBlocks, blockName, uniqueId ) {\n\tconst result = {\n\t\t...renderedBlocks,\n\t\t[ blockName ]: renderedBlocks[ blockName ]\n\t\t\t? new Set( renderedBlocks[ blockName ] )\n\t\t\t: new Set(),\n\t};\n\tresult[ blockName ].add( uniqueId );\n\n\treturn result;\n}\n\n/**\n * A React context provider for use with the `useHasRecursion` hook to prevent recursive\n * renders.\n *\n * Wrap block content with this provider and provide the same `uniqueId` prop as used\n * with `useHasRecursion`.\n *\n * @param {Object} props\n * @param {*} props.uniqueId Any value that acts as a unique identifier for a block instance.\n * @param {string} props.blockName Optional block name.\n * @param {JSX.Element} props.children React children.\n *\n * @return {JSX.Element} A React element.\n */\nexport function RecursionProvider( { children, uniqueId, blockName = '' } ) {\n\tconst previouslyRenderedBlocks = useContext( RenderedRefsContext );\n\tconst { name } = useBlockEditContext();\n\n\tblockName = blockName || name;\n\n\tconst newRenderedBlocks = useMemo(\n\t\t() => addToBlockType( previouslyRenderedBlocks, blockName, uniqueId ),\n\t\t[ previouslyRenderedBlocks, blockName, uniqueId ]\n\t);\n\n\treturn (\n\t\t<RenderedRefsContext.Provider value={ newRenderedBlocks }>\n\t\t\t{ children }\n\t\t</RenderedRefsContext.Provider>\n\t);\n}\n\n/**\n * A React hook for keeping track of blocks previously rendered up in the block\n * tree. Blocks susceptible to recursion can use this hook in their `Edit`\n * function to prevent said recursion.\n *\n * Use this with the `RecursionProvider` component, using the same `uniqueId` value\n * for both the hook and the provider.\n *\n * @param {*} uniqueId Any value that acts as a unique identifier for a block instance.\n * @param {string} blockName Optional block name.\n *\n * @return {boolean} A boolean describing whether the provided id has already been rendered.\n */\nexport function useHasRecursion( uniqueId, blockName = '' ) {\n\tconst previouslyRenderedBlocks = useContext( RenderedRefsContext );\n\tconst { name } = useBlockEditContext();\n\tblockName = blockName || name;\n\treturn Boolean( previouslyRenderedBlocks[ blockName ]?.has( uniqueId ) );\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AARA;AACA;AACA;;AAGA;AACA;AACA;;AAGA,MAAME,mBAAmB,GAAG,IAAAC,sBAAa,EAAE,CAAC,CAAE,CAAC;;AAE/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,cAAcA,CAAEC,cAAc,EAAEC,SAAS,EAAEC,QAAQ,EAAG;EAC9D,MAAMC,MAAM,GAAG;IACd,GAAGH,cAAc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ElB,QAAS,CAAE,CAAC;AACzE"}
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = ResizableBoxPopover;
8
- var _element = require("@wordpress/element");
8
+ var _react = require("react");
9
9
  var _components = require("@wordpress/components");
10
10
  var _blockPopover = _interopRequireDefault(require("../block-popover"));
11
11
  /**
@@ -21,13 +21,13 @@ function ResizableBoxPopover({
21
21
  resizableBoxProps,
22
22
  ...props
23
23
  }) {
24
- return (0, _element.createElement)(_blockPopover.default, {
24
+ return (0, _react.createElement)(_blockPopover.default, {
25
25
  clientId: clientId,
26
26
  __unstableCoverTarget: true,
27
27
  __unstablePopoverSlot: "block-toolbar",
28
28
  shift: false,
29
29
  ...props
30
- }, (0, _element.createElement)(_components.ResizableBox, {
30
+ }, (0, _react.createElement)(_components.ResizableBox, {
31
31
  ...resizableBoxProps
32
32
  }));
33
33
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_components","require","_blockPopover","_interopRequireDefault","ResizableBoxPopover","clientId","resizableBoxProps","props","_element","createElement","default","__unstableCoverTarget","__unstablePopoverSlot","shift","ResizableBox"],"sources":["@wordpress/block-editor/src/components/resizable-box-popover/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { ResizableBox } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport BlockPopover from '../block-popover';\n\nexport default function ResizableBoxPopover( {\n\tclientId,\n\tresizableBoxProps,\n\t...props\n} ) {\n\treturn (\n\t\t<BlockPopover\n\t\t\tclientId={ clientId }\n\t\t\t__unstableCoverTarget\n\t\t\t__unstablePopoverSlot=\"block-toolbar\"\n\t\t\tshift={ false }\n\t\t\t{ ...props }\n\t\t>\n\t\t\t<ResizableBox { ...resizableBoxProps } />\n\t\t</BlockPopover>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAKA,IAAAC,aAAA,GAAAC,sBAAA,CAAAF,OAAA;AARA;AACA;AACA;;AAGA;AACA;AACA;;AAGe,SAASG,mBAAmBA,CAAE;EAC5CC,QAAQ;EACRC,iBAAiB;EACjB,GAAGC;AACJ,CAAC,EAAG;EACH,OACC,IAAAC,QAAA,CAAAC,aAAA,EAACP,aAAA,CAAAQ,OAAY;IACZL,QAAQ,EAAGA,QAAU;IACrBM,qBAAqB;IACrBC,qBAAqB,EAAC,eAAe;IACrCC,KAAK,EAAG,KAAO;IAAA,GACVN;EAAK,GAEV,IAAAC,QAAA,CAAAC,aAAA,EAACT,WAAA,CAAAc,YAAY;IAAA,GAAMR;EAAiB,CAAI,CAC3B,CAAC;AAEjB"}
1
+ {"version":3,"names":["_components","require","_blockPopover","_interopRequireDefault","ResizableBoxPopover","clientId","resizableBoxProps","props","_react","createElement","default","__unstableCoverTarget","__unstablePopoverSlot","shift","ResizableBox"],"sources":["@wordpress/block-editor/src/components/resizable-box-popover/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { ResizableBox } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport BlockPopover from '../block-popover';\n\nexport default function ResizableBoxPopover( {\n\tclientId,\n\tresizableBoxProps,\n\t...props\n} ) {\n\treturn (\n\t\t<BlockPopover\n\t\t\tclientId={ clientId }\n\t\t\t__unstableCoverTarget\n\t\t\t__unstablePopoverSlot=\"block-toolbar\"\n\t\t\tshift={ false }\n\t\t\t{ ...props }\n\t\t>\n\t\t\t<ResizableBox { ...resizableBoxProps } />\n\t\t</BlockPopover>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAKA,IAAAC,aAAA,GAAAC,sBAAA,CAAAF,OAAA;AARA;AACA;AACA;;AAGA;AACA;AACA;;AAGe,SAASG,mBAAmBA,CAAE;EAC5CC,QAAQ;EACRC,iBAAiB;EACjB,GAAGC;AACJ,CAAC,EAAG;EACH,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACP,aAAA,CAAAQ,OAAY;IACZL,QAAQ,EAAGA,QAAU;IACrBM,qBAAqB;IACrBC,qBAAqB,EAAC,eAAe;IACrCC,KAAK,EAAG,KAAO;IAAA,GACVN;EAAK,GAEV,IAAAC,MAAA,CAAAC,aAAA,EAACT,WAAA,CAAAc,YAAY;IAAA,GAAMR;EAAiB,CAAI,CAC3B,CAAC;AAEjB"}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = ResolutionTool;
7
- var _element = require("@wordpress/element");
7
+ var _react = require("react");
8
8
  var _components = require("@wordpress/components");
9
9
  var _i18n = require("@wordpress/i18n");
10
10
  /**
@@ -33,13 +33,13 @@ function ResolutionTool({
33
33
  isShownByDefault = true
34
34
  }) {
35
35
  const displayValue = value !== null && value !== void 0 ? value : defaultValue;
36
- return (0, _element.createElement)(_components.__experimentalToolsPanelItem, {
36
+ return (0, _react.createElement)(_components.__experimentalToolsPanelItem, {
37
37
  hasValue: () => displayValue !== defaultValue,
38
38
  label: (0, _i18n.__)('Resolution'),
39
39
  onDeselect: () => onChange(defaultValue),
40
40
  isShownByDefault: isShownByDefault,
41
41
  panelId: panelId
42
- }, (0, _element.createElement)(_components.SelectControl, {
42
+ }, (0, _react.createElement)(_components.SelectControl, {
43
43
  label: (0, _i18n.__)('Resolution'),
44
44
  value: displayValue,
45
45
  options: options,
@@ -1 +1 @@
1
- {"version":3,"names":["_components","require","_i18n","DEFAULT_SIZE_OPTIONS","label","_x","value","ResolutionTool","panelId","onChange","options","defaultValue","isShownByDefault","displayValue","_element","createElement","__experimentalToolsPanelItem","hasValue","__","onDeselect","SelectControl","help","size"],"sources":["@wordpress/block-editor/src/components/resolution-tool/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tSelectControl,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n} from '@wordpress/components';\nimport { __, _x } from '@wordpress/i18n';\n\nconst DEFAULT_SIZE_OPTIONS = [\n\t{\n\t\tlabel: _x( 'Thumbnail', 'Image size option for resolution control' ),\n\t\tvalue: 'thumbnail',\n\t},\n\t{\n\t\tlabel: _x( 'Medium', 'Image size option for resolution control' ),\n\t\tvalue: 'medium',\n\t},\n\t{\n\t\tlabel: _x( 'Large', 'Image size option for resolution control' ),\n\t\tvalue: 'large',\n\t},\n\t{\n\t\tlabel: _x( 'Full Size', 'Image size option for resolution control' ),\n\t\tvalue: 'full',\n\t},\n];\n\nexport default function ResolutionTool( {\n\tpanelId,\n\tvalue,\n\tonChange,\n\toptions = DEFAULT_SIZE_OPTIONS,\n\tdefaultValue = DEFAULT_SIZE_OPTIONS[ 0 ].value,\n\tisShownByDefault = true,\n} ) {\n\tconst displayValue = value ?? defaultValue;\n\treturn (\n\t\t<ToolsPanelItem\n\t\t\thasValue={ () => displayValue !== defaultValue }\n\t\t\tlabel={ __( 'Resolution' ) }\n\t\t\tonDeselect={ () => onChange( defaultValue ) }\n\t\t\tisShownByDefault={ isShownByDefault }\n\t\t\tpanelId={ panelId }\n\t\t>\n\t\t\t<SelectControl\n\t\t\t\tlabel={ __( 'Resolution' ) }\n\t\t\t\tvalue={ displayValue }\n\t\t\t\toptions={ options }\n\t\t\t\tonChange={ onChange }\n\t\t\t\thelp={ __( 'Select the size of the source image.' ) }\n\t\t\t\tsize={ '__unstable-large' }\n\t\t\t/>\n\t\t</ToolsPanelItem>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAIA,IAAAC,KAAA,GAAAD,OAAA;AAPA;AACA;AACA;;AAOA,MAAME,oBAAoB,GAAG,CAC5B;EACCC,KAAK,EAAE,IAAAC,QAAE,EAAE,WAAW,EAAE,0CAA2C,CAAC;EACpEC,KAAK,EAAE;AACR,CAAC,EACD;EACCF,KAAK,EAAE,IAAAC,QAAE,EAAE,QAAQ,EAAE,0CAA2C,CAAC;EACjEC,KAAK,EAAE;AACR,CAAC,EACD;EACCF,KAAK,EAAE,IAAAC,QAAE,EAAE,OAAO,EAAE,0CAA2C,CAAC;EAChEC,KAAK,EAAE;AACR,CAAC,EACD;EACCF,KAAK,EAAE,IAAAC,QAAE,EAAE,WAAW,EAAE,0CAA2C,CAAC;EACpEC,KAAK,EAAE;AACR,CAAC,CACD;AAEc,SAASC,cAAcA,CAAE;EACvCC,OAAO;EACPF,KAAK;EACLG,QAAQ;EACRC,OAAO,GAAGP,oBAAoB;EAC9BQ,YAAY,GAAGR,oBAAoB,CAAE,CAAC,CAAE,CAACG,KAAK;EAC9CM,gBAAgB,GAAG;AACpB,CAAC,EAAG;EACH,MAAMC,YAAY,GAAGP,KAAK,aAALA,KAAK,cAALA,KAAK,GAAIK,YAAY;EAC1C,OACC,IAAAG,QAAA,CAAAC,aAAA,EAACf,WAAA,CAAAgB,4BAAc;IACdC,QAAQ,EAAGA,CAAA,KAAMJ,YAAY,KAAKF,YAAc;IAChDP,KAAK,EAAG,IAAAc,QAAE,EAAE,YAAa,CAAG;IAC5BC,UAAU,EAAGA,CAAA,KAAMV,QAAQ,CAAEE,YAAa,CAAG;IAC7CC,gBAAgB,EAAGA,gBAAkB;IACrCJ,OAAO,EAAGA;EAAS,GAEnB,IAAAM,QAAA,CAAAC,aAAA,EAACf,WAAA,CAAAoB,aAAa;IACbhB,KAAK,EAAG,IAAAc,QAAE,EAAE,YAAa,CAAG;IAC5BZ,KAAK,EAAGO,YAAc;IACtBH,OAAO,EAAGA,OAAS;IACnBD,QAAQ,EAAGA,QAAU;IACrBY,IAAI,EAAG,IAAAH,QAAE,EAAE,sCAAuC,CAAG;IACrDI,IAAI,EAAG;EAAoB,CAC3B,CACc,CAAC;AAEnB"}
1
+ {"version":3,"names":["_components","require","_i18n","DEFAULT_SIZE_OPTIONS","label","_x","value","ResolutionTool","panelId","onChange","options","defaultValue","isShownByDefault","displayValue","_react","createElement","__experimentalToolsPanelItem","hasValue","__","onDeselect","SelectControl","help","size"],"sources":["@wordpress/block-editor/src/components/resolution-tool/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tSelectControl,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n} from '@wordpress/components';\nimport { __, _x } from '@wordpress/i18n';\n\nconst DEFAULT_SIZE_OPTIONS = [\n\t{\n\t\tlabel: _x( 'Thumbnail', 'Image size option for resolution control' ),\n\t\tvalue: 'thumbnail',\n\t},\n\t{\n\t\tlabel: _x( 'Medium', 'Image size option for resolution control' ),\n\t\tvalue: 'medium',\n\t},\n\t{\n\t\tlabel: _x( 'Large', 'Image size option for resolution control' ),\n\t\tvalue: 'large',\n\t},\n\t{\n\t\tlabel: _x( 'Full Size', 'Image size option for resolution control' ),\n\t\tvalue: 'full',\n\t},\n];\n\nexport default function ResolutionTool( {\n\tpanelId,\n\tvalue,\n\tonChange,\n\toptions = DEFAULT_SIZE_OPTIONS,\n\tdefaultValue = DEFAULT_SIZE_OPTIONS[ 0 ].value,\n\tisShownByDefault = true,\n} ) {\n\tconst displayValue = value ?? defaultValue;\n\treturn (\n\t\t<ToolsPanelItem\n\t\t\thasValue={ () => displayValue !== defaultValue }\n\t\t\tlabel={ __( 'Resolution' ) }\n\t\t\tonDeselect={ () => onChange( defaultValue ) }\n\t\t\tisShownByDefault={ isShownByDefault }\n\t\t\tpanelId={ panelId }\n\t\t>\n\t\t\t<SelectControl\n\t\t\t\tlabel={ __( 'Resolution' ) }\n\t\t\t\tvalue={ displayValue }\n\t\t\t\toptions={ options }\n\t\t\t\tonChange={ onChange }\n\t\t\t\thelp={ __( 'Select the size of the source image.' ) }\n\t\t\t\tsize={ '__unstable-large' }\n\t\t\t/>\n\t\t</ToolsPanelItem>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAIA,IAAAC,KAAA,GAAAD,OAAA;AAPA;AACA;AACA;;AAOA,MAAME,oBAAoB,GAAG,CAC5B;EACCC,KAAK,EAAE,IAAAC,QAAE,EAAE,WAAW,EAAE,0CAA2C,CAAC;EACpEC,KAAK,EAAE;AACR,CAAC,EACD;EACCF,KAAK,EAAE,IAA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