@wordpress/block-editor 12.26.0 → 13.0.1

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 (1712) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +1 -1
  3. package/build/autocompleters/block.js +7 -6
  4. package/build/autocompleters/block.js.map +1 -1
  5. package/build/autocompleters/link.js +10 -8
  6. package/build/autocompleters/link.js.map +1 -1
  7. package/build/components/alignment-control/index.js +3 -3
  8. package/build/components/alignment-control/index.js.map +1 -1
  9. package/build/components/alignment-control/ui.js +2 -2
  10. package/build/components/alignment-control/ui.js.map +1 -1
  11. package/build/components/audio-player/audio-url-parser.native.js +24 -0
  12. package/build/components/audio-player/audio-url-parser.native.js.map +1 -0
  13. package/build/components/audio-player/index.native.js +174 -0
  14. package/build/components/audio-player/index.native.js.map +1 -0
  15. package/build/components/autocomplete/index.js +3 -4
  16. package/build/components/autocomplete/index.js.map +1 -1
  17. package/build/components/block-alignment-control/index.js +3 -3
  18. package/build/components/block-alignment-control/index.js.map +1 -1
  19. package/build/components/block-alignment-control/ui.js +33 -30
  20. package/build/components/block-alignment-control/ui.js.map +1 -1
  21. package/build/components/block-alignment-control/ui.native.js +2 -2
  22. package/build/components/block-alignment-control/ui.native.js.map +1 -1
  23. package/build/components/block-alignment-matrix-control/index.js +5 -5
  24. package/build/components/block-alignment-matrix-control/index.js.map +1 -1
  25. package/build/components/block-bindings-toolbar-indicator/index.js +92 -11
  26. package/build/components/block-bindings-toolbar-indicator/index.js.map +1 -1
  27. package/build/components/block-breadcrumb/index.js +38 -34
  28. package/build/components/block-breadcrumb/index.js.map +1 -1
  29. package/build/components/block-canvas/index.js +36 -31
  30. package/build/components/block-canvas/index.js.map +1 -1
  31. package/build/components/block-caption/index.native.js +15 -14
  32. package/build/components/block-caption/index.native.js.map +1 -1
  33. package/build/components/block-card/index.js +32 -27
  34. package/build/components/block-card/index.js.map +1 -1
  35. package/build/components/block-compare/block-view.js +27 -18
  36. package/build/components/block-compare/block-view.js.map +1 -1
  37. package/build/components/block-compare/index.js +23 -22
  38. package/build/components/block-compare/index.js.map +1 -1
  39. package/build/components/block-context/index.js +3 -4
  40. package/build/components/block-context/index.js.map +1 -1
  41. package/build/components/block-controls/fill.js +22 -16
  42. package/build/components/block-controls/fill.js.map +1 -1
  43. package/build/components/block-controls/index.js +3 -3
  44. package/build/components/block-controls/index.js.map +1 -1
  45. package/build/components/block-controls/slot.js +6 -4
  46. package/build/components/block-controls/slot.js.map +1 -1
  47. package/build/components/block-controls/slot.native.js +12 -9
  48. package/build/components/block-controls/slot.native.js.map +1 -1
  49. package/build/components/block-controls/use-has-block-controls.js +1 -1
  50. package/build/components/block-controls/use-has-block-controls.js.map +1 -1
  51. package/build/components/block-draggable/draggable-chip.js +27 -19
  52. package/build/components/block-draggable/draggable-chip.js.map +1 -1
  53. package/build/components/block-draggable/draggable-chip.native.js +9 -8
  54. package/build/components/block-draggable/draggable-chip.native.js.map +1 -1
  55. package/build/components/block-draggable/dropping-insertion-point.native.js +3 -4
  56. package/build/components/block-draggable/dropping-insertion-point.native.js.map +1 -1
  57. package/build/components/block-draggable/index.js +14 -13
  58. package/build/components/block-draggable/index.js.map +1 -1
  59. package/build/components/block-draggable/index.native.js +37 -30
  60. package/build/components/block-draggable/index.native.js.map +1 -1
  61. package/build/components/block-edit/edit.js +5 -6
  62. package/build/components/block-edit/edit.js.map +1 -1
  63. package/build/components/block-edit/edit.native.js +3 -4
  64. package/build/components/block-edit/edit.native.js.map +1 -1
  65. package/build/components/block-edit/index.js +17 -9
  66. package/build/components/block-edit/index.js.map +1 -1
  67. package/build/components/block-edit/multiple-usage-warning.js +47 -0
  68. package/build/components/block-edit/multiple-usage-warning.js.map +1 -0
  69. package/build/components/block-edit-visually-button/index.js +9 -6
  70. package/build/components/block-edit-visually-button/index.js.map +1 -1
  71. package/build/components/block-full-height-alignment-control/index.js +2 -2
  72. package/build/components/block-full-height-alignment-control/index.js.map +1 -1
  73. package/build/components/block-heading-level-dropdown/heading-level-icon.js +3 -5
  74. package/build/components/block-heading-level-dropdown/heading-level-icon.js.map +1 -1
  75. package/build/components/block-heading-level-dropdown/index.js +4 -4
  76. package/build/components/block-heading-level-dropdown/index.js.map +1 -1
  77. package/build/components/block-heading-level-dropdown/index.native.js +4 -4
  78. package/build/components/block-heading-level-dropdown/index.native.js.map +1 -1
  79. package/build/components/block-icon/index.js +6 -5
  80. package/build/components/block-icon/index.js.map +1 -1
  81. package/build/components/block-icon/index.native.js +6 -5
  82. package/build/components/block-icon/index.native.js.map +1 -1
  83. package/build/components/block-info-slot-fill/index.js +3 -3
  84. package/build/components/block-info-slot-fill/index.js.map +1 -1
  85. package/build/components/block-inspector/index.js +102 -88
  86. package/build/components/block-inspector/index.js.map +1 -1
  87. package/build/components/block-inspector/useBlockInspectorAnimationSettings.js +2 -2
  88. package/build/components/block-inspector/useBlockInspectorAnimationSettings.js.map +1 -1
  89. package/build/components/block-list/block-crash-warning.js +5 -4
  90. package/build/components/block-list/block-crash-warning.js.map +1 -1
  91. package/build/components/block-list/block-crash-warning.native.js +2 -2
  92. package/build/components/block-list/block-crash-warning.native.js.map +1 -1
  93. package/build/components/block-list/block-html.js +2 -2
  94. package/build/components/block-list/block-html.js.map +1 -1
  95. package/build/components/block-list/block-invalid-warning.js +25 -21
  96. package/build/components/block-list/block-invalid-warning.js.map +1 -1
  97. package/build/components/block-list/block-invalid-warning.native.js +12 -11
  98. package/build/components/block-list/block-invalid-warning.native.js.map +1 -1
  99. package/build/components/block-list/block-list-item-cell.native.js +5 -4
  100. package/build/components/block-list/block-list-item-cell.native.js.map +1 -1
  101. package/build/components/block-list/block-list-item.native.js +29 -28
  102. package/build/components/block-list/block-list-item.native.js.map +1 -1
  103. package/build/components/block-list/block-outline.native.js +2 -2
  104. package/build/components/block-list/block-outline.native.js.map +1 -1
  105. package/build/components/block-list/block-selection-button.native.js +35 -33
  106. package/build/components/block-list/block-selection-button.native.js.map +1 -1
  107. package/build/components/block-list/block.js +107 -62
  108. package/build/components/block-list/block.js.map +1 -1
  109. package/build/components/block-list/block.native.js +63 -54
  110. package/build/components/block-list/block.native.js.map +1 -1
  111. package/build/components/block-list/grid-item.native.js +5 -4
  112. package/build/components/block-list/grid-item.native.js.map +1 -1
  113. package/build/components/block-list/index.js +38 -34
  114. package/build/components/block-list/index.js.map +1 -1
  115. package/build/components/block-list/index.native.js +97 -85
  116. package/build/components/block-list/index.native.js.map +1 -1
  117. package/build/components/block-list/insertion-point.native.js +12 -10
  118. package/build/components/block-list/insertion-point.native.js.map +1 -1
  119. package/build/components/block-list/layout.js +7 -3
  120. package/build/components/block-list/layout.js.map +1 -1
  121. package/build/components/block-list/subdirectory-icon.js +8 -7
  122. package/build/components/block-list/subdirectory-icon.js.map +1 -1
  123. package/build/components/block-list/use-block-props/index.js +1 -1
  124. package/build/components/block-list/use-block-props/index.js.map +1 -1
  125. package/build/components/block-list-appender/index.js +9 -8
  126. package/build/components/block-list-appender/index.js.map +1 -1
  127. package/build/components/block-list-appender/index.native.js +4 -4
  128. package/build/components/block-list-appender/index.native.js.map +1 -1
  129. package/build/components/block-lock/menu-item.js +13 -10
  130. package/build/components/block-lock/menu-item.js.map +1 -1
  131. package/build/components/block-lock/modal.js +107 -90
  132. package/build/components/block-lock/modal.js.map +1 -1
  133. package/build/components/block-lock/toolbar.js +18 -15
  134. package/build/components/block-lock/toolbar.js.map +1 -1
  135. package/build/components/block-media-update-progress/index.native.js +17 -15
  136. package/build/components/block-media-update-progress/index.native.js.map +1 -1
  137. package/build/components/block-mover/button.js +19 -16
  138. package/build/components/block-mover/button.js.map +1 -1
  139. package/build/components/block-mover/index.js +34 -27
  140. package/build/components/block-mover/index.js.map +1 -1
  141. package/build/components/block-mover/index.native.js +29 -27
  142. package/build/components/block-mover/index.native.js.map +1 -1
  143. package/build/components/block-navigation/dropdown.js +11 -9
  144. package/build/components/block-navigation/dropdown.js.map +1 -1
  145. package/build/components/block-parent-selector/index.js +14 -15
  146. package/build/components/block-parent-selector/index.js.map +1 -1
  147. package/build/components/block-pattern-setup/index.js +88 -76
  148. package/build/components/block-pattern-setup/index.js.map +1 -1
  149. package/build/components/block-pattern-setup/setup-toolbar.js +50 -45
  150. package/build/components/block-pattern-setup/setup-toolbar.js.map +1 -1
  151. package/build/components/block-patterns-list/index.js +96 -86
  152. package/build/components/block-patterns-list/index.js.map +1 -1
  153. package/build/components/block-patterns-paging/index.js +70 -52
  154. package/build/components/block-patterns-paging/index.js.map +1 -1
  155. package/build/components/block-popover/cover.js +13 -10
  156. package/build/components/block-popover/cover.js.map +1 -1
  157. package/build/components/block-popover/drop-zone.js +11 -10
  158. package/build/components/block-popover/drop-zone.js.map +1 -1
  159. package/build/components/block-popover/inbetween.js +8 -7
  160. package/build/components/block-popover/inbetween.js.map +1 -1
  161. package/build/components/block-popover/index.js +9 -7
  162. package/build/components/block-popover/index.js.map +1 -1
  163. package/build/components/block-preview/auto.js +53 -47
  164. package/build/components/block-preview/auto.js.map +1 -1
  165. package/build/components/block-preview/index.js +16 -14
  166. package/build/components/block-preview/index.js.map +1 -1
  167. package/build/components/block-quick-navigation/index.js +24 -16
  168. package/build/components/block-quick-navigation/index.js.map +1 -1
  169. package/build/components/block-removal-warning-modal/index.js +18 -12
  170. package/build/components/block-removal-warning-modal/index.js.map +1 -1
  171. package/build/components/block-rename/modal.js +44 -37
  172. package/build/components/block-rename/modal.js.map +1 -1
  173. package/build/components/block-rename/rename-control.js +24 -21
  174. package/build/components/block-rename/rename-control.js.map +1 -1
  175. package/build/components/block-selection-clearer/index.js +2 -2
  176. package/build/components/block-selection-clearer/index.js.map +1 -1
  177. package/build/components/block-settings/button.native.js +13 -9
  178. package/build/components/block-settings/button.native.js.map +1 -1
  179. package/build/components/block-settings/container.native.js +40 -28
  180. package/build/components/block-settings/container.native.js.map +1 -1
  181. package/build/components/block-settings-menu/block-html-convert-button.js +5 -4
  182. package/build/components/block-settings-menu/block-html-convert-button.js.map +1 -1
  183. package/build/components/block-settings-menu/block-mode-toggle.js +5 -4
  184. package/build/components/block-settings-menu/block-mode-toggle.js.map +1 -1
  185. package/build/components/block-settings-menu/block-parent-selector-menu-item.js +7 -6
  186. package/build/components/block-settings-menu/block-parent-selector-menu-item.js.map +1 -1
  187. package/build/components/block-settings-menu/block-settings-dropdown.js +93 -75
  188. package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  189. package/build/components/block-settings-menu/index.js +10 -6
  190. package/build/components/block-settings-menu/index.js.map +1 -1
  191. package/build/components/block-settings-menu-controls/index.js +29 -24
  192. package/build/components/block-settings-menu-controls/index.js.map +1 -1
  193. package/build/components/block-styles/index.js +43 -38
  194. package/build/components/block-styles/index.js.map +1 -1
  195. package/build/components/block-styles/index.native.js +7 -7
  196. package/build/components/block-styles/index.native.js.map +1 -1
  197. package/build/components/block-styles/menu-items.js +17 -14
  198. package/build/components/block-styles/menu-items.js.map +1 -1
  199. package/build/components/block-styles/preview-panel.js +2 -2
  200. package/build/components/block-styles/preview-panel.js.map +1 -1
  201. package/build/components/block-styles/preview.native.js +24 -21
  202. package/build/components/block-styles/preview.native.js.map +1 -1
  203. package/build/components/block-switcher/block-styles-menu.js +8 -7
  204. package/build/components/block-switcher/block-styles-menu.js.map +1 -1
  205. package/build/components/block-switcher/block-transformations-menu.js +32 -30
  206. package/build/components/block-switcher/block-transformations-menu.js.map +1 -1
  207. package/build/components/block-switcher/block-transformations-menu.native.js +2 -2
  208. package/build/components/block-switcher/block-transformations-menu.native.js.map +1 -1
  209. package/build/components/block-switcher/block-variation-transformations.js +19 -17
  210. package/build/components/block-switcher/block-variation-transformations.js.map +1 -1
  211. package/build/components/block-switcher/index.js +85 -70
  212. package/build/components/block-switcher/index.js.map +1 -1
  213. package/build/components/block-switcher/pattern-transformations-menu.js +61 -51
  214. package/build/components/block-switcher/pattern-transformations-menu.js.map +1 -1
  215. package/build/components/block-switcher/preview-block-popover.js +22 -17
  216. package/build/components/block-switcher/preview-block-popover.js.map +1 -1
  217. package/build/components/block-toolbar/block-toolbar-menu.native.js +38 -34
  218. package/build/components/block-toolbar/block-toolbar-menu.native.js.map +1 -1
  219. package/build/components/block-toolbar/index.js +53 -43
  220. package/build/components/block-toolbar/index.js.map +1 -1
  221. package/build/components/block-toolbar/index.native.js +27 -21
  222. package/build/components/block-toolbar/index.native.js.map +1 -1
  223. package/build/components/block-toolbar/shuffle.js +7 -5
  224. package/build/components/block-toolbar/shuffle.js.map +1 -1
  225. package/build/components/block-tools/block-selection-button.js +61 -48
  226. package/build/components/block-tools/block-selection-button.js.map +1 -1
  227. package/build/components/block-tools/block-toolbar-breadcrumb.js +8 -7
  228. package/build/components/block-tools/block-toolbar-breadcrumb.js.map +1 -1
  229. package/build/components/block-tools/block-toolbar-popover.js +15 -14
  230. package/build/components/block-tools/block-toolbar-popover.js.map +1 -1
  231. package/build/components/block-tools/empty-block-inserter.js +13 -11
  232. package/build/components/block-tools/empty-block-inserter.js.map +1 -1
  233. package/build/components/block-tools/index.js +29 -26
  234. package/build/components/block-tools/index.js.map +1 -1
  235. package/build/components/block-tools/insertion-point.js +42 -40
  236. package/build/components/block-tools/insertion-point.js.map +1 -1
  237. package/build/components/block-tools/zoom-out-mode-inserters.js +33 -32
  238. package/build/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
  239. package/build/components/block-types-list/index.js +15 -15
  240. package/build/components/block-types-list/index.js.map +1 -1
  241. package/build/components/block-types-list/index.native.js +30 -26
  242. package/build/components/block-types-list/index.native.js.map +1 -1
  243. package/build/components/block-variation-picker/index.js +30 -25
  244. package/build/components/block-variation-picker/index.js.map +1 -1
  245. package/build/components/block-variation-picker/index.native.js +32 -25
  246. package/build/components/block-variation-picker/index.native.js.map +1 -1
  247. package/build/components/block-variation-transforms/index.js +53 -47
  248. package/build/components/block-variation-transforms/index.js.map +1 -1
  249. package/build/components/block-vertical-alignment-control/icons.js +31 -26
  250. package/build/components/block-vertical-alignment-control/icons.js.map +1 -1
  251. package/build/components/block-vertical-alignment-control/index.js +3 -3
  252. package/build/components/block-vertical-alignment-control/index.js.map +1 -1
  253. package/build/components/block-vertical-alignment-control/ui.js +2 -2
  254. package/build/components/block-vertical-alignment-control/ui.js.map +1 -1
  255. package/build/components/border-radius-control/all-input-control.js +3 -3
  256. package/build/components/border-radius-control/all-input-control.js.map +1 -1
  257. package/build/components/border-radius-control/index.js +43 -38
  258. package/build/components/border-radius-control/index.js.map +1 -1
  259. package/build/components/border-radius-control/input-controls.js +23 -21
  260. package/build/components/border-radius-control/input-controls.js.map +1 -1
  261. package/build/components/border-radius-control/linked-button.js +12 -11
  262. package/build/components/border-radius-control/linked-button.js.map +1 -1
  263. package/build/components/button-block-appender/index.js +19 -13
  264. package/build/components/button-block-appender/index.js.map +1 -1
  265. package/build/components/button-block-appender/index.native.js +28 -24
  266. package/build/components/button-block-appender/index.native.js.map +1 -1
  267. package/build/components/caption/index.native.js +22 -21
  268. package/build/components/caption/index.native.js.map +1 -1
  269. package/build/components/child-layout-control/index.js +137 -129
  270. package/build/components/child-layout-control/index.js.map +1 -1
  271. package/build/components/color-palette/control.js +2 -2
  272. package/build/components/color-palette/control.js.map +1 -1
  273. package/build/components/color-palette/with-color-context.js +2 -2
  274. package/build/components/color-palette/with-color-context.js.map +1 -1
  275. package/build/components/color-style-selector/index.js +29 -20
  276. package/build/components/color-style-selector/index.js.map +1 -1
  277. package/build/components/colors/utils.js +3 -3
  278. package/build/components/colors/utils.js.map +1 -1
  279. package/build/components/colors/with-colors.js +8 -7
  280. package/build/components/colors/with-colors.js.map +1 -1
  281. package/build/components/colors-gradients/control.js +53 -39
  282. package/build/components/colors-gradients/control.js.map +1 -1
  283. package/build/components/colors-gradients/dropdown.js +70 -61
  284. package/build/components/colors-gradients/dropdown.js.map +1 -1
  285. package/build/components/colors-gradients/panel-color-gradient-settings.js +21 -18
  286. package/build/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
  287. package/build/components/colors-gradients/panel-color-gradient-settings.native.js +11 -7
  288. package/build/components/colors-gradients/panel-color-gradient-settings.native.js.map +1 -1
  289. package/build/components/contrast-checker/index.js +10 -8
  290. package/build/components/contrast-checker/index.js.map +1 -1
  291. package/build/components/contrast-checker/index.native.js +12 -10
  292. package/build/components/contrast-checker/index.native.js.map +1 -1
  293. package/build/components/convert-to-group-buttons/index.js +17 -13
  294. package/build/components/convert-to-group-buttons/index.js.map +1 -1
  295. package/build/components/convert-to-group-buttons/toolbar.js +20 -18
  296. package/build/components/convert-to-group-buttons/toolbar.js.map +1 -1
  297. package/build/components/copy-handler/index.js +2 -2
  298. package/build/components/copy-handler/index.js.map +1 -1
  299. package/build/components/date-format-picker/index.js +44 -40
  300. package/build/components/date-format-picker/index.js.map +1 -1
  301. package/build/components/default-block-appender/index.js +32 -30
  302. package/build/components/default-block-appender/index.js.map +1 -1
  303. package/build/components/default-block-appender/index.native.js +14 -12
  304. package/build/components/default-block-appender/index.native.js.map +1 -1
  305. package/build/components/dimensions-tool/aspect-ratio-tool.js +13 -14
  306. package/build/components/dimensions-tool/aspect-ratio-tool.js.map +1 -1
  307. package/build/components/dimensions-tool/index.js +116 -115
  308. package/build/components/dimensions-tool/index.js.map +1 -1
  309. package/build/components/dimensions-tool/scale-tool.js +16 -16
  310. package/build/components/dimensions-tool/scale-tool.js.map +1 -1
  311. package/build/components/dimensions-tool/width-height-tool.js +37 -33
  312. package/build/components/dimensions-tool/width-height-tool.js.map +1 -1
  313. package/build/components/duotone-control/index.js +21 -18
  314. package/build/components/duotone-control/index.js.map +1 -1
  315. package/build/components/editable-text/index.js +6 -5
  316. package/build/components/editable-text/index.js.map +1 -1
  317. package/build/components/editor-styles/index.js +23 -21
  318. package/build/components/editor-styles/index.js.map +1 -1
  319. package/build/components/floating-toolbar/index.native.js +18 -16
  320. package/build/components/floating-toolbar/index.native.js.map +1 -1
  321. package/build/components/floating-toolbar/nav-up-icon.js +14 -13
  322. package/build/components/floating-toolbar/nav-up-icon.js.map +1 -1
  323. package/build/components/font-appearance-control/index.js +2 -2
  324. package/build/components/font-appearance-control/index.js.map +1 -1
  325. package/build/components/font-family/index.js +2 -2
  326. package/build/components/font-family/index.js.map +1 -1
  327. package/build/components/font-sizes/font-size-picker.js +2 -2
  328. package/build/components/font-sizes/font-size-picker.js.map +1 -1
  329. package/build/components/font-sizes/utils.js +4 -3
  330. package/build/components/font-sizes/utils.js.map +1 -1
  331. package/build/components/font-sizes/with-font-sizes.js +3 -3
  332. package/build/components/font-sizes/with-font-sizes.js.map +1 -1
  333. package/build/components/global-styles/advanced-panel.js +17 -15
  334. package/build/components/global-styles/advanced-panel.js.map +1 -1
  335. package/build/components/global-styles/background-panel.js +187 -121
  336. package/build/components/global-styles/background-panel.js.map +1 -1
  337. package/build/components/global-styles/border-panel.js +62 -56
  338. package/build/components/global-styles/border-panel.js.map +1 -1
  339. package/build/components/global-styles/color-panel.js +111 -87
  340. package/build/components/global-styles/color-panel.js.map +1 -1
  341. package/build/components/global-styles/color-panel.native.js +14 -11
  342. package/build/components/global-styles/color-panel.native.js.map +1 -1
  343. package/build/components/global-styles/dimensions-panel.js +183 -171
  344. package/build/components/global-styles/dimensions-panel.js.map +1 -1
  345. package/build/components/global-styles/filters-panel.js +78 -65
  346. package/build/components/global-styles/filters-panel.js.map +1 -1
  347. package/build/components/global-styles/hooks.js +15 -3
  348. package/build/components/global-styles/hooks.js.map +1 -1
  349. package/build/components/global-styles/image-settings-panel.js +26 -22
  350. package/build/components/global-styles/image-settings-panel.js.map +1 -1
  351. package/build/components/global-styles/index.js +18 -0
  352. package/build/components/global-styles/index.js.map +1 -1
  353. package/build/components/global-styles/shadow-panel-components.js +74 -65
  354. package/build/components/global-styles/shadow-panel-components.js.map +1 -1
  355. package/build/components/global-styles/theme-file-uri-utils.js +80 -0
  356. package/build/components/global-styles/theme-file-uri-utils.js.map +1 -0
  357. package/build/components/global-styles/typography-panel.js +175 -134
  358. package/build/components/global-styles/typography-panel.js.map +1 -1
  359. package/build/components/global-styles/use-global-styles-context.native.js +450 -0
  360. package/build/components/global-styles/use-global-styles-context.native.js.map +1 -0
  361. package/build/components/global-styles/use-global-styles-output.js +113 -78
  362. package/build/components/global-styles/use-global-styles-output.js.map +1 -1
  363. package/build/components/gradients/with-gradient.js +2 -2
  364. package/build/components/gradients/with-gradient.js.map +1 -1
  365. package/build/components/grid-visualizer/grid-item-resizer.js +59 -58
  366. package/build/components/grid-visualizer/grid-item-resizer.js.map +1 -1
  367. package/build/components/grid-visualizer/grid-visualizer.js +20 -15
  368. package/build/components/grid-visualizer/grid-visualizer.js.map +1 -1
  369. package/build/components/height-control/index.js +39 -32
  370. package/build/components/height-control/index.js.map +1 -1
  371. package/build/components/iframe/index.js +70 -62
  372. package/build/components/iframe/index.js.map +1 -1
  373. package/build/components/image-editor/aspect-ratio-dropdown.js +73 -69
  374. package/build/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
  375. package/build/components/image-editor/context.js +5 -4
  376. package/build/components/image-editor/context.js.map +1 -1
  377. package/build/components/image-editor/cropper.js +24 -21
  378. package/build/components/image-editor/cropper.js.map +1 -1
  379. package/build/components/image-editor/form-controls.js +11 -7
  380. package/build/components/image-editor/form-controls.js.map +1 -1
  381. package/build/components/image-editor/index.js +22 -13
  382. package/build/components/image-editor/index.js.map +1 -1
  383. package/build/components/image-editor/rotation-button.js +2 -2
  384. package/build/components/image-editor/rotation-button.js.map +1 -1
  385. package/build/components/image-editor/zoom-dropdown.js +4 -4
  386. package/build/components/image-editor/zoom-dropdown.js.map +1 -1
  387. package/build/components/image-link-destinations/index.native.js +37 -27
  388. package/build/components/image-link-destinations/index.native.js.map +1 -1
  389. package/build/components/image-size-control/index.js +53 -45
  390. package/build/components/image-size-control/index.js.map +1 -1
  391. package/build/components/index.native.js +37 -0
  392. package/build/components/index.native.js.map +1 -1
  393. package/build/components/inner-blocks/button-block-appender.js +2 -2
  394. package/build/components/inner-blocks/button-block-appender.js.map +1 -1
  395. package/build/components/inner-blocks/default-block-appender.js +2 -2
  396. package/build/components/inner-blocks/default-block-appender.js.map +1 -1
  397. package/build/components/inner-blocks/index.js +19 -16
  398. package/build/components/inner-blocks/index.js.map +1 -1
  399. package/build/components/inner-blocks/index.native.js +31 -29
  400. package/build/components/inner-blocks/index.native.js.map +1 -1
  401. package/build/components/inner-blocks/use-nested-settings-update.js +10 -13
  402. package/build/components/inner-blocks/use-nested-settings-update.js.map +1 -1
  403. package/build/components/inner-blocks/warning-max-depth-exceeded.native.js +20 -17
  404. package/build/components/inner-blocks/warning-max-depth-exceeded.native.js.map +1 -1
  405. package/build/components/inner-blocks/with-client-id.js +2 -2
  406. package/build/components/inner-blocks/with-client-id.js.map +1 -1
  407. package/build/components/inserter/block-patterns-explorer/index.js +22 -20
  408. package/build/components/inserter/block-patterns-explorer/index.js.map +1 -1
  409. package/build/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js +39 -36
  410. package/build/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js.map +1 -1
  411. package/build/components/inserter/block-patterns-explorer/pattern-list.js +25 -19
  412. package/build/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
  413. package/build/components/inserter/block-patterns-tab/index.js +38 -31
  414. package/build/components/inserter/block-patterns-tab/index.js.map +1 -1
  415. package/build/components/inserter/block-patterns-tab/pattern-category-preview-panel.js +21 -4
  416. package/build/components/inserter/block-patterns-tab/pattern-category-preview-panel.js.map +1 -1
  417. package/build/components/inserter/block-patterns-tab/pattern-category-previews.js +42 -31
  418. package/build/components/inserter/block-patterns-tab/pattern-category-previews.js.map +1 -1
  419. package/build/components/inserter/block-patterns-tab/patterns-filter.js +54 -42
  420. package/build/components/inserter/block-patterns-tab/patterns-filter.js.map +1 -1
  421. package/build/components/inserter/block-types-tab.js +108 -66
  422. package/build/components/inserter/block-types-tab.js.map +1 -1
  423. package/build/components/inserter/block-types-tab.native.js +2 -2
  424. package/build/components/inserter/block-types-tab.native.js.map +1 -1
  425. package/build/components/inserter/category-tabs/index.js +26 -20
  426. package/build/components/inserter/category-tabs/index.js.map +1 -1
  427. package/build/components/inserter/hooks/use-block-types-state.js +10 -4
  428. package/build/components/inserter/hooks/use-block-types-state.js.map +1 -1
  429. package/build/components/inserter/hooks/use-insertion-point.js +33 -5
  430. package/build/components/inserter/hooks/use-insertion-point.js.map +1 -1
  431. package/build/components/inserter/index.js +6 -6
  432. package/build/components/inserter/index.js.map +1 -1
  433. package/build/components/inserter/index.native.js +21 -19
  434. package/build/components/inserter/index.native.js.map +1 -1
  435. package/build/components/inserter/library.js +15 -8
  436. package/build/components/inserter/library.js.map +1 -1
  437. package/build/components/inserter/media-tab/media-list.js +9 -9
  438. package/build/components/inserter/media-tab/media-list.js.map +1 -1
  439. package/build/components/inserter/media-tab/media-panel.js +19 -17
  440. package/build/components/inserter/media-tab/media-panel.js.map +1 -1
  441. package/build/components/inserter/media-tab/media-preview.js +92 -66
  442. package/build/components/inserter/media-tab/media-preview.js.map +1 -1
  443. package/build/components/inserter/media-tab/media-tab.js +44 -36
  444. package/build/components/inserter/media-tab/media-tab.js.map +1 -1
  445. package/build/components/inserter/media-tab/utils.js +2 -2
  446. package/build/components/inserter/media-tab/utils.js.map +1 -1
  447. package/build/components/inserter/menu.js +101 -84
  448. package/build/components/inserter/menu.js.map +1 -1
  449. package/build/components/inserter/menu.native.js +34 -28
  450. package/build/components/inserter/menu.native.js.map +1 -1
  451. package/build/components/inserter/mobile-tab-navigation.js +56 -40
  452. package/build/components/inserter/mobile-tab-navigation.js.map +1 -1
  453. package/build/components/inserter/no-results.js +10 -7
  454. package/build/components/inserter/no-results.js.map +1 -1
  455. package/build/components/inserter/no-results.native.js +13 -8
  456. package/build/components/inserter/no-results.native.js.map +1 -1
  457. package/build/components/inserter/panel.js +15 -10
  458. package/build/components/inserter/panel.js.map +1 -1
  459. package/build/components/inserter/preview-panel.js +24 -20
  460. package/build/components/inserter/preview-panel.js.map +1 -1
  461. package/build/components/inserter/quick-inserter.js +35 -31
  462. package/build/components/inserter/quick-inserter.js.map +1 -1
  463. package/build/components/inserter/reusable-block-rename-hint.js +20 -18
  464. package/build/components/inserter/reusable-block-rename-hint.js.map +1 -1
  465. package/build/components/inserter/reusable-blocks-tab.native.js +2 -2
  466. package/build/components/inserter/reusable-blocks-tab.native.js.map +1 -1
  467. package/build/components/inserter/search-results.js +52 -41
  468. package/build/components/inserter/search-results.js.map +1 -1
  469. package/build/components/inserter/search-results.native.js +3 -3
  470. package/build/components/inserter/search-results.native.js.map +1 -1
  471. package/build/components/inserter/tabs.js +30 -26
  472. package/build/components/inserter/tabs.js.map +1 -1
  473. package/build/components/inserter/tabs.native.js +20 -18
  474. package/build/components/inserter/tabs.native.js.map +1 -1
  475. package/build/components/inserter/tips.js +7 -5
  476. package/build/components/inserter/tips.js.map +1 -1
  477. package/build/components/inserter-button/index.native.js +28 -23
  478. package/build/components/inserter-button/index.native.js.map +1 -1
  479. package/build/components/inserter-button/sparkles.js +8 -7
  480. package/build/components/inserter-button/sparkles.js.map +1 -1
  481. package/build/components/inserter-draggable-blocks/index.js +14 -13
  482. package/build/components/inserter-draggable-blocks/index.js.map +1 -1
  483. package/build/components/inserter-list-item/index.js +68 -62
  484. package/build/components/inserter-list-item/index.js.map +1 -1
  485. package/build/components/inserter-listbox/group.js +2 -2
  486. package/build/components/inserter-listbox/group.js.map +1 -1
  487. package/build/components/inserter-listbox/index.js +5 -4
  488. package/build/components/inserter-listbox/index.js.map +1 -1
  489. package/build/components/inserter-listbox/item.js +10 -8
  490. package/build/components/inserter-listbox/item.js.map +1 -1
  491. package/build/components/inserter-listbox/row.js +2 -2
  492. package/build/components/inserter-listbox/row.js.map +1 -1
  493. package/build/components/inspector-controls/block-support-slot-container.js +2 -2
  494. package/build/components/inspector-controls/block-support-slot-container.js.map +1 -1
  495. package/build/components/inspector-controls/block-support-tools-panel.js +5 -5
  496. package/build/components/inspector-controls/block-support-tools-panel.js.map +1 -1
  497. package/build/components/inspector-controls/fill.js +22 -17
  498. package/build/components/inspector-controls/fill.js.map +1 -1
  499. package/build/components/inspector-controls/fill.native.js +12 -5
  500. package/build/components/inspector-controls/fill.native.js.map +1 -1
  501. package/build/components/inspector-controls/index.js +3 -3
  502. package/build/components/inspector-controls/index.js.map +1 -1
  503. package/build/components/inspector-controls/slot.js +11 -10
  504. package/build/components/inspector-controls/slot.js.map +1 -1
  505. package/build/components/inspector-controls/slot.native.js +3 -3
  506. package/build/components/inspector-controls/slot.native.js.map +1 -1
  507. package/build/components/inspector-controls-tabs/advanced-controls-panel.js +7 -6
  508. package/build/components/inspector-controls-tabs/advanced-controls-panel.js.map +1 -1
  509. package/build/components/inspector-controls-tabs/advanced-controls-panel.native.js +11 -9
  510. package/build/components/inspector-controls-tabs/advanced-controls-panel.native.js.map +1 -1
  511. package/build/components/inspector-controls-tabs/index.js +44 -32
  512. package/build/components/inspector-controls-tabs/index.js.map +1 -1
  513. package/build/components/inspector-controls-tabs/position-controls-panel.js +8 -7
  514. package/build/components/inspector-controls-tabs/position-controls-panel.js.map +1 -1
  515. package/build/components/inspector-controls-tabs/settings-tab-hint.js +20 -18
  516. package/build/components/inspector-controls-tabs/settings-tab-hint.js.map +1 -1
  517. package/build/components/inspector-controls-tabs/settings-tab.js +6 -2
  518. package/build/components/inspector-controls-tabs/settings-tab.js.map +1 -1
  519. package/build/components/inspector-controls-tabs/styles-tab.js +31 -26
  520. package/build/components/inspector-controls-tabs/styles-tab.js.map +1 -1
  521. package/build/components/inspector-popover-header/index.js +31 -26
  522. package/build/components/inspector-popover-header/index.js.map +1 -1
  523. package/build/components/justify-content-control/index.js +3 -3
  524. package/build/components/justify-content-control/index.js.map +1 -1
  525. package/build/components/justify-content-control/ui.js +2 -2
  526. package/build/components/justify-content-control/ui.js.map +1 -1
  527. package/build/components/letter-spacing-control/index.js +3 -4
  528. package/build/components/letter-spacing-control/index.js.map +1 -1
  529. package/build/components/line-height-control/index.js +17 -16
  530. package/build/components/line-height-control/index.js.map +1 -1
  531. package/build/components/line-height-control/index.native.js +2 -2
  532. package/build/components/line-height-control/index.native.js.map +1 -1
  533. package/build/components/link-control/index.js +101 -84
  534. package/build/components/link-control/index.js.map +1 -1
  535. package/build/components/link-control/link-preview.js +62 -49
  536. package/build/components/link-control/link-preview.js.map +1 -1
  537. package/build/components/link-control/search-create-button.js +6 -5
  538. package/build/components/link-control/search-create-button.js.map +1 -1
  539. package/build/components/link-control/search-input.js +32 -31
  540. package/build/components/link-control/search-input.js.map +1 -1
  541. package/build/components/link-control/search-item.js +12 -11
  542. package/build/components/link-control/search-item.js.map +1 -1
  543. package/build/components/link-control/search-results.js +50 -46
  544. package/build/components/link-control/search-results.js.map +1 -1
  545. package/build/components/link-control/settings-drawer.js +37 -30
  546. package/build/components/link-control/settings-drawer.js.map +1 -1
  547. package/build/components/link-control/settings.js +10 -9
  548. package/build/components/link-control/settings.js.map +1 -1
  549. package/build/components/list-view/appender.js +24 -22
  550. package/build/components/list-view/appender.js.map +1 -1
  551. package/build/components/list-view/aria-referenced-text.js +6 -6
  552. package/build/components/list-view/aria-referenced-text.js.map +1 -1
  553. package/build/components/list-view/block-contents.js +32 -29
  554. package/build/components/list-view/block-contents.js.map +1 -1
  555. package/build/components/list-view/block-select-button.js +50 -42
  556. package/build/components/list-view/block-select-button.js.map +1 -1
  557. package/build/components/list-view/block.js +96 -84
  558. package/build/components/list-view/block.js.map +1 -1
  559. package/build/components/list-view/branch.js +101 -95
  560. package/build/components/list-view/branch.js.map +1 -1
  561. package/build/components/list-view/drop-indicator.js +38 -31
  562. package/build/components/list-view/drop-indicator.js.map +1 -1
  563. package/build/components/list-view/expander.js +8 -6
  564. package/build/components/list-view/expander.js.map +1 -1
  565. package/build/components/list-view/index.js +42 -38
  566. package/build/components/list-view/index.js.map +1 -1
  567. package/build/components/list-view/leaf.js +5 -4
  568. package/build/components/list-view/leaf.js.map +1 -1
  569. package/build/components/media-placeholder/index.js +99 -79
  570. package/build/components/media-placeholder/index.js.map +1 -1
  571. package/build/components/media-placeholder/index.native.js +63 -52
  572. package/build/components/media-placeholder/index.native.js.map +1 -1
  573. package/build/components/media-replace-flow/index.js +72 -60
  574. package/build/components/media-replace-flow/index.js.map +1 -1
  575. package/build/components/media-replace-flow/index.native.js +2 -2
  576. package/build/components/media-replace-flow/index.native.js.map +1 -1
  577. package/build/components/media-upload/index.native.js +44 -40
  578. package/build/components/media-upload/index.native.js.map +1 -1
  579. package/build/components/media-upload-progress/index.native.js +39 -15
  580. package/build/components/media-upload-progress/index.native.js.map +1 -1
  581. package/build/components/multi-selection-inspector/index.js +19 -15
  582. package/build/components/multi-selection-inspector/index.js.map +1 -1
  583. package/build/components/navigable-toolbar/index.js +9 -7
  584. package/build/components/navigable-toolbar/index.js.map +1 -1
  585. package/build/components/observe-typing/index.js +6 -6
  586. package/build/components/observe-typing/index.js.map +1 -1
  587. package/build/components/panel-color-settings/index.js +2 -2
  588. package/build/components/panel-color-settings/index.js.map +1 -1
  589. package/build/components/plain-text/index.js +4 -5
  590. package/build/components/plain-text/index.js.map +1 -1
  591. package/build/components/plain-text/index.native.js +3 -3
  592. package/build/components/plain-text/index.native.js.map +1 -1
  593. package/build/components/provider/block-refs-provider.js +5 -4
  594. package/build/components/provider/block-refs-provider.js.map +1 -1
  595. package/build/components/provider/index.js +11 -7
  596. package/build/components/provider/index.js.map +1 -1
  597. package/build/components/provider/index.native.js +5 -5
  598. package/build/components/provider/index.native.js.map +1 -1
  599. package/build/components/provider/with-registry-provider.js +30 -26
  600. package/build/components/provider/with-registry-provider.js.map +1 -1
  601. package/build/components/publish-date-time-picker/index.js +36 -15
  602. package/build/components/publish-date-time-picker/index.js.map +1 -1
  603. package/build/components/recursion-provider/index.js +6 -5
  604. package/build/components/recursion-provider/index.js.map +1 -1
  605. package/build/components/resizable-box-popover/index.js +7 -6
  606. package/build/components/resizable-box-popover/index.js.map +1 -1
  607. package/build/components/resolution-tool/index.js +12 -11
  608. package/build/components/resolution-tool/index.js.map +1 -1
  609. package/build/components/responsive-block-control/index.js +30 -26
  610. package/build/components/responsive-block-control/index.js.map +1 -1
  611. package/build/components/responsive-block-control/label.js +11 -7
  612. package/build/components/responsive-block-control/label.js.map +1 -1
  613. package/build/components/rich-text/content.js +8 -5
  614. package/build/components/rich-text/content.js.map +1 -1
  615. package/build/components/rich-text/embed-handler-picker.native.js +2 -2
  616. package/build/components/rich-text/embed-handler-picker.native.js.map +1 -1
  617. package/build/components/rich-text/format-edit.js +5 -5
  618. package/build/components/rich-text/format-edit.js.map +1 -1
  619. package/build/components/rich-text/format-toolbar/index.js +37 -33
  620. package/build/components/rich-text/format-toolbar/index.js.map +1 -1
  621. package/build/components/rich-text/format-toolbar/index.native.js +8 -7
  622. package/build/components/rich-text/format-toolbar/index.native.js.map +1 -1
  623. package/build/components/rich-text/format-toolbar-container.js +17 -12
  624. package/build/components/rich-text/format-toolbar-container.js.map +1 -1
  625. package/build/components/rich-text/format-toolbar-container.native.js +5 -4
  626. package/build/components/rich-text/format-toolbar-container.native.js.map +1 -1
  627. package/build/components/rich-text/get-rich-text-values.js +4 -4
  628. package/build/components/rich-text/get-rich-text-values.js.map +1 -1
  629. package/build/components/rich-text/index.js +87 -76
  630. package/build/components/rich-text/index.js.map +1 -1
  631. package/build/components/rich-text/index.native.js +51 -47
  632. package/build/components/rich-text/index.native.js.map +1 -1
  633. package/build/components/rich-text/multiline.js +62 -62
  634. package/build/components/rich-text/multiline.js.map +1 -1
  635. package/build/components/rich-text/native/format-edit.js +3 -4
  636. package/build/components/rich-text/native/format-edit.js.map +1 -1
  637. package/build/components/rich-text/native/index.native.js +87 -80
  638. package/build/components/rich-text/native/index.native.js.map +1 -1
  639. package/build/components/rich-text/native/toolbar-button-with-options.native.js +19 -16
  640. package/build/components/rich-text/native/toolbar-button-with-options.native.js.map +1 -1
  641. package/build/components/rich-text/toolbar-button.js +8 -7
  642. package/build/components/rich-text/toolbar-button.js.map +1 -1
  643. package/build/components/rich-text/utils.js +5 -4
  644. package/build/components/rich-text/utils.js.map +1 -1
  645. package/build/components/rich-text/with-deprecations.js +2 -2
  646. package/build/components/rich-text/with-deprecations.js.map +1 -1
  647. package/build/components/segmented-text-control/index.js +20 -19
  648. package/build/components/segmented-text-control/index.js.map +1 -1
  649. package/build/components/skip-to-selected-block/index.js +6 -6
  650. package/build/components/skip-to-selected-block/index.js.map +1 -1
  651. package/build/components/spacing-sizes-control/hooks/use-spacing-sizes.js +26 -14
  652. package/build/components/spacing-sizes-control/hooks/use-spacing-sizes.js.map +1 -1
  653. package/build/components/spacing-sizes-control/index.js +23 -19
  654. package/build/components/spacing-sizes-control/index.js.map +1 -1
  655. package/build/components/spacing-sizes-control/input-controls/axial.js +19 -18
  656. package/build/components/spacing-sizes-control/input-controls/axial.js.map +1 -1
  657. package/build/components/spacing-sizes-control/input-controls/separated.js +18 -17
  658. package/build/components/spacing-sizes-control/input-controls/separated.js.map +1 -1
  659. package/build/components/spacing-sizes-control/input-controls/single.js +2 -2
  660. package/build/components/spacing-sizes-control/input-controls/single.js.map +1 -1
  661. package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js +103 -100
  662. package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
  663. package/build/components/spacing-sizes-control/sides-dropdown/index.js +42 -34
  664. package/build/components/spacing-sizes-control/sides-dropdown/index.js.map +1 -1
  665. package/build/components/spacing-sizes-control/utils.js +2 -1
  666. package/build/components/spacing-sizes-control/utils.js.map +1 -1
  667. package/build/components/text-alignment-control/index.js +2 -2
  668. package/build/components/text-alignment-control/index.js.map +1 -1
  669. package/build/components/text-decoration-control/index.js +2 -2
  670. package/build/components/text-decoration-control/index.js.map +1 -1
  671. package/build/components/text-transform-control/index.js +2 -2
  672. package/build/components/text-transform-control/index.js.map +1 -1
  673. package/build/components/tool-selector/index.js +35 -26
  674. package/build/components/tool-selector/index.js.map +1 -1
  675. package/build/components/typewriter/index.js +5 -4
  676. package/build/components/typewriter/index.js.map +1 -1
  677. package/build/components/ungroup-button/index.native.js +8 -6
  678. package/build/components/ungroup-button/index.native.js.map +1 -1
  679. package/build/components/unit-control/index.js +2 -2
  680. package/build/components/unit-control/index.js.map +1 -1
  681. package/build/components/unsupported-block-details/index.native.js +31 -28
  682. package/build/components/unsupported-block-details/index.native.js.map +1 -1
  683. package/build/components/url-input/button.js +31 -28
  684. package/build/components/url-input/button.js.map +1 -1
  685. package/build/components/url-input/index.js +27 -22
  686. package/build/components/url-input/index.js.map +1 -1
  687. package/build/components/url-input/index.native.js +2 -2
  688. package/build/components/url-input/index.native.js.map +1 -1
  689. package/build/components/url-popover/image-url-input-ui.js +104 -91
  690. package/build/components/url-popover/image-url-input-ui.js.map +1 -1
  691. package/build/components/url-popover/index.js +24 -19
  692. package/build/components/url-popover/index.js.map +1 -1
  693. package/build/components/url-popover/link-editor.js +15 -14
  694. package/build/components/url-popover/link-editor.js.map +1 -1
  695. package/build/components/url-popover/link-viewer-url.js +6 -5
  696. package/build/components/url-popover/link-viewer-url.js.map +1 -1
  697. package/build/components/url-popover/link-viewer.js +14 -13
  698. package/build/components/url-popover/link-viewer.js.map +1 -1
  699. package/build/components/use-block-commands/index.js +2 -2
  700. package/build/components/use-block-commands/index.js.map +1 -1
  701. package/build/components/video-player/gridicon-play.native.js +8 -7
  702. package/build/components/video-player/gridicon-play.native.js.map +1 -1
  703. package/build/components/video-player/index.native.js +43 -40
  704. package/build/components/video-player/index.native.js.map +1 -1
  705. package/build/components/warning/index.js +34 -26
  706. package/build/components/warning/index.js.map +1 -1
  707. package/build/components/warning/index.native.js +17 -13
  708. package/build/components/warning/index.native.js.map +1 -1
  709. package/build/components/writing-flow/index.js +9 -6
  710. package/build/components/writing-flow/index.js.map +1 -1
  711. package/build/components/writing-flow/use-clipboard-handler.js +41 -19
  712. package/build/components/writing-flow/use-clipboard-handler.js.map +1 -1
  713. package/build/components/writing-flow/use-tab-nav.js +3 -3
  714. package/build/components/writing-flow/use-tab-nav.js.map +1 -1
  715. package/build/components/writing-mode-control/index.js +2 -2
  716. package/build/components/writing-mode-control/index.js.map +1 -1
  717. package/build/hooks/align.js +10 -10
  718. package/build/hooks/align.js.map +1 -1
  719. package/build/hooks/anchor.js +29 -24
  720. package/build/hooks/anchor.js.map +1 -1
  721. package/build/hooks/background.js +6 -5
  722. package/build/hooks/background.js.map +1 -1
  723. package/build/hooks/block-bindings.js +89 -0
  724. package/build/hooks/block-bindings.js.map +1 -0
  725. package/build/hooks/block-hooks.js +41 -33
  726. package/build/hooks/block-hooks.js.map +1 -1
  727. package/build/hooks/block-style-variation.js +142 -0
  728. package/build/hooks/block-style-variation.js.map +1 -0
  729. package/build/hooks/border.js +6 -5
  730. package/build/hooks/border.js.map +1 -1
  731. package/build/hooks/color.js +11 -9
  732. package/build/hooks/color.js.map +1 -1
  733. package/build/hooks/content-lock-ui.js +23 -15
  734. package/build/hooks/content-lock-ui.js.map +1 -1
  735. package/build/hooks/contrast-checker.js +2 -2
  736. package/build/hooks/contrast-checker.js.map +1 -1
  737. package/build/hooks/custom-class-name.js +17 -16
  738. package/build/hooks/custom-class-name.js.map +1 -1
  739. package/build/hooks/dimensions.js +24 -21
  740. package/build/hooks/dimensions.js.map +1 -1
  741. package/build/hooks/duotone.js +49 -45
  742. package/build/hooks/duotone.js.map +1 -1
  743. package/build/hooks/font-family.js +3 -3
  744. package/build/hooks/font-family.js.map +1 -1
  745. package/build/hooks/font-size.js +2 -2
  746. package/build/hooks/font-size.js.map +1 -1
  747. package/build/hooks/index.js +4 -2
  748. package/build/hooks/index.js.map +1 -1
  749. package/build/hooks/layout-child.js +26 -24
  750. package/build/hooks/layout-child.js.map +1 -1
  751. package/build/hooks/layout.js +61 -55
  752. package/build/hooks/layout.js.map +1 -1
  753. package/build/hooks/line-height.js +2 -2
  754. package/build/hooks/line-height.js.map +1 -1
  755. package/build/hooks/position.js +28 -26
  756. package/build/hooks/position.js.map +1 -1
  757. package/build/hooks/spacing-visualizer.js +10 -9
  758. package/build/hooks/spacing-visualizer.js.map +1 -1
  759. package/build/hooks/style.js +23 -13
  760. package/build/hooks/style.js.map +1 -1
  761. package/build/hooks/text-align.js +19 -18
  762. package/build/hooks/text-align.js.map +1 -1
  763. package/build/hooks/typography.js +6 -5
  764. package/build/hooks/typography.js.map +1 -1
  765. package/build/hooks/typography.native.js +11 -8
  766. package/build/hooks/typography.native.js.map +1 -1
  767. package/build/hooks/use-bindings-attributes.js +47 -15
  768. package/build/hooks/use-bindings-attributes.js.map +1 -1
  769. package/build/hooks/use-typography-props.js +4 -3
  770. package/build/hooks/use-typography-props.js.map +1 -1
  771. package/build/hooks/use-zoom-out.js +2 -2
  772. package/build/hooks/use-zoom-out.js.map +1 -1
  773. package/build/hooks/utils.js +18 -17
  774. package/build/hooks/utils.js.map +1 -1
  775. package/build/layouts/constrained.js +66 -58
  776. package/build/layouts/constrained.js.map +1 -1
  777. package/build/layouts/flex.js +75 -61
  778. package/build/layouts/flex.js.map +1 -1
  779. package/build/layouts/grid.js +146 -125
  780. package/build/layouts/grid.js.map +1 -1
  781. package/build/private-apis.js +7 -1
  782. package/build/private-apis.js.map +1 -1
  783. package/build/store/actions.js +40 -8
  784. package/build/store/actions.js.map +1 -1
  785. package/build/store/get-block-settings.js +2 -49
  786. package/build/store/get-block-settings.js.map +1 -1
  787. package/build/store/reducer.js +21 -14
  788. package/build/store/reducer.js.map +1 -1
  789. package/build/store/selectors.js +34 -6
  790. package/build/store/selectors.js.map +1 -1
  791. package/build/store/utils.js +2 -0
  792. package/build/store/utils.js.map +1 -1
  793. package/build/utils/transform-styles/index.js +1 -1
  794. package/build/utils/transform-styles/index.js.map +1 -1
  795. package/build-module/autocompleters/block.js +9 -6
  796. package/build-module/autocompleters/block.js.map +1 -1
  797. package/build-module/autocompleters/link.js +12 -8
  798. package/build-module/autocompleters/link.js.map +1 -1
  799. package/build-module/components/alignment-control/index.js +3 -3
  800. package/build-module/components/alignment-control/index.js.map +1 -1
  801. package/build-module/components/alignment-control/ui.js +2 -2
  802. package/build-module/components/alignment-control/ui.js.map +1 -1
  803. package/build-module/components/audio-player/audio-url-parser.native.js +16 -0
  804. package/build-module/components/audio-player/audio-url-parser.native.js.map +1 -0
  805. package/build-module/components/audio-player/index.native.js +167 -0
  806. package/build-module/components/audio-player/index.native.js.map +1 -0
  807. package/build-module/components/autocomplete/index.js +2 -2
  808. package/build-module/components/autocomplete/index.js.map +1 -1
  809. package/build-module/components/block-alignment-control/index.js +3 -3
  810. package/build-module/components/block-alignment-control/index.js.map +1 -1
  811. package/build-module/components/block-alignment-control/ui.js +34 -30
  812. package/build-module/components/block-alignment-control/ui.js.map +1 -1
  813. package/build-module/components/block-alignment-control/ui.native.js +2 -2
  814. package/build-module/components/block-alignment-control/ui.native.js.map +1 -1
  815. package/build-module/components/block-alignment-matrix-control/index.js +5 -5
  816. package/build-module/components/block-alignment-matrix-control/index.js.map +1 -1
  817. package/build-module/components/block-bindings-toolbar-indicator/index.js +94 -13
  818. package/build-module/components/block-bindings-toolbar-indicator/index.js.map +1 -1
  819. package/build-module/components/block-breadcrumb/index.js +38 -32
  820. package/build-module/components/block-breadcrumb/index.js.map +1 -1
  821. package/build-module/components/block-canvas/index.js +37 -31
  822. package/build-module/components/block-canvas/index.js.map +1 -1
  823. package/build-module/components/block-caption/index.native.js +15 -14
  824. package/build-module/components/block-caption/index.native.js.map +1 -1
  825. package/build-module/components/block-card/index.js +34 -28
  826. package/build-module/components/block-card/index.js.map +1 -1
  827. package/build-module/components/block-compare/block-view.js +28 -18
  828. package/build-module/components/block-compare/block-view.js.map +1 -1
  829. package/build-module/components/block-compare/index.js +24 -22
  830. package/build-module/components/block-compare/index.js.map +1 -1
  831. package/build-module/components/block-context/index.js +2 -2
  832. package/build-module/components/block-context/index.js.map +1 -1
  833. package/build-module/components/block-controls/fill.js +24 -16
  834. package/build-module/components/block-controls/fill.js.map +1 -1
  835. package/build-module/components/block-controls/index.js +3 -3
  836. package/build-module/components/block-controls/index.js.map +1 -1
  837. package/build-module/components/block-controls/slot.js +6 -4
  838. package/build-module/components/block-controls/slot.js.map +1 -1
  839. package/build-module/components/block-controls/slot.native.js +12 -9
  840. package/build-module/components/block-controls/slot.native.js.map +1 -1
  841. package/build-module/components/block-controls/use-has-block-controls.js +1 -1
  842. package/build-module/components/block-controls/use-has-block-controls.js.map +1 -1
  843. package/build-module/components/block-draggable/draggable-chip.js +28 -19
  844. package/build-module/components/block-draggable/draggable-chip.js.map +1 -1
  845. package/build-module/components/block-draggable/draggable-chip.native.js +10 -8
  846. package/build-module/components/block-draggable/draggable-chip.native.js.map +1 -1
  847. package/build-module/components/block-draggable/dropping-insertion-point.native.js +2 -2
  848. package/build-module/components/block-draggable/dropping-insertion-point.native.js.map +1 -1
  849. package/build-module/components/block-draggable/index.js +14 -13
  850. package/build-module/components/block-draggable/index.js.map +1 -1
  851. package/build-module/components/block-draggable/index.native.js +39 -30
  852. package/build-module/components/block-draggable/index.native.js.map +1 -1
  853. package/build-module/components/block-edit/edit.js +4 -4
  854. package/build-module/components/block-edit/edit.js.map +1 -1
  855. package/build-module/components/block-edit/edit.native.js +2 -2
  856. package/build-module/components/block-edit/edit.native.js.map +1 -1
  857. package/build-module/components/block-edit/index.js +19 -7
  858. package/build-module/components/block-edit/index.js.map +1 -1
  859. package/build-module/components/block-edit/multiple-usage-warning.js +40 -0
  860. package/build-module/components/block-edit/multiple-usage-warning.js.map +1 -0
  861. package/build-module/components/block-edit-visually-button/index.js +9 -6
  862. package/build-module/components/block-edit-visually-button/index.js.map +1 -1
  863. package/build-module/components/block-full-height-alignment-control/index.js +2 -2
  864. package/build-module/components/block-full-height-alignment-control/index.js.map +1 -1
  865. package/build-module/components/block-heading-level-dropdown/heading-level-icon.js +2 -3
  866. package/build-module/components/block-heading-level-dropdown/heading-level-icon.js.map +1 -1
  867. package/build-module/components/block-heading-level-dropdown/index.js +4 -4
  868. package/build-module/components/block-heading-level-dropdown/index.js.map +1 -1
  869. package/build-module/components/block-heading-level-dropdown/index.native.js +4 -4
  870. package/build-module/components/block-heading-level-dropdown/index.native.js.map +1 -1
  871. package/build-module/components/block-icon/index.js +6 -5
  872. package/build-module/components/block-icon/index.js.map +1 -1
  873. package/build-module/components/block-icon/index.native.js +6 -5
  874. package/build-module/components/block-icon/index.native.js.map +1 -1
  875. package/build-module/components/block-info-slot-fill/index.js +3 -3
  876. package/build-module/components/block-info-slot-fill/index.js.map +1 -1
  877. package/build-module/components/block-inspector/index.js +104 -88
  878. package/build-module/components/block-inspector/index.js.map +1 -1
  879. package/build-module/components/block-inspector/useBlockInspectorAnimationSettings.js +2 -2
  880. package/build-module/components/block-inspector/useBlockInspectorAnimationSettings.js.map +1 -1
  881. package/build-module/components/block-list/block-crash-warning.js +5 -4
  882. package/build-module/components/block-list/block-crash-warning.js.map +1 -1
  883. package/build-module/components/block-list/block-crash-warning.native.js +2 -2
  884. package/build-module/components/block-list/block-crash-warning.native.js.map +1 -1
  885. package/build-module/components/block-list/block-html.js +2 -2
  886. package/build-module/components/block-list/block-html.js.map +1 -1
  887. package/build-module/components/block-list/block-invalid-warning.js +27 -21
  888. package/build-module/components/block-list/block-invalid-warning.js.map +1 -1
  889. package/build-module/components/block-list/block-invalid-warning.native.js +12 -11
  890. package/build-module/components/block-list/block-invalid-warning.native.js.map +1 -1
  891. package/build-module/components/block-list/block-list-item-cell.native.js +5 -4
  892. package/build-module/components/block-list/block-list-item-cell.native.js.map +1 -1
  893. package/build-module/components/block-list/block-list-item.native.js +29 -26
  894. package/build-module/components/block-list/block-list-item.native.js.map +1 -1
  895. package/build-module/components/block-list/block-outline.native.js +2 -2
  896. package/build-module/components/block-list/block-outline.native.js.map +1 -1
  897. package/build-module/components/block-list/block-selection-button.native.js +36 -33
  898. package/build-module/components/block-list/block-selection-button.native.js.map +1 -1
  899. package/build-module/components/block-list/block.js +109 -61
  900. package/build-module/components/block-list/block.js.map +1 -1
  901. package/build-module/components/block-list/block.native.js +61 -51
  902. package/build-module/components/block-list/block.native.js.map +1 -1
  903. package/build-module/components/block-list/grid-item.native.js +5 -4
  904. package/build-module/components/block-list/grid-item.native.js.map +1 -1
  905. package/build-module/components/block-list/index.js +39 -34
  906. package/build-module/components/block-list/index.js.map +1 -1
  907. package/build-module/components/block-list/index.native.js +99 -85
  908. package/build-module/components/block-list/index.native.js.map +1 -1
  909. package/build-module/components/block-list/insertion-point.native.js +13 -10
  910. package/build-module/components/block-list/insertion-point.native.js.map +1 -1
  911. package/build-module/components/block-list/layout.js +7 -3
  912. package/build-module/components/block-list/layout.js.map +1 -1
  913. package/build-module/components/block-list/subdirectory-icon.js +8 -7
  914. package/build-module/components/block-list/subdirectory-icon.js.map +1 -1
  915. package/build-module/components/block-list/use-block-props/index.js +1 -1
  916. package/build-module/components/block-list/use-block-props/index.js.map +1 -1
  917. package/build-module/components/block-list-appender/index.js +9 -8
  918. package/build-module/components/block-list-appender/index.js.map +1 -1
  919. package/build-module/components/block-list-appender/index.native.js +4 -4
  920. package/build-module/components/block-list-appender/index.native.js.map +1 -1
  921. package/build-module/components/block-lock/menu-item.js +15 -10
  922. package/build-module/components/block-lock/menu-item.js.map +1 -1
  923. package/build-module/components/block-lock/modal.js +108 -90
  924. package/build-module/components/block-lock/modal.js.map +1 -1
  925. package/build-module/components/block-lock/toolbar.js +20 -15
  926. package/build-module/components/block-lock/toolbar.js.map +1 -1
  927. package/build-module/components/block-media-update-progress/index.native.js +18 -15
  928. package/build-module/components/block-media-update-progress/index.native.js.map +1 -1
  929. package/build-module/components/block-mover/button.js +21 -16
  930. package/build-module/components/block-mover/button.js.map +1 -1
  931. package/build-module/components/block-mover/index.js +35 -27
  932. package/build-module/components/block-mover/index.js.map +1 -1
  933. package/build-module/components/block-mover/index.native.js +30 -27
  934. package/build-module/components/block-mover/index.native.js.map +1 -1
  935. package/build-module/components/block-navigation/dropdown.js +12 -9
  936. package/build-module/components/block-navigation/dropdown.js.map +1 -1
  937. package/build-module/components/block-parent-selector/index.js +13 -13
  938. package/build-module/components/block-parent-selector/index.js.map +1 -1
  939. package/build-module/components/block-pattern-setup/index.js +90 -76
  940. package/build-module/components/block-pattern-setup/index.js.map +1 -1
  941. package/build-module/components/block-pattern-setup/setup-toolbar.js +51 -45
  942. package/build-module/components/block-pattern-setup/setup-toolbar.js.map +1 -1
  943. package/build-module/components/block-patterns-list/index.js +98 -86
  944. package/build-module/components/block-patterns-list/index.js.map +1 -1
  945. package/build-module/components/block-patterns-paging/index.js +71 -52
  946. package/build-module/components/block-patterns-paging/index.js.map +1 -1
  947. package/build-module/components/block-popover/cover.js +13 -10
  948. package/build-module/components/block-popover/cover.js.map +1 -1
  949. package/build-module/components/block-popover/drop-zone.js +11 -10
  950. package/build-module/components/block-popover/drop-zone.js.map +1 -1
  951. package/build-module/components/block-popover/inbetween.js +8 -7
  952. package/build-module/components/block-popover/inbetween.js.map +1 -1
  953. package/build-module/components/block-popover/index.js +9 -7
  954. package/build-module/components/block-popover/index.js.map +1 -1
  955. package/build-module/components/block-preview/auto.js +55 -47
  956. package/build-module/components/block-preview/auto.js.map +1 -1
  957. package/build-module/components/block-preview/index.js +17 -14
  958. package/build-module/components/block-preview/index.js.map +1 -1
  959. package/build-module/components/block-quick-navigation/index.js +25 -16
  960. package/build-module/components/block-quick-navigation/index.js.map +1 -1
  961. package/build-module/components/block-removal-warning-modal/index.js +19 -12
  962. package/build-module/components/block-removal-warning-modal/index.js.map +1 -1
  963. package/build-module/components/block-rename/modal.js +45 -37
  964. package/build-module/components/block-rename/modal.js.map +1 -1
  965. package/build-module/components/block-rename/rename-control.js +26 -21
  966. package/build-module/components/block-rename/rename-control.js.map +1 -1
  967. package/build-module/components/block-selection-clearer/index.js +2 -2
  968. package/build-module/components/block-selection-clearer/index.js.map +1 -1
  969. package/build-module/components/block-settings/button.native.js +13 -9
  970. package/build-module/components/block-settings/button.native.js.map +1 -1
  971. package/build-module/components/block-settings/container.native.js +42 -28
  972. package/build-module/components/block-settings/container.native.js.map +1 -1
  973. package/build-module/components/block-settings-menu/block-html-convert-button.js +5 -4
  974. package/build-module/components/block-settings-menu/block-html-convert-button.js.map +1 -1
  975. package/build-module/components/block-settings-menu/block-mode-toggle.js +5 -4
  976. package/build-module/components/block-settings-menu/block-mode-toggle.js.map +1 -1
  977. package/build-module/components/block-settings-menu/block-parent-selector-menu-item.js +7 -6
  978. package/build-module/components/block-settings-menu/block-parent-selector-menu-item.js.map +1 -1
  979. package/build-module/components/block-settings-menu/block-settings-dropdown.js +95 -75
  980. package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  981. package/build-module/components/block-settings-menu/index.js +10 -6
  982. package/build-module/components/block-settings-menu/index.js.map +1 -1
  983. package/build-module/components/block-settings-menu-controls/index.js +30 -24
  984. package/build-module/components/block-settings-menu-controls/index.js.map +1 -1
  985. package/build-module/components/block-styles/index.js +44 -38
  986. package/build-module/components/block-styles/index.js.map +1 -1
  987. package/build-module/components/block-styles/index.native.js +7 -7
  988. package/build-module/components/block-styles/index.native.js.map +1 -1
  989. package/build-module/components/block-styles/menu-items.js +18 -14
  990. package/build-module/components/block-styles/menu-items.js.map +1 -1
  991. package/build-module/components/block-styles/preview-panel.js +2 -2
  992. package/build-module/components/block-styles/preview-panel.js.map +1 -1
  993. package/build-module/components/block-styles/preview.native.js +25 -21
  994. package/build-module/components/block-styles/preview.native.js.map +1 -1
  995. package/build-module/components/block-switcher/block-styles-menu.js +8 -7
  996. package/build-module/components/block-switcher/block-styles-menu.js.map +1 -1
  997. package/build-module/components/block-switcher/block-transformations-menu.js +33 -28
  998. package/build-module/components/block-switcher/block-transformations-menu.js.map +1 -1
  999. package/build-module/components/block-switcher/block-transformations-menu.native.js +2 -2
  1000. package/build-module/components/block-switcher/block-transformations-menu.native.js.map +1 -1
  1001. package/build-module/components/block-switcher/block-variation-transformations.js +21 -17
  1002. package/build-module/components/block-switcher/block-variation-transformations.js.map +1 -1
  1003. package/build-module/components/block-switcher/index.js +87 -70
  1004. package/build-module/components/block-switcher/index.js.map +1 -1
  1005. package/build-module/components/block-switcher/pattern-transformations-menu.js +62 -51
  1006. package/build-module/components/block-switcher/pattern-transformations-menu.js.map +1 -1
  1007. package/build-module/components/block-switcher/preview-block-popover.js +23 -17
  1008. package/build-module/components/block-switcher/preview-block-popover.js.map +1 -1
  1009. package/build-module/components/block-toolbar/block-toolbar-menu.native.js +39 -34
  1010. package/build-module/components/block-toolbar/block-toolbar-menu.native.js.map +1 -1
  1011. package/build-module/components/block-toolbar/index.js +55 -43
  1012. package/build-module/components/block-toolbar/index.js.map +1 -1
  1013. package/build-module/components/block-toolbar/index.native.js +29 -21
  1014. package/build-module/components/block-toolbar/index.native.js.map +1 -1
  1015. package/build-module/components/block-toolbar/shuffle.js +7 -5
  1016. package/build-module/components/block-toolbar/shuffle.js.map +1 -1
  1017. package/build-module/components/block-tools/block-selection-button.js +61 -46
  1018. package/build-module/components/block-tools/block-selection-button.js.map +1 -1
  1019. package/build-module/components/block-tools/block-toolbar-breadcrumb.js +8 -7
  1020. package/build-module/components/block-tools/block-toolbar-breadcrumb.js.map +1 -1
  1021. package/build-module/components/block-tools/block-toolbar-popover.js +15 -14
  1022. package/build-module/components/block-tools/block-toolbar-popover.js.map +1 -1
  1023. package/build-module/components/block-tools/empty-block-inserter.js +13 -11
  1024. package/build-module/components/block-tools/empty-block-inserter.js.map +1 -1
  1025. package/build-module/components/block-tools/index.js +30 -26
  1026. package/build-module/components/block-tools/index.js.map +1 -1
  1027. package/build-module/components/block-tools/insertion-point.js +43 -40
  1028. package/build-module/components/block-tools/insertion-point.js.map +1 -1
  1029. package/build-module/components/block-tools/zoom-out-mode-inserters.js +34 -32
  1030. package/build-module/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
  1031. package/build-module/components/block-types-list/index.js +16 -15
  1032. package/build-module/components/block-types-list/index.js.map +1 -1
  1033. package/build-module/components/block-types-list/index.native.js +31 -26
  1034. package/build-module/components/block-types-list/index.native.js.map +1 -1
  1035. package/build-module/components/block-variation-picker/index.js +31 -25
  1036. package/build-module/components/block-variation-picker/index.js.map +1 -1
  1037. package/build-module/components/block-variation-picker/index.native.js +33 -25
  1038. package/build-module/components/block-variation-picker/index.native.js.map +1 -1
  1039. package/build-module/components/block-variation-transforms/index.js +54 -47
  1040. package/build-module/components/block-variation-transforms/index.js.map +1 -1
  1041. package/build-module/components/block-vertical-alignment-control/icons.js +31 -26
  1042. package/build-module/components/block-vertical-alignment-control/icons.js.map +1 -1
  1043. package/build-module/components/block-vertical-alignment-control/index.js +3 -3
  1044. package/build-module/components/block-vertical-alignment-control/index.js.map +1 -1
  1045. package/build-module/components/block-vertical-alignment-control/ui.js +2 -2
  1046. package/build-module/components/block-vertical-alignment-control/ui.js.map +1 -1
  1047. package/build-module/components/border-radius-control/all-input-control.js +3 -3
  1048. package/build-module/components/border-radius-control/all-input-control.js.map +1 -1
  1049. package/build-module/components/border-radius-control/index.js +45 -38
  1050. package/build-module/components/border-radius-control/index.js.map +1 -1
  1051. package/build-module/components/border-radius-control/input-controls.js +23 -21
  1052. package/build-module/components/border-radius-control/input-controls.js.map +1 -1
  1053. package/build-module/components/border-radius-control/linked-button.js +12 -11
  1054. package/build-module/components/border-radius-control/linked-button.js.map +1 -1
  1055. package/build-module/components/button-block-appender/index.js +20 -13
  1056. package/build-module/components/button-block-appender/index.js.map +1 -1
  1057. package/build-module/components/button-block-appender/index.native.js +29 -24
  1058. package/build-module/components/button-block-appender/index.native.js.map +1 -1
  1059. package/build-module/components/caption/index.native.js +22 -21
  1060. package/build-module/components/caption/index.native.js.map +1 -1
  1061. package/build-module/components/child-layout-control/index.js +139 -129
  1062. package/build-module/components/child-layout-control/index.js.map +1 -1
  1063. package/build-module/components/color-palette/control.js +2 -2
  1064. package/build-module/components/color-palette/control.js.map +1 -1
  1065. package/build-module/components/color-palette/with-color-context.js +2 -2
  1066. package/build-module/components/color-palette/with-color-context.js.map +1 -1
  1067. package/build-module/components/color-style-selector/index.js +29 -20
  1068. package/build-module/components/color-style-selector/index.js.map +1 -1
  1069. package/build-module/components/colors/utils.js +3 -3
  1070. package/build-module/components/colors/utils.js.map +1 -1
  1071. package/build-module/components/colors/with-colors.js +7 -7
  1072. package/build-module/components/colors/with-colors.js.map +1 -1
  1073. package/build-module/components/colors-gradients/control.js +54 -39
  1074. package/build-module/components/colors-gradients/control.js.map +1 -1
  1075. package/build-module/components/colors-gradients/dropdown.js +72 -61
  1076. package/build-module/components/colors-gradients/dropdown.js.map +1 -1
  1077. package/build-module/components/colors-gradients/panel-color-gradient-settings.js +23 -18
  1078. package/build-module/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
  1079. package/build-module/components/colors-gradients/panel-color-gradient-settings.native.js +13 -7
  1080. package/build-module/components/colors-gradients/panel-color-gradient-settings.native.js.map +1 -1
  1081. package/build-module/components/contrast-checker/index.js +10 -8
  1082. package/build-module/components/contrast-checker/index.js.map +1 -1
  1083. package/build-module/components/contrast-checker/index.native.js +13 -10
  1084. package/build-module/components/contrast-checker/index.native.js.map +1 -1
  1085. package/build-module/components/convert-to-group-buttons/index.js +19 -13
  1086. package/build-module/components/convert-to-group-buttons/index.js.map +1 -1
  1087. package/build-module/components/convert-to-group-buttons/toolbar.js +21 -18
  1088. package/build-module/components/convert-to-group-buttons/toolbar.js.map +1 -1
  1089. package/build-module/components/copy-handler/index.js +2 -2
  1090. package/build-module/components/copy-handler/index.js.map +1 -1
  1091. package/build-module/components/date-format-picker/index.js +45 -40
  1092. package/build-module/components/date-format-picker/index.js.map +1 -1
  1093. package/build-module/components/default-block-appender/index.js +33 -30
  1094. package/build-module/components/default-block-appender/index.js.map +1 -1
  1095. package/build-module/components/default-block-appender/index.native.js +14 -12
  1096. package/build-module/components/default-block-appender/index.native.js.map +1 -1
  1097. package/build-module/components/dimensions-tool/aspect-ratio-tool.js +12 -12
  1098. package/build-module/components/dimensions-tool/aspect-ratio-tool.js.map +1 -1
  1099. package/build-module/components/dimensions-tool/index.js +117 -113
  1100. package/build-module/components/dimensions-tool/index.js.map +1 -1
  1101. package/build-module/components/dimensions-tool/scale-tool.js +15 -14
  1102. package/build-module/components/dimensions-tool/scale-tool.js.map +1 -1
  1103. package/build-module/components/dimensions-tool/width-height-tool.js +39 -33
  1104. package/build-module/components/dimensions-tool/width-height-tool.js.map +1 -1
  1105. package/build-module/components/duotone-control/index.js +22 -18
  1106. package/build-module/components/duotone-control/index.js.map +1 -1
  1107. package/build-module/components/editable-text/index.js +6 -5
  1108. package/build-module/components/editable-text/index.js.map +1 -1
  1109. package/build-module/components/editor-styles/index.js +25 -21
  1110. package/build-module/components/editor-styles/index.js.map +1 -1
  1111. package/build-module/components/floating-toolbar/index.native.js +19 -16
  1112. package/build-module/components/floating-toolbar/index.native.js.map +1 -1
  1113. package/build-module/components/floating-toolbar/nav-up-icon.js +15 -13
  1114. package/build-module/components/floating-toolbar/nav-up-icon.js.map +1 -1
  1115. package/build-module/components/font-appearance-control/index.js +2 -2
  1116. package/build-module/components/font-appearance-control/index.js.map +1 -1
  1117. package/build-module/components/font-family/index.js +2 -2
  1118. package/build-module/components/font-family/index.js.map +1 -1
  1119. package/build-module/components/font-sizes/font-size-picker.js +2 -2
  1120. package/build-module/components/font-sizes/font-size-picker.js.map +1 -1
  1121. package/build-module/components/font-sizes/utils.js +3 -3
  1122. package/build-module/components/font-sizes/utils.js.map +1 -1
  1123. package/build-module/components/font-sizes/with-font-sizes.js +3 -3
  1124. package/build-module/components/font-sizes/with-font-sizes.js.map +1 -1
  1125. package/build-module/components/global-styles/advanced-panel.js +18 -15
  1126. package/build-module/components/global-styles/advanced-panel.js.map +1 -1
  1127. package/build-module/components/global-styles/background-panel.js +189 -122
  1128. package/build-module/components/global-styles/background-panel.js.map +1 -1
  1129. package/build-module/components/global-styles/border-panel.js +63 -56
  1130. package/build-module/components/global-styles/border-panel.js.map +1 -1
  1131. package/build-module/components/global-styles/color-panel.js +112 -87
  1132. package/build-module/components/global-styles/color-panel.js.map +1 -1
  1133. package/build-module/components/global-styles/color-panel.native.js +13 -10
  1134. package/build-module/components/global-styles/color-panel.native.js.map +1 -1
  1135. package/build-module/components/global-styles/dimensions-panel.js +184 -171
  1136. package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
  1137. package/build-module/components/global-styles/filters-panel.js +79 -65
  1138. package/build-module/components/global-styles/filters-panel.js.map +1 -1
  1139. package/build-module/components/global-styles/hooks.js +14 -3
  1140. package/build-module/components/global-styles/hooks.js.map +1 -1
  1141. package/build-module/components/global-styles/image-settings-panel.js +27 -22
  1142. package/build-module/components/global-styles/image-settings-panel.js.map +1 -1
  1143. package/build-module/components/global-styles/index.js +2 -2
  1144. package/build-module/components/global-styles/index.js.map +1 -1
  1145. package/build-module/components/global-styles/shadow-panel-components.js +74 -63
  1146. package/build-module/components/global-styles/shadow-panel-components.js.map +1 -1
  1147. package/build-module/components/global-styles/theme-file-uri-utils.js +73 -0
  1148. package/build-module/components/global-styles/theme-file-uri-utils.js.map +1 -0
  1149. package/build-module/components/global-styles/typography-panel.js +177 -135
  1150. package/build-module/components/global-styles/typography-panel.js.map +1 -1
  1151. package/build-module/components/global-styles/use-global-styles-context.native.js +431 -0
  1152. package/build-module/components/global-styles/use-global-styles-context.native.js.map +1 -0
  1153. package/build-module/components/global-styles/use-global-styles-output.js +114 -78
  1154. package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
  1155. package/build-module/components/gradients/with-gradient.js +2 -2
  1156. package/build-module/components/gradients/with-gradient.js.map +1 -1
  1157. package/build-module/components/grid-visualizer/grid-item-resizer.js +59 -58
  1158. package/build-module/components/grid-visualizer/grid-item-resizer.js.map +1 -1
  1159. package/build-module/components/grid-visualizer/grid-visualizer.js +20 -15
  1160. package/build-module/components/grid-visualizer/grid-visualizer.js.map +1 -1
  1161. package/build-module/components/height-control/index.js +40 -32
  1162. package/build-module/components/height-control/index.js.map +1 -1
  1163. package/build-module/components/iframe/index.js +72 -62
  1164. package/build-module/components/iframe/index.js.map +1 -1
  1165. package/build-module/components/image-editor/aspect-ratio-dropdown.js +75 -69
  1166. package/build-module/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
  1167. package/build-module/components/image-editor/context.js +5 -4
  1168. package/build-module/components/image-editor/context.js.map +1 -1
  1169. package/build-module/components/image-editor/cropper.js +26 -21
  1170. package/build-module/components/image-editor/cropper.js.map +1 -1
  1171. package/build-module/components/image-editor/form-controls.js +13 -7
  1172. package/build-module/components/image-editor/form-controls.js.map +1 -1
  1173. package/build-module/components/image-editor/index.js +23 -13
  1174. package/build-module/components/image-editor/index.js.map +1 -1
  1175. package/build-module/components/image-editor/rotation-button.js +2 -2
  1176. package/build-module/components/image-editor/rotation-button.js.map +1 -1
  1177. package/build-module/components/image-editor/zoom-dropdown.js +4 -4
  1178. package/build-module/components/image-editor/zoom-dropdown.js.map +1 -1
  1179. package/build-module/components/image-link-destinations/index.native.js +39 -27
  1180. package/build-module/components/image-link-destinations/index.native.js.map +1 -1
  1181. package/build-module/components/image-size-control/index.js +55 -45
  1182. package/build-module/components/image-size-control/index.js.map +1 -1
  1183. package/build-module/components/index.native.js +2 -0
  1184. package/build-module/components/index.native.js.map +1 -1
  1185. package/build-module/components/inner-blocks/button-block-appender.js +2 -2
  1186. package/build-module/components/inner-blocks/button-block-appender.js.map +1 -1
  1187. package/build-module/components/inner-blocks/default-block-appender.js +2 -2
  1188. package/build-module/components/inner-blocks/default-block-appender.js.map +1 -1
  1189. package/build-module/components/inner-blocks/index.js +19 -16
  1190. package/build-module/components/inner-blocks/index.js.map +1 -1
  1191. package/build-module/components/inner-blocks/index.native.js +31 -29
  1192. package/build-module/components/inner-blocks/index.native.js.map +1 -1
  1193. package/build-module/components/inner-blocks/use-nested-settings-update.js +11 -14
  1194. package/build-module/components/inner-blocks/use-nested-settings-update.js.map +1 -1
  1195. package/build-module/components/inner-blocks/warning-max-depth-exceeded.native.js +21 -17
  1196. package/build-module/components/inner-blocks/warning-max-depth-exceeded.native.js.map +1 -1
  1197. package/build-module/components/inner-blocks/with-client-id.js +2 -2
  1198. package/build-module/components/inner-blocks/with-client-id.js.map +1 -1
  1199. package/build-module/components/inserter/block-patterns-explorer/index.js +23 -20
  1200. package/build-module/components/inserter/block-patterns-explorer/index.js.map +1 -1
  1201. package/build-module/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js +40 -36
  1202. package/build-module/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js.map +1 -1
  1203. package/build-module/components/inserter/block-patterns-explorer/pattern-list.js +27 -19
  1204. package/build-module/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
  1205. package/build-module/components/inserter/block-patterns-tab/index.js +40 -31
  1206. package/build-module/components/inserter/block-patterns-tab/index.js.map +1 -1
  1207. package/build-module/components/inserter/block-patterns-tab/pattern-category-preview-panel.js +21 -5
  1208. package/build-module/components/inserter/block-patterns-tab/pattern-category-preview-panel.js.map +1 -1
  1209. package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js +44 -31
  1210. package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js.map +1 -1
  1211. package/build-module/components/inserter/block-patterns-tab/patterns-filter.js +56 -42
  1212. package/build-module/components/inserter/block-patterns-tab/patterns-filter.js.map +1 -1
  1213. package/build-module/components/inserter/block-types-tab.js +110 -67
  1214. package/build-module/components/inserter/block-types-tab.js.map +1 -1
  1215. package/build-module/components/inserter/block-types-tab.native.js +2 -2
  1216. package/build-module/components/inserter/block-types-tab.native.js.map +1 -1
  1217. package/build-module/components/inserter/category-tabs/index.js +27 -20
  1218. package/build-module/components/inserter/category-tabs/index.js.map +1 -1
  1219. package/build-module/components/inserter/hooks/use-block-types-state.js +11 -5
  1220. package/build-module/components/inserter/hooks/use-block-types-state.js.map +1 -1
  1221. package/build-module/components/inserter/hooks/use-insertion-point.js +33 -6
  1222. package/build-module/components/inserter/hooks/use-insertion-point.js.map +1 -1
  1223. package/build-module/components/inserter/index.js +6 -6
  1224. package/build-module/components/inserter/index.js.map +1 -1
  1225. package/build-module/components/inserter/index.native.js +23 -19
  1226. package/build-module/components/inserter/index.native.js.map +1 -1
  1227. package/build-module/components/inserter/library.js +14 -6
  1228. package/build-module/components/inserter/library.js.map +1 -1
  1229. package/build-module/components/inserter/media-tab/media-list.js +9 -9
  1230. package/build-module/components/inserter/media-tab/media-list.js.map +1 -1
  1231. package/build-module/components/inserter/media-tab/media-panel.js +20 -17
  1232. package/build-module/components/inserter/media-tab/media-panel.js.map +1 -1
  1233. package/build-module/components/inserter/media-tab/media-preview.js +94 -66
  1234. package/build-module/components/inserter/media-tab/media-preview.js.map +1 -1
  1235. package/build-module/components/inserter/media-tab/media-tab.js +46 -36
  1236. package/build-module/components/inserter/media-tab/media-tab.js.map +1 -1
  1237. package/build-module/components/inserter/media-tab/utils.js +2 -2
  1238. package/build-module/components/inserter/media-tab/utils.js.map +1 -1
  1239. package/build-module/components/inserter/menu.js +102 -83
  1240. package/build-module/components/inserter/menu.js.map +1 -1
  1241. package/build-module/components/inserter/menu.native.js +36 -28
  1242. package/build-module/components/inserter/menu.native.js.map +1 -1
  1243. package/build-module/components/inserter/mobile-tab-navigation.js +57 -40
  1244. package/build-module/components/inserter/mobile-tab-navigation.js.map +1 -1
  1245. package/build-module/components/inserter/no-results.js +11 -7
  1246. package/build-module/components/inserter/no-results.js.map +1 -1
  1247. package/build-module/components/inserter/no-results.native.js +14 -8
  1248. package/build-module/components/inserter/no-results.native.js.map +1 -1
  1249. package/build-module/components/inserter/panel.js +17 -10
  1250. package/build-module/components/inserter/panel.js.map +1 -1
  1251. package/build-module/components/inserter/preview-panel.js +25 -20
  1252. package/build-module/components/inserter/preview-panel.js.map +1 -1
  1253. package/build-module/components/inserter/quick-inserter.js +36 -31
  1254. package/build-module/components/inserter/quick-inserter.js.map +1 -1
  1255. package/build-module/components/inserter/reusable-block-rename-hint.js +21 -18
  1256. package/build-module/components/inserter/reusable-block-rename-hint.js.map +1 -1
  1257. package/build-module/components/inserter/reusable-blocks-tab.native.js +2 -2
  1258. package/build-module/components/inserter/reusable-blocks-tab.native.js.map +1 -1
  1259. package/build-module/components/inserter/search-results.js +53 -41
  1260. package/build-module/components/inserter/search-results.js.map +1 -1
  1261. package/build-module/components/inserter/search-results.native.js +3 -3
  1262. package/build-module/components/inserter/search-results.native.js.map +1 -1
  1263. package/build-module/components/inserter/tabs.js +31 -26
  1264. package/build-module/components/inserter/tabs.js.map +1 -1
  1265. package/build-module/components/inserter/tabs.native.js +20 -18
  1266. package/build-module/components/inserter/tabs.native.js.map +1 -1
  1267. package/build-module/components/inserter/tips.js +7 -5
  1268. package/build-module/components/inserter/tips.js.map +1 -1
  1269. package/build-module/components/inserter-button/index.native.js +29 -23
  1270. package/build-module/components/inserter-button/index.native.js.map +1 -1
  1271. package/build-module/components/inserter-button/sparkles.js +8 -7
  1272. package/build-module/components/inserter-button/sparkles.js.map +1 -1
  1273. package/build-module/components/inserter-draggable-blocks/index.js +14 -13
  1274. package/build-module/components/inserter-draggable-blocks/index.js.map +1 -1
  1275. package/build-module/components/inserter-list-item/index.js +69 -62
  1276. package/build-module/components/inserter-list-item/index.js.map +1 -1
  1277. package/build-module/components/inserter-listbox/group.js +2 -2
  1278. package/build-module/components/inserter-listbox/group.js.map +1 -1
  1279. package/build-module/components/inserter-listbox/index.js +6 -4
  1280. package/build-module/components/inserter-listbox/index.js.map +1 -1
  1281. package/build-module/components/inserter-listbox/item.js +10 -8
  1282. package/build-module/components/inserter-listbox/item.js.map +1 -1
  1283. package/build-module/components/inserter-listbox/row.js +2 -2
  1284. package/build-module/components/inserter-listbox/row.js.map +1 -1
  1285. package/build-module/components/inspector-controls/block-support-slot-container.js +2 -2
  1286. package/build-module/components/inspector-controls/block-support-slot-container.js.map +1 -1
  1287. package/build-module/components/inspector-controls/block-support-tools-panel.js +5 -5
  1288. package/build-module/components/inspector-controls/block-support-tools-panel.js.map +1 -1
  1289. package/build-module/components/inspector-controls/fill.js +22 -17
  1290. package/build-module/components/inspector-controls/fill.js.map +1 -1
  1291. package/build-module/components/inspector-controls/fill.native.js +14 -5
  1292. package/build-module/components/inspector-controls/fill.native.js.map +1 -1
  1293. package/build-module/components/inspector-controls/index.js +3 -3
  1294. package/build-module/components/inspector-controls/index.js.map +1 -1
  1295. package/build-module/components/inspector-controls/slot.js +11 -10
  1296. package/build-module/components/inspector-controls/slot.js.map +1 -1
  1297. package/build-module/components/inspector-controls/slot.native.js +3 -3
  1298. package/build-module/components/inspector-controls/slot.native.js.map +1 -1
  1299. package/build-module/components/inspector-controls-tabs/advanced-controls-panel.js +7 -6
  1300. package/build-module/components/inspector-controls-tabs/advanced-controls-panel.js.map +1 -1
  1301. package/build-module/components/inspector-controls-tabs/advanced-controls-panel.native.js +11 -9
  1302. package/build-module/components/inspector-controls-tabs/advanced-controls-panel.native.js.map +1 -1
  1303. package/build-module/components/inspector-controls-tabs/index.js +45 -32
  1304. package/build-module/components/inspector-controls-tabs/index.js.map +1 -1
  1305. package/build-module/components/inspector-controls-tabs/position-controls-panel.js +8 -7
  1306. package/build-module/components/inspector-controls-tabs/position-controls-panel.js.map +1 -1
  1307. package/build-module/components/inspector-controls-tabs/settings-tab-hint.js +21 -18
  1308. package/build-module/components/inspector-controls-tabs/settings-tab-hint.js.map +1 -1
  1309. package/build-module/components/inspector-controls-tabs/settings-tab.js +8 -2
  1310. package/build-module/components/inspector-controls-tabs/settings-tab.js.map +1 -1
  1311. package/build-module/components/inspector-controls-tabs/styles-tab.js +33 -26
  1312. package/build-module/components/inspector-controls-tabs/styles-tab.js.map +1 -1
  1313. package/build-module/components/inspector-popover-header/index.js +32 -26
  1314. package/build-module/components/inspector-popover-header/index.js.map +1 -1
  1315. package/build-module/components/justify-content-control/index.js +3 -3
  1316. package/build-module/components/justify-content-control/index.js.map +1 -1
  1317. package/build-module/components/justify-content-control/ui.js +2 -2
  1318. package/build-module/components/justify-content-control/ui.js.map +1 -1
  1319. package/build-module/components/letter-spacing-control/index.js +2 -2
  1320. package/build-module/components/letter-spacing-control/index.js.map +1 -1
  1321. package/build-module/components/line-height-control/index.js +17 -16
  1322. package/build-module/components/line-height-control/index.js.map +1 -1
  1323. package/build-module/components/line-height-control/index.native.js +2 -2
  1324. package/build-module/components/line-height-control/index.native.js.map +1 -1
  1325. package/build-module/components/link-control/index.js +102 -82
  1326. package/build-module/components/link-control/index.js.map +1 -1
  1327. package/build-module/components/link-control/link-preview.js +64 -49
  1328. package/build-module/components/link-control/link-preview.js.map +1 -1
  1329. package/build-module/components/link-control/search-create-button.js +6 -5
  1330. package/build-module/components/link-control/search-create-button.js.map +1 -1
  1331. package/build-module/components/link-control/search-input.js +33 -31
  1332. package/build-module/components/link-control/search-input.js.map +1 -1
  1333. package/build-module/components/link-control/search-item.js +12 -11
  1334. package/build-module/components/link-control/search-item.js.map +1 -1
  1335. package/build-module/components/link-control/search-results.js +51 -46
  1336. package/build-module/components/link-control/search-results.js.map +1 -1
  1337. package/build-module/components/link-control/settings-drawer.js +39 -30
  1338. package/build-module/components/link-control/settings-drawer.js.map +1 -1
  1339. package/build-module/components/link-control/settings.js +11 -9
  1340. package/build-module/components/link-control/settings.js.map +1 -1
  1341. package/build-module/components/list-view/appender.js +25 -22
  1342. package/build-module/components/list-view/appender.js.map +1 -1
  1343. package/build-module/components/list-view/aria-referenced-text.js +5 -4
  1344. package/build-module/components/list-view/aria-referenced-text.js.map +1 -1
  1345. package/build-module/components/list-view/block-contents.js +34 -29
  1346. package/build-module/components/list-view/block-contents.js.map +1 -1
  1347. package/build-module/components/list-view/block-select-button.js +51 -42
  1348. package/build-module/components/list-view/block-select-button.js.map +1 -1
  1349. package/build-module/components/list-view/block.js +98 -84
  1350. package/build-module/components/list-view/block.js.map +1 -1
  1351. package/build-module/components/list-view/branch.js +102 -93
  1352. package/build-module/components/list-view/branch.js.map +1 -1
  1353. package/build-module/components/list-view/drop-indicator.js +39 -31
  1354. package/build-module/components/list-view/drop-indicator.js.map +1 -1
  1355. package/build-module/components/list-view/expander.js +8 -6
  1356. package/build-module/components/list-view/expander.js.map +1 -1
  1357. package/build-module/components/list-view/index.js +43 -38
  1358. package/build-module/components/list-view/index.js.map +1 -1
  1359. package/build-module/components/list-view/leaf.js +5 -4
  1360. package/build-module/components/list-view/leaf.js.map +1 -1
  1361. package/build-module/components/media-placeholder/index.js +101 -79
  1362. package/build-module/components/media-placeholder/index.js.map +1 -1
  1363. package/build-module/components/media-placeholder/index.native.js +65 -52
  1364. package/build-module/components/media-placeholder/index.native.js.map +1 -1
  1365. package/build-module/components/media-replace-flow/index.js +74 -60
  1366. package/build-module/components/media-replace-flow/index.js.map +1 -1
  1367. package/build-module/components/media-replace-flow/index.native.js +2 -2
  1368. package/build-module/components/media-replace-flow/index.native.js.map +1 -1
  1369. package/build-module/components/media-upload/index.native.js +46 -40
  1370. package/build-module/components/media-upload/index.native.js.map +1 -1
  1371. package/build-module/components/media-upload-progress/index.native.js +41 -16
  1372. package/build-module/components/media-upload-progress/index.native.js.map +1 -1
  1373. package/build-module/components/multi-selection-inspector/index.js +20 -15
  1374. package/build-module/components/multi-selection-inspector/index.js.map +1 -1
  1375. package/build-module/components/navigable-toolbar/index.js +9 -7
  1376. package/build-module/components/navigable-toolbar/index.js.map +1 -1
  1377. package/build-module/components/observe-typing/index.js +5 -4
  1378. package/build-module/components/observe-typing/index.js.map +1 -1
  1379. package/build-module/components/panel-color-settings/index.js +2 -2
  1380. package/build-module/components/panel-color-settings/index.js.map +1 -1
  1381. package/build-module/components/plain-text/index.js +3 -3
  1382. package/build-module/components/plain-text/index.js.map +1 -1
  1383. package/build-module/components/plain-text/index.native.js +3 -3
  1384. package/build-module/components/plain-text/index.native.js.map +1 -1
  1385. package/build-module/components/provider/block-refs-provider.js +5 -4
  1386. package/build-module/components/provider/block-refs-provider.js.map +1 -1
  1387. package/build-module/components/provider/index.js +12 -8
  1388. package/build-module/components/provider/index.js.map +1 -1
  1389. package/build-module/components/provider/index.native.js +4 -3
  1390. package/build-module/components/provider/index.native.js.map +1 -1
  1391. package/build-module/components/provider/with-registry-provider.js +32 -28
  1392. package/build-module/components/provider/with-registry-provider.js.map +1 -1
  1393. package/build-module/components/publish-date-time-picker/index.js +37 -17
  1394. package/build-module/components/publish-date-time-picker/index.js.map +1 -1
  1395. package/build-module/components/recursion-provider/index.js +6 -5
  1396. package/build-module/components/recursion-provider/index.js.map +1 -1
  1397. package/build-module/components/resizable-box-popover/index.js +7 -6
  1398. package/build-module/components/resizable-box-popover/index.js.map +1 -1
  1399. package/build-module/components/resolution-tool/index.js +12 -11
  1400. package/build-module/components/resolution-tool/index.js.map +1 -1
  1401. package/build-module/components/responsive-block-control/index.js +31 -26
  1402. package/build-module/components/responsive-block-control/index.js.map +1 -1
  1403. package/build-module/components/responsive-block-control/label.js +13 -7
  1404. package/build-module/components/responsive-block-control/label.js.map +1 -1
  1405. package/build-module/components/rich-text/content.js +8 -5
  1406. package/build-module/components/rich-text/content.js.map +1 -1
  1407. package/build-module/components/rich-text/embed-handler-picker.native.js +2 -2
  1408. package/build-module/components/rich-text/embed-handler-picker.native.js.map +1 -1
  1409. package/build-module/components/rich-text/format-edit.js +5 -5
  1410. package/build-module/components/rich-text/format-edit.js.map +1 -1
  1411. package/build-module/components/rich-text/format-toolbar/index.js +39 -33
  1412. package/build-module/components/rich-text/format-toolbar/index.js.map +1 -1
  1413. package/build-module/components/rich-text/format-toolbar/index.native.js +10 -7
  1414. package/build-module/components/rich-text/format-toolbar/index.native.js.map +1 -1
  1415. package/build-module/components/rich-text/format-toolbar-container.js +17 -12
  1416. package/build-module/components/rich-text/format-toolbar-container.js.map +1 -1
  1417. package/build-module/components/rich-text/format-toolbar-container.native.js +5 -4
  1418. package/build-module/components/rich-text/format-toolbar-container.native.js.map +1 -1
  1419. package/build-module/components/rich-text/get-rich-text-values.js +3 -2
  1420. package/build-module/components/rich-text/get-rich-text-values.js.map +1 -1
  1421. package/build-module/components/rich-text/index.js +90 -77
  1422. package/build-module/components/rich-text/index.js.map +1 -1
  1423. package/build-module/components/rich-text/index.native.js +53 -47
  1424. package/build-module/components/rich-text/index.native.js.map +1 -1
  1425. package/build-module/components/rich-text/multiline.js +62 -62
  1426. package/build-module/components/rich-text/multiline.js.map +1 -1
  1427. package/build-module/components/rich-text/native/format-edit.js +3 -4
  1428. package/build-module/components/rich-text/native/format-edit.js.map +1 -1
  1429. package/build-module/components/rich-text/native/index.native.js +89 -80
  1430. package/build-module/components/rich-text/native/index.native.js.map +1 -1
  1431. package/build-module/components/rich-text/native/toolbar-button-with-options.native.js +20 -14
  1432. package/build-module/components/rich-text/native/toolbar-button-with-options.native.js.map +1 -1
  1433. package/build-module/components/rich-text/toolbar-button.js +8 -7
  1434. package/build-module/components/rich-text/toolbar-button.js.map +1 -1
  1435. package/build-module/components/rich-text/utils.js +5 -4
  1436. package/build-module/components/rich-text/utils.js.map +1 -1
  1437. package/build-module/components/rich-text/with-deprecations.js +2 -2
  1438. package/build-module/components/rich-text/with-deprecations.js.map +1 -1
  1439. package/build-module/components/segmented-text-control/index.js +20 -17
  1440. package/build-module/components/segmented-text-control/index.js.map +1 -1
  1441. package/build-module/components/skip-to-selected-block/index.js +5 -4
  1442. package/build-module/components/skip-to-selected-block/index.js.map +1 -1
  1443. package/build-module/components/spacing-sizes-control/hooks/use-spacing-sizes.js +26 -14
  1444. package/build-module/components/spacing-sizes-control/hooks/use-spacing-sizes.js.map +1 -1
  1445. package/build-module/components/spacing-sizes-control/index.js +24 -19
  1446. package/build-module/components/spacing-sizes-control/index.js.map +1 -1
  1447. package/build-module/components/spacing-sizes-control/input-controls/axial.js +20 -18
  1448. package/build-module/components/spacing-sizes-control/input-controls/axial.js.map +1 -1
  1449. package/build-module/components/spacing-sizes-control/input-controls/separated.js +19 -17
  1450. package/build-module/components/spacing-sizes-control/input-controls/separated.js.map +1 -1
  1451. package/build-module/components/spacing-sizes-control/input-controls/single.js +2 -2
  1452. package/build-module/components/spacing-sizes-control/input-controls/single.js.map +1 -1
  1453. package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js +106 -101
  1454. package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
  1455. package/build-module/components/spacing-sizes-control/sides-dropdown/index.js +44 -34
  1456. package/build-module/components/spacing-sizes-control/sides-dropdown/index.js.map +1 -1
  1457. package/build-module/components/spacing-sizes-control/utils.js +1 -0
  1458. package/build-module/components/spacing-sizes-control/utils.js.map +1 -1
  1459. package/build-module/components/text-alignment-control/index.js +2 -2
  1460. package/build-module/components/text-alignment-control/index.js.map +1 -1
  1461. package/build-module/components/text-decoration-control/index.js +2 -2
  1462. package/build-module/components/text-decoration-control/index.js.map +1 -1
  1463. package/build-module/components/text-transform-control/index.js +2 -2
  1464. package/build-module/components/text-transform-control/index.js.map +1 -1
  1465. package/build-module/components/tool-selector/index.js +37 -26
  1466. package/build-module/components/tool-selector/index.js.map +1 -1
  1467. package/build-module/components/typewriter/index.js +5 -4
  1468. package/build-module/components/typewriter/index.js.map +1 -1
  1469. package/build-module/components/ungroup-button/index.native.js +8 -6
  1470. package/build-module/components/ungroup-button/index.native.js.map +1 -1
  1471. package/build-module/components/unit-control/index.js +2 -2
  1472. package/build-module/components/unit-control/index.js.map +1 -1
  1473. package/build-module/components/unsupported-block-details/index.native.js +32 -28
  1474. package/build-module/components/unsupported-block-details/index.native.js.map +1 -1
  1475. package/build-module/components/url-input/button.js +32 -28
  1476. package/build-module/components/url-input/button.js.map +1 -1
  1477. package/build-module/components/url-input/index.js +28 -20
  1478. package/build-module/components/url-input/index.js.map +1 -1
  1479. package/build-module/components/url-input/index.native.js +2 -2
  1480. package/build-module/components/url-input/index.native.js.map +1 -1
  1481. package/build-module/components/url-popover/image-url-input-ui.js +106 -91
  1482. package/build-module/components/url-popover/image-url-input-ui.js.map +1 -1
  1483. package/build-module/components/url-popover/index.js +25 -19
  1484. package/build-module/components/url-popover/index.js.map +1 -1
  1485. package/build-module/components/url-popover/link-editor.js +16 -14
  1486. package/build-module/components/url-popover/link-editor.js.map +1 -1
  1487. package/build-module/components/url-popover/link-viewer-url.js +6 -5
  1488. package/build-module/components/url-popover/link-viewer-url.js.map +1 -1
  1489. package/build-module/components/url-popover/link-viewer.js +15 -13
  1490. package/build-module/components/url-popover/link-viewer.js.map +1 -1
  1491. package/build-module/components/use-block-commands/index.js +2 -2
  1492. package/build-module/components/use-block-commands/index.js.map +1 -1
  1493. package/build-module/components/video-player/gridicon-play.native.js +8 -7
  1494. package/build-module/components/video-player/gridicon-play.native.js.map +1 -1
  1495. package/build-module/components/video-player/index.native.js +44 -40
  1496. package/build-module/components/video-player/index.native.js.map +1 -1
  1497. package/build-module/components/warning/index.js +35 -26
  1498. package/build-module/components/warning/index.js.map +1 -1
  1499. package/build-module/components/warning/index.native.js +18 -13
  1500. package/build-module/components/warning/index.native.js.map +1 -1
  1501. package/build-module/components/writing-flow/index.js +11 -6
  1502. package/build-module/components/writing-flow/index.js.map +1 -1
  1503. package/build-module/components/writing-flow/use-clipboard-handler.js +42 -20
  1504. package/build-module/components/writing-flow/use-clipboard-handler.js.map +1 -1
  1505. package/build-module/components/writing-flow/use-tab-nav.js +3 -3
  1506. package/build-module/components/writing-flow/use-tab-nav.js.map +1 -1
  1507. package/build-module/components/writing-mode-control/index.js +2 -2
  1508. package/build-module/components/writing-mode-control/index.js.map +1 -1
  1509. package/build-module/hooks/align.js +9 -8
  1510. package/build-module/hooks/align.js.map +1 -1
  1511. package/build-module/hooks/anchor.js +30 -22
  1512. package/build-module/hooks/anchor.js.map +1 -1
  1513. package/build-module/hooks/background.js +6 -5
  1514. package/build-module/hooks/background.js.map +1 -1
  1515. package/build-module/hooks/block-bindings.js +81 -0
  1516. package/build-module/hooks/block-bindings.js.map +1 -0
  1517. package/build-module/hooks/block-hooks.js +42 -33
  1518. package/build-module/hooks/block-hooks.js.map +1 -1
  1519. package/build-module/hooks/block-style-variation.js +136 -0
  1520. package/build-module/hooks/block-style-variation.js.map +1 -0
  1521. package/build-module/hooks/border.js +6 -5
  1522. package/build-module/hooks/border.js.map +1 -1
  1523. package/build-module/hooks/color.js +11 -9
  1524. package/build-module/hooks/color.js.map +1 -1
  1525. package/build-module/hooks/content-lock-ui.js +25 -15
  1526. package/build-module/hooks/content-lock-ui.js.map +1 -1
  1527. package/build-module/hooks/contrast-checker.js +2 -2
  1528. package/build-module/hooks/contrast-checker.js.map +1 -1
  1529. package/build-module/hooks/custom-class-name.js +17 -16
  1530. package/build-module/hooks/custom-class-name.js.map +1 -1
  1531. package/build-module/hooks/dimensions.js +26 -21
  1532. package/build-module/hooks/dimensions.js.map +1 -1
  1533. package/build-module/hooks/duotone.js +51 -45
  1534. package/build-module/hooks/duotone.js.map +1 -1
  1535. package/build-module/hooks/font-family.js +3 -3
  1536. package/build-module/hooks/font-family.js.map +1 -1
  1537. package/build-module/hooks/font-size.js +2 -2
  1538. package/build-module/hooks/font-size.js.map +1 -1
  1539. package/build-module/hooks/index.js +4 -2
  1540. package/build-module/hooks/index.js.map +1 -1
  1541. package/build-module/hooks/layout-child.js +28 -24
  1542. package/build-module/hooks/layout-child.js.map +1 -1
  1543. package/build-module/hooks/layout.js +63 -55
  1544. package/build-module/hooks/layout.js.map +1 -1
  1545. package/build-module/hooks/line-height.js +2 -2
  1546. package/build-module/hooks/line-height.js.map +1 -1
  1547. package/build-module/hooks/position.js +28 -26
  1548. package/build-module/hooks/position.js.map +1 -1
  1549. package/build-module/hooks/spacing-visualizer.js +10 -9
  1550. package/build-module/hooks/spacing-visualizer.js.map +1 -1
  1551. package/build-module/hooks/style.js +25 -13
  1552. package/build-module/hooks/style.js.map +1 -1
  1553. package/build-module/hooks/text-align.js +20 -19
  1554. package/build-module/hooks/text-align.js.map +1 -1
  1555. package/build-module/hooks/typography.js +6 -5
  1556. package/build-module/hooks/typography.js.map +1 -1
  1557. package/build-module/hooks/typography.native.js +12 -8
  1558. package/build-module/hooks/typography.native.js.map +1 -1
  1559. package/build-module/hooks/use-bindings-attributes.js +48 -14
  1560. package/build-module/hooks/use-bindings-attributes.js.map +1 -1
  1561. package/build-module/hooks/use-typography-props.js +3 -3
  1562. package/build-module/hooks/use-typography-props.js.map +1 -1
  1563. package/build-module/hooks/use-zoom-out.js +2 -2
  1564. package/build-module/hooks/use-zoom-out.js.map +1 -1
  1565. package/build-module/hooks/utils.js +18 -17
  1566. package/build-module/hooks/utils.js.map +1 -1
  1567. package/build-module/layouts/constrained.js +68 -58
  1568. package/build-module/layouts/constrained.js.map +1 -1
  1569. package/build-module/layouts/flex.js +77 -61
  1570. package/build-module/layouts/flex.js.map +1 -1
  1571. package/build-module/layouts/grid.js +148 -125
  1572. package/build-module/layouts/grid.js.map +1 -1
  1573. package/build-module/private-apis.js +7 -1
  1574. package/build-module/private-apis.js.map +1 -1
  1575. package/build-module/store/actions.js +40 -8
  1576. package/build-module/store/actions.js.map +1 -1
  1577. package/build-module/store/get-block-settings.js +2 -46
  1578. package/build-module/store/get-block-settings.js.map +1 -1
  1579. package/build-module/store/reducer.js +21 -14
  1580. package/build-module/store/reducer.js.map +1 -1
  1581. package/build-module/store/selectors.js +35 -7
  1582. package/build-module/store/selectors.js.map +1 -1
  1583. package/build-module/store/utils.js +1 -0
  1584. package/build-module/store/utils.js.map +1 -1
  1585. package/build-module/utils/transform-styles/index.js +1 -1
  1586. package/build-module/utils/transform-styles/index.js.map +1 -1
  1587. package/build-style/content-rtl.css +5 -1
  1588. package/build-style/content.css +5 -1
  1589. package/build-style/style-rtl.css +96 -73
  1590. package/build-style/style.css +96 -73
  1591. package/package.json +33 -32
  1592. package/src/components/alignment-control/test/index.js +1 -1
  1593. package/src/components/audio-player/audio-url-parser.native.js +20 -0
  1594. package/src/components/audio-player/index.native.js +221 -0
  1595. package/src/components/audio-player/styles.native.scss +114 -0
  1596. package/src/components/audio-player/test/audio-url-parser.native.js +53 -0
  1597. package/src/components/block-bindings-toolbar-indicator/index.js +127 -10
  1598. package/src/components/block-bindings-toolbar-indicator/style.scss +7 -8
  1599. package/src/components/block-canvas/style.scss +2 -6
  1600. package/src/components/block-card/index.js +9 -5
  1601. package/src/components/block-card/style.scss +0 -11
  1602. package/src/components/block-edit/index.js +13 -2
  1603. package/src/components/block-edit/multiple-usage-warning.js +46 -0
  1604. package/src/components/block-inspector/index.js +2 -4
  1605. package/src/components/block-inspector/useBlockInspectorAnimationSettings.js +2 -5
  1606. package/src/components/block-list/block-invalid-warning.native.js +1 -1
  1607. package/src/components/block-list/block.js +64 -18
  1608. package/src/components/block-list/block.native.js +17 -9
  1609. package/src/components/block-patterns-list/index.js +4 -1
  1610. package/src/components/block-patterns-list/style.scss +23 -20
  1611. package/src/components/block-preview/style.scss +0 -26
  1612. package/src/components/block-settings/container.native.js +2 -0
  1613. package/src/components/block-toolbar/index.js +1 -1
  1614. package/src/components/block-tools/index.js +6 -5
  1615. package/src/components/block-tools/style.scss +2 -2
  1616. package/src/components/block-tools/zoom-out-mode-inserters.js +4 -3
  1617. package/src/components/block-variation-picker/content.scss +1 -1
  1618. package/src/components/border-radius-control/all-input-control.js +1 -1
  1619. package/src/components/border-radius-control/input-controls.js +1 -1
  1620. package/src/components/button-block-appender/index.js +2 -0
  1621. package/src/components/child-layout-control/index.js +12 -12
  1622. package/src/components/colors/utils.js +2 -2
  1623. package/src/components/colors/with-colors.js +2 -1
  1624. package/src/components/colors-gradients/control.js +3 -11
  1625. package/src/components/contrast-checker/test/index.js +8 -8
  1626. package/src/components/dimensions-tool/aspect-ratio-tool.js +1 -1
  1627. package/src/components/dimensions-tool/scale-tool.js +1 -1
  1628. package/src/components/dimensions-tool/width-height-tool.js +2 -2
  1629. package/src/components/font-sizes/utils.js +2 -1
  1630. package/src/components/global-styles/background-panel.js +128 -49
  1631. package/src/components/global-styles/border-panel.js +8 -5
  1632. package/src/components/global-styles/color-panel.js +27 -22
  1633. package/src/components/global-styles/color-panel.native.js +1 -1
  1634. package/src/components/global-styles/dimensions-panel.js +7 -8
  1635. package/src/components/global-styles/hooks.js +14 -1
  1636. package/src/components/global-styles/index.js +3 -0
  1637. package/src/components/global-styles/shadow-panel-components.js +11 -5
  1638. package/src/components/global-styles/test/theme-file-uri-utils.js +66 -0
  1639. package/src/components/global-styles/test/use-global-styles-context.native.js +434 -0
  1640. package/src/components/global-styles/test/use-global-styles-output.js +11 -10
  1641. package/src/components/global-styles/theme-file-uri-utils.js +77 -0
  1642. package/src/components/global-styles/typography-panel.js +50 -5
  1643. package/src/components/global-styles/use-global-styles-context.native.js +586 -0
  1644. package/src/components/global-styles/use-global-styles-output.js +199 -101
  1645. package/src/components/grid-visualizer/grid-visualizer.js +8 -1
  1646. package/src/components/grid-visualizer/style.scss +2 -1
  1647. package/src/components/height-control/index.js +1 -1
  1648. package/src/components/iframe/content.scss +4 -0
  1649. package/src/components/index.native.js +7 -0
  1650. package/src/components/inner-blocks/use-nested-settings-update.js +9 -16
  1651. package/src/components/inner-blocks/warning-max-depth-exceeded.native.js +1 -1
  1652. package/src/components/inserter/block-patterns-explorer/pattern-list.js +1 -1
  1653. package/src/components/inserter/block-patterns-tab/pattern-category-preview-panel.js +16 -2
  1654. package/src/components/inserter/block-patterns-tab/pattern-category-previews.js +6 -1
  1655. package/src/components/inserter/block-patterns-tab/patterns-filter.js +3 -2
  1656. package/src/components/inserter/block-types-tab.js +119 -78
  1657. package/src/components/inserter/category-tabs/index.js +1 -1
  1658. package/src/components/inserter/hooks/use-block-types-state.js +27 -6
  1659. package/src/components/inserter/hooks/use-insertion-point.js +53 -7
  1660. package/src/components/inserter/library.js +17 -7
  1661. package/src/components/inserter/menu.js +24 -11
  1662. package/src/components/inserter/quick-inserter.js +3 -1
  1663. package/src/components/inserter/search-results.js +2 -1
  1664. package/src/components/inserter/style.scss +45 -18
  1665. package/src/components/inserter/tabs.js +2 -2
  1666. package/src/components/inspector-controls/fill.native.js +3 -5
  1667. package/src/components/inspector-controls-tabs/index.js +15 -3
  1668. package/src/components/inspector-controls-tabs/style.scss +2 -10
  1669. package/src/components/link-control/index.js +10 -1
  1670. package/src/components/link-control/link-preview.js +1 -0
  1671. package/src/components/link-control/search-input.js +1 -1
  1672. package/src/components/link-control/style.scss +9 -3
  1673. package/src/components/list-view/block-contents.js +1 -1
  1674. package/src/components/media-placeholder/index.js +1 -1
  1675. package/src/components/media-placeholder/index.native.js +2 -2
  1676. package/src/components/media-upload-progress/index.native.js +22 -2
  1677. package/src/components/provider/with-registry-provider.js +33 -38
  1678. package/src/components/publish-date-time-picker/index.js +43 -15
  1679. package/src/components/resolution-tool/index.js +1 -1
  1680. package/src/components/rich-text/index.js +11 -5
  1681. package/src/components/rich-text/native/index.native.js +3 -2
  1682. package/src/components/rich-text/native/test/index.native.js +13 -13
  1683. package/src/components/spacing-sizes-control/hooks/use-spacing-sizes.js +58 -16
  1684. package/src/components/spacing-sizes-control/input-controls/spacing-input-control.js +4 -3
  1685. package/src/components/spacing-sizes-control/utils.js +2 -0
  1686. package/src/components/video-player/index.native.js +1 -1
  1687. package/src/components/writing-flow/use-clipboard-handler.js +48 -23
  1688. package/src/hooks/block-bindings.js +92 -0
  1689. package/src/hooks/block-bindings.scss +3 -0
  1690. package/src/hooks/block-style-variation.js +156 -0
  1691. package/src/hooks/font-family.js +1 -1
  1692. package/src/hooks/index.js +4 -0
  1693. package/src/hooks/layout.js +1 -2
  1694. package/src/hooks/position.js +1 -1
  1695. package/src/hooks/style.js +9 -1
  1696. package/src/hooks/text-align.js +17 -11
  1697. package/src/hooks/use-bindings-attributes.js +48 -5
  1698. package/src/hooks/use-typography-props.js +2 -1
  1699. package/src/hooks/use-zoom-out.js +9 -2
  1700. package/src/hooks/utils.js +21 -4
  1701. package/src/layouts/flex.js +2 -2
  1702. package/src/layouts/grid.js +5 -5
  1703. package/src/private-apis.js +6 -0
  1704. package/src/store/actions.js +46 -13
  1705. package/src/store/get-block-settings.js +1 -46
  1706. package/src/store/reducer.js +24 -11
  1707. package/src/store/selectors.js +68 -11
  1708. package/src/store/utils.js +2 -0
  1709. package/src/style.scss +1 -0
  1710. package/src/utils/test/__snapshots__/transform-styles.js.snap +1 -1
  1711. package/src/utils/test/transform-styles.js +2 -2
  1712. package/src/utils/transform-styles/index.js +3 -1
@@ -1,4 +1,3 @@
1
- import { createElement, Fragment } from "react";
2
1
  /**
3
2
  * External dependencies
4
3
  */
@@ -28,6 +27,9 @@ import EmbedHandlerPicker from './embed-handler-picker';
28
27
  import { Content } from './content';
29
28
  import RichText from './native';
30
29
  import { withDeprecations } from './with-deprecations';
30
+ import { jsx as _jsx } from "react/jsx-runtime";
31
+ import { Fragment as _Fragment } from "react/jsx-runtime";
32
+ import { jsxs as _jsxs } from "react/jsx-runtime";
31
33
  const classes = 'block-editor-rich-text__editable';
32
34
  export function RichTextWrapper({
33
35
  children,
@@ -432,7 +434,7 @@ export function RichTextWrapper({
432
434
  __unstableMarkAutomaticChange();
433
435
  }, [onReplace, __unstableMarkAutomaticChange]);
434
436
  const mergedRef = useMergeRefs([providedRef, fallbackRef]);
435
- return createElement(RichText, {
437
+ return /*#__PURE__*/_jsx(RichText, {
436
438
  clientId: clientId,
437
439
  identifier: identifier,
438
440
  nativeEditorRef: mergedRef,
@@ -490,50 +492,54 @@ export function RichTextWrapper({
490
492
  // for native.
491
493
  ,
492
494
  id: props.id,
493
- style: props.style
494
- }, ({
495
- isSelected: nestedIsSelected,
496
- value,
497
- onChange,
498
- onFocus,
499
- editableProps,
500
- editableTagName: TagName
501
- }) => createElement(Fragment, null, children && children({
502
- value,
503
- onChange,
504
- onFocus
505
- }), nestedIsSelected && hasFormats && createElement(FormatToolbarContainer, {
506
- inline: inlineToolbar,
507
- anchorRef: fallbackRef.current
508
- }), nestedIsSelected && createElement(RemoveBrowserShortcuts, null), createElement(Autocomplete, {
509
- onReplace: onReplace,
510
- completers: autocompleters,
511
- record: value,
512
- onChange: onChange,
513
- isSelected: nestedIsSelected,
514
- contentRef: fallbackRef
515
- }, ({
516
- listBoxId,
517
- activeId,
518
- onKeyDown
519
- }) => createElement(TagName, {
520
- ...editableProps,
521
- ...props,
522
- style: props.style ? {
523
- ...props.style,
524
- ...editableProps.style
525
- } : editableProps.style,
526
- className: clsx(classes, props.className, editableProps.className),
527
- "aria-autocomplete": listBoxId ? 'list' : undefined,
528
- "aria-owns": listBoxId,
529
- "aria-activedescendant": activeId,
530
- onKeyDown: event => {
531
- onKeyDown(event);
532
- editableProps.onKeyDown(event);
533
- }
534
- })), createElement(EmbedHandlerPicker, {
535
- ref: embedHandlerPickerRef
536
- })));
495
+ style: props.style,
496
+ children: ({
497
+ isSelected: nestedIsSelected,
498
+ value,
499
+ onChange,
500
+ onFocus,
501
+ editableProps,
502
+ editableTagName: TagName
503
+ }) => /*#__PURE__*/_jsxs(_Fragment, {
504
+ children: [children && children({
505
+ value,
506
+ onChange,
507
+ onFocus
508
+ }), nestedIsSelected && hasFormats && /*#__PURE__*/_jsx(FormatToolbarContainer, {
509
+ inline: inlineToolbar,
510
+ anchorRef: fallbackRef.current
511
+ }), nestedIsSelected && /*#__PURE__*/_jsx(RemoveBrowserShortcuts, {}), /*#__PURE__*/_jsx(Autocomplete, {
512
+ onReplace: onReplace,
513
+ completers: autocompleters,
514
+ record: value,
515
+ onChange: onChange,
516
+ isSelected: nestedIsSelected,
517
+ contentRef: fallbackRef,
518
+ children: ({
519
+ listBoxId,
520
+ activeId,
521
+ onKeyDown
522
+ }) => /*#__PURE__*/_jsx(TagName, {
523
+ ...editableProps,
524
+ ...props,
525
+ style: props.style ? {
526
+ ...props.style,
527
+ ...editableProps.style
528
+ } : editableProps.style,
529
+ className: clsx(classes, props.className, editableProps.className),
530
+ "aria-autocomplete": listBoxId ? 'list' : undefined,
531
+ "aria-owns": listBoxId,
532
+ "aria-activedescendant": activeId,
533
+ onKeyDown: event => {
534
+ onKeyDown(event);
535
+ editableProps.onKeyDown(event);
536
+ }
537
+ })
538
+ }), /*#__PURE__*/_jsx(EmbedHandlerPicker, {
539
+ ref: embedHandlerPickerRef
540
+ })]
541
+ })
542
+ });
537
543
  }
538
544
 
539
545
  // This export does not actually implement a private API, but was exported
@@ -548,7 +554,7 @@ PrivateRichText.Content.defaultProps = {
548
554
  format: 'string',
549
555
  value: ''
550
556
  };
551
- PrivateRichText.Raw = forwardRef((props, ref) => createElement(RichText, {
557
+ PrivateRichText.Raw = forwardRef((props, ref) => /*#__PURE__*/_jsx(RichText, {
552
558
  ...props,
553
559
  nativeEditorRef: ref
554
560
  }));
@@ -1 +1 @@
1
- {"version":3,"names":["clsx","Platform","useRef","useCallback","forwardRef","useDispatch","useSelect","pasteHandler","children","childrenSource","getBlockTransforms","findTransform","isUnmodifiedDefaultBlock","useInstanceId","useMergeRefs","__unstableCreateElement","isEmpty","insert","remove","create","split","toHTMLString","slice","isURL","Autocomplete","useBlockEditContext","RemoveBrowserShortcuts","filePasteHandler","FormatToolbarContainer","store","blockEditorStore","addActiveFormats","getAllowedFormats","createLinkInParagraph","EmbedHandlerPicker","Content","RichText","withDeprecations","classes","RichTextWrapper","tagName","start","reversed","value","originalValue","onChange","originalOnChange","isSelected","originalIsSelected","inlineToolbar","wrapperClassName","autocompleters","onReplace","placeholder","allowedFormats","withoutInteractiveFormatting","onRemove","onMerge","onSplit","__unstableOnSplitAtEnd","onSplitAtEnd","__unstableOnSplitMiddle","onSplitMiddle","__unstableOnSplitAtDoubleLineEnd","onSplitAtDoubleLineEnd","identifier","preserveWhiteSpace","__unstablePastePlainText","pastePlainText","__unstableEmbedURLOnPaste","__unstableDisableFormats","disableFormats","disableLineBreaks","unstableOnFocus","__unstableAllowPrefixTransformations","__unstableMobileNoFocusOnMount","deleteEnter","placeholderTextColor","textAlign","selectionColor","tagsToEliminate","disableEditingMenu","fontSize","fontFamily","fontWeight","fontStyle","minWidth","maxWidth","onBlur","disableSuggestions","disableAutocorrection","containerWidth","onEnter","onCustomEnter","props","providedRef","instanceId","fallbackRef","clientId","blockIsSelected","embedHandlerPickerRef","selector","select","getSelectionStart","getSelectionEnd","getSettings","didAutomaticChange","getBlock","isMultiSelecting","hasMultiSelection","getSelectedBlockClientId","selectionStart","selectionEnd","__experimentalUndo","undo","undefined","attributeKey","extraProps","OS","block","shouldBlurOnUnmount","offset","disabled","__unstableMarkLastChangeAsPersistent","enterFormattedText","exitFormattedText","selectionChange","__unstableMarkAutomaticChange","clearSelectedBlock","adjustedAllowedFormats","hasFormats","length","adjustedValue","adjustedOnChange","Array","isArray","toHTML","newValue","fromDOM","document","childNodes","onSelectionChange","selectionChangeStart","selectionChangeEnd","clearCurrentSelectionOnUnmount","onDelete","isReverse","splitValue","record","pastedBlocks","blocks","before","after","hasPastedBlocks","lastPastedBlockIndex","isAfterOriginal","push","indexToSelect","initialPosition","shiftKey","canSplit","transforms","filter","type","transformation","item","regExp","test","text","transform","content","splitStart","end","splitEnd","canSplitAtEnd","onPaste","html","plainText","isInternal","files","activeFormats","pastedValue","HTML","mode","window","console","log","isPastedURL","trim","presentEmbedHandlerPicker","current","presentPicker","createEmbed","createLink","valueToInsert","canPasteEmbed","name","source","inputRule","valueToFormat","startPosition","characterBefore","trimmedTextBefore","prefixTransforms","prefix","mergedRef","createElement","nativeEditorRef","__unstableIsSelected","__unstableInputRule","__unstableOnEnterFormattedText","__unstableOnExitFormattedText","__unstableOnCreateUndoLevel","__unstableDidAutomaticChange","__unstableUndo","id","style","nestedIsSelected","onFocus","editableProps","editableTagName","TagName","Fragment","inline","anchorRef","completers","contentRef","listBoxId","activeId","onKeyDown","className","event","ref","PrivateRichText","defaultProps","format","Raw","RichTextShortcut","RichTextToolbarButton","__unstableRichTextInputEvent"],"sources":["@wordpress/block-editor/src/components/rich-text/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { Platform, useRef, useCallback, forwardRef } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport {\n\tpasteHandler,\n\tchildren as childrenSource,\n\tgetBlockTransforms,\n\tfindTransform,\n\tisUnmodifiedDefaultBlock,\n} from '@wordpress/blocks';\nimport { useInstanceId, useMergeRefs } from '@wordpress/compose';\nimport {\n\t__unstableCreateElement,\n\tisEmpty,\n\tinsert,\n\tremove,\n\tcreate,\n\tsplit,\n\ttoHTMLString,\n\tslice,\n} from '@wordpress/rich-text';\nimport { isURL } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport Autocomplete from '../autocomplete';\nimport { useBlockEditContext } from '../block-edit';\nimport { RemoveBrowserShortcuts } from './remove-browser-shortcuts';\nimport { filePasteHandler } from './file-paste-handler';\nimport FormatToolbarContainer from './format-toolbar-container';\nimport { store as blockEditorStore } from '../../store';\nimport {\n\taddActiveFormats,\n\tgetAllowedFormats,\n\tcreateLinkInParagraph,\n} from './utils';\nimport EmbedHandlerPicker from './embed-handler-picker';\nimport { Content } from './content';\nimport RichText from './native';\nimport { withDeprecations } from './with-deprecations';\n\nconst classes = 'block-editor-rich-text__editable';\n\nexport function RichTextWrapper(\n\t{\n\t\tchildren,\n\t\ttagName,\n\t\tstart,\n\t\treversed,\n\t\tvalue: originalValue,\n\t\tonChange: originalOnChange,\n\t\tisSelected: originalIsSelected,\n\t\tinlineToolbar,\n\t\twrapperClassName,\n\t\tautocompleters,\n\t\tonReplace,\n\t\tplaceholder,\n\t\tallowedFormats,\n\t\twithoutInteractiveFormatting,\n\t\tonRemove,\n\t\tonMerge,\n\t\tonSplit,\n\t\t__unstableOnSplitAtEnd: onSplitAtEnd,\n\t\t__unstableOnSplitMiddle: onSplitMiddle,\n\t\t__unstableOnSplitAtDoubleLineEnd: onSplitAtDoubleLineEnd,\n\t\tidentifier,\n\t\tpreserveWhiteSpace,\n\t\t__unstablePastePlainText: pastePlainText,\n\t\t__unstableEmbedURLOnPaste,\n\t\t__unstableDisableFormats: disableFormats,\n\t\tdisableLineBreaks,\n\t\tunstableOnFocus,\n\t\t__unstableAllowPrefixTransformations,\n\t\t// Native props.\n\t\t__unstableMobileNoFocusOnMount,\n\t\tdeleteEnter,\n\t\tplaceholderTextColor,\n\t\ttextAlign,\n\t\tselectionColor,\n\t\ttagsToEliminate,\n\t\tdisableEditingMenu,\n\t\tfontSize,\n\t\tfontFamily,\n\t\tfontWeight,\n\t\tfontStyle,\n\t\tminWidth,\n\t\tmaxWidth,\n\t\tonBlur,\n\t\tdisableSuggestions,\n\t\tdisableAutocorrection,\n\t\tcontainerWidth,\n\t\tonEnter: onCustomEnter,\n\t\t...props\n\t},\n\tprovidedRef\n) {\n\tconst instanceId = useInstanceId( RichTextWrapper );\n\n\tidentifier = identifier || instanceId;\n\n\tconst fallbackRef = useRef();\n\tconst { clientId, isSelected: blockIsSelected } = useBlockEditContext();\n\tconst embedHandlerPickerRef = useRef();\n\tconst selector = ( select ) => {\n\t\tconst {\n\t\t\tgetSelectionStart,\n\t\t\tgetSelectionEnd,\n\t\t\tgetSettings,\n\t\t\tdidAutomaticChange,\n\t\t\tgetBlock,\n\t\t\tisMultiSelecting,\n\t\t\thasMultiSelection,\n\t\t\tgetSelectedBlockClientId,\n\t\t} = select( blockEditorStore );\n\n\t\tconst selectionStart = getSelectionStart();\n\t\tconst selectionEnd = getSelectionEnd();\n\t\tconst { __experimentalUndo: undo } = getSettings();\n\n\t\tlet isSelected;\n\n\t\tif ( originalIsSelected === undefined ) {\n\t\t\tisSelected =\n\t\t\t\tselectionStart.clientId === clientId &&\n\t\t\t\tselectionStart.attributeKey === identifier;\n\t\t} else if ( originalIsSelected ) {\n\t\t\tisSelected = selectionStart.clientId === clientId;\n\t\t}\n\n\t\tlet extraProps = {};\n\t\tif ( Platform.OS === 'native' ) {\n\t\t\t// If the block of this RichText is unmodified then it's a candidate for replacing when adding a new block.\n\t\t\t// In order to fix https://github.com/wordpress-mobile/gutenberg-mobile/issues/1126, let's blur on unmount in that case.\n\t\t\t// This apparently assumes functionality the BlockHlder actually.\n\t\t\tconst block = clientId && getBlock( clientId );\n\t\t\tconst shouldBlurOnUnmount =\n\t\t\t\tblock && isSelected && isUnmodifiedDefaultBlock( block );\n\t\t\textraProps = {\n\t\t\t\tshouldBlurOnUnmount,\n\t\t\t};\n\t\t}\n\n\t\treturn {\n\t\t\tselectionStart: isSelected ? selectionStart.offset : undefined,\n\t\t\tselectionEnd: isSelected ? selectionEnd.offset : undefined,\n\t\t\tisSelected,\n\t\t\tdidAutomaticChange: didAutomaticChange(),\n\t\t\tdisabled: isMultiSelecting() || hasMultiSelection(),\n\t\t\tundo,\n\t\t\tgetSelectedBlockClientId,\n\t\t\t...extraProps,\n\t\t};\n\t};\n\t// This selector must run on every render so the right selection state is\n\t// retrieved from the store on merge.\n\t// To do: fix this somehow.\n\tconst {\n\t\tselectionStart,\n\t\tselectionEnd,\n\t\tisSelected,\n\t\tgetSelectedBlockClientId,\n\t\tdidAutomaticChange,\n\t\tdisabled,\n\t\tundo,\n\t\tshouldBlurOnUnmount,\n\t} = useSelect( selector );\n\tconst {\n\t\t__unstableMarkLastChangeAsPersistent,\n\t\tenterFormattedText,\n\t\texitFormattedText,\n\t\tselectionChange,\n\t\t__unstableMarkAutomaticChange,\n\t\tclearSelectedBlock,\n\t} = useDispatch( blockEditorStore );\n\tconst adjustedAllowedFormats = getAllowedFormats( {\n\t\tallowedFormats,\n\t\tdisableFormats,\n\t} );\n\tconst hasFormats =\n\t\t! adjustedAllowedFormats || adjustedAllowedFormats.length > 0;\n\tlet adjustedValue = originalValue;\n\tlet adjustedOnChange = originalOnChange;\n\n\t// Handle deprecated format.\n\tif ( Array.isArray( originalValue ) ) {\n\t\tadjustedValue = childrenSource.toHTML( originalValue );\n\t\tadjustedOnChange = ( newValue ) =>\n\t\t\toriginalOnChange(\n\t\t\t\tchildrenSource.fromDOM(\n\t\t\t\t\t__unstableCreateElement( document, newValue ).childNodes\n\t\t\t\t)\n\t\t\t);\n\t}\n\n\tconst onSelectionChange = useCallback(\n\t\t( selectionChangeStart, selectionChangeEnd ) => {\n\t\t\tselectionChange(\n\t\t\t\tclientId,\n\t\t\t\tidentifier,\n\t\t\t\tselectionChangeStart,\n\t\t\t\tselectionChangeEnd\n\t\t\t);\n\t\t},\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t\t[ clientId, identifier ]\n\t);\n\n\tconst clearCurrentSelectionOnUnmount = useCallback( () => {\n\t\tif ( getSelectedBlockClientId() === clientId ) {\n\t\t\tclearSelectedBlock();\n\t\t}\n\t}, [ clearSelectedBlock, clientId, getSelectedBlockClientId ] );\n\n\tconst onDelete = useCallback(\n\t\t( { value, isReverse } ) => {\n\t\t\tif ( onMerge ) {\n\t\t\t\tonMerge( ! isReverse );\n\t\t\t}\n\n\t\t\t// Only handle remove on Backspace. This serves dual-purpose of being\n\t\t\t// an intentional user interaction distinguishing between Backspace and\n\t\t\t// Delete to remove the empty field, but also to avoid merge & remove\n\t\t\t// causing destruction of two fields (merge, then removed merged).\n\t\t\telse if ( onRemove && isEmpty( value ) && isReverse ) {\n\t\t\t\tonRemove( ! isReverse );\n\t\t\t}\n\t\t},\n\t\t[ onMerge, onRemove ]\n\t);\n\n\t/**\n\t * Signals to the RichText owner that the block can be replaced with two\n\t * blocks as a result of splitting the block by pressing enter, or with\n\t * blocks as a result of splitting the block by pasting block content in the\n\t * instance.\n\t *\n\t * @param {Object} record The rich text value to split.\n\t * @param {Array} pastedBlocks The pasted blocks to insert, if any.\n\t */\n\tconst splitValue = useCallback(\n\t\t( record, pastedBlocks = [] ) => {\n\t\t\tif ( ! onReplace || ! onSplit ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst blocks = [];\n\t\t\tconst [ before, after ] = split( record );\n\t\t\tconst hasPastedBlocks = pastedBlocks.length > 0;\n\t\t\tlet lastPastedBlockIndex = -1;\n\n\t\t\t// Consider the after value to be the original it is not empty and\n\t\t\t// the before value *is* empty.\n\t\t\tconst isAfterOriginal = isEmpty( before ) && ! isEmpty( after );\n\n\t\t\t// Create a block with the content before the caret if there's no pasted\n\t\t\t// blocks, or if there are pasted blocks and the value is not empty.\n\t\t\t// We do not want a leading empty block on paste, but we do if split\n\t\t\t// with e.g. the enter key.\n\t\t\tif ( ! hasPastedBlocks || ! isEmpty( before ) ) {\n\t\t\t\tblocks.push(\n\t\t\t\t\tonSplit(\n\t\t\t\t\t\ttoHTMLString( { value: before } ),\n\t\t\t\t\t\t! isAfterOriginal\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\tlastPastedBlockIndex += 1;\n\t\t\t}\n\n\t\t\tif ( hasPastedBlocks ) {\n\t\t\t\tblocks.push( ...pastedBlocks );\n\t\t\t\tlastPastedBlockIndex += pastedBlocks.length;\n\t\t\t} else if ( onSplitMiddle ) {\n\t\t\t\tblocks.push( onSplitMiddle() );\n\t\t\t}\n\n\t\t\t// If there's pasted blocks, append a block with non empty content\n\t\t\t// after the caret. Otherwise, do append an empty block if there\n\t\t\t// is no `onSplitMiddle` prop, but if there is and the content is\n\t\t\t// empty, the middle block is enough to set focus in.\n\t\t\tif (\n\t\t\t\thasPastedBlocks\n\t\t\t\t\t? ! isEmpty( after )\n\t\t\t\t\t: ! onSplitMiddle || ! isEmpty( after )\n\t\t\t) {\n\t\t\t\tblocks.push(\n\t\t\t\t\tonSplit( toHTMLString( { value: after } ), isAfterOriginal )\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// If there are pasted blocks, set the selection to the last one.\n\t\t\t// Otherwise, set the selection to the second block.\n\t\t\tconst indexToSelect = hasPastedBlocks ? lastPastedBlockIndex : 1;\n\n\t\t\t// If there are pasted blocks, move the caret to the end of the selected block\n\t\t\t// Otherwise, retain the default value.\n\t\t\tconst initialPosition = hasPastedBlocks ? -1 : 0;\n\n\t\t\tonReplace( blocks, indexToSelect, initialPosition );\n\t\t},\n\t\t[ onReplace, onSplit, onSplitMiddle ]\n\t);\n\n\tconst onEnter = useCallback(\n\t\t( { value, onChange, shiftKey } ) => {\n\t\t\tconst canSplit = onReplace && onSplit;\n\n\t\t\tif ( onReplace ) {\n\t\t\t\tconst transforms = getBlockTransforms( 'from' ).filter(\n\t\t\t\t\t( { type } ) => type === 'enter'\n\t\t\t\t);\n\t\t\t\tconst transformation = findTransform( transforms, ( item ) => {\n\t\t\t\t\treturn item.regExp.test( value.text );\n\t\t\t\t} );\n\n\t\t\t\tif ( transformation ) {\n\t\t\t\t\tonReplace( [\n\t\t\t\t\t\ttransformation.transform( { content: value.text } ),\n\t\t\t\t\t] );\n\t\t\t\t\t__unstableMarkAutomaticChange();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( onCustomEnter ) {\n\t\t\t\tonCustomEnter();\n\t\t\t}\n\n\t\t\tconst { text, start: splitStart, end: splitEnd } = value;\n\t\t\tconst canSplitAtEnd =\n\t\t\t\tonSplitAtEnd &&\n\t\t\t\tsplitStart === splitEnd &&\n\t\t\t\tsplitEnd === text.length;\n\n\t\t\tif ( shiftKey ) {\n\t\t\t\tif ( ! disableLineBreaks ) {\n\t\t\t\t\tonChange( insert( value, '\\n' ) );\n\t\t\t\t}\n\t\t\t} else if ( canSplit ) {\n\t\t\t\tsplitValue( value );\n\t\t\t} else if ( canSplitAtEnd ) {\n\t\t\t\tonSplitAtEnd();\n\t\t\t} else if (\n\t\t\t\t// For some blocks it's desirable to split at the end of the\n\t\t\t\t// block when there are two line breaks at the end of the\n\t\t\t\t// block, so triple Enter exits the block.\n\t\t\t\tonSplitAtDoubleLineEnd &&\n\t\t\t\tsplitStart === splitEnd &&\n\t\t\t\tsplitEnd === text.length &&\n\t\t\t\ttext.slice( -2 ) === '\\n\\n'\n\t\t\t) {\n\t\t\t\tvalue.start = value.end - 2;\n\t\t\t\tonChange( remove( value ) );\n\t\t\t\tonSplitAtDoubleLineEnd();\n\t\t\t} else if ( ! disableLineBreaks ) {\n\t\t\t\tonChange( insert( value, '\\n' ) );\n\t\t\t}\n\t\t},\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t\t[\n\t\t\tonReplace,\n\t\t\tonSplit,\n\t\t\t__unstableMarkAutomaticChange,\n\t\t\tsplitValue,\n\t\t\tonSplitAtEnd,\n\t\t]\n\t);\n\n\tconst onPaste = useCallback(\n\t\t( {\n\t\t\tvalue,\n\t\t\tonChange,\n\t\t\thtml,\n\t\t\tplainText,\n\t\t\tisInternal,\n\t\t\tfiles,\n\t\t\tactiveFormats,\n\t\t} ) => {\n\t\t\t// If the data comes from a rich text instance, we can directly use it\n\t\t\t// without filtering the data. The filters are only meant for externally\n\t\t\t// pasted content and remove inline styles.\n\t\t\tif ( isInternal ) {\n\t\t\t\tconst pastedValue = create( {\n\t\t\t\t\thtml,\n\t\t\t\t\tpreserveWhiteSpace,\n\t\t\t\t} );\n\t\t\t\taddActiveFormats( pastedValue, activeFormats );\n\t\t\t\tonChange( insert( value, pastedValue ) );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( pastePlainText ) {\n\t\t\t\tonChange( insert( value, create( { text: plainText } ) ) );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Only process file if no HTML is present.\n\t\t\t// Note: a pasted file may have the URL as plain text.\n\t\t\tif ( files && files.length && ! html ) {\n\t\t\t\tconst content = pasteHandler( {\n\t\t\t\t\tHTML: filePasteHandler( files ),\n\t\t\t\t\tmode: 'BLOCKS',\n\t\t\t\t\ttagName,\n\t\t\t\t\tpreserveWhiteSpace,\n\t\t\t\t} );\n\n\t\t\t\t// Allows us to ask for this information when we get a report.\n\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\twindow.console.log( 'Received items:\\n\\n', files );\n\n\t\t\t\tif ( onReplace && isEmpty( value ) ) {\n\t\t\t\t\tonReplace( content );\n\t\t\t\t} else {\n\t\t\t\t\tsplitValue( value, content );\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlet mode = onReplace && onSplit ? 'AUTO' : 'INLINE';\n\n\t\t\tconst isPastedURL = isURL( plainText.trim() );\n\t\t\tconst presentEmbedHandlerPicker = () =>\n\t\t\t\tembedHandlerPickerRef.current?.presentPicker( {\n\t\t\t\t\tcreateEmbed: () =>\n\t\t\t\t\t\tonReplace( content, content.length - 1, -1 ),\n\t\t\t\t\tcreateLink: () =>\n\t\t\t\t\t\tcreateLinkInParagraph( plainText.trim(), onReplace ),\n\t\t\t\t} );\n\n\t\t\tif (\n\t\t\t\t__unstableEmbedURLOnPaste &&\n\t\t\t\tisEmpty( value ) &&\n\t\t\t\tisPastedURL\n\t\t\t) {\n\t\t\t\tmode = 'BLOCKS';\n\t\t\t}\n\n\t\t\tconst content = pasteHandler( {\n\t\t\t\tHTML: html,\n\t\t\t\tplainText,\n\t\t\t\tmode,\n\t\t\t\ttagName,\n\t\t\t\tpreserveWhiteSpace,\n\t\t\t} );\n\n\t\t\tif ( typeof content === 'string' ) {\n\t\t\t\tconst valueToInsert = create( { html: content } );\n\t\t\t\taddActiveFormats( valueToInsert, activeFormats );\n\t\t\t\tonChange( insert( value, valueToInsert ) );\n\t\t\t} else if ( content.length > 0 ) {\n\t\t\t\t// When an URL is pasted in an empty paragraph then the EmbedHandlerPicker should showcase options allowing the transformation of that URL\n\t\t\t\t// into either an Embed block or a link within the target paragraph. If the paragraph is non-empty, the URL is pasted as text.\n\t\t\t\tconst canPasteEmbed =\n\t\t\t\t\tisPastedURL &&\n\t\t\t\t\tcontent.length === 1 &&\n\t\t\t\t\tcontent[ 0 ].name === 'core/embed';\n\t\t\t\tif ( onReplace && isEmpty( value ) ) {\n\t\t\t\t\tif ( canPasteEmbed ) {\n\t\t\t\t\t\tonChange(\n\t\t\t\t\t\t\tinsert( value, create( { text: plainText } ) )\n\t\t\t\t\t\t);\n\t\t\t\t\t\tif ( __unstableEmbedURLOnPaste ) {\n\t\t\t\t\t\t\tpresentEmbedHandlerPicker();\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tonReplace( content, content.length - 1, -1, {\n\t\t\t\t\t\tsource: 'clipboard',\n\t\t\t\t\t} );\n\t\t\t\t} else {\n\t\t\t\t\tif ( canPasteEmbed ) {\n\t\t\t\t\t\tonChange(\n\t\t\t\t\t\t\tinsert( value, create( { text: plainText } ) )\n\t\t\t\t\t\t);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tsplitValue( value, content );\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t[\n\t\t\ttagName,\n\t\t\tonReplace,\n\t\t\tonSplit,\n\t\t\tsplitValue,\n\t\t\t__unstableEmbedURLOnPaste,\n\t\t\tpreserveWhiteSpace,\n\t\t\tpastePlainText,\n\t\t]\n\t);\n\n\tconst inputRule = useCallback(\n\t\t( value, valueToFormat ) => {\n\t\t\tif ( ! onReplace ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst { start: startPosition, text } = value;\n\t\t\tconst characterBefore = text.slice(\n\t\t\t\tstartPosition - 1,\n\t\t\t\tstartPosition\n\t\t\t);\n\n\t\t\t// The character right before the caret must be a plain space.\n\t\t\tif ( characterBefore !== ' ' ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst trimmedTextBefore = text.slice( 0, startPosition ).trim();\n\t\t\tconst prefixTransforms = getBlockTransforms( 'from' ).filter(\n\t\t\t\t( { type } ) => type === 'prefix'\n\t\t\t);\n\t\t\tconst transformation = findTransform(\n\t\t\t\tprefixTransforms,\n\t\t\t\t( { prefix } ) => {\n\t\t\t\t\treturn trimmedTextBefore === prefix;\n\t\t\t\t}\n\t\t\t);\n\n\t\t\tif ( ! transformation ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst content = valueToFormat(\n\t\t\t\tslice( value, startPosition, text.length )\n\t\t\t);\n\t\t\tconst block = transformation.transform( content );\n\n\t\t\tonReplace( [ block ] );\n\t\t\t__unstableMarkAutomaticChange();\n\t\t},\n\t\t[ onReplace, __unstableMarkAutomaticChange ]\n\t);\n\n\tconst mergedRef = useMergeRefs( [ providedRef, fallbackRef ] );\n\n\treturn (\n\t\t<RichText\n\t\t\tclientId={ clientId }\n\t\t\tidentifier={ identifier }\n\t\t\tnativeEditorRef={ mergedRef }\n\t\t\tvalue={ adjustedValue }\n\t\t\tonChange={ adjustedOnChange }\n\t\t\tselectionStart={ selectionStart }\n\t\t\tselectionEnd={ selectionEnd }\n\t\t\tonSelectionChange={ onSelectionChange }\n\t\t\ttagName={ tagName }\n\t\t\tstart={ start }\n\t\t\treversed={ reversed }\n\t\t\tplaceholder={ placeholder }\n\t\t\tallowedFormats={ adjustedAllowedFormats }\n\t\t\twithoutInteractiveFormatting={ withoutInteractiveFormatting }\n\t\t\tonEnter={ onEnter }\n\t\t\tonDelete={ onDelete }\n\t\t\tonPaste={ onPaste }\n\t\t\t__unstableIsSelected={ isSelected }\n\t\t\t__unstableInputRule={ inputRule }\n\t\t\t__unstableOnEnterFormattedText={ enterFormattedText }\n\t\t\t__unstableOnExitFormattedText={ exitFormattedText }\n\t\t\t__unstableOnCreateUndoLevel={ __unstableMarkLastChangeAsPersistent }\n\t\t\t__unstableMarkAutomaticChange={ __unstableMarkAutomaticChange }\n\t\t\t__unstableDidAutomaticChange={ didAutomaticChange }\n\t\t\t__unstableUndo={ undo }\n\t\t\t__unstableDisableFormats={ disableFormats }\n\t\t\tpreserveWhiteSpace={ preserveWhiteSpace }\n\t\t\tdisabled={ disabled }\n\t\t\tunstableOnFocus={ unstableOnFocus }\n\t\t\t__unstableAllowPrefixTransformations={\n\t\t\t\t__unstableAllowPrefixTransformations\n\t\t\t}\n\t\t\t// Native props.\n\t\t\tblockIsSelected={\n\t\t\t\toriginalIsSelected !== undefined\n\t\t\t\t\t? originalIsSelected\n\t\t\t\t\t: blockIsSelected\n\t\t\t}\n\t\t\tshouldBlurOnUnmount={ shouldBlurOnUnmount }\n\t\t\t__unstableMobileNoFocusOnMount={ __unstableMobileNoFocusOnMount }\n\t\t\tdeleteEnter={ deleteEnter }\n\t\t\tplaceholderTextColor={ placeholderTextColor }\n\t\t\ttextAlign={ textAlign }\n\t\t\tselectionColor={ selectionColor }\n\t\t\ttagsToEliminate={ tagsToEliminate }\n\t\t\tdisableEditingMenu={ disableEditingMenu }\n\t\t\tfontSize={ fontSize }\n\t\t\tfontFamily={ fontFamily }\n\t\t\tfontWeight={ fontWeight }\n\t\t\tfontStyle={ fontStyle }\n\t\t\tminWidth={ minWidth }\n\t\t\tmaxWidth={ maxWidth }\n\t\t\tonBlur={ onBlur }\n\t\t\tdisableSuggestions={ disableSuggestions }\n\t\t\tdisableAutocorrection={ disableAutocorrection }\n\t\t\tcontainerWidth={ containerWidth }\n\t\t\tclearCurrentSelectionOnUnmount={ clearCurrentSelectionOnUnmount }\n\t\t\t// Props to be set on the editable container are destructured on the\n\t\t\t// element itself for web (see below), but passed through rich text\n\t\t\t// for native.\n\t\t\tid={ props.id }\n\t\t\tstyle={ props.style }\n\t\t>\n\t\t\t{ ( {\n\t\t\t\tisSelected: nestedIsSelected,\n\t\t\t\tvalue,\n\t\t\t\tonChange,\n\t\t\t\tonFocus,\n\t\t\t\teditableProps,\n\t\t\t\teditableTagName: TagName,\n\t\t\t} ) => (\n\t\t\t\t<>\n\t\t\t\t\t{ children && children( { value, onChange, onFocus } ) }\n\t\t\t\t\t{ nestedIsSelected && hasFormats && (\n\t\t\t\t\t\t<FormatToolbarContainer\n\t\t\t\t\t\t\tinline={ inlineToolbar }\n\t\t\t\t\t\t\tanchorRef={ fallbackRef.current }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ nestedIsSelected && <RemoveBrowserShortcuts /> }\n\t\t\t\t\t<Autocomplete\n\t\t\t\t\t\tonReplace={ onReplace }\n\t\t\t\t\t\tcompleters={ autocompleters }\n\t\t\t\t\t\trecord={ value }\n\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\tisSelected={ nestedIsSelected }\n\t\t\t\t\t\tcontentRef={ fallbackRef }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ ( { listBoxId, activeId, onKeyDown } ) => (\n\t\t\t\t\t\t\t<TagName\n\t\t\t\t\t\t\t\t{ ...editableProps }\n\t\t\t\t\t\t\t\t{ ...props }\n\t\t\t\t\t\t\t\tstyle={\n\t\t\t\t\t\t\t\t\tprops.style\n\t\t\t\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\t\t\t\t...props.style,\n\t\t\t\t\t\t\t\t\t\t\t\t...editableProps.style,\n\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t: editableProps.style\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t\t\tclasses,\n\t\t\t\t\t\t\t\t\tprops.className,\n\t\t\t\t\t\t\t\t\teditableProps.className\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\taria-autocomplete={\n\t\t\t\t\t\t\t\t\tlistBoxId ? 'list' : undefined\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\taria-owns={ listBoxId }\n\t\t\t\t\t\t\t\taria-activedescendant={ activeId }\n\t\t\t\t\t\t\t\tonKeyDown={ ( event ) => {\n\t\t\t\t\t\t\t\t\tonKeyDown( event );\n\t\t\t\t\t\t\t\t\teditableProps.onKeyDown( event );\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</Autocomplete>\n\t\t\t\t\t<EmbedHandlerPicker ref={ embedHandlerPickerRef } />\n\t\t\t\t</>\n\t\t\t) }\n\t\t</RichText>\n\t);\n}\n\n// This export does not actually implement a private API, but was exported\n// under this name for interoperability with the web version of the RichText\n// component.\nexport const PrivateRichText = withDeprecations(\n\tforwardRef( RichTextWrapper )\n);\n\nPrivateRichText.Content = Content;\n\nPrivateRichText.isEmpty = ( value ) => {\n\treturn ! value || value.length === 0;\n};\n\nPrivateRichText.Content.defaultProps = {\n\tformat: 'string',\n\tvalue: '',\n};\n\nPrivateRichText.Raw = forwardRef( ( props, ref ) => (\n\t<RichText { ...props } nativeEditorRef={ ref } />\n) );\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/rich-text/README.md\n */\nexport default PrivateRichText;\nexport { RichTextShortcut } from './shortcut';\nexport { RichTextToolbarButton } from './toolbar-button';\nexport { __unstableRichTextInputEvent } from './input-event';\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,QAAQ,EAAEC,MAAM,EAAEC,WAAW,EAAEC,UAAU,QAAQ,oBAAoB;AAC9E,SAASC,WAAW,EAAEC,SAAS,QAAQ,iBAAiB;AACxD,SACCC,YAAY,EACZC,QA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wardRef","useDispatch","useSelect","pasteHandler","children","childrenSource","getBlockTransforms","findTransform","isUnmodifiedDefaultBlock","useInstanceId","useMergeRefs","__unstableCreateElement","isEmpty","insert","remove","create","split","toHTMLString","slice","isURL","Autocomplete","useBlockEditContext","RemoveBrowserShortcuts","filePasteHandler","FormatToolbarContainer","store","blockEditorStore","addActiveFormats","getAllowedFormats","createLinkInParagraph","EmbedHandlerPicker","Content","RichText","withDeprecations","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","classes","RichTextWrapper","tagName","start","reversed","value","originalValue","onChange","originalOnChange","isSelected","originalIsSelected","inlineToolbar","wrapperClassName","autocompleters","onReplace","placeholder","allowedFormats","withoutInteractiveFormatting","onRemove","onMerge","onSplit","__unstableOnSplitAtEnd","onSplitAtEnd","__unstableOnSplitMiddle","onSplitMiddle","__unstableOnSplitAtDoubleLineEnd","onSplitAtDoubleLineEnd","identifier","preserveWhiteSpace","__unstablePastePlainText","pastePlainText","__unstableEmbedURLOnPaste","__unstableDisableFormats","disableFormats","disableLineBreaks","unstableOnFocus","__unstableAllowPrefixTransformations","__unstableMobileNoFocusOnMount","deleteEnter","placeholderTextColor","textAlign","selectionColor","tagsToEliminate","disableEditingMenu","fontSize","fontFamily","fontWeight","fontStyle","minWidth","maxWidth","onBlur","disableSuggestions","disableAutocorrection","containerWidth","onEnter","onCustomEnter","props","providedRef","instanceId","fallbackRef","clientId","blockIsSelected","embedHandlerPickerRef","selector","select","getSelectionStart","getSelectionEnd","getSettings","didAutomaticChange","getBlock","isMultiSelecting","hasMultiSelection","getSelectedBlockClientId","selectionStart","selectionEnd","__experimentalUndo","undo","undefined","attributeKey","extraProps","OS","block","shouldBlurOnUnmount","offset","disabled","__unstableMarkLastChangeAsPersistent","enterFormattedText","exitFormattedText","selectionChange","__unstableMarkAutomaticChange","clearSelectedBlock","adjustedAllowedFormats","hasFormats","length","adjustedValue","adjustedOnChange","Array","isArray","toHTML","newValue","fromDOM","document","childNodes","onSelectionChange","selectionChangeStart","selectionChangeEnd","clearCurrentSelectionOnUnmount","onDelete","isReverse","splitValue","record","pastedBlocks","blocks","before","after","hasPastedBlocks","lastPastedBlockIndex","isAfterOriginal","push","indexToSelect","initialPosition","shiftKey","canSplit","transforms","filter","type","transformation","item","regExp","test","text","transform","content","splitStart","end","splitEnd","canSplitAtEnd","onPaste","html","plainText","isInternal","files","activeFormats","pastedValue","HTML","mode","window","console","log","isPastedURL","trim","presentEmbedHandlerPicker","current","presentPicker","createEmbed","createLink","valueToInsert","canPasteEmbed","name","source","inputRule","valueToFormat","startPosition","characterBefore","trimmedTextBefore","prefixTransforms","prefix","mergedRef","nativeEditorRef","__unstableIsSelected","__unstableInputRule","__unstableOnEnterFormattedText","__unstableOnExitFormattedText","__unstableOnCreateUndoLevel","__unstableDidAutomaticChange","__unstableUndo","id","style","nestedIsSelected","onFocus","editableProps","editableTagName","TagName","inline","anchorRef","completers","contentRef","listBoxId","activeId","onKeyDown","className","event","ref","PrivateRichText","defaultProps","format","Raw","RichTextShortcut","RichTextToolbarButton","__unstableRichTextInputEvent"],"sources":["@wordpress/block-editor/src/components/rich-text/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { Platform, useRef, useCallback, forwardRef } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport {\n\tpasteHandler,\n\tchildren as childrenSource,\n\tgetBlockTransforms,\n\tfindTransform,\n\tisUnmodifiedDefaultBlock,\n} from '@wordpress/blocks';\nimport { useInstanceId, useMergeRefs } from '@wordpress/compose';\nimport {\n\t__unstableCreateElement,\n\tisEmpty,\n\tinsert,\n\tremove,\n\tcreate,\n\tsplit,\n\ttoHTMLString,\n\tslice,\n} from '@wordpress/rich-text';\nimport { isURL } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport Autocomplete from '../autocomplete';\nimport { useBlockEditContext } from '../block-edit';\nimport { RemoveBrowserShortcuts } from './remove-browser-shortcuts';\nimport { filePasteHandler } from './file-paste-handler';\nimport FormatToolbarContainer from './format-toolbar-container';\nimport { store as blockEditorStore } from '../../store';\nimport {\n\taddActiveFormats,\n\tgetAllowedFormats,\n\tcreateLinkInParagraph,\n} from './utils';\nimport EmbedHandlerPicker from './embed-handler-picker';\nimport { Content } from './content';\nimport RichText from './native';\nimport { withDeprecations } from './with-deprecations';\n\nconst classes = 'block-editor-rich-text__editable';\n\nexport function RichTextWrapper(\n\t{\n\t\tchildren,\n\t\ttagName,\n\t\tstart,\n\t\treversed,\n\t\tvalue: originalValue,\n\t\tonChange: originalOnChange,\n\t\tisSelected: originalIsSelected,\n\t\tinlineToolbar,\n\t\twrapperClassName,\n\t\tautocompleters,\n\t\tonReplace,\n\t\tplaceholder,\n\t\tallowedFormats,\n\t\twithoutInteractiveFormatting,\n\t\tonRemove,\n\t\tonMerge,\n\t\tonSplit,\n\t\t__unstableOnSplitAtEnd: onSplitAtEnd,\n\t\t__unstableOnSplitMiddle: onSplitMiddle,\n\t\t__unstableOnSplitAtDoubleLineEnd: onSplitAtDoubleLineEnd,\n\t\tidentifier,\n\t\tpreserveWhiteSpace,\n\t\t__unstablePastePlainText: pastePlainText,\n\t\t__unstableEmbedURLOnPaste,\n\t\t__unstableDisableFormats: disableFormats,\n\t\tdisableLineBreaks,\n\t\tunstableOnFocus,\n\t\t__unstableAllowPrefixTransformations,\n\t\t// Native props.\n\t\t__unstableMobileNoFocusOnMount,\n\t\tdeleteEnter,\n\t\tplaceholderTextColor,\n\t\ttextAlign,\n\t\tselectionColor,\n\t\ttagsToEliminate,\n\t\tdisableEditingMenu,\n\t\tfontSize,\n\t\tfontFamily,\n\t\tfontWeight,\n\t\tfontStyle,\n\t\tminWidth,\n\t\tmaxWidth,\n\t\tonBlur,\n\t\tdisableSuggestions,\n\t\tdisableAutocorrection,\n\t\tcontainerWidth,\n\t\tonEnter: onCustomEnter,\n\t\t...props\n\t},\n\tprovidedRef\n) {\n\tconst instanceId = useInstanceId( RichTextWrapper );\n\n\tidentifier = identifier || instanceId;\n\n\tconst fallbackRef = useRef();\n\tconst { clientId, isSelected: blockIsSelected } = useBlockEditContext();\n\tconst embedHandlerPickerRef = useRef();\n\tconst selector = ( select ) => {\n\t\tconst {\n\t\t\tgetSelectionStart,\n\t\t\tgetSelectionEnd,\n\t\t\tgetSettings,\n\t\t\tdidAutomaticChange,\n\t\t\tgetBlock,\n\t\t\tisMultiSelecting,\n\t\t\thasMultiSelection,\n\t\t\tgetSelectedBlockClientId,\n\t\t} = select( blockEditorStore );\n\n\t\tconst selectionStart = getSelectionStart();\n\t\tconst selectionEnd = getSelectionEnd();\n\t\tconst { __experimentalUndo: undo } = getSettings();\n\n\t\tlet isSelected;\n\n\t\tif ( originalIsSelected === undefined ) {\n\t\t\tisSelected =\n\t\t\t\tselectionStart.clientId === clientId &&\n\t\t\t\tselectionStart.attributeKey === identifier;\n\t\t} else if ( originalIsSelected ) {\n\t\t\tisSelected = selectionStart.clientId === clientId;\n\t\t}\n\n\t\tlet extraProps = {};\n\t\tif ( Platform.OS === 'native' ) {\n\t\t\t// If the block of this RichText is unmodified then it's a candidate for replacing when adding a new block.\n\t\t\t// In order to fix https://github.com/wordpress-mobile/gutenberg-mobile/issues/1126, let's blur on unmount in that case.\n\t\t\t// This apparently assumes functionality the BlockHlder actually.\n\t\t\tconst block = clientId && getBlock( clientId );\n\t\t\tconst shouldBlurOnUnmount =\n\t\t\t\tblock && isSelected && isUnmodifiedDefaultBlock( block );\n\t\t\textraProps = {\n\t\t\t\tshouldBlurOnUnmount,\n\t\t\t};\n\t\t}\n\n\t\treturn {\n\t\t\tselectionStart: isSelected ? selectionStart.offset : undefined,\n\t\t\tselectionEnd: isSelected ? selectionEnd.offset : undefined,\n\t\t\tisSelected,\n\t\t\tdidAutomaticChange: didAutomaticChange(),\n\t\t\tdisabled: isMultiSelecting() || hasMultiSelection(),\n\t\t\tundo,\n\t\t\tgetSelectedBlockClientId,\n\t\t\t...extraProps,\n\t\t};\n\t};\n\t// This selector must run on every render so the right selection state is\n\t// retrieved from the store on merge.\n\t// To do: fix this somehow.\n\tconst {\n\t\tselectionStart,\n\t\tselectionEnd,\n\t\tisSelected,\n\t\tgetSelectedBlockClientId,\n\t\tdidAutomaticChange,\n\t\tdisabled,\n\t\tundo,\n\t\tshouldBlurOnUnmount,\n\t} = useSelect( selector );\n\tconst {\n\t\t__unstableMarkLastChangeAsPersistent,\n\t\tenterFormattedText,\n\t\texitFormattedText,\n\t\tselectionChange,\n\t\t__unstableMarkAutomaticChange,\n\t\tclearSelectedBlock,\n\t} = useDispatch( blockEditorStore );\n\tconst adjustedAllowedFormats = getAllowedFormats( {\n\t\tallowedFormats,\n\t\tdisableFormats,\n\t} );\n\tconst hasFormats =\n\t\t! adjustedAllowedFormats || adjustedAllowedFormats.length > 0;\n\tlet adjustedValue = originalValue;\n\tlet adjustedOnChange = originalOnChange;\n\n\t// Handle deprecated format.\n\tif ( Array.isArray( originalValue ) ) {\n\t\tadjustedValue = childrenSource.toHTML( originalValue );\n\t\tadjustedOnChange = ( newValue ) =>\n\t\t\toriginalOnChange(\n\t\t\t\tchildrenSource.fromDOM(\n\t\t\t\t\t__unstableCreateElement( document, newValue ).childNodes\n\t\t\t\t)\n\t\t\t);\n\t}\n\n\tconst onSelectionChange = useCallback(\n\t\t( selectionChangeStart, selectionChangeEnd ) => {\n\t\t\tselectionChange(\n\t\t\t\tclientId,\n\t\t\t\tidentifier,\n\t\t\t\tselectionChangeStart,\n\t\t\t\tselectionChangeEnd\n\t\t\t);\n\t\t},\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t\t[ clientId, identifier ]\n\t);\n\n\tconst clearCurrentSelectionOnUnmount = useCallback( () => {\n\t\tif ( getSelectedBlockClientId() === clientId ) {\n\t\t\tclearSelectedBlock();\n\t\t}\n\t}, [ clearSelectedBlock, clientId, getSelectedBlockClientId ] );\n\n\tconst onDelete = useCallback(\n\t\t( { value, isReverse } ) => {\n\t\t\tif ( onMerge ) {\n\t\t\t\tonMerge( ! isReverse );\n\t\t\t}\n\n\t\t\t// Only handle remove on Backspace. This serves dual-purpose of being\n\t\t\t// an intentional user interaction distinguishing between Backspace and\n\t\t\t// Delete to remove the empty field, but also to avoid merge & remove\n\t\t\t// causing destruction of two fields (merge, then removed merged).\n\t\t\telse if ( onRemove && isEmpty( value ) && isReverse ) {\n\t\t\t\tonRemove( ! isReverse );\n\t\t\t}\n\t\t},\n\t\t[ onMerge, onRemove ]\n\t);\n\n\t/**\n\t * Signals to the RichText owner that the block can be replaced with two\n\t * blocks as a result of splitting the block by pressing enter, or with\n\t * blocks as a result of splitting the block by pasting block content in the\n\t * instance.\n\t *\n\t * @param {Object} record The rich text value to split.\n\t * @param {Array} pastedBlocks The pasted blocks to insert, if any.\n\t */\n\tconst splitValue = useCallback(\n\t\t( record, pastedBlocks = [] ) => {\n\t\t\tif ( ! onReplace || ! onSplit ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst blocks = [];\n\t\t\tconst [ before, after ] = split( record );\n\t\t\tconst hasPastedBlocks = pastedBlocks.length > 0;\n\t\t\tlet lastPastedBlockIndex = -1;\n\n\t\t\t// Consider the after value to be the original it is not empty and\n\t\t\t// the before value *is* empty.\n\t\t\tconst isAfterOriginal = isEmpty( before ) && ! isEmpty( after );\n\n\t\t\t// Create a block with the content before the caret if there's no pasted\n\t\t\t// blocks, or if there are pasted blocks and the value is not empty.\n\t\t\t// We do not want a leading empty block on paste, but we do if split\n\t\t\t// with e.g. the enter key.\n\t\t\tif ( ! hasPastedBlocks || ! isEmpty( before ) ) {\n\t\t\t\tblocks.push(\n\t\t\t\t\tonSplit(\n\t\t\t\t\t\ttoHTMLString( { value: before } ),\n\t\t\t\t\t\t! isAfterOriginal\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\tlastPastedBlockIndex += 1;\n\t\t\t}\n\n\t\t\tif ( hasPastedBlocks ) {\n\t\t\t\tblocks.push( ...pastedBlocks );\n\t\t\t\tlastPastedBlockIndex += pastedBlocks.length;\n\t\t\t} else if ( onSplitMiddle ) {\n\t\t\t\tblocks.push( onSplitMiddle() );\n\t\t\t}\n\n\t\t\t// If there's pasted blocks, append a block with non empty content\n\t\t\t// after the caret. Otherwise, do append an empty block if there\n\t\t\t// is no `onSplitMiddle` prop, but if there is and the content is\n\t\t\t// empty, the middle block is enough to set focus in.\n\t\t\tif (\n\t\t\t\thasPastedBlocks\n\t\t\t\t\t? ! isEmpty( after )\n\t\t\t\t\t: ! onSplitMiddle || ! isEmpty( after )\n\t\t\t) {\n\t\t\t\tblocks.push(\n\t\t\t\t\tonSplit( toHTMLString( { value: after } ), isAfterOriginal )\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// If there are pasted blocks, set the selection to the last one.\n\t\t\t// Otherwise, set the selection to the second block.\n\t\t\tconst indexToSelect = hasPastedBlocks ? lastPastedBlockIndex : 1;\n\n\t\t\t// If there are pasted blocks, move the caret to the end of the selected block\n\t\t\t// Otherwise, retain the default value.\n\t\t\tconst initialPosition = hasPastedBlocks ? -1 : 0;\n\n\t\t\tonReplace( blocks, indexToSelect, initialPosition );\n\t\t},\n\t\t[ onReplace, onSplit, onSplitMiddle ]\n\t);\n\n\tconst onEnter = useCallback(\n\t\t( { value, onChange, shiftKey } ) => {\n\t\t\tconst canSplit = onReplace && onSplit;\n\n\t\t\tif ( onReplace ) {\n\t\t\t\tconst transforms = getBlockTransforms( 'from' ).filter(\n\t\t\t\t\t( { type } ) => type === 'enter'\n\t\t\t\t);\n\t\t\t\tconst transformation = findTransform( transforms, ( item ) => {\n\t\t\t\t\treturn item.regExp.test( value.text );\n\t\t\t\t} );\n\n\t\t\t\tif ( transformation ) {\n\t\t\t\t\tonReplace( [\n\t\t\t\t\t\ttransformation.transform( { content: value.text } ),\n\t\t\t\t\t] );\n\t\t\t\t\t__unstableMarkAutomaticChange();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( onCustomEnter ) {\n\t\t\t\tonCustomEnter();\n\t\t\t}\n\n\t\t\tconst { text, start: splitStart, end: splitEnd } = value;\n\t\t\tconst canSplitAtEnd =\n\t\t\t\tonSplitAtEnd &&\n\t\t\t\tsplitStart === splitEnd &&\n\t\t\t\tsplitEnd === text.length;\n\n\t\t\tif ( shiftKey ) {\n\t\t\t\tif ( ! disableLineBreaks ) {\n\t\t\t\t\tonChange( insert( value, '\\n' ) );\n\t\t\t\t}\n\t\t\t} else if ( canSplit ) {\n\t\t\t\tsplitValue( value );\n\t\t\t} else if ( canSplitAtEnd ) {\n\t\t\t\tonSplitAtEnd();\n\t\t\t} else if (\n\t\t\t\t// For some blocks it's desirable to split at the end of the\n\t\t\t\t// block when there are two line breaks at the end of the\n\t\t\t\t// block, so triple Enter exits the block.\n\t\t\t\tonSplitAtDoubleLineEnd &&\n\t\t\t\tsplitStart === splitEnd &&\n\t\t\t\tsplitEnd === text.length &&\n\t\t\t\ttext.slice( -2 ) === '\\n\\n'\n\t\t\t) {\n\t\t\t\tvalue.start = value.end - 2;\n\t\t\t\tonChange( remove( value ) );\n\t\t\t\tonSplitAtDoubleLineEnd();\n\t\t\t} else if ( ! disableLineBreaks ) {\n\t\t\t\tonChange( insert( value, '\\n' ) );\n\t\t\t}\n\t\t},\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t\t[\n\t\t\tonReplace,\n\t\t\tonSplit,\n\t\t\t__unstableMarkAutomaticChange,\n\t\t\tsplitValue,\n\t\t\tonSplitAtEnd,\n\t\t]\n\t);\n\n\tconst onPaste = useCallback(\n\t\t( {\n\t\t\tvalue,\n\t\t\tonChange,\n\t\t\thtml,\n\t\t\tplainText,\n\t\t\tisInternal,\n\t\t\tfiles,\n\t\t\tactiveFormats,\n\t\t} ) => {\n\t\t\t// If the data comes from a rich text instance, we can directly use it\n\t\t\t// without filtering the data. The filters are only meant for externally\n\t\t\t// pasted content and remove inline styles.\n\t\t\tif ( isInternal ) {\n\t\t\t\tconst pastedValue = create( {\n\t\t\t\t\thtml,\n\t\t\t\t\tpreserveWhiteSpace,\n\t\t\t\t} );\n\t\t\t\taddActiveFormats( pastedValue, activeFormats );\n\t\t\t\tonChange( insert( value, pastedValue ) );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( pastePlainText ) {\n\t\t\t\tonChange( insert( value, create( { text: plainText } ) ) );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Only process file if no HTML is present.\n\t\t\t// Note: a pasted file may have the URL as plain text.\n\t\t\tif ( files && files.length && ! html ) {\n\t\t\t\tconst content = pasteHandler( {\n\t\t\t\t\tHTML: filePasteHandler( files ),\n\t\t\t\t\tmode: 'BLOCKS',\n\t\t\t\t\ttagName,\n\t\t\t\t\tpreserveWhiteSpace,\n\t\t\t\t} );\n\n\t\t\t\t// Allows us to ask for this information when we get a report.\n\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\twindow.console.log( 'Received items:\\n\\n', files );\n\n\t\t\t\tif ( onReplace && isEmpty( value ) ) {\n\t\t\t\t\tonReplace( content );\n\t\t\t\t} else {\n\t\t\t\t\tsplitValue( value, content );\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlet mode = onReplace && onSplit ? 'AUTO' : 'INLINE';\n\n\t\t\tconst isPastedURL = isURL( plainText.trim() );\n\t\t\tconst presentEmbedHandlerPicker = () =>\n\t\t\t\tembedHandlerPickerRef.current?.presentPicker( {\n\t\t\t\t\tcreateEmbed: () =>\n\t\t\t\t\t\tonReplace( content, content.length - 1, -1 ),\n\t\t\t\t\tcreateLink: () =>\n\t\t\t\t\t\tcreateLinkInParagraph( plainText.trim(), onReplace ),\n\t\t\t\t} );\n\n\t\t\tif (\n\t\t\t\t__unstableEmbedURLOnPaste &&\n\t\t\t\tisEmpty( value ) &&\n\t\t\t\tisPastedURL\n\t\t\t) {\n\t\t\t\tmode = 'BLOCKS';\n\t\t\t}\n\n\t\t\tconst content = pasteHandler( {\n\t\t\t\tHTML: html,\n\t\t\t\tplainText,\n\t\t\t\tmode,\n\t\t\t\ttagName,\n\t\t\t\tpreserveWhiteSpace,\n\t\t\t} );\n\n\t\t\tif ( typeof content === 'string' ) {\n\t\t\t\tconst valueToInsert = create( { html: content } );\n\t\t\t\taddActiveFormats( valueToInsert, activeFormats );\n\t\t\t\tonChange( insert( value, valueToInsert ) );\n\t\t\t} else if ( content.length > 0 ) {\n\t\t\t\t// When an URL is pasted in an empty paragraph then the EmbedHandlerPicker should showcase options allowing the transformation of that URL\n\t\t\t\t// into either an Embed block or a link within the target paragraph. If the paragraph is non-empty, the URL is pasted as text.\n\t\t\t\tconst canPasteEmbed =\n\t\t\t\t\tisPastedURL &&\n\t\t\t\t\tcontent.length === 1 &&\n\t\t\t\t\tcontent[ 0 ].name === 'core/embed';\n\t\t\t\tif ( onReplace && isEmpty( value ) ) {\n\t\t\t\t\tif ( canPasteEmbed ) {\n\t\t\t\t\t\tonChange(\n\t\t\t\t\t\t\tinsert( value, create( { text: plainText } ) )\n\t\t\t\t\t\t);\n\t\t\t\t\t\tif ( __unstableEmbedURLOnPaste ) {\n\t\t\t\t\t\t\tpresentEmbedHandlerPicker();\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tonReplace( content, content.length - 1, -1, {\n\t\t\t\t\t\tsource: 'clipboard',\n\t\t\t\t\t} );\n\t\t\t\t} else {\n\t\t\t\t\tif ( canPasteEmbed ) {\n\t\t\t\t\t\tonChange(\n\t\t\t\t\t\t\tinsert( value, create( { text: plainText } ) )\n\t\t\t\t\t\t);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tsplitValue( value, content );\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t[\n\t\t\ttagName,\n\t\t\tonReplace,\n\t\t\tonSplit,\n\t\t\tsplitValue,\n\t\t\t__unstableEmbedURLOnPaste,\n\t\t\tpreserveWhiteSpace,\n\t\t\tpastePlainText,\n\t\t]\n\t);\n\n\tconst inputRule = useCallback(\n\t\t( value, valueToFormat ) => {\n\t\t\tif ( ! onReplace ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst { start: startPosition, text } = value;\n\t\t\tconst characterBefore = text.slice(\n\t\t\t\tstartPosition - 1,\n\t\t\t\tstartPosition\n\t\t\t);\n\n\t\t\t// The character right before the caret must be a plain space.\n\t\t\tif ( characterBefore !== ' ' ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst trimmedTextBefore = text.slice( 0, startPosition ).trim();\n\t\t\tconst prefixTransforms = getBlockTransforms( 'from' ).filter(\n\t\t\t\t( { type } ) => type === 'prefix'\n\t\t\t);\n\t\t\tconst transformation = findTransform(\n\t\t\t\tprefixTransforms,\n\t\t\t\t( { prefix } ) => {\n\t\t\t\t\treturn trimmedTextBefore === prefix;\n\t\t\t\t}\n\t\t\t);\n\n\t\t\tif ( ! transformation ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst content = valueToFormat(\n\t\t\t\tslice( value, startPosition, text.length )\n\t\t\t);\n\t\t\tconst block = transformation.transform( content );\n\n\t\t\tonReplace( [ block ] );\n\t\t\t__unstableMarkAutomaticChange();\n\t\t},\n\t\t[ onReplace, __unstableMarkAutomaticChange ]\n\t);\n\n\tconst mergedRef = useMergeRefs( [ providedRef, fallbackRef ] );\n\n\treturn (\n\t\t<RichText\n\t\t\tclientId={ clientId }\n\t\t\tidentifier={ identifier }\n\t\t\tnativeEditorRef={ mergedRef }\n\t\t\tvalue={ adjustedValue }\n\t\t\tonChange={ adjustedOnChange }\n\t\t\tselectionStart={ selectionStart }\n\t\t\tselectionEnd={ selectionEnd }\n\t\t\tonSelectionChange={ onSelectionChange }\n\t\t\ttagName={ tagName }\n\t\t\tstart={ start }\n\t\t\treversed={ reversed }\n\t\t\tplaceholder={ placeholder }\n\t\t\tallowedFormats={ adjustedAllowedFormats }\n\t\t\twithoutInteractiveFormatting={ withoutInteractiveFormatting }\n\t\t\tonEnter={ onEnter }\n\t\t\tonDelete={ onDelete }\n\t\t\tonPaste={ onPaste }\n\t\t\t__unstableIsSelected={ isSelected }\n\t\t\t__unstableInputRule={ inputRule }\n\t\t\t__unstableOnEnterFormattedText={ enterFormattedText }\n\t\t\t__unstableOnExitFormattedText={ exitFormattedText }\n\t\t\t__unstableOnCreateUndoLevel={ __unstableMarkLastChangeAsPersistent }\n\t\t\t__unstableMarkAutomaticChange={ __unstableMarkAutomaticChange }\n\t\t\t__unstableDidAutomaticChange={ didAutomaticChange }\n\t\t\t__unstableUndo={ undo }\n\t\t\t__unstableDisableFormats={ disableFormats }\n\t\t\tpreserveWhiteSpace={ preserveWhiteSpace }\n\t\t\tdisabled={ disabled }\n\t\t\tunstableOnFocus={ unstableOnFocus }\n\t\t\t__unstableAllowPrefixTransformations={\n\t\t\t\t__unstableAllowPrefixTransformations\n\t\t\t}\n\t\t\t// Native props.\n\t\t\tblockIsSelected={\n\t\t\t\toriginalIsSelected !== undefined\n\t\t\t\t\t? originalIsSelected\n\t\t\t\t\t: blockIsSelected\n\t\t\t}\n\t\t\tshouldBlurOnUnmount={ shouldBlurOnUnmount }\n\t\t\t__unstableMobileNoFocusOnMount={ __unstableMobileNoFocusOnMount }\n\t\t\tdeleteEnter={ deleteEnter }\n\t\t\tplaceholderTextColor={ placeholderTextColor }\n\t\t\ttextAlign={ textAlign }\n\t\t\tselectionColor={ selectionColor }\n\t\t\ttagsToEliminate={ tagsToEliminate }\n\t\t\tdisableEditingMenu={ disableEditingMenu }\n\t\t\tfontSize={ fontSize }\n\t\t\tfontFamily={ fontFamily }\n\t\t\tfontWeight={ fontWeight }\n\t\t\tfontStyle={ fontStyle }\n\t\t\tminWidth={ minWidth }\n\t\t\tmaxWidth={ maxWidth }\n\t\t\tonBlur={ onBlur }\n\t\t\tdisableSuggestions={ disableSuggestions }\n\t\t\tdisableAutocorrection={ disableAutocorrection }\n\t\t\tcontainerWidth={ containerWidth }\n\t\t\tclearCurrentSelectionOnUnmount={ clearCurrentSelectionOnUnmount }\n\t\t\t// Props to be set on the editable container are destructured on the\n\t\t\t// element itself for web (see below), but passed through rich text\n\t\t\t// for native.\n\t\t\tid={ props.id }\n\t\t\tstyle={ props.style }\n\t\t>\n\t\t\t{ ( {\n\t\t\t\tisSelected: nestedIsSelected,\n\t\t\t\tvalue,\n\t\t\t\tonChange,\n\t\t\t\tonFocus,\n\t\t\t\teditableProps,\n\t\t\t\teditableTagName: TagName,\n\t\t\t} ) => (\n\t\t\t\t<>\n\t\t\t\t\t{ children && children( { value, onChange, onFocus } ) }\n\t\t\t\t\t{ nestedIsSelected && hasFormats && (\n\t\t\t\t\t\t<FormatToolbarContainer\n\t\t\t\t\t\t\tinline={ inlineToolbar }\n\t\t\t\t\t\t\tanchorRef={ fallbackRef.current }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ nestedIsSelected && <RemoveBrowserShortcuts /> }\n\t\t\t\t\t<Autocomplete\n\t\t\t\t\t\tonReplace={ onReplace }\n\t\t\t\t\t\tcompleters={ autocompleters }\n\t\t\t\t\t\trecord={ value }\n\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\tisSelected={ nestedIsSelected }\n\t\t\t\t\t\tcontentRef={ fallbackRef }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ ( { listBoxId, activeId, onKeyDown } ) => (\n\t\t\t\t\t\t\t<TagName\n\t\t\t\t\t\t\t\t{ ...editableProps }\n\t\t\t\t\t\t\t\t{ ...props }\n\t\t\t\t\t\t\t\tstyle={\n\t\t\t\t\t\t\t\t\tprops.style\n\t\t\t\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\t\t\t\t...props.style,\n\t\t\t\t\t\t\t\t\t\t\t\t...editableProps.style,\n\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t: editableProps.style\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t\t\tclasses,\n\t\t\t\t\t\t\t\t\tprops.className,\n\t\t\t\t\t\t\t\t\teditableProps.className\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\taria-autocomplete={\n\t\t\t\t\t\t\t\t\tlistBoxId ? 'list' : undefined\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\taria-owns={ listBoxId }\n\t\t\t\t\t\t\t\taria-activedescendant={ activeId }\n\t\t\t\t\t\t\t\tonKeyDown={ ( event ) => {\n\t\t\t\t\t\t\t\t\tonKeyDown( event );\n\t\t\t\t\t\t\t\t\teditableProps.onKeyDown( event );\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</Autocomplete>\n\t\t\t\t\t<EmbedHandlerPicker ref={ embedHandlerPickerRef } />\n\t\t\t\t</>\n\t\t\t) }\n\t\t</RichText>\n\t);\n}\n\n// This export does not actually implement a private API, but was exported\n// under this name for interoperability with the web version of the RichText\n// component.\nexport const PrivateRichText = withDeprecations(\n\tforwardRef( RichTextWrapper )\n);\n\nPrivateRichText.Content = Content;\n\nPrivateRichText.isEmpty = ( value ) => {\n\treturn ! value || value.length === 0;\n};\n\nPrivateRichText.Content.defaultProps = {\n\tformat: 'string',\n\tvalue: '',\n};\n\nPrivateRichText.Raw = forwardRef( ( props, ref ) => (\n\t<RichText { ...props } nativeEditorRef={ ref } />\n) );\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/rich-text/README.md\n */\nexport default PrivateRichText;\nexport { RichTextShortcut } from './shortcut';\nexport { RichTextToolbarButton } from './toolbar-button';\nexport { __unstableRichTextInputEvent } from './input-event';\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,QAAQ,EAAEC,MAAM,EAAEC,WAAW,EAAEC,UAAU,QAAQ,oBAAoB;AAC9E,SAASC,WAAW,EAAEC,SAAS,QA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C;;AAEH;AACA;AACA;AACA,eAAeC,eAAe;AAC9B,SAASI,gBAAgB,QAAQ,YAAY;AAC7C,SAASC,qBAAqB,QAAQ,kBAAkB;AACxD,SAASC,4BAA4B,QAAQ,eAAe","ignoreList":[]}
@@ -1,4 +1,3 @@
1
- import { createElement } from "react";
2
1
  /**
3
2
  * WordPress dependencies
4
3
  */
@@ -15,6 +14,7 @@ import { RichTextWrapper } from './';
15
14
  import { store as blockEditorStore } from '../../store';
16
15
  import { useBlockEditContext } from '../block-edit';
17
16
  import { getMultilineTag } from './utils';
17
+ import { jsx as _jsx } from "react/jsx-runtime";
18
18
  function RichTextMultiline({
19
19
  children,
20
20
  identifier,
@@ -49,71 +49,71 @@ function RichTextMultiline({
49
49
  function _onChange(newValues) {
50
50
  onChange(`<${multilineTagName}>${newValues.join(`</${multilineTagName}><${multilineTagName}>`)}</${multilineTagName}>`);
51
51
  }
52
- return createElement(TagName, {
53
- ref: forwardedRef
54
- }, values.map((_value, index) => {
55
- return createElement(RichTextWrapper, {
56
- key: index,
57
- identifier: `${identifier}-${index}`,
58
- tagName: multilineTagName,
59
- value: _value,
60
- onChange: newValue => {
61
- const newValues = values.slice();
62
- newValues[index] = newValue;
63
- _onChange(newValues);
64
- },
65
- isSelected: undefined,
66
- onKeyDown: event => {
67
- if (event.keyCode !== ENTER) {
68
- return;
69
- }
70
- event.preventDefault();
71
- const {
72
- offset: start
73
- } = getSelectionStart();
74
- const {
75
- offset: end
76
- } = getSelectionEnd();
77
-
78
- // Cannot split if there is no selection.
79
- if (typeof start !== 'number' || typeof end !== 'number') {
80
- return;
81
- }
82
- const richTextValue = create({
83
- html: _value
84
- });
85
- richTextValue.start = start;
86
- richTextValue.end = end;
87
- const array = split(richTextValue).map(v => toHTMLString({
88
- value: v
89
- }));
90
- const newValues = values.slice();
91
- newValues.splice(index, 1, ...array);
92
- _onChange(newValues);
93
- selectionChange(clientId, `${identifier}-${index + 1}`, 0, 0);
94
- },
95
- onMerge: forward => {
96
- const newValues = values.slice();
97
- let offset = 0;
98
- if (forward) {
99
- if (!newValues[index + 1]) {
52
+ return /*#__PURE__*/_jsx(TagName, {
53
+ ref: forwardedRef,
54
+ children: values.map((_value, index) => {
55
+ return /*#__PURE__*/_jsx(RichTextWrapper, {
56
+ identifier: `${identifier}-${index}`,
57
+ tagName: multilineTagName,
58
+ value: _value,
59
+ onChange: newValue => {
60
+ const newValues = values.slice();
61
+ newValues[index] = newValue;
62
+ _onChange(newValues);
63
+ },
64
+ isSelected: undefined,
65
+ onKeyDown: event => {
66
+ if (event.keyCode !== ENTER) {
100
67
  return;
101
68
  }
102
- newValues.splice(index, 2, newValues[index] + newValues[index + 1]);
103
- offset = newValues[index].length - 1;
104
- } else {
105
- if (!newValues[index - 1]) {
69
+ event.preventDefault();
70
+ const {
71
+ offset: start
72
+ } = getSelectionStart();
73
+ const {
74
+ offset: end
75
+ } = getSelectionEnd();
76
+
77
+ // Cannot split if there is no selection.
78
+ if (typeof start !== 'number' || typeof end !== 'number') {
106
79
  return;
107
80
  }
108
- newValues.splice(index - 1, 2, newValues[index - 1] + newValues[index]);
109
- offset = newValues[index - 1].length - 1;
110
- }
111
- _onChange(newValues);
112
- selectionChange(clientId, `${identifier}-${index - (forward ? 0 : 1)}`, offset, offset);
113
- },
114
- ...props
115
- });
116
- }));
81
+ const richTextValue = create({
82
+ html: _value
83
+ });
84
+ richTextValue.start = start;
85
+ richTextValue.end = end;
86
+ const array = split(richTextValue).map(v => toHTMLString({
87
+ value: v
88
+ }));
89
+ const newValues = values.slice();
90
+ newValues.splice(index, 1, ...array);
91
+ _onChange(newValues);
92
+ selectionChange(clientId, `${identifier}-${index + 1}`, 0, 0);
93
+ },
94
+ onMerge: forward => {
95
+ const newValues = values.slice();
96
+ let offset = 0;
97
+ if (forward) {
98
+ if (!newValues[index + 1]) {
99
+ return;
100
+ }
101
+ newValues.splice(index, 2, newValues[index] + newValues[index + 1]);
102
+ offset = newValues[index].length - 1;
103
+ } else {
104
+ if (!newValues[index - 1]) {
105
+ return;
106
+ }
107
+ newValues.splice(index - 1, 2, newValues[index - 1] + newValues[index]);
108
+ offset = newValues[index - 1].length - 1;
109
+ }
110
+ _onChange(newValues);
111
+ selectionChange(clientId, `${identifier}-${index - (forward ? 0 : 1)}`, offset, offset);
112
+ },
113
+ ...props
114
+ }, index);
115
+ })
116
+ });
117
117
  }
118
118
  export default forwardRef(RichTextMultiline);
119
119
  //# sourceMappingURL=multiline.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["forwardRef","deprecated","useDispatch","useSelect","ENTER","create","split","toHTMLString","RichTextWrapper","store","blockEditorStore","useBlockEditContext","getMultilineTag","RichTextMultiline","children","identifier","tagName","TagName","value","onChange","multiline","props","forwardedRef","since","version","alternative","link","clientId","getSelectionStart","getSelectionEnd","selectionChange","multilineTagName","padded","values","shift","pop","_onChange","newValues","join","createElement","ref","map","_value","index","key","newValue","slice","isSelected","undefined","onKeyDown","event","keyCode","preventDefault","offset","start","end","richTextValue","html","array","v","splice","onMerge","forward","length"],"sources":["@wordpress/block-editor/src/components/rich-text/multiline.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { ENTER } from '@wordpress/keycodes';\nimport { create, split, toHTMLString } from '@wordpress/rich-text';\n\n/**\n * Internal dependencies\n */\nimport { RichTextWrapper } from './';\nimport { store as blockEditorStore } from '../../store';\nimport { useBlockEditContext } from '../block-edit';\nimport { getMultilineTag } from './utils';\n\nfunction RichTextMultiline(\n\t{\n\t\tchildren,\n\t\tidentifier,\n\t\ttagName: TagName = 'div',\n\t\tvalue = '',\n\t\tonChange,\n\t\tmultiline,\n\t\t...props\n\t},\n\tforwardedRef\n) {\n\tdeprecated( 'wp.blockEditor.RichText multiline prop', {\n\t\tsince: '6.1',\n\t\tversion: '6.3',\n\t\talternative: 'nested blocks (InnerBlocks)',\n\t\tlink: 'https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/nested-blocks-inner-blocks/',\n\t} );\n\n\tconst { clientId } = useBlockEditContext();\n\tconst { getSelectionStart, getSelectionEnd } =\n\t\tuseSelect( blockEditorStore );\n\tconst { selectionChange } = useDispatch( blockEditorStore );\n\n\tconst multilineTagName = getMultilineTag( multiline );\n\tvalue = value || `<${ multilineTagName }></${ multilineTagName }>`;\n\tconst padded = `</${ multilineTagName }>${ value }<${ multilineTagName }>`;\n\tconst values = padded.split(\n\t\t`</${ multilineTagName }><${ multilineTagName }>`\n\t);\n\n\tvalues.shift();\n\tvalues.pop();\n\n\tfunction _onChange( newValues ) {\n\t\tonChange(\n\t\t\t`<${ multilineTagName }>${ newValues.join(\n\t\t\t\t`</${ multilineTagName }><${ multilineTagName }>`\n\t\t\t) }</${ multilineTagName }>`\n\t\t);\n\t}\n\n\treturn (\n\t\t<TagName ref={ forwardedRef }>\n\t\t\t{ values.map( ( _value, index ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<RichTextWrapper\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\tidentifier={ `${ identifier }-${ index }` }\n\t\t\t\t\t\ttagName={ multilineTagName }\n\t\t\t\t\t\tvalue={ _value }\n\t\t\t\t\t\tonChange={ ( newValue ) => {\n\t\t\t\t\t\t\tconst newValues = values.slice();\n\t\t\t\t\t\t\tnewValues[ index ] = newValue;\n\t\t\t\t\t\t\t_onChange( newValues );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tisSelected={ undefined }\n\t\t\t\t\t\tonKeyDown={ ( event ) => {\n\t\t\t\t\t\t\tif ( event.keyCode !== ENTER ) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tevent.preventDefault();\n\n\t\t\t\t\t\t\tconst { offset: start } = getSelectionStart();\n\t\t\t\t\t\t\tconst { offset: end } = getSelectionEnd();\n\n\t\t\t\t\t\t\t// Cannot split if there is no selection.\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\ttypeof start !== 'number' ||\n\t\t\t\t\t\t\t\ttypeof end !== 'number'\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tconst richTextValue = create( { html: _value } );\n\t\t\t\t\t\t\trichTextValue.start = start;\n\t\t\t\t\t\t\trichTextValue.end = end;\n\n\t\t\t\t\t\t\tconst array = split( richTextValue ).map( ( v ) =>\n\t\t\t\t\t\t\t\ttoHTMLString( { value: v } )\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\tconst newValues = values.slice();\n\t\t\t\t\t\t\tnewValues.splice( index, 1, ...array );\n\t\t\t\t\t\t\t_onChange( newValues );\n\t\t\t\t\t\t\tselectionChange(\n\t\t\t\t\t\t\t\tclientId,\n\t\t\t\t\t\t\t\t`${ identifier }-${ index + 1 }`,\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t0\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tonMerge={ ( forward ) => {\n\t\t\t\t\t\t\tconst newValues = values.slice();\n\t\t\t\t\t\t\tlet offset = 0;\n\t\t\t\t\t\t\tif ( forward ) {\n\t\t\t\t\t\t\t\tif ( ! newValues[ index + 1 ] ) {\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tnewValues.splice(\n\t\t\t\t\t\t\t\t\tindex,\n\t\t\t\t\t\t\t\t\t2,\n\t\t\t\t\t\t\t\t\tnewValues[ index ] + newValues[ index + 1 ]\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\toffset = newValues[ index ].length - 1;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tif ( ! newValues[ index - 1 ] ) {\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tnewValues.splice(\n\t\t\t\t\t\t\t\t\tindex - 1,\n\t\t\t\t\t\t\t\t\t2,\n\t\t\t\t\t\t\t\t\tnewValues[ index - 1 ] + newValues[ index ]\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\toffset = newValues[ index - 1 ].length - 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t_onChange( newValues );\n\t\t\t\t\t\t\tselectionChange(\n\t\t\t\t\t\t\t\tclientId,\n\t\t\t\t\t\t\t\t`${ identifier }-${\n\t\t\t\t\t\t\t\t\tindex - ( forward ? 0 : 1 )\n\t\t\t\t\t\t\t\t}`,\n\t\t\t\t\t\t\t\toffset,\n\t\t\t\t\t\t\t\toffset\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} }\n\t\t\t\t\t\t{ ...props }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</TagName>\n\t);\n}\n\nexport default forwardRef( RichTextMultiline );\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,UAAU,QAAQ,oBAAoB;AAC/C,OAAOC,UAAU,MAAM,uBAAuB;AAC9C,SAASC,WAAW,EAAEC,SAAS,QAAQ,iBAAiB;AACxD,SAASC,KAAK,QAAQ,qBAAqB;AAC3C,SAASC,MAAM,EAAEC,KAAK,EAAEC,YAAY,QAAQ,sBAAsB;;AAElE;AACA;AACA;AACA,SAASC,eAAe,QAAQ,IAAI;AACpC,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;AACvD,SAASC,mBAAmB,QAAQ,eAAe;AACnD,SAASC,eAAe,QAAQ,SAAS;AAEzC,SAASC,iBAAiBA,CACzB;EACCC,QAAQ;EACRC,UAAU;EACVC,OAAO,EAAEC,OAAO,GAAG,KAAK;EACxBC,KAAK,GAAG,EAAE;EACVC,QAAQ;EACRC,SAAS;EACT,GAAGC;AACJ,CAAC,EACDC,YAAY,EACX;EACDrB,UAAU,CAAE,wCAAwC,EAAE;IACrDsB,KAAK,EAAE,KAAK;IACZC,OAAO,EAAE,KAAK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S,OAAO,EAAG;UACd,IAAK,CAAEzB,SAAS,CAAEM,KAAK,GAAG,CAAC,CAAE,EAAG;YAC/B;UACD;UACAN,SAAS,CAACuB,MAAM,CACfjB,KAAK,EACL,CAAC,EACDN,SAAS,CAAEM,KAAK,CAAE,GAAGN,SAAS,CAAEM,KAAK,GAAG,CAAC,CAC1C,CAAC;UACDU,MAAM,GAAGhB,SAAS,CAAEM,KAAK,CAAE,CAACoB,MAAM,GAAG,CAAC;QACvC,CAAC,MAAM;UACN,IAAK,CAAE1B,SAAS,CAAEM,KAAK,GAAG,CAAC,CAAE,EAAG;YAC/B;UACD;UACAN,SAAS,CAACuB,MAAM,CACfjB,KAAK,GAAG,CAAC,EACT,CAAC,EACDN,SAAS,CAAEM,KAAK,GAAG,CAAC,CAAE,GAAGN,SAAS,CAAEM,KAAK,CAC1C,CAAC;UACDU,MAAM,GAAGhB,SAAS,CAAEM,KAAK,GAAG,CAAC,CAAE,CAACoB,MAAM,GAAG,CAAC;QAC3C;QACA3B,SAAS,CAAEC,SAAU,CAAC;QACtBP,eAAe,CACdH,QAAQ,EACP,GAAGZ,UAAY,IACf4B,KAAK,IAAKmB,OAAO,GAAG,CAAC,GAAG,CAAC,CACzB,EAAC,EACFT,MAAM,EACNA,MACD,CAAC;MACF,CAAG;MAAA,GACEhC;IAAK,CACV,CAAC;EAEJ,CAAE,CACM,CAAC;AAEZ;AAEA,eAAerB,UAAU,CAAEa,iBAAkB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["forwardRef","deprecated","useDispatch","useSelect","ENTER","create","split","toHTMLString","RichTextWrapper","store","blockEditorStore","useBlockEditContext","getMultilineTag","jsx","_jsx","RichTextMultiline","children","identifier","tagName","TagName","value","onChange","multiline","props","forwardedRef","since","version","alternative","link","clientId","getSelectionStart","getSelectionEnd","selectionChange","multilineTagName","padded","values","shift","pop","_onChange","newValues","join","ref","map","_value","index","newValue","slice","isSelected","undefined","onKeyDown","event","keyCode","preventDefault","offset","start","end","richTextValue","html","array","v","splice","onMerge","forward","length"],"sources":["@wordpress/block-editor/src/components/rich-text/multiline.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { ENTER } from '@wordpress/keycodes';\nimport { create, split, toHTMLString } from '@wordpress/rich-text';\n\n/**\n * Internal dependencies\n */\nimport { RichTextWrapper } from './';\nimport { store as blockEditorStore } from '../../store';\nimport { useBlockEditContext } from '../block-edit';\nimport { getMultilineTag } from './utils';\n\nfunction RichTextMultiline(\n\t{\n\t\tchildren,\n\t\tidentifier,\n\t\ttagName: TagName = 'div',\n\t\tvalue = '',\n\t\tonChange,\n\t\tmultiline,\n\t\t...props\n\t},\n\tforwardedRef\n) {\n\tdeprecated( 'wp.blockEditor.RichText multiline prop', {\n\t\tsince: '6.1',\n\t\tversion: '6.3',\n\t\talternative: 'nested blocks (InnerBlocks)',\n\t\tlink: 'https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/nested-blocks-inner-blocks/',\n\t} );\n\n\tconst { clientId } = useBlockEditContext();\n\tconst { getSelectionStart, getSelectionEnd } =\n\t\tuseSelect( blockEditorStore );\n\tconst { selectionChange } = useDispatch( blockEditorStore );\n\n\tconst multilineTagName = getMultilineTag( multiline );\n\tvalue = value || `<${ multilineTagName }></${ multilineTagName }>`;\n\tconst padded = `</${ multilineTagName }>${ value }<${ multilineTagName }>`;\n\tconst values = padded.split(\n\t\t`</${ multilineTagName }><${ multilineTagName }>`\n\t);\n\n\tvalues.shift();\n\tvalues.pop();\n\n\tfunction _onChange( newValues ) {\n\t\tonChange(\n\t\t\t`<${ multilineTagName }>${ newValues.join(\n\t\t\t\t`</${ multilineTagName }><${ multilineTagName }>`\n\t\t\t) }</${ multilineTagName }>`\n\t\t);\n\t}\n\n\treturn (\n\t\t<TagName ref={ forwardedRef }>\n\t\t\t{ values.map( ( _value, index ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<RichTextWrapper\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\tidentifier={ `${ identifier }-${ index }` }\n\t\t\t\t\t\ttagName={ multilineTagName }\n\t\t\t\t\t\tvalue={ _value }\n\t\t\t\t\t\tonChange={ ( newValue ) => {\n\t\t\t\t\t\t\tconst newValues = values.slice();\n\t\t\t\t\t\t\tnewValues[ index ] = newValue;\n\t\t\t\t\t\t\t_onChange( newValues );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tisSelected={ undefined }\n\t\t\t\t\t\tonKeyDown={ ( event ) => {\n\t\t\t\t\t\t\tif ( event.keyCode !== ENTER ) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tevent.preventDefault();\n\n\t\t\t\t\t\t\tconst { offset: start } = getSelectionStart();\n\t\t\t\t\t\t\tconst { offset: end } = getSelectionEnd();\n\n\t\t\t\t\t\t\t// Cannot split if there is no selection.\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\ttypeof start !== 'number' ||\n\t\t\t\t\t\t\t\ttypeof end !== 'number'\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tconst richTextValue = create( { html: _value } );\n\t\t\t\t\t\t\trichTextValue.start = start;\n\t\t\t\t\t\t\trichTextValue.end = end;\n\n\t\t\t\t\t\t\tconst array = split( richTextValue ).map( ( v ) =>\n\t\t\t\t\t\t\t\ttoHTMLString( { value: v } )\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\tconst newValues = values.slice();\n\t\t\t\t\t\t\tnewValues.splice( index, 1, ...array );\n\t\t\t\t\t\t\t_onChange( newValues );\n\t\t\t\t\t\t\tselectionChange(\n\t\t\t\t\t\t\t\tclientId,\n\t\t\t\t\t\t\t\t`${ identifier }-${ index + 1 }`,\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t0\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tonMerge={ ( forward ) => {\n\t\t\t\t\t\t\tconst newValues = values.slice();\n\t\t\t\t\t\t\tlet offset = 0;\n\t\t\t\t\t\t\tif ( forward ) {\n\t\t\t\t\t\t\t\tif ( ! newValues[ index + 1 ] ) {\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tnewValues.splice(\n\t\t\t\t\t\t\t\t\tindex,\n\t\t\t\t\t\t\t\t\t2,\n\t\t\t\t\t\t\t\t\tnewValues[ index ] + newValues[ index + 1 ]\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\toffset = newValues[ index ].length - 1;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tif ( ! newValues[ index - 1 ] ) {\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tnewValues.splice(\n\t\t\t\t\t\t\t\t\tindex - 1,\n\t\t\t\t\t\t\t\t\t2,\n\t\t\t\t\t\t\t\t\tnewValues[ index - 1 ] + newValues[ index ]\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\toffset = newValues[ index - 1 ].length - 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t_onChange( newValues );\n\t\t\t\t\t\t\tselectionChange(\n\t\t\t\t\t\t\t\tclientId,\n\t\t\t\t\t\t\t\t`${ identifier }-${\n\t\t\t\t\t\t\t\t\tindex - ( forward ? 0 : 1 )\n\t\t\t\t\t\t\t\t}`,\n\t\t\t\t\t\t\t\toffset,\n\t\t\t\t\t\t\t\toffset\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} }\n\t\t\t\t\t\t{ ...props }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</TagName>\n\t);\n}\n\nexport default forwardRef( RichTextMultiline );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,UAAU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M,GAAG,CAAC;UAC3C;UACAzB,SAAS,CAAEC,SAAU,CAAC;UACtBP,eAAe,CACdH,QAAQ,EACP,GAAGZ,UAAY,IACf2B,KAAK,IAAKkB,OAAO,GAAG,CAAC,GAAG,CAAC,CACzB,EAAC,EACFT,MAAM,EACNA,MACD,CAAC;QACF,CAAG;QAAA,GACE9B;MAAK,GAhFJqB,KAiFN,CAAC;IAEJ,CAAE;EAAC,CACK,CAAC;AAEZ;AAEA,eAAe5C,UAAU,CAAEe,iBAAkB,CAAC","ignoreList":[]}
@@ -1,8 +1,8 @@
1
- import { createElement } from "react";
2
1
  /**
3
2
  * WordPress dependencies
4
3
  */
5
4
  import { getActiveFormat, getActiveObject } from '@wordpress/rich-text';
5
+ import { jsx as _jsx } from "react/jsx-runtime";
6
6
  export default function FormatEdit({
7
7
  formatTypes,
8
8
  onChange,
@@ -22,8 +22,7 @@ export default function FormatEdit({
22
22
  const isActive = activeFormat !== undefined;
23
23
  const activeObject = getActiveObject(value);
24
24
  const isObjectActive = activeObject !== undefined && activeObject.type === name;
25
- return createElement(Edit, {
26
- key: name,
25
+ return /*#__PURE__*/_jsx(Edit, {
27
26
  isActive: isActive,
28
27
  activeAttributes: isActive ? activeFormat.attributes || {} : {},
29
28
  isObjectActive: isObjectActive,
@@ -32,7 +31,7 @@ export default function FormatEdit({
32
31
  onChange: onChange,
33
32
  onFocus: onFocus,
34
33
  contentRef: forwardedRef
35
- });
34
+ }, name);
36
35
  });
37
36
  }
38
37
  //# sourceMappingURL=format-edit.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["getActiveFormat","getActiveObject","FormatEdit","formatTypes","onChange","onFocus","value","forwardedRef","map","settings","name","edit","Edit","activeFormat","isActive","undefined","activeObject","isObjectActive","type","createElement","key","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":";AAAA;AACA;AACA;AACA,SAASA,eAAe,EAAEC,eAAe,QAAQ,sBAAsB;AAEvE,eAAe,SAASC,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,GAAGb,eAAe,CAAEM,KAAK,EAAEI,IAAK,CAAC;IACnD,MAAMI,QAAQ,GAAGD,YAAY,KAAKE,SAAS;IAC3C,MAAMC,YAAY,GAAGf,eAAe,CAAEK,KAAM,CAAC;IAC7C,MAAMW,cAAc,GACnBD,YAAY,KAAKD,SAAS,IAAIC,YAAY,CAACE,IAAI,KAAKR,IAAI;IAEzD,OACCS,aAAA,CAACP,IAAI;MACJQ,GAAG,EAAGV,IAAM;MACZI,QAAQ,EAAGA,QAAU;MACrBO,gBAAgB,EACfP,QAAQ,GAAGD,YAAY,CAACS,UAAU,IAAI,CAAC,CAAC,GAAG,CAAC,CAC5C;MACDL,cAAc,EAAGA,cAAgB;MACjCM,sBAAsB,EACrBN,cAAc,GAAGD,YAAY,CAACM,UAAU,IAAI,CAAC,CAAC,GAAG,CAAC,CAClD;MACDhB,KAAK,EAAGA,KAAO;MACfF,QAAQ,EAAGA,QAAU;MACrBC,OAAO,EAAGA,OAAS;MACnBmB,UAAU,EAAGjB;IAAc,CAC3B,CAAC;EAEJ,CAAE,CAAC;AACJ","ignoreList":[]}
1
+ {"version":3,"names":["getActiveFormat","getActiveObject","jsx","_jsx","FormatEdit","formatTypes","onChange","onFocus","value","forwardedRef","map","settings","name","edit","Edit","activeFormat","isActive","undefined","activeObject","isObjectActive","type","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":"AAAA;AACA;AACA;AACA,SAASA,eAAe,EAAEC,eAAe,QAAQ,sBAAsB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAExE,eAAe,SAASC,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,GAAGf,eAAe,CAAEQ,KAAK,EAAEI,IAAK,CAAC;IACnD,MAAMI,QAAQ,GAAGD,YAAY,KAAKE,SAAS;IAC3C,MAAMC,YAAY,GAAGjB,eAAe,CAAEO,KAAM,CAAC;IAC7C,MAAMW,cAAc,GACnBD,YAAY,KAAKD,SAAS,IAAIC,YAAY,CAACE,IAAI,KAAKR,IAAI;IAEzD,oBACCT,IAAA,CAACW,IAAI;MAEJE,QAAQ,EAAGA,QAAU;MACrBK,gBAAgB,EACfL,QAAQ,GAAGD,YAAY,CAACO,UAAU,IAAI,CAAC,CAAC,GAAG,CAAC,CAC5C;MACDH,cAAc,EAAGA,cAAgB;MACjCI,sBAAsB,EACrBJ,cAAc,GAAGD,YAAY,CAACI,UAAU,IAAI,CAAC,CAAC,GAAG,CAAC,CAClD;MACDd,KAAK,EAAGA,KAAO;MACfF,QAAQ,EAAG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