@wordpress/block-editor 12.26.0 → 13.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1708) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +1 -1
  3. package/build/autocompleters/block.js +7 -6
  4. package/build/autocompleters/block.js.map +1 -1
  5. package/build/autocompleters/link.js +10 -8
  6. package/build/autocompleters/link.js.map +1 -1
  7. package/build/components/alignment-control/index.js +3 -3
  8. package/build/components/alignment-control/index.js.map +1 -1
  9. package/build/components/alignment-control/ui.js +2 -2
  10. package/build/components/alignment-control/ui.js.map +1 -1
  11. package/build/components/audio-player/audio-url-parser.native.js +24 -0
  12. package/build/components/audio-player/audio-url-parser.native.js.map +1 -0
  13. package/build/components/audio-player/index.native.js +174 -0
  14. package/build/components/audio-player/index.native.js.map +1 -0
  15. package/build/components/autocomplete/index.js +3 -4
  16. package/build/components/autocomplete/index.js.map +1 -1
  17. package/build/components/block-alignment-control/index.js +3 -3
  18. package/build/components/block-alignment-control/index.js.map +1 -1
  19. package/build/components/block-alignment-control/ui.js +33 -30
  20. package/build/components/block-alignment-control/ui.js.map +1 -1
  21. package/build/components/block-alignment-control/ui.native.js +2 -2
  22. package/build/components/block-alignment-control/ui.native.js.map +1 -1
  23. package/build/components/block-alignment-matrix-control/index.js +5 -5
  24. package/build/components/block-alignment-matrix-control/index.js.map +1 -1
  25. package/build/components/block-bindings-toolbar-indicator/index.js +92 -11
  26. package/build/components/block-bindings-toolbar-indicator/index.js.map +1 -1
  27. package/build/components/block-breadcrumb/index.js +38 -34
  28. package/build/components/block-breadcrumb/index.js.map +1 -1
  29. package/build/components/block-canvas/index.js +36 -31
  30. package/build/components/block-canvas/index.js.map +1 -1
  31. package/build/components/block-caption/index.native.js +15 -14
  32. package/build/components/block-caption/index.native.js.map +1 -1
  33. package/build/components/block-card/index.js +32 -27
  34. package/build/components/block-card/index.js.map +1 -1
  35. package/build/components/block-compare/block-view.js +27 -18
  36. package/build/components/block-compare/block-view.js.map +1 -1
  37. package/build/components/block-compare/index.js +23 -22
  38. package/build/components/block-compare/index.js.map +1 -1
  39. package/build/components/block-context/index.js +3 -4
  40. package/build/components/block-context/index.js.map +1 -1
  41. package/build/components/block-controls/fill.js +22 -16
  42. package/build/components/block-controls/fill.js.map +1 -1
  43. package/build/components/block-controls/index.js +3 -3
  44. package/build/components/block-controls/index.js.map +1 -1
  45. package/build/components/block-controls/slot.js +6 -4
  46. package/build/components/block-controls/slot.js.map +1 -1
  47. package/build/components/block-controls/slot.native.js +12 -9
  48. package/build/components/block-controls/slot.native.js.map +1 -1
  49. package/build/components/block-controls/use-has-block-controls.js +1 -1
  50. package/build/components/block-controls/use-has-block-controls.js.map +1 -1
  51. package/build/components/block-draggable/draggable-chip.js +27 -19
  52. package/build/components/block-draggable/draggable-chip.js.map +1 -1
  53. package/build/components/block-draggable/draggable-chip.native.js +9 -8
  54. package/build/components/block-draggable/draggable-chip.native.js.map +1 -1
  55. package/build/components/block-draggable/dropping-insertion-point.native.js +3 -4
  56. package/build/components/block-draggable/dropping-insertion-point.native.js.map +1 -1
  57. package/build/components/block-draggable/index.js +14 -13
  58. package/build/components/block-draggable/index.js.map +1 -1
  59. package/build/components/block-draggable/index.native.js +37 -30
  60. package/build/components/block-draggable/index.native.js.map +1 -1
  61. package/build/components/block-edit/edit.js +5 -6
  62. package/build/components/block-edit/edit.js.map +1 -1
  63. package/build/components/block-edit/edit.native.js +3 -4
  64. package/build/components/block-edit/edit.native.js.map +1 -1
  65. package/build/components/block-edit/index.js +17 -9
  66. package/build/components/block-edit/index.js.map +1 -1
  67. package/build/components/block-edit/multiple-usage-warning.js +47 -0
  68. package/build/components/block-edit/multiple-usage-warning.js.map +1 -0
  69. package/build/components/block-edit-visually-button/index.js +9 -6
  70. package/build/components/block-edit-visually-button/index.js.map +1 -1
  71. package/build/components/block-full-height-alignment-control/index.js +2 -2
  72. package/build/components/block-full-height-alignment-control/index.js.map +1 -1
  73. package/build/components/block-heading-level-dropdown/heading-level-icon.js +3 -5
  74. package/build/components/block-heading-level-dropdown/heading-level-icon.js.map +1 -1
  75. package/build/components/block-heading-level-dropdown/index.js +4 -4
  76. package/build/components/block-heading-level-dropdown/index.js.map +1 -1
  77. package/build/components/block-heading-level-dropdown/index.native.js +4 -4
  78. package/build/components/block-heading-level-dropdown/index.native.js.map +1 -1
  79. package/build/components/block-icon/index.js +6 -5
  80. package/build/components/block-icon/index.js.map +1 -1
  81. package/build/components/block-icon/index.native.js +6 -5
  82. package/build/components/block-icon/index.native.js.map +1 -1
  83. package/build/components/block-info-slot-fill/index.js +3 -3
  84. package/build/components/block-info-slot-fill/index.js.map +1 -1
  85. package/build/components/block-inspector/index.js +102 -88
  86. package/build/components/block-inspector/index.js.map +1 -1
  87. package/build/components/block-inspector/useBlockInspectorAnimationSettings.js +2 -2
  88. package/build/components/block-inspector/useBlockInspectorAnimationSettings.js.map +1 -1
  89. package/build/components/block-list/block-crash-warning.js +5 -4
  90. package/build/components/block-list/block-crash-warning.js.map +1 -1
  91. package/build/components/block-list/block-crash-warning.native.js +2 -2
  92. package/build/components/block-list/block-crash-warning.native.js.map +1 -1
  93. package/build/components/block-list/block-html.js +2 -2
  94. package/build/components/block-list/block-html.js.map +1 -1
  95. package/build/components/block-list/block-invalid-warning.js +25 -21
  96. package/build/components/block-list/block-invalid-warning.js.map +1 -1
  97. package/build/components/block-list/block-invalid-warning.native.js +12 -11
  98. package/build/components/block-list/block-invalid-warning.native.js.map +1 -1
  99. package/build/components/block-list/block-list-item-cell.native.js +5 -4
  100. package/build/components/block-list/block-list-item-cell.native.js.map +1 -1
  101. package/build/components/block-list/block-list-item.native.js +29 -28
  102. package/build/components/block-list/block-list-item.native.js.map +1 -1
  103. package/build/components/block-list/block-outline.native.js +2 -2
  104. package/build/components/block-list/block-outline.native.js.map +1 -1
  105. package/build/components/block-list/block-selection-button.native.js +35 -33
  106. package/build/components/block-list/block-selection-button.native.js.map +1 -1
  107. package/build/components/block-list/block.js +107 -62
  108. package/build/components/block-list/block.js.map +1 -1
  109. package/build/components/block-list/block.native.js +63 -54
  110. package/build/components/block-list/block.native.js.map +1 -1
  111. package/build/components/block-list/grid-item.native.js +5 -4
  112. package/build/components/block-list/grid-item.native.js.map +1 -1
  113. package/build/components/block-list/index.js +38 -34
  114. package/build/components/block-list/index.js.map +1 -1
  115. package/build/components/block-list/index.native.js +97 -85
  116. package/build/components/block-list/index.native.js.map +1 -1
  117. package/build/components/block-list/insertion-point.native.js +12 -10
  118. package/build/components/block-list/insertion-point.native.js.map +1 -1
  119. package/build/components/block-list/layout.js +7 -3
  120. package/build/components/block-list/layout.js.map +1 -1
  121. package/build/components/block-list/subdirectory-icon.js +8 -7
  122. package/build/components/block-list/subdirectory-icon.js.map +1 -1
  123. package/build/components/block-list/use-block-props/index.js +1 -1
  124. package/build/components/block-list/use-block-props/index.js.map +1 -1
  125. package/build/components/block-list-appender/index.js +9 -8
  126. package/build/components/block-list-appender/index.js.map +1 -1
  127. package/build/components/block-list-appender/index.native.js +4 -4
  128. package/build/components/block-list-appender/index.native.js.map +1 -1
  129. package/build/components/block-lock/menu-item.js +13 -10
  130. package/build/components/block-lock/menu-item.js.map +1 -1
  131. package/build/components/block-lock/modal.js +107 -90
  132. package/build/components/block-lock/modal.js.map +1 -1
  133. package/build/components/block-lock/toolbar.js +18 -15
  134. package/build/components/block-lock/toolbar.js.map +1 -1
  135. package/build/components/block-media-update-progress/index.native.js +17 -15
  136. package/build/components/block-media-update-progress/index.native.js.map +1 -1
  137. package/build/components/block-mover/button.js +19 -16
  138. package/build/components/block-mover/button.js.map +1 -1
  139. package/build/components/block-mover/index.js +34 -27
  140. package/build/components/block-mover/index.js.map +1 -1
  141. package/build/components/block-mover/index.native.js +29 -27
  142. package/build/components/block-mover/index.native.js.map +1 -1
  143. package/build/components/block-navigation/dropdown.js +11 -9
  144. package/build/components/block-navigation/dropdown.js.map +1 -1
  145. package/build/components/block-parent-selector/index.js +14 -15
  146. package/build/components/block-parent-selector/index.js.map +1 -1
  147. package/build/components/block-pattern-setup/index.js +88 -76
  148. package/build/components/block-pattern-setup/index.js.map +1 -1
  149. package/build/components/block-pattern-setup/setup-toolbar.js +50 -45
  150. package/build/components/block-pattern-setup/setup-toolbar.js.map +1 -1
  151. package/build/components/block-patterns-list/index.js +96 -86
  152. package/build/components/block-patterns-list/index.js.map +1 -1
  153. package/build/components/block-patterns-paging/index.js +70 -52
  154. package/build/components/block-patterns-paging/index.js.map +1 -1
  155. package/build/components/block-popover/cover.js +13 -10
  156. package/build/components/block-popover/cover.js.map +1 -1
  157. package/build/components/block-popover/drop-zone.js +11 -10
  158. package/build/components/block-popover/drop-zone.js.map +1 -1
  159. package/build/components/block-popover/inbetween.js +8 -7
  160. package/build/components/block-popover/inbetween.js.map +1 -1
  161. package/build/components/block-popover/index.js +9 -7
  162. package/build/components/block-popover/index.js.map +1 -1
  163. package/build/components/block-preview/auto.js +53 -47
  164. package/build/components/block-preview/auto.js.map +1 -1
  165. package/build/components/block-preview/index.js +16 -14
  166. package/build/components/block-preview/index.js.map +1 -1
  167. package/build/components/block-quick-navigation/index.js +24 -16
  168. package/build/components/block-quick-navigation/index.js.map +1 -1
  169. package/build/components/block-removal-warning-modal/index.js +18 -12
  170. package/build/components/block-removal-warning-modal/index.js.map +1 -1
  171. package/build/components/block-rename/modal.js +44 -37
  172. package/build/components/block-rename/modal.js.map +1 -1
  173. package/build/components/block-rename/rename-control.js +24 -21
  174. package/build/components/block-rename/rename-control.js.map +1 -1
  175. package/build/components/block-selection-clearer/index.js +2 -2
  176. package/build/components/block-selection-clearer/index.js.map +1 -1
  177. package/build/components/block-settings/button.native.js +13 -9
  178. package/build/components/block-settings/button.native.js.map +1 -1
  179. package/build/components/block-settings/container.native.js +40 -28
  180. package/build/components/block-settings/container.native.js.map +1 -1
  181. package/build/components/block-settings-menu/block-html-convert-button.js +5 -4
  182. package/build/components/block-settings-menu/block-html-convert-button.js.map +1 -1
  183. package/build/components/block-settings-menu/block-mode-toggle.js +5 -4
  184. package/build/components/block-settings-menu/block-mode-toggle.js.map +1 -1
  185. package/build/components/block-settings-menu/block-parent-selector-menu-item.js +7 -6
  186. package/build/components/block-settings-menu/block-parent-selector-menu-item.js.map +1 -1
  187. package/build/components/block-settings-menu/block-settings-dropdown.js +93 -75
  188. package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  189. package/build/components/block-settings-menu/index.js +10 -6
  190. package/build/components/block-settings-menu/index.js.map +1 -1
  191. package/build/components/block-settings-menu-controls/index.js +29 -24
  192. package/build/components/block-settings-menu-controls/index.js.map +1 -1
  193. package/build/components/block-styles/index.js +43 -38
  194. package/build/components/block-styles/index.js.map +1 -1
  195. package/build/components/block-styles/index.native.js +7 -7
  196. package/build/components/block-styles/index.native.js.map +1 -1
  197. package/build/components/block-styles/menu-items.js +17 -14
  198. package/build/components/block-styles/menu-items.js.map +1 -1
  199. package/build/components/block-styles/preview-panel.js +2 -2
  200. package/build/components/block-styles/preview-panel.js.map +1 -1
  201. package/build/components/block-styles/preview.native.js +24 -21
  202. package/build/components/block-styles/preview.native.js.map +1 -1
  203. package/build/components/block-switcher/block-styles-menu.js +8 -7
  204. package/build/components/block-switcher/block-styles-menu.js.map +1 -1
  205. package/build/components/block-switcher/block-transformations-menu.js +32 -30
  206. package/build/components/block-switcher/block-transformations-menu.js.map +1 -1
  207. package/build/components/block-switcher/block-transformations-menu.native.js +2 -2
  208. package/build/components/block-switcher/block-transformations-menu.native.js.map +1 -1
  209. package/build/components/block-switcher/block-variation-transformations.js +19 -17
  210. package/build/components/block-switcher/block-variation-transformations.js.map +1 -1
  211. package/build/components/block-switcher/index.js +85 -70
  212. package/build/components/block-switcher/index.js.map +1 -1
  213. package/build/components/block-switcher/pattern-transformations-menu.js +61 -51
  214. package/build/components/block-switcher/pattern-transformations-menu.js.map +1 -1
  215. package/build/components/block-switcher/preview-block-popover.js +22 -17
  216. package/build/components/block-switcher/preview-block-popover.js.map +1 -1
  217. package/build/components/block-toolbar/block-toolbar-menu.native.js +38 -34
  218. package/build/components/block-toolbar/block-toolbar-menu.native.js.map +1 -1
  219. package/build/components/block-toolbar/index.js +53 -43
  220. package/build/components/block-toolbar/index.js.map +1 -1
  221. package/build/components/block-toolbar/index.native.js +27 -21
  222. package/build/components/block-toolbar/index.native.js.map +1 -1
  223. package/build/components/block-toolbar/shuffle.js +7 -5
  224. package/build/components/block-toolbar/shuffle.js.map +1 -1
  225. package/build/components/block-tools/block-selection-button.js +61 -48
  226. package/build/components/block-tools/block-selection-button.js.map +1 -1
  227. package/build/components/block-tools/block-toolbar-breadcrumb.js +8 -7
  228. package/build/components/block-tools/block-toolbar-breadcrumb.js.map +1 -1
  229. package/build/components/block-tools/block-toolbar-popover.js +15 -14
  230. package/build/components/block-tools/block-toolbar-popover.js.map +1 -1
  231. package/build/components/block-tools/empty-block-inserter.js +13 -11
  232. package/build/components/block-tools/empty-block-inserter.js.map +1 -1
  233. package/build/components/block-tools/index.js +29 -26
  234. package/build/components/block-tools/index.js.map +1 -1
  235. package/build/components/block-tools/insertion-point.js +42 -40
  236. package/build/components/block-tools/insertion-point.js.map +1 -1
  237. package/build/components/block-tools/zoom-out-mode-inserters.js +33 -32
  238. package/build/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
  239. package/build/components/block-types-list/index.js +15 -15
  240. package/build/components/block-types-list/index.js.map +1 -1
  241. package/build/components/block-types-list/index.native.js +30 -26
  242. package/build/components/block-types-list/index.native.js.map +1 -1
  243. package/build/components/block-variation-picker/index.js +30 -25
  244. package/build/components/block-variation-picker/index.js.map +1 -1
  245. package/build/components/block-variation-picker/index.native.js +32 -25
  246. package/build/components/block-variation-picker/index.native.js.map +1 -1
  247. package/build/components/block-variation-transforms/index.js +53 -47
  248. package/build/components/block-variation-transforms/index.js.map +1 -1
  249. package/build/components/block-vertical-alignment-control/icons.js +31 -26
  250. package/build/components/block-vertical-alignment-control/icons.js.map +1 -1
  251. package/build/components/block-vertical-alignment-control/index.js +3 -3
  252. package/build/components/block-vertical-alignment-control/index.js.map +1 -1
  253. package/build/components/block-vertical-alignment-control/ui.js +2 -2
  254. package/build/components/block-vertical-alignment-control/ui.js.map +1 -1
  255. package/build/components/border-radius-control/all-input-control.js +3 -3
  256. package/build/components/border-radius-control/all-input-control.js.map +1 -1
  257. package/build/components/border-radius-control/index.js +43 -38
  258. package/build/components/border-radius-control/index.js.map +1 -1
  259. package/build/components/border-radius-control/input-controls.js +23 -21
  260. package/build/components/border-radius-control/input-controls.js.map +1 -1
  261. package/build/components/border-radius-control/linked-button.js +12 -11
  262. package/build/components/border-radius-control/linked-button.js.map +1 -1
  263. package/build/components/button-block-appender/index.js +15 -12
  264. package/build/components/button-block-appender/index.js.map +1 -1
  265. package/build/components/button-block-appender/index.native.js +28 -24
  266. package/build/components/button-block-appender/index.native.js.map +1 -1
  267. package/build/components/caption/index.native.js +22 -21
  268. package/build/components/caption/index.native.js.map +1 -1
  269. package/build/components/child-layout-control/index.js +137 -129
  270. package/build/components/child-layout-control/index.js.map +1 -1
  271. package/build/components/color-palette/control.js +2 -2
  272. package/build/components/color-palette/control.js.map +1 -1
  273. package/build/components/color-palette/with-color-context.js +2 -2
  274. package/build/components/color-palette/with-color-context.js.map +1 -1
  275. package/build/components/color-style-selector/index.js +29 -20
  276. package/build/components/color-style-selector/index.js.map +1 -1
  277. package/build/components/colors/utils.js +3 -3
  278. package/build/components/colors/utils.js.map +1 -1
  279. package/build/components/colors/with-colors.js +8 -7
  280. package/build/components/colors/with-colors.js.map +1 -1
  281. package/build/components/colors-gradients/control.js +53 -39
  282. package/build/components/colors-gradients/control.js.map +1 -1
  283. package/build/components/colors-gradients/dropdown.js +70 -61
  284. package/build/components/colors-gradients/dropdown.js.map +1 -1
  285. package/build/components/colors-gradients/panel-color-gradient-settings.js +21 -18
  286. package/build/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
  287. package/build/components/colors-gradients/panel-color-gradient-settings.native.js +11 -7
  288. package/build/components/colors-gradients/panel-color-gradient-settings.native.js.map +1 -1
  289. package/build/components/contrast-checker/index.js +10 -8
  290. package/build/components/contrast-checker/index.js.map +1 -1
  291. package/build/components/contrast-checker/index.native.js +12 -10
  292. package/build/components/contrast-checker/index.native.js.map +1 -1
  293. package/build/components/convert-to-group-buttons/index.js +17 -13
  294. package/build/components/convert-to-group-buttons/index.js.map +1 -1
  295. package/build/components/convert-to-group-buttons/toolbar.js +20 -18
  296. package/build/components/convert-to-group-buttons/toolbar.js.map +1 -1
  297. package/build/components/copy-handler/index.js +2 -2
  298. package/build/components/copy-handler/index.js.map +1 -1
  299. package/build/components/date-format-picker/index.js +44 -40
  300. package/build/components/date-format-picker/index.js.map +1 -1
  301. package/build/components/default-block-appender/index.js +32 -30
  302. package/build/components/default-block-appender/index.js.map +1 -1
  303. package/build/components/default-block-appender/index.native.js +14 -12
  304. package/build/components/default-block-appender/index.native.js.map +1 -1
  305. package/build/components/dimensions-tool/aspect-ratio-tool.js +13 -14
  306. package/build/components/dimensions-tool/aspect-ratio-tool.js.map +1 -1
  307. package/build/components/dimensions-tool/index.js +116 -115
  308. package/build/components/dimensions-tool/index.js.map +1 -1
  309. package/build/components/dimensions-tool/scale-tool.js +16 -16
  310. package/build/components/dimensions-tool/scale-tool.js.map +1 -1
  311. package/build/components/dimensions-tool/width-height-tool.js +37 -33
  312. package/build/components/dimensions-tool/width-height-tool.js.map +1 -1
  313. package/build/components/duotone-control/index.js +21 -18
  314. package/build/components/duotone-control/index.js.map +1 -1
  315. package/build/components/editable-text/index.js +6 -5
  316. package/build/components/editable-text/index.js.map +1 -1
  317. package/build/components/editor-styles/index.js +23 -21
  318. package/build/components/editor-styles/index.js.map +1 -1
  319. package/build/components/floating-toolbar/index.native.js +18 -16
  320. package/build/components/floating-toolbar/index.native.js.map +1 -1
  321. package/build/components/floating-toolbar/nav-up-icon.js +14 -13
  322. package/build/components/floating-toolbar/nav-up-icon.js.map +1 -1
  323. package/build/components/font-appearance-control/index.js +2 -2
  324. package/build/components/font-appearance-control/index.js.map +1 -1
  325. package/build/components/font-family/index.js +2 -2
  326. package/build/components/font-family/index.js.map +1 -1
  327. package/build/components/font-sizes/font-size-picker.js +2 -2
  328. package/build/components/font-sizes/font-size-picker.js.map +1 -1
  329. package/build/components/font-sizes/utils.js +4 -3
  330. package/build/components/font-sizes/utils.js.map +1 -1
  331. package/build/components/font-sizes/with-font-sizes.js +3 -3
  332. package/build/components/font-sizes/with-font-sizes.js.map +1 -1
  333. package/build/components/global-styles/advanced-panel.js +17 -15
  334. package/build/components/global-styles/advanced-panel.js.map +1 -1
  335. package/build/components/global-styles/background-panel.js +187 -121
  336. package/build/components/global-styles/background-panel.js.map +1 -1
  337. package/build/components/global-styles/border-panel.js +62 -56
  338. package/build/components/global-styles/border-panel.js.map +1 -1
  339. package/build/components/global-styles/color-panel.js +111 -87
  340. package/build/components/global-styles/color-panel.js.map +1 -1
  341. package/build/components/global-styles/color-panel.native.js +14 -11
  342. package/build/components/global-styles/color-panel.native.js.map +1 -1
  343. package/build/components/global-styles/dimensions-panel.js +183 -171
  344. package/build/components/global-styles/dimensions-panel.js.map +1 -1
  345. package/build/components/global-styles/filters-panel.js +78 -65
  346. package/build/components/global-styles/filters-panel.js.map +1 -1
  347. package/build/components/global-styles/hooks.js +14 -2
  348. package/build/components/global-styles/hooks.js.map +1 -1
  349. package/build/components/global-styles/image-settings-panel.js +26 -22
  350. package/build/components/global-styles/image-settings-panel.js.map +1 -1
  351. package/build/components/global-styles/index.js +18 -0
  352. package/build/components/global-styles/index.js.map +1 -1
  353. package/build/components/global-styles/shadow-panel-components.js +74 -65
  354. package/build/components/global-styles/shadow-panel-components.js.map +1 -1
  355. package/build/components/global-styles/theme-file-uri-utils.js +80 -0
  356. package/build/components/global-styles/theme-file-uri-utils.js.map +1 -0
  357. package/build/components/global-styles/typography-panel.js +175 -134
  358. package/build/components/global-styles/typography-panel.js.map +1 -1
  359. package/build/components/global-styles/use-global-styles-context.native.js +450 -0
  360. package/build/components/global-styles/use-global-styles-context.native.js.map +1 -0
  361. package/build/components/global-styles/use-global-styles-output.js +113 -78
  362. package/build/components/global-styles/use-global-styles-output.js.map +1 -1
  363. package/build/components/gradients/with-gradient.js +2 -2
  364. package/build/components/gradients/with-gradient.js.map +1 -1
  365. package/build/components/grid-visualizer/grid-item-resizer.js +59 -58
  366. package/build/components/grid-visualizer/grid-item-resizer.js.map +1 -1
  367. package/build/components/grid-visualizer/grid-visualizer.js +20 -15
  368. package/build/components/grid-visualizer/grid-visualizer.js.map +1 -1
  369. package/build/components/height-control/index.js +39 -32
  370. package/build/components/height-control/index.js.map +1 -1
  371. package/build/components/iframe/index.js +70 -62
  372. package/build/components/iframe/index.js.map +1 -1
  373. package/build/components/image-editor/aspect-ratio-dropdown.js +73 -69
  374. package/build/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
  375. package/build/components/image-editor/context.js +5 -4
  376. package/build/components/image-editor/context.js.map +1 -1
  377. package/build/components/image-editor/cropper.js +24 -21
  378. package/build/components/image-editor/cropper.js.map +1 -1
  379. package/build/components/image-editor/form-controls.js +11 -7
  380. package/build/components/image-editor/form-controls.js.map +1 -1
  381. package/build/components/image-editor/index.js +22 -13
  382. package/build/components/image-editor/index.js.map +1 -1
  383. package/build/components/image-editor/rotation-button.js +2 -2
  384. package/build/components/image-editor/rotation-button.js.map +1 -1
  385. package/build/components/image-editor/zoom-dropdown.js +4 -4
  386. package/build/components/image-editor/zoom-dropdown.js.map +1 -1
  387. package/build/components/image-link-destinations/index.native.js +37 -27
  388. package/build/components/image-link-destinations/index.native.js.map +1 -1
  389. package/build/components/image-size-control/index.js +53 -45
  390. package/build/components/image-size-control/index.js.map +1 -1
  391. package/build/components/index.native.js +37 -0
  392. package/build/components/index.native.js.map +1 -1
  393. package/build/components/inner-blocks/button-block-appender.js +2 -2
  394. package/build/components/inner-blocks/button-block-appender.js.map +1 -1
  395. package/build/components/inner-blocks/default-block-appender.js +2 -2
  396. package/build/components/inner-blocks/default-block-appender.js.map +1 -1
  397. package/build/components/inner-blocks/index.js +19 -16
  398. package/build/components/inner-blocks/index.js.map +1 -1
  399. package/build/components/inner-blocks/index.native.js +31 -29
  400. package/build/components/inner-blocks/index.native.js.map +1 -1
  401. package/build/components/inner-blocks/use-nested-settings-update.js +10 -13
  402. package/build/components/inner-blocks/use-nested-settings-update.js.map +1 -1
  403. package/build/components/inner-blocks/warning-max-depth-exceeded.native.js +20 -17
  404. package/build/components/inner-blocks/warning-max-depth-exceeded.native.js.map +1 -1
  405. package/build/components/inner-blocks/with-client-id.js +2 -2
  406. package/build/components/inner-blocks/with-client-id.js.map +1 -1
  407. package/build/components/inserter/block-patterns-explorer/index.js +22 -20
  408. package/build/components/inserter/block-patterns-explorer/index.js.map +1 -1
  409. package/build/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js +39 -36
  410. package/build/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js.map +1 -1
  411. package/build/components/inserter/block-patterns-explorer/pattern-list.js +25 -19
  412. package/build/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
  413. package/build/components/inserter/block-patterns-tab/index.js +38 -31
  414. package/build/components/inserter/block-patterns-tab/index.js.map +1 -1
  415. package/build/components/inserter/block-patterns-tab/pattern-category-preview-panel.js +21 -4
  416. package/build/components/inserter/block-patterns-tab/pattern-category-preview-panel.js.map +1 -1
  417. package/build/components/inserter/block-patterns-tab/pattern-category-previews.js +42 -31
  418. package/build/components/inserter/block-patterns-tab/pattern-category-previews.js.map +1 -1
  419. package/build/components/inserter/block-patterns-tab/patterns-filter.js +54 -42
  420. package/build/components/inserter/block-patterns-tab/patterns-filter.js.map +1 -1
  421. package/build/components/inserter/block-types-tab.js +108 -66
  422. package/build/components/inserter/block-types-tab.js.map +1 -1
  423. package/build/components/inserter/block-types-tab.native.js +2 -2
  424. package/build/components/inserter/block-types-tab.native.js.map +1 -1
  425. package/build/components/inserter/category-tabs/index.js +26 -20
  426. package/build/components/inserter/category-tabs/index.js.map +1 -1
  427. package/build/components/inserter/hooks/use-block-types-state.js +9 -4
  428. package/build/components/inserter/hooks/use-block-types-state.js.map +1 -1
  429. package/build/components/inserter/hooks/use-insertion-point.js +33 -5
  430. package/build/components/inserter/hooks/use-insertion-point.js.map +1 -1
  431. package/build/components/inserter/index.js +6 -6
  432. package/build/components/inserter/index.js.map +1 -1
  433. package/build/components/inserter/index.native.js +21 -19
  434. package/build/components/inserter/index.native.js.map +1 -1
  435. package/build/components/inserter/library.js +15 -8
  436. package/build/components/inserter/library.js.map +1 -1
  437. package/build/components/inserter/media-tab/media-list.js +9 -9
  438. package/build/components/inserter/media-tab/media-list.js.map +1 -1
  439. package/build/components/inserter/media-tab/media-panel.js +19 -17
  440. package/build/components/inserter/media-tab/media-panel.js.map +1 -1
  441. package/build/components/inserter/media-tab/media-preview.js +92 -66
  442. package/build/components/inserter/media-tab/media-preview.js.map +1 -1
  443. package/build/components/inserter/media-tab/media-tab.js +44 -36
  444. package/build/components/inserter/media-tab/media-tab.js.map +1 -1
  445. package/build/components/inserter/media-tab/utils.js +2 -2
  446. package/build/components/inserter/media-tab/utils.js.map +1 -1
  447. package/build/components/inserter/menu.js +101 -84
  448. package/build/components/inserter/menu.js.map +1 -1
  449. package/build/components/inserter/menu.native.js +34 -28
  450. package/build/components/inserter/menu.native.js.map +1 -1
  451. package/build/components/inserter/mobile-tab-navigation.js +56 -40
  452. package/build/components/inserter/mobile-tab-navigation.js.map +1 -1
  453. package/build/components/inserter/no-results.js +10 -7
  454. package/build/components/inserter/no-results.js.map +1 -1
  455. package/build/components/inserter/no-results.native.js +13 -8
  456. package/build/components/inserter/no-results.native.js.map +1 -1
  457. package/build/components/inserter/panel.js +15 -10
  458. package/build/components/inserter/panel.js.map +1 -1
  459. package/build/components/inserter/preview-panel.js +24 -20
  460. package/build/components/inserter/preview-panel.js.map +1 -1
  461. package/build/components/inserter/quick-inserter.js +35 -31
  462. package/build/components/inserter/quick-inserter.js.map +1 -1
  463. package/build/components/inserter/reusable-block-rename-hint.js +20 -18
  464. package/build/components/inserter/reusable-block-rename-hint.js.map +1 -1
  465. package/build/components/inserter/reusable-blocks-tab.native.js +2 -2
  466. package/build/components/inserter/reusable-blocks-tab.native.js.map +1 -1
  467. package/build/components/inserter/search-results.js +52 -41
  468. package/build/components/inserter/search-results.js.map +1 -1
  469. package/build/components/inserter/search-results.native.js +3 -3
  470. package/build/components/inserter/search-results.native.js.map +1 -1
  471. package/build/components/inserter/tabs.js +30 -26
  472. package/build/components/inserter/tabs.js.map +1 -1
  473. package/build/components/inserter/tabs.native.js +20 -18
  474. package/build/components/inserter/tabs.native.js.map +1 -1
  475. package/build/components/inserter/tips.js +7 -5
  476. package/build/components/inserter/tips.js.map +1 -1
  477. package/build/components/inserter-button/index.native.js +28 -23
  478. package/build/components/inserter-button/index.native.js.map +1 -1
  479. package/build/components/inserter-button/sparkles.js +8 -7
  480. package/build/components/inserter-button/sparkles.js.map +1 -1
  481. package/build/components/inserter-draggable-blocks/index.js +14 -13
  482. package/build/components/inserter-draggable-blocks/index.js.map +1 -1
  483. package/build/components/inserter-list-item/index.js +68 -62
  484. package/build/components/inserter-list-item/index.js.map +1 -1
  485. package/build/components/inserter-listbox/group.js +2 -2
  486. package/build/components/inserter-listbox/group.js.map +1 -1
  487. package/build/components/inserter-listbox/index.js +5 -4
  488. package/build/components/inserter-listbox/index.js.map +1 -1
  489. package/build/components/inserter-listbox/item.js +10 -8
  490. package/build/components/inserter-listbox/item.js.map +1 -1
  491. package/build/components/inserter-listbox/row.js +2 -2
  492. package/build/components/inserter-listbox/row.js.map +1 -1
  493. package/build/components/inspector-controls/block-support-slot-container.js +2 -2
  494. package/build/components/inspector-controls/block-support-slot-container.js.map +1 -1
  495. package/build/components/inspector-controls/block-support-tools-panel.js +5 -5
  496. package/build/components/inspector-controls/block-support-tools-panel.js.map +1 -1
  497. package/build/components/inspector-controls/fill.js +22 -17
  498. package/build/components/inspector-controls/fill.js.map +1 -1
  499. package/build/components/inspector-controls/fill.native.js +12 -5
  500. package/build/components/inspector-controls/fill.native.js.map +1 -1
  501. package/build/components/inspector-controls/index.js +3 -3
  502. package/build/components/inspector-controls/index.js.map +1 -1
  503. package/build/components/inspector-controls/slot.js +11 -10
  504. package/build/components/inspector-controls/slot.js.map +1 -1
  505. package/build/components/inspector-controls/slot.native.js +3 -3
  506. package/build/components/inspector-controls/slot.native.js.map +1 -1
  507. package/build/components/inspector-controls-tabs/advanced-controls-panel.js +7 -6
  508. package/build/components/inspector-controls-tabs/advanced-controls-panel.js.map +1 -1
  509. package/build/components/inspector-controls-tabs/advanced-controls-panel.native.js +11 -9
  510. package/build/components/inspector-controls-tabs/advanced-controls-panel.native.js.map +1 -1
  511. package/build/components/inspector-controls-tabs/index.js +44 -32
  512. package/build/components/inspector-controls-tabs/index.js.map +1 -1
  513. package/build/components/inspector-controls-tabs/position-controls-panel.js +8 -7
  514. package/build/components/inspector-controls-tabs/position-controls-panel.js.map +1 -1
  515. package/build/components/inspector-controls-tabs/settings-tab-hint.js +20 -18
  516. package/build/components/inspector-controls-tabs/settings-tab-hint.js.map +1 -1
  517. package/build/components/inspector-controls-tabs/settings-tab.js +6 -2
  518. package/build/components/inspector-controls-tabs/settings-tab.js.map +1 -1
  519. package/build/components/inspector-controls-tabs/styles-tab.js +31 -26
  520. package/build/components/inspector-controls-tabs/styles-tab.js.map +1 -1
  521. package/build/components/inspector-popover-header/index.js +31 -26
  522. package/build/components/inspector-popover-header/index.js.map +1 -1
  523. package/build/components/justify-content-control/index.js +3 -3
  524. package/build/components/justify-content-control/index.js.map +1 -1
  525. package/build/components/justify-content-control/ui.js +2 -2
  526. package/build/components/justify-content-control/ui.js.map +1 -1
  527. package/build/components/letter-spacing-control/index.js +3 -4
  528. package/build/components/letter-spacing-control/index.js.map +1 -1
  529. package/build/components/line-height-control/index.js +17 -16
  530. package/build/components/line-height-control/index.js.map +1 -1
  531. package/build/components/line-height-control/index.native.js +2 -2
  532. package/build/components/line-height-control/index.native.js.map +1 -1
  533. package/build/components/link-control/index.js +101 -84
  534. package/build/components/link-control/index.js.map +1 -1
  535. package/build/components/link-control/link-preview.js +61 -49
  536. package/build/components/link-control/link-preview.js.map +1 -1
  537. package/build/components/link-control/search-create-button.js +6 -5
  538. package/build/components/link-control/search-create-button.js.map +1 -1
  539. package/build/components/link-control/search-input.js +32 -31
  540. package/build/components/link-control/search-input.js.map +1 -1
  541. package/build/components/link-control/search-item.js +12 -11
  542. package/build/components/link-control/search-item.js.map +1 -1
  543. package/build/components/link-control/search-results.js +50 -46
  544. package/build/components/link-control/search-results.js.map +1 -1
  545. package/build/components/link-control/settings-drawer.js +37 -30
  546. package/build/components/link-control/settings-drawer.js.map +1 -1
  547. package/build/components/link-control/settings.js +10 -9
  548. package/build/components/link-control/settings.js.map +1 -1
  549. package/build/components/list-view/appender.js +24 -22
  550. package/build/components/list-view/appender.js.map +1 -1
  551. package/build/components/list-view/aria-referenced-text.js +6 -6
  552. package/build/components/list-view/aria-referenced-text.js.map +1 -1
  553. package/build/components/list-view/block-contents.js +32 -29
  554. package/build/components/list-view/block-contents.js.map +1 -1
  555. package/build/components/list-view/block-select-button.js +50 -42
  556. package/build/components/list-view/block-select-button.js.map +1 -1
  557. package/build/components/list-view/block.js +96 -84
  558. package/build/components/list-view/block.js.map +1 -1
  559. package/build/components/list-view/branch.js +101 -95
  560. package/build/components/list-view/branch.js.map +1 -1
  561. package/build/components/list-view/drop-indicator.js +38 -31
  562. package/build/components/list-view/drop-indicator.js.map +1 -1
  563. package/build/components/list-view/expander.js +8 -6
  564. package/build/components/list-view/expander.js.map +1 -1
  565. package/build/components/list-view/index.js +42 -38
  566. package/build/components/list-view/index.js.map +1 -1
  567. package/build/components/list-view/leaf.js +5 -4
  568. package/build/components/list-view/leaf.js.map +1 -1
  569. package/build/components/media-placeholder/index.js +99 -79
  570. package/build/components/media-placeholder/index.js.map +1 -1
  571. package/build/components/media-placeholder/index.native.js +63 -52
  572. package/build/components/media-placeholder/index.native.js.map +1 -1
  573. package/build/components/media-replace-flow/index.js +72 -60
  574. package/build/components/media-replace-flow/index.js.map +1 -1
  575. package/build/components/media-replace-flow/index.native.js +2 -2
  576. package/build/components/media-replace-flow/index.native.js.map +1 -1
  577. package/build/components/media-upload/index.native.js +44 -40
  578. package/build/components/media-upload/index.native.js.map +1 -1
  579. package/build/components/media-upload-progress/index.native.js +39 -15
  580. package/build/components/media-upload-progress/index.native.js.map +1 -1
  581. package/build/components/multi-selection-inspector/index.js +19 -15
  582. package/build/components/multi-selection-inspector/index.js.map +1 -1
  583. package/build/components/navigable-toolbar/index.js +9 -7
  584. package/build/components/navigable-toolbar/index.js.map +1 -1
  585. package/build/components/observe-typing/index.js +6 -6
  586. package/build/components/observe-typing/index.js.map +1 -1
  587. package/build/components/panel-color-settings/index.js +2 -2
  588. package/build/components/panel-color-settings/index.js.map +1 -1
  589. package/build/components/plain-text/index.js +4 -5
  590. package/build/components/plain-text/index.js.map +1 -1
  591. package/build/components/plain-text/index.native.js +3 -3
  592. package/build/components/plain-text/index.native.js.map +1 -1
  593. package/build/components/provider/block-refs-provider.js +5 -4
  594. package/build/components/provider/block-refs-provider.js.map +1 -1
  595. package/build/components/provider/index.js +11 -7
  596. package/build/components/provider/index.js.map +1 -1
  597. package/build/components/provider/index.native.js +5 -5
  598. package/build/components/provider/index.native.js.map +1 -1
  599. package/build/components/provider/with-registry-provider.js +30 -26
  600. package/build/components/provider/with-registry-provider.js.map +1 -1
  601. package/build/components/publish-date-time-picker/index.js +36 -15
  602. package/build/components/publish-date-time-picker/index.js.map +1 -1
  603. package/build/components/recursion-provider/index.js +6 -5
  604. package/build/components/recursion-provider/index.js.map +1 -1
  605. package/build/components/resizable-box-popover/index.js +7 -6
  606. package/build/components/resizable-box-popover/index.js.map +1 -1
  607. package/build/components/resolution-tool/index.js +12 -11
  608. package/build/components/resolution-tool/index.js.map +1 -1
  609. package/build/components/responsive-block-control/index.js +30 -26
  610. package/build/components/responsive-block-control/index.js.map +1 -1
  611. package/build/components/responsive-block-control/label.js +11 -7
  612. package/build/components/responsive-block-control/label.js.map +1 -1
  613. package/build/components/rich-text/content.js +8 -5
  614. package/build/components/rich-text/content.js.map +1 -1
  615. package/build/components/rich-text/embed-handler-picker.native.js +2 -2
  616. package/build/components/rich-text/embed-handler-picker.native.js.map +1 -1
  617. package/build/components/rich-text/format-edit.js +5 -5
  618. package/build/components/rich-text/format-edit.js.map +1 -1
  619. package/build/components/rich-text/format-toolbar/index.js +37 -33
  620. package/build/components/rich-text/format-toolbar/index.js.map +1 -1
  621. package/build/components/rich-text/format-toolbar/index.native.js +8 -7
  622. package/build/components/rich-text/format-toolbar/index.native.js.map +1 -1
  623. package/build/components/rich-text/format-toolbar-container.js +17 -12
  624. package/build/components/rich-text/format-toolbar-container.js.map +1 -1
  625. package/build/components/rich-text/format-toolbar-container.native.js +5 -4
  626. package/build/components/rich-text/format-toolbar-container.native.js.map +1 -1
  627. package/build/components/rich-text/get-rich-text-values.js +4 -4
  628. package/build/components/rich-text/get-rich-text-values.js.map +1 -1
  629. package/build/components/rich-text/index.js +87 -76
  630. package/build/components/rich-text/index.js.map +1 -1
  631. package/build/components/rich-text/index.native.js +51 -47
  632. package/build/components/rich-text/index.native.js.map +1 -1
  633. package/build/components/rich-text/multiline.js +62 -62
  634. package/build/components/rich-text/multiline.js.map +1 -1
  635. package/build/components/rich-text/native/format-edit.js +3 -4
  636. package/build/components/rich-text/native/format-edit.js.map +1 -1
  637. package/build/components/rich-text/native/index.native.js +87 -80
  638. package/build/components/rich-text/native/index.native.js.map +1 -1
  639. package/build/components/rich-text/native/toolbar-button-with-options.native.js +19 -16
  640. package/build/components/rich-text/native/toolbar-button-with-options.native.js.map +1 -1
  641. package/build/components/rich-text/toolbar-button.js +8 -7
  642. package/build/components/rich-text/toolbar-button.js.map +1 -1
  643. package/build/components/rich-text/utils.js +5 -4
  644. package/build/components/rich-text/utils.js.map +1 -1
  645. package/build/components/rich-text/with-deprecations.js +2 -2
  646. package/build/components/rich-text/with-deprecations.js.map +1 -1
  647. package/build/components/segmented-text-control/index.js +20 -19
  648. package/build/components/segmented-text-control/index.js.map +1 -1
  649. package/build/components/skip-to-selected-block/index.js +6 -6
  650. package/build/components/skip-to-selected-block/index.js.map +1 -1
  651. package/build/components/spacing-sizes-control/hooks/use-spacing-sizes.js +29 -14
  652. package/build/components/spacing-sizes-control/hooks/use-spacing-sizes.js.map +1 -1
  653. package/build/components/spacing-sizes-control/index.js +23 -19
  654. package/build/components/spacing-sizes-control/index.js.map +1 -1
  655. package/build/components/spacing-sizes-control/input-controls/axial.js +19 -18
  656. package/build/components/spacing-sizes-control/input-controls/axial.js.map +1 -1
  657. package/build/components/spacing-sizes-control/input-controls/separated.js +18 -17
  658. package/build/components/spacing-sizes-control/input-controls/separated.js.map +1 -1
  659. package/build/components/spacing-sizes-control/input-controls/single.js +2 -2
  660. package/build/components/spacing-sizes-control/input-controls/single.js.map +1 -1
  661. package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js +103 -100
  662. package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
  663. package/build/components/spacing-sizes-control/sides-dropdown/index.js +42 -34
  664. package/build/components/spacing-sizes-control/sides-dropdown/index.js.map +1 -1
  665. package/build/components/spacing-sizes-control/utils.js +2 -1
  666. package/build/components/spacing-sizes-control/utils.js.map +1 -1
  667. package/build/components/text-alignment-control/index.js +2 -2
  668. package/build/components/text-alignment-control/index.js.map +1 -1
  669. package/build/components/text-decoration-control/index.js +2 -2
  670. package/build/components/text-decoration-control/index.js.map +1 -1
  671. package/build/components/text-transform-control/index.js +2 -2
  672. package/build/components/text-transform-control/index.js.map +1 -1
  673. package/build/components/tool-selector/index.js +35 -26
  674. package/build/components/tool-selector/index.js.map +1 -1
  675. package/build/components/typewriter/index.js +5 -4
  676. package/build/components/typewriter/index.js.map +1 -1
  677. package/build/components/ungroup-button/index.native.js +8 -6
  678. package/build/components/ungroup-button/index.native.js.map +1 -1
  679. package/build/components/unit-control/index.js +2 -2
  680. package/build/components/unit-control/index.js.map +1 -1
  681. package/build/components/unsupported-block-details/index.native.js +31 -28
  682. package/build/components/unsupported-block-details/index.native.js.map +1 -1
  683. package/build/components/url-input/button.js +31 -28
  684. package/build/components/url-input/button.js.map +1 -1
  685. package/build/components/url-input/index.js +27 -22
  686. package/build/components/url-input/index.js.map +1 -1
  687. package/build/components/url-input/index.native.js +2 -2
  688. package/build/components/url-input/index.native.js.map +1 -1
  689. package/build/components/url-popover/image-url-input-ui.js +104 -91
  690. package/build/components/url-popover/image-url-input-ui.js.map +1 -1
  691. package/build/components/url-popover/index.js +24 -19
  692. package/build/components/url-popover/index.js.map +1 -1
  693. package/build/components/url-popover/link-editor.js +15 -14
  694. package/build/components/url-popover/link-editor.js.map +1 -1
  695. package/build/components/url-popover/link-viewer-url.js +6 -5
  696. package/build/components/url-popover/link-viewer-url.js.map +1 -1
  697. package/build/components/url-popover/link-viewer.js +14 -13
  698. package/build/components/url-popover/link-viewer.js.map +1 -1
  699. package/build/components/use-block-commands/index.js +2 -2
  700. package/build/components/use-block-commands/index.js.map +1 -1
  701. package/build/components/video-player/gridicon-play.native.js +8 -7
  702. package/build/components/video-player/gridicon-play.native.js.map +1 -1
  703. package/build/components/video-player/index.native.js +43 -40
  704. package/build/components/video-player/index.native.js.map +1 -1
  705. package/build/components/warning/index.js +34 -26
  706. package/build/components/warning/index.js.map +1 -1
  707. package/build/components/warning/index.native.js +17 -13
  708. package/build/components/warning/index.native.js.map +1 -1
  709. package/build/components/writing-flow/index.js +9 -6
  710. package/build/components/writing-flow/index.js.map +1 -1
  711. package/build/components/writing-flow/use-clipboard-handler.js +19 -16
  712. package/build/components/writing-flow/use-clipboard-handler.js.map +1 -1
  713. package/build/components/writing-flow/use-tab-nav.js +3 -3
  714. package/build/components/writing-flow/use-tab-nav.js.map +1 -1
  715. package/build/components/writing-mode-control/index.js +2 -2
  716. package/build/components/writing-mode-control/index.js.map +1 -1
  717. package/build/hooks/align.js +10 -10
  718. package/build/hooks/align.js.map +1 -1
  719. package/build/hooks/anchor.js +29 -24
  720. package/build/hooks/anchor.js.map +1 -1
  721. package/build/hooks/background.js +6 -5
  722. package/build/hooks/background.js.map +1 -1
  723. package/build/hooks/block-bindings.js +89 -0
  724. package/build/hooks/block-bindings.js.map +1 -0
  725. package/build/hooks/block-hooks.js +41 -33
  726. package/build/hooks/block-hooks.js.map +1 -1
  727. package/build/hooks/block-style-variation.js +142 -0
  728. package/build/hooks/block-style-variation.js.map +1 -0
  729. package/build/hooks/border.js +6 -5
  730. package/build/hooks/border.js.map +1 -1
  731. package/build/hooks/color.js +11 -9
  732. package/build/hooks/color.js.map +1 -1
  733. package/build/hooks/content-lock-ui.js +23 -15
  734. package/build/hooks/content-lock-ui.js.map +1 -1
  735. package/build/hooks/contrast-checker.js +2 -2
  736. package/build/hooks/contrast-checker.js.map +1 -1
  737. package/build/hooks/custom-class-name.js +17 -16
  738. package/build/hooks/custom-class-name.js.map +1 -1
  739. package/build/hooks/dimensions.js +24 -21
  740. package/build/hooks/dimensions.js.map +1 -1
  741. package/build/hooks/duotone.js +49 -45
  742. package/build/hooks/duotone.js.map +1 -1
  743. package/build/hooks/font-family.js +3 -3
  744. package/build/hooks/font-family.js.map +1 -1
  745. package/build/hooks/font-size.js +2 -2
  746. package/build/hooks/font-size.js.map +1 -1
  747. package/build/hooks/index.js +4 -2
  748. package/build/hooks/index.js.map +1 -1
  749. package/build/hooks/layout-child.js +26 -24
  750. package/build/hooks/layout-child.js.map +1 -1
  751. package/build/hooks/layout.js +61 -55
  752. package/build/hooks/layout.js.map +1 -1
  753. package/build/hooks/line-height.js +2 -2
  754. package/build/hooks/line-height.js.map +1 -1
  755. package/build/hooks/position.js +28 -26
  756. package/build/hooks/position.js.map +1 -1
  757. package/build/hooks/spacing-visualizer.js +10 -9
  758. package/build/hooks/spacing-visualizer.js.map +1 -1
  759. package/build/hooks/style.js +23 -13
  760. package/build/hooks/style.js.map +1 -1
  761. package/build/hooks/text-align.js +19 -18
  762. package/build/hooks/text-align.js.map +1 -1
  763. package/build/hooks/typography.js +6 -5
  764. package/build/hooks/typography.js.map +1 -1
  765. package/build/hooks/typography.native.js +11 -8
  766. package/build/hooks/typography.native.js.map +1 -1
  767. package/build/hooks/use-bindings-attributes.js +47 -15
  768. package/build/hooks/use-bindings-attributes.js.map +1 -1
  769. package/build/hooks/use-typography-props.js +4 -3
  770. package/build/hooks/use-typography-props.js.map +1 -1
  771. package/build/hooks/use-zoom-out.js +2 -2
  772. package/build/hooks/use-zoom-out.js.map +1 -1
  773. package/build/hooks/utils.js +18 -17
  774. package/build/hooks/utils.js.map +1 -1
  775. package/build/layouts/constrained.js +66 -58
  776. package/build/layouts/constrained.js.map +1 -1
  777. package/build/layouts/flex.js +75 -61
  778. package/build/layouts/flex.js.map +1 -1
  779. package/build/layouts/grid.js +146 -125
  780. package/build/layouts/grid.js.map +1 -1
  781. package/build/private-apis.js +7 -1
  782. package/build/private-apis.js.map +1 -1
  783. package/build/store/actions.js +39 -7
  784. package/build/store/actions.js.map +1 -1
  785. package/build/store/get-block-settings.js +2 -49
  786. package/build/store/get-block-settings.js.map +1 -1
  787. package/build/store/reducer.js +21 -14
  788. package/build/store/reducer.js.map +1 -1
  789. package/build/store/selectors.js +33 -6
  790. package/build/store/selectors.js.map +1 -1
  791. package/build/store/utils.js +2 -0
  792. package/build/store/utils.js.map +1 -1
  793. package/build/utils/transform-styles/index.js +1 -1
  794. package/build/utils/transform-styles/index.js.map +1 -1
  795. package/build-module/autocompleters/block.js +9 -6
  796. package/build-module/autocompleters/block.js.map +1 -1
  797. package/build-module/autocompleters/link.js +12 -8
  798. package/build-module/autocompleters/link.js.map +1 -1
  799. package/build-module/components/alignment-control/index.js +3 -3
  800. package/build-module/components/alignment-control/index.js.map +1 -1
  801. package/build-module/components/alignment-control/ui.js +2 -2
  802. package/build-module/components/alignment-control/ui.js.map +1 -1
  803. package/build-module/components/audio-player/audio-url-parser.native.js +16 -0
  804. package/build-module/components/audio-player/audio-url-parser.native.js.map +1 -0
  805. package/build-module/components/audio-player/index.native.js +167 -0
  806. package/build-module/components/audio-player/index.native.js.map +1 -0
  807. package/build-module/components/autocomplete/index.js +2 -2
  808. package/build-module/components/autocomplete/index.js.map +1 -1
  809. package/build-module/components/block-alignment-control/index.js +3 -3
  810. package/build-module/components/block-alignment-control/index.js.map +1 -1
  811. package/build-module/components/block-alignment-control/ui.js +34 -30
  812. package/build-module/components/block-alignment-control/ui.js.map +1 -1
  813. package/build-module/components/block-alignment-control/ui.native.js +2 -2
  814. package/build-module/components/block-alignment-control/ui.native.js.map +1 -1
  815. package/build-module/components/block-alignment-matrix-control/index.js +5 -5
  816. package/build-module/components/block-alignment-matrix-control/index.js.map +1 -1
  817. package/build-module/components/block-bindings-toolbar-indicator/index.js +94 -13
  818. package/build-module/components/block-bindings-toolbar-indicator/index.js.map +1 -1
  819. package/build-module/components/block-breadcrumb/index.js +38 -32
  820. package/build-module/components/block-breadcrumb/index.js.map +1 -1
  821. package/build-module/components/block-canvas/index.js +37 -31
  822. package/build-module/components/block-canvas/index.js.map +1 -1
  823. package/build-module/components/block-caption/index.native.js +15 -14
  824. package/build-module/components/block-caption/index.native.js.map +1 -1
  825. package/build-module/components/block-card/index.js +34 -28
  826. package/build-module/components/block-card/index.js.map +1 -1
  827. package/build-module/components/block-compare/block-view.js +28 -18
  828. package/build-module/components/block-compare/block-view.js.map +1 -1
  829. package/build-module/components/block-compare/index.js +24 -22
  830. package/build-module/components/block-compare/index.js.map +1 -1
  831. package/build-module/components/block-context/index.js +2 -2
  832. package/build-module/components/block-context/index.js.map +1 -1
  833. package/build-module/components/block-controls/fill.js +24 -16
  834. package/build-module/components/block-controls/fill.js.map +1 -1
  835. package/build-module/components/block-controls/index.js +3 -3
  836. package/build-module/components/block-controls/index.js.map +1 -1
  837. package/build-module/components/block-controls/slot.js +6 -4
  838. package/build-module/components/block-controls/slot.js.map +1 -1
  839. package/build-module/components/block-controls/slot.native.js +12 -9
  840. package/build-module/components/block-controls/slot.native.js.map +1 -1
  841. package/build-module/components/block-controls/use-has-block-controls.js +1 -1
  842. package/build-module/components/block-controls/use-has-block-controls.js.map +1 -1
  843. package/build-module/components/block-draggable/draggable-chip.js +28 -19
  844. package/build-module/components/block-draggable/draggable-chip.js.map +1 -1
  845. package/build-module/components/block-draggable/draggable-chip.native.js +10 -8
  846. package/build-module/components/block-draggable/draggable-chip.native.js.map +1 -1
  847. package/build-module/components/block-draggable/dropping-insertion-point.native.js +2 -2
  848. package/build-module/components/block-draggable/dropping-insertion-point.native.js.map +1 -1
  849. package/build-module/components/block-draggable/index.js +14 -13
  850. package/build-module/components/block-draggable/index.js.map +1 -1
  851. package/build-module/components/block-draggable/index.native.js +39 -30
  852. package/build-module/components/block-draggable/index.native.js.map +1 -1
  853. package/build-module/components/block-edit/edit.js +4 -4
  854. package/build-module/components/block-edit/edit.js.map +1 -1
  855. package/build-module/components/block-edit/edit.native.js +2 -2
  856. package/build-module/components/block-edit/edit.native.js.map +1 -1
  857. package/build-module/components/block-edit/index.js +19 -7
  858. package/build-module/components/block-edit/index.js.map +1 -1
  859. package/build-module/components/block-edit/multiple-usage-warning.js +40 -0
  860. package/build-module/components/block-edit/multiple-usage-warning.js.map +1 -0
  861. package/build-module/components/block-edit-visually-button/index.js +9 -6
  862. package/build-module/components/block-edit-visually-button/index.js.map +1 -1
  863. package/build-module/components/block-full-height-alignment-control/index.js +2 -2
  864. package/build-module/components/block-full-height-alignment-control/index.js.map +1 -1
  865. package/build-module/components/block-heading-level-dropdown/heading-level-icon.js +2 -3
  866. package/build-module/components/block-heading-level-dropdown/heading-level-icon.js.map +1 -1
  867. package/build-module/components/block-heading-level-dropdown/index.js +4 -4
  868. package/build-module/components/block-heading-level-dropdown/index.js.map +1 -1
  869. package/build-module/components/block-heading-level-dropdown/index.native.js +4 -4
  870. package/build-module/components/block-heading-level-dropdown/index.native.js.map +1 -1
  871. package/build-module/components/block-icon/index.js +6 -5
  872. package/build-module/components/block-icon/index.js.map +1 -1
  873. package/build-module/components/block-icon/index.native.js +6 -5
  874. package/build-module/components/block-icon/index.native.js.map +1 -1
  875. package/build-module/components/block-info-slot-fill/index.js +3 -3
  876. package/build-module/components/block-info-slot-fill/index.js.map +1 -1
  877. package/build-module/components/block-inspector/index.js +104 -88
  878. package/build-module/components/block-inspector/index.js.map +1 -1
  879. package/build-module/components/block-inspector/useBlockInspectorAnimationSettings.js +2 -2
  880. package/build-module/components/block-inspector/useBlockInspectorAnimationSettings.js.map +1 -1
  881. package/build-module/components/block-list/block-crash-warning.js +5 -4
  882. package/build-module/components/block-list/block-crash-warning.js.map +1 -1
  883. package/build-module/components/block-list/block-crash-warning.native.js +2 -2
  884. package/build-module/components/block-list/block-crash-warning.native.js.map +1 -1
  885. package/build-module/components/block-list/block-html.js +2 -2
  886. package/build-module/components/block-list/block-html.js.map +1 -1
  887. package/build-module/components/block-list/block-invalid-warning.js +27 -21
  888. package/build-module/components/block-list/block-invalid-warning.js.map +1 -1
  889. package/build-module/components/block-list/block-invalid-warning.native.js +12 -11
  890. package/build-module/components/block-list/block-invalid-warning.native.js.map +1 -1
  891. package/build-module/components/block-list/block-list-item-cell.native.js +5 -4
  892. package/build-module/components/block-list/block-list-item-cell.native.js.map +1 -1
  893. package/build-module/components/block-list/block-list-item.native.js +29 -26
  894. package/build-module/components/block-list/block-list-item.native.js.map +1 -1
  895. package/build-module/components/block-list/block-outline.native.js +2 -2
  896. package/build-module/components/block-list/block-outline.native.js.map +1 -1
  897. package/build-module/components/block-list/block-selection-button.native.js +36 -33
  898. package/build-module/components/block-list/block-selection-button.native.js.map +1 -1
  899. package/build-module/components/block-list/block.js +109 -61
  900. package/build-module/components/block-list/block.js.map +1 -1
  901. package/build-module/components/block-list/block.native.js +61 -51
  902. package/build-module/components/block-list/block.native.js.map +1 -1
  903. package/build-module/components/block-list/grid-item.native.js +5 -4
  904. package/build-module/components/block-list/grid-item.native.js.map +1 -1
  905. package/build-module/components/block-list/index.js +39 -34
  906. package/build-module/components/block-list/index.js.map +1 -1
  907. package/build-module/components/block-list/index.native.js +99 -85
  908. package/build-module/components/block-list/index.native.js.map +1 -1
  909. package/build-module/components/block-list/insertion-point.native.js +13 -10
  910. package/build-module/components/block-list/insertion-point.native.js.map +1 -1
  911. package/build-module/components/block-list/layout.js +7 -3
  912. package/build-module/components/block-list/layout.js.map +1 -1
  913. package/build-module/components/block-list/subdirectory-icon.js +8 -7
  914. package/build-module/components/block-list/subdirectory-icon.js.map +1 -1
  915. package/build-module/components/block-list/use-block-props/index.js +1 -1
  916. package/build-module/components/block-list/use-block-props/index.js.map +1 -1
  917. package/build-module/components/block-list-appender/index.js +9 -8
  918. package/build-module/components/block-list-appender/index.js.map +1 -1
  919. package/build-module/components/block-list-appender/index.native.js +4 -4
  920. package/build-module/components/block-list-appender/index.native.js.map +1 -1
  921. package/build-module/components/block-lock/menu-item.js +15 -10
  922. package/build-module/components/block-lock/menu-item.js.map +1 -1
  923. package/build-module/components/block-lock/modal.js +108 -90
  924. package/build-module/components/block-lock/modal.js.map +1 -1
  925. package/build-module/components/block-lock/toolbar.js +20 -15
  926. package/build-module/components/block-lock/toolbar.js.map +1 -1
  927. package/build-module/components/block-media-update-progress/index.native.js +18 -15
  928. package/build-module/components/block-media-update-progress/index.native.js.map +1 -1
  929. package/build-module/components/block-mover/button.js +21 -16
  930. package/build-module/components/block-mover/button.js.map +1 -1
  931. package/build-module/components/block-mover/index.js +35 -27
  932. package/build-module/components/block-mover/index.js.map +1 -1
  933. package/build-module/components/block-mover/index.native.js +30 -27
  934. package/build-module/components/block-mover/index.native.js.map +1 -1
  935. package/build-module/components/block-navigation/dropdown.js +12 -9
  936. package/build-module/components/block-navigation/dropdown.js.map +1 -1
  937. package/build-module/components/block-parent-selector/index.js +13 -13
  938. package/build-module/components/block-parent-selector/index.js.map +1 -1
  939. package/build-module/components/block-pattern-setup/index.js +90 -76
  940. package/build-module/components/block-pattern-setup/index.js.map +1 -1
  941. package/build-module/components/block-pattern-setup/setup-toolbar.js +51 -45
  942. package/build-module/components/block-pattern-setup/setup-toolbar.js.map +1 -1
  943. package/build-module/components/block-patterns-list/index.js +98 -86
  944. package/build-module/components/block-patterns-list/index.js.map +1 -1
  945. package/build-module/components/block-patterns-paging/index.js +71 -52
  946. package/build-module/components/block-patterns-paging/index.js.map +1 -1
  947. package/build-module/components/block-popover/cover.js +13 -10
  948. package/build-module/components/block-popover/cover.js.map +1 -1
  949. package/build-module/components/block-popover/drop-zone.js +11 -10
  950. package/build-module/components/block-popover/drop-zone.js.map +1 -1
  951. package/build-module/components/block-popover/inbetween.js +8 -7
  952. package/build-module/components/block-popover/inbetween.js.map +1 -1
  953. package/build-module/components/block-popover/index.js +9 -7
  954. package/build-module/components/block-popover/index.js.map +1 -1
  955. package/build-module/components/block-preview/auto.js +55 -47
  956. package/build-module/components/block-preview/auto.js.map +1 -1
  957. package/build-module/components/block-preview/index.js +17 -14
  958. package/build-module/components/block-preview/index.js.map +1 -1
  959. package/build-module/components/block-quick-navigation/index.js +25 -16
  960. package/build-module/components/block-quick-navigation/index.js.map +1 -1
  961. package/build-module/components/block-removal-warning-modal/index.js +19 -12
  962. package/build-module/components/block-removal-warning-modal/index.js.map +1 -1
  963. package/build-module/components/block-rename/modal.js +45 -37
  964. package/build-module/components/block-rename/modal.js.map +1 -1
  965. package/build-module/components/block-rename/rename-control.js +26 -21
  966. package/build-module/components/block-rename/rename-control.js.map +1 -1
  967. package/build-module/components/block-selection-clearer/index.js +2 -2
  968. package/build-module/components/block-selection-clearer/index.js.map +1 -1
  969. package/build-module/components/block-settings/button.native.js +13 -9
  970. package/build-module/components/block-settings/button.native.js.map +1 -1
  971. package/build-module/components/block-settings/container.native.js +42 -28
  972. package/build-module/components/block-settings/container.native.js.map +1 -1
  973. package/build-module/components/block-settings-menu/block-html-convert-button.js +5 -4
  974. package/build-module/components/block-settings-menu/block-html-convert-button.js.map +1 -1
  975. package/build-module/components/block-settings-menu/block-mode-toggle.js +5 -4
  976. package/build-module/components/block-settings-menu/block-mode-toggle.js.map +1 -1
  977. package/build-module/components/block-settings-menu/block-parent-selector-menu-item.js +7 -6
  978. package/build-module/components/block-settings-menu/block-parent-selector-menu-item.js.map +1 -1
  979. package/build-module/components/block-settings-menu/block-settings-dropdown.js +95 -75
  980. package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  981. package/build-module/components/block-settings-menu/index.js +10 -6
  982. package/build-module/components/block-settings-menu/index.js.map +1 -1
  983. package/build-module/components/block-settings-menu-controls/index.js +30 -24
  984. package/build-module/components/block-settings-menu-controls/index.js.map +1 -1
  985. package/build-module/components/block-styles/index.js +44 -38
  986. package/build-module/components/block-styles/index.js.map +1 -1
  987. package/build-module/components/block-styles/index.native.js +7 -7
  988. package/build-module/components/block-styles/index.native.js.map +1 -1
  989. package/build-module/components/block-styles/menu-items.js +18 -14
  990. package/build-module/components/block-styles/menu-items.js.map +1 -1
  991. package/build-module/components/block-styles/preview-panel.js +2 -2
  992. package/build-module/components/block-styles/preview-panel.js.map +1 -1
  993. package/build-module/components/block-styles/preview.native.js +25 -21
  994. package/build-module/components/block-styles/preview.native.js.map +1 -1
  995. package/build-module/components/block-switcher/block-styles-menu.js +8 -7
  996. package/build-module/components/block-switcher/block-styles-menu.js.map +1 -1
  997. package/build-module/components/block-switcher/block-transformations-menu.js +33 -28
  998. package/build-module/components/block-switcher/block-transformations-menu.js.map +1 -1
  999. package/build-module/components/block-switcher/block-transformations-menu.native.js +2 -2
  1000. package/build-module/components/block-switcher/block-transformations-menu.native.js.map +1 -1
  1001. package/build-module/components/block-switcher/block-variation-transformations.js +21 -17
  1002. package/build-module/components/block-switcher/block-variation-transformations.js.map +1 -1
  1003. package/build-module/components/block-switcher/index.js +87 -70
  1004. package/build-module/components/block-switcher/index.js.map +1 -1
  1005. package/build-module/components/block-switcher/pattern-transformations-menu.js +62 -51
  1006. package/build-module/components/block-switcher/pattern-transformations-menu.js.map +1 -1
  1007. package/build-module/components/block-switcher/preview-block-popover.js +23 -17
  1008. package/build-module/components/block-switcher/preview-block-popover.js.map +1 -1
  1009. package/build-module/components/block-toolbar/block-toolbar-menu.native.js +39 -34
  1010. package/build-module/components/block-toolbar/block-toolbar-menu.native.js.map +1 -1
  1011. package/build-module/components/block-toolbar/index.js +55 -43
  1012. package/build-module/components/block-toolbar/index.js.map +1 -1
  1013. package/build-module/components/block-toolbar/index.native.js +29 -21
  1014. package/build-module/components/block-toolbar/index.native.js.map +1 -1
  1015. package/build-module/components/block-toolbar/shuffle.js +7 -5
  1016. package/build-module/components/block-toolbar/shuffle.js.map +1 -1
  1017. package/build-module/components/block-tools/block-selection-button.js +61 -46
  1018. package/build-module/components/block-tools/block-selection-button.js.map +1 -1
  1019. package/build-module/components/block-tools/block-toolbar-breadcrumb.js +8 -7
  1020. package/build-module/components/block-tools/block-toolbar-breadcrumb.js.map +1 -1
  1021. package/build-module/components/block-tools/block-toolbar-popover.js +15 -14
  1022. package/build-module/components/block-tools/block-toolbar-popover.js.map +1 -1
  1023. package/build-module/components/block-tools/empty-block-inserter.js +13 -11
  1024. package/build-module/components/block-tools/empty-block-inserter.js.map +1 -1
  1025. package/build-module/components/block-tools/index.js +30 -26
  1026. package/build-module/components/block-tools/index.js.map +1 -1
  1027. package/build-module/components/block-tools/insertion-point.js +43 -40
  1028. package/build-module/components/block-tools/insertion-point.js.map +1 -1
  1029. package/build-module/components/block-tools/zoom-out-mode-inserters.js +34 -32
  1030. package/build-module/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
  1031. package/build-module/components/block-types-list/index.js +16 -15
  1032. package/build-module/components/block-types-list/index.js.map +1 -1
  1033. package/build-module/components/block-types-list/index.native.js +31 -26
  1034. package/build-module/components/block-types-list/index.native.js.map +1 -1
  1035. package/build-module/components/block-variation-picker/index.js +31 -25
  1036. package/build-module/components/block-variation-picker/index.js.map +1 -1
  1037. package/build-module/components/block-variation-picker/index.native.js +33 -25
  1038. package/build-module/components/block-variation-picker/index.native.js.map +1 -1
  1039. package/build-module/components/block-variation-transforms/index.js +54 -47
  1040. package/build-module/components/block-variation-transforms/index.js.map +1 -1
  1041. package/build-module/components/block-vertical-alignment-control/icons.js +31 -26
  1042. package/build-module/components/block-vertical-alignment-control/icons.js.map +1 -1
  1043. package/build-module/components/block-vertical-alignment-control/index.js +3 -3
  1044. package/build-module/components/block-vertical-alignment-control/index.js.map +1 -1
  1045. package/build-module/components/block-vertical-alignment-control/ui.js +2 -2
  1046. package/build-module/components/block-vertical-alignment-control/ui.js.map +1 -1
  1047. package/build-module/components/border-radius-control/all-input-control.js +3 -3
  1048. package/build-module/components/border-radius-control/all-input-control.js.map +1 -1
  1049. package/build-module/components/border-radius-control/index.js +45 -38
  1050. package/build-module/components/border-radius-control/index.js.map +1 -1
  1051. package/build-module/components/border-radius-control/input-controls.js +23 -21
  1052. package/build-module/components/border-radius-control/input-controls.js.map +1 -1
  1053. package/build-module/components/border-radius-control/linked-button.js +12 -11
  1054. package/build-module/components/border-radius-control/linked-button.js.map +1 -1
  1055. package/build-module/components/button-block-appender/index.js +16 -12
  1056. package/build-module/components/button-block-appender/index.js.map +1 -1
  1057. package/build-module/components/button-block-appender/index.native.js +29 -24
  1058. package/build-module/components/button-block-appender/index.native.js.map +1 -1
  1059. package/build-module/components/caption/index.native.js +22 -21
  1060. package/build-module/components/caption/index.native.js.map +1 -1
  1061. package/build-module/components/child-layout-control/index.js +139 -129
  1062. package/build-module/components/child-layout-control/index.js.map +1 -1
  1063. package/build-module/components/color-palette/control.js +2 -2
  1064. package/build-module/components/color-palette/control.js.map +1 -1
  1065. package/build-module/components/color-palette/with-color-context.js +2 -2
  1066. package/build-module/components/color-palette/with-color-context.js.map +1 -1
  1067. package/build-module/components/color-style-selector/index.js +29 -20
  1068. package/build-module/components/color-style-selector/index.js.map +1 -1
  1069. package/build-module/components/colors/utils.js +3 -3
  1070. package/build-module/components/colors/utils.js.map +1 -1
  1071. package/build-module/components/colors/with-colors.js +7 -7
  1072. package/build-module/components/colors/with-colors.js.map +1 -1
  1073. package/build-module/components/colors-gradients/control.js +54 -39
  1074. package/build-module/components/colors-gradients/control.js.map +1 -1
  1075. package/build-module/components/colors-gradients/dropdown.js +72 -61
  1076. package/build-module/components/colors-gradients/dropdown.js.map +1 -1
  1077. package/build-module/components/colors-gradients/panel-color-gradient-settings.js +23 -18
  1078. package/build-module/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
  1079. package/build-module/components/colors-gradients/panel-color-gradient-settings.native.js +13 -7
  1080. package/build-module/components/colors-gradients/panel-color-gradient-settings.native.js.map +1 -1
  1081. package/build-module/components/contrast-checker/index.js +10 -8
  1082. package/build-module/components/contrast-checker/index.js.map +1 -1
  1083. package/build-module/components/contrast-checker/index.native.js +13 -10
  1084. package/build-module/components/contrast-checker/index.native.js.map +1 -1
  1085. package/build-module/components/convert-to-group-buttons/index.js +19 -13
  1086. package/build-module/components/convert-to-group-buttons/index.js.map +1 -1
  1087. package/build-module/components/convert-to-group-buttons/toolbar.js +21 -18
  1088. package/build-module/components/convert-to-group-buttons/toolbar.js.map +1 -1
  1089. package/build-module/components/copy-handler/index.js +2 -2
  1090. package/build-module/components/copy-handler/index.js.map +1 -1
  1091. package/build-module/components/date-format-picker/index.js +45 -40
  1092. package/build-module/components/date-format-picker/index.js.map +1 -1
  1093. package/build-module/components/default-block-appender/index.js +33 -30
  1094. package/build-module/components/default-block-appender/index.js.map +1 -1
  1095. package/build-module/components/default-block-appender/index.native.js +14 -12
  1096. package/build-module/components/default-block-appender/index.native.js.map +1 -1
  1097. package/build-module/components/dimensions-tool/aspect-ratio-tool.js +12 -12
  1098. package/build-module/components/dimensions-tool/aspect-ratio-tool.js.map +1 -1
  1099. package/build-module/components/dimensions-tool/index.js +117 -113
  1100. package/build-module/components/dimensions-tool/index.js.map +1 -1
  1101. package/build-module/components/dimensions-tool/scale-tool.js +15 -14
  1102. package/build-module/components/dimensions-tool/scale-tool.js.map +1 -1
  1103. package/build-module/components/dimensions-tool/width-height-tool.js +39 -33
  1104. package/build-module/components/dimensions-tool/width-height-tool.js.map +1 -1
  1105. package/build-module/components/duotone-control/index.js +22 -18
  1106. package/build-module/components/duotone-control/index.js.map +1 -1
  1107. package/build-module/components/editable-text/index.js +6 -5
  1108. package/build-module/components/editable-text/index.js.map +1 -1
  1109. package/build-module/components/editor-styles/index.js +25 -21
  1110. package/build-module/components/editor-styles/index.js.map +1 -1
  1111. package/build-module/components/floating-toolbar/index.native.js +19 -16
  1112. package/build-module/components/floating-toolbar/index.native.js.map +1 -1
  1113. package/build-module/components/floating-toolbar/nav-up-icon.js +15 -13
  1114. package/build-module/components/floating-toolbar/nav-up-icon.js.map +1 -1
  1115. package/build-module/components/font-appearance-control/index.js +2 -2
  1116. package/build-module/components/font-appearance-control/index.js.map +1 -1
  1117. package/build-module/components/font-family/index.js +2 -2
  1118. package/build-module/components/font-family/index.js.map +1 -1
  1119. package/build-module/components/font-sizes/font-size-picker.js +2 -2
  1120. package/build-module/components/font-sizes/font-size-picker.js.map +1 -1
  1121. package/build-module/components/font-sizes/utils.js +3 -3
  1122. package/build-module/components/font-sizes/utils.js.map +1 -1
  1123. package/build-module/components/font-sizes/with-font-sizes.js +3 -3
  1124. package/build-module/components/font-sizes/with-font-sizes.js.map +1 -1
  1125. package/build-module/components/global-styles/advanced-panel.js +18 -15
  1126. package/build-module/components/global-styles/advanced-panel.js.map +1 -1
  1127. package/build-module/components/global-styles/background-panel.js +188 -121
  1128. package/build-module/components/global-styles/background-panel.js.map +1 -1
  1129. package/build-module/components/global-styles/border-panel.js +63 -56
  1130. package/build-module/components/global-styles/border-panel.js.map +1 -1
  1131. package/build-module/components/global-styles/color-panel.js +112 -87
  1132. package/build-module/components/global-styles/color-panel.js.map +1 -1
  1133. package/build-module/components/global-styles/color-panel.native.js +13 -10
  1134. package/build-module/components/global-styles/color-panel.native.js.map +1 -1
  1135. package/build-module/components/global-styles/dimensions-panel.js +184 -171
  1136. package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
  1137. package/build-module/components/global-styles/filters-panel.js +79 -65
  1138. package/build-module/components/global-styles/filters-panel.js.map +1 -1
  1139. package/build-module/components/global-styles/hooks.js +13 -2
  1140. package/build-module/components/global-styles/hooks.js.map +1 -1
  1141. package/build-module/components/global-styles/image-settings-panel.js +27 -22
  1142. package/build-module/components/global-styles/image-settings-panel.js.map +1 -1
  1143. package/build-module/components/global-styles/index.js +2 -2
  1144. package/build-module/components/global-styles/index.js.map +1 -1
  1145. package/build-module/components/global-styles/shadow-panel-components.js +74 -63
  1146. package/build-module/components/global-styles/shadow-panel-components.js.map +1 -1
  1147. package/build-module/components/global-styles/theme-file-uri-utils.js +73 -0
  1148. package/build-module/components/global-styles/theme-file-uri-utils.js.map +1 -0
  1149. package/build-module/components/global-styles/typography-panel.js +177 -135
  1150. package/build-module/components/global-styles/typography-panel.js.map +1 -1
  1151. package/build-module/components/global-styles/use-global-styles-context.native.js +431 -0
  1152. package/build-module/components/global-styles/use-global-styles-context.native.js.map +1 -0
  1153. package/build-module/components/global-styles/use-global-styles-output.js +114 -78
  1154. package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
  1155. package/build-module/components/gradients/with-gradient.js +2 -2
  1156. package/build-module/components/gradients/with-gradient.js.map +1 -1
  1157. package/build-module/components/grid-visualizer/grid-item-resizer.js +59 -58
  1158. package/build-module/components/grid-visualizer/grid-item-resizer.js.map +1 -1
  1159. package/build-module/components/grid-visualizer/grid-visualizer.js +20 -15
  1160. package/build-module/components/grid-visualizer/grid-visualizer.js.map +1 -1
  1161. package/build-module/components/height-control/index.js +40 -32
  1162. package/build-module/components/height-control/index.js.map +1 -1
  1163. package/build-module/components/iframe/index.js +72 -62
  1164. package/build-module/components/iframe/index.js.map +1 -1
  1165. package/build-module/components/image-editor/aspect-ratio-dropdown.js +75 -69
  1166. package/build-module/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
  1167. package/build-module/components/image-editor/context.js +5 -4
  1168. package/build-module/components/image-editor/context.js.map +1 -1
  1169. package/build-module/components/image-editor/cropper.js +26 -21
  1170. package/build-module/components/image-editor/cropper.js.map +1 -1
  1171. package/build-module/components/image-editor/form-controls.js +13 -7
  1172. package/build-module/components/image-editor/form-controls.js.map +1 -1
  1173. package/build-module/components/image-editor/index.js +23 -13
  1174. package/build-module/components/image-editor/index.js.map +1 -1
  1175. package/build-module/components/image-editor/rotation-button.js +2 -2
  1176. package/build-module/components/image-editor/rotation-button.js.map +1 -1
  1177. package/build-module/components/image-editor/zoom-dropdown.js +4 -4
  1178. package/build-module/components/image-editor/zoom-dropdown.js.map +1 -1
  1179. package/build-module/components/image-link-destinations/index.native.js +39 -27
  1180. package/build-module/components/image-link-destinations/index.native.js.map +1 -1
  1181. package/build-module/components/image-size-control/index.js +55 -45
  1182. package/build-module/components/image-size-control/index.js.map +1 -1
  1183. package/build-module/components/index.native.js +2 -0
  1184. package/build-module/components/index.native.js.map +1 -1
  1185. package/build-module/components/inner-blocks/button-block-appender.js +2 -2
  1186. package/build-module/components/inner-blocks/button-block-appender.js.map +1 -1
  1187. package/build-module/components/inner-blocks/default-block-appender.js +2 -2
  1188. package/build-module/components/inner-blocks/default-block-appender.js.map +1 -1
  1189. package/build-module/components/inner-blocks/index.js +19 -16
  1190. package/build-module/components/inner-blocks/index.js.map +1 -1
  1191. package/build-module/components/inner-blocks/index.native.js +31 -29
  1192. package/build-module/components/inner-blocks/index.native.js.map +1 -1
  1193. package/build-module/components/inner-blocks/use-nested-settings-update.js +11 -14
  1194. package/build-module/components/inner-blocks/use-nested-settings-update.js.map +1 -1
  1195. package/build-module/components/inner-blocks/warning-max-depth-exceeded.native.js +21 -17
  1196. package/build-module/components/inner-blocks/warning-max-depth-exceeded.native.js.map +1 -1
  1197. package/build-module/components/inner-blocks/with-client-id.js +2 -2
  1198. package/build-module/components/inner-blocks/with-client-id.js.map +1 -1
  1199. package/build-module/components/inserter/block-patterns-explorer/index.js +23 -20
  1200. package/build-module/components/inserter/block-patterns-explorer/index.js.map +1 -1
  1201. package/build-module/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js +40 -36
  1202. package/build-module/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js.map +1 -1
  1203. package/build-module/components/inserter/block-patterns-explorer/pattern-list.js +27 -19
  1204. package/build-module/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
  1205. package/build-module/components/inserter/block-patterns-tab/index.js +40 -31
  1206. package/build-module/components/inserter/block-patterns-tab/index.js.map +1 -1
  1207. package/build-module/components/inserter/block-patterns-tab/pattern-category-preview-panel.js +21 -5
  1208. package/build-module/components/inserter/block-patterns-tab/pattern-category-preview-panel.js.map +1 -1
  1209. package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js +44 -31
  1210. package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js.map +1 -1
  1211. package/build-module/components/inserter/block-patterns-tab/patterns-filter.js +56 -42
  1212. package/build-module/components/inserter/block-patterns-tab/patterns-filter.js.map +1 -1
  1213. package/build-module/components/inserter/block-types-tab.js +110 -67
  1214. package/build-module/components/inserter/block-types-tab.js.map +1 -1
  1215. package/build-module/components/inserter/block-types-tab.native.js +2 -2
  1216. package/build-module/components/inserter/block-types-tab.native.js.map +1 -1
  1217. package/build-module/components/inserter/category-tabs/index.js +27 -20
  1218. package/build-module/components/inserter/category-tabs/index.js.map +1 -1
  1219. package/build-module/components/inserter/hooks/use-block-types-state.js +9 -4
  1220. package/build-module/components/inserter/hooks/use-block-types-state.js.map +1 -1
  1221. package/build-module/components/inserter/hooks/use-insertion-point.js +33 -6
  1222. package/build-module/components/inserter/hooks/use-insertion-point.js.map +1 -1
  1223. package/build-module/components/inserter/index.js +6 -6
  1224. package/build-module/components/inserter/index.js.map +1 -1
  1225. package/build-module/components/inserter/index.native.js +23 -19
  1226. package/build-module/components/inserter/index.native.js.map +1 -1
  1227. package/build-module/components/inserter/library.js +14 -6
  1228. package/build-module/components/inserter/library.js.map +1 -1
  1229. package/build-module/components/inserter/media-tab/media-list.js +9 -9
  1230. package/build-module/components/inserter/media-tab/media-list.js.map +1 -1
  1231. package/build-module/components/inserter/media-tab/media-panel.js +20 -17
  1232. package/build-module/components/inserter/media-tab/media-panel.js.map +1 -1
  1233. package/build-module/components/inserter/media-tab/media-preview.js +94 -66
  1234. package/build-module/components/inserter/media-tab/media-preview.js.map +1 -1
  1235. package/build-module/components/inserter/media-tab/media-tab.js +46 -36
  1236. package/build-module/components/inserter/media-tab/media-tab.js.map +1 -1
  1237. package/build-module/components/inserter/media-tab/utils.js +2 -2
  1238. package/build-module/components/inserter/media-tab/utils.js.map +1 -1
  1239. package/build-module/components/inserter/menu.js +102 -83
  1240. package/build-module/components/inserter/menu.js.map +1 -1
  1241. package/build-module/components/inserter/menu.native.js +36 -28
  1242. package/build-module/components/inserter/menu.native.js.map +1 -1
  1243. package/build-module/components/inserter/mobile-tab-navigation.js +57 -40
  1244. package/build-module/components/inserter/mobile-tab-navigation.js.map +1 -1
  1245. package/build-module/components/inserter/no-results.js +11 -7
  1246. package/build-module/components/inserter/no-results.js.map +1 -1
  1247. package/build-module/components/inserter/no-results.native.js +14 -8
  1248. package/build-module/components/inserter/no-results.native.js.map +1 -1
  1249. package/build-module/components/inserter/panel.js +17 -10
  1250. package/build-module/components/inserter/panel.js.map +1 -1
  1251. package/build-module/components/inserter/preview-panel.js +25 -20
  1252. package/build-module/components/inserter/preview-panel.js.map +1 -1
  1253. package/build-module/components/inserter/quick-inserter.js +36 -31
  1254. package/build-module/components/inserter/quick-inserter.js.map +1 -1
  1255. package/build-module/components/inserter/reusable-block-rename-hint.js +21 -18
  1256. package/build-module/components/inserter/reusable-block-rename-hint.js.map +1 -1
  1257. package/build-module/components/inserter/reusable-blocks-tab.native.js +2 -2
  1258. package/build-module/components/inserter/reusable-blocks-tab.native.js.map +1 -1
  1259. package/build-module/components/inserter/search-results.js +53 -41
  1260. package/build-module/components/inserter/search-results.js.map +1 -1
  1261. package/build-module/components/inserter/search-results.native.js +3 -3
  1262. package/build-module/components/inserter/search-results.native.js.map +1 -1
  1263. package/build-module/components/inserter/tabs.js +31 -26
  1264. package/build-module/components/inserter/tabs.js.map +1 -1
  1265. package/build-module/components/inserter/tabs.native.js +20 -18
  1266. package/build-module/components/inserter/tabs.native.js.map +1 -1
  1267. package/build-module/components/inserter/tips.js +7 -5
  1268. package/build-module/components/inserter/tips.js.map +1 -1
  1269. package/build-module/components/inserter-button/index.native.js +29 -23
  1270. package/build-module/components/inserter-button/index.native.js.map +1 -1
  1271. package/build-module/components/inserter-button/sparkles.js +8 -7
  1272. package/build-module/components/inserter-button/sparkles.js.map +1 -1
  1273. package/build-module/components/inserter-draggable-blocks/index.js +14 -13
  1274. package/build-module/components/inserter-draggable-blocks/index.js.map +1 -1
  1275. package/build-module/components/inserter-list-item/index.js +69 -62
  1276. package/build-module/components/inserter-list-item/index.js.map +1 -1
  1277. package/build-module/components/inserter-listbox/group.js +2 -2
  1278. package/build-module/components/inserter-listbox/group.js.map +1 -1
  1279. package/build-module/components/inserter-listbox/index.js +6 -4
  1280. package/build-module/components/inserter-listbox/index.js.map +1 -1
  1281. package/build-module/components/inserter-listbox/item.js +10 -8
  1282. package/build-module/components/inserter-listbox/item.js.map +1 -1
  1283. package/build-module/components/inserter-listbox/row.js +2 -2
  1284. package/build-module/components/inserter-listbox/row.js.map +1 -1
  1285. package/build-module/components/inspector-controls/block-support-slot-container.js +2 -2
  1286. package/build-module/components/inspector-controls/block-support-slot-container.js.map +1 -1
  1287. package/build-module/components/inspector-controls/block-support-tools-panel.js +5 -5
  1288. package/build-module/components/inspector-controls/block-support-tools-panel.js.map +1 -1
  1289. package/build-module/components/inspector-controls/fill.js +22 -17
  1290. package/build-module/components/inspector-controls/fill.js.map +1 -1
  1291. package/build-module/components/inspector-controls/fill.native.js +14 -5
  1292. package/build-module/components/inspector-controls/fill.native.js.map +1 -1
  1293. package/build-module/components/inspector-controls/index.js +3 -3
  1294. package/build-module/components/inspector-controls/index.js.map +1 -1
  1295. package/build-module/components/inspector-controls/slot.js +11 -10
  1296. package/build-module/components/inspector-controls/slot.js.map +1 -1
  1297. package/build-module/components/inspector-controls/slot.native.js +3 -3
  1298. package/build-module/components/inspector-controls/slot.native.js.map +1 -1
  1299. package/build-module/components/inspector-controls-tabs/advanced-controls-panel.js +7 -6
  1300. package/build-module/components/inspector-controls-tabs/advanced-controls-panel.js.map +1 -1
  1301. package/build-module/components/inspector-controls-tabs/advanced-controls-panel.native.js +11 -9
  1302. package/build-module/components/inspector-controls-tabs/advanced-controls-panel.native.js.map +1 -1
  1303. package/build-module/components/inspector-controls-tabs/index.js +45 -32
  1304. package/build-module/components/inspector-controls-tabs/index.js.map +1 -1
  1305. package/build-module/components/inspector-controls-tabs/position-controls-panel.js +8 -7
  1306. package/build-module/components/inspector-controls-tabs/position-controls-panel.js.map +1 -1
  1307. package/build-module/components/inspector-controls-tabs/settings-tab-hint.js +21 -18
  1308. package/build-module/components/inspector-controls-tabs/settings-tab-hint.js.map +1 -1
  1309. package/build-module/components/inspector-controls-tabs/settings-tab.js +8 -2
  1310. package/build-module/components/inspector-controls-tabs/settings-tab.js.map +1 -1
  1311. package/build-module/components/inspector-controls-tabs/styles-tab.js +33 -26
  1312. package/build-module/components/inspector-controls-tabs/styles-tab.js.map +1 -1
  1313. package/build-module/components/inspector-popover-header/index.js +32 -26
  1314. package/build-module/components/inspector-popover-header/index.js.map +1 -1
  1315. package/build-module/components/justify-content-control/index.js +3 -3
  1316. package/build-module/components/justify-content-control/index.js.map +1 -1
  1317. package/build-module/components/justify-content-control/ui.js +2 -2
  1318. package/build-module/components/justify-content-control/ui.js.map +1 -1
  1319. package/build-module/components/letter-spacing-control/index.js +2 -2
  1320. package/build-module/components/letter-spacing-control/index.js.map +1 -1
  1321. package/build-module/components/line-height-control/index.js +17 -16
  1322. package/build-module/components/line-height-control/index.js.map +1 -1
  1323. package/build-module/components/line-height-control/index.native.js +2 -2
  1324. package/build-module/components/line-height-control/index.native.js.map +1 -1
  1325. package/build-module/components/link-control/index.js +102 -82
  1326. package/build-module/components/link-control/index.js.map +1 -1
  1327. package/build-module/components/link-control/link-preview.js +63 -49
  1328. package/build-module/components/link-control/link-preview.js.map +1 -1
  1329. package/build-module/components/link-control/search-create-button.js +6 -5
  1330. package/build-module/components/link-control/search-create-button.js.map +1 -1
  1331. package/build-module/components/link-control/search-input.js +33 -31
  1332. package/build-module/components/link-control/search-input.js.map +1 -1
  1333. package/build-module/components/link-control/search-item.js +12 -11
  1334. package/build-module/components/link-control/search-item.js.map +1 -1
  1335. package/build-module/components/link-control/search-results.js +51 -46
  1336. package/build-module/components/link-control/search-results.js.map +1 -1
  1337. package/build-module/components/link-control/settings-drawer.js +39 -30
  1338. package/build-module/components/link-control/settings-drawer.js.map +1 -1
  1339. package/build-module/components/link-control/settings.js +11 -9
  1340. package/build-module/components/link-control/settings.js.map +1 -1
  1341. package/build-module/components/list-view/appender.js +25 -22
  1342. package/build-module/components/list-view/appender.js.map +1 -1
  1343. package/build-module/components/list-view/aria-referenced-text.js +5 -4
  1344. package/build-module/components/list-view/aria-referenced-text.js.map +1 -1
  1345. package/build-module/components/list-view/block-contents.js +34 -29
  1346. package/build-module/components/list-view/block-contents.js.map +1 -1
  1347. package/build-module/components/list-view/block-select-button.js +51 -42
  1348. package/build-module/components/list-view/block-select-button.js.map +1 -1
  1349. package/build-module/components/list-view/block.js +98 -84
  1350. package/build-module/components/list-view/block.js.map +1 -1
  1351. package/build-module/components/list-view/branch.js +102 -93
  1352. package/build-module/components/list-view/branch.js.map +1 -1
  1353. package/build-module/components/list-view/drop-indicator.js +39 -31
  1354. package/build-module/components/list-view/drop-indicator.js.map +1 -1
  1355. package/build-module/components/list-view/expander.js +8 -6
  1356. package/build-module/components/list-view/expander.js.map +1 -1
  1357. package/build-module/components/list-view/index.js +43 -38
  1358. package/build-module/components/list-view/index.js.map +1 -1
  1359. package/build-module/components/list-view/leaf.js +5 -4
  1360. package/build-module/components/list-view/leaf.js.map +1 -1
  1361. package/build-module/components/media-placeholder/index.js +101 -79
  1362. package/build-module/components/media-placeholder/index.js.map +1 -1
  1363. package/build-module/components/media-placeholder/index.native.js +65 -52
  1364. package/build-module/components/media-placeholder/index.native.js.map +1 -1
  1365. package/build-module/components/media-replace-flow/index.js +74 -60
  1366. package/build-module/components/media-replace-flow/index.js.map +1 -1
  1367. package/build-module/components/media-replace-flow/index.native.js +2 -2
  1368. package/build-module/components/media-replace-flow/index.native.js.map +1 -1
  1369. package/build-module/components/media-upload/index.native.js +46 -40
  1370. package/build-module/components/media-upload/index.native.js.map +1 -1
  1371. package/build-module/components/media-upload-progress/index.native.js +41 -16
  1372. package/build-module/components/media-upload-progress/index.native.js.map +1 -1
  1373. package/build-module/components/multi-selection-inspector/index.js +20 -15
  1374. package/build-module/components/multi-selection-inspector/index.js.map +1 -1
  1375. package/build-module/components/navigable-toolbar/index.js +9 -7
  1376. package/build-module/components/navigable-toolbar/index.js.map +1 -1
  1377. package/build-module/components/observe-typing/index.js +5 -4
  1378. package/build-module/components/observe-typing/index.js.map +1 -1
  1379. package/build-module/components/panel-color-settings/index.js +2 -2
  1380. package/build-module/components/panel-color-settings/index.js.map +1 -1
  1381. package/build-module/components/plain-text/index.js +3 -3
  1382. package/build-module/components/plain-text/index.js.map +1 -1
  1383. package/build-module/components/plain-text/index.native.js +3 -3
  1384. package/build-module/components/plain-text/index.native.js.map +1 -1
  1385. package/build-module/components/provider/block-refs-provider.js +5 -4
  1386. package/build-module/components/provider/block-refs-provider.js.map +1 -1
  1387. package/build-module/components/provider/index.js +12 -8
  1388. package/build-module/components/provider/index.js.map +1 -1
  1389. package/build-module/components/provider/index.native.js +4 -3
  1390. package/build-module/components/provider/index.native.js.map +1 -1
  1391. package/build-module/components/provider/with-registry-provider.js +32 -28
  1392. package/build-module/components/provider/with-registry-provider.js.map +1 -1
  1393. package/build-module/components/publish-date-time-picker/index.js +37 -17
  1394. package/build-module/components/publish-date-time-picker/index.js.map +1 -1
  1395. package/build-module/components/recursion-provider/index.js +6 -5
  1396. package/build-module/components/recursion-provider/index.js.map +1 -1
  1397. package/build-module/components/resizable-box-popover/index.js +7 -6
  1398. package/build-module/components/resizable-box-popover/index.js.map +1 -1
  1399. package/build-module/components/resolution-tool/index.js +12 -11
  1400. package/build-module/components/resolution-tool/index.js.map +1 -1
  1401. package/build-module/components/responsive-block-control/index.js +31 -26
  1402. package/build-module/components/responsive-block-control/index.js.map +1 -1
  1403. package/build-module/components/responsive-block-control/label.js +13 -7
  1404. package/build-module/components/responsive-block-control/label.js.map +1 -1
  1405. package/build-module/components/rich-text/content.js +8 -5
  1406. package/build-module/components/rich-text/content.js.map +1 -1
  1407. package/build-module/components/rich-text/embed-handler-picker.native.js +2 -2
  1408. package/build-module/components/rich-text/embed-handler-picker.native.js.map +1 -1
  1409. package/build-module/components/rich-text/format-edit.js +5 -5
  1410. package/build-module/components/rich-text/format-edit.js.map +1 -1
  1411. package/build-module/components/rich-text/format-toolbar/index.js +39 -33
  1412. package/build-module/components/rich-text/format-toolbar/index.js.map +1 -1
  1413. package/build-module/components/rich-text/format-toolbar/index.native.js +10 -7
  1414. package/build-module/components/rich-text/format-toolbar/index.native.js.map +1 -1
  1415. package/build-module/components/rich-text/format-toolbar-container.js +17 -12
  1416. package/build-module/components/rich-text/format-toolbar-container.js.map +1 -1
  1417. package/build-module/components/rich-text/format-toolbar-container.native.js +5 -4
  1418. package/build-module/components/rich-text/format-toolbar-container.native.js.map +1 -1
  1419. package/build-module/components/rich-text/get-rich-text-values.js +3 -2
  1420. package/build-module/components/rich-text/get-rich-text-values.js.map +1 -1
  1421. package/build-module/components/rich-text/index.js +90 -77
  1422. package/build-module/components/rich-text/index.js.map +1 -1
  1423. package/build-module/components/rich-text/index.native.js +53 -47
  1424. package/build-module/components/rich-text/index.native.js.map +1 -1
  1425. package/build-module/components/rich-text/multiline.js +62 -62
  1426. package/build-module/components/rich-text/multiline.js.map +1 -1
  1427. package/build-module/components/rich-text/native/format-edit.js +3 -4
  1428. package/build-module/components/rich-text/native/format-edit.js.map +1 -1
  1429. package/build-module/components/rich-text/native/index.native.js +89 -80
  1430. package/build-module/components/rich-text/native/index.native.js.map +1 -1
  1431. package/build-module/components/rich-text/native/toolbar-button-with-options.native.js +20 -14
  1432. package/build-module/components/rich-text/native/toolbar-button-with-options.native.js.map +1 -1
  1433. package/build-module/components/rich-text/toolbar-button.js +8 -7
  1434. package/build-module/components/rich-text/toolbar-button.js.map +1 -1
  1435. package/build-module/components/rich-text/utils.js +5 -4
  1436. package/build-module/components/rich-text/utils.js.map +1 -1
  1437. package/build-module/components/rich-text/with-deprecations.js +2 -2
  1438. package/build-module/components/rich-text/with-deprecations.js.map +1 -1
  1439. package/build-module/components/segmented-text-control/index.js +20 -17
  1440. package/build-module/components/segmented-text-control/index.js.map +1 -1
  1441. package/build-module/components/skip-to-selected-block/index.js +5 -4
  1442. package/build-module/components/skip-to-selected-block/index.js.map +1 -1
  1443. package/build-module/components/spacing-sizes-control/hooks/use-spacing-sizes.js +29 -14
  1444. package/build-module/components/spacing-sizes-control/hooks/use-spacing-sizes.js.map +1 -1
  1445. package/build-module/components/spacing-sizes-control/index.js +24 -19
  1446. package/build-module/components/spacing-sizes-control/index.js.map +1 -1
  1447. package/build-module/components/spacing-sizes-control/input-controls/axial.js +20 -18
  1448. package/build-module/components/spacing-sizes-control/input-controls/axial.js.map +1 -1
  1449. package/build-module/components/spacing-sizes-control/input-controls/separated.js +19 -17
  1450. package/build-module/components/spacing-sizes-control/input-controls/separated.js.map +1 -1
  1451. package/build-module/components/spacing-sizes-control/input-controls/single.js +2 -2
  1452. package/build-module/components/spacing-sizes-control/input-controls/single.js.map +1 -1
  1453. package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js +106 -101
  1454. package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
  1455. package/build-module/components/spacing-sizes-control/sides-dropdown/index.js +44 -34
  1456. package/build-module/components/spacing-sizes-control/sides-dropdown/index.js.map +1 -1
  1457. package/build-module/components/spacing-sizes-control/utils.js +1 -0
  1458. package/build-module/components/spacing-sizes-control/utils.js.map +1 -1
  1459. package/build-module/components/text-alignment-control/index.js +2 -2
  1460. package/build-module/components/text-alignment-control/index.js.map +1 -1
  1461. package/build-module/components/text-decoration-control/index.js +2 -2
  1462. package/build-module/components/text-decoration-control/index.js.map +1 -1
  1463. package/build-module/components/text-transform-control/index.js +2 -2
  1464. package/build-module/components/text-transform-control/index.js.map +1 -1
  1465. package/build-module/components/tool-selector/index.js +37 -26
  1466. package/build-module/components/tool-selector/index.js.map +1 -1
  1467. package/build-module/components/typewriter/index.js +5 -4
  1468. package/build-module/components/typewriter/index.js.map +1 -1
  1469. package/build-module/components/ungroup-button/index.native.js +8 -6
  1470. package/build-module/components/ungroup-button/index.native.js.map +1 -1
  1471. package/build-module/components/unit-control/index.js +2 -2
  1472. package/build-module/components/unit-control/index.js.map +1 -1
  1473. package/build-module/components/unsupported-block-details/index.native.js +32 -28
  1474. package/build-module/components/unsupported-block-details/index.native.js.map +1 -1
  1475. package/build-module/components/url-input/button.js +32 -28
  1476. package/build-module/components/url-input/button.js.map +1 -1
  1477. package/build-module/components/url-input/index.js +28 -20
  1478. package/build-module/components/url-input/index.js.map +1 -1
  1479. package/build-module/components/url-input/index.native.js +2 -2
  1480. package/build-module/components/url-input/index.native.js.map +1 -1
  1481. package/build-module/components/url-popover/image-url-input-ui.js +106 -91
  1482. package/build-module/components/url-popover/image-url-input-ui.js.map +1 -1
  1483. package/build-module/components/url-popover/index.js +25 -19
  1484. package/build-module/components/url-popover/index.js.map +1 -1
  1485. package/build-module/components/url-popover/link-editor.js +16 -14
  1486. package/build-module/components/url-popover/link-editor.js.map +1 -1
  1487. package/build-module/components/url-popover/link-viewer-url.js +6 -5
  1488. package/build-module/components/url-popover/link-viewer-url.js.map +1 -1
  1489. package/build-module/components/url-popover/link-viewer.js +15 -13
  1490. package/build-module/components/url-popover/link-viewer.js.map +1 -1
  1491. package/build-module/components/use-block-commands/index.js +2 -2
  1492. package/build-module/components/use-block-commands/index.js.map +1 -1
  1493. package/build-module/components/video-player/gridicon-play.native.js +8 -7
  1494. package/build-module/components/video-player/gridicon-play.native.js.map +1 -1
  1495. package/build-module/components/video-player/index.native.js +44 -40
  1496. package/build-module/components/video-player/index.native.js.map +1 -1
  1497. package/build-module/components/warning/index.js +35 -26
  1498. package/build-module/components/warning/index.js.map +1 -1
  1499. package/build-module/components/warning/index.native.js +18 -13
  1500. package/build-module/components/warning/index.native.js.map +1 -1
  1501. package/build-module/components/writing-flow/index.js +11 -6
  1502. package/build-module/components/writing-flow/index.js.map +1 -1
  1503. package/build-module/components/writing-flow/use-clipboard-handler.js +19 -16
  1504. package/build-module/components/writing-flow/use-clipboard-handler.js.map +1 -1
  1505. package/build-module/components/writing-flow/use-tab-nav.js +3 -3
  1506. package/build-module/components/writing-flow/use-tab-nav.js.map +1 -1
  1507. package/build-module/components/writing-mode-control/index.js +2 -2
  1508. package/build-module/components/writing-mode-control/index.js.map +1 -1
  1509. package/build-module/hooks/align.js +9 -8
  1510. package/build-module/hooks/align.js.map +1 -1
  1511. package/build-module/hooks/anchor.js +30 -22
  1512. package/build-module/hooks/anchor.js.map +1 -1
  1513. package/build-module/hooks/background.js +6 -5
  1514. package/build-module/hooks/background.js.map +1 -1
  1515. package/build-module/hooks/block-bindings.js +81 -0
  1516. package/build-module/hooks/block-bindings.js.map +1 -0
  1517. package/build-module/hooks/block-hooks.js +42 -33
  1518. package/build-module/hooks/block-hooks.js.map +1 -1
  1519. package/build-module/hooks/block-style-variation.js +136 -0
  1520. package/build-module/hooks/block-style-variation.js.map +1 -0
  1521. package/build-module/hooks/border.js +6 -5
  1522. package/build-module/hooks/border.js.map +1 -1
  1523. package/build-module/hooks/color.js +11 -9
  1524. package/build-module/hooks/color.js.map +1 -1
  1525. package/build-module/hooks/content-lock-ui.js +25 -15
  1526. package/build-module/hooks/content-lock-ui.js.map +1 -1
  1527. package/build-module/hooks/contrast-checker.js +2 -2
  1528. package/build-module/hooks/contrast-checker.js.map +1 -1
  1529. package/build-module/hooks/custom-class-name.js +17 -16
  1530. package/build-module/hooks/custom-class-name.js.map +1 -1
  1531. package/build-module/hooks/dimensions.js +26 -21
  1532. package/build-module/hooks/dimensions.js.map +1 -1
  1533. package/build-module/hooks/duotone.js +51 -45
  1534. package/build-module/hooks/duotone.js.map +1 -1
  1535. package/build-module/hooks/font-family.js +3 -3
  1536. package/build-module/hooks/font-family.js.map +1 -1
  1537. package/build-module/hooks/font-size.js +2 -2
  1538. package/build-module/hooks/font-size.js.map +1 -1
  1539. package/build-module/hooks/index.js +4 -2
  1540. package/build-module/hooks/index.js.map +1 -1
  1541. package/build-module/hooks/layout-child.js +28 -24
  1542. package/build-module/hooks/layout-child.js.map +1 -1
  1543. package/build-module/hooks/layout.js +63 -55
  1544. package/build-module/hooks/layout.js.map +1 -1
  1545. package/build-module/hooks/line-height.js +2 -2
  1546. package/build-module/hooks/line-height.js.map +1 -1
  1547. package/build-module/hooks/position.js +28 -26
  1548. package/build-module/hooks/position.js.map +1 -1
  1549. package/build-module/hooks/spacing-visualizer.js +10 -9
  1550. package/build-module/hooks/spacing-visualizer.js.map +1 -1
  1551. package/build-module/hooks/style.js +25 -13
  1552. package/build-module/hooks/style.js.map +1 -1
  1553. package/build-module/hooks/text-align.js +20 -19
  1554. package/build-module/hooks/text-align.js.map +1 -1
  1555. package/build-module/hooks/typography.js +6 -5
  1556. package/build-module/hooks/typography.js.map +1 -1
  1557. package/build-module/hooks/typography.native.js +12 -8
  1558. package/build-module/hooks/typography.native.js.map +1 -1
  1559. package/build-module/hooks/use-bindings-attributes.js +48 -14
  1560. package/build-module/hooks/use-bindings-attributes.js.map +1 -1
  1561. package/build-module/hooks/use-typography-props.js +3 -3
  1562. package/build-module/hooks/use-typography-props.js.map +1 -1
  1563. package/build-module/hooks/use-zoom-out.js +2 -2
  1564. package/build-module/hooks/use-zoom-out.js.map +1 -1
  1565. package/build-module/hooks/utils.js +18 -17
  1566. package/build-module/hooks/utils.js.map +1 -1
  1567. package/build-module/layouts/constrained.js +68 -58
  1568. package/build-module/layouts/constrained.js.map +1 -1
  1569. package/build-module/layouts/flex.js +77 -61
  1570. package/build-module/layouts/flex.js.map +1 -1
  1571. package/build-module/layouts/grid.js +148 -125
  1572. package/build-module/layouts/grid.js.map +1 -1
  1573. package/build-module/private-apis.js +7 -1
  1574. package/build-module/private-apis.js.map +1 -1
  1575. package/build-module/store/actions.js +39 -7
  1576. package/build-module/store/actions.js.map +1 -1
  1577. package/build-module/store/get-block-settings.js +2 -46
  1578. package/build-module/store/get-block-settings.js.map +1 -1
  1579. package/build-module/store/reducer.js +21 -14
  1580. package/build-module/store/reducer.js.map +1 -1
  1581. package/build-module/store/selectors.js +34 -7
  1582. package/build-module/store/selectors.js.map +1 -1
  1583. package/build-module/store/utils.js +1 -0
  1584. package/build-module/store/utils.js.map +1 -1
  1585. package/build-module/utils/transform-styles/index.js +1 -1
  1586. package/build-module/utils/transform-styles/index.js.map +1 -1
  1587. package/build-style/content-rtl.css +4 -0
  1588. package/build-style/content.css +4 -0
  1589. package/build-style/style-rtl.css +91 -72
  1590. package/build-style/style.css +91 -72
  1591. package/package.json +33 -32
  1592. package/src/components/alignment-control/test/index.js +1 -1
  1593. package/src/components/audio-player/audio-url-parser.native.js +20 -0
  1594. package/src/components/audio-player/index.native.js +221 -0
  1595. package/src/components/audio-player/styles.native.scss +114 -0
  1596. package/src/components/audio-player/test/audio-url-parser.native.js +53 -0
  1597. package/src/components/block-bindings-toolbar-indicator/index.js +125 -10
  1598. package/src/components/block-bindings-toolbar-indicator/style.scss +7 -8
  1599. package/src/components/block-canvas/style.scss +1 -5
  1600. package/src/components/block-card/index.js +9 -5
  1601. package/src/components/block-card/style.scss +0 -11
  1602. package/src/components/block-edit/index.js +13 -2
  1603. package/src/components/block-edit/multiple-usage-warning.js +46 -0
  1604. package/src/components/block-inspector/index.js +2 -4
  1605. package/src/components/block-inspector/useBlockInspectorAnimationSettings.js +2 -5
  1606. package/src/components/block-list/block-invalid-warning.native.js +1 -1
  1607. package/src/components/block-list/block.js +64 -18
  1608. package/src/components/block-list/block.native.js +17 -9
  1609. package/src/components/block-patterns-list/index.js +4 -1
  1610. package/src/components/block-patterns-list/style.scss +23 -20
  1611. package/src/components/block-preview/style.scss +0 -26
  1612. package/src/components/block-settings/container.native.js +2 -0
  1613. package/src/components/block-toolbar/index.js +1 -1
  1614. package/src/components/block-tools/index.js +6 -5
  1615. package/src/components/block-tools/style.scss +2 -2
  1616. package/src/components/block-tools/zoom-out-mode-inserters.js +4 -3
  1617. package/src/components/border-radius-control/all-input-control.js +1 -1
  1618. package/src/components/border-radius-control/input-controls.js +1 -1
  1619. package/src/components/child-layout-control/index.js +12 -12
  1620. package/src/components/colors/utils.js +2 -2
  1621. package/src/components/colors/with-colors.js +2 -1
  1622. package/src/components/colors-gradients/control.js +3 -11
  1623. package/src/components/contrast-checker/test/index.js +8 -8
  1624. package/src/components/dimensions-tool/aspect-ratio-tool.js +1 -1
  1625. package/src/components/dimensions-tool/scale-tool.js +1 -1
  1626. package/src/components/dimensions-tool/width-height-tool.js +2 -2
  1627. package/src/components/font-sizes/utils.js +2 -1
  1628. package/src/components/global-styles/background-panel.js +116 -46
  1629. package/src/components/global-styles/border-panel.js +8 -5
  1630. package/src/components/global-styles/color-panel.js +27 -22
  1631. package/src/components/global-styles/color-panel.native.js +1 -1
  1632. package/src/components/global-styles/dimensions-panel.js +7 -8
  1633. package/src/components/global-styles/hooks.js +13 -1
  1634. package/src/components/global-styles/index.js +3 -0
  1635. package/src/components/global-styles/shadow-panel-components.js +11 -5
  1636. package/src/components/global-styles/test/theme-file-uri-utils.js +66 -0
  1637. package/src/components/global-styles/test/use-global-styles-context.native.js +434 -0
  1638. package/src/components/global-styles/test/use-global-styles-output.js +11 -10
  1639. package/src/components/global-styles/theme-file-uri-utils.js +77 -0
  1640. package/src/components/global-styles/typography-panel.js +50 -5
  1641. package/src/components/global-styles/use-global-styles-context.native.js +586 -0
  1642. package/src/components/global-styles/use-global-styles-output.js +199 -101
  1643. package/src/components/grid-visualizer/grid-visualizer.js +8 -1
  1644. package/src/components/grid-visualizer/style.scss +2 -1
  1645. package/src/components/height-control/index.js +1 -1
  1646. package/src/components/iframe/content.scss +4 -0
  1647. package/src/components/index.native.js +7 -0
  1648. package/src/components/inner-blocks/use-nested-settings-update.js +9 -16
  1649. package/src/components/inner-blocks/warning-max-depth-exceeded.native.js +1 -1
  1650. package/src/components/inserter/block-patterns-explorer/pattern-list.js +1 -1
  1651. package/src/components/inserter/block-patterns-tab/pattern-category-preview-panel.js +16 -2
  1652. package/src/components/inserter/block-patterns-tab/pattern-category-previews.js +6 -1
  1653. package/src/components/inserter/block-patterns-tab/patterns-filter.js +3 -2
  1654. package/src/components/inserter/block-types-tab.js +120 -78
  1655. package/src/components/inserter/category-tabs/index.js +1 -1
  1656. package/src/components/inserter/hooks/use-block-types-state.js +21 -5
  1657. package/src/components/inserter/hooks/use-insertion-point.js +53 -7
  1658. package/src/components/inserter/library.js +17 -7
  1659. package/src/components/inserter/menu.js +24 -11
  1660. package/src/components/inserter/quick-inserter.js +3 -1
  1661. package/src/components/inserter/search-results.js +2 -1
  1662. package/src/components/inserter/style.scss +41 -18
  1663. package/src/components/inserter/tabs.js +2 -2
  1664. package/src/components/inspector-controls/fill.native.js +3 -5
  1665. package/src/components/inspector-controls-tabs/index.js +15 -3
  1666. package/src/components/inspector-controls-tabs/style.scss +2 -10
  1667. package/src/components/link-control/index.js +10 -1
  1668. package/src/components/link-control/style.scss +9 -3
  1669. package/src/components/list-view/block-contents.js +1 -1
  1670. package/src/components/media-placeholder/index.js +1 -1
  1671. package/src/components/media-placeholder/index.native.js +2 -2
  1672. package/src/components/media-upload-progress/index.native.js +22 -2
  1673. package/src/components/provider/with-registry-provider.js +33 -38
  1674. package/src/components/publish-date-time-picker/index.js +43 -15
  1675. package/src/components/resolution-tool/index.js +1 -1
  1676. package/src/components/rich-text/index.js +11 -5
  1677. package/src/components/rich-text/native/index.native.js +3 -2
  1678. package/src/components/rich-text/native/test/index.native.js +13 -13
  1679. package/src/components/spacing-sizes-control/hooks/use-spacing-sizes.js +48 -16
  1680. package/src/components/spacing-sizes-control/input-controls/spacing-input-control.js +4 -3
  1681. package/src/components/spacing-sizes-control/utils.js +2 -0
  1682. package/src/components/video-player/index.native.js +1 -1
  1683. package/src/components/writing-flow/use-clipboard-handler.js +19 -16
  1684. package/src/hooks/block-bindings.js +92 -0
  1685. package/src/hooks/block-bindings.scss +3 -0
  1686. package/src/hooks/block-style-variation.js +156 -0
  1687. package/src/hooks/font-family.js +1 -1
  1688. package/src/hooks/index.js +4 -0
  1689. package/src/hooks/layout.js +1 -2
  1690. package/src/hooks/position.js +1 -1
  1691. package/src/hooks/style.js +9 -1
  1692. package/src/hooks/text-align.js +17 -11
  1693. package/src/hooks/use-bindings-attributes.js +48 -5
  1694. package/src/hooks/use-typography-props.js +2 -1
  1695. package/src/hooks/use-zoom-out.js +9 -2
  1696. package/src/hooks/utils.js +21 -4
  1697. package/src/layouts/flex.js +2 -2
  1698. package/src/layouts/grid.js +5 -5
  1699. package/src/private-apis.js +6 -0
  1700. package/src/store/actions.js +45 -12
  1701. package/src/store/get-block-settings.js +1 -46
  1702. package/src/store/reducer.js +24 -11
  1703. package/src/store/selectors.js +66 -11
  1704. package/src/store/utils.js +2 -0
  1705. package/src/style.scss +1 -0
  1706. package/src/utils/test/__snapshots__/transform-styles.js.snap +1 -1
  1707. package/src/utils/test/transform-styles.js +2 -2
  1708. package/src/utils/transform-styles/index.js +3 -1
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNative","require","_memize","_interopRequireDefault","_colord","_reactNativeAztec","_reactNativeBridge","_blockEditor","_components","_element","_compose","_data","_blocks","_htmlEntities","_keycodes","_url","_icons","_i18n","_richText","_useFormatTypes","_formatEdit","_getFormatColors","_style","_toolbarButtonWithOptions","flatColorPalettes","memize","colorsPalettes","theme","custom","default","getSelectionColor","currentSelectionColor","defaultSelectionColor","baseGlobalStyles","isBlockBasedTheme","selectionColor","colordTextColor","colord","colordBackgroundColor","color","background","isColordTextReadable","isReadable","text","gutenbergFormatNamesToAztec","EMPTY_PARAGRAPH_TAGS","DEFAULT_FONT_SIZE","MIN_LINE_HEIGHT","RichText","Component","constructor","value","selectionStart","selectionEnd","arguments","isIOS","Platform","OS","createRecord","bind","onChangeFromAztec","onKeyDown","handleEnter","handleDelete","onPaste","onFocus","onBlur","onTextUpdate","onContentSizeChange","onFormatChange","formatToValue","maxSize","debounceCreateUndoLevel","debounce","onCreateUndoLevel","onSelectionChange","onSelectionChangeFromAztec","valueToFormat","getHtmlToRender","handleSuggestionFunc","handleUserSuggestion","showUserSuggestions","handleXpostSuggestion","showXpostSuggestions","suggestionOptions","insertString","manipulateEventCounterToForceNativeToRefresh","shouldDropEventFromAztec","state","activeFormats","selectedFormat","height","currentFontSize","getFontSize","needsSelectionUpdate","savedContent","isTouched","lastAztecEventType","lastHistoryValue","getRecord","start","end","colorPalette","props","currentValue","formats","replacements","newFormats","getFormatColors","preserveWhiteSpace","create","html","range","Math","min","length","removeRootTagsProducedByAztec","toHTMLString","getActiveFormatNames","record","formatTypes","map","name","filter","getActiveFormat","undefined","Boolean","changeHandlers","Object","fromEntries","entries","key","startsWith","values","forEach","changeHandler","onChange","setState","string","toInsert","insert","__unstableOnCreateUndoLevel","toString","result","removeRootTag","tagName","tagsToEliminate","element","removeTag","tag","openingTagRegexp","RegExp","closingTagRegexp","replace","event","contentWithoutRootTag","nativeEvent","lastEventCount","eventCount","comesFromAztec","firedAfterTextChanged","refresh","contentSize","defaultPrevented","customEditableOnKeyDown","preventDefault","RCTAztecView","KeyCodes","keyCode","handleTriggerKeyCodes","ENTER","onEnter","shiftKey","DELETE","BACKSPACE","isReverse","onDelete","newValue","remove","isCollapsed","triggeredOption","find","option","triggeredKeyCode","triggerChar","charCodeAt","getTextContent","useTrigger","charAt","onClick","areMentionsSupported","areXPostsSupported","allOptions","supported","title","__","label","icon","atSymbol","plus","op","suggestionFunction","prefix","then","suggestion","catch","pastedText","pastedHtml","files","currentRecord","trimmedText","trim","isURL","linkedRecord","applyFormat","type","attributes","href","decodeEntities","window","console","log","plainText","unstableOnFocus","hasChanged","isManual","getActiveFormats","logText","shouldDrop","shouldFocusTextInputAfterMerge","prevProps","__unstableIsSelected","isSelected","blockIsSelected","__unstableMobileNoFocusOnMount","prevIsSelected","prevBlockIsSelected","noSelectionValues","textInputWasNotFocused","realStart","realEnd","max","isEmpty","Array","isArray","childrenBlock","toHTML","format","shouldComponentUpdate","nextProps","nextState","reversed","fontSize","style","lineHeight","componentDidMount","_editor","focus","componentDidUpdate","_this$value$toString$","lastCharacterPosition","blur","currentFontSizeStyle","getParsedFontSize","prevFontSizeStyle","isDifferentTag","componentWillUnmount","clearCurrentSelectionOnUnmount","isFocused","extraAttributes","getEditableProps","className","_getPxFromCssUnit","width","Dimensions","get","cssUnitOptions","selectedPxValue","getPxFromCssUnit","parseFloat","tagNameFontSize","elements","typography","newFontSize","getLineHeight","tagNameLineHeight","newLineHeight","getIsBlockBasedTheme","isNaN","getBlockUseDefaultFont","tagsToMatch","test","getLinkTextColor","defaultColor","customColor","linkColor","isValid","toHex","getPlaceholderTextColor","_ref","_ref2","getStylesFromColorScheme","placeholderTextColor","placeholderStyle","styles","richTextPlaceholder","richTextPlaceholderDark","defaultPlaceholderTextColor","placeholderOpacity","inheritPlaceholderColor","placeholderColor","globalStylesPlaceholderColor","render","children","minWidth","maxWidth","parentBlockStyles","accessibilityLabel","disableEditingMenu","disableSuggestions","containerWidth","editableProps","blockUseDefaultFont","textDecorationColor","defaultTextDecorationColor","fontFamily","defaultFontFamily","richText","richTextDark","linkTextColor","currentSelectionStart","currentSelectionEnd","selection","brBeforeParaMatches","match","warn","count","newSelectionStart","newSelectionEnd","containerStyles","padding","backgroundColor","EditableView","_react","createElement","Fragment","View","editableTagName","ref","nativeEditorRef","minHeight","placeholder","deleteEnter","triggerKeyCodes","blockType","maxImagesWidth","fontWeight","fontStyle","isMultiline","textAlign","id","disableAutocorrection","forwardedRef","BlockFormatControls","options","exports","defaultProps","withFormatTypes","WrappedComponent","clientId","identifier","withoutInteractiveFormatting","allowedFormats","useFormatTypes","_default","compose","withSelect","select","getBlockParents","getBlock","getSettings","parents","parentBlock","childrenStyles","settings","__experimentalGlobalStylesBaseStyles","colorPalettes","__experimentalFeatures","palette","colors","capabilities","mentions","xposts","withPreferredColorScheme"],"sources":["@wordpress/block-editor/src/components/rich-text/native/index.native.js"],"sourcesContent":["/* eslint no-console: [\"error\", { allow: [\"warn\"] }] */\n\n/**\n * External dependencies\n */\nimport { View, Platform, Dimensions } from 'react-native';\nimport memize from 'memize';\nimport { colord } from 'colord';\n\n/**\n * WordPress dependencies\n */\nimport RCTAztecView from '@wordpress/react-native-aztec';\nimport {\n\tshowUserSuggestions,\n\tshowXpostSuggestions,\n} from '@wordpress/react-native-bridge';\nimport { BlockFormatControls } from '@wordpress/block-editor';\nimport { getPxFromCssUnit } from '@wordpress/components';\nimport { Component } from '@wordpress/element';\nimport {\n\tcompose,\n\tdebounce,\n\twithPreferredColorScheme,\n} from '@wordpress/compose';\nimport { withSelect } from '@wordpress/data';\nimport { childrenBlock } from '@wordpress/blocks';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { BACKSPACE, DELETE, ENTER } from '@wordpress/keycodes';\nimport { isURL } from '@wordpress/url';\nimport { atSymbol, plus } from '@wordpress/icons';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tapplyFormat,\n\tgetActiveFormat,\n\tgetActiveFormats,\n\tinsert,\n\tgetTextContent,\n\tisEmpty,\n\tcreate,\n\ttoHTMLString,\n\tisCollapsed,\n\tremove,\n} from '@wordpress/rich-text';\n\n/**\n * Internal dependencies\n */\nimport { useFormatTypes } from './use-format-types';\nimport FormatEdit from './format-edit';\nimport { getFormatColors } from './get-format-colors';\nimport styles from './style.scss';\nimport ToolbarButtonWithOptions from './toolbar-button-with-options';\n\n// The flattened color palettes array is memoized to ensure that the same array instance is\n// returned for the colors palettes. This value might be used as a prop, so having the same\n// instance will prevent unnecessary re-renders of the RichText component.\nconst flatColorPalettes = memize( ( colorsPalettes ) => [\n\t...( colorsPalettes?.theme || [] ),\n\t...( colorsPalettes?.custom || [] ),\n\t...( colorsPalettes?.default || [] ),\n] );\n\nconst getSelectionColor = memize(\n\t(\n\t\tcurrentSelectionColor,\n\t\tdefaultSelectionColor,\n\t\tbaseGlobalStyles,\n\t\tisBlockBasedTheme\n\t) => {\n\t\tlet selectionColor = defaultSelectionColor;\n\t\tif ( currentSelectionColor ) {\n\t\t\tselectionColor = currentSelectionColor;\n\t\t}\n\n\t\tif ( isBlockBasedTheme ) {\n\t\t\tconst colordTextColor = colord( selectionColor );\n\t\t\tconst colordBackgroundColor = colord(\n\t\t\t\tbaseGlobalStyles?.color?.background\n\t\t\t);\n\t\t\tconst isColordTextReadable = colordTextColor.isReadable(\n\t\t\t\tcolordBackgroundColor\n\t\t\t);\n\t\t\tif ( ! isColordTextReadable ) {\n\t\t\t\tselectionColor = baseGlobalStyles?.color?.text;\n\t\t\t}\n\t\t}\n\n\t\treturn selectionColor;\n\t}\n);\n\nconst gutenbergFormatNamesToAztec = {\n\t'core/bold': 'bold',\n\t'core/italic': 'italic',\n\t'core/strikethrough': 'strikethrough',\n\t'core/text-color': 'mark',\n};\n\nconst EMPTY_PARAGRAPH_TAGS = '<p></p>';\nconst DEFAULT_FONT_SIZE = 16;\nconst MIN_LINE_HEIGHT = 1;\n\nexport class RichText extends Component {\n\tconstructor( { value, selectionStart, selectionEnd } ) {\n\t\tsuper( ...arguments );\n\n\t\tthis.isIOS = Platform.OS === 'ios';\n\t\tthis.createRecord = this.createRecord.bind( this );\n\t\tthis.onChangeFromAztec = this.onChangeFromAztec.bind( this );\n\t\tthis.onKeyDown = this.onKeyDown.bind( this );\n\t\tthis.handleEnter = this.handleEnter.bind( this );\n\t\tthis.handleDelete = this.handleDelete.bind( this );\n\t\tthis.onPaste = this.onPaste.bind( this );\n\t\tthis.onFocus = this.onFocus.bind( this );\n\t\tthis.onBlur = this.onBlur.bind( this );\n\t\tthis.onTextUpdate = this.onTextUpdate.bind( this );\n\t\tthis.onContentSizeChange = this.onContentSizeChange.bind( this );\n\t\tthis.onFormatChange = this.onFormatChange.bind( this );\n\t\tthis.formatToValue = memize( this.formatToValue.bind( this ), {\n\t\t\tmaxSize: 1,\n\t\t} );\n\t\tthis.debounceCreateUndoLevel = debounce( this.onCreateUndoLevel, 1000 );\n\t\t// This prevents a bug in Aztec which triggers onSelectionChange twice on format change.\n\t\tthis.onSelectionChange = this.onSelectionChange.bind( this );\n\t\tthis.onSelectionChangeFromAztec =\n\t\t\tthis.onSelectionChangeFromAztec.bind( this );\n\t\tthis.valueToFormat = this.valueToFormat.bind( this );\n\t\tthis.getHtmlToRender = this.getHtmlToRender.bind( this );\n\t\tthis.handleSuggestionFunc = this.handleSuggestionFunc.bind( this );\n\t\tthis.handleUserSuggestion = this.handleSuggestionFunc(\n\t\t\tshowUserSuggestions,\n\t\t\t'@'\n\t\t).bind( this );\n\t\tthis.handleXpostSuggestion = this.handleSuggestionFunc(\n\t\t\tshowXpostSuggestions,\n\t\t\t'+'\n\t\t).bind( this );\n\t\tthis.suggestionOptions = this.suggestionOptions.bind( this );\n\t\tthis.insertString = this.insertString.bind( this );\n\t\tthis.manipulateEventCounterToForceNativeToRefresh =\n\t\t\tthis.manipulateEventCounterToForceNativeToRefresh.bind( this );\n\t\tthis.shouldDropEventFromAztec =\n\t\t\tthis.shouldDropEventFromAztec.bind( this );\n\t\tthis.state = {\n\t\t\tactiveFormats: [],\n\t\t\tselectedFormat: null,\n\t\t\theight: 0,\n\t\t\tcurrentFontSize: this.getFontSize( arguments[ 0 ] ),\n\t\t};\n\t\tthis.needsSelectionUpdate = false;\n\t\tthis.savedContent = '';\n\t\tthis.isTouched = false;\n\t\tthis.lastAztecEventType = null;\n\n\t\tthis.lastHistoryValue = value;\n\n\t\t// Internal values that are update synchronously, unlike props.\n\t\tthis.value = value;\n\t\tthis.selectionStart = selectionStart;\n\t\tthis.selectionEnd = selectionEnd;\n\t}\n\n\t/**\n\t * Get the current record (value and selection) from props and state.\n\t *\n\t * @return {Object} The current record (value and selection).\n\t */\n\tgetRecord() {\n\t\tconst {\n\t\t\tselectionStart: start,\n\t\t\tselectionEnd: end,\n\t\t\tcolorPalette,\n\t\t} = this.props;\n\t\tconst { value } = this.props;\n\t\tconst currentValue = this.formatToValue( value );\n\n\t\tconst { formats, replacements, text } = currentValue;\n\t\tconst { activeFormats } = this.state;\n\t\tconst newFormats = getFormatColors( formats, colorPalette );\n\n\t\treturn {\n\t\t\tformats: newFormats,\n\t\t\treplacements,\n\t\t\ttext,\n\t\t\tstart,\n\t\t\tend,\n\t\t\tactiveFormats,\n\t\t};\n\t}\n\n\t/**\n\t * Creates a RichText value \"record\" from the current content and selection\n\t * information\n\t *\n\t *\n\t * @return {Object} A RichText value with formats and selection.\n\t */\n\tcreateRecord() {\n\t\tconst { preserveWhiteSpace } = this.props;\n\t\tconst value = {\n\t\t\tstart: this.selectionStart,\n\t\t\tend: this.selectionEnd,\n\t\t\t...create( {\n\t\t\t\thtml: this.value,\n\t\t\t\trange: null,\n\t\t\t\tpreserveWhiteSpace,\n\t\t\t} ),\n\t\t};\n\t\tconst start = Math.min( this.selectionStart, value.text.length );\n\t\tconst end = Math.min( this.selectionEnd, value.text.length );\n\t\treturn { ...value, start, end };\n\t}\n\n\tvalueToFormat( value ) {\n\t\t// Remove the outer root tags.\n\t\treturn this.removeRootTagsProducedByAztec( toHTMLString( { value } ) );\n\t}\n\n\tgetActiveFormatNames( record ) {\n\t\tconst { formatTypes } = this.props;\n\n\t\treturn formatTypes\n\t\t\t.map( ( { name } ) => name )\n\t\t\t.filter( ( name ) => {\n\t\t\t\treturn getActiveFormat( record, name ) !== undefined;\n\t\t\t} )\n\t\t\t.map( ( name ) => gutenbergFormatNamesToAztec[ name ] )\n\t\t\t.filter( Boolean );\n\t}\n\n\tonFormatChange( record ) {\n\t\tconst { start = 0, end = 0, activeFormats = [] } = record;\n\t\tconst changeHandlers = Object.fromEntries(\n\t\t\tObject.entries( this.props ).filter( ( [ key ] ) =>\n\t\t\t\tkey.startsWith( 'format_on_change_functions_' )\n\t\t\t)\n\t\t);\n\n\t\tObject.values( changeHandlers ).forEach( ( changeHandler ) => {\n\t\t\tchangeHandler( record.formats, record.text );\n\t\t} );\n\n\t\tthis.value = this.valueToFormat( record );\n\t\tthis.props.onChange( this.value );\n\t\tthis.setState( { activeFormats } );\n\t\tthis.props.onSelectionChange( start, end );\n\t\tthis.selectionStart = start;\n\t\tthis.selectionEnd = end;\n\n\t\tthis.onCreateUndoLevel();\n\n\t\tthis.lastAztecEventType = 'format change';\n\t}\n\n\tinsertString( record, string ) {\n\t\tif ( record && string ) {\n\t\t\tthis.manipulateEventCounterToForceNativeToRefresh(); // force a refresh on the native side\n\t\t\tconst toInsert = insert( record, string );\n\t\t\tthis.onFormatChange( toInsert );\n\t\t}\n\t}\n\n\tonCreateUndoLevel() {\n\t\tconst { __unstableOnCreateUndoLevel: onCreateUndoLevel } = this.props;\n\t\t// If the content is the same, no level needs to be created.\n\t\tif ( this.lastHistoryValue?.toString() === this.value?.toString() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tonCreateUndoLevel();\n\t\tthis.lastHistoryValue = this.value;\n\t}\n\n\t/*\n\t * Cleans up any root tags produced by aztec.\n\t * TODO: This should be removed on a later version when aztec doesn't return the top tag of the text being edited\n\t */\n\tremoveRootTagsProducedByAztec( html ) {\n\t\tlet result = this.removeRootTag( this.props.tagName, html );\n\n\t\tif ( this.props.tagsToEliminate ) {\n\t\t\tthis.props.tagsToEliminate.forEach( ( element ) => {\n\t\t\t\tresult = this.removeTag( element, result );\n\t\t\t} );\n\t\t}\n\n\t\treturn result;\n\t}\n\n\tremoveRootTag( tag, html ) {\n\t\tconst openingTagRegexp = RegExp( '^<' + tag + '[^>]*>', 'gim' );\n\t\tconst closingTagRegexp = RegExp( '</' + tag + '>$', 'gim' );\n\n\t\treturn html\n\t\t\t.replace( openingTagRegexp, '' )\n\t\t\t.replace( closingTagRegexp, '' );\n\t}\n\n\tremoveTag( tag, html ) {\n\t\tconst openingTagRegexp = RegExp( '<' + tag + '>', 'gim' );\n\t\tconst closingTagRegexp = RegExp( '</' + tag + '>', 'gim' );\n\t\treturn html\n\t\t\t.replace( openingTagRegexp, '' )\n\t\t\t.replace( closingTagRegexp, '' );\n\t}\n\n\t/*\n\t * Handles any case where the content of the AztecRN instance has changed\n\t */\n\tonChangeFromAztec( event ) {\n\t\tif ( this.shouldDropEventFromAztec( event, 'onChange' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst contentWithoutRootTag = this.removeRootTagsProducedByAztec(\n\t\t\tevent.nativeEvent.text\n\t\t);\n\t\t// On iOS, onChange can be triggered after selection changes, even though there are no content changes.\n\t\tif ( contentWithoutRootTag === this.value?.toString() ) {\n\t\t\treturn;\n\t\t}\n\t\tthis.lastEventCount = event.nativeEvent.eventCount;\n\t\tthis.comesFromAztec = true;\n\t\tthis.firedAfterTextChanged = true; // The onChange event always fires after the fact.\n\t\tthis.onTextUpdate( event );\n\t\tthis.lastAztecEventType = 'input';\n\t}\n\n\tonTextUpdate( event ) {\n\t\tconst contentWithoutRootTag = this.removeRootTagsProducedByAztec(\n\t\t\tevent.nativeEvent.text\n\t\t);\n\n\t\tthis.debounceCreateUndoLevel();\n\t\tconst refresh = this.value?.toString() !== contentWithoutRootTag;\n\t\tthis.value = contentWithoutRootTag;\n\n\t\t// We don't want to refresh if our goal is just to create a record.\n\t\tif ( refresh ) {\n\t\t\tthis.props.onChange( contentWithoutRootTag );\n\t\t}\n\t}\n\n\t/*\n\t * Handles any case where the content of the AztecRN instance has changed in size\n\t */\n\tonContentSizeChange( contentSize ) {\n\t\tthis.setState( contentSize );\n\t\tthis.lastAztecEventType = 'content size change';\n\t}\n\n\tonKeyDown( event ) {\n\t\tif ( event.defaultPrevented ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Add stubs for conformance in downstream autocompleters logic.\n\t\tthis.customEditableOnKeyDown?.( {\n\t\t\tpreventDefault: () => undefined,\n\t\t\t...event,\n\t\t\tkey: RCTAztecView.KeyCodes[ event?.keyCode ],\n\t\t} );\n\n\t\tthis.handleDelete( event );\n\t\tthis.handleEnter( event );\n\t\tthis.handleTriggerKeyCodes( event );\n\t}\n\n\thandleEnter( event ) {\n\t\tif ( event.keyCode !== ENTER ) {\n\t\t\treturn;\n\t\t}\n\t\tconst { onEnter } = this.props;\n\n\t\tif ( ! onEnter ) {\n\t\t\treturn;\n\t\t}\n\n\t\tonEnter( {\n\t\t\tvalue: this.createRecord(),\n\t\t\tonChange: this.onFormatChange,\n\t\t\tshiftKey: event.shiftKey,\n\t\t} );\n\t\tthis.lastAztecEventType = 'input';\n\t}\n\n\thandleDelete( event ) {\n\t\tif ( this.shouldDropEventFromAztec( event, 'handleDelete' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { keyCode } = event;\n\n\t\tif ( keyCode !== DELETE && keyCode !== BACKSPACE ) {\n\t\t\treturn;\n\t\t}\n\t\tconst isReverse = keyCode === BACKSPACE;\n\n\t\tconst { onDelete } = this.props;\n\t\tthis.lastEventCount = event.nativeEvent.eventCount;\n\t\tthis.comesFromAztec = true;\n\t\tthis.firedAfterTextChanged = event.nativeEvent.firedAfterTextChanged;\n\t\tconst value = this.createRecord();\n\t\tconst { start, end, text } = value;\n\t\tlet newValue;\n\n\t\t// Always handle full content deletion ourselves.\n\t\tif ( start === 0 && end !== 0 && end >= text.length ) {\n\t\t\tnewValue = remove( value );\n\t\t\tthis.onFormatChange( newValue );\n\t\t\tevent.preventDefault();\n\t\t\treturn;\n\t\t}\n\n\t\t// Only process delete if the key press occurs at an uncollapsed edge.\n\t\tif (\n\t\t\t! onDelete ||\n\t\t\t! isCollapsed( value ) ||\n\t\t\t( isReverse && start !== 0 ) ||\n\t\t\t( ! isReverse && end !== text.length )\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\tonDelete( { isReverse, value } );\n\n\t\tevent.preventDefault();\n\t\tthis.lastAztecEventType = 'input';\n\t}\n\n\thandleTriggerKeyCodes( event ) {\n\t\tconst { keyCode } = event;\n\t\tconst triggeredOption = this.suggestionOptions().find( ( option ) => {\n\t\t\tconst triggeredKeyCode = option.triggerChar.charCodeAt( 0 );\n\t\t\treturn triggeredKeyCode === keyCode;\n\t\t} );\n\n\t\tif ( triggeredOption ) {\n\t\t\tconst record = this.getRecord();\n\t\t\tconst text = getTextContent( record );\n\t\t\t// Only respond to the trigger if the selection is on the start of text or line\n\t\t\t// or if the character before is a space.\n\t\t\tconst useTrigger =\n\t\t\t\ttext.length === 0 ||\n\t\t\t\trecord.start === 0 ||\n\t\t\t\ttext.charAt( record.start - 1 ) === '\\n' ||\n\t\t\t\ttext.charAt( record.start - 1 ) === ' ';\n\n\t\t\tif ( useTrigger && triggeredOption.onClick ) {\n\t\t\t\ttriggeredOption.onClick();\n\t\t\t} else {\n\t\t\t\tthis.insertString( record, triggeredOption.triggerChar );\n\t\t\t}\n\t\t}\n\t}\n\n\tsuggestionOptions() {\n\t\tconst { areMentionsSupported, areXPostsSupported } = this.props;\n\t\tconst allOptions = [\n\t\t\t{\n\t\t\t\tsupported: areMentionsSupported,\n\t\t\t\ttitle: __( 'Insert mention' ),\n\t\t\t\tonClick: this.handleUserSuggestion,\n\t\t\t\ttriggerChar: '@',\n\t\t\t\tvalue: 'mention',\n\t\t\t\tlabel: __( 'Mention' ),\n\t\t\t\ticon: atSymbol,\n\t\t\t},\n\t\t\t{\n\t\t\t\tsupported: areXPostsSupported,\n\t\t\t\ttitle: __( 'Insert crosspost' ),\n\t\t\t\tonClick: this.handleXpostSuggestion,\n\t\t\t\ttriggerChar: '+',\n\t\t\t\tvalue: 'crosspost',\n\t\t\t\tlabel: __( 'Crosspost' ),\n\t\t\t\ticon: plus,\n\t\t\t},\n\t\t];\n\t\treturn allOptions.filter( ( op ) => op.supported );\n\t}\n\n\thandleSuggestionFunc( suggestionFunction, prefix ) {\n\t\treturn () => {\n\t\t\tconst record = this.getRecord();\n\t\t\tsuggestionFunction()\n\t\t\t\t.then( ( suggestion ) => {\n\t\t\t\t\tthis.insertString( record, `${ prefix }${ suggestion } ` );\n\t\t\t\t} )\n\t\t\t\t.catch( () => {} );\n\t\t};\n\t}\n\n\t/**\n\t * Handles a paste event from the native Aztec Wrapper.\n\t *\n\t * @param {Object} event The paste event which wraps `nativeEvent`.\n\t */\n\tonPaste( event ) {\n\t\tconst { onPaste, onChange } = this.props;\n\t\tconst { activeFormats = [] } = this.state;\n\n\t\tconst { pastedText, pastedHtml, files } = event.nativeEvent;\n\t\tconst currentRecord = this.createRecord();\n\n\t\tevent.preventDefault();\n\n\t\t// There is a selection, check if a URL is pasted.\n\t\tif ( ! isCollapsed( currentRecord ) ) {\n\t\t\tconst trimmedText = ( pastedHtml || pastedText )\n\t\t\t\t.replace( /<[^>]+>/g, '' )\n\t\t\t\t.trim();\n\n\t\t\t// A URL was pasted, turn the selection into a link.\n\t\t\tif ( isURL( trimmedText ) ) {\n\t\t\t\tconst linkedRecord = applyFormat( currentRecord, {\n\t\t\t\t\ttype: 'a',\n\t\t\t\t\tattributes: {\n\t\t\t\t\t\thref: decodeEntities( trimmedText ),\n\t\t\t\t\t},\n\t\t\t\t} );\n\t\t\t\tthis.value = this.valueToFormat( linkedRecord );\n\t\t\t\tonChange( this.value );\n\n\t\t\t\t// Allows us to ask for this information when we get a report.\n\t\t\t\twindow.console.log( 'Created link:\\n\\n', trimmedText );\n\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tif ( onPaste ) {\n\t\t\tonPaste( {\n\t\t\t\tvalue: currentRecord,\n\t\t\t\tonChange: this.onFormatChange,\n\t\t\t\thtml: pastedHtml,\n\t\t\t\tplainText: pastedText,\n\t\t\t\tfiles,\n\t\t\t\tactiveFormats,\n\t\t\t} );\n\t\t}\n\t}\n\n\tonFocus() {\n\t\tthis.isTouched = true;\n\n\t\tconst { unstableOnFocus, onSelectionChange } = this.props;\n\n\t\tif ( unstableOnFocus ) {\n\t\t\tunstableOnFocus();\n\t\t}\n\n\t\t// We know for certain that on focus, the old selection is invalid. It\n\t\t// will be recalculated on `selectionchange`.\n\n\t\tonSelectionChange( this.selectionStart, this.selectionEnd );\n\n\t\tthis.lastAztecEventType = 'focus';\n\t}\n\n\tonBlur( event ) {\n\t\tthis.isTouched = false;\n\n\t\t// Check if value is up to date with latest state of native AztecView.\n\t\tif (\n\t\t\tevent.nativeEvent.text &&\n\t\t\tevent.nativeEvent.text !== this.props.value?.toString()\n\t\t) {\n\t\t\tthis.onTextUpdate( event );\n\t\t}\n\n\t\tif ( this.props.onBlur ) {\n\t\t\tthis.props.onBlur( event );\n\t\t}\n\n\t\tthis.lastAztecEventType = 'blur';\n\t}\n\n\tonSelectionChange( start, end ) {\n\t\tconst hasChanged =\n\t\t\tthis.selectionStart !== start || this.selectionEnd !== end;\n\n\t\tthis.selectionStart = start;\n\t\tthis.selectionEnd = end;\n\n\t\t// This is a manual selection change event if onChange was not triggered just before\n\t\t// and we did not just trigger a text update\n\t\t// `onChange` could be the last event and could have been triggered a long time ago so\n\t\t// this approach is not perfectly reliable.\n\t\tconst isManual =\n\t\t\tthis.lastAztecEventType !== 'input' &&\n\t\t\tthis.props.value?.toString() === this.value?.toString();\n\t\tif ( hasChanged && isManual ) {\n\t\t\tconst value = this.createRecord();\n\t\t\tconst activeFormats = getActiveFormats( value );\n\t\t\tthis.setState( { activeFormats } );\n\t\t}\n\n\t\tthis.props.onSelectionChange( start, end );\n\t}\n\n\tshouldDropEventFromAztec( event, logText ) {\n\t\tconst shouldDrop =\n\t\t\t! this.isIOS && event.nativeEvent.eventCount <= this.lastEventCount;\n\t\tif ( shouldDrop ) {\n\t\t\twindow.console.log(\n\t\t\t\t`Dropping ${ logText } from Aztec as its event counter is older than latest sent to the native side. Got ${ event.nativeEvent.eventCount } but lastEventCount is ${ this.lastEventCount }.`\n\t\t\t);\n\t\t}\n\t\treturn shouldDrop;\n\t}\n\n\t/**\n\t * Determines whether the text input should receive focus after an update.\n\t * For cases where a RichText with a value is merged with an empty one.\n\t *\n\t * @param {Object} prevProps - The previous props of the component.\n\t * @return {boolean} True if the text input should receive focus, false otherwise.\n\t */\n\tshouldFocusTextInputAfterMerge( prevProps ) {\n\t\tconst {\n\t\t\t__unstableIsSelected: isSelected,\n\t\t\tblockIsSelected,\n\t\t\tselectionStart,\n\t\t\tselectionEnd,\n\t\t\t__unstableMobileNoFocusOnMount,\n\t\t} = this.props;\n\n\t\tconst {\n\t\t\t__unstableIsSelected: prevIsSelected,\n\t\t\tblockIsSelected: prevBlockIsSelected,\n\t\t} = prevProps;\n\n\t\tconst noSelectionValues =\n\t\t\tselectionStart === undefined && selectionEnd === undefined;\n\t\tconst textInputWasNotFocused = ! prevIsSelected && ! isSelected;\n\n\t\treturn (\n\t\t\t! __unstableMobileNoFocusOnMount &&\n\t\t\tnoSelectionValues &&\n\t\t\ttextInputWasNotFocused &&\n\t\t\t! prevBlockIsSelected &&\n\t\t\tblockIsSelected\n\t\t);\n\t}\n\n\tonSelectionChangeFromAztec( start, end, text, event ) {\n\t\tif ( this.shouldDropEventFromAztec( event, 'onSelectionChange' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// `end` can be less than `start` on iOS\n\t\t// Let's fix that here so `rich-text/slice` can work properly.\n\t\tconst realStart = Math.min( start, end );\n\t\tconst realEnd = Math.max( start, end );\n\n\t\t// Check and dicsard stray event, where the text and selection is equal to the ones already cached.\n\t\tconst contentWithoutRootTag = this.removeRootTagsProducedByAztec(\n\t\t\tevent.nativeEvent.text\n\t\t);\n\t\tif (\n\t\t\tcontentWithoutRootTag === this.value?.toString() &&\n\t\t\trealStart === this.selectionStart &&\n\t\t\trealEnd === this.selectionEnd\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.comesFromAztec = true;\n\t\tthis.firedAfterTextChanged = true; // Selection change event always fires after the fact.\n\n\t\t// Update text before updating selection\n\t\t// Make sure there are changes made to the content before upgrading it upward.\n\t\tthis.onTextUpdate( event );\n\n\t\t// Aztec can send us selection change events after it has lost focus.\n\t\t// For instance the autocorrect feature will complete a partially written\n\t\t// word when resigning focus, causing a selection change event.\n\t\t// Forwarding this selection change could cause this RichText to regain\n\t\t// focus and start a focus loop.\n\t\t//\n\t\t// See https://github.com/wordpress-mobile/gutenberg-mobile/issues/1696\n\t\tif ( this.props.__unstableIsSelected ) {\n\t\t\tthis.onSelectionChange( realStart, realEnd );\n\t\t}\n\t\t// Update lastEventCount to prevent Aztec from re-rendering the content it just sent.\n\t\tthis.lastEventCount = event.nativeEvent.eventCount;\n\n\t\tthis.lastAztecEventType = 'selection change';\n\t}\n\n\tisEmpty() {\n\t\treturn isEmpty( this.formatToValue( this.props.value ) );\n\t}\n\n\tformatToValue( value ) {\n\t\tconst { preserveWhiteSpace } = this.props;\n\t\t// Handle deprecated `children` and `node` sources.\n\t\tif ( Array.isArray( value ) ) {\n\t\t\treturn create( {\n\t\t\t\thtml: childrenBlock.toHTML( value ),\n\t\t\t\tpreserveWhiteSpace,\n\t\t\t} );\n\t\t}\n\n\t\tif ( this.props.format === 'string' ) {\n\t\t\treturn create( {\n\t\t\t\thtml: value,\n\t\t\t\tpreserveWhiteSpace,\n\t\t\t} );\n\t\t}\n\n\t\t// Guard for blocks passing `null` in onSplit callbacks. May be removed\n\t\t// if onSplit is revised to not pass a `null` value.\n\t\tif ( value === null ) {\n\t\t\treturn create();\n\t\t}\n\n\t\treturn value;\n\t}\n\n\tmanipulateEventCounterToForceNativeToRefresh() {\n\t\tif ( this.isIOS ) {\n\t\t\tthis.lastEventCount = undefined;\n\t\t\treturn;\n\t\t}\n\n\t\tif ( typeof this.lastEventCount !== 'undefined' ) {\n\t\t\tthis.lastEventCount += 100; // bump by a hundred, hopefully native hasn't bombarded the JS side in the meantime.\n\t\t} // no need to bump when 'undefined' as native side won't receive the key when the value is undefined, and that will cause force updating anyway,\n\t\t// see https://github.com/WordPress/gutenberg/blob/82e578dcc75e67891c750a41a04c1e31994192fc/packages/react-native-aztec/android/src/main/java/org/wordpress/mobile/ReactNativeAztec/ReactAztecManager.java#L213-L215\n\t}\n\n\tshouldComponentUpdate( nextProps, nextState ) {\n\t\tif (\n\t\t\tnextProps.tagName !== this.props.tagName ||\n\t\t\tnextProps.reversed !== this.props.reversed ||\n\t\t\tnextProps.start !== this.props.start\n\t\t) {\n\t\t\tthis.manipulateEventCounterToForceNativeToRefresh(); // force a refresh on the native side\n\t\t\tthis.value = undefined;\n\t\t\treturn true;\n\t\t}\n\n\t\t// TODO: Please re-introduce the check to avoid updating the content right after an `onChange` call.\n\t\t// It was removed in https://github.com/WordPress/gutenberg/pull/12417 to fix undo/redo problem.\n\n\t\t// If the component is changed React side (undo/redo/merging/splitting/custom text actions)\n\t\t// we need to make sure the native is updated as well.\n\n\t\t// Also, don't trust the \"this.lastContent\" as on Android, incomplete text events arrive\n\t\t// with only some of the text, while the virtual keyboard's suggestion system does its magic.\n\t\t// ** compare with this.lastContent for optimizing performance by not forcing Aztec with text it already has\n\t\t// , but compare with props.value to not lose \"half word\" text because of Android virtual keyb autosuggestion behavior\n\t\tif (\n\t\t\ttypeof nextProps.value !== 'undefined' &&\n\t\t\ttypeof this.props.value !== 'undefined' &&\n\t\t\t( ! this.comesFromAztec || ! this.firedAfterTextChanged ) &&\n\t\t\tnextProps.value?.toString() !== this.props.value?.toString()\n\t\t) {\n\t\t\t// Gutenberg seems to try to mirror the caret state even on events that only change the content so,\n\t\t\t// let's force caret update if state has selection set.\n\t\t\tif (\n\t\t\t\ttypeof nextProps.selectionStart !== 'undefined' &&\n\t\t\t\ttypeof nextProps.selectionEnd !== 'undefined'\n\t\t\t) {\n\t\t\t\tthis.needsSelectionUpdate = true;\n\t\t\t}\n\n\t\t\tthis.manipulateEventCounterToForceNativeToRefresh(); // force a refresh on the native side\n\t\t}\n\n\t\tif ( ! this.comesFromAztec ) {\n\t\t\tif (\n\t\t\t\ttypeof nextProps.selectionStart !== 'undefined' &&\n\t\t\t\ttypeof nextProps.selectionEnd !== 'undefined' &&\n\t\t\t\tnextProps.selectionStart !== this.props.selectionStart &&\n\t\t\t\tnextProps.selectionStart !== this.selectionStart &&\n\t\t\t\tnextProps.__unstableIsSelected\n\t\t\t) {\n\t\t\t\tthis.needsSelectionUpdate = true;\n\t\t\t\tthis.manipulateEventCounterToForceNativeToRefresh(); // force a refresh on the native side\n\t\t\t}\n\n\t\t\t// For font size changes from a prop value a force refresh\n\t\t\t// is needed without the selection update.\n\t\t\tif ( nextProps?.fontSize !== this.props?.fontSize ) {\n\t\t\t\tthis.manipulateEventCounterToForceNativeToRefresh(); // force a refresh on the native side\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\t( nextProps?.style?.fontSize !== this.props?.style?.fontSize &&\n\t\t\t\t\tnextState.currentFontSize !==\n\t\t\t\t\t\tthis.state.currentFontSize ) ||\n\t\t\t\tnextState.currentFontSize !== this.state.currentFontSize ||\n\t\t\t\tnextProps?.style?.lineHeight !== this.props?.style?.lineHeight\n\t\t\t) {\n\t\t\t\tthis.needsSelectionUpdate = true;\n\t\t\t\tthis.manipulateEventCounterToForceNativeToRefresh(); // force a refresh on the native side\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tcomponentDidMount() {\n\t\t// Request focus if wrapping block is selected and parent hasn't inhibited the focus request. This method of focusing\n\t\t// is trying to implement the web-side counterpart of BlockList's `focusTabbable` where the BlockList is focusing an\n\t\t// inputbox by searching the DOM. We don't have the DOM in RN so, using the combination of blockIsSelected and __unstableMobileNoFocusOnMount\n\t\t// to determine if we should focus the RichText.\n\t\tif (\n\t\t\tthis.props.blockIsSelected &&\n\t\t\t! this.props.__unstableMobileNoFocusOnMount\n\t\t) {\n\t\t\tthis._editor.focus();\n\t\t\tthis.onSelectionChange(\n\t\t\t\tthis.props.selectionStart || 0,\n\t\t\t\tthis.props.selectionEnd || 0\n\t\t\t);\n\t\t}\n\t}\n\n\tcomponentDidUpdate( prevProps ) {\n\t\tconst { style, tagName } = this.props;\n\t\tconst { currentFontSize } = this.state;\n\n\t\tif ( this.props.value?.toString() !== this.value?.toString() ) {\n\t\t\tthis.value = this.props.value;\n\t\t}\n\t\tconst { __unstableIsSelected: prevIsSelected } = prevProps;\n\t\tconst { __unstableIsSelected: isSelected } = this.props;\n\n\t\tif ( isSelected && ! prevIsSelected ) {\n\t\t\tthis._editor.focus();\n\t\t\t// Update selection props explicitly when component is selected as Aztec won't call onSelectionChange\n\t\t\t// if its internal value hasn't change. When created, default value is 0, 0.\n\t\t\tthis.onSelectionChange(\n\t\t\t\tthis.props.selectionStart || 0,\n\t\t\t\tthis.props.selectionEnd || 0\n\t\t\t);\n\t\t} else if ( this.shouldFocusTextInputAfterMerge( prevProps ) ) {\n\t\t\t// Since this is happening when merging blocks, the selection should be at the last character position.\n\t\t\t// As a fallback the internal selectionEnd value is used.\n\t\t\tconst lastCharacterPosition =\n\t\t\t\tthis.value?.toString().length ?? this.selectionEnd;\n\t\t\tthis._editor.focus();\n\t\t\tthis.props.onSelectionChange(\n\t\t\t\tlastCharacterPosition,\n\t\t\t\tlastCharacterPosition\n\t\t\t);\n\t\t} else if ( ! isSelected && prevIsSelected ) {\n\t\t\tthis._editor.blur();\n\t\t}\n\n\t\t// For font size values changes from the font size picker\n\t\t// we compare previous values to refresh the selected font size,\n\t\t// this is also used when the tag name changes\n\t\t// e.g Heading block and a level change like h1->h2.\n\t\tconst currentFontSizeStyle = this.getParsedFontSize( style?.fontSize );\n\t\tconst prevFontSizeStyle = this.getParsedFontSize(\n\t\t\tprevProps?.style?.fontSize\n\t\t);\n\t\tconst isDifferentTag = prevProps.tagName !== tagName;\n\t\tif (\n\t\t\t( currentFontSize &&\n\t\t\t\t( currentFontSizeStyle || prevFontSizeStyle ) &&\n\t\t\t\tcurrentFontSizeStyle !== currentFontSize ) ||\n\t\t\tisDifferentTag\n\t\t) {\n\t\t\tthis.setState( {\n\t\t\t\tcurrentFontSize: this.getFontSize( this.props ),\n\t\t\t} );\n\t\t}\n\t}\n\n\tcomponentWillUnmount() {\n\t\tconst { clearCurrentSelectionOnUnmount } = this.props;\n\n\t\t// There are cases when the component is unmounted e.g. scrolling in a\n\t\t// long post due to virtualization, so the block selection needs to be cleared\n\t\t// so it doesn't auto-focus when it's added back.\n\t\tif ( this._editor?.isFocused() ) {\n\t\t\tclearCurrentSelectionOnUnmount?.();\n\t\t}\n\t}\n\n\tgetHtmlToRender( record, tagName ) {\n\t\t// Save back to HTML from React tree.\n\t\tlet value = this.valueToFormat( record );\n\n\t\tif ( value === undefined ) {\n\t\t\tthis.manipulateEventCounterToForceNativeToRefresh(); // force a refresh on the native side\n\t\t\tvalue = '';\n\t\t}\n\t\t// On android if content is empty we need to send no content or else the placeholder will not show.\n\t\tif (\n\t\t\t! this.isIOS &&\n\t\t\t( value?.toString() === '' ||\n\t\t\t\tvalue?.toString() === EMPTY_PARAGRAPH_TAGS )\n\t\t) {\n\t\t\treturn '';\n\t\t}\n\n\t\tif ( tagName ) {\n\t\t\tlet extraAttributes = ``;\n\t\t\tif ( tagName === `ol` ) {\n\t\t\t\tif ( this.props.reversed ) {\n\t\t\t\t\textraAttributes += ` reversed`;\n\t\t\t\t}\n\t\t\t\tif ( this.props.start ) {\n\t\t\t\t\textraAttributes += ` start=${ this.props.start }`;\n\t\t\t\t}\n\t\t\t}\n\t\t\tvalue = `<${ tagName }${ extraAttributes }>${ value }</${ tagName }>`;\n\t\t}\n\t\treturn value;\n\t}\n\n\tgetEditableProps() {\n\t\treturn {\n\t\t\t// Overridable props.\n\t\t\tstyle: {},\n\t\t\tclassName: 'rich-text',\n\t\t\tonKeyDown: () => null,\n\t\t};\n\t}\n\n\tgetParsedFontSize( fontSize ) {\n\t\tconst { height, width } = Dimensions.get( 'window' );\n\t\tconst cssUnitOptions = { height, width, fontSize: DEFAULT_FONT_SIZE };\n\n\t\tif ( ! fontSize ) {\n\t\t\treturn fontSize;\n\t\t}\n\n\t\tconst selectedPxValue =\n\t\t\tgetPxFromCssUnit( fontSize, cssUnitOptions ) ?? DEFAULT_FONT_SIZE;\n\n\t\treturn parseFloat( selectedPxValue );\n\t}\n\n\tgetFontSize( props ) {\n\t\tconst { baseGlobalStyles, tagName, fontSize, style } = props;\n\t\tconst tagNameFontSize =\n\t\t\tbaseGlobalStyles?.elements?.[ tagName ]?.typography?.fontSize;\n\n\t\tlet newFontSize = DEFAULT_FONT_SIZE;\n\n\t\t// Disables line-height rendering for pre elements until we fix some issues with AztecAndroid.\n\t\tif ( tagName === 'pre' && ! this.isIOS ) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\t// For block-based themes, get the default editor font size.\n\t\tif ( baseGlobalStyles?.typography?.fontSize && tagName === 'p' ) {\n\t\t\tnewFontSize = baseGlobalStyles?.typography?.fontSize;\n\t\t}\n\n\t\t// For block-based themes, get the default element font size\n\t\t// e.g h1, h2.\n\t\tif ( tagNameFontSize ) {\n\t\t\tnewFontSize = tagNameFontSize;\n\t\t}\n\n\t\t// For font size values provided from the styles,\n\t\t// usually from values set from the font size picker.\n\t\tif ( style?.fontSize ) {\n\t\t\tnewFontSize = style.fontSize;\n\t\t}\n\n\t\t// Fall-back to a font size provided from its props (if there's any)\n\t\t// and there are no other default values to use.\n\t\tif ( fontSize && ! tagNameFontSize && ! style?.fontSize ) {\n\t\t\tnewFontSize = fontSize;\n\t\t}\n\n\t\t// We need to always convert to px units because the selected value\n\t\t// could be coming from the web where it could be stored as a different unit.\n\t\tconst selectedPxValue = this.getParsedFontSize( newFontSize );\n\n\t\treturn selectedPxValue;\n\t}\n\n\tgetLineHeight() {\n\t\tconst { baseGlobalStyles, tagName, lineHeight, style } = this.props;\n\t\tconst tagNameLineHeight =\n\t\t\tbaseGlobalStyles?.elements?.[ tagName ]?.typography?.lineHeight;\n\t\tlet newLineHeight;\n\n\t\t// Disables line-height rendering for pre elements until we fix some issues with AztecAndroid.\n\t\tif ( tagName === 'pre' && ! this.isIOS ) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tif ( ! this.getIsBlockBasedTheme() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// For block-based themes, get the default editor line height.\n\t\tif ( baseGlobalStyles?.typography?.lineHeight && tagName === 'p' ) {\n\t\t\tnewLineHeight = parseFloat(\n\t\t\t\tbaseGlobalStyles?.typography?.lineHeight\n\t\t\t);\n\t\t}\n\n\t\t// For block-based themes, get the default element line height\n\t\t// e.g h1, h2.\n\t\tif ( tagNameLineHeight ) {\n\t\t\tnewLineHeight = parseFloat( tagNameLineHeight );\n\t\t}\n\n\t\t// For line height values provided from the styles,\n\t\t// usually from values set from the line height picker.\n\t\tif ( style?.lineHeight ) {\n\t\t\tnewLineHeight = parseFloat( style.lineHeight );\n\t\t}\n\n\t\t// Fall-back to a line height provided from its props (if there's any)\n\t\t// and there are no other default values to use.\n\t\tif ( lineHeight && ! tagNameLineHeight && ! style?.lineHeight ) {\n\t\t\tnewLineHeight = lineHeight;\n\t\t}\n\n\t\t// Check the final value is not over the minimum supported value.\n\t\tif ( newLineHeight && newLineHeight < MIN_LINE_HEIGHT ) {\n\t\t\tnewLineHeight = MIN_LINE_HEIGHT;\n\t\t}\n\n\t\t// Until we parse CSS values correctly, avoid passing NaN values to Aztec\n\t\tif ( isNaN( newLineHeight ) ) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\treturn newLineHeight;\n\t}\n\n\tgetIsBlockBasedTheme() {\n\t\tconst { baseGlobalStyles } = this.props;\n\n\t\treturn (\n\t\t\tbaseGlobalStyles && Object.entries( baseGlobalStyles ).length !== 0\n\t\t);\n\t}\n\n\tgetBlockUseDefaultFont() {\n\t\t// For block-based themes it enables using the defaultFont\n\t\t// in Aztec for iOS so it allows customizing the font size\n\t\t// for the Preformatted/Code and Heading blocks.\n\t\tif ( ! this.isIOS ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { tagName } = this.props;\n\t\tconst isBlockBasedTheme = this.getIsBlockBasedTheme();\n\t\tconst tagsToMatch = /pre|h([1-6])$/gm;\n\n\t\treturn isBlockBasedTheme && tagsToMatch.test( tagName );\n\t}\n\n\tgetLinkTextColor( defaultColor ) {\n\t\tconst { style } = this.props;\n\t\tconst customColor = style?.linkColor && colord( style.linkColor );\n\n\t\treturn customColor && customColor.isValid()\n\t\t\t? customColor.toHex()\n\t\t\t: defaultColor;\n\t}\n\n\tgetPlaceholderTextColor() {\n\t\tconst {\n\t\t\tbaseGlobalStyles,\n\t\t\tgetStylesFromColorScheme,\n\t\t\tplaceholderTextColor,\n\t\t\tstyle,\n\t\t} = this.props;\n\n\t\t// Default placeholder text color.\n\t\tconst placeholderStyle = getStylesFromColorScheme(\n\t\t\tstyles.richTextPlaceholder,\n\t\t\tstyles.richTextPlaceholderDark\n\t\t);\n\t\tconst { color: defaultPlaceholderTextColor } = placeholderStyle;\n\t\t// Custom 63% opacity for theme and inherited colors.\n\t\tconst placeholderOpacity = 'A1';\n\n\t\t// Determine inherited placeholder color if available.\n\t\tconst inheritPlaceholderColor = style?.placeholderColor\n\t\t\t? `${ style.placeholderColor }${ placeholderOpacity }`\n\t\t\t: undefined;\n\n\t\t// If using block-based themes, derive the placeholder color from global styles.\n\t\tconst globalStylesPlaceholderColor = baseGlobalStyles?.color?.text\n\t\t\t? `${ baseGlobalStyles.color.text }${ placeholderOpacity }`\n\t\t\t: undefined;\n\n\t\treturn (\n\t\t\tinheritPlaceholderColor ??\n\t\t\tplaceholderTextColor ??\n\t\t\tglobalStylesPlaceholderColor ??\n\t\t\tdefaultPlaceholderTextColor\n\t\t);\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\ttagName,\n\t\t\tstyle,\n\t\t\t__unstableIsSelected: isSelected,\n\t\t\tchildren,\n\t\t\tgetStylesFromColorScheme,\n\t\t\tminWidth,\n\t\t\tmaxWidth,\n\t\t\tformatTypes,\n\t\t\tparentBlockStyles,\n\t\t\taccessibilityLabel,\n\t\t\tdisableEditingMenu = false,\n\t\t\tbaseGlobalStyles,\n\t\t\tselectionStart,\n\t\t\tselectionEnd,\n\t\t\tdisableSuggestions,\n\t\t\tcontainerWidth,\n\t\t} = this.props;\n\t\tconst { currentFontSize } = this.state;\n\n\t\tconst record = this.getRecord();\n\t\tconst html = this.getHtmlToRender( record, tagName );\n\t\tconst editableProps = this.getEditableProps();\n\t\tconst blockUseDefaultFont = this.getBlockUseDefaultFont();\n\n\t\tconst fontSize = currentFontSize;\n\t\tconst lineHeight = this.getLineHeight();\n\n\t\tconst {\n\t\t\tcolor: defaultColor,\n\t\t\ttextDecorationColor: defaultTextDecorationColor,\n\t\t\tfontFamily: defaultFontFamily,\n\t\t} = getStylesFromColorScheme( styles.richText, styles.richTextDark );\n\t\tconst linkTextColor = this.getLinkTextColor(\n\t\t\tdefaultTextDecorationColor\n\t\t);\n\n\t\tconst currentSelectionStart = selectionStart ?? 0;\n\t\tconst currentSelectionEnd = selectionEnd ?? 0;\n\t\tlet selection = null;\n\t\tif ( this.needsSelectionUpdate ) {\n\t\t\tthis.needsSelectionUpdate = false;\n\t\t\tselection = {\n\t\t\t\tstart: currentSelectionStart,\n\t\t\t\tend: currentSelectionEnd,\n\t\t\t};\n\n\t\t\t// On AztecAndroid, setting the caret to an out-of-bounds position will crash the editor so, let's check for some cases.\n\t\t\tif ( ! this.isIOS ) {\n\t\t\t\t// The following regular expression is used in Aztec here:\n\t\t\t\t// https://github.com/wordpress-mobile/AztecEditor-Android/blob/b1fad439d56fa6d4aa0b78526fef355c59d00dd3/aztec/src/main/kotlin/org/wordpress/aztec/AztecParser.kt#L656\n\t\t\t\tconst brBeforeParaMatches = html.match( /(<br>)+<\\/p>$/g );\n\t\t\t\tif ( brBeforeParaMatches ) {\n\t\t\t\t\tconsole.warn(\n\t\t\t\t\t\t'Oops, BR tag(s) at the end of content. Aztec will remove them, adapting the selection...'\n\t\t\t\t\t);\n\t\t\t\t\tconst count = (\n\t\t\t\t\t\tbrBeforeParaMatches[ 0 ].match( /br/g ) || []\n\t\t\t\t\t).length;\n\t\t\t\t\tif ( count > 0 ) {\n\t\t\t\t\t\tlet newSelectionStart = currentSelectionStart - count;\n\t\t\t\t\t\tif ( newSelectionStart < 0 ) {\n\t\t\t\t\t\t\tnewSelectionStart = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlet newSelectionEnd = currentSelectionEnd - count;\n\t\t\t\t\t\tif ( newSelectionEnd < 0 ) {\n\t\t\t\t\t\t\tnewSelectionEnd = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tselection = {\n\t\t\t\t\t\t\tstart: newSelectionStart,\n\t\t\t\t\t\t\tend: newSelectionEnd,\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( this.comesFromAztec ) {\n\t\t\tthis.comesFromAztec = false;\n\t\t\tthis.firedAfterTextChanged = false;\n\t\t}\n\n\t\t// Logic below assures that `RichText` width will always have equal value when container is almost fully filled.\n\t\tconst width =\n\t\t\tmaxWidth && this.state.width && maxWidth - this.state.width < 10\n\t\t\t\t? maxWidth\n\t\t\t\t: this.state.width;\n\t\tconst containerStyles = [\n\t\t\tstyle?.padding &&\n\t\t\t\tstyle?.backgroundColor && {\n\t\t\t\t\tpadding: style.padding,\n\t\t\t\t\tbackgroundColor: style.backgroundColor,\n\t\t\t\t},\n\t\t\tcontainerWidth && {\n\t\t\t\twidth: containerWidth,\n\t\t\t},\n\t\t];\n\n\t\tconst defaultSelectionColor = getStylesFromColorScheme(\n\t\t\tstyles[ 'rich-text-selection' ],\n\t\t\tstyles[ 'rich-text-selection--dark' ]\n\t\t).color;\n\t\tconst selectionColor = getSelectionColor(\n\t\t\tthis.props.selectionColor,\n\t\t\tdefaultSelectionColor,\n\t\t\tbaseGlobalStyles,\n\t\t\tthis.getIsBlockBasedTheme()\n\t\t);\n\n\t\tconst EditableView = ( props ) => {\n\t\t\tthis.customEditableOnKeyDown = props?.onKeyDown;\n\n\t\t\treturn <></>;\n\t\t};\n\n\t\treturn (\n\t\t\t<View style={ containerStyles }>\n\t\t\t\t{ children &&\n\t\t\t\t\tchildren( {\n\t\t\t\t\t\tisSelected,\n\t\t\t\t\t\tvalue: record,\n\t\t\t\t\t\tonChange: this.onFormatChange,\n\t\t\t\t\t\tonFocus: () => {},\n\t\t\t\t\t\teditableProps,\n\t\t\t\t\t\teditableTagName: EditableView,\n\t\t\t\t\t} ) }\n\t\t\t\t<RCTAztecView\n\t\t\t\t\taccessibilityLabel={ accessibilityLabel }\n\t\t\t\t\tref={ ( ref ) => {\n\t\t\t\t\t\tthis._editor = ref;\n\n\t\t\t\t\t\tif ( this.props.nativeEditorRef ) {\n\t\t\t\t\t\t\tthis.props.nativeEditorRef( ref );\n\t\t\t\t\t\t}\n\t\t\t\t\t} }\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\tbackgroundColor: styles.richText.backgroundColor,\n\t\t\t\t\t\t...style,\n\t\t\t\t\t\t...( this.isIOS && minWidth && maxWidth\n\t\t\t\t\t\t\t? { width }\n\t\t\t\t\t\t\t: { maxWidth } ),\n\t\t\t\t\t\tminHeight: this.state.height,\n\t\t\t\t\t} }\n\t\t\t\t\tblockUseDefaultFont={ blockUseDefaultFont }\n\t\t\t\t\ttext={ {\n\t\t\t\t\t\ttext: html,\n\t\t\t\t\t\teventCount: this.lastEventCount,\n\t\t\t\t\t\tselection,\n\t\t\t\t\t\tlinkTextColor,\n\t\t\t\t\t\ttag: tagName,\n\t\t\t\t\t} }\n\t\t\t\t\tplaceholder={ this.props.placeholder }\n\t\t\t\t\tplaceholderTextColor={ this.getPlaceholderTextColor() }\n\t\t\t\t\tdeleteEnter={ this.props.deleteEnter }\n\t\t\t\t\tonChange={ this.onChangeFromAztec }\n\t\t\t\t\tonFocus={ this.onFocus }\n\t\t\t\t\tonBlur={ this.onBlur }\n\t\t\t\t\tonKeyDown={ this.onKeyDown }\n\t\t\t\t\ttriggerKeyCodes={\n\t\t\t\t\t\tdisableEditingMenu\n\t\t\t\t\t\t\t? []\n\t\t\t\t\t\t\t: this.suggestionOptions().map(\n\t\t\t\t\t\t\t\t\t( op ) => op.triggerChar\n\t\t\t\t\t\t\t )\n\t\t\t\t\t}\n\t\t\t\t\tonPaste={ this.onPaste }\n\t\t\t\t\tactiveFormats={ this.getActiveFormatNames( record ) }\n\t\t\t\t\tonContentSizeChange={ this.onContentSizeChange }\n\t\t\t\t\tonSelectionChange={ this.onSelectionChangeFromAztec }\n\t\t\t\t\tblockType={ { tag: tagName } }\n\t\t\t\t\tcolor={\n\t\t\t\t\t\t( style && style.color ) ||\n\t\t\t\t\t\t( parentBlockStyles && parentBlockStyles.color ) ||\n\t\t\t\t\t\t( baseGlobalStyles && baseGlobalStyles?.color?.text ) ||\n\t\t\t\t\t\tdefaultColor\n\t\t\t\t\t}\n\t\t\t\t\tmaxImagesWidth={ 200 }\n\t\t\t\t\tfontFamily={ this.props.fontFamily || defaultFontFamily }\n\t\t\t\t\tfontSize={ fontSize }\n\t\t\t\t\tlineHeight={ lineHeight }\n\t\t\t\t\tfontWeight={ this.props.fontWeight }\n\t\t\t\t\tfontStyle={ this.props.fontStyle }\n\t\t\t\t\tdisableEditingMenu={ disableEditingMenu }\n\t\t\t\t\tisMultiline={ false }\n\t\t\t\t\ttextAlign={ this.props.textAlign }\n\t\t\t\t\t{ ...( this.isIOS ? { maxWidth } : {} ) }\n\t\t\t\t\tminWidth={ minWidth }\n\t\t\t\t\tid={ this.props.id }\n\t\t\t\t\tselectionColor={ selectionColor }\n\t\t\t\t\tdisableAutocorrection={ this.props.disableAutocorrection }\n\t\t\t\t/>\n\t\t\t\t{ isSelected && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<FormatEdit\n\t\t\t\t\t\t\tforwardedRef={ this._editor }\n\t\t\t\t\t\t\tformatTypes={ formatTypes }\n\t\t\t\t\t\t\tvalue={ record }\n\t\t\t\t\t\t\tonChange={ this.onFormatChange }\n\t\t\t\t\t\t\tonFocus={ () => {} }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{ ! disableSuggestions && (\n\t\t\t\t\t\t\t<BlockFormatControls>\n\t\t\t\t\t\t\t\t<ToolbarButtonWithOptions\n\t\t\t\t\t\t\t\t\toptions={ this.suggestionOptions() }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</BlockFormatControls>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</View>\n\t\t);\n\t}\n}\n\nRichText.defaultProps = {\n\tformat: 'string',\n\tvalue: '',\n\ttagName: 'div',\n};\n\nconst withFormatTypes = ( WrappedComponent ) => ( props ) => {\n\tconst {\n\t\tclientId,\n\t\tidentifier,\n\t\twithoutInteractiveFormatting,\n\t\tallowedFormats,\n\t} = props;\n\tconst { formatTypes } = useFormatTypes( {\n\t\tclientId,\n\t\tidentifier,\n\t\twithoutInteractiveFormatting,\n\t\tallowedFormats,\n\t} );\n\n\treturn <WrappedComponent { ...props } formatTypes={ formatTypes } />;\n};\n\nexport default compose( [\n\twithSelect( ( select, { clientId } ) => {\n\t\tconst { getBlockParents, getBlock, getSettings } =\n\t\t\tselect( 'core/block-editor' );\n\t\tconst parents = getBlockParents( clientId, true );\n\t\tconst parentBlock = parents ? getBlock( parents[ 0 ] ) : undefined;\n\t\tconst parentBlockStyles = parentBlock?.attributes?.childrenStyles;\n\n\t\tconst settings = getSettings();\n\t\tconst baseGlobalStyles = settings?.__experimentalGlobalStylesBaseStyles;\n\n\t\tconst colorPalettes = settings?.__experimentalFeatures?.color?.palette;\n\t\tconst colorPalette = colorPalettes\n\t\t\t? flatColorPalettes( colorPalettes )\n\t\t\t: settings?.colors;\n\n\t\treturn {\n\t\t\tareMentionsSupported: settings?.capabilities?.mentions === true,\n\t\t\tareXPostsSupported: settings?.capabilities?.xposts === true,\n\t\t\tparentBlockStyles,\n\t\t\tbaseGlobalStyles,\n\t\t\tcolorPalette,\n\t\t};\n\t} ),\n\twithPreferredColorScheme,\n\twithFormatTypes,\n] )( RichText );\n"],"mappings":";;;;;;;;AAKA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAC,s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,gBAAgB,GAAG+V,QAAQ,EAAEC,oCAAoC;EAEvE,MAAMC,aAAa,GAAGF,QAAQ,EAAEG,sBAAsB,EAAE5V,KAAK,EAAE6V,OAAO;EACtE,MAAM9R,YAAY,GAAG4R,aAAa,GAC/B1W,iBAAiB,CAAE0W,aAAc,CAAC,GAClCF,QAAQ,EAAEK,MAAM;EAEnB,OAAO;IACNvM,oBAAoB,EAAEkM,QAAQ,EAAEM,YAAY,EAAEC,QAAQ,KAAK,IAAI;IAC/DxM,kBAAkB,EAAEiM,QAAQ,EAAEM,YAAY,EAAEE,MAAM,KAAK,IAAI;IAC3D5E,iBAAiB;IACjB3R,gBAAgB;IAChBqE;EACD,CAAC;AACF,CAAE,CAAC,EACHmS,iCAAwB,EACxB1B,eAAe,CACd,CAAC,CAAE/T,QAAS,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_reactNative","require","_memize","_interopRequireDefault","_colord","_reactNativeAztec","_reactNativeBridge","_blockEditor","_components","_element","_compose","_data","_blocks","_htmlEntities","_keycodes","_url","_icons","_i18n","_richText","_useFormatTypes","_formatEdit","_getFormatColors","_style","_toolbarButtonWithOptions","_jsxRuntime","flatColorPalettes","memize","colorsPalettes","theme","custom","default","getSelectionColor","currentSelectionColor","defaultSelectionColor","baseGlobalStyles","isBlockBasedTheme","selectionColor","colordTextColor","colord","colordBackgroundColor","color","background","isColordTextReadable","isReadable","text","gutenbergFormatNamesToAztec","EMPTY_PARAGRAPH_TAGS","DEFAULT_FONT_SIZE","MIN_LINE_HEIGHT","RichText","Component","constructor","value","selectionStart","selectionEnd","arguments","isIOS","Platform","OS","createRecord","bind","onChangeFromAztec","onKeyDown","handleEnter","handleDelete","onPaste","onFocus","onBlur","onTextUpdate","onContentSizeChange","onFormatChange","formatToValue","maxSize","debounceCreateUndoLevel","debounce","onCreateUndoLevel","onSelectionChange","onSelectionChangeFromAztec","valueToFormat","getHtmlToRender","handleSuggestionFunc","handleUserSuggestion","showUserSuggestions","handleXpostSuggestion","showXpostSuggestions","suggestionOptions","insertString","manipulateEventCounterToForceNativeToRefresh","shouldDropEventFromAztec","state","activeFormats","selectedFormat","height","currentFontSize","getFontSize","needsSelectionUpdate","savedContent","isTouched","lastAztecEventType","lastHistoryValue","getRecord","start","end","colorPalette","props","currentValue","formats","replacements","newFormats","getFormatColors","preserveWhiteSpace","create","html","range","Math","min","length","removeRootTagsProducedByAztec","toHTMLString","getActiveFormatNames","record","formatTypes","map","name","filter","getActiveFormat","undefined","Boolean","changeHandlers","Object","fromEntries","entries","key","startsWith","values","forEach","changeHandler","onChange","setState","string","toInsert","insert","__unstableOnCreateUndoLevel","toString","result","removeRootTag","tagName","tagsToEliminate","element","removeTag","tag","openingTagRegexp","RegExp","closingTagRegexp","replace","event","contentWithoutRootTag","nativeEvent","lastEventCount","eventCount","comesFromAztec","firedAfterTextChanged","refresh","contentSize","defaultPrevented","customEditableOnKeyDown","preventDefault","RCTAztecView","KeyCodes","keyCode","handleTriggerKeyCodes","ENTER","onEnter","shiftKey","DELETE","BACKSPACE","isReverse","onDelete","hasActiveFormats","newValue","remove","isCollapsed","triggeredOption","find","option","triggeredKeyCode","triggerChar","charCodeAt","getTextContent","useTrigger","charAt","onClick","areMentionsSupported","areXPostsSupported","allOptions","supported","title","__","label","icon","atSymbol","plus","op","suggestionFunction","prefix","then","suggestion","catch","pastedText","pastedHtml","files","currentRecord","trimmedText","trim","isURL","linkedRecord","applyFormat","type","attributes","href","decodeEntities","window","console","log","plainText","unstableOnFocus","hasChanged","isManual","getActiveFormats","logText","shouldDrop","shouldFocusTextInputAfterMerge","prevProps","__unstableIsSelected","isSelected","blockIsSelected","__unstableMobileNoFocusOnMount","prevIsSelected","prevBlockIsSelected","noSelectionValues","textInputWasNotFocused","realStart","realEnd","max","isEmpty","Array","isArray","childrenBlock","toHTML","format","shouldComponentUpdate","nextProps","nextState","reversed","fontSize","style","lineHeight","componentDidMount","_editor","focus","componentDidUpdate","_this$value$toString$","lastCharacterPosition","blur","currentFontSizeStyle","getParsedFontSize","prevFontSizeStyle","isDifferentTag","componentWillUnmount","clearCurrentSelectionOnUnmount","isFocused","extraAttributes","getEditableProps","className","_getPxFromCssUnit","width","Dimensions","get","cssUnitOptions","selectedPxValue","getPxFromCssUnit","parseFloat","tagNameFontSize","elements","typography","newFontSize","getLineHeight","tagNameLineHeight","newLineHeight","getIsBlockBasedTheme","isNaN","getBlockUseDefaultFont","tagsToMatch","test","getLinkTextColor","defaultColor","customColor","linkColor","isValid","toHex","getPlaceholderTextColor","_ref","_ref2","getStylesFromColorScheme","placeholderTextColor","placeholderStyle","styles","richTextPlaceholder","richTextPlaceholderDark","defaultPlaceholderTextColor","placeholderOpacity","inheritPlaceholderColor","placeholderColor","globalStylesPlaceholderColor","render","children","minWidth","maxWidth","parentBlockStyles","accessibilityLabel","disableEditingMenu","disableSuggestions","containerWidth","editableProps","blockUseDefaultFont","textDecorationColor","defaultTextDecorationColor","fontFamily","defaultFontFamily","richText","richTextDark","linkTextColor","currentSelectionStart","currentSelectionEnd","selection","brBeforeParaMatches","match","warn","count","newSelectionStart","newSelectionEnd","containerStyles","padding","backgroundColor","EditableView","jsx","Fragment","jsxs","View","editableTagName","ref","nativeEditorRef","minHeight","placeholder","deleteEnter","triggerKeyCodes","blockType","maxImagesWidth","fontWeight","fontStyle","isMultiline","textAlign","id","disableAutocorrection","forwardedRef","BlockFormatControls","options","exports","defaultProps","withFormatTypes","WrappedComponent","clientId","identifier","withoutInteractiveFormatting","allowedFormats","useFormatTypes","_default","compose","withSelect","select","getBlockParents","getBlock","getSettings","parents","parentBlock","childrenStyles","settings","__experimentalGlobalStylesBaseStyles","colorPalettes","__experimentalFeatures","palette","colors","capabilities","mentions","xposts","withPreferredColorScheme"],"sources":["@wordpress/block-editor/src/components/rich-text/native/index.native.js"],"sourcesContent":["/* eslint no-console: [\"error\", { allow: [\"warn\"] }] */\n\n/**\n * External dependencies\n */\nimport { View, Platform, Dimensions } from 'react-native';\nimport memize from 'memize';\nimport { colord } from 'colord';\n\n/**\n * WordPress dependencies\n */\nimport RCTAztecView from '@wordpress/react-native-aztec';\nimport {\n\tshowUserSuggestions,\n\tshowXpostSuggestions,\n} from '@wordpress/react-native-bridge';\nimport { BlockFormatControls } from '@wordpress/block-editor';\nimport { getPxFromCssUnit } from '@wordpress/components';\nimport { Component } from '@wordpress/element';\nimport {\n\tcompose,\n\tdebounce,\n\twithPreferredColorScheme,\n} from '@wordpress/compose';\nimport { withSelect } from '@wordpress/data';\nimport { childrenBlock } from '@wordpress/blocks';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { BACKSPACE, DELETE, ENTER } from '@wordpress/keycodes';\nimport { isURL } from '@wordpress/url';\nimport { atSymbol, plus } from '@wordpress/icons';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tapplyFormat,\n\tgetActiveFormat,\n\tgetActiveFormats,\n\tinsert,\n\tgetTextContent,\n\tisEmpty,\n\tcreate,\n\ttoHTMLString,\n\tisCollapsed,\n\tremove,\n} from '@wordpress/rich-text';\n\n/**\n * Internal dependencies\n */\nimport { useFormatTypes } from './use-format-types';\nimport FormatEdit from './format-edit';\nimport { getFormatColors } from './get-format-colors';\nimport styles from './style.scss';\nimport ToolbarButtonWithOptions from './toolbar-button-with-options';\n\n// The flattened color palettes array is memoized to ensure that the same array instance is\n// returned for the colors palettes. This value might be used as a prop, so having the same\n// instance will prevent unnecessary re-renders of the RichText component.\nconst flatColorPalettes = memize( ( colorsPalettes ) => [\n\t...( colorsPalettes?.theme || [] ),\n\t...( colorsPalettes?.custom || [] ),\n\t...( colorsPalettes?.default || [] ),\n] );\n\nconst getSelectionColor = memize(\n\t(\n\t\tcurrentSelectionColor,\n\t\tdefaultSelectionColor,\n\t\tbaseGlobalStyles,\n\t\tisBlockBasedTheme\n\t) => {\n\t\tlet selectionColor = defaultSelectionColor;\n\t\tif ( currentSelectionColor ) {\n\t\t\tselectionColor = currentSelectionColor;\n\t\t}\n\n\t\tif ( isBlockBasedTheme ) {\n\t\t\tconst colordTextColor = colord( selectionColor );\n\t\t\tconst colordBackgroundColor = colord(\n\t\t\t\tbaseGlobalStyles?.color?.background\n\t\t\t);\n\t\t\tconst isColordTextReadable = colordTextColor.isReadable(\n\t\t\t\tcolordBackgroundColor\n\t\t\t);\n\t\t\tif ( ! isColordTextReadable ) {\n\t\t\t\tselectionColor = baseGlobalStyles?.color?.text;\n\t\t\t}\n\t\t}\n\n\t\treturn selectionColor;\n\t}\n);\n\nconst gutenbergFormatNamesToAztec = {\n\t'core/bold': 'bold',\n\t'core/italic': 'italic',\n\t'core/strikethrough': 'strikethrough',\n\t'core/text-color': 'mark',\n};\n\nconst EMPTY_PARAGRAPH_TAGS = '<p></p>';\nconst DEFAULT_FONT_SIZE = 16;\nconst MIN_LINE_HEIGHT = 1;\n\nexport class RichText extends Component {\n\tconstructor( { value, selectionStart, selectionEnd } ) {\n\t\tsuper( ...arguments );\n\n\t\tthis.isIOS = Platform.OS === 'ios';\n\t\tthis.createRecord = this.createRecord.bind( this );\n\t\tthis.onChangeFromAztec = this.onChangeFromAztec.bind( this );\n\t\tthis.onKeyDown = this.onKeyDown.bind( this );\n\t\tthis.handleEnter = this.handleEnter.bind( this );\n\t\tthis.handleDelete = this.handleDelete.bind( this );\n\t\tthis.onPaste = this.onPaste.bind( this );\n\t\tthis.onFocus = this.onFocus.bind( this );\n\t\tthis.onBlur = this.onBlur.bind( this );\n\t\tthis.onTextUpdate = this.onTextUpdate.bind( this );\n\t\tthis.onContentSizeChange = this.onContentSizeChange.bind( this );\n\t\tthis.onFormatChange = this.onFormatChange.bind( this );\n\t\tthis.formatToValue = memize( this.formatToValue.bind( this ), {\n\t\t\tmaxSize: 1,\n\t\t} );\n\t\tthis.debounceCreateUndoLevel = debounce( this.onCreateUndoLevel, 1000 );\n\t\t// This prevents a bug in Aztec which triggers onSelectionChange twice on format change.\n\t\tthis.onSelectionChange = this.onSelectionChange.bind( this );\n\t\tthis.onSelectionChangeFromAztec =\n\t\t\tthis.onSelectionChangeFromAztec.bind( this );\n\t\tthis.valueToFormat = this.valueToFormat.bind( this );\n\t\tthis.getHtmlToRender = this.getHtmlToRender.bind( this );\n\t\tthis.handleSuggestionFunc = this.handleSuggestionFunc.bind( this );\n\t\tthis.handleUserSuggestion = this.handleSuggestionFunc(\n\t\t\tshowUserSuggestions,\n\t\t\t'@'\n\t\t).bind( this );\n\t\tthis.handleXpostSuggestion = this.handleSuggestionFunc(\n\t\t\tshowXpostSuggestions,\n\t\t\t'+'\n\t\t).bind( this );\n\t\tthis.suggestionOptions = this.suggestionOptions.bind( this );\n\t\tthis.insertString = this.insertString.bind( this );\n\t\tthis.manipulateEventCounterToForceNativeToRefresh =\n\t\t\tthis.manipulateEventCounterToForceNativeToRefresh.bind( this );\n\t\tthis.shouldDropEventFromAztec =\n\t\t\tthis.shouldDropEventFromAztec.bind( this );\n\t\tthis.state = {\n\t\t\tactiveFormats: [],\n\t\t\tselectedFormat: null,\n\t\t\theight: 0,\n\t\t\tcurrentFontSize: this.getFontSize( arguments[ 0 ] ),\n\t\t};\n\t\tthis.needsSelectionUpdate = false;\n\t\tthis.savedContent = '';\n\t\tthis.isTouched = false;\n\t\tthis.lastAztecEventType = null;\n\n\t\tthis.lastHistoryValue = value;\n\n\t\t// Internal values that are update synchronously, unlike props.\n\t\tthis.value = value;\n\t\tthis.selectionStart = selectionStart;\n\t\tthis.selectionEnd = selectionEnd;\n\t}\n\n\t/**\n\t * Get the current record (value and selection) from props and state.\n\t *\n\t * @return {Object} The current record (value and selection).\n\t */\n\tgetRecord() {\n\t\tconst {\n\t\t\tselectionStart: start,\n\t\t\tselectionEnd: end,\n\t\t\tcolorPalette,\n\t\t} = this.props;\n\t\tconst { value } = this.props;\n\t\tconst currentValue = this.formatToValue( value );\n\n\t\tconst { formats, replacements, text } = currentValue;\n\t\tconst { activeFormats } = this.state;\n\t\tconst newFormats = getFormatColors( formats, colorPalette );\n\n\t\treturn {\n\t\t\tformats: newFormats,\n\t\t\treplacements,\n\t\t\ttext,\n\t\t\tstart,\n\t\t\tend,\n\t\t\tactiveFormats,\n\t\t};\n\t}\n\n\t/**\n\t * Creates a RichText value \"record\" from the current content and selection\n\t * information\n\t *\n\t *\n\t * @return {Object} A RichText value with formats and selection.\n\t */\n\tcreateRecord() {\n\t\tconst { preserveWhiteSpace } = this.props;\n\t\tconst value = {\n\t\t\tstart: this.selectionStart,\n\t\t\tend: this.selectionEnd,\n\t\t\t...create( {\n\t\t\t\thtml: this.value,\n\t\t\t\trange: null,\n\t\t\t\tpreserveWhiteSpace,\n\t\t\t} ),\n\t\t};\n\t\tconst start = Math.min( this.selectionStart, value.text.length );\n\t\tconst end = Math.min( this.selectionEnd, value.text.length );\n\t\treturn { ...value, start, end };\n\t}\n\n\tvalueToFormat( value ) {\n\t\t// Remove the outer root tags.\n\t\treturn this.removeRootTagsProducedByAztec( toHTMLString( { value } ) );\n\t}\n\n\tgetActiveFormatNames( record ) {\n\t\tconst { formatTypes } = this.props;\n\n\t\treturn formatTypes\n\t\t\t.map( ( { name } ) => name )\n\t\t\t.filter( ( name ) => {\n\t\t\t\treturn getActiveFormat( record, name ) !== undefined;\n\t\t\t} )\n\t\t\t.map( ( name ) => gutenbergFormatNamesToAztec[ name ] )\n\t\t\t.filter( Boolean );\n\t}\n\n\tonFormatChange( record ) {\n\t\tconst { start = 0, end = 0, activeFormats = [] } = record;\n\t\tconst changeHandlers = Object.fromEntries(\n\t\t\tObject.entries( this.props ).filter( ( [ key ] ) =>\n\t\t\t\tkey.startsWith( 'format_on_change_functions_' )\n\t\t\t)\n\t\t);\n\n\t\tObject.values( changeHandlers ).forEach( ( changeHandler ) => {\n\t\t\tchangeHandler( record.formats, record.text );\n\t\t} );\n\n\t\tthis.value = this.valueToFormat( record );\n\t\tthis.props.onChange( this.value );\n\t\tthis.setState( { activeFormats } );\n\t\tthis.props.onSelectionChange( start, end );\n\t\tthis.selectionStart = start;\n\t\tthis.selectionEnd = end;\n\n\t\tthis.onCreateUndoLevel();\n\n\t\tthis.lastAztecEventType = 'format change';\n\t}\n\n\tinsertString( record, string ) {\n\t\tif ( record && string ) {\n\t\t\tthis.manipulateEventCounterToForceNativeToRefresh(); // force a refresh on the native side\n\t\t\tconst toInsert = insert( record, string );\n\t\t\tthis.onFormatChange( toInsert );\n\t\t}\n\t}\n\n\tonCreateUndoLevel() {\n\t\tconst { __unstableOnCreateUndoLevel: onCreateUndoLevel } = this.props;\n\t\t// If the content is the same, no level needs to be created.\n\t\tif ( this.lastHistoryValue?.toString() === this.value?.toString() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tonCreateUndoLevel();\n\t\tthis.lastHistoryValue = this.value;\n\t}\n\n\t/*\n\t * Cleans up any root tags produced by aztec.\n\t * TODO: This should be removed on a later version when aztec doesn't return the top tag of the text being edited\n\t */\n\tremoveRootTagsProducedByAztec( html ) {\n\t\tlet result = this.removeRootTag( this.props.tagName, html );\n\n\t\tif ( this.props.tagsToEliminate ) {\n\t\t\tthis.props.tagsToEliminate.forEach( ( element ) => {\n\t\t\t\tresult = this.removeTag( element, result );\n\t\t\t} );\n\t\t}\n\n\t\treturn result;\n\t}\n\n\tremoveRootTag( tag, html ) {\n\t\tconst openingTagRegexp = RegExp( '^<' + tag + '[^>]*>', 'gim' );\n\t\tconst closingTagRegexp = RegExp( '</' + tag + '>$', 'gim' );\n\n\t\treturn html\n\t\t\t.replace( openingTagRegexp, '' )\n\t\t\t.replace( closingTagRegexp, '' );\n\t}\n\n\tremoveTag( tag, html ) {\n\t\tconst openingTagRegexp = RegExp( '<' + tag + '>', 'gim' );\n\t\tconst closingTagRegexp = RegExp( '</' + tag + '>', 'gim' );\n\t\treturn html\n\t\t\t.replace( openingTagRegexp, '' )\n\t\t\t.replace( closingTagRegexp, '' );\n\t}\n\n\t/*\n\t * Handles any case where the content of the AztecRN instance has changed\n\t */\n\tonChangeFromAztec( event ) {\n\t\tif ( this.shouldDropEventFromAztec( event, 'onChange' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst contentWithoutRootTag = this.removeRootTagsProducedByAztec(\n\t\t\tevent.nativeEvent.text\n\t\t);\n\t\t// On iOS, onChange can be triggered after selection changes, even though there are no content changes.\n\t\tif ( contentWithoutRootTag === this.value?.toString() ) {\n\t\t\treturn;\n\t\t}\n\t\tthis.lastEventCount = event.nativeEvent.eventCount;\n\t\tthis.comesFromAztec = true;\n\t\tthis.firedAfterTextChanged = true; // The onChange event always fires after the fact.\n\t\tthis.onTextUpdate( event );\n\t\tthis.lastAztecEventType = 'input';\n\t}\n\n\tonTextUpdate( event ) {\n\t\tconst contentWithoutRootTag = this.removeRootTagsProducedByAztec(\n\t\t\tevent.nativeEvent.text\n\t\t);\n\n\t\tthis.debounceCreateUndoLevel();\n\t\tconst refresh = this.value?.toString() !== contentWithoutRootTag;\n\t\tthis.value = contentWithoutRootTag;\n\n\t\t// We don't want to refresh if our goal is just to create a record.\n\t\tif ( refresh ) {\n\t\t\tthis.props.onChange( contentWithoutRootTag );\n\t\t}\n\t}\n\n\t/*\n\t * Handles any case where the content of the AztecRN instance has changed in size\n\t */\n\tonContentSizeChange( contentSize ) {\n\t\tthis.setState( contentSize );\n\t\tthis.lastAztecEventType = 'content size change';\n\t}\n\n\tonKeyDown( event ) {\n\t\tif ( event.defaultPrevented ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Add stubs for conformance in downstream autocompleters logic.\n\t\tthis.customEditableOnKeyDown?.( {\n\t\t\tpreventDefault: () => undefined,\n\t\t\t...event,\n\t\t\tkey: RCTAztecView.KeyCodes[ event?.keyCode ],\n\t\t} );\n\n\t\tthis.handleDelete( event );\n\t\tthis.handleEnter( event );\n\t\tthis.handleTriggerKeyCodes( event );\n\t}\n\n\thandleEnter( event ) {\n\t\tif ( event.keyCode !== ENTER ) {\n\t\t\treturn;\n\t\t}\n\t\tconst { onEnter } = this.props;\n\n\t\tif ( ! onEnter ) {\n\t\t\treturn;\n\t\t}\n\n\t\tonEnter( {\n\t\t\tvalue: this.createRecord(),\n\t\t\tonChange: this.onFormatChange,\n\t\t\tshiftKey: event.shiftKey,\n\t\t} );\n\t\tthis.lastAztecEventType = 'input';\n\t}\n\n\thandleDelete( event ) {\n\t\tif ( this.shouldDropEventFromAztec( event, 'handleDelete' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { keyCode } = event;\n\n\t\tif ( keyCode !== DELETE && keyCode !== BACKSPACE ) {\n\t\t\treturn;\n\t\t}\n\t\tconst isReverse = keyCode === BACKSPACE;\n\n\t\tconst { onDelete } = this.props;\n\t\tthis.lastEventCount = event.nativeEvent.eventCount;\n\t\tthis.comesFromAztec = true;\n\t\tthis.firedAfterTextChanged = event.nativeEvent.firedAfterTextChanged;\n\t\tconst value = this.createRecord();\n\t\tconst { start, end, text, activeFormats } = value;\n\t\tconst hasActiveFormats = activeFormats && !! activeFormats.length;\n\t\tlet newValue;\n\n\t\t// Always handle full content deletion ourselves.\n\t\tif ( start === 0 && end !== 0 && end >= text.length ) {\n\t\t\tnewValue = remove( value );\n\t\t\tthis.onFormatChange( newValue );\n\t\t\tevent.preventDefault();\n\t\t\treturn;\n\t\t}\n\n\t\t// Only process delete if the key press occurs at an uncollapsed edge.\n\t\tif (\n\t\t\t! isCollapsed( value ) ||\n\t\t\thasActiveFormats ||\n\t\t\t( isReverse && start !== 0 ) ||\n\t\t\t( ! isReverse && end !== text.length )\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\tonDelete( { isReverse, value } );\n\n\t\tevent.preventDefault();\n\t\tthis.lastAztecEventType = 'input';\n\t}\n\n\thandleTriggerKeyCodes( event ) {\n\t\tconst { keyCode } = event;\n\t\tconst triggeredOption = this.suggestionOptions().find( ( option ) => {\n\t\t\tconst triggeredKeyCode = option.triggerChar.charCodeAt( 0 );\n\t\t\treturn triggeredKeyCode === keyCode;\n\t\t} );\n\n\t\tif ( triggeredOption ) {\n\t\t\tconst record = this.getRecord();\n\t\t\tconst text = getTextContent( record );\n\t\t\t// Only respond to the trigger if the selection is on the start of text or line\n\t\t\t// or if the character before is a space.\n\t\t\tconst useTrigger =\n\t\t\t\ttext.length === 0 ||\n\t\t\t\trecord.start === 0 ||\n\t\t\t\ttext.charAt( record.start - 1 ) === '\\n' ||\n\t\t\t\ttext.charAt( record.start - 1 ) === ' ';\n\n\t\t\tif ( useTrigger && triggeredOption.onClick ) {\n\t\t\t\ttriggeredOption.onClick();\n\t\t\t} else {\n\t\t\t\tthis.insertString( record, triggeredOption.triggerChar );\n\t\t\t}\n\t\t}\n\t}\n\n\tsuggestionOptions() {\n\t\tconst { areMentionsSupported, areXPostsSupported } = this.props;\n\t\tconst allOptions = [\n\t\t\t{\n\t\t\t\tsupported: areMentionsSupported,\n\t\t\t\ttitle: __( 'Insert mention' ),\n\t\t\t\tonClick: this.handleUserSuggestion,\n\t\t\t\ttriggerChar: '@',\n\t\t\t\tvalue: 'mention',\n\t\t\t\tlabel: __( 'Mention' ),\n\t\t\t\ticon: atSymbol,\n\t\t\t},\n\t\t\t{\n\t\t\t\tsupported: areXPostsSupported,\n\t\t\t\ttitle: __( 'Insert crosspost' ),\n\t\t\t\tonClick: this.handleXpostSuggestion,\n\t\t\t\ttriggerChar: '+',\n\t\t\t\tvalue: 'crosspost',\n\t\t\t\tlabel: __( 'Crosspost' ),\n\t\t\t\ticon: plus,\n\t\t\t},\n\t\t];\n\t\treturn allOptions.filter( ( op ) => op.supported );\n\t}\n\n\thandleSuggestionFunc( suggestionFunction, prefix ) {\n\t\treturn () => {\n\t\t\tconst record = this.getRecord();\n\t\t\tsuggestionFunction()\n\t\t\t\t.then( ( suggestion ) => {\n\t\t\t\t\tthis.insertString( record, `${ prefix }${ suggestion } ` );\n\t\t\t\t} )\n\t\t\t\t.catch( () => {} );\n\t\t};\n\t}\n\n\t/**\n\t * Handles a paste event from the native Aztec Wrapper.\n\t *\n\t * @param {Object} event The paste event which wraps `nativeEvent`.\n\t */\n\tonPaste( event ) {\n\t\tconst { onPaste, onChange } = this.props;\n\t\tconst { activeFormats = [] } = this.state;\n\n\t\tconst { pastedText, pastedHtml, files } = event.nativeEvent;\n\t\tconst currentRecord = this.createRecord();\n\n\t\tevent.preventDefault();\n\n\t\t// There is a selection, check if a URL is pasted.\n\t\tif ( ! isCollapsed( currentRecord ) ) {\n\t\t\tconst trimmedText = ( pastedHtml || pastedText )\n\t\t\t\t.replace( /<[^>]+>/g, '' )\n\t\t\t\t.trim();\n\n\t\t\t// A URL was pasted, turn the selection into a link.\n\t\t\tif ( isURL( trimmedText ) ) {\n\t\t\t\tconst linkedRecord = applyFormat( currentRecord, {\n\t\t\t\t\ttype: 'a',\n\t\t\t\t\tattributes: {\n\t\t\t\t\t\thref: decodeEntities( trimmedText ),\n\t\t\t\t\t},\n\t\t\t\t} );\n\t\t\t\tthis.value = this.valueToFormat( linkedRecord );\n\t\t\t\tonChange( this.value );\n\n\t\t\t\t// Allows us to ask for this information when we get a report.\n\t\t\t\twindow.console.log( 'Created link:\\n\\n', trimmedText );\n\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tif ( onPaste ) {\n\t\t\tonPaste( {\n\t\t\t\tvalue: currentRecord,\n\t\t\t\tonChange: this.onFormatChange,\n\t\t\t\thtml: pastedHtml,\n\t\t\t\tplainText: pastedText,\n\t\t\t\tfiles,\n\t\t\t\tactiveFormats,\n\t\t\t} );\n\t\t}\n\t}\n\n\tonFocus() {\n\t\tthis.isTouched = true;\n\n\t\tconst { unstableOnFocus, onSelectionChange } = this.props;\n\n\t\tif ( unstableOnFocus ) {\n\t\t\tunstableOnFocus();\n\t\t}\n\n\t\t// We know for certain that on focus, the old selection is invalid. It\n\t\t// will be recalculated on `selectionchange`.\n\n\t\tonSelectionChange( this.selectionStart, this.selectionEnd );\n\n\t\tthis.lastAztecEventType = 'focus';\n\t}\n\n\tonBlur( event ) {\n\t\tthis.isTouched = false;\n\n\t\t// Check if value is up to date with latest state of native AztecView.\n\t\tif (\n\t\t\tevent.nativeEvent.text &&\n\t\t\tevent.nativeEvent.text !== this.props.value?.toString()\n\t\t) {\n\t\t\tthis.onTextUpdate( event );\n\t\t}\n\n\t\tif ( this.props.onBlur ) {\n\t\t\tthis.props.onBlur( event );\n\t\t}\n\n\t\tthis.lastAztecEventType = 'blur';\n\t}\n\n\tonSelectionChange( start, end ) {\n\t\tconst hasChanged =\n\t\t\tthis.selectionStart !== start || this.selectionEnd !== end;\n\n\t\tthis.selectionStart = start;\n\t\tthis.selectionEnd = end;\n\n\t\t// This is a manual selection change event if onChange was not triggered just before\n\t\t// and we did not just trigger a text update\n\t\t// `onChange` could be the last event and could have been triggered a long time ago so\n\t\t// this approach is not perfectly reliable.\n\t\tconst isManual =\n\t\t\tthis.lastAztecEventType !== 'input' &&\n\t\t\tthis.props.value?.toString() === this.value?.toString();\n\t\tif ( hasChanged && isManual ) {\n\t\t\tconst value = this.createRecord();\n\t\t\tconst activeFormats = getActiveFormats( value );\n\t\t\tthis.setState( { activeFormats } );\n\t\t}\n\n\t\tthis.props.onSelectionChange( start, end );\n\t}\n\n\tshouldDropEventFromAztec( event, logText ) {\n\t\tconst shouldDrop =\n\t\t\t! this.isIOS && event.nativeEvent.eventCount <= this.lastEventCount;\n\t\tif ( shouldDrop ) {\n\t\t\twindow.console.log(\n\t\t\t\t`Dropping ${ logText } from Aztec as its event counter is older than latest sent to the native side. Got ${ event.nativeEvent.eventCount } but lastEventCount is ${ this.lastEventCount }.`\n\t\t\t);\n\t\t}\n\t\treturn shouldDrop;\n\t}\n\n\t/**\n\t * Determines whether the text input should receive focus after an update.\n\t * For cases where a RichText with a value is merged with an empty one.\n\t *\n\t * @param {Object} prevProps - The previous props of the component.\n\t * @return {boolean} True if the text input should receive focus, false otherwise.\n\t */\n\tshouldFocusTextInputAfterMerge( prevProps ) {\n\t\tconst {\n\t\t\t__unstableIsSelected: isSelected,\n\t\t\tblockIsSelected,\n\t\t\tselectionStart,\n\t\t\tselectionEnd,\n\t\t\t__unstableMobileNoFocusOnMount,\n\t\t} = this.props;\n\n\t\tconst {\n\t\t\t__unstableIsSelected: prevIsSelected,\n\t\t\tblockIsSelected: prevBlockIsSelected,\n\t\t} = prevProps;\n\n\t\tconst noSelectionValues =\n\t\t\tselectionStart === undefined && selectionEnd === undefined;\n\t\tconst textInputWasNotFocused = ! prevIsSelected && ! isSelected;\n\n\t\treturn (\n\t\t\t! __unstableMobileNoFocusOnMount &&\n\t\t\tnoSelectionValues &&\n\t\t\ttextInputWasNotFocused &&\n\t\t\t! prevBlockIsSelected &&\n\t\t\tblockIsSelected\n\t\t);\n\t}\n\n\tonSelectionChangeFromAztec( start, end, text, event ) {\n\t\tif ( this.shouldDropEventFromAztec( event, 'onSelectionChange' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// `end` can be less than `start` on iOS\n\t\t// Let's fix that here so `rich-text/slice` can work properly.\n\t\tconst realStart = Math.min( start, end );\n\t\tconst realEnd = Math.max( start, end );\n\n\t\t// Check and dicsard stray event, where the text and selection is equal to the ones already cached.\n\t\tconst contentWithoutRootTag = this.removeRootTagsProducedByAztec(\n\t\t\tevent.nativeEvent.text\n\t\t);\n\t\tif (\n\t\t\tcontentWithoutRootTag === this.value?.toString() &&\n\t\t\trealStart === this.selectionStart &&\n\t\t\trealEnd === this.selectionEnd\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.comesFromAztec = true;\n\t\tthis.firedAfterTextChanged = true; // Selection change event always fires after the fact.\n\n\t\t// Update text before updating selection\n\t\t// Make sure there are changes made to the content before upgrading it upward.\n\t\tthis.onTextUpdate( event );\n\n\t\t// Aztec can send us selection change events after it has lost focus.\n\t\t// For instance the autocorrect feature will complete a partially written\n\t\t// word when resigning focus, causing a selection change event.\n\t\t// Forwarding this selection change could cause this RichText to regain\n\t\t// focus and start a focus loop.\n\t\t//\n\t\t// See https://github.com/wordpress-mobile/gutenberg-mobile/issues/1696\n\t\tif ( this.props.__unstableIsSelected ) {\n\t\t\tthis.onSelectionChange( realStart, realEnd );\n\t\t}\n\t\t// Update lastEventCount to prevent Aztec from re-rendering the content it just sent.\n\t\tthis.lastEventCount = event.nativeEvent.eventCount;\n\n\t\tthis.lastAztecEventType = 'selection change';\n\t}\n\n\tisEmpty() {\n\t\treturn isEmpty( this.formatToValue( this.props.value ) );\n\t}\n\n\tformatToValue( value ) {\n\t\tconst { preserveWhiteSpace } = this.props;\n\t\t// Handle deprecated `children` and `node` sources.\n\t\tif ( Array.isArray( value ) ) {\n\t\t\treturn create( {\n\t\t\t\thtml: childrenBlock.toHTML( value ),\n\t\t\t\tpreserveWhiteSpace,\n\t\t\t} );\n\t\t}\n\n\t\tif ( this.props.format === 'string' ) {\n\t\t\treturn create( {\n\t\t\t\thtml: value,\n\t\t\t\tpreserveWhiteSpace,\n\t\t\t} );\n\t\t}\n\n\t\t// Guard for blocks passing `null` in onSplit callbacks. May be removed\n\t\t// if onSplit is revised to not pass a `null` value.\n\t\tif ( value === null ) {\n\t\t\treturn create();\n\t\t}\n\n\t\treturn value;\n\t}\n\n\tmanipulateEventCounterToForceNativeToRefresh() {\n\t\tif ( this.isIOS ) {\n\t\t\tthis.lastEventCount = undefined;\n\t\t\treturn;\n\t\t}\n\n\t\tif ( typeof this.lastEventCount !== 'undefined' ) {\n\t\t\tthis.lastEventCount += 100; // bump by a hundred, hopefully native hasn't bombarded the JS side in the meantime.\n\t\t} // no need to bump when 'undefined' as native side won't receive the key when the value is undefined, and that will cause force updating anyway,\n\t\t// see https://github.com/WordPress/gutenberg/blob/82e578dcc75e67891c750a41a04c1e31994192fc/packages/react-native-aztec/android/src/main/java/org/wordpress/mobile/ReactNativeAztec/ReactAztecManager.java#L213-L215\n\t}\n\n\tshouldComponentUpdate( nextProps, nextState ) {\n\t\tif (\n\t\t\tnextProps.tagName !== this.props.tagName ||\n\t\t\tnextProps.reversed !== this.props.reversed ||\n\t\t\tnextProps.start !== this.props.start\n\t\t) {\n\t\t\tthis.manipulateEventCounterToForceNativeToRefresh(); // force a refresh on the native side\n\t\t\tthis.value = undefined;\n\t\t\treturn true;\n\t\t}\n\n\t\t// TODO: Please re-introduce the check to avoid updating the content right after an `onChange` call.\n\t\t// It was removed in https://github.com/WordPress/gutenberg/pull/12417 to fix undo/redo problem.\n\n\t\t// If the component is changed React side (undo/redo/merging/splitting/custom text actions)\n\t\t// we need to make sure the native is updated as well.\n\n\t\t// Also, don't trust the \"this.lastContent\" as on Android, incomplete text events arrive\n\t\t// with only some of the text, while the virtual keyboard's suggestion system does its magic.\n\t\t// ** compare with this.lastContent for optimizing performance by not forcing Aztec with text it already has\n\t\t// , but compare with props.value to not lose \"half word\" text because of Android virtual keyb autosuggestion behavior\n\t\tif (\n\t\t\ttypeof nextProps.value !== 'undefined' &&\n\t\t\ttypeof this.props.value !== 'undefined' &&\n\t\t\t( ! this.comesFromAztec || ! this.firedAfterTextChanged ) &&\n\t\t\tnextProps.value?.toString() !== this.props.value?.toString()\n\t\t) {\n\t\t\t// Gutenberg seems to try to mirror the caret state even on events that only change the content so,\n\t\t\t// let's force caret update if state has selection set.\n\t\t\tif (\n\t\t\t\ttypeof nextProps.selectionStart !== 'undefined' &&\n\t\t\t\ttypeof nextProps.selectionEnd !== 'undefined'\n\t\t\t) {\n\t\t\t\tthis.needsSelectionUpdate = true;\n\t\t\t}\n\n\t\t\tthis.manipulateEventCounterToForceNativeToRefresh(); // force a refresh on the native side\n\t\t}\n\n\t\tif ( ! this.comesFromAztec ) {\n\t\t\tif (\n\t\t\t\ttypeof nextProps.selectionStart !== 'undefined' &&\n\t\t\t\ttypeof nextProps.selectionEnd !== 'undefined' &&\n\t\t\t\tnextProps.selectionStart !== this.props.selectionStart &&\n\t\t\t\tnextProps.selectionStart !== this.selectionStart &&\n\t\t\t\tnextProps.__unstableIsSelected\n\t\t\t) {\n\t\t\t\tthis.needsSelectionUpdate = true;\n\t\t\t\tthis.manipulateEventCounterToForceNativeToRefresh(); // force a refresh on the native side\n\t\t\t}\n\n\t\t\t// For font size changes from a prop value a force refresh\n\t\t\t// is needed without the selection update.\n\t\t\tif ( nextProps?.fontSize !== this.props?.fontSize ) {\n\t\t\t\tthis.manipulateEventCounterToForceNativeToRefresh(); // force a refresh on the native side\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\t( nextProps?.style?.fontSize !== this.props?.style?.fontSize &&\n\t\t\t\t\tnextState.currentFontSize !==\n\t\t\t\t\t\tthis.state.currentFontSize ) ||\n\t\t\t\tnextState.currentFontSize !== this.state.currentFontSize ||\n\t\t\t\tnextProps?.style?.lineHeight !== this.props?.style?.lineHeight\n\t\t\t) {\n\t\t\t\tthis.needsSelectionUpdate = true;\n\t\t\t\tthis.manipulateEventCounterToForceNativeToRefresh(); // force a refresh on the native side\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tcomponentDidMount() {\n\t\t// Request focus if wrapping block is selected and parent hasn't inhibited the focus request. This method of focusing\n\t\t// is trying to implement the web-side counterpart of BlockList's `focusTabbable` where the BlockList is focusing an\n\t\t// inputbox by searching the DOM. We don't have the DOM in RN so, using the combination of blockIsSelected and __unstableMobileNoFocusOnMount\n\t\t// to determine if we should focus the RichText.\n\t\tif (\n\t\t\tthis.props.blockIsSelected &&\n\t\t\t! this.props.__unstableMobileNoFocusOnMount\n\t\t) {\n\t\t\tthis._editor.focus();\n\t\t\tthis.onSelectionChange(\n\t\t\t\tthis.props.selectionStart || 0,\n\t\t\t\tthis.props.selectionEnd || 0\n\t\t\t);\n\t\t}\n\t}\n\n\tcomponentDidUpdate( prevProps ) {\n\t\tconst { style, tagName } = this.props;\n\t\tconst { currentFontSize } = this.state;\n\n\t\tif ( this.props.value?.toString() !== this.value?.toString() ) {\n\t\t\tthis.value = this.props.value;\n\t\t}\n\t\tconst { __unstableIsSelected: prevIsSelected } = prevProps;\n\t\tconst { __unstableIsSelected: isSelected } = this.props;\n\n\t\tif ( isSelected && ! prevIsSelected ) {\n\t\t\tthis._editor.focus();\n\t\t\t// Update selection props explicitly when component is selected as Aztec won't call onSelectionChange\n\t\t\t// if its internal value hasn't change. When created, default value is 0, 0.\n\t\t\tthis.onSelectionChange(\n\t\t\t\tthis.props.selectionStart || 0,\n\t\t\t\tthis.props.selectionEnd || 0\n\t\t\t);\n\t\t} else if ( this.shouldFocusTextInputAfterMerge( prevProps ) ) {\n\t\t\t// Since this is happening when merging blocks, the selection should be at the last character position.\n\t\t\t// As a fallback the internal selectionEnd value is used.\n\t\t\tconst lastCharacterPosition =\n\t\t\t\tthis.value?.toString().length ?? this.selectionEnd;\n\t\t\tthis._editor.focus();\n\t\t\tthis.props.onSelectionChange(\n\t\t\t\tlastCharacterPosition,\n\t\t\t\tlastCharacterPosition\n\t\t\t);\n\t\t} else if ( ! isSelected && prevIsSelected ) {\n\t\t\tthis._editor.blur();\n\t\t}\n\n\t\t// For font size values changes from the font size picker\n\t\t// we compare previous values to refresh the selected font size,\n\t\t// this is also used when the tag name changes\n\t\t// e.g Heading block and a level change like h1->h2.\n\t\tconst currentFontSizeStyle = this.getParsedFontSize( style?.fontSize );\n\t\tconst prevFontSizeStyle = this.getParsedFontSize(\n\t\t\tprevProps?.style?.fontSize\n\t\t);\n\t\tconst isDifferentTag = prevProps.tagName !== tagName;\n\t\tif (\n\t\t\t( currentFontSize &&\n\t\t\t\t( currentFontSizeStyle || prevFontSizeStyle ) &&\n\t\t\t\tcurrentFontSizeStyle !== currentFontSize ) ||\n\t\t\tisDifferentTag\n\t\t) {\n\t\t\tthis.setState( {\n\t\t\t\tcurrentFontSize: this.getFontSize( this.props ),\n\t\t\t} );\n\t\t}\n\t}\n\n\tcomponentWillUnmount() {\n\t\tconst { clearCurrentSelectionOnUnmount } = this.props;\n\n\t\t// There are cases when the component is unmounted e.g. scrolling in a\n\t\t// long post due to virtualization, so the block selection needs to be cleared\n\t\t// so it doesn't auto-focus when it's added back.\n\t\tif ( this._editor?.isFocused() ) {\n\t\t\tclearCurrentSelectionOnUnmount?.();\n\t\t}\n\t}\n\n\tgetHtmlToRender( record, tagName ) {\n\t\t// Save back to HTML from React tree.\n\t\tlet value = this.valueToFormat( record );\n\n\t\tif ( value === undefined ) {\n\t\t\tthis.manipulateEventCounterToForceNativeToRefresh(); // force a refresh on the native side\n\t\t\tvalue = '';\n\t\t}\n\t\t// On android if content is empty we need to send no content or else the placeholder will not show.\n\t\tif (\n\t\t\t! this.isIOS &&\n\t\t\t( value?.toString() === '' ||\n\t\t\t\tvalue?.toString() === EMPTY_PARAGRAPH_TAGS )\n\t\t) {\n\t\t\treturn '';\n\t\t}\n\n\t\tif ( tagName ) {\n\t\t\tlet extraAttributes = ``;\n\t\t\tif ( tagName === `ol` ) {\n\t\t\t\tif ( this.props.reversed ) {\n\t\t\t\t\textraAttributes += ` reversed`;\n\t\t\t\t}\n\t\t\t\tif ( this.props.start ) {\n\t\t\t\t\textraAttributes += ` start=${ this.props.start }`;\n\t\t\t\t}\n\t\t\t}\n\t\t\tvalue = `<${ tagName }${ extraAttributes }>${ value }</${ tagName }>`;\n\t\t}\n\t\treturn value;\n\t}\n\n\tgetEditableProps() {\n\t\treturn {\n\t\t\t// Overridable props.\n\t\t\tstyle: {},\n\t\t\tclassName: 'rich-text',\n\t\t\tonKeyDown: () => null,\n\t\t};\n\t}\n\n\tgetParsedFontSize( fontSize ) {\n\t\tconst { height, width } = Dimensions.get( 'window' );\n\t\tconst cssUnitOptions = { height, width, fontSize: DEFAULT_FONT_SIZE };\n\n\t\tif ( ! fontSize ) {\n\t\t\treturn fontSize;\n\t\t}\n\n\t\tconst selectedPxValue =\n\t\t\tgetPxFromCssUnit( fontSize, cssUnitOptions ) ?? DEFAULT_FONT_SIZE;\n\n\t\treturn parseFloat( selectedPxValue );\n\t}\n\n\tgetFontSize( props ) {\n\t\tconst { baseGlobalStyles, tagName, fontSize, style } = props;\n\t\tconst tagNameFontSize =\n\t\t\tbaseGlobalStyles?.elements?.[ tagName ]?.typography?.fontSize;\n\n\t\tlet newFontSize = DEFAULT_FONT_SIZE;\n\n\t\t// Disables line-height rendering for pre elements until we fix some issues with AztecAndroid.\n\t\tif ( tagName === 'pre' && ! this.isIOS ) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\t// For block-based themes, get the default editor font size.\n\t\tif ( baseGlobalStyles?.typography?.fontSize && tagName === 'p' ) {\n\t\t\tnewFontSize = baseGlobalStyles?.typography?.fontSize;\n\t\t}\n\n\t\t// For block-based themes, get the default element font size\n\t\t// e.g h1, h2.\n\t\tif ( tagNameFontSize ) {\n\t\t\tnewFontSize = tagNameFontSize;\n\t\t}\n\n\t\t// For font size values provided from the styles,\n\t\t// usually from values set from the font size picker.\n\t\tif ( style?.fontSize ) {\n\t\t\tnewFontSize = style.fontSize;\n\t\t}\n\n\t\t// Fall-back to a font size provided from its props (if there's any)\n\t\t// and there are no other default values to use.\n\t\tif ( fontSize && ! tagNameFontSize && ! style?.fontSize ) {\n\t\t\tnewFontSize = fontSize;\n\t\t}\n\n\t\t// We need to always convert to px units because the selected value\n\t\t// could be coming from the web where it could be stored as a different unit.\n\t\tconst selectedPxValue = this.getParsedFontSize( newFontSize );\n\n\t\treturn selectedPxValue;\n\t}\n\n\tgetLineHeight() {\n\t\tconst { baseGlobalStyles, tagName, lineHeight, style } = this.props;\n\t\tconst tagNameLineHeight =\n\t\t\tbaseGlobalStyles?.elements?.[ tagName ]?.typography?.lineHeight;\n\t\tlet newLineHeight;\n\n\t\t// Disables line-height rendering for pre elements until we fix some issues with AztecAndroid.\n\t\tif ( tagName === 'pre' && ! this.isIOS ) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tif ( ! this.getIsBlockBasedTheme() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// For block-based themes, get the default editor line height.\n\t\tif ( baseGlobalStyles?.typography?.lineHeight && tagName === 'p' ) {\n\t\t\tnewLineHeight = parseFloat(\n\t\t\t\tbaseGlobalStyles?.typography?.lineHeight\n\t\t\t);\n\t\t}\n\n\t\t// For block-based themes, get the default element line height\n\t\t// e.g h1, h2.\n\t\tif ( tagNameLineHeight ) {\n\t\t\tnewLineHeight = parseFloat( tagNameLineHeight );\n\t\t}\n\n\t\t// For line height values provided from the styles,\n\t\t// usually from values set from the line height picker.\n\t\tif ( style?.lineHeight ) {\n\t\t\tnewLineHeight = parseFloat( style.lineHeight );\n\t\t}\n\n\t\t// Fall-back to a line height provided from its props (if there's any)\n\t\t// and there are no other default values to use.\n\t\tif ( lineHeight && ! tagNameLineHeight && ! style?.lineHeight ) {\n\t\t\tnewLineHeight = lineHeight;\n\t\t}\n\n\t\t// Check the final value is not over the minimum supported value.\n\t\tif ( newLineHeight && newLineHeight < MIN_LINE_HEIGHT ) {\n\t\t\tnewLineHeight = MIN_LINE_HEIGHT;\n\t\t}\n\n\t\t// Until we parse CSS values correctly, avoid passing NaN values to Aztec\n\t\tif ( isNaN( newLineHeight ) ) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\treturn newLineHeight;\n\t}\n\n\tgetIsBlockBasedTheme() {\n\t\tconst { baseGlobalStyles } = this.props;\n\n\t\treturn (\n\t\t\tbaseGlobalStyles && Object.entries( baseGlobalStyles ).length !== 0\n\t\t);\n\t}\n\n\tgetBlockUseDefaultFont() {\n\t\t// For block-based themes it enables using the defaultFont\n\t\t// in Aztec for iOS so it allows customizing the font size\n\t\t// for the Preformatted/Code and Heading blocks.\n\t\tif ( ! this.isIOS ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { tagName } = this.props;\n\t\tconst isBlockBasedTheme = this.getIsBlockBasedTheme();\n\t\tconst tagsToMatch = /pre|h([1-6])$/gm;\n\n\t\treturn isBlockBasedTheme && tagsToMatch.test( tagName );\n\t}\n\n\tgetLinkTextColor( defaultColor ) {\n\t\tconst { style } = this.props;\n\t\tconst customColor = style?.linkColor && colord( style.linkColor );\n\n\t\treturn customColor && customColor.isValid()\n\t\t\t? customColor.toHex()\n\t\t\t: defaultColor;\n\t}\n\n\tgetPlaceholderTextColor() {\n\t\tconst {\n\t\t\tbaseGlobalStyles,\n\t\t\tgetStylesFromColorScheme,\n\t\t\tplaceholderTextColor,\n\t\t\tstyle,\n\t\t} = this.props;\n\n\t\t// Default placeholder text color.\n\t\tconst placeholderStyle = getStylesFromColorScheme(\n\t\t\tstyles.richTextPlaceholder,\n\t\t\tstyles.richTextPlaceholderDark\n\t\t);\n\t\tconst { color: defaultPlaceholderTextColor } = placeholderStyle;\n\t\t// Custom 63% opacity for theme and inherited colors.\n\t\tconst placeholderOpacity = 'A1';\n\n\t\t// Determine inherited placeholder color if available.\n\t\tconst inheritPlaceholderColor = style?.placeholderColor\n\t\t\t? `${ style.placeholderColor }${ placeholderOpacity }`\n\t\t\t: undefined;\n\n\t\t// If using block-based themes, derive the placeholder color from global styles.\n\t\tconst globalStylesPlaceholderColor = baseGlobalStyles?.color?.text\n\t\t\t? `${ baseGlobalStyles.color.text }${ placeholderOpacity }`\n\t\t\t: undefined;\n\n\t\treturn (\n\t\t\tinheritPlaceholderColor ??\n\t\t\tplaceholderTextColor ??\n\t\t\tglobalStylesPlaceholderColor ??\n\t\t\tdefaultPlaceholderTextColor\n\t\t);\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\ttagName,\n\t\t\tstyle,\n\t\t\t__unstableIsSelected: isSelected,\n\t\t\tchildren,\n\t\t\tgetStylesFromColorScheme,\n\t\t\tminWidth,\n\t\t\tmaxWidth,\n\t\t\tformatTypes,\n\t\t\tparentBlockStyles,\n\t\t\taccessibilityLabel,\n\t\t\tdisableEditingMenu = false,\n\t\t\tbaseGlobalStyles,\n\t\t\tselectionStart,\n\t\t\tselectionEnd,\n\t\t\tdisableSuggestions,\n\t\t\tcontainerWidth,\n\t\t} = this.props;\n\t\tconst { currentFontSize } = this.state;\n\n\t\tconst record = this.getRecord();\n\t\tconst html = this.getHtmlToRender( record, tagName );\n\t\tconst editableProps = this.getEditableProps();\n\t\tconst blockUseDefaultFont = this.getBlockUseDefaultFont();\n\n\t\tconst fontSize = currentFontSize;\n\t\tconst lineHeight = this.getLineHeight();\n\n\t\tconst {\n\t\t\tcolor: defaultColor,\n\t\t\ttextDecorationColor: defaultTextDecorationColor,\n\t\t\tfontFamily: defaultFontFamily,\n\t\t} = getStylesFromColorScheme( styles.richText, styles.richTextDark );\n\t\tconst linkTextColor = this.getLinkTextColor(\n\t\t\tdefaultTextDecorationColor\n\t\t);\n\n\t\tconst currentSelectionStart = selectionStart ?? 0;\n\t\tconst currentSelectionEnd = selectionEnd ?? 0;\n\t\tlet selection = null;\n\t\tif ( this.needsSelectionUpdate ) {\n\t\t\tthis.needsSelectionUpdate = false;\n\t\t\tselection = {\n\t\t\t\tstart: currentSelectionStart,\n\t\t\t\tend: currentSelectionEnd,\n\t\t\t};\n\n\t\t\t// On AztecAndroid, setting the caret to an out-of-bounds position will crash the editor so, let's check for some cases.\n\t\t\tif ( ! this.isIOS ) {\n\t\t\t\t// The following regular expression is used in Aztec here:\n\t\t\t\t// https://github.com/wordpress-mobile/AztecEditor-Android/blob/b1fad439d56fa6d4aa0b78526fef355c59d00dd3/aztec/src/main/kotlin/org/wordpress/aztec/AztecParser.kt#L656\n\t\t\t\tconst brBeforeParaMatches = html.match( /(<br>)+<\\/p>$/g );\n\t\t\t\tif ( brBeforeParaMatches ) {\n\t\t\t\t\tconsole.warn(\n\t\t\t\t\t\t'Oops, BR tag(s) at the end of content. Aztec will remove them, adapting the selection...'\n\t\t\t\t\t);\n\t\t\t\t\tconst count = (\n\t\t\t\t\t\tbrBeforeParaMatches[ 0 ].match( /br/g ) || []\n\t\t\t\t\t).length;\n\t\t\t\t\tif ( count > 0 ) {\n\t\t\t\t\t\tlet newSelectionStart = currentSelectionStart - count;\n\t\t\t\t\t\tif ( newSelectionStart < 0 ) {\n\t\t\t\t\t\t\tnewSelectionStart = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlet newSelectionEnd = currentSelectionEnd - count;\n\t\t\t\t\t\tif ( newSelectionEnd < 0 ) {\n\t\t\t\t\t\t\tnewSelectionEnd = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tselection = {\n\t\t\t\t\t\t\tstart: newSelectionStart,\n\t\t\t\t\t\t\tend: newSelectionEnd,\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( this.comesFromAztec ) {\n\t\t\tthis.comesFromAztec = false;\n\t\t\tthis.firedAfterTextChanged = false;\n\t\t}\n\n\t\t// Logic below assures that `RichText` width will always have equal value when container is almost fully filled.\n\t\tconst width =\n\t\t\tmaxWidth && this.state.width && maxWidth - this.state.width < 10\n\t\t\t\t? maxWidth\n\t\t\t\t: this.state.width;\n\t\tconst containerStyles = [\n\t\t\tstyle?.padding &&\n\t\t\t\tstyle?.backgroundColor && {\n\t\t\t\t\tpadding: style.padding,\n\t\t\t\t\tbackgroundColor: style.backgroundColor,\n\t\t\t\t},\n\t\t\tcontainerWidth && {\n\t\t\t\twidth: containerWidth,\n\t\t\t},\n\t\t];\n\n\t\tconst defaultSelectionColor = getStylesFromColorScheme(\n\t\t\tstyles[ 'rich-text-selection' ],\n\t\t\tstyles[ 'rich-text-selection--dark' ]\n\t\t).color;\n\t\tconst selectionColor = getSelectionColor(\n\t\t\tthis.props.selectionColor,\n\t\t\tdefaultSelectionColor,\n\t\t\tbaseGlobalStyles,\n\t\t\tthis.getIsBlockBasedTheme()\n\t\t);\n\n\t\tconst EditableView = ( props ) => {\n\t\t\tthis.customEditableOnKeyDown = props?.onKeyDown;\n\n\t\t\treturn <></>;\n\t\t};\n\n\t\treturn (\n\t\t\t<View style={ containerStyles }>\n\t\t\t\t{ children &&\n\t\t\t\t\tchildren( {\n\t\t\t\t\t\tisSelected,\n\t\t\t\t\t\tvalue: record,\n\t\t\t\t\t\tonChange: this.onFormatChange,\n\t\t\t\t\t\tonFocus: () => {},\n\t\t\t\t\t\teditableProps,\n\t\t\t\t\t\teditableTagName: EditableView,\n\t\t\t\t\t} ) }\n\t\t\t\t<RCTAztecView\n\t\t\t\t\taccessibilityLabel={ accessibilityLabel }\n\t\t\t\t\tref={ ( ref ) => {\n\t\t\t\t\t\tthis._editor = ref;\n\n\t\t\t\t\t\tif ( this.props.nativeEditorRef ) {\n\t\t\t\t\t\t\tthis.props.nativeEditorRef( ref );\n\t\t\t\t\t\t}\n\t\t\t\t\t} }\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\tbackgroundColor: styles.richText.backgroundColor,\n\t\t\t\t\t\t...style,\n\t\t\t\t\t\t...( this.isIOS && minWidth && maxWidth\n\t\t\t\t\t\t\t? { width }\n\t\t\t\t\t\t\t: { maxWidth } ),\n\t\t\t\t\t\tminHeight: this.state.height,\n\t\t\t\t\t} }\n\t\t\t\t\tblockUseDefaultFont={ blockUseDefaultFont }\n\t\t\t\t\ttext={ {\n\t\t\t\t\t\ttext: html,\n\t\t\t\t\t\teventCount: this.lastEventCount,\n\t\t\t\t\t\tselection,\n\t\t\t\t\t\tlinkTextColor,\n\t\t\t\t\t\ttag: tagName,\n\t\t\t\t\t} }\n\t\t\t\t\tplaceholder={ this.props.placeholder }\n\t\t\t\t\tplaceholderTextColor={ this.getPlaceholderTextColor() }\n\t\t\t\t\tdeleteEnter={ this.props.deleteEnter }\n\t\t\t\t\tonChange={ this.onChangeFromAztec }\n\t\t\t\t\tonFocus={ this.onFocus }\n\t\t\t\t\tonBlur={ this.onBlur }\n\t\t\t\t\tonKeyDown={ this.onKeyDown }\n\t\t\t\t\ttriggerKeyCodes={\n\t\t\t\t\t\tdisableEditingMenu\n\t\t\t\t\t\t\t? []\n\t\t\t\t\t\t\t: this.suggestionOptions().map(\n\t\t\t\t\t\t\t\t\t( op ) => op.triggerChar\n\t\t\t\t\t\t\t )\n\t\t\t\t\t}\n\t\t\t\t\tonPaste={ this.onPaste }\n\t\t\t\t\tactiveFormats={ this.getActiveFormatNames( record ) }\n\t\t\t\t\tonContentSizeChange={ this.onContentSizeChange }\n\t\t\t\t\tonSelectionChange={ this.onSelectionChangeFromAztec }\n\t\t\t\t\tblockType={ { tag: tagName } }\n\t\t\t\t\tcolor={\n\t\t\t\t\t\t( style && style.color ) ||\n\t\t\t\t\t\t( parentBlockStyles && parentBlockStyles.color ) ||\n\t\t\t\t\t\t( baseGlobalStyles && baseGlobalStyles?.color?.text ) ||\n\t\t\t\t\t\tdefaultColor\n\t\t\t\t\t}\n\t\t\t\t\tmaxImagesWidth={ 200 }\n\t\t\t\t\tfontFamily={ this.props.fontFamily || defaultFontFamily }\n\t\t\t\t\tfontSize={ fontSize }\n\t\t\t\t\tlineHeight={ lineHeight }\n\t\t\t\t\tfontWeight={ this.props.fontWeight }\n\t\t\t\t\tfontStyle={ this.props.fontStyle }\n\t\t\t\t\tdisableEditingMenu={ disableEditingMenu }\n\t\t\t\t\tisMultiline={ false }\n\t\t\t\t\ttextAlign={ this.props.textAlign }\n\t\t\t\t\t{ ...( this.isIOS ? { maxWidth } : {} ) }\n\t\t\t\t\tminWidth={ minWidth }\n\t\t\t\t\tid={ this.props.id }\n\t\t\t\t\tselectionColor={ selectionColor }\n\t\t\t\t\tdisableAutocorrection={ this.props.disableAutocorrection }\n\t\t\t\t/>\n\t\t\t\t{ isSelected && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<FormatEdit\n\t\t\t\t\t\t\tforwardedRef={ this._editor }\n\t\t\t\t\t\t\tformatTypes={ formatTypes }\n\t\t\t\t\t\t\tvalue={ record }\n\t\t\t\t\t\t\tonChange={ this.onFormatChange }\n\t\t\t\t\t\t\tonFocus={ () => {} }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{ ! disableSuggestions && (\n\t\t\t\t\t\t\t<BlockFormatControls>\n\t\t\t\t\t\t\t\t<ToolbarButtonWithOptions\n\t\t\t\t\t\t\t\t\toptions={ this.suggestionOptions() }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</BlockFormatControls>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</View>\n\t\t);\n\t}\n}\n\nRichText.defaultProps = {\n\tformat: 'string',\n\tvalue: '',\n\ttagName: 'div',\n};\n\nconst withFormatTypes = ( WrappedComponent ) => ( props ) => {\n\tconst {\n\t\tclientId,\n\t\tidentifier,\n\t\twithoutInteractiveFormatting,\n\t\tallowedFormats,\n\t} = props;\n\tconst { formatTypes } = useFormatTypes( {\n\t\tclientId,\n\t\tidentifier,\n\t\twithoutInteractiveFormatting,\n\t\tallowedFormats,\n\t} );\n\n\treturn <WrappedComponent { ...props } formatTypes={ formatTypes } />;\n};\n\nexport default compose( [\n\twithSelect( ( select, { clientId } ) => {\n\t\tconst { getBlockParents, getBlock, getSettings } =\n\t\t\tselect( 'core/block-editor' );\n\t\tconst parents = getBlockParents( clientId, true );\n\t\tconst parentBlock = parents ? getBlock( parents[ 0 ] ) : undefined;\n\t\tconst parentBlockStyles = parentBlock?.attributes?.childrenStyles;\n\n\t\tconst settings = getSettings();\n\t\tconst baseGlobalStyles = settings?.__experimentalGlobalStylesBaseStyles;\n\n\t\tconst colorPalettes = settings?.__experimentalFeatures?.color?.palette;\n\t\tconst colorPalette = colorPalettes\n\t\t\t? flatColorPalettes( colorPalettes )\n\t\t\t: settings?.colors;\n\n\t\treturn {\n\t\t\tareMentionsSupported: settings?.capabilities?.mentions === true,\n\t\t\tareXPostsSupported: settings?.capabilities?.xposts === true,\n\t\t\tparentBlockStyles,\n\t\t\tbaseGlobalStyles,\n\t\t\tcolorPalette,\n\t\t};\n\t} ),\n\twithPreferredColorScheme,\n\twithFormatTypes,\n] )( RichText );\n"],"mappings":";;;;;;;AAKA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAKA,IAAAI,iBAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,kBAAA,GAAAL,OAAA;AAIA,IAAAM,YAAA,GAAAN,OAAA;AACA,IAAAO,WAAA,GAAAP,OAAA;AACA,IAAAQ,QAAA,GAAAR,OAAA;AACA,IAAAS,QAAA,GAAAT,OAAA;AAKA,IAAAU,KAAA,GAAAV,OAAA;AACA,IAAAW,OAAA,GAAAX,OAA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AAsB,EAAE7V,KAAK,EAAE8V,OAAO;EACtE,MAAM/R,YAAY,GAAG6R,aAAa,GAC/B3W,iBAAiB,CAAE2W,aAAc,CAAC,GAClCF,QAAQ,EAAEK,MAAM;EAEnB,OAAO;IACNvM,oBAAoB,EAAEkM,QAAQ,EAAEM,YAAY,EAAEC,QAAQ,KAAK,IAAI;IAC/DxM,kBAAkB,EAAEiM,QAAQ,EAAEM,YAAY,EAAEE,MAAM,KAAK,IAAI;IAC3D5E,iBAAiB;IACjB5R,gBAAgB;IAChBqE;EACD,CAAC;AACF,CAAE,CAAC,EACHoS,iCAAwB,EACxB1B,eAAe,CACd,CAAC,CAAEhU,QAAS,CAAC","ignoreList":[]}
@@ -4,10 +4,10 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- var _react = require("react");
8
7
  var _components = require("@wordpress/components");
9
8
  var _element = require("@wordpress/element");
10
9
  var _icons = require("@wordpress/icons");
10
+ var _jsxRuntime = require("react/jsx-runtime");
11
11
  /**
12
12
  * WordPress dependencies
13
13
  */
@@ -18,8 +18,7 @@ var _icons = require("@wordpress/icons");
18
18
  *
19
19
  * @param {Object} props Component props.
20
20
  * @param {Object} props.options Options to pick from.
21
- */
22
- function ToolbarButtonWithOptions({
21
+ */function ToolbarButtonWithOptions({
23
22
  options
24
23
  }) {
25
24
  const picker = (0, _element.useRef)();
@@ -39,19 +38,23 @@ function ToolbarButtonWithOptions({
39
38
  }
40
39
  const firstOption = options[0];
41
40
  const enablePicker = options.length > 1;
42
- return (0, _react.createElement)(_react.Fragment, null, (0, _react.createElement)(_components.ToolbarGroup, null, (0, _react.createElement)(_components.ToolbarButton, {
43
- title: firstOption.title,
44
- icon: (0, _react.createElement)(_icons.Icon, {
45
- icon: firstOption.icon
46
- }),
47
- onClick: firstOption.onClick,
48
- onLongPress: enablePicker ? presentPicker : undefined
49
- })), enablePicker && (0, _react.createElement)(_components.Picker, {
50
- ref: picker,
51
- options: options,
52
- onChange: onValueSelected,
53
- hideCancelButton: true
54
- }));
41
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
42
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.ToolbarGroup, {
43
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.ToolbarButton, {
44
+ title: firstOption.title,
45
+ icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.Icon, {
46
+ icon: firstOption.icon
47
+ }),
48
+ onClick: firstOption.onClick,
49
+ onLongPress: enablePicker ? presentPicker : undefined
50
+ })
51
+ }), enablePicker && /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Picker, {
52
+ ref: picker,
53
+ options: options,
54
+ onChange: onValueSelected,
55
+ hideCancelButton: true
56
+ })]
57
+ });
55
58
  }
56
59
  var _default = exports.default = ToolbarButtonWithOptions;
57
60
  //# sourceMappingURL=toolbar-button-with-options.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_components","require","_element","_icons","ToolbarButtonWithOptions","options","picker","useRef","presentPicker","current","onValueSelected","selectedValue","selectedOption","find","op","value","onClick","length","firstOption","enablePicker","_react","createElement","Fragment","ToolbarGroup","ToolbarButton","title","icon","Icon","onLongPress","undefined","Picker","ref","onChange","hideCancelButton","_default","exports","default"],"sources":["@wordpress/block-editor/src/components/rich-text/native/toolbar-button-with-options.native.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Picker, ToolbarGroup, ToolbarButton } from '@wordpress/components';\nimport { useRef } from '@wordpress/element';\nimport { Icon } from '@wordpress/icons';\n\n/**\n * Toolbar button component that, upon a long press, opens a Picker\n * to allow selecting from among multiple options.\n *\n * @param {Object} props Component props.\n * @param {Object} props.options Options to pick from.\n */\nfunction ToolbarButtonWithOptions( { options } ) {\n\tconst picker = useRef();\n\n\tfunction presentPicker() {\n\t\tif ( picker.current ) {\n\t\t\tpicker.current.presentPicker();\n\t\t}\n\t}\n\n\tfunction onValueSelected( selectedValue ) {\n\t\tconst selectedOption = options.find(\n\t\t\t( op ) => op.value === selectedValue\n\t\t);\n\t\tif ( selectedOption ) {\n\t\t\tselectedOption.onClick();\n\t\t}\n\t}\n\n\tif ( ! options || options.length === 0 ) {\n\t\treturn null;\n\t}\n\tconst firstOption = options[ 0 ];\n\tconst enablePicker = options.length > 1;\n\n\treturn (\n\t\t<>\n\t\t\t<ToolbarGroup>\n\t\t\t\t<ToolbarButton\n\t\t\t\t\ttitle={ firstOption.title }\n\t\t\t\t\ticon={ <Icon icon={ firstOption.icon } /> }\n\t\t\t\t\tonClick={ firstOption.onClick }\n\t\t\t\t\tonLongPress={ enablePicker ? presentPicker : undefined }\n\t\t\t\t/>\n\t\t\t</ToolbarGroup>\n\t\t\t{ enablePicker && (\n\t\t\t\t<Picker\n\t\t\t\t\tref={ picker }\n\t\t\t\t\toptions={ options }\n\t\t\t\t\tonChange={ onValueSelected }\n\t\t\t\t\thideCancelButton\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default ToolbarButtonWithOptions;\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AALA;AACA;AACA;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASG,wBAAwBA,CAAE;EAAEC;AAAQ,CAAC,EAAG;EAChD,MAAMC,MAAM,GAAG,IAAAC,eAAM,EAAC,CAAC;EAEvB,SAASC,aAAaA,CAAA,EAAG;IACxB,IAAKF,MAAM,CAACG,OAAO,EAAG;MACrBH,MAAM,CAACG,OAAO,CAACD,aAAa,CAAC,CAAC;IAC/B;EACD;EAEA,SAASE,eAAeA,CAAEC,aAAa,EAAG;IACzC,MAAMC,cAAc,GAAGP,OAAO,CAACQ,IAAI,CAChCC,EAAE,IAAMA,EAAE,CAACC,KAAK,KAAKJ,aACxB,CAAC;IACD,IAAKC,cAAc,EAAG;MACrBA,cAAc,CAACI,OAAO,CAAC,CAAC;IACzB;EACD;EAEA,IAAK,CAAEX,OAAO,IAAIA,OAAO,CAACY,MAAM,KAAK,CAAC,EAAG;IACxC,OAAO,IAAI;EACZ;EACA,MAAMC,WAAW,GAAGb,OAAO,CAAE,CAAC,CAAE;EAChC,MAAMc,YAAY,GAAGd,OAAO,CAACY,MAAM,GAAG,CAAC;EAEvC,OACC,IAAAG,MAAA,CAAAC,aAAA,EAAAD,MAAA,CAAAE,QAAA,QACC,IAAAF,MAAA,CAAAC,aAAA,EAACrB,WAAA,CAAAuB,YAAY,QACZ,IAAAH,MAAA,CAAAC,aAAA,EAACrB,WAAA,CAAAwB,aAAa;IACbC,KAAK,EAAGP,WAAW,CAACO,KAAO;IAC3BC,IAAI,EAAG,IAAAN,MAAA,CAAAC,aAAA,EAAClB,MAAA,CAAAwB,IAAI;MAACD,IAAI,EAAGR,WAAW,CAACQ;IAAM,CAAE,CAAG;IAC3CV,OAAO,EAAGE,WAAW,CAACF,OAAS;IAC/BY,WAAW,EAAGT,YAAY,GAAGX,aAAa,GAAGqB;EAAW,CACxD,CACY,CAAC,EACbV,YAAY,IACb,IAAAC,MAAA,CAAAC,aAAA,EAACrB,WAAA,CAAA8B,MAAM;IACNC,GAAG,EAAGzB,MAAQ;IACdD,OAAO,EAAGA,OAAS;IACnB2B,QAAQ,EAAGtB,eAAiB;IAC5BuB,gBAAgB;EAAA,CAChB,CAED,CAAC;AAEL;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEchC,wBAAwB","ignoreList":[]}
1
+ {"version":3,"names":["_components","require","_element","_icons","_jsxRuntime","ToolbarButtonWithOptions","options","picker","useRef","presentPicker","current","onValueSelected","selectedValue","selectedOption","find","op","value","onClick","length","firstOption","enablePicker","jsxs","Fragment","children","jsx","ToolbarGroup","ToolbarButton","title","icon","Icon","onLongPress","undefined","Picker","ref","onChange","hideCancelButton","_default","exports","default"],"sources":["@wordpress/block-editor/src/components/rich-text/native/toolbar-button-with-options.native.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Picker, ToolbarGroup, ToolbarButton } from '@wordpress/components';\nimport { useRef } from '@wordpress/element';\nimport { Icon } from '@wordpress/icons';\n\n/**\n * Toolbar button component that, upon a long press, opens a Picker\n * to allow selecting from among multiple options.\n *\n * @param {Object} props Component props.\n * @param {Object} props.options Options to pick from.\n */\nfunction ToolbarButtonWithOptions( { options } ) {\n\tconst picker = useRef();\n\n\tfunction presentPicker() {\n\t\tif ( picker.current ) {\n\t\t\tpicker.current.presentPicker();\n\t\t}\n\t}\n\n\tfunction onValueSelected( selectedValue ) {\n\t\tconst selectedOption = options.find(\n\t\t\t( op ) => op.value === selectedValue\n\t\t);\n\t\tif ( selectedOption ) {\n\t\t\tselectedOption.onClick();\n\t\t}\n\t}\n\n\tif ( ! options || options.length === 0 ) {\n\t\treturn null;\n\t}\n\tconst firstOption = options[ 0 ];\n\tconst enablePicker = options.length > 1;\n\n\treturn (\n\t\t<>\n\t\t\t<ToolbarGroup>\n\t\t\t\t<ToolbarButton\n\t\t\t\t\ttitle={ firstOption.title }\n\t\t\t\t\ticon={ <Icon icon={ firstOption.icon } /> }\n\t\t\t\t\tonClick={ firstOption.onClick }\n\t\t\t\t\tonLongPress={ enablePicker ? presentPicker : undefined }\n\t\t\t\t/>\n\t\t\t</ToolbarGroup>\n\t\t\t{ enablePicker && (\n\t\t\t\t<Picker\n\t\t\t\t\tref={ picker }\n\t\t\t\t\toptions={ options }\n\t\t\t\t\tonChange={ onValueSelected }\n\t\t\t\t\thideCancelButton\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default ToolbarButtonWithOptions;\n"],"mappings":";;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAAwC,IAAAG,WAAA,GAAAH,OAAA;AALxC;AACA;AACA;;AAKA;AACA;AACA;AACA;AAC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C,MAAM;MACNC,GAAG,EAAG1B,MAAQ;MACdD,OAAO,EAAGA,OAAS;MACnB4B,QAAQ,EAAGvB,eAAiB;MAC5BwB,gBAAgB;IAAA,CAChB,CACD;EAAA,CACA,CAAC;AAEL;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEcjC,wBAAwB","ignoreList":[]}
@@ -4,9 +4,9 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.RichTextToolbarButton = RichTextToolbarButton;
7
- var _react = require("react");
8
7
  var _components = require("@wordpress/components");
9
8
  var _keycodes = require("@wordpress/keycodes");
9
+ var _jsxRuntime = require("react/jsx-runtime");
10
10
  /**
11
11
  * WordPress dependencies
12
12
  */
@@ -25,11 +25,12 @@ function RichTextToolbarButton({
25
25
  if (shortcutType && shortcutCharacter) {
26
26
  shortcut = _keycodes.displayShortcut[shortcutType](shortcutCharacter);
27
27
  }
28
- return (0, _react.createElement)(_components.Fill, {
29
- name: fillName
30
- }, (0, _react.createElement)(_components.ToolbarButton, {
31
- ...props,
32
- shortcut: shortcut
33
- }));
28
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Fill, {
29
+ name: fillName,
30
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.ToolbarButton, {
31
+ ...props,
32
+ shortcut: shortcut
33
+ })
34
+ });
34
35
  }
35
36
  //# sourceMappingURL=toolbar-button.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_components","require","_keycodes","RichTextToolbarButton","name","shortcutType","shortcutCharacter","props","shortcut","fillName","displayShortcut","_react","createElement","Fill","ToolbarButton"],"sources":["@wordpress/block-editor/src/components/rich-text/toolbar-button.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Fill, ToolbarButton } from '@wordpress/components';\nimport { displayShortcut } from '@wordpress/keycodes';\n\nexport function RichTextToolbarButton( {\n\tname,\n\tshortcutType,\n\tshortcutCharacter,\n\t...props\n} ) {\n\tlet shortcut;\n\tlet fillName = 'RichText.ToolbarControls';\n\n\tif ( name ) {\n\t\tfillName += `.${ name }`;\n\t}\n\n\tif ( shortcutType && shortcutCharacter ) {\n\t\tshortcut = displayShortcut[ shortcutType ]( shortcutCharacter );\n\t}\n\n\treturn (\n\t\t<Fill name={ fillName }>\n\t\t\t<ToolbarButton { ...props } shortcut={ shortcut } />\n\t\t</Fill>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AAJA;AACA;AACA;;AAIO,SAASE,qBAAqBA,CAAE;EACtCC,IAAI;EACJC,YAAY;EACZC,iBAAiB;EACjB,GAAGC;AACJ,CAAC,EAAG;EACH,IAAIC,QAAQ;EACZ,IAAIC,QAAQ,GAAG,0BAA0B;EAEzC,IAAKL,IAAI,EAAG;IACXK,QAAQ,IAAK,IAAIL,IAAM,EAAC;EACzB;EAEA,IAAKC,YAAY,IAAIC,iBAAiB,EAAG;IACxCE,QAAQ,GAAGE,yBAAe,CAAEL,YAAY,CAAE,CAAEC,iBAAkB,CAAC;EAChE;EAEA,OACC,IAAAK,MAAA,CAAAC,aAAA,EAACZ,WAAA,CAAAa,IAAI;IAACT,IAAI,EAAGK;EAAU,GACtB,IAAAE,MAAA,CAAAC,aAAA,EAACZ,WAAA,CAAAc,aAAa;IAAA,GAAMP,KAAK;IAAGC,QAAQ,EAAGA;EAAU,CAAE,CAC9C,CAAC;AAET","ignoreList":[]}
1
+ {"version":3,"names":["_components","require","_keycodes","_jsxRuntime","RichTextToolbarButton","name","shortcutType","shortcutCharacter","props","shortcut","fillName","displayShortcut","jsx","Fill","children","ToolbarButton"],"sources":["@wordpress/block-editor/src/components/rich-text/toolbar-button.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Fill, ToolbarButton } from '@wordpress/components';\nimport { displayShortcut } from '@wordpress/keycodes';\n\nexport function RichTextToolbarButton( {\n\tname,\n\tshortcutType,\n\tshortcutCharacter,\n\t...props\n} ) {\n\tlet shortcut;\n\tlet fillName = 'RichText.ToolbarControls';\n\n\tif ( name ) {\n\t\tfillName += `.${ name }`;\n\t}\n\n\tif ( shortcutType && shortcutCharacter ) {\n\t\tshortcut = displayShortcut[ shortcutType ]( shortcutCharacter );\n\t}\n\n\treturn (\n\t\t<Fill name={ fillName }>\n\t\t\t<ToolbarButton { ...props } shortcut={ shortcut } />\n\t\t</Fill>\n\t);\n}\n"],"mappings":";;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AAAsD,IAAAE,WAAA,GAAAF,OAAA;AAJtD;AACA;AACA;;AAIO,SAASG,qBAAqBA,CAAE;EACtCC,IAAI;EACJC,YAAY;EACZC,iBAAiB;EACjB,GAAGC;AACJ,CAAC,EAAG;EACH,IAAIC,QAAQ;EACZ,IAAIC,QAAQ,GAAG,0BAA0B;EAEzC,IAAKL,IAAI,EAAG;IACXK,QAAQ,IAAK,IAAIL,IAAM,EAAC;EACzB;EAEA,IAAKC,YAAY,IAAIC,iBAAiB,EAAG;IACxCE,QAAQ,GAAGE,yBAAe,CAAEL,YAAY,CAAE,CAAEC,iBAAkB,CAAC;EAChE;EAEA,oBACC,IAAAJ,WAAA,CAAAS,GAAA,EAACZ,WAAA,CAAAa,IAAI;IAACR,IAAI,EAAGK,QAAU;IAAAI,QAAA,eACtB,IAAAX,WAAA,CAAAS,GAAA,EAACZ,WAAA,CAAAe,aAAa;MAAA,GAAMP,KAAK;MAAGC,QAAQ,EAAGA;IAAU,CAAE;EAAC,CAC/C,CAAC;AAET","ignoreList":[]}
@@ -7,9 +7,9 @@ exports.addActiveFormats = addActiveFormats;
7
7
  exports.createLinkInParagraph = createLinkInParagraph;
8
8
  exports.getAllowedFormats = getAllowedFormats;
9
9
  exports.getMultilineTag = getMultilineTag;
10
- var _react = require("react");
11
10
  var _element = require("@wordpress/element");
12
11
  var _blocks = require("@wordpress/blocks");
12
+ var _jsxRuntime = require("react/jsx-runtime");
13
13
  /**
14
14
  * WordPress dependencies
15
15
  */
@@ -55,9 +55,10 @@ getAllowedFormats.EMPTY_ARRAY = [];
55
55
  * @param {Function} onReplace Function to call with the created fallback block.
56
56
  */
57
57
  function createLinkInParagraph(url, onReplace) {
58
- const link = (0, _react.createElement)("a", {
59
- href: url
60
- }, url);
58
+ const link = /*#__PURE__*/(0, _jsxRuntime.jsx)("a", {
59
+ href: url,
60
+ children: url
61
+ });
61
62
  onReplace((0, _blocks.createBlock)('core/paragraph', {
62
63
  content: (0, _element.renderToString)(link)
63
64
  }));
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_blocks","addActiveFormats","value","activeFormats","length","index","formats","getMultilineTag","multiline","getAllowedFormats","allowedFormats","disableFormats","EMPTY_ARRAY","createLinkInParagraph","url","onReplace","link","_react","createElement","href","createBlock","content","renderToString"],"sources":["@wordpress/block-editor/src/components/rich-text/utils.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { renderToString } from '@wordpress/element';\nimport { createBlock } from '@wordpress/blocks';\n\nexport function addActiveFormats( value, activeFormats ) {\n\tif ( activeFormats?.length ) {\n\t\tlet index = value.formats.length;\n\n\t\twhile ( index-- ) {\n\t\t\tvalue.formats[ index ] = [\n\t\t\t\t...activeFormats,\n\t\t\t\t...( value.formats[ index ] || [] ),\n\t\t\t];\n\t\t}\n\t}\n}\n\n/**\n * Get the multiline tag based on the multiline prop.\n *\n * @param {?(string|boolean)} multiline The multiline prop.\n *\n * @return {string | undefined} The multiline tag.\n */\nexport function getMultilineTag( multiline ) {\n\tif ( multiline !== true && multiline !== 'p' && multiline !== 'li' ) {\n\t\treturn;\n\t}\n\n\treturn multiline === true ? 'p' : multiline;\n}\n\nexport function getAllowedFormats( { allowedFormats, disableFormats } ) {\n\tif ( disableFormats ) {\n\t\treturn getAllowedFormats.EMPTY_ARRAY;\n\t}\n\n\treturn allowedFormats;\n}\n\ngetAllowedFormats.EMPTY_ARRAY = [];\n\n/**\n * Creates a link from pasted URL.\n * Creates a paragraph block containing a link to the URL, and calls `onReplace`.\n *\n * @param {string} url The URL that could not be embedded.\n * @param {Function} onReplace Function to call with the created fallback block.\n */\nexport function createLinkInParagraph( url, onReplace ) {\n\tconst link = <a href={ url }>{ url }</a>;\n\tonReplace(\n\t\tcreateBlock( 'core/paragraph', { content: renderToString( link ) } )\n\t);\n}\n"],"mappings":";;;;;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAJA;AACA;AACA;;AAIO,SAASE,gBAAgBA,CAAEC,KAAK,EAAEC,aAAa,EAAG;EACxD,IAAKA,aAAa,EAAEC,MAAM,EAAG;IAC5B,IAAIC,KAAK,GAAGH,KAAK,CAACI,OAAO,CAACF,MAAM;IAEhC,OAAQC,KAAK,EAAE,EAAG;MACjBH,KAAK,CAACI,OAAO,CAAED,KAAK,CAAE,GAAG,CACxB,GAAGF,aAAa,EAChB,IAAKD,KAAK,CAACI,OAAO,CAAED,KAAK,CAAE,IAAI,EAAE,CAAE,CACnC;IACF;EACD;AACD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASE,eAAeA,CAAEC,SAAS,EAAG;EAC5C,IAAKA,SAAS,KAAK,IAAI,IAAIA,SAAS,KAAK,GAAG,IAAIA,SAAS,KAAK,IAAI,EAAG;IACpE;EACD;EAEA,OAAOA,SAAS,KAAK,IAAI,GAAG,GAAG,GAAGA,SAAS;AAC5C;AAEO,SAASC,iBAAiBA,CAAE;EAAEC,cAAc;EAAEC;AAAe,CAAC,EAAG;EACvE,IAAKA,cAAc,EAAG;IACrB,OAAOF,iBAAiB,CAACG,WAAW;EACrC;EAEA,OAAOF,cAAc;AACtB;AAEAD,iBAAiB,CAACG,WAAW,GAAG,EAAE;;AAElC;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,qBAAqBA,CAAEC,GAAG,EAAEC,SAAS,EAAG;EACvD,MAAMC,IAAI,GAAG,IAAAC,MAAA,CAAAC,aAAA;IAAGC,IAAI,EAAGL;EAAK,GAAGA,GAAQ,CAAC;EACxCC,SAAS,CACR,IAAAK,mBAAW,EAAE,gBAAgB,EAAE;IAAEC,OAAO,EAAE,IAAAC,uBAAc,EAAEN,IAAK;EAAE,CAAE,CACpE,CAAC;AACF","ignoreList":[]}
1
+ {"version":3,"names":["_element","require","_blocks","_jsxRuntime","addActiveFormats","value","activeFormats","length","index","formats","getMultilineTag","multiline","getAllowedFormats","allowedFormats","disableFormats","EMPTY_ARRAY","createLinkInParagraph","url","onReplace","link","jsx","href","children","createBlock","content","renderToString"],"sources":["@wordpress/block-editor/src/components/rich-text/utils.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { renderToString } from '@wordpress/element';\nimport { createBlock } from '@wordpress/blocks';\n\nexport function addActiveFormats( value, activeFormats ) {\n\tif ( activeFormats?.length ) {\n\t\tlet index = value.formats.length;\n\n\t\twhile ( index-- ) {\n\t\t\tvalue.formats[ index ] = [\n\t\t\t\t...activeFormats,\n\t\t\t\t...( value.formats[ index ] || [] ),\n\t\t\t];\n\t\t}\n\t}\n}\n\n/**\n * Get the multiline tag based on the multiline prop.\n *\n * @param {?(string|boolean)} multiline The multiline prop.\n *\n * @return {string | undefined} The multiline tag.\n */\nexport function getMultilineTag( multiline ) {\n\tif ( multiline !== true && multiline !== 'p' && multiline !== 'li' ) {\n\t\treturn;\n\t}\n\n\treturn multiline === true ? 'p' : multiline;\n}\n\nexport function getAllowedFormats( { allowedFormats, disableFormats } ) {\n\tif ( disableFormats ) {\n\t\treturn getAllowedFormats.EMPTY_ARRAY;\n\t}\n\n\treturn allowedFormats;\n}\n\ngetAllowedFormats.EMPTY_ARRAY = [];\n\n/**\n * Creates a link from pasted URL.\n * Creates a paragraph block containing a link to the URL, and calls `onReplace`.\n *\n * @param {string} url The URL that could not be embedded.\n * @param {Function} onReplace Function to call with the created fallback block.\n */\nexport function createLinkInParagraph( url, onReplace ) {\n\tconst link = <a href={ url }>{ url }</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