@wordpress/block-editor 12.24.0 → 12.26.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 (973) hide show
  1. package/CHANGELOG.md +11 -3
  2. package/README.md +7 -1
  3. package/build/components/alignment-control/ui.js +3 -1
  4. package/build/components/alignment-control/ui.js.map +1 -1
  5. package/build/components/block-actions/index.js +4 -2
  6. package/build/components/block-actions/index.js.map +1 -1
  7. package/build/components/block-alignment-control/ui.js +2 -2
  8. package/build/components/block-alignment-control/ui.js.map +1 -1
  9. package/build/components/block-card/index.js +2 -2
  10. package/build/components/block-card/index.js.map +1 -1
  11. package/build/components/block-compare/index.js +2 -2
  12. package/build/components/block-compare/index.js.map +1 -1
  13. package/build/components/block-edit/edit.js +2 -2
  14. package/build/components/block-edit/edit.js.map +1 -1
  15. package/build/components/block-icon/index.js +2 -2
  16. package/build/components/block-icon/index.js.map +1 -1
  17. package/build/components/block-list/block.js +4 -13
  18. package/build/components/block-list/block.js.map +1 -1
  19. package/build/components/block-list/block.native.js +2 -2
  20. package/build/components/block-list/block.native.js.map +1 -1
  21. package/build/components/block-list/index.js +6 -5
  22. package/build/components/block-list/index.js.map +1 -1
  23. package/build/components/block-list/index.native.js +1 -9
  24. package/build/components/block-list/index.native.js.map +1 -1
  25. package/build/components/block-list/use-block-props/index.js +11 -8
  26. package/build/components/block-list/use-block-props/index.js.map +1 -1
  27. package/build/components/block-list/use-block-props/use-block-refs.js +17 -46
  28. package/build/components/block-list/use-block-props/use-block-refs.js.map +1 -1
  29. package/build/components/block-list/use-block-props/use-is-hovered.js +10 -14
  30. package/build/components/block-list/use-block-props/use-is-hovered.js.map +1 -1
  31. package/build/components/block-list/use-block-props/use-scroll-into-view.js +44 -0
  32. package/build/components/block-list/use-block-props/use-scroll-into-view.js.map +1 -0
  33. package/build/components/block-list-appender/index.js +2 -2
  34. package/build/components/block-list-appender/index.js.map +1 -1
  35. package/build/components/block-mover/button.js +2 -2
  36. package/build/components/block-mover/button.js.map +1 -1
  37. package/build/components/block-mover/index.js +2 -2
  38. package/build/components/block-mover/index.js.map +1 -1
  39. package/build/components/block-mover/index.native.js +3 -1
  40. package/build/components/block-mover/index.native.js.map +1 -1
  41. package/build/components/block-patterns-list/index.js +26 -5
  42. package/build/components/block-patterns-list/index.js.map +1 -1
  43. package/build/components/block-popover/cover.js +9 -6
  44. package/build/components/block-popover/cover.js.map +1 -1
  45. package/build/components/block-popover/inbetween.js +2 -2
  46. package/build/components/block-popover/inbetween.js.map +1 -1
  47. package/build/components/block-popover/index.js +22 -4
  48. package/build/components/block-popover/index.js.map +1 -1
  49. package/build/components/block-preview/index.js +2 -2
  50. package/build/components/block-preview/index.js.map +1 -1
  51. package/build/components/block-settings-menu/block-settings-dropdown.js +8 -30
  52. package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  53. package/build/components/block-settings-menu-controls/index.js +10 -7
  54. package/build/components/block-settings-menu-controls/index.js.map +1 -1
  55. package/build/components/block-styles/index.js +2 -2
  56. package/build/components/block-styles/index.js.map +1 -1
  57. package/build/components/block-switcher/pattern-transformations-menu.js +3 -1
  58. package/build/components/block-switcher/pattern-transformations-menu.js.map +1 -1
  59. package/build/components/block-switcher/use-transformed-patterns.js +6 -2
  60. package/build/components/block-switcher/use-transformed-patterns.js.map +1 -1
  61. package/build/components/block-switcher/utils.js +15 -5
  62. package/build/components/block-switcher/utils.js.map +1 -1
  63. package/build/components/block-toolbar/index.js +3 -3
  64. package/build/components/block-toolbar/index.js.map +1 -1
  65. package/build/components/block-toolbar/use-has-block-toolbar.js +14 -9
  66. package/build/components/block-toolbar/use-has-block-toolbar.js.map +1 -1
  67. package/build/components/block-tools/block-selection-button.js +2 -2
  68. package/build/components/block-tools/block-selection-button.js.map +1 -1
  69. package/build/components/block-tools/block-toolbar-breadcrumb.js +4 -4
  70. package/build/components/block-tools/block-toolbar-breadcrumb.js.map +1 -1
  71. package/build/components/block-tools/block-toolbar-popover.js +2 -2
  72. package/build/components/block-tools/block-toolbar-popover.js.map +1 -1
  73. package/build/components/block-tools/empty-block-inserter.js +2 -2
  74. package/build/components/block-tools/empty-block-inserter.js.map +1 -1
  75. package/build/components/block-tools/index.js +23 -2
  76. package/build/components/block-tools/index.js.map +1 -1
  77. package/build/components/block-tools/insertion-point.js +4 -4
  78. package/build/components/block-tools/insertion-point.js.map +1 -1
  79. package/build/components/block-tools/use-show-block-tools.js +2 -5
  80. package/build/components/block-tools/use-show-block-tools.js.map +1 -1
  81. package/build/components/block-tools/zoom-out-mode-inserters.js +68 -20
  82. package/build/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
  83. package/build/components/block-variation-picker/index.js +5 -4
  84. package/build/components/block-variation-picker/index.js.map +1 -1
  85. package/build/components/block-variation-transforms/index.js +3 -1
  86. package/build/components/block-variation-transforms/index.js.map +1 -1
  87. package/build/components/button-block-appender/index.js +2 -2
  88. package/build/components/button-block-appender/index.js.map +1 -1
  89. package/build/components/child-layout-control/index.js +2 -2
  90. package/build/components/child-layout-control/index.js.map +1 -1
  91. package/build/components/colors-gradients/control.js +3 -3
  92. package/build/components/colors-gradients/control.js.map +1 -1
  93. package/build/components/colors-gradients/dropdown.js +2 -2
  94. package/build/components/colors-gradients/dropdown.js.map +1 -1
  95. package/build/components/colors-gradients/panel-color-gradient-settings.js +2 -2
  96. package/build/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
  97. package/build/components/convert-to-group-buttons/index.js +6 -0
  98. package/build/components/convert-to-group-buttons/index.js.map +1 -1
  99. package/build/components/default-block-appender/index.js +2 -2
  100. package/build/components/default-block-appender/index.js.map +1 -1
  101. package/build/components/dimensions-tool/aspect-ratio-tool.js +30 -36
  102. package/build/components/dimensions-tool/aspect-ratio-tool.js.map +1 -1
  103. package/build/components/floating-toolbar/index.native.js +9 -5
  104. package/build/components/floating-toolbar/index.native.js.map +1 -1
  105. package/build/components/global-styles/background-panel.js +4 -4
  106. package/build/components/global-styles/background-panel.js.map +1 -1
  107. package/build/components/global-styles/color-panel.js +6 -4
  108. package/build/components/global-styles/color-panel.js.map +1 -1
  109. package/build/components/global-styles/dimensions-panel.js +20 -4
  110. package/build/components/global-styles/dimensions-panel.js.map +1 -1
  111. package/build/components/global-styles/filters-panel.js +2 -2
  112. package/build/components/global-styles/filters-panel.js.map +1 -1
  113. package/build/components/global-styles/hooks.js +3 -2
  114. package/build/components/global-styles/hooks.js.map +1 -1
  115. package/build/components/global-styles/shadow-panel-components.js +4 -4
  116. package/build/components/global-styles/shadow-panel-components.js.map +1 -1
  117. package/build/components/global-styles/typography-panel.js +23 -23
  118. package/build/components/global-styles/typography-panel.js.map +1 -1
  119. package/build/components/global-styles/use-global-styles-output.js +149 -132
  120. package/build/components/global-styles/use-global-styles-output.js.map +1 -1
  121. package/build/components/global-styles/utils.js +45 -0
  122. package/build/components/global-styles/utils.js.map +1 -1
  123. package/build/components/grid-visualizer/grid-item-resizer.js +141 -24
  124. package/build/components/grid-visualizer/grid-item-resizer.js.map +1 -1
  125. package/build/components/grid-visualizer/grid-visualizer.js +11 -5
  126. package/build/components/grid-visualizer/grid-visualizer.js.map +1 -1
  127. package/build/components/iframe/index.js +69 -30
  128. package/build/components/iframe/index.js.map +1 -1
  129. package/build/components/image-editor/aspect-ratio-dropdown.js +53 -36
  130. package/build/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
  131. package/build/components/image-editor/cropper.js +2 -2
  132. package/build/components/image-editor/cropper.js.map +1 -1
  133. package/build/components/image-editor/index.js +1 -1
  134. package/build/components/image-editor/index.js.map +1 -1
  135. package/build/components/index.js +8 -0
  136. package/build/components/index.js.map +1 -1
  137. package/build/components/inner-blocks/button-block-appender.js +2 -2
  138. package/build/components/inner-blocks/button-block-appender.js.map +1 -1
  139. package/build/components/inner-blocks/index.js +25 -10
  140. package/build/components/inner-blocks/index.js.map +1 -1
  141. package/build/components/inserter/block-patterns-explorer/pattern-list.js +1 -1
  142. package/build/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
  143. package/build/components/inserter/block-patterns-tab/index.js +20 -30
  144. package/build/components/inserter/block-patterns-tab/index.js.map +1 -1
  145. package/build/components/inserter/block-patterns-tab/pattern-category-previews.js +1 -1
  146. package/build/components/inserter/block-patterns-tab/pattern-category-previews.js.map +1 -1
  147. package/build/components/inserter/block-types-tab.js +9 -3
  148. package/build/components/inserter/block-types-tab.js.map +1 -1
  149. package/build/components/inserter/category-tabs/index.js +56 -0
  150. package/build/components/inserter/category-tabs/index.js.map +1 -0
  151. package/build/components/inserter/hooks/use-insertion-point.js +11 -2
  152. package/build/components/inserter/hooks/use-insertion-point.js.map +1 -1
  153. package/build/components/inserter/hooks/use-patterns-state.js +12 -5
  154. package/build/components/inserter/hooks/use-patterns-state.js.map +1 -1
  155. package/build/components/inserter/index.js +2 -2
  156. package/build/components/inserter/index.js.map +1 -1
  157. package/build/components/inserter/library.js +8 -2
  158. package/build/components/inserter/library.js.map +1 -1
  159. package/build/components/inserter/media-tab/index.js +2 -2
  160. package/build/components/inserter/media-tab/index.js.map +1 -1
  161. package/build/components/inserter/media-tab/media-panel.js +0 -25
  162. package/build/components/inserter/media-tab/media-panel.js.map +1 -1
  163. package/build/components/inserter/media-tab/media-preview.js +15 -5
  164. package/build/components/inserter/media-tab/media-preview.js.map +1 -1
  165. package/build/components/inserter/media-tab/media-tab.js +15 -29
  166. package/build/components/inserter/media-tab/media-tab.js.map +1 -1
  167. package/build/components/inserter/menu.js +115 -109
  168. package/build/components/inserter/menu.js.map +1 -1
  169. package/build/components/inserter/quick-inserter.js +2 -2
  170. package/build/components/inserter/quick-inserter.js.map +1 -1
  171. package/build/components/inserter/tabs.js +23 -11
  172. package/build/components/inserter/tabs.js.map +1 -1
  173. package/build/components/inserter-list-item/index.js +3 -3
  174. package/build/components/inserter-list-item/index.js.map +1 -1
  175. package/build/components/keyboard-shortcuts/index.js +9 -0
  176. package/build/components/keyboard-shortcuts/index.js.map +1 -1
  177. package/build/components/line-height-control/index.js +6 -2
  178. package/build/components/line-height-control/index.js.map +1 -1
  179. package/build/components/link-control/index.js +2 -2
  180. package/build/components/link-control/index.js.map +1 -1
  181. package/build/components/link-control/link-preview.js +3 -3
  182. package/build/components/link-control/link-preview.js.map +1 -1
  183. package/build/components/link-control/search-item.js +9 -3
  184. package/build/components/link-control/search-item.js.map +1 -1
  185. package/build/components/link-control/search-results.js +2 -2
  186. package/build/components/link-control/search-results.js.map +1 -1
  187. package/build/components/list-view/block-contents.js +2 -2
  188. package/build/components/list-view/block-contents.js.map +1 -1
  189. package/build/components/list-view/block-select-button.js +15 -172
  190. package/build/components/list-view/block-select-button.js.map +1 -1
  191. package/build/components/list-view/block.js +196 -21
  192. package/build/components/list-view/block.js.map +1 -1
  193. package/build/components/list-view/drop-indicator.js +3 -3
  194. package/build/components/list-view/drop-indicator.js.map +1 -1
  195. package/build/components/list-view/index.js +3 -3
  196. package/build/components/list-view/index.js.map +1 -1
  197. package/build/components/list-view/leaf.js +2 -2
  198. package/build/components/list-view/leaf.js.map +1 -1
  199. package/build/components/list-view/use-list-view-drop-zone.js +1 -1
  200. package/build/components/list-view/use-list-view-drop-zone.js.map +1 -1
  201. package/build/components/list-view/utils.js +3 -1
  202. package/build/components/list-view/utils.js.map +1 -1
  203. package/build/components/media-placeholder/index.js +7 -7
  204. package/build/components/media-placeholder/index.js.map +1 -1
  205. package/build/components/media-replace-flow/index.js +2 -2
  206. package/build/components/media-replace-flow/index.js.map +1 -1
  207. package/build/components/navigable-toolbar/index.js +3 -1
  208. package/build/components/navigable-toolbar/index.js.map +1 -1
  209. package/build/components/plain-text/index.js +2 -2
  210. package/build/components/plain-text/index.js.map +1 -1
  211. package/build/components/provider/block-refs-provider.js +3 -4
  212. package/build/components/provider/block-refs-provider.js.map +1 -1
  213. package/build/components/provider/use-block-sync.js +10 -1
  214. package/build/components/provider/use-block-sync.js.map +1 -1
  215. package/build/components/responsive-block-control/index.js +2 -2
  216. package/build/components/responsive-block-control/index.js.map +1 -1
  217. package/build/components/rich-text/event-listeners/before-input-rules.js +93 -0
  218. package/build/components/rich-text/event-listeners/before-input-rules.js.map +1 -0
  219. package/build/components/rich-text/event-listeners/delete.js +58 -0
  220. package/build/components/rich-text/event-listeners/delete.js.map +1 -0
  221. package/build/components/rich-text/event-listeners/enter.js +89 -0
  222. package/build/components/rich-text/event-listeners/enter.js.map +1 -0
  223. package/build/components/rich-text/event-listeners/firefox-compat.js +36 -0
  224. package/build/components/rich-text/event-listeners/firefox-compat.js.map +1 -0
  225. package/build/components/rich-text/event-listeners/index.js +44 -0
  226. package/build/components/rich-text/event-listeners/index.js.map +1 -0
  227. package/build/components/rich-text/event-listeners/input-events.js +22 -0
  228. package/build/components/rich-text/event-listeners/input-events.js.map +1 -0
  229. package/build/components/rich-text/event-listeners/input-rules.js +135 -0
  230. package/build/components/rich-text/event-listeners/input-rules.js.map +1 -0
  231. package/build/components/rich-text/event-listeners/insert-replacement-text.js +33 -0
  232. package/build/components/rich-text/event-listeners/insert-replacement-text.js.map +1 -0
  233. package/build/components/rich-text/event-listeners/paste-handler.js +126 -0
  234. package/build/components/rich-text/event-listeners/paste-handler.js.map +1 -0
  235. package/build/components/rich-text/event-listeners/remove-browser-shortcuts.js +27 -0
  236. package/build/components/rich-text/event-listeners/remove-browser-shortcuts.js.map +1 -0
  237. package/build/components/rich-text/event-listeners/shortcuts.js +22 -0
  238. package/build/components/rich-text/event-listeners/shortcuts.js.map +1 -0
  239. package/build/components/rich-text/event-listeners/undo-automatic-change.js +51 -0
  240. package/build/components/rich-text/event-listeners/undo-automatic-change.js.map +1 -0
  241. package/build/components/rich-text/format-toolbar/index.js +2 -2
  242. package/build/components/rich-text/format-toolbar/index.js.map +1 -1
  243. package/build/components/rich-text/index.js +20 -33
  244. package/build/components/rich-text/index.js.map +1 -1
  245. package/build/components/rich-text/index.native.js +15 -5
  246. package/build/components/rich-text/index.native.js.map +1 -1
  247. package/build/components/rich-text/multiline.js +36 -4
  248. package/build/components/rich-text/multiline.js.map +1 -1
  249. package/build/components/rich-text/native/index.native.js +12 -0
  250. package/build/components/rich-text/native/index.native.js.map +1 -1
  251. package/build/components/rich-text/use-format-types.js +8 -4
  252. package/build/components/rich-text/use-format-types.js.map +1 -1
  253. package/build/components/segmented-text-control/index.js +62 -0
  254. package/build/components/segmented-text-control/index.js.map +1 -0
  255. package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js +16 -2
  256. package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
  257. package/build/components/text-alignment-control/index.js +76 -0
  258. package/build/components/text-alignment-control/index.js.map +1 -0
  259. package/build/components/text-decoration-control/index.js +22 -26
  260. package/build/components/text-decoration-control/index.js.map +1 -1
  261. package/build/components/text-transform-control/index.js +19 -23
  262. package/build/components/text-transform-control/index.js.map +1 -1
  263. package/build/components/url-input/index.js +4 -4
  264. package/build/components/url-input/index.js.map +1 -1
  265. package/build/components/url-popover/link-editor.js +2 -2
  266. package/build/components/url-popover/link-editor.js.map +1 -1
  267. package/build/components/url-popover/link-viewer-url.js +2 -2
  268. package/build/components/url-popover/link-viewer-url.js.map +1 -1
  269. package/build/components/url-popover/link-viewer.js +2 -2
  270. package/build/components/url-popover/link-viewer.js.map +1 -1
  271. package/build/components/use-block-display-information/index.js +9 -3
  272. package/build/components/use-block-display-information/index.js.map +1 -1
  273. package/build/components/use-on-block-drop/index.js +3 -1
  274. package/build/components/use-on-block-drop/index.js.map +1 -1
  275. package/build/components/warning/index.js +2 -2
  276. package/build/components/warning/index.js.map +1 -1
  277. package/build/components/writing-flow/index.js +2 -2
  278. package/build/components/writing-flow/index.js.map +1 -1
  279. package/build/components/writing-flow/use-clipboard-handler.js +77 -30
  280. package/build/components/writing-flow/use-clipboard-handler.js.map +1 -1
  281. package/build/components/writing-flow/use-drag-selection.js +3 -1
  282. package/build/components/writing-flow/use-drag-selection.js.map +1 -1
  283. package/build/components/writing-flow/use-input.js +44 -2
  284. package/build/components/writing-flow/use-input.js.map +1 -1
  285. package/build/components/writing-flow/use-tab-nav.js +9 -2
  286. package/build/components/writing-flow/use-tab-nav.js.map +1 -1
  287. package/build/components/writing-mode-control/index.js +17 -21
  288. package/build/components/writing-mode-control/index.js.map +1 -1
  289. package/build/hooks/align.js +2 -2
  290. package/build/hooks/align.js.map +1 -1
  291. package/build/hooks/background.js +1 -1
  292. package/build/hooks/background.js.map +1 -1
  293. package/build/hooks/border.js +3 -3
  294. package/build/hooks/border.js.map +1 -1
  295. package/build/hooks/color.js +3 -3
  296. package/build/hooks/color.js.map +1 -1
  297. package/build/hooks/content-lock-ui.js +5 -28
  298. package/build/hooks/content-lock-ui.js.map +1 -1
  299. package/build/hooks/custom-class-name.js +2 -2
  300. package/build/hooks/custom-class-name.js.map +1 -1
  301. package/build/hooks/custom-class-name.native.js +2 -2
  302. package/build/hooks/custom-class-name.native.js.map +1 -1
  303. package/build/hooks/dimensions.js +2 -2
  304. package/build/hooks/dimensions.js.map +1 -1
  305. package/build/hooks/duotone.js +3 -1
  306. package/build/hooks/duotone.js.map +1 -1
  307. package/build/hooks/layout-child.js +16 -8
  308. package/build/hooks/layout-child.js.map +1 -1
  309. package/build/hooks/layout.js +2 -2
  310. package/build/hooks/layout.js.map +1 -1
  311. package/build/hooks/position.js +2 -2
  312. package/build/hooks/position.js.map +1 -1
  313. package/build/hooks/text-align.js +3 -3
  314. package/build/hooks/text-align.js.map +1 -1
  315. package/build/hooks/use-bindings-attributes.js +39 -13
  316. package/build/hooks/use-bindings-attributes.js.map +1 -1
  317. package/build/hooks/use-color-props.js +2 -2
  318. package/build/hooks/use-color-props.js.map +1 -1
  319. package/build/hooks/use-typography-props.js +2 -2
  320. package/build/hooks/use-typography-props.js.map +1 -1
  321. package/build/hooks/utils.js +13 -8
  322. package/build/hooks/utils.js.map +1 -1
  323. package/build/layouts/grid.js +7 -6
  324. package/build/layouts/grid.js.map +1 -1
  325. package/build/private-apis.js +8 -3
  326. package/build/private-apis.js.map +1 -1
  327. package/build/store/actions.js +143 -25
  328. package/build/store/actions.js.map +1 -1
  329. package/build/store/private-actions.js +26 -1
  330. package/build/store/private-actions.js.map +1 -1
  331. package/build/store/private-keys.js +2 -1
  332. package/build/store/private-keys.js.map +1 -1
  333. package/build/store/private-selectors.js +33 -6
  334. package/build/store/private-selectors.js.map +1 -1
  335. package/build/store/reducer.js +11 -8
  336. package/build/store/reducer.js.map +1 -1
  337. package/build/store/selectors.js +25 -8
  338. package/build/store/selectors.js.map +1 -1
  339. package/build/utils/object.js +17 -0
  340. package/build/utils/object.js.map +1 -1
  341. package/build/utils/order-inserter-block-items.js +6 -2
  342. package/build/utils/order-inserter-block-items.js.map +1 -1
  343. package/build/utils/pasting.js +6 -2
  344. package/build/utils/pasting.js.map +1 -1
  345. package/build/utils/selection.js +8 -0
  346. package/build/utils/selection.js.map +1 -1
  347. package/build/utils/transform-styles/index.js +12 -7
  348. package/build/utils/transform-styles/index.js.map +1 -1
  349. package/build-module/components/alignment-control/ui.js +3 -1
  350. package/build-module/components/alignment-control/ui.js.map +1 -1
  351. package/build-module/components/block-actions/index.js +4 -2
  352. package/build-module/components/block-actions/index.js.map +1 -1
  353. package/build-module/components/block-alignment-control/ui.js +2 -2
  354. package/build-module/components/block-alignment-control/ui.js.map +1 -1
  355. package/build-module/components/block-card/index.js +2 -2
  356. package/build-module/components/block-card/index.js.map +1 -1
  357. package/build-module/components/block-compare/index.js +2 -2
  358. package/build-module/components/block-compare/index.js.map +1 -1
  359. package/build-module/components/block-edit/edit.js +2 -2
  360. package/build-module/components/block-edit/edit.js.map +1 -1
  361. package/build-module/components/block-icon/index.js +2 -2
  362. package/build-module/components/block-icon/index.js.map +1 -1
  363. package/build-module/components/block-list/block.js +4 -13
  364. package/build-module/components/block-list/block.js.map +1 -1
  365. package/build-module/components/block-list/block.native.js +2 -2
  366. package/build-module/components/block-list/block.native.js.map +1 -1
  367. package/build-module/components/block-list/index.js +6 -5
  368. package/build-module/components/block-list/index.js.map +1 -1
  369. package/build-module/components/block-list/index.native.js +1 -9
  370. package/build-module/components/block-list/index.native.js.map +1 -1
  371. package/build-module/components/block-list/use-block-props/index.js +11 -8
  372. package/build-module/components/block-list/use-block-props/index.js.map +1 -1
  373. package/build-module/components/block-list/use-block-props/use-block-refs.js +19 -48
  374. package/build-module/components/block-list/use-block-props/use-block-refs.js.map +1 -1
  375. package/build-module/components/block-list/use-block-props/use-is-hovered.js +10 -14
  376. package/build-module/components/block-list/use-block-props/use-is-hovered.js.map +1 -1
  377. package/build-module/components/block-list/use-block-props/use-scroll-into-view.js +37 -0
  378. package/build-module/components/block-list/use-block-props/use-scroll-into-view.js.map +1 -0
  379. package/build-module/components/block-list-appender/index.js +2 -2
  380. package/build-module/components/block-list-appender/index.js.map +1 -1
  381. package/build-module/components/block-mover/button.js +2 -2
  382. package/build-module/components/block-mover/button.js.map +1 -1
  383. package/build-module/components/block-mover/index.js +2 -2
  384. package/build-module/components/block-mover/index.js.map +1 -1
  385. package/build-module/components/block-mover/index.native.js +3 -1
  386. package/build-module/components/block-mover/index.native.js.map +1 -1
  387. package/build-module/components/block-patterns-list/index.js +27 -6
  388. package/build-module/components/block-patterns-list/index.js.map +1 -1
  389. package/build-module/components/block-popover/cover.js +9 -5
  390. package/build-module/components/block-popover/cover.js.map +1 -1
  391. package/build-module/components/block-popover/inbetween.js +2 -2
  392. package/build-module/components/block-popover/inbetween.js.map +1 -1
  393. package/build-module/components/block-popover/index.js +21 -3
  394. package/build-module/components/block-popover/index.js.map +1 -1
  395. package/build-module/components/block-preview/index.js +2 -2
  396. package/build-module/components/block-preview/index.js.map +1 -1
  397. package/build-module/components/block-settings-menu/block-settings-dropdown.js +9 -31
  398. package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  399. package/build-module/components/block-settings-menu-controls/index.js +10 -7
  400. package/build-module/components/block-settings-menu-controls/index.js.map +1 -1
  401. package/build-module/components/block-styles/index.js +2 -2
  402. package/build-module/components/block-styles/index.js.map +1 -1
  403. package/build-module/components/block-switcher/pattern-transformations-menu.js +3 -1
  404. package/build-module/components/block-switcher/pattern-transformations-menu.js.map +1 -1
  405. package/build-module/components/block-switcher/use-transformed-patterns.js +6 -2
  406. package/build-module/components/block-switcher/use-transformed-patterns.js.map +1 -1
  407. package/build-module/components/block-switcher/utils.js +15 -5
  408. package/build-module/components/block-switcher/utils.js.map +1 -1
  409. package/build-module/components/block-toolbar/index.js +3 -3
  410. package/build-module/components/block-toolbar/index.js.map +1 -1
  411. package/build-module/components/block-toolbar/use-has-block-toolbar.js +14 -9
  412. package/build-module/components/block-toolbar/use-has-block-toolbar.js.map +1 -1
  413. package/build-module/components/block-tools/block-selection-button.js +2 -2
  414. package/build-module/components/block-tools/block-selection-button.js.map +1 -1
  415. package/build-module/components/block-tools/block-toolbar-breadcrumb.js +4 -4
  416. package/build-module/components/block-tools/block-toolbar-breadcrumb.js.map +1 -1
  417. package/build-module/components/block-tools/block-toolbar-popover.js +2 -2
  418. package/build-module/components/block-tools/block-toolbar-popover.js.map +1 -1
  419. package/build-module/components/block-tools/empty-block-inserter.js +2 -2
  420. package/build-module/components/block-tools/empty-block-inserter.js.map +1 -1
  421. package/build-module/components/block-tools/index.js +23 -2
  422. package/build-module/components/block-tools/index.js.map +1 -1
  423. package/build-module/components/block-tools/insertion-point.js +4 -4
  424. package/build-module/components/block-tools/insertion-point.js.map +1 -1
  425. package/build-module/components/block-tools/use-show-block-tools.js +2 -5
  426. package/build-module/components/block-tools/use-show-block-tools.js.map +1 -1
  427. package/build-module/components/block-tools/zoom-out-mode-inserters.js +69 -21
  428. package/build-module/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
  429. package/build-module/components/block-variation-picker/index.js +5 -4
  430. package/build-module/components/block-variation-picker/index.js.map +1 -1
  431. package/build-module/components/block-variation-transforms/index.js +3 -1
  432. package/build-module/components/block-variation-transforms/index.js.map +1 -1
  433. package/build-module/components/button-block-appender/index.js +2 -2
  434. package/build-module/components/button-block-appender/index.js.map +1 -1
  435. package/build-module/components/child-layout-control/index.js +2 -2
  436. package/build-module/components/child-layout-control/index.js.map +1 -1
  437. package/build-module/components/colors-gradients/control.js +3 -3
  438. package/build-module/components/colors-gradients/control.js.map +1 -1
  439. package/build-module/components/colors-gradients/dropdown.js +2 -2
  440. package/build-module/components/colors-gradients/dropdown.js.map +1 -1
  441. package/build-module/components/colors-gradients/panel-color-gradient-settings.js +2 -2
  442. package/build-module/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
  443. package/build-module/components/convert-to-group-buttons/index.js +7 -1
  444. package/build-module/components/convert-to-group-buttons/index.js.map +1 -1
  445. package/build-module/components/default-block-appender/index.js +2 -2
  446. package/build-module/components/default-block-appender/index.js.map +1 -1
  447. package/build-module/components/dimensions-tool/aspect-ratio-tool.js +30 -36
  448. package/build-module/components/dimensions-tool/aspect-ratio-tool.js.map +1 -1
  449. package/build-module/components/floating-toolbar/index.native.js +9 -5
  450. package/build-module/components/floating-toolbar/index.native.js.map +1 -1
  451. package/build-module/components/global-styles/background-panel.js +4 -4
  452. package/build-module/components/global-styles/background-panel.js.map +1 -1
  453. package/build-module/components/global-styles/color-panel.js +6 -4
  454. package/build-module/components/global-styles/color-panel.js.map +1 -1
  455. package/build-module/components/global-styles/dimensions-panel.js +21 -5
  456. package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
  457. package/build-module/components/global-styles/filters-panel.js +2 -2
  458. package/build-module/components/global-styles/filters-panel.js.map +1 -1
  459. package/build-module/components/global-styles/hooks.js +3 -2
  460. package/build-module/components/global-styles/hooks.js.map +1 -1
  461. package/build-module/components/global-styles/shadow-panel-components.js +4 -4
  462. package/build-module/components/global-styles/shadow-panel-components.js.map +1 -1
  463. package/build-module/components/global-styles/typography-panel.js +24 -24
  464. package/build-module/components/global-styles/typography-panel.js.map +1 -1
  465. package/build-module/components/global-styles/use-global-styles-output.js +149 -132
  466. package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
  467. package/build-module/components/global-styles/utils.js +44 -0
  468. package/build-module/components/global-styles/utils.js.map +1 -1
  469. package/build-module/components/grid-visualizer/grid-item-resizer.js +141 -24
  470. package/build-module/components/grid-visualizer/grid-item-resizer.js.map +1 -1
  471. package/build-module/components/grid-visualizer/grid-visualizer.js +12 -6
  472. package/build-module/components/grid-visualizer/grid-visualizer.js.map +1 -1
  473. package/build-module/components/iframe/index.js +70 -31
  474. package/build-module/components/iframe/index.js.map +1 -1
  475. package/build-module/components/image-editor/aspect-ratio-dropdown.js +52 -36
  476. package/build-module/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
  477. package/build-module/components/image-editor/cropper.js +2 -2
  478. package/build-module/components/image-editor/cropper.js.map +1 -1
  479. package/build-module/components/image-editor/index.js +1 -1
  480. package/build-module/components/image-editor/index.js.map +1 -1
  481. package/build-module/components/index.js +1 -0
  482. package/build-module/components/index.js.map +1 -1
  483. package/build-module/components/inner-blocks/button-block-appender.js +2 -2
  484. package/build-module/components/inner-blocks/button-block-appender.js.map +1 -1
  485. package/build-module/components/inner-blocks/index.js +25 -10
  486. package/build-module/components/inner-blocks/index.js.map +1 -1
  487. package/build-module/components/inserter/block-patterns-explorer/pattern-list.js +1 -1
  488. package/build-module/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
  489. package/build-module/components/inserter/block-patterns-tab/index.js +21 -31
  490. package/build-module/components/inserter/block-patterns-tab/index.js.map +1 -1
  491. package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js +1 -1
  492. package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js.map +1 -1
  493. package/build-module/components/inserter/block-types-tab.js +10 -4
  494. package/build-module/components/inserter/block-types-tab.js.map +1 -1
  495. package/build-module/components/inserter/category-tabs/index.js +49 -0
  496. package/build-module/components/inserter/category-tabs/index.js.map +1 -0
  497. package/build-module/components/inserter/hooks/use-insertion-point.js +11 -2
  498. package/build-module/components/inserter/hooks/use-insertion-point.js.map +1 -1
  499. package/build-module/components/inserter/hooks/use-patterns-state.js +12 -5
  500. package/build-module/components/inserter/hooks/use-patterns-state.js.map +1 -1
  501. package/build-module/components/inserter/index.js +2 -2
  502. package/build-module/components/inserter/index.js.map +1 -1
  503. package/build-module/components/inserter/library.js +8 -2
  504. package/build-module/components/inserter/library.js.map +1 -1
  505. package/build-module/components/inserter/media-tab/index.js +1 -1
  506. package/build-module/components/inserter/media-tab/index.js.map +1 -1
  507. package/build-module/components/inserter/media-tab/media-panel.js +0 -24
  508. package/build-module/components/inserter/media-tab/media-panel.js.map +1 -1
  509. package/build-module/components/inserter/media-tab/media-preview.js +15 -5
  510. package/build-module/components/inserter/media-tab/media-preview.js.map +1 -1
  511. package/build-module/components/inserter/media-tab/media-tab.js +17 -31
  512. package/build-module/components/inserter/media-tab/media-tab.js.map +1 -1
  513. package/build-module/components/inserter/menu.js +117 -111
  514. package/build-module/components/inserter/menu.js.map +1 -1
  515. package/build-module/components/inserter/quick-inserter.js +2 -2
  516. package/build-module/components/inserter/quick-inserter.js.map +1 -1
  517. package/build-module/components/inserter/tabs.js +24 -12
  518. package/build-module/components/inserter/tabs.js.map +1 -1
  519. package/build-module/components/inserter-list-item/index.js +3 -3
  520. package/build-module/components/inserter-list-item/index.js.map +1 -1
  521. package/build-module/components/keyboard-shortcuts/index.js +9 -0
  522. package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
  523. package/build-module/components/line-height-control/index.js +6 -2
  524. package/build-module/components/line-height-control/index.js.map +1 -1
  525. package/build-module/components/link-control/index.js +2 -2
  526. package/build-module/components/link-control/index.js.map +1 -1
  527. package/build-module/components/link-control/link-preview.js +3 -3
  528. package/build-module/components/link-control/link-preview.js.map +1 -1
  529. package/build-module/components/link-control/search-item.js +9 -3
  530. package/build-module/components/link-control/search-item.js.map +1 -1
  531. package/build-module/components/link-control/search-results.js +2 -2
  532. package/build-module/components/link-control/search-results.js.map +1 -1
  533. package/build-module/components/list-view/block-contents.js +2 -2
  534. package/build-module/components/list-view/block-contents.js.map +1 -1
  535. package/build-module/components/list-view/block-select-button.js +17 -174
  536. package/build-module/components/list-view/block-select-button.js.map +1 -1
  537. package/build-module/components/list-view/block.js +198 -23
  538. package/build-module/components/list-view/block.js.map +1 -1
  539. package/build-module/components/list-view/drop-indicator.js +3 -3
  540. package/build-module/components/list-view/drop-indicator.js.map +1 -1
  541. package/build-module/components/list-view/index.js +3 -3
  542. package/build-module/components/list-view/index.js.map +1 -1
  543. package/build-module/components/list-view/leaf.js +2 -2
  544. package/build-module/components/list-view/leaf.js.map +1 -1
  545. package/build-module/components/list-view/use-list-view-drop-zone.js +1 -1
  546. package/build-module/components/list-view/use-list-view-drop-zone.js.map +1 -1
  547. package/build-module/components/list-view/utils.js +3 -1
  548. package/build-module/components/list-view/utils.js.map +1 -1
  549. package/build-module/components/media-placeholder/index.js +7 -7
  550. package/build-module/components/media-placeholder/index.js.map +1 -1
  551. package/build-module/components/media-replace-flow/index.js +2 -2
  552. package/build-module/components/media-replace-flow/index.js.map +1 -1
  553. package/build-module/components/navigable-toolbar/index.js +3 -1
  554. package/build-module/components/navigable-toolbar/index.js.map +1 -1
  555. package/build-module/components/plain-text/index.js +2 -2
  556. package/build-module/components/plain-text/index.js.map +1 -1
  557. package/build-module/components/provider/block-refs-provider.js +3 -4
  558. package/build-module/components/provider/block-refs-provider.js.map +1 -1
  559. package/build-module/components/provider/use-block-sync.js +10 -1
  560. package/build-module/components/provider/use-block-sync.js.map +1 -1
  561. package/build-module/components/responsive-block-control/index.js +2 -2
  562. package/build-module/components/responsive-block-control/index.js.map +1 -1
  563. package/build-module/components/rich-text/event-listeners/before-input-rules.js +86 -0
  564. package/build-module/components/rich-text/event-listeners/before-input-rules.js.map +1 -0
  565. package/build-module/components/rich-text/event-listeners/delete.js +51 -0
  566. package/build-module/components/rich-text/event-listeners/delete.js.map +1 -0
  567. package/build-module/components/rich-text/event-listeners/enter.js +82 -0
  568. package/build-module/components/rich-text/event-listeners/enter.js.map +1 -0
  569. package/build-module/components/rich-text/event-listeners/firefox-compat.js +29 -0
  570. package/build-module/components/rich-text/event-listeners/firefox-compat.js.map +1 -0
  571. package/build-module/components/rich-text/event-listeners/index.js +36 -0
  572. package/build-module/components/rich-text/event-listeners/index.js.map +1 -0
  573. package/build-module/components/rich-text/event-listeners/input-events.js +15 -0
  574. package/build-module/components/rich-text/event-listeners/input-events.js.map +1 -0
  575. package/build-module/components/rich-text/event-listeners/input-rules.js +127 -0
  576. package/build-module/components/rich-text/event-listeners/input-rules.js.map +1 -0
  577. package/build-module/components/rich-text/event-listeners/insert-replacement-text.js +27 -0
  578. package/build-module/components/rich-text/event-listeners/insert-replacement-text.js.map +1 -0
  579. package/build-module/components/rich-text/event-listeners/paste-handler.js +122 -0
  580. package/build-module/components/rich-text/event-listeners/paste-handler.js.map +1 -0
  581. package/build-module/components/rich-text/event-listeners/remove-browser-shortcuts.js +21 -0
  582. package/build-module/components/rich-text/event-listeners/remove-browser-shortcuts.js.map +1 -0
  583. package/build-module/components/rich-text/event-listeners/shortcuts.js +15 -0
  584. package/build-module/components/rich-text/event-listeners/shortcuts.js.map +1 -0
  585. package/build-module/components/rich-text/event-listeners/undo-automatic-change.js +45 -0
  586. package/build-module/components/rich-text/event-listeners/undo-automatic-change.js.map +1 -0
  587. package/build-module/components/rich-text/format-toolbar/index.js +2 -2
  588. package/build-module/components/rich-text/format-toolbar/index.js.map +1 -1
  589. package/build-module/components/rich-text/index.js +21 -34
  590. package/build-module/components/rich-text/index.js.map +1 -1
  591. package/build-module/components/rich-text/index.native.js +15 -5
  592. package/build-module/components/rich-text/index.native.js.map +1 -1
  593. package/build-module/components/rich-text/multiline.js +37 -5
  594. package/build-module/components/rich-text/multiline.js.map +1 -1
  595. package/build-module/components/rich-text/native/index.native.js +12 -0
  596. package/build-module/components/rich-text/native/index.native.js.map +1 -1
  597. package/build-module/components/rich-text/use-format-types.js +8 -4
  598. package/build-module/components/rich-text/use-format-types.js.map +1 -1
  599. package/build-module/components/segmented-text-control/index.js +55 -0
  600. package/build-module/components/segmented-text-control/index.js.map +1 -0
  601. package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js +16 -2
  602. package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
  603. package/build-module/components/text-alignment-control/index.js +68 -0
  604. package/build-module/components/text-alignment-control/index.js.map +1 -0
  605. package/build-module/components/text-decoration-control/index.js +22 -26
  606. package/build-module/components/text-decoration-control/index.js.map +1 -1
  607. package/build-module/components/text-transform-control/index.js +19 -23
  608. package/build-module/components/text-transform-control/index.js.map +1 -1
  609. package/build-module/components/url-input/index.js +4 -4
  610. package/build-module/components/url-input/index.js.map +1 -1
  611. package/build-module/components/url-popover/link-editor.js +2 -2
  612. package/build-module/components/url-popover/link-editor.js.map +1 -1
  613. package/build-module/components/url-popover/link-viewer-url.js +2 -2
  614. package/build-module/components/url-popover/link-viewer-url.js.map +1 -1
  615. package/build-module/components/url-popover/link-viewer.js +2 -2
  616. package/build-module/components/url-popover/link-viewer.js.map +1 -1
  617. package/build-module/components/use-block-display-information/index.js +9 -3
  618. package/build-module/components/use-block-display-information/index.js.map +1 -1
  619. package/build-module/components/use-on-block-drop/index.js +3 -1
  620. package/build-module/components/use-on-block-drop/index.js.map +1 -1
  621. package/build-module/components/warning/index.js +2 -2
  622. package/build-module/components/warning/index.js.map +1 -1
  623. package/build-module/components/writing-flow/index.js +2 -2
  624. package/build-module/components/writing-flow/index.js.map +1 -1
  625. package/build-module/components/writing-flow/use-clipboard-handler.js +78 -31
  626. package/build-module/components/writing-flow/use-clipboard-handler.js.map +1 -1
  627. package/build-module/components/writing-flow/use-drag-selection.js +3 -1
  628. package/build-module/components/writing-flow/use-drag-selection.js.map +1 -1
  629. package/build-module/components/writing-flow/use-input.js +45 -3
  630. package/build-module/components/writing-flow/use-input.js.map +1 -1
  631. package/build-module/components/writing-flow/use-tab-nav.js +9 -2
  632. package/build-module/components/writing-flow/use-tab-nav.js.map +1 -1
  633. package/build-module/components/writing-mode-control/index.js +17 -21
  634. package/build-module/components/writing-mode-control/index.js.map +1 -1
  635. package/build-module/hooks/align.js +2 -2
  636. package/build-module/hooks/align.js.map +1 -1
  637. package/build-module/hooks/background.js +1 -1
  638. package/build-module/hooks/background.js.map +1 -1
  639. package/build-module/hooks/border.js +3 -3
  640. package/build-module/hooks/border.js.map +1 -1
  641. package/build-module/hooks/color.js +3 -3
  642. package/build-module/hooks/color.js.map +1 -1
  643. package/build-module/hooks/content-lock-ui.js +5 -28
  644. package/build-module/hooks/content-lock-ui.js.map +1 -1
  645. package/build-module/hooks/custom-class-name.js +2 -2
  646. package/build-module/hooks/custom-class-name.js.map +1 -1
  647. package/build-module/hooks/custom-class-name.native.js +2 -2
  648. package/build-module/hooks/custom-class-name.native.js.map +1 -1
  649. package/build-module/hooks/dimensions.js +2 -2
  650. package/build-module/hooks/dimensions.js.map +1 -1
  651. package/build-module/hooks/duotone.js +3 -1
  652. package/build-module/hooks/duotone.js.map +1 -1
  653. package/build-module/hooks/layout-child.js +16 -8
  654. package/build-module/hooks/layout-child.js.map +1 -1
  655. package/build-module/hooks/layout.js +2 -2
  656. package/build-module/hooks/layout.js.map +1 -1
  657. package/build-module/hooks/position.js +2 -2
  658. package/build-module/hooks/position.js.map +1 -1
  659. package/build-module/hooks/text-align.js +3 -3
  660. package/build-module/hooks/text-align.js.map +1 -1
  661. package/build-module/hooks/use-bindings-attributes.js +39 -13
  662. package/build-module/hooks/use-bindings-attributes.js.map +1 -1
  663. package/build-module/hooks/use-color-props.js +2 -2
  664. package/build-module/hooks/use-color-props.js.map +1 -1
  665. package/build-module/hooks/use-typography-props.js +2 -2
  666. package/build-module/hooks/use-typography-props.js.map +1 -1
  667. package/build-module/hooks/utils.js +13 -8
  668. package/build-module/hooks/utils.js.map +1 -1
  669. package/build-module/layouts/grid.js +7 -6
  670. package/build-module/layouts/grid.js.map +1 -1
  671. package/build-module/private-apis.js +9 -4
  672. package/build-module/private-apis.js.map +1 -1
  673. package/build-module/store/actions.js +145 -27
  674. package/build-module/store/actions.js.map +1 -1
  675. package/build-module/store/private-actions.js +24 -0
  676. package/build-module/store/private-actions.js.map +1 -1
  677. package/build-module/store/private-keys.js +1 -0
  678. package/build-module/store/private-keys.js.map +1 -1
  679. package/build-module/store/private-selectors.js +32 -5
  680. package/build-module/store/private-selectors.js.map +1 -1
  681. package/build-module/store/reducer.js +11 -8
  682. package/build-module/store/reducer.js.map +1 -1
  683. package/build-module/store/selectors.js +25 -8
  684. package/build-module/store/selectors.js.map +1 -1
  685. package/build-module/utils/object.js +16 -0
  686. package/build-module/utils/object.js.map +1 -1
  687. package/build-module/utils/order-inserter-block-items.js +6 -2
  688. package/build-module/utils/order-inserter-block-items.js.map +1 -1
  689. package/build-module/utils/pasting.js +6 -2
  690. package/build-module/utils/pasting.js.map +1 -1
  691. package/build-module/utils/selection.js +7 -0
  692. package/build-module/utils/selection.js.map +1 -1
  693. package/build-module/utils/transform-styles/index.js +12 -7
  694. package/build-module/utils/transform-styles/index.js.map +1 -1
  695. package/build-style/content-rtl.css +124 -158
  696. package/build-style/content.css +124 -158
  697. package/build-style/style-rtl.css +114 -203
  698. package/build-style/style.css +114 -203
  699. package/build-types/components/block-context/index.d.ts +1 -1
  700. package/build-types/components/block-context/index.d.ts.map +1 -1
  701. package/package.json +32 -32
  702. package/src/components/alignment-control/ui.js +3 -1
  703. package/src/components/block-actions/index.js +5 -1
  704. package/src/components/block-alignment-control/ui.js +2 -2
  705. package/src/components/block-bindings-toolbar-indicator/style.scss +1 -4
  706. package/src/components/block-canvas/style.scss +1 -3
  707. package/src/components/block-card/index.js +2 -2
  708. package/src/components/block-compare/index.js +2 -2
  709. package/src/components/block-content-overlay/content.scss +4 -37
  710. package/src/components/block-edit/edit.js +2 -2
  711. package/src/components/block-icon/index.js +2 -2
  712. package/src/components/block-list/block.js +6 -17
  713. package/src/components/block-list/block.native.js +2 -2
  714. package/src/components/block-list/content.scss +53 -72
  715. package/src/components/block-list/index.js +6 -6
  716. package/src/components/block-list/index.native.js +1 -6
  717. package/src/components/block-list/use-block-props/index.js +16 -6
  718. package/src/components/block-list/use-block-props/use-block-refs.js +17 -57
  719. package/src/components/block-list/use-block-props/use-is-hovered.js +11 -16
  720. package/src/components/block-list/use-block-props/use-scroll-into-view.js +38 -0
  721. package/src/components/block-list-appender/index.js +2 -2
  722. package/src/components/block-mover/button.js +2 -2
  723. package/src/components/block-mover/index.js +2 -2
  724. package/src/components/block-mover/index.native.js +3 -1
  725. package/src/components/block-patterns-list/index.js +29 -4
  726. package/src/components/block-patterns-list/style.scss +1 -3
  727. package/src/components/block-popover/README.md +1 -1
  728. package/src/components/block-popover/cover.js +22 -7
  729. package/src/components/block-popover/inbetween.js +2 -2
  730. package/src/components/block-popover/index.js +24 -6
  731. package/src/components/block-preview/index.js +2 -2
  732. package/src/components/block-preview/style.scss +13 -15
  733. package/src/components/block-settings-menu/block-settings-dropdown.js +15 -57
  734. package/src/components/block-settings-menu-controls/index.js +25 -16
  735. package/src/components/block-styles/index.js +2 -2
  736. package/src/components/block-switcher/pattern-transformations-menu.js +3 -1
  737. package/src/components/block-switcher/use-transformed-patterns.js +6 -2
  738. package/src/components/block-switcher/utils.js +14 -5
  739. package/src/components/block-toolbar/index.js +3 -3
  740. package/src/components/block-toolbar/style.scss +8 -11
  741. package/src/components/block-toolbar/use-has-block-toolbar.js +21 -16
  742. package/src/components/block-tools/block-selection-button.js +2 -2
  743. package/src/components/block-tools/block-toolbar-breadcrumb.js +5 -5
  744. package/src/components/block-tools/block-toolbar-popover.js +4 -7
  745. package/src/components/block-tools/empty-block-inserter.js +2 -2
  746. package/src/components/block-tools/index.js +27 -4
  747. package/src/components/block-tools/insertion-point.js +4 -4
  748. package/src/components/block-tools/style.scss +8 -0
  749. package/src/components/block-tools/use-show-block-tools.js +36 -48
  750. package/src/components/block-tools/zoom-out-mode-inserters.js +74 -18
  751. package/src/components/block-variation-picker/content.scss +22 -72
  752. package/src/components/block-variation-picker/index.js +5 -4
  753. package/src/components/block-variation-transforms/index.js +3 -1
  754. package/src/components/button-block-appender/index.js +2 -2
  755. package/src/components/child-layout-control/index.js +14 -2
  756. package/src/components/colors-gradients/control.js +3 -3
  757. package/src/components/colors-gradients/dropdown.js +2 -2
  758. package/src/components/colors-gradients/panel-color-gradient-settings.js +2 -2
  759. package/src/components/colors-gradients/test/control.js +3 -3
  760. package/src/components/convert-to-group-buttons/index.js +10 -1
  761. package/src/components/default-block-appender/index.js +2 -2
  762. package/src/components/dimensions-tool/aspect-ratio-tool.js +40 -67
  763. package/src/components/dimensions-tool/test/index.js +10 -0
  764. package/src/components/editable-text/README.md +0 -4
  765. package/src/components/floating-toolbar/index.native.js +5 -2
  766. package/src/components/global-styles/background-panel.js +4 -6
  767. package/src/components/global-styles/color-panel.js +6 -4
  768. package/src/components/global-styles/dimensions-panel.js +22 -5
  769. package/src/components/global-styles/filters-panel.js +2 -2
  770. package/src/components/global-styles/hooks.js +2 -0
  771. package/src/components/global-styles/shadow-panel-components.js +6 -9
  772. package/src/components/global-styles/test/get-global-styles-changes.js +0 -2
  773. package/src/components/global-styles/test/use-global-styles-output.js +5 -5
  774. package/src/components/global-styles/test/utils.js +21 -0
  775. package/src/components/global-styles/typography-panel.js +27 -23
  776. package/src/components/global-styles/use-global-styles-output.js +211 -187
  777. package/src/components/global-styles/utils.js +55 -0
  778. package/src/components/grid-visualizer/grid-item-resizer.js +169 -40
  779. package/src/components/grid-visualizer/grid-visualizer.js +19 -6
  780. package/src/components/iframe/content.scss +63 -0
  781. package/src/components/iframe/index.js +119 -39
  782. package/src/components/image-editor/aspect-ratio-dropdown.js +91 -59
  783. package/src/components/image-editor/cropper.js +2 -2
  784. package/src/components/image-editor/index.js +1 -1
  785. package/src/components/image-editor/test/index.js +22 -0
  786. package/src/components/index.js +1 -0
  787. package/src/components/inner-blocks/button-block-appender.js +2 -2
  788. package/src/components/inner-blocks/index.js +24 -9
  789. package/src/components/inserter/block-patterns-explorer/pattern-list.js +2 -1
  790. package/src/components/inserter/block-patterns-tab/index.js +30 -64
  791. package/src/components/inserter/block-patterns-tab/pattern-category-previews.js +2 -1
  792. package/src/components/inserter/block-types-tab.js +12 -9
  793. package/src/components/inserter/category-tabs/index.js +74 -0
  794. package/src/components/inserter/hooks/use-insertion-point.js +15 -1
  795. package/src/components/inserter/hooks/use-patterns-state.js +18 -5
  796. package/src/components/inserter/index.js +4 -5
  797. package/src/components/inserter/library.js +6 -0
  798. package/src/components/inserter/media-tab/index.js +1 -1
  799. package/src/components/inserter/media-tab/media-panel.js +0 -22
  800. package/src/components/inserter/media-tab/media-preview.js +17 -9
  801. package/src/components/inserter/media-tab/media-tab.js +44 -83
  802. package/src/components/inserter/menu.js +168 -140
  803. package/src/components/inserter/quick-inserter.js +2 -2
  804. package/src/components/inserter/style.scss +96 -178
  805. package/src/components/inserter/tabs.js +33 -27
  806. package/src/components/inserter-list-item/index.js +3 -3
  807. package/src/components/keyboard-shortcuts/index.js +12 -0
  808. package/src/components/line-height-control/index.js +6 -2
  809. package/src/components/line-height-control/test/index.js +16 -14
  810. package/src/components/link-control/index.js +2 -2
  811. package/src/components/link-control/link-preview.js +3 -3
  812. package/src/components/link-control/search-item.js +9 -3
  813. package/src/components/link-control/search-results.js +2 -2
  814. package/src/components/list-view/block-contents.js +2 -2
  815. package/src/components/list-view/block-select-button.js +85 -267
  816. package/src/components/list-view/block.js +240 -26
  817. package/src/components/list-view/drop-indicator.js +3 -3
  818. package/src/components/list-view/index.js +3 -3
  819. package/src/components/list-view/leaf.js +2 -5
  820. package/src/components/list-view/style.scss +20 -28
  821. package/src/components/list-view/use-list-view-drop-zone.js +1 -1
  822. package/src/components/list-view/utils.js +3 -1
  823. package/src/components/media-placeholder/content.scss +0 -11
  824. package/src/components/media-placeholder/index.js +7 -7
  825. package/src/components/media-replace-flow/index.js +2 -2
  826. package/src/components/navigable-toolbar/index.js +3 -1
  827. package/src/components/plain-text/index.js +2 -2
  828. package/src/components/provider/block-refs-provider.js +3 -8
  829. package/src/components/provider/test/use-block-sync.js +7 -0
  830. package/src/components/provider/use-block-sync.js +10 -1
  831. package/src/components/responsive-block-control/index.js +2 -2
  832. package/src/components/rich-text/README.md +0 -8
  833. package/src/components/rich-text/event-listeners/before-input-rules.js +92 -0
  834. package/src/components/rich-text/event-listeners/delete.js +53 -0
  835. package/src/components/rich-text/event-listeners/enter.js +84 -0
  836. package/src/components/rich-text/event-listeners/firefox-compat.js +31 -0
  837. package/src/components/rich-text/event-listeners/index.js +56 -0
  838. package/src/components/rich-text/event-listeners/input-events.js +13 -0
  839. package/src/components/rich-text/event-listeners/input-rules.js +146 -0
  840. package/src/components/rich-text/event-listeners/insert-replacement-text.js +28 -0
  841. package/src/components/rich-text/event-listeners/paste-handler.js +132 -0
  842. package/src/components/rich-text/event-listeners/remove-browser-shortcuts.js +24 -0
  843. package/src/components/rich-text/event-listeners/shortcuts.js +13 -0
  844. package/src/components/rich-text/event-listeners/undo-automatic-change.js +45 -0
  845. package/src/components/rich-text/format-toolbar/index.js +2 -2
  846. package/src/components/rich-text/index.js +17 -37
  847. package/src/components/rich-text/index.native.js +13 -2
  848. package/src/components/rich-text/multiline.js +37 -5
  849. package/src/components/rich-text/native/index.native.js +11 -0
  850. package/src/components/rich-text/use-format-types.js +6 -2
  851. package/src/components/segmented-text-control/index.js +63 -0
  852. package/src/components/{writing-mode-control → segmented-text-control}/style.scss +2 -5
  853. package/src/components/spacing-sizes-control/input-controls/spacing-input-control.js +16 -1
  854. package/src/components/text-alignment-control/index.js +91 -0
  855. package/src/components/text-alignment-control/stories/index.story.js +39 -0
  856. package/src/components/text-decoration-control/index.js +22 -35
  857. package/src/components/text-transform-control/index.js +19 -32
  858. package/src/components/url-input/index.js +4 -4
  859. package/src/components/url-popover/link-editor.js +2 -2
  860. package/src/components/url-popover/link-viewer-url.js +2 -2
  861. package/src/components/url-popover/link-viewer.js +2 -2
  862. package/src/components/use-block-display-information/index.js +9 -3
  863. package/src/components/use-on-block-drop/index.js +3 -1
  864. package/src/components/warning/index.js +2 -2
  865. package/src/components/writing-flow/index.js +2 -2
  866. package/src/components/writing-flow/use-clipboard-handler.js +107 -47
  867. package/src/components/writing-flow/use-drag-selection.js +3 -1
  868. package/src/components/writing-flow/use-input.js +75 -1
  869. package/src/components/writing-flow/use-tab-nav.js +13 -2
  870. package/src/components/writing-mode-control/index.js +17 -33
  871. package/src/content.scss +1 -0
  872. package/src/hooks/align.js +2 -2
  873. package/src/hooks/background.js +1 -1
  874. package/src/hooks/border.js +3 -3
  875. package/src/hooks/color.js +12 -19
  876. package/src/hooks/color.scss +1 -0
  877. package/src/hooks/content-lock-ui.js +16 -33
  878. package/src/hooks/custom-class-name.js +2 -2
  879. package/src/hooks/custom-class-name.native.js +2 -2
  880. package/src/hooks/dimensions.js +2 -2
  881. package/src/hooks/duotone.js +3 -1
  882. package/src/hooks/layout-child.js +34 -20
  883. package/src/hooks/layout.js +2 -2
  884. package/src/hooks/position.js +2 -2
  885. package/src/hooks/text-align.js +3 -3
  886. package/src/hooks/use-bindings-attributes.js +48 -16
  887. package/src/hooks/use-color-props.js +2 -2
  888. package/src/hooks/use-typography-props.js +2 -2
  889. package/src/hooks/utils.js +18 -4
  890. package/src/layouts/grid.js +3 -7
  891. package/src/private-apis.js +8 -2
  892. package/src/store/actions.js +233 -54
  893. package/src/store/private-actions.js +24 -0
  894. package/src/store/private-keys.js +1 -0
  895. package/src/store/private-selectors.js +43 -4
  896. package/src/store/reducer.js +13 -23
  897. package/src/store/selectors.js +24 -9
  898. package/src/style.scss +1 -2
  899. package/src/utils/object.js +16 -0
  900. package/src/utils/order-inserter-block-items.js +6 -2
  901. package/src/utils/pasting.js +6 -2
  902. package/src/utils/selection.js +8 -0
  903. package/src/utils/test/__snapshots__/transform-styles.js.snap +6 -0
  904. package/src/utils/test/transform-styles.js +14 -0
  905. package/src/utils/transform-styles/index.js +12 -9
  906. package/tsconfig.tsbuildinfo +1 -1
  907. package/build/components/block-list/use-block-props/use-block-moving-mode-class-names.js +0 -54
  908. package/build/components/block-list/use-block-props/use-block-moving-mode-class-names.js.map +0 -1
  909. package/build/components/rich-text/split-value.js +0 -81
  910. package/build/components/rich-text/split-value.js.map +0 -1
  911. package/build/components/rich-text/use-before-input-rules.js +0 -98
  912. package/build/components/rich-text/use-before-input-rules.js.map +0 -1
  913. package/build/components/rich-text/use-delete.js +0 -64
  914. package/build/components/rich-text/use-delete.js.map +0 -1
  915. package/build/components/rich-text/use-enter.js +0 -109
  916. package/build/components/rich-text/use-enter.js.map +0 -1
  917. package/build/components/rich-text/use-firefox-compat.js +0 -44
  918. package/build/components/rich-text/use-firefox-compat.js.map +0 -1
  919. package/build/components/rich-text/use-input-events.js +0 -25
  920. package/build/components/rich-text/use-input-events.js.map +0 -1
  921. package/build/components/rich-text/use-input-rules.js +0 -139
  922. package/build/components/rich-text/use-input-rules.js.map +0 -1
  923. package/build/components/rich-text/use-insert-replacement-text.js +0 -38
  924. package/build/components/rich-text/use-insert-replacement-text.js.map +0 -1
  925. package/build/components/rich-text/use-paste-handler.js +0 -158
  926. package/build/components/rich-text/use-paste-handler.js.map +0 -1
  927. package/build/components/rich-text/use-remove-browser-shortcuts.js +0 -32
  928. package/build/components/rich-text/use-remove-browser-shortcuts.js.map +0 -1
  929. package/build/components/rich-text/use-shortcuts.js +0 -25
  930. package/build/components/rich-text/use-shortcuts.js.map +0 -1
  931. package/build/components/rich-text/use-undo-automatic-change.js +0 -53
  932. package/build/components/rich-text/use-undo-automatic-change.js.map +0 -1
  933. package/build-module/components/block-list/use-block-props/use-block-moving-mode-class-names.js +0 -47
  934. package/build-module/components/block-list/use-block-props/use-block-moving-mode-class-names.js.map +0 -1
  935. package/build-module/components/rich-text/split-value.js +0 -75
  936. package/build-module/components/rich-text/split-value.js.map +0 -1
  937. package/build-module/components/rich-text/use-before-input-rules.js +0 -92
  938. package/build-module/components/rich-text/use-before-input-rules.js.map +0 -1
  939. package/build-module/components/rich-text/use-delete.js +0 -57
  940. package/build-module/components/rich-text/use-delete.js.map +0 -1
  941. package/build-module/components/rich-text/use-enter.js +0 -102
  942. package/build-module/components/rich-text/use-enter.js.map +0 -1
  943. package/build-module/components/rich-text/use-firefox-compat.js +0 -37
  944. package/build-module/components/rich-text/use-firefox-compat.js.map +0 -1
  945. package/build-module/components/rich-text/use-input-events.js +0 -18
  946. package/build-module/components/rich-text/use-input-events.js.map +0 -1
  947. package/build-module/components/rich-text/use-input-rules.js +0 -132
  948. package/build-module/components/rich-text/use-input-rules.js.map +0 -1
  949. package/build-module/components/rich-text/use-insert-replacement-text.js +0 -32
  950. package/build-module/components/rich-text/use-insert-replacement-text.js.map +0 -1
  951. package/build-module/components/rich-text/use-paste-handler.js +0 -152
  952. package/build-module/components/rich-text/use-paste-handler.js.map +0 -1
  953. package/build-module/components/rich-text/use-remove-browser-shortcuts.js +0 -26
  954. package/build-module/components/rich-text/use-remove-browser-shortcuts.js.map +0 -1
  955. package/build-module/components/rich-text/use-shortcuts.js +0 -18
  956. package/build-module/components/rich-text/use-shortcuts.js.map +0 -1
  957. package/build-module/components/rich-text/use-undo-automatic-change.js +0 -46
  958. package/build-module/components/rich-text/use-undo-automatic-change.js.map +0 -1
  959. package/src/components/block-list/use-block-props/use-block-moving-mode-class-names.js +0 -55
  960. package/src/components/rich-text/split-value.js +0 -64
  961. package/src/components/rich-text/use-before-input-rules.js +0 -99
  962. package/src/components/rich-text/use-delete.js +0 -59
  963. package/src/components/rich-text/use-enter.js +0 -110
  964. package/src/components/rich-text/use-firefox-compat.js +0 -39
  965. package/src/components/rich-text/use-input-events.js +0 -19
  966. package/src/components/rich-text/use-input-rules.js +0 -150
  967. package/src/components/rich-text/use-insert-replacement-text.js +0 -31
  968. package/src/components/rich-text/use-paste-handler.js +0 -180
  969. package/src/components/rich-text/use-remove-browser-shortcuts.js +0 -29
  970. package/src/components/rich-text/use-shortcuts.js +0 -19
  971. package/src/components/rich-text/use-undo-automatic-change.js +0 -46
  972. package/src/components/text-decoration-control/style.scss +0 -18
  973. package/src/components/text-transform-control/style.scss +0 -18
@@ -1 +1 @@
1
- {"version":3,"names":["classnames","Platform","useRef","useCallback","forwardRef","useDispatch","useSelect","pasteHandler","children","childrenSource","getBlockTransforms","findTransform","isUnmodifiedDefaultBlock","useInstanceId","useMergeRefs","__unstableCreateElement","isEmpty","insert","remove","create","split","toHTMLString","slice","isURL","Autocomplete","useBlockEditContext","RemoveBrowserShortcuts","filePasteHandler","FormatToolbarContainer","store","blockEditorStore","addActiveFormats","getAllowedFormats","createLinkInParagraph","EmbedHandlerPicker","Content","RichText","withDeprecations","classes","RichTextWrapper","tagName","start","reversed","value","originalValue","onChange","originalOnChange","isSelected","originalIsSelected","inlineToolbar","wrapperClassName","autocompleters","onReplace","placeholder","allowedFormats","withoutInteractiveFormatting","onRemove","onMerge","onSplit","__unstableOnSplitAtEnd","onSplitAtEnd","__unstableOnSplitMiddle","onSplitMiddle","__unstableOnSplitAtDoubleLineEnd","onSplitAtDoubleLineEnd","identifier","preserveWhiteSpace","__unstablePastePlainText","pastePlainText","__unstableEmbedURLOnPaste","__unstableDisableFormats","disableFormats","disableLineBreaks","unstableOnFocus","__unstableAllowPrefixTransformations","__unstableMobileNoFocusOnMount","deleteEnter","placeholderTextColor","textAlign","selectionColor","tagsToEliminate","disableEditingMenu","fontSize","fontFamily","fontWeight","fontStyle","minWidth","maxWidth","onBlur","disableSuggestions","disableAutocorrection","containerWidth","onEnter","onCustomEnter","props","providedRef","instanceId","fallbackRef","clientId","blockIsSelected","embedHandlerPickerRef","selector","select","getSelectionStart","getSelectionEnd","getSettings","didAutomaticChange","getBlock","isMultiSelecting","hasMultiSelection","selectionStart","selectionEnd","__experimentalUndo","undo","undefined","attributeKey","extraProps","OS","block","shouldBlurOnUnmount","offset","disabled","__unstableMarkLastChangeAsPersistent","enterFormattedText","exitFormattedText","selectionChange","__unstableMarkAutomaticChange","adjustedAllowedFormats","hasFormats","length","adjustedValue","adjustedOnChange","Array","isArray","toHTML","newValue","fromDOM","document","childNodes","onSelectionChange","selectionChangeStart","selectionChangeEnd","onDelete","isReverse","splitValue","record","pastedBlocks","blocks","before","after","hasPastedBlocks","lastPastedBlockIndex","isAfterOriginal","push","indexToSelect","initialPosition","shiftKey","canSplit","transforms","filter","type","transformation","item","regExp","test","text","transform","content","splitStart","end","splitEnd","canSplitAtEnd","onPaste","html","plainText","isInternal","files","activeFormats","pastedValue","HTML","mode","window","console","log","isPastedURL","trim","presentEmbedHandlerPicker","current","presentPicker","createEmbed","createLink","valueToInsert","canPasteEmbed","name","source","inputRule","valueToFormat","startPosition","characterBefore","trimmedTextBefore","prefixTransforms","prefix","mergedRef","createElement","nativeEditorRef","__unstableIsSelected","__unstableInputRule","__unstableOnEnterFormattedText","__unstableOnExitFormattedText","__unstableOnCreateUndoLevel","__unstableDidAutomaticChange","__unstableUndo","id","style","nestedIsSelected","onFocus","editableProps","editableTagName","TagName","Fragment","inline","anchorRef","completers","contentRef","listBoxId","activeId","onKeyDown","className","event","ref","PrivateRichText","defaultProps","format","Raw","RichTextShortcut","RichTextToolbarButton","__unstableRichTextInputEvent"],"sources":["@wordpress/block-editor/src/components/rich-text/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { Platform, useRef, useCallback, forwardRef } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport {\n\tpasteHandler,\n\tchildren as childrenSource,\n\tgetBlockTransforms,\n\tfindTransform,\n\tisUnmodifiedDefaultBlock,\n} from '@wordpress/blocks';\nimport { useInstanceId, useMergeRefs } from '@wordpress/compose';\nimport {\n\t__unstableCreateElement,\n\tisEmpty,\n\tinsert,\n\tremove,\n\tcreate,\n\tsplit,\n\ttoHTMLString,\n\tslice,\n} from '@wordpress/rich-text';\nimport { isURL } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport Autocomplete from '../autocomplete';\nimport { useBlockEditContext } from '../block-edit';\nimport { RemoveBrowserShortcuts } from './remove-browser-shortcuts';\nimport { filePasteHandler } from './file-paste-handler';\nimport FormatToolbarContainer from './format-toolbar-container';\nimport { store as blockEditorStore } from '../../store';\nimport {\n\taddActiveFormats,\n\tgetAllowedFormats,\n\tcreateLinkInParagraph,\n} from './utils';\nimport EmbedHandlerPicker from './embed-handler-picker';\nimport { Content } from './content';\nimport RichText from './native';\nimport { withDeprecations } from './with-deprecations';\n\nconst classes = 'block-editor-rich-text__editable';\n\nexport function RichTextWrapper(\n\t{\n\t\tchildren,\n\t\ttagName,\n\t\tstart,\n\t\treversed,\n\t\tvalue: originalValue,\n\t\tonChange: originalOnChange,\n\t\tisSelected: originalIsSelected,\n\t\tinlineToolbar,\n\t\twrapperClassName,\n\t\tautocompleters,\n\t\tonReplace,\n\t\tplaceholder,\n\t\tallowedFormats,\n\t\twithoutInteractiveFormatting,\n\t\tonRemove,\n\t\tonMerge,\n\t\tonSplit,\n\t\t__unstableOnSplitAtEnd: onSplitAtEnd,\n\t\t__unstableOnSplitMiddle: onSplitMiddle,\n\t\t__unstableOnSplitAtDoubleLineEnd: onSplitAtDoubleLineEnd,\n\t\tidentifier,\n\t\tpreserveWhiteSpace,\n\t\t__unstablePastePlainText: pastePlainText,\n\t\t__unstableEmbedURLOnPaste,\n\t\t__unstableDisableFormats: disableFormats,\n\t\tdisableLineBreaks,\n\t\tunstableOnFocus,\n\t\t__unstableAllowPrefixTransformations,\n\t\t// Native props.\n\t\t__unstableMobileNoFocusOnMount,\n\t\tdeleteEnter,\n\t\tplaceholderTextColor,\n\t\ttextAlign,\n\t\tselectionColor,\n\t\ttagsToEliminate,\n\t\tdisableEditingMenu,\n\t\tfontSize,\n\t\tfontFamily,\n\t\tfontWeight,\n\t\tfontStyle,\n\t\tminWidth,\n\t\tmaxWidth,\n\t\tonBlur,\n\t\tdisableSuggestions,\n\t\tdisableAutocorrection,\n\t\tcontainerWidth,\n\t\tonEnter: onCustomEnter,\n\t\t...props\n\t},\n\tprovidedRef\n) {\n\tconst instanceId = useInstanceId( RichTextWrapper );\n\n\tidentifier = identifier || instanceId;\n\n\tconst fallbackRef = useRef();\n\tconst { clientId, isSelected: blockIsSelected } = useBlockEditContext();\n\tconst embedHandlerPickerRef = useRef();\n\tconst selector = ( select ) => {\n\t\tconst {\n\t\t\tgetSelectionStart,\n\t\t\tgetSelectionEnd,\n\t\t\tgetSettings,\n\t\t\tdidAutomaticChange,\n\t\t\tgetBlock,\n\t\t\tisMultiSelecting,\n\t\t\thasMultiSelection,\n\t\t} = select( blockEditorStore );\n\n\t\tconst selectionStart = getSelectionStart();\n\t\tconst selectionEnd = getSelectionEnd();\n\t\tconst { __experimentalUndo: undo } = getSettings();\n\n\t\tlet isSelected;\n\n\t\tif ( originalIsSelected === undefined ) {\n\t\t\tisSelected =\n\t\t\t\tselectionStart.clientId === clientId &&\n\t\t\t\tselectionStart.attributeKey === identifier;\n\t\t} else if ( originalIsSelected ) {\n\t\t\tisSelected = selectionStart.clientId === clientId;\n\t\t}\n\n\t\tlet extraProps = {};\n\t\tif ( Platform.OS === 'native' ) {\n\t\t\t// If the block of this RichText is unmodified then it's a candidate for replacing when adding a new block.\n\t\t\t// In order to fix https://github.com/wordpress-mobile/gutenberg-mobile/issues/1126, let's blur on unmount in that case.\n\t\t\t// This apparently assumes functionality the BlockHlder actually.\n\t\t\tconst block = clientId && getBlock( clientId );\n\t\t\tconst shouldBlurOnUnmount =\n\t\t\t\tblock && isSelected && isUnmodifiedDefaultBlock( block );\n\t\t\textraProps = {\n\t\t\t\tshouldBlurOnUnmount,\n\t\t\t};\n\t\t}\n\n\t\treturn {\n\t\t\tselectionStart: isSelected ? selectionStart.offset : undefined,\n\t\t\tselectionEnd: isSelected ? selectionEnd.offset : undefined,\n\t\t\tisSelected,\n\t\t\tdidAutomaticChange: didAutomaticChange(),\n\t\t\tdisabled: isMultiSelecting() || hasMultiSelection(),\n\t\t\tundo,\n\t\t\t...extraProps,\n\t\t};\n\t};\n\t// This selector must run on every render so the right selection state is\n\t// retrieved from the store on merge.\n\t// To do: fix this somehow.\n\tconst {\n\t\tselectionStart,\n\t\tselectionEnd,\n\t\tisSelected,\n\t\tdidAutomaticChange,\n\t\tdisabled,\n\t\tundo,\n\t\tshouldBlurOnUnmount,\n\t} = useSelect( selector );\n\tconst {\n\t\t__unstableMarkLastChangeAsPersistent,\n\t\tenterFormattedText,\n\t\texitFormattedText,\n\t\tselectionChange,\n\t\t__unstableMarkAutomaticChange,\n\t} = useDispatch( blockEditorStore );\n\tconst adjustedAllowedFormats = getAllowedFormats( {\n\t\tallowedFormats,\n\t\tdisableFormats,\n\t} );\n\tconst hasFormats =\n\t\t! adjustedAllowedFormats || adjustedAllowedFormats.length > 0;\n\tlet adjustedValue = originalValue;\n\tlet adjustedOnChange = originalOnChange;\n\n\t// Handle deprecated format.\n\tif ( Array.isArray( originalValue ) ) {\n\t\tadjustedValue = childrenSource.toHTML( originalValue );\n\t\tadjustedOnChange = ( newValue ) =>\n\t\t\toriginalOnChange(\n\t\t\t\tchildrenSource.fromDOM(\n\t\t\t\t\t__unstableCreateElement( document, newValue ).childNodes\n\t\t\t\t)\n\t\t\t);\n\t}\n\n\tconst onSelectionChange = useCallback(\n\t\t( selectionChangeStart, selectionChangeEnd ) => {\n\t\t\tselectionChange(\n\t\t\t\tclientId,\n\t\t\t\tidentifier,\n\t\t\t\tselectionChangeStart,\n\t\t\t\tselectionChangeEnd\n\t\t\t);\n\t\t},\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t\t[ clientId, identifier ]\n\t);\n\n\tconst onDelete = useCallback(\n\t\t( { value, isReverse } ) => {\n\t\t\tif ( onMerge ) {\n\t\t\t\tonMerge( ! isReverse );\n\t\t\t}\n\n\t\t\t// Only handle remove on Backspace. This serves dual-purpose of being\n\t\t\t// an intentional user interaction distinguishing between Backspace and\n\t\t\t// Delete to remove the empty field, but also to avoid merge & remove\n\t\t\t// causing destruction of two fields (merge, then removed merged).\n\t\t\telse if ( onRemove && isEmpty( value ) && isReverse ) {\n\t\t\t\tonRemove( ! isReverse );\n\t\t\t}\n\t\t},\n\t\t[ onMerge, onRemove ]\n\t);\n\n\t/**\n\t * Signals to the RichText owner that the block can be replaced with two\n\t * blocks as a result of splitting the block by pressing enter, or with\n\t * blocks as a result of splitting the block by pasting block content in the\n\t * instance.\n\t *\n\t * @param {Object} record The rich text value to split.\n\t * @param {Array} pastedBlocks The pasted blocks to insert, if any.\n\t */\n\tconst splitValue = useCallback(\n\t\t( record, pastedBlocks = [] ) => {\n\t\t\tif ( ! onReplace || ! onSplit ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst blocks = [];\n\t\t\tconst [ before, after ] = split( record );\n\t\t\tconst hasPastedBlocks = pastedBlocks.length > 0;\n\t\t\tlet lastPastedBlockIndex = -1;\n\n\t\t\t// Consider the after value to be the original it is not empty and\n\t\t\t// the before value *is* empty.\n\t\t\tconst isAfterOriginal = isEmpty( before ) && ! isEmpty( after );\n\n\t\t\t// Create a block with the content before the caret if there's no pasted\n\t\t\t// blocks, or if there are pasted blocks and the value is not empty.\n\t\t\t// We do not want a leading empty block on paste, but we do if split\n\t\t\t// with e.g. the enter key.\n\t\t\tif ( ! hasPastedBlocks || ! isEmpty( before ) ) {\n\t\t\t\tblocks.push(\n\t\t\t\t\tonSplit(\n\t\t\t\t\t\ttoHTMLString( { value: before } ),\n\t\t\t\t\t\t! isAfterOriginal\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\tlastPastedBlockIndex += 1;\n\t\t\t}\n\n\t\t\tif ( hasPastedBlocks ) {\n\t\t\t\tblocks.push( ...pastedBlocks );\n\t\t\t\tlastPastedBlockIndex += pastedBlocks.length;\n\t\t\t} else if ( onSplitMiddle ) {\n\t\t\t\tblocks.push( onSplitMiddle() );\n\t\t\t}\n\n\t\t\t// If there's pasted blocks, append a block with non empty content\n\t\t\t// after the caret. Otherwise, do append an empty block if there\n\t\t\t// is no `onSplitMiddle` prop, but if there is and the content is\n\t\t\t// empty, the middle block is enough to set focus in.\n\t\t\tif (\n\t\t\t\thasPastedBlocks\n\t\t\t\t\t? ! isEmpty( after )\n\t\t\t\t\t: ! onSplitMiddle || ! isEmpty( after )\n\t\t\t) {\n\t\t\t\tblocks.push(\n\t\t\t\t\tonSplit( toHTMLString( { value: after } ), isAfterOriginal )\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// If there are pasted blocks, set the selection to the last one.\n\t\t\t// Otherwise, set the selection to the second block.\n\t\t\tconst indexToSelect = hasPastedBlocks ? lastPastedBlockIndex : 1;\n\n\t\t\t// If there are pasted blocks, move the caret to the end of the selected block\n\t\t\t// Otherwise, retain the default value.\n\t\t\tconst initialPosition = hasPastedBlocks ? -1 : 0;\n\n\t\t\tonReplace( blocks, indexToSelect, initialPosition );\n\t\t},\n\t\t[ onReplace, onSplit, onSplitMiddle ]\n\t);\n\n\tconst onEnter = useCallback(\n\t\t( { value, onChange, shiftKey } ) => {\n\t\t\tconst canSplit = onReplace && onSplit;\n\n\t\t\tif ( onReplace ) {\n\t\t\t\tconst transforms = getBlockTransforms( 'from' ).filter(\n\t\t\t\t\t( { type } ) => type === 'enter'\n\t\t\t\t);\n\t\t\t\tconst transformation = findTransform( transforms, ( item ) => {\n\t\t\t\t\treturn item.regExp.test( value.text );\n\t\t\t\t} );\n\n\t\t\t\tif ( transformation ) {\n\t\t\t\t\tonReplace( [\n\t\t\t\t\t\ttransformation.transform( { content: value.text } ),\n\t\t\t\t\t] );\n\t\t\t\t\t__unstableMarkAutomaticChange();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( onCustomEnter ) {\n\t\t\t\tonCustomEnter();\n\t\t\t}\n\n\t\t\tconst { text, start: splitStart, end: splitEnd } = value;\n\t\t\tconst canSplitAtEnd =\n\t\t\t\tonSplitAtEnd &&\n\t\t\t\tsplitStart === splitEnd &&\n\t\t\t\tsplitEnd === text.length;\n\n\t\t\tif ( shiftKey ) {\n\t\t\t\tif ( ! disableLineBreaks ) {\n\t\t\t\t\tonChange( insert( value, '\\n' ) );\n\t\t\t\t}\n\t\t\t} else if ( canSplit ) {\n\t\t\t\tsplitValue( value );\n\t\t\t} else if ( canSplitAtEnd ) {\n\t\t\t\tonSplitAtEnd();\n\t\t\t} else if (\n\t\t\t\t// For some blocks it's desirable to split at the end of the\n\t\t\t\t// block when there are two line breaks at the end of the\n\t\t\t\t// block, so triple Enter exits the block.\n\t\t\t\tonSplitAtDoubleLineEnd &&\n\t\t\t\tsplitStart === splitEnd &&\n\t\t\t\tsplitEnd === text.length &&\n\t\t\t\ttext.slice( -2 ) === '\\n\\n'\n\t\t\t) {\n\t\t\t\tvalue.start = value.end - 2;\n\t\t\t\tonChange( remove( value ) );\n\t\t\t\tonSplitAtDoubleLineEnd();\n\t\t\t} else if ( ! disableLineBreaks ) {\n\t\t\t\tonChange( insert( value, '\\n' ) );\n\t\t\t}\n\t\t},\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t\t[\n\t\t\tonReplace,\n\t\t\tonSplit,\n\t\t\t__unstableMarkAutomaticChange,\n\t\t\tsplitValue,\n\t\t\tonSplitAtEnd,\n\t\t]\n\t);\n\n\tconst onPaste = useCallback(\n\t\t( {\n\t\t\tvalue,\n\t\t\tonChange,\n\t\t\thtml,\n\t\t\tplainText,\n\t\t\tisInternal,\n\t\t\tfiles,\n\t\t\tactiveFormats,\n\t\t} ) => {\n\t\t\t// If the data comes from a rich text instance, we can directly use it\n\t\t\t// without filtering the data. The filters are only meant for externally\n\t\t\t// pasted content and remove inline styles.\n\t\t\tif ( isInternal ) {\n\t\t\t\tconst pastedValue = create( {\n\t\t\t\t\thtml,\n\t\t\t\t\tpreserveWhiteSpace,\n\t\t\t\t} );\n\t\t\t\taddActiveFormats( pastedValue, activeFormats );\n\t\t\t\tonChange( insert( value, pastedValue ) );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( pastePlainText ) {\n\t\t\t\tonChange( insert( value, create( { text: plainText } ) ) );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Only process file if no HTML is present.\n\t\t\t// Note: a pasted file may have the URL as plain text.\n\t\t\tif ( files && files.length && ! html ) {\n\t\t\t\tconst content = pasteHandler( {\n\t\t\t\t\tHTML: filePasteHandler( files ),\n\t\t\t\t\tmode: 'BLOCKS',\n\t\t\t\t\ttagName,\n\t\t\t\t\tpreserveWhiteSpace,\n\t\t\t\t} );\n\n\t\t\t\t// Allows us to ask for this information when we get a report.\n\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\twindow.console.log( 'Received items:\\n\\n', files );\n\n\t\t\t\tif ( onReplace && isEmpty( value ) ) {\n\t\t\t\t\tonReplace( content );\n\t\t\t\t} else {\n\t\t\t\t\tsplitValue( value, content );\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlet mode = onReplace && onSplit ? 'AUTO' : 'INLINE';\n\n\t\t\tconst isPastedURL = isURL( plainText.trim() );\n\t\t\tconst presentEmbedHandlerPicker = () =>\n\t\t\t\tembedHandlerPickerRef.current?.presentPicker( {\n\t\t\t\t\tcreateEmbed: () =>\n\t\t\t\t\t\tonReplace( content, content.length - 1, -1 ),\n\t\t\t\t\tcreateLink: () =>\n\t\t\t\t\t\tcreateLinkInParagraph( plainText.trim(), onReplace ),\n\t\t\t\t} );\n\n\t\t\tif (\n\t\t\t\t__unstableEmbedURLOnPaste &&\n\t\t\t\tisEmpty( value ) &&\n\t\t\t\tisPastedURL\n\t\t\t) {\n\t\t\t\tmode = 'BLOCKS';\n\t\t\t}\n\n\t\t\tconst content = pasteHandler( {\n\t\t\t\tHTML: html,\n\t\t\t\tplainText,\n\t\t\t\tmode,\n\t\t\t\ttagName,\n\t\t\t\tpreserveWhiteSpace,\n\t\t\t} );\n\n\t\t\tif ( typeof content === 'string' ) {\n\t\t\t\tconst valueToInsert = create( { html: content } );\n\t\t\t\taddActiveFormats( valueToInsert, activeFormats );\n\t\t\t\tonChange( insert( value, valueToInsert ) );\n\t\t\t} else if ( content.length > 0 ) {\n\t\t\t\t// When an URL is pasted in an empty paragraph then the EmbedHandlerPicker should showcase options allowing the transformation of that URL\n\t\t\t\t// into either an Embed block or a link within the target paragraph. If the paragraph is non-empty, the URL is pasted as text.\n\t\t\t\tconst canPasteEmbed =\n\t\t\t\t\tisPastedURL &&\n\t\t\t\t\tcontent.length === 1 &&\n\t\t\t\t\tcontent[ 0 ].name === 'core/embed';\n\t\t\t\tif ( onReplace && isEmpty( value ) ) {\n\t\t\t\t\tif ( canPasteEmbed ) {\n\t\t\t\t\t\tonChange(\n\t\t\t\t\t\t\tinsert( value, create( { text: plainText } ) )\n\t\t\t\t\t\t);\n\t\t\t\t\t\tif ( __unstableEmbedURLOnPaste ) {\n\t\t\t\t\t\t\tpresentEmbedHandlerPicker();\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tonReplace( content, content.length - 1, -1, {\n\t\t\t\t\t\tsource: 'clipboard',\n\t\t\t\t\t} );\n\t\t\t\t} else {\n\t\t\t\t\tif ( canPasteEmbed ) {\n\t\t\t\t\t\tonChange(\n\t\t\t\t\t\t\tinsert( value, create( { text: plainText } ) )\n\t\t\t\t\t\t);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tsplitValue( value, content );\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t[\n\t\t\ttagName,\n\t\t\tonReplace,\n\t\t\tonSplit,\n\t\t\tsplitValue,\n\t\t\t__unstableEmbedURLOnPaste,\n\t\t\tpreserveWhiteSpace,\n\t\t\tpastePlainText,\n\t\t]\n\t);\n\n\tconst inputRule = useCallback(\n\t\t( value, valueToFormat ) => {\n\t\t\tif ( ! onReplace ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst { start: startPosition, text } = value;\n\t\t\tconst characterBefore = text.slice(\n\t\t\t\tstartPosition - 1,\n\t\t\t\tstartPosition\n\t\t\t);\n\n\t\t\t// The character right before the caret must be a plain space.\n\t\t\tif ( characterBefore !== ' ' ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst trimmedTextBefore = text.slice( 0, startPosition ).trim();\n\t\t\tconst prefixTransforms = getBlockTransforms( 'from' ).filter(\n\t\t\t\t( { type } ) => type === 'prefix'\n\t\t\t);\n\t\t\tconst transformation = findTransform(\n\t\t\t\tprefixTransforms,\n\t\t\t\t( { prefix } ) => {\n\t\t\t\t\treturn trimmedTextBefore === prefix;\n\t\t\t\t}\n\t\t\t);\n\n\t\t\tif ( ! transformation ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst content = valueToFormat(\n\t\t\t\tslice( value, startPosition, text.length )\n\t\t\t);\n\t\t\tconst block = transformation.transform( content );\n\n\t\t\tonReplace( [ block ] );\n\t\t\t__unstableMarkAutomaticChange();\n\t\t},\n\t\t[ onReplace, __unstableMarkAutomaticChange ]\n\t);\n\n\tconst mergedRef = useMergeRefs( [ providedRef, fallbackRef ] );\n\n\treturn (\n\t\t<RichText\n\t\t\tclientId={ clientId }\n\t\t\tidentifier={ identifier }\n\t\t\tnativeEditorRef={ mergedRef }\n\t\t\tvalue={ adjustedValue }\n\t\t\tonChange={ adjustedOnChange }\n\t\t\tselectionStart={ selectionStart }\n\t\t\tselectionEnd={ selectionEnd }\n\t\t\tonSelectionChange={ onSelectionChange }\n\t\t\ttagName={ tagName }\n\t\t\tstart={ start }\n\t\t\treversed={ reversed }\n\t\t\tplaceholder={ placeholder }\n\t\t\tallowedFormats={ adjustedAllowedFormats }\n\t\t\twithoutInteractiveFormatting={ withoutInteractiveFormatting }\n\t\t\tonEnter={ onEnter }\n\t\t\tonDelete={ onDelete }\n\t\t\tonPaste={ onPaste }\n\t\t\t__unstableIsSelected={ isSelected }\n\t\t\t__unstableInputRule={ inputRule }\n\t\t\t__unstableOnEnterFormattedText={ enterFormattedText }\n\t\t\t__unstableOnExitFormattedText={ exitFormattedText }\n\t\t\t__unstableOnCreateUndoLevel={ __unstableMarkLastChangeAsPersistent }\n\t\t\t__unstableMarkAutomaticChange={ __unstableMarkAutomaticChange }\n\t\t\t__unstableDidAutomaticChange={ didAutomaticChange }\n\t\t\t__unstableUndo={ undo }\n\t\t\t__unstableDisableFormats={ disableFormats }\n\t\t\tpreserveWhiteSpace={ preserveWhiteSpace }\n\t\t\tdisabled={ disabled }\n\t\t\tunstableOnFocus={ unstableOnFocus }\n\t\t\t__unstableAllowPrefixTransformations={\n\t\t\t\t__unstableAllowPrefixTransformations\n\t\t\t}\n\t\t\t// Native props.\n\t\t\tblockIsSelected={\n\t\t\t\toriginalIsSelected !== undefined\n\t\t\t\t\t? originalIsSelected\n\t\t\t\t\t: blockIsSelected\n\t\t\t}\n\t\t\tshouldBlurOnUnmount={ shouldBlurOnUnmount }\n\t\t\t__unstableMobileNoFocusOnMount={ __unstableMobileNoFocusOnMount }\n\t\t\tdeleteEnter={ deleteEnter }\n\t\t\tplaceholderTextColor={ placeholderTextColor }\n\t\t\ttextAlign={ textAlign }\n\t\t\tselectionColor={ selectionColor }\n\t\t\ttagsToEliminate={ tagsToEliminate }\n\t\t\tdisableEditingMenu={ disableEditingMenu }\n\t\t\tfontSize={ fontSize }\n\t\t\tfontFamily={ fontFamily }\n\t\t\tfontWeight={ fontWeight }\n\t\t\tfontStyle={ fontStyle }\n\t\t\tminWidth={ minWidth }\n\t\t\tmaxWidth={ maxWidth }\n\t\t\tonBlur={ onBlur }\n\t\t\tdisableSuggestions={ disableSuggestions }\n\t\t\tdisableAutocorrection={ disableAutocorrection }\n\t\t\tcontainerWidth={ containerWidth }\n\t\t\t// Props to be set on the editable container are destructured on the\n\t\t\t// element itself for web (see below), but passed through rich text\n\t\t\t// for native.\n\t\t\tid={ props.id }\n\t\t\tstyle={ props.style }\n\t\t>\n\t\t\t{ ( {\n\t\t\t\tisSelected: nestedIsSelected,\n\t\t\t\tvalue,\n\t\t\t\tonChange,\n\t\t\t\tonFocus,\n\t\t\t\teditableProps,\n\t\t\t\teditableTagName: TagName,\n\t\t\t} ) => (\n\t\t\t\t<>\n\t\t\t\t\t{ children && children( { value, onChange, onFocus } ) }\n\t\t\t\t\t{ nestedIsSelected && hasFormats && (\n\t\t\t\t\t\t<FormatToolbarContainer\n\t\t\t\t\t\t\tinline={ inlineToolbar }\n\t\t\t\t\t\t\tanchorRef={ fallbackRef.current }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ nestedIsSelected && <RemoveBrowserShortcuts /> }\n\t\t\t\t\t<Autocomplete\n\t\t\t\t\t\tonReplace={ onReplace }\n\t\t\t\t\t\tcompleters={ autocompleters }\n\t\t\t\t\t\trecord={ value }\n\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\tisSelected={ nestedIsSelected }\n\t\t\t\t\t\tcontentRef={ fallbackRef }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ ( { listBoxId, activeId, onKeyDown } ) => (\n\t\t\t\t\t\t\t<TagName\n\t\t\t\t\t\t\t\t{ ...editableProps }\n\t\t\t\t\t\t\t\t{ ...props }\n\t\t\t\t\t\t\t\tstyle={\n\t\t\t\t\t\t\t\t\tprops.style\n\t\t\t\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\t\t\t\t...props.style,\n\t\t\t\t\t\t\t\t\t\t\t\t...editableProps.style,\n\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t: editableProps.style\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t\t\tclasses,\n\t\t\t\t\t\t\t\t\tprops.className,\n\t\t\t\t\t\t\t\t\teditableProps.className\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\taria-autocomplete={\n\t\t\t\t\t\t\t\t\tlistBoxId ? 'list' : undefined\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\taria-owns={ listBoxId }\n\t\t\t\t\t\t\t\taria-activedescendant={ activeId }\n\t\t\t\t\t\t\t\tonKeyDown={ ( event ) => {\n\t\t\t\t\t\t\t\t\tonKeyDown( event );\n\t\t\t\t\t\t\t\t\teditableProps.onKeyDown( event );\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</Autocomplete>\n\t\t\t\t\t<EmbedHandlerPicker ref={ embedHandlerPickerRef } />\n\t\t\t\t</>\n\t\t\t) }\n\t\t</RichText>\n\t);\n}\n\n// This export does not actually implement a private API, but was exported\n// under this name for interoperability with the web version of the RichText\n// component.\nexport const PrivateRichText = withDeprecations(\n\tforwardRef( RichTextWrapper )\n);\n\nPrivateRichText.Content = Content;\n\nPrivateRichText.isEmpty = ( value ) => {\n\treturn ! value || value.length === 0;\n};\n\nPrivateRichText.Content.defaultProps = {\n\tformat: 'string',\n\tvalue: '',\n};\n\nPrivateRichText.Raw = forwardRef( ( props, ref ) => (\n\t<RichText { ...props } nativeEditorRef={ ref } />\n) );\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/rich-text/README.md\n */\nexport default PrivateRichText;\nexport { RichTextShortcut } from './shortcut';\nexport { RichTextToolbarButton } from './toolbar-button';\nexport { __unstableRichTextInputEvent } from './input-event';\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,QAAQ,EAAEC,MAAM,EAAEC,WAAW,EAAEC,UAAU,QAAQ,oBAAoB;AAC9E,SAASC,WAAW,EAAEC,SAAS,QAAQ,iBAAiB;AACxD,SACCC,YAAY,EACZC,QAAQ,IAAIC,cAAc,EAC1BC,kBAAkB,EAClBC,aAAa,EACbC,wBAAwB,QAClB,mBAAmB;AAC1B,SAASC,aAAa,EAAEC,YAAY,QAAQ,oBAAoB;AAChE,SACCC,uBAAuB,EACvBC,OAAO,EACPC,MAAM,EACNC,MAAM,EACNC,MAAM,EACNC,KAAK,EACLC,YAAY,EACZC,KAAK,QACC,sBAAsB;AAC7B,SAASC,KAAK,QAAQ,gBAAgB;;AAEtC;AACA;AACA;AACA,OAAOC,YAAY,MAAM,iBAAiB;AAC1C,SAASC,mBAAmB,QAAQ,eAA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AM;EACtC,OAAO,CAAEA,KAAK,IAAIA,KAAK,CAACsF,MAAM,KAAK,CAAC;AACrC,CAAC;AAEDqG,eAAe,CAACnM,OAAO,CAACoM,YAAY,GAAG;EACtCC,MAAM,EAAE,QAAQ;EAChB7L,KAAK,EAAE;AACR,CAAC;AAED2L,eAAe,CAACG,GAAG,GAAGrO,UAAU,CAAE,CAAE0F,KAAK,EAAEuI,GAAG,KAC7C1B,aAAA,CAACvK,QAAQ;EAAA,GAAM0D,KAAK;EAAG8G,eAAe,EAAGyB;AAAK,CAAE,CAC/C,CAAC;;AAEH;AACA;AACA;AACA,eAAeC,eAAe;AAC9B,SAASI,gBAAgB,QAAQ,YAAY;AAC7C,SAASC,qBAAqB,QAAQ,kBAAkB;AACxD,SAASC,4BAA4B,QAAQ,eAAe","ignoreList":[]}
1
+ {"version":3,"names":["clsx","Platform","useRef","useCallback","forwardRef","useDispatch","useSelect","pasteHandler","children","childrenSource","getBlockTransforms","findTransform","isUnmodifiedDefaultBlock","useInstanceId","useMergeRefs","__unstableCreateElement","isEmpty","insert","remove","create","split","toHTMLString","slice","isURL","Autocomplete","useBlockEditContext","RemoveBrowserShortcuts","filePasteHandler","FormatToolbarContainer","store","blockEditorStore","addActiveFormats","getAllowedFormats","createLinkInParagraph","EmbedHandlerPicker","Content","RichText","withDeprecations","classes","RichTextWrapper","tagName","start","reversed","value","originalValue","onChange","originalOnChange","isSelected","originalIsSelected","inlineToolbar","wrapperClassName","autocompleters","onReplace","placeholder","allowedFormats","withoutInteractiveFormatting","onRemove","onMerge","onSplit","__unstableOnSplitAtEnd","onSplitAtEnd","__unstableOnSplitMiddle","onSplitMiddle","__unstableOnSplitAtDoubleLineEnd","onSplitAtDoubleLineEnd","identifier","preserveWhiteSpace","__unstablePastePlainText","pastePlainText","__unstableEmbedURLOnPaste","__unstableDisableFormats","disableFormats","disableLineBreaks","unstableOnFocus","__unstableAllowPrefixTransformations","__unstableMobileNoFocusOnMount","deleteEnter","placeholderTextColor","textAlign","selectionColor","tagsToEliminate","disableEditingMenu","fontSize","fontFamily","fontWeight","fontStyle","minWidth","maxWidth","onBlur","disableSuggestions","disableAutocorrection","containerWidth","onEnter","onCustomEnter","props","providedRef","instanceId","fallbackRef","clientId","blockIsSelected","embedHandlerPickerRef","selector","select","getSelectionStart","getSelectionEnd","getSettings","didAutomaticChange","getBlock","isMultiSelecting","hasMultiSelection","getSelectedBlockClientId","selectionStart","selectionEnd","__experimentalUndo","undo","undefined","attributeKey","extraProps","OS","block","shouldBlurOnUnmount","offset","disabled","__unstableMarkLastChangeAsPersistent","enterFormattedText","exitFormattedText","selectionChange","__unstableMarkAutomaticChange","clearSelectedBlock","adjustedAllowedFormats","hasFormats","length","adjustedValue","adjustedOnChange","Array","isArray","toHTML","newValue","fromDOM","document","childNodes","onSelectionChange","selectionChangeStart","selectionChangeEnd","clearCurrentSelectionOnUnmount","onDelete","isReverse","splitValue","record","pastedBlocks","blocks","before","after","hasPastedBlocks","lastPastedBlockIndex","isAfterOriginal","push","indexToSelect","initialPosition","shiftKey","canSplit","transforms","filter","type","transformation","item","regExp","test","text","transform","content","splitStart","end","splitEnd","canSplitAtEnd","onPaste","html","plainText","isInternal","files","activeFormats","pastedValue","HTML","mode","window","console","log","isPastedURL","trim","presentEmbedHandlerPicker","current","presentPicker","createEmbed","createLink","valueToInsert","canPasteEmbed","name","source","inputRule","valueToFormat","startPosition","characterBefore","trimmedTextBefore","prefixTransforms","prefix","mergedRef","createElement","nativeEditorRef","__unstableIsSelected","__unstableInputRule","__unstableOnEnterFormattedText","__unstableOnExitFormattedText","__unstableOnCreateUndoLevel","__unstableDidAutomaticChange","__unstableUndo","id","style","nestedIsSelected","onFocus","editableProps","editableTagName","TagName","Fragment","inline","anchorRef","completers","contentRef","listBoxId","activeId","onKeyDown","className","event","ref","PrivateRichText","defaultProps","format","Raw","RichTextShortcut","RichTextToolbarButton","__unstableRichTextInputEvent"],"sources":["@wordpress/block-editor/src/components/rich-text/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { Platform, useRef, useCallback, forwardRef } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport {\n\tpasteHandler,\n\tchildren as childrenSource,\n\tgetBlockTransforms,\n\tfindTransform,\n\tisUnmodifiedDefaultBlock,\n} from '@wordpress/blocks';\nimport { useInstanceId, useMergeRefs } from '@wordpress/compose';\nimport {\n\t__unstableCreateElement,\n\tisEmpty,\n\tinsert,\n\tremove,\n\tcreate,\n\tsplit,\n\ttoHTMLString,\n\tslice,\n} from '@wordpress/rich-text';\nimport { isURL } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport Autocomplete from '../autocomplete';\nimport { useBlockEditContext } from '../block-edit';\nimport { RemoveBrowserShortcuts } from './remove-browser-shortcuts';\nimport { filePasteHandler } from './file-paste-handler';\nimport FormatToolbarContainer from './format-toolbar-container';\nimport { store as blockEditorStore } from '../../store';\nimport {\n\taddActiveFormats,\n\tgetAllowedFormats,\n\tcreateLinkInParagraph,\n} from './utils';\nimport EmbedHandlerPicker from './embed-handler-picker';\nimport { Content } from './content';\nimport RichText from './native';\nimport { withDeprecations } from './with-deprecations';\n\nconst classes = 'block-editor-rich-text__editable';\n\nexport function RichTextWrapper(\n\t{\n\t\tchildren,\n\t\ttagName,\n\t\tstart,\n\t\treversed,\n\t\tvalue: originalValue,\n\t\tonChange: originalOnChange,\n\t\tisSelected: originalIsSelected,\n\t\tinlineToolbar,\n\t\twrapperClassName,\n\t\tautocompleters,\n\t\tonReplace,\n\t\tplaceholder,\n\t\tallowedFormats,\n\t\twithoutInteractiveFormatting,\n\t\tonRemove,\n\t\tonMerge,\n\t\tonSplit,\n\t\t__unstableOnSplitAtEnd: onSplitAtEnd,\n\t\t__unstableOnSplitMiddle: onSplitMiddle,\n\t\t__unstableOnSplitAtDoubleLineEnd: onSplitAtDoubleLineEnd,\n\t\tidentifier,\n\t\tpreserveWhiteSpace,\n\t\t__unstablePastePlainText: pastePlainText,\n\t\t__unstableEmbedURLOnPaste,\n\t\t__unstableDisableFormats: disableFormats,\n\t\tdisableLineBreaks,\n\t\tunstableOnFocus,\n\t\t__unstableAllowPrefixTransformations,\n\t\t// Native props.\n\t\t__unstableMobileNoFocusOnMount,\n\t\tdeleteEnter,\n\t\tplaceholderTextColor,\n\t\ttextAlign,\n\t\tselectionColor,\n\t\ttagsToEliminate,\n\t\tdisableEditingMenu,\n\t\tfontSize,\n\t\tfontFamily,\n\t\tfontWeight,\n\t\tfontStyle,\n\t\tminWidth,\n\t\tmaxWidth,\n\t\tonBlur,\n\t\tdisableSuggestions,\n\t\tdisableAutocorrection,\n\t\tcontainerWidth,\n\t\tonEnter: onCustomEnter,\n\t\t...props\n\t},\n\tprovidedRef\n) {\n\tconst instanceId = useInstanceId( RichTextWrapper );\n\n\tidentifier = identifier || instanceId;\n\n\tconst fallbackRef = useRef();\n\tconst { clientId, isSelected: blockIsSelected } = useBlockEditContext();\n\tconst embedHandlerPickerRef = useRef();\n\tconst selector = ( select ) => {\n\t\tconst {\n\t\t\tgetSelectionStart,\n\t\t\tgetSelectionEnd,\n\t\t\tgetSettings,\n\t\t\tdidAutomaticChange,\n\t\t\tgetBlock,\n\t\t\tisMultiSelecting,\n\t\t\thasMultiSelection,\n\t\t\tgetSelectedBlockClientId,\n\t\t} = select( blockEditorStore );\n\n\t\tconst selectionStart = getSelectionStart();\n\t\tconst selectionEnd = getSelectionEnd();\n\t\tconst { __experimentalUndo: undo } = getSettings();\n\n\t\tlet isSelected;\n\n\t\tif ( originalIsSelected === undefined ) {\n\t\t\tisSelected =\n\t\t\t\tselectionStart.clientId === clientId &&\n\t\t\t\tselectionStart.attributeKey === identifier;\n\t\t} else if ( originalIsSelected ) {\n\t\t\tisSelected = selectionStart.clientId === clientId;\n\t\t}\n\n\t\tlet extraProps = {};\n\t\tif ( Platform.OS === 'native' ) {\n\t\t\t// If the block of this RichText is unmodified then it's a candidate for replacing when adding a new block.\n\t\t\t// In order to fix https://github.com/wordpress-mobile/gutenberg-mobile/issues/1126, let's blur on unmount in that case.\n\t\t\t// This apparently assumes functionality the BlockHlder actually.\n\t\t\tconst block = clientId && getBlock( clientId );\n\t\t\tconst shouldBlurOnUnmount =\n\t\t\t\tblock && isSelected && isUnmodifiedDefaultBlock( block );\n\t\t\textraProps = {\n\t\t\t\tshouldBlurOnUnmount,\n\t\t\t};\n\t\t}\n\n\t\treturn {\n\t\t\tselectionStart: isSelected ? selectionStart.offset : undefined,\n\t\t\tselectionEnd: isSelected ? selectionEnd.offset : undefined,\n\t\t\tisSelected,\n\t\t\tdidAutomaticChange: didAutomaticChange(),\n\t\t\tdisabled: isMultiSelecting() || hasMultiSelection(),\n\t\t\tundo,\n\t\t\tgetSelectedBlockClientId,\n\t\t\t...extraProps,\n\t\t};\n\t};\n\t// This selector must run on every render so the right selection state is\n\t// retrieved from the store on merge.\n\t// To do: fix this somehow.\n\tconst {\n\t\tselectionStart,\n\t\tselectionEnd,\n\t\tisSelected,\n\t\tgetSelectedBlockClientId,\n\t\tdidAutomaticChange,\n\t\tdisabled,\n\t\tundo,\n\t\tshouldBlurOnUnmount,\n\t} = useSelect( selector );\n\tconst {\n\t\t__unstableMarkLastChangeAsPersistent,\n\t\tenterFormattedText,\n\t\texitFormattedText,\n\t\tselectionChange,\n\t\t__unstableMarkAutomaticChange,\n\t\tclearSelectedBlock,\n\t} = useDispatch( blockEditorStore );\n\tconst adjustedAllowedFormats = getAllowedFormats( {\n\t\tallowedFormats,\n\t\tdisableFormats,\n\t} );\n\tconst hasFormats =\n\t\t! adjustedAllowedFormats || adjustedAllowedFormats.length > 0;\n\tlet adjustedValue = originalValue;\n\tlet adjustedOnChange = originalOnChange;\n\n\t// Handle deprecated format.\n\tif ( Array.isArray( originalValue ) ) {\n\t\tadjustedValue = childrenSource.toHTML( originalValue );\n\t\tadjustedOnChange = ( newValue ) =>\n\t\t\toriginalOnChange(\n\t\t\t\tchildrenSource.fromDOM(\n\t\t\t\t\t__unstableCreateElement( document, newValue ).childNodes\n\t\t\t\t)\n\t\t\t);\n\t}\n\n\tconst onSelectionChange = useCallback(\n\t\t( selectionChangeStart, selectionChangeEnd ) => {\n\t\t\tselectionChange(\n\t\t\t\tclientId,\n\t\t\t\tidentifier,\n\t\t\t\tselectionChangeStart,\n\t\t\t\tselectionChangeEnd\n\t\t\t);\n\t\t},\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t\t[ clientId, identifier ]\n\t);\n\n\tconst clearCurrentSelectionOnUnmount = useCallback( () => {\n\t\tif ( getSelectedBlockClientId() === clientId ) {\n\t\t\tclearSelectedBlock();\n\t\t}\n\t}, [ clearSelectedBlock, clientId, getSelectedBlockClientId ] );\n\n\tconst onDelete = useCallback(\n\t\t( { value, isReverse } ) => {\n\t\t\tif ( onMerge ) {\n\t\t\t\tonMerge( ! isReverse );\n\t\t\t}\n\n\t\t\t// Only handle remove on Backspace. This serves dual-purpose of being\n\t\t\t// an intentional user interaction distinguishing between Backspace and\n\t\t\t// Delete to remove the empty field, but also to avoid merge & remove\n\t\t\t// causing destruction of two fields (merge, then removed merged).\n\t\t\telse if ( onRemove && isEmpty( value ) && isReverse ) {\n\t\t\t\tonRemove( ! isReverse );\n\t\t\t}\n\t\t},\n\t\t[ onMerge, onRemove ]\n\t);\n\n\t/**\n\t * Signals to the RichText owner that the block can be replaced with two\n\t * blocks as a result of splitting the block by pressing enter, or with\n\t * blocks as a result of splitting the block by pasting block content in the\n\t * instance.\n\t *\n\t * @param {Object} record The rich text value to split.\n\t * @param {Array} pastedBlocks The pasted blocks to insert, if any.\n\t */\n\tconst splitValue = useCallback(\n\t\t( record, pastedBlocks = [] ) => {\n\t\t\tif ( ! onReplace || ! onSplit ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst blocks = [];\n\t\t\tconst [ before, after ] = split( record );\n\t\t\tconst hasPastedBlocks = pastedBlocks.length > 0;\n\t\t\tlet lastPastedBlockIndex = -1;\n\n\t\t\t// Consider the after value to be the original it is not empty and\n\t\t\t// the before value *is* empty.\n\t\t\tconst isAfterOriginal = isEmpty( before ) && ! isEmpty( after );\n\n\t\t\t// Create a block with the content before the caret if there's no pasted\n\t\t\t// blocks, or if there are pasted blocks and the value is not empty.\n\t\t\t// We do not want a leading empty block on paste, but we do if split\n\t\t\t// with e.g. the enter key.\n\t\t\tif ( ! hasPastedBlocks || ! isEmpty( before ) ) {\n\t\t\t\tblocks.push(\n\t\t\t\t\tonSplit(\n\t\t\t\t\t\ttoHTMLString( { value: before } ),\n\t\t\t\t\t\t! isAfterOriginal\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\tlastPastedBlockIndex += 1;\n\t\t\t}\n\n\t\t\tif ( hasPastedBlocks ) {\n\t\t\t\tblocks.push( ...pastedBlocks );\n\t\t\t\tlastPastedBlockIndex += pastedBlocks.length;\n\t\t\t} else if ( onSplitMiddle ) {\n\t\t\t\tblocks.push( onSplitMiddle() );\n\t\t\t}\n\n\t\t\t// If there's pasted blocks, append a block with non empty content\n\t\t\t// after the caret. Otherwise, do append an empty block if there\n\t\t\t// is no `onSplitMiddle` prop, but if there is and the content is\n\t\t\t// empty, the middle block is enough to set focus in.\n\t\t\tif (\n\t\t\t\thasPastedBlocks\n\t\t\t\t\t? ! isEmpty( after )\n\t\t\t\t\t: ! onSplitMiddle || ! isEmpty( after )\n\t\t\t) {\n\t\t\t\tblocks.push(\n\t\t\t\t\tonSplit( toHTMLString( { value: after } ), isAfterOriginal )\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// If there are pasted blocks, set the selection to the last one.\n\t\t\t// Otherwise, set the selection to the second block.\n\t\t\tconst indexToSelect = hasPastedBlocks ? lastPastedBlockIndex : 1;\n\n\t\t\t// If there are pasted blocks, move the caret to the end of the selected block\n\t\t\t// Otherwise, retain the default value.\n\t\t\tconst initialPosition = hasPastedBlocks ? -1 : 0;\n\n\t\t\tonReplace( blocks, indexToSelect, initialPosition );\n\t\t},\n\t\t[ onReplace, onSplit, onSplitMiddle ]\n\t);\n\n\tconst onEnter = useCallback(\n\t\t( { value, onChange, shiftKey } ) => {\n\t\t\tconst canSplit = onReplace && onSplit;\n\n\t\t\tif ( onReplace ) {\n\t\t\t\tconst transforms = getBlockTransforms( 'from' ).filter(\n\t\t\t\t\t( { type } ) => type === 'enter'\n\t\t\t\t);\n\t\t\t\tconst transformation = findTransform( transforms, ( item ) => {\n\t\t\t\t\treturn item.regExp.test( value.text );\n\t\t\t\t} );\n\n\t\t\t\tif ( transformation ) {\n\t\t\t\t\tonReplace( [\n\t\t\t\t\t\ttransformation.transform( { content: value.text } ),\n\t\t\t\t\t] );\n\t\t\t\t\t__unstableMarkAutomaticChange();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( onCustomEnter ) {\n\t\t\t\tonCustomEnter();\n\t\t\t}\n\n\t\t\tconst { text, start: splitStart, end: splitEnd } = value;\n\t\t\tconst canSplitAtEnd =\n\t\t\t\tonSplitAtEnd &&\n\t\t\t\tsplitStart === splitEnd &&\n\t\t\t\tsplitEnd === text.length;\n\n\t\t\tif ( shiftKey ) {\n\t\t\t\tif ( ! disableLineBreaks ) {\n\t\t\t\t\tonChange( insert( value, '\\n' ) );\n\t\t\t\t}\n\t\t\t} else if ( canSplit ) {\n\t\t\t\tsplitValue( value );\n\t\t\t} else if ( canSplitAtEnd ) {\n\t\t\t\tonSplitAtEnd();\n\t\t\t} else if (\n\t\t\t\t// For some blocks it's desirable to split at the end of the\n\t\t\t\t// block when there are two line breaks at the end of the\n\t\t\t\t// block, so triple Enter exits the block.\n\t\t\t\tonSplitAtDoubleLineEnd &&\n\t\t\t\tsplitStart === splitEnd &&\n\t\t\t\tsplitEnd === text.length &&\n\t\t\t\ttext.slice( -2 ) === '\\n\\n'\n\t\t\t) {\n\t\t\t\tvalue.start = value.end - 2;\n\t\t\t\tonChange( remove( value ) );\n\t\t\t\tonSplitAtDoubleLineEnd();\n\t\t\t} else if ( ! disableLineBreaks ) {\n\t\t\t\tonChange( insert( value, '\\n' ) );\n\t\t\t}\n\t\t},\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t\t[\n\t\t\tonReplace,\n\t\t\tonSplit,\n\t\t\t__unstableMarkAutomaticChange,\n\t\t\tsplitValue,\n\t\t\tonSplitAtEnd,\n\t\t]\n\t);\n\n\tconst onPaste = useCallback(\n\t\t( {\n\t\t\tvalue,\n\t\t\tonChange,\n\t\t\thtml,\n\t\t\tplainText,\n\t\t\tisInternal,\n\t\t\tfiles,\n\t\t\tactiveFormats,\n\t\t} ) => {\n\t\t\t// If the data comes from a rich text instance, we can directly use it\n\t\t\t// without filtering the data. The filters are only meant for externally\n\t\t\t// pasted content and remove inline styles.\n\t\t\tif ( isInternal ) {\n\t\t\t\tconst pastedValue = create( {\n\t\t\t\t\thtml,\n\t\t\t\t\tpreserveWhiteSpace,\n\t\t\t\t} );\n\t\t\t\taddActiveFormats( pastedValue, activeFormats );\n\t\t\t\tonChange( insert( value, pastedValue ) );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( pastePlainText ) {\n\t\t\t\tonChange( insert( value, create( { text: plainText } ) ) );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Only process file if no HTML is present.\n\t\t\t// Note: a pasted file may have the URL as plain text.\n\t\t\tif ( files && files.length && ! html ) {\n\t\t\t\tconst content = pasteHandler( {\n\t\t\t\t\tHTML: filePasteHandler( files ),\n\t\t\t\t\tmode: 'BLOCKS',\n\t\t\t\t\ttagName,\n\t\t\t\t\tpreserveWhiteSpace,\n\t\t\t\t} );\n\n\t\t\t\t// Allows us to ask for this information when we get a report.\n\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\twindow.console.log( 'Received items:\\n\\n', files );\n\n\t\t\t\tif ( onReplace && isEmpty( value ) ) {\n\t\t\t\t\tonReplace( content );\n\t\t\t\t} else {\n\t\t\t\t\tsplitValue( value, content );\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlet mode = onReplace && onSplit ? 'AUTO' : 'INLINE';\n\n\t\t\tconst isPastedURL = isURL( plainText.trim() );\n\t\t\tconst presentEmbedHandlerPicker = () =>\n\t\t\t\tembedHandlerPickerRef.current?.presentPicker( {\n\t\t\t\t\tcreateEmbed: () =>\n\t\t\t\t\t\tonReplace( content, content.length - 1, -1 ),\n\t\t\t\t\tcreateLink: () =>\n\t\t\t\t\t\tcreateLinkInParagraph( plainText.trim(), onReplace ),\n\t\t\t\t} );\n\n\t\t\tif (\n\t\t\t\t__unstableEmbedURLOnPaste &&\n\t\t\t\tisEmpty( value ) &&\n\t\t\t\tisPastedURL\n\t\t\t) {\n\t\t\t\tmode = 'BLOCKS';\n\t\t\t}\n\n\t\t\tconst content = pasteHandler( {\n\t\t\t\tHTML: html,\n\t\t\t\tplainText,\n\t\t\t\tmode,\n\t\t\t\ttagName,\n\t\t\t\tpreserveWhiteSpace,\n\t\t\t} );\n\n\t\t\tif ( typeof content === 'string' ) {\n\t\t\t\tconst valueToInsert = create( { html: content } );\n\t\t\t\taddActiveFormats( valueToInsert, activeFormats );\n\t\t\t\tonChange( insert( value, valueToInsert ) );\n\t\t\t} else if ( content.length > 0 ) {\n\t\t\t\t// When an URL is pasted in an empty paragraph then the EmbedHandlerPicker should showcase options allowing the transformation of that URL\n\t\t\t\t// into either an Embed block or a link within the target paragraph. If the paragraph is non-empty, the URL is pasted as text.\n\t\t\t\tconst canPasteEmbed =\n\t\t\t\t\tisPastedURL &&\n\t\t\t\t\tcontent.length === 1 &&\n\t\t\t\t\tcontent[ 0 ].name === 'core/embed';\n\t\t\t\tif ( onReplace && isEmpty( value ) ) {\n\t\t\t\t\tif ( canPasteEmbed ) {\n\t\t\t\t\t\tonChange(\n\t\t\t\t\t\t\tinsert( value, create( { text: plainText } ) )\n\t\t\t\t\t\t);\n\t\t\t\t\t\tif ( __unstableEmbedURLOnPaste ) {\n\t\t\t\t\t\t\tpresentEmbedHandlerPicker();\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tonReplace( content, content.length - 1, -1, {\n\t\t\t\t\t\tsource: 'clipboard',\n\t\t\t\t\t} );\n\t\t\t\t} else {\n\t\t\t\t\tif ( canPasteEmbed ) {\n\t\t\t\t\t\tonChange(\n\t\t\t\t\t\t\tinsert( value, create( { text: plainText } ) )\n\t\t\t\t\t\t);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tsplitValue( value, content );\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t[\n\t\t\ttagName,\n\t\t\tonReplace,\n\t\t\tonSplit,\n\t\t\tsplitValue,\n\t\t\t__unstableEmbedURLOnPaste,\n\t\t\tpreserveWhiteSpace,\n\t\t\tpastePlainText,\n\t\t]\n\t);\n\n\tconst inputRule = useCallback(\n\t\t( value, valueToFormat ) => {\n\t\t\tif ( ! onReplace ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst { start: startPosition, text } = value;\n\t\t\tconst characterBefore = text.slice(\n\t\t\t\tstartPosition - 1,\n\t\t\t\tstartPosition\n\t\t\t);\n\n\t\t\t// The character right before the caret must be a plain space.\n\t\t\tif ( characterBefore !== ' ' ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst trimmedTextBefore = text.slice( 0, startPosition ).trim();\n\t\t\tconst prefixTransforms = getBlockTransforms( 'from' ).filter(\n\t\t\t\t( { type } ) => type === 'prefix'\n\t\t\t);\n\t\t\tconst transformation = findTransform(\n\t\t\t\tprefixTransforms,\n\t\t\t\t( { prefix } ) => {\n\t\t\t\t\treturn trimmedTextBefore === prefix;\n\t\t\t\t}\n\t\t\t);\n\n\t\t\tif ( ! transformation ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst content = valueToFormat(\n\t\t\t\tslice( value, startPosition, text.length )\n\t\t\t);\n\t\t\tconst block = transformation.transform( content );\n\n\t\t\tonReplace( [ block ] );\n\t\t\t__unstableMarkAutomaticChange();\n\t\t},\n\t\t[ onReplace, __unstableMarkAutomaticChange ]\n\t);\n\n\tconst mergedRef = useMergeRefs( [ providedRef, fallbackRef ] );\n\n\treturn (\n\t\t<RichText\n\t\t\tclientId={ clientId }\n\t\t\tidentifier={ identifier }\n\t\t\tnativeEditorRef={ mergedRef }\n\t\t\tvalue={ adjustedValue }\n\t\t\tonChange={ adjustedOnChange }\n\t\t\tselectionStart={ selectionStart }\n\t\t\tselectionEnd={ selectionEnd }\n\t\t\tonSelectionChange={ onSelectionChange }\n\t\t\ttagName={ tagName }\n\t\t\tstart={ start }\n\t\t\treversed={ reversed }\n\t\t\tplaceholder={ placeholder }\n\t\t\tallowedFormats={ adjustedAllowedFormats }\n\t\t\twithoutInteractiveFormatting={ withoutInteractiveFormatting }\n\t\t\tonEnter={ onEnter }\n\t\t\tonDelete={ onDelete }\n\t\t\tonPaste={ onPaste }\n\t\t\t__unstableIsSelected={ isSelected }\n\t\t\t__unstableInputRule={ inputRule }\n\t\t\t__unstableOnEnterFormattedText={ enterFormattedText }\n\t\t\t__unstableOnExitFormattedText={ exitFormattedText }\n\t\t\t__unstableOnCreateUndoLevel={ __unstableMarkLastChangeAsPersistent }\n\t\t\t__unstableMarkAutomaticChange={ __unstableMarkAutomaticChange }\n\t\t\t__unstableDidAutomaticChange={ didAutomaticChange }\n\t\t\t__unstableUndo={ undo }\n\t\t\t__unstableDisableFormats={ disableFormats }\n\t\t\tpreserveWhiteSpace={ preserveWhiteSpace }\n\t\t\tdisabled={ disabled }\n\t\t\tunstableOnFocus={ unstableOnFocus }\n\t\t\t__unstableAllowPrefixTransformations={\n\t\t\t\t__unstableAllowPrefixTransformations\n\t\t\t}\n\t\t\t// Native props.\n\t\t\tblockIsSelected={\n\t\t\t\toriginalIsSelected !== undefined\n\t\t\t\t\t? originalIsSelected\n\t\t\t\t\t: blockIsSelected\n\t\t\t}\n\t\t\tshouldBlurOnUnmount={ shouldBlurOnUnmount }\n\t\t\t__unstableMobileNoFocusOnMount={ __unstableMobileNoFocusOnMount }\n\t\t\tdeleteEnter={ deleteEnter }\n\t\t\tplaceholderTextColor={ placeholderTextColor }\n\t\t\ttextAlign={ textAlign }\n\t\t\tselectionColor={ selectionColor }\n\t\t\ttagsToEliminate={ tagsToEliminate }\n\t\t\tdisableEditingMenu={ disableEditingMenu }\n\t\t\tfontSize={ fontSize }\n\t\t\tfontFamily={ fontFamily }\n\t\t\tfontWeight={ fontWeight }\n\t\t\tfontStyle={ fontStyle }\n\t\t\tminWidth={ minWidth }\n\t\t\tmaxWidth={ maxWidth }\n\t\t\tonBlur={ onBlur }\n\t\t\tdisableSuggestions={ disableSuggestions }\n\t\t\tdisableAutocorrection={ disableAutocorrection }\n\t\t\tcontainerWidth={ containerWidth }\n\t\t\tclearCurrentSelectionOnUnmount={ clearCurrentSelectionOnUnmount }\n\t\t\t// Props to be set on the editable container are destructured on the\n\t\t\t// element itself for web (see below), but passed through rich text\n\t\t\t// for native.\n\t\t\tid={ props.id }\n\t\t\tstyle={ props.style }\n\t\t>\n\t\t\t{ ( {\n\t\t\t\tisSelected: nestedIsSelected,\n\t\t\t\tvalue,\n\t\t\t\tonChange,\n\t\t\t\tonFocus,\n\t\t\t\teditableProps,\n\t\t\t\teditableTagName: TagName,\n\t\t\t} ) => (\n\t\t\t\t<>\n\t\t\t\t\t{ children && children( { value, onChange, onFocus } ) }\n\t\t\t\t\t{ nestedIsSelected && hasFormats && (\n\t\t\t\t\t\t<FormatToolbarContainer\n\t\t\t\t\t\t\tinline={ inlineToolbar }\n\t\t\t\t\t\t\tanchorRef={ fallbackRef.current }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ nestedIsSelected && <RemoveBrowserShortcuts /> }\n\t\t\t\t\t<Autocomplete\n\t\t\t\t\t\tonReplace={ onReplace }\n\t\t\t\t\t\tcompleters={ autocompleters }\n\t\t\t\t\t\trecord={ value }\n\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\tisSelected={ nestedIsSelected }\n\t\t\t\t\t\tcontentRef={ fallbackRef }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ ( { listBoxId, activeId, onKeyDown } ) => (\n\t\t\t\t\t\t\t<TagName\n\t\t\t\t\t\t\t\t{ ...editableProps }\n\t\t\t\t\t\t\t\t{ ...props }\n\t\t\t\t\t\t\t\tstyle={\n\t\t\t\t\t\t\t\t\tprops.style\n\t\t\t\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\t\t\t\t...props.style,\n\t\t\t\t\t\t\t\t\t\t\t\t...editableProps.style,\n\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t: editableProps.style\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t\t\tclasses,\n\t\t\t\t\t\t\t\t\tprops.className,\n\t\t\t\t\t\t\t\t\teditableProps.className\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\taria-autocomplete={\n\t\t\t\t\t\t\t\t\tlistBoxId ? 'list' : undefined\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\taria-owns={ listBoxId }\n\t\t\t\t\t\t\t\taria-activedescendant={ activeId }\n\t\t\t\t\t\t\t\tonKeyDown={ ( event ) => {\n\t\t\t\t\t\t\t\t\tonKeyDown( event );\n\t\t\t\t\t\t\t\t\teditableProps.onKeyDown( event );\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</Autocomplete>\n\t\t\t\t\t<EmbedHandlerPicker ref={ embedHandlerPickerRef } />\n\t\t\t\t</>\n\t\t\t) }\n\t\t</RichText>\n\t);\n}\n\n// This export does not actually implement a private API, but was exported\n// under this name for interoperability with the web version of the RichText\n// component.\nexport const PrivateRichText = withDeprecations(\n\tforwardRef( RichTextWrapper )\n);\n\nPrivateRichText.Content = Content;\n\nPrivateRichText.isEmpty = ( value ) => {\n\treturn ! value || value.length === 0;\n};\n\nPrivateRichText.Content.defaultProps = {\n\tformat: 'string',\n\tvalue: '',\n};\n\nPrivateRichText.Raw = forwardRef( ( props, ref ) => (\n\t<RichText { ...props } nativeEditorRef={ ref } />\n) );\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/rich-text/README.md\n */\nexport default PrivateRichText;\nexport { RichTextShortcut } from './shortcut';\nexport { RichTextToolbarButton } from './toolbar-button';\nexport { __unstableRichTextInputEvent } from './input-event';\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,QAAQ,EAAEC,MAAM,EAAEC,WAAW,EAAEC,UAAU,QAAQ,oBAAoB;AAC9E,SAASC,WAAW,EAAEC,SAAS,QAAQ,iBAAiB;AACxD,SACCC,YAAY,EACZC,QAAQ,IAAIC,cAAc,EAC1BC,kBAAkB,EAClBC,aAAa,EACbC,wBAAwB,QAClB,mBAAmB;AAC1B,SAASC,aAAa,EAAEC,YAAY,QAAQ,oBAAoB;AAChE,SACCC,uBAAuB,EACvBC,OAAO,EACPC,MAAM,EACNC,MAAM,EACNC,MAAM,EACNC,KAAK,EACLC,YAAY,EACZC,KAAK,QACC,sBAAsB;AAC7B,SAASC,KAAK,QAAQ,gBAAgB;;AAEtC;AACA;AACA;AACA,OAAOC,YAAY,MAAM,iBAAiB;AAC1C,SAASC,mBAAmB,QAAQ,eAAe;AACnD,SAASC,sBAAsB,QAAQ,4BAA4B;AACnE,SAASC,gBAAgB,QAAQ,sBAAsB;AACvD,OAAOC,sBAAsB,MAAM,4BAA4B;AAC/D,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;AACvD,SACCC,gBAAgB,EAChBC,iBAAiB,EACjBC,qBAAqB,QACf,SAAS;AAChB,OAAOC,kBAAkB,MAAM,wBAAwB;AACvD,SAASC,OAAO,QAAQ,WAAW;AACnC,OAAOC,QAAQ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2B,KAAK,IAAM;EACtC,OAAO,CAAEA,KAAK,IAAIA,KAAK,CAACwF,MAAM,KAAK,CAAC;AACrC,CAAC;AAEDsG,eAAe,CAACtM,OAAO,CAACuM,YAAY,GAAG;EACtCC,MAAM,EAAE,QAAQ;EAChBhM,KAAK,EAAE;AACR,CAAC;AAED8L,eAAe,CAACG,GAAG,GAAGxO,UAAU,CAAE,CAAE0F,KAAK,EAAE0I,GAAG,KAC7C1B,aAAA,CAAC1K,QAAQ;EAAA,GAAM0D,KAAK;EAAGiH,eAAe,EAAGyB;AAAK,CAAE,CAC/C,CAAC;;AAEH;AACA;AACA;AACA,eAAeC,eAAe;AAC9B,SAASI,gBAAgB,QAAQ,YAAY;AAC7C,SAASC,qBAAqB,QAAQ,kBAAkB;AACxD,SAASC,4BAA4B,QAAQ,eAAe","ignoreList":[]}
@@ -4,7 +4,9 @@ import { createElement } from "react";
4
4
  */
5
5
  import { forwardRef } from '@wordpress/element';
6
6
  import deprecated from '@wordpress/deprecated';
7
- import { useDispatch } from '@wordpress/data';
7
+ import { useDispatch, useSelect } from '@wordpress/data';
8
+ import { ENTER } from '@wordpress/keycodes';
9
+ import { create, split, toHTMLString } from '@wordpress/rich-text';
8
10
 
9
11
  /**
10
12
  * Internal dependencies
@@ -31,6 +33,10 @@ function RichTextMultiline({
31
33
  const {
32
34
  clientId
33
35
  } = useBlockEditContext();
36
+ const {
37
+ getSelectionStart,
38
+ getSelectionEnd
39
+ } = useSelect(blockEditorStore);
34
40
  const {
35
41
  selectionChange
36
42
  } = useDispatch(blockEditorStore);
@@ -57,8 +63,30 @@ function RichTextMultiline({
57
63
  _onChange(newValues);
58
64
  },
59
65
  isSelected: undefined,
60
- onSplit: v => v,
61
- onReplace: array => {
66
+ onKeyDown: event => {
67
+ if (event.keyCode !== ENTER) {
68
+ return;
69
+ }
70
+ event.preventDefault();
71
+ const {
72
+ offset: start
73
+ } = getSelectionStart();
74
+ const {
75
+ offset: end
76
+ } = getSelectionEnd();
77
+
78
+ // Cannot split if there is no selection.
79
+ if (typeof start !== 'number' || typeof end !== 'number') {
80
+ return;
81
+ }
82
+ const richTextValue = create({
83
+ html: _value
84
+ });
85
+ richTextValue.start = start;
86
+ richTextValue.end = end;
87
+ const array = split(richTextValue).map(v => toHTMLString({
88
+ value: v
89
+ }));
62
90
  const newValues = values.slice();
63
91
  newValues.splice(index, 1, ...array);
64
92
  _onChange(newValues);
@@ -68,11 +96,15 @@ function RichTextMultiline({
68
96
  const newValues = values.slice();
69
97
  let offset = 0;
70
98
  if (forward) {
71
- if (!newValues[index + 1]) return;
99
+ if (!newValues[index + 1]) {
100
+ return;
101
+ }
72
102
  newValues.splice(index, 2, newValues[index] + newValues[index + 1]);
73
103
  offset = newValues[index].length - 1;
74
104
  } else {
75
- if (!newValues[index - 1]) return;
105
+ if (!newValues[index - 1]) {
106
+ return;
107
+ }
76
108
  newValues.splice(index - 1, 2, newValues[index - 1] + newValues[index]);
77
109
  offset = newValues[index - 1].length - 1;
78
110
  }
@@ -1 +1 @@
1
- {"version":3,"names":["forwardRef","deprecated","useDispatch","RichTextWrapper","store","blockEditorStore","useBlockEditContext","getMultilineTag","RichTextMultiline","children","identifier","tagName","TagName","value","onChange","multiline","props","forwardedRef","since","version","alternative","link","clientId","selectionChange","multilineTagName","padded","values","split","shift","pop","_onChange","newValues","join","createElement","ref","map","_value","index","key","newValue","slice","isSelected","undefined","onSplit","v","onReplace","array","splice","onMerge","forward","offset","length"],"sources":["@wordpress/block-editor/src/components/rich-text/multiline.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\nimport { useDispatch } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { RichTextWrapper } from './';\nimport { store as blockEditorStore } from '../../store';\nimport { useBlockEditContext } from '../block-edit';\nimport { getMultilineTag } from './utils';\n\nfunction RichTextMultiline(\n\t{\n\t\tchildren,\n\t\tidentifier,\n\t\ttagName: TagName = 'div',\n\t\tvalue = '',\n\t\tonChange,\n\t\tmultiline,\n\t\t...props\n\t},\n\tforwardedRef\n) {\n\tdeprecated( 'wp.blockEditor.RichText multiline prop', {\n\t\tsince: '6.1',\n\t\tversion: '6.3',\n\t\talternative: 'nested blocks (InnerBlocks)',\n\t\tlink: 'https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/nested-blocks-inner-blocks/',\n\t} );\n\n\tconst { clientId } = useBlockEditContext();\n\tconst { selectionChange } = useDispatch( blockEditorStore );\n\n\tconst multilineTagName = getMultilineTag( multiline );\n\tvalue = value || `<${ multilineTagName }></${ multilineTagName }>`;\n\tconst padded = `</${ multilineTagName }>${ value }<${ multilineTagName }>`;\n\tconst values = padded.split(\n\t\t`</${ multilineTagName }><${ multilineTagName }>`\n\t);\n\n\tvalues.shift();\n\tvalues.pop();\n\n\tfunction _onChange( newValues ) {\n\t\tonChange(\n\t\t\t`<${ multilineTagName }>${ newValues.join(\n\t\t\t\t`</${ multilineTagName }><${ multilineTagName }>`\n\t\t\t) }</${ multilineTagName }>`\n\t\t);\n\t}\n\n\treturn (\n\t\t<TagName ref={ forwardedRef }>\n\t\t\t{ values.map( ( _value, index ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<RichTextWrapper\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\tidentifier={ `${ identifier }-${ index }` }\n\t\t\t\t\t\ttagName={ multilineTagName }\n\t\t\t\t\t\tvalue={ _value }\n\t\t\t\t\t\tonChange={ ( newValue ) => {\n\t\t\t\t\t\t\tconst newValues = values.slice();\n\t\t\t\t\t\t\tnewValues[ index ] = newValue;\n\t\t\t\t\t\t\t_onChange( newValues );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tisSelected={ undefined }\n\t\t\t\t\t\tonSplit={ ( v ) => v }\n\t\t\t\t\t\tonReplace={ ( array ) => {\n\t\t\t\t\t\t\tconst newValues = values.slice();\n\t\t\t\t\t\t\tnewValues.splice( index, 1, ...array );\n\t\t\t\t\t\t\t_onChange( newValues );\n\t\t\t\t\t\t\tselectionChange(\n\t\t\t\t\t\t\t\tclientId,\n\t\t\t\t\t\t\t\t`${ identifier }-${ index + 1 }`,\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t0\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tonMerge={ ( forward ) => {\n\t\t\t\t\t\t\tconst newValues = values.slice();\n\t\t\t\t\t\t\tlet offset = 0;\n\t\t\t\t\t\t\tif ( forward ) {\n\t\t\t\t\t\t\t\tif ( ! newValues[ index + 1 ] ) return;\n\t\t\t\t\t\t\t\tnewValues.splice(\n\t\t\t\t\t\t\t\t\tindex,\n\t\t\t\t\t\t\t\t\t2,\n\t\t\t\t\t\t\t\t\tnewValues[ index ] + newValues[ index + 1 ]\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\toffset = newValues[ index ].length - 1;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tif ( ! newValues[ index - 1 ] ) return;\n\t\t\t\t\t\t\t\tnewValues.splice(\n\t\t\t\t\t\t\t\t\tindex - 1,\n\t\t\t\t\t\t\t\t\t2,\n\t\t\t\t\t\t\t\t\tnewValues[ index - 1 ] + newValues[ index ]\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\toffset = newValues[ index - 1 ].length - 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t_onChange( newValues );\n\t\t\t\t\t\t\tselectionChange(\n\t\t\t\t\t\t\t\tclientId,\n\t\t\t\t\t\t\t\t`${ identifier }-${\n\t\t\t\t\t\t\t\t\tindex - ( forward ? 0 : 1 )\n\t\t\t\t\t\t\t\t}`,\n\t\t\t\t\t\t\t\toffset,\n\t\t\t\t\t\t\t\toffset\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} }\n\t\t\t\t\t\t{ ...props }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</TagName>\n\t);\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SAAS,CAAEM,KAAK,CAAE,GAAGN,SAAS,CAAEM,KAAK,GAAG,CAAC,CAC1C,CAAC;UACDa,MAAM,GAAGnB,SAAS,CAAEM,KAAK,CAAE,CAACc,MAAM,GAAG,CAAC;QACvC,CAAC,MAAM;UACN,IAAK,CAAEpB,SAAS,CAAEM,KAAK,GAAG,CAAC,CAAE,EAAG;UAChCN,SAAS,CAACgB,MAAM,CACfV,KAAK,GAAG,CAAC,EACT,CAAC,EACDN,SAAS,CAAEM,KAAK,GAAG,CAAC,CAAE,GAAGN,SAAS,CAAEM,KAAK,CAC1C,CAAC;UACDa,MAAM,GAAGnB,SAAS,CAAEM,KAAK,GAAG,CAAC,CAAE,CAACc,MAAM,GAAG,CAAC;QAC3C;QACArB,SAAS,CAAEC,SAAU,CAAC;QACtBR,eAAe,CACdD,QAAQ,EACP,GAAGZ,UAAY,IACf2B,KAAK,IAAKY,OAAO,GAAG,CAAC,GAAG,CAAC,CACzB,EAAC,EACFC,MAAM,EACNA,MACD,CAAC;MACF,CAAG;MAAA,GACElC;IAAK,CACV,CAAC;EAEJ,CAAE,CACM,CAAC;AAEZ;AAEA,eAAehB,UAAU,CAAEQ,iBAAkB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["forwardRef","deprecated","useDispatch","useSelect","ENTER","create","split","toHTMLString","RichTextWrapper","store","blockEditorStore","useBlockEditContext","getMultilineTag","RichTextMultiline","children","identifier","tagName","TagName","value","onChange","multiline","props","forwardedRef","since","version","alternative","link","clientId","getSelectionStart","getSelectionEnd","selectionChange","multilineTagName","padded","values","shift","pop","_onChange","newValues","join","createElement","ref","map","_value","index","key","newValue","slice","isSelected","undefined","onKeyDown","event","keyCode","preventDefault","offset","start","end","richTextValue","html","array","v","splice","onMerge","forward","length"],"sources":["@wordpress/block-editor/src/components/rich-text/multiline.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { ENTER } from '@wordpress/keycodes';\nimport { create, split, toHTMLString } from '@wordpress/rich-text';\n\n/**\n * Internal dependencies\n */\nimport { RichTextWrapper } from './';\nimport { store as blockEditorStore } from '../../store';\nimport { useBlockEditContext } from '../block-edit';\nimport { getMultilineTag } from './utils';\n\nfunction RichTextMultiline(\n\t{\n\t\tchildren,\n\t\tidentifier,\n\t\ttagName: TagName = 'div',\n\t\tvalue = '',\n\t\tonChange,\n\t\tmultiline,\n\t\t...props\n\t},\n\tforwardedRef\n) {\n\tdeprecated( 'wp.blockEditor.RichText multiline prop', {\n\t\tsince: '6.1',\n\t\tversion: '6.3',\n\t\talternative: 'nested blocks (InnerBlocks)',\n\t\tlink: 'https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/nested-blocks-inner-blocks/',\n\t} );\n\n\tconst { clientId } = useBlockEditContext();\n\tconst { getSelectionStart, getSelectionEnd } =\n\t\tuseSelect( blockEditorStore );\n\tconst { selectionChange } = useDispatch( blockEditorStore );\n\n\tconst multilineTagName = getMultilineTag( multiline );\n\tvalue = value || `<${ multilineTagName }></${ multilineTagName }>`;\n\tconst padded = `</${ multilineTagName }>${ value }<${ multilineTagName }>`;\n\tconst values = padded.split(\n\t\t`</${ multilineTagName }><${ multilineTagName }>`\n\t);\n\n\tvalues.shift();\n\tvalues.pop();\n\n\tfunction _onChange( newValues ) {\n\t\tonChange(\n\t\t\t`<${ multilineTagName }>${ newValues.join(\n\t\t\t\t`</${ multilineTagName }><${ multilineTagName }>`\n\t\t\t) }</${ multilineTagName }>`\n\t\t);\n\t}\n\n\treturn (\n\t\t<TagName ref={ forwardedRef }>\n\t\t\t{ values.map( ( _value, index ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<RichTextWrapper\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\tidentifier={ `${ identifier }-${ index }` }\n\t\t\t\t\t\ttagName={ multilineTagName }\n\t\t\t\t\t\tvalue={ _value }\n\t\t\t\t\t\tonChange={ ( newValue ) => {\n\t\t\t\t\t\t\tconst newValues = values.slice();\n\t\t\t\t\t\t\tnewValues[ index ] = newValue;\n\t\t\t\t\t\t\t_onChange( newValues );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tisSelected={ undefined }\n\t\t\t\t\t\tonKeyDown={ ( event ) => {\n\t\t\t\t\t\t\tif ( event.keyCode !== ENTER ) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tevent.preventDefault();\n\n\t\t\t\t\t\t\tconst { offset: start } = getSelectionStart();\n\t\t\t\t\t\t\tconst { offset: end } = getSelectionEnd();\n\n\t\t\t\t\t\t\t// Cannot split if there is no selection.\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\ttypeof start !== 'number' ||\n\t\t\t\t\t\t\t\ttypeof end !== 'number'\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tconst richTextValue = create( { html: _value } );\n\t\t\t\t\t\t\trichTextValue.start = start;\n\t\t\t\t\t\t\trichTextValue.end = end;\n\n\t\t\t\t\t\t\tconst array = split( richTextValue ).map( ( v ) =>\n\t\t\t\t\t\t\t\ttoHTMLString( { value: v } )\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\tconst newValues = values.slice();\n\t\t\t\t\t\t\tnewValues.splice( index, 1, ...array );\n\t\t\t\t\t\t\t_onChange( newValues );\n\t\t\t\t\t\t\tselectionChange(\n\t\t\t\t\t\t\t\tclientId,\n\t\t\t\t\t\t\t\t`${ identifier }-${ index + 1 }`,\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t0\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tonMerge={ ( forward ) => {\n\t\t\t\t\t\t\tconst newValues = values.slice();\n\t\t\t\t\t\t\tlet offset = 0;\n\t\t\t\t\t\t\tif ( forward ) {\n\t\t\t\t\t\t\t\tif ( ! newValues[ index + 1 ] ) {\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tnewValues.splice(\n\t\t\t\t\t\t\t\t\tindex,\n\t\t\t\t\t\t\t\t\t2,\n\t\t\t\t\t\t\t\t\tnewValues[ index ] + newValues[ index + 1 ]\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\toffset = newValues[ index ].length - 1;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tif ( ! newValues[ index - 1 ] ) {\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tnewValues.splice(\n\t\t\t\t\t\t\t\t\tindex - 1,\n\t\t\t\t\t\t\t\t\t2,\n\t\t\t\t\t\t\t\t\tnewValues[ index - 1 ] + newValues[ index ]\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\toffset = newValues[ index - 1 ].length - 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t_onChange( newValues );\n\t\t\t\t\t\t\tselectionChange(\n\t\t\t\t\t\t\t\tclientId,\n\t\t\t\t\t\t\t\t`${ identifier }-${\n\t\t\t\t\t\t\t\t\tindex - ( forward ? 0 : 1 )\n\t\t\t\t\t\t\t\t}`,\n\t\t\t\t\t\t\t\toffset,\n\t\t\t\t\t\t\t\toffset\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} }\n\t\t\t\t\t\t{ ...props }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</TagName>\n\t);\n}\n\nexport default forwardRef( RichTextMultiline );\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,UAAU,QAAQ,oBAAoB;AAC/C,OAAOC,UAAU,MAAM,uBAAuB;AAC9C,SAASC,WAAW,EAAEC,SAAS,QAAQ,iBAAiB;AACxD,SAASC,KAAK,QAAQ,qBAAqB;AAC3C,SAASC,MAAM,EAAEC,KAAK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A,MACD,CAAC;MACF,CAAG;MAAA,GACEhC;IAAK,CACV,CAAC;EAEJ,CAAE,CACM,CAAC;AAEZ;AAEA,eAAerB,UAAU,CAAEa,iBAAkB,CAAC","ignoreList":[]}
@@ -728,6 +728,18 @@ export class RichText extends Component {
728
728
  });
729
729
  }
730
730
  }
731
+ componentWillUnmount() {
732
+ const {
733
+ clearCurrentSelectionOnUnmount
734
+ } = this.props;
735
+
736
+ // There are cases when the component is unmounted e.g. scrolling in a
737
+ // long post due to virtualization, so the block selection needs to be cleared
738
+ // so it doesn't auto-focus when it's added back.
739
+ if (this._editor?.isFocused()) {
740
+ clearCurrentSelectionOnUnmount?.();
741
+ }
742
+ }
731
743
  getHtmlToRender(record, tagName) {
732
744
  // Save back to HTML from React tree.
733
745
  let value = this.valueToFormat(record);