@wordpress/block-editor 14.4.0 → 14.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1056) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/README.md +4 -8
  3. package/build/autocompleters/block.js +13 -5
  4. package/build/autocompleters/block.js.map +1 -1
  5. package/build/components/background-image-control/index.js +1 -1
  6. package/build/components/background-image-control/index.js.map +1 -1
  7. package/build/components/block-canvas/index.js +10 -0
  8. package/build/components/block-canvas/index.js.map +1 -1
  9. package/build/components/block-card/index.js +2 -2
  10. package/build/components/block-card/index.js.map +1 -1
  11. package/build/components/block-controls/slot.js.map +1 -1
  12. package/build/components/block-controls/slot.native.js.map +1 -1
  13. package/build/components/block-draggable/draggable-chip.js +1 -1
  14. package/build/components/block-draggable/draggable-chip.js.map +1 -1
  15. package/build/components/block-full-height-alignment-control/index.js +1 -1
  16. package/build/components/block-full-height-alignment-control/index.js.map +1 -1
  17. package/build/components/block-list/block-invalid-warning.native.js +1 -1
  18. package/build/components/block-list/block-invalid-warning.native.js.map +1 -1
  19. package/build/components/block-list/block-list-item.native.js.map +1 -1
  20. package/build/components/block-list/block.js +1 -1
  21. package/build/components/block-list/block.js.map +1 -1
  22. package/build/components/block-list/block.native.js +1 -7
  23. package/build/components/block-list/block.native.js.map +1 -1
  24. package/build/components/block-list/index.js +6 -5
  25. package/build/components/block-list/index.js.map +1 -1
  26. package/build/components/block-list/index.native.js.map +1 -1
  27. package/build/components/block-list/use-block-props/index.js +1 -2
  28. package/build/components/block-list/use-block-props/index.js.map +1 -1
  29. package/build/components/block-list/use-block-props/use-focus-first-element.js +4 -3
  30. package/build/components/block-list/use-block-props/use-focus-first-element.js.map +1 -1
  31. package/build/components/block-list/use-block-props/use-selected-block-event-handlers.js +11 -6
  32. package/build/components/block-list/use-block-props/use-selected-block-event-handlers.js.map +1 -1
  33. package/build/components/block-list/use-in-between-inserter.js +1 -1
  34. package/build/components/block-list/use-in-between-inserter.js.map +1 -1
  35. package/build/components/block-list/zoom-out-separator.js +10 -7
  36. package/build/components/block-list/zoom-out-separator.js.map +1 -1
  37. package/build/components/block-lock/modal.js +1 -1
  38. package/build/components/block-lock/modal.js.map +1 -1
  39. package/build/components/block-mover/button.js.map +1 -1
  40. package/build/components/block-parent-selector/index.js +1 -1
  41. package/build/components/block-parent-selector/index.js.map +1 -1
  42. package/build/components/block-pattern-setup/index.js.map +1 -1
  43. package/build/components/block-patterns-list/index.js.map +1 -1
  44. package/build/components/block-patterns-paging/index.js +1 -1
  45. package/build/components/block-patterns-paging/index.js.map +1 -1
  46. package/build/components/block-popover/index.js +1 -1
  47. package/build/components/block-popover/index.js.map +1 -1
  48. package/build/components/block-preview/auto.js +1 -4
  49. package/build/components/block-preview/auto.js.map +1 -1
  50. package/build/components/block-preview/index.js +2 -2
  51. package/build/components/block-preview/index.js.map +1 -1
  52. package/build/components/block-rename/modal.js +2 -2
  53. package/build/components/block-rename/modal.js.map +1 -1
  54. package/build/components/block-settings-menu/block-parent-selector-menu-item.js +1 -1
  55. package/build/components/block-settings-menu/block-parent-selector-menu-item.js.map +1 -1
  56. package/build/components/block-settings-menu/block-settings-dropdown.js +5 -0
  57. package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  58. package/build/components/block-settings-menu/index.js +4 -3
  59. package/build/components/block-settings-menu/index.js.map +1 -1
  60. package/build/components/block-switcher/block-transformations-menu.native.js +1 -1
  61. package/build/components/block-switcher/block-transformations-menu.native.js.map +1 -1
  62. package/build/components/block-switcher/index.js +2 -1
  63. package/build/components/block-switcher/index.js.map +1 -1
  64. package/build/components/block-switcher/pattern-transformations-menu.js.map +1 -1
  65. package/build/components/block-switcher/use-transformed-patterns.js +1 -0
  66. package/build/components/block-switcher/use-transformed-patterns.js.map +1 -1
  67. package/build/components/block-switcher/utils.js +1 -0
  68. package/build/components/block-switcher/utils.js.map +1 -1
  69. package/build/components/block-toolbar/change-design.js +122 -0
  70. package/build/components/block-toolbar/change-design.js.map +1 -0
  71. package/build/components/block-toolbar/index.js +19 -7
  72. package/build/components/block-toolbar/index.js.map +1 -1
  73. package/build/components/block-tools/index.js +4 -17
  74. package/build/components/block-tools/index.js.map +1 -1
  75. package/build/components/block-tools/insertion-point.js +4 -3
  76. package/build/components/block-tools/insertion-point.js.map +1 -1
  77. package/build/components/block-tools/use-show-block-tools.js +4 -6
  78. package/build/components/block-tools/use-show-block-tools.js.map +1 -1
  79. package/build/components/block-tools/zoom-out-mode-inserters.js +20 -29
  80. package/build/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
  81. package/build/components/block-types-list/index.js.map +1 -1
  82. package/build/components/block-types-list/index.native.js.map +1 -1
  83. package/build/components/block-variation-transforms/index.js +3 -2
  84. package/build/components/block-variation-transforms/index.js.map +1 -1
  85. package/build/components/block-vertical-alignment-control/ui.js +6 -10
  86. package/build/components/block-vertical-alignment-control/ui.js.map +1 -1
  87. package/build/components/border-radius-control/index.js.map +1 -1
  88. package/build/components/border-radius-control/linked-button.js +7 -10
  89. package/build/components/border-radius-control/linked-button.js.map +1 -1
  90. package/build/components/border-radius-control/utils.js.map +1 -1
  91. package/build/components/button-block-appender/index.js.map +1 -1
  92. package/build/components/collab/block-comment-icon-slot.js +18 -0
  93. package/build/components/collab/block-comment-icon-slot.js.map +1 -0
  94. package/build/components/collab/block-comment-icon-toolbar-slot.js +18 -0
  95. package/build/components/collab/block-comment-icon-toolbar-slot.js.map +1 -0
  96. package/build/components/color-style-selector/index.js.map +1 -1
  97. package/build/components/colors/utils.js.map +1 -1
  98. package/build/components/colors/with-colors.js.map +1 -1
  99. package/build/components/colors-gradients/panel-color-gradient-settings.native.js.map +1 -1
  100. package/build/components/colors-gradients/use-multiple-origin-colors-and-gradients.js +7 -1
  101. package/build/components/colors-gradients/use-multiple-origin-colors-and-gradients.js.map +1 -1
  102. package/build/components/convert-to-group-buttons/toolbar.js +4 -4
  103. package/build/components/convert-to-group-buttons/toolbar.js.map +1 -1
  104. package/build/components/date-format-picker/index.js +1 -0
  105. package/build/components/date-format-picker/index.js.map +1 -1
  106. package/build/components/duotone/utils.js.map +1 -1
  107. package/build/components/duotone-control/index.js.map +1 -1
  108. package/build/components/font-sizes/fluid-utils.js.map +1 -1
  109. package/build/components/font-sizes/utils.js.map +1 -1
  110. package/build/components/font-sizes/with-font-sizes.js.map +1 -1
  111. package/build/components/global-styles/border-panel.js.map +1 -1
  112. package/build/components/global-styles/color-panel.js +1 -4
  113. package/build/components/global-styles/color-panel.js.map +1 -1
  114. package/build/components/global-styles/filters-panel.js.map +1 -1
  115. package/build/components/global-styles/get-block-css-selector.js.map +1 -1
  116. package/build/components/global-styles/get-global-styles-changes.js +2 -1
  117. package/build/components/global-styles/get-global-styles-changes.js.map +1 -1
  118. package/build/components/global-styles/hooks.js.map +1 -1
  119. package/build/components/global-styles/typography-panel.js.map +1 -1
  120. package/build/components/global-styles/use-global-styles-context.native.js +6 -0
  121. package/build/components/global-styles/use-global-styles-context.native.js.map +1 -1
  122. package/build/components/global-styles/use-global-styles-output.js.map +1 -1
  123. package/build/components/global-styles/utils.js.map +1 -1
  124. package/build/components/gradients/use-gradient.js.map +1 -1
  125. package/build/components/grid/grid-item-movers.js.map +1 -1
  126. package/build/components/grid/grid-visualizer.js.map +1 -1
  127. package/build/components/iframe/index.js +46 -11
  128. package/build/components/iframe/index.js.map +1 -1
  129. package/build/components/image-editor/use-save-image.js +1 -1
  130. package/build/components/image-editor/use-save-image.js.map +1 -1
  131. package/build/components/image-size-control/index.js +61 -20
  132. package/build/components/image-size-control/index.js.map +1 -1
  133. package/build/components/inner-blocks/index.js +9 -5
  134. package/build/components/inner-blocks/index.js.map +1 -1
  135. package/build/components/inner-blocks/use-nested-settings-update.js +15 -8
  136. package/build/components/inner-blocks/use-nested-settings-update.js.map +1 -1
  137. package/build/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js +1 -1
  138. package/build/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js.map +1 -1
  139. package/build/components/inserter/block-patterns-explorer/pattern-list.js +2 -2
  140. package/build/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
  141. package/build/components/inserter/block-patterns-tab/pattern-category-previews.js +2 -2
  142. package/build/components/inserter/block-patterns-tab/pattern-category-previews.js.map +1 -1
  143. package/build/components/inserter/block-patterns-tab/patterns-filter.js +1 -1
  144. package/build/components/inserter/block-patterns-tab/patterns-filter.js.map +1 -1
  145. package/build/components/inserter/block-patterns-tab/use-pattern-categories.js +1 -1
  146. package/build/components/inserter/block-patterns-tab/use-pattern-categories.js.map +1 -1
  147. package/build/components/inserter/block-types-tab.native.js.map +1 -1
  148. package/build/components/inserter/category-tabs/index.js +16 -12
  149. package/build/components/inserter/category-tabs/index.js.map +1 -1
  150. package/build/components/inserter/hooks/use-block-types-state.js +1 -1
  151. package/build/components/inserter/hooks/use-block-types-state.js.map +1 -1
  152. package/build/components/inserter/hooks/use-patterns-state.js +1 -1
  153. package/build/components/inserter/hooks/use-patterns-state.js.map +1 -1
  154. package/build/components/inserter/media-tab/media-panel.js.map +1 -1
  155. package/build/components/inserter/media-tab/media-preview.js +1 -1
  156. package/build/components/inserter/media-tab/media-preview.js.map +1 -1
  157. package/build/components/inserter/media-tab/media-tab.js.map +1 -1
  158. package/build/components/inserter/media-tab/utils.js.map +1 -1
  159. package/build/components/inserter/menu.js +8 -3
  160. package/build/components/inserter/menu.js.map +1 -1
  161. package/build/components/inserter/mobile-tab-navigation.js.map +1 -1
  162. package/build/components/inserter/preview-panel.js.map +1 -1
  163. package/build/components/inserter/quick-inserter.js +1 -1
  164. package/build/components/inserter/quick-inserter.js.map +1 -1
  165. package/build/components/inserter/search-results.js +1 -1
  166. package/build/components/inserter/search-results.js.map +1 -1
  167. package/build/components/inserter/tabs.native.js.map +1 -1
  168. package/build/components/inserter-button/index.native.js +1 -1
  169. package/build/components/inserter-button/index.native.js.map +1 -1
  170. package/build/components/inspector-controls/block-support-tools-panel.js.map +1 -1
  171. package/build/components/inspector-controls/fill.js.map +1 -1
  172. package/build/components/inspector-controls/fill.native.js.map +1 -1
  173. package/build/components/inspector-controls/slot.js.map +1 -1
  174. package/build/components/inspector-controls/slot.native.js.map +1 -1
  175. package/build/components/inspector-controls-tabs/index.js +0 -2
  176. package/build/components/inspector-controls-tabs/index.js.map +1 -1
  177. package/build/components/inspector-controls-tabs/utils.js +3 -6
  178. package/build/components/inspector-controls-tabs/utils.js.map +1 -1
  179. package/build/components/line-height-control/index.js.map +1 -1
  180. package/build/components/link-control/is-url-like.js.map +1 -1
  181. package/build/components/link-control/link-preview.js +12 -9
  182. package/build/components/link-control/link-preview.js.map +1 -1
  183. package/build/components/link-control/search-create-button.js +1 -1
  184. package/build/components/link-control/search-create-button.js.map +1 -1
  185. package/build/components/link-control/search-input.js +3 -5
  186. package/build/components/link-control/search-input.js.map +1 -1
  187. package/build/components/link-control/search-results.js +5 -15
  188. package/build/components/link-control/search-results.js.map +1 -1
  189. package/build/components/link-control/settings-drawer.js.map +1 -1
  190. package/build/components/link-control/use-rich-url-data.js.map +1 -1
  191. package/build/components/list-view/appender.js +5 -4
  192. package/build/components/list-view/appender.js.map +1 -1
  193. package/build/components/list-view/block-select-button.js.map +1 -1
  194. package/build/components/list-view/block.js.map +1 -1
  195. package/build/components/list-view/branch.js +6 -5
  196. package/build/components/list-view/branch.js.map +1 -1
  197. package/build/components/list-view/drop-indicator.js.map +1 -1
  198. package/build/components/list-view/index.js +1 -2
  199. package/build/components/list-view/index.js.map +1 -1
  200. package/build/components/list-view/use-block-selection.js +2 -2
  201. package/build/components/list-view/use-block-selection.js.map +1 -1
  202. package/build/components/list-view/utils.js +1 -1
  203. package/build/components/list-view/utils.js.map +1 -1
  204. package/build/components/media-placeholder/index.native.js +1 -1
  205. package/build/components/media-placeholder/index.native.js.map +1 -1
  206. package/build/components/media-replace-flow/index.js.map +1 -1
  207. package/build/components/multi-selection-inspector/index.js +2 -2
  208. package/build/components/multi-selection-inspector/index.js.map +1 -1
  209. package/build/components/observe-typing/index.js +1 -0
  210. package/build/components/observe-typing/index.js.map +1 -1
  211. package/build/components/provider/index.js +1 -1
  212. package/build/components/provider/index.js.map +1 -1
  213. package/build/components/recursion-provider/index.js +1 -0
  214. package/build/components/recursion-provider/index.js.map +1 -1
  215. package/build/components/responsive-block-control/index.js +3 -3
  216. package/build/components/responsive-block-control/index.js.map +1 -1
  217. package/build/components/responsive-block-control/label.js +1 -1
  218. package/build/components/responsive-block-control/label.js.map +1 -1
  219. package/build/components/rich-text/content.js.map +1 -1
  220. package/build/components/rich-text/event-listeners/index.js +3 -1
  221. package/build/components/rich-text/event-listeners/index.js.map +1 -1
  222. package/build/components/rich-text/file-paste-handler.native.js.map +1 -1
  223. package/build/components/rich-text/format-toolbar/index.js.map +1 -1
  224. package/build/components/rich-text/format-toolbar/index.native.js.map +1 -1
  225. package/build/components/rich-text/index.js +3 -2
  226. package/build/components/rich-text/index.js.map +1 -1
  227. package/build/components/rich-text/index.native.js +2 -6
  228. package/build/components/rich-text/index.native.js.map +1 -1
  229. package/build/components/rich-text/multiline.js.map +1 -1
  230. package/build/components/rich-text/native/get-format-colors.native.js.map +1 -1
  231. package/build/components/rich-text/native/index.native.js.map +1 -1
  232. package/build/components/rich-text/native/use-format-types.js +1 -0
  233. package/build/components/rich-text/native/use-format-types.js.map +1 -1
  234. package/build/components/rich-text/toolbar-button.js.map +1 -1
  235. package/build/components/rich-text/use-format-types.js +1 -0
  236. package/build/components/rich-text/use-format-types.js.map +1 -1
  237. package/build/components/spacing-sizes-control/index.js +2 -2
  238. package/build/components/spacing-sizes-control/index.js.map +1 -1
  239. package/build/components/spacing-sizes-control/input-controls/axial.js.map +1 -1
  240. package/build/components/spacing-sizes-control/input-controls/separated.js.map +1 -1
  241. package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js +3 -3
  242. package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
  243. package/build/components/spacing-sizes-control/linked-button.js +1 -5
  244. package/build/components/spacing-sizes-control/linked-button.js.map +1 -1
  245. package/build/components/spacing-sizes-control/utils.js +1 -0
  246. package/build/components/spacing-sizes-control/utils.js.map +1 -1
  247. package/build/components/tool-selector/index.js +8 -5
  248. package/build/components/tool-selector/index.js.map +1 -1
  249. package/build/components/typewriter/index.js +1 -0
  250. package/build/components/typewriter/index.js.map +1 -1
  251. package/build/components/unsupported-block-details/index.native.js.map +1 -1
  252. package/build/components/url-input/index.js +1 -1
  253. package/build/components/url-input/index.js.map +1 -1
  254. package/build/components/use-block-commands/index.js +1 -1
  255. package/build/components/use-block-commands/index.js.map +1 -1
  256. package/build/components/use-block-drop-zone/index.js +5 -5
  257. package/build/components/use-block-drop-zone/index.js.map +1 -1
  258. package/build/components/use-block-drop-zone/index.native.js +0 -1
  259. package/build/components/use-block-drop-zone/index.native.js.map +1 -1
  260. package/build/components/use-flash-editable-blocks/index.js.map +1 -1
  261. package/build/components/use-moving-animation/index.js +1 -3
  262. package/build/components/use-moving-animation/index.js.map +1 -1
  263. package/build/components/use-resize-canvas/index.js +1 -2
  264. package/build/components/use-resize-canvas/index.js.map +1 -1
  265. package/build/components/use-settings/index.js +1 -3
  266. package/build/components/use-settings/index.js.map +1 -1
  267. package/build/components/writing-flow/index.js +5 -3
  268. package/build/components/writing-flow/index.js.map +1 -1
  269. package/build/components/writing-flow/use-tab-nav.js +20 -5
  270. package/build/components/writing-flow/use-tab-nav.js.map +1 -1
  271. package/build/hooks/align.js.map +1 -1
  272. package/build/hooks/block-bindings.js +19 -8
  273. package/build/hooks/block-bindings.js.map +1 -1
  274. package/build/hooks/block-hooks.js +1 -1
  275. package/build/hooks/block-hooks.js.map +1 -1
  276. package/build/hooks/block-style-variation.js.map +1 -1
  277. package/build/hooks/contrast-checker.js +0 -1
  278. package/build/hooks/contrast-checker.js.map +1 -1
  279. package/build/hooks/duotone.js +2 -2
  280. package/build/hooks/duotone.js.map +1 -1
  281. package/build/hooks/font-family.js.map +1 -1
  282. package/build/hooks/gap.js.map +1 -1
  283. package/build/hooks/generated-class-name.js +1 -0
  284. package/build/hooks/generated-class-name.js.map +1 -1
  285. package/build/hooks/grid-visualizer.js +13 -11
  286. package/build/hooks/grid-visualizer.js.map +1 -1
  287. package/build/hooks/layout-child.js +41 -3
  288. package/build/hooks/layout-child.js.map +1 -1
  289. package/build/hooks/layout.js.map +1 -1
  290. package/build/hooks/position.js +1 -1
  291. package/build/hooks/position.js.map +1 -1
  292. package/build/hooks/spacing-visualizer.js.map +1 -1
  293. package/build/hooks/style.js +4 -1
  294. package/build/hooks/style.js.map +1 -1
  295. package/build/hooks/text-align.js.map +1 -1
  296. package/build/hooks/use-typography-props.js.map +1 -1
  297. package/build/hooks/use-zoom-out.js +17 -18
  298. package/build/hooks/use-zoom-out.js.map +1 -1
  299. package/build/index.js +0 -7
  300. package/build/index.js.map +1 -1
  301. package/build/layouts/constrained.js.map +1 -1
  302. package/build/layouts/flex.js.map +1 -1
  303. package/build/layouts/grid.js.map +1 -1
  304. package/build/layouts/utils.js.map +1 -1
  305. package/build/private-apis.js +6 -1
  306. package/build/private-apis.js.map +1 -1
  307. package/build/store/actions.js +6 -38
  308. package/build/store/actions.js.map +1 -1
  309. package/build/store/defaults.js +1 -1
  310. package/build/store/defaults.js.map +1 -1
  311. package/build/store/private-actions.js +57 -8
  312. package/build/store/private-actions.js.map +1 -1
  313. package/build/store/private-selectors.js +9 -21
  314. package/build/store/private-selectors.js.map +1 -1
  315. package/build/store/reducer.js +18 -24
  316. package/build/store/reducer.js.map +1 -1
  317. package/build/store/selectors.js +66 -22
  318. package/build/store/selectors.js.map +1 -1
  319. package/build/utils/block-bindings.js +9 -6
  320. package/build/utils/block-bindings.js.map +1 -1
  321. package/build/utils/dom.js +16 -1
  322. package/build/utils/dom.js.map +1 -1
  323. package/build/utils/get-font-styles-and-weights.js +2 -2
  324. package/build/utils/get-font-styles-and-weights.js.map +1 -1
  325. package/build/utils/object.js +1 -0
  326. package/build/utils/object.js.map +1 -1
  327. package/build/utils/pasting.js.map +1 -1
  328. package/build/utils/transform-styles/index.js +4 -3
  329. package/build/utils/transform-styles/index.js.map +1 -1
  330. package/build-module/autocompleters/block.js +15 -9
  331. package/build-module/autocompleters/block.js.map +1 -1
  332. package/build-module/autocompleters/link.js +1 -3
  333. package/build-module/autocompleters/link.js.map +1 -1
  334. package/build-module/components/audio-player/index.native.js +1 -2
  335. package/build-module/components/audio-player/index.native.js.map +1 -1
  336. package/build-module/components/background-image-control/index.js +2 -3
  337. package/build-module/components/background-image-control/index.js.map +1 -1
  338. package/build-module/components/block-alignment-control/ui.js +1 -2
  339. package/build-module/components/block-alignment-control/ui.js.map +1 -1
  340. package/build-module/components/block-breadcrumb/index.js +1 -2
  341. package/build-module/components/block-breadcrumb/index.js.map +1 -1
  342. package/build-module/components/block-canvas/index.js +12 -3
  343. package/build-module/components/block-canvas/index.js.map +1 -1
  344. package/build-module/components/block-card/index.js +4 -5
  345. package/build-module/components/block-card/index.js.map +1 -1
  346. package/build-module/components/block-compare/block-view.js +1 -2
  347. package/build-module/components/block-compare/block-view.js.map +1 -1
  348. package/build-module/components/block-compare/index.js +1 -2
  349. package/build-module/components/block-compare/index.js.map +1 -1
  350. package/build-module/components/block-controls/fill.js +1 -3
  351. package/build-module/components/block-controls/fill.js.map +1 -1
  352. package/build-module/components/block-controls/slot.js.map +1 -1
  353. package/build-module/components/block-controls/slot.native.js.map +1 -1
  354. package/build-module/components/block-draggable/draggable-chip.js +2 -3
  355. package/build-module/components/block-draggable/draggable-chip.js.map +1 -1
  356. package/build-module/components/block-draggable/draggable-chip.native.js +1 -2
  357. package/build-module/components/block-draggable/draggable-chip.native.js.map +1 -1
  358. package/build-module/components/block-draggable/index.native.js +1 -3
  359. package/build-module/components/block-draggable/index.native.js.map +1 -1
  360. package/build-module/components/block-edit/index.js +1 -2
  361. package/build-module/components/block-edit/index.js.map +1 -1
  362. package/build-module/components/block-edit/multiple-usage-warning.js +1 -2
  363. package/build-module/components/block-edit/multiple-usage-warning.js.map +1 -1
  364. package/build-module/components/block-full-height-alignment-control/index.js +1 -1
  365. package/build-module/components/block-full-height-alignment-control/index.js.map +1 -1
  366. package/build-module/components/block-inspector/index.js +1 -3
  367. package/build-module/components/block-inspector/index.js.map +1 -1
  368. package/build-module/components/block-list/block-crash-warning.js +1 -1
  369. package/build-module/components/block-list/block-crash-warning.js.map +1 -1
  370. package/build-module/components/block-list/block-crash-warning.native.js +1 -1
  371. package/build-module/components/block-list/block-crash-warning.native.js.map +1 -1
  372. package/build-module/components/block-list/block-invalid-warning.js +1 -3
  373. package/build-module/components/block-list/block-invalid-warning.js.map +1 -1
  374. package/build-module/components/block-list/block-invalid-warning.native.js +1 -1
  375. package/build-module/components/block-list/block-invalid-warning.native.js.map +1 -1
  376. package/build-module/components/block-list/block-list-item.native.js +1 -2
  377. package/build-module/components/block-list/block-list-item.native.js.map +1 -1
  378. package/build-module/components/block-list/block-selection-button.native.js +1 -2
  379. package/build-module/components/block-list/block-selection-button.native.js.map +1 -1
  380. package/build-module/components/block-list/block.js +2 -4
  381. package/build-module/components/block-list/block.js.map +1 -1
  382. package/build-module/components/block-list/block.native.js +2 -9
  383. package/build-module/components/block-list/block.native.js.map +1 -1
  384. package/build-module/components/block-list/index.js +7 -7
  385. package/build-module/components/block-list/index.js.map +1 -1
  386. package/build-module/components/block-list/index.native.js +1 -3
  387. package/build-module/components/block-list/index.native.js.map +1 -1
  388. package/build-module/components/block-list/insertion-point.native.js +1 -2
  389. package/build-module/components/block-list/insertion-point.native.js.map +1 -1
  390. package/build-module/components/block-list/use-block-props/index.js +1 -2
  391. package/build-module/components/block-list/use-block-props/index.js.map +1 -1
  392. package/build-module/components/block-list/use-block-props/use-focus-first-element.js +4 -3
  393. package/build-module/components/block-list/use-block-props/use-focus-first-element.js.map +1 -1
  394. package/build-module/components/block-list/use-block-props/use-selected-block-event-handlers.js +11 -6
  395. package/build-module/components/block-list/use-block-props/use-selected-block-event-handlers.js.map +1 -1
  396. package/build-module/components/block-list/use-in-between-inserter.js +1 -1
  397. package/build-module/components/block-list/use-in-between-inserter.js.map +1 -1
  398. package/build-module/components/block-list/zoom-out-separator.js +10 -7
  399. package/build-module/components/block-list/zoom-out-separator.js.map +1 -1
  400. package/build-module/components/block-lock/menu-item.js +1 -3
  401. package/build-module/components/block-lock/menu-item.js.map +1 -1
  402. package/build-module/components/block-lock/modal.js +2 -3
  403. package/build-module/components/block-lock/modal.js.map +1 -1
  404. package/build-module/components/block-lock/toolbar.js +1 -3
  405. package/build-module/components/block-lock/toolbar.js.map +1 -1
  406. package/build-module/components/block-media-update-progress/index.native.js +1 -2
  407. package/build-module/components/block-media-update-progress/index.native.js.map +1 -1
  408. package/build-module/components/block-mover/button.js +1 -3
  409. package/build-module/components/block-mover/button.js.map +1 -1
  410. package/build-module/components/block-mover/index.js +1 -2
  411. package/build-module/components/block-mover/index.js.map +1 -1
  412. package/build-module/components/block-mover/index.native.js +1 -2
  413. package/build-module/components/block-mover/index.native.js.map +1 -1
  414. package/build-module/components/block-navigation/dropdown.js +1 -2
  415. package/build-module/components/block-navigation/dropdown.js.map +1 -1
  416. package/build-module/components/block-parent-selector/index.js +1 -1
  417. package/build-module/components/block-parent-selector/index.js.map +1 -1
  418. package/build-module/components/block-pattern-setup/index.js +1 -3
  419. package/build-module/components/block-pattern-setup/index.js.map +1 -1
  420. package/build-module/components/block-pattern-setup/setup-toolbar.js +1 -2
  421. package/build-module/components/block-pattern-setup/setup-toolbar.js.map +1 -1
  422. package/build-module/components/block-patterns-list/index.js +1 -3
  423. package/build-module/components/block-patterns-list/index.js.map +1 -1
  424. package/build-module/components/block-patterns-paging/index.js +2 -3
  425. package/build-module/components/block-patterns-paging/index.js.map +1 -1
  426. package/build-module/components/block-popover/index.js +1 -1
  427. package/build-module/components/block-popover/index.js.map +1 -1
  428. package/build-module/components/block-preview/auto.js +2 -7
  429. package/build-module/components/block-preview/auto.js.map +1 -1
  430. package/build-module/components/block-preview/index.js +3 -4
  431. package/build-module/components/block-preview/index.js.map +1 -1
  432. package/build-module/components/block-quick-navigation/index.js +1 -2
  433. package/build-module/components/block-quick-navigation/index.js.map +1 -1
  434. package/build-module/components/block-removal-warning-modal/index.js +1 -2
  435. package/build-module/components/block-removal-warning-modal/index.js.map +1 -1
  436. package/build-module/components/block-rename/modal.js +3 -4
  437. package/build-module/components/block-rename/modal.js.map +1 -1
  438. package/build-module/components/block-rename/rename-control.js +1 -3
  439. package/build-module/components/block-rename/rename-control.js.map +1 -1
  440. package/build-module/components/block-settings/container.native.js +1 -3
  441. package/build-module/components/block-settings/container.native.js.map +1 -1
  442. package/build-module/components/block-settings-menu/block-parent-selector-menu-item.js +1 -1
  443. package/build-module/components/block-settings-menu/block-parent-selector-menu-item.js.map +1 -1
  444. package/build-module/components/block-settings-menu/block-settings-dropdown.js +6 -3
  445. package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  446. package/build-module/components/block-settings-menu/index.js +5 -4
  447. package/build-module/components/block-settings-menu/index.js.map +1 -1
  448. package/build-module/components/block-settings-menu-controls/index.js +1 -2
  449. package/build-module/components/block-settings-menu-controls/index.js.map +1 -1
  450. package/build-module/components/block-styles/index.js +1 -2
  451. package/build-module/components/block-styles/index.js.map +1 -1
  452. package/build-module/components/block-styles/menu-items.js +1 -2
  453. package/build-module/components/block-styles/menu-items.js.map +1 -1
  454. package/build-module/components/block-styles/preview.native.js +1 -2
  455. package/build-module/components/block-styles/preview.native.js.map +1 -1
  456. package/build-module/components/block-switcher/block-transformations-menu.js +1 -3
  457. package/build-module/components/block-switcher/block-transformations-menu.js.map +1 -1
  458. package/build-module/components/block-switcher/block-transformations-menu.native.js +1 -1
  459. package/build-module/components/block-switcher/block-transformations-menu.native.js.map +1 -1
  460. package/build-module/components/block-switcher/block-variation-transformations.js +1 -3
  461. package/build-module/components/block-switcher/block-variation-transformations.js.map +1 -1
  462. package/build-module/components/block-switcher/index.js +3 -4
  463. package/build-module/components/block-switcher/index.js.map +1 -1
  464. package/build-module/components/block-switcher/pattern-transformations-menu.js +1 -2
  465. package/build-module/components/block-switcher/pattern-transformations-menu.js.map +1 -1
  466. package/build-module/components/block-switcher/preview-block-popover.js +1 -2
  467. package/build-module/components/block-switcher/preview-block-popover.js.map +1 -1
  468. package/build-module/components/block-switcher/use-transformed-patterns.js +1 -0
  469. package/build-module/components/block-switcher/use-transformed-patterns.js.map +1 -1
  470. package/build-module/components/block-switcher/utils.js +1 -0
  471. package/build-module/components/block-switcher/utils.js.map +1 -1
  472. package/build-module/components/block-toolbar/block-toolbar-menu.native.js +1 -2
  473. package/build-module/components/block-toolbar/block-toolbar-menu.native.js.map +1 -1
  474. package/build-module/components/block-toolbar/change-design.js +114 -0
  475. package/build-module/components/block-toolbar/change-design.js.map +1 -0
  476. package/build-module/components/block-toolbar/index.js +20 -10
  477. package/build-module/components/block-toolbar/index.js.map +1 -1
  478. package/build-module/components/block-toolbar/index.native.js +1 -3
  479. package/build-module/components/block-toolbar/index.native.js.map +1 -1
  480. package/build-module/components/block-tools/index.js +5 -19
  481. package/build-module/components/block-tools/index.js.map +1 -1
  482. package/build-module/components/block-tools/insertion-point.js +5 -5
  483. package/build-module/components/block-tools/insertion-point.js.map +1 -1
  484. package/build-module/components/block-tools/use-show-block-tools.js +4 -6
  485. package/build-module/components/block-tools/use-show-block-tools.js.map +1 -1
  486. package/build-module/components/block-tools/zoom-out-mode-inserters.js +20 -29
  487. package/build-module/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
  488. package/build-module/components/block-types-list/index.js +1 -2
  489. package/build-module/components/block-types-list/index.js.map +1 -1
  490. package/build-module/components/block-types-list/index.native.js +1 -2
  491. package/build-module/components/block-types-list/index.native.js.map +1 -1
  492. package/build-module/components/block-variation-picker/index.js +1 -2
  493. package/build-module/components/block-variation-picker/index.js.map +1 -1
  494. package/build-module/components/block-variation-picker/index.native.js +1 -2
  495. package/build-module/components/block-variation-picker/index.native.js.map +1 -1
  496. package/build-module/components/block-variation-transforms/index.js +4 -4
  497. package/build-module/components/block-variation-transforms/index.js.map +1 -1
  498. package/build-module/components/block-vertical-alignment-control/ui.js +6 -10
  499. package/build-module/components/block-vertical-alignment-control/ui.js.map +1 -1
  500. package/build-module/components/border-radius-control/index.js +1 -3
  501. package/build-module/components/border-radius-control/index.js.map +1 -1
  502. package/build-module/components/border-radius-control/linked-button.js +8 -11
  503. package/build-module/components/border-radius-control/linked-button.js.map +1 -1
  504. package/build-module/components/border-radius-control/utils.js.map +1 -1
  505. package/build-module/components/button-block-appender/index.js.map +1 -1
  506. package/build-module/components/button-block-appender/index.native.js +1 -2
  507. package/build-module/components/button-block-appender/index.native.js.map +1 -1
  508. package/build-module/components/child-layout-control/index.js +1 -3
  509. package/build-module/components/child-layout-control/index.js.map +1 -1
  510. package/build-module/components/collab/block-comment-icon-slot.js +11 -0
  511. package/build-module/components/collab/block-comment-icon-slot.js.map +1 -0
  512. package/build-module/components/collab/block-comment-icon-toolbar-slot.js +11 -0
  513. package/build-module/components/collab/block-comment-icon-toolbar-slot.js.map +1 -0
  514. package/build-module/components/color-style-selector/index.js.map +1 -1
  515. package/build-module/components/colors/utils.js.map +1 -1
  516. package/build-module/components/colors/with-colors.js.map +1 -1
  517. package/build-module/components/colors-gradients/control.js +1 -2
  518. package/build-module/components/colors-gradients/control.js.map +1 -1
  519. package/build-module/components/colors-gradients/dropdown.js +1 -3
  520. package/build-module/components/colors-gradients/dropdown.js.map +1 -1
  521. package/build-module/components/colors-gradients/panel-color-gradient-settings.js +1 -3
  522. package/build-module/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
  523. package/build-module/components/colors-gradients/panel-color-gradient-settings.native.js +1 -3
  524. package/build-module/components/colors-gradients/panel-color-gradient-settings.native.js.map +1 -1
  525. package/build-module/components/colors-gradients/use-multiple-origin-colors-and-gradients.js +7 -1
  526. package/build-module/components/colors-gradients/use-multiple-origin-colors-and-gradients.js.map +1 -1
  527. package/build-module/components/contrast-checker/index.native.js +1 -2
  528. package/build-module/components/contrast-checker/index.native.js.map +1 -1
  529. package/build-module/components/convert-to-group-buttons/index.js +1 -3
  530. package/build-module/components/convert-to-group-buttons/index.js.map +1 -1
  531. package/build-module/components/convert-to-group-buttons/toolbar.js +5 -6
  532. package/build-module/components/convert-to-group-buttons/toolbar.js.map +1 -1
  533. package/build-module/components/date-format-picker/index.js +2 -2
  534. package/build-module/components/date-format-picker/index.js.map +1 -1
  535. package/build-module/components/default-block-appender/index.js +1 -2
  536. package/build-module/components/default-block-appender/index.js.map +1 -1
  537. package/build-module/components/dimensions-tool/index.js +1 -3
  538. package/build-module/components/dimensions-tool/index.js.map +1 -1
  539. package/build-module/components/dimensions-tool/width-height-tool.js +1 -3
  540. package/build-module/components/dimensions-tool/width-height-tool.js.map +1 -1
  541. package/build-module/components/duotone/utils.js.map +1 -1
  542. package/build-module/components/duotone-control/index.js +1 -2
  543. package/build-module/components/duotone-control/index.js.map +1 -1
  544. package/build-module/components/editor-styles/index.js +1 -3
  545. package/build-module/components/editor-styles/index.js.map +1 -1
  546. package/build-module/components/floating-toolbar/index.native.js +1 -2
  547. package/build-module/components/floating-toolbar/index.native.js.map +1 -1
  548. package/build-module/components/floating-toolbar/nav-up-icon.js +1 -2
  549. package/build-module/components/floating-toolbar/nav-up-icon.js.map +1 -1
  550. package/build-module/components/font-sizes/fluid-utils.js.map +1 -1
  551. package/build-module/components/font-sizes/utils.js.map +1 -1
  552. package/build-module/components/font-sizes/with-font-sizes.js +2 -2
  553. package/build-module/components/font-sizes/with-font-sizes.js.map +1 -1
  554. package/build-module/components/global-styles/advanced-panel.js +1 -2
  555. package/build-module/components/global-styles/advanced-panel.js.map +1 -1
  556. package/build-module/components/global-styles/border-panel.js +1 -2
  557. package/build-module/components/global-styles/border-panel.js.map +1 -1
  558. package/build-module/components/global-styles/color-panel.js +3 -7
  559. package/build-module/components/global-styles/color-panel.js.map +1 -1
  560. package/build-module/components/global-styles/dimensions-panel.js +1 -2
  561. package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
  562. package/build-module/components/global-styles/filters-panel.js +1 -2
  563. package/build-module/components/global-styles/filters-panel.js.map +1 -1
  564. package/build-module/components/global-styles/get-block-css-selector.js.map +1 -1
  565. package/build-module/components/global-styles/get-global-styles-changes.js +2 -1
  566. package/build-module/components/global-styles/get-global-styles-changes.js.map +1 -1
  567. package/build-module/components/global-styles/hooks.js.map +1 -1
  568. package/build-module/components/global-styles/image-settings-panel.js +1 -2
  569. package/build-module/components/global-styles/image-settings-panel.js.map +1 -1
  570. package/build-module/components/global-styles/shadow-panel-components.js +1 -2
  571. package/build-module/components/global-styles/shadow-panel-components.js.map +1 -1
  572. package/build-module/components/global-styles/typography-panel.js +1 -2
  573. package/build-module/components/global-styles/typography-panel.js.map +1 -1
  574. package/build-module/components/global-styles/use-global-styles-context.native.js +6 -0
  575. package/build-module/components/global-styles/use-global-styles-context.native.js.map +1 -1
  576. package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
  577. package/build-module/components/global-styles/utils.js.map +1 -1
  578. package/build-module/components/gradients/use-gradient.js.map +1 -1
  579. package/build-module/components/grid/grid-item-movers.js +1 -3
  580. package/build-module/components/grid/grid-item-movers.js.map +1 -1
  581. package/build-module/components/grid/grid-visualizer.js.map +1 -1
  582. package/build-module/components/height-control/index.js +1 -2
  583. package/build-module/components/height-control/index.js.map +1 -1
  584. package/build-module/components/iframe/index.js +47 -14
  585. package/build-module/components/iframe/index.js.map +1 -1
  586. package/build-module/components/image-editor/aspect-ratio-dropdown.js +1 -3
  587. package/build-module/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
  588. package/build-module/components/image-editor/cropper.js +1 -3
  589. package/build-module/components/image-editor/cropper.js.map +1 -1
  590. package/build-module/components/image-editor/form-controls.js +1 -3
  591. package/build-module/components/image-editor/form-controls.js.map +1 -1
  592. package/build-module/components/image-editor/index.js +1 -2
  593. package/build-module/components/image-editor/index.js.map +1 -1
  594. package/build-module/components/image-editor/use-save-image.js +1 -1
  595. package/build-module/components/image-editor/use-save-image.js.map +1 -1
  596. package/build-module/components/image-link-destinations/index.native.js +1 -3
  597. package/build-module/components/image-link-destinations/index.native.js.map +1 -1
  598. package/build-module/components/image-size-control/index.js +63 -24
  599. package/build-module/components/image-size-control/index.js.map +1 -1
  600. package/build-module/components/inner-blocks/index.js +9 -5
  601. package/build-module/components/inner-blocks/index.js.map +1 -1
  602. package/build-module/components/inner-blocks/use-nested-settings-update.js +16 -9
  603. package/build-module/components/inner-blocks/use-nested-settings-update.js.map +1 -1
  604. package/build-module/components/inner-blocks/warning-max-depth-exceeded.native.js +1 -2
  605. package/build-module/components/inner-blocks/warning-max-depth-exceeded.native.js.map +1 -1
  606. package/build-module/components/inserter/block-patterns-explorer/index.js +1 -2
  607. package/build-module/components/inserter/block-patterns-explorer/index.js.map +1 -1
  608. package/build-module/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js +2 -3
  609. package/build-module/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js.map +1 -1
  610. package/build-module/components/inserter/block-patterns-explorer/pattern-list.js +3 -5
  611. package/build-module/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
  612. package/build-module/components/inserter/block-patterns-tab/index.js +1 -3
  613. package/build-module/components/inserter/block-patterns-tab/index.js.map +1 -1
  614. package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js +3 -5
  615. package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js.map +1 -1
  616. package/build-module/components/inserter/block-patterns-tab/patterns-filter.js +2 -4
  617. package/build-module/components/inserter/block-patterns-tab/patterns-filter.js.map +1 -1
  618. package/build-module/components/inserter/block-patterns-tab/use-pattern-categories.js +1 -1
  619. package/build-module/components/inserter/block-patterns-tab/use-pattern-categories.js.map +1 -1
  620. package/build-module/components/inserter/block-types-tab.js +1 -3
  621. package/build-module/components/inserter/block-types-tab.js.map +1 -1
  622. package/build-module/components/inserter/block-types-tab.native.js.map +1 -1
  623. package/build-module/components/inserter/category-tabs/index.js +18 -15
  624. package/build-module/components/inserter/category-tabs/index.js.map +1 -1
  625. package/build-module/components/inserter/hooks/use-block-types-state.js +1 -1
  626. package/build-module/components/inserter/hooks/use-block-types-state.js.map +1 -1
  627. package/build-module/components/inserter/hooks/use-patterns-state.js +1 -1
  628. package/build-module/components/inserter/hooks/use-patterns-state.js.map +1 -1
  629. package/build-module/components/inserter/index.native.js +1 -3
  630. package/build-module/components/inserter/index.native.js.map +1 -1
  631. package/build-module/components/inserter/media-tab/media-panel.js +1 -2
  632. package/build-module/components/inserter/media-tab/media-panel.js.map +1 -1
  633. package/build-module/components/inserter/media-tab/media-preview.js +2 -4
  634. package/build-module/components/inserter/media-tab/media-preview.js.map +1 -1
  635. package/build-module/components/inserter/media-tab/media-tab.js +1 -3
  636. package/build-module/components/inserter/media-tab/media-tab.js.map +1 -1
  637. package/build-module/components/inserter/media-tab/utils.js.map +1 -1
  638. package/build-module/components/inserter/menu.js +10 -7
  639. package/build-module/components/inserter/menu.js.map +1 -1
  640. package/build-module/components/inserter/menu.native.js +1 -3
  641. package/build-module/components/inserter/menu.native.js.map +1 -1
  642. package/build-module/components/inserter/mobile-tab-navigation.js +1 -2
  643. package/build-module/components/inserter/mobile-tab-navigation.js.map +1 -1
  644. package/build-module/components/inserter/no-results.js +1 -2
  645. package/build-module/components/inserter/no-results.js.map +1 -1
  646. package/build-module/components/inserter/no-results.native.js +1 -2
  647. package/build-module/components/inserter/no-results.native.js.map +1 -1
  648. package/build-module/components/inserter/panel.js +1 -3
  649. package/build-module/components/inserter/panel.js.map +1 -1
  650. package/build-module/components/inserter/preview-panel.js +1 -2
  651. package/build-module/components/inserter/preview-panel.js.map +1 -1
  652. package/build-module/components/inserter/quick-inserter.js +2 -3
  653. package/build-module/components/inserter/quick-inserter.js.map +1 -1
  654. package/build-module/components/inserter/search-results.js +2 -3
  655. package/build-module/components/inserter/search-results.js.map +1 -1
  656. package/build-module/components/inserter/tabs.native.js.map +1 -1
  657. package/build-module/components/inserter-button/index.native.js +2 -3
  658. package/build-module/components/inserter-button/index.native.js.map +1 -1
  659. package/build-module/components/inserter-list-item/index.js +1 -2
  660. package/build-module/components/inserter-list-item/index.js.map +1 -1
  661. package/build-module/components/inserter-listbox/index.js +1 -2
  662. package/build-module/components/inserter-listbox/index.js.map +1 -1
  663. package/build-module/components/inspector-controls/block-support-tools-panel.js.map +1 -1
  664. package/build-module/components/inspector-controls/fill.js.map +1 -1
  665. package/build-module/components/inspector-controls/fill.native.js +1 -3
  666. package/build-module/components/inspector-controls/fill.native.js.map +1 -1
  667. package/build-module/components/inspector-controls/slot.js.map +1 -1
  668. package/build-module/components/inspector-controls/slot.native.js.map +1 -1
  669. package/build-module/components/inspector-controls-tabs/index.js +1 -4
  670. package/build-module/components/inspector-controls-tabs/index.js.map +1 -1
  671. package/build-module/components/inspector-controls-tabs/settings-tab.js +1 -3
  672. package/build-module/components/inspector-controls-tabs/settings-tab.js.map +1 -1
  673. package/build-module/components/inspector-controls-tabs/styles-tab.js +1 -3
  674. package/build-module/components/inspector-controls-tabs/styles-tab.js.map +1 -1
  675. package/build-module/components/inspector-controls-tabs/utils.js +3 -6
  676. package/build-module/components/inspector-controls-tabs/utils.js.map +1 -1
  677. package/build-module/components/inspector-popover-header/index.js +1 -2
  678. package/build-module/components/inspector-popover-header/index.js.map +1 -1
  679. package/build-module/components/line-height-control/index.js.map +1 -1
  680. package/build-module/components/link-control/index.js +1 -3
  681. package/build-module/components/link-control/index.js.map +1 -1
  682. package/build-module/components/link-control/is-url-like.js.map +1 -1
  683. package/build-module/components/link-control/link-preview.js +14 -13
  684. package/build-module/components/link-control/link-preview.js.map +1 -1
  685. package/build-module/components/link-control/search-create-button.js +1 -1
  686. package/build-module/components/link-control/search-create-button.js.map +1 -1
  687. package/build-module/components/link-control/search-input.js +4 -7
  688. package/build-module/components/link-control/search-input.js.map +1 -1
  689. package/build-module/components/link-control/search-results.js +6 -17
  690. package/build-module/components/link-control/search-results.js.map +1 -1
  691. package/build-module/components/link-control/settings-drawer.js +1 -3
  692. package/build-module/components/link-control/settings-drawer.js.map +1 -1
  693. package/build-module/components/link-control/settings.js +1 -2
  694. package/build-module/components/link-control/settings.js.map +1 -1
  695. package/build-module/components/link-control/use-rich-url-data.js.map +1 -1
  696. package/build-module/components/list-view/appender.js +6 -6
  697. package/build-module/components/list-view/appender.js.map +1 -1
  698. package/build-module/components/list-view/block-contents.js +1 -3
  699. package/build-module/components/list-view/block-contents.js.map +1 -1
  700. package/build-module/components/list-view/block-select-button.js +1 -2
  701. package/build-module/components/list-view/block-select-button.js.map +1 -1
  702. package/build-module/components/list-view/block.js +1 -3
  703. package/build-module/components/list-view/block.js.map +1 -1
  704. package/build-module/components/list-view/branch.js +8 -9
  705. package/build-module/components/list-view/branch.js.map +1 -1
  706. package/build-module/components/list-view/drop-indicator.js +1 -2
  707. package/build-module/components/list-view/drop-indicator.js.map +1 -1
  708. package/build-module/components/list-view/index.js +2 -4
  709. package/build-module/components/list-view/index.js.map +1 -1
  710. package/build-module/components/list-view/use-block-selection.js +2 -2
  711. package/build-module/components/list-view/use-block-selection.js.map +1 -1
  712. package/build-module/components/list-view/utils.js +1 -1
  713. package/build-module/components/list-view/utils.js.map +1 -1
  714. package/build-module/components/media-placeholder/index.js +1 -3
  715. package/build-module/components/media-placeholder/index.js.map +1 -1
  716. package/build-module/components/media-placeholder/index.native.js +2 -4
  717. package/build-module/components/media-placeholder/index.native.js.map +1 -1
  718. package/build-module/components/media-replace-flow/index.js +1 -3
  719. package/build-module/components/media-replace-flow/index.js.map +1 -1
  720. package/build-module/components/media-upload/index.native.js +1 -3
  721. package/build-module/components/media-upload/index.native.js.map +1 -1
  722. package/build-module/components/media-upload-progress/index.native.js +1 -2
  723. package/build-module/components/media-upload-progress/index.native.js.map +1 -1
  724. package/build-module/components/multi-selection-inspector/index.js +3 -4
  725. package/build-module/components/multi-selection-inspector/index.js.map +1 -1
  726. package/build-module/components/observe-typing/index.js +1 -0
  727. package/build-module/components/observe-typing/index.js.map +1 -1
  728. package/build-module/components/provider/index.js +2 -3
  729. package/build-module/components/provider/index.js.map +1 -1
  730. package/build-module/components/publish-date-time-picker/index.js +1 -2
  731. package/build-module/components/publish-date-time-picker/index.js.map +1 -1
  732. package/build-module/components/recursion-provider/index.js +1 -0
  733. package/build-module/components/recursion-provider/index.js.map +1 -1
  734. package/build-module/components/responsive-block-control/index.js +4 -5
  735. package/build-module/components/responsive-block-control/index.js.map +1 -1
  736. package/build-module/components/responsive-block-control/label.js +2 -4
  737. package/build-module/components/responsive-block-control/label.js.map +1 -1
  738. package/build-module/components/rich-text/content.js.map +1 -1
  739. package/build-module/components/rich-text/event-listeners/before-input-rules.js +2 -2
  740. package/build-module/components/rich-text/event-listeners/before-input-rules.js.map +1 -1
  741. package/build-module/components/rich-text/event-listeners/delete.js +2 -2
  742. package/build-module/components/rich-text/event-listeners/delete.js.map +1 -1
  743. package/build-module/components/rich-text/event-listeners/enter.js +2 -2
  744. package/build-module/components/rich-text/event-listeners/enter.js.map +1 -1
  745. package/build-module/components/rich-text/event-listeners/firefox-compat.js +2 -2
  746. package/build-module/components/rich-text/event-listeners/firefox-compat.js.map +1 -1
  747. package/build-module/components/rich-text/event-listeners/index.js +4 -2
  748. package/build-module/components/rich-text/event-listeners/index.js.map +1 -1
  749. package/build-module/components/rich-text/event-listeners/input-events.js +2 -2
  750. package/build-module/components/rich-text/event-listeners/input-events.js.map +1 -1
  751. package/build-module/components/rich-text/event-listeners/input-rules.js +2 -2
  752. package/build-module/components/rich-text/event-listeners/input-rules.js.map +1 -1
  753. package/build-module/components/rich-text/event-listeners/insert-replacement-text.js +2 -2
  754. package/build-module/components/rich-text/event-listeners/insert-replacement-text.js.map +1 -1
  755. package/build-module/components/rich-text/event-listeners/paste-handler.js +2 -2
  756. package/build-module/components/rich-text/event-listeners/paste-handler.js.map +1 -1
  757. package/build-module/components/rich-text/event-listeners/remove-browser-shortcuts.js +2 -2
  758. package/build-module/components/rich-text/event-listeners/remove-browser-shortcuts.js.map +1 -1
  759. package/build-module/components/rich-text/event-listeners/shortcuts.js +2 -2
  760. package/build-module/components/rich-text/event-listeners/shortcuts.js.map +1 -1
  761. package/build-module/components/rich-text/event-listeners/undo-automatic-change.js +2 -2
  762. package/build-module/components/rich-text/event-listeners/undo-automatic-change.js.map +1 -1
  763. package/build-module/components/rich-text/file-paste-handler.native.js.map +1 -1
  764. package/build-module/components/rich-text/format-toolbar/index.js +1 -3
  765. package/build-module/components/rich-text/format-toolbar/index.js.map +1 -1
  766. package/build-module/components/rich-text/format-toolbar/index.native.js +1 -3
  767. package/build-module/components/rich-text/format-toolbar/index.native.js.map +1 -1
  768. package/build-module/components/rich-text/index.js +4 -5
  769. package/build-module/components/rich-text/index.js.map +1 -1
  770. package/build-module/components/rich-text/index.native.js +3 -9
  771. package/build-module/components/rich-text/index.native.js.map +1 -1
  772. package/build-module/components/rich-text/multiline.js.map +1 -1
  773. package/build-module/components/rich-text/native/get-format-colors.native.js.map +1 -1
  774. package/build-module/components/rich-text/native/index.js +1 -1
  775. package/build-module/components/rich-text/native/index.js.map +1 -1
  776. package/build-module/components/rich-text/native/index.native.js +1 -3
  777. package/build-module/components/rich-text/native/index.native.js.map +1 -1
  778. package/build-module/components/rich-text/native/toolbar-button-with-options.native.js +1 -3
  779. package/build-module/components/rich-text/native/toolbar-button-with-options.native.js.map +1 -1
  780. package/build-module/components/rich-text/native/use-format-types.js +1 -0
  781. package/build-module/components/rich-text/native/use-format-types.js.map +1 -1
  782. package/build-module/components/rich-text/toolbar-button.js.map +1 -1
  783. package/build-module/components/rich-text/use-format-types.js +1 -0
  784. package/build-module/components/rich-text/use-format-types.js.map +1 -1
  785. package/build-module/components/spacing-sizes-control/index.js +4 -5
  786. package/build-module/components/spacing-sizes-control/index.js.map +1 -1
  787. package/build-module/components/spacing-sizes-control/input-controls/axial.js +1 -2
  788. package/build-module/components/spacing-sizes-control/input-controls/axial.js.map +1 -1
  789. package/build-module/components/spacing-sizes-control/input-controls/separated.js +1 -2
  790. package/build-module/components/spacing-sizes-control/input-controls/separated.js.map +1 -1
  791. package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js +5 -7
  792. package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
  793. package/build-module/components/spacing-sizes-control/linked-button.js +2 -6
  794. package/build-module/components/spacing-sizes-control/linked-button.js.map +1 -1
  795. package/build-module/components/spacing-sizes-control/utils.js +1 -0
  796. package/build-module/components/spacing-sizes-control/utils.js.map +1 -1
  797. package/build-module/components/tabbed-sidebar/index.js +1 -2
  798. package/build-module/components/tabbed-sidebar/index.js.map +1 -1
  799. package/build-module/components/tool-selector/index.js +9 -8
  800. package/build-module/components/tool-selector/index.js.map +1 -1
  801. package/build-module/components/typewriter/index.js +1 -0
  802. package/build-module/components/typewriter/index.js.map +1 -1
  803. package/build-module/components/unsupported-block-details/index.native.js +1 -2
  804. package/build-module/components/unsupported-block-details/index.native.js.map +1 -1
  805. package/build-module/components/url-input/button.js +1 -2
  806. package/build-module/components/url-input/button.js.map +1 -1
  807. package/build-module/components/url-input/index.js +2 -4
  808. package/build-module/components/url-input/index.js.map +1 -1
  809. package/build-module/components/url-popover/image-url-input-ui.js +1 -3
  810. package/build-module/components/url-popover/image-url-input-ui.js.map +1 -1
  811. package/build-module/components/url-popover/index.js +1 -2
  812. package/build-module/components/url-popover/index.js.map +1 -1
  813. package/build-module/components/url-popover/link-editor.js +1 -2
  814. package/build-module/components/url-popover/link-editor.js.map +1 -1
  815. package/build-module/components/url-popover/link-viewer.js +1 -2
  816. package/build-module/components/url-popover/link-viewer.js.map +1 -1
  817. package/build-module/components/use-block-commands/index.js +1 -1
  818. package/build-module/components/use-block-commands/index.js.map +1 -1
  819. package/build-module/components/use-block-drop-zone/index.js +5 -5
  820. package/build-module/components/use-block-drop-zone/index.js.map +1 -1
  821. package/build-module/components/use-block-drop-zone/index.native.js +0 -1
  822. package/build-module/components/use-block-drop-zone/index.native.js.map +1 -1
  823. package/build-module/components/use-flash-editable-blocks/index.js.map +1 -1
  824. package/build-module/components/use-moving-animation/index.js +1 -3
  825. package/build-module/components/use-moving-animation/index.js.map +1 -1
  826. package/build-module/components/use-resize-canvas/index.js +1 -2
  827. package/build-module/components/use-resize-canvas/index.js.map +1 -1
  828. package/build-module/components/use-settings/index.js +1 -3
  829. package/build-module/components/use-settings/index.js.map +1 -1
  830. package/build-module/components/video-player/index.native.js +1 -2
  831. package/build-module/components/video-player/index.native.js.map +1 -1
  832. package/build-module/components/warning/index.js +1 -2
  833. package/build-module/components/warning/index.js.map +1 -1
  834. package/build-module/components/warning/index.native.js +1 -2
  835. package/build-module/components/warning/index.native.js.map +1 -1
  836. package/build-module/components/writing-flow/index.js +6 -6
  837. package/build-module/components/writing-flow/index.js.map +1 -1
  838. package/build-module/components/writing-flow/use-tab-nav.js +20 -5
  839. package/build-module/components/writing-flow/use-tab-nav.js.map +1 -1
  840. package/build-module/hooks/align.js.map +1 -1
  841. package/build-module/hooks/anchor.js +1 -3
  842. package/build-module/hooks/anchor.js.map +1 -1
  843. package/build-module/hooks/block-bindings.js +21 -12
  844. package/build-module/hooks/block-bindings.js.map +1 -1
  845. package/build-module/hooks/block-hooks.js +2 -3
  846. package/build-module/hooks/block-hooks.js.map +1 -1
  847. package/build-module/hooks/block-style-variation.js +1 -2
  848. package/build-module/hooks/block-style-variation.js.map +1 -1
  849. package/build-module/hooks/contrast-checker.js +0 -1
  850. package/build-module/hooks/contrast-checker.js.map +1 -1
  851. package/build-module/hooks/dimensions.js +1 -3
  852. package/build-module/hooks/dimensions.js.map +1 -1
  853. package/build-module/hooks/duotone.js +3 -5
  854. package/build-module/hooks/duotone.js.map +1 -1
  855. package/build-module/hooks/font-family.js.map +1 -1
  856. package/build-module/hooks/gap.js.map +1 -1
  857. package/build-module/hooks/generated-class-name.js +1 -0
  858. package/build-module/hooks/generated-class-name.js.map +1 -1
  859. package/build-module/hooks/grid-visualizer.js +14 -14
  860. package/build-module/hooks/grid-visualizer.js.map +1 -1
  861. package/build-module/hooks/layout-child.js +42 -6
  862. package/build-module/hooks/layout-child.js.map +1 -1
  863. package/build-module/hooks/layout.js +1 -3
  864. package/build-module/hooks/layout.js.map +1 -1
  865. package/build-module/hooks/position.js +1 -1
  866. package/build-module/hooks/position.js.map +1 -1
  867. package/build-module/hooks/spacing-visualizer.js.map +1 -1
  868. package/build-module/hooks/style.js +5 -4
  869. package/build-module/hooks/style.js.map +1 -1
  870. package/build-module/hooks/text-align.js.map +1 -1
  871. package/build-module/hooks/typography.native.js +1 -2
  872. package/build-module/hooks/typography.native.js.map +1 -1
  873. package/build-module/hooks/use-bindings-attributes.js +1 -2
  874. package/build-module/hooks/use-bindings-attributes.js.map +1 -1
  875. package/build-module/hooks/use-typography-props.js.map +1 -1
  876. package/build-module/hooks/use-zoom-out.js +18 -19
  877. package/build-module/hooks/use-zoom-out.js.map +1 -1
  878. package/build-module/index.js +1 -1
  879. package/build-module/index.js.map +1 -1
  880. package/build-module/layouts/constrained.js +1 -3
  881. package/build-module/layouts/constrained.js.map +1 -1
  882. package/build-module/layouts/flex.js +1 -3
  883. package/build-module/layouts/flex.js.map +1 -1
  884. package/build-module/layouts/grid.js +1 -3
  885. package/build-module/layouts/grid.js.map +1 -1
  886. package/build-module/layouts/utils.js.map +1 -1
  887. package/build-module/private-apis.js +7 -3
  888. package/build-module/private-apis.js.map +1 -1
  889. package/build-module/store/actions.js +6 -38
  890. package/build-module/store/actions.js.map +1 -1
  891. package/build-module/store/defaults.js +1 -1
  892. package/build-module/store/defaults.js.map +1 -1
  893. package/build-module/store/private-actions.js +54 -7
  894. package/build-module/store/private-actions.js.map +1 -1
  895. package/build-module/store/private-selectors.js +9 -20
  896. package/build-module/store/private-selectors.js.map +1 -1
  897. package/build-module/store/reducer.js +17 -22
  898. package/build-module/store/reducer.js.map +1 -1
  899. package/build-module/store/selectors.js +66 -20
  900. package/build-module/store/selectors.js.map +1 -1
  901. package/build-module/utils/block-bindings.js +9 -6
  902. package/build-module/utils/block-bindings.js.map +1 -1
  903. package/build-module/utils/dom.js +16 -1
  904. package/build-module/utils/dom.js.map +1 -1
  905. package/build-module/utils/get-font-styles-and-weights.js +3 -3
  906. package/build-module/utils/get-font-styles-and-weights.js.map +1 -1
  907. package/build-module/utils/get-px-from-css-unit.js +1 -1
  908. package/build-module/utils/get-px-from-css-unit.js.map +1 -1
  909. package/build-module/utils/object.js +1 -0
  910. package/build-module/utils/object.js.map +1 -1
  911. package/build-module/utils/pasting.js.map +1 -1
  912. package/build-module/utils/transform-styles/index.js +3 -2
  913. package/build-module/utils/transform-styles/index.js.map +1 -1
  914. package/build-style/content-rtl.css +19 -27
  915. package/build-style/content.css +19 -27
  916. package/build-style/style-rtl.css +47 -54
  917. package/build-style/style.css +47 -54
  918. package/build-types/utils/dom.d.ts.map +1 -1
  919. package/package.json +34 -33
  920. package/src/autocompleters/block.js +16 -7
  921. package/src/components/block-canvas/index.js +17 -1
  922. package/src/components/block-canvas/style.scss +1 -0
  923. package/src/components/block-card/index.js +3 -3
  924. package/src/components/block-full-height-alignment-control/index.js +1 -1
  925. package/src/components/block-inspector/style.scss +0 -6
  926. package/src/components/block-list/block.js +1 -2
  927. package/src/components/block-list/block.native.js +0 -4
  928. package/src/components/block-list/content.scss +4 -3
  929. package/src/components/block-list/index.js +4 -4
  930. package/src/components/block-list/use-block-props/index.js +0 -2
  931. package/src/components/block-list/use-block-props/use-focus-first-element.js +5 -3
  932. package/src/components/block-list/use-block-props/use-selected-block-event-handlers.js +12 -4
  933. package/src/components/block-list/use-in-between-inserter.js +1 -1
  934. package/src/components/block-list/zoom-out-separator.js +8 -6
  935. package/src/components/block-patterns-list/stories/fixtures.js +834 -0
  936. package/src/components/block-patterns-list/stories/index.story.js +81 -0
  937. package/src/components/block-patterns-list/style.scss +2 -0
  938. package/src/components/block-patterns-paging/index.js +1 -1
  939. package/src/components/block-popover/index.js +2 -2
  940. package/src/components/block-preview/auto.js +1 -4
  941. package/src/components/block-preview/index.js +2 -2
  942. package/src/components/block-settings-menu/block-settings-dropdown.js +4 -0
  943. package/src/components/block-settings-menu/index.js +3 -0
  944. package/src/components/block-toolbar/change-design.js +133 -0
  945. package/src/components/block-toolbar/index.js +25 -8
  946. package/src/components/block-toolbar/style.scss +16 -0
  947. package/src/components/block-tools/index.js +4 -28
  948. package/src/components/block-tools/insertion-point.js +4 -3
  949. package/src/components/block-tools/style.scss +0 -20
  950. package/src/components/block-tools/use-show-block-tools.js +2 -8
  951. package/src/components/block-tools/zoom-out-mode-inserters.js +25 -40
  952. package/src/components/block-variation-transforms/index.js +2 -2
  953. package/src/components/block-vertical-alignment-control/ui.js +11 -15
  954. package/src/components/border-radius-control/linked-button.js +9 -11
  955. package/src/components/collab/block-comment-icon-slot.js +12 -0
  956. package/src/components/collab/block-comment-icon-toolbar-slot.js +12 -0
  957. package/src/components/colors-gradients/use-multiple-origin-colors-and-gradients.js +7 -1
  958. package/src/components/convert-to-group-buttons/toolbar.js +4 -4
  959. package/src/components/global-styles/color-panel.js +2 -10
  960. package/src/components/global-styles/test/use-global-styles-context.native.js +1 -0
  961. package/src/components/global-styles/use-global-styles-context.native.js +6 -0
  962. package/src/components/iframe/content.scss +22 -32
  963. package/src/components/iframe/index.js +62 -15
  964. package/src/components/iframe/style.scss +17 -0
  965. package/src/components/image-size-control/index.js +74 -43
  966. package/src/components/image-size-control/test/index.js +5 -63
  967. package/src/components/inner-blocks/index.js +12 -6
  968. package/src/components/inner-blocks/use-nested-settings-update.js +16 -10
  969. package/src/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js +1 -1
  970. package/src/components/inserter/block-patterns-tab/pattern-category-previews.js +2 -3
  971. package/src/components/inserter/block-patterns-tab/patterns-filter.js +1 -1
  972. package/src/components/inserter/category-tabs/index.js +17 -13
  973. package/src/components/inserter/menu.js +12 -5
  974. package/src/components/inserter/quick-inserter.js +1 -1
  975. package/src/components/inserter/style.scss +14 -41
  976. package/src/components/inserter-button/index.native.js +1 -1
  977. package/src/components/inspector-controls-tabs/index.js +1 -6
  978. package/src/components/inspector-controls-tabs/utils.js +0 -3
  979. package/src/components/link-control/link-preview.js +15 -8
  980. package/src/components/link-control/search-input.js +4 -5
  981. package/src/components/link-control/search-results.js +2 -13
  982. package/src/components/link-control/test/index.js +147 -70
  983. package/src/components/list-view/appender.js +5 -6
  984. package/src/components/list-view/branch.js +8 -6
  985. package/src/components/list-view/index.js +1 -2
  986. package/src/components/media-replace-flow/test/index.js +1 -1
  987. package/src/components/provider/index.js +1 -3
  988. package/src/components/provider/test/experimental-provider.js +43 -1
  989. package/src/components/responsive-block-control/style.scss +0 -1
  990. package/src/components/rich-text/event-listeners/index.js +4 -2
  991. package/src/components/rich-text/index.native.js +0 -2
  992. package/src/components/rich-text/style.scss +5 -0
  993. package/src/components/spacing-sizes-control/index.js +3 -3
  994. package/src/components/spacing-sizes-control/input-controls/spacing-input-control.js +4 -4
  995. package/src/components/spacing-sizes-control/linked-button.js +2 -12
  996. package/src/components/tool-selector/index.js +6 -5
  997. package/src/components/url-input/index.js +1 -1
  998. package/src/components/use-block-commands/index.js +1 -1
  999. package/src/components/use-block-drop-zone/index.js +5 -5
  1000. package/src/components/use-block-drop-zone/index.native.js +0 -1
  1001. package/src/components/use-moving-animation/index.js +0 -1
  1002. package/src/components/use-resize-canvas/index.js +1 -3
  1003. package/src/components/use-settings/index.js +0 -1
  1004. package/src/components/writing-flow/index.js +5 -3
  1005. package/src/components/writing-flow/use-tab-nav.js +27 -4
  1006. package/src/hooks/block-bindings.js +48 -31
  1007. package/src/hooks/contrast-checker.js +0 -1
  1008. package/src/hooks/duotone.js +2 -2
  1009. package/src/hooks/grid-visualizer.js +23 -9
  1010. package/src/hooks/layout-child.js +48 -3
  1011. package/src/hooks/style.js +7 -3
  1012. package/src/hooks/use-zoom-out.js +20 -24
  1013. package/src/index.js +0 -1
  1014. package/src/private-apis.js +6 -1
  1015. package/src/store/actions.js +5 -53
  1016. package/src/store/defaults.js +2 -1
  1017. package/src/store/private-actions.js +71 -8
  1018. package/src/store/private-selectors.js +9 -19
  1019. package/src/store/reducer.js +25 -28
  1020. package/src/store/selectors.js +82 -20
  1021. package/src/store/test/actions.js +41 -0
  1022. package/src/store/test/private-selectors.js +7 -1
  1023. package/src/store/test/reducer.js +23 -0
  1024. package/src/store/test/selectors.js +13 -2
  1025. package/src/style.scss +1 -0
  1026. package/src/utils/block-bindings.js +9 -6
  1027. package/src/utils/dom.js +22 -2
  1028. package/src/utils/get-font-styles-and-weights.js +2 -2
  1029. package/src/utils/test/use-block-bindings-utils.js +174 -0
  1030. package/src/utils/transform-styles/index.js +3 -2
  1031. package/tsconfig.tsbuildinfo +1 -1
  1032. package/build/components/block-list/use-block-props/use-zoom-out-mode-exit.js +0 -57
  1033. package/build/components/block-list/use-block-props/use-zoom-out-mode-exit.js.map +0 -1
  1034. package/build/components/block-toolbar/shuffle.js +0 -110
  1035. package/build/components/block-toolbar/shuffle.js.map +0 -1
  1036. package/build/components/block-tools/zoom-out-popover.js +0 -57
  1037. package/build/components/block-tools/zoom-out-popover.js.map +0 -1
  1038. package/build/components/block-tools/zoom-out-toolbar.js +0 -149
  1039. package/build/components/block-tools/zoom-out-toolbar.js.map +0 -1
  1040. package/build/components/block-vertical-alignment-control/icons.js +0 -48
  1041. package/build/components/block-vertical-alignment-control/icons.js.map +0 -1
  1042. package/build-module/components/block-list/use-block-props/use-zoom-out-mode-exit.js +0 -51
  1043. package/build-module/components/block-list/use-block-props/use-zoom-out-mode-exit.js.map +0 -1
  1044. package/build-module/components/block-toolbar/shuffle.js +0 -103
  1045. package/build-module/components/block-toolbar/shuffle.js.map +0 -1
  1046. package/build-module/components/block-tools/zoom-out-popover.js +0 -48
  1047. package/build-module/components/block-tools/zoom-out-popover.js.map +0 -1
  1048. package/build-module/components/block-tools/zoom-out-toolbar.js +0 -142
  1049. package/build-module/components/block-tools/zoom-out-toolbar.js.map +0 -1
  1050. package/build-module/components/block-vertical-alignment-control/icons.js +0 -41
  1051. package/build-module/components/block-vertical-alignment-control/icons.js.map +0 -1
  1052. package/src/components/block-list/use-block-props/use-zoom-out-mode-exit.js +0 -65
  1053. package/src/components/block-toolbar/shuffle.js +0 -111
  1054. package/src/components/block-tools/zoom-out-popover.js +0 -46
  1055. package/src/components/block-tools/zoom-out-toolbar.js +0 -156
  1056. package/src/components/block-vertical-alignment-control/icons.js +0 -34
@@ -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","isURL","Autocomplete","useBlockEditContext","RemoveBrowserShortcuts","filePasteHandler","FormatToolbarContainer","store","blockEditorStore","addActiveFormats","getAllowedFormats","createLinkInParagraph","EmbedHandlerPicker","Content","RichText","withDeprecations","findSelection","START_OF_SELECTED_AREA","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","__unstableUseSplitSelection","__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","__unstableSplitSelection","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","slice","onPaste","html","plainText","isInternal","files","activeFormats","pastedValue","HTML","mode","window","console","log","isPastedURL","trim","presentEmbedHandlerPicker","current","presentPicker","createEmbed","createLink","valueToInsert","canPasteEmbed","name","source","inputRule","startPosition","characterBefore","trimmedTextBefore","prefixTransforms","prefix","currentSelection","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} 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';\nimport { findSelection } from './event-listeners/input-rules';\nimport { START_OF_SELECTED_AREA } from '../../utils/selection';\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__unstableUseSplitSelection,\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\t__unstableSplitSelection,\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 ( __unstableUseSplitSelection ) {\n\t\t\t\t__unstableSplitSelection();\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 ) => {\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, start ).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 = toHTMLString( {\n\t\t\t\tvalue: insert( value, START_OF_SELECTED_AREA, 0, start ),\n\t\t\t} );\n\t\t\tconst block = transformation.transform( content );\n\t\t\tconst currentSelection = findSelection( [ block ] );\n\t\t\tonReplace( [ block ] );\n\t\t\tselectionChange( ...currentSelection );\n\t\t\t__unstableMarkAutomaticChange();\n\t\t},\n\t\t[ onReplace, start, selectionChange, __unstableMarkAutomaticChange ]\n\t);\n\n\tconst mergedRef = useMergeRefs( [ providedRef, fallbackRef ] );\n\n\treturn (\n\t\t<RichText\n\t\t\tclientId={ clientId }\n\t\t\tidentifier={ identifier }\n\t\t\tnativeEditorRef={ mergedRef }\n\t\t\tvalue={ adjustedValue }\n\t\t\tonChange={ adjustedOnChange }\n\t\t\tselectionStart={ selectionStart }\n\t\t\tselectionEnd={ selectionEnd }\n\t\t\tonSelectionChange={ onSelectionChange }\n\t\t\ttagName={ tagName }\n\t\t\tstart={ start }\n\t\t\treversed={ reversed }\n\t\t\tplaceholder={ placeholder }\n\t\t\tallowedFormats={ adjustedAllowedFormats }\n\t\t\twithoutInteractiveFormatting={ withoutInteractiveFormatting }\n\t\t\tonEnter={ onEnter }\n\t\t\tonDelete={ onDelete }\n\t\t\tonPaste={ onPaste }\n\t\t\t__unstableIsSelected={ isSelected }\n\t\t\t__unstableInputRule={ inputRule }\n\t\t\t__unstableOnEnterFormattedText={ enterFormattedText }\n\t\t\t__unstableOnExitFormattedText={ exitFormattedText }\n\t\t\t__unstableOnCreateUndoLevel={ __unstableMarkLastChangeAsPersistent }\n\t\t\t__unstableMarkAutomaticChange={ __unstableMarkAutomaticChange }\n\t\t\t__unstableDidAutomaticChange={ didAutomaticChange }\n\t\t\t__unstableUndo={ undo }\n\t\t\t__unstableDisableFormats={ disableFormats }\n\t\t\tpreserveWhiteSpace={ preserveWhiteSpace }\n\t\t\tdisabled={ disabled }\n\t\t\tunstableOnFocus={ unstableOnFocus }\n\t\t\t__unstableAllowPrefixTransformations={\n\t\t\t\t__unstableAllowPrefixTransformations\n\t\t\t}\n\t\t\t// Native props.\n\t\t\tblockIsSelected={\n\t\t\t\toriginalIsSelected !== undefined\n\t\t\t\t\t? originalIsSelected\n\t\t\t\t\t: blockIsSelected\n\t\t\t}\n\t\t\tshouldBlurOnUnmount={ shouldBlurOnUnmount }\n\t\t\t__unstableMobileNoFocusOnMount={ __unstableMobileNoFocusOnMount }\n\t\t\tdeleteEnter={ deleteEnter }\n\t\t\tplaceholderTextColor={ placeholderTextColor }\n\t\t\ttextAlign={ textAlign }\n\t\t\tselectionColor={ selectionColor }\n\t\t\ttagsToEliminate={ tagsToEliminate }\n\t\t\tdisableEditingMenu={ disableEditingMenu }\n\t\t\tfontSize={ fontSize }\n\t\t\tfontFamily={ fontFamily }\n\t\t\tfontWeight={ fontWeight }\n\t\t\tfontStyle={ fontStyle }\n\t\t\tminWidth={ minWidth }\n\t\t\tmaxWidth={ maxWidth }\n\t\t\tonBlur={ onBlur }\n\t\t\tdisableSuggestions={ disableSuggestions }\n\t\t\tdisableAutocorrection={ disableAutocorrection }\n\t\t\tcontainerWidth={ containerWidth }\n\t\t\tclearCurrentSelectionOnUnmount={ clearCurrentSelectionOnUnmount }\n\t\t\t// Props to be set on the editable container are destructured on the\n\t\t\t// element itself for web (see below), but passed through rich text\n\t\t\t// for native.\n\t\t\tid={ props.id }\n\t\t\tstyle={ props.style }\n\t\t>\n\t\t\t{ ( {\n\t\t\t\tisSelected: nestedIsSelected,\n\t\t\t\tvalue,\n\t\t\t\tonChange,\n\t\t\t\tonFocus,\n\t\t\t\teditableProps,\n\t\t\t\teditableTagName: TagName,\n\t\t\t} ) => (\n\t\t\t\t<>\n\t\t\t\t\t{ children && children( { value, onChange, onFocus } ) }\n\t\t\t\t\t{ nestedIsSelected && hasFormats && (\n\t\t\t\t\t\t<FormatToolbarContainer\n\t\t\t\t\t\t\tinline={ inlineToolbar }\n\t\t\t\t\t\t\tanchorRef={ fallbackRef.current }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ nestedIsSelected && <RemoveBrowserShortcuts /> }\n\t\t\t\t\t<Autocomplete\n\t\t\t\t\t\tonReplace={ onReplace }\n\t\t\t\t\t\tcompleters={ autocompleters }\n\t\t\t\t\t\trecord={ value }\n\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\tisSelected={ nestedIsSelected }\n\t\t\t\t\t\tcontentRef={ fallbackRef }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ ( { listBoxId, activeId, onKeyDown } ) => (\n\t\t\t\t\t\t\t<TagName\n\t\t\t\t\t\t\t\t{ ...editableProps }\n\t\t\t\t\t\t\t\t{ ...props }\n\t\t\t\t\t\t\t\tstyle={\n\t\t\t\t\t\t\t\t\tprops.style\n\t\t\t\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\t\t\t\t...props.style,\n\t\t\t\t\t\t\t\t\t\t\t\t...editableProps.style,\n\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t: editableProps.style\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t\t\tclasses,\n\t\t\t\t\t\t\t\t\tprops.className,\n\t\t\t\t\t\t\t\t\teditableProps.className\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\taria-autocomplete={\n\t\t\t\t\t\t\t\t\tlistBoxId ? 'list' : undefined\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\taria-owns={ listBoxId }\n\t\t\t\t\t\t\t\taria-activedescendant={ activeId }\n\t\t\t\t\t\t\t\tonKeyDown={ ( event ) => {\n\t\t\t\t\t\t\t\t\tonKeyDown( event );\n\t\t\t\t\t\t\t\t\teditableProps.onKeyDown( event );\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</Autocomplete>\n\t\t\t\t\t<EmbedHandlerPicker ref={ embedHandlerPickerRef } />\n\t\t\t\t</>\n\t\t\t) }\n\t\t</RichText>\n\t);\n}\n\n// This export does not actually implement a private API, but was exported\n// under this name for interoperability with the web version of the RichText\n// component.\nexport const PrivateRichText = withDeprecations(\n\tforwardRef( RichTextWrapper )\n);\n\nPrivateRichText.Content = Content;\n\nPrivateRichText.isEmpty = ( value ) => {\n\treturn ! value || value.length === 0;\n};\n\nPrivateRichText.Content.defaultProps = {\n\tformat: 'string',\n\tvalue: '',\n};\n\nPrivateRichText.Raw = forwardRef( ( props, ref ) => (\n\t<RichText { ...props } nativeEditorRef={ ref } />\n) );\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/rich-text/README.md\n */\nexport default PrivateRichText;\nexport { RichTextShortcut } from './shortcut';\nexport { RichTextToolbarButton } from './toolbar-button';\nexport { __unstableRichTextInputEvent } from './input-event';\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,QAAQ,EAAEC,MAAM,EAAEC,WAAW,EAAEC,UAAU,QAAQ,oBAAoB;AAC9E,SAASC,WAAW,EAAEC,SAAS,QAAQ,iBAAiB;AACxD,SACCC,YAAY,EACZC,QAAQ,IAAIC,cAAc,EAC1BC,kBAAkB,EAClBC,aAAa,EACbC,wBAAwB,QAClB,mBAAmB;AAC1B,SAASC,aAAa,EAAEC,YAAY,QAAQ,oBAAoB;AAChE,SACCC,uBAAuB,EACvBC,OAAO,EACPC,MAAM,EACNC,MAAM,EACNC,MAAM,EACNC,KAAK,EACLC,YAAY,QACN,sBAAsB;AAC7B,SAASC,KAAK,QAAQ,gBAAgB;;AAEtC;AACA;AACA;AACA,OAAOC,YAAY,MAAM,iBAAiB;AAC1C,SAASC,mBAAmB,QAAQ,eAAe;AACnD,SAASC,sBAAsB,QAAQ,4BAA4B;AACnE,SAASC,gBAAgB,QAAQ,sBAAsB;AACvD,OAAOC,sBAAsB,MAAM,4BAA4B;AAC/D,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;AACvD,SACCC,gBAAgB,EAChBC,iBAAiB,EACjBC,qBAAqB,QACf,SAAS;AAChB,OAAOC,kBAAkB,MAAM,wBAAwB;AACvD,SAASC,OAAO,QAAQ,WAAW;AACnC,OAAOC,QAAQ,MAAM,UAAU;AAC/B,SAASC,gBAAgB,QAAQ,qBAAqB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U;UAClCC,SAAS,EAAKE,KAAK,IAAM;YACxBF,SAAS,CAAEE,KAAM,CAAC;YAClBX,aAAa,CAACS,SAAS,CAAEE,KAAM,CAAC;UACjC;QAAG,CACH;MACD,CACY,CAAC,eACfvM,IAAA,CAACP,kBAAkB;QAAC+M,GAAG,EAAGpI;MAAuB,CAAE,CAAC;IAAA,CACnD;EACF,CACQ,CAAC;AAEb;;AAEA;AACA;AACA;AACA,OAAO,MAAMqI,eAAe,GAAG7M,gBAAgB,CAC9ChC,UAAU,CAAE0C,eAAgB,CAC7B,CAAC;AAEDmM,eAAe,CAAC/M,OAAO,GAAGA,OAAO;AAEjC+M,eAAe,CAACjO,OAAO,GAAKkC,KAAK,IAAM;EACtC,OAAO,CAAEA,KAAK,IAAIA,KAAK,CAAC0F,MAAM,KAAK,CAAC;AACrC,CAAC;AAEDqG,eAAe,CAAC/M,OAAO,CAACgN,YAAY,GAAG;EACtCC,MAAM,EAAE,QAAQ;EAChBjM,KAAK,EAAE;AACR,CAAC;AAED+L,eAAe,CAACG,GAAG,GAAGhP,UAAU,CAAE,CAAEkG,KAAK,EAAE0I,GAAG,kBAC7CxM,IAAA,CAACL,QAAQ;EAAA,GAAMmE,KAAK;EAAGkH,eAAe,EAAGwB;AAAK,CAAE,CAC/C,CAAC;;AAEH;AACA;AACA;AACA,eAAeC,eAAe;AAC9B,SAASI,gBAAgB,QAAQ,YAAY;AAC7C,SAASC,qBAAqB,QAAQ,kBAAkB;AACxD,SAASC,4BAA4B,QAAQ,eAAe","ignoreList":[]}
1
+ {"version":3,"names":["clsx","Platform","useRef","useCallback","forwardRef","useDispatch","useSelect","pasteHandler","children","childrenSource","getBlockTransforms","findTransform","isUnmodifiedDefaultBlock","useInstanceId","useMergeRefs","__unstableCreateElement","isEmpty","insert","remove","create","split","toHTMLString","isURL","Autocomplete","useBlockEditContext","RemoveBrowserShortcuts","filePasteHandler","FormatToolbarContainer","store","blockEditorStore","addActiveFormats","getAllowedFormats","createLinkInParagraph","EmbedHandlerPicker","Content","RichText","withDeprecations","findSelection","START_OF_SELECTED_AREA","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","__unstableUseSplitSelection","__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","__unstableSplitSelection","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","slice","onPaste","html","plainText","isInternal","files","activeFormats","pastedValue","HTML","mode","window","console","log","isPastedURL","trim","presentEmbedHandlerPicker","current","presentPicker","createEmbed","createLink","valueToInsert","canPasteEmbed","name","source","inputRule","startPosition","characterBefore","trimmedTextBefore","prefixTransforms","prefix","currentSelection","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} 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';\nimport { findSelection } from './event-listeners/input-rules';\nimport { START_OF_SELECTED_AREA } from '../../utils/selection';\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__unstableUseSplitSelection,\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\t__unstableSplitSelection,\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[ 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 ( __unstableUseSplitSelection ) {\n\t\t\t\t__unstableSplitSelection();\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[\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 ) => {\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, start ).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 = toHTMLString( {\n\t\t\t\tvalue: insert( value, START_OF_SELECTED_AREA, 0, start ),\n\t\t\t} );\n\t\t\tconst block = transformation.transform( content );\n\t\t\tconst currentSelection = findSelection( [ block ] );\n\t\t\tonReplace( [ block ] );\n\t\t\tselectionChange( ...currentSelection );\n\t\t\t__unstableMarkAutomaticChange();\n\t\t},\n\t\t[ onReplace, start, selectionChange, __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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AAC/M,OAAO,CAACgN,YAAY,GAAG;EACtCC,MAAM,EAAE,QAAQ;EAChBjM,KAAK,EAAE;AACR,CAAC;AAED+L,eAAe,CAACG,GAAG,GAAGhP,UAAU,CAAE,CAAEkG,KAAK,EAAE0I,GAAG,kBAC7CxM,IAAA,CAACL,QAAQ;EAAA,GAAMmE,KAAK;EAAGkH,eAAe,EAAGwB;AAAK,CAAE,CAC/C,CAAC;;AAEH;AACA;AACA;AACA,eAAeC,eAAe;AAC9B,SAASI,gBAAgB,QAAQ,YAAY;AAC7C,SAASC,qBAAqB,QAAQ,kBAAkB;AACxD,SAASC,4BAA4B,QAAQ,eAAe","ignoreList":[]}
@@ -1 +1 @@
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,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;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE1C,SAASC,iBAAiBA,CACzB;EACCC,QAAQ;EACRC,UAAU;EACVC,OAAO,EAAEC,OAAO,GAAG,KAAK;EACxBC,K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D,CAAC;QACF,CAAG;QACHiB,OAAO,EAAKC,OAAO,IAAM;UACxB,MAAMvB,SAAS,GAAGJ,MAAM,CAACW,KAAK,CAAC,CAAC;UAChC,IAAIO,MAAM,GAAG,CAAC;UACd,IAAKS,OAAO,EAAG;YACd,IAAK,CAAEvB,SAAS,CAAEK,KAAK,GAAG,CAAC,CAAE,EAAG;cAC/B;YACD;YACAL,SAAS,CAACqB,MAAM,CACfhB,KAAK,EACL,CAAC,EACDL,SAAS,CAAEK,KAAK,CAAE,GAAGL,SAAS,CAAEK,KAAK,GAAG,CAAC,CAC1C,CAAC;YACDS,MAAM,GAAGd,SAAS,CAAEK,KAAK,CAAE,CAACmB,MAAM,GAAG,CAAC;UACvC,CAAC,MAAM;YACN,IAAK,CAAExB,SAAS,CAAEK,KAAK,GAAG,CAAC,CAAE,EAAG;cAC/B;YACD;YACAL,SAAS,CAACqB,MAAM,CACfhB,KAAK,GAAG,CAAC,EACT,CAAC,EACDL,SAAS,CAAEK,KAAK,GAAG,CAAC,CAAE,GAAGL,SAAS,CAAEK,KAAK,CAC1C,CAAC;YACDS,MAAM,GAAGd,SAAS,CAAEK,KAAK,GAAG,CAAC,CAAE,CAACmB,MAAM,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
+ {"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\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G,CAAC,EACT,CAAC,EACDL,SAAS,CAAEK,KAAK,GAAG,CAAC,CAAE,GAAGL,SAAS,CAAEK,KAAK,CAC1C,CAAC;YACDS,MAAM,GAAGd,SAAS,CAAEK,KAAK,GAAG,CAAC,CAAE,CAACmB,MAAM,GAAG,CAAC;UAC3C;UACAzB,SAAS,CAAEC,SAAU,CAAC;UACtBP,eAAe,CACdH,QAAQ,EACR,GAAIZ,UAAU,IACb2B,KAAK,IAAKkB,OAAO,GAAG,CAAC,GAAG,CAAC,CAAE,EAC1B,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 +1 @@
1
- {"version":3,"names":["getColorObjectByAttributeValues","FORMAT_TYPE","REGEX_TO_MATCH","getFormatColors","formats","colors","newFormats","slice","forEach","format","currentFormat","type","className","attributes","class","split","currentClass","match","colorSlug","colorObject","currentStyles","style","color","indexOf","join"],"sources":["@wordpress/block-editor/src/components/rich-text/native/get-format-colors.native.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport { getColorObjectByAttributeValues } from '../../../components/colors';\n\nconst FORMAT_TYPE = 'core/text-color';\nconst REGEX_TO_MATCH = /^has-(.*)-color$/;\n\nexport function getFormatColors( formats, colors ) {\n\tconst newFormats = formats.slice();\n\n\t// We are looping through a sparse array where empty indices will be\n\t// skipped.\n\tnewFormats.forEach( ( format ) => {\n\t\tformat.forEach( ( currentFormat ) => {\n\t\t\tif ( currentFormat?.type === FORMAT_TYPE ) {\n\t\t\t\tconst className = currentFormat?.attributes?.class;\n\n\t\t\t\tclassName?.split( ' ' ).forEach( ( currentClass ) => {\n\t\t\t\t\tconst match = currentClass.match( REGEX_TO_MATCH );\n\t\t\t\t\tif ( match ) {\n\t\t\t\t\t\tconst [ , colorSlug ] =\n\t\t\t\t\t\t\tcurrentClass.match( REGEX_TO_MATCH );\n\t\t\t\t\t\tconst colorObject = getColorObjectByAttributeValues(\n\t\t\t\t\t\t\tcolors,\n\t\t\t\t\t\t\tcolorSlug\n\t\t\t\t\t\t);\n\t\t\t\t\t\tconst currentStyles = currentFormat?.attributes?.style;\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tcolorObject?.color &&\n\t\t\t\t\t\t\t( ! currentStyles ||\n\t\t\t\t\t\t\t\tcurrentStyles?.indexOf( colorObject.color ) ===\n\t\t\t\t\t\t\t\t\t-1 )\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tcurrentFormat.attributes.style = [\n\t\t\t\t\t\t\t\t`color: ${ colorObject.color }`,\n\t\t\t\t\t\t\t\tcurrentStyles,\n\t\t\t\t\t\t\t].join( ';' );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\t} );\n\n\treturn newFormats;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,+BAA+B,QAAQ,4BAA4B;AAE5E,MAAMC,WAAW,GAAG,iBAAiB;AACrC,MAAMC,cAAc,GAAG,kBAAkB;AAEzC,OAAO,SAASC,eAAeA,CAAEC,OAAO,EAAEC,MAAM,EAAG;EAClD,MAAMC,UAAU,GAAGF,OAAO,CAACG,KAAK,CAAC,CAAC;;EAElC;EACA;EACAD,UAAU,CAACE,OAAO,CAAIC,MAAM,IAAM;IACjCA,MAAM,CAACD,OAAO,CAAIE,aAAa,IAAM;MACpC,IAAKA,aAAa,EAAEC,IAAI,KAAKV,WAAW,EAAG;QAC1C,MAAMW,SAAS,GAAGF,aAAa,EAAEG,UAAU,EAAEC,KAAK;QAElDF,SAAS,EAAEG,KAAK,CAAE,GAAI,CAAC,CAACP,OAAO,CAAIQ,YAAY,IAAM;UACpD,MAAMC,KAAK,GAAGD,YAAY,CAACC,KAAK,CAAEf,cAAe,CAAC;UAClD,IAAKe,KAAK,EAAG;YACZ,MAAM,GAAIC,SAAS,CAAE,GACpBF,YAAY,CAACC,KAAK,CAAEf,cAAe,CAAC;YACrC,MAAMiB,WAAW,GAAGnB,+BAA+B,CAClDK,MAAM,EACNa,SACD,CAAC;YACD,MAAME,aAAa,GAAGV,aAAa,EAAEG,UAAU,EAAEQ,KAAK;YACtD,IACCF,WAAW,EAAEG,KAAK,KAChB,CAAEF,aAAa,IAChBA,aAAa,EAAEG,OAAO,CAAEJ,WAAW,CAACG,KAAM,CAAC,KAC1C,CAAC,CAAC,CAAE,EACL;cACDZ,aAAa,CAACG,UAAU,CAACQ,KAAK,GAAG,CAC/B,UAAUF,WAAW,CAACG,KAAO,EAAC,EAC/BF,aAAa,CACb,CAACI,IAAI,CAAE,GAAI,CAAC;YACd;UACD;QACD,CAAE,CAAC;MACJ;IACD,CAAE,CAAC;EACJ,CAAE,CAAC;EAEH,OAAOlB,UAAU;AAClB","ignoreList":[]}
1
+ {"version":3,"names":["getColorObjectByAttributeValues","FORMAT_TYPE","REGEX_TO_MATCH","getFormatColors","formats","colors","newFormats","slice","forEach","format","currentFormat","type","className","attributes","class","split","currentClass","match","colorSlug","colorObject","currentStyles","style","color","indexOf","join"],"sources":["@wordpress/block-editor/src/components/rich-text/native/get-format-colors.native.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport { getColorObjectByAttributeValues } from '../../../components/colors';\n\nconst FORMAT_TYPE = 'core/text-color';\nconst REGEX_TO_MATCH = /^has-(.*)-color$/;\n\nexport function getFormatColors( formats, colors ) {\n\tconst newFormats = formats.slice();\n\n\t// We are looping through a sparse array where empty indices will be\n\t// skipped.\n\tnewFormats.forEach( ( format ) => {\n\t\tformat.forEach( ( currentFormat ) => {\n\t\t\tif ( currentFormat?.type === FORMAT_TYPE ) {\n\t\t\t\tconst className = currentFormat?.attributes?.class;\n\n\t\t\t\tclassName?.split( ' ' ).forEach( ( currentClass ) => {\n\t\t\t\t\tconst match = currentClass.match( REGEX_TO_MATCH );\n\t\t\t\t\tif ( match ) {\n\t\t\t\t\t\tconst [ , colorSlug ] =\n\t\t\t\t\t\t\tcurrentClass.match( REGEX_TO_MATCH );\n\t\t\t\t\t\tconst colorObject = getColorObjectByAttributeValues(\n\t\t\t\t\t\t\tcolors,\n\t\t\t\t\t\t\tcolorSlug\n\t\t\t\t\t\t);\n\t\t\t\t\t\tconst currentStyles = currentFormat?.attributes?.style;\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tcolorObject?.color &&\n\t\t\t\t\t\t\t( ! currentStyles ||\n\t\t\t\t\t\t\t\tcurrentStyles?.indexOf( colorObject.color ) ===\n\t\t\t\t\t\t\t\t\t-1 )\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tcurrentFormat.attributes.style = [\n\t\t\t\t\t\t\t\t`color: ${ colorObject.color }`,\n\t\t\t\t\t\t\t\tcurrentStyles,\n\t\t\t\t\t\t\t].join( ';' );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\t} );\n\n\treturn newFormats;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,+BAA+B,QAAQ,4BAA4B;AAE5E,MAAMC,WAAW,GAAG,iBAAiB;AACrC,MAAMC,cAAc,GAAG,kBAAkB;AAEzC,OAAO,SAASC,eAAeA,CAAEC,OAAO,EAAEC,MAAM,EAAG;EAClD,MAAMC,UAAU,GAAGF,OAAO,CAACG,KAAK,CAAC,CAAC;;EAElC;EACA;EACAD,UAAU,CAACE,OAAO,CAAIC,MAAM,IAAM;IACjCA,MAAM,CAACD,OAAO,CAAIE,aAAa,IAAM;MACpC,IAAKA,aAAa,EAAEC,IAAI,KAAKV,WAAW,EAAG;QAC1C,MAAMW,SAAS,GAAGF,aAAa,EAAEG,UAAU,EAAEC,KAAK;QAElDF,SAAS,EAAEG,KAAK,CAAE,GAAI,CAAC,CAACP,OAAO,CAAIQ,YAAY,IAAM;UACpD,MAAMC,KAAK,GAAGD,YAAY,CAACC,KAAK,CAAEf,cAAe,CAAC;UAClD,IAAKe,KAAK,EAAG;YACZ,MAAM,GAAIC,SAAS,CAAE,GACpBF,YAAY,CAACC,KAAK,CAAEf,cAAe,CAAC;YACrC,MAAMiB,WAAW,GAAGnB,+BAA+B,CAClDK,MAAM,EACNa,SACD,CAAC;YACD,MAAME,aAAa,GAAGV,aAAa,EAAEG,UAAU,EAAEQ,KAAK;YACtD,IACCF,WAAW,EAAEG,KAAK,KAChB,CAAEF,aAAa,IAChBA,aAAa,EAAEG,OAAO,CAAEJ,WAAW,CAACG,KAAM,CAAC,KAC1C,CAAC,CAAC,CAAE,EACL;cACDZ,aAAa,CAACG,UAAU,CAACQ,KAAK,GAAG,CAChC,UAAWF,WAAW,CAACG,KAAK,EAAG,EAC/BF,aAAa,CACb,CAACI,IAAI,CAAE,GAAI,CAAC;YACd;UACD;QACD,CAAE,CAAC;MACJ;IACD,CAAE,CAAC;EACJ,CAAE,CAAC;EAEH,OAAOlB,UAAU;AAClB","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- export default (() => {});
1
+ export default () => {};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["@wordpress/block-editor/src/components/rich-text/native/index.js"],"sourcesContent":["export default () => {};\n"],"mappings":"AAAA,gBAAe,MAAM,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["@wordpress/block-editor/src/components/rich-text/native/index.js"],"sourcesContent":["export default () => {};\n"],"mappings":"AAAA,eAAe,MAAM,CAAC,CAAC","ignoreList":[]}
@@ -37,9 +37,7 @@ import ToolbarButtonWithOptions from './toolbar-button-with-options';
37
37
  // The flattened color palettes array is memoized to ensure that the same array instance is
38
38
  // returned for the colors palettes. This value might be used as a prop, so having the same
39
39
  // instance will prevent unnecessary re-renders of the RichText component.
40
- import { Fragment as _Fragment } from "react/jsx-runtime";
41
- import { jsx as _jsx } from "react/jsx-runtime";
42
- import { jsxs as _jsxs } from "react/jsx-runtime";
40
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
43
41
  const flatColorPalettes = memize(colorsPalettes => [...(colorsPalettes?.theme || []), ...(colorsPalettes?.custom || []), ...(colorsPalettes?.default || [])]);
44
42
  const getSelectionColor = memize((currentSelectionColor, defaultSelectionColor, baseGlobalStyles, isBlockBasedTheme) => {
45
43
  let selectionColor = defaultSelectionColor;