@wordpress/block-editor 14.11.0 → 14.13.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 (972) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/build/autocompleters/block.js +0 -1
  3. package/build/autocompleters/block.js.map +1 -1
  4. package/build/autocompleters/link.js +0 -1
  5. package/build/autocompleters/link.js.map +1 -1
  6. package/build/components/alignment-control/ui.js +0 -1
  7. package/build/components/alignment-control/ui.js.map +1 -1
  8. package/build/components/autocomplete/index.js +0 -1
  9. package/build/components/autocomplete/index.js.map +1 -1
  10. package/build/components/background-image-control/index.js +0 -1
  11. package/build/components/background-image-control/index.js.map +1 -1
  12. package/build/components/block-actions/index.js +0 -1
  13. package/build/components/block-actions/index.js.map +1 -1
  14. package/build/components/block-alignment-control/ui.js +0 -1
  15. package/build/components/block-alignment-control/ui.js.map +1 -1
  16. package/build/components/block-alignment-control/ui.native.js +0 -1
  17. package/build/components/block-alignment-control/ui.native.js.map +1 -1
  18. package/build/components/block-alignment-control/use-available-alignments.js +0 -1
  19. package/build/components/block-alignment-control/use-available-alignments.js.map +1 -1
  20. package/build/components/block-breadcrumb/index.js +0 -1
  21. package/build/components/block-breadcrumb/index.js.map +1 -1
  22. package/build/components/block-compare/index.js +0 -1
  23. package/build/components/block-compare/index.js.map +1 -1
  24. package/build/components/block-controls/fill.js +0 -1
  25. package/build/components/block-controls/fill.js.map +1 -1
  26. package/build/components/block-edit/edit.js +0 -1
  27. package/build/components/block-edit/edit.js.map +1 -1
  28. package/build/components/block-edit/edit.native.js +0 -1
  29. package/build/components/block-edit/edit.native.js.map +1 -1
  30. package/build/components/block-heading-level-dropdown/index.js +0 -1
  31. package/build/components/block-heading-level-dropdown/index.js.map +1 -1
  32. package/build/components/block-heading-level-dropdown/index.native.js +0 -1
  33. package/build/components/block-heading-level-dropdown/index.native.js.map +1 -1
  34. package/build/components/block-inspector/index.js +0 -1
  35. package/build/components/block-inspector/index.js.map +1 -1
  36. package/build/components/block-list/block-invalid-warning.js +0 -1
  37. package/build/components/block-list/block-invalid-warning.js.map +1 -1
  38. package/build/components/block-list/block-list-context.native.js +0 -1
  39. package/build/components/block-list/block-list-context.native.js.map +1 -1
  40. package/build/components/block-list/block.js +0 -1
  41. package/build/components/block-list/block.js.map +1 -1
  42. package/build/components/block-list/block.native.js +0 -1
  43. package/build/components/block-list/block.native.js.map +1 -1
  44. package/build/components/block-list/index.js +9 -6
  45. package/build/components/block-list/index.js.map +1 -1
  46. package/build/components/block-list/index.native.js +0 -1
  47. package/build/components/block-list/index.native.js.map +1 -1
  48. package/build/components/block-list/use-block-props/use-focus-first-element.js +0 -1
  49. package/build/components/block-list/use-block-props/use-focus-first-element.js.map +1 -1
  50. package/build/components/block-list/use-in-between-inserter.js +0 -1
  51. package/build/components/block-list/use-in-between-inserter.js.map +1 -1
  52. package/build/components/block-lock/modal.js +0 -1
  53. package/build/components/block-lock/modal.js.map +1 -1
  54. package/build/components/block-manager/category.js +0 -1
  55. package/build/components/block-manager/category.js.map +1 -1
  56. package/build/components/block-manager/checklist.js +0 -1
  57. package/build/components/block-manager/checklist.js.map +1 -1
  58. package/build/components/block-manager/index.js +0 -1
  59. package/build/components/block-manager/index.js.map +1 -1
  60. package/build/components/block-media-update-progress/index.native.js +0 -1
  61. package/build/components/block-media-update-progress/index.native.js.map +1 -1
  62. package/build/components/block-mover/index.native.js +0 -1
  63. package/build/components/block-mover/index.native.js.map +1 -1
  64. package/build/components/block-mover/mover-description.native.js +0 -1
  65. package/build/components/block-mover/mover-description.native.js.map +1 -1
  66. package/build/components/block-pattern-setup/index.js +0 -1
  67. package/build/components/block-pattern-setup/index.js.map +1 -1
  68. package/build/components/block-pattern-setup/use-patterns-setup.js +0 -1
  69. package/build/components/block-pattern-setup/use-patterns-setup.js.map +1 -1
  70. package/build/components/block-patterns-list/index.js +0 -1
  71. package/build/components/block-patterns-list/index.js.map +1 -1
  72. package/build/components/block-popover/use-popover-scroll.js +13 -7
  73. package/build/components/block-popover/use-popover-scroll.js.map +1 -1
  74. package/build/components/block-quick-navigation/index.js +0 -1
  75. package/build/components/block-quick-navigation/index.js.map +1 -1
  76. package/build/components/block-rename/modal.js +0 -1
  77. package/build/components/block-rename/modal.js.map +1 -1
  78. package/build/components/block-settings-menu/block-settings-dropdown.js +0 -1
  79. package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  80. package/build/components/block-styles/index.js +0 -1
  81. package/build/components/block-styles/index.js.map +1 -1
  82. package/build/components/block-styles/index.native.js +0 -1
  83. package/build/components/block-styles/index.native.js.map +1 -1
  84. package/build/components/block-styles/menu-items.js +0 -1
  85. package/build/components/block-styles/menu-items.js.map +1 -1
  86. package/build/components/block-styles/preview.native.js +0 -1
  87. package/build/components/block-styles/preview.native.js.map +1 -1
  88. package/build/components/block-switcher/block-transformations-menu.js +0 -1
  89. package/build/components/block-switcher/block-transformations-menu.js.map +1 -1
  90. package/build/components/block-switcher/block-transformations-menu.native.js +0 -1
  91. package/build/components/block-switcher/block-transformations-menu.native.js.map +1 -1
  92. package/build/components/block-switcher/block-variation-transformations.js +0 -1
  93. package/build/components/block-switcher/block-variation-transformations.js.map +1 -1
  94. package/build/components/block-switcher/index.js +0 -1
  95. package/build/components/block-switcher/index.js.map +1 -1
  96. package/build/components/block-switcher/pattern-transformations-menu.js +0 -1
  97. package/build/components/block-switcher/pattern-transformations-menu.js.map +1 -1
  98. package/build/components/block-switcher/use-transformed-patterns.js +0 -1
  99. package/build/components/block-switcher/use-transformed-patterns.js.map +1 -1
  100. package/build/components/block-switcher/utils.js +0 -1
  101. package/build/components/block-switcher/utils.js.map +1 -1
  102. package/build/components/block-toolbar/block-toolbar-menu.native.js +0 -1
  103. package/build/components/block-toolbar/block-toolbar-menu.native.js.map +1 -1
  104. package/build/components/block-toolbar/change-design.js +0 -1
  105. package/build/components/block-toolbar/change-design.js.map +1 -1
  106. package/build/components/block-toolbar/index.js +0 -1
  107. package/build/components/block-toolbar/index.js.map +1 -1
  108. package/build/components/block-tools/block-toolbar-popover.js +3 -2
  109. package/build/components/block-tools/block-toolbar-popover.js.map +1 -1
  110. package/build/components/block-tools/use-selected-block-tool-props.js +0 -1
  111. package/build/components/block-tools/use-selected-block-tool-props.js.map +1 -1
  112. package/build/components/block-types-list/index.js +0 -1
  113. package/build/components/block-types-list/index.js.map +1 -1
  114. package/build/components/block-variation-picker/index.js +0 -1
  115. package/build/components/block-variation-picker/index.js.map +1 -1
  116. package/build/components/block-variation-picker/index.native.js +0 -1
  117. package/build/components/block-variation-picker/index.native.js.map +1 -1
  118. package/build/components/block-variation-transforms/index.js +0 -1
  119. package/build/components/block-variation-transforms/index.js.map +1 -1
  120. package/build/components/block-vertical-alignment-control/ui.js +0 -1
  121. package/build/components/block-vertical-alignment-control/ui.js.map +1 -1
  122. package/build/components/border-radius-control/index.js +0 -1
  123. package/build/components/border-radius-control/index.js.map +1 -1
  124. package/build/components/border-radius-control/input-controls.js +0 -1
  125. package/build/components/border-radius-control/input-controls.js.map +1 -1
  126. package/build/components/border-radius-control/utils.js +0 -1
  127. package/build/components/border-radius-control/utils.js.map +1 -1
  128. package/build/components/colors/utils.js +0 -1
  129. package/build/components/colors/utils.js.map +1 -1
  130. package/build/components/colors/with-colors.js +0 -1
  131. package/build/components/colors/with-colors.js.map +1 -1
  132. package/build/components/colors-gradients/dropdown.js +0 -1
  133. package/build/components/colors-gradients/dropdown.js.map +1 -1
  134. package/build/components/colors-gradients/panel-color-gradient-settings.js +0 -1
  135. package/build/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
  136. package/build/components/colors-gradients/panel-color-gradient-settings.native.js +0 -1
  137. package/build/components/colors-gradients/panel-color-gradient-settings.native.js.map +1 -1
  138. package/build/components/convert-to-group-buttons/toolbar.js +0 -1
  139. package/build/components/convert-to-group-buttons/toolbar.js.map +1 -1
  140. package/build/components/date-format-picker/index.js +0 -1
  141. package/build/components/date-format-picker/index.js.map +1 -1
  142. package/build/components/dimensions-tool/scale-tool.js +0 -1
  143. package/build/components/dimensions-tool/scale-tool.js.map +1 -1
  144. package/build/components/duotone/utils.js +0 -1
  145. package/build/components/duotone/utils.js.map +1 -1
  146. package/build/components/editor-styles/index.js +0 -1
  147. package/build/components/editor-styles/index.js.map +1 -1
  148. package/build/components/font-appearance-control/index.js +0 -1
  149. package/build/components/font-appearance-control/index.js.map +1 -1
  150. package/build/components/font-family/index.js +0 -1
  151. package/build/components/font-family/index.js.map +1 -1
  152. package/build/components/font-sizes/with-font-sizes.js +0 -1
  153. package/build/components/font-sizes/with-font-sizes.js.map +1 -1
  154. package/build/components/global-styles/border-panel.js +0 -1
  155. package/build/components/global-styles/border-panel.js.map +1 -1
  156. package/build/components/global-styles/color-panel.js +0 -1
  157. package/build/components/global-styles/color-panel.js.map +1 -1
  158. package/build/components/global-styles/color-panel.native.js +0 -1
  159. package/build/components/global-styles/color-panel.native.js.map +1 -1
  160. package/build/components/global-styles/dimensions-panel.js +0 -1
  161. package/build/components/global-styles/dimensions-panel.js.map +1 -1
  162. package/build/components/global-styles/filters-panel.js +42 -25
  163. package/build/components/global-styles/filters-panel.js.map +1 -1
  164. package/build/components/global-styles/get-global-styles-changes.js +0 -1
  165. package/build/components/global-styles/get-global-styles-changes.js.map +1 -1
  166. package/build/components/global-styles/shadow-panel-components.js +41 -17
  167. package/build/components/global-styles/shadow-panel-components.js.map +1 -1
  168. package/build/components/global-styles/typography-utils.js +0 -1
  169. package/build/components/global-styles/typography-utils.js.map +1 -1
  170. package/build/components/global-styles/use-global-styles-context.native.js +0 -1
  171. package/build/components/global-styles/use-global-styles-context.native.js.map +1 -1
  172. package/build/components/global-styles/use-global-styles-output.js +0 -1
  173. package/build/components/global-styles/use-global-styles-output.js.map +1 -1
  174. package/build/components/global-styles/utils.js +0 -1
  175. package/build/components/global-styles/utils.js.map +1 -1
  176. package/build/components/grid/grid-visualizer.js +11 -20
  177. package/build/components/grid/grid-visualizer.js.map +1 -1
  178. package/build/components/grid/use-grid-layout-sync.js +0 -1
  179. package/build/components/grid/use-grid-layout-sync.js.map +1 -1
  180. package/build/components/grid/utils.js +6 -5
  181. package/build/components/grid/utils.js.map +1 -1
  182. package/build/components/iframe/get-compatibility-styles.js +0 -1
  183. package/build/components/iframe/get-compatibility-styles.js.map +1 -1
  184. package/build/components/image-editor/aspect-ratio-dropdown.js +1 -2
  185. package/build/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
  186. package/build/components/inner-blocks/index.js +2 -2
  187. package/build/components/inner-blocks/index.js.map +1 -1
  188. package/build/components/inner-blocks/index.native.js +2 -2
  189. package/build/components/inner-blocks/index.native.js.map +1 -1
  190. package/build/components/inner-blocks/use-block-context.js +0 -1
  191. package/build/components/inner-blocks/use-block-context.js.map +1 -1
  192. package/build/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js +0 -1
  193. package/build/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js.map +1 -1
  194. package/build/components/inserter/block-patterns-explorer/pattern-list.js +0 -1
  195. package/build/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
  196. package/build/components/inserter/block-patterns-tab/pattern-category-previews.js +0 -1
  197. package/build/components/inserter/block-patterns-tab/pattern-category-previews.js.map +1 -1
  198. package/build/components/inserter/block-patterns-tab/use-pattern-categories.js +0 -1
  199. package/build/components/inserter/block-patterns-tab/use-pattern-categories.js.map +1 -1
  200. package/build/components/inserter/block-types-tab.js +0 -1
  201. package/build/components/inserter/block-types-tab.js.map +1 -1
  202. package/build/components/inserter/block-types-tab.native.js +0 -1
  203. package/build/components/inserter/block-types-tab.native.js.map +1 -1
  204. package/build/components/inserter/category-tabs/index.js +0 -1
  205. package/build/components/inserter/category-tabs/index.js.map +1 -1
  206. package/build/components/inserter/hooks/use-block-type-impressions.native.js +0 -1
  207. package/build/components/inserter/hooks/use-block-type-impressions.native.js.map +1 -1
  208. package/build/components/inserter/hooks/use-patterns-state.js +0 -1
  209. package/build/components/inserter/hooks/use-patterns-state.js.map +1 -1
  210. package/build/components/inserter/index.js +0 -1
  211. package/build/components/inserter/index.js.map +1 -1
  212. package/build/components/inserter/index.native.js +0 -1
  213. package/build/components/inserter/index.native.js.map +1 -1
  214. package/build/components/inserter/media-tab/hooks.js +0 -1
  215. package/build/components/inserter/media-tab/hooks.js.map +1 -1
  216. package/build/components/inserter/media-tab/media-list.js +0 -1
  217. package/build/components/inserter/media-tab/media-list.js.map +1 -1
  218. package/build/components/inserter/media-tab/media-tab.js +0 -1
  219. package/build/components/inserter/media-tab/media-tab.js.map +1 -1
  220. package/build/components/inserter/menu.js +13 -2
  221. package/build/components/inserter/menu.js.map +1 -1
  222. package/build/components/inserter/mobile-tab-navigation.js +0 -1
  223. package/build/components/inserter/mobile-tab-navigation.js.map +1 -1
  224. package/build/components/inserter/no-results.js +3 -7
  225. package/build/components/inserter/no-results.js.map +1 -1
  226. package/build/components/inserter/quick-inserter.js +2 -1
  227. package/build/components/inserter/quick-inserter.js.map +1 -1
  228. package/build/components/inserter/search-items.js +0 -1
  229. package/build/components/inserter/search-items.js.map +1 -1
  230. package/build/components/inserter/search-results.js +1 -2
  231. package/build/components/inserter/search-results.js.map +1 -1
  232. package/build/components/inserter/tabs.native.js +0 -1
  233. package/build/components/inserter/tabs.native.js.map +1 -1
  234. package/build/components/inserter/utils.native.js +0 -1
  235. package/build/components/inserter/utils.native.js.map +1 -1
  236. package/build/components/inspector-controls/block-support-tools-panel.js +0 -1
  237. package/build/components/inspector-controls/block-support-tools-panel.js.map +1 -1
  238. package/build/components/inspector-controls/fill.js +0 -1
  239. package/build/components/inspector-controls/fill.js.map +1 -1
  240. package/build/components/inspector-controls-tabs/index.js +0 -1
  241. package/build/components/inspector-controls-tabs/index.js.map +1 -1
  242. package/build/components/inspector-controls-tabs/position-controls-panel.js +49 -21
  243. package/build/components/inspector-controls-tabs/position-controls-panel.js.map +1 -1
  244. package/build/components/inspector-popover-header/index.js +0 -1
  245. package/build/components/inspector-popover-header/index.js.map +1 -1
  246. package/build/components/justify-content-control/ui.js +0 -1
  247. package/build/components/justify-content-control/ui.js.map +1 -1
  248. package/build/components/keyboard-shortcuts/index.js +1 -1
  249. package/build/components/keyboard-shortcuts/index.js.map +1 -1
  250. package/build/components/link-control/index.js +0 -1
  251. package/build/components/link-control/index.js.map +1 -1
  252. package/build/components/link-control/search-results.js +0 -1
  253. package/build/components/link-control/search-results.js.map +1 -1
  254. package/build/components/link-control/settings.js +0 -1
  255. package/build/components/link-control/settings.js.map +1 -1
  256. package/build/components/link-control/use-internal-value.js +0 -1
  257. package/build/components/link-control/use-internal-value.js.map +1 -1
  258. package/build/components/link-control/use-search-handler.js +0 -1
  259. package/build/components/link-control/use-search-handler.js.map +1 -1
  260. package/build/components/list-view/block-select-button.js +0 -1
  261. package/build/components/list-view/block-select-button.js.map +1 -1
  262. package/build/components/list-view/block.js +0 -1
  263. package/build/components/list-view/block.js.map +1 -1
  264. package/build/components/list-view/branch.js +0 -1
  265. package/build/components/list-view/branch.js.map +1 -1
  266. package/build/components/list-view/index.js +0 -1
  267. package/build/components/list-view/index.js.map +1 -1
  268. package/build/components/list-view/use-block-selection.js +0 -1
  269. package/build/components/list-view/use-block-selection.js.map +1 -1
  270. package/build/components/list-view/use-clipboard-handler.js +0 -1
  271. package/build/components/list-view/use-clipboard-handler.js.map +1 -1
  272. package/build/components/list-view/use-list-view-block-indexes.js +0 -1
  273. package/build/components/list-view/use-list-view-block-indexes.js.map +1 -1
  274. package/build/components/list-view/use-list-view-drop-zone.js +0 -1
  275. package/build/components/list-view/use-list-view-drop-zone.js.map +1 -1
  276. package/build/components/list-view/utils.js +0 -1
  277. package/build/components/list-view/utils.js.map +1 -1
  278. package/build/components/media-placeholder/index.js +0 -1
  279. package/build/components/media-placeholder/index.js.map +1 -1
  280. package/build/components/media-placeholder/index.native.js +0 -1
  281. package/build/components/media-placeholder/index.native.js.map +1 -1
  282. package/build/components/media-replace-flow/index.js +0 -1
  283. package/build/components/media-replace-flow/index.js.map +1 -1
  284. package/build/components/media-upload/index.native.js +0 -1
  285. package/build/components/media-upload/index.native.js.map +1 -1
  286. package/build/components/navigable-toolbar/index.js +0 -1
  287. package/build/components/navigable-toolbar/index.js.map +1 -1
  288. package/build/components/panel-color-settings/index.js +0 -1
  289. package/build/components/panel-color-settings/index.js.map +1 -1
  290. package/build/components/provider/use-block-sync.js +0 -1
  291. package/build/components/provider/use-block-sync.js.map +1 -1
  292. package/build/components/responsive-block-control/index.js +0 -1
  293. package/build/components/responsive-block-control/index.js.map +1 -1
  294. package/build/components/rich-text/embed-handler-picker.native.js +0 -1
  295. package/build/components/rich-text/embed-handler-picker.native.js.map +1 -1
  296. package/build/components/rich-text/event-listeners/before-input-rules.js +0 -1
  297. package/build/components/rich-text/event-listeners/before-input-rules.js.map +1 -1
  298. package/build/components/rich-text/event-listeners/delete.js +5 -3
  299. package/build/components/rich-text/event-listeners/delete.js.map +1 -1
  300. package/build/components/rich-text/event-listeners/index.js +0 -1
  301. package/build/components/rich-text/event-listeners/index.js.map +1 -1
  302. package/build/components/rich-text/event-listeners/input-rules.js +0 -1
  303. package/build/components/rich-text/event-listeners/input-rules.js.map +1 -1
  304. package/build/components/rich-text/event-listeners/paste-handler.js +0 -1
  305. package/build/components/rich-text/event-listeners/paste-handler.js.map +1 -1
  306. package/build/components/rich-text/file-paste-handler.native.js +0 -1
  307. package/build/components/rich-text/file-paste-handler.native.js.map +1 -1
  308. package/build/components/rich-text/format-edit.js +0 -1
  309. package/build/components/rich-text/format-edit.js.map +1 -1
  310. package/build/components/rich-text/format-toolbar/index.js +0 -1
  311. package/build/components/rich-text/format-toolbar/index.js.map +1 -1
  312. package/build/components/rich-text/index.js +0 -1
  313. package/build/components/rich-text/index.js.map +1 -1
  314. package/build/components/rich-text/index.native.js +0 -1
  315. package/build/components/rich-text/index.native.js.map +1 -1
  316. package/build/components/rich-text/multiline.js +0 -1
  317. package/build/components/rich-text/multiline.js.map +1 -1
  318. package/build/components/rich-text/native/format-edit.js +0 -1
  319. package/build/components/rich-text/native/format-edit.js.map +1 -1
  320. package/build/components/rich-text/native/get-format-colors.native.js +0 -1
  321. package/build/components/rich-text/native/get-format-colors.native.js.map +1 -1
  322. package/build/components/rich-text/native/index.native.js +0 -1
  323. package/build/components/rich-text/native/index.native.js.map +1 -1
  324. package/build/components/rich-text/native/toolbar-button-with-options.native.js +0 -1
  325. package/build/components/rich-text/native/toolbar-button-with-options.native.js.map +1 -1
  326. package/build/components/rich-text/native/use-format-types.js +0 -1
  327. package/build/components/rich-text/native/use-format-types.js.map +1 -1
  328. package/build/components/rich-text/use-format-types.js +0 -1
  329. package/build/components/rich-text/use-format-types.js.map +1 -1
  330. package/build/components/spacing-sizes-control/hooks/use-spacing-sizes.js +0 -1
  331. package/build/components/spacing-sizes-control/hooks/use-spacing-sizes.js.map +1 -1
  332. package/build/components/spacing-sizes-control/index.js +44 -2
  333. package/build/components/spacing-sizes-control/index.js.map +1 -1
  334. package/build/components/spacing-sizes-control/input-controls/axial.js +0 -1
  335. package/build/components/spacing-sizes-control/input-controls/axial.js.map +1 -1
  336. package/build/components/spacing-sizes-control/input-controls/separated.js +0 -1
  337. package/build/components/spacing-sizes-control/input-controls/separated.js.map +1 -1
  338. package/build/components/spacing-sizes-control/input-controls/single.js +0 -1
  339. package/build/components/spacing-sizes-control/input-controls/single.js.map +1 -1
  340. package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js +0 -1
  341. package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
  342. package/build/components/spacing-sizes-control/linked-button.js +6 -9
  343. package/build/components/spacing-sizes-control/linked-button.js.map +1 -1
  344. package/build/components/spacing-sizes-control/utils.js +0 -109
  345. package/build/components/spacing-sizes-control/utils.js.map +1 -1
  346. package/build/components/tabbed-sidebar/index.js +0 -1
  347. package/build/components/tabbed-sidebar/index.js.map +1 -1
  348. package/build/components/text-alignment-control/index.js +0 -1
  349. package/build/components/text-alignment-control/index.js.map +1 -1
  350. package/build/components/text-decoration-control/index.js +0 -1
  351. package/build/components/text-decoration-control/index.js.map +1 -1
  352. package/build/components/text-transform-control/index.js +0 -1
  353. package/build/components/text-transform-control/index.js.map +1 -1
  354. package/build/components/unsupported-block-details/index.native.js +0 -1
  355. package/build/components/unsupported-block-details/index.native.js.map +1 -1
  356. package/build/components/url-input/index.js +0 -1
  357. package/build/components/url-input/index.js.map +1 -1
  358. package/build/components/url-popover/image-url-input-ui.js +0 -1
  359. package/build/components/url-popover/image-url-input-ui.js.map +1 -1
  360. package/build/components/use-block-commands/index.js +0 -1
  361. package/build/components/use-block-commands/index.js.map +1 -1
  362. package/build/components/use-block-drop-zone/index.js +0 -1
  363. package/build/components/use-block-drop-zone/index.js.map +1 -1
  364. package/build/components/use-block-drop-zone/index.native.js +0 -1
  365. package/build/components/use-block-drop-zone/index.native.js.map +1 -1
  366. package/build/components/use-flash-editable-blocks/index.js +0 -1
  367. package/build/components/use-flash-editable-blocks/index.js.map +1 -1
  368. package/build/components/use-on-block-drop/index.js +0 -1
  369. package/build/components/use-on-block-drop/index.js.map +1 -1
  370. package/build/components/use-on-block-drop/index.native.js +0 -1
  371. package/build/components/use-on-block-drop/index.native.js.map +1 -1
  372. package/build/components/use-paste-styles/index.js +0 -1
  373. package/build/components/use-paste-styles/index.js.map +1 -1
  374. package/build/components/warning/index.js +0 -1
  375. package/build/components/warning/index.js.map +1 -1
  376. package/build/components/writing-flow/use-arrow-nav.js +0 -1
  377. package/build/components/writing-flow/use-arrow-nav.js.map +1 -1
  378. package/build/components/writing-flow/use-clipboard-handler.js +0 -1
  379. package/build/components/writing-flow/use-clipboard-handler.js.map +1 -1
  380. package/build/components/writing-flow/use-input.js +0 -1
  381. package/build/components/writing-flow/use-input.js.map +1 -1
  382. package/build/components/writing-flow/use-tab-nav.js +3 -1
  383. package/build/components/writing-flow/use-tab-nav.js.map +1 -1
  384. package/build/components/writing-flow/utils.js +0 -1
  385. package/build/components/writing-flow/utils.js.map +1 -1
  386. package/build/components/writing-mode-control/index.js +0 -1
  387. package/build/components/writing-mode-control/index.js.map +1 -1
  388. package/build/hooks/align.js +0 -1
  389. package/build/hooks/align.js.map +1 -1
  390. package/build/hooks/align.native.js +0 -1
  391. package/build/hooks/align.native.js.map +1 -1
  392. package/build/hooks/aria-label.js +3 -8
  393. package/build/hooks/aria-label.js.map +1 -1
  394. package/build/hooks/block-bindings.js +0 -1
  395. package/build/hooks/block-bindings.js.map +1 -1
  396. package/build/hooks/block-hooks.js +0 -1
  397. package/build/hooks/block-hooks.js.map +1 -1
  398. package/build/hooks/block-style-variation.js +0 -1
  399. package/build/hooks/block-style-variation.js.map +1 -1
  400. package/build/hooks/border.js +0 -1
  401. package/build/hooks/border.js.map +1 -1
  402. package/build/hooks/contrast-checker.js +40 -22
  403. package/build/hooks/contrast-checker.js.map +1 -1
  404. package/build/hooks/custom-class-name.js +2 -1
  405. package/build/hooks/custom-class-name.js.map +1 -1
  406. package/build/hooks/duotone.js +0 -1
  407. package/build/hooks/duotone.js.map +1 -1
  408. package/build/hooks/index.js +0 -1
  409. package/build/hooks/index.js.map +1 -1
  410. package/build/hooks/layout.js +0 -1
  411. package/build/hooks/layout.js.map +1 -1
  412. package/build/hooks/position.js +0 -1
  413. package/build/hooks/position.js.map +1 -1
  414. package/build/hooks/style.js +0 -1
  415. package/build/hooks/style.js.map +1 -1
  416. package/build/hooks/supports.js +0 -1
  417. package/build/hooks/supports.js.map +1 -1
  418. package/build/hooks/text-align.js +0 -1
  419. package/build/hooks/text-align.js.map +1 -1
  420. package/build/hooks/typography.js +0 -1
  421. package/build/hooks/typography.js.map +1 -1
  422. package/build/hooks/utils.js +0 -1
  423. package/build/hooks/utils.js.map +1 -1
  424. package/build/layouts/constrained.js +0 -1
  425. package/build/layouts/constrained.js.map +1 -1
  426. package/build/layouts/flex.js +0 -1
  427. package/build/layouts/flex.js.map +1 -1
  428. package/build/layouts/flow.js +0 -1
  429. package/build/layouts/flow.js.map +1 -1
  430. package/build/layouts/index.js +0 -1
  431. package/build/layouts/index.js.map +1 -1
  432. package/build/layouts/utils.js +0 -1
  433. package/build/layouts/utils.js.map +1 -1
  434. package/build/store/actions.js +0 -1
  435. package/build/store/actions.js.map +1 -1
  436. package/build/store/get-block-settings.js +0 -1
  437. package/build/store/get-block-settings.js.map +1 -1
  438. package/build/store/private-actions.js +0 -1
  439. package/build/store/private-actions.js.map +1 -1
  440. package/build/store/private-selectors.js +0 -1
  441. package/build/store/private-selectors.js.map +1 -1
  442. package/build/store/reducer.js +0 -1
  443. package/build/store/reducer.js.map +1 -1
  444. package/build/store/selectors.js +13 -3
  445. package/build/store/selectors.js.map +1 -1
  446. package/build/store/utils.js +0 -1
  447. package/build/store/utils.js.map +1 -1
  448. package/build/utils/block-bindings.js +0 -1
  449. package/build/utils/block-bindings.js.map +1 -1
  450. package/build/utils/get-editor-region.js +0 -1
  451. package/build/utils/get-editor-region.js.map +1 -1
  452. package/build/utils/get-font-styles-and-weights.js +0 -1
  453. package/build/utils/get-font-styles-and-weights.js.map +1 -1
  454. package/build/utils/math.js +0 -1
  455. package/build/utils/math.js.map +1 -1
  456. package/build/utils/object.js +0 -1
  457. package/build/utils/object.js.map +1 -1
  458. package/build/utils/selection.js +0 -1
  459. package/build/utils/selection.js.map +1 -1
  460. package/build/utils/transform-styles/index.js +0 -1
  461. package/build/utils/transform-styles/index.js.map +1 -1
  462. package/build-module/autocompleters/block.js +0 -1
  463. package/build-module/autocompleters/block.js.map +1 -1
  464. package/build-module/autocompleters/link.js +0 -1
  465. package/build-module/autocompleters/link.js.map +1 -1
  466. package/build-module/components/alignment-control/ui.js +0 -1
  467. package/build-module/components/alignment-control/ui.js.map +1 -1
  468. package/build-module/components/autocomplete/index.js +0 -1
  469. package/build-module/components/autocomplete/index.js.map +1 -1
  470. package/build-module/components/background-image-control/index.js +0 -1
  471. package/build-module/components/background-image-control/index.js.map +1 -1
  472. package/build-module/components/block-actions/index.js +0 -1
  473. package/build-module/components/block-actions/index.js.map +1 -1
  474. package/build-module/components/block-alignment-control/ui.js +0 -1
  475. package/build-module/components/block-alignment-control/ui.js.map +1 -1
  476. package/build-module/components/block-alignment-control/ui.native.js +0 -1
  477. package/build-module/components/block-alignment-control/ui.native.js.map +1 -1
  478. package/build-module/components/block-alignment-control/use-available-alignments.js +0 -1
  479. package/build-module/components/block-alignment-control/use-available-alignments.js.map +1 -1
  480. package/build-module/components/block-breadcrumb/index.js +0 -1
  481. package/build-module/components/block-breadcrumb/index.js.map +1 -1
  482. package/build-module/components/block-compare/index.js +0 -1
  483. package/build-module/components/block-compare/index.js.map +1 -1
  484. package/build-module/components/block-controls/fill.js +0 -1
  485. package/build-module/components/block-controls/fill.js.map +1 -1
  486. package/build-module/components/block-edit/edit.js +0 -1
  487. package/build-module/components/block-edit/edit.js.map +1 -1
  488. package/build-module/components/block-edit/edit.native.js +0 -1
  489. package/build-module/components/block-edit/edit.native.js.map +1 -1
  490. package/build-module/components/block-heading-level-dropdown/index.js +0 -1
  491. package/build-module/components/block-heading-level-dropdown/index.js.map +1 -1
  492. package/build-module/components/block-heading-level-dropdown/index.native.js +0 -1
  493. package/build-module/components/block-heading-level-dropdown/index.native.js.map +1 -1
  494. package/build-module/components/block-inspector/index.js +0 -1
  495. package/build-module/components/block-inspector/index.js.map +1 -1
  496. package/build-module/components/block-list/block-invalid-warning.js +0 -1
  497. package/build-module/components/block-list/block-invalid-warning.js.map +1 -1
  498. package/build-module/components/block-list/block-list-context.native.js +0 -1
  499. package/build-module/components/block-list/block-list-context.native.js.map +1 -1
  500. package/build-module/components/block-list/block.js +0 -1
  501. package/build-module/components/block-list/block.js.map +1 -1
  502. package/build-module/components/block-list/block.native.js +0 -1
  503. package/build-module/components/block-list/block.native.js.map +1 -1
  504. package/build-module/components/block-list/index.js +9 -6
  505. package/build-module/components/block-list/index.js.map +1 -1
  506. package/build-module/components/block-list/index.native.js +0 -1
  507. package/build-module/components/block-list/index.native.js.map +1 -1
  508. package/build-module/components/block-list/use-block-props/use-focus-first-element.js +0 -1
  509. package/build-module/components/block-list/use-block-props/use-focus-first-element.js.map +1 -1
  510. package/build-module/components/block-list/use-in-between-inserter.js +0 -1
  511. package/build-module/components/block-list/use-in-between-inserter.js.map +1 -1
  512. package/build-module/components/block-lock/modal.js +0 -1
  513. package/build-module/components/block-lock/modal.js.map +1 -1
  514. package/build-module/components/block-manager/category.js +0 -1
  515. package/build-module/components/block-manager/category.js.map +1 -1
  516. package/build-module/components/block-manager/checklist.js +0 -1
  517. package/build-module/components/block-manager/checklist.js.map +1 -1
  518. package/build-module/components/block-manager/index.js +0 -1
  519. package/build-module/components/block-manager/index.js.map +1 -1
  520. package/build-module/components/block-media-update-progress/index.native.js +0 -1
  521. package/build-module/components/block-media-update-progress/index.native.js.map +1 -1
  522. package/build-module/components/block-mover/index.native.js +0 -1
  523. package/build-module/components/block-mover/index.native.js.map +1 -1
  524. package/build-module/components/block-mover/mover-description.native.js +0 -1
  525. package/build-module/components/block-mover/mover-description.native.js.map +1 -1
  526. package/build-module/components/block-pattern-setup/index.js +0 -1
  527. package/build-module/components/block-pattern-setup/index.js.map +1 -1
  528. package/build-module/components/block-pattern-setup/use-patterns-setup.js +0 -1
  529. package/build-module/components/block-pattern-setup/use-patterns-setup.js.map +1 -1
  530. package/build-module/components/block-patterns-list/index.js +0 -1
  531. package/build-module/components/block-patterns-list/index.js.map +1 -1
  532. package/build-module/components/block-popover/use-popover-scroll.js +12 -7
  533. package/build-module/components/block-popover/use-popover-scroll.js.map +1 -1
  534. package/build-module/components/block-quick-navigation/index.js +0 -1
  535. package/build-module/components/block-quick-navigation/index.js.map +1 -1
  536. package/build-module/components/block-rename/modal.js +0 -1
  537. package/build-module/components/block-rename/modal.js.map +1 -1
  538. package/build-module/components/block-settings-menu/block-settings-dropdown.js +0 -1
  539. package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  540. package/build-module/components/block-styles/index.js +0 -1
  541. package/build-module/components/block-styles/index.js.map +1 -1
  542. package/build-module/components/block-styles/index.native.js +0 -1
  543. package/build-module/components/block-styles/index.native.js.map +1 -1
  544. package/build-module/components/block-styles/menu-items.js +0 -1
  545. package/build-module/components/block-styles/menu-items.js.map +1 -1
  546. package/build-module/components/block-styles/preview.native.js +0 -1
  547. package/build-module/components/block-styles/preview.native.js.map +1 -1
  548. package/build-module/components/block-switcher/block-transformations-menu.js +0 -1
  549. package/build-module/components/block-switcher/block-transformations-menu.js.map +1 -1
  550. package/build-module/components/block-switcher/block-transformations-menu.native.js +0 -1
  551. package/build-module/components/block-switcher/block-transformations-menu.native.js.map +1 -1
  552. package/build-module/components/block-switcher/block-variation-transformations.js +0 -1
  553. package/build-module/components/block-switcher/block-variation-transformations.js.map +1 -1
  554. package/build-module/components/block-switcher/index.js +0 -1
  555. package/build-module/components/block-switcher/index.js.map +1 -1
  556. package/build-module/components/block-switcher/pattern-transformations-menu.js +0 -1
  557. package/build-module/components/block-switcher/pattern-transformations-menu.js.map +1 -1
  558. package/build-module/components/block-switcher/use-transformed-patterns.js +0 -1
  559. package/build-module/components/block-switcher/use-transformed-patterns.js.map +1 -1
  560. package/build-module/components/block-switcher/utils.js +0 -1
  561. package/build-module/components/block-switcher/utils.js.map +1 -1
  562. package/build-module/components/block-toolbar/block-toolbar-menu.native.js +0 -1
  563. package/build-module/components/block-toolbar/block-toolbar-menu.native.js.map +1 -1
  564. package/build-module/components/block-toolbar/change-design.js +0 -1
  565. package/build-module/components/block-toolbar/change-design.js.map +1 -1
  566. package/build-module/components/block-toolbar/index.js +0 -1
  567. package/build-module/components/block-toolbar/index.js.map +1 -1
  568. package/build-module/components/block-tools/block-toolbar-popover.js +3 -2
  569. package/build-module/components/block-tools/block-toolbar-popover.js.map +1 -1
  570. package/build-module/components/block-tools/use-selected-block-tool-props.js +0 -1
  571. package/build-module/components/block-tools/use-selected-block-tool-props.js.map +1 -1
  572. package/build-module/components/block-types-list/index.js +0 -1
  573. package/build-module/components/block-types-list/index.js.map +1 -1
  574. package/build-module/components/block-variation-picker/index.js +0 -1
  575. package/build-module/components/block-variation-picker/index.js.map +1 -1
  576. package/build-module/components/block-variation-picker/index.native.js +0 -1
  577. package/build-module/components/block-variation-picker/index.native.js.map +1 -1
  578. package/build-module/components/block-variation-transforms/index.js +0 -1
  579. package/build-module/components/block-variation-transforms/index.js.map +1 -1
  580. package/build-module/components/block-vertical-alignment-control/ui.js +0 -1
  581. package/build-module/components/block-vertical-alignment-control/ui.js.map +1 -1
  582. package/build-module/components/border-radius-control/index.js +0 -1
  583. package/build-module/components/border-radius-control/index.js.map +1 -1
  584. package/build-module/components/border-radius-control/input-controls.js +0 -1
  585. package/build-module/components/border-radius-control/input-controls.js.map +1 -1
  586. package/build-module/components/border-radius-control/utils.js +0 -1
  587. package/build-module/components/border-radius-control/utils.js.map +1 -1
  588. package/build-module/components/colors/utils.js +0 -1
  589. package/build-module/components/colors/utils.js.map +1 -1
  590. package/build-module/components/colors/with-colors.js +0 -1
  591. package/build-module/components/colors/with-colors.js.map +1 -1
  592. package/build-module/components/colors-gradients/dropdown.js +0 -1
  593. package/build-module/components/colors-gradients/dropdown.js.map +1 -1
  594. package/build-module/components/colors-gradients/panel-color-gradient-settings.js +0 -1
  595. package/build-module/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
  596. package/build-module/components/colors-gradients/panel-color-gradient-settings.native.js +0 -1
  597. package/build-module/components/colors-gradients/panel-color-gradient-settings.native.js.map +1 -1
  598. package/build-module/components/convert-to-group-buttons/toolbar.js +0 -1
  599. package/build-module/components/convert-to-group-buttons/toolbar.js.map +1 -1
  600. package/build-module/components/date-format-picker/index.js +0 -1
  601. package/build-module/components/date-format-picker/index.js.map +1 -1
  602. package/build-module/components/dimensions-tool/scale-tool.js +0 -1
  603. package/build-module/components/dimensions-tool/scale-tool.js.map +1 -1
  604. package/build-module/components/duotone/utils.js +0 -1
  605. package/build-module/components/duotone/utils.js.map +1 -1
  606. package/build-module/components/editor-styles/index.js +0 -1
  607. package/build-module/components/editor-styles/index.js.map +1 -1
  608. package/build-module/components/font-appearance-control/index.js +0 -1
  609. package/build-module/components/font-appearance-control/index.js.map +1 -1
  610. package/build-module/components/font-family/index.js +0 -1
  611. package/build-module/components/font-family/index.js.map +1 -1
  612. package/build-module/components/font-sizes/with-font-sizes.js +0 -1
  613. package/build-module/components/font-sizes/with-font-sizes.js.map +1 -1
  614. package/build-module/components/global-styles/border-panel.js +0 -1
  615. package/build-module/components/global-styles/border-panel.js.map +1 -1
  616. package/build-module/components/global-styles/color-panel.js +0 -1
  617. package/build-module/components/global-styles/color-panel.js.map +1 -1
  618. package/build-module/components/global-styles/color-panel.native.js +0 -1
  619. package/build-module/components/global-styles/color-panel.native.js.map +1 -1
  620. package/build-module/components/global-styles/dimensions-panel.js +0 -1
  621. package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
  622. package/build-module/components/global-styles/filters-panel.js +45 -28
  623. package/build-module/components/global-styles/filters-panel.js.map +1 -1
  624. package/build-module/components/global-styles/get-global-styles-changes.js +0 -1
  625. package/build-module/components/global-styles/get-global-styles-changes.js.map +1 -1
  626. package/build-module/components/global-styles/shadow-panel-components.js +44 -20
  627. package/build-module/components/global-styles/shadow-panel-components.js.map +1 -1
  628. package/build-module/components/global-styles/typography-utils.js +0 -1
  629. package/build-module/components/global-styles/typography-utils.js.map +1 -1
  630. package/build-module/components/global-styles/use-global-styles-context.native.js +0 -1
  631. package/build-module/components/global-styles/use-global-styles-context.native.js.map +1 -1
  632. package/build-module/components/global-styles/use-global-styles-output.js +0 -1
  633. package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
  634. package/build-module/components/global-styles/utils.js +0 -1
  635. package/build-module/components/global-styles/utils.js.map +1 -1
  636. package/build-module/components/grid/grid-visualizer.js +11 -20
  637. package/build-module/components/grid/grid-visualizer.js.map +1 -1
  638. package/build-module/components/grid/use-grid-layout-sync.js +0 -1
  639. package/build-module/components/grid/use-grid-layout-sync.js.map +1 -1
  640. package/build-module/components/grid/utils.js +6 -5
  641. package/build-module/components/grid/utils.js.map +1 -1
  642. package/build-module/components/iframe/get-compatibility-styles.js +0 -1
  643. package/build-module/components/iframe/get-compatibility-styles.js.map +1 -1
  644. package/build-module/components/image-editor/aspect-ratio-dropdown.js +1 -2
  645. package/build-module/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
  646. package/build-module/components/inner-blocks/index.js +2 -2
  647. package/build-module/components/inner-blocks/index.js.map +1 -1
  648. package/build-module/components/inner-blocks/index.native.js +2 -2
  649. package/build-module/components/inner-blocks/index.native.js.map +1 -1
  650. package/build-module/components/inner-blocks/use-block-context.js +0 -1
  651. package/build-module/components/inner-blocks/use-block-context.js.map +1 -1
  652. package/build-module/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js +0 -1
  653. package/build-module/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js.map +1 -1
  654. package/build-module/components/inserter/block-patterns-explorer/pattern-list.js +0 -1
  655. package/build-module/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
  656. package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js +0 -1
  657. package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js.map +1 -1
  658. package/build-module/components/inserter/block-patterns-tab/use-pattern-categories.js +0 -1
  659. package/build-module/components/inserter/block-patterns-tab/use-pattern-categories.js.map +1 -1
  660. package/build-module/components/inserter/block-types-tab.js +0 -1
  661. package/build-module/components/inserter/block-types-tab.js.map +1 -1
  662. package/build-module/components/inserter/block-types-tab.native.js +0 -1
  663. package/build-module/components/inserter/block-types-tab.native.js.map +1 -1
  664. package/build-module/components/inserter/category-tabs/index.js +0 -1
  665. package/build-module/components/inserter/category-tabs/index.js.map +1 -1
  666. package/build-module/components/inserter/hooks/use-block-type-impressions.native.js +0 -1
  667. package/build-module/components/inserter/hooks/use-block-type-impressions.native.js.map +1 -1
  668. package/build-module/components/inserter/hooks/use-patterns-state.js +0 -1
  669. package/build-module/components/inserter/hooks/use-patterns-state.js.map +1 -1
  670. package/build-module/components/inserter/index.js +0 -1
  671. package/build-module/components/inserter/index.js.map +1 -1
  672. package/build-module/components/inserter/index.native.js +0 -1
  673. package/build-module/components/inserter/index.native.js.map +1 -1
  674. package/build-module/components/inserter/media-tab/hooks.js +0 -1
  675. package/build-module/components/inserter/media-tab/hooks.js.map +1 -1
  676. package/build-module/components/inserter/media-tab/media-list.js +0 -1
  677. package/build-module/components/inserter/media-tab/media-list.js.map +1 -1
  678. package/build-module/components/inserter/media-tab/media-tab.js +0 -1
  679. package/build-module/components/inserter/media-tab/media-tab.js.map +1 -1
  680. package/build-module/components/inserter/menu.js +13 -2
  681. package/build-module/components/inserter/menu.js.map +1 -1
  682. package/build-module/components/inserter/mobile-tab-navigation.js +0 -1
  683. package/build-module/components/inserter/mobile-tab-navigation.js.map +1 -1
  684. package/build-module/components/inserter/no-results.js +4 -8
  685. package/build-module/components/inserter/no-results.js.map +1 -1
  686. package/build-module/components/inserter/quick-inserter.js +2 -1
  687. package/build-module/components/inserter/quick-inserter.js.map +1 -1
  688. package/build-module/components/inserter/search-items.js +0 -1
  689. package/build-module/components/inserter/search-items.js.map +1 -1
  690. package/build-module/components/inserter/search-results.js +1 -2
  691. package/build-module/components/inserter/search-results.js.map +1 -1
  692. package/build-module/components/inserter/tabs.native.js +0 -1
  693. package/build-module/components/inserter/tabs.native.js.map +1 -1
  694. package/build-module/components/inserter/utils.native.js +0 -1
  695. package/build-module/components/inserter/utils.native.js.map +1 -1
  696. package/build-module/components/inspector-controls/block-support-tools-panel.js +0 -1
  697. package/build-module/components/inspector-controls/block-support-tools-panel.js.map +1 -1
  698. package/build-module/components/inspector-controls/fill.js +0 -1
  699. package/build-module/components/inspector-controls/fill.js.map +1 -1
  700. package/build-module/components/inspector-controls-tabs/index.js +0 -1
  701. package/build-module/components/inspector-controls-tabs/index.js.map +1 -1
  702. package/build-module/components/inspector-controls-tabs/position-controls-panel.js +51 -23
  703. package/build-module/components/inspector-controls-tabs/position-controls-panel.js.map +1 -1
  704. package/build-module/components/inspector-popover-header/index.js +0 -1
  705. package/build-module/components/inspector-popover-header/index.js.map +1 -1
  706. package/build-module/components/justify-content-control/ui.js +0 -1
  707. package/build-module/components/justify-content-control/ui.js.map +1 -1
  708. package/build-module/components/keyboard-shortcuts/index.js +1 -1
  709. package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
  710. package/build-module/components/link-control/index.js +0 -1
  711. package/build-module/components/link-control/index.js.map +1 -1
  712. package/build-module/components/link-control/search-results.js +0 -1
  713. package/build-module/components/link-control/search-results.js.map +1 -1
  714. package/build-module/components/link-control/settings.js +0 -1
  715. package/build-module/components/link-control/settings.js.map +1 -1
  716. package/build-module/components/link-control/use-internal-value.js +0 -1
  717. package/build-module/components/link-control/use-internal-value.js.map +1 -1
  718. package/build-module/components/link-control/use-search-handler.js +0 -1
  719. package/build-module/components/link-control/use-search-handler.js.map +1 -1
  720. package/build-module/components/list-view/block-select-button.js +0 -1
  721. package/build-module/components/list-view/block-select-button.js.map +1 -1
  722. package/build-module/components/list-view/block.js +0 -1
  723. package/build-module/components/list-view/block.js.map +1 -1
  724. package/build-module/components/list-view/branch.js +0 -1
  725. package/build-module/components/list-view/branch.js.map +1 -1
  726. package/build-module/components/list-view/index.js +0 -1
  727. package/build-module/components/list-view/index.js.map +1 -1
  728. package/build-module/components/list-view/use-block-selection.js +0 -1
  729. package/build-module/components/list-view/use-block-selection.js.map +1 -1
  730. package/build-module/components/list-view/use-clipboard-handler.js +0 -1
  731. package/build-module/components/list-view/use-clipboard-handler.js.map +1 -1
  732. package/build-module/components/list-view/use-list-view-block-indexes.js +0 -1
  733. package/build-module/components/list-view/use-list-view-block-indexes.js.map +1 -1
  734. package/build-module/components/list-view/use-list-view-drop-zone.js +0 -1
  735. package/build-module/components/list-view/use-list-view-drop-zone.js.map +1 -1
  736. package/build-module/components/list-view/utils.js +0 -1
  737. package/build-module/components/list-view/utils.js.map +1 -1
  738. package/build-module/components/media-placeholder/index.js +0 -1
  739. package/build-module/components/media-placeholder/index.js.map +1 -1
  740. package/build-module/components/media-placeholder/index.native.js +0 -1
  741. package/build-module/components/media-placeholder/index.native.js.map +1 -1
  742. package/build-module/components/media-replace-flow/index.js +0 -1
  743. package/build-module/components/media-replace-flow/index.js.map +1 -1
  744. package/build-module/components/media-upload/index.native.js +0 -1
  745. package/build-module/components/media-upload/index.native.js.map +1 -1
  746. package/build-module/components/navigable-toolbar/index.js +0 -1
  747. package/build-module/components/navigable-toolbar/index.js.map +1 -1
  748. package/build-module/components/panel-color-settings/index.js +0 -1
  749. package/build-module/components/panel-color-settings/index.js.map +1 -1
  750. package/build-module/components/provider/use-block-sync.js +0 -1
  751. package/build-module/components/provider/use-block-sync.js.map +1 -1
  752. package/build-module/components/responsive-block-control/index.js +0 -1
  753. package/build-module/components/responsive-block-control/index.js.map +1 -1
  754. package/build-module/components/rich-text/embed-handler-picker.native.js +0 -1
  755. package/build-module/components/rich-text/embed-handler-picker.native.js.map +1 -1
  756. package/build-module/components/rich-text/event-listeners/before-input-rules.js +0 -1
  757. package/build-module/components/rich-text/event-listeners/before-input-rules.js.map +1 -1
  758. package/build-module/components/rich-text/event-listeners/delete.js +5 -3
  759. package/build-module/components/rich-text/event-listeners/delete.js.map +1 -1
  760. package/build-module/components/rich-text/event-listeners/index.js +0 -1
  761. package/build-module/components/rich-text/event-listeners/index.js.map +1 -1
  762. package/build-module/components/rich-text/event-listeners/input-rules.js +0 -1
  763. package/build-module/components/rich-text/event-listeners/input-rules.js.map +1 -1
  764. package/build-module/components/rich-text/event-listeners/paste-handler.js +0 -1
  765. package/build-module/components/rich-text/event-listeners/paste-handler.js.map +1 -1
  766. package/build-module/components/rich-text/file-paste-handler.native.js +0 -1
  767. package/build-module/components/rich-text/file-paste-handler.native.js.map +1 -1
  768. package/build-module/components/rich-text/format-edit.js +0 -1
  769. package/build-module/components/rich-text/format-edit.js.map +1 -1
  770. package/build-module/components/rich-text/format-toolbar/index.js +0 -1
  771. package/build-module/components/rich-text/format-toolbar/index.js.map +1 -1
  772. package/build-module/components/rich-text/index.js +0 -1
  773. package/build-module/components/rich-text/index.js.map +1 -1
  774. package/build-module/components/rich-text/index.native.js +0 -1
  775. package/build-module/components/rich-text/index.native.js.map +1 -1
  776. package/build-module/components/rich-text/multiline.js +0 -1
  777. package/build-module/components/rich-text/multiline.js.map +1 -1
  778. package/build-module/components/rich-text/native/format-edit.js +0 -1
  779. package/build-module/components/rich-text/native/format-edit.js.map +1 -1
  780. package/build-module/components/rich-text/native/get-format-colors.native.js +0 -1
  781. package/build-module/components/rich-text/native/get-format-colors.native.js.map +1 -1
  782. package/build-module/components/rich-text/native/index.native.js +0 -1
  783. package/build-module/components/rich-text/native/index.native.js.map +1 -1
  784. package/build-module/components/rich-text/native/toolbar-button-with-options.native.js +0 -1
  785. package/build-module/components/rich-text/native/toolbar-button-with-options.native.js.map +1 -1
  786. package/build-module/components/rich-text/native/use-format-types.js +0 -1
  787. package/build-module/components/rich-text/native/use-format-types.js.map +1 -1
  788. package/build-module/components/rich-text/use-format-types.js +0 -1
  789. package/build-module/components/rich-text/use-format-types.js.map +1 -1
  790. package/build-module/components/spacing-sizes-control/hooks/use-spacing-sizes.js +0 -1
  791. package/build-module/components/spacing-sizes-control/hooks/use-spacing-sizes.js.map +1 -1
  792. package/build-module/components/spacing-sizes-control/index.js +45 -1
  793. package/build-module/components/spacing-sizes-control/index.js.map +1 -1
  794. package/build-module/components/spacing-sizes-control/input-controls/axial.js +0 -1
  795. package/build-module/components/spacing-sizes-control/input-controls/axial.js.map +1 -1
  796. package/build-module/components/spacing-sizes-control/input-controls/separated.js +0 -1
  797. package/build-module/components/spacing-sizes-control/input-controls/separated.js.map +1 -1
  798. package/build-module/components/spacing-sizes-control/input-controls/single.js +0 -1
  799. package/build-module/components/spacing-sizes-control/input-controls/single.js.map +1 -1
  800. package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js +0 -1
  801. package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
  802. package/build-module/components/spacing-sizes-control/linked-button.js +7 -10
  803. package/build-module/components/spacing-sizes-control/linked-button.js.map +1 -1
  804. package/build-module/components/spacing-sizes-control/utils.js +0 -105
  805. package/build-module/components/spacing-sizes-control/utils.js.map +1 -1
  806. package/build-module/components/tabbed-sidebar/index.js +0 -1
  807. package/build-module/components/tabbed-sidebar/index.js.map +1 -1
  808. package/build-module/components/text-alignment-control/index.js +0 -1
  809. package/build-module/components/text-alignment-control/index.js.map +1 -1
  810. package/build-module/components/text-decoration-control/index.js +0 -1
  811. package/build-module/components/text-decoration-control/index.js.map +1 -1
  812. package/build-module/components/text-transform-control/index.js +0 -1
  813. package/build-module/components/text-transform-control/index.js.map +1 -1
  814. package/build-module/components/unsupported-block-details/index.native.js +0 -1
  815. package/build-module/components/unsupported-block-details/index.native.js.map +1 -1
  816. package/build-module/components/url-input/index.js +0 -1
  817. package/build-module/components/url-input/index.js.map +1 -1
  818. package/build-module/components/url-popover/image-url-input-ui.js +0 -1
  819. package/build-module/components/url-popover/image-url-input-ui.js.map +1 -1
  820. package/build-module/components/use-block-commands/index.js +0 -1
  821. package/build-module/components/use-block-commands/index.js.map +1 -1
  822. package/build-module/components/use-block-drop-zone/index.js +0 -1
  823. package/build-module/components/use-block-drop-zone/index.js.map +1 -1
  824. package/build-module/components/use-block-drop-zone/index.native.js +0 -1
  825. package/build-module/components/use-block-drop-zone/index.native.js.map +1 -1
  826. package/build-module/components/use-flash-editable-blocks/index.js +0 -1
  827. package/build-module/components/use-flash-editable-blocks/index.js.map +1 -1
  828. package/build-module/components/use-on-block-drop/index.js +0 -1
  829. package/build-module/components/use-on-block-drop/index.js.map +1 -1
  830. package/build-module/components/use-on-block-drop/index.native.js +0 -1
  831. package/build-module/components/use-on-block-drop/index.native.js.map +1 -1
  832. package/build-module/components/use-paste-styles/index.js +0 -1
  833. package/build-module/components/use-paste-styles/index.js.map +1 -1
  834. package/build-module/components/warning/index.js +0 -1
  835. package/build-module/components/warning/index.js.map +1 -1
  836. package/build-module/components/writing-flow/use-arrow-nav.js +0 -1
  837. package/build-module/components/writing-flow/use-arrow-nav.js.map +1 -1
  838. package/build-module/components/writing-flow/use-clipboard-handler.js +0 -1
  839. package/build-module/components/writing-flow/use-clipboard-handler.js.map +1 -1
  840. package/build-module/components/writing-flow/use-input.js +0 -1
  841. package/build-module/components/writing-flow/use-input.js.map +1 -1
  842. package/build-module/components/writing-flow/use-tab-nav.js +3 -1
  843. package/build-module/components/writing-flow/use-tab-nav.js.map +1 -1
  844. package/build-module/components/writing-flow/utils.js +0 -1
  845. package/build-module/components/writing-flow/utils.js.map +1 -1
  846. package/build-module/components/writing-mode-control/index.js +0 -1
  847. package/build-module/components/writing-mode-control/index.js.map +1 -1
  848. package/build-module/hooks/align.js +0 -1
  849. package/build-module/hooks/align.js.map +1 -1
  850. package/build-module/hooks/align.native.js +0 -1
  851. package/build-module/hooks/align.native.js.map +1 -1
  852. package/build-module/hooks/aria-label.js +3 -7
  853. package/build-module/hooks/aria-label.js.map +1 -1
  854. package/build-module/hooks/block-bindings.js +0 -1
  855. package/build-module/hooks/block-bindings.js.map +1 -1
  856. package/build-module/hooks/block-hooks.js +0 -1
  857. package/build-module/hooks/block-hooks.js.map +1 -1
  858. package/build-module/hooks/block-style-variation.js +0 -1
  859. package/build-module/hooks/block-style-variation.js.map +1 -1
  860. package/build-module/hooks/border.js +0 -1
  861. package/build-module/hooks/border.js.map +1 -1
  862. package/build-module/hooks/contrast-checker.js +41 -23
  863. package/build-module/hooks/contrast-checker.js.map +1 -1
  864. package/build-module/hooks/custom-class-name.js +2 -1
  865. package/build-module/hooks/custom-class-name.js.map +1 -1
  866. package/build-module/hooks/duotone.js +0 -1
  867. package/build-module/hooks/duotone.js.map +1 -1
  868. package/build-module/hooks/index.js +0 -1
  869. package/build-module/hooks/index.js.map +1 -1
  870. package/build-module/hooks/layout.js +0 -1
  871. package/build-module/hooks/layout.js.map +1 -1
  872. package/build-module/hooks/position.js +0 -1
  873. package/build-module/hooks/position.js.map +1 -1
  874. package/build-module/hooks/style.js +0 -1
  875. package/build-module/hooks/style.js.map +1 -1
  876. package/build-module/hooks/supports.js +0 -1
  877. package/build-module/hooks/supports.js.map +1 -1
  878. package/build-module/hooks/text-align.js +0 -1
  879. package/build-module/hooks/text-align.js.map +1 -1
  880. package/build-module/hooks/typography.js +0 -1
  881. package/build-module/hooks/typography.js.map +1 -1
  882. package/build-module/hooks/utils.js +0 -1
  883. package/build-module/hooks/utils.js.map +1 -1
  884. package/build-module/layouts/constrained.js +0 -1
  885. package/build-module/layouts/constrained.js.map +1 -1
  886. package/build-module/layouts/flex.js +0 -1
  887. package/build-module/layouts/flex.js.map +1 -1
  888. package/build-module/layouts/flow.js +0 -1
  889. package/build-module/layouts/flow.js.map +1 -1
  890. package/build-module/layouts/index.js +0 -1
  891. package/build-module/layouts/index.js.map +1 -1
  892. package/build-module/layouts/utils.js +0 -1
  893. package/build-module/layouts/utils.js.map +1 -1
  894. package/build-module/store/actions.js +0 -1
  895. package/build-module/store/actions.js.map +1 -1
  896. package/build-module/store/get-block-settings.js +0 -1
  897. package/build-module/store/get-block-settings.js.map +1 -1
  898. package/build-module/store/private-actions.js +0 -1
  899. package/build-module/store/private-actions.js.map +1 -1
  900. package/build-module/store/private-selectors.js +0 -1
  901. package/build-module/store/private-selectors.js.map +1 -1
  902. package/build-module/store/reducer.js +0 -1
  903. package/build-module/store/reducer.js.map +1 -1
  904. package/build-module/store/selectors.js +13 -3
  905. package/build-module/store/selectors.js.map +1 -1
  906. package/build-module/store/utils.js +0 -1
  907. package/build-module/store/utils.js.map +1 -1
  908. package/build-module/utils/block-bindings.js +0 -1
  909. package/build-module/utils/block-bindings.js.map +1 -1
  910. package/build-module/utils/get-editor-region.js +0 -1
  911. package/build-module/utils/get-editor-region.js.map +1 -1
  912. package/build-module/utils/get-font-styles-and-weights.js +0 -1
  913. package/build-module/utils/get-font-styles-and-weights.js.map +1 -1
  914. package/build-module/utils/math.js +0 -1
  915. package/build-module/utils/math.js.map +1 -1
  916. package/build-module/utils/object.js +0 -1
  917. package/build-module/utils/object.js.map +1 -1
  918. package/build-module/utils/selection.js +0 -1
  919. package/build-module/utils/selection.js.map +1 -1
  920. package/build-module/utils/transform-styles/index.js +0 -1
  921. package/build-module/utils/transform-styles/index.js.map +1 -1
  922. package/build-style/content-rtl.css +22 -25
  923. package/build-style/content.css +22 -25
  924. package/build-style/style-rtl.css +131 -104
  925. package/build-style/style.css +131 -104
  926. package/package.json +34 -34
  927. package/src/components/block-canvas/style.scss +3 -2
  928. package/src/components/block-draggable/style.scss +3 -1
  929. package/src/components/block-list/content.scss +19 -12
  930. package/src/components/block-list/index.js +21 -7
  931. package/src/components/block-mover/style.scss +5 -4
  932. package/src/components/block-pattern-setup/style.scss +3 -1
  933. package/src/components/block-patterns-list/style.scss +3 -3
  934. package/src/components/block-popover/use-popover-scroll.js +13 -8
  935. package/src/components/block-switcher/style.scss +3 -1
  936. package/src/components/block-toolbar/style.scss +5 -3
  937. package/src/components/block-tools/block-toolbar-popover.js +4 -3
  938. package/src/components/block-tools/style.scss +6 -3
  939. package/src/components/button-block-appender/content.scss +2 -4
  940. package/src/components/colors-gradients/style.scss +3 -2
  941. package/src/components/global-styles/filters-panel.js +48 -21
  942. package/src/components/global-styles/shadow-panel-components.js +44 -13
  943. package/src/components/global-styles/style.scss +53 -1
  944. package/src/components/grid/grid-visualizer.js +10 -21
  945. package/src/components/grid/style.scss +6 -4
  946. package/src/components/grid/utils.js +6 -4
  947. package/src/components/iframe/content.scss +5 -2
  948. package/src/components/image-editor/aspect-ratio-dropdown.js +1 -1
  949. package/src/components/inner-blocks/index.js +2 -2
  950. package/src/components/inner-blocks/index.native.js +2 -2
  951. package/src/components/inserter/menu.js +11 -9
  952. package/src/components/inserter/no-results.js +0 -5
  953. package/src/components/inserter/quick-inserter.js +4 -1
  954. package/src/components/inserter/search-results.js +3 -1
  955. package/src/components/inserter/style.scss +6 -8
  956. package/src/components/inserter-list-item/style.scss +9 -6
  957. package/src/components/inspector-controls-tabs/position-controls-panel.js +62 -27
  958. package/src/components/keyboard-shortcuts/index.js +1 -1
  959. package/src/components/link-control/style.scss +11 -6
  960. package/src/components/list-view/style.scss +34 -17
  961. package/src/components/rich-text/event-listeners/delete.js +3 -3
  962. package/src/components/spacing-sizes-control/README.md +93 -0
  963. package/src/components/spacing-sizes-control/index.js +44 -1
  964. package/src/components/spacing-sizes-control/linked-button.js +8 -10
  965. package/src/components/spacing-sizes-control/test/utils.js +0 -151
  966. package/src/components/spacing-sizes-control/utils.js +0 -106
  967. package/src/components/url-input/style.scss +3 -2
  968. package/src/components/writing-flow/use-tab-nav.js +4 -0
  969. package/src/hooks/aria-label.js +3 -8
  970. package/src/hooks/contrast-checker.js +64 -30
  971. package/src/hooks/custom-class-name.js +2 -1
  972. package/src/store/selectors.js +15 -7
@@ -1 +1 @@
1
- {"version":3,"names":["_richText","require","_jsxRuntime","FormatEdit","formatTypes","onChange","onFocus","value","forwardedRef","map","settings","name","edit","Edit","activeFormat","getActiveFormat","isActive","undefined","activeObject","getActiveObject","isObjectActive","type","jsx","activeAttributes","attributes","activeObjectAttributes","contentRef"],"sources":["@wordpress/block-editor/src/components/rich-text/native/format-edit.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getActiveFormat, getActiveObject } from '@wordpress/rich-text';\n\nexport default function FormatEdit( {\n\tformatTypes,\n\tonChange,\n\tonFocus,\n\tvalue,\n\tforwardedRef,\n} ) {\n\treturn formatTypes.map( ( settings ) => {\n\t\tconst { name, edit: Edit } = settings;\n\n\t\tif ( ! Edit ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst activeFormat = getActiveFormat( value, name );\n\t\tconst isActive = activeFormat !== undefined;\n\t\tconst activeObject = getActiveObject( value );\n\t\tconst isObjectActive =\n\t\t\tactiveObject !== undefined && activeObject.type === name;\n\n\t\treturn (\n\t\t\t<Edit\n\t\t\t\tkey={ name }\n\t\t\t\tisActive={ isActive }\n\t\t\t\tactiveAttributes={\n\t\t\t\t\tisActive ? activeFormat.attributes || {} : {}\n\t\t\t\t}\n\t\t\t\tisObjectActive={ isObjectActive }\n\t\t\t\tactiveObjectAttributes={\n\t\t\t\t\tisObjectActive ? activeObject.attributes || {} : {}\n\t\t\t\t}\n\t\t\t\tvalue={ value }\n\t\t\t\tonChange={ onChange }\n\t\t\t\tonFocus={ onFocus }\n\t\t\t\tcontentRef={ forwardedRef }\n\t\t\t/>\n\t\t);\n\t} );\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,SAAA,GAAAC,OAAA;AAAwE,IAAAC,WAAA,GAAAD,OAAA;AAHxE;AACA;AACA;;AAGe,SAASE,UAAUA,CAAE;EACnCC,WAAW;EACXC,QAAQ;EACRC,OAAO;EACPC,KAAK;EACLC;AACD,CAAC,EAAG;EACH,OAAOJ,WAAW,CAACK,GAAG,CAAIC,QAAQ,IAAM;IACvC,MAAM;MAAEC,IAAI;MAAEC,IAAI,EAAEC;IAAK,CAAC,GAAGH,QAAQ;IAErC,IAAK,CAAEG,IAAI,EAAG;MACb,OAAO,IAAI;IACZ;IAEA,MAAMC,YAAY,GAAG,IAAAC,yBAAe,EAAER,KAAK,EAAEI,IAAK,CAAC;IACnD,MAAMK,QAAQ,GAAGF,YAAY,KAAKG,SAAS;IAC3C,MAAMC,YAAY,GAAG,IAAAC,yBAAe,EAAEZ,KAAM,CAAC;IAC7C,MAAMa,cAAc,GACnBF,YAAY,KAAKD,SAAS,IAAIC,YAAY,CAACG,IAAI,KAAKV,IAAI;IAEzD,oBACC,IAAAT,WAAA,CAAAoB,GAAA,EAACT,IAAI;MAEJG,QAAQ,EAAGA,QAAU;MACrBO,gBAAgB,EACfP,QAAQ,GAAGF,YAAY,CAACU,UAAU,IAAI,CAAC,CAAC,GAAG,CAAC,CAC5C;MACDJ,cAAc,EAAGA,cAAgB;MACjCK,sBAAsB,EACrBL,cAAc,GAAGF,YAAY,CAACM,UAAU,IAAI,CAAC,CAAC,GAAG,CAAC,CAClD;MACDjB,KAAK,EAAGA,KAAO;MACfF,QAAQ,EAAGA,QAAU;MACrBC,OAAO,EAAGA,OAAS;MACnBoB,UAAU,EAAGlB;IAAc,GAZrBG,IAaN,CAAC;EAEJ,CAAE,CAAC;AACJ","ignoreList":[]}
1
+ {"version":3,"names":["_richText","require","_jsxRuntime","FormatEdit","formatTypes","onChange","onFocus","value","forwardedRef","map","settings","name","edit","Edit","activeFormat","getActiveFormat","isActive","undefined","activeObject","getActiveObject","isObjectActive","type","jsx","activeAttributes","attributes","activeObjectAttributes","contentRef"],"sources":["@wordpress/block-editor/src/components/rich-text/native/format-edit.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getActiveFormat, getActiveObject } from '@wordpress/rich-text';\n\nexport default function FormatEdit( {\n\tformatTypes,\n\tonChange,\n\tonFocus,\n\tvalue,\n\tforwardedRef,\n} ) {\n\treturn formatTypes.map( ( settings ) => {\n\t\tconst { name, edit: Edit } = settings;\n\n\t\tif ( ! Edit ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst activeFormat = getActiveFormat( value, name );\n\t\tconst isActive = activeFormat !== undefined;\n\t\tconst activeObject = getActiveObject( value );\n\t\tconst isObjectActive =\n\t\t\tactiveObject !== undefined && activeObject.type === name;\n\n\t\treturn (\n\t\t\t<Edit\n\t\t\t\tkey={ name }\n\t\t\t\tisActive={ isActive }\n\t\t\t\tactiveAttributes={\n\t\t\t\t\tisActive ? activeFormat.attributes || {} : {}\n\t\t\t\t}\n\t\t\t\tisObjectActive={ isObjectActive }\n\t\t\t\tactiveObjectAttributes={\n\t\t\t\t\tisObjectActive ? activeObject.attributes || {} : {}\n\t\t\t\t}\n\t\t\t\tvalue={ value }\n\t\t\t\tonChange={ onChange }\n\t\t\t\tonFocus={ onFocus }\n\t\t\t\tcontentRef={ forwardedRef }\n\t\t\t/>\n\t\t);\n\t} );\n}\n"],"mappings":";;;;;;AAGA,IAAAA,SAAA,GAAAC,OAAA;AAAwE,IAAAC,WAAA,GAAAD,OAAA;AAHxE;AACA;AACA;;AAGe,SAASE,UAAUA,CAAE;EACnCC,WAAW;EACXC,QAAQ;EACRC,OAAO;EACPC,KAAK;EACLC;AACD,CAAC,EAAG;EACH,OAAOJ,WAAW,CAACK,GAAG,CAAIC,QAAQ,IAAM;IACvC,MAAM;MAAEC,IAAI;MAAEC,IAAI,EAAEC;IAAK,CAAC,GAAGH,QAAQ;IAErC,IAAK,CAAEG,IAAI,EAAG;MACb,OAAO,IAAI;IACZ;IAEA,MAAMC,YAAY,GAAG,IAAAC,yBAAe,EAAER,KAAK,EAAEI,IAAK,CAAC;IACnD,MAAMK,QAAQ,GAAGF,YAAY,KAAKG,SAAS;IAC3C,MAAMC,YAAY,GAAG,IAAAC,yBAAe,EAAEZ,KAAM,CAAC;IAC7C,MAAMa,cAAc,GACnBF,YAAY,KAAKD,SAAS,IAAIC,YAAY,CAACG,IAAI,KAAKV,IAAI;IAEzD,oBACC,IAAAT,WAAA,CAAAoB,GAAA,EAACT,IAAI;MAEJG,QAAQ,EAAGA,QAAU;MACrBO,gBAAgB,EACfP,QAAQ,GAAGF,YAAY,CAACU,UAAU,IAAI,CAAC,CAAC,GAAG,CAAC,CAC5C;MACDJ,cAAc,EAAGA,cAAgB;MACjCK,sBAAsB,EACrBL,cAAc,GAAGF,YAAY,CAACM,UAAU,IAAI,CAAC,CAAC,GAAG,CAAC,CAClD;MACDjB,KAAK,EAAGA,KAAO;MACfF,QAAQ,EAAGA,QAAU;MACrBC,OAAO,EAAGA,OAAS;MACnBoB,UAAU,EAAGlB;IAAc,GAZrBG,IAaN,CAAC;EAEJ,CAAE,CAAC;AACJ","ignoreList":[]}
@@ -1,4 +1,3 @@
1
- /* wp:polyfill */
2
1
  "use strict";
3
2
 
4
3
  Object.defineProperty(exports, "__esModule", {
@@ -1 +1 @@
1
- {"version":3,"names":["_colors","require","FORMAT_TYPE","REGEX_TO_MATCH","getFormatColors","formats","colors","newFormats","slice","forEach","format","currentFormat","type","className","attributes","class","split","currentClass","match","colorSlug","colorObject","getColorObjectByAttributeValues","currentStyles","style","color","indexOf","join"],"sources":["@wordpress/block-editor/src/components/rich-text/native/get-format-colors.native.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport { getColorObjectByAttributeValues } from '../../../components/colors';\n\nconst FORMAT_TYPE = 'core/text-color';\nconst REGEX_TO_MATCH = /^has-(.*)-color$/;\n\nexport function getFormatColors( formats, colors ) {\n\tconst newFormats = formats.slice();\n\n\t// We are looping through a sparse array where empty indices will be\n\t// skipped.\n\tnewFormats.forEach( ( format ) => {\n\t\tformat.forEach( ( currentFormat ) => {\n\t\t\tif ( currentFormat?.type === FORMAT_TYPE ) {\n\t\t\t\tconst className = currentFormat?.attributes?.class;\n\n\t\t\t\tclassName?.split( ' ' ).forEach( ( currentClass ) => {\n\t\t\t\t\tconst match = currentClass.match( REGEX_TO_MATCH );\n\t\t\t\t\tif ( match ) {\n\t\t\t\t\t\tconst [ , colorSlug ] =\n\t\t\t\t\t\t\tcurrentClass.match( REGEX_TO_MATCH );\n\t\t\t\t\t\tconst colorObject = getColorObjectByAttributeValues(\n\t\t\t\t\t\t\tcolors,\n\t\t\t\t\t\t\tcolorSlug\n\t\t\t\t\t\t);\n\t\t\t\t\t\tconst currentStyles = currentFormat?.attributes?.style;\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tcolorObject?.color &&\n\t\t\t\t\t\t\t( ! currentStyles ||\n\t\t\t\t\t\t\t\tcurrentStyles?.indexOf( colorObject.color ) ===\n\t\t\t\t\t\t\t\t\t-1 )\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tcurrentFormat.attributes.style = [\n\t\t\t\t\t\t\t\t`color: ${ colorObject.color }`,\n\t\t\t\t\t\t\t\tcurrentStyles,\n\t\t\t\t\t\t\t].join( ';' );\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\t} );\n\n\treturn newFormats;\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGA,MAAMC,WAAW,GAAG,iBAAiB;AACrC,MAAMC,cAAc,GAAG,kBAAkB;AAElC,SAASC,eAAeA,CAAEC,OAAO,EAAEC,MAAM,EAAG;EAClD,MAAMC,UAAU,GAAGF,OAAO,CAACG,KAAK,CAAC,CAAC;;EAElC;EACA;EACAD,UAAU,CAACE,OAAO,CAAIC,MAAM,IAAM;IACjCA,MAAM,CAACD,OAAO,CAAIE,aAAa,IAAM;MACpC,IAAKA,aAAa,EAAEC,IAAI,KAAKV,WAAW,EAAG;QAC1C,MAAMW,SAAS,GAAGF,aAAa,EAAEG,UAAU,EAAEC,KAAK;QAElDF,SAAS,EAAEG,KAAK,CAAE,GAAI,CAAC,CAACP,OAAO,CAAIQ,YAAY,IAAM;UACpD,MAAMC,KAAK,GAAGD,YAAY,CAACC,KAAK,CAAEf,cAAe,CAAC;UAClD,IAAKe,KAAK,EAAG;YACZ,MAAM,GAAIC,SAAS,CAAE,GACpBF,YAAY,CAACC,KAAK,CAAEf,cAAe,CAAC;YACrC,MAAMiB,WAAW,GAAG,IAAAC,uCAA+B,EAClDf,MAAM,EACNa,SACD,CAAC;YACD,MAAMG,aAAa,GAAGX,aAAa,EAAEG,UAAU,EAAES,KAAK;YACtD,IACCH,WAAW,EAAEI,KAAK,KAChB,CAAEF,aAAa,IAChBA,aAAa,EAAEG,OAAO,CAAEL,WAAW,CAACI,KAAM,CAAC,KAC1C,CAAC,CAAC,CAAE,EACL;cACDb,aAAa,CAACG,UAAU,CAACS,KAAK,GAAG,CAChC,UAAWH,WAAW,CAACI,KAAK,EAAG,EAC/BF,aAAa,CACb,CAACI,IAAI,CAAE,GAAI,CAAC;YACd;UACD;QACD,CAAE,CAAC;MACJ;IACD,CAAE,CAAC;EACJ,CAAE,CAAC;EAEH,OAAOnB,UAAU;AAClB","ignoreList":[]}
1
+ {"version":3,"names":["_colors","require","FORMAT_TYPE","REGEX_TO_MATCH","getFormatColors","formats","colors","newFormats","slice","forEach","format","currentFormat","type","className","attributes","class","split","currentClass","match","colorSlug","colorObject","getColorObjectByAttributeValues","currentStyles","style","color","indexOf","join"],"sources":["@wordpress/block-editor/src/components/rich-text/native/get-format-colors.native.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport { getColorObjectByAttributeValues } from '../../../components/colors';\n\nconst FORMAT_TYPE = 'core/text-color';\nconst REGEX_TO_MATCH = /^has-(.*)-color$/;\n\nexport function getFormatColors( formats, colors ) {\n\tconst newFormats = formats.slice();\n\n\t// We are looping through a sparse array where empty indices will be\n\t// skipped.\n\tnewFormats.forEach( ( format ) => {\n\t\tformat.forEach( ( currentFormat ) => {\n\t\t\tif ( currentFormat?.type === FORMAT_TYPE ) {\n\t\t\t\tconst className = currentFormat?.attributes?.class;\n\n\t\t\t\tclassName?.split( ' ' ).forEach( ( currentClass ) => {\n\t\t\t\t\tconst match = currentClass.match( REGEX_TO_MATCH );\n\t\t\t\t\tif ( match ) {\n\t\t\t\t\t\tconst [ , colorSlug ] =\n\t\t\t\t\t\t\tcurrentClass.match( REGEX_TO_MATCH );\n\t\t\t\t\t\tconst colorObject = getColorObjectByAttributeValues(\n\t\t\t\t\t\t\tcolors,\n\t\t\t\t\t\t\tcolorSlug\n\t\t\t\t\t\t);\n\t\t\t\t\t\tconst currentStyles = currentFormat?.attributes?.style;\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tcolorObject?.color &&\n\t\t\t\t\t\t\t( ! currentStyles ||\n\t\t\t\t\t\t\t\tcurrentStyles?.indexOf( colorObject.color ) ===\n\t\t\t\t\t\t\t\t\t-1 )\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tcurrentFormat.attributes.style = [\n\t\t\t\t\t\t\t\t`color: ${ colorObject.color }`,\n\t\t\t\t\t\t\t\tcurrentStyles,\n\t\t\t\t\t\t\t].join( ';' );\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\t} );\n\n\treturn newFormats;\n}\n"],"mappings":";;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;A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ime/helpers/interopRequireDefault");
@@ -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","_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","__unstableInputRule","currentValuePosition","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\n\t\tconst { __unstableInputRule } = this.props;\n\t\tconst currentValuePosition = {\n\t\t\tend: this.isIOS ? this.selectionEnd : this.selectionEnd + 1,\n\t\t\tstart: this.isIOS ? this.selectionStart : this.selectionStart + 1,\n\t\t};\n\n\t\tif (\n\t\t\t__unstableInputRule &&\n\t\t\t__unstableInputRule( {\n\t\t\t\t...currentValuePosition,\n\t\t\t\t...this.formatToValue( contentWithoutRootTag ),\n\t\t\t} )\n\t\t) {\n\t\t\treturn;\n\t\t}\n\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\tif ( onDelete ) {\n\t\t\tonDelete( { isReverse, value } );\n\t\t}\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,OAAA;AACA,IAAAY,aAAA,GAAAZ,OAAA;AACA,IAAAa,SAAA,GAAAb,OAAA;AACA,IAAAc,IAAA,GAAAd,OAAA;AACA,IAAAe,MAAA,GAAAf,OA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,GAAGH,eAAe,CAAET,QAAQ,EAAE,IAAK,CAAC;EACjD,MAAMa,WAAW,GAAGD,OAAO,GAAGF,QAAQ,CAAEE,OAAO,CAAE,CAAC,CAAG,CAAC,GAAGnQ,SAAS;EAClE,MAAMkM,iBAAiB,GAAGkE,WAAW,EAAEtK,UAAU,EAAEuK,cAAc;EAEjE,MAAMC,QAAQ,GAAGJ,WAAW,CAAC,CAAC;EAC9B,MAAM9V,gBAAgB,GAAGkW,QAAQ,EAAEC,oCAAoC;EAEvE,MAAMC,aAAa,GAAGF,QAAQ,EAAEG,sBAAsB,EAAE/V,KAAK,EAAEgW,OAAO;EACtE,MAAMjS,YAAY,GAAG+R,aAAa,GAC/B7W,iBAAiB,CAAE6W,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;IACjB9R,gBAAgB;IAChBqE;EACD,CAAC;AACF,CAAE,CAAC,EACHsS,iCAAwB,EACxB1B,eAAe,CACd,CAAC,CAAElU,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","__unstableInputRule","currentValuePosition","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\n\t\tconst { __unstableInputRule } = this.props;\n\t\tconst currentValuePosition = {\n\t\t\tend: this.isIOS ? this.selectionEnd : this.selectionEnd + 1,\n\t\t\tstart: this.isIOS ? this.selectionStart : this.selectionStart + 1,\n\t\t};\n\n\t\tif (\n\t\t\t__unstableInputRule &&\n\t\t\t__unstableInputRule( {\n\t\t\t\t...currentValuePosition,\n\t\t\t\t...this.formatToValue( contentWithoutRootTag ),\n\t\t\t} )\n\t\t) {\n\t\t\treturn;\n\t\t}\n\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\tif ( onDelete ) {\n\t\t\tonDelete( { isReverse, value } );\n\t\t}\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,OAAA;AACA,IAAAY,aAAA,GAAAZ,OAAA;AACA,IAAAa,SAAA,GAAAb,OAAA;AACA,IAAAc,IAAA,GAAAd,OAAA;AACA,IAAAe,MAAA,GAAAf,OAAA;AACA,IAAAgB,KAAA,GAAAhB,OAAA;AACA,IAAAiB,SAAA,GAAAjB,OAAA;AAgBA,IAAAkB,eAAA,GAAAlB,OAAA;AACA,IAAAmB,WAAA,GAAAjB,sBAAA,CAAAF,OAAA;AACA,IAAAoB,gBAAA,GAAApB,OAAA;AACA,IAAAqB,MAAA,GAAAnB,sBAAA,CAAAF,OAAA;AACA,IAAAsB,yBAAA,GAAApB,sBAAA,CAAAF,OAAA;AAAqE,IAAAuB,WAAA,GAAAvB,OAAA;AApDrE;;AAEA;AACA;AACA;;AAKA;AACA;AACA;;AAkCA;AACA;AACA;;AAOA;AACA;AACA;AACA,MAAMwB,iBAAiB,GAAG,IAAAC,eAAM,EAAIC,cAAc,IAAM,CACvD,IAAKA,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ClCF,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;IACjB9R,gBAAgB;IAChBqE;EACD,CAAC;AACF,CAAE,CAAC,EACHsS,iCAAwB,EACxB1B,eAAe,CACd,CAAC,CAAElU,QAAS,CAAC","ignoreList":[]}
@@ -1,4 +1,3 @@
1
- /* wp:polyfill */
2
1
  "use strict";
3
2
 
4
3
  Object.defineProperty(exports, "__esModule", {
@@ -1 +1 @@
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;AACA;AACA;AACA,GACA,SAASI,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,oBACC,IAAAd,WAAA,CAAAiB,IAAA,EAAAjB,WAAA,CAAAkB,QAAA;IAAAC,QAAA,gBACC,IAAAnB,WAAA,CAAAoB,GAAA,EAACxB,WAAA,CAAAyB,YAAY;MAAAF,QAAA,eACZ,IAAAnB,WAAA,CAAAoB,GAAA,EAACxB,WAAA,CAAA0B,aAAa;QACbC,KAAK,EAAGR,WAAW,CAACQ,KAAO;QAC3BC,IAAI,eAAG,IAAAxB,WAAA,CAAAoB,GAAA,EAACrB,MAAA,CAAA0B,IAAI;UAACD,IAAI,EAAGT,WAAW,CAACS;QAAM,CAAE,CAAG;QAC3CX,OAAO,EAAGE,WAAW,CAACF,OAAS;QAC/Ba,WAAW,EAAGV,YAAY,GAAGX,aAAa,GAAGsB;MAAW,CACxD;IAAC,CACW,CAAC,EACbX,YAAY,iBACb,IAAAhB,WAAA,CAAAoB,GAAA,EAACxB,WAAA,CAAAgC,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":[]}
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;AACA;AACA;AACA,GACA,SAASI,wBAAwBA,CAAE;EAAEC;AAAQ,CAAC,EAAG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nB4B,QAAQ,EAAGvB,eAAiB;MAC5BwB,gBAAgB;IAAA,CAChB,CACD;EAAA,CACA,CAAC;AAEL;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEcjC,wBAAwB","ignoreList":[]}
@@ -1,4 +1,3 @@
1
- /* wp:polyfill */
2
1
  "use strict";
3
2
 
4
3
  Object.defineProperty(exports, "__esModule", {
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_data","_richText","formatTypesSelector","select","richTextStore","getFormatTypes","interactiveContentTags","Set","useFormatTypes","clientId","identifier","withoutInteractiveFormatting","allowedFormats","allFormatTypes","useSelect","formatTypes","useMemo","filter","name","tagName","includes","has","keyedSelected","reduce","accumulator","type","__experimentalGetPropsForEditableTreePreparation","richTextIdentifier","blockClientId","dispatch","useDispatch","prepareHandlers","valueHandlers","changeHandlers","dependencies","forEach","__experimentalCreatePrepareEditableTree","selected","handler","__experimentalCreateOnChangeEditableValue","push","key","dispatchers","__experimentalGetPropsForEditableTreeChangeHandler"],"sources":["@wordpress/block-editor/src/components/rich-text/native/use-format-types.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as richTextStore } from '@wordpress/rich-text';\n\nfunction formatTypesSelector( select ) {\n\treturn select( richTextStore ).getFormatTypes();\n}\n\n/**\n * Set of all interactive content tags.\n *\n * @see https://html.spec.whatwg.org/multipage/dom.html#interactive-content\n */\nconst interactiveContentTags = new Set( [\n\t'a',\n\t'audio',\n\t'button',\n\t'details',\n\t'embed',\n\t'iframe',\n\t'input',\n\t'label',\n\t'select',\n\t'textarea',\n\t'video',\n] );\n\n/**\n * This hook provides RichText with the `formatTypes` and its derived props from\n * experimental format type settings.\n *\n * @param {Object} $0 Options\n * @param {string} $0.clientId Block client ID.\n * @param {string} $0.identifier Block attribute.\n * @param {boolean} $0.withoutInteractiveFormatting Whether to clean the interactive formatting or not.\n * @param {Array} $0.allowedFormats Allowed formats\n */\nexport function useFormatTypes( {\n\tclientId,\n\tidentifier,\n\twithoutInteractiveFormatting,\n\tallowedFormats,\n} ) {\n\tconst allFormatTypes = useSelect( formatTypesSelector, [] );\n\tconst formatTypes = useMemo( () => {\n\t\treturn allFormatTypes.filter( ( { name, tagName } ) => {\n\t\t\tif ( allowedFormats && ! allowedFormats.includes( name ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\twithoutInteractiveFormatting &&\n\t\t\t\tinteractiveContentTags.has( tagName )\n\t\t\t) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn true;\n\t\t} );\n\t}, [ allFormatTypes, allowedFormats, interactiveContentTags ] );\n\tconst keyedSelected = useSelect(\n\t\t( select ) =>\n\t\t\tformatTypes.reduce( ( accumulator, type ) => {\n\t\t\t\tif ( type.__experimentalGetPropsForEditableTreePreparation ) {\n\t\t\t\t\taccumulator[ type.name ] =\n\t\t\t\t\t\ttype.__experimentalGetPropsForEditableTreePreparation(\n\t\t\t\t\t\t\tselect,\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\trichTextIdentifier: identifier,\n\t\t\t\t\t\t\t\tblockClientId: clientId,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn accumulator;\n\t\t\t}, {} ),\n\t\t[ formatTypes, clientId, identifier ]\n\t);\n\tconst dispatch = useDispatch();\n\tconst prepareHandlers = [];\n\tconst valueHandlers = [];\n\tconst changeHandlers = [];\n\tconst dependencies = [];\n\n\tformatTypes.forEach( ( type ) => {\n\t\tif ( type.__experimentalCreatePrepareEditableTree ) {\n\t\t\tconst selected = keyedSelected[ type.name ];\n\t\t\tconst handler = type.__experimentalCreatePrepareEditableTree(\n\t\t\t\tselected,\n\t\t\t\t{\n\t\t\t\t\trichTextIdentifier: identifier,\n\t\t\t\t\tblockClientId: clientId,\n\t\t\t\t}\n\t\t\t);\n\n\t\t\tif ( type.__experimentalCreateOnChangeEditableValue ) {\n\t\t\t\tvalueHandlers.push( handler );\n\t\t\t} else {\n\t\t\t\tprepareHandlers.push( handler );\n\t\t\t}\n\n\t\t\tfor ( const key in selected ) {\n\t\t\t\tdependencies.push( selected[ key ] );\n\t\t\t}\n\t\t}\n\n\t\tif ( type.__experimentalCreateOnChangeEditableValue ) {\n\t\t\tlet dispatchers = {};\n\n\t\t\tif ( type.__experimentalGetPropsForEditableTreeChangeHandler ) {\n\t\t\t\tdispatchers =\n\t\t\t\t\ttype.__experimentalGetPropsForEditableTreeChangeHandler(\n\t\t\t\t\t\tdispatch,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\trichTextIdentifier: identifier,\n\t\t\t\t\t\t\tblockClientId: clientId,\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t}\n\n\t\t\tchangeHandlers.push(\n\t\t\t\ttype.__experimentalCreateOnChangeEditableValue(\n\t\t\t\t\t{\n\t\t\t\t\t\t...( keyedSelected[ type.name ] || {} ),\n\t\t\t\t\t\t...dispatchers,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\trichTextIdentifier: identifier,\n\t\t\t\t\t\tblockClientId: clientId,\n\t\t\t\t\t}\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t} );\n\n\treturn {\n\t\tformatTypes,\n\t\tprepareHandlers,\n\t\tvalueHandlers,\n\t\tchangeHandlers,\n\t\tdependencies,\n\t};\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AALA;AACA;AACA;;AAKA,SAASG,mBAAmBA,CAAEC,MAAM,EAAG;EACtC,OAAOA,MAAM,CAAEC,eAAc,CAAC,CAACC,cAAc,CAAC,CAAC;AAChD;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAMC,sBAAsB,GAAG,IAAIC,GAAG,CAAE,CACvC,GAAG,EACH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CAAC;IACF;EACD,CAAE,CAAC;EAEH,OAAO;IACNM,WAAW;IACXgB,eAAe;IACfC,aAAa;IACbC,cAAc;IACdC;EACD,CAAC;AACF","ignoreList":[]}
1
+ {"version":3,"names":["_element","require","_data","_richText","formatTypesSelector","select","richTextStore","getFormatTypes","interactiveContentTags","Set","useFormatTypes","clientId","identifier","withoutInteractiveFormatting","allowedFormats","allFormatTypes","useSelect","formatTypes","useMemo","filter","name","tagName","includes","has","keyedSelected","reduce","accumulator","type","__experimentalGetPropsForEditableTreePreparation","richTextIdentifier","blockClientId","dispatch","useDispatch","prepareHandlers","valueHandlers","changeHandlers","dependencies","forEach","__experimentalCreatePrepareEditableTree","selected","handler","__experimentalCreateOnChangeEditableValue","push","key","dispatchers","__experimentalGetPropsForEditableTreeChangeHandler"],"sources":["@wordpress/block-editor/src/components/rich-text/native/use-format-types.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as richTextStore } from '@wordpress/rich-text';\n\nfunction formatTypesSelector( select ) {\n\treturn select( richTextStore ).getFormatTypes();\n}\n\n/**\n * Set of all interactive content tags.\n *\n * @see https://html.spec.whatwg.org/multipage/dom.html#interactive-content\n */\nconst interactiveContentTags = new Set( [\n\t'a',\n\t'audio',\n\t'button',\n\t'details',\n\t'embed',\n\t'iframe',\n\t'input',\n\t'label',\n\t'select',\n\t'textarea',\n\t'video',\n] );\n\n/**\n * This hook provides RichText with the `formatTypes` and its derived props from\n * experimental format type settings.\n *\n * @param {Object} $0 Options\n * @param {string} $0.clientId Block client ID.\n * @param {string} $0.identifier Block attribute.\n * @param {boolean} $0.withoutInteractiveFormatting Whether to clean the interactive formatting or not.\n * @param {Array} $0.allowedFormats Allowed formats\n */\nexport function useFormatTypes( {\n\tclientId,\n\tidentifier,\n\twithoutInteractiveFormatting,\n\tallowedFormats,\n} ) {\n\tconst allFormatTypes = useSelect( formatTypesSelector, [] );\n\tconst formatTypes = useMemo( () => {\n\t\treturn allFormatTypes.filter( ( { name, tagName } ) => {\n\t\t\tif ( allowedFormats && ! allowedFormats.includes( name ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\twithoutInteractiveFormatting &&\n\t\t\t\tinteractiveContentTags.has( tagName )\n\t\t\t) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn true;\n\t\t} );\n\t}, [ allFormatTypes, allowedFormats, interactiveContentTags ] );\n\tconst keyedSelected = useSelect(\n\t\t( select ) =>\n\t\t\tformatTypes.reduce( ( accumulator, type ) => {\n\t\t\t\tif ( type.__experimentalGetPropsForEditableTreePreparation ) {\n\t\t\t\t\taccumulator[ type.name ] =\n\t\t\t\t\t\ttype.__experimentalGetPropsForEditableTreePreparation(\n\t\t\t\t\t\t\tselect,\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\trichTextIdentifier: identifier,\n\t\t\t\t\t\t\t\tblockClientId: clientId,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn accumulator;\n\t\t\t}, {} ),\n\t\t[ formatTypes, clientId, identifier ]\n\t);\n\tconst dispatch = useDispatch();\n\tconst prepareHandlers = [];\n\tconst valueHandlers = [];\n\tconst changeHandlers = [];\n\tconst dependencies = [];\n\n\tformatTypes.forEach( ( type ) => {\n\t\tif ( type.__experimentalCreatePrepareEditableTree ) {\n\t\t\tconst selected = keyedSelected[ type.name ];\n\t\t\tconst handler = type.__experimentalCreatePrepareEditableTree(\n\t\t\t\tselected,\n\t\t\t\t{\n\t\t\t\t\trichTextIdentifier: identifier,\n\t\t\t\t\tblockClientId: clientId,\n\t\t\t\t}\n\t\t\t);\n\n\t\t\tif ( type.__experimentalCreateOnChangeEditableValue ) {\n\t\t\t\tvalueHandlers.push( handler );\n\t\t\t} else {\n\t\t\t\tprepareHandlers.push( handler );\n\t\t\t}\n\n\t\t\tfor ( const key in selected ) {\n\t\t\t\tdependencies.push( selected[ key ] );\n\t\t\t}\n\t\t}\n\n\t\tif ( type.__experimentalCreateOnChangeEditableValue ) {\n\t\t\tlet dispatchers = {};\n\n\t\t\tif ( type.__experimentalGetPropsForEditableTreeChangeHandler ) {\n\t\t\t\tdispatchers =\n\t\t\t\t\ttype.__experimentalGetPropsForEditableTreeChangeHandler(\n\t\t\t\t\t\tdispatch,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\trichTextIdentifier: identifier,\n\t\t\t\t\t\t\tblockClientId: clientId,\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t}\n\n\t\t\tchangeHandlers.push(\n\t\t\t\ttype.__experimentalCreateOnChangeEditableValue(\n\t\t\t\t\t{\n\t\t\t\t\t\t...( keyedSelected[ type.name ] || {} ),\n\t\t\t\t\t\t...dispatchers,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\trichTextIdentifier: identifier,\n\t\t\t\t\t\tblockClientId: clientId,\n\t\t\t\t\t}\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t} );\n\n\treturn {\n\t\tformatTypes,\n\t\tprepareHandlers,\n\t\tvalueHandlers,\n\t\tchangeHandlers,\n\t\tdependencies,\n\t};\n}\n"],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AALA;AACA;AACA;;AAKA,SAASG,mBAAmBA,CAAEC,MAAM,EAAG;EACtC,OAAOA,MAAM,CAAEC,eAAc,CAAC,CAACC,cAAc,CAAC,CAAC;AAChD;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAMC,sBAAsB,GAAG,IAAIC,GAAG,CAAE,CACvC,GAAG,EACH,OAAO,EACP,QAAQ,EACR,SAAS,EACT,OAAO,EACP,QAAQ,EACR,OAAO,EACP,OAAO,EACP,QAAQ,EACR,UAAU,EACV,OAAO,CACN,CAAC;;AAEH;AACA;AACA;AACA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