@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,3 +1,4 @@
1
+ /* wp:polyfill */
1
2
  /**
2
3
  * WordPress dependencies
3
4
  */
@@ -1 +1 @@
1
- {"version":3,"names":["useRefEffect","useMergeRefs","useSelect","useDispatch","isTextField","UP","RIGHT","DOWN","LEFT","ENTER","BACKSPACE","ESCAPE","TAB","store","blockEditorStore","jsx","_jsx","KEY_DOWN_ELIGIBLE_KEY_CODES","Set","isKeyDownEligibleForStartTyping","event","keyCode","shiftKey","has","useMouseMoveTypingReset","isTyping","select","stopTyping","node","ownerDocument","lastClientX","lastClientY","stopTypingOnMouseMove","clientX","clientY","addEventListener","removeEventListener","useTypingObserver","_isTyping","startTyping","ref1","ref2","defaultView","selection","getSelection","timerId","stopTypingOnNonTextField","target","setTimeout","stopTypingOnEscapeKey","stopTypingOnSelectionUncollapse","isCollapsed","clearTimeout","startTypingInTextField","type","contains","ObserveTyping","children","ref"],"sources":["@wordpress/block-editor/src/components/observe-typing/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useRefEffect, useMergeRefs } from '@wordpress/compose';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { isTextField } from '@wordpress/dom';\nimport {\n\tUP,\n\tRIGHT,\n\tDOWN,\n\tLEFT,\n\tENTER,\n\tBACKSPACE,\n\tESCAPE,\n\tTAB,\n} from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\n\n/**\n * Set of key codes upon which typing is to be initiated on a keydown event.\n *\n * @type {Set<number>}\n */\nconst KEY_DOWN_ELIGIBLE_KEY_CODES = new Set( [\n\tUP,\n\tRIGHT,\n\tDOWN,\n\tLEFT,\n\tENTER,\n\tBACKSPACE,\n] );\n\n/**\n * Returns true if a given keydown event can be inferred as intent to start\n * typing, or false otherwise. A keydown is considered eligible if it is a\n * text navigation without shift active.\n *\n * @param {KeyboardEvent} event Keydown event to test.\n *\n * @return {boolean} Whether event is eligible to start typing.\n */\nfunction isKeyDownEligibleForStartTyping( event ) {\n\tconst { keyCode, shiftKey } = event;\n\treturn ! shiftKey && KEY_DOWN_ELIGIBLE_KEY_CODES.has( keyCode );\n}\n\n/**\n * Removes the `isTyping` flag when the mouse moves in the document of the given\n * element.\n */\nexport function useMouseMoveTypingReset() {\n\tconst isTyping = useSelect(\n\t\t( select ) => select( blockEditorStore ).isTyping(),\n\t\t[]\n\t);\n\tconst { stopTyping } = useDispatch( blockEditorStore );\n\n\treturn useRefEffect(\n\t\t( node ) => {\n\t\t\tif ( ! isTyping ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst { ownerDocument } = node;\n\t\t\tlet lastClientX;\n\t\t\tlet lastClientY;\n\n\t\t\t/**\n\t\t\t * On mouse move, unset typing flag if user has moved cursor.\n\t\t\t *\n\t\t\t * @param {MouseEvent} event Mousemove event.\n\t\t\t */\n\t\t\tfunction stopTypingOnMouseMove( event ) {\n\t\t\t\tconst { clientX, clientY } = event;\n\n\t\t\t\t// We need to check that the mouse really moved because Safari\n\t\t\t\t// triggers mousemove events when shift or ctrl are pressed.\n\t\t\t\tif (\n\t\t\t\t\tlastClientX &&\n\t\t\t\t\tlastClientY &&\n\t\t\t\t\t( lastClientX !== clientX || lastClientY !== clientY )\n\t\t\t\t) {\n\t\t\t\t\tstopTyping();\n\t\t\t\t}\n\n\t\t\t\tlastClientX = clientX;\n\t\t\t\tlastClientY = clientY;\n\t\t\t}\n\n\t\t\townerDocument.addEventListener(\n\t\t\t\t'mousemove',\n\t\t\t\tstopTypingOnMouseMove\n\t\t\t);\n\n\t\t\treturn () => {\n\t\t\t\townerDocument.removeEventListener(\n\t\t\t\t\t'mousemove',\n\t\t\t\t\tstopTypingOnMouseMove\n\t\t\t\t);\n\t\t\t};\n\t\t},\n\t\t[ isTyping, stopTyping ]\n\t);\n}\n\n/**\n * Sets and removes the `isTyping` flag based on user actions:\n *\n * - Sets the flag if the user types within the given element.\n * - Removes the flag when the user selects some text, focusses a non-text\n * field, presses ESC or TAB, or moves the mouse in the document.\n */\nexport function useTypingObserver() {\n\tconst { isTyping } = useSelect( ( select ) => {\n\t\tconst { isTyping: _isTyping } = select( blockEditorStore );\n\t\treturn {\n\t\t\tisTyping: _isTyping(),\n\t\t};\n\t}, [] );\n\tconst { startTyping, stopTyping } = useDispatch( blockEditorStore );\n\n\tconst ref1 = useMouseMoveTypingReset();\n\tconst ref2 = useRefEffect(\n\t\t( node ) => {\n\t\t\tconst { ownerDocument } = node;\n\t\t\tconst { defaultView } = ownerDocument;\n\t\t\tconst selection = defaultView.getSelection();\n\n\t\t\t// Listeners to stop typing should only be added when typing.\n\t\t\t// Listeners to start typing should only be added when not typing.\n\t\t\tif ( isTyping ) {\n\t\t\t\tlet timerId;\n\n\t\t\t\t/**\n\t\t\t\t * Stops typing when focus transitions to a non-text field element.\n\t\t\t\t *\n\t\t\t\t * @param {FocusEvent} event Focus event.\n\t\t\t\t */\n\t\t\t\tfunction stopTypingOnNonTextField( event ) {\n\t\t\t\t\tconst { target } = event;\n\n\t\t\t\t\t// Since focus to a non-text field via arrow key will trigger\n\t\t\t\t\t// before the keydown event, wait until after current stack\n\t\t\t\t\t// before evaluating whether typing is to be stopped. Otherwise,\n\t\t\t\t\t// typing will re-start.\n\t\t\t\t\ttimerId = defaultView.setTimeout( () => {\n\t\t\t\t\t\tif ( ! isTextField( target ) ) {\n\t\t\t\t\t\t\tstopTyping();\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * Unsets typing flag if user presses Escape while typing flag is\n\t\t\t\t * active.\n\t\t\t\t *\n\t\t\t\t * @param {KeyboardEvent} event Keypress or keydown event to\n\t\t\t\t * interpret.\n\t\t\t\t */\n\t\t\t\tfunction stopTypingOnEscapeKey( event ) {\n\t\t\t\t\tconst { keyCode } = event;\n\n\t\t\t\t\tif ( keyCode === ESCAPE || keyCode === TAB ) {\n\t\t\t\t\t\tstopTyping();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * On selection change, unset typing flag if user has made an\n\t\t\t\t * uncollapsed (shift) selection.\n\t\t\t\t */\n\t\t\t\tfunction stopTypingOnSelectionUncollapse() {\n\t\t\t\t\tif ( ! selection.isCollapsed ) {\n\t\t\t\t\t\tstopTyping();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tnode.addEventListener( 'focus', stopTypingOnNonTextField );\n\t\t\t\tnode.addEventListener( 'keydown', stopTypingOnEscapeKey );\n\n\t\t\t\townerDocument.addEventListener(\n\t\t\t\t\t'selectionchange',\n\t\t\t\t\tstopTypingOnSelectionUncollapse\n\t\t\t\t);\n\n\t\t\t\treturn () => {\n\t\t\t\t\tdefaultView.clearTimeout( timerId );\n\t\t\t\t\tnode.removeEventListener(\n\t\t\t\t\t\t'focus',\n\t\t\t\t\t\tstopTypingOnNonTextField\n\t\t\t\t\t);\n\t\t\t\t\tnode.removeEventListener(\n\t\t\t\t\t\t'keydown',\n\t\t\t\t\t\tstopTypingOnEscapeKey\n\t\t\t\t\t);\n\t\t\t\t\townerDocument.removeEventListener(\n\t\t\t\t\t\t'selectionchange',\n\t\t\t\t\t\tstopTypingOnSelectionUncollapse\n\t\t\t\t\t);\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Handles a keypress or keydown event to infer intention to start\n\t\t\t * typing.\n\t\t\t *\n\t\t\t * @param {KeyboardEvent} event Keypress or keydown event to interpret.\n\t\t\t */\n\t\t\tfunction startTypingInTextField( event ) {\n\t\t\t\tconst { type, target } = event;\n\n\t\t\t\t// Abort early if already typing, or key press is incurred outside a\n\t\t\t\t// text field (e.g. arrow-ing through toolbar buttons).\n\t\t\t\t// Ignore typing if outside the current DOM container\n\t\t\t\tif ( ! isTextField( target ) || ! node.contains( target ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Special-case keydown because certain keys do not emit a keypress\n\t\t\t\t// event. Conversely avoid keydown as the canonical event since\n\t\t\t\t// there are many keydown which are explicitly not targeted for\n\t\t\t\t// typing.\n\t\t\t\tif (\n\t\t\t\t\ttype === 'keydown' &&\n\t\t\t\t\t! isKeyDownEligibleForStartTyping( event )\n\t\t\t\t) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tstartTyping();\n\t\t\t}\n\n\t\t\tnode.addEventListener( 'keypress', startTypingInTextField );\n\t\t\tnode.addEventListener( 'keydown', startTypingInTextField );\n\n\t\t\treturn () => {\n\t\t\t\tnode.removeEventListener( 'keypress', startTypingInTextField );\n\t\t\t\tnode.removeEventListener( 'keydown', startTypingInTextField );\n\t\t\t};\n\t\t},\n\t\t[ isTyping, startTyping, stopTyping ]\n\t);\n\n\treturn useMergeRefs( [ ref1, ref2 ] );\n}\n\nfunction ObserveTyping( { children } ) {\n\treturn <div ref={ useTypingObserver() }>{ children }</div>;\n}\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/observe-typing/README.md\n */\nexport default ObserveTyping;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,YAAY,EAAEC,YAAY,QAAQ,oBAAoB;AAC/D,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,WAAW,QAAQ,gBAAgB;AAC5C,SACCC,EAAE,EACFC,KAAK,EACLC,IAAI,EACJC,IAAI,EACJC,KAAK,EACLC,SAAS,EACTC,MAAM,EACNC,GAAG,QACG,qBAAqB;;AAE5B;AACA;AACA;AACA,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;;AAEvD;AACA;AACA;AACA;AACA;AAJA,SAAAC,GAAA,IAAAC,IAAA;AAKA,MAAMC,2BAA2B,GAAG,IAAIC,GAAG,CAAE,CAC5Cb,EAAE,EACFC,KA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AAE,SAAS,EAAEiB,sBAAuB,CAAC;IAC9D,CAAC;EACF,CAAC,EACD,CAAE5B,QAAQ,EAAEc,WAAW,EAAEZ,UAAU,CACpC,CAAC;EAED,OAAO1B,YAAY,CAAE,CAAEuC,IAAI,EAAEC,IAAI,CAAG,CAAC;AACtC;AAEA,SAASe,aAAaA,CAAE;EAAEC;AAAS,CAAC,EAAG;EACtC,oBAAOzC,IAAA;IAAK0C,GAAG,EAAGrB,iBAAiB,CAAC,CAAG;IAAAoB,QAAA,EAAGA;EAAQ,CAAO,CAAC;AAC3D;;AAEA;AACA;AACA;AACA,eAAeD,aAAa","ignoreList":[]}
1
+ {"version":3,"names":["useRefEffect","useMergeRefs","useSelect","useDispatch","isTextField","UP","RIGHT","DOWN","LEFT","ENTER","BACKSPACE","ESCAPE","TAB","store","blockEditorStore","jsx","_jsx","KEY_DOWN_ELIGIBLE_KEY_CODES","Set","isKeyDownEligibleForStartTyping","event","keyCode","shiftKey","has","useMouseMoveTypingReset","isTyping","select","stopTyping","node","ownerDocument","lastClientX","lastClientY","stopTypingOnMouseMove","clientX","clientY","addEventListener","removeEventListener","useTypingObserver","_isTyping","startTyping","ref1","ref2","defaultView","selection","getSelection","timerId","stopTypingOnNonTextField","target","setTimeout","stopTypingOnEscapeKey","stopTypingOnSelectionUncollapse","isCollapsed","clearTimeout","startTypingInTextField","type","contains","ObserveTyping","children","ref"],"sources":["@wordpress/block-editor/src/components/observe-typing/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useRefEffect, useMergeRefs } from '@wordpress/compose';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { isTextField } from '@wordpress/dom';\nimport {\n\tUP,\n\tRIGHT,\n\tDOWN,\n\tLEFT,\n\tENTER,\n\tBACKSPACE,\n\tESCAPE,\n\tTAB,\n} from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\n\n/**\n * Set of key codes upon which typing is to be initiated on a keydown event.\n *\n * @type {Set<number>}\n */\nconst KEY_DOWN_ELIGIBLE_KEY_CODES = new Set( [\n\tUP,\n\tRIGHT,\n\tDOWN,\n\tLEFT,\n\tENTER,\n\tBACKSPACE,\n] );\n\n/**\n * Returns true if a given keydown event can be inferred as intent to start\n * typing, or false otherwise. A keydown is considered eligible if it is a\n * text navigation without shift active.\n *\n * @param {KeyboardEvent} event Keydown event to test.\n *\n * @return {boolean} Whether event is eligible to start typing.\n */\nfunction isKeyDownEligibleForStartTyping( event ) {\n\tconst { keyCode, shiftKey } = event;\n\treturn ! shiftKey && KEY_DOWN_ELIGIBLE_KEY_CODES.has( keyCode );\n}\n\n/**\n * Removes the `isTyping` flag when the mouse moves in the document of the given\n * element.\n */\nexport function useMouseMoveTypingReset() {\n\tconst isTyping = useSelect(\n\t\t( select ) => select( blockEditorStore ).isTyping(),\n\t\t[]\n\t);\n\tconst { stopTyping } = useDispatch( blockEditorStore );\n\n\treturn useRefEffect(\n\t\t( node ) => {\n\t\t\tif ( ! isTyping ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst { ownerDocument } = node;\n\t\t\tlet lastClientX;\n\t\t\tlet lastClientY;\n\n\t\t\t/**\n\t\t\t * On mouse move, unset typing flag if user has moved cursor.\n\t\t\t *\n\t\t\t * @param {MouseEvent} event Mousemove event.\n\t\t\t */\n\t\t\tfunction stopTypingOnMouseMove( event ) {\n\t\t\t\tconst { clientX, clientY } = event;\n\n\t\t\t\t// We need to check that the mouse really moved because Safari\n\t\t\t\t// triggers mousemove events when shift or ctrl are pressed.\n\t\t\t\tif (\n\t\t\t\t\tlastClientX &&\n\t\t\t\t\tlastClientY &&\n\t\t\t\t\t( lastClientX !== clientX || lastClientY !== clientY )\n\t\t\t\t) {\n\t\t\t\t\tstopTyping();\n\t\t\t\t}\n\n\t\t\t\tlastClientX = clientX;\n\t\t\t\tlastClientY = clientY;\n\t\t\t}\n\n\t\t\townerDocument.addEventListener(\n\t\t\t\t'mousemove',\n\t\t\t\tstopTypingOnMouseMove\n\t\t\t);\n\n\t\t\treturn () => {\n\t\t\t\townerDocument.removeEventListener(\n\t\t\t\t\t'mousemove',\n\t\t\t\t\tstopTypingOnMouseMove\n\t\t\t\t);\n\t\t\t};\n\t\t},\n\t\t[ isTyping, stopTyping ]\n\t);\n}\n\n/**\n * Sets and removes the `isTyping` flag based on user actions:\n *\n * - Sets the flag if the user types within the given element.\n * - Removes the flag when the user selects some text, focusses a non-text\n * field, presses ESC or TAB, or moves the mouse in the document.\n */\nexport function useTypingObserver() {\n\tconst { isTyping } = useSelect( ( select ) => {\n\t\tconst { isTyping: _isTyping } = select( blockEditorStore );\n\t\treturn {\n\t\t\tisTyping: _isTyping(),\n\t\t};\n\t}, [] );\n\tconst { startTyping, stopTyping } = useDispatch( blockEditorStore );\n\n\tconst ref1 = useMouseMoveTypingReset();\n\tconst ref2 = useRefEffect(\n\t\t( node ) => {\n\t\t\tconst { ownerDocument } = node;\n\t\t\tconst { defaultView } = ownerDocument;\n\t\t\tconst selection = defaultView.getSelection();\n\n\t\t\t// Listeners to stop typing should only be added when typing.\n\t\t\t// Listeners to start typing should only be added when not typing.\n\t\t\tif ( isTyping ) {\n\t\t\t\tlet timerId;\n\n\t\t\t\t/**\n\t\t\t\t * Stops typing when focus transitions to a non-text field element.\n\t\t\t\t *\n\t\t\t\t * @param {FocusEvent} event Focus event.\n\t\t\t\t */\n\t\t\t\tfunction stopTypingOnNonTextField( event ) {\n\t\t\t\t\tconst { target } = event;\n\n\t\t\t\t\t// Since focus to a non-text field via arrow key will trigger\n\t\t\t\t\t// before the keydown event, wait until after current stack\n\t\t\t\t\t// before evaluating whether typing is to be stopped. Otherwise,\n\t\t\t\t\t// typing will re-start.\n\t\t\t\t\ttimerId = defaultView.setTimeout( () => {\n\t\t\t\t\t\tif ( ! isTextField( target ) ) {\n\t\t\t\t\t\t\tstopTyping();\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * Unsets typing flag if user presses Escape while typing flag is\n\t\t\t\t * active.\n\t\t\t\t *\n\t\t\t\t * @param {KeyboardEvent} event Keypress or keydown event to\n\t\t\t\t * interpret.\n\t\t\t\t */\n\t\t\t\tfunction stopTypingOnEscapeKey( event ) {\n\t\t\t\t\tconst { keyCode } = event;\n\n\t\t\t\t\tif ( keyCode === ESCAPE || keyCode === TAB ) {\n\t\t\t\t\t\tstopTyping();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * On selection change, unset typing flag if user has made an\n\t\t\t\t * uncollapsed (shift) selection.\n\t\t\t\t */\n\t\t\t\tfunction stopTypingOnSelectionUncollapse() {\n\t\t\t\t\tif ( ! selection.isCollapsed ) {\n\t\t\t\t\t\tstopTyping();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tnode.addEventListener( 'focus', stopTypingOnNonTextField );\n\t\t\t\tnode.addEventListener( 'keydown', stopTypingOnEscapeKey );\n\n\t\t\t\townerDocument.addEventListener(\n\t\t\t\t\t'selectionchange',\n\t\t\t\t\tstopTypingOnSelectionUncollapse\n\t\t\t\t);\n\n\t\t\t\treturn () => {\n\t\t\t\t\tdefaultView.clearTimeout( timerId );\n\t\t\t\t\tnode.removeEventListener(\n\t\t\t\t\t\t'focus',\n\t\t\t\t\t\tstopTypingOnNonTextField\n\t\t\t\t\t);\n\t\t\t\t\tnode.removeEventListener(\n\t\t\t\t\t\t'keydown',\n\t\t\t\t\t\tstopTypingOnEscapeKey\n\t\t\t\t\t);\n\t\t\t\t\townerDocument.removeEventListener(\n\t\t\t\t\t\t'selectionchange',\n\t\t\t\t\t\tstopTypingOnSelectionUncollapse\n\t\t\t\t\t);\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Handles a keypress or keydown event to infer intention to start\n\t\t\t * typing.\n\t\t\t *\n\t\t\t * @param {KeyboardEvent} event Keypress or keydown event to interpret.\n\t\t\t */\n\t\t\tfunction startTypingInTextField( event ) {\n\t\t\t\tconst { type, target } = event;\n\n\t\t\t\t// Abort early if already typing, or key press is incurred outside a\n\t\t\t\t// text field (e.g. arrow-ing through toolbar buttons).\n\t\t\t\t// Ignore typing if outside the current DOM container\n\t\t\t\tif ( ! isTextField( target ) || ! node.contains( target ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Special-case keydown because certain keys do not emit a keypress\n\t\t\t\t// event. Conversely avoid keydown as the canonical event since\n\t\t\t\t// there are many keydown which are explicitly not targeted for\n\t\t\t\t// typing.\n\t\t\t\tif (\n\t\t\t\t\ttype === 'keydown' &&\n\t\t\t\t\t! isKeyDownEligibleForStartTyping( event )\n\t\t\t\t) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tstartTyping();\n\t\t\t}\n\n\t\t\tnode.addEventListener( 'keypress', startTypingInTextField );\n\t\t\tnode.addEventListener( 'keydown', startTypingInTextField );\n\n\t\t\treturn () => {\n\t\t\t\tnode.removeEventListener( 'keypress', startTypingInTextField );\n\t\t\t\tnode.removeEventListener( 'keydown', startTypingInTextField );\n\t\t\t};\n\t\t},\n\t\t[ isTyping, startTyping, stopTyping ]\n\t);\n\n\treturn useMergeRefs( [ ref1, ref2 ] );\n}\n\nfunction ObserveTyping( { children } ) {\n\treturn <div ref={ useTypingObserver() }>{ children }</div>;\n}\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/observe-typing/README.md\n */\nexport default ObserveTyping;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,YAAY,EAAEC,YAAY,QAAQ,oBAAoB;AAC/D,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,WAAW,QAAQ,gBAAgB;AAC5C,SACCC,EAAE,EACFC,KAAK,EACLC,IAAI,EACJC,IAAI,EACJC,KAAK,EACLC,SAAS,EACTC,MAAM,EACNC,GAAG,QACG,qBAAqB;;AAE5B;AACA;AACA;AACA,SAASC,K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CAACO,gBAAgB,CAAE,SAAS,EAAEkB,sBAAuB,CAAC;IAE1D,OAAO,MAAM;MACZzB,IAAI,CAACQ,mBAAmB,CAAE,UAAU,EAAEiB,sBAAuB,CAAC;MAC9DzB,IAAI,CAACQ,mBAAmB,CAAE,SAAS,EAAEiB,sBAAuB,CAAC;IAC9D,CAAC;EACF,CAAC,EACD,CAAE5B,QAAQ,EAAEc,WAAW,EAAEZ,UAAU,CACpC,CAAC;EAED,OAAO1B,YAAY,CAAE,CAAEuC,IAAI,EAAEC,IAAI,CAAG,CAAC;AACtC;AAEA,SAASe,aAAaA,CAAE;EAAEC;AAAS,CAAC,EAAG;EACtC,oBAAOzC,IAAA;IAAK0C,GAAG,EAAGrB,iBAAiB,CAAC,CAAG;IAAAoB,QAAA,EAAGA;EAAQ,CAAO,CAAC;AAC3D;;AAEA;AACA;AACA;AACA,eAAeD,aAAa","ignoreList":[]}
@@ -16,8 +16,7 @@ import { unlock } from '../../lock-unlock';
16
16
  import KeyboardShortcuts from '../keyboard-shortcuts';
17
17
 
18
18
  /** @typedef {import('@wordpress/data').WPDataRegistry} WPDataRegistry */
19
- import { jsx as _jsx } from "react/jsx-runtime";
20
- import { jsxs as _jsxs } from "react/jsx-runtime";
19
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
21
20
  export const ExperimentalBlockEditorProvider = withRegistryProvider(props => {
22
21
  const {
23
22
  children,
@@ -41,7 +40,7 @@ export const ExperimentalBlockEditorProvider = withRegistryProvider(props => {
41
40
  useBlockSync(props);
42
41
  return /*#__PURE__*/_jsxs(SlotFillProvider, {
43
42
  passthrough: true,
44
- children: [!settings?.__unstableIsPreviewMode && /*#__PURE__*/_jsx(KeyboardShortcuts.Register, {}), /*#__PURE__*/_jsx(BlockRefsProvider, {
43
+ children: [!settings?.isPreviewMode && /*#__PURE__*/_jsx(KeyboardShortcuts.Register, {}), /*#__PURE__*/_jsx(BlockRefsProvider, {
45
44
  children: children
46
45
  })]
47
46
  });
@@ -1 +1 @@
1
- {"version":3,"names":["useDispatch","useEffect","SlotFillProvider","withRegistryProvider","useBlockSync","store","blockEditorStore","BlockRefsProvider","unlock","KeyboardShortcuts","jsx","_jsx","jsxs","_jsxs","ExperimentalBlockEditorProvider","props","children","settings","stripExperimentalSettings","__experimentalUpdateSettings","__internalIsInitialized","reset","passthrough","__unstableIsPreviewMode","Register","BlockEditorProvider"],"sources":["@wordpress/block-editor/src/components/provider/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useDispatch } from '@wordpress/data';\nimport { useEffect } from '@wordpress/element';\nimport { SlotFillProvider } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport withRegistryProvider from './with-registry-provider';\nimport useBlockSync from './use-block-sync';\nimport { store as blockEditorStore } from '../../store';\nimport { BlockRefsProvider } from './block-refs-provider';\nimport { unlock } from '../../lock-unlock';\nimport KeyboardShortcuts from '../keyboard-shortcuts';\n\n/** @typedef {import('@wordpress/data').WPDataRegistry} WPDataRegistry */\n\nexport const ExperimentalBlockEditorProvider = withRegistryProvider(\n\t( props ) => {\n\t\tconst { children, settings, stripExperimentalSettings = false } = props;\n\n\t\tconst { __experimentalUpdateSettings } = unlock(\n\t\t\tuseDispatch( blockEditorStore )\n\t\t);\n\t\tuseEffect( () => {\n\t\t\t__experimentalUpdateSettings(\n\t\t\t\t{\n\t\t\t\t\t...settings,\n\t\t\t\t\t__internalIsInitialized: true,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tstripExperimentalSettings,\n\t\t\t\t\treset: true,\n\t\t\t\t}\n\t\t\t);\n\t\t}, [\n\t\t\tsettings,\n\t\t\tstripExperimentalSettings,\n\t\t\t__experimentalUpdateSettings,\n\t\t] );\n\n\t\t// Syncs the entity provider with changes in the block-editor store.\n\t\tuseBlockSync( props );\n\n\t\treturn (\n\t\t\t<SlotFillProvider passthrough>\n\t\t\t\t{ ! settings?.__unstableIsPreviewMode && (\n\t\t\t\t\t<KeyboardShortcuts.Register />\n\t\t\t\t) }\n\t\t\t\t<BlockRefsProvider>{ children }</BlockRefsProvider>\n\t\t\t</SlotFillProvider>\n\t\t);\n\t}\n);\n\nexport const BlockEditorProvider = ( props ) => {\n\treturn (\n\t\t<ExperimentalBlockEditorProvider { ...props } stripExperimentalSettings>\n\t\t\t{ props.children }\n\t\t</ExperimentalBlockEditorProvider>\n\t);\n};\n\nexport default BlockEditorProvider;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,WAAW,QAAQ,iBAAiB;AAC7C,SAASC,SAAS,QAAQ,oBAAoB;AAC9C,SAASC,gBAAgB,QAAQ,uBAAuB;;AAExD;AACA;AACA;AACA,OAAOC,oBAAoB,MAAM,0BAA0B;AAC3D,OAAOC,YAAY,MAAM,kBAAkB;AAC3C,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;AACvD,SAASC,iBAAiB,QAAQ,uBAAuB;AACzD,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,OAAOC,iBAAiB,MAAM,uBAAuB;;AAErD;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAEA,OAAO,MAAMC,+BAA+B,GAAGX,oBAAoB,CAChEY,KAAK,IAAM;EACZ,MAAM;IAAEC,QAAQ;IAAEC,QAAQ;IAAEC,yBAAyB,GAAG;EAAM,CAAC,GAAGH,KAAK;EAEvE,MAAM;IAAEI;EAA6B,CAAC,GAAGX,MAAM,CAC9CR,WAAW,CAAEM,gBAAiB,CAC/B,CAAC;EACDL,SAAS,CAAE,MAAM;IAChBkB,4BAA4B,CAC3B;MACC,GAAGF,QAAQ;MACXG,uBAAuB,EAAE;IAC1B,CAAC,EACD;MACCF,yBAAyB;MACzBG,KAAK,EAAE;IACR,CACD,CAAC;EACF,CAAC,EAAE,CACFJ,QAAQ,EACRC,yBAAyB,EACzBC,4BAA4B,CAC3B,CAAC;;EAEH;EACAf,YAAY,CAAEW,KAAM,CAAC;EAErB,oBACCF,KAAA,CAACX,gBAAgB;IAACoB,WAAW;IAAAN,QAAA,GAC1B,CAAEC,QAAQ,EAAEM,uBAAuB,iBACpCZ,IAAA,CAACF,iBAAiB,CAACe,QAAQ,IAAE,CAC7B,eACDb,IAAA,CAACJ,iBAAiB;MAAAS,QAAA,EAAGA;IAAQ,CAAqB,CAAC;EAAA,CAClC,CAAC;AAErB,CACD,CAAC;AAED,OAAO,MAAMS,mBAAmB,GAAKV,KAAK,IAAM;EAC/C,oBACCJ,IAAA,CAACG,+BAA+B;IAAA,GAAMC,KAAK;IAAGG,yBAAyB;IAAAF,QAAA,EACpED,KAAK,CAACC;EAAQ,CACgB,CAAC;AAEpC,CAAC;AAED,eAAeS,mBAAmB","ignoreList":[]}
1
+ {"version":3,"names":["useDispatch","useEffect","SlotFillProvider","withRegistryProvider","useBlockSync","store","blockEditorStore","BlockRefsProvider","unlock","KeyboardShortcuts","jsx","_jsx","jsxs","_jsxs","ExperimentalBlockEditorProvider","props","children","settings","stripExperimentalSettings","__experimentalUpdateSettings","__internalIsInitialized","reset","passthrough","isPreviewMode","Register","BlockEditorProvider"],"sources":["@wordpress/block-editor/src/components/provider/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useDispatch } from '@wordpress/data';\nimport { useEffect } from '@wordpress/element';\nimport { SlotFillProvider } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport withRegistryProvider from './with-registry-provider';\nimport useBlockSync from './use-block-sync';\nimport { store as blockEditorStore } from '../../store';\nimport { BlockRefsProvider } from './block-refs-provider';\nimport { unlock } from '../../lock-unlock';\nimport KeyboardShortcuts from '../keyboard-shortcuts';\n\n/** @typedef {import('@wordpress/data').WPDataRegistry} WPDataRegistry */\n\nexport const ExperimentalBlockEditorProvider = withRegistryProvider(\n\t( props ) => {\n\t\tconst { children, settings, stripExperimentalSettings = false } = props;\n\n\t\tconst { __experimentalUpdateSettings } = unlock(\n\t\t\tuseDispatch( blockEditorStore )\n\t\t);\n\t\tuseEffect( () => {\n\t\t\t__experimentalUpdateSettings(\n\t\t\t\t{\n\t\t\t\t\t...settings,\n\t\t\t\t\t__internalIsInitialized: true,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tstripExperimentalSettings,\n\t\t\t\t\treset: true,\n\t\t\t\t}\n\t\t\t);\n\t\t}, [\n\t\t\tsettings,\n\t\t\tstripExperimentalSettings,\n\t\t\t__experimentalUpdateSettings,\n\t\t] );\n\n\t\t// Syncs the entity provider with changes in the block-editor store.\n\t\tuseBlockSync( props );\n\n\t\treturn (\n\t\t\t<SlotFillProvider passthrough>\n\t\t\t\t{ ! settings?.isPreviewMode && <KeyboardShortcuts.Register /> }\n\t\t\t\t<BlockRefsProvider>{ children }</BlockRefsProvider>\n\t\t\t</SlotFillProvider>\n\t\t);\n\t}\n);\n\nexport const BlockEditorProvider = ( props ) => {\n\treturn (\n\t\t<ExperimentalBlockEditorProvider { ...props } stripExperimentalSettings>\n\t\t\t{ props.children }\n\t\t</ExperimentalBlockEditorProvider>\n\t);\n};\n\nexport default BlockEditorProvider;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,WAAW,QAAQ,iBAAiB;AAC7C,SAASC,SAAS,QAAQ,oBAAoB;AAC9C,SAASC,gBAAgB,QAAQ,uBAAuB;;AAExD;AACA;AACA;AACA,OAAOC,oBAAoB,MAAM,0BAA0B;AAC3D,OAAOC,YAAY,MAAM,kBAAkB;AAC3C,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;AACvD,SAASC,iBAAiB,QAAQ,uBAAuB;AACzD,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,OAAOC,iBAAiB,MAAM,uBAAuB;;AAErD;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAEA,OAAO,MAAMC,+BAA+B,GAAGX,oBAAoB,CAChEY,KAAK,IAAM;EACZ,MAAM;IAAEC,QAAQ;IAAEC,QAAQ;IAAEC,yBAAyB,GAAG;EAAM,CAAC,GAAGH,KAAK;EAEvE,MAAM;IAAEI;EAA6B,CAAC,GAAGX,MAAM,CAC9CR,WAAW,CAAEM,gBAAiB,CAC/B,CAAC;EACDL,SAAS,CAAE,MAAM;IAChBkB,4BAA4B,CAC3B;MACC,GAAGF,QAAQ;MACXG,uBAAuB,EAAE;IAC1B,CAAC,EACD;MACCF,yBAAyB;MACzBG,KAAK,EAAE;IACR,CACD,CAAC;EACF,CAAC,EAAE,CACFJ,QAAQ,EACRC,yBAAyB,EACzBC,4BAA4B,CAC3B,CAAC;;EAEH;EACAf,YAAY,CAAEW,KAAM,CAAC;EAErB,oBACCF,KAAA,CAACX,gBAAgB;IAACoB,WAAW;IAAAN,QAAA,GAC1B,CAAEC,QAAQ,EAAEM,aAAa,iBAAIZ,IAAA,CAACF,iBAAiB,CAACe,QAAQ,IAAE,CAAC,eAC7Db,IAAA,CAACJ,iBAAiB;MAAAS,QAAA,EAAGA;IAAQ,CAAqB,CAAC;EAAA,CAClC,CAAC;AAErB,CACD,CAAC;AAED,OAAO,MAAMS,mBAAmB,GAAKV,KAAK,IAAM;EAC/C,oBACCJ,IAAA,CAACG,+BAA+B;IAAA,GAAMC,KAAK;IAAGG,yBAAyB;IAAAF,QAAA,EACpED,KAAK,CAACC;EAAQ,CACgB,CAAC;AAEpC,CAAC;AAED,eAAeS,mBAAmB","ignoreList":[]}
@@ -10,8 +10,7 @@ import { getSettings } from '@wordpress/date';
10
10
  * Internal dependencies
11
11
  */
12
12
  import InspectorPopoverHeader from '../inspector-popover-header';
13
- import { jsx as _jsx } from "react/jsx-runtime";
14
- import { jsxs as _jsxs } from "react/jsx-runtime";
13
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
15
14
  export function PublishDateTimePicker({
16
15
  onClose,
17
16
  onChange,
@@ -1 +1 @@
1
- {"version":3,"names":["DateTimePicker","TimePicker","__","forwardRef","getSettings","InspectorPopoverHeader","jsx","_jsx","jsxs","_jsxs","PublishDateTimePicker","onClose","onChange","showPopoverHeaderActions","isCompact","currentDate","additionalProps","ref","datePickerProps","startOfWeek","l10n","undefined","currentTime","DatePickerComponent","className","children","title","actions","label","onClick","PrivatePublishDateTimePicker","PublicPublishDateTimePicker","props"],"sources":["@wordpress/block-editor/src/components/publish-date-time-picker/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { DateTimePicker, TimePicker } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { forwardRef } from '@wordpress/element';\nimport { getSettings } from '@wordpress/date';\n\n/**\n * Internal dependencies\n */\nimport InspectorPopoverHeader from '../inspector-popover-header';\n\nexport function PublishDateTimePicker(\n\t{\n\t\tonClose,\n\t\tonChange,\n\t\tshowPopoverHeaderActions,\n\t\tisCompact,\n\t\tcurrentDate,\n\t\t...additionalProps\n\t},\n\tref\n) {\n\tconst datePickerProps = {\n\t\tstartOfWeek: getSettings().l10n.startOfWeek,\n\t\tonChange,\n\t\tcurrentDate: isCompact ? undefined : currentDate,\n\t\tcurrentTime: isCompact ? currentDate : undefined,\n\t\t...additionalProps,\n\t};\n\tconst DatePickerComponent = isCompact ? TimePicker : DateTimePicker;\n\treturn (\n\t\t<div ref={ ref } className=\"block-editor-publish-date-time-picker\">\n\t\t\t<InspectorPopoverHeader\n\t\t\t\ttitle={ __( 'Publish' ) }\n\t\t\t\tactions={\n\t\t\t\t\tshowPopoverHeaderActions\n\t\t\t\t\t\t? [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tlabel: __( 'Now' ),\n\t\t\t\t\t\t\t\t\tonClick: () => onChange?.( null ),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t ]\n\t\t\t\t\t\t: undefined\n\t\t\t\t}\n\t\t\t\tonClose={ onClose }\n\t\t\t/>\n\t\t\t<DatePickerComponent { ...datePickerProps } />\n\t\t</div>\n\t);\n}\n\nexport const PrivatePublishDateTimePicker = forwardRef( PublishDateTimePicker );\n\nfunction PublicPublishDateTimePicker( props, ref ) {\n\treturn (\n\t\t<PrivatePublishDateTimePicker\n\t\t\t{ ...props }\n\t\t\tshowPopoverHeaderActions\n\t\t\tisCompact={ false }\n\t\t\tref={ ref }\n\t\t/>\n\t);\n}\n\nexport default forwardRef( PublicPublishDateTimePicker );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,cAAc,EAAEC,UAAU,QAAQ,uBAAuB;AAClE,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,UAAU,QAAQ,oBAAoB;AAC/C,SAASC,WAAW,QAAQ,iBAAiB;;AAE7C;AACA;AACA;AACA,OAAOC,sBAAsB,MAAM,6BAA6B;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAEjE,OAAO,SAASC,qBAAqBA,CACpC;EACCC,OAAO;EACPC,QAAQ;EACRC,wBAAwB;EACxBC,SAAS;EACTC,WAAW;EACX,GAAGC;AACJ,CAAC,EACDC,GAAG,EACF;EACD,MAAMC,eAAe,GAAG;IACvBC,WAAW,EAAEf,WAAW,CAAC,CAAC,CAACgB,IAAI,CAACD,WAAW;IAC3CP,QAAQ;IACRG,WAAW,EAAED,SAAS,GAAGO,SAAS,GAAGN,WAAW;IAChDO,WAAW,EAAER,SAAS,GAAGC,WAAW,GAAGM,SAAS;IAChD,GAAGL;EACJ,CAAC;EACD,MAAMO,mBAAmB,GAAGT,SAAS,GAAGb,UAAU,GAAGD,cAAc;EACnE,oBACCS,KAAA;IAAKQ,GAAG,EAAGA,GAAK;IAACO,SAAS,EAAC,uCAAuC;IAAAC,QAAA,gBACjElB,IAAA,CAACF,sBAAsB;MACtBqB,KAAK,EAAGxB,EAAE,CAAE,SAAU,CAAG;MACzByB,OAAO,EACNd,wBAAwB,GACrB,CACA;QACCe,KAAK,EAAE1B,EAAE,CAAE,KAAM,CAAC;QAClB2B,OAAO,EAAEA,CAAA,KAAMjB,QAAQ,GAAI,IAAK;MACjC,CAAC,CACA,GACDS,SACH;MACDV,OAAO,EAAGA;IAAS,CACnB,CAAC,eACFJ,IAAA,CAACgB,mBAAmB;MAAA,GAAML;IAAe,CAAI,CAAC;EAAA,CAC1C,CAAC;AAER;AAEA,OAAO,MAAMY,4BAA4B,GAAG3B,UAAU,CAAEO,qBAAsB,CAAC;AAE/E,SAASqB,2BAA2BA,CAAEC,KAAK,EAAEf,GAAG,EAAG;EAClD,oBACCV,IAAA,CAACuB,4BAA4B;IAAA,GACvBE,KAAK;IACVnB,wBAAwB;IACxBC,SAAS,EAAG,KAAO;IACnBG,GAAG,EAAGA;EAAK,CACX,CAAC;AAEJ;AAEA,eAAed,UAAU,CAAE4B,2BAA4B,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["DateTimePicker","TimePicker","__","forwardRef","getSettings","InspectorPopoverHeader","jsx","_jsx","jsxs","_jsxs","PublishDateTimePicker","onClose","onChange","showPopoverHeaderActions","isCompact","currentDate","additionalProps","ref","datePickerProps","startOfWeek","l10n","undefined","currentTime","DatePickerComponent","className","children","title","actions","label","onClick","PrivatePublishDateTimePicker","PublicPublishDateTimePicker","props"],"sources":["@wordpress/block-editor/src/components/publish-date-time-picker/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { DateTimePicker, TimePicker } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { forwardRef } from '@wordpress/element';\nimport { getSettings } from '@wordpress/date';\n\n/**\n * Internal dependencies\n */\nimport InspectorPopoverHeader from '../inspector-popover-header';\n\nexport function PublishDateTimePicker(\n\t{\n\t\tonClose,\n\t\tonChange,\n\t\tshowPopoverHeaderActions,\n\t\tisCompact,\n\t\tcurrentDate,\n\t\t...additionalProps\n\t},\n\tref\n) {\n\tconst datePickerProps = {\n\t\tstartOfWeek: getSettings().l10n.startOfWeek,\n\t\tonChange,\n\t\tcurrentDate: isCompact ? undefined : currentDate,\n\t\tcurrentTime: isCompact ? currentDate : undefined,\n\t\t...additionalProps,\n\t};\n\tconst DatePickerComponent = isCompact ? TimePicker : DateTimePicker;\n\treturn (\n\t\t<div ref={ ref } className=\"block-editor-publish-date-time-picker\">\n\t\t\t<InspectorPopoverHeader\n\t\t\t\ttitle={ __( 'Publish' ) }\n\t\t\t\tactions={\n\t\t\t\t\tshowPopoverHeaderActions\n\t\t\t\t\t\t? [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tlabel: __( 'Now' ),\n\t\t\t\t\t\t\t\t\tonClick: () => onChange?.( null ),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t ]\n\t\t\t\t\t\t: undefined\n\t\t\t\t}\n\t\t\t\tonClose={ onClose }\n\t\t\t/>\n\t\t\t<DatePickerComponent { ...datePickerProps } />\n\t\t</div>\n\t);\n}\n\nexport const PrivatePublishDateTimePicker = forwardRef( PublishDateTimePicker );\n\nfunction PublicPublishDateTimePicker( props, ref ) {\n\treturn (\n\t\t<PrivatePublishDateTimePicker\n\t\t\t{ ...props }\n\t\t\tshowPopoverHeaderActions\n\t\t\tisCompact={ false }\n\t\t\tref={ ref }\n\t\t/>\n\t);\n}\n\nexport default forwardRef( PublicPublishDateTimePicker );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,cAAc,EAAEC,UAAU,QAAQ,uBAAuB;AAClE,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,UAAU,QAAQ,oBAAoB;AAC/C,SAASC,WAAW,QAAQ,iBAAiB;;AAE7C;AACA;AACA;AACA,OAAOC,sBAAsB,MAAM,6BAA6B;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAEjE,OAAO,SAASC,qBAAqBA,CACpC;EACCC,OAAO;EACPC,QAAQ;EACRC,wBAAwB;EACxBC,SAAS;EACTC,WAAW;EACX,GAAGC;AACJ,CAAC,EACDC,GAAG,EACF;EACD,MAAMC,eAAe,GAAG;IACvBC,WAAW,EAAEf,WAAW,CAAC,CAAC,CAACgB,IAAI,CAACD,WAAW;IAC3CP,QAAQ;IACRG,WAAW,EAAED,SAAS,GAAGO,SAAS,GAAGN,WAAW;IAChDO,WAAW,EAAER,SAAS,GAAGC,WAAW,GAAGM,SAAS;IAChD,GAAGL;EACJ,CAAC;EACD,MAAMO,mBAAmB,GAAGT,SAAS,GAAGb,UAAU,GAAGD,cAAc;EACnE,oBACCS,KAAA;IAAKQ,GAAG,EAAGA,GAAK;IAACO,SAAS,EAAC,uCAAuC;IAAAC,QAAA,gBACjElB,IAAA,CAACF,sBAAsB;MACtBqB,KAAK,EAAGxB,EAAE,CAAE,SAAU,CAAG;MACzByB,OAAO,EACNd,wBAAwB,GACrB,CACA;QACCe,KAAK,EAAE1B,EAAE,CAAE,KAAM,CAAC;QAClB2B,OAAO,EAAEA,CAAA,KAAMjB,QAAQ,GAAI,IAAK;MACjC,CAAC,CACA,GACDS,SACH;MACDV,OAAO,EAAGA;IAAS,CACnB,CAAC,eACFJ,IAAA,CAACgB,mBAAmB;MAAA,GAAML;IAAe,CAAI,CAAC;EAAA,CAC1C,CAAC;AAER;AAEA,OAAO,MAAMY,4BAA4B,GAAG3B,UAAU,CAAEO,qBAAsB,CAAC;AAE/E,SAASqB,2BAA2BA,CAAEC,KAAK,EAAEf,GAAG,EAAG;EAClD,oBACCV,IAAA,CAACuB,4BAA4B;IAAA,GACvBE,KAAK;IACVnB,wBAAwB;IACxBC,SAAS,EAAG,KAAO;IACnBG,GAAG,EAAGA;EAAK,CACX,CAAC;AAEJ;AAEA,eAAed,UAAU,CAAE4B,2BAA4B,CAAC","ignoreList":[]}
@@ -1,3 +1,4 @@
1
+ /* wp:polyfill */
1
2
  /**
2
3
  * WordPress dependencies
3
4
  */
@@ -1 +1 @@
1
- {"version":3,"names":["createContext","useContext","useMemo","deprecated","useBlockEditContext","jsx","_jsx","RenderedRefsContext","addToBlockType","renderedBlocks","blockName","uniqueId","result","Set","add","RecursionProvider","children","previouslyRenderedBlocks","name","newRenderedBlocks","Provider","value","useHasRecursion","Boolean","has","DeprecatedExperimentalRecursionProvider","props","since","alternative","DeprecatedExperimentalUseHasRecursion","args"],"sources":["@wordpress/block-editor/src/components/recursion-provider/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createContext, useContext, useMemo } from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport { useBlockEditContext } from '../block-edit/context';\n\nconst RenderedRefsContext = createContext( {} );\n\n/**\n * Immutably adds an unique identifier to a set scoped for a given block type.\n *\n * @param {Object} renderedBlocks Rendered blocks grouped by block name\n * @param {string} blockName Name of the block.\n * @param {*} uniqueId Any value that acts as a unique identifier for a block instance.\n *\n * @return {Object} The list of rendered blocks grouped by block name.\n */\nfunction addToBlockType( renderedBlocks, blockName, uniqueId ) {\n\tconst result = {\n\t\t...renderedBlocks,\n\t\t[ blockName ]: renderedBlocks[ blockName ]\n\t\t\t? new Set( renderedBlocks[ blockName ] )\n\t\t\t: new Set(),\n\t};\n\tresult[ blockName ].add( uniqueId );\n\n\treturn result;\n}\n\n/**\n * A React context provider for use with the `useHasRecursion` hook to prevent recursive\n * renders.\n *\n * Wrap block content with this provider and provide the same `uniqueId` prop as used\n * with `useHasRecursion`.\n *\n * @param {Object} props\n * @param {*} props.uniqueId Any value that acts as a unique identifier for a block instance.\n * @param {string} props.blockName Optional block name.\n * @param {JSX.Element} props.children React children.\n *\n * @return {JSX.Element} A React element.\n */\nexport function RecursionProvider( { children, uniqueId, blockName = '' } ) {\n\tconst previouslyRenderedBlocks = useContext( RenderedRefsContext );\n\tconst { name } = useBlockEditContext();\n\n\tblockName = blockName || name;\n\n\tconst newRenderedBlocks = useMemo(\n\t\t() => addToBlockType( previouslyRenderedBlocks, blockName, uniqueId ),\n\t\t[ previouslyRenderedBlocks, blockName, uniqueId ]\n\t);\n\n\treturn (\n\t\t<RenderedRefsContext.Provider value={ newRenderedBlocks }>\n\t\t\t{ children }\n\t\t</RenderedRefsContext.Provider>\n\t);\n}\n\n/**\n * A React hook for keeping track of blocks previously rendered up in the block\n * tree. Blocks susceptible to recursion can use this hook in their `Edit`\n * function to prevent said recursion.\n *\n * Use this with the `RecursionProvider` component, using the same `uniqueId` value\n * for both the hook and the provider.\n *\n * @param {*} uniqueId Any value that acts as a unique identifier for a block instance.\n * @param {string} blockName Optional block name.\n *\n * @return {boolean} A boolean describing whether the provided id has already been rendered.\n */\nexport function useHasRecursion( uniqueId, blockName = '' ) {\n\tconst previouslyRenderedBlocks = useContext( RenderedRefsContext );\n\tconst { name } = useBlockEditContext();\n\tblockName = blockName || name;\n\treturn Boolean( previouslyRenderedBlocks[ blockName ]?.has( uniqueId ) );\n}\n\nexport const DeprecatedExperimentalRecursionProvider = ( props ) => {\n\tdeprecated( 'wp.blockEditor.__experimentalRecursionProvider', {\n\t\tsince: '6.5',\n\t\talternative: 'wp.blockEditor.RecursionProvider',\n\t} );\n\treturn <RecursionProvider { ...props } />;\n};\n\nexport const DeprecatedExperimentalUseHasRecursion = ( ...args ) => {\n\tdeprecated( 'wp.blockEditor.__experimentalUseHasRecursion', {\n\t\tsince: '6.5',\n\t\talternative: 'wp.blockEditor.useHasRecursion',\n\t} );\n\treturn useHasRecursion( ...args );\n};\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,aAAa,EAAEC,UAAU,EAAEC,OAAO,QAAQ,oBAAoB;AACvE,OAAOC,UAAU,MAAM,uBAAuB;;AAE9C;AACA;AACA;AACA,SAASC,mBAAmB,QAAQ,uBAAuB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE5D,MAAMC,mBAAmB,GAAGP,aAAa,CAAE,CAAC,CAAE,CAAC;;AAE/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASQ,cAAcA,CAAEC,cAAc,EAAEC,SAAS,EAAEC,QAAQ,EAAG;EAC9D,MAAMC,MAAM,GAAG;IACd,GAAGH,cAAc;IACjB,CAAEC,SAAS,GAAID,cAAc,CAAEC,SAAS,CAAE,GACvC,IAAIG,GAAG,CAAEJ,cAAc,CAAEC,SAAS,CAAG,CAAC,GACtC,IAAIG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,WAAW,EAAE;EACd,CAAE,CAAC;EACH,oBAAOtB,IAAA,CAACS,iBAAiB;IAAA,GAAMW;EAAK,CAAI,CAAC;AAC1C,CAAC;AAED,OAAO,MAAMG,qCAAqC,GAAGA,CAAE,GAAGC,IAAI,KAAM;EACnE3B,UAAU,CAAE,8CAA8C,EAAE;IAC3DwB,KAAK,EAAE,KAAK;IACZC,WAAW,EAAE;EACd,CAAE,CAAC;EACH,OAAON,eAAe,CAAE,GAAGQ,IAAK,CAAC;AAClC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["createContext","useContext","useMemo","deprecated","useBlockEditContext","jsx","_jsx","RenderedRefsContext","addToBlockType","renderedBlocks","blockName","uniqueId","result","Set","add","RecursionProvider","children","previouslyRenderedBlocks","name","newRenderedBlocks","Provider","value","useHasRecursion","Boolean","has","DeprecatedExperimentalRecursionProvider","props","since","alternative","DeprecatedExperimentalUseHasRecursion","args"],"sources":["@wordpress/block-editor/src/components/recursion-provider/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createContext, useContext, useMemo } from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport { useBlockEditContext } from '../block-edit/context';\n\nconst RenderedRefsContext = createContext( {} );\n\n/**\n * Immutably adds an unique identifier to a set scoped for a given block type.\n *\n * @param {Object} renderedBlocks Rendered blocks grouped by block name\n * @param {string} blockName Name of the block.\n * @param {*} uniqueId Any value that acts as a unique identifier for a block instance.\n *\n * @return {Object} The list of rendered blocks grouped by block name.\n */\nfunction addToBlockType( renderedBlocks, blockName, uniqueId ) {\n\tconst result = {\n\t\t...renderedBlocks,\n\t\t[ blockName ]: renderedBlocks[ blockName ]\n\t\t\t? new Set( renderedBlocks[ blockName ] )\n\t\t\t: new Set(),\n\t};\n\tresult[ blockName ].add( uniqueId );\n\n\treturn result;\n}\n\n/**\n * A React context provider for use with the `useHasRecursion` hook to prevent recursive\n * renders.\n *\n * Wrap block content with this provider and provide the same `uniqueId` prop as used\n * with `useHasRecursion`.\n *\n * @param {Object} props\n * @param {*} props.uniqueId Any value that acts as a unique identifier for a block instance.\n * @param {string} props.blockName Optional block name.\n * @param {JSX.Element} props.children React children.\n *\n * @return {JSX.Element} A React element.\n */\nexport function RecursionProvider( { children, uniqueId, blockName = '' } ) {\n\tconst previouslyRenderedBlocks = useContext( RenderedRefsContext );\n\tconst { name } = useBlockEditContext();\n\n\tblockName = blockName || name;\n\n\tconst newRenderedBlocks = useMemo(\n\t\t() => addToBlockType( previouslyRenderedBlocks, blockName, uniqueId ),\n\t\t[ previouslyRenderedBlocks, blockName, uniqueId ]\n\t);\n\n\treturn (\n\t\t<RenderedRefsContext.Provider value={ newRenderedBlocks }>\n\t\t\t{ children }\n\t\t</RenderedRefsContext.Provider>\n\t);\n}\n\n/**\n * A React hook for keeping track of blocks previously rendered up in the block\n * tree. Blocks susceptible to recursion can use this hook in their `Edit`\n * function to prevent said recursion.\n *\n * Use this with the `RecursionProvider` component, using the same `uniqueId` value\n * for both the hook and the provider.\n *\n * @param {*} uniqueId Any value that acts as a unique identifier for a block instance.\n * @param {string} blockName Optional block name.\n *\n * @return {boolean} A boolean describing whether the provided id has already been rendered.\n */\nexport function useHasRecursion( uniqueId, blockName = '' ) {\n\tconst previouslyRenderedBlocks = useContext( RenderedRefsContext );\n\tconst { name } = useBlockEditContext();\n\tblockName = blockName || name;\n\treturn Boolean( previouslyRenderedBlocks[ blockName ]?.has( uniqueId ) );\n}\n\nexport const DeprecatedExperimentalRecursionProvider = ( props ) => {\n\tdeprecated( 'wp.blockEditor.__experimentalRecursionProvider', {\n\t\tsince: '6.5',\n\t\talternative: 'wp.blockEditor.RecursionProvider',\n\t} );\n\treturn <RecursionProvider { ...props } />;\n};\n\nexport const DeprecatedExperimentalUseHasRecursion = ( ...args ) => {\n\tdeprecated( 'wp.blockEditor.__experimentalUseHasRecursion', {\n\t\tsince: '6.5',\n\t\talternative: 'wp.blockEditor.useHasRecursion',\n\t} );\n\treturn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,iBAAmB;IAAAH,QAAA,EACtDA;EAAQ,CACmB,CAAC;AAEjC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASM,eAAeA,CAAEX,QAAQ,EAAED,SAAS,GAAG,EAAE,EAAG;EAC3D,MAAMO,wBAAwB,GAAGhB,UAAU,CAAEM,mBAAoB,CAAC;EAClE,MAAM;IAAEW;EAAK,CAAC,GAAGd,mBAAmB,CAAC,CAAC;EACtCM,SAAS,GAAGA,SAAS,IAAIQ,IAAI;EAC7B,OAAOK,OAAO,CAAEN,wBAAwB,CAAEP,SAAS,CAAE,EAAEc,GAAG,CAAEb,QAAS,CAAE,CAAC;AACzE;AAEA,OAAO,MAAMc,uCAAuC,GAAKC,KAAK,IAAM;EACnEvB,UAAU,CAAE,gDAAgD,EAAE;IAC7DwB,KAAK,EAAE,KAAK;IACZC,WAAW,EAAE;EACd,CAAE,CAAC;EACH,oBAAOtB,IAAA,CAACS,iBAAiB;IAAA,GAAMW;EAAK,CAAI,CAAC;AAC1C,CAAC;AAED,OAAO,MAAMG,qCAAqC,GAAGA,CAAE,GAAGC,IAAI,KAAM;EACnE3B,UAAU,CAAE,8CAA8C,EAAE;IAC3DwB,KAAK,EAAE,KAAK;IACZC,WAAW,EAAE;EACd,CAAE,CAAC;EACH,OAAON,eAAe,CAAE,GAAGQ,IAAK,CAAC;AAClC,CAAC","ignoreList":[]}
@@ -14,8 +14,7 @@ import { ToggleControl } from '@wordpress/components';
14
14
  * Internal dependencies
15
15
  */
16
16
  import ResponsiveBlockControlLabel from './label';
17
- import { jsx as _jsx } from "react/jsx-runtime";
18
- import { jsxs as _jsxs } from "react/jsx-runtime";
17
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
19
18
  function ResponsiveBlockControl(props) {
20
19
  const {
21
20
  title,
@@ -43,16 +42,16 @@ function ResponsiveBlockControl(props) {
43
42
  if (!title || !property || !renderDefaultControl) {
44
43
  return null;
45
44
  }
46
- const toggleControlLabel = toggleLabel || sprintf( /* translators: %s: Property value for the control (eg: margin, padding, etc.). */
45
+ const toggleControlLabel = toggleLabel || sprintf(/* translators: %s: Property value for the control (eg: margin, padding, etc.). */
47
46
  __('Use the same %s on all screen sizes.'), property);
48
47
  const toggleHelpText = __('Toggle between using the same value for all screen sizes or using a unique value per screen size.');
49
- const defaultControl = renderDefaultControl( /*#__PURE__*/_jsx(ResponsiveBlockControlLabel, {
48
+ const defaultControl = renderDefaultControl(/*#__PURE__*/_jsx(ResponsiveBlockControlLabel, {
50
49
  property: property,
51
50
  viewport: defaultLabel
52
51
  }), defaultLabel);
53
52
  const defaultResponsiveControls = () => {
54
53
  return viewports.map(viewport => /*#__PURE__*/_jsx(Fragment, {
55
- children: renderDefaultControl( /*#__PURE__*/_jsx(ResponsiveBlockControlLabel, {
54
+ children: renderDefaultControl(/*#__PURE__*/_jsx(ResponsiveBlockControlLabel, {
56
55
  property: property,
57
56
  viewport: viewport
58
57
  }), viewport)
@@ -1 +1 @@
1
- {"version":3,"names":["clsx","__","_x","sprintf","Fragment","ToggleControl","ResponsiveBlockControlLabel","jsx","_jsx","jsxs","_jsxs","ResponsiveBlockControl","props","title","property","toggleLabel","onIsResponsiveChange","renderDefaultControl","renderResponsiveControls","isResponsive","defaultLabel","id","label","viewports","toggleControlLabel","toggleHelpText","defaultControl","viewport","defaultResponsiveControls","map","children","className","__nextHasNoMarginBottom","checked","onChange","help"],"sources":["@wordpress/block-editor/src/components/responsive-block-control/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport { Fragment } from '@wordpress/element';\nimport { ToggleControl } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport ResponsiveBlockControlLabel from './label';\n\nfunction ResponsiveBlockControl( props ) {\n\tconst {\n\t\ttitle,\n\t\tproperty,\n\t\ttoggleLabel,\n\t\tonIsResponsiveChange,\n\t\trenderDefaultControl,\n\t\trenderResponsiveControls,\n\t\tisResponsive = false,\n\t\tdefaultLabel = {\n\t\t\tid: 'all',\n\t\t\tlabel: _x( 'All', 'screen sizes' ),\n\t\t},\n\t\tviewports = [\n\t\t\t{\n\t\t\t\tid: 'small',\n\t\t\t\tlabel: __( 'Small screens' ),\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: 'medium',\n\t\t\t\tlabel: __( 'Medium screens' ),\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: 'large',\n\t\t\t\tlabel: __( 'Large screens' ),\n\t\t\t},\n\t\t],\n\t} = props;\n\n\tif ( ! title || ! property || ! renderDefaultControl ) {\n\t\treturn null;\n\t}\n\n\tconst toggleControlLabel =\n\t\ttoggleLabel ||\n\t\tsprintf(\n\t\t\t/* translators: %s: Property value for the control (eg: margin, padding, etc.). */\n\t\t\t__( 'Use the same %s on all screen sizes.' ),\n\t\t\tproperty\n\t\t);\n\n\tconst toggleHelpText = __(\n\t\t'Toggle between using the same value for all screen sizes or using a unique value per screen size.'\n\t);\n\n\tconst defaultControl = renderDefaultControl(\n\t\t<ResponsiveBlockControlLabel\n\t\t\tproperty={ property }\n\t\t\tviewport={ defaultLabel }\n\t\t/>,\n\t\tdefaultLabel\n\t);\n\n\tconst defaultResponsiveControls = () => {\n\t\treturn viewports.map( ( viewport ) => (\n\t\t\t<Fragment key={ viewport.id }>\n\t\t\t\t{ renderDefaultControl(\n\t\t\t\t\t<ResponsiveBlockControlLabel\n\t\t\t\t\t\tproperty={ property }\n\t\t\t\t\t\tviewport={ viewport }\n\t\t\t\t\t/>,\n\t\t\t\t\tviewport\n\t\t\t\t) }\n\t\t\t</Fragment>\n\t\t) );\n\t};\n\n\treturn (\n\t\t<fieldset className=\"block-editor-responsive-block-control\">\n\t\t\t<legend className=\"block-editor-responsive-block-control__title\">\n\t\t\t\t{ title }\n\t\t\t</legend>\n\n\t\t\t<div className=\"block-editor-responsive-block-control__inner\">\n\t\t\t\t<ToggleControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tclassName=\"block-editor-responsive-block-control__toggle\"\n\t\t\t\t\tlabel={ toggleControlLabel }\n\t\t\t\t\tchecked={ ! isResponsive }\n\t\t\t\t\tonChange={ onIsResponsiveChange }\n\t\t\t\t\thelp={ toggleHelpText }\n\t\t\t\t/>\n\t\t\t\t<div\n\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t'block-editor-responsive-block-control__group',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'is-responsive': isResponsive,\n\t\t\t\t\t\t}\n\t\t\t\t\t) }\n\t\t\t\t>\n\t\t\t\t\t{ ! isResponsive && defaultControl }\n\t\t\t\t\t{ isResponsive &&\n\t\t\t\t\t\t( renderResponsiveControls\n\t\t\t\t\t\t\t? renderResponsiveControls( viewports )\n\t\t\t\t\t\t\t: defaultResponsiveControls() ) }\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</fieldset>\n\t);\n}\n\nexport default ResponsiveBlockControl;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,EAAE,EAAEC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AACjD,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,aAAa,QAAQ,uBAAuB;;AAErD;AACA;AACA;AACA,OAAOC,2BAA2B,MAAM,SAAS;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAElD,SAASC,sBAAsBA,CAAEC,KAAK,EAAG;EACxC,MAAM;IACLC,KAAK;IACLC,QAAQ;IACRC,WAAW;IACXC,oBAAoB;IACpBC,oBAAoB;IACpBC,wBAAwB;IACxBC,YAAY,GAAG,KAAK;IACpBC,YAAY,GAAG;MACdC,EAAE,EAAE,KAAK;MACTC,KAAK,EAAEpB,EAAE,CAAE,KAAK,EAAE,cAAe;IAClC,CAAC;IACDqB,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B,uBAAuB;QACvBD,SAAS,EAAC,+CAA+C;QACzDT,KAAK,EAAGE,kBAAoB;QAC5BS,OAAO,EAAG,CAAEd,YAAc;QAC1Be,QAAQ,EAAGlB,oBAAsB;QACjCmB,IAAI,EAAGV;MAAgB,CACvB,CAAC,eACFf,KAAA;QACCqB,SAAS,EAAG/B,IAAI,CACf,8CAA8C,EAC9C;UACC,eAAe,EAAEmB;QAClB,CACD,CAAG;QAAAW,QAAA,GAED,CAAEX,YAAY,IAAIO,cAAc,EAChCP,YAAY,KACXD,wBAAwB,GACvBA,wBAAwB,CAAEK,SAAU,CAAC,GACrCK,yBAAyB,CAAC,CAAC,CAAE;MAAA,CAC7B,CAAC;IAAA,CACF,CAAC;EAAA,CACG,CAAC;AAEb;AAEA,eAAejB,sBAAsB","ignoreList":[]}
1
+ {"version":3,"names":["clsx","__","_x","sprintf","Fragment","ToggleControl","ResponsiveBlockControlLabel","jsx","_jsx","jsxs","_jsxs","ResponsiveBlockControl","props","title","property","toggleLabel","onIsResponsiveChange","renderDefaultControl","renderResponsiveControls","isResponsive","defaultLabel","id","label","viewports","toggleControlLabel","toggleHelpText","defaultControl","viewport","defaultResponsiveControls","map","children","className","__nextHasNoMarginBottom","checked","onChange","help"],"sources":["@wordpress/block-editor/src/components/responsive-block-control/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport { Fragment } from '@wordpress/element';\nimport { ToggleControl } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport ResponsiveBlockControlLabel from './label';\n\nfunction ResponsiveBlockControl( props ) {\n\tconst {\n\t\ttitle,\n\t\tproperty,\n\t\ttoggleLabel,\n\t\tonIsResponsiveChange,\n\t\trenderDefaultControl,\n\t\trenderResponsiveControls,\n\t\tisResponsive = false,\n\t\tdefaultLabel = {\n\t\t\tid: 'all',\n\t\t\tlabel: _x( 'All', 'screen sizes' ),\n\t\t},\n\t\tviewports = [\n\t\t\t{\n\t\t\t\tid: 'small',\n\t\t\t\tlabel: __( 'Small screens' ),\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: 'medium',\n\t\t\t\tlabel: __( 'Medium screens' ),\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: 'large',\n\t\t\t\tlabel: __( 'Large screens' ),\n\t\t\t},\n\t\t],\n\t} = props;\n\n\tif ( ! title || ! property || ! renderDefaultControl ) {\n\t\treturn null;\n\t}\n\n\tconst toggleControlLabel =\n\t\ttoggleLabel ||\n\t\tsprintf(\n\t\t\t/* translators: %s: Property value for the control (eg: margin, padding, etc.). */\n\t\t\t__( 'Use the same %s on all screen sizes.' ),\n\t\t\tproperty\n\t\t);\n\n\tconst toggleHelpText = __(\n\t\t'Toggle between using the same value for all screen sizes or using a unique value per screen size.'\n\t);\n\n\tconst defaultControl = renderDefaultControl(\n\t\t<ResponsiveBlockControlLabel\n\t\t\tproperty={ property }\n\t\t\tviewport={ defaultLabel }\n\t\t/>,\n\t\tdefaultLabel\n\t);\n\n\tconst defaultResponsiveControls = () => {\n\t\treturn viewports.map( ( viewport ) => (\n\t\t\t<Fragment key={ viewport.id }>\n\t\t\t\t{ renderDefaultControl(\n\t\t\t\t\t<ResponsiveBlockControlLabel\n\t\t\t\t\t\tproperty={ property }\n\t\t\t\t\t\tviewport={ viewport }\n\t\t\t\t\t/>,\n\t\t\t\t\tviewport\n\t\t\t\t) }\n\t\t\t</Fragment>\n\t\t) );\n\t};\n\n\treturn (\n\t\t<fieldset className=\"block-editor-responsive-block-control\">\n\t\t\t<legend className=\"block-editor-responsive-block-control__title\">\n\t\t\t\t{ title }\n\t\t\t</legend>\n\n\t\t\t<div className=\"block-editor-responsive-block-control__inner\">\n\t\t\t\t<ToggleControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tclassName=\"block-editor-responsive-block-control__toggle\"\n\t\t\t\t\tlabel={ toggleControlLabel }\n\t\t\t\t\tchecked={ ! isResponsive }\n\t\t\t\t\tonChange={ onIsResponsiveChange }\n\t\t\t\t\thelp={ toggleHelpText }\n\t\t\t\t/>\n\t\t\t\t<div\n\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t'block-editor-responsive-block-control__group',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'is-responsive': isResponsive,\n\t\t\t\t\t\t}\n\t\t\t\t\t) }\n\t\t\t\t>\n\t\t\t\t\t{ ! isResponsive && defaultControl }\n\t\t\t\t\t{ isResponsive &&\n\t\t\t\t\t\t( renderResponsiveControls\n\t\t\t\t\t\t\t? renderResponsiveControls( viewports )\n\t\t\t\t\t\t\t: defaultResponsiveControls() ) }\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</fieldset>\n\t);\n}\n\nexport default ResponsiveBlockControl;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,EAAE,EAAEC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AACjD,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,aAAa,QAAQ,uBAAuB;;AAErD;AACA;AACA;AACA,OAAOC,2BAA2B,MAAM,SAAS;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAElD,SAASC,sBAAsBA,CAAEC,KAAK,EAAG;EACxC,MAAM;IACLC,KAAK;IACLC,QAAQ;IACRC,WAAW;IACXC,oBAAoB;IACpBC,oBAAoB;IACpBC,wBAAwB;IACxBC,YAAY,GAAG,KAAK;IACpBC,YAAY,GAAG;MACdC,EAAE,EAAE,KAAK;MACTC,KAAK,EAAEpB,EAAE,CAAE,KAAK,EAAE,cAAe;IAClC,CAAC;IACDqB,SAAS,GAAG,CACX;MACCF,EAAE,EAAE,OAAO;MACXC,KAAK,EAAErB,EAAE,CAAE,eAAgB;IAC5B,CAAC,EACD;MACCoB,EAAE,EAAE,QAAQ;MACZC,KAAK,EAAErB,E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AI,EAAGV;MAAgB,CACvB,CAAC,eACFf,KAAA;QACCqB,SAAS,EAAG/B,IAAI,CACf,8CAA8C,EAC9C;UACC,eAAe,EAAEmB;QAClB,CACD,CAAG;QAAAW,QAAA,GAED,CAAEX,YAAY,IAAIO,cAAc,EAChCP,YAAY,KACXD,wBAAwB,GACvBA,wBAAwB,CAAEK,SAAU,CAAC,GACrCK,yBAAyB,CAAC,CAAC,CAAE;MAAA,CAC7B,CAAC;IAAA,CACF,CAAC;EAAA,CACG,CAAC;AAEb;AAEA,eAAejB,sBAAsB","ignoreList":[]}
@@ -4,16 +4,14 @@
4
4
  import { useInstanceId } from '@wordpress/compose';
5
5
  import { VisuallyHidden } from '@wordpress/components';
6
6
  import { _x, sprintf } from '@wordpress/i18n';
7
- import { jsx as _jsx } from "react/jsx-runtime";
8
- import { Fragment as _Fragment } from "react/jsx-runtime";
9
- import { jsxs as _jsxs } from "react/jsx-runtime";
7
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
10
8
  export default function ResponsiveBlockControlLabel({
11
9
  property,
12
10
  viewport,
13
11
  desc
14
12
  }) {
15
13
  const instanceId = useInstanceId(ResponsiveBlockControlLabel);
16
- const accessibleLabel = desc || sprintf( /* translators: 1: property name. 2: viewport name. */
14
+ const accessibleLabel = desc || sprintf(/* translators: 1: property name. 2: viewport name. */
17
15
  _x('Controls the %1$s property for %2$s viewports.', 'Text labelling a interface as controlling a given layout property (eg: margin) for a given screen size.'), property, viewport.label);
18
16
  return /*#__PURE__*/_jsxs(_Fragment, {
19
17
  children: [/*#__PURE__*/_jsx("span", {
@@ -1 +1 @@
1
- {"version":3,"names":["useInstanceId","VisuallyHidden","_x","sprintf","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","ResponsiveBlockControlLabel","property","viewport","desc","instanceId","accessibleLabel","label","children","as","id"],"sources":["@wordpress/block-editor/src/components/responsive-block-control/label.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { VisuallyHidden } from '@wordpress/components';\nimport { _x, sprintf } from '@wordpress/i18n';\n\nexport default function ResponsiveBlockControlLabel( {\n\tproperty,\n\tviewport,\n\tdesc,\n} ) {\n\tconst instanceId = useInstanceId( ResponsiveBlockControlLabel );\n\tconst accessibleLabel =\n\t\tdesc ||\n\t\tsprintf(\n\t\t\t/* translators: 1: property name. 2: viewport name. */\n\t\t\t_x(\n\t\t\t\t'Controls the %1$s property for %2$s viewports.',\n\t\t\t\t'Text labelling a interface as controlling a given layout property (eg: margin) for a given screen size.'\n\t\t\t),\n\t\t\tproperty,\n\t\t\tviewport.label\n\t\t);\n\treturn (\n\t\t<>\n\t\t\t<span aria-describedby={ `rbc-desc-${ instanceId }` }>\n\t\t\t\t{ viewport.label }\n\t\t\t</span>\n\t\t\t<VisuallyHidden as=\"span\" id={ `rbc-desc-${ instanceId }` }>\n\t\t\t\t{ accessibleLabel }\n\t\t\t</VisuallyHidden>\n\t\t</>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,aAAa,QAAQ,oBAAoB;AAClD,SAASC,cAAc,QAAQ,uBAAuB;AACtD,SAASC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAE9C,eAAe,SAASC,2BAA2BA,CAAE;EACpDC,QAAQ;EACRC,QAAQ;EACRC;AACD,CAAC,EAAG;EACH,MAAMC,UAAU,GAAGd,aAAa,CAAEU,2BAA4B,CAAC;EAC/D,MAAMK,eAAe,GACpBF,IAAI,IACJV,OAAO,EACN;EACAD,EAAE,CACD,gDAAgD,EAChD,yGACD,CAAC,EACDS,QAAQ,EACRC,QAAQ,CAACI,KACV,CAAC;EACF,oBACCP,KAAA,CAAAF,SAAA;IAAAU,QAAA,gBACCZ,IAAA;MAAM,oBAAoB,YAAYS,UAAY,EAAG;MAAAG,QAAA,EAClDL,QAAQ,CAACI;IAAK,CACX,CAAC,eACPX,IAAA,CAACJ,cAAc;MAACiB,EAAE,EAAC,MAAM;MAACC,EAAE,EAAI,YAAYL,UAAY,EAAG;MAAAG,QAAA,EACxDF;IAAe,CACF,CAAC;EAAA,CAChB,CAAC;AAEL","ignoreList":[]}
1
+ {"version":3,"names":["useInstanceId","VisuallyHidden","_x","sprintf","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","ResponsiveBlockControlLabel","property","viewport","desc","instanceId","accessibleLabel","label","children","as","id"],"sources":["@wordpress/block-editor/src/components/responsive-block-control/label.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { VisuallyHidden } from '@wordpress/components';\nimport { _x, sprintf } from '@wordpress/i18n';\n\nexport default function ResponsiveBlockControlLabel( {\n\tproperty,\n\tviewport,\n\tdesc,\n} ) {\n\tconst instanceId = useInstanceId( ResponsiveBlockControlLabel );\n\tconst accessibleLabel =\n\t\tdesc ||\n\t\tsprintf(\n\t\t\t/* translators: 1: property name. 2: viewport name. */\n\t\t\t_x(\n\t\t\t\t'Controls the %1$s property for %2$s viewports.',\n\t\t\t\t'Text labelling a interface as controlling a given layout property (eg: margin) for a given screen size.'\n\t\t\t),\n\t\t\tproperty,\n\t\t\tviewport.label\n\t\t);\n\treturn (\n\t\t<>\n\t\t\t<span aria-describedby={ `rbc-desc-${ instanceId }` }>\n\t\t\t\t{ viewport.label }\n\t\t\t</span>\n\t\t\t<VisuallyHidden as=\"span\" id={ `rbc-desc-${ instanceId }` }>\n\t\t\t\t{ accessibleLabel }\n\t\t\t</VisuallyHidden>\n\t\t</>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,aAAa,QAAQ,oBAAoB;AAClD,SAASC,cAAc,QAAQ,uBAAuB;AACtD,SAASC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA,EAAAC,IAAA,IAAAC,KAAA;AAE9C,eAAe,SAASC,2BAA2BA,CAAE;EACpDC,QAAQ;EACRC,QAAQ;EACRC;AACD,CAAC,EAAG;EACH,MAAMC,UAAU,GAAGd,aAAa,CAAEU,2BAA4B,CAAC;EAC/D,MAAMK,eAAe,GACpBF,IAAI,IACJV,OAAO,CACN;EACAD,EAAE,CACD,gDAAgD,EAChD,yGACD,CAAC,EACDS,QAAQ,EACRC,QAAQ,CAACI,KACV,CAAC;EACF,oBACCP,KAAA,CAAAF,SAAA;IAAAU,QAAA,gBACCZ,IAAA;MAAM,oBAAmB,YAAaS,UAAU,EAAK;MAAAG,QAAA,EAClDL,QAAQ,CAACI;IAAK,CACX,CAAC,eACPX,IAAA,CAACJ,cAAc;MAACiB,EAAE,EAAC,MAAM;MAACC,EAAE,EAAG,YAAaL,UAAU,EAAK;MAAAG,QAAA,EACxDF;IAAe,CACF,CAAC;EAAA,CAChB,CAAC;AAEL","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["RawHTML","children","childrenSource","deprecated","RichText","getMultilineTag","jsx","_jsx","valueToHTMLString","value","multiline","isEmpty","multilineTag","Array","isArray","since","version","alternative","link","toHTML","toHTMLString","Content","tagName","Tag","format","props"],"sources":["@wordpress/block-editor/src/components/rich-text/content.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { RawHTML } from '@wordpress/element';\nimport { children as childrenSource } from '@wordpress/blocks';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport RichText from './';\n\n/**\n * Internal dependencies\n */\nimport { getMultilineTag } from './utils';\n\nexport function valueToHTMLString( value, multiline ) {\n\tif ( RichText.isEmpty( value ) ) {\n\t\tconst multilineTag = getMultilineTag( multiline );\n\t\treturn multilineTag ? `<${ multilineTag }></${ multilineTag }>` : '';\n\t}\n\n\tif ( Array.isArray( value ) ) {\n\t\tdeprecated( 'wp.blockEditor.RichText value prop as children type', {\n\t\t\tsince: '6.1',\n\t\t\tversion: '6.3',\n\t\t\talternative: 'value prop as string',\n\t\t\tlink: 'https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/',\n\t\t} );\n\t\treturn childrenSource.toHTML( value );\n\t}\n\n\t// To do: deprecate string type.\n\tif ( typeof value === 'string' ) {\n\t\treturn value;\n\t}\n\n\t// To do: create a toReactComponent method on RichTextData, which we\n\t// might in the future also use for the editable tree. See\n\t// https://github.com/WordPress/gutenberg/pull/41655.\n\treturn value.toHTMLString();\n}\n\nexport function Content( {\n\tvalue,\n\ttagName: Tag,\n\tmultiline,\n\tformat,\n\t...props\n} ) {\n\tvalue = <RawHTML>{ valueToHTMLString( value, multiline ) }</RawHTML>;\n\treturn Tag ? <Tag { ...props }>{ value }</Tag> : value;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,QAAQ,IAAIC,cAAc,QAAQ,mBAAmB;AAC9D,OAAOC,UAAU,MAAM,uBAAuB;;AAE9C;AACA;AACA;AACA,OAAOC,QAAQ,MAAM,IAAI;;AAEzB;AACA;AACA;AACA,SAASC,eAAe,QAAQ,SAAS;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE1C,OAAO,SAASC,iBAAiBA,CAAEC,KAAK,EAAEC,SAAS,EAAG;EACrD,IAAKN,QAAQ,CAACO,OAAO,CAAEF,KAAM,CAAC,EAAG;IAChC,MAAMG,YAAY,GAAGP,eAAe,CAAEK,SAAU,CAAC;IACjD,OAAOE,YAAY,GAAI,IAAIA,YAAc,MAAMA,YAAc,GAAE,GAAG,EAAE;EACrE;EAEA,IAAKC,KAAK,CAACC,OAAO,CAAEL,KAAM,CAAC,EAAG;IAC7BN,UAAU,CAAE,qDAAqD,EAAE;MAClEY,KAAK,EAAE,KAAK;MACZC,OAAO,EAAE,KAAK;MACdC,WAAW,EAAE,sBAAsB;MACnCC,IAAI,EAAE;IACP,CAAE,CAAC;IACH,OAAOhB,cAAc,CAACiB,MAAM,CAAEV,KAAM,CAAC;EACtC;;EAEA;EACA,IAAK,OAAOA,KAAK,KAAK,QAAQ,EAAG;IAChC,OAAOA,KAAK;EACb;;EAEA;EACA;EACA;EACA,OAAOA,KAAK,CAACW,YAAY,CAAC,CAAC;AAC5B;AAEA,OAAO,SAASC,OAAOA,CAAE;EACxBZ,KAAK;EACLa,OAAO,EAAEC,GAAG;EACZb,SAAS;EACTc,MAAM;EACN,GAAGC;AACJ,CAAC,EAAG;EACHhB,KAAK,gBAAGF,IAAA,CAACP,OAAO;IAAAC,QAAA,EAAGO,iBAAiB,CAAEC,KAAK,EAAEC,SAAU;EAAC,CAAW,CAAC;EACpE,OAAOa,GAAG,gBAAGhB,IAAA,CAACgB,GAAG;IAAA,GAAME,KAAK;IAAAxB,QAAA,EAAKQ;EAAK,CAAO,CAAC,GAAGA,KAAK;AACvD","ignoreList":[]}
1
+ {"version":3,"names":["RawHTML","children","childrenSource","deprecated","RichText","getMultilineTag","jsx","_jsx","valueToHTMLString","value","multiline","isEmpty","multilineTag","Array","isArray","since","version","alternative","link","toHTML","toHTMLString","Content","tagName","Tag","format","props"],"sources":["@wordpress/block-editor/src/components/rich-text/content.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { RawHTML } from '@wordpress/element';\nimport { children as childrenSource } from '@wordpress/blocks';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport RichText from './';\n\n/**\n * Internal dependencies\n */\nimport { getMultilineTag } from './utils';\n\nexport function valueToHTMLString( value, multiline ) {\n\tif ( RichText.isEmpty( value ) ) {\n\t\tconst multilineTag = getMultilineTag( multiline );\n\t\treturn multilineTag ? `<${ multilineTag }></${ multilineTag }>` : '';\n\t}\n\n\tif ( Array.isArray( value ) ) {\n\t\tdeprecated( 'wp.blockEditor.RichText value prop as children type', {\n\t\t\tsince: '6.1',\n\t\t\tversion: '6.3',\n\t\t\talternative: 'value prop as string',\n\t\t\tlink: 'https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/',\n\t\t} );\n\t\treturn childrenSource.toHTML( value );\n\t}\n\n\t// To do: deprecate string type.\n\tif ( typeof value === 'string' ) {\n\t\treturn value;\n\t}\n\n\t// To do: create a toReactComponent method on RichTextData, which we\n\t// might in the future also use for the editable tree. See\n\t// https://github.com/WordPress/gutenberg/pull/41655.\n\treturn value.toHTMLString();\n}\n\nexport function Content( {\n\tvalue,\n\ttagName: Tag,\n\tmultiline,\n\tformat,\n\t...props\n} ) {\n\tvalue = <RawHTML>{ valueToHTMLString( value, multiline ) }</RawHTML>;\n\treturn Tag ? <Tag { ...props }>{ value }</Tag> : value;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,QAAQ,IAAIC,cAAc,QAAQ,mBAAmB;AAC9D,OAAOC,UAAU,MAAM,uBAAuB;;AAE9C;AACA;AACA;AACA,OAAOC,QAAQ,MAAM,IAAI;;AAEzB;AACA;AACA;AACA,SAASC,eAAe,QAAQ,SAAS;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE1C,OAAO,SAASC,iBAAiBA,CAAEC,KAAK,EAAEC,SAAS,EAAG;EACrD,IAAKN,QAAQ,CAACO,OAAO,CAAEF,KAAM,CAAC,EAAG;IAChC,MAAMG,YAAY,GAAGP,eAAe,CAAEK,SAAU,CAAC;IACjD,OAAOE,YAAY,GAAG,IAAKA,YAAY,MAAQA,YAAY,GAAI,GAAG,EAAE;EACrE;EAEA,IAAKC,KAAK,CAACC,OAAO,CAAEL,KAAM,CAAC,EAAG;IAC7BN,UAAU,CAAE,qDAAqD,EAAE;MAClEY,KAAK,EAAE,KAAK;MACZC,OAAO,EAAE,KAAK;MACdC,WAAW,EAAE,sBAAsB;MACnCC,IAAI,EAAE;IACP,CAAE,CAAC;IACH,OAAOhB,cAAc,CAACiB,MAAM,CAAEV,KAAM,CAAC;EACtC;;EAEA;EACA,IAAK,OAAOA,KAAK,KAAK,QAAQ,EAAG;IAChC,OAAOA,KAAK;EACb;;EAEA;EACA;EACA;EACA,OAAOA,KAAK,CAACW,YAAY,CAAC,CAAC;AAC5B;AAEA,OAAO,SAASC,OAAOA,CAAE;EACxBZ,KAAK;EACLa,OAAO,EAAEC,GAAG;EACZb,SAAS;EACTc,MAAM;EACN,GAAGC;AACJ,CAAC,EAAG;EACHhB,KAAK,gBAAGF,IAAA,CAACP,OAAO;IAAAC,QAAA,EAAGO,iBAAiB,CAAEC,KAAK,EAAEC,SAAU;EAAC,CAAW,CAAC;EACpE,OAAOa,GAAG,gBAAGhB,IAAA,CAACgB,GAAG;IAAA,GAAME,KAAK;IAAAxB,QAAA,EAAKQ;EAAK,CAAO,CAAC,GAAGA,KAAK;AACvD","ignoreList":[]}
@@ -17,7 +17,7 @@ import { store as blockEditorStore } from '../../../store';
17
17
  * @type {string[]} Array of character pairs.
18
18
  */
19
19
  const wrapSelectionSettings = ['`', '"', "'", '“”', '‘’'];
20
- export default (props => element => {
20
+ export default props => element => {
21
21
  function onInput(event) {
22
22
  const {
23
23
  inputType,
@@ -82,5 +82,5 @@ export default (props => element => {
82
82
  return () => {
83
83
  element.removeEventListener('beforeinput', onInput);
84
84
  };
85
- });
85
+ };
86
86
  //# sourceMappingURL=before-input-rules.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["insert","isCollapsed","applyFilters","store","blockEditorStore","wrapSelectionSettings","props","element","onInput","event","inputType","data","value","onChange","registry","current","pair","find","startChar","endChar","start","end","length","newValue","__unstableMarkLastChangeAsPersistent","__unstableMarkAutomaticChange","dispatch","init","key","ownerDocument","defaultView","newEvent","InputEvent","window","queueMicrotask","target","dispatchEvent","preventDefault","addEventListener","removeEventListener"],"sources":["@wordpress/block-editor/src/components/rich-text/event-listeners/before-input-rules.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { insert, isCollapsed } from '@wordpress/rich-text';\nimport { applyFilters } from '@wordpress/hooks';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../../store';\n\n/**\n * When typing over a selection, the selection will we wrapped by a matching\n * character pair. The second character is optional, it defaults to the first\n * character.\n *\n * @type {string[]} Array of character pairs.\n */\nconst wrapSelectionSettings = [ '`', '\"', \"'\", '“”', '‘’' ];\n\nexport default ( props ) => ( element ) => {\n\tfunction onInput( event ) {\n\t\tconst { inputType, data } = event;\n\t\tconst { value, onChange, registry } = props.current;\n\n\t\t// Only run the rules when inserting text.\n\t\tif ( inputType !== 'insertText' ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( isCollapsed( value ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst pair = applyFilters(\n\t\t\t'blockEditor.wrapSelectionSettings',\n\t\t\twrapSelectionSettings\n\t\t).find(\n\t\t\t( [ startChar, endChar ] ) => startChar === data || endChar === data\n\t\t);\n\n\t\tif ( ! pair ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst [ startChar, endChar = startChar ] = pair;\n\t\tconst start = value.start;\n\t\tconst end = value.end + startChar.length;\n\n\t\tlet newValue = insert( value, startChar, start, start );\n\t\tnewValue = insert( newValue, endChar, end, end );\n\n\t\tconst {\n\t\t\t__unstableMarkLastChangeAsPersistent,\n\t\t\t__unstableMarkAutomaticChange,\n\t\t} = registry.dispatch( blockEditorStore );\n\n\t\t__unstableMarkLastChangeAsPersistent();\n\t\tonChange( newValue );\n\t\t__unstableMarkAutomaticChange();\n\n\t\tconst init = {};\n\n\t\tfor ( const key in event ) {\n\t\t\tinit[ key ] = event[ key ];\n\t\t}\n\n\t\tinit.data = endChar;\n\n\t\tconst { ownerDocument } = element;\n\t\tconst { defaultView } = ownerDocument;\n\t\tconst newEvent = new defaultView.InputEvent( 'input', init );\n\n\t\t// Dispatch an `input` event with the new data. This will trigger the\n\t\t// input rules.\n\t\t// Postpone the `input` to the next event loop tick so that the dispatch\n\t\t// doesn't happen synchronously in the middle of `beforeinput` dispatch.\n\t\t// This is closer to how native `input` event would be timed, and also\n\t\t// makes sure that the `input` event is dispatched only after the `onChange`\n\t\t// call few lines above has fully updated the data store state and rerendered\n\t\t// all affected components.\n\t\twindow.queueMicrotask( () => {\n\t\t\tevent.target.dispatchEvent( newEvent );\n\t\t} );\n\t\tevent.preventDefault();\n\t}\n\n\telement.addEventListener( 'beforeinput', onInput );\n\treturn () => {\n\t\telement.removeEventListener( 'beforeinput', onInput );\n\t};\n};\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,MAAM,EAAEC,WAAW,QAAQ,sBAAsB;AAC1D,SAASC,YAAY,QAAQ,kBAAkB;;AAE/C;AACA;AACA;AACA,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,gBAAgB;;AAE1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,qBAAqB,GAAG,CAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,CAAE;AAE3D,gBAAiBC,KAAK,IAAQC,OAAO,IAAM;EAC1C,SAASC,OAAOA,CAAEC,KAAK,EAAG;IACzB,MAAM;MAAEC,SAAS;MAAEC;IAAK,CAAC,GAAGF,KAAK;IACjC,MAAM;MAAEG,KAAK;MAAEC,QAAQ;MAAEC;IAAS,CAAC,GAAGR,KAAK,CAACS,OAAO;;IAEnD;IACA,IAAKL,SAAS,KAAK,YAAY,EAAG;MACjC;IACD;IAEA,IAAKT,WAAW,CAAEW,KAAM,CAAC,EAAG;MAC3B;IACD;IAEA,MAAMI,IAAI,GAAGd,YAAY,CACxB,mCAAmC,EACnCG,qBACD,CAAC,CAACY,IAAI,CACL,CAAE,CAAEC,SAAS,EAAEC,OAAO,CAAE,KAAMD,SAAS,KAAKP,IAAI,IAAIQ,OAAO,KAAKR,IACjE,CAAC;IAED,IAAK,CAAEK,IAAI,EAAG;MACb;IACD;IAEA,MAAM,CAAEE,SAAS,EAAEC,OAAO,GAAGD,SAAS,CAAE,GAAGF,IAAI;IAC/C,MAAMI,KAAK,GAAGR,K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["insert","isCollapsed","applyFilters","store","blockEditorStore","wrapSelectionSettings","props","element","onInput","event","inputType","data","value","onChange","registry","current","pair","find","startChar","endChar","start","end","length","newValue","__unstableMarkLastChangeAsPersistent","__unstableMarkAutomaticChange","dispatch","init","key","ownerDocument","defaultView","newEvent","InputEvent","window","queueMicrotask","target","dispatchEvent","preventDefault","addEventListener","removeEventListener"],"sources":["@wordpress/block-editor/src/components/rich-text/event-listeners/before-input-rules.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { insert, isCollapsed } from '@wordpress/rich-text';\nimport { applyFilters } from '@wordpress/hooks';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../../store';\n\n/**\n * When typing over a selection, the selection will we wrapped by a matching\n * character pair. The second character is optional, it defaults to the first\n * character.\n *\n * @type {string[]} Array of character pairs.\n */\nconst wrapSelectionSettings = [ '`', '\"', \"'\", '“”', '‘’' ];\n\nexport default ( props ) => ( element ) => {\n\tfunction onInput( event ) {\n\t\tconst { inputType, data } = event;\n\t\tconst { value, onChange, registry } = props.current;\n\n\t\t// Only run the rules when inserting text.\n\t\tif ( inputType !== 'insertText' ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( isCollapsed( value ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst pair = applyFilters(\n\t\t\t'blockEditor.wrapSelectionSettings',\n\t\t\twrapSelectionSettings\n\t\t).find(\n\t\t\t( [ startChar, endChar ] ) => startChar === data || endChar === data\n\t\t);\n\n\t\tif ( ! pair ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst [ startChar, endChar = startChar ] = pair;\n\t\tconst start = value.start;\n\t\tconst end = value.end + startChar.length;\n\n\t\tlet newValue = insert( value, startChar, start, start );\n\t\tnewValue = insert( newValue, endChar, end, end );\n\n\t\tconst {\n\t\t\t__unstableMarkLastChangeAsPersistent,\n\t\t\t__unstableMarkAutomaticChange,\n\t\t} = registry.dispatch( blockEditorStore );\n\n\t\t__unstableMarkLastChangeAsPersistent();\n\t\tonChange( newValue );\n\t\t__unstableMarkAutomaticChange();\n\n\t\tconst init = {};\n\n\t\tfor ( const key in event ) {\n\t\t\tinit[ key ] = event[ key ];\n\t\t}\n\n\t\tinit.data = endChar;\n\n\t\tconst { ownerDocument } = element;\n\t\tconst { defaultView } = ownerDocument;\n\t\tconst newEvent = new defaultView.InputEvent( 'input', init );\n\n\t\t// Dispatch an `input` event with the new data. This will trigger the\n\t\t// input rules.\n\t\t// Postpone the `input` to the next event loop tick so that the dispatch\n\t\t// doesn't happen synchronously in the middle of `beforeinput` dispatch.\n\t\t// This is closer to how native `input` event would be timed, and also\n\t\t// makes sure that the `input` event is dispatched only after the `onChange`\n\t\t// call few lines above has fully updated the data store state and rerendered\n\t\t// all affected components.\n\t\twindow.queueMicrotask( () => {\n\t\t\tevent.target.dispatchEvent( newEvent );\n\t\t} );\n\t\tevent.preventDefault();\n\t}\n\n\telement.addEventListener( 'beforeinput', onInput );\n\treturn () => {\n\t\telement.removeEventListener( 'beforeinput', onInput );\n\t};\n};\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,MAAM,EAAEC,WAAW,QAAQ,sBAAsB;AAC1D,SAASC,YAAY,QAAQ,kBAAkB;;AAE/C;AACA;AACA;AACA,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,gBAAgB;;AAE1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,qBAAqB,GAAG,CAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,CAAE;AAE3D,eAAiBC,KAAK,IAAQC,OAAO,IAAM;EAC1C,SAASC,OAAOA,CAAEC,KAAK,EAAG;IACzB,MAAM;MAAEC,SAAS;MAAEC;IAAK,CAAC,GAAGF,KAAK;IACjC,MAAM;MAAEG,KAAK;MAAEC,QAAQ;MAAEC;IAAS,CAAC,GAAGR,KAAK,CAACS,OAAO;;IAEnD;IACA,IAAKL,SAAS,KAAK,YAAY,EAAG;MACjC;IACD;IAEA,I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IACA;IACA;IACA;IACAM,MAAM,CAACC,cAAc,CAAE,MAAM;MAC5BzB,KAAK,CAAC0B,MAAM,CAACC,aAAa,CAAEL,QAAS,CAAC;IACvC,CAAE,CAAC;IACHtB,KAAK,CAAC4B,cAAc,CAAC,CAAC;EACvB;EAEA9B,OAAO,CAAC+B,gBAAgB,CAAE,aAAa,EAAE9B,OAAQ,CAAC;EAClD,OAAO,MAAM;IACZD,OAAO,CAACgC,mBAAmB,CAAE,aAAa,EAAE/B,OAAQ,CAAC;EACtD,CAAC;AACF,CAAC","ignoreList":[]}
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import { DELETE, BACKSPACE } from '@wordpress/keycodes';
5
5
  import { isCollapsed, isEmpty } from '@wordpress/rich-text';
6
- export default (props => element => {
6
+ export default props => element => {
7
7
  function onKeyDown(event) {
8
8
  const {
9
9
  keyCode
@@ -47,5 +47,5 @@ export default (props => element => {
47
47
  return () => {
48
48
  element.removeEventListener('keydown', onKeyDown);
49
49
  };
50
- });
50
+ };
51
51
  //# sourceMappingURL=delete.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["DELETE","BACKSPACE","isCollapsed","isEmpty","props","element","onKeyDown","event","keyCode","defaultPrevented","value","onMerge","onRemove","current","start","end","text","isReverse","hasActiveFormats","activeFormats","length","preventDefault","addEventListener","removeEventListener"],"sources":["@wordpress/block-editor/src/components/rich-text/event-listeners/delete.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { DELETE, BACKSPACE } from '@wordpress/keycodes';\nimport { isCollapsed, isEmpty } from '@wordpress/rich-text';\n\nexport default ( props ) => ( element ) => {\n\tfunction onKeyDown( event ) {\n\t\tconst { keyCode } = event;\n\n\t\tif ( event.defaultPrevented ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { value, onMerge, onRemove } = props.current;\n\n\t\tif ( keyCode === DELETE || keyCode === BACKSPACE ) {\n\t\t\tconst { start, end, text } = value;\n\t\t\tconst isReverse = keyCode === BACKSPACE;\n\t\t\tconst hasActiveFormats =\n\t\t\t\tvalue.activeFormats && !! value.activeFormats.length;\n\n\t\t\t// Only process delete if the key press occurs at an uncollapsed edge.\n\t\t\tif (\n\t\t\t\t! isCollapsed( value ) ||\n\t\t\t\thasActiveFormats ||\n\t\t\t\t( isReverse && start !== 0 ) ||\n\t\t\t\t( ! isReverse && end !== text.length )\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\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\n\t\t\tevent.preventDefault();\n\t\t}\n\t}\n\n\telement.addEventListener( 'keydown', onKeyDown );\n\treturn () => {\n\t\telement.removeEventListener( 'keydown', onKeyDown );\n\t};\n};\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,MAAM,EAAEC,SAAS,QAAQ,qBAAqB;AACvD,SAASC,WAAW,EAAEC,OAAO,QAAQ,sBAAsB;AAE3D,gBAAiBC,KAAK,IAAQC,OAAO,IAAM;EAC1C,SAASC,SAASA,CAAEC,KAAK,EAAG;IAC3B,MAAM;MAAEC;IAAQ,CAAC,GAAGD,KAAK;IAEzB,IAAKA,KAAK,CAACE,gBAAgB,EAAG;MAC7B;IACD;IAEA,MAAM;MAAEC,KAAK;MAAEC,OAAO;MAAEC;IAAS,CAAC,GAAGR,KAAK,CAACS,OAAO;IAElD,IAAKL,OAAO,KAAKR,MAAM,IAAIQ,OAAO,KAAKP,SAAS,EAAG;MAClD,MAAM;QAAEa,KAAK;QAAEC,GAAG;QAAEC;MAAK,CAAC,GAAGN,KAAK;MAClC,MAAMO,SAAS,GAAGT,OAAO,KAAKP,SAAS;MACvC,MAAMiB,gBAAgB,GACrBR,KAAK,CAACS,aAAa,IAAI,CAAC,CAAET,KAAK,CAACS,aAAa,CAACC,MAAM;;MAErD;MACA,IACC,CAAElB,WAAW,CAAEQ,KAAM,CAAC,IACtBQ,gBAAgB,IACdD,SAAS,IAAIH,KAAK,KAAK,CAAG,IAC1B,CAAEG,SAAS,IAAIF,GAAG,KAAKC,IAAI,CAACI,MAAQ,EACrC;QACD;MACD;MAEA,IAAKT,OAAO,EAAG;QACdA,OAAO,CAAE,CAAEM,SAAU,CAAC;MACvB;;MAEA;MACA;MACA;MACA;MAAA,KACK,IAAKL,QAAQ,IAAIT,OAAO,CAAEO,KAAM,CAAC,IAAIO,SAAS,EAAG;QACrDL,QAAQ,CAAE,CAAEK,SAAU,CAAC;MACxB;MAEAV,KAAK,CAACc,cAAc,CAAC,CAAC;IACvB;EACD;EAEAhB,OAAO,CAACiB,gBAAgB,CAAE,SAAS,EAAEhB,SAAU,CAAC;EAChD,OAAO,MAAM;IACZD,OAAO,CAACkB,mBAAmB,CAAE,SAAS,EAAEjB,SAAU,CAAC;EACpD,CAAC;AACF,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["DELETE","BACKSPACE","isCollapsed","isEmpty","props","element","onKeyDown","event","keyCode","defaultPrevented","value","onMerge","onRemove","current","start","end","text","isReverse","hasActiveFormats","activeFormats","length","preventDefault","addEventListener","removeEventListener"],"sources":["@wordpress/block-editor/src/components/rich-text/event-listeners/delete.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { DELETE, BACKSPACE } from '@wordpress/keycodes';\nimport { isCollapsed, isEmpty } from '@wordpress/rich-text';\n\nexport default ( props ) => ( element ) => {\n\tfunction onKeyDown( event ) {\n\t\tconst { keyCode } = event;\n\n\t\tif ( event.defaultPrevented ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { value, onMerge, onRemove } = props.current;\n\n\t\tif ( keyCode === DELETE || keyCode === BACKSPACE ) {\n\t\t\tconst { start, end, text } = value;\n\t\t\tconst isReverse = keyCode === BACKSPACE;\n\t\t\tconst hasActiveFormats =\n\t\t\t\tvalue.activeFormats && !! value.activeFormats.length;\n\n\t\t\t// Only process delete if the key press occurs at an uncollapsed edge.\n\t\t\tif (\n\t\t\t\t! isCollapsed( value ) ||\n\t\t\t\thasActiveFormats ||\n\t\t\t\t( isReverse && start !== 0 ) ||\n\t\t\t\t( ! isReverse && end !== text.length )\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\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\n\t\t\tevent.preventDefault();\n\t\t}\n\t}\n\n\telement.addEventListener( 'keydown', onKeyDown );\n\treturn () => {\n\t\telement.removeEventListener( 'keydown', onKeyDown );\n\t};\n};\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,MAAM,EAAEC,SAAS,QAAQ,qBAAqB;AACvD,SAASC,WAAW,EAAEC,OAAO,QAAQ,sBAAsB;AAE3D,eAAiBC,KAAK,IAAQC,OAAO,IAAM;EAC1C,SAASC,SAASA,CAAEC,KAAK,EAAG;IAC3B,MAAM;MAAEC;IAAQ,CAAC,GAAGD,KAAK;IAEzB,IAAKA,KAAK,CAACE,gBAAgB,EAAG;MAC7B;IACD;IAEA,MAAM;MAAEC,KAAK;MAAEC,OAAO;MAAEC;IAAS,CAAC,GAAGR,KAAK,CAACS,OAAO;IAElD,IAAKL,OAAO,KAAKR,MAAM,IAAIQ,OAAO,KAAKP,SAAS,EAAG;MAClD,MAAM;QAAEa,KAAK;QAAEC,GAAG;QAAEC;MAAK,CAAC,GAAGN,KAAK;MAClC,MAAMO,SAAS,GAAGT,OAAO,KAAKP,SAAS;MACvC,MAAMiB,gBAAgB,GACrBR,KAAK,CAACS,aAAa,IAAI,CAAC,CAAET,KAAK,CAACS,aAAa,CAACC,MAAM;;MAErD;MACA,IACC,CAAElB,WAAW,CAAEQ,KAAM,CAAC,IACtBQ,gBAAgB,IACdD,SAAS,IAAIH,KAAK,KAAK,CAAG,IAC1B,CAAEG,SAAS,IAAIF,GAAG,KAAKC,IAAI,CAACI,MAAQ,EACrC;QACD;MACD;MAEA,IAAKT,OAAO,EAAG;QACdA,OAAO,CAAE,CAAEM,SAAU,CAAC;MACvB;;MAEA;MACA;MACA;MACA;MAAA,KACK,IAAKL,QAAQ,IAAIT,OAAO,CAAEO,KAAM,CAAC,IAAIO,SAAS,EAAG;QACrDL,QAAQ,CAAE,CAAEK,SAAU,CAAC;MACxB;MAEAV,KAAK,CAACc,cAAc,CAAC,CAAC;IACvB;EACD;EAEAhB,OAAO,CAACiB,gBAAgB,CAAE,SAAS,EAAEhB,SAAU,CAAC;EAChD,OAAO,MAAM;IACZD,OAAO,CAACkB,mBAAmB,CAAE,SAAS,EAAEjB,SAAU,CAAC;EACpD,CAAC;AACF,CAAC","ignoreList":[]}
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import { ENTER } from '@wordpress/keycodes';
5
5
  import { insert, remove } from '@wordpress/rich-text';
6
- export default (props => element => {
6
+ export default props => element => {
7
7
  function onKeyDownDeprecated(event) {
8
8
  if (event.keyCode !== ENTER) {
9
9
  return;
@@ -78,5 +78,5 @@ export default (props => element => {
78
78
  defaultView.removeEventListener('keydown', onKeyDown);
79
79
  element.removeEventListener('keydown', onKeyDownDeprecated);
80
80
  };
81
- });
81
+ };
82
82
  //# sourceMappingURL=enter.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["ENTER","insert","remove","props","element","onKeyDownDeprecated","event","keyCode","onReplace","onSplit","current","__deprecatedOnSplit","onKeyDown","defaultPrevented","target","value","onChange","disableLineBreaks","onSplitAtEnd","onSplitAtDoubleLineEnd","registry","preventDefault","text","start","end","shiftKey","length","slice","batch","_value","defaultView","ownerDocument","addEventListener","removeEventListener"],"sources":["@wordpress/block-editor/src/components/rich-text/event-listeners/enter.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { ENTER } from '@wordpress/keycodes';\nimport { insert, remove } from '@wordpress/rich-text';\n\nexport default ( props ) => ( element ) => {\n\tfunction onKeyDownDeprecated( event ) {\n\t\tif ( event.keyCode !== ENTER ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { onReplace, onSplit } = props.current;\n\n\t\tif ( onReplace && onSplit ) {\n\t\t\tevent.__deprecatedOnSplit = true;\n\t\t}\n\t}\n\n\tfunction onKeyDown( event ) {\n\t\tif ( event.defaultPrevented ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// The event listener is attached to the window, so we need to check if\n\t\t// the target is the element.\n\t\tif ( event.target !== element ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( event.keyCode !== ENTER ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst {\n\t\t\tvalue,\n\t\t\tonChange,\n\t\t\tdisableLineBreaks,\n\t\t\tonSplitAtEnd,\n\t\t\tonSplitAtDoubleLineEnd,\n\t\t\tregistry,\n\t\t} = props.current;\n\n\t\tevent.preventDefault();\n\n\t\tconst { text, start, end } = value;\n\n\t\tif ( event.shiftKey ) {\n\t\t\tif ( ! disableLineBreaks ) {\n\t\t\t\tonChange( insert( value, '\\n' ) );\n\t\t\t}\n\t\t} else if ( onSplitAtEnd && start === end && end === text.length ) {\n\t\t\tonSplitAtEnd();\n\t\t} else if (\n\t\t\t// For some blocks it's desirable to split at the end of the\n\t\t\t// block when there are two line breaks at the end of the\n\t\t\t// block, so triple Enter exits the block.\n\t\t\tonSplitAtDoubleLineEnd &&\n\t\t\tstart === end &&\n\t\t\tend === text.length &&\n\t\t\ttext.slice( -2 ) === '\\n\\n'\n\t\t) {\n\t\t\tregistry.batch( () => {\n\t\t\t\tconst _value = { ...value };\n\t\t\t\t_value.start = _value.end - 2;\n\t\t\t\tonChange( remove( _value ) );\n\t\t\t\tonSplitAtDoubleLineEnd();\n\t\t\t} );\n\t\t} else if ( ! disableLineBreaks ) {\n\t\t\tonChange( insert( value, '\\n' ) );\n\t\t}\n\t}\n\n\tconst { defaultView } = element.ownerDocument;\n\n\t// Attach the listener to the window so parent elements have the chance to\n\t// prevent the default behavior.\n\tdefaultView.addEventListener( 'keydown', onKeyDown );\n\telement.addEventListener( 'keydown', onKeyDownDeprecated );\n\treturn () => {\n\t\tdefaultView.removeEventListener( 'keydown', onKeyDown );\n\t\telement.removeEventListener( 'keydown', onKeyDownDeprecated );\n\t};\n};\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,KAAK,QAAQ,qBAAqB;AAC3C,SAASC,MAAM,EAAEC,MAAM,QAAQ,sBAAsB;AAErD,gBAAiBC,KAAK,IAAQC,OAAO,IAAM;EAC1C,SAASC,mBAAmBA,CAAEC,KAAK,EAAG;IACrC,IAAKA,KAAK,CAACC,OAAO,KAAKP,KAAK,EAAG;MAC9B;IACD;IAEA,MAAM;MAAEQ,SAAS;MAAEC;IAAQ,CAAC,GAAGN,KAAK,CAACO,OAAO;IAE5C,IAAKF,SAAS,IAAIC,OAAO,EAAG;MAC3BH,KAAK,CAACK,mBAAmB,GAAG,IAAI;IACjC;EACD;EAEA,SAASC,SAASA,CAAEN,KAAK,EAAG;IAC3B,IAAKA,KAAK,CAACO,gBAAgB,EAAG;MAC7B;IACD;;IAEA;IACA;IACA,IAAKP,KAAK,CAACQ,MAAM,KAAKV,OAAO,EAAG;MAC/B;IACD;IAEA,IAAKE,KAAK,CAACC,OAAO,KAAKP,KAAK,EAAG;MAC9B;IACD;IAEA,MAAM;MACLe,KAAK;MACLC,QAAQ;MACRC,iBAAiB;MACjBC,YAAY;MACZC,sBAAsB;MACtBC;IACD,CAAC,GAAGjB,KAAK,CAACO,OAAO;IAEjBJ,KAAK,CAACe,cAAc,CA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B,mBAAoB,CAAC;EAC9D,CAAC;AACF,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["ENTER","insert","remove","props","element","onKeyDownDeprecated","event","keyCode","onReplace","onSplit","current","__deprecatedOnSplit","onKeyDown","defaultPrevented","target","value","onChange","disableLineBreaks","onSplitAtEnd","onSplitAtDoubleLineEnd","registry","preventDefault","text","start","end","shiftKey","length","slice","batch","_value","defaultView","ownerDocument","addEventListener","removeEventListener"],"sources":["@wordpress/block-editor/src/components/rich-text/event-listeners/enter.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { ENTER } from '@wordpress/keycodes';\nimport { insert, remove } from '@wordpress/rich-text';\n\nexport default ( props ) => ( element ) => {\n\tfunction onKeyDownDeprecated( event ) {\n\t\tif ( event.keyCode !== ENTER ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { onReplace, onSplit } = props.current;\n\n\t\tif ( onReplace && onSplit ) {\n\t\t\tevent.__deprecatedOnSplit = true;\n\t\t}\n\t}\n\n\tfunction onKeyDown( event ) {\n\t\tif ( event.defaultPrevented ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// The event listener is attached to the window, so we need to check if\n\t\t// the target is the element.\n\t\tif ( event.target !== element ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( event.keyCode !== ENTER ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst {\n\t\t\tvalue,\n\t\t\tonChange,\n\t\t\tdisableLineBreaks,\n\t\t\tonSplitAtEnd,\n\t\t\tonSplitAtDoubleLineEnd,\n\t\t\tregistry,\n\t\t} = props.current;\n\n\t\tevent.preventDefault();\n\n\t\tconst { text, start, end } = value;\n\n\t\tif ( event.shiftKey ) {\n\t\t\tif ( ! disableLineBreaks ) {\n\t\t\t\tonChange( insert( value, '\\n' ) );\n\t\t\t}\n\t\t} else if ( onSplitAtEnd && start === end && end === text.length ) {\n\t\t\tonSplitAtEnd();\n\t\t} else if (\n\t\t\t// For some blocks it's desirable to split at the end of the\n\t\t\t// block when there are two line breaks at the end of the\n\t\t\t// block, so triple Enter exits the block.\n\t\t\tonSplitAtDoubleLineEnd &&\n\t\t\tstart === end &&\n\t\t\tend === text.length &&\n\t\t\ttext.slice( -2 ) === '\\n\\n'\n\t\t) {\n\t\t\tregistry.batch( () => {\n\t\t\t\tconst _value = { ...value };\n\t\t\t\t_value.start = _value.end - 2;\n\t\t\t\tonChange( remove( _value ) );\n\t\t\t\tonSplitAtDoubleLineEnd();\n\t\t\t} );\n\t\t} else if ( ! disableLineBreaks ) {\n\t\t\tonChange( insert( value, '\\n' ) );\n\t\t}\n\t}\n\n\tconst { defaultView } = element.ownerDocument;\n\n\t// Attach the listener to the window so parent elements have the chance to\n\t// prevent the default behavior.\n\tdefaultView.addEventListener( 'keydown', onKeyDown );\n\telement.addEventListener( 'keydown', onKeyDownDeprecated );\n\treturn () => {\n\t\tdefaultView.removeEventListener( 'keydown', onKeyDown );\n\t\telement.removeEventListener( 'keydown', onKeyDownDeprecated );\n\t};\n};\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,KAAK,QAAQ,qBAAqB;AAC3C,SAASC,MAAM,EAAEC,MAAM,QAAQ,sBAAsB;AAErD,eAAiBC,KAAK,IAAQC,OAAO,IAAM;EAC1C,SAASC,mBAAmBA,CAAEC,KAAK,EAAG;IACrC,IAAKA,KAAK,CAACC,OAAO,KAAKP,KAAK,EAAG;MAC9B;IACD;IAEA,MAAM;MAAEQ,SAAS;MAAEC;IAAQ,CAAC,GAAGN,KAAK,CAACO,OAAO;IAE5C,IAAKF,SAAS,IAAIC,OAAO,EAAG;MAC3BH,KAAK,CAACK,mBAAmB,GAAG,IAAI;IACjC;EACD;EAEA,SAASC,SAASA,CAAEN,KAAK,EAAG;IAC3B,IAAKA,KAAK,CAACO,gBAAgB,EAAG;MAC7B;IACD;;IAEA;IACA;IACA,IAAKP,KAAK,CAACQ,MAAM,KAAKV,OAAO,EAAG;MAC/B;IACD;IAEA,IAAKE,KAAK,CAACC,OAAO,KAAKP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,CAAC4B,gBAAgB,CAAE,SAAS,EAAE3B,mBAAoB,CAAC;EAC1D,OAAO,MAAM;IACZyB,WAAW,CAACG,mBAAmB,CAAE,SAAS,EAAErB,SAAU,CAAC;IACvDR,OAAO,CAAC6B,mBAAmB,CAAE,SAAS,EAAE5B,mBAAoB,CAAC;EAC9D,CAAC;AACF,CAAC","ignoreList":[]}
@@ -2,7 +2,7 @@
2
2
  * Internal dependencies
3
3
  */
4
4
  import { store as blockEditorStore } from '../../../store';
5
- export default (props => element => {
5
+ export default props => element => {
6
6
  function onFocus() {
7
7
  const {
8
8
  registry
@@ -25,5 +25,5 @@ export default (props => element => {
25
25
  return () => {
26
26
  element.removeEventListener('focus', onFocus);
27
27
  };
28
- });
28
+ };
29
29
  //# sourceMappingURL=firefox-compat.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["store","blockEditorStore","props","element","onFocus","registry","current","select","isMultiSelecting","parentEditable","parentElement","closest","focus","addEventListener","removeEventListener"],"sources":["@wordpress/block-editor/src/components/rich-text/event-listeners/firefox-compat.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../../store';\n\nexport default ( props ) => ( element ) => {\n\tfunction onFocus() {\n\t\tconst { registry } = props.current;\n\t\tif ( ! registry.select( blockEditorStore ).isMultiSelecting() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// This is a little hack to work around focus issues with nested\n\t\t// editable elements in Firefox. For some reason the editable child\n\t\t// element sometimes regains focus, while it should not be focusable\n\t\t// and focus should remain on the editable parent element.\n\t\t// To do: try to find the cause of the shifting focus.\n\t\tconst parentEditable = element.parentElement.closest(\n\t\t\t'[contenteditable=\"true\"]'\n\t\t);\n\n\t\tif ( parentEditable ) {\n\t\t\tparentEditable.focus();\n\t\t}\n\t}\n\n\telement.addEventListener( 'focus', onFocus );\n\treturn () => {\n\t\telement.removeEventListener( 'focus', onFocus );\n\t};\n};\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,KAAK,IAAIC,gBAAgB,QAAQ,gBAAgB;AAE1D,gBAAiBC,KAAK,IAAQC,OAAO,IAAM;EAC1C,SAASC,OAAOA,CAAA,EAAG;IAClB,MAAM;MAAEC;IAAS,CAAC,GAAGH,KAAK,CAACI,OAAO;IAClC,IAAK,CAAED,QAAQ,CAACE,MAAM,CAAEN,gBAAiB,CAAC,CAACO,gBAAgB,CAAC,CAAC,EAAG;MAC/D;IACD;;IAEA;IACA;IACA;IACA;IACA;IACA,MAAMC,cAAc,GAAGN,OAAO,CAACO,aAAa,CAACC,OAAO,CACnD,0BACD,CAAC;IAED,IAAKF,cAAc,EAAG;MACrBA,cAAc,CAACG,KAAK,CAAC,CAAC;IACvB;EACD;EAEAT,OAAO,CAACU,gBAAgB,CAAE,OAAO,EAAET,OAAQ,CAAC;EAC5C,OAAO,MAAM;IACZD,OAAO,CAACW,mBAAmB,CAAE,OAAO,EAAEV,OAAQ,CAAC;EAChD,CAAC;AACF,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["store","blockEditorStore","props","element","onFocus","registry","current","select","isMultiSelecting","parentEditable","parentElement","closest","focus","addEventListener","removeEventListener"],"sources":["@wordpress/block-editor/src/components/rich-text/event-listeners/firefox-compat.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../../store';\n\nexport default ( props ) => ( element ) => {\n\tfunction onFocus() {\n\t\tconst { registry } = props.current;\n\t\tif ( ! registry.select( blockEditorStore ).isMultiSelecting() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// This is a little hack to work around focus issues with nested\n\t\t// editable elements in Firefox. For some reason the editable child\n\t\t// element sometimes regains focus, while it should not be focusable\n\t\t// and focus should remain on the editable parent element.\n\t\t// To do: try to find the cause of the shifting focus.\n\t\tconst parentEditable = element.parentElement.closest(\n\t\t\t'[contenteditable=\"true\"]'\n\t\t);\n\n\t\tif ( parentEditable ) {\n\t\t\tparentEditable.focus();\n\t\t}\n\t}\n\n\telement.addEventListener( 'focus', onFocus );\n\treturn () => {\n\t\telement.removeEventListener( 'focus', onFocus );\n\t};\n};\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,KAAK,IAAIC,gBAAgB,QAAQ,gBAAgB;AAE1D,eAAiBC,KAAK,IAAQC,OAAO,IAAM;EAC1C,SAASC,OAAOA,CAAA,EAAG;IAClB,MAAM;MAAEC;IAAS,CAAC,GAAGH,KAAK,CAACI,OAAO;IAClC,IAAK,CAAED,QAAQ,CAACE,MAAM,CAAEN,gBAAiB,CAAC,CAACO,gBAAgB,CAAC,CAAC,EAAG;MAC/D;IACD;;IAEA;IACA;IACA;IACA;IACA;IACA,MAAMC,cAAc,GAAGN,OAAO,CAACO,aAAa,CAACC,OAAO,CACnD,0BACD,CAAC;IAED,IAAKF,cAAc,EAAG;MACrBA,cAAc,CAACG,KAAK,CAAC,CAAC;IACvB;EACD;EAEAT,OAAO,CAACU,gBAAgB,CAAE,OAAO,EAAET,OAAQ,CAAC;EAC5C,OAAO,MAAM;IACZD,OAAO,CAACW,mBAAmB,CAAE,OAAO,EAAEV,OAAQ,CAAC;EAChD,CAAC;AACF,CAAC","ignoreList":[]}
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * WordPress dependencies
3
3
  */
4
- import { useMemo, useRef } from '@wordpress/element';
4
+ import { useMemo, useRef, useInsertionEffect } from '@wordpress/element';
5
5
  import { useRefEffect } from '@wordpress/compose';
6
6
 
7
7
  /**
@@ -21,7 +21,9 @@ import firefoxCompat from './firefox-compat';
21
21
  const allEventListeners = [beforeInputRules, inputRules, insertReplacementText, removeBrowserShortcuts, shortcuts, inputEvents, undoAutomaticChange, pasteHandler, _delete, enter, firefoxCompat];
22
22
  export function useEventListeners(props) {
23
23
  const propsRef = useRef(props);
24
- propsRef.current = props;
24
+ useInsertionEffect(() => {
25
+ propsRef.current = props;
26
+ });
25
27
  const refEffects = useMemo(() => allEventListeners.map(refEffect => refEffect(propsRef)), [propsRef]);
26
28
  return useRefEffect(element => {
27
29
  if (!props.isSelected) {
@@ -1 +1 @@
1
- {"version":3,"names":["useMemo","useRef","useRefEffect","beforeInputRules","inputRules","insertReplacementText","removeBrowserShortcuts","shortcuts","inputEvents","undoAutomaticChange","pasteHandler","_delete","enter","firefoxCompat","allEventListeners","useEventListeners","props","propsRef","current","refEffects","map","refEffect","element","isSelected","cleanups","effect","forEach","cleanup"],"sources":["@wordpress/block-editor/src/components/rich-text/event-listeners/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo, useRef } from '@wordpress/element';\nimport { useRefEffect } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport beforeInputRules from './before-input-rules';\nimport inputRules from './input-rules';\nimport insertReplacementText from './insert-replacement-text';\nimport removeBrowserShortcuts from './remove-browser-shortcuts';\nimport shortcuts from './shortcuts';\nimport inputEvents from './input-events';\nimport undoAutomaticChange from './undo-automatic-change';\nimport pasteHandler from './paste-handler';\nimport _delete from './delete';\nimport enter from './enter';\nimport firefoxCompat from './firefox-compat';\n\nconst allEventListeners = [\n\tbeforeInputRules,\n\tinputRules,\n\tinsertReplacementText,\n\tremoveBrowserShortcuts,\n\tshortcuts,\n\tinputEvents,\n\tundoAutomaticChange,\n\tpasteHandler,\n\t_delete,\n\tenter,\n\tfirefoxCompat,\n];\n\nexport function useEventListeners( props ) {\n\tconst propsRef = useRef( props );\n\tpropsRef.current = props;\n\tconst refEffects = useMemo(\n\t\t() => allEventListeners.map( ( refEffect ) => refEffect( propsRef ) ),\n\t\t[ propsRef ]\n\t);\n\n\treturn useRefEffect(\n\t\t( element ) => {\n\t\t\tif ( ! props.isSelected ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst cleanups = refEffects.map( ( effect ) => effect( element ) );\n\t\t\treturn () => {\n\t\t\t\tcleanups.forEach( ( cleanup ) => cleanup() );\n\t\t\t};\n\t\t},\n\t\t[ refEffects, props.isSelected ]\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,OAAO,EAAEC,MAAM,QAAQ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AEH,KAAK,CAACO,UAAU,CAC/B,CAAC;AACF","ignoreList":[]}
1
+ {"version":3,"names":["useMemo","useRef","useInsertionEffect","useRefEffect","beforeInputRules","inputRules","insertReplacementText","removeBrowserShortcuts","shortcuts","inputEvents","undoAutomaticChange","pasteHandler","_delete","enter","firefoxCompat","allEventListeners","useEventListeners","props","propsRef","current","refEffects","map","refEffect","element","isSelected","cleanups","effect","forEach","cleanup"],"sources":["@wordpress/block-editor/src/components/rich-text/event-listeners/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo, useRef, useInsertionEffect } from '@wordpress/element';\nimport { useRefEffect } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport beforeInputRules from './before-input-rules';\nimport inputRules from './input-rules';\nimport insertReplacementText from './insert-replacement-text';\nimport removeBrowserShortcuts from './remove-browser-shortcuts';\nimport shortcuts from './shortcuts';\nimport inputEvents from './input-events';\nimport undoAutomaticChange from './undo-automatic-change';\nimport pasteHandler from './paste-handler';\nimport _delete from './delete';\nimport enter from './enter';\nimport firefoxCompat from './firefox-compat';\n\nconst allEventListeners = [\n\tbeforeInputRules,\n\tinputRules,\n\tinsertReplacementText,\n\tremoveBrowserShortcuts,\n\tshortcuts,\n\tinputEvents,\n\tundoAutomaticChange,\n\tpasteHandler,\n\t_delete,\n\tenter,\n\tfirefoxCompat,\n];\n\nexport function useEventListeners( props ) {\n\tconst propsRef = useRef( props );\n\tuseInsertionEffect( () => {\n\t\tpropsRef.current = props;\n\t} );\n\tconst refEffects = useMemo(\n\t\t() => allEventListeners.map( ( refEffect ) => refEffect( propsRef ) ),\n\t\t[ propsRef ]\n\t);\n\n\treturn useRefEffect(\n\t\t( element ) => {\n\t\t\tif ( ! props.isSelected ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst cleanups = refEffects.map( ( effect ) => effect( element ) );\n\t\t\treturn () => {\n\t\t\t\tcleanups.forEach( ( cleanup ) => cleanup() );\n\t\t\t};\n\t\t},\n\t\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EH,OAAQ,CAAE,CAAC;IAClE,OAAO,MAAM;MACZE,QAAQ,CAACE,OAAO,CAAIC,OAAO,IAAMA,OAAO,CAAC,CAAE,CAAC;IAC7C,CAAC;EACF,CAAC,EACD,CAAER,UAAU,EAAEH,KAAK,CAACO,UAAU,CAC/B,CAAC;AACF","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- export default (props => element => {
1
+ export default props => element => {
2
2
  const {
3
3
  inputEvents
4
4
  } = props.current;
@@ -11,5 +11,5 @@ export default (props => element => {
11
11
  return () => {
12
12
  element.removeEventListener('input', onInput);
13
13
  };
14
- });
14
+ };
15
15
  //# sourceMappingURL=input-events.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["props","element","inputEvents","current","onInput","event","keyboardShortcut","addEventListener","removeEventListener"],"sources":["@wordpress/block-editor/src/components/rich-text/event-listeners/input-events.js"],"sourcesContent":["export default ( props ) => ( element ) => {\n\tconst { inputEvents } = props.current;\n\tfunction onInput( event ) {\n\t\tfor ( const keyboardShortcut of inputEvents.current ) {\n\t\t\tkeyboardShortcut( event );\n\t\t}\n\t}\n\n\telement.addEventListener( 'input', onInput );\n\treturn () => {\n\t\telement.removeEventListener( 'input', onInput );\n\t};\n};\n"],"mappings":"AAAA,gBAAiBA,KAAK,IAAQC,OAAO,IAAM;EAC1C,MAAM;IAAEC;EAAY,CAAC,GAAGF,KAAK,CAACG,OAAO;EACrC,SAASC,OAAOA,CAAEC,KAAK,EAAG;IACzB,KAAM,MAAMC,gBAAgB,IAAIJ,WAAW,CAACC,OAAO,EAAG;MACrDG,gBAAgB,CAAED,KAAM,CAAC;IAC1B;EACD;EAEAJ,OAAO,CAACM,gBAAgB,CAAE,OAAO,EAAEH,OAAQ,CAAC;EAC5C,OAAO,MAAM;IACZH,OAAO,CAACO,mBAAmB,CAAE,OAAO,EAAEJ,OAAQ,CAAC;EAChD,CAAC;AACF,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["props","element","inputEvents","current","onInput","event","keyboardShortcut","addEventListener","removeEventListener"],"sources":["@wordpress/block-editor/src/components/rich-text/event-listeners/input-events.js"],"sourcesContent":["export default ( props ) => ( element ) => {\n\tconst { inputEvents } = props.current;\n\tfunction onInput( event ) {\n\t\tfor ( const keyboardShortcut of inputEvents.current ) {\n\t\t\tkeyboardShortcut( event );\n\t\t}\n\t}\n\n\telement.addEventListener( 'input', onInput );\n\treturn () => {\n\t\telement.removeEventListener( 'input', onInput );\n\t};\n};\n"],"mappings":"AAAA,eAAiBA,KAAK,IAAQC,OAAO,IAAM;EAC1C,MAAM;IAAEC;EAAY,CAAC,GAAGF,KAAK,CAACG,OAAO;EACrC,SAASC,OAAOA,CAAEC,KAAK,EAAG;IACzB,KAAM,MAAMC,gBAAgB,IAAIJ,WAAW,CAACC,OAAO,EAAG;MACrDG,gBAAgB,CAAED,KAAM,CAAC;IAC1B;EACD;EAEAJ,OAAO,CAACM,gBAAgB,CAAE,OAAO,EAAEH,OAAQ,CAAC;EAC5C,OAAO,MAAM;IACZH,OAAO,CAACO,mBAAmB,CAAE,OAAO,EAAEJ,OAAQ,CAAC;EAChD,CAAC;AACF,CAAC","ignoreList":[]}
@@ -29,7 +29,7 @@ export function findSelection(blocks) {
29
29
  }
30
30
  return [];
31
31
  }
32
- export default (props => element => {
32
+ export default props => element => {
33
33
  function inputRule() {
34
34
  const {
35
35
  getValue,
@@ -123,5 +123,5 @@ export default (props => element => {
123
123
  element.removeEventListener('input', onInput);
124
124
  element.removeEventListener('compositionend', onInput);
125
125
  };
126
- });
126
+ };
127
127
  //# sourceMappingURL=input-rules.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["insert","toHTMLString","getBlockTransforms","findTransform","store","blockEditorStore","preventEventDiscovery","retrieveSelectedAttribute","START_OF_SELECTED_AREA","findSelection","blocks","i","length","attributeKey","attributes","toString","replace","clientId","nestedSelection","innerBlocks","props","element","inputRule","getValue","onReplace","selectionChange","registry","current","value","start","text","characterBefore","slice","trimmedTextBefore","trim","prefixTransforms","filter","type","transformation","prefix","content","block","transform","dispatch","__unstableMarkAutomaticChange","onInput","event","inputType","onChange","__unstableAllowPrefixTransformations","formatTypes","transformed","reduce","accumlator","__unstableInputRule","__unstableMarkLastChangeAsPersistent","activeFormats","addEventListener","removeEventListener"],"sources":["@wordpress/block-editor/src/components/rich-text/event-listeners/input-rules.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { insert, toHTMLString } from '@wordpress/rich-text';\nimport { getBlockTransforms, findTransform } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../../store';\nimport { preventEventDiscovery } from '../prevent-event-discovery';\nimport {\n\tretrieveSelectedAttribute,\n\tSTART_OF_SELECTED_AREA,\n} from '../../../utils/selection';\n\nexport function findSelection( blocks ) {\n\tlet i = blocks.length;\n\n\twhile ( i-- ) {\n\t\tconst attributeKey = retrieveSelectedAttribute(\n\t\t\tblocks[ i ].attributes\n\t\t);\n\n\t\tif ( attributeKey ) {\n\t\t\tblocks[ i ].attributes[ attributeKey ] = blocks[ i ].attributes[\n\t\t\t\tattributeKey\n\t\t\t]\n\t\t\t\t// To do: refactor this to use rich text's selection instead, so\n\t\t\t\t// we no longer have to use on this hack inserting a special\n\t\t\t\t// character.\n\t\t\t\t.toString()\n\t\t\t\t.replace( START_OF_SELECTED_AREA, '' );\n\t\t\treturn [ blocks[ i ].clientId, attributeKey, 0, 0 ];\n\t\t}\n\n\t\tconst nestedSelection = findSelection( blocks[ i ].innerBlocks );\n\n\t\tif ( nestedSelection ) {\n\t\t\treturn nestedSelection;\n\t\t}\n\t}\n\n\treturn [];\n}\n\nexport default ( props ) => ( element ) => {\n\tfunction inputRule() {\n\t\tconst { getValue, onReplace, selectionChange, registry } =\n\t\t\tprops.current;\n\n\t\tif ( ! onReplace ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// We must use getValue() here because value may be update\n\t\t// asynchronously.\n\t\tconst value = getValue();\n\t\tconst { start, text } = value;\n\t\tconst characterBefore = text.slice( start - 1, start );\n\n\t\t// The character right before the caret must be a plain space.\n\t\tif ( characterBefore !== ' ' ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst trimmedTextBefore = text.slice( 0, start ).trim();\n\t\tconst prefixTransforms = getBlockTransforms( 'from' ).filter(\n\t\t\t( { type } ) => type === 'prefix'\n\t\t);\n\t\tconst transformation = findTransform(\n\t\t\tprefixTransforms,\n\t\t\t( { prefix } ) => {\n\t\t\t\treturn trimmedTextBefore === prefix;\n\t\t\t}\n\t\t);\n\n\t\tif ( ! transformation ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst content = toHTMLString( {\n\t\t\tvalue: insert( value, START_OF_SELECTED_AREA, 0, start ),\n\t\t} );\n\t\tconst block = transformation.transform( content );\n\n\t\tselectionChange( ...findSelection( [ block ] ) );\n\t\tonReplace( [ block ] );\n\t\tregistry.dispatch( blockEditorStore ).__unstableMarkAutomaticChange();\n\n\t\treturn true;\n\t}\n\n\tfunction onInput( event ) {\n\t\tconst { inputType, type } = event;\n\t\tconst {\n\t\t\tgetValue,\n\t\t\tonChange,\n\t\t\t__unstableAllowPrefixTransformations,\n\t\t\tformatTypes,\n\t\t\tregistry,\n\t\t} = props.current;\n\n\t\t// Only run input rules when inserting text.\n\t\tif ( inputType !== 'insertText' && type !== 'compositionend' ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( __unstableAllowPrefixTransformations && inputRule() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst value = getValue();\n\t\tconst transformed = formatTypes.reduce(\n\t\t\t( accumlator, { __unstableInputRule } ) => {\n\t\t\t\tif ( __unstableInputRule ) {\n\t\t\t\t\taccumlator = __unstableInputRule( accumlator );\n\t\t\t\t}\n\n\t\t\t\treturn accumlator;\n\t\t\t},\n\t\t\tpreventEventDiscovery( value )\n\t\t);\n\n\t\tconst {\n\t\t\t__unstableMarkLastChangeAsPersistent,\n\t\t\t__unstableMarkAutomaticChange,\n\t\t} = registry.dispatch( blockEditorStore );\n\n\t\tif ( transformed !== value ) {\n\t\t\t__unstableMarkLastChangeAsPersistent();\n\t\t\tonChange( {\n\t\t\t\t...transformed,\n\t\t\t\tactiveFormats: value.activeFormats,\n\t\t\t} );\n\t\t\t__unstableMarkAutomaticChange();\n\t\t}\n\t}\n\n\telement.addEventListener( 'input', onInput );\n\telement.addEventListener( 'compositionend', onInput );\n\treturn () => {\n\t\telement.removeEventListener( 'input', onInput );\n\t\telement.removeEventListener( 'compositionend', onInput );\n\t};\n};\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,MAAM,EAAEC,YAAY,QAAQ,sBAAsB;AAC3D,SAASC,kBAAkB,EAAEC,aAAa,QAAQ,mBAAmB;;AAErE;AACA;AACA;AACA,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,gBAAgB;AAC1D,SAASC,qBAAqB,QAAQ,4BAA4B;AAClE,SACCC,yBAAyB,EACzBC,sBAAsB,QAChB,0BAA0B;AAEjC,OAAO,SAASC,aAAaA,CAAEC,MAAM,EAAG;EACvC,IAAIC,CAAC,GAAGD,MAAM,CAACE,MAAM;EAErB,OAAQD,CAAC,EAAE,EAAG;IACb,MAAME,YAAY,GAAGN,yBAAyB,CAC7CG,MAAM,CAAEC,CAAC,CAAE,CAACG,UACb,CAAC;IAED,IAAKD,YAAY,EAAG;MACnBH,MAAM,CAAEC,CAAC,CAAE,CAACG,UAAU,CAAED,YAAY,CAAE,GAAGH,MAAM,CAAEC,CAAC,CAAE,CAACG,UAAU,CAC9DD,YAAY;MAEZ;MACA;MACA;MAAA,CACCE,QAAQ,CAAC,CAAC,CACVC,OAAO,CAAER,sBAAsB,EAAE,EAAG,CAAC;MACvC,OAAO,CAAEE,MAAM,CAAEC,CAAC,CAAE,CAACM,QAAQ,EAAEJ,YAAY,EAAE,CAAC,EAAE,CAAC,CAAE;IACpD;IAEA,MAAMK,eAAe,GAAGT,aAAa,CAAEC,MAAM,CAAEC,CAAC,CAAE,CAACQ,WAAY,CAAC;IAEhE,IAAKD,eAAe,EA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C;EACrD,OAAO,MAAM;IACZxB,OAAO,CAACqC,mBAAmB,CAAE,OAAO,EAAEb,OAAQ,CAAC;IAC/CxB,OAAO,CAACqC,mBAAmB,CAAE,gBAAgB,EAAEb,OAAQ,CAAC;EACzD,CAAC;AACF,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["insert","toHTMLString","getBlockTransforms","findTransform","store","blockEditorStore","preventEventDiscovery","retrieveSelectedAttribute","START_OF_SELECTED_AREA","findSelection","blocks","i","length","attributeKey","attributes","toString","replace","clientId","nestedSelection","innerBlocks","props","element","inputRule","getValue","onReplace","selectionChange","registry","current","value","start","text","characterBefore","slice","trimmedTextBefore","trim","prefixTransforms","filter","type","transformation","prefix","content","block","transform","dispatch","__unstableMarkAutomaticChange","onInput","event","inputType","onChange","__unstableAllowPrefixTransformations","formatTypes","transformed","reduce","accumlator","__unstableInputRule","__unstableMarkLastChangeAsPersistent","activeFormats","addEventListener","removeEventListener"],"sources":["@wordpress/block-editor/src/components/rich-text/event-listeners/input-rules.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { insert, toHTMLString } from '@wordpress/rich-text';\nimport { getBlockTransforms, findTransform } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../../store';\nimport { preventEventDiscovery } from '../prevent-event-discovery';\nimport {\n\tretrieveSelectedAttribute,\n\tSTART_OF_SELECTED_AREA,\n} from '../../../utils/selection';\n\nexport function findSelection( blocks ) {\n\tlet i = blocks.length;\n\n\twhile ( i-- ) {\n\t\tconst attributeKey = retrieveSelectedAttribute(\n\t\t\tblocks[ i ].attributes\n\t\t);\n\n\t\tif ( attributeKey ) {\n\t\t\tblocks[ i ].attributes[ attributeKey ] = blocks[ i ].attributes[\n\t\t\t\tattributeKey\n\t\t\t]\n\t\t\t\t// To do: refactor this to use rich text's selection instead, so\n\t\t\t\t// we no longer have to use on this hack inserting a special\n\t\t\t\t// character.\n\t\t\t\t.toString()\n\t\t\t\t.replace( START_OF_SELECTED_AREA, '' );\n\t\t\treturn [ blocks[ i ].clientId, attributeKey, 0, 0 ];\n\t\t}\n\n\t\tconst nestedSelection = findSelection( blocks[ i ].innerBlocks );\n\n\t\tif ( nestedSelection ) {\n\t\t\treturn nestedSelection;\n\t\t}\n\t}\n\n\treturn [];\n}\n\nexport default ( props ) => ( element ) => {\n\tfunction inputRule() {\n\t\tconst { getValue, onReplace, selectionChange, registry } =\n\t\t\tprops.current;\n\n\t\tif ( ! onReplace ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// We must use getValue() here because value may be update\n\t\t// asynchronously.\n\t\tconst value = getValue();\n\t\tconst { start, text } = value;\n\t\tconst characterBefore = text.slice( start - 1, start );\n\n\t\t// The character right before the caret must be a plain space.\n\t\tif ( characterBefore !== ' ' ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst trimmedTextBefore = text.slice( 0, start ).trim();\n\t\tconst prefixTransforms = getBlockTransforms( 'from' ).filter(\n\t\t\t( { type } ) => type === 'prefix'\n\t\t);\n\t\tconst transformation = findTransform(\n\t\t\tprefixTransforms,\n\t\t\t( { prefix } ) => {\n\t\t\t\treturn trimmedTextBefore === prefix;\n\t\t\t}\n\t\t);\n\n\t\tif ( ! transformation ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst content = toHTMLString( {\n\t\t\tvalue: insert( value, START_OF_SELECTED_AREA, 0, start ),\n\t\t} );\n\t\tconst block = transformation.transform( content );\n\n\t\tselectionChange( ...findSelection( [ block ] ) );\n\t\tonReplace( [ block ] );\n\t\tregistry.dispatch( blockEditorStore ).__unstableMarkAutomaticChange();\n\n\t\treturn true;\n\t}\n\n\tfunction onInput( event ) {\n\t\tconst { inputType, type } = event;\n\t\tconst {\n\t\t\tgetValue,\n\t\t\tonChange,\n\t\t\t__unstableAllowPrefixTransformations,\n\t\t\tformatTypes,\n\t\t\tregistry,\n\t\t} = props.current;\n\n\t\t// Only run input rules when inserting text.\n\t\tif ( inputType !== 'insertText' && type !== 'compositionend' ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( __unstableAllowPrefixTransformations && inputRule() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst value = getValue();\n\t\tconst transformed = formatTypes.reduce(\n\t\t\t( accumlator, { __unstableInputRule } ) => {\n\t\t\t\tif ( __unstableInputRule ) {\n\t\t\t\t\taccumlator = __unstableInputRule( accumlator );\n\t\t\t\t}\n\n\t\t\t\treturn accumlator;\n\t\t\t},\n\t\t\tpreventEventDiscovery( value )\n\t\t);\n\n\t\tconst {\n\t\t\t__unstableMarkLastChangeAsPersistent,\n\t\t\t__unstableMarkAutomaticChange,\n\t\t} = registry.dispatch( blockEditorStore );\n\n\t\tif ( transformed !== value ) {\n\t\t\t__unstableMarkLastChangeAsPersistent();\n\t\t\tonChange( {\n\t\t\t\t...transformed,\n\t\t\t\tactiveFormats: value.activeFormats,\n\t\t\t} );\n\t\t\t__unstableMarkAutomaticChange();\n\t\t}\n\t}\n\n\telement.addEventListener( 'input', onInput );\n\telement.addEventListener( 'compositionend', onInput );\n\treturn () => {\n\t\telement.removeEventListener( 'input', onInput );\n\t\telement.removeEventListener( 'compositionend', onInput );\n\t};\n};\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,MAAM,EAAEC,YAAY,QAAQ,sBAAsB;AAC3D,SAASC,kBAAkB,EAAEC,aAAa,QAAQ,mBAAmB;;AAErE;AACA;AACA;AACA,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,gBAAgB;AAC1D,SAASC,qBAAqB,QAAQ,4BAA4B;AAClE,SACCC,yBAAyB,EACzBC,sBAAsB,QAChB,0BAA0B;AAEjC,OAAO,SAASC,aAAaA,CAAEC,MAAM,EAAG;EACvC,IAAIC,CAAC,GAAGD,MAAM,CAACE,MAAM;EAErB,OAAQD,CAAC,EAAE,EAAG;IACb,MAAME,YAAY,GAAGN,yBAAyB,CAC7CG,MAAM,CAAEC,CAAC,CAAE,CAACG,UACb,CAAC;IAED,IAAKD,YAAY,EAAG;MACn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