@wordpress/block-editor 16.1.0 → 16.2.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 (1906) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/README.md +13 -1
  3. package/build/autocompleters/block.cjs.map +2 -2
  4. package/build/components/alignment-control/index.cjs.map +2 -2
  5. package/build/components/alignment-control/ui.cjs.map +2 -2
  6. package/build/components/autocomplete/index.cjs.map +2 -2
  7. package/build/components/background-image-control/index.cjs.map +2 -2
  8. package/build/components/block-actions/index.cjs +2 -1
  9. package/build/components/block-actions/index.cjs.map +2 -2
  10. package/build/components/block-alignment-control/constants.cjs.map +2 -2
  11. package/build/components/block-alignment-control/index.cjs.map +2 -2
  12. package/build/components/block-alignment-control/ui.cjs.map +2 -2
  13. package/build/components/block-alignment-control/use-available-alignments.cjs.map +2 -2
  14. package/build/components/block-alignment-matrix-control/index.cjs.map +2 -2
  15. package/build/components/block-allowed-blocks/allowed-blocks-control.cjs.map +2 -2
  16. package/build/components/block-allowed-blocks/modal.cjs.map +2 -2
  17. package/build/components/block-bindings/attribute-control.cjs.map +2 -2
  18. package/build/components/block-bindings/index.cjs.map +2 -2
  19. package/build/components/block-bindings/source-fields-list.cjs.map +2 -2
  20. package/build/components/block-bindings/use-block-bindings-utils.cjs.map +2 -2
  21. package/build/components/block-breadcrumb/index.cjs.map +2 -2
  22. package/build/components/block-canvas/index.cjs.map +2 -2
  23. package/build/components/block-card/index.cjs.map +2 -2
  24. package/build/components/block-compare/block-view.cjs.map +2 -2
  25. package/build/components/block-compare/index.cjs.map +2 -2
  26. package/build/components/block-content-overlay/index.cjs.map +2 -2
  27. package/build/components/block-context/index.cjs.map +2 -2
  28. package/build/components/block-controls/fill.cjs.map +2 -2
  29. package/build/components/block-controls/groups.cjs.map +2 -2
  30. package/build/components/block-controls/hook.cjs.map +2 -2
  31. package/build/components/block-controls/index.cjs.map +2 -2
  32. package/build/components/block-controls/slot.cjs.map +2 -2
  33. package/build/components/block-draggable/draggable-chip.cjs.map +2 -2
  34. package/build/components/block-draggable/index.cjs.map +2 -2
  35. package/build/components/block-draggable/use-scroll-when-dragging.cjs.map +2 -2
  36. package/build/components/block-edit/context.cjs.map +2 -2
  37. package/build/components/block-edit/edit.cjs.map +2 -2
  38. package/build/components/block-edit/index.cjs.map +2 -2
  39. package/build/components/block-edit/multiple-usage-warning.cjs.map +2 -2
  40. package/build/components/block-edit-visually-button/index.cjs.map +2 -2
  41. package/build/components/block-editing-mode/index.cjs.map +2 -2
  42. package/build/components/block-full-height-alignment-control/index.cjs.map +2 -2
  43. package/build/components/block-heading-level-dropdown/heading-level-icon.cjs.map +2 -2
  44. package/build/components/block-heading-level-dropdown/index.cjs.map +2 -2
  45. package/build/components/block-icon/index.cjs.map +2 -2
  46. package/build/components/block-inspector/edit-contents.cjs +48 -40
  47. package/build/components/block-inspector/edit-contents.cjs.map +3 -3
  48. package/build/components/block-inspector/index.cjs +9 -4
  49. package/build/components/block-inspector/index.cjs.map +2 -2
  50. package/build/components/block-inspector/inspector-pre-tabs-slot-fill.cjs.map +2 -2
  51. package/build/components/block-inspector/useBlockInspectorAnimationSettings.cjs.map +2 -2
  52. package/build/components/block-list/block-crash-boundary.cjs.map +2 -2
  53. package/build/components/block-list/block-crash-warning.cjs.map +2 -2
  54. package/build/components/block-list/block-html.cjs.map +2 -2
  55. package/build/components/block-list/block-invalid-warning.cjs.map +2 -2
  56. package/build/components/block-list/block.cjs +36 -10
  57. package/build/components/block-list/block.cjs.map +3 -3
  58. package/build/components/block-list/index.cjs +33 -9
  59. package/build/components/block-list/index.cjs.map +2 -2
  60. package/build/components/block-list/layout.cjs.map +2 -2
  61. package/build/components/block-list/private-block-context.cjs.map +2 -2
  62. package/build/components/block-list/subdirectory-icon.cjs.map +2 -2
  63. package/build/components/block-list/use-block-props/index.cjs +36 -2
  64. package/build/components/block-list/use-block-props/index.cjs.map +3 -3
  65. package/build/components/block-list/use-block-props/use-block-refs.cjs.map +2 -2
  66. package/build/components/block-list/use-block-props/use-firefox-draggable-compatibility.cjs.map +2 -2
  67. package/build/components/block-list/use-block-props/use-focus-first-element.cjs.map +2 -2
  68. package/build/components/block-list/use-block-props/use-focus-handler.cjs.map +2 -2
  69. package/build/components/block-list/use-block-props/use-intersection-observer.cjs.map +2 -2
  70. package/build/components/block-list/use-block-props/use-is-hovered.cjs.map +2 -2
  71. package/build/components/block-list/use-block-props/use-register-block-event-handlers.cjs.map +2 -2
  72. package/build/components/block-list/use-block-props/use-scroll-into-view.cjs.map +2 -2
  73. package/build/components/block-list/use-block-props/use-selected-block-event-handlers.cjs.map +2 -2
  74. package/build/components/block-list/use-in-between-inserter.cjs.map +2 -2
  75. package/build/components/block-list/zoom-out-separator.cjs.map +2 -2
  76. package/build/components/block-list-appender/index.cjs.map +2 -2
  77. package/build/components/block-lock/menu-item.cjs.map +2 -2
  78. package/build/components/block-lock/modal.cjs.map +2 -2
  79. package/build/components/block-lock/toolbar.cjs.map +2 -2
  80. package/build/components/block-lock/use-block-lock.cjs.map +2 -2
  81. package/build/components/block-manager/category.cjs.map +2 -2
  82. package/build/components/block-manager/checklist.cjs.map +2 -2
  83. package/build/components/block-manager/index.cjs.map +2 -2
  84. package/build/components/block-mover/button.cjs +15 -9
  85. package/build/components/block-mover/button.cjs.map +2 -2
  86. package/build/components/block-mover/index.cjs.map +2 -2
  87. package/build/components/block-mover/mover-description.cjs.map +2 -2
  88. package/build/components/block-navigation/dropdown.cjs.map +2 -2
  89. package/build/components/block-parent-selector/index.cjs.map +2 -2
  90. package/build/components/block-pattern-setup/index.cjs.map +2 -2
  91. package/build/components/block-pattern-setup/setup-toolbar.cjs.map +2 -2
  92. package/build/components/block-pattern-setup/use-patterns-setup.cjs.map +2 -2
  93. package/build/components/block-patterns-list/index.cjs.map +2 -2
  94. package/build/components/block-patterns-paging/index.cjs.map +2 -2
  95. package/build/components/block-popover/cover.cjs.map +2 -2
  96. package/build/components/block-popover/drop-zone.cjs.map +2 -2
  97. package/build/components/block-popover/inbetween.cjs.map +2 -2
  98. package/build/components/block-popover/index.cjs.map +2 -2
  99. package/build/components/block-popover/use-popover-scroll.cjs.map +2 -2
  100. package/build/components/block-preview/async.cjs.map +2 -2
  101. package/build/components/block-preview/auto.cjs.map +2 -2
  102. package/build/components/block-preview/index.cjs.map +2 -2
  103. package/build/components/block-quick-navigation/index.cjs.map +2 -2
  104. package/build/components/block-removal-warning-modal/index.cjs.map +2 -2
  105. package/build/components/block-rename/modal.cjs.map +2 -2
  106. package/build/components/block-rename/rename-control.cjs.map +2 -2
  107. package/build/components/block-rename/use-block-rename.cjs.map +2 -2
  108. package/build/components/block-selection-clearer/index.cjs.map +2 -2
  109. package/build/components/block-settings-menu/block-html-convert-button.cjs.map +2 -2
  110. package/build/components/block-settings-menu/block-mode-toggle.cjs.map +2 -2
  111. package/build/components/block-settings-menu/block-parent-selector-menu-item.cjs.map +2 -2
  112. package/build/components/block-settings-menu/block-settings-dropdown.cjs +1 -1
  113. package/build/components/block-settings-menu/block-settings-dropdown.cjs.map +2 -2
  114. package/build/components/block-settings-menu/block-settings-menu-first-item.cjs.map +2 -2
  115. package/build/components/block-settings-menu/index.cjs.map +2 -2
  116. package/build/components/block-settings-menu-controls/index.cjs.map +2 -2
  117. package/build/components/block-styles/index.cjs.map +2 -2
  118. package/build/components/block-styles/menu-items.cjs.map +2 -2
  119. package/build/components/block-styles/use-styles-for-block.cjs.map +2 -2
  120. package/build/components/block-styles/utils.cjs.map +2 -2
  121. package/build/components/block-switcher/block-styles-menu.cjs.map +2 -2
  122. package/build/components/block-switcher/block-transformations-menu.cjs.map +2 -2
  123. package/build/components/block-switcher/block-variation-transformations.cjs.map +2 -2
  124. package/build/components/block-switcher/index.cjs.map +2 -2
  125. package/build/components/block-switcher/pattern-transformations-menu.cjs.map +2 -2
  126. package/build/components/block-switcher/preview-block-popover.cjs.map +2 -2
  127. package/build/components/block-switcher/use-transformed-patterns.cjs.map +2 -2
  128. package/build/components/block-switcher/utils.cjs.map +2 -2
  129. package/build/components/block-title/index.cjs.map +2 -2
  130. package/build/components/block-title/use-block-display-title.cjs.map +2 -2
  131. package/build/components/block-toolbar/block-styles-dropdown.cjs.map +2 -2
  132. package/build/components/block-toolbar/block-toolbar-icon.cjs.map +2 -2
  133. package/build/components/block-toolbar/block-toolbar-last-item.cjs.map +2 -2
  134. package/build/components/block-toolbar/change-design.cjs.map +2 -2
  135. package/build/components/block-toolbar/edit-section-button.cjs.map +2 -2
  136. package/build/components/block-toolbar/index.cjs.map +2 -2
  137. package/build/components/block-toolbar/pattern-overrides-dropdown.cjs.map +2 -2
  138. package/build/components/block-toolbar/switch-section-style.cjs.map +2 -2
  139. package/build/components/block-toolbar/use-has-block-toolbar.cjs.map +2 -2
  140. package/build/components/block-toolbar/utils.cjs.map +2 -2
  141. package/build/components/block-tools/block-toolbar-popover.cjs.map +2 -2
  142. package/build/components/block-tools/empty-block-inserter.cjs.map +2 -2
  143. package/build/components/block-tools/index.cjs +2 -4
  144. package/build/components/block-tools/index.cjs.map +2 -2
  145. package/build/components/block-tools/insertion-point.cjs.map +2 -2
  146. package/build/components/block-tools/use-block-toolbar-popover-props.cjs.map +2 -2
  147. package/build/components/block-tools/use-selected-block-tool-props.cjs.map +2 -2
  148. package/build/components/block-tools/use-show-block-tools.cjs.map +2 -2
  149. package/build/components/block-tools/zoom-out-mode-inserter-button.cjs.map +2 -2
  150. package/build/components/block-tools/zoom-out-mode-inserters.cjs.map +2 -2
  151. package/build/components/block-types-list/index.cjs.map +2 -2
  152. package/build/components/block-variation-picker/index.cjs.map +2 -2
  153. package/build/components/block-variation-transforms/index.cjs.map +2 -2
  154. package/build/components/block-vertical-alignment-control/index.cjs.map +2 -2
  155. package/build/components/block-vertical-alignment-control/ui.cjs.map +2 -2
  156. package/build/components/block-visibility/constants.cjs +1 -1
  157. package/build/components/block-visibility/constants.cjs.map +3 -3
  158. package/build/components/block-visibility/modal.cjs.map +2 -2
  159. package/build/components/block-visibility/use-block-visibility.cjs +15 -17
  160. package/build/components/block-visibility/use-block-visibility.cjs.map +3 -3
  161. package/build/components/block-visibility/utils.cjs.map +2 -2
  162. package/build/components/block-visibility/viewport-menu-item.cjs.map +2 -2
  163. package/build/components/block-visibility/viewport-toolbar.cjs.map +2 -2
  164. package/build/components/block-visibility/viewport-visibility-info.cjs.map +2 -2
  165. package/build/components/border-radius-control/constants.cjs.map +2 -2
  166. package/build/components/border-radius-control/index.cjs.map +2 -2
  167. package/build/components/border-radius-control/linked-button.cjs.map +2 -2
  168. package/build/components/border-radius-control/utils.cjs.map +2 -2
  169. package/build/components/button-block-appender/index.cjs.map +2 -2
  170. package/build/components/child-layout-control/index.cjs.map +2 -2
  171. package/build/components/collab/note-icon-slot.cjs.map +2 -2
  172. package/build/components/collab/note-icon-toolbar-slot.cjs.map +2 -2
  173. package/build/components/color-palette/control.cjs.map +2 -2
  174. package/build/components/color-palette/index.cjs.map +2 -2
  175. package/build/components/color-palette/with-color-context.cjs.map +2 -2
  176. package/build/components/color-style-selector/index.cjs.map +2 -2
  177. package/build/components/colors/utils.cjs +2 -4
  178. package/build/components/colors/utils.cjs.map +3 -3
  179. package/build/components/colors/with-colors.cjs +2 -4
  180. package/build/components/colors/with-colors.cjs.map +3 -3
  181. package/build/components/colors-gradients/control.cjs.map +2 -2
  182. package/build/components/colors-gradients/dropdown.cjs.map +2 -2
  183. package/build/components/colors-gradients/panel-color-gradient-settings.cjs +5 -5
  184. package/build/components/colors-gradients/panel-color-gradient-settings.cjs.map +2 -2
  185. package/build/components/colors-gradients/use-multiple-origin-colors-and-gradients.cjs.map +2 -2
  186. package/build/components/contrast-checker/index.cjs.map +2 -2
  187. package/build/components/convert-to-group-buttons/index.cjs +2 -5
  188. package/build/components/convert-to-group-buttons/index.cjs.map +2 -2
  189. package/build/components/convert-to-group-buttons/toolbar.cjs +2 -4
  190. package/build/components/convert-to-group-buttons/toolbar.cjs.map +2 -2
  191. package/build/components/convert-to-group-buttons/use-convert-to-group-button-props.cjs.map +2 -2
  192. package/build/components/copy-handler/index.cjs.map +2 -2
  193. package/build/components/date-format-picker/index.cjs.map +2 -2
  194. package/build/components/default-block-appender/index.cjs.map +2 -2
  195. package/build/components/dimension-control/index.cjs.map +2 -2
  196. package/build/components/dimensions-tool/aspect-ratio-tool.cjs.map +2 -2
  197. package/build/components/dimensions-tool/index.cjs.map +2 -2
  198. package/build/components/dimensions-tool/scale-tool.cjs.map +2 -2
  199. package/build/components/dimensions-tool/width-height-tool.cjs.map +2 -2
  200. package/build/components/duotone-control/index.cjs.map +2 -2
  201. package/build/components/editable-text/index.cjs.map +2 -2
  202. package/build/components/editor-styles/index.cjs.map +2 -2
  203. package/build/components/fit-text-size-warning/index.cjs.map +2 -2
  204. package/build/components/floating-toolbar/nav-up-icon.cjs.map +2 -2
  205. package/build/components/font-appearance-control/index.cjs.map +2 -2
  206. package/build/components/font-family/index.cjs.map +2 -2
  207. package/build/components/font-sizes/font-size-picker.cjs.map +2 -2
  208. package/build/components/font-sizes/utils.cjs +2 -4
  209. package/build/components/font-sizes/utils.cjs.map +3 -3
  210. package/build/components/font-sizes/with-font-sizes.cjs.map +2 -2
  211. package/build/components/global-styles/advanced-panel.cjs.map +2 -2
  212. package/build/components/global-styles/background-panel.cjs.map +2 -2
  213. package/build/components/global-styles/border-panel.cjs.map +2 -2
  214. package/build/components/global-styles/color-gradient-dropdown-item.cjs.map +2 -2
  215. package/build/components/global-styles/color-panel.cjs.map +2 -2
  216. package/build/components/global-styles/dimensions-panel.cjs.map +2 -2
  217. package/build/components/global-styles/filters-panel.cjs.map +2 -2
  218. package/build/components/global-styles/hooks.cjs.map +2 -2
  219. package/build/components/global-styles/image-settings-panel.cjs.map +2 -2
  220. package/build/components/global-styles/inheritance/index.cjs.map +2 -2
  221. package/build/components/global-styles/inherited-value-context.cjs.map +2 -2
  222. package/build/components/global-styles/shadow-panel-components.cjs.map +2 -2
  223. package/build/components/global-styles/state-control-badges.cjs.map +2 -2
  224. package/build/components/global-styles/state-control.cjs.map +2 -2
  225. package/build/components/global-styles/typography-panel.cjs.map +2 -2
  226. package/build/components/global-styles/typography-utils.cjs.map +2 -2
  227. package/build/components/global-styles/utils.cjs.map +2 -2
  228. package/build/components/gradients/use-gradient.cjs.map +2 -2
  229. package/build/components/gradients/with-gradient.cjs.map +2 -2
  230. package/build/components/grid/grid-item-movers.cjs.map +2 -2
  231. package/build/components/grid/grid-item-resizer.cjs.map +2 -2
  232. package/build/components/grid/grid-visualizer.cjs.map +2 -2
  233. package/build/components/grid/use-get-number-of-blocks-before-cell.cjs.map +2 -2
  234. package/build/components/grid/use-grid-layout-sync.cjs.map +2 -2
  235. package/build/components/height-control/index.cjs.map +2 -2
  236. package/build/components/html-element-control/index.cjs.map +2 -2
  237. package/build/components/html-element-control/messages.cjs.map +2 -2
  238. package/build/components/iframe/index.cjs +19 -24
  239. package/build/components/iframe/index.cjs.map +2 -2
  240. package/build/components/iframe/use-scale-canvas.cjs +20 -6
  241. package/build/components/iframe/use-scale-canvas.cjs.map +2 -2
  242. package/build/components/image-editor/aspect-ratio-dropdown.cjs.map +2 -2
  243. package/build/components/image-editor/context.cjs.map +2 -2
  244. package/build/components/image-editor/cropper.cjs.map +2 -2
  245. package/build/components/image-editor/form-controls.cjs.map +2 -2
  246. package/build/components/image-editor/index.cjs.map +2 -2
  247. package/build/components/image-editor/rotation-button.cjs.map +2 -2
  248. package/build/components/image-editor/use-save-image.cjs.map +2 -2
  249. package/build/components/image-editor/use-transform-image.cjs.map +2 -2
  250. package/build/components/image-editor/zoom-dropdown.cjs.map +2 -2
  251. package/build/components/image-size-control/index.cjs.map +2 -2
  252. package/build/components/image-size-control/use-dimension-handler.cjs.map +2 -2
  253. package/build/components/inner-blocks/button-block-appender.cjs.map +2 -2
  254. package/build/components/inner-blocks/default-block-appender.cjs.map +2 -2
  255. package/build/components/inner-blocks/index.cjs.map +2 -2
  256. package/build/components/inner-blocks/use-block-context.cjs.map +2 -2
  257. package/build/components/inner-blocks/use-inner-block-template-sync.cjs +34 -7
  258. package/build/components/inner-blocks/use-inner-block-template-sync.cjs.map +3 -3
  259. package/build/components/inner-blocks/use-nested-settings-update.cjs.map +2 -2
  260. package/build/components/inner-content/index.cjs.map +2 -2
  261. package/build/components/inserter/block-patterns-explorer/index.cjs.map +2 -2
  262. package/build/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.cjs.map +2 -2
  263. package/build/components/inserter/block-patterns-explorer/pattern-list.cjs.map +2 -2
  264. package/build/components/inserter/block-patterns-tab/index.cjs.map +2 -2
  265. package/build/components/inserter/block-patterns-tab/pattern-category-previews.cjs.map +2 -2
  266. package/build/components/inserter/block-patterns-tab/patterns-filter.cjs.map +2 -2
  267. package/build/components/inserter/block-patterns-tab/use-pattern-categories.cjs.map +2 -2
  268. package/build/components/inserter/block-patterns-tab/utils.cjs.map +2 -2
  269. package/build/components/inserter/block-types-tab.cjs.map +2 -2
  270. package/build/components/inserter/category-tabs/index.cjs.map +2 -2
  271. package/build/components/inserter/hooks/use-block-types-state.cjs.map +2 -2
  272. package/build/components/inserter/hooks/use-insertion-point.cjs.map +2 -2
  273. package/build/components/inserter/hooks/use-patterns-paging.cjs.map +2 -2
  274. package/build/components/inserter/hooks/use-patterns-state.cjs.map +2 -2
  275. package/build/components/inserter/index.cjs +4 -13
  276. package/build/components/inserter/index.cjs.map +2 -2
  277. package/build/components/inserter/library.cjs.map +2 -2
  278. package/build/components/inserter/media-tab/hooks.cjs.map +2 -2
  279. package/build/components/inserter/media-tab/media-list.cjs.map +2 -2
  280. package/build/components/inserter/media-tab/media-panel.cjs.map +2 -2
  281. package/build/components/inserter/media-tab/media-preview.cjs.map +2 -2
  282. package/build/components/inserter/media-tab/media-tab.cjs.map +2 -2
  283. package/build/components/inserter/media-tab/utils.cjs.map +2 -2
  284. package/build/components/inserter/menu.cjs.map +2 -2
  285. package/build/components/inserter/mobile-tab-navigation.cjs.map +2 -2
  286. package/build/components/inserter/no-results.cjs.map +2 -2
  287. package/build/components/inserter/panel.cjs.map +2 -2
  288. package/build/components/inserter/preview-panel.cjs.map +2 -2
  289. package/build/components/inserter/quick-inserter.cjs.map +2 -2
  290. package/build/components/inserter/search-items.cjs.map +2 -2
  291. package/build/components/inserter/search-results.cjs.map +2 -2
  292. package/build/components/inserter/tips.cjs.map +2 -2
  293. package/build/components/inserter-button/sparkles.cjs.map +2 -2
  294. package/build/components/inserter-draggable-blocks/index.cjs.map +2 -2
  295. package/build/components/inserter-list-item/index.cjs.map +2 -2
  296. package/build/components/inserter-listbox/context.cjs.map +2 -2
  297. package/build/components/inserter-listbox/group.cjs.map +2 -2
  298. package/build/components/inserter-listbox/index.cjs.map +2 -2
  299. package/build/components/inserter-listbox/item.cjs.map +2 -2
  300. package/build/components/inserter-listbox/row.cjs.map +2 -2
  301. package/build/components/inserter-menu-extension/index.cjs.map +2 -2
  302. package/build/components/inspector-controls/block-support-slot-container.cjs.map +2 -2
  303. package/build/components/inspector-controls/block-support-tools-panel.cjs.map +2 -2
  304. package/build/components/inspector-controls/fill.cjs +15 -17
  305. package/build/components/inspector-controls/fill.cjs.map +2 -2
  306. package/build/components/inspector-controls/groups.cjs.map +2 -2
  307. package/build/components/inspector-controls/index.cjs.map +2 -2
  308. package/build/components/inspector-controls/last-item.cjs.map +2 -2
  309. package/build/components/inspector-controls/list-view-content-popover.cjs.map +2 -2
  310. package/build/components/inspector-controls/slot.cjs.map +2 -2
  311. package/build/components/inspector-controls-tabs/advanced-controls-panel.cjs.map +2 -2
  312. package/build/components/inspector-controls-tabs/content-tab.cjs.map +2 -2
  313. package/build/components/inspector-controls-tabs/index.cjs.map +2 -2
  314. package/build/components/inspector-controls-tabs/position-controls-panel.cjs.map +2 -2
  315. package/build/components/inspector-controls-tabs/settings-tab.cjs.map +2 -2
  316. package/build/components/inspector-controls-tabs/styles-tab.cjs.map +2 -2
  317. package/build/components/inspector-controls-tabs/use-inspector-controls-tabs.cjs.map +2 -2
  318. package/build/components/inspector-controls-tabs/utils.cjs.map +2 -2
  319. package/build/components/inspector-popover-header/index.cjs.map +2 -2
  320. package/build/components/justify-content-control/index.cjs.map +2 -2
  321. package/build/components/justify-content-control/ui.cjs.map +2 -2
  322. package/build/components/keyboard-shortcuts/index.cjs.map +2 -2
  323. package/build/components/letter-spacing-control/index.cjs.map +2 -2
  324. package/build/components/line-height-control/index.cjs.map +2 -2
  325. package/build/components/link-control/constants.cjs.map +2 -2
  326. package/build/components/link-control/index.cjs.map +2 -2
  327. package/build/components/link-control/is-url-like.cjs.map +2 -2
  328. package/build/components/link-control/link-preview.cjs.map +2 -2
  329. package/build/components/link-control/normalize-url.cjs.map +2 -2
  330. package/build/components/link-control/search-create-button.cjs.map +2 -2
  331. package/build/components/link-control/search-input.cjs.map +2 -2
  332. package/build/components/link-control/search-item.cjs.map +2 -2
  333. package/build/components/link-control/search-results.cjs +1 -1
  334. package/build/components/link-control/search-results.cjs.map +2 -2
  335. package/build/components/link-control/settings-drawer.cjs.map +2 -2
  336. package/build/components/link-control/settings.cjs.map +2 -2
  337. package/build/components/link-control/use-create-page.cjs.map +2 -2
  338. package/build/components/link-control/use-internal-value.cjs.map +2 -2
  339. package/build/components/link-control/use-rich-url-data.cjs +1 -1
  340. package/build/components/link-control/use-rich-url-data.cjs.map +2 -2
  341. package/build/components/link-control/use-search-handler.cjs.map +2 -2
  342. package/build/components/link-control/viewer-slot.cjs.map +2 -2
  343. package/build/components/link-picker/link-picker.cjs.map +2 -2
  344. package/build/components/link-picker/link-preview.cjs.map +2 -2
  345. package/build/components/list-view/appender.cjs +6 -3
  346. package/build/components/list-view/appender.cjs.map +2 -2
  347. package/build/components/list-view/aria-referenced-text.cjs +2 -9
  348. package/build/components/list-view/aria-referenced-text.cjs.map +2 -2
  349. package/build/components/list-view/block-contents.cjs +17 -20
  350. package/build/components/list-view/block-contents.cjs.map +2 -2
  351. package/build/components/list-view/block-select-button.cjs +40 -19
  352. package/build/components/list-view/block-select-button.cjs.map +3 -3
  353. package/build/components/list-view/block.cjs +38 -41
  354. package/build/components/list-view/block.cjs.map +3 -3
  355. package/build/components/list-view/branch.cjs +93 -77
  356. package/build/components/list-view/branch.cjs.map +3 -3
  357. package/build/components/list-view/context.cjs +16 -2
  358. package/build/components/list-view/context.cjs.map +2 -2
  359. package/build/components/list-view/drop-indicator.cjs +4 -3
  360. package/build/components/list-view/drop-indicator.cjs.map +3 -3
  361. package/build/components/list-view/expander.cjs.map +2 -2
  362. package/build/components/list-view/index.cjs +83 -96
  363. package/build/components/list-view/index.cjs.map +2 -2
  364. package/build/components/list-view/leaf.cjs.map +2 -2
  365. package/build/components/list-view/use-block-selection.cjs.map +2 -2
  366. package/build/components/list-view/use-clipboard-handler.cjs.map +2 -2
  367. package/build/components/list-view/use-list-view-block-indexes.cjs.map +2 -2
  368. package/build/components/list-view/use-list-view-client-ids.cjs.map +2 -2
  369. package/build/components/list-view/use-list-view-collapse-items.cjs +3 -4
  370. package/build/components/list-view/use-list-view-collapse-items.cjs.map +2 -2
  371. package/build/components/list-view/use-list-view-drop-zone.cjs +7 -13
  372. package/build/components/list-view/use-list-view-drop-zone.cjs.map +2 -2
  373. package/build/components/list-view/use-list-view-expand-selected-item.cjs +3 -3
  374. package/build/components/list-view/use-list-view-expand-selected-item.cjs.map +2 -2
  375. package/build/components/list-view/use-list-view-images.cjs +4 -3
  376. package/build/components/list-view/use-list-view-images.cjs.map +2 -2
  377. package/build/components/list-view/use-list-view-scroll-into-view.cjs.map +2 -2
  378. package/build/components/list-view/utils.cjs +6 -3
  379. package/build/components/list-view/utils.cjs.map +2 -2
  380. package/build/components/media-placeholder/index.cjs.map +2 -2
  381. package/build/components/media-replace-flow/index.cjs.map +2 -2
  382. package/build/components/media-upload/check.cjs.map +2 -2
  383. package/build/components/media-upload/index.cjs.map +2 -2
  384. package/build/components/multi-selection-inspector/index.cjs +33 -12
  385. package/build/components/multi-selection-inspector/index.cjs.map +3 -3
  386. package/build/components/navigable-toolbar/index.cjs +29 -18
  387. package/build/components/navigable-toolbar/index.cjs.map +2 -2
  388. package/build/components/observe-typing/index.cjs.map +2 -2
  389. package/build/components/panel-color-settings/index.cjs.map +2 -2
  390. package/build/components/plain-text/index.cjs.map +2 -2
  391. package/build/components/preset-input-control/custom-value-controls.cjs.map +2 -2
  392. package/build/components/preset-input-control/index.cjs.map +2 -2
  393. package/build/components/preview-options/index.cjs.map +2 -2
  394. package/build/components/provider/block-refs-provider.cjs.map +2 -2
  395. package/build/components/provider/index.cjs.map +2 -2
  396. package/build/components/provider/selection-context.cjs.map +2 -2
  397. package/build/components/provider/use-block-sync.cjs.map +2 -2
  398. package/build/components/provider/use-media-upload-settings.cjs.map +2 -2
  399. package/build/components/provider/with-registry-provider.cjs.map +2 -2
  400. package/build/components/publish-date-time-picker/index.cjs.map +2 -2
  401. package/build/components/recursion-provider/index.cjs.map +2 -2
  402. package/build/components/resizable-box-popover/index.cjs.map +2 -2
  403. package/build/components/resolution-tool/index.cjs.map +2 -2
  404. package/build/components/responsive-block-control/index.cjs.map +2 -2
  405. package/build/components/responsive-block-control/label.cjs.map +2 -2
  406. package/build/components/rich-text/content.cjs.map +2 -2
  407. package/build/components/rich-text/event-listeners/before-input-rules.cjs.map +2 -2
  408. package/build/components/rich-text/event-listeners/delete.cjs.map +2 -2
  409. package/build/components/rich-text/event-listeners/enter.cjs.map +2 -2
  410. package/build/components/rich-text/event-listeners/firefox-compat.cjs.map +2 -2
  411. package/build/components/rich-text/event-listeners/index.cjs.map +2 -2
  412. package/build/components/rich-text/event-listeners/input-events.cjs.map +2 -2
  413. package/build/components/rich-text/event-listeners/input-rules.cjs +13 -10
  414. package/build/components/rich-text/event-listeners/input-rules.cjs.map +2 -2
  415. package/build/components/rich-text/event-listeners/insert-replacement-text.cjs.map +2 -2
  416. package/build/components/rich-text/event-listeners/paste-handler.cjs +8 -1
  417. package/build/components/rich-text/event-listeners/paste-handler.cjs.map +2 -2
  418. package/build/components/rich-text/event-listeners/remove-browser-shortcuts.cjs.map +2 -2
  419. package/build/components/rich-text/event-listeners/shortcuts.cjs.map +2 -2
  420. package/build/components/rich-text/event-listeners/undo-automatic-change.cjs.map +2 -2
  421. package/build/components/rich-text/format-edit.cjs.map +2 -2
  422. package/build/components/rich-text/format-toolbar/index.cjs.map +2 -2
  423. package/build/components/rich-text/format-toolbar-container.cjs.map +2 -2
  424. package/build/components/rich-text/get-rich-text-values.cjs.map +2 -2
  425. package/build/components/rich-text/index.cjs.map +2 -2
  426. package/build/components/rich-text/multiline.cjs.map +2 -2
  427. package/build/components/rich-text/prevent-event-discovery.cjs.map +2 -2
  428. package/build/components/rich-text/toolbar-button.cjs.map +2 -2
  429. package/build/components/rich-text/use-mark-persistent.cjs.map +2 -2
  430. package/build/components/rich-text/utils.cjs.map +2 -2
  431. package/build/components/rich-text/with-deprecations.cjs.map +2 -2
  432. package/build/components/selection-scroll-into-view/index.cjs.map +2 -2
  433. package/build/components/skip-to-selected-block/index.cjs.map +2 -2
  434. package/build/components/spacing-sizes-control/hooks/use-spacing-sizes.cjs.map +2 -2
  435. package/build/components/spacing-sizes-control/index.cjs +2 -2
  436. package/build/components/spacing-sizes-control/index.cjs.map +2 -2
  437. package/build/components/spacing-sizes-control/input-controls/axial.cjs.map +2 -2
  438. package/build/components/spacing-sizes-control/input-controls/separated.cjs.map +2 -2
  439. package/build/components/spacing-sizes-control/input-controls/single.cjs.map +2 -2
  440. package/build/components/spacing-sizes-control/input-controls/spacing-input-control.cjs.map +2 -2
  441. package/build/components/spacing-sizes-control/linked-button.cjs.map +2 -2
  442. package/build/components/spacing-sizes-control/utils.cjs.map +2 -2
  443. package/build/components/tabbed-sidebar/index.cjs.map +2 -2
  444. package/build/components/text-alignment-control/index.cjs.map +2 -2
  445. package/build/components/text-decoration-control/index.cjs.map +2 -2
  446. package/build/components/text-indent-control/index.cjs.map +2 -2
  447. package/build/components/text-transform-control/index.cjs.map +2 -2
  448. package/build/components/tool-selector/index.cjs.map +2 -2
  449. package/build/components/typewriter/index.cjs.map +2 -2
  450. package/build/components/unit-control/index.cjs.map +2 -2
  451. package/build/components/url-input/button.cjs.map +2 -2
  452. package/build/components/url-input/index.cjs +28 -46
  453. package/build/components/url-input/index.cjs.map +2 -2
  454. package/build/components/url-popover/image-url-input-ui.cjs +2 -2
  455. package/build/components/url-popover/image-url-input-ui.cjs.map +2 -2
  456. package/build/components/url-popover/index.cjs.map +2 -2
  457. package/build/components/url-popover/link-editor.cjs.map +2 -2
  458. package/build/components/url-popover/link-viewer-url.cjs.map +2 -2
  459. package/build/components/url-popover/link-viewer.cjs.map +2 -2
  460. package/build/components/use-block-commands/index.cjs +2 -1
  461. package/build/components/use-block-commands/index.cjs.map +2 -2
  462. package/build/components/use-block-display-information/index.cjs +6 -1
  463. package/build/components/use-block-display-information/index.cjs.map +2 -2
  464. package/build/components/use-block-drop-zone/index.cjs.map +2 -2
  465. package/build/components/use-flash-editable-blocks/index.cjs.map +2 -2
  466. package/build/components/use-list-view-panel-state/index.cjs.map +2 -2
  467. package/build/components/use-moving-animation/index.cjs +2 -2
  468. package/build/components/use-moving-animation/index.cjs.map +2 -2
  469. package/build/components/use-on-block-drop/index.cjs.map +2 -2
  470. package/build/components/use-paste-styles/index.cjs.map +2 -2
  471. package/build/components/use-resize-canvas/index.cjs.map +2 -2
  472. package/build/components/use-settings/index.cjs.map +2 -2
  473. package/build/components/warning/index.cjs.map +2 -2
  474. package/build/components/writing-flow/index.cjs.map +2 -2
  475. package/build/components/writing-flow/use-arrow-nav.cjs +6 -1
  476. package/build/components/writing-flow/use-arrow-nav.cjs.map +2 -2
  477. package/build/components/writing-flow/use-click-selection.cjs.map +2 -2
  478. package/build/components/writing-flow/use-clipboard-handler.cjs +29 -4
  479. package/build/components/writing-flow/use-clipboard-handler.cjs.map +3 -3
  480. package/build/components/writing-flow/use-drag-selection.cjs.map +2 -2
  481. package/build/components/writing-flow/use-editable-root-event-handlers.cjs.map +2 -2
  482. package/build/components/writing-flow/use-editable-root.cjs.map +2 -2
  483. package/build/components/writing-flow/use-home-end.cjs.map +2 -2
  484. package/build/components/writing-flow/use-input.cjs.map +2 -2
  485. package/build/components/writing-flow/use-multi-selection.cjs.map +2 -2
  486. package/build/components/writing-flow/use-preview-mode-nav.cjs.map +2 -2
  487. package/build/components/writing-flow/use-select-all.cjs.map +2 -2
  488. package/build/components/writing-flow/use-selection-observer.cjs.map +2 -2
  489. package/build/components/writing-flow/use-tab-nav.cjs +3 -1
  490. package/build/components/writing-flow/use-tab-nav.cjs.map +2 -2
  491. package/build/components/writing-flow/utils.cjs.map +2 -2
  492. package/build/components/writing-mode-control/index.cjs.map +2 -2
  493. package/build/hooks/align.cjs.map +2 -2
  494. package/build/hooks/allowed-blocks.cjs.map +2 -2
  495. package/build/hooks/anchor.cjs.map +2 -2
  496. package/build/hooks/aria-label.cjs.map +2 -2
  497. package/build/hooks/auto-inspector-controls.cjs.map +2 -2
  498. package/build/hooks/background.cjs +1 -4
  499. package/build/hooks/background.cjs.map +2 -2
  500. package/build/hooks/block-bindings.cjs.map +2 -2
  501. package/build/hooks/block-fields/fields-dropdown-menu.cjs.map +2 -2
  502. package/build/hooks/block-fields/index.cjs.map +2 -2
  503. package/build/hooks/block-fields/link/index.cjs.map +2 -2
  504. package/build/hooks/block-fields/media/index.cjs.map +2 -2
  505. package/build/hooks/block-fields/rich-text/index.cjs.map +2 -2
  506. package/build/hooks/block-fields/use-inspector-popover-placement.cjs.map +2 -2
  507. package/build/hooks/block-hooks.cjs.map +2 -2
  508. package/build/hooks/block-renaming.cjs.map +2 -2
  509. package/build/hooks/block-style-state.cjs.map +2 -2
  510. package/build/hooks/block-style-variation.cjs.map +2 -2
  511. package/build/hooks/border.cjs.map +2 -2
  512. package/build/hooks/color.cjs.map +2 -2
  513. package/build/hooks/compat.cjs.map +2 -2
  514. package/build/hooks/contrast-checker.cjs.map +2 -2
  515. package/build/hooks/custom-class-name.cjs.map +2 -2
  516. package/build/hooks/dimensions.cjs.map +2 -2
  517. package/build/hooks/duotone.cjs.map +2 -2
  518. package/build/hooks/elements.cjs.map +2 -2
  519. package/build/hooks/fit-text.cjs.map +2 -2
  520. package/build/hooks/font-family.cjs +2 -4
  521. package/build/hooks/font-family.cjs.map +3 -3
  522. package/build/hooks/font-size.cjs.map +2 -2
  523. package/build/hooks/gap.cjs.map +2 -2
  524. package/build/hooks/generated-class-name.cjs.map +2 -2
  525. package/build/hooks/grid-visualizer.cjs.map +2 -2
  526. package/build/hooks/index.cjs.map +2 -2
  527. package/build/hooks/layout-child.cjs.map +2 -2
  528. package/build/hooks/layout.cjs +4 -4
  529. package/build/hooks/layout.cjs.map +3 -3
  530. package/build/hooks/line-height.cjs.map +2 -2
  531. package/build/hooks/list-view.cjs.map +2 -2
  532. package/build/hooks/lock.cjs.map +2 -2
  533. package/build/hooks/metadata.cjs.map +2 -2
  534. package/build/hooks/position.cjs.map +2 -2
  535. package/build/hooks/settings.cjs.map +2 -2
  536. package/build/hooks/spacing-visualizer.cjs.map +2 -2
  537. package/build/hooks/state-utils.cjs.map +2 -2
  538. package/build/hooks/states.cjs.map +2 -2
  539. package/build/hooks/style.cjs.map +2 -2
  540. package/build/hooks/supports.cjs.map +2 -2
  541. package/build/hooks/text-align.cjs.map +2 -2
  542. package/build/hooks/typography.cjs.map +2 -2
  543. package/build/hooks/use-border-props.cjs.map +2 -2
  544. package/build/hooks/use-cached-truthy.cjs.map +2 -2
  545. package/build/hooks/use-color-props.cjs.map +2 -2
  546. package/build/hooks/use-content-only-section-edit.cjs.map +2 -2
  547. package/build/hooks/use-dimensions-props.cjs.map +2 -2
  548. package/build/hooks/use-shadow-props.cjs.map +2 -2
  549. package/build/hooks/use-spacing-props.cjs.map +2 -2
  550. package/build/hooks/use-typography-props.cjs +2 -4
  551. package/build/hooks/use-typography-props.cjs.map +3 -3
  552. package/build/hooks/use-zoom-out.cjs.map +2 -2
  553. package/build/hooks/utils.cjs.map +2 -2
  554. package/build/index.cjs.map +2 -2
  555. package/build/layouts/constrained.cjs.map +2 -2
  556. package/build/layouts/flex.cjs.map +2 -2
  557. package/build/layouts/flow.cjs.map +2 -2
  558. package/build/layouts/grid.cjs.map +2 -2
  559. package/build/layouts/index.cjs.map +2 -2
  560. package/build/layouts/utils.cjs.map +2 -2
  561. package/build/lock-unlock.cjs.map +2 -2
  562. package/build/private-apis.cjs.map +2 -2
  563. package/build/store/actions.cjs +104 -36
  564. package/build/store/actions.cjs.map +3 -3
  565. package/build/store/defaults.cjs +2 -0
  566. package/build/store/defaults.cjs.map +2 -2
  567. package/build/store/get-block-settings.cjs.map +2 -2
  568. package/build/store/index.cjs.map +2 -2
  569. package/build/store/private-actions.cjs +19 -2
  570. package/build/store/private-actions.cjs.map +2 -2
  571. package/build/store/private-selectors.cjs +28 -10
  572. package/build/store/private-selectors.cjs.map +2 -2
  573. package/build/store/reducer.cjs +3 -1
  574. package/build/store/reducer.cjs.map +2 -2
  575. package/build/store/selectors.cjs +21 -8
  576. package/build/store/selectors.cjs.map +2 -2
  577. package/build/store/utils.cjs.map +2 -2
  578. package/build/utils/fit-text-frontend.cjs.map +2 -2
  579. package/build/utils/format-font-style.cjs.map +2 -2
  580. package/build/utils/format-font-weight.cjs.map +2 -2
  581. package/build/utils/get-font-styles-and-weights.cjs.map +2 -2
  582. package/build/utils/group-blocks.cjs +42 -0
  583. package/build/utils/group-blocks.cjs.map +7 -0
  584. package/build/utils/native-undo.cjs.map +2 -2
  585. package/build/utils/pasting.cjs.map +2 -2
  586. package/build/utils/selection.cjs.map +2 -2
  587. package/build/utils/sibling-block-attributes.cjs +45 -0
  588. package/build/utils/sibling-block-attributes.cjs.map +7 -0
  589. package/build/utils/transform-styles/index.cjs.map +2 -2
  590. package/build/utils/use-notify-copy.cjs.map +2 -2
  591. package/build-module/autocompleters/block.mjs.map +2 -2
  592. package/build-module/components/alignment-control/index.mjs.map +2 -2
  593. package/build-module/components/alignment-control/ui.mjs.map +2 -2
  594. package/build-module/components/autocomplete/index.mjs.map +2 -2
  595. package/build-module/components/background-image-control/index.mjs.map +2 -2
  596. package/build-module/components/block-actions/index.mjs +3 -6
  597. package/build-module/components/block-actions/index.mjs.map +2 -2
  598. package/build-module/components/block-alignment-control/constants.mjs.map +2 -2
  599. package/build-module/components/block-alignment-control/index.mjs.map +2 -2
  600. package/build-module/components/block-alignment-control/ui.mjs.map +2 -2
  601. package/build-module/components/block-alignment-control/use-available-alignments.mjs.map +2 -2
  602. package/build-module/components/block-alignment-matrix-control/index.mjs.map +2 -2
  603. package/build-module/components/block-allowed-blocks/allowed-blocks-control.mjs.map +2 -2
  604. package/build-module/components/block-allowed-blocks/modal.mjs.map +2 -2
  605. package/build-module/components/block-bindings/attribute-control.mjs.map +2 -2
  606. package/build-module/components/block-bindings/index.mjs.map +2 -2
  607. package/build-module/components/block-bindings/source-fields-list.mjs.map +2 -2
  608. package/build-module/components/block-bindings/use-block-bindings-utils.mjs.map +2 -2
  609. package/build-module/components/block-breadcrumb/index.mjs.map +2 -2
  610. package/build-module/components/block-canvas/index.mjs.map +2 -2
  611. package/build-module/components/block-card/index.mjs.map +2 -2
  612. package/build-module/components/block-compare/block-view.mjs.map +2 -2
  613. package/build-module/components/block-compare/index.mjs.map +2 -2
  614. package/build-module/components/block-content-overlay/index.mjs.map +2 -2
  615. package/build-module/components/block-context/index.mjs.map +2 -2
  616. package/build-module/components/block-controls/fill.mjs.map +2 -2
  617. package/build-module/components/block-controls/groups.mjs.map +2 -2
  618. package/build-module/components/block-controls/hook.mjs.map +2 -2
  619. package/build-module/components/block-controls/index.mjs.map +2 -2
  620. package/build-module/components/block-controls/slot.mjs.map +2 -2
  621. package/build-module/components/block-draggable/draggable-chip.mjs.map +2 -2
  622. package/build-module/components/block-draggable/index.mjs.map +2 -2
  623. package/build-module/components/block-draggable/use-scroll-when-dragging.mjs.map +2 -2
  624. package/build-module/components/block-edit/context.mjs.map +2 -2
  625. package/build-module/components/block-edit/edit.mjs.map +2 -2
  626. package/build-module/components/block-edit/index.mjs.map +2 -2
  627. package/build-module/components/block-edit/multiple-usage-warning.mjs.map +2 -2
  628. package/build-module/components/block-edit-visually-button/index.mjs.map +2 -2
  629. package/build-module/components/block-editing-mode/index.mjs.map +2 -2
  630. package/build-module/components/block-full-height-alignment-control/index.mjs.map +2 -2
  631. package/build-module/components/block-heading-level-dropdown/heading-level-icon.mjs.map +2 -2
  632. package/build-module/components/block-heading-level-dropdown/index.mjs.map +2 -2
  633. package/build-module/components/block-icon/index.mjs.map +2 -2
  634. package/build-module/components/block-inspector/edit-contents.mjs +49 -41
  635. package/build-module/components/block-inspector/edit-contents.mjs.map +2 -2
  636. package/build-module/components/block-inspector/index.mjs +9 -4
  637. package/build-module/components/block-inspector/index.mjs.map +2 -2
  638. package/build-module/components/block-inspector/inspector-pre-tabs-slot-fill.mjs.map +2 -2
  639. package/build-module/components/block-inspector/useBlockInspectorAnimationSettings.mjs.map +2 -2
  640. package/build-module/components/block-list/block-crash-boundary.mjs.map +2 -2
  641. package/build-module/components/block-list/block-crash-warning.mjs.map +2 -2
  642. package/build-module/components/block-list/block-html.mjs.map +2 -2
  643. package/build-module/components/block-list/block-invalid-warning.mjs.map +2 -2
  644. package/build-module/components/block-list/block.mjs +36 -10
  645. package/build-module/components/block-list/block.mjs.map +3 -3
  646. package/build-module/components/block-list/index.mjs +34 -10
  647. package/build-module/components/block-list/index.mjs.map +2 -2
  648. package/build-module/components/block-list/layout.mjs.map +2 -2
  649. package/build-module/components/block-list/private-block-context.mjs.map +2 -2
  650. package/build-module/components/block-list/subdirectory-icon.mjs.map +2 -2
  651. package/build-module/components/block-list/use-block-props/index.mjs +36 -2
  652. package/build-module/components/block-list/use-block-props/index.mjs.map +2 -2
  653. package/build-module/components/block-list/use-block-props/use-block-refs.mjs.map +2 -2
  654. package/build-module/components/block-list/use-block-props/use-firefox-draggable-compatibility.mjs.map +2 -2
  655. package/build-module/components/block-list/use-block-props/use-focus-first-element.mjs.map +2 -2
  656. package/build-module/components/block-list/use-block-props/use-focus-handler.mjs.map +2 -2
  657. package/build-module/components/block-list/use-block-props/use-intersection-observer.mjs.map +2 -2
  658. package/build-module/components/block-list/use-block-props/use-is-hovered.mjs.map +2 -2
  659. package/build-module/components/block-list/use-block-props/use-register-block-event-handlers.mjs.map +2 -2
  660. package/build-module/components/block-list/use-block-props/use-scroll-into-view.mjs.map +2 -2
  661. package/build-module/components/block-list/use-block-props/use-selected-block-event-handlers.mjs.map +2 -2
  662. package/build-module/components/block-list/use-in-between-inserter.mjs.map +2 -2
  663. package/build-module/components/block-list/zoom-out-separator.mjs.map +2 -2
  664. package/build-module/components/block-list-appender/index.mjs.map +2 -2
  665. package/build-module/components/block-lock/menu-item.mjs.map +2 -2
  666. package/build-module/components/block-lock/modal.mjs.map +2 -2
  667. package/build-module/components/block-lock/toolbar.mjs.map +2 -2
  668. package/build-module/components/block-lock/use-block-lock.mjs.map +2 -2
  669. package/build-module/components/block-manager/category.mjs.map +2 -2
  670. package/build-module/components/block-manager/checklist.mjs.map +2 -2
  671. package/build-module/components/block-manager/index.mjs.map +2 -2
  672. package/build-module/components/block-mover/button.mjs +17 -11
  673. package/build-module/components/block-mover/button.mjs.map +2 -2
  674. package/build-module/components/block-mover/index.mjs.map +2 -2
  675. package/build-module/components/block-mover/mover-description.mjs.map +2 -2
  676. package/build-module/components/block-navigation/dropdown.mjs.map +2 -2
  677. package/build-module/components/block-parent-selector/index.mjs.map +2 -2
  678. package/build-module/components/block-pattern-setup/index.mjs.map +2 -2
  679. package/build-module/components/block-pattern-setup/setup-toolbar.mjs.map +2 -2
  680. package/build-module/components/block-pattern-setup/use-patterns-setup.mjs.map +2 -2
  681. package/build-module/components/block-patterns-list/index.mjs.map +2 -2
  682. package/build-module/components/block-patterns-paging/index.mjs.map +2 -2
  683. package/build-module/components/block-popover/cover.mjs.map +2 -2
  684. package/build-module/components/block-popover/drop-zone.mjs.map +2 -2
  685. package/build-module/components/block-popover/inbetween.mjs.map +2 -2
  686. package/build-module/components/block-popover/index.mjs.map +2 -2
  687. package/build-module/components/block-popover/use-popover-scroll.mjs.map +2 -2
  688. package/build-module/components/block-preview/async.mjs.map +2 -2
  689. package/build-module/components/block-preview/auto.mjs.map +2 -2
  690. package/build-module/components/block-preview/index.mjs.map +2 -2
  691. package/build-module/components/block-quick-navigation/index.mjs.map +2 -2
  692. package/build-module/components/block-removal-warning-modal/index.mjs.map +2 -2
  693. package/build-module/components/block-rename/modal.mjs.map +2 -2
  694. package/build-module/components/block-rename/rename-control.mjs.map +2 -2
  695. package/build-module/components/block-rename/use-block-rename.mjs.map +2 -2
  696. package/build-module/components/block-selection-clearer/index.mjs.map +2 -2
  697. package/build-module/components/block-settings-menu/block-html-convert-button.mjs.map +2 -2
  698. package/build-module/components/block-settings-menu/block-mode-toggle.mjs.map +2 -2
  699. package/build-module/components/block-settings-menu/block-parent-selector-menu-item.mjs.map +2 -2
  700. package/build-module/components/block-settings-menu/block-settings-dropdown.mjs +1 -1
  701. package/build-module/components/block-settings-menu/block-settings-dropdown.mjs.map +2 -2
  702. package/build-module/components/block-settings-menu/block-settings-menu-first-item.mjs.map +2 -2
  703. package/build-module/components/block-settings-menu/index.mjs.map +2 -2
  704. package/build-module/components/block-settings-menu-controls/index.mjs.map +2 -2
  705. package/build-module/components/block-styles/index.mjs.map +2 -2
  706. package/build-module/components/block-styles/menu-items.mjs.map +2 -2
  707. package/build-module/components/block-styles/use-styles-for-block.mjs.map +2 -2
  708. package/build-module/components/block-styles/utils.mjs.map +2 -2
  709. package/build-module/components/block-switcher/block-styles-menu.mjs.map +2 -2
  710. package/build-module/components/block-switcher/block-transformations-menu.mjs.map +2 -2
  711. package/build-module/components/block-switcher/block-variation-transformations.mjs.map +2 -2
  712. package/build-module/components/block-switcher/index.mjs.map +2 -2
  713. package/build-module/components/block-switcher/pattern-transformations-menu.mjs.map +2 -2
  714. package/build-module/components/block-switcher/preview-block-popover.mjs.map +2 -2
  715. package/build-module/components/block-switcher/use-transformed-patterns.mjs.map +2 -2
  716. package/build-module/components/block-switcher/utils.mjs.map +2 -2
  717. package/build-module/components/block-title/index.mjs.map +2 -2
  718. package/build-module/components/block-title/use-block-display-title.mjs.map +2 -2
  719. package/build-module/components/block-toolbar/block-styles-dropdown.mjs.map +2 -2
  720. package/build-module/components/block-toolbar/block-toolbar-icon.mjs.map +2 -2
  721. package/build-module/components/block-toolbar/block-toolbar-last-item.mjs.map +2 -2
  722. package/build-module/components/block-toolbar/change-design.mjs.map +2 -2
  723. package/build-module/components/block-toolbar/edit-section-button.mjs.map +2 -2
  724. package/build-module/components/block-toolbar/index.mjs.map +2 -2
  725. package/build-module/components/block-toolbar/pattern-overrides-dropdown.mjs.map +2 -2
  726. package/build-module/components/block-toolbar/switch-section-style.mjs.map +2 -2
  727. package/build-module/components/block-toolbar/use-has-block-toolbar.mjs.map +2 -2
  728. package/build-module/components/block-toolbar/utils.mjs.map +2 -2
  729. package/build-module/components/block-tools/block-toolbar-popover.mjs.map +2 -2
  730. package/build-module/components/block-tools/empty-block-inserter.mjs.map +2 -2
  731. package/build-module/components/block-tools/index.mjs +3 -9
  732. package/build-module/components/block-tools/index.mjs.map +2 -2
  733. package/build-module/components/block-tools/insertion-point.mjs.map +2 -2
  734. package/build-module/components/block-tools/use-block-toolbar-popover-props.mjs.map +2 -2
  735. package/build-module/components/block-tools/use-selected-block-tool-props.mjs.map +2 -2
  736. package/build-module/components/block-tools/use-show-block-tools.mjs.map +2 -2
  737. package/build-module/components/block-tools/zoom-out-mode-inserter-button.mjs.map +2 -2
  738. package/build-module/components/block-tools/zoom-out-mode-inserters.mjs.map +2 -2
  739. package/build-module/components/block-types-list/index.mjs.map +2 -2
  740. package/build-module/components/block-variation-picker/index.mjs.map +2 -2
  741. package/build-module/components/block-variation-transforms/index.mjs.map +2 -2
  742. package/build-module/components/block-vertical-alignment-control/index.mjs.map +2 -2
  743. package/build-module/components/block-vertical-alignment-control/ui.mjs.map +2 -2
  744. package/build-module/components/block-visibility/constants.mjs +1 -1
  745. package/build-module/components/block-visibility/constants.mjs.map +3 -3
  746. package/build-module/components/block-visibility/modal.mjs.map +2 -2
  747. package/build-module/components/block-visibility/use-block-visibility.mjs +15 -17
  748. package/build-module/components/block-visibility/use-block-visibility.mjs.map +3 -3
  749. package/build-module/components/block-visibility/utils.mjs.map +2 -2
  750. package/build-module/components/block-visibility/viewport-menu-item.mjs.map +2 -2
  751. package/build-module/components/block-visibility/viewport-toolbar.mjs.map +2 -2
  752. package/build-module/components/block-visibility/viewport-visibility-info.mjs.map +2 -2
  753. package/build-module/components/border-radius-control/constants.mjs.map +2 -2
  754. package/build-module/components/border-radius-control/index.mjs.map +2 -2
  755. package/build-module/components/border-radius-control/linked-button.mjs.map +2 -2
  756. package/build-module/components/border-radius-control/utils.mjs.map +2 -2
  757. package/build-module/components/button-block-appender/index.mjs.map +2 -2
  758. package/build-module/components/child-layout-control/index.mjs.map +2 -2
  759. package/build-module/components/collab/note-icon-slot.mjs.map +2 -2
  760. package/build-module/components/collab/note-icon-toolbar-slot.mjs.map +2 -2
  761. package/build-module/components/color-palette/control.mjs.map +2 -2
  762. package/build-module/components/color-palette/index.mjs.map +2 -2
  763. package/build-module/components/color-palette/with-color-context.mjs.map +2 -2
  764. package/build-module/components/color-style-selector/index.mjs.map +2 -2
  765. package/build-module/components/colors/utils.mjs +1 -3
  766. package/build-module/components/colors/utils.mjs.map +2 -2
  767. package/build-module/components/colors/with-colors.mjs +1 -3
  768. package/build-module/components/colors/with-colors.mjs.map +2 -2
  769. package/build-module/components/colors-gradients/control.mjs.map +2 -2
  770. package/build-module/components/colors-gradients/dropdown.mjs.map +2 -2
  771. package/build-module/components/colors-gradients/panel-color-gradient-settings.mjs +5 -5
  772. package/build-module/components/colors-gradients/panel-color-gradient-settings.mjs.map +2 -2
  773. package/build-module/components/colors-gradients/use-multiple-origin-colors-and-gradients.mjs.map +2 -2
  774. package/build-module/components/contrast-checker/index.mjs.map +2 -2
  775. package/build-module/components/convert-to-group-buttons/index.mjs +2 -5
  776. package/build-module/components/convert-to-group-buttons/index.mjs.map +2 -2
  777. package/build-module/components/convert-to-group-buttons/toolbar.mjs +3 -5
  778. package/build-module/components/convert-to-group-buttons/toolbar.mjs.map +2 -2
  779. package/build-module/components/convert-to-group-buttons/use-convert-to-group-button-props.mjs.map +2 -2
  780. package/build-module/components/copy-handler/index.mjs.map +2 -2
  781. package/build-module/components/date-format-picker/index.mjs.map +2 -2
  782. package/build-module/components/default-block-appender/index.mjs.map +2 -2
  783. package/build-module/components/dimension-control/index.mjs.map +2 -2
  784. package/build-module/components/dimensions-tool/aspect-ratio-tool.mjs.map +2 -2
  785. package/build-module/components/dimensions-tool/index.mjs.map +2 -2
  786. package/build-module/components/dimensions-tool/scale-tool.mjs.map +2 -2
  787. package/build-module/components/dimensions-tool/width-height-tool.mjs.map +2 -2
  788. package/build-module/components/duotone-control/index.mjs.map +2 -2
  789. package/build-module/components/editable-text/index.mjs.map +2 -2
  790. package/build-module/components/editor-styles/index.mjs.map +2 -2
  791. package/build-module/components/fit-text-size-warning/index.mjs.map +2 -2
  792. package/build-module/components/floating-toolbar/nav-up-icon.mjs.map +2 -2
  793. package/build-module/components/font-appearance-control/index.mjs.map +2 -2
  794. package/build-module/components/font-family/index.mjs.map +2 -2
  795. package/build-module/components/font-sizes/font-size-picker.mjs.map +2 -2
  796. package/build-module/components/font-sizes/utils.mjs +1 -3
  797. package/build-module/components/font-sizes/utils.mjs.map +2 -2
  798. package/build-module/components/font-sizes/with-font-sizes.mjs.map +2 -2
  799. package/build-module/components/global-styles/advanced-panel.mjs.map +2 -2
  800. package/build-module/components/global-styles/background-panel.mjs.map +2 -2
  801. package/build-module/components/global-styles/border-panel.mjs.map +2 -2
  802. package/build-module/components/global-styles/color-gradient-dropdown-item.mjs.map +2 -2
  803. package/build-module/components/global-styles/color-panel.mjs.map +2 -2
  804. package/build-module/components/global-styles/dimensions-panel.mjs.map +2 -2
  805. package/build-module/components/global-styles/filters-panel.mjs.map +2 -2
  806. package/build-module/components/global-styles/hooks.mjs.map +2 -2
  807. package/build-module/components/global-styles/image-settings-panel.mjs.map +2 -2
  808. package/build-module/components/global-styles/inheritance/index.mjs.map +2 -2
  809. package/build-module/components/global-styles/inherited-value-context.mjs.map +2 -2
  810. package/build-module/components/global-styles/shadow-panel-components.mjs.map +2 -2
  811. package/build-module/components/global-styles/state-control-badges.mjs.map +2 -2
  812. package/build-module/components/global-styles/state-control.mjs.map +2 -2
  813. package/build-module/components/global-styles/typography-panel.mjs.map +2 -2
  814. package/build-module/components/global-styles/typography-utils.mjs.map +2 -2
  815. package/build-module/components/global-styles/utils.mjs.map +2 -2
  816. package/build-module/components/gradients/use-gradient.mjs.map +2 -2
  817. package/build-module/components/gradients/with-gradient.mjs.map +2 -2
  818. package/build-module/components/grid/grid-item-movers.mjs.map +2 -2
  819. package/build-module/components/grid/grid-item-resizer.mjs.map +2 -2
  820. package/build-module/components/grid/grid-visualizer.mjs.map +2 -2
  821. package/build-module/components/grid/use-get-number-of-blocks-before-cell.mjs.map +2 -2
  822. package/build-module/components/grid/use-grid-layout-sync.mjs.map +2 -2
  823. package/build-module/components/height-control/index.mjs.map +2 -2
  824. package/build-module/components/html-element-control/index.mjs.map +2 -2
  825. package/build-module/components/html-element-control/messages.mjs.map +2 -2
  826. package/build-module/components/iframe/index.mjs +19 -24
  827. package/build-module/components/iframe/index.mjs.map +2 -2
  828. package/build-module/components/iframe/use-scale-canvas.mjs +21 -7
  829. package/build-module/components/iframe/use-scale-canvas.mjs.map +2 -2
  830. package/build-module/components/image-editor/aspect-ratio-dropdown.mjs.map +2 -2
  831. package/build-module/components/image-editor/context.mjs.map +2 -2
  832. package/build-module/components/image-editor/cropper.mjs.map +2 -2
  833. package/build-module/components/image-editor/form-controls.mjs.map +2 -2
  834. package/build-module/components/image-editor/index.mjs.map +2 -2
  835. package/build-module/components/image-editor/rotation-button.mjs.map +2 -2
  836. package/build-module/components/image-editor/use-save-image.mjs.map +2 -2
  837. package/build-module/components/image-editor/use-transform-image.mjs.map +2 -2
  838. package/build-module/components/image-editor/zoom-dropdown.mjs.map +2 -2
  839. package/build-module/components/image-size-control/index.mjs.map +2 -2
  840. package/build-module/components/image-size-control/use-dimension-handler.mjs.map +2 -2
  841. package/build-module/components/inner-blocks/button-block-appender.mjs.map +2 -2
  842. package/build-module/components/inner-blocks/default-block-appender.mjs.map +2 -2
  843. package/build-module/components/inner-blocks/index.mjs.map +2 -2
  844. package/build-module/components/inner-blocks/use-block-context.mjs.map +2 -2
  845. package/build-module/components/inner-blocks/use-inner-block-template-sync.mjs +35 -8
  846. package/build-module/components/inner-blocks/use-inner-block-template-sync.mjs.map +2 -2
  847. package/build-module/components/inner-blocks/use-nested-settings-update.mjs.map +2 -2
  848. package/build-module/components/inner-content/index.mjs.map +2 -2
  849. package/build-module/components/inserter/block-patterns-explorer/index.mjs.map +2 -2
  850. package/build-module/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.mjs.map +2 -2
  851. package/build-module/components/inserter/block-patterns-explorer/pattern-list.mjs.map +2 -2
  852. package/build-module/components/inserter/block-patterns-tab/index.mjs.map +2 -2
  853. package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.mjs.map +2 -2
  854. package/build-module/components/inserter/block-patterns-tab/patterns-filter.mjs.map +2 -2
  855. package/build-module/components/inserter/block-patterns-tab/use-pattern-categories.mjs.map +2 -2
  856. package/build-module/components/inserter/block-patterns-tab/utils.mjs.map +2 -2
  857. package/build-module/components/inserter/block-types-tab.mjs.map +2 -2
  858. package/build-module/components/inserter/category-tabs/index.mjs.map +2 -2
  859. package/build-module/components/inserter/hooks/use-block-types-state.mjs.map +2 -2
  860. package/build-module/components/inserter/hooks/use-insertion-point.mjs.map +2 -2
  861. package/build-module/components/inserter/hooks/use-patterns-paging.mjs.map +2 -2
  862. package/build-module/components/inserter/hooks/use-patterns-state.mjs.map +2 -2
  863. package/build-module/components/inserter/index.mjs +4 -13
  864. package/build-module/components/inserter/index.mjs.map +2 -2
  865. package/build-module/components/inserter/library.mjs.map +2 -2
  866. package/build-module/components/inserter/media-tab/hooks.mjs.map +2 -2
  867. package/build-module/components/inserter/media-tab/media-list.mjs.map +2 -2
  868. package/build-module/components/inserter/media-tab/media-panel.mjs.map +2 -2
  869. package/build-module/components/inserter/media-tab/media-preview.mjs.map +2 -2
  870. package/build-module/components/inserter/media-tab/media-tab.mjs.map +2 -2
  871. package/build-module/components/inserter/media-tab/utils.mjs.map +2 -2
  872. package/build-module/components/inserter/menu.mjs.map +2 -2
  873. package/build-module/components/inserter/mobile-tab-navigation.mjs.map +2 -2
  874. package/build-module/components/inserter/no-results.mjs.map +2 -2
  875. package/build-module/components/inserter/panel.mjs.map +2 -2
  876. package/build-module/components/inserter/preview-panel.mjs.map +2 -2
  877. package/build-module/components/inserter/quick-inserter.mjs.map +2 -2
  878. package/build-module/components/inserter/search-items.mjs.map +2 -2
  879. package/build-module/components/inserter/search-results.mjs.map +2 -2
  880. package/build-module/components/inserter/tips.mjs.map +2 -2
  881. package/build-module/components/inserter-button/sparkles.mjs.map +2 -2
  882. package/build-module/components/inserter-draggable-blocks/index.mjs.map +2 -2
  883. package/build-module/components/inserter-list-item/index.mjs.map +2 -2
  884. package/build-module/components/inserter-listbox/context.mjs.map +2 -2
  885. package/build-module/components/inserter-listbox/group.mjs.map +2 -2
  886. package/build-module/components/inserter-listbox/index.mjs.map +2 -2
  887. package/build-module/components/inserter-listbox/item.mjs.map +2 -2
  888. package/build-module/components/inserter-listbox/row.mjs.map +2 -2
  889. package/build-module/components/inserter-menu-extension/index.mjs.map +2 -2
  890. package/build-module/components/inspector-controls/block-support-slot-container.mjs.map +2 -2
  891. package/build-module/components/inspector-controls/block-support-tools-panel.mjs.map +2 -2
  892. package/build-module/components/inspector-controls/fill.mjs +15 -17
  893. package/build-module/components/inspector-controls/fill.mjs.map +2 -2
  894. package/build-module/components/inspector-controls/groups.mjs.map +2 -2
  895. package/build-module/components/inspector-controls/index.mjs.map +2 -2
  896. package/build-module/components/inspector-controls/last-item.mjs.map +2 -2
  897. package/build-module/components/inspector-controls/list-view-content-popover.mjs.map +2 -2
  898. package/build-module/components/inspector-controls/slot.mjs.map +2 -2
  899. package/build-module/components/inspector-controls-tabs/advanced-controls-panel.mjs.map +2 -2
  900. package/build-module/components/inspector-controls-tabs/content-tab.mjs.map +2 -2
  901. package/build-module/components/inspector-controls-tabs/index.mjs.map +2 -2
  902. package/build-module/components/inspector-controls-tabs/position-controls-panel.mjs.map +2 -2
  903. package/build-module/components/inspector-controls-tabs/settings-tab.mjs.map +2 -2
  904. package/build-module/components/inspector-controls-tabs/styles-tab.mjs.map +2 -2
  905. package/build-module/components/inspector-controls-tabs/use-inspector-controls-tabs.mjs.map +2 -2
  906. package/build-module/components/inspector-controls-tabs/utils.mjs.map +2 -2
  907. package/build-module/components/inspector-popover-header/index.mjs.map +2 -2
  908. package/build-module/components/justify-content-control/index.mjs.map +2 -2
  909. package/build-module/components/justify-content-control/ui.mjs.map +2 -2
  910. package/build-module/components/keyboard-shortcuts/index.mjs.map +2 -2
  911. package/build-module/components/letter-spacing-control/index.mjs.map +2 -2
  912. package/build-module/components/line-height-control/index.mjs.map +2 -2
  913. package/build-module/components/link-control/constants.mjs.map +2 -2
  914. package/build-module/components/link-control/index.mjs.map +2 -2
  915. package/build-module/components/link-control/is-url-like.mjs.map +2 -2
  916. package/build-module/components/link-control/link-preview.mjs.map +2 -2
  917. package/build-module/components/link-control/normalize-url.mjs.map +2 -2
  918. package/build-module/components/link-control/search-create-button.mjs.map +2 -2
  919. package/build-module/components/link-control/search-input.mjs.map +2 -2
  920. package/build-module/components/link-control/search-item.mjs.map +2 -2
  921. package/build-module/components/link-control/search-results.mjs +1 -1
  922. package/build-module/components/link-control/search-results.mjs.map +2 -2
  923. package/build-module/components/link-control/settings-drawer.mjs.map +2 -2
  924. package/build-module/components/link-control/settings.mjs.map +2 -2
  925. package/build-module/components/link-control/use-create-page.mjs.map +2 -2
  926. package/build-module/components/link-control/use-internal-value.mjs.map +2 -2
  927. package/build-module/components/link-control/use-rich-url-data.mjs +1 -1
  928. package/build-module/components/link-control/use-rich-url-data.mjs.map +2 -2
  929. package/build-module/components/link-control/use-search-handler.mjs.map +2 -2
  930. package/build-module/components/link-control/viewer-slot.mjs.map +2 -2
  931. package/build-module/components/link-picker/link-picker.mjs.map +2 -2
  932. package/build-module/components/link-picker/link-preview.mjs.map +2 -2
  933. package/build-module/components/list-view/appender.mjs +7 -4
  934. package/build-module/components/list-view/appender.mjs.map +2 -2
  935. package/build-module/components/list-view/aria-referenced-text.mjs +2 -9
  936. package/build-module/components/list-view/aria-referenced-text.mjs.map +2 -2
  937. package/build-module/components/list-view/block-contents.mjs +18 -21
  938. package/build-module/components/list-view/block-contents.mjs.map +2 -2
  939. package/build-module/components/list-view/block-select-button.mjs +49 -26
  940. package/build-module/components/list-view/block-select-button.mjs.map +2 -2
  941. package/build-module/components/list-view/block.mjs +40 -47
  942. package/build-module/components/list-view/block.mjs.map +2 -2
  943. package/build-module/components/list-view/branch.mjs +100 -80
  944. package/build-module/components/list-view/branch.mjs.map +2 -2
  945. package/build-module/components/list-view/context.mjs +11 -1
  946. package/build-module/components/list-view/context.mjs.map +2 -2
  947. package/build-module/components/list-view/drop-indicator.mjs +6 -6
  948. package/build-module/components/list-view/drop-indicator.mjs.map +2 -2
  949. package/build-module/components/list-view/expander.mjs.map +2 -2
  950. package/build-module/components/list-view/index.mjs +87 -95
  951. package/build-module/components/list-view/index.mjs.map +2 -2
  952. package/build-module/components/list-view/leaf.mjs.map +2 -2
  953. package/build-module/components/list-view/use-block-selection.mjs.map +2 -2
  954. package/build-module/components/list-view/use-clipboard-handler.mjs.map +2 -2
  955. package/build-module/components/list-view/use-list-view-block-indexes.mjs.map +2 -2
  956. package/build-module/components/list-view/use-list-view-client-ids.mjs.map +2 -2
  957. package/build-module/components/list-view/use-list-view-collapse-items.mjs +3 -4
  958. package/build-module/components/list-view/use-list-view-collapse-items.mjs.map +2 -2
  959. package/build-module/components/list-view/use-list-view-drop-zone.mjs +7 -13
  960. package/build-module/components/list-view/use-list-view-drop-zone.mjs.map +2 -2
  961. package/build-module/components/list-view/use-list-view-expand-selected-item.mjs +3 -3
  962. package/build-module/components/list-view/use-list-view-expand-selected-item.mjs.map +2 -2
  963. package/build-module/components/list-view/use-list-view-images.mjs +4 -3
  964. package/build-module/components/list-view/use-list-view-images.mjs.map +2 -2
  965. package/build-module/components/list-view/use-list-view-scroll-into-view.mjs.map +2 -2
  966. package/build-module/components/list-view/utils.mjs +5 -3
  967. package/build-module/components/list-view/utils.mjs.map +2 -2
  968. package/build-module/components/media-placeholder/index.mjs.map +2 -2
  969. package/build-module/components/media-replace-flow/index.mjs.map +2 -2
  970. package/build-module/components/media-upload/check.mjs.map +2 -2
  971. package/build-module/components/media-upload/index.mjs.map +2 -2
  972. package/build-module/components/multi-selection-inspector/index.mjs +33 -12
  973. package/build-module/components/multi-selection-inspector/index.mjs.map +2 -2
  974. package/build-module/components/navigable-toolbar/index.mjs +30 -18
  975. package/build-module/components/navigable-toolbar/index.mjs.map +2 -2
  976. package/build-module/components/observe-typing/index.mjs.map +2 -2
  977. package/build-module/components/panel-color-settings/index.mjs.map +2 -2
  978. package/build-module/components/plain-text/index.mjs.map +2 -2
  979. package/build-module/components/preset-input-control/custom-value-controls.mjs.map +2 -2
  980. package/build-module/components/preset-input-control/index.mjs.map +2 -2
  981. package/build-module/components/preview-options/index.mjs.map +2 -2
  982. package/build-module/components/provider/block-refs-provider.mjs.map +2 -2
  983. package/build-module/components/provider/index.mjs.map +2 -2
  984. package/build-module/components/provider/selection-context.mjs.map +2 -2
  985. package/build-module/components/provider/use-block-sync.mjs.map +2 -2
  986. package/build-module/components/provider/use-media-upload-settings.mjs.map +2 -2
  987. package/build-module/components/provider/with-registry-provider.mjs.map +2 -2
  988. package/build-module/components/publish-date-time-picker/index.mjs.map +2 -2
  989. package/build-module/components/recursion-provider/index.mjs.map +2 -2
  990. package/build-module/components/resizable-box-popover/index.mjs.map +2 -2
  991. package/build-module/components/resolution-tool/index.mjs.map +2 -2
  992. package/build-module/components/responsive-block-control/index.mjs.map +2 -2
  993. package/build-module/components/responsive-block-control/label.mjs.map +2 -2
  994. package/build-module/components/rich-text/content.mjs.map +2 -2
  995. package/build-module/components/rich-text/event-listeners/before-input-rules.mjs.map +2 -2
  996. package/build-module/components/rich-text/event-listeners/delete.mjs.map +2 -2
  997. package/build-module/components/rich-text/event-listeners/enter.mjs.map +2 -2
  998. package/build-module/components/rich-text/event-listeners/firefox-compat.mjs.map +2 -2
  999. package/build-module/components/rich-text/event-listeners/index.mjs.map +2 -2
  1000. package/build-module/components/rich-text/event-listeners/input-events.mjs.map +2 -2
  1001. package/build-module/components/rich-text/event-listeners/input-rules.mjs +13 -10
  1002. package/build-module/components/rich-text/event-listeners/input-rules.mjs.map +2 -2
  1003. package/build-module/components/rich-text/event-listeners/insert-replacement-text.mjs.map +2 -2
  1004. package/build-module/components/rich-text/event-listeners/paste-handler.mjs +8 -1
  1005. package/build-module/components/rich-text/event-listeners/paste-handler.mjs.map +2 -2
  1006. package/build-module/components/rich-text/event-listeners/remove-browser-shortcuts.mjs.map +2 -2
  1007. package/build-module/components/rich-text/event-listeners/shortcuts.mjs.map +2 -2
  1008. package/build-module/components/rich-text/event-listeners/undo-automatic-change.mjs.map +2 -2
  1009. package/build-module/components/rich-text/format-edit.mjs.map +2 -2
  1010. package/build-module/components/rich-text/format-toolbar/index.mjs.map +2 -2
  1011. package/build-module/components/rich-text/format-toolbar-container.mjs.map +2 -2
  1012. package/build-module/components/rich-text/get-rich-text-values.mjs.map +2 -2
  1013. package/build-module/components/rich-text/index.mjs.map +2 -2
  1014. package/build-module/components/rich-text/multiline.mjs.map +2 -2
  1015. package/build-module/components/rich-text/prevent-event-discovery.mjs.map +2 -2
  1016. package/build-module/components/rich-text/toolbar-button.mjs.map +2 -2
  1017. package/build-module/components/rich-text/use-mark-persistent.mjs.map +2 -2
  1018. package/build-module/components/rich-text/utils.mjs.map +2 -2
  1019. package/build-module/components/rich-text/with-deprecations.mjs.map +2 -2
  1020. package/build-module/components/selection-scroll-into-view/index.mjs.map +2 -2
  1021. package/build-module/components/skip-to-selected-block/index.mjs.map +2 -2
  1022. package/build-module/components/spacing-sizes-control/hooks/use-spacing-sizes.mjs.map +2 -2
  1023. package/build-module/components/spacing-sizes-control/index.mjs +2 -2
  1024. package/build-module/components/spacing-sizes-control/index.mjs.map +2 -2
  1025. package/build-module/components/spacing-sizes-control/input-controls/axial.mjs.map +2 -2
  1026. package/build-module/components/spacing-sizes-control/input-controls/separated.mjs.map +2 -2
  1027. package/build-module/components/spacing-sizes-control/input-controls/single.mjs.map +2 -2
  1028. package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.mjs.map +2 -2
  1029. package/build-module/components/spacing-sizes-control/linked-button.mjs.map +2 -2
  1030. package/build-module/components/spacing-sizes-control/utils.mjs.map +2 -2
  1031. package/build-module/components/tabbed-sidebar/index.mjs.map +2 -2
  1032. package/build-module/components/text-alignment-control/index.mjs.map +2 -2
  1033. package/build-module/components/text-decoration-control/index.mjs.map +2 -2
  1034. package/build-module/components/text-indent-control/index.mjs.map +2 -2
  1035. package/build-module/components/text-transform-control/index.mjs.map +2 -2
  1036. package/build-module/components/tool-selector/index.mjs.map +2 -2
  1037. package/build-module/components/typewriter/index.mjs.map +2 -2
  1038. package/build-module/components/unit-control/index.mjs.map +2 -2
  1039. package/build-module/components/url-input/button.mjs.map +2 -2
  1040. package/build-module/components/url-input/index.mjs +28 -46
  1041. package/build-module/components/url-input/index.mjs.map +2 -2
  1042. package/build-module/components/url-popover/image-url-input-ui.mjs +2 -2
  1043. package/build-module/components/url-popover/image-url-input-ui.mjs.map +2 -2
  1044. package/build-module/components/url-popover/index.mjs.map +2 -2
  1045. package/build-module/components/url-popover/link-editor.mjs.map +2 -2
  1046. package/build-module/components/url-popover/link-viewer-url.mjs.map +2 -2
  1047. package/build-module/components/url-popover/link-viewer.mjs.map +2 -2
  1048. package/build-module/components/use-block-commands/index.mjs +2 -1
  1049. package/build-module/components/use-block-commands/index.mjs.map +2 -2
  1050. package/build-module/components/use-block-display-information/index.mjs +2 -1
  1051. package/build-module/components/use-block-display-information/index.mjs.map +2 -2
  1052. package/build-module/components/use-block-drop-zone/index.mjs.map +2 -2
  1053. package/build-module/components/use-flash-editable-blocks/index.mjs.map +2 -2
  1054. package/build-module/components/use-list-view-panel-state/index.mjs.map +2 -2
  1055. package/build-module/components/use-moving-animation/index.mjs +2 -2
  1056. package/build-module/components/use-moving-animation/index.mjs.map +2 -2
  1057. package/build-module/components/use-on-block-drop/index.mjs.map +2 -2
  1058. package/build-module/components/use-paste-styles/index.mjs.map +2 -2
  1059. package/build-module/components/use-resize-canvas/index.mjs.map +2 -2
  1060. package/build-module/components/use-settings/index.mjs.map +2 -2
  1061. package/build-module/components/warning/index.mjs.map +2 -2
  1062. package/build-module/components/writing-flow/index.mjs.map +2 -2
  1063. package/build-module/components/writing-flow/use-arrow-nav.mjs +11 -2
  1064. package/build-module/components/writing-flow/use-arrow-nav.mjs.map +2 -2
  1065. package/build-module/components/writing-flow/use-click-selection.mjs.map +2 -2
  1066. package/build-module/components/writing-flow/use-clipboard-handler.mjs +31 -5
  1067. package/build-module/components/writing-flow/use-clipboard-handler.mjs.map +2 -2
  1068. package/build-module/components/writing-flow/use-drag-selection.mjs.map +2 -2
  1069. package/build-module/components/writing-flow/use-editable-root-event-handlers.mjs.map +2 -2
  1070. package/build-module/components/writing-flow/use-editable-root.mjs.map +2 -2
  1071. package/build-module/components/writing-flow/use-home-end.mjs.map +2 -2
  1072. package/build-module/components/writing-flow/use-input.mjs.map +2 -2
  1073. package/build-module/components/writing-flow/use-multi-selection.mjs.map +2 -2
  1074. package/build-module/components/writing-flow/use-preview-mode-nav.mjs.map +2 -2
  1075. package/build-module/components/writing-flow/use-select-all.mjs.map +2 -2
  1076. package/build-module/components/writing-flow/use-selection-observer.mjs.map +2 -2
  1077. package/build-module/components/writing-flow/use-tab-nav.mjs +3 -1
  1078. package/build-module/components/writing-flow/use-tab-nav.mjs.map +2 -2
  1079. package/build-module/components/writing-flow/utils.mjs.map +2 -2
  1080. package/build-module/components/writing-mode-control/index.mjs.map +2 -2
  1081. package/build-module/hooks/align.mjs.map +2 -2
  1082. package/build-module/hooks/allowed-blocks.mjs.map +2 -2
  1083. package/build-module/hooks/anchor.mjs.map +2 -2
  1084. package/build-module/hooks/aria-label.mjs.map +2 -2
  1085. package/build-module/hooks/auto-inspector-controls.mjs.map +2 -2
  1086. package/build-module/hooks/background.mjs +1 -4
  1087. package/build-module/hooks/background.mjs.map +2 -2
  1088. package/build-module/hooks/block-bindings.mjs.map +2 -2
  1089. package/build-module/hooks/block-fields/fields-dropdown-menu.mjs.map +2 -2
  1090. package/build-module/hooks/block-fields/index.mjs.map +2 -2
  1091. package/build-module/hooks/block-fields/link/index.mjs.map +2 -2
  1092. package/build-module/hooks/block-fields/media/index.mjs.map +2 -2
  1093. package/build-module/hooks/block-fields/rich-text/index.mjs.map +2 -2
  1094. package/build-module/hooks/block-fields/use-inspector-popover-placement.mjs.map +2 -2
  1095. package/build-module/hooks/block-hooks.mjs.map +2 -2
  1096. package/build-module/hooks/block-renaming.mjs.map +2 -2
  1097. package/build-module/hooks/block-style-state.mjs.map +2 -2
  1098. package/build-module/hooks/block-style-variation.mjs.map +2 -2
  1099. package/build-module/hooks/border.mjs.map +2 -2
  1100. package/build-module/hooks/color.mjs.map +2 -2
  1101. package/build-module/hooks/compat.mjs.map +2 -2
  1102. package/build-module/hooks/contrast-checker.mjs.map +2 -2
  1103. package/build-module/hooks/custom-class-name.mjs.map +2 -2
  1104. package/build-module/hooks/dimensions.mjs.map +2 -2
  1105. package/build-module/hooks/duotone.mjs.map +2 -2
  1106. package/build-module/hooks/elements.mjs.map +2 -2
  1107. package/build-module/hooks/fit-text.mjs.map +2 -2
  1108. package/build-module/hooks/font-family.mjs +1 -3
  1109. package/build-module/hooks/font-family.mjs.map +2 -2
  1110. package/build-module/hooks/font-size.mjs.map +2 -2
  1111. package/build-module/hooks/gap.mjs.map +2 -2
  1112. package/build-module/hooks/generated-class-name.mjs.map +2 -2
  1113. package/build-module/hooks/grid-visualizer.mjs.map +2 -2
  1114. package/build-module/hooks/index.mjs.map +2 -2
  1115. package/build-module/hooks/layout-child.mjs.map +2 -2
  1116. package/build-module/hooks/layout.mjs +2 -3
  1117. package/build-module/hooks/layout.mjs.map +2 -2
  1118. package/build-module/hooks/line-height.mjs.map +2 -2
  1119. package/build-module/hooks/list-view.mjs.map +2 -2
  1120. package/build-module/hooks/lock.mjs.map +2 -2
  1121. package/build-module/hooks/metadata.mjs.map +2 -2
  1122. package/build-module/hooks/position.mjs.map +2 -2
  1123. package/build-module/hooks/settings.mjs.map +2 -2
  1124. package/build-module/hooks/spacing-visualizer.mjs.map +2 -2
  1125. package/build-module/hooks/state-utils.mjs.map +2 -2
  1126. package/build-module/hooks/states.mjs.map +2 -2
  1127. package/build-module/hooks/style.mjs.map +2 -2
  1128. package/build-module/hooks/supports.mjs.map +2 -2
  1129. package/build-module/hooks/text-align.mjs.map +2 -2
  1130. package/build-module/hooks/typography.mjs.map +2 -2
  1131. package/build-module/hooks/use-border-props.mjs.map +2 -2
  1132. package/build-module/hooks/use-cached-truthy.mjs.map +2 -2
  1133. package/build-module/hooks/use-color-props.mjs.map +2 -2
  1134. package/build-module/hooks/use-content-only-section-edit.mjs.map +2 -2
  1135. package/build-module/hooks/use-dimensions-props.mjs.map +2 -2
  1136. package/build-module/hooks/use-shadow-props.mjs.map +2 -2
  1137. package/build-module/hooks/use-spacing-props.mjs.map +2 -2
  1138. package/build-module/hooks/use-typography-props.mjs +1 -3
  1139. package/build-module/hooks/use-typography-props.mjs.map +2 -2
  1140. package/build-module/hooks/use-zoom-out.mjs.map +2 -2
  1141. package/build-module/hooks/utils.mjs.map +2 -2
  1142. package/build-module/index.mjs.map +2 -2
  1143. package/build-module/layouts/constrained.mjs.map +2 -2
  1144. package/build-module/layouts/flex.mjs.map +2 -2
  1145. package/build-module/layouts/flow.mjs.map +2 -2
  1146. package/build-module/layouts/grid.mjs.map +2 -2
  1147. package/build-module/layouts/index.mjs.map +2 -2
  1148. package/build-module/layouts/utils.mjs.map +2 -2
  1149. package/build-module/lock-unlock.mjs.map +2 -2
  1150. package/build-module/private-apis.mjs.map +2 -2
  1151. package/build-module/store/actions.mjs +104 -36
  1152. package/build-module/store/actions.mjs.map +3 -3
  1153. package/build-module/store/defaults.mjs +2 -0
  1154. package/build-module/store/defaults.mjs.map +2 -2
  1155. package/build-module/store/get-block-settings.mjs.map +2 -2
  1156. package/build-module/store/index.mjs.map +2 -2
  1157. package/build-module/store/private-actions.mjs +19 -2
  1158. package/build-module/store/private-actions.mjs.map +2 -2
  1159. package/build-module/store/private-selectors.mjs +27 -10
  1160. package/build-module/store/private-selectors.mjs.map +2 -2
  1161. package/build-module/store/reducer.mjs +3 -1
  1162. package/build-module/store/reducer.mjs.map +2 -2
  1163. package/build-module/store/selectors.mjs +21 -8
  1164. package/build-module/store/selectors.mjs.map +2 -2
  1165. package/build-module/store/utils.mjs.map +2 -2
  1166. package/build-module/utils/fit-text-frontend.mjs.map +2 -2
  1167. package/build-module/utils/format-font-style.mjs.map +2 -2
  1168. package/build-module/utils/format-font-weight.mjs.map +2 -2
  1169. package/build-module/utils/get-font-styles-and-weights.mjs.map +2 -2
  1170. package/build-module/utils/group-blocks.mjs +21 -0
  1171. package/build-module/utils/group-blocks.mjs.map +7 -0
  1172. package/build-module/utils/native-undo.mjs.map +2 -2
  1173. package/build-module/utils/pasting.mjs.map +2 -2
  1174. package/build-module/utils/selection.mjs.map +2 -2
  1175. package/build-module/utils/sibling-block-attributes.mjs +20 -0
  1176. package/build-module/utils/sibling-block-attributes.mjs.map +7 -0
  1177. package/build-module/utils/transform-styles/index.mjs.map +2 -2
  1178. package/build-module/utils/use-notify-copy.mjs.map +2 -2
  1179. package/build-style/content-rtl.css +2 -2
  1180. package/build-style/content.css +2 -2
  1181. package/build-style/style-rtl.css +37 -5
  1182. package/build-style/style.css +37 -5
  1183. package/build-types/components/block-context/index.d.ts.map +1 -1
  1184. package/build-types/components/block-visibility/constants.d.ts +44 -0
  1185. package/build-types/components/block-visibility/constants.d.ts.map +1 -0
  1186. package/build-types/components/block-visibility/use-block-visibility.d.ts +35 -0
  1187. package/build-types/components/block-visibility/use-block-visibility.d.ts.map +1 -0
  1188. package/build-types/lock-unlock.d.ts +2 -0
  1189. package/build-types/lock-unlock.d.ts.map +1 -0
  1190. package/build-types/utils/fit-text-frontend.d.ts +0 -5
  1191. package/build-types/utils/fit-text-frontend.d.ts.map +1 -1
  1192. package/build-types/utils/format-font-style.d.ts +0 -3
  1193. package/build-types/utils/format-font-style.d.ts.map +1 -1
  1194. package/build-types/utils/format-font-weight.d.ts +0 -3
  1195. package/build-types/utils/format-font-weight.d.ts.map +1 -1
  1196. package/build-types/utils/get-font-styles-and-weights.d.ts.map +1 -1
  1197. package/build-types/utils/pasting.d.ts.map +1 -1
  1198. package/build-types/utils/selection.d.ts.map +1 -1
  1199. package/build-types/utils/transform-styles/index.d.ts +0 -3
  1200. package/build-types/utils/transform-styles/index.d.ts.map +1 -1
  1201. package/package.json +42 -41
  1202. package/src/autocompleters/block.js +0 -7
  1203. package/src/autocompleters/test/block.js +0 -7
  1204. package/src/components/alignment-control/index.js +0 -3
  1205. package/src/components/alignment-control/stories/aliginment-toolbar.story.jsx +0 -7
  1206. package/src/components/alignment-control/stories/index.story.jsx +0 -7
  1207. package/src/components/alignment-control/test/index.js +0 -11
  1208. package/src/components/alignment-control/ui.js +0 -3
  1209. package/src/components/autocomplete/index.js +0 -7
  1210. package/src/components/background-image-control/index.js +0 -12
  1211. package/src/components/background-image-control/test/index.js +0 -4
  1212. package/src/components/block-actions/README.md +67 -0
  1213. package/src/components/block-actions/index.js +3 -14
  1214. package/src/components/block-alignment-control/constants.js +0 -3
  1215. package/src/components/block-alignment-control/index.js +0 -3
  1216. package/src/components/block-alignment-control/test/index.js +0 -7
  1217. package/src/components/block-alignment-control/ui.js +0 -11
  1218. package/src/components/block-alignment-control/use-available-alignments.js +0 -7
  1219. package/src/components/block-alignment-matrix-control/index.js +0 -3
  1220. package/src/components/block-alignment-matrix-control/stories/index.story.jsx +0 -7
  1221. package/src/components/block-allowed-blocks/allowed-blocks-control.js +0 -7
  1222. package/src/components/block-allowed-blocks/modal.js +0 -7
  1223. package/src/components/block-bindings/attribute-control.js +10 -11
  1224. package/src/components/block-bindings/index.js +0 -3
  1225. package/src/components/block-bindings/source-fields-list.js +0 -11
  1226. package/src/components/block-bindings/test/use-block-bindings-utils.js +1 -12
  1227. package/src/components/block-bindings/use-block-bindings-utils.js +0 -7
  1228. package/src/components/block-breadcrumb/index.js +0 -7
  1229. package/src/components/block-breadcrumb/test/index.js +0 -7
  1230. package/src/components/block-canvas/index.js +0 -7
  1231. package/src/components/block-card/index.js +0 -11
  1232. package/src/components/block-compare/block-view.js +0 -3
  1233. package/src/components/block-compare/index.js +0 -11
  1234. package/src/components/block-compare/test/block-view.js +0 -7
  1235. package/src/components/block-content-overlay/index.js +0 -7
  1236. package/src/components/block-context/README.md +0 -1
  1237. package/src/components/block-context/index.js +0 -3
  1238. package/src/components/block-controls/README.md +0 -3
  1239. package/src/components/block-controls/fill.js +0 -7
  1240. package/src/components/block-controls/groups.js +0 -3
  1241. package/src/components/block-controls/hook.js +0 -7
  1242. package/src/components/block-controls/index.js +0 -3
  1243. package/src/components/block-controls/slot.js +0 -7
  1244. package/src/components/block-controls/test/index.js +0 -11
  1245. package/src/components/block-draggable/draggable-chip.js +0 -7
  1246. package/src/components/block-draggable/index.js +0 -7
  1247. package/src/components/block-draggable/stories/index.story.jsx +0 -3
  1248. package/src/components/block-draggable/use-scroll-when-dragging.js +0 -3
  1249. package/src/components/block-edit/context.js +0 -3
  1250. package/src/components/block-edit/edit.js +0 -11
  1251. package/src/components/block-edit/index.js +0 -7
  1252. package/src/components/block-edit/multiple-usage-warning.js +0 -7
  1253. package/src/components/block-edit/test/edit.js +0 -11
  1254. package/src/components/block-edit-visually-button/index.js +0 -7
  1255. package/src/components/block-editing-mode/index.js +0 -7
  1256. package/src/components/block-full-height-alignment-control/index.js +0 -3
  1257. package/src/components/block-heading-level-dropdown/heading-level-icon.js +0 -3
  1258. package/src/components/block-heading-level-dropdown/index.js +0 -7
  1259. package/src/components/block-heading-level-dropdown/stories/index.story.jsx +0 -7
  1260. package/src/components/block-icon/index.js +0 -7
  1261. package/src/components/block-icon/stories/index.story.ts +0 -7
  1262. package/src/components/block-icon/test/index.js +0 -11
  1263. package/src/components/block-inspector/edit-contents.js +27 -32
  1264. package/src/components/block-inspector/index.js +7 -8
  1265. package/src/components/block-inspector/inspector-pre-tabs-slot-fill.js +0 -3
  1266. package/src/components/block-inspector/useBlockInspectorAnimationSettings.js +0 -7
  1267. package/src/components/block-list/README.md +98 -0
  1268. package/src/components/block-list/block-crash-boundary.js +0 -3
  1269. package/src/components/block-list/block-crash-warning.js +0 -7
  1270. package/src/components/block-list/block-html.js +0 -11
  1271. package/src/components/block-list/block-invalid-warning.js +0 -7
  1272. package/src/components/block-list/block.js +57 -23
  1273. package/src/components/block-list/index.js +62 -24
  1274. package/src/components/block-list/layout.js +0 -7
  1275. package/src/components/block-list/private-block-context.js +0 -3
  1276. package/src/components/block-list/subdirectory-icon.js +0 -3
  1277. package/src/components/block-list/use-block-props/index.js +57 -12
  1278. package/src/components/block-list/use-block-props/use-block-refs.js +0 -7
  1279. package/src/components/block-list/use-block-props/use-firefox-draggable-compatibility.js +0 -3
  1280. package/src/components/block-list/use-block-props/use-focus-first-element.js +0 -7
  1281. package/src/components/block-list/use-block-props/use-focus-handler.js +0 -7
  1282. package/src/components/block-list/use-block-props/use-intersection-observer.js +0 -7
  1283. package/src/components/block-list/use-block-props/use-is-hovered.js +0 -7
  1284. package/src/components/block-list/use-block-props/use-register-block-event-handlers.js +0 -7
  1285. package/src/components/block-list/use-block-props/use-scroll-into-view.js +0 -3
  1286. package/src/components/block-list/use-block-props/use-selected-block-event-handlers.js +0 -7
  1287. package/src/components/block-list/use-in-between-inserter.js +0 -7
  1288. package/src/components/block-list/zoom-out-separator.js +0 -11
  1289. package/src/components/block-list-appender/index.js +0 -11
  1290. package/src/components/block-lock/README.md +66 -0
  1291. package/src/components/block-lock/menu-item.js +0 -7
  1292. package/src/components/block-lock/modal.js +0 -7
  1293. package/src/components/block-lock/toolbar.js +0 -7
  1294. package/src/components/block-lock/use-block-lock.js +0 -7
  1295. package/src/components/block-manager/category.js +0 -7
  1296. package/src/components/block-manager/checklist.js +0 -7
  1297. package/src/components/block-manager/index.js +0 -7
  1298. package/src/components/block-mover/button.js +17 -26
  1299. package/src/components/block-mover/index.js +0 -12
  1300. package/src/components/block-mover/mover-description.js +0 -3
  1301. package/src/components/block-mover/stories/index.story.jsx +0 -7
  1302. package/src/components/block-mover/test/mover-description.js +0 -3
  1303. package/src/components/block-navigation/dropdown.js +0 -11
  1304. package/src/components/block-parent-selector/index.js +0 -7
  1305. package/src/components/block-pattern-setup/index.js +0 -8
  1306. package/src/components/block-pattern-setup/setup-toolbar.js +0 -7
  1307. package/src/components/block-pattern-setup/use-patterns-setup.js +0 -7
  1308. package/src/components/block-patterns-list/index.js +0 -11
  1309. package/src/components/block-patterns-list/stories/index.story.jsx +3 -10
  1310. package/src/components/block-patterns-paging/index.js +0 -3
  1311. package/src/components/block-popover/cover.js +0 -7
  1312. package/src/components/block-popover/drop-zone.js +0 -7
  1313. package/src/components/block-popover/inbetween.js +0 -11
  1314. package/src/components/block-popover/index.js +0 -11
  1315. package/src/components/block-popover/use-popover-scroll.js +0 -3
  1316. package/src/components/block-preview/async.js +0 -3
  1317. package/src/components/block-preview/auto.js +0 -7
  1318. package/src/components/block-preview/index.js +0 -11
  1319. package/src/components/block-preview/test/index.js +0 -11
  1320. package/src/components/block-quick-navigation/index.js +0 -7
  1321. package/src/components/block-removal-warning-modal/index.js +0 -7
  1322. package/src/components/block-rename/modal.js +0 -7
  1323. package/src/components/block-rename/rename-control.js +0 -7
  1324. package/src/components/block-rename/use-block-rename.js +0 -3
  1325. package/src/components/block-selection-clearer/index.js +0 -7
  1326. package/src/components/block-selection-clearer/test/index.js +0 -11
  1327. package/src/components/block-settings-menu/block-html-convert-button.js +0 -7
  1328. package/src/components/block-settings-menu/block-mode-toggle.js +0 -7
  1329. package/src/components/block-settings-menu/block-parent-selector-menu-item.js +0 -7
  1330. package/src/components/block-settings-menu/block-settings-dropdown.js +1 -8
  1331. package/src/components/block-settings-menu/block-settings-menu-first-item.js +0 -3
  1332. package/src/components/block-settings-menu/index.js +0 -7
  1333. package/src/components/block-settings-menu/test/block-mode-toggle.js +0 -11
  1334. package/src/components/block-settings-menu-controls/index.js +0 -7
  1335. package/src/components/block-styles/index.js +0 -11
  1336. package/src/components/block-styles/menu-items.js +0 -3
  1337. package/src/components/block-styles/test/utils.js +0 -3
  1338. package/src/components/block-styles/use-styles-for-block.js +0 -7
  1339. package/src/components/block-styles/utils.js +0 -3
  1340. package/src/components/block-switcher/block-styles-menu.js +0 -7
  1341. package/src/components/block-switcher/block-transformations-menu.js +0 -7
  1342. package/src/components/block-switcher/block-variation-transformations.js +0 -7
  1343. package/src/components/block-switcher/index.js +0 -7
  1344. package/src/components/block-switcher/pattern-transformations-menu.js +0 -8
  1345. package/src/components/block-switcher/preview-block-popover.js +0 -7
  1346. package/src/components/block-switcher/test/index.js +0 -11
  1347. package/src/components/block-switcher/test/use-transformed.patterns.js +0 -7
  1348. package/src/components/block-switcher/test/utils.js +0 -7
  1349. package/src/components/block-switcher/use-transformed-patterns.js +0 -7
  1350. package/src/components/block-switcher/utils.js +0 -3
  1351. package/src/components/block-title/index.js +0 -4
  1352. package/src/components/block-title/stories/index.story.jsx +0 -7
  1353. package/src/components/block-title/test/index.js +0 -11
  1354. package/src/components/block-title/use-block-display-title.js +0 -7
  1355. package/src/components/block-toolbar/block-styles-dropdown.js +0 -7
  1356. package/src/components/block-toolbar/block-toolbar-icon.js +0 -7
  1357. package/src/components/block-toolbar/block-toolbar-last-item.js +0 -3
  1358. package/src/components/block-toolbar/change-design.js +0 -7
  1359. package/src/components/block-toolbar/edit-section-button.js +0 -7
  1360. package/src/components/block-toolbar/index.js +0 -11
  1361. package/src/components/block-toolbar/pattern-overrides-dropdown.js +0 -7
  1362. package/src/components/block-toolbar/switch-section-style.js +0 -7
  1363. package/src/components/block-toolbar/test/block-toolbar-icon.js +0 -11
  1364. package/src/components/block-toolbar/use-has-block-toolbar.js +0 -6
  1365. package/src/components/block-toolbar/utils.js +0 -7
  1366. package/src/components/block-tools/block-toolbar-popover.js +0 -9
  1367. package/src/components/block-tools/empty-block-inserter.js +0 -7
  1368. package/src/components/block-tools/index.js +3 -20
  1369. package/src/components/block-tools/insertion-point.js +0 -11
  1370. package/src/components/block-tools/use-block-toolbar-popover-props.js +0 -7
  1371. package/src/components/block-tools/use-selected-block-tool-props.js +0 -7
  1372. package/src/components/block-tools/use-show-block-tools.js +0 -7
  1373. package/src/components/block-tools/zoom-out-mode-inserter-button.js +0 -7
  1374. package/src/components/block-tools/zoom-out-mode-inserters.js +0 -7
  1375. package/src/components/block-types-list/index.js +0 -7
  1376. package/src/components/block-variation-picker/index.js +0 -7
  1377. package/src/components/block-variation-transforms/index.js +0 -7
  1378. package/src/components/block-vertical-alignment-control/index.js +0 -3
  1379. package/src/components/block-vertical-alignment-control/test/index.js +0 -7
  1380. package/src/components/block-vertical-alignment-control/ui.js +0 -3
  1381. package/src/components/block-visibility/{constants.js → constants.ts} +10 -4
  1382. package/src/components/block-visibility/modal.js +0 -11
  1383. package/src/components/block-visibility/test/use-block-visibility.js +0 -12
  1384. package/src/components/block-visibility/test/utils.js +0 -3
  1385. package/src/components/block-visibility/use-block-visibility.ts +92 -0
  1386. package/src/components/block-visibility/utils.js +0 -7
  1387. package/src/components/block-visibility/viewport-menu-item.js +0 -7
  1388. package/src/components/block-visibility/viewport-toolbar.js +0 -7
  1389. package/src/components/block-visibility/viewport-visibility-info.js +0 -7
  1390. package/src/components/border-radius-control/README.md +0 -3
  1391. package/src/components/border-radius-control/constants.js +0 -3
  1392. package/src/components/border-radius-control/index.js +0 -7
  1393. package/src/components/border-radius-control/linked-button.js +0 -3
  1394. package/src/components/border-radius-control/stories/index.story.jsx +0 -7
  1395. package/src/components/border-radius-control/test/index.js +0 -12
  1396. package/src/components/border-radius-control/test/utils.js +0 -3
  1397. package/src/components/border-radius-control/utils.js +0 -7
  1398. package/src/components/button-block-appender/index.js +0 -11
  1399. package/src/components/child-layout-control/index.js +0 -7
  1400. package/src/components/child-layout-control/test/index.js +0 -11
  1401. package/src/components/collab/note-icon-slot.js +0 -3
  1402. package/src/components/collab/note-icon-toolbar-slot.js +0 -3
  1403. package/src/components/color-palette/control.js +0 -3
  1404. package/src/components/color-palette/index.js +0 -7
  1405. package/src/components/color-palette/stories/control.story.jsx +0 -7
  1406. package/src/components/color-palette/test/control.js +0 -7
  1407. package/src/components/color-palette/with-color-context.js +0 -7
  1408. package/src/components/color-style-selector/index.js +0 -3
  1409. package/src/components/colors/test/utils.js +0 -3
  1410. package/src/components/colors/test/with-colors.js +0 -7
  1411. package/src/components/colors/utils.js +1 -15
  1412. package/src/components/colors/with-colors.js +1 -11
  1413. package/src/components/colors-gradients/control.js +0 -11
  1414. package/src/components/colors-gradients/dropdown.js +0 -15
  1415. package/src/components/colors-gradients/panel-color-gradient-settings.js +21 -28
  1416. package/src/components/colors-gradients/style.scss +17 -7
  1417. package/src/components/colors-gradients/test/control.js +0 -7
  1418. package/src/components/colors-gradients/use-multiple-origin-colors-and-gradients.js +0 -7
  1419. package/src/components/contrast-checker/index.js +0 -7
  1420. package/src/components/contrast-checker/stories/index.story.ts +0 -3
  1421. package/src/components/contrast-checker/test/index.js +0 -11
  1422. package/src/components/convert-to-group-buttons/index.js +2 -13
  1423. package/src/components/convert-to-group-buttons/toolbar.js +3 -12
  1424. package/src/components/convert-to-group-buttons/use-convert-to-group-button-props.js +0 -7
  1425. package/src/components/copy-handler/index.js +0 -7
  1426. package/src/components/date-format-picker/index.js +0 -3
  1427. package/src/components/date-format-picker/stories/index.story.jsx +0 -7
  1428. package/src/components/default-block-appender/content.scss +6 -3
  1429. package/src/components/default-block-appender/index.js +0 -11
  1430. package/src/components/default-block-appender/test/index.js +0 -7
  1431. package/src/components/dimension-control/index.js +0 -11
  1432. package/src/components/dimension-control/stories/index.story.jsx +0 -7
  1433. package/src/components/dimensions-tool/aspect-ratio-tool.js +0 -6
  1434. package/src/components/dimensions-tool/index.js +0 -7
  1435. package/src/components/dimensions-tool/scale-tool.js +0 -3
  1436. package/src/components/dimensions-tool/stories/aspect-ratio-tool.story.jsx +0 -7
  1437. package/src/components/dimensions-tool/stories/index.story.jsx +0 -7
  1438. package/src/components/dimensions-tool/stories/scale-tool.story.jsx +0 -7
  1439. package/src/components/dimensions-tool/stories/width-height-tool.story.jsx +0 -7
  1440. package/src/components/dimensions-tool/test/index.js +0 -11
  1441. package/src/components/dimensions-tool/width-height-tool.js +0 -3
  1442. package/src/components/duotone-control/index.js +0 -3
  1443. package/src/components/editable-text/index.js +0 -7
  1444. package/src/components/editor-styles/index.js +0 -11
  1445. package/src/components/fit-text-size-warning/index.js +0 -3
  1446. package/src/components/floating-toolbar/nav-up-icon.js +0 -3
  1447. package/src/components/font-appearance-control/index.js +0 -7
  1448. package/src/components/font-family/index.js +0 -11
  1449. package/src/components/font-family/stories/index.story.jsx +0 -7
  1450. package/src/components/font-sizes/font-size-picker.js +0 -7
  1451. package/src/components/font-sizes/test/fluid-utils.js +0 -7
  1452. package/src/components/font-sizes/test/utils.js +0 -7
  1453. package/src/components/font-sizes/utils.js +1 -11
  1454. package/src/components/font-sizes/with-font-sizes.js +0 -7
  1455. package/src/components/global-styles/advanced-panel.js +0 -7
  1456. package/src/components/global-styles/background-panel.js +0 -7
  1457. package/src/components/global-styles/border-panel.js +0 -7
  1458. package/src/components/global-styles/color-gradient-dropdown-item.js +0 -11
  1459. package/src/components/global-styles/color-panel.js +0 -7
  1460. package/src/components/global-styles/dimensions-panel.js +0 -11
  1461. package/src/components/global-styles/filters-panel.js +0 -11
  1462. package/src/components/global-styles/hooks.js +0 -7
  1463. package/src/components/global-styles/image-settings-panel.js +0 -7
  1464. package/src/components/global-styles/inheritance/index.js +0 -7
  1465. package/src/components/global-styles/inheritance/test/index.js +0 -11
  1466. package/src/components/global-styles/inherited-value-context.js +0 -7
  1467. package/src/components/global-styles/shadow-panel-components.js +0 -12
  1468. package/src/components/global-styles/state-control-badges.js +0 -7
  1469. package/src/components/global-styles/state-control.js +0 -3
  1470. package/src/components/global-styles/test/background-panel.js +0 -8
  1471. package/src/components/global-styles/test/border-panel.js +0 -7
  1472. package/src/components/global-styles/test/color-panel.js +0 -7
  1473. package/src/components/global-styles/test/dimensions-panel.js +0 -7
  1474. package/src/components/global-styles/test/filters-panel.js +0 -7
  1475. package/src/components/global-styles/test/inherited-value-context-core.js +0 -11
  1476. package/src/components/global-styles/test/inherited-value-context.js +0 -12
  1477. package/src/components/global-styles/test/state-control-badges.js +0 -7
  1478. package/src/components/global-styles/test/typography-panel-core.js +0 -7
  1479. package/src/components/global-styles/test/typography-panel.js +0 -7
  1480. package/src/components/global-styles/test/typography-utils.js +0 -3
  1481. package/src/components/global-styles/typography-panel.js +0 -7
  1482. package/src/components/global-styles/typography-utils.js +0 -3
  1483. package/src/components/global-styles/utils.js +0 -3
  1484. package/src/components/gradients/use-gradient.js +0 -7
  1485. package/src/components/gradients/with-gradient.js +0 -3
  1486. package/src/components/grid/grid-item-movers.js +0 -11
  1487. package/src/components/grid/grid-item-resizer.js +0 -7
  1488. package/src/components/grid/grid-visualizer.js +0 -11
  1489. package/src/components/grid/use-get-number-of-blocks-before-cell.js +0 -7
  1490. package/src/components/grid/use-grid-layout-sync.js +0 -7
  1491. package/src/components/height-control/index.js +0 -7
  1492. package/src/components/height-control/stories/index.story.jsx +0 -7
  1493. package/src/components/html-element-control/index.js +0 -7
  1494. package/src/components/html-element-control/messages.js +0 -3
  1495. package/src/components/iframe/index.js +4 -16
  1496. package/src/components/iframe/use-scale-canvas.js +38 -14
  1497. package/src/components/image-editor/aspect-ratio-dropdown.js +0 -7
  1498. package/src/components/image-editor/context.js +0 -7
  1499. package/src/components/image-editor/cropper.js +0 -11
  1500. package/src/components/image-editor/form-controls.js +0 -7
  1501. package/src/components/image-editor/index.js +0 -7
  1502. package/src/components/image-editor/rotation-button.js +0 -8
  1503. package/src/components/image-editor/test/index.js +0 -3
  1504. package/src/components/image-editor/use-save-image.js +0 -7
  1505. package/src/components/image-editor/use-transform-image.js +0 -3
  1506. package/src/components/image-editor/zoom-dropdown.js +0 -7
  1507. package/src/components/image-size-control/index.js +0 -7
  1508. package/src/components/image-size-control/test/index.js +0 -7
  1509. package/src/components/image-size-control/use-dimension-handler.js +0 -3
  1510. package/src/components/inner-blocks/README.md +2 -0
  1511. package/src/components/inner-blocks/button-block-appender.js +0 -7
  1512. package/src/components/inner-blocks/default-block-appender.js +0 -3
  1513. package/src/components/inner-blocks/index.js +0 -11
  1514. package/src/components/inner-blocks/test/index.js +0 -8
  1515. package/src/components/inner-blocks/use-block-context.js +0 -7
  1516. package/src/components/inner-blocks/use-inner-block-template-sync.js +47 -23
  1517. package/src/components/inner-blocks/use-nested-settings-update.js +0 -7
  1518. package/src/components/inner-content/index.js +0 -7
  1519. package/src/components/inner-content/test/index.js +0 -11
  1520. package/src/components/inserter/block-patterns-explorer/index.js +0 -7
  1521. package/src/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js +0 -3
  1522. package/src/components/inserter/block-patterns-explorer/pattern-list.js +0 -7
  1523. package/src/components/inserter/block-patterns-tab/index.js +0 -7
  1524. package/src/components/inserter/block-patterns-tab/pattern-category-previews.js +0 -8
  1525. package/src/components/inserter/block-patterns-tab/patterns-filter.js +0 -7
  1526. package/src/components/inserter/block-patterns-tab/use-pattern-categories.js +0 -8
  1527. package/src/components/inserter/block-patterns-tab/utils.js +0 -4
  1528. package/src/components/inserter/block-types-tab.js +0 -7
  1529. package/src/components/inserter/category-tabs/index.js +0 -7
  1530. package/src/components/inserter/hooks/use-block-types-state.js +0 -7
  1531. package/src/components/inserter/hooks/use-insertion-point.js +0 -7
  1532. package/src/components/inserter/hooks/use-patterns-paging.js +0 -3
  1533. package/src/components/inserter/hooks/use-patterns-state.js +0 -7
  1534. package/src/components/inserter/index.js +4 -28
  1535. package/src/components/inserter/library.js +0 -7
  1536. package/src/components/inserter/media-tab/hooks.js +0 -7
  1537. package/src/components/inserter/media-tab/media-list.js +0 -7
  1538. package/src/components/inserter/media-tab/media-panel.js +0 -11
  1539. package/src/components/inserter/media-tab/media-preview.js +0 -12
  1540. package/src/components/inserter/media-tab/media-tab.js +0 -7
  1541. package/src/components/inserter/media-tab/test/hooks.js +0 -7
  1542. package/src/components/inserter/media-tab/test/media-panel.js +0 -7
  1543. package/src/components/inserter/media-tab/utils.js +0 -3
  1544. package/src/components/inserter/menu.js +0 -11
  1545. package/src/components/inserter/mobile-tab-navigation.js +0 -3
  1546. package/src/components/inserter/no-results.js +0 -3
  1547. package/src/components/inserter/panel.js +0 -3
  1548. package/src/components/inserter/preview-panel.js +0 -7
  1549. package/src/components/inserter/quick-inserter.js +0 -11
  1550. package/src/components/inserter/search-items.js +0 -3
  1551. package/src/components/inserter/search-results.js +0 -7
  1552. package/src/components/inserter/stories/index.story.jsx +0 -7
  1553. package/src/components/inserter/test/get-appender-label.js +0 -3
  1554. package/src/components/inserter/test/search-items.js +0 -3
  1555. package/src/components/inserter/tips.js +0 -3
  1556. package/src/components/inserter-button/sparkles.js +0 -3
  1557. package/src/components/inserter-draggable-blocks/index.js +0 -7
  1558. package/src/components/inserter-list-item/index.js +0 -11
  1559. package/src/components/inserter-listbox/context.js +0 -3
  1560. package/src/components/inserter-listbox/group.js +0 -3
  1561. package/src/components/inserter-listbox/index.js +0 -8
  1562. package/src/components/inserter-listbox/item.js +0 -3
  1563. package/src/components/inserter-listbox/row.js +0 -3
  1564. package/src/components/inserter-menu-extension/index.js +0 -3
  1565. package/src/components/inspector-controls/block-support-slot-container.js +0 -3
  1566. package/src/components/inspector-controls/block-support-tools-panel.js +0 -7
  1567. package/src/components/inspector-controls/fill.js +22 -37
  1568. package/src/components/inspector-controls/groups.js +0 -3
  1569. package/src/components/inspector-controls/index.js +0 -3
  1570. package/src/components/inspector-controls/last-item.js +0 -7
  1571. package/src/components/inspector-controls/list-view-content-popover.js +0 -7
  1572. package/src/components/inspector-controls/slot.js +0 -7
  1573. package/src/components/inspector-controls-tabs/advanced-controls-panel.js +0 -7
  1574. package/src/components/inspector-controls-tabs/content-tab.js +0 -7
  1575. package/src/components/inspector-controls-tabs/index.js +0 -8
  1576. package/src/components/inspector-controls-tabs/position-controls-panel.js +0 -7
  1577. package/src/components/inspector-controls-tabs/settings-tab.js +0 -7
  1578. package/src/components/inspector-controls-tabs/styles-tab.js +0 -7
  1579. package/src/components/inspector-controls-tabs/use-inspector-controls-tabs.js +0 -7
  1580. package/src/components/inspector-controls-tabs/utils.js +0 -3
  1581. package/src/components/inspector-popover-header/index.js +0 -3
  1582. package/src/components/justify-content-control/index.js +0 -3
  1583. package/src/components/justify-content-control/ui.js +0 -3
  1584. package/src/components/keyboard-shortcuts/index.js +0 -7
  1585. package/src/components/letter-spacing-control/index.js +0 -7
  1586. package/src/components/letter-spacing-control/stories/index.story.jsx +0 -7
  1587. package/src/components/line-height-control/index.js +0 -7
  1588. package/src/components/line-height-control/stories/index.story.jsx +0 -7
  1589. package/src/components/line-height-control/test/index.js +0 -11
  1590. package/src/components/link-control/constants.js +0 -3
  1591. package/src/components/link-control/index.js +0 -11
  1592. package/src/components/link-control/is-url-like.js +0 -3
  1593. package/src/components/link-control/link-preview.js +0 -13
  1594. package/src/components/link-control/normalize-url.js +0 -7
  1595. package/src/components/link-control/search-create-button.js +0 -3
  1596. package/src/components/link-control/search-input.js +0 -7
  1597. package/src/components/link-control/search-item.js +0 -3
  1598. package/src/components/link-control/search-results.js +1 -12
  1599. package/src/components/link-control/settings-drawer.js +0 -3
  1600. package/src/components/link-control/settings.js +0 -3
  1601. package/src/components/link-control/style.scss +1 -1
  1602. package/src/components/link-control/test/index.js +0 -11
  1603. package/src/components/link-control/test/is-url-like.js +0 -3
  1604. package/src/components/link-control/test/url-normalization.test.js +0 -11
  1605. package/src/components/link-control/use-create-page.js +0 -3
  1606. package/src/components/link-control/use-internal-value.js +0 -7
  1607. package/src/components/link-control/use-rich-url-data.js +1 -8
  1608. package/src/components/link-control/use-search-handler.js +0 -7
  1609. package/src/components/link-control/viewer-slot.js +0 -3
  1610. package/src/components/link-picker/link-picker.js +0 -7
  1611. package/src/components/link-picker/link-preview.js +0 -7
  1612. package/src/components/link-picker/test/index.js +0 -11
  1613. package/src/components/list-view/appender.js +7 -11
  1614. package/src/components/list-view/aria-referenced-text.js +12 -19
  1615. package/src/components/list-view/block-contents.js +28 -28
  1616. package/src/components/list-view/block-select-button.js +62 -40
  1617. package/src/components/list-view/block.js +41 -58
  1618. package/src/components/list-view/branch.js +179 -169
  1619. package/src/components/list-view/context.js +24 -3
  1620. package/src/components/list-view/drop-indicator.js +6 -18
  1621. package/src/components/list-view/expander.js +0 -3
  1622. package/src/components/list-view/index.js +95 -110
  1623. package/src/components/list-view/leaf.js +0 -11
  1624. package/src/components/list-view/style.scss +24 -4
  1625. package/src/components/list-view/test/use-list-view-drop-zone.js +0 -3
  1626. package/src/components/list-view/test/utils.js +0 -3
  1627. package/src/components/list-view/use-block-selection.js +0 -7
  1628. package/src/components/list-view/use-clipboard-handler.js +0 -7
  1629. package/src/components/list-view/use-list-view-block-indexes.js +0 -3
  1630. package/src/components/list-view/use-list-view-client-ids.js +0 -8
  1631. package/src/components/list-view/use-list-view-collapse-items.js +3 -11
  1632. package/src/components/list-view/use-list-view-drop-zone.js +11 -28
  1633. package/src/components/list-view/use-list-view-expand-selected-item.js +3 -10
  1634. package/src/components/list-view/use-list-view-images.js +6 -10
  1635. package/src/components/list-view/use-list-view-scroll-into-view.js +0 -3
  1636. package/src/components/list-view/utils.js +7 -6
  1637. package/src/components/media-placeholder/index.js +0 -11
  1638. package/src/components/media-placeholder/test/get-computed-accept-attribute.js +0 -3
  1639. package/src/components/media-placeholder/test/index.js +0 -7
  1640. package/src/components/media-replace-flow/index.js +0 -11
  1641. package/src/components/media-replace-flow/test/index.js +0 -10
  1642. package/src/components/media-upload/check.js +0 -7
  1643. package/src/components/media-upload/index.js +0 -3
  1644. package/src/components/multi-selection-inspector/index.js +42 -21
  1645. package/src/components/multi-selection-inspector/style.scss +5 -0
  1646. package/src/components/navigable-toolbar/index.js +38 -27
  1647. package/src/components/observe-typing/index.js +0 -7
  1648. package/src/components/panel-color-settings/README.md +0 -7
  1649. package/src/components/panel-color-settings/index.js +0 -3
  1650. package/src/components/panel-color-settings/test/index.js +0 -7
  1651. package/src/components/plain-text/index.js +0 -11
  1652. package/src/components/plain-text/stories/index.story.jsx +0 -7
  1653. package/src/components/preset-input-control/custom-value-controls.js +0 -4
  1654. package/src/components/preset-input-control/index.js +0 -7
  1655. package/src/components/preset-input-control/test/index.js +0 -7
  1656. package/src/components/preset-input-control/test/utils.js +0 -3
  1657. package/src/components/preview-options/index.js +0 -3
  1658. package/src/components/provider/block-refs-provider.js +0 -3
  1659. package/src/components/provider/index.js +0 -7
  1660. package/src/components/provider/selection-context.js +0 -3
  1661. package/src/components/provider/test/experimental-provider.js +0 -10
  1662. package/src/components/provider/test/use-block-sync.js +0 -12
  1663. package/src/components/provider/use-block-sync.js +0 -7
  1664. package/src/components/provider/use-media-upload-settings.js +0 -3
  1665. package/src/components/provider/with-registry-provider.js +0 -7
  1666. package/src/components/publish-date-time-picker/index.js +0 -7
  1667. package/src/components/recursion-provider/README.md +0 -3
  1668. package/src/components/recursion-provider/index.js +0 -7
  1669. package/src/components/recursion-provider/test/index.js +0 -7
  1670. package/src/components/resizable-box-popover/index.js +0 -7
  1671. package/src/components/resolution-tool/index.js +0 -3
  1672. package/src/components/resolution-tool/stories/index.story.jsx +0 -7
  1673. package/src/components/responsive-block-control/index.js +0 -11
  1674. package/src/components/responsive-block-control/label.js +0 -3
  1675. package/src/components/responsive-block-control/test/index.js +0 -11
  1676. package/src/components/rich-text/content.js +0 -11
  1677. package/src/components/rich-text/event-listeners/before-input-rules.js +0 -7
  1678. package/src/components/rich-text/event-listeners/delete.js +0 -7
  1679. package/src/components/rich-text/event-listeners/enter.js +0 -7
  1680. package/src/components/rich-text/event-listeners/firefox-compat.js +0 -3
  1681. package/src/components/rich-text/event-listeners/index.js +0 -7
  1682. package/src/components/rich-text/event-listeners/input-events.js +0 -8
  1683. package/src/components/rich-text/event-listeners/input-rules.js +15 -20
  1684. package/src/components/rich-text/event-listeners/insert-replacement-text.js +0 -8
  1685. package/src/components/rich-text/event-listeners/paste-handler.js +14 -8
  1686. package/src/components/rich-text/event-listeners/remove-browser-shortcuts.js +0 -8
  1687. package/src/components/rich-text/event-listeners/shortcuts.js +0 -8
  1688. package/src/components/rich-text/event-listeners/undo-automatic-change.js +0 -8
  1689. package/src/components/rich-text/format-edit.js +0 -7
  1690. package/src/components/rich-text/format-toolbar/index.js +0 -11
  1691. package/src/components/rich-text/format-toolbar-container.js +0 -7
  1692. package/src/components/rich-text/get-rich-text-values.js +0 -7
  1693. package/src/components/rich-text/index.js +0 -11
  1694. package/src/components/rich-text/multiline.js +0 -7
  1695. package/src/components/rich-text/prevent-event-discovery.js +0 -3
  1696. package/src/components/rich-text/toolbar-button.js +0 -3
  1697. package/src/components/rich-text/use-mark-persistent.js +0 -7
  1698. package/src/components/rich-text/utils.js +0 -3
  1699. package/src/components/rich-text/with-deprecations.js +0 -7
  1700. package/src/components/selection-scroll-into-view/index.js +0 -3
  1701. package/src/components/skip-to-selected-block/index.js +0 -7
  1702. package/src/components/spacing-sizes-control/hooks/use-spacing-sizes.js +0 -7
  1703. package/src/components/spacing-sizes-control/index.js +2 -9
  1704. package/src/components/spacing-sizes-control/input-controls/axial.js +0 -3
  1705. package/src/components/spacing-sizes-control/input-controls/separated.js +0 -3
  1706. package/src/components/spacing-sizes-control/input-controls/single.js +0 -3
  1707. package/src/components/spacing-sizes-control/input-controls/spacing-input-control.js +0 -7
  1708. package/src/components/spacing-sizes-control/linked-button.js +0 -3
  1709. package/src/components/spacing-sizes-control/test/index.js +0 -12
  1710. package/src/components/spacing-sizes-control/test/utils.js +0 -3
  1711. package/src/components/spacing-sizes-control/utils.js +0 -7
  1712. package/src/components/tabbed-sidebar/index.js +0 -7
  1713. package/src/components/tabbed-sidebar/stories/index.story.jsx +0 -7
  1714. package/src/components/text-alignment-control/index.js +0 -7
  1715. package/src/components/text-alignment-control/stories/index.story.jsx +0 -7
  1716. package/src/components/text-decoration-control/index.js +0 -7
  1717. package/src/components/text-decoration-control/stories/index.story.jsx +0 -7
  1718. package/src/components/text-indent-control/index.js +0 -7
  1719. package/src/components/text-transform-control/index.js +0 -7
  1720. package/src/components/text-transform-control/stories/index.story.jsx +0 -7
  1721. package/src/components/tool-selector/index.js +0 -3
  1722. package/src/components/typewriter/index.js +0 -3
  1723. package/src/components/unit-control/index.js +0 -7
  1724. package/src/components/unit-control/stories/index.story.jsx +0 -7
  1725. package/src/components/url-input/button.js +0 -7
  1726. package/src/components/url-input/index.js +55 -75
  1727. package/src/components/url-input/test/button.js +0 -11
  1728. package/src/components/url-input/test/index.js +85 -11
  1729. package/src/components/url-popover/image-url-input-ui.js +2 -9
  1730. package/src/components/url-popover/index.js +0 -7
  1731. package/src/components/url-popover/link-editor.js +0 -11
  1732. package/src/components/url-popover/link-viewer-url.js +0 -7
  1733. package/src/components/url-popover/link-viewer.js +0 -11
  1734. package/src/components/url-popover/stories/index.story.jsx +0 -7
  1735. package/src/components/url-popover/style.scss +5 -0
  1736. package/src/components/use-block-commands/index.js +2 -9
  1737. package/src/components/use-block-display-information/index.js +1 -8
  1738. package/src/components/use-block-display-information/test/index.js +0 -11
  1739. package/src/components/use-block-drop-zone/index.js +0 -7
  1740. package/src/components/use-block-drop-zone/test/index.js +0 -3
  1741. package/src/components/use-flash-editable-blocks/index.js +0 -7
  1742. package/src/components/use-list-view-panel-state/index.js +0 -7
  1743. package/src/components/use-moving-animation/index.js +9 -14
  1744. package/src/components/use-on-block-drop/index.js +0 -7
  1745. package/src/components/use-on-block-drop/test/index.js +1 -7
  1746. package/src/components/use-paste-styles/index.js +0 -7
  1747. package/src/components/use-resize-canvas/index.js +0 -3
  1748. package/src/components/use-settings/index.js +0 -7
  1749. package/src/components/warning/index.js +0 -7
  1750. package/src/components/warning/stories/index.story.jsx +0 -7
  1751. package/src/components/warning/test/index.js +0 -7
  1752. package/src/components/writing-flow/index.js +0 -11
  1753. package/src/components/writing-flow/test/index.js +0 -7
  1754. package/src/components/writing-flow/use-arrow-nav.js +23 -16
  1755. package/src/components/writing-flow/use-click-selection.js +0 -7
  1756. package/src/components/writing-flow/use-clipboard-handler.js +65 -11
  1757. package/src/components/writing-flow/use-drag-selection.js +0 -7
  1758. package/src/components/writing-flow/use-editable-root-event-handlers.js +0 -7
  1759. package/src/components/writing-flow/use-editable-root.js +0 -7
  1760. package/src/components/writing-flow/use-home-end.js +0 -7
  1761. package/src/components/writing-flow/use-input.js +0 -7
  1762. package/src/components/writing-flow/use-multi-selection.js +0 -7
  1763. package/src/components/writing-flow/use-preview-mode-nav.js +0 -7
  1764. package/src/components/writing-flow/use-select-all.js +0 -7
  1765. package/src/components/writing-flow/use-selection-observer.js +0 -7
  1766. package/src/components/writing-flow/use-tab-nav.js +7 -8
  1767. package/src/components/writing-flow/utils.js +0 -7
  1768. package/src/components/writing-mode-control/index.js +0 -7
  1769. package/src/components/writing-mode-control/stories/index.story.jsx +0 -7
  1770. package/src/elements/test/index.js +0 -3
  1771. package/src/hooks/align.js +0 -11
  1772. package/src/hooks/allowed-blocks.js +0 -7
  1773. package/src/hooks/anchor.js +0 -7
  1774. package/src/hooks/aria-label.js +0 -7
  1775. package/src/hooks/auto-inspector-controls.js +0 -7
  1776. package/src/hooks/background.js +3 -15
  1777. package/src/hooks/block-bindings.js +0 -7
  1778. package/src/hooks/block-fields/fields-dropdown-menu.js +0 -7
  1779. package/src/hooks/block-fields/index.js +0 -1
  1780. package/src/hooks/block-fields/link/index.js +0 -7
  1781. package/src/hooks/block-fields/media/index.js +0 -7
  1782. package/src/hooks/block-fields/rich-text/index.js +0 -7
  1783. package/src/hooks/block-fields/use-inspector-popover-placement.js +0 -3
  1784. package/src/hooks/block-hooks.js +0 -7
  1785. package/src/hooks/block-renaming.js +0 -3
  1786. package/src/hooks/block-style-state.js +0 -7
  1787. package/src/hooks/block-style-variation.js +0 -7
  1788. package/src/hooks/border.js +0 -11
  1789. package/src/hooks/color.js +0 -11
  1790. package/src/hooks/compat.js +0 -3
  1791. package/src/hooks/contrast-checker.js +0 -8
  1792. package/src/hooks/custom-class-name.js +0 -11
  1793. package/src/hooks/dimensions.js +0 -11
  1794. package/src/hooks/duotone.js +0 -11
  1795. package/src/hooks/elements.js +0 -7
  1796. package/src/hooks/fit-text.js +0 -8
  1797. package/src/hooks/font-family.js +1 -10
  1798. package/src/hooks/font-size.js +0 -7
  1799. package/src/hooks/gap.js +0 -3
  1800. package/src/hooks/generated-class-name.js +0 -3
  1801. package/src/hooks/grid-visualizer.js +0 -7
  1802. package/src/hooks/index.js +0 -3
  1803. package/src/hooks/layout-child.js +0 -7
  1804. package/src/hooks/layout.js +1 -13
  1805. package/src/hooks/line-height.js +0 -7
  1806. package/src/hooks/list-view.js +0 -8
  1807. package/src/hooks/lock.js +0 -3
  1808. package/src/hooks/metadata.js +0 -3
  1809. package/src/hooks/position.js +0 -11
  1810. package/src/hooks/settings.js +0 -3
  1811. package/src/hooks/spacing-visualizer.js +0 -7
  1812. package/src/hooks/state-utils.js +0 -3
  1813. package/src/hooks/states.js +0 -7
  1814. package/src/hooks/style.js +0 -7
  1815. package/src/hooks/supports.js +0 -3
  1816. package/src/hooks/test/align.js +0 -7
  1817. package/src/hooks/test/allowed-blocks.js +0 -7
  1818. package/src/hooks/test/anchor.js +0 -7
  1819. package/src/hooks/test/auto-inspector-controls.js +0 -7
  1820. package/src/hooks/test/background.js +115 -3
  1821. package/src/hooks/test/block-style-state.js +0 -3
  1822. package/src/hooks/test/custom-class-name.js +0 -7
  1823. package/src/hooks/test/dimensions.js +0 -7
  1824. package/src/hooks/test/duotone.js +0 -3
  1825. package/src/hooks/test/font-size.js +0 -11
  1826. package/src/hooks/test/gap.js +0 -3
  1827. package/src/hooks/test/generate-fields-from-attributes.js +0 -3
  1828. package/src/hooks/test/generated-class-name.js +0 -7
  1829. package/src/hooks/test/inherited-value-wiring.js +0 -3
  1830. package/src/hooks/test/layout-child.js +0 -3
  1831. package/src/hooks/test/layout.js +0 -3
  1832. package/src/hooks/test/metadata.js +0 -7
  1833. package/src/hooks/test/preset-round-trip.js +0 -6
  1834. package/src/hooks/test/settings.js +0 -7
  1835. package/src/hooks/test/state-utils.js +0 -7
  1836. package/src/hooks/test/style.js +0 -7
  1837. package/src/hooks/test/text-align.js +0 -7
  1838. package/src/hooks/test/use-typography-props.js +0 -3
  1839. package/src/hooks/test/utils.js +0 -3
  1840. package/src/hooks/text-align.js +0 -11
  1841. package/src/hooks/typography.js +0 -8
  1842. package/src/hooks/use-border-props.js +0 -3
  1843. package/src/hooks/use-cached-truthy.js +0 -3
  1844. package/src/hooks/use-color-props.js +0 -11
  1845. package/src/hooks/use-content-only-section-edit.js +0 -7
  1846. package/src/hooks/use-dimensions-props.js +0 -3
  1847. package/src/hooks/use-shadow-props.js +0 -3
  1848. package/src/hooks/use-spacing-props.js +0 -3
  1849. package/src/hooks/use-typography-props.js +1 -15
  1850. package/src/hooks/use-zoom-out.js +0 -7
  1851. package/src/hooks/utils.js +0 -11
  1852. package/src/index.js +0 -3
  1853. package/src/layouts/constrained.js +0 -7
  1854. package/src/layouts/flex.js +0 -7
  1855. package/src/layouts/flow.js +0 -7
  1856. package/src/layouts/grid.js +0 -8
  1857. package/src/layouts/index.js +0 -3
  1858. package/src/layouts/test/constrained.js +0 -11
  1859. package/src/layouts/test/flex.js +0 -11
  1860. package/src/layouts/test/flow.js +0 -3
  1861. package/src/layouts/test/grid.js +0 -11
  1862. package/src/layouts/test/utils.js +0 -3
  1863. package/src/layouts/utils.js +0 -7
  1864. package/src/lock-unlock.ts +0 -3
  1865. package/src/private-apis.js +0 -7
  1866. package/src/store/actions.js +162 -53
  1867. package/src/store/defaults.js +4 -3
  1868. package/src/store/get-block-settings.js +0 -7
  1869. package/src/store/index.js +0 -7
  1870. package/src/store/private-actions.js +33 -5
  1871. package/src/store/private-selectors.js +43 -17
  1872. package/src/store/reducer.js +8 -12
  1873. package/src/store/selectors.js +44 -21
  1874. package/src/store/test/actions.js +203 -26
  1875. package/src/store/test/array.js +0 -3
  1876. package/src/store/test/get-block-settings.js +0 -7
  1877. package/src/store/test/performance.js +0 -3
  1878. package/src/store/test/private-actions.js +0 -3
  1879. package/src/store/test/private-selectors.js +155 -17
  1880. package/src/store/test/reducer.js +30 -11
  1881. package/src/store/test/registry-selectors.js +0 -7
  1882. package/src/store/test/selectors.js +143 -7
  1883. package/src/store/utils.js +0 -7
  1884. package/src/utils/fit-text-frontend.ts +0 -8
  1885. package/src/utils/format-font-style.ts +0 -7
  1886. package/src/utils/format-font-weight.ts +0 -7
  1887. package/src/utils/get-font-styles-and-weights.ts +0 -7
  1888. package/src/utils/group-blocks.js +36 -0
  1889. package/src/utils/native-undo.js +0 -3
  1890. package/src/utils/pasting.ts +0 -3
  1891. package/src/utils/selection.ts +0 -3
  1892. package/src/utils/sibling-block-attributes.js +30 -0
  1893. package/src/utils/test/block-bindings.js +0 -3
  1894. package/src/utils/test/color-values.js +0 -3
  1895. package/src/utils/test/format-font-style.js +0 -3
  1896. package/src/utils/test/format-font-weight.js +0 -3
  1897. package/src/utils/test/get-font-styles-and-weights.js +0 -3
  1898. package/src/utils/test/math.js +0 -3
  1899. package/src/utils/test/object.js +0 -3
  1900. package/src/utils/test/pasting.js +0 -3
  1901. package/src/utils/test/selection.js +0 -3
  1902. package/src/utils/test/sorting.js +0 -3
  1903. package/src/utils/test/transform-styles.js +0 -3
  1904. package/src/utils/transform-styles/index.ts +0 -8
  1905. package/src/utils/use-notify-copy.js +0 -7
  1906. package/src/components/block-visibility/use-block-visibility.js +0 -76
@@ -4,8 +4,10 @@ import { useContext } from "@wordpress/element";
4
4
  import { __, sprintf } from "@wordpress/i18n";
5
5
  import { __unstableGetBlockProps as getBlockProps } from "@wordpress/blocks";
6
6
  import { useMergeRefs, useDisabled, useRefEffect } from "@wordpress/compose";
7
+ import { useDispatch } from "@wordpress/data";
7
8
  import warning from "@wordpress/warning";
8
9
  import useMovingAnimation from "../../use-moving-animation/index.mjs";
10
+ import { store as blockEditorStore } from "../../../store/index.mjs";
9
11
  import { PrivateBlockContext } from "../private-block-context.mjs";
10
12
  import { useFocusFirstElement } from "./use-focus-first-element.mjs";
11
13
  import { useIsHovered } from "./use-is-hovered.mjs";
@@ -22,6 +24,34 @@ import { useScrollIntoView } from "./use-scroll-into-view.mjs";
22
24
  import { useFlashEditableBlocks } from "../../use-flash-editable-blocks/index.mjs";
23
25
  import { useFirefoxDraggableCompatibility } from "./use-firefox-draggable-compatibility.mjs";
24
26
  import { useBlockVisibility } from "../../block-visibility/index.mjs";
27
+ function useGhostMaterialize(rootClientId, ghostBlock) {
28
+ const { insertBlocks } = useDispatch(blockEditorStore);
29
+ return useRefEffect(
30
+ (element) => {
31
+ if (!ghostBlock) {
32
+ return;
33
+ }
34
+ function remove() {
35
+ element.removeEventListener("pointerdown", materialize, true);
36
+ element.removeEventListener("focusin", materialize, true);
37
+ }
38
+ function materialize() {
39
+ remove();
40
+ insertBlocks(
41
+ [ghostBlock],
42
+ void 0,
43
+ rootClientId,
44
+ true,
45
+ 0
46
+ );
47
+ }
48
+ element.addEventListener("pointerdown", materialize, true);
49
+ element.addEventListener("focusin", materialize, true);
50
+ return remove;
51
+ },
52
+ [ghostBlock, rootClientId, insertBlocks]
53
+ );
54
+ }
25
55
  function useBlockProps(props = {}, { __unstableIsHtml } = {}) {
26
56
  const {
27
57
  clientId,
@@ -54,8 +84,11 @@ function useBlockProps(props = {}, { __unstableIsHtml } = {}) {
54
84
  blockVisibility,
55
85
  deviceType,
56
86
  viewportSettings,
57
- ariaLabel
87
+ ariaLabel,
88
+ ghostBlock,
89
+ rootClientId
58
90
  } = useContext(PrivateBlockContext);
91
+ const ghostRef = useGhostMaterialize(rootClientId, ghostBlock);
59
92
  useRegisterBlockEventHandlers(clientId, wrapperProps);
60
93
  const defaultViewRef = useRefEffect((element) => {
61
94
  if (element) {
@@ -70,6 +103,7 @@ function useBlockProps(props = {}, { __unstableIsHtml } = {}) {
70
103
  const isHoverEnabled = !isWithinSectionBlock;
71
104
  const mergedRefs = useMergeRefs([
72
105
  props.ref,
106
+ ghostRef,
73
107
  defaultViewRef,
74
108
  useFocusFirstElement({ clientId, initialPosition }),
75
109
  useBlockRefProvider(clientId),
@@ -115,7 +149,7 @@ function useBlockProps(props = {}, { __unstableIsHtml } = {}) {
115
149
  ref: mergedRefs,
116
150
  id: `block-${clientId}${htmlSuffix}`,
117
151
  role: "document",
118
- "aria-label": ariaLabel ?? blockLabel,
152
+ "aria-label": ariaLabel ?? (clientId === ghostBlock?.clientId ? __("Add default block") : void 0) ?? props["aria-label"] ?? blockLabel,
119
153
  "data-block": clientId,
120
154
  "data-type": name,
121
155
  "data-title": blockTitle,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/components/block-list/use-block-props/index.js"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useContext } from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { __unstableGetBlockProps as getBlockProps } from '@wordpress/blocks';\nimport { useMergeRefs, useDisabled, useRefEffect } from '@wordpress/compose';\nimport warning from '@wordpress/warning';\n\n/**\n * Internal dependencies\n */\nimport useMovingAnimation from '../../use-moving-animation';\nimport { PrivateBlockContext } from '../private-block-context';\nimport { useFocusFirstElement } from './use-focus-first-element';\nimport { useIsHovered } from './use-is-hovered';\nimport {\n\tblockBindingsKey,\n\tuseBlockEditContext,\n} from '../../block-edit/context';\nimport { useFocusHandler } from './use-focus-handler';\nimport { useRegisterBlockEventHandlers } from './use-register-block-event-handlers';\nimport { useEventHandlers } from './use-selected-block-event-handlers';\nimport { useBlockRefProvider } from './use-block-refs';\nimport { useIntersectionObserver } from './use-intersection-observer';\nimport { useScrollIntoView } from './use-scroll-into-view';\nimport { useFlashEditableBlocks } from '../../use-flash-editable-blocks';\nimport { useFirefoxDraggableCompatibility } from './use-firefox-draggable-compatibility';\nimport { useBlockVisibility } from '../../block-visibility/';\n\n/**\n * This hook is used to lightly mark an element as a block element. The element\n * should be the outermost element of a block. Call this hook and pass the\n * returned props to the element to mark as a block. If you define a ref for the\n * element, it is important to pass the ref to this hook, which the hook in turn\n * will pass to the component through the props it returns. Optionally, you can\n * also pass any other props through this hook, and they will be merged and\n * returned.\n *\n * Use of this hook on the outermost element of a block is required if using API >= v2.\n *\n * @example\n * ```js\n * import { useBlockProps } from '@wordpress/block-editor';\n *\n * export default function Edit() {\n *\n * const blockProps = useBlockProps( {\n * className: 'my-custom-class',\n * style: {\n * color: '#222222',\n * backgroundColor: '#eeeeee'\n * }\n * } )\n *\n * return (\n *\t <div { ...blockProps }>\n *\n * </div>\n * )\n * }\n *\n * ```\n *\n *\n * @param {Object} props Optional. Props to pass to the element. Must contain\n * the ref if one is defined.\n * @param {Object} options Options for internal use only.\n * @param {boolean} options.__unstableIsHtml\n *\n * @return {Object} Props to pass to the element to mark as a block.\n */\nexport function useBlockProps( props = {}, { __unstableIsHtml } = {} ) {\n\tconst {\n\t\tclientId,\n\t\tclassName,\n\t\twrapperProps = {},\n\t\tisAligned,\n\t\tindex,\n\t\tmode,\n\t\tname,\n\t\tblockApiVersion,\n\t\tblockTitle,\n\t\tisSelected,\n\t\tisSubtreeDisabled,\n\t\thasOverlay,\n\t\tinitialPosition,\n\t\tblockEditingMode,\n\t\tisHighlighted,\n\t\tisMultiSelected,\n\t\tisPartiallySelected,\n\t\tisReusable,\n\t\tisDragging,\n\t\thasChildSelected,\n\t\tisEditingDisabled,\n\t\thasEditableOutline,\n\t\tisEditingContentOnlySection,\n\t\tdefaultClassName,\n\t\tisSectionBlock,\n\t\tisWithinSectionBlock,\n\t\tcanMove,\n\t\tblockVisibility,\n\t\tdeviceType,\n\t\tviewportSettings,\n\t\tariaLabel,\n\t} = useContext( PrivateBlockContext );\n\n\tuseRegisterBlockEventHandlers( clientId, wrapperProps );\n\n\tconst defaultViewRef = useRefEffect( ( element ) => {\n\t\tif ( element ) {\n\t\t\tconst { ownerDocument } = element;\n\t\t\tconst { defaultView } = ownerDocument;\n\t\t\tdefaultViewRef.current = defaultView;\n\t\t}\n\t}, [] );\n\n\t// translators: %s: Type of block (i.e. Text, Image etc)\n\tconst blockLabel = sprintf( __( 'Block: %s' ), blockTitle );\n\tconst htmlSuffix = mode === 'html' && ! __unstableIsHtml ? '-visual' : '';\n\tconst ffDragRef = useFirefoxDraggableCompatibility();\n\tconst isHoverEnabled = ! isWithinSectionBlock;\n\tconst mergedRefs = useMergeRefs( [\n\t\tprops.ref,\n\t\tdefaultViewRef,\n\t\tuseFocusFirstElement( { clientId, initialPosition } ),\n\t\tuseBlockRefProvider( clientId ),\n\t\tuseFocusHandler( clientId ),\n\t\tuseEventHandlers( { clientId, isSelected } ),\n\t\tuseIsHovered( { isEnabled: isHoverEnabled } ),\n\t\tuseIntersectionObserver(),\n\t\tuseMovingAnimation( { triggerAnimationOnChange: index, clientId } ),\n\t\tuseDisabled( { isDisabled: ! hasOverlay } ),\n\t\tuseFlashEditableBlocks( {\n\t\t\tclientId,\n\t\t\tisEnabled: isSectionBlock,\n\t\t} ),\n\t\tuseScrollIntoView( { isSelected } ),\n\t\tcanMove ? ffDragRef : undefined,\n\t] );\n\n\tconst blockEditContext = useBlockEditContext();\n\tconst hasBlockBindings = !! blockEditContext[ blockBindingsKey ];\n\tconst bindingsStyle = hasBlockBindings\n\t\t? {\n\t\t\t\t'--wp-admin-theme-color': 'var(--wp-block-synced-color)',\n\t\t\t\t'--wp-admin-theme-color--rgb':\n\t\t\t\t\t'var(--wp-block-synced-color--rgb)',\n\t\t }\n\t\t: {};\n\n\t// Use block visibility hook with data from context to avoid extra subscription.\n\tconst { isBlockCurrentlyHidden } = useBlockVisibility( {\n\t\tblockVisibility,\n\t\tdeviceType,\n\t\tviewportSettings,\n\t\tview: defaultViewRef.current,\n\t} );\n\n\t// Ensures it warns only inside the `edit` implementation for the block.\n\tif ( blockApiVersion < 2 && clientId === blockEditContext.clientId ) {\n\t\twarning(\n\t\t\t`Block type \"${ name }\" must support API version 2 or higher to work correctly with \"useBlockProps\" method.`\n\t\t);\n\t}\n\n\tlet hasNegativeMargin = false;\n\tif (\n\t\twrapperProps?.style?.marginTop?.charAt( 0 ) === '-' ||\n\t\twrapperProps?.style?.marginBottom?.charAt( 0 ) === '-' ||\n\t\twrapperProps?.style?.marginLeft?.charAt( 0 ) === '-' ||\n\t\twrapperProps?.style?.marginRight?.charAt( 0 ) === '-'\n\t) {\n\t\thasNegativeMargin = true;\n\t}\n\n\treturn {\n\t\ttabIndex: blockEditingMode === 'disabled' ? -1 : 0,\n\t\tdraggable: canMove && ! hasChildSelected ? true : undefined,\n\t\t...wrapperProps,\n\t\t...props,\n\t\tref: mergedRefs,\n\t\tid: `block-${ clientId }${ htmlSuffix }`,\n\t\trole: 'document',\n\t\t'aria-label': ariaLabel ?? blockLabel,\n\t\t'data-block': clientId,\n\t\t'data-type': name,\n\t\t'data-title': blockTitle,\n\t\tinert: isSubtreeDisabled ? 'true' : undefined,\n\t\tclassName: clsx(\n\t\t\t'block-editor-block-list__block',\n\t\t\t{\n\t\t\t\t// The wp-block className is important for editor styles.\n\t\t\t\t'wp-block': ! isAligned,\n\t\t\t\t'has-block-overlay': hasOverlay,\n\t\t\t\t'is-selected': isSelected,\n\t\t\t\t'is-highlighted': isHighlighted,\n\t\t\t\t'is-multi-selected': isMultiSelected,\n\t\t\t\t'is-partially-selected': isPartiallySelected,\n\t\t\t\t'is-reusable': isReusable,\n\t\t\t\t'is-dragging': isDragging,\n\t\t\t\t'has-child-selected': hasChildSelected,\n\t\t\t\t'is-editing-disabled': isEditingDisabled,\n\t\t\t\t'has-editable-outline': hasEditableOutline,\n\t\t\t\t'has-negative-margin': hasNegativeMargin,\n\t\t\t\t'is-editing-content-only-section': isEditingContentOnlySection,\n\t\t\t\t'is-block-hidden': isBlockCurrentlyHidden,\n\t\t\t},\n\t\t\tclassName,\n\t\t\tprops.className,\n\t\t\twrapperProps.className,\n\t\t\tdefaultClassName\n\t\t),\n\t\tstyle: { ...wrapperProps.style, ...props.style, ...bindingsStyle },\n\t};\n}\n\n/**\n * Call within a save function to get the props for the block wrapper.\n *\n * @param {Object} props Optional. Props to pass to the element.\n */\nuseBlockProps.save = getBlockProps;\n"],
5
- "mappings": "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",
4
+ "sourcesContent": ["import clsx from 'clsx';\nimport { useContext } from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { __unstableGetBlockProps as getBlockProps } from '@wordpress/blocks';\nimport { useMergeRefs, useDisabled, useRefEffect } from '@wordpress/compose';\nimport { useDispatch } from '@wordpress/data';\nimport warning from '@wordpress/warning';\nimport useMovingAnimation from '../../use-moving-animation';\nimport { store as blockEditorStore } from '../../../store';\nimport { PrivateBlockContext } from '../private-block-context';\nimport { useFocusFirstElement } from './use-focus-first-element';\nimport { useIsHovered } from './use-is-hovered';\nimport {\n\tblockBindingsKey,\n\tuseBlockEditContext,\n} from '../../block-edit/context';\nimport { useFocusHandler } from './use-focus-handler';\nimport { useRegisterBlockEventHandlers } from './use-register-block-event-handlers';\nimport { useEventHandlers } from './use-selected-block-event-handlers';\nimport { useBlockRefProvider } from './use-block-refs';\nimport { useIntersectionObserver } from './use-intersection-observer';\nimport { useScrollIntoView } from './use-scroll-into-view';\nimport { useFlashEditableBlocks } from '../../use-flash-editable-blocks';\nimport { useFirefoxDraggableCompatibility } from './use-firefox-draggable-compatibility';\nimport { useBlockVisibility } from '../../block-visibility/';\n\n/**\n * Returns a ref that inserts a ghost block when the user enters it: the\n * same block object the ghost has rendered from all along, so nothing\n * about the element changes. Native listeners, so blocks' own handlers\n * are never clashed with.\n *\n * @param {string} rootClientId The block's root client ID.\n * @param {?Object} ghostBlock The ghost block object, while not inserted.\n *\n * @return {Function} Ref effect for the block element.\n */\nfunction useGhostMaterialize( rootClientId, ghostBlock ) {\n\tconst { insertBlocks } = useDispatch( blockEditorStore );\n\n\treturn useRefEffect(\n\t\t( element ) => {\n\t\t\tif ( ! ghostBlock ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tfunction remove() {\n\t\t\t\telement.removeEventListener( 'pointerdown', materialize, true );\n\t\t\t\telement.removeEventListener( 'focusin', materialize, true );\n\t\t\t}\n\t\t\tfunction materialize() {\n\t\t\t\t// One gesture fires both events; insert once.\n\t\t\t\tremove();\n\t\t\t\t// Update the selection: the ghost is empty, so the caret\n\t\t\t\t// can only be at its start, and the undo level records it.\n\t\t\t\tinsertBlocks(\n\t\t\t\t\t[ ghostBlock ],\n\t\t\t\t\tundefined,\n\t\t\t\t\trootClientId,\n\t\t\t\t\ttrue,\n\t\t\t\t\t0\n\t\t\t\t);\n\t\t\t}\n\t\t\telement.addEventListener( 'pointerdown', materialize, true );\n\t\t\telement.addEventListener( 'focusin', materialize, true );\n\t\t\treturn remove;\n\t\t},\n\t\t[ ghostBlock, rootClientId, insertBlocks ]\n\t);\n}\n\n/**\n * This hook is used to lightly mark an element as a block element. The element\n * should be the outermost element of a block. Call this hook and pass the\n * returned props to the element to mark as a block. If you define a ref for the\n * element, it is important to pass the ref to this hook, which the hook in turn\n * will pass to the component through the props it returns. Optionally, you can\n * also pass any other props through this hook, and they will be merged and\n * returned.\n *\n * Use of this hook on the outermost element of a block is required if using API >= v2.\n *\n * @example\n * ```js\n * import { useBlockProps } from '@wordpress/block-editor';\n *\n * export default function Edit() {\n *\n * const blockProps = useBlockProps( {\n * className: 'my-custom-class',\n * style: {\n * color: '#222222',\n * backgroundColor: '#eeeeee'\n * }\n * } )\n *\n * return (\n *\t <div { ...blockProps }>\n *\n * </div>\n * )\n * }\n *\n * ```\n *\n *\n * @param {Object} props Optional. Props to pass to the element. Must contain\n * the ref if one is defined.\n * @param {Object} options Options for internal use only.\n * @param {boolean} options.__unstableIsHtml\n *\n * @return {Object} Props to pass to the element to mark as a block.\n */\nexport function useBlockProps( props = {}, { __unstableIsHtml } = {} ) {\n\tconst {\n\t\tclientId,\n\t\tclassName,\n\t\twrapperProps = {},\n\t\tisAligned,\n\t\tindex,\n\t\tmode,\n\t\tname,\n\t\tblockApiVersion,\n\t\tblockTitle,\n\t\tisSelected,\n\t\tisSubtreeDisabled,\n\t\thasOverlay,\n\t\tinitialPosition,\n\t\tblockEditingMode,\n\t\tisHighlighted,\n\t\tisMultiSelected,\n\t\tisPartiallySelected,\n\t\tisReusable,\n\t\tisDragging,\n\t\thasChildSelected,\n\t\tisEditingDisabled,\n\t\thasEditableOutline,\n\t\tisEditingContentOnlySection,\n\t\tdefaultClassName,\n\t\tisSectionBlock,\n\t\tisWithinSectionBlock,\n\t\tcanMove,\n\t\tblockVisibility,\n\t\tdeviceType,\n\t\tviewportSettings,\n\t\tariaLabel,\n\t\tghostBlock,\n\t\trootClientId,\n\t} = useContext( PrivateBlockContext );\n\tconst ghostRef = useGhostMaterialize( rootClientId, ghostBlock );\n\n\tuseRegisterBlockEventHandlers( clientId, wrapperProps );\n\n\tconst defaultViewRef = useRefEffect( ( element ) => {\n\t\tif ( element ) {\n\t\t\tconst { ownerDocument } = element;\n\t\t\tconst { defaultView } = ownerDocument;\n\t\t\tdefaultViewRef.current = defaultView;\n\t\t}\n\t}, [] );\n\n\t// translators: %s: Type of block (i.e. Text, Image etc)\n\tconst blockLabel = sprintf( __( 'Block: %s' ), blockTitle );\n\tconst htmlSuffix = mode === 'html' && ! __unstableIsHtml ? '-visual' : '';\n\tconst ffDragRef = useFirefoxDraggableCompatibility();\n\tconst isHoverEnabled = ! isWithinSectionBlock;\n\tconst mergedRefs = useMergeRefs( [\n\t\tprops.ref,\n\t\tghostRef,\n\t\tdefaultViewRef,\n\t\tuseFocusFirstElement( { clientId, initialPosition } ),\n\t\tuseBlockRefProvider( clientId ),\n\t\tuseFocusHandler( clientId ),\n\t\tuseEventHandlers( { clientId, isSelected } ),\n\t\tuseIsHovered( { isEnabled: isHoverEnabled } ),\n\t\tuseIntersectionObserver(),\n\t\tuseMovingAnimation( { triggerAnimationOnChange: index, clientId } ),\n\t\tuseDisabled( { isDisabled: ! hasOverlay } ),\n\t\tuseFlashEditableBlocks( {\n\t\t\tclientId,\n\t\t\tisEnabled: isSectionBlock,\n\t\t} ),\n\t\tuseScrollIntoView( { isSelected } ),\n\t\tcanMove ? ffDragRef : undefined,\n\t] );\n\n\tconst blockEditContext = useBlockEditContext();\n\tconst hasBlockBindings = !! blockEditContext[ blockBindingsKey ];\n\tconst bindingsStyle = hasBlockBindings\n\t\t? {\n\t\t\t\t'--wp-admin-theme-color': 'var(--wp-block-synced-color)',\n\t\t\t\t'--wp-admin-theme-color--rgb':\n\t\t\t\t\t'var(--wp-block-synced-color--rgb)',\n\t\t }\n\t\t: {};\n\n\t// Use block visibility hook with data from context to avoid extra subscription.\n\tconst { isBlockCurrentlyHidden } = useBlockVisibility( {\n\t\tblockVisibility,\n\t\tdeviceType,\n\t\tviewportSettings,\n\t\tview: defaultViewRef.current,\n\t} );\n\n\t// Ensures it warns only inside the `edit` implementation for the block.\n\tif ( blockApiVersion < 2 && clientId === blockEditContext.clientId ) {\n\t\twarning(\n\t\t\t`Block type \"${ name }\" must support API version 2 or higher to work correctly with \"useBlockProps\" method.`\n\t\t);\n\t}\n\n\tlet hasNegativeMargin = false;\n\tif (\n\t\twrapperProps?.style?.marginTop?.charAt( 0 ) === '-' ||\n\t\twrapperProps?.style?.marginBottom?.charAt( 0 ) === '-' ||\n\t\twrapperProps?.style?.marginLeft?.charAt( 0 ) === '-' ||\n\t\twrapperProps?.style?.marginRight?.charAt( 0 ) === '-'\n\t) {\n\t\thasNegativeMargin = true;\n\t}\n\n\treturn {\n\t\ttabIndex: blockEditingMode === 'disabled' ? -1 : 0,\n\t\tdraggable: canMove && ! hasChildSelected ? true : undefined,\n\t\t...wrapperProps,\n\t\t...props,\n\t\tref: mergedRefs,\n\t\tid: `block-${ clientId }${ htmlSuffix }`,\n\t\trole: 'document',\n\t\t'aria-label':\n\t\t\tariaLabel ??\n\t\t\t( clientId === ghostBlock?.clientId\n\t\t\t\t? __( 'Add default block' )\n\t\t\t\t: undefined ) ??\n\t\t\tprops[ 'aria-label' ] ??\n\t\t\tblockLabel,\n\t\t'data-block': clientId,\n\t\t'data-type': name,\n\t\t'data-title': blockTitle,\n\t\tinert: isSubtreeDisabled ? 'true' : undefined,\n\t\tclassName: clsx(\n\t\t\t'block-editor-block-list__block',\n\t\t\t{\n\t\t\t\t// The wp-block className is important for editor styles.\n\t\t\t\t'wp-block': ! isAligned,\n\t\t\t\t'has-block-overlay': hasOverlay,\n\t\t\t\t'is-selected': isSelected,\n\t\t\t\t'is-highlighted': isHighlighted,\n\t\t\t\t'is-multi-selected': isMultiSelected,\n\t\t\t\t'is-partially-selected': isPartiallySelected,\n\t\t\t\t'is-reusable': isReusable,\n\t\t\t\t'is-dragging': isDragging,\n\t\t\t\t'has-child-selected': hasChildSelected,\n\t\t\t\t'is-editing-disabled': isEditingDisabled,\n\t\t\t\t'has-editable-outline': hasEditableOutline,\n\t\t\t\t'has-negative-margin': hasNegativeMargin,\n\t\t\t\t'is-editing-content-only-section': isEditingContentOnlySection,\n\t\t\t\t'is-block-hidden': isBlockCurrentlyHidden,\n\t\t\t},\n\t\t\tclassName,\n\t\t\tprops.className,\n\t\t\twrapperProps.className,\n\t\t\tdefaultClassName\n\t\t),\n\t\tstyle: { ...wrapperProps.style, ...props.style, ...bindingsStyle },\n\t};\n}\n\n/**\n * Call within a save function to get the props for the block wrapper.\n *\n * @param {Object} props Optional. Props to pass to the element.\n */\nuseBlockProps.save = getBlockProps;\n"],
5
+ "mappings": "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",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/components/block-list/use-block-props/use-block-refs.js"],
4
- "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useContext, useState, useLayoutEffect } from '@wordpress/element';\nimport { useRefEffect } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { BlockRefs } from '../../provider/block-refs-provider';\n\n/** @typedef {import('@wordpress/element').RefCallback} RefCallback */\n/** @typedef {import('@wordpress/element').Ref} Ref */\n\n/**\n * Provides a ref to the BlockRefs context.\n *\n * @param {string} clientId The client ID of the element ref.\n *\n * @return {RefCallback} Ref callback.\n */\nexport function useBlockRefProvider( clientId ) {\n\tconst { refsMap } = useContext( BlockRefs );\n\treturn useRefEffect(\n\t\t( element ) => {\n\t\t\trefsMap.set( clientId, element );\n\t\t\treturn () => refsMap.delete( clientId );\n\t\t},\n\t\t[ clientId ]\n\t);\n}\n\nfunction assignRef( ref, value ) {\n\tif ( typeof ref === 'function' ) {\n\t\tref( value );\n\t} else if ( ref ) {\n\t\tref.current = value;\n\t}\n}\n\n/**\n * Tracks the DOM element for the block identified by `clientId` and assigns it to the `ref`\n * whenever it changes.\n *\n * @param {string} clientId The client ID to track.\n * @param {Ref} ref The ref object/callback to assign to.\n */\nexport function useBlockElementRef( clientId, ref ) {\n\tconst { refsMap } = useContext( BlockRefs );\n\tuseLayoutEffect( () => {\n\t\tassignRef( ref, refsMap.get( clientId ) );\n\t\tconst unsubscribe = refsMap.subscribe( clientId, () =>\n\t\t\tassignRef( ref, refsMap.get( clientId ) )\n\t\t);\n\t\treturn () => {\n\t\t\tunsubscribe();\n\t\t\tassignRef( ref, null );\n\t\t};\n\t}, [ refsMap, clientId, ref ] );\n}\n\n/**\n * Return the element for a given client ID. Updates whenever the element\n * changes, becomes available, or disappears.\n *\n * @param {string} clientId The client ID to an element for.\n *\n * @return {Element|null} The block's wrapper element.\n */\nexport function useBlockElement( clientId ) {\n\tconst [ blockElement, setBlockElement ] = useState( null );\n\tuseBlockElementRef( clientId, setBlockElement );\n\treturn blockElement;\n}\n"],
5
- "mappings": ";AAGA,SAAS,YAAY,UAAU,uBAAuB;AACtD,SAAS,oBAAoB;AAK7B,SAAS,iBAAiB;AAYnB,SAAS,oBAAqB,UAAW;AAC/C,QAAM,EAAE,QAAQ,IAAI,WAAY,SAAU;AAC1C,SAAO;AAAA,IACN,CAAE,YAAa;AACd,cAAQ,IAAK,UAAU,OAAQ;AAC/B,aAAO,MAAM,QAAQ,OAAQ,QAAS;AAAA,IACvC;AAAA,IACA,CAAE,QAAS;AAAA,EACZ;AACD;AAEA,SAAS,UAAW,KAAK,OAAQ;AAChC,MAAK,OAAO,QAAQ,YAAa;AAChC,QAAK,KAAM;AAAA,EACZ,WAAY,KAAM;AACjB,QAAI,UAAU;AAAA,EACf;AACD;AASO,SAAS,mBAAoB,UAAU,KAAM;AACnD,QAAM,EAAE,QAAQ,IAAI,WAAY,SAAU;AAC1C,kBAAiB,MAAM;AACtB,cAAW,KAAK,QAAQ,IAAK,QAAS,CAAE;AACxC,UAAM,cAAc,QAAQ;AAAA,MAAW;AAAA,MAAU,MAChD,UAAW,KAAK,QAAQ,IAAK,QAAS,CAAE;AAAA,IACzC;AACA,WAAO,MAAM;AACZ,kBAAY;AACZ,gBAAW,KAAK,IAAK;AAAA,IACtB;AAAA,EACD,GAAG,CAAE,SAAS,UAAU,GAAI,CAAE;AAC/B;AAUO,SAAS,gBAAiB,UAAW;AAC3C,QAAM,CAAE,cAAc,eAAgB,IAAI,SAAU,IAAK;AACzD,qBAAoB,UAAU,eAAgB;AAC9C,SAAO;AACR;",
4
+ "sourcesContent": ["import { useContext, useState, useLayoutEffect } from '@wordpress/element';\nimport { useRefEffect } from '@wordpress/compose';\nimport { BlockRefs } from '../../provider/block-refs-provider';\n\n/** @typedef {import('@wordpress/element').RefCallback} RefCallback */\n/** @typedef {import('@wordpress/element').Ref} Ref */\n\n/**\n * Provides a ref to the BlockRefs context.\n *\n * @param {string} clientId The client ID of the element ref.\n *\n * @return {RefCallback} Ref callback.\n */\nexport function useBlockRefProvider( clientId ) {\n\tconst { refsMap } = useContext( BlockRefs );\n\treturn useRefEffect(\n\t\t( element ) => {\n\t\t\trefsMap.set( clientId, element );\n\t\t\treturn () => refsMap.delete( clientId );\n\t\t},\n\t\t[ clientId ]\n\t);\n}\n\nfunction assignRef( ref, value ) {\n\tif ( typeof ref === 'function' ) {\n\t\tref( value );\n\t} else if ( ref ) {\n\t\tref.current = value;\n\t}\n}\n\n/**\n * Tracks the DOM element for the block identified by `clientId` and assigns it to the `ref`\n * whenever it changes.\n *\n * @param {string} clientId The client ID to track.\n * @param {Ref} ref The ref object/callback to assign to.\n */\nexport function useBlockElementRef( clientId, ref ) {\n\tconst { refsMap } = useContext( BlockRefs );\n\tuseLayoutEffect( () => {\n\t\tassignRef( ref, refsMap.get( clientId ) );\n\t\tconst unsubscribe = refsMap.subscribe( clientId, () =>\n\t\t\tassignRef( ref, refsMap.get( clientId ) )\n\t\t);\n\t\treturn () => {\n\t\t\tunsubscribe();\n\t\t\tassignRef( ref, null );\n\t\t};\n\t}, [ refsMap, clientId, ref ] );\n}\n\n/**\n * Return the element for a given client ID. Updates whenever the element\n * changes, becomes available, or disappears.\n *\n * @param {string} clientId The client ID to an element for.\n *\n * @return {Element|null} The block's wrapper element.\n */\nexport function useBlockElement( clientId ) {\n\tconst [ blockElement, setBlockElement ] = useState( null );\n\tuseBlockElementRef( clientId, setBlockElement );\n\treturn blockElement;\n}\n"],
5
+ "mappings": ";AAAA,SAAS,YAAY,UAAU,uBAAuB;AACtD,SAAS,oBAAoB;AAC7B,SAAS,iBAAiB;AAYnB,SAAS,oBAAqB,UAAW;AAC/C,QAAM,EAAE,QAAQ,IAAI,WAAY,SAAU;AAC1C,SAAO;AAAA,IACN,CAAE,YAAa;AACd,cAAQ,IAAK,UAAU,OAAQ;AAC/B,aAAO,MAAM,QAAQ,OAAQ,QAAS;AAAA,IACvC;AAAA,IACA,CAAE,QAAS;AAAA,EACZ;AACD;AAEA,SAAS,UAAW,KAAK,OAAQ;AAChC,MAAK,OAAO,QAAQ,YAAa;AAChC,QAAK,KAAM;AAAA,EACZ,WAAY,KAAM;AACjB,QAAI,UAAU;AAAA,EACf;AACD;AASO,SAAS,mBAAoB,UAAU,KAAM;AACnD,QAAM,EAAE,QAAQ,IAAI,WAAY,SAAU;AAC1C,kBAAiB,MAAM;AACtB,cAAW,KAAK,QAAQ,IAAK,QAAS,CAAE;AACxC,UAAM,cAAc,QAAQ;AAAA,MAAW;AAAA,MAAU,MAChD,UAAW,KAAK,QAAQ,IAAK,QAAS,CAAE;AAAA,IACzC;AACA,WAAO,MAAM;AACZ,kBAAY;AACZ,gBAAW,KAAK,IAAK;AAAA,IACtB;AAAA,EACD,GAAG,CAAE,SAAS,UAAU,GAAI,CAAE;AAC/B;AAUO,SAAS,gBAAiB,UAAW;AAC3C,QAAM,CAAE,cAAc,eAAgB,IAAI,SAAU,IAAK;AACzD,qBAAoB,UAAU,eAAgB;AAC9C,SAAO;AACR;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/components/block-list/use-block-props/use-firefox-draggable-compatibility.js"],
4
- "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useRefEffect } from '@wordpress/compose';\n\nconst nodesByDocument = new Map();\n\nfunction add( doc, node ) {\n\tlet set = nodesByDocument.get( doc );\n\tif ( ! set ) {\n\t\tset = new Set();\n\t\tnodesByDocument.set( doc, set );\n\t\tdoc.addEventListener( 'pointerdown', down );\n\t}\n\tset.add( node );\n}\n\nfunction remove( doc, node ) {\n\tconst set = nodesByDocument.get( doc );\n\tif ( set ) {\n\t\tset.delete( node );\n\t\trestore( node );\n\t\tif ( set.size === 0 ) {\n\t\t\tnodesByDocument.delete( doc );\n\t\t\tdoc.removeEventListener( 'pointerdown', down );\n\t\t}\n\t}\n}\n\nfunction restore( node ) {\n\tconst prevDraggable = node.getAttribute( 'data-draggable' );\n\tif ( prevDraggable ) {\n\t\tnode.removeAttribute( 'data-draggable' );\n\t\t// Only restore if `draggable` is still removed. It could have been\n\t\t// changed by React in the meantime.\n\t\tif ( prevDraggable === 'true' && ! node.getAttribute( 'draggable' ) ) {\n\t\t\tnode.setAttribute( 'draggable', 'true' );\n\t\t}\n\t}\n}\n\nfunction down( event ) {\n\tconst { target } = event;\n\tconst { ownerDocument, isContentEditable, tagName } = target;\n\tconst isInputOrTextArea = [ 'INPUT', 'TEXTAREA' ].includes( tagName );\n\n\tconst nodes = nodesByDocument.get( ownerDocument );\n\n\tif ( isContentEditable || isInputOrTextArea ) {\n\t\t// Whenever an editable element or an input or textarea is clicked,\n\t\t// check which draggable blocks contain this element, and temporarily\n\t\t// disable draggability.\n\t\tfor ( const node of nodes ) {\n\t\t\tif (\n\t\t\t\tnode.getAttribute( 'draggable' ) === 'true' &&\n\t\t\t\tnode.contains( target )\n\t\t\t) {\n\t\t\t\tnode.removeAttribute( 'draggable' );\n\t\t\t\tnode.setAttribute( 'data-draggable', 'true' );\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// Whenever a non-editable element or an input or textarea is clicked,\n\t\t// re-enable draggability for any blocks that were previously disabled.\n\t\tfor ( const node of nodes ) {\n\t\t\trestore( node );\n\t\t}\n\t}\n}\n\n/**\n * In Firefox, the `draggable` and `contenteditable` or `input` or `textarea`\n * elements don't play well together. When these elements are within a\n * `draggable` element, selection doesn't get set in the right place. The only\n * solution is to temporarily remove the `draggable` attribute clicking inside\n * these elements.\n * @return {Function} Cleanup function.\n */\nexport function useFirefoxDraggableCompatibility() {\n\treturn useRefEffect( ( node ) => {\n\t\tadd( node.ownerDocument, node );\n\t\treturn () => {\n\t\t\tremove( node.ownerDocument, node );\n\t\t};\n\t}, [] );\n}\n"],
5
- "mappings": ";AAGA,SAAS,oBAAoB;AAE7B,IAAM,kBAAkB,oBAAI,IAAI;AAEhC,SAAS,IAAK,KAAK,MAAO;AACzB,MAAI,MAAM,gBAAgB,IAAK,GAAI;AACnC,MAAK,CAAE,KAAM;AACZ,UAAM,oBAAI,IAAI;AACd,oBAAgB,IAAK,KAAK,GAAI;AAC9B,QAAI,iBAAkB,eAAe,IAAK;AAAA,EAC3C;AACA,MAAI,IAAK,IAAK;AACf;AAEA,SAAS,OAAQ,KAAK,MAAO;AAC5B,QAAM,MAAM,gBAAgB,IAAK,GAAI;AACrC,MAAK,KAAM;AACV,QAAI,OAAQ,IAAK;AACjB,YAAS,IAAK;AACd,QAAK,IAAI,SAAS,GAAI;AACrB,sBAAgB,OAAQ,GAAI;AAC5B,UAAI,oBAAqB,eAAe,IAAK;AAAA,IAC9C;AAAA,EACD;AACD;AAEA,SAAS,QAAS,MAAO;AACxB,QAAM,gBAAgB,KAAK,aAAc,gBAAiB;AAC1D,MAAK,eAAgB;AACpB,SAAK,gBAAiB,gBAAiB;AAGvC,QAAK,kBAAkB,UAAU,CAAE,KAAK,aAAc,WAAY,GAAI;AACrE,WAAK,aAAc,aAAa,MAAO;AAAA,IACxC;AAAA,EACD;AACD;AAEA,SAAS,KAAM,OAAQ;AACtB,QAAM,EAAE,OAAO,IAAI;AACnB,QAAM,EAAE,eAAe,mBAAmB,QAAQ,IAAI;AACtD,QAAM,oBAAoB,CAAE,SAAS,UAAW,EAAE,SAAU,OAAQ;AAEpE,QAAM,QAAQ,gBAAgB,IAAK,aAAc;AAEjD,MAAK,qBAAqB,mBAAoB;AAI7C,eAAY,QAAQ,OAAQ;AAC3B,UACC,KAAK,aAAc,WAAY,MAAM,UACrC,KAAK,SAAU,MAAO,GACrB;AACD,aAAK,gBAAiB,WAAY;AAClC,aAAK,aAAc,kBAAkB,MAAO;AAAA,MAC7C;AAAA,IACD;AAAA,EACD,OAAO;AAGN,eAAY,QAAQ,OAAQ;AAC3B,cAAS,IAAK;AAAA,IACf;AAAA,EACD;AACD;AAUO,SAAS,mCAAmC;AAClD,SAAO,aAAc,CAAE,SAAU;AAChC,QAAK,KAAK,eAAe,IAAK;AAC9B,WAAO,MAAM;AACZ,aAAQ,KAAK,eAAe,IAAK;AAAA,IAClC;AAAA,EACD,GAAG,CAAC,CAAE;AACP;",
4
+ "sourcesContent": ["import { useRefEffect } from '@wordpress/compose';\n\nconst nodesByDocument = new Map();\n\nfunction add( doc, node ) {\n\tlet set = nodesByDocument.get( doc );\n\tif ( ! set ) {\n\t\tset = new Set();\n\t\tnodesByDocument.set( doc, set );\n\t\tdoc.addEventListener( 'pointerdown', down );\n\t}\n\tset.add( node );\n}\n\nfunction remove( doc, node ) {\n\tconst set = nodesByDocument.get( doc );\n\tif ( set ) {\n\t\tset.delete( node );\n\t\trestore( node );\n\t\tif ( set.size === 0 ) {\n\t\t\tnodesByDocument.delete( doc );\n\t\t\tdoc.removeEventListener( 'pointerdown', down );\n\t\t}\n\t}\n}\n\nfunction restore( node ) {\n\tconst prevDraggable = node.getAttribute( 'data-draggable' );\n\tif ( prevDraggable ) {\n\t\tnode.removeAttribute( 'data-draggable' );\n\t\t// Only restore if `draggable` is still removed. It could have been\n\t\t// changed by React in the meantime.\n\t\tif ( prevDraggable === 'true' && ! node.getAttribute( 'draggable' ) ) {\n\t\t\tnode.setAttribute( 'draggable', 'true' );\n\t\t}\n\t}\n}\n\nfunction down( event ) {\n\tconst { target } = event;\n\tconst { ownerDocument, isContentEditable, tagName } = target;\n\tconst isInputOrTextArea = [ 'INPUT', 'TEXTAREA' ].includes( tagName );\n\n\tconst nodes = nodesByDocument.get( ownerDocument );\n\n\tif ( isContentEditable || isInputOrTextArea ) {\n\t\t// Whenever an editable element or an input or textarea is clicked,\n\t\t// check which draggable blocks contain this element, and temporarily\n\t\t// disable draggability.\n\t\tfor ( const node of nodes ) {\n\t\t\tif (\n\t\t\t\tnode.getAttribute( 'draggable' ) === 'true' &&\n\t\t\t\tnode.contains( target )\n\t\t\t) {\n\t\t\t\tnode.removeAttribute( 'draggable' );\n\t\t\t\tnode.setAttribute( 'data-draggable', 'true' );\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// Whenever a non-editable element or an input or textarea is clicked,\n\t\t// re-enable draggability for any blocks that were previously disabled.\n\t\tfor ( const node of nodes ) {\n\t\t\trestore( node );\n\t\t}\n\t}\n}\n\n/**\n * In Firefox, the `draggable` and `contenteditable` or `input` or `textarea`\n * elements don't play well together. When these elements are within a\n * `draggable` element, selection doesn't get set in the right place. The only\n * solution is to temporarily remove the `draggable` attribute clicking inside\n * these elements.\n * @return {Function} Cleanup function.\n */\nexport function useFirefoxDraggableCompatibility() {\n\treturn useRefEffect( ( node ) => {\n\t\tadd( node.ownerDocument, node );\n\t\treturn () => {\n\t\t\tremove( node.ownerDocument, node );\n\t\t};\n\t}, [] );\n}\n"],
5
+ "mappings": ";AAAA,SAAS,oBAAoB;AAE7B,IAAM,kBAAkB,oBAAI,IAAI;AAEhC,SAAS,IAAK,KAAK,MAAO;AACzB,MAAI,MAAM,gBAAgB,IAAK,GAAI;AACnC,MAAK,CAAE,KAAM;AACZ,UAAM,oBAAI,IAAI;AACd,oBAAgB,IAAK,KAAK,GAAI;AAC9B,QAAI,iBAAkB,eAAe,IAAK;AAAA,EAC3C;AACA,MAAI,IAAK,IAAK;AACf;AAEA,SAAS,OAAQ,KAAK,MAAO;AAC5B,QAAM,MAAM,gBAAgB,IAAK,GAAI;AACrC,MAAK,KAAM;AACV,QAAI,OAAQ,IAAK;AACjB,YAAS,IAAK;AACd,QAAK,IAAI,SAAS,GAAI;AACrB,sBAAgB,OAAQ,GAAI;AAC5B,UAAI,oBAAqB,eAAe,IAAK;AAAA,IAC9C;AAAA,EACD;AACD;AAEA,SAAS,QAAS,MAAO;AACxB,QAAM,gBAAgB,KAAK,aAAc,gBAAiB;AAC1D,MAAK,eAAgB;AACpB,SAAK,gBAAiB,gBAAiB;AAGvC,QAAK,kBAAkB,UAAU,CAAE,KAAK,aAAc,WAAY,GAAI;AACrE,WAAK,aAAc,aAAa,MAAO;AAAA,IACxC;AAAA,EACD;AACD;AAEA,SAAS,KAAM,OAAQ;AACtB,QAAM,EAAE,OAAO,IAAI;AACnB,QAAM,EAAE,eAAe,mBAAmB,QAAQ,IAAI;AACtD,QAAM,oBAAoB,CAAE,SAAS,UAAW,EAAE,SAAU,OAAQ;AAEpE,QAAM,QAAQ,gBAAgB,IAAK,aAAc;AAEjD,MAAK,qBAAqB,mBAAoB;AAI7C,eAAY,QAAQ,OAAQ;AAC3B,UACC,KAAK,aAAc,WAAY,MAAM,UACrC,KAAK,SAAU,MAAO,GACrB;AACD,aAAK,gBAAiB,WAAY;AAClC,aAAK,aAAc,kBAAkB,MAAO;AAAA,MAC7C;AAAA,IACD;AAAA,EACD,OAAO;AAGN,eAAY,QAAQ,OAAQ;AAC3B,cAAS,IAAK;AAAA,IACf;AAAA,EACD;AACD;AAUO,SAAS,mCAAmC;AAClD,SAAO,aAAc,CAAE,SAAU;AAChC,QAAK,KAAK,eAAe,IAAK;AAC9B,WAAO,MAAM;AACZ,aAAQ,KAAK,eAAe,IAAK;AAAA,IAClC;AAAA,EACD,GAAG,CAAC,CAAE;AACP;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/components/block-list/use-block-props/use-focus-first-element.js"],
4
- "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useEffect, useRef } from '@wordpress/element';\nimport {\n\tfocus,\n\tisFormElement,\n\tisTextField,\n\tplaceCaretAtHorizontalEdge,\n} from '@wordpress/dom';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { isInsideRootBlock } from '../../../utils/dom';\nimport { store as blockEditorStore } from '../../../store';\nimport { unlock } from '../../../lock-unlock';\n\n/** @typedef {import('@wordpress/element').RefObject} RefObject */\n\n/**\n * Transitions focus to the block or inner tabbable when the block becomes\n * selected and an initial position is set.\n *\n * @param {string} clientId Block client ID.\n *\n * @return {RefObject} React ref with the block element.\n */\nexport function useFocusFirstElement( { clientId, initialPosition } ) {\n\tconst ref = useRef();\n\tconst { isBlockSelected, isMultiSelecting, isZoomOut, getSelectionStart } =\n\t\tunlock( useSelect( blockEditorStore ) );\n\n\tuseEffect( () => {\n\t\t// Check if the block is still selected at the time this effect runs.\n\t\tif (\n\t\t\t! isBlockSelected( clientId ) ||\n\t\t\tisMultiSelecting() ||\n\t\t\tisZoomOut()\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( initialPosition === undefined || initialPosition === null ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! ref.current ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { ownerDocument } = ref.current;\n\n\t\t// Do not focus the block if it already contains the active element.\n\t\tif ( isInsideRootBlock( ref.current, ownerDocument.activeElement ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Find all tabbables within node.\n\t\tconst textInputs = focus.tabbable\n\t\t\t.find( ref.current )\n\t\t\t.filter( ( node ) => isTextField( node ) );\n\n\t\t// If reversed (e.g. merge via backspace), use the last in the set of\n\t\t// tabbables.\n\t\tconst isReverse = -1 === initialPosition;\n\t\tconst target =\n\t\t\ttextInputs[ isReverse ? textInputs.length - 1 : 0 ] || ref.current;\n\n\t\tif ( ! isInsideRootBlock( ref.current, target ) ) {\n\t\t\tref.current.focus();\n\t\t\treturn;\n\t\t}\n\n\t\t// Check to see if element is focussable before a generic caret insert.\n\t\tif ( ! ref.current.getAttribute( 'contenteditable' ) ) {\n\t\t\tconst focusElement = focus.tabbable.findNext( ref.current );\n\t\t\t// Make sure focusElement is valid, contained in the same block, and a form field.\n\t\t\tif (\n\t\t\t\tfocusElement &&\n\t\t\t\tisInsideRootBlock( ref.current, focusElement ) &&\n\t\t\t\tisFormElement( focusElement )\n\t\t\t) {\n\t\t\t\tfocusElement.focus();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t// Do not place a caret when the target already contains one:\n\t\t// while a focused editing host contains the target (the block\n\t\t// supports `editableRoot`), the caret can be inside it without the\n\t\t// target holding focus. Only a caret the rich text synchronized to\n\t\t// the store (offsets present) is deliberate; a leftover one yields\n\t\t// to an explicitly requested edge position (initialPosition -1).\n\t\tconst { activeElement } = ownerDocument;\n\t\tconst selection = ownerDocument.defaultView.getSelection();\n\t\tconst { clientId: selectionClientId, offset } = getSelectionStart();\n\t\tconst hasCaret =\n\t\t\tactiveElement?.isContentEditable &&\n\t\t\tactiveElement.contains( target ) &&\n\t\t\t!! selection.anchorNode &&\n\t\t\ttarget.contains( selection.anchorNode );\n\t\tconst isDeliberate =\n\t\t\tinitialPosition === 0 ||\n\t\t\t( offset !== undefined && selectionClientId === clientId );\n\n\t\tif ( ! ( hasCaret && isDeliberate ) ) {\n\t\t\tplaceCaretAtHorizontalEdge( target, isReverse );\n\t\t}\n\t}, [ initialPosition, clientId ] );\n\n\treturn ref;\n}\n"],
5
- "mappings": ";AAGA,SAAS,WAAW,cAAc;AAClC;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACM;AACP,SAAS,iBAAiB;AAK1B,SAAS,yBAAyB;AAClC,SAAS,SAAS,wBAAwB;AAC1C,SAAS,cAAc;AAYhB,SAAS,qBAAsB,EAAE,UAAU,gBAAgB,GAAI;AACrE,QAAM,MAAM,OAAO;AACnB,QAAM,EAAE,iBAAiB,kBAAkB,WAAW,kBAAkB,IACvE,OAAQ,UAAW,gBAAiB,CAAE;AAEvC,YAAW,MAAM;AAEhB,QACC,CAAE,gBAAiB,QAAS,KAC5B,iBAAiB,KACjB,UAAU,GACT;AACD;AAAA,IACD;AAEA,QAAK,oBAAoB,UAAa,oBAAoB,MAAO;AAChE;AAAA,IACD;AAEA,QAAK,CAAE,IAAI,SAAU;AACpB;AAAA,IACD;AAEA,UAAM,EAAE,cAAc,IAAI,IAAI;AAG9B,QAAK,kBAAmB,IAAI,SAAS,cAAc,aAAc,GAAI;AACpE;AAAA,IACD;AAGA,UAAM,aAAa,MAAM,SACvB,KAAM,IAAI,OAAQ,EAClB,OAAQ,CAAE,SAAU,YAAa,IAAK,CAAE;AAI1C,UAAM,YAAY,OAAO;AACzB,UAAM,SACL,WAAY,YAAY,WAAW,SAAS,IAAI,CAAE,KAAK,IAAI;AAE5D,QAAK,CAAE,kBAAmB,IAAI,SAAS,MAAO,GAAI;AACjD,UAAI,QAAQ,MAAM;AAClB;AAAA,IACD;AAGA,QAAK,CAAE,IAAI,QAAQ,aAAc,iBAAkB,GAAI;AACtD,YAAM,eAAe,MAAM,SAAS,SAAU,IAAI,OAAQ;AAE1D,UACC,gBACA,kBAAmB,IAAI,SAAS,YAAa,KAC7C,cAAe,YAAa,GAC3B;AACD,qBAAa,MAAM;AACnB;AAAA,MACD;AAAA,IACD;AAOA,UAAM,EAAE,cAAc,IAAI;AAC1B,UAAM,YAAY,cAAc,YAAY,aAAa;AACzD,UAAM,EAAE,UAAU,mBAAmB,OAAO,IAAI,kBAAkB;AAClE,UAAM,WACL,eAAe,qBACf,cAAc,SAAU,MAAO,KAC/B,CAAC,CAAE,UAAU,cACb,OAAO,SAAU,UAAU,UAAW;AACvC,UAAM,eACL,oBAAoB,KAClB,WAAW,UAAa,sBAAsB;AAEjD,QAAK,EAAI,YAAY,eAAiB;AACrC,iCAA4B,QAAQ,SAAU;AAAA,IAC/C;AAAA,EACD,GAAG,CAAE,iBAAiB,QAAS,CAAE;AAEjC,SAAO;AACR;",
4
+ "sourcesContent": ["import { useEffect, useRef } from '@wordpress/element';\nimport {\n\tfocus,\n\tisFormElement,\n\tisTextField,\n\tplaceCaretAtHorizontalEdge,\n} from '@wordpress/dom';\nimport { useSelect } from '@wordpress/data';\nimport { isInsideRootBlock } from '../../../utils/dom';\nimport { store as blockEditorStore } from '../../../store';\nimport { unlock } from '../../../lock-unlock';\n\n/** @typedef {import('@wordpress/element').RefObject} RefObject */\n\n/**\n * Transitions focus to the block or inner tabbable when the block becomes\n * selected and an initial position is set.\n *\n * @param {string} clientId Block client ID.\n *\n * @return {RefObject} React ref with the block element.\n */\nexport function useFocusFirstElement( { clientId, initialPosition } ) {\n\tconst ref = useRef();\n\tconst { isBlockSelected, isMultiSelecting, isZoomOut, getSelectionStart } =\n\t\tunlock( useSelect( blockEditorStore ) );\n\n\tuseEffect( () => {\n\t\t// Check if the block is still selected at the time this effect runs.\n\t\tif (\n\t\t\t! isBlockSelected( clientId ) ||\n\t\t\tisMultiSelecting() ||\n\t\t\tisZoomOut()\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( initialPosition === undefined || initialPosition === null ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! ref.current ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { ownerDocument } = ref.current;\n\n\t\t// Do not focus the block if it already contains the active element.\n\t\tif ( isInsideRootBlock( ref.current, ownerDocument.activeElement ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Find all tabbables within node.\n\t\tconst textInputs = focus.tabbable\n\t\t\t.find( ref.current )\n\t\t\t.filter( ( node ) => isTextField( node ) );\n\n\t\t// If reversed (e.g. merge via backspace), use the last in the set of\n\t\t// tabbables.\n\t\tconst isReverse = -1 === initialPosition;\n\t\tconst target =\n\t\t\ttextInputs[ isReverse ? textInputs.length - 1 : 0 ] || ref.current;\n\n\t\tif ( ! isInsideRootBlock( ref.current, target ) ) {\n\t\t\tref.current.focus();\n\t\t\treturn;\n\t\t}\n\n\t\t// Check to see if element is focussable before a generic caret insert.\n\t\tif ( ! ref.current.getAttribute( 'contenteditable' ) ) {\n\t\t\tconst focusElement = focus.tabbable.findNext( ref.current );\n\t\t\t// Make sure focusElement is valid, contained in the same block, and a form field.\n\t\t\tif (\n\t\t\t\tfocusElement &&\n\t\t\t\tisInsideRootBlock( ref.current, focusElement ) &&\n\t\t\t\tisFormElement( focusElement )\n\t\t\t) {\n\t\t\t\tfocusElement.focus();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t// Do not place a caret when the target already contains one:\n\t\t// while a focused editing host contains the target (the block\n\t\t// supports `editableRoot`), the caret can be inside it without the\n\t\t// target holding focus. Only a caret the rich text synchronized to\n\t\t// the store (offsets present) is deliberate; a leftover one yields\n\t\t// to an explicitly requested edge position (initialPosition -1).\n\t\tconst { activeElement } = ownerDocument;\n\t\tconst selection = ownerDocument.defaultView.getSelection();\n\t\tconst { clientId: selectionClientId, offset } = getSelectionStart();\n\t\tconst hasCaret =\n\t\t\tactiveElement?.isContentEditable &&\n\t\t\tactiveElement.contains( target ) &&\n\t\t\t!! selection.anchorNode &&\n\t\t\ttarget.contains( selection.anchorNode );\n\t\tconst isDeliberate =\n\t\t\tinitialPosition === 0 ||\n\t\t\t( offset !== undefined && selectionClientId === clientId );\n\n\t\tif ( ! ( hasCaret && isDeliberate ) ) {\n\t\t\tplaceCaretAtHorizontalEdge( target, isReverse );\n\t\t}\n\t}, [ initialPosition, clientId ] );\n\n\treturn ref;\n}\n"],
5
+ "mappings": ";AAAA,SAAS,WAAW,cAAc;AAClC;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACM;AACP,SAAS,iBAAiB;AAC1B,SAAS,yBAAyB;AAClC,SAAS,SAAS,wBAAwB;AAC1C,SAAS,cAAc;AAYhB,SAAS,qBAAsB,EAAE,UAAU,gBAAgB,GAAI;AACrE,QAAM,MAAM,OAAO;AACnB,QAAM,EAAE,iBAAiB,kBAAkB,WAAW,kBAAkB,IACvE,OAAQ,UAAW,gBAAiB,CAAE;AAEvC,YAAW,MAAM;AAEhB,QACC,CAAE,gBAAiB,QAAS,KAC5B,iBAAiB,KACjB,UAAU,GACT;AACD;AAAA,IACD;AAEA,QAAK,oBAAoB,UAAa,oBAAoB,MAAO;AAChE;AAAA,IACD;AAEA,QAAK,CAAE,IAAI,SAAU;AACpB;AAAA,IACD;AAEA,UAAM,EAAE,cAAc,IAAI,IAAI;AAG9B,QAAK,kBAAmB,IAAI,SAAS,cAAc,aAAc,GAAI;AACpE;AAAA,IACD;AAGA,UAAM,aAAa,MAAM,SACvB,KAAM,IAAI,OAAQ,EAClB,OAAQ,CAAE,SAAU,YAAa,IAAK,CAAE;AAI1C,UAAM,YAAY,OAAO;AACzB,UAAM,SACL,WAAY,YAAY,WAAW,SAAS,IAAI,CAAE,KAAK,IAAI;AAE5D,QAAK,CAAE,kBAAmB,IAAI,SAAS,MAAO,GAAI;AACjD,UAAI,QAAQ,MAAM;AAClB;AAAA,IACD;AAGA,QAAK,CAAE,IAAI,QAAQ,aAAc,iBAAkB,GAAI;AACtD,YAAM,eAAe,MAAM,SAAS,SAAU,IAAI,OAAQ;AAE1D,UACC,gBACA,kBAAmB,IAAI,SAAS,YAAa,KAC7C,cAAe,YAAa,GAC3B;AACD,qBAAa,MAAM;AACnB;AAAA,MACD;AAAA,IACD;AAOA,UAAM,EAAE,cAAc,IAAI;AAC1B,UAAM,YAAY,cAAc,YAAY,aAAa;AACzD,UAAM,EAAE,UAAU,mBAAmB,OAAO,IAAI,kBAAkB;AAClE,UAAM,WACL,eAAe,qBACf,cAAc,SAAU,MAAO,KAC/B,CAAC,CAAE,UAAU,cACb,OAAO,SAAU,UAAU,UAAW;AACvC,UAAM,eACL,oBAAoB,KAClB,WAAW,UAAa,sBAAsB;AAEjD,QAAK,EAAI,YAAY,eAAiB;AACrC,iCAA4B,QAAQ,SAAU;AAAA,IAC/C;AAAA,EACD,GAAG,CAAE,iBAAiB,QAAS,CAAE;AAEjC,SAAO;AACR;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/components/block-list/use-block-props/use-focus-handler.js"],
4
- "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tuseRefEffect,\n\tprivateApis as composePrivateApis,\n} from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { isInsideRootBlock } from '../../../utils/dom';\nimport { store as blockEditorStore } from '../../../store';\nimport { unlock } from '../../../lock-unlock';\n\nconst { subscribeDelegatedListener } = unlock( composePrivateApis );\n\n/**\n * Selects the block if it receives focus.\n *\n * @param {string} clientId Block client ID.\n */\nexport function useFocusHandler( clientId ) {\n\tconst { isBlockSelected, isBlockMultiSelected, isMultiSelecting } =\n\t\tuseSelect( blockEditorStore );\n\tconst { selectBlock, selectionChange } = useDispatch( blockEditorStore );\n\n\treturn useRefEffect(\n\t\t( node ) => {\n\t\t\t/**\n\t\t\t * Marks the block as selected when focused and not already\n\t\t\t * selected. This specifically handles the case where block does not\n\t\t\t * set focus on its own (via `setFocus`), typically if there is no\n\t\t\t * focusable input in the block.\n\t\t\t *\n\t\t\t * @param {FocusEvent} event Focus event.\n\t\t\t */\n\t\t\tfunction onFocus( event ) {\n\t\t\t\t// Check synchronously because a non-selected block might be\n\t\t\t\t// getting data through `useSelect` asynchronously.\n\t\t\t\tif ( isBlockSelected( clientId ) ) {\n\t\t\t\t\t// Potentially change selection away from rich text.\n\t\t\t\t\tif ( ! event.target.isContentEditable ) {\n\t\t\t\t\t\tselectionChange( clientId );\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Never select on the focus fired during a selection\n\t\t\t\t// gesture (a shift+click, marked by the selection observer\n\t\t\t\t// with startMultiSelect). The browser can focus the common\n\t\t\t\t// editable ancestor of the range (e.g. a group block), and\n\t\t\t\t// any selection re-render mid gesture destroys the native\n\t\t\t\t// selection being made. The observer builds the\n\t\t\t\t// multi-selection on mouseup.\n\t\t\t\tif ( isMultiSelecting() ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// A block that is part of the current multi-selection must\n\t\t\t\t// not collapse it. Focus can land on the clicked block after\n\t\t\t\t// the multi-selection was built: the focus event of a\n\t\t\t\t// shift+click is not ordered consistently against its\n\t\t\t\t// mouseup across browsers.\n\t\t\t\tif ( isBlockMultiSelected( clientId ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// If an inner block is focussed, that block is responsible for\n\t\t\t\t// setting the selected block.\n\t\t\t\tif ( ! isInsideRootBlock( node, event.target ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// For editable targets, select without initial caret\n\t\t\t\t// placement: the caret is inside the target. Placement would\n\t\t\t\t// move it, and would collapse a native selection in the\n\t\t\t\t// making, e.g. a shift+click extending the selection across\n\t\t\t\t// blocks while the wrapper is the editing host. The observer\n\t\t\t\t// builds the multi-selection from the anchor it recorded at\n\t\t\t\t// mousedown, so this dispatch overwriting the store anchor\n\t\t\t\t// is harmless.\n\t\t\t\tif ( event.target.isContentEditable ) {\n\t\t\t\t\tselectBlock( clientId, null );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tselectBlock( clientId );\n\t\t\t}\n\n\t\t\treturn subscribeDelegatedListener( node, 'focusin', onFocus );\n\t\t},\n\t\t[ isBlockSelected, selectBlock ]\n\t);\n}\n"],
5
- "mappings": ";AAGA,SAAS,WAAW,mBAAmB;AACvC;AAAA,EACC;AAAA,EACA,eAAe;AAAA,OACT;AAKP,SAAS,yBAAyB;AAClC,SAAS,SAAS,wBAAwB;AAC1C,SAAS,cAAc;AAEvB,IAAM,EAAE,2BAA2B,IAAI,OAAQ,kBAAmB;AAO3D,SAAS,gBAAiB,UAAW;AAC3C,QAAM,EAAE,iBAAiB,sBAAsB,iBAAiB,IAC/D,UAAW,gBAAiB;AAC7B,QAAM,EAAE,aAAa,gBAAgB,IAAI,YAAa,gBAAiB;AAEvE,SAAO;AAAA,IACN,CAAE,SAAU;AASX,eAAS,QAAS,OAAQ;AAGzB,YAAK,gBAAiB,QAAS,GAAI;AAElC,cAAK,CAAE,MAAM,OAAO,mBAAoB;AACvC,4BAAiB,QAAS;AAAA,UAC3B;AACA;AAAA,QACD;AASA,YAAK,iBAAiB,GAAI;AACzB;AAAA,QACD;AAOA,YAAK,qBAAsB,QAAS,GAAI;AACvC;AAAA,QACD;AAIA,YAAK,CAAE,kBAAmB,MAAM,MAAM,MAAO,GAAI;AAChD;AAAA,QACD;AAUA,YAAK,MAAM,OAAO,mBAAoB;AACrC,sBAAa,UAAU,IAAK;AAC5B;AAAA,QACD;AAEA,oBAAa,QAAS;AAAA,MACvB;AAEA,aAAO,2BAA4B,MAAM,WAAW,OAAQ;AAAA,IAC7D;AAAA,IACA,CAAE,iBAAiB,WAAY;AAAA,EAChC;AACD;",
4
+ "sourcesContent": ["import { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tuseRefEffect,\n\tprivateApis as composePrivateApis,\n} from '@wordpress/compose';\nimport { isInsideRootBlock } from '../../../utils/dom';\nimport { store as blockEditorStore } from '../../../store';\nimport { unlock } from '../../../lock-unlock';\n\nconst { subscribeDelegatedListener } = unlock( composePrivateApis );\n\n/**\n * Selects the block if it receives focus.\n *\n * @param {string} clientId Block client ID.\n */\nexport function useFocusHandler( clientId ) {\n\tconst { isBlockSelected, isBlockMultiSelected, isMultiSelecting } =\n\t\tuseSelect( blockEditorStore );\n\tconst { selectBlock, selectionChange } = useDispatch( blockEditorStore );\n\n\treturn useRefEffect(\n\t\t( node ) => {\n\t\t\t/**\n\t\t\t * Marks the block as selected when focused and not already\n\t\t\t * selected. This specifically handles the case where block does not\n\t\t\t * set focus on its own (via `setFocus`), typically if there is no\n\t\t\t * focusable input in the block.\n\t\t\t *\n\t\t\t * @param {FocusEvent} event Focus event.\n\t\t\t */\n\t\t\tfunction onFocus( event ) {\n\t\t\t\t// Check synchronously because a non-selected block might be\n\t\t\t\t// getting data through `useSelect` asynchronously.\n\t\t\t\tif ( isBlockSelected( clientId ) ) {\n\t\t\t\t\t// Potentially change selection away from rich text.\n\t\t\t\t\tif ( ! event.target.isContentEditable ) {\n\t\t\t\t\t\tselectionChange( clientId );\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Never select on the focus fired during a selection\n\t\t\t\t// gesture (a shift+click, marked by the selection observer\n\t\t\t\t// with startMultiSelect). The browser can focus the common\n\t\t\t\t// editable ancestor of the range (e.g. a group block), and\n\t\t\t\t// any selection re-render mid gesture destroys the native\n\t\t\t\t// selection being made. The observer builds the\n\t\t\t\t// multi-selection on mouseup.\n\t\t\t\tif ( isMultiSelecting() ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// A block that is part of the current multi-selection must\n\t\t\t\t// not collapse it. Focus can land on the clicked block after\n\t\t\t\t// the multi-selection was built: the focus event of a\n\t\t\t\t// shift+click is not ordered consistently against its\n\t\t\t\t// mouseup across browsers.\n\t\t\t\tif ( isBlockMultiSelected( clientId ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// If an inner block is focussed, that block is responsible for\n\t\t\t\t// setting the selected block.\n\t\t\t\tif ( ! isInsideRootBlock( node, event.target ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// For editable targets, select without initial caret\n\t\t\t\t// placement: the caret is inside the target. Placement would\n\t\t\t\t// move it, and would collapse a native selection in the\n\t\t\t\t// making, e.g. a shift+click extending the selection across\n\t\t\t\t// blocks while the wrapper is the editing host. The observer\n\t\t\t\t// builds the multi-selection from the anchor it recorded at\n\t\t\t\t// mousedown, so this dispatch overwriting the store anchor\n\t\t\t\t// is harmless.\n\t\t\t\tif ( event.target.isContentEditable ) {\n\t\t\t\t\tselectBlock( clientId, null );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tselectBlock( clientId );\n\t\t\t}\n\n\t\t\treturn subscribeDelegatedListener( node, 'focusin', onFocus );\n\t\t},\n\t\t[ isBlockSelected, selectBlock ]\n\t);\n}\n"],
5
+ "mappings": ";AAAA,SAAS,WAAW,mBAAmB;AACvC;AAAA,EACC;AAAA,EACA,eAAe;AAAA,OACT;AACP,SAAS,yBAAyB;AAClC,SAAS,SAAS,wBAAwB;AAC1C,SAAS,cAAc;AAEvB,IAAM,EAAE,2BAA2B,IAAI,OAAQ,kBAAmB;AAO3D,SAAS,gBAAiB,UAAW;AAC3C,QAAM,EAAE,iBAAiB,sBAAsB,iBAAiB,IAC/D,UAAW,gBAAiB;AAC7B,QAAM,EAAE,aAAa,gBAAgB,IAAI,YAAa,gBAAiB;AAEvE,SAAO;AAAA,IACN,CAAE,SAAU;AASX,eAAS,QAAS,OAAQ;AAGzB,YAAK,gBAAiB,QAAS,GAAI;AAElC,cAAK,CAAE,MAAM,OAAO,mBAAoB;AACvC,4BAAiB,QAAS;AAAA,UAC3B;AACA;AAAA,QACD;AASA,YAAK,iBAAiB,GAAI;AACzB;AAAA,QACD;AAOA,YAAK,qBAAsB,QAAS,GAAI;AACvC;AAAA,QACD;AAIA,YAAK,CAAE,kBAAmB,MAAM,MAAM,MAAO,GAAI;AAChD;AAAA,QACD;AAUA,YAAK,MAAM,OAAO,mBAAoB;AACrC,sBAAa,UAAU,IAAK;AAC5B;AAAA,QACD;AAEA,oBAAa,QAAS;AAAA,MACvB;AAEA,aAAO,2BAA4B,MAAM,WAAW,OAAQ;AAAA,IAC7D;AAAA,IACA,CAAE,iBAAiB,WAAY;AAAA,EAChC;AACD;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/components/block-list/use-block-props/use-intersection-observer.js"],
4
- "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useRefEffect } from '@wordpress/compose';\nimport { useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { IntersectionObserver } from '../';\n\nexport function useIntersectionObserver() {\n\tconst observer = useContext( IntersectionObserver );\n\treturn useRefEffect(\n\t\t( node ) => {\n\t\t\tif ( observer ) {\n\t\t\t\tobserver.observe( node );\n\t\t\t\treturn () => {\n\t\t\t\t\tobserver.unobserve( node );\n\t\t\t\t};\n\t\t\t}\n\t\t},\n\t\t[ observer ]\n\t);\n}\n"],
5
- "mappings": ";AAGA,SAAS,oBAAoB;AAC7B,SAAS,kBAAkB;AAK3B,SAAS,4BAA4B;AAE9B,SAAS,0BAA0B;AACzC,QAAM,WAAW,WAAY,oBAAqB;AAClD,SAAO;AAAA,IACN,CAAE,SAAU;AACX,UAAK,UAAW;AACf,iBAAS,QAAS,IAAK;AACvB,eAAO,MAAM;AACZ,mBAAS,UAAW,IAAK;AAAA,QAC1B;AAAA,MACD;AAAA,IACD;AAAA,IACA,CAAE,QAAS;AAAA,EACZ;AACD;",
4
+ "sourcesContent": ["import { useRefEffect } from '@wordpress/compose';\nimport { useContext } from '@wordpress/element';\nimport { IntersectionObserver } from '../';\n\nexport function useIntersectionObserver() {\n\tconst observer = useContext( IntersectionObserver );\n\treturn useRefEffect(\n\t\t( node ) => {\n\t\t\tif ( observer ) {\n\t\t\t\tobserver.observe( node );\n\t\t\t\treturn () => {\n\t\t\t\t\tobserver.unobserve( node );\n\t\t\t\t};\n\t\t\t}\n\t\t},\n\t\t[ observer ]\n\t);\n}\n"],
5
+ "mappings": ";AAAA,SAAS,oBAAoB;AAC7B,SAAS,kBAAkB;AAC3B,SAAS,4BAA4B;AAE9B,SAAS,0BAA0B;AACzC,QAAM,WAAW,WAAY,oBAAqB;AAClD,SAAO;AAAA,IACN,CAAE,SAAU;AACX,UAAK,UAAW;AACf,iBAAS,QAAS,IAAK;AACvB,eAAO,MAAM;AACZ,mBAAS,UAAW,IAAK;AAAA,QAC1B;AAAA,MACD;AAAA,IACD;AAAA,IACA,CAAE,QAAS;AAAA,EACZ;AACD;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/components/block-list/use-block-props/use-is-hovered.js"],
4
- "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport {\n\tuseRefEffect,\n\tprivateApis as composePrivateApis,\n} from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../../lock-unlock';\n\nconst { subscribeDelegatedListener } = unlock( composePrivateApis );\n\n/**\n * Adds `is-hovered` class when the block is hovered and in navigation or\n * outline mode.\n *\n * @param {Object} options Options object.\n * @param {boolean} [options.isEnabled=true] Whether to enable hover detection.\n *\n * @return {Function} Ref callback.\n */\nexport function useIsHovered( { isEnabled = true } = {} ) {\n\treturn useRefEffect(\n\t\t( node ) => {\n\t\t\tif ( ! isEnabled ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfunction listener( event ) {\n\t\t\t\tif ( event.defaultPrevented ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tevent.preventDefault();\n\t\t\t\tnode.classList.toggle(\n\t\t\t\t\t'is-hovered',\n\t\t\t\t\tevent.type === 'mouseover'\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst unsubscribeOut = subscribeDelegatedListener(\n\t\t\t\tnode,\n\t\t\t\t'mouseout',\n\t\t\t\tlistener\n\t\t\t);\n\t\t\tconst unsubscribeOver = subscribeDelegatedListener(\n\t\t\t\tnode,\n\t\t\t\t'mouseover',\n\t\t\t\tlistener\n\t\t\t);\n\n\t\t\treturn () => {\n\t\t\t\tunsubscribeOut();\n\t\t\t\tunsubscribeOver();\n\n\t\t\t\t// Remove class in case it lingers.\n\t\t\t\tnode.classList.remove( 'is-hovered' );\n\t\t\t};\n\t\t},\n\t\t[ isEnabled ]\n\t);\n}\n"],
5
- "mappings": ";AAGA;AAAA,EACC;AAAA,EACA,eAAe;AAAA,OACT;AAKP,SAAS,cAAc;AAEvB,IAAM,EAAE,2BAA2B,IAAI,OAAQ,kBAAmB;AAW3D,SAAS,aAAc,EAAE,YAAY,KAAK,IAAI,CAAC,GAAI;AACzD,SAAO;AAAA,IACN,CAAE,SAAU;AACX,UAAK,CAAE,WAAY;AAClB;AAAA,MACD;AAEA,eAAS,SAAU,OAAQ;AAC1B,YAAK,MAAM,kBAAmB;AAC7B;AAAA,QACD;AACA,cAAM,eAAe;AACrB,aAAK,UAAU;AAAA,UACd;AAAA,UACA,MAAM,SAAS;AAAA,QAChB;AAAA,MACD;AAEA,YAAM,iBAAiB;AAAA,QACtB;AAAA,QACA;AAAA,QACA;AAAA,MACD;AACA,YAAM,kBAAkB;AAAA,QACvB;AAAA,QACA;AAAA,QACA;AAAA,MACD;AAEA,aAAO,MAAM;AACZ,uBAAe;AACf,wBAAgB;AAGhB,aAAK,UAAU,OAAQ,YAAa;AAAA,MACrC;AAAA,IACD;AAAA,IACA,CAAE,SAAU;AAAA,EACb;AACD;",
4
+ "sourcesContent": ["import {\n\tuseRefEffect,\n\tprivateApis as composePrivateApis,\n} from '@wordpress/compose';\nimport { unlock } from '../../../lock-unlock';\n\nconst { subscribeDelegatedListener } = unlock( composePrivateApis );\n\n/**\n * Adds `is-hovered` class when the block is hovered and in navigation or\n * outline mode.\n *\n * @param {Object} options Options object.\n * @param {boolean} [options.isEnabled=true] Whether to enable hover detection.\n *\n * @return {Function} Ref callback.\n */\nexport function useIsHovered( { isEnabled = true } = {} ) {\n\treturn useRefEffect(\n\t\t( node ) => {\n\t\t\tif ( ! isEnabled ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfunction listener( event ) {\n\t\t\t\tif ( event.defaultPrevented ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tevent.preventDefault();\n\t\t\t\tnode.classList.toggle(\n\t\t\t\t\t'is-hovered',\n\t\t\t\t\tevent.type === 'mouseover'\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst unsubscribeOut = subscribeDelegatedListener(\n\t\t\t\tnode,\n\t\t\t\t'mouseout',\n\t\t\t\tlistener\n\t\t\t);\n\t\t\tconst unsubscribeOver = subscribeDelegatedListener(\n\t\t\t\tnode,\n\t\t\t\t'mouseover',\n\t\t\t\tlistener\n\t\t\t);\n\n\t\t\treturn () => {\n\t\t\t\tunsubscribeOut();\n\t\t\t\tunsubscribeOver();\n\n\t\t\t\t// Remove class in case it lingers.\n\t\t\t\tnode.classList.remove( 'is-hovered' );\n\t\t\t};\n\t\t},\n\t\t[ isEnabled ]\n\t);\n}\n"],
5
+ "mappings": ";AAAA;AAAA,EACC;AAAA,EACA,eAAe;AAAA,OACT;AACP,SAAS,cAAc;AAEvB,IAAM,EAAE,2BAA2B,IAAI,OAAQ,kBAAmB;AAW3D,SAAS,aAAc,EAAE,YAAY,KAAK,IAAI,CAAC,GAAI;AACzD,SAAO;AAAA,IACN,CAAE,SAAU;AACX,UAAK,CAAE,WAAY;AAClB;AAAA,MACD;AAEA,eAAS,SAAU,OAAQ;AAC1B,YAAK,MAAM,kBAAmB;AAC7B;AAAA,QACD;AACA,cAAM,eAAe;AACrB,aAAK,UAAU;AAAA,UACd;AAAA,UACA,MAAM,SAAS;AAAA,QAChB;AAAA,MACD;AAEA,YAAM,iBAAiB;AAAA,QACtB;AAAA,QACA;AAAA,QACA;AAAA,MACD;AACA,YAAM,kBAAkB;AAAA,QACvB;AAAA,QACA;AAAA,QACA;AAAA,MACD;AAEA,aAAO,MAAM;AACZ,uBAAe;AACf,wBAAgB;AAGhB,aAAK,UAAU,OAAQ,YAAa;AAAA,MACrC;AAAA,IACD;AAAA,IACA,CAAE,SAAU;AAAA,EACb;AACD;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/components/block-list/use-block-props/use-register-block-event-handlers.js"],
4
- "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport {\n\tuseContext,\n\tuseEffect,\n\tuseInsertionEffect,\n\tuseRef,\n} from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { getEventHandlers } from '../../writing-flow/use-editable-root-event-handlers';\nimport { BlockRefs } from '../../provider/block-refs-provider';\n\n/**\n * Registers the block's `wrapperProps` event handlers so the writing flow host\n * can call them when a block that supports `editableRoot` is edited through the\n * host and the events no longer reach the block.\n *\n * Handlers are keyed by client ID in the `BlockRefs` context, so the host\n * resolves them from the block hierarchy. A ref is stored so the host always\n * calls the latest render's handlers, and only blocks that have a handler are\n * registered.\n *\n * @param {string} clientId Block client ID.\n * @param {Object} wrapperProps The block's merged wrapper props.\n */\nexport function useRegisterBlockEventHandlers( clientId, wrapperProps ) {\n\tconst { eventHandlers } = useContext( BlockRefs );\n\tconst handlers = getEventHandlers( wrapperProps );\n\tconst handlersRef = useRef();\n\tuseInsertionEffect( () => {\n\t\thandlersRef.current = handlers;\n\t} );\n\n\tconst hasHandlers = !! handlers;\n\tuseEffect( () => {\n\t\tif ( hasHandlers ) {\n\t\t\teventHandlers.set( clientId, handlersRef );\n\t\t\treturn () => eventHandlers.delete( clientId );\n\t\t}\n\t}, [ eventHandlers, clientId, hasHandlers ] );\n}\n"],
5
- "mappings": ";AAGA;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACM;AAKP,SAAS,wBAAwB;AACjC,SAAS,iBAAiB;AAenB,SAAS,8BAA+B,UAAU,cAAe;AACvE,QAAM,EAAE,cAAc,IAAI,WAAY,SAAU;AAChD,QAAM,WAAW,iBAAkB,YAAa;AAChD,QAAM,cAAc,OAAO;AAC3B,qBAAoB,MAAM;AACzB,gBAAY,UAAU;AAAA,EACvB,CAAE;AAEF,QAAM,cAAc,CAAC,CAAE;AACvB,YAAW,MAAM;AAChB,QAAK,aAAc;AAClB,oBAAc,IAAK,UAAU,WAAY;AACzC,aAAO,MAAM,cAAc,OAAQ,QAAS;AAAA,IAC7C;AAAA,EACD,GAAG,CAAE,eAAe,UAAU,WAAY,CAAE;AAC7C;",
4
+ "sourcesContent": ["import {\n\tuseContext,\n\tuseEffect,\n\tuseInsertionEffect,\n\tuseRef,\n} from '@wordpress/element';\nimport { getEventHandlers } from '../../writing-flow/use-editable-root-event-handlers';\nimport { BlockRefs } from '../../provider/block-refs-provider';\n\n/**\n * Registers the block's `wrapperProps` event handlers so the writing flow host\n * can call them when a block that supports `editableRoot` is edited through the\n * host and the events no longer reach the block.\n *\n * Handlers are keyed by client ID in the `BlockRefs` context, so the host\n * resolves them from the block hierarchy. A ref is stored so the host always\n * calls the latest render's handlers, and only blocks that have a handler are\n * registered.\n *\n * @param {string} clientId Block client ID.\n * @param {Object} wrapperProps The block's merged wrapper props.\n */\nexport function useRegisterBlockEventHandlers( clientId, wrapperProps ) {\n\tconst { eventHandlers } = useContext( BlockRefs );\n\tconst handlers = getEventHandlers( wrapperProps );\n\tconst handlersRef = useRef();\n\tuseInsertionEffect( () => {\n\t\thandlersRef.current = handlers;\n\t} );\n\n\tconst hasHandlers = !! handlers;\n\tuseEffect( () => {\n\t\tif ( hasHandlers ) {\n\t\t\teventHandlers.set( clientId, handlersRef );\n\t\t\treturn () => eventHandlers.delete( clientId );\n\t\t}\n\t}, [ eventHandlers, clientId, hasHandlers ] );\n}\n"],
5
+ "mappings": ";AAAA;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACM;AACP,SAAS,wBAAwB;AACjC,SAAS,iBAAiB;AAenB,SAAS,8BAA+B,UAAU,cAAe;AACvE,QAAM,EAAE,cAAc,IAAI,WAAY,SAAU;AAChD,QAAM,WAAW,iBAAkB,YAAa;AAChD,QAAM,cAAc,OAAO;AAC3B,qBAAoB,MAAM;AACzB,gBAAY,UAAU;AAAA,EACvB,CAAE;AAEF,QAAM,cAAc,CAAC,CAAE;AACvB,YAAW,MAAM;AAChB,QAAK,aAAc;AAClB,oBAAc,IAAK,UAAU,WAAY;AACzC,aAAO,MAAM,cAAc,OAAQ,QAAS;AAAA,IAC7C;AAAA,EACD,GAAG,CAAE,eAAe,UAAU,WAAY,CAAE;AAC7C;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/components/block-list/use-block-props/use-scroll-into-view.js"],
4
- "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useReducedMotion, useRefEffect } from '@wordpress/compose';\n\nexport function useScrollIntoView( { isSelected } ) {\n\tconst prefersReducedMotion = useReducedMotion();\n\treturn useRefEffect(\n\t\t( node ) => {\n\t\t\tif ( isSelected ) {\n\t\t\t\tconst { ownerDocument } = node;\n\t\t\t\tconst { defaultView } = ownerDocument;\n\t\t\t\tif ( ! defaultView.IntersectionObserver ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst observer = new defaultView.IntersectionObserver(\n\t\t\t\t\t( entries ) => {\n\t\t\t\t\t\t// Once observing starts, we always get an initial\n\t\t\t\t\t\t// entry with the intersecting state.\n\t\t\t\t\t\tif ( ! entries[ 0 ].isIntersecting ) {\n\t\t\t\t\t\t\tnode.scrollIntoView( {\n\t\t\t\t\t\t\t\tbehavior: prefersReducedMotion\n\t\t\t\t\t\t\t\t\t? 'instant'\n\t\t\t\t\t\t\t\t\t: 'smooth',\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tobserver.disconnect();\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t\tobserver.observe( node );\n\t\t\t\treturn () => {\n\t\t\t\t\tobserver.disconnect();\n\t\t\t\t};\n\t\t\t}\n\t\t},\n\t\t[ isSelected ]\n\t);\n}\n"],
5
- "mappings": ";AAGA,SAAS,kBAAkB,oBAAoB;AAExC,SAAS,kBAAmB,EAAE,WAAW,GAAI;AACnD,QAAM,uBAAuB,iBAAiB;AAC9C,SAAO;AAAA,IACN,CAAE,SAAU;AACX,UAAK,YAAa;AACjB,cAAM,EAAE,cAAc,IAAI;AAC1B,cAAM,EAAE,YAAY,IAAI;AACxB,YAAK,CAAE,YAAY,sBAAuB;AACzC;AAAA,QACD;AACA,cAAM,WAAW,IAAI,YAAY;AAAA,UAChC,CAAE,YAAa;AAGd,gBAAK,CAAE,QAAS,CAAE,EAAE,gBAAiB;AACpC,mBAAK,eAAgB;AAAA,gBACpB,UAAU,uBACP,YACA;AAAA,cACJ,CAAE;AAAA,YACH;AACA,qBAAS,WAAW;AAAA,UACrB;AAAA,QACD;AACA,iBAAS,QAAS,IAAK;AACvB,eAAO,MAAM;AACZ,mBAAS,WAAW;AAAA,QACrB;AAAA,MACD;AAAA,IACD;AAAA,IACA,CAAE,UAAW;AAAA,EACd;AACD;",
4
+ "sourcesContent": ["import { useReducedMotion, useRefEffect } from '@wordpress/compose';\n\nexport function useScrollIntoView( { isSelected } ) {\n\tconst prefersReducedMotion = useReducedMotion();\n\treturn useRefEffect(\n\t\t( node ) => {\n\t\t\tif ( isSelected ) {\n\t\t\t\tconst { ownerDocument } = node;\n\t\t\t\tconst { defaultView } = ownerDocument;\n\t\t\t\tif ( ! defaultView.IntersectionObserver ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst observer = new defaultView.IntersectionObserver(\n\t\t\t\t\t( entries ) => {\n\t\t\t\t\t\t// Once observing starts, we always get an initial\n\t\t\t\t\t\t// entry with the intersecting state.\n\t\t\t\t\t\tif ( ! entries[ 0 ].isIntersecting ) {\n\t\t\t\t\t\t\tnode.scrollIntoView( {\n\t\t\t\t\t\t\t\tbehavior: prefersReducedMotion\n\t\t\t\t\t\t\t\t\t? 'instant'\n\t\t\t\t\t\t\t\t\t: 'smooth',\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tobserver.disconnect();\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t\tobserver.observe( node );\n\t\t\t\treturn () => {\n\t\t\t\t\tobserver.disconnect();\n\t\t\t\t};\n\t\t\t}\n\t\t},\n\t\t[ isSelected ]\n\t);\n}\n"],
5
+ "mappings": ";AAAA,SAAS,kBAAkB,oBAAoB;AAExC,SAAS,kBAAmB,EAAE,WAAW,GAAI;AACnD,QAAM,uBAAuB,iBAAiB;AAC9C,SAAO;AAAA,IACN,CAAE,SAAU;AACX,UAAK,YAAa;AACjB,cAAM,EAAE,cAAc,IAAI;AAC1B,cAAM,EAAE,YAAY,IAAI;AACxB,YAAK,CAAE,YAAY,sBAAuB;AACzC;AAAA,QACD;AACA,cAAM,WAAW,IAAI,YAAY;AAAA,UAChC,CAAE,YAAa;AAGd,gBAAK,CAAE,QAAS,CAAE,EAAE,gBAAiB;AACpC,mBAAK,eAAgB;AAAA,gBACpB,UAAU,uBACP,YACA;AAAA,cACJ,CAAE;AAAA,YACH;AACA,qBAAS,WAAW;AAAA,UACrB;AAAA,QACD;AACA,iBAAS,QAAS,IAAK;AACvB,eAAO,MAAM;AACZ,mBAAS,WAAW;AAAA,QACrB;AAAA,MACD;AAAA,IACD;AAAA,IACA,CAAE,UAAW;AAAA,EACd;AACD;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/components/block-list/use-block-props/use-selected-block-event-handlers.js"],
4
- "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { isReusableBlock, isTemplatePart } from '@wordpress/blocks';\nimport { isTextField } from '@wordpress/dom';\nimport { ENTER, BACKSPACE, DELETE } from '@wordpress/keycodes';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useRefEffect } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../../store';\nimport { unlock } from '../../../lock-unlock';\n\nfunction isColorTransparent( color ) {\n\treturn ! color || color === 'transparent' || color === 'rgba(0, 0, 0, 0)';\n}\n\n/**\n * Adds block behaviour:\n * - Removes the block on BACKSPACE.\n * - Inserts a default block on ENTER.\n * - Disables dragging of block contents.\n *\n * @param {string} clientId Block client ID.\n */\nexport function useEventHandlers( { clientId, isSelected } ) {\n\tconst {\n\t\tgetBlockRootClientId,\n\t\tisZoomOut,\n\t\thasMultiSelection,\n\t\tisSectionBlock,\n\t\teditedContentOnlySection,\n\t\tgetBlock,\n\t} = unlock( useSelect( blockEditorStore ) );\n\tconst {\n\t\tinsertAfterBlock,\n\t\tremoveBlock,\n\t\tresetZoomLevel,\n\t\tstartDraggingBlocks,\n\t\tstopDraggingBlocks,\n\t\teditContentOnlySection,\n\t} = unlock( useDispatch( blockEditorStore ) );\n\n\treturn useRefEffect(\n\t\t( node ) => {\n\t\t\tif ( ! isSelected ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Interprets keydown event intent to remove or insert after block if\n\t\t\t * key event occurs on wrapper node. This can occur when the block has\n\t\t\t * no text fields of its own, particularly after initial insertion, to\n\t\t\t * allow for easy deletion and continuous writing flow to add additional\n\t\t\t * content.\n\t\t\t *\n\t\t\t * @param {KeyboardEvent} event Keydown event.\n\t\t\t */\n\t\t\tfunction onKeyDown( event ) {\n\t\t\t\tconst { keyCode, target } = event;\n\n\t\t\t\tif (\n\t\t\t\t\tkeyCode !== ENTER &&\n\t\t\t\t\tkeyCode !== BACKSPACE &&\n\t\t\t\t\tkeyCode !== DELETE\n\t\t\t\t) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( target !== node || isTextField( target ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tevent.preventDefault();\n\n\t\t\t\tif ( keyCode === ENTER && isZoomOut() ) {\n\t\t\t\t\tresetZoomLevel();\n\t\t\t\t} else if ( keyCode === ENTER ) {\n\t\t\t\t\tinsertAfterBlock( clientId );\n\t\t\t\t} else {\n\t\t\t\t\tremoveBlock( clientId );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Prevents default dragging behavior within a block. To do: we must\n\t\t\t * handle this in the future and clean up the drag target.\n\t\t\t *\n\t\t\t * @param {DragEvent} event Drag event.\n\t\t\t */\n\t\t\tfunction onDragStart( event ) {\n\t\t\t\tif (\n\t\t\t\t\tnode !== event.target ||\n\t\t\t\t\tnode.isContentEditable ||\n\t\t\t\t\tnode.ownerDocument.activeElement !== node ||\n\t\t\t\t\thasMultiSelection()\n\t\t\t\t) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst data = JSON.stringify( {\n\t\t\t\t\ttype: 'block',\n\t\t\t\t\tsrcClientIds: [ clientId ],\n\t\t\t\t\tsrcRootClientId: getBlockRootClientId( clientId ),\n\t\t\t\t} );\n\t\t\t\tevent.dataTransfer.effectAllowed = 'move'; // remove \"+\" cursor\n\t\t\t\tevent.dataTransfer.clearData();\n\t\t\t\tevent.dataTransfer.setData( 'wp-blocks', data );\n\t\t\t\tconst { ownerDocument } = node;\n\t\t\t\tconst { defaultView } = ownerDocument;\n\t\t\t\tconst selection = defaultView.getSelection();\n\t\t\t\tselection.removeAllRanges();\n\n\t\t\t\t// Setting the drag chip as the drag image actually works, but\n\t\t\t\t// the behaviour is slightly different in every browser. In\n\t\t\t\t// Safari, it animates, in Firefox it's slightly transparent...\n\t\t\t\t// So we set a fake drag image and have to reposition it\n\t\t\t\t// ourselves.\n\t\t\t\tconst dragElement = ownerDocument.createElement( 'div' );\n\t\t\t\t// Chrome will show a globe icon if the drag element does not\n\t\t\t\t// have dimensions.\n\t\t\t\tdragElement.style.width = '1px';\n\t\t\t\tdragElement.style.height = '1px';\n\t\t\t\tdragElement.style.position = 'fixed';\n\t\t\t\tdragElement.style.visibility = 'hidden';\n\t\t\t\townerDocument.body.appendChild( dragElement );\n\t\t\t\tevent.dataTransfer.setDragImage( dragElement, 0, 0 );\n\n\t\t\t\tconst rect = node.getBoundingClientRect();\n\n\t\t\t\t// Remove the id and leave it on a shallow clone so that drop\n\t\t\t\t// target calculations are correct.\n\t\t\t\tconst id = node.id;\n\t\t\t\tconst clone = node.cloneNode();\n\t\t\t\tclone.style.display = 'none';\n\t\t\t\tnode.id = null;\n\t\t\t\tnode.after( clone );\n\n\t\t\t\tlet _scale = 1;\n\n\t\t\t\t{\n\t\t\t\t\tlet parentElement = node;\n\t\t\t\t\twhile ( ( parentElement = parentElement.parentElement ) ) {\n\t\t\t\t\t\tconst { scale } =\n\t\t\t\t\t\t\tdefaultView.getComputedStyle( parentElement );\n\t\t\t\t\t\tif ( scale && scale !== 'none' ) {\n\t\t\t\t\t\t\t_scale = parseFloat( scale );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tconst inverted = 1 / _scale;\n\n\t\t\t\tconst originalNodeProperties = {};\n\t\t\t\tfor ( const property of [\n\t\t\t\t\t'transform',\n\t\t\t\t\t'transformOrigin',\n\t\t\t\t\t'transition',\n\t\t\t\t\t'zIndex',\n\t\t\t\t\t'position',\n\t\t\t\t\t'top',\n\t\t\t\t\t'left',\n\t\t\t\t\t'pointerEvents',\n\t\t\t\t\t'opacity',\n\t\t\t\t\t'backgroundColor',\n\t\t\t\t] ) {\n\t\t\t\t\toriginalNodeProperties[ property ] = node.style[ property ];\n\t\t\t\t}\n\n\t\t\t\t// Get scroll position.\n\t\t\t\tconst originScrollTop = defaultView.scrollY;\n\t\t\t\tconst originScrollLeft = defaultView.scrollX;\n\t\t\t\tconst originClientX = event.clientX;\n\t\t\t\tconst originClientY = event.clientY;\n\n\t\t\t\t// We can't use position fixed because it will behave different\n\t\t\t\t// if the html element is scaled or transformed (position will\n\t\t\t\t// no longer be relative to the viewport). The downside of\n\t\t\t\t// relative is that we have to listen to scroll events. On the\n\t\t\t\t// upside we don't have to clone to keep a space. Absolute\n\t\t\t\t// positioning might be weird because it will be based on the\n\t\t\t\t// positioned parent, but it might be worth a try.\n\t\t\t\tnode.style.position = 'relative';\n\t\t\t\tnode.style.top = `${ 0 }px`;\n\t\t\t\tnode.style.left = `${ 0 }px`;\n\n\t\t\t\tconst originX = event.clientX - rect.left;\n\t\t\t\tconst originY = event.clientY - rect.top;\n\n\t\t\t\t// Scale everything to 200px.\n\t\t\t\tconst dragScale = rect.height > 200 ? 200 / rect.height : 1;\n\n\t\t\t\tnode.style.zIndex = '1000';\n\t\t\t\tnode.style.transformOrigin = `${ originX * inverted }px ${\n\t\t\t\t\toriginY * inverted\n\t\t\t\t}px`;\n\t\t\t\tnode.style.transition = 'transform 0.2s ease-out';\n\t\t\t\tnode.style.transform = `scale(${ dragScale })`;\n\t\t\t\tnode.style.opacity = '0.9';\n\n\t\t\t\t// If the block has no background color, use the parent's\n\t\t\t\t// background color.\n\t\t\t\tif (\n\t\t\t\t\tisColorTransparent(\n\t\t\t\t\t\tdefaultView.getComputedStyle( node ).backgroundColor\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\tlet bgColor = 'transparent';\n\t\t\t\t\tlet parentElement = node;\n\t\t\t\t\twhile ( ( parentElement = parentElement.parentElement ) ) {\n\t\t\t\t\t\tconst { backgroundColor } =\n\t\t\t\t\t\t\tdefaultView.getComputedStyle( parentElement );\n\t\t\t\t\t\tif ( ! isColorTransparent( backgroundColor ) ) {\n\t\t\t\t\t\t\tbgColor = backgroundColor;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tnode.style.backgroundColor = bgColor;\n\t\t\t\t}\n\n\t\t\t\tlet hasStarted = false;\n\t\t\t\tlet lastClientX = originClientX;\n\t\t\t\tlet lastClientY = originClientY;\n\n\t\t\t\tfunction dragOver( e ) {\n\t\t\t\t\t// Only trigger `over` if the mouse has moved.\n\t\t\t\t\tif (\n\t\t\t\t\t\te.clientX === lastClientX &&\n\t\t\t\t\t\te.clientY === lastClientY\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tlastClientX = e.clientX;\n\t\t\t\t\tlastClientY = e.clientY;\n\t\t\t\t\tover();\n\t\t\t\t}\n\n\t\t\t\tfunction over() {\n\t\t\t\t\tif ( ! hasStarted ) {\n\t\t\t\t\t\thasStarted = true;\n\t\t\t\t\t\tnode.style.pointerEvents = 'none';\n\t\t\t\t\t}\n\t\t\t\t\tconst pointerYDelta = lastClientY - originClientY;\n\t\t\t\t\tconst pointerXDelta = lastClientX - originClientX;\n\t\t\t\t\tconst scrollTop = defaultView.scrollY;\n\t\t\t\t\tconst scrollLeft = defaultView.scrollX;\n\t\t\t\t\tconst scrollTopDelta = scrollTop - originScrollTop;\n\t\t\t\t\tconst scrollLeftDelta = scrollLeft - originScrollLeft;\n\t\t\t\t\tconst topDelta = pointerYDelta + scrollTopDelta;\n\t\t\t\t\tconst leftDelta = pointerXDelta + scrollLeftDelta;\n\t\t\t\t\tnode.style.top = `${ topDelta * inverted }px`;\n\t\t\t\t\tnode.style.left = `${ leftDelta * inverted }px`;\n\t\t\t\t}\n\n\t\t\t\tfunction end() {\n\t\t\t\t\townerDocument.removeEventListener( 'dragover', dragOver );\n\t\t\t\t\townerDocument.removeEventListener( 'dragend', end );\n\t\t\t\t\townerDocument.removeEventListener( 'drop', end );\n\t\t\t\t\townerDocument.removeEventListener( 'scroll', over );\n\t\t\t\t\tfor ( const [ property, value ] of Object.entries(\n\t\t\t\t\t\toriginalNodeProperties\n\t\t\t\t\t) ) {\n\t\t\t\t\t\tnode.style[ property ] = value;\n\t\t\t\t\t}\n\t\t\t\t\tclone.remove();\n\t\t\t\t\tnode.id = id;\n\t\t\t\t\tdragElement.remove();\n\t\t\t\t\tstopDraggingBlocks();\n\t\t\t\t\tdocument.body.classList.remove(\n\t\t\t\t\t\t'is-dragging-components-draggable'\n\t\t\t\t\t);\n\t\t\t\t\townerDocument.documentElement.classList.remove(\n\t\t\t\t\t\t'is-dragging'\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\townerDocument.addEventListener( 'dragover', dragOver );\n\t\t\t\townerDocument.addEventListener( 'dragend', end );\n\t\t\t\townerDocument.addEventListener( 'drop', end );\n\t\t\t\townerDocument.addEventListener( 'scroll', over );\n\n\t\t\t\tstartDraggingBlocks( [ clientId ] );\n\t\t\t\t// Important because it hides the block toolbar.\n\t\t\t\tdocument.body.classList.add(\n\t\t\t\t\t'is-dragging-components-draggable'\n\t\t\t\t);\n\t\t\t\townerDocument.documentElement.classList.add( 'is-dragging' );\n\t\t\t}\n\n\t\t\tnode.addEventListener( 'keydown', onKeyDown );\n\t\t\tnode.addEventListener( 'dragstart', onDragStart );\n\n\t\t\t/**\n\t\t\t * Handles double-click events on section blocks to edit content only section.\n\t\t\t *\n\t\t\t * @param {MouseEvent} event Double-click event.\n\t\t\t */\n\t\t\tfunction onDoubleClick( event ) {\n\t\t\t\tconst isSection = isSectionBlock( clientId );\n\t\t\t\tconst block = getBlock( clientId );\n\t\t\t\tconst isSyncedPattern = isReusableBlock( block );\n\t\t\t\tconst isTemplatePartBlock = isTemplatePart( block );\n\t\t\t\tconst isAlreadyEditing = editedContentOnlySection === clientId;\n\n\t\t\t\tif (\n\t\t\t\t\t! isSection ||\n\t\t\t\t\tisAlreadyEditing ||\n\t\t\t\t\tisSyncedPattern ||\n\t\t\t\t\tisTemplatePartBlock\n\t\t\t\t) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tevent.preventDefault();\n\t\t\t\teditContentOnlySection( clientId );\n\t\t\t}\n\n\t\t\tnode.addEventListener( 'dblclick', onDoubleClick );\n\n\t\t\treturn () => {\n\t\t\t\tnode.removeEventListener( 'keydown', onKeyDown );\n\t\t\t\tnode.removeEventListener( 'dragstart', onDragStart );\n\t\t\t\tnode.removeEventListener( 'dblclick', onDoubleClick );\n\t\t\t};\n\t\t},\n\t\t[\n\t\t\tclientId,\n\t\t\tisSelected,\n\t\t\tgetBlockRootClientId,\n\t\t\tgetBlock,\n\t\t\tisReusableBlock,\n\t\t\tisTemplatePart,\n\t\t\tinsertAfterBlock,\n\t\t\tremoveBlock,\n\t\t\tisZoomOut,\n\t\t\tresetZoomLevel,\n\t\t\thasMultiSelection,\n\t\t\tstartDraggingBlocks,\n\t\t\tstopDraggingBlocks,\n\t\t\tisSectionBlock,\n\t\t\teditedContentOnlySection,\n\t\t\teditContentOnlySection,\n\t\t]\n\t);\n}\n"],
5
- "mappings": "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",
4
+ "sourcesContent": ["import { isReusableBlock, isTemplatePart } from '@wordpress/blocks';\nimport { isTextField } from '@wordpress/dom';\nimport { ENTER, BACKSPACE, DELETE } from '@wordpress/keycodes';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useRefEffect } from '@wordpress/compose';\nimport { store as blockEditorStore } from '../../../store';\nimport { unlock } from '../../../lock-unlock';\n\nfunction isColorTransparent( color ) {\n\treturn ! color || color === 'transparent' || color === 'rgba(0, 0, 0, 0)';\n}\n\n/**\n * Adds block behaviour:\n * - Removes the block on BACKSPACE.\n * - Inserts a default block on ENTER.\n * - Disables dragging of block contents.\n *\n * @param {string} clientId Block client ID.\n */\nexport function useEventHandlers( { clientId, isSelected } ) {\n\tconst {\n\t\tgetBlockRootClientId,\n\t\tisZoomOut,\n\t\thasMultiSelection,\n\t\tisSectionBlock,\n\t\teditedContentOnlySection,\n\t\tgetBlock,\n\t} = unlock( useSelect( blockEditorStore ) );\n\tconst {\n\t\tinsertAfterBlock,\n\t\tremoveBlock,\n\t\tresetZoomLevel,\n\t\tstartDraggingBlocks,\n\t\tstopDraggingBlocks,\n\t\teditContentOnlySection,\n\t} = unlock( useDispatch( blockEditorStore ) );\n\n\treturn useRefEffect(\n\t\t( node ) => {\n\t\t\tif ( ! isSelected ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Interprets keydown event intent to remove or insert after block if\n\t\t\t * key event occurs on wrapper node. This can occur when the block has\n\t\t\t * no text fields of its own, particularly after initial insertion, to\n\t\t\t * allow for easy deletion and continuous writing flow to add additional\n\t\t\t * content.\n\t\t\t *\n\t\t\t * @param {KeyboardEvent} event Keydown event.\n\t\t\t */\n\t\t\tfunction onKeyDown( event ) {\n\t\t\t\tconst { keyCode, target } = event;\n\n\t\t\t\tif (\n\t\t\t\t\tkeyCode !== ENTER &&\n\t\t\t\t\tkeyCode !== BACKSPACE &&\n\t\t\t\t\tkeyCode !== DELETE\n\t\t\t\t) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( target !== node || isTextField( target ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tevent.preventDefault();\n\n\t\t\t\tif ( keyCode === ENTER && isZoomOut() ) {\n\t\t\t\t\tresetZoomLevel();\n\t\t\t\t} else if ( keyCode === ENTER ) {\n\t\t\t\t\tinsertAfterBlock( clientId );\n\t\t\t\t} else {\n\t\t\t\t\tremoveBlock( clientId );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Prevents default dragging behavior within a block. To do: we must\n\t\t\t * handle this in the future and clean up the drag target.\n\t\t\t *\n\t\t\t * @param {DragEvent} event Drag event.\n\t\t\t */\n\t\t\tfunction onDragStart( event ) {\n\t\t\t\tif (\n\t\t\t\t\tnode !== event.target ||\n\t\t\t\t\tnode.isContentEditable ||\n\t\t\t\t\tnode.ownerDocument.activeElement !== node ||\n\t\t\t\t\thasMultiSelection()\n\t\t\t\t) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst data = JSON.stringify( {\n\t\t\t\t\ttype: 'block',\n\t\t\t\t\tsrcClientIds: [ clientId ],\n\t\t\t\t\tsrcRootClientId: getBlockRootClientId( clientId ),\n\t\t\t\t} );\n\t\t\t\tevent.dataTransfer.effectAllowed = 'move'; // remove \"+\" cursor\n\t\t\t\tevent.dataTransfer.clearData();\n\t\t\t\tevent.dataTransfer.setData( 'wp-blocks', data );\n\t\t\t\tconst { ownerDocument } = node;\n\t\t\t\tconst { defaultView } = ownerDocument;\n\t\t\t\tconst selection = defaultView.getSelection();\n\t\t\t\tselection.removeAllRanges();\n\n\t\t\t\t// Setting the drag chip as the drag image actually works, but\n\t\t\t\t// the behaviour is slightly different in every browser. In\n\t\t\t\t// Safari, it animates, in Firefox it's slightly transparent...\n\t\t\t\t// So we set a fake drag image and have to reposition it\n\t\t\t\t// ourselves.\n\t\t\t\tconst dragElement = ownerDocument.createElement( 'div' );\n\t\t\t\t// Chrome will show a globe icon if the drag element does not\n\t\t\t\t// have dimensions.\n\t\t\t\tdragElement.style.width = '1px';\n\t\t\t\tdragElement.style.height = '1px';\n\t\t\t\tdragElement.style.position = 'fixed';\n\t\t\t\tdragElement.style.visibility = 'hidden';\n\t\t\t\townerDocument.body.appendChild( dragElement );\n\t\t\t\tevent.dataTransfer.setDragImage( dragElement, 0, 0 );\n\n\t\t\t\tconst rect = node.getBoundingClientRect();\n\n\t\t\t\t// Remove the id and leave it on a shallow clone so that drop\n\t\t\t\t// target calculations are correct.\n\t\t\t\tconst id = node.id;\n\t\t\t\tconst clone = node.cloneNode();\n\t\t\t\tclone.style.display = 'none';\n\t\t\t\tnode.id = null;\n\t\t\t\tnode.after( clone );\n\n\t\t\t\tlet _scale = 1;\n\n\t\t\t\t{\n\t\t\t\t\tlet parentElement = node;\n\t\t\t\t\twhile ( ( parentElement = parentElement.parentElement ) ) {\n\t\t\t\t\t\tconst { scale } =\n\t\t\t\t\t\t\tdefaultView.getComputedStyle( parentElement );\n\t\t\t\t\t\tif ( scale && scale !== 'none' ) {\n\t\t\t\t\t\t\t_scale = parseFloat( scale );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tconst inverted = 1 / _scale;\n\n\t\t\t\tconst originalNodeProperties = {};\n\t\t\t\tfor ( const property of [\n\t\t\t\t\t'transform',\n\t\t\t\t\t'transformOrigin',\n\t\t\t\t\t'transition',\n\t\t\t\t\t'zIndex',\n\t\t\t\t\t'position',\n\t\t\t\t\t'top',\n\t\t\t\t\t'left',\n\t\t\t\t\t'pointerEvents',\n\t\t\t\t\t'opacity',\n\t\t\t\t\t'backgroundColor',\n\t\t\t\t] ) {\n\t\t\t\t\toriginalNodeProperties[ property ] = node.style[ property ];\n\t\t\t\t}\n\n\t\t\t\t// Get scroll position.\n\t\t\t\tconst originScrollTop = defaultView.scrollY;\n\t\t\t\tconst originScrollLeft = defaultView.scrollX;\n\t\t\t\tconst originClientX = event.clientX;\n\t\t\t\tconst originClientY = event.clientY;\n\n\t\t\t\t// We can't use position fixed because it will behave different\n\t\t\t\t// if the html element is scaled or transformed (position will\n\t\t\t\t// no longer be relative to the viewport). The downside of\n\t\t\t\t// relative is that we have to listen to scroll events. On the\n\t\t\t\t// upside we don't have to clone to keep a space. Absolute\n\t\t\t\t// positioning might be weird because it will be based on the\n\t\t\t\t// positioned parent, but it might be worth a try.\n\t\t\t\tnode.style.position = 'relative';\n\t\t\t\tnode.style.top = `${ 0 }px`;\n\t\t\t\tnode.style.left = `${ 0 }px`;\n\n\t\t\t\tconst originX = event.clientX - rect.left;\n\t\t\t\tconst originY = event.clientY - rect.top;\n\n\t\t\t\t// Scale everything to 200px.\n\t\t\t\tconst dragScale = rect.height > 200 ? 200 / rect.height : 1;\n\n\t\t\t\tnode.style.zIndex = '1000';\n\t\t\t\tnode.style.transformOrigin = `${ originX * inverted }px ${\n\t\t\t\t\toriginY * inverted\n\t\t\t\t}px`;\n\t\t\t\tnode.style.transition = 'transform 0.2s ease-out';\n\t\t\t\tnode.style.transform = `scale(${ dragScale })`;\n\t\t\t\tnode.style.opacity = '0.9';\n\n\t\t\t\t// If the block has no background color, use the parent's\n\t\t\t\t// background color.\n\t\t\t\tif (\n\t\t\t\t\tisColorTransparent(\n\t\t\t\t\t\tdefaultView.getComputedStyle( node ).backgroundColor\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\tlet bgColor = 'transparent';\n\t\t\t\t\tlet parentElement = node;\n\t\t\t\t\twhile ( ( parentElement = parentElement.parentElement ) ) {\n\t\t\t\t\t\tconst { backgroundColor } =\n\t\t\t\t\t\t\tdefaultView.getComputedStyle( parentElement );\n\t\t\t\t\t\tif ( ! isColorTransparent( backgroundColor ) ) {\n\t\t\t\t\t\t\tbgColor = backgroundColor;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tnode.style.backgroundColor = bgColor;\n\t\t\t\t}\n\n\t\t\t\tlet hasStarted = false;\n\t\t\t\tlet lastClientX = originClientX;\n\t\t\t\tlet lastClientY = originClientY;\n\n\t\t\t\tfunction dragOver( e ) {\n\t\t\t\t\t// Only trigger `over` if the mouse has moved.\n\t\t\t\t\tif (\n\t\t\t\t\t\te.clientX === lastClientX &&\n\t\t\t\t\t\te.clientY === lastClientY\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tlastClientX = e.clientX;\n\t\t\t\t\tlastClientY = e.clientY;\n\t\t\t\t\tover();\n\t\t\t\t}\n\n\t\t\t\tfunction over() {\n\t\t\t\t\tif ( ! hasStarted ) {\n\t\t\t\t\t\thasStarted = true;\n\t\t\t\t\t\tnode.style.pointerEvents = 'none';\n\t\t\t\t\t}\n\t\t\t\t\tconst pointerYDelta = lastClientY - originClientY;\n\t\t\t\t\tconst pointerXDelta = lastClientX - originClientX;\n\t\t\t\t\tconst scrollTop = defaultView.scrollY;\n\t\t\t\t\tconst scrollLeft = defaultView.scrollX;\n\t\t\t\t\tconst scrollTopDelta = scrollTop - originScrollTop;\n\t\t\t\t\tconst scrollLeftDelta = scrollLeft - originScrollLeft;\n\t\t\t\t\tconst topDelta = pointerYDelta + scrollTopDelta;\n\t\t\t\t\tconst leftDelta = pointerXDelta + scrollLeftDelta;\n\t\t\t\t\tnode.style.top = `${ topDelta * inverted }px`;\n\t\t\t\t\tnode.style.left = `${ leftDelta * inverted }px`;\n\t\t\t\t}\n\n\t\t\t\tfunction end() {\n\t\t\t\t\townerDocument.removeEventListener( 'dragover', dragOver );\n\t\t\t\t\townerDocument.removeEventListener( 'dragend', end );\n\t\t\t\t\townerDocument.removeEventListener( 'drop', end );\n\t\t\t\t\townerDocument.removeEventListener( 'scroll', over );\n\t\t\t\t\tfor ( const [ property, value ] of Object.entries(\n\t\t\t\t\t\toriginalNodeProperties\n\t\t\t\t\t) ) {\n\t\t\t\t\t\tnode.style[ property ] = value;\n\t\t\t\t\t}\n\t\t\t\t\tclone.remove();\n\t\t\t\t\tnode.id = id;\n\t\t\t\t\tdragElement.remove();\n\t\t\t\t\tstopDraggingBlocks();\n\t\t\t\t\tdocument.body.classList.remove(\n\t\t\t\t\t\t'is-dragging-components-draggable'\n\t\t\t\t\t);\n\t\t\t\t\townerDocument.documentElement.classList.remove(\n\t\t\t\t\t\t'is-dragging'\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\townerDocument.addEventListener( 'dragover', dragOver );\n\t\t\t\townerDocument.addEventListener( 'dragend', end );\n\t\t\t\townerDocument.addEventListener( 'drop', end );\n\t\t\t\townerDocument.addEventListener( 'scroll', over );\n\n\t\t\t\tstartDraggingBlocks( [ clientId ] );\n\t\t\t\t// Important because it hides the block toolbar.\n\t\t\t\tdocument.body.classList.add(\n\t\t\t\t\t'is-dragging-components-draggable'\n\t\t\t\t);\n\t\t\t\townerDocument.documentElement.classList.add( 'is-dragging' );\n\t\t\t}\n\n\t\t\tnode.addEventListener( 'keydown', onKeyDown );\n\t\t\tnode.addEventListener( 'dragstart', onDragStart );\n\n\t\t\t/**\n\t\t\t * Handles double-click events on section blocks to edit content only section.\n\t\t\t *\n\t\t\t * @param {MouseEvent} event Double-click event.\n\t\t\t */\n\t\t\tfunction onDoubleClick( event ) {\n\t\t\t\tconst isSection = isSectionBlock( clientId );\n\t\t\t\tconst block = getBlock( clientId );\n\t\t\t\tconst isSyncedPattern = isReusableBlock( block );\n\t\t\t\tconst isTemplatePartBlock = isTemplatePart( block );\n\t\t\t\tconst isAlreadyEditing = editedContentOnlySection === clientId;\n\n\t\t\t\tif (\n\t\t\t\t\t! isSection ||\n\t\t\t\t\tisAlreadyEditing ||\n\t\t\t\t\tisSyncedPattern ||\n\t\t\t\t\tisTemplatePartBlock\n\t\t\t\t) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tevent.preventDefault();\n\t\t\t\teditContentOnlySection( clientId );\n\t\t\t}\n\n\t\t\tnode.addEventListener( 'dblclick', onDoubleClick );\n\n\t\t\treturn () => {\n\t\t\t\tnode.removeEventListener( 'keydown', onKeyDown );\n\t\t\t\tnode.removeEventListener( 'dragstart', onDragStart );\n\t\t\t\tnode.removeEventListener( 'dblclick', onDoubleClick );\n\t\t\t};\n\t\t},\n\t\t[\n\t\t\tclientId,\n\t\t\tisSelected,\n\t\t\tgetBlockRootClientId,\n\t\t\tgetBlock,\n\t\t\tisReusableBlock,\n\t\t\tisTemplatePart,\n\t\t\tinsertAfterBlock,\n\t\t\tremoveBlock,\n\t\t\tisZoomOut,\n\t\t\tresetZoomLevel,\n\t\t\thasMultiSelection,\n\t\t\tstartDraggingBlocks,\n\t\t\tstopDraggingBlocks,\n\t\t\tisSectionBlock,\n\t\t\teditedContentOnlySection,\n\t\t\teditContentOnlySection,\n\t\t]\n\t);\n}\n"],
5
+ "mappings": "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",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/block-list/use-in-between-inserter.js"],
4
- "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useRefEffect } from '@wordpress/compose';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useContext } from '@wordpress/element';\nimport { isRTL } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\nimport { InsertionPointOpenRef } from '../block-tools/insertion-point';\nimport { unlock } from '../../lock-unlock';\n\nexport function useInBetweenInserter() {\n\tconst openRef = useContext( InsertionPointOpenRef );\n\tconst isInBetweenInserterDisabled = useSelect( ( select ) => {\n\t\tconst settings = select( blockEditorStore ).getSettings();\n\t\treturn (\n\t\t\tsettings.isDistractionFree ||\n\t\t\tsettings.isPreviewMode ||\n\t\t\tunlock( select( blockEditorStore ) ).isZoomOut()\n\t\t);\n\t}, [] );\n\tconst {\n\t\tgetBlockListSettings,\n\t\tgetBlockIndex,\n\t\tisMultiSelecting,\n\t\tgetSelectedBlockClientIds,\n\t\tgetSettings,\n\t\tgetTemplateLock,\n\t\t__unstableIsWithinBlockOverlay,\n\t\tgetBlockEditingMode,\n\t\tgetBlockName,\n\t\tgetBlockAttributes,\n\t\tgetParentSectionBlock,\n\t} = unlock( useSelect( blockEditorStore ) );\n\tconst { showInsertionPoint, hideInsertionPoint } =\n\t\tuseDispatch( blockEditorStore );\n\n\treturn useRefEffect(\n\t\t( node ) => {\n\t\t\tif ( isInBetweenInserterDisabled ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfunction onMouseMove( event ) {\n\t\t\t\t// openRef is the reference to the insertion point between blocks.\n\t\t\t\t// If the reference is not set or the insertion point is already open, return.\n\t\t\t\tif ( openRef === undefined || openRef.current ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Ignore text nodes sometimes detected in FireFox.\n\t\t\t\tif ( event.target.nodeType === event.target.TEXT_NODE ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( isMultiSelecting() ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\t! event.target.classList.contains(\n\t\t\t\t\t\t'block-editor-block-list__layout'\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\thideInsertionPoint();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tlet rootClientId;\n\t\t\t\tif (\n\t\t\t\t\t! event.target.classList.contains( 'is-root-container' )\n\t\t\t\t) {\n\t\t\t\t\tconst blockElement = !! event.target.getAttribute(\n\t\t\t\t\t\t'data-block'\n\t\t\t\t\t)\n\t\t\t\t\t\t? event.target\n\t\t\t\t\t\t: event.target.closest( '[data-block]' );\n\t\t\t\t\trootClientId = blockElement.getAttribute( 'data-block' );\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\tgetTemplateLock( rootClientId ) ||\n\t\t\t\t\tgetBlockEditingMode( rootClientId ) === 'disabled' ||\n\t\t\t\t\tgetBlockName( rootClientId ) === 'core/block' ||\n\t\t\t\t\t( rootClientId &&\n\t\t\t\t\t\tgetBlockAttributes( rootClientId ).layout\n\t\t\t\t\t\t\t?.isManualPlacement )\n\t\t\t\t) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst blockListSettings = getBlockListSettings( rootClientId );\n\t\t\t\tconst orientation =\n\t\t\t\t\tblockListSettings?.orientation || 'vertical';\n\t\t\t\tconst captureToolbars =\n\t\t\t\t\t!! blockListSettings?.__experimentalCaptureToolbars;\n\t\t\t\tconst offsetTop = event.clientY;\n\t\t\t\tconst offsetLeft = event.clientX;\n\n\t\t\t\tconst children = Array.from( event.target.children );\n\t\t\t\tlet element = children.find( ( blockEl ) => {\n\t\t\t\t\tconst blockElRect = blockEl.getBoundingClientRect();\n\t\t\t\t\treturn (\n\t\t\t\t\t\t( blockEl.classList.contains( 'wp-block' ) &&\n\t\t\t\t\t\t\torientation === 'vertical' &&\n\t\t\t\t\t\t\tblockElRect.top > offsetTop ) ||\n\t\t\t\t\t\t( blockEl.classList.contains( 'wp-block' ) &&\n\t\t\t\t\t\t\torientation === 'horizontal' &&\n\t\t\t\t\t\t\t( isRTL()\n\t\t\t\t\t\t\t\t? blockElRect.right < offsetLeft\n\t\t\t\t\t\t\t\t: blockElRect.left > offsetLeft ) )\n\t\t\t\t\t);\n\t\t\t\t} );\n\n\t\t\t\tif ( ! element ) {\n\t\t\t\t\thideInsertionPoint();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// The block may be in an alignment wrapper, so check the first direct\n\t\t\t\t// child if the element has no ID.\n\t\t\t\tif ( ! element.id ) {\n\t\t\t\t\telement = element.firstElementChild;\n\n\t\t\t\t\tif ( ! element ) {\n\t\t\t\t\t\thideInsertionPoint();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Don't show the insertion point if a parent block has an \"overlay\"\n\t\t\t\t// See https://github.com/WordPress/gutenberg/pull/34012#pullrequestreview-727762337\n\t\t\t\tconst clientId = element.id.slice( 'block-'.length );\n\t\t\t\tif (\n\t\t\t\t\t! clientId ||\n\t\t\t\t\t__unstableIsWithinBlockOverlay( clientId ) ||\n\t\t\t\t\t!! getParentSectionBlock( clientId )\n\t\t\t\t) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Don't show the inserter if the following conditions are met,\n\t\t\t\t// as it conflicts with the block toolbar:\n\t\t\t\t// 1. when hovering above or inside selected block(s)\n\t\t\t\t// 2. when the orientation is vertical\n\t\t\t\t// 3. when the __experimentalCaptureToolbars is not enabled\n\t\t\t\t// 4. when the Top Toolbar is not disabled\n\t\t\t\tif (\n\t\t\t\t\tgetSelectedBlockClientIds().includes( clientId ) &&\n\t\t\t\t\torientation === 'vertical' &&\n\t\t\t\t\t! captureToolbars &&\n\t\t\t\t\t! getSettings().hasFixedToolbar\n\t\t\t\t) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst elementRect = element.getBoundingClientRect();\n\n\t\t\t\tif (\n\t\t\t\t\t( orientation === 'horizontal' &&\n\t\t\t\t\t\t( event.clientY > elementRect.bottom ||\n\t\t\t\t\t\t\tevent.clientY < elementRect.top ) ) ||\n\t\t\t\t\t( orientation === 'vertical' &&\n\t\t\t\t\t\t( event.clientX > elementRect.right ||\n\t\t\t\t\t\t\tevent.clientX < elementRect.left ) )\n\t\t\t\t) {\n\t\t\t\t\thideInsertionPoint();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst index = getBlockIndex( clientId );\n\n\t\t\t\t// Don't show the in-between inserter before the first block in\n\t\t\t\t// the list (preserves the original behaviour).\n\t\t\t\tif ( index === 0 ) {\n\t\t\t\t\thideInsertionPoint();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tshowInsertionPoint( rootClientId, index, {\n\t\t\t\t\t__unstableWithInserter: true,\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tnode.addEventListener( 'mousemove', onMouseMove );\n\n\t\t\treturn () => {\n\t\t\t\tnode.removeEventListener( 'mousemove', onMouseMove );\n\t\t\t};\n\t\t},\n\t\t[\n\t\t\topenRef,\n\t\t\tgetBlockListSettings,\n\t\t\tgetBlockIndex,\n\t\t\tisMultiSelecting,\n\t\t\tshowInsertionPoint,\n\t\t\thideInsertionPoint,\n\t\t\tgetSelectedBlockClientIds,\n\t\t\tisInBetweenInserterDisabled,\n\t\t]\n\t);\n}\n"],
5
- "mappings": ";AAGA,SAAS,oBAAoB;AAC7B,SAAS,WAAW,mBAAmB;AACvC,SAAS,kBAAkB;AAC3B,SAAS,aAAa;AAKtB,SAAS,SAAS,wBAAwB;AAC1C,SAAS,6BAA6B;AACtC,SAAS,cAAc;AAEhB,SAAS,uBAAuB;AACtC,QAAM,UAAU,WAAY,qBAAsB;AAClD,QAAM,8BAA8B,UAAW,CAAE,WAAY;AAC5D,UAAM,WAAW,OAAQ,gBAAiB,EAAE,YAAY;AACxD,WACC,SAAS,qBACT,SAAS,iBACT,OAAQ,OAAQ,gBAAiB,CAAE,EAAE,UAAU;AAAA,EAEjD,GAAG,CAAC,CAAE;AACN,QAAM;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD,IAAI,OAAQ,UAAW,gBAAiB,CAAE;AAC1C,QAAM,EAAE,oBAAoB,mBAAmB,IAC9C,YAAa,gBAAiB;AAE/B,SAAO;AAAA,IACN,CAAE,SAAU;AACX,UAAK,6BAA8B;AAClC;AAAA,MACD;AAEA,eAAS,YAAa,OAAQ;AAG7B,YAAK,YAAY,UAAa,QAAQ,SAAU;AAC/C;AAAA,QACD;AAGA,YAAK,MAAM,OAAO,aAAa,MAAM,OAAO,WAAY;AACvD;AAAA,QACD;AAEA,YAAK,iBAAiB,GAAI;AACzB;AAAA,QACD;AAEA,YACC,CAAE,MAAM,OAAO,UAAU;AAAA,UACxB;AAAA,QACD,GACC;AACD,6BAAmB;AACnB;AAAA,QACD;AAEA,YAAI;AACJ,YACC,CAAE,MAAM,OAAO,UAAU,SAAU,mBAAoB,GACtD;AACD,gBAAM,eAAe,CAAC,CAAE,MAAM,OAAO;AAAA,YACpC;AAAA,UACD,IACG,MAAM,SACN,MAAM,OAAO,QAAS,cAAe;AACxC,yBAAe,aAAa,aAAc,YAAa;AAAA,QACxD;AAEA,YACC,gBAAiB,YAAa,KAC9B,oBAAqB,YAAa,MAAM,cACxC,aAAc,YAAa,MAAM,gBAC/B,gBACD,mBAAoB,YAAa,EAAE,QAChC,mBACH;AACD;AAAA,QACD;AAEA,cAAM,oBAAoB,qBAAsB,YAAa;AAC7D,cAAM,cACL,mBAAmB,eAAe;AACnC,cAAM,kBACL,CAAC,CAAE,mBAAmB;AACvB,cAAM,YAAY,MAAM;AACxB,cAAM,aAAa,MAAM;AAEzB,cAAM,WAAW,MAAM,KAAM,MAAM,OAAO,QAAS;AACnD,YAAI,UAAU,SAAS,KAAM,CAAE,YAAa;AAC3C,gBAAM,cAAc,QAAQ,sBAAsB;AAClD,iBACG,QAAQ,UAAU,SAAU,UAAW,KACxC,gBAAgB,cAChB,YAAY,MAAM,aACjB,QAAQ,UAAU,SAAU,UAAW,KACxC,gBAAgB,iBACd,MAAM,IACL,YAAY,QAAQ,aACpB,YAAY,OAAO;AAAA,QAEzB,CAAE;AAEF,YAAK,CAAE,SAAU;AAChB,6BAAmB;AACnB;AAAA,QACD;AAIA,YAAK,CAAE,QAAQ,IAAK;AACnB,oBAAU,QAAQ;AAElB,cAAK,CAAE,SAAU;AAChB,+BAAmB;AACnB;AAAA,UACD;AAAA,QACD;AAIA,cAAM,WAAW,QAAQ,GAAG,MAAO,SAAS,MAAO;AACnD,YACC,CAAE,YACF,+BAAgC,QAAS,KACzC,CAAC,CAAE,sBAAuB,QAAS,GAClC;AACD;AAAA,QACD;AAQA,YACC,0BAA0B,EAAE,SAAU,QAAS,KAC/C,gBAAgB,cAChB,CAAE,mBACF,CAAE,YAAY,EAAE,iBACf;AACD;AAAA,QACD;AACA,cAAM,cAAc,QAAQ,sBAAsB;AAElD,YACG,gBAAgB,iBACf,MAAM,UAAU,YAAY,UAC7B,MAAM,UAAU,YAAY,QAC5B,gBAAgB,eACf,MAAM,UAAU,YAAY,SAC7B,MAAM,UAAU,YAAY,OAC7B;AACD,6BAAmB;AACnB;AAAA,QACD;AAEA,cAAM,QAAQ,cAAe,QAAS;AAItC,YAAK,UAAU,GAAI;AAClB,6BAAmB;AACnB;AAAA,QACD;AAEA,2BAAoB,cAAc,OAAO;AAAA,UACxC,wBAAwB;AAAA,QACzB,CAAE;AAAA,MACH;AAEA,WAAK,iBAAkB,aAAa,WAAY;AAEhD,aAAO,MAAM;AACZ,aAAK,oBAAqB,aAAa,WAAY;AAAA,MACpD;AAAA,IACD;AAAA,IACA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACD;AAAA,EACD;AACD;",
4
+ "sourcesContent": ["import { useRefEffect } from '@wordpress/compose';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useContext } from '@wordpress/element';\nimport { isRTL } from '@wordpress/i18n';\nimport { store as blockEditorStore } from '../../store';\nimport { InsertionPointOpenRef } from '../block-tools/insertion-point';\nimport { unlock } from '../../lock-unlock';\n\nexport function useInBetweenInserter() {\n\tconst openRef = useContext( InsertionPointOpenRef );\n\tconst isInBetweenInserterDisabled = useSelect( ( select ) => {\n\t\tconst settings = select( blockEditorStore ).getSettings();\n\t\treturn (\n\t\t\tsettings.isDistractionFree ||\n\t\t\tsettings.isPreviewMode ||\n\t\t\tunlock( select( blockEditorStore ) ).isZoomOut()\n\t\t);\n\t}, [] );\n\tconst {\n\t\tgetBlockListSettings,\n\t\tgetBlockIndex,\n\t\tisMultiSelecting,\n\t\tgetSelectedBlockClientIds,\n\t\tgetSettings,\n\t\tgetTemplateLock,\n\t\t__unstableIsWithinBlockOverlay,\n\t\tgetBlockEditingMode,\n\t\tgetBlockName,\n\t\tgetBlockAttributes,\n\t\tgetParentSectionBlock,\n\t} = unlock( useSelect( blockEditorStore ) );\n\tconst { showInsertionPoint, hideInsertionPoint } =\n\t\tuseDispatch( blockEditorStore );\n\n\treturn useRefEffect(\n\t\t( node ) => {\n\t\t\tif ( isInBetweenInserterDisabled ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfunction onMouseMove( event ) {\n\t\t\t\t// openRef is the reference to the insertion point between blocks.\n\t\t\t\t// If the reference is not set or the insertion point is already open, return.\n\t\t\t\tif ( openRef === undefined || openRef.current ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Ignore text nodes sometimes detected in FireFox.\n\t\t\t\tif ( event.target.nodeType === event.target.TEXT_NODE ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( isMultiSelecting() ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\t! event.target.classList.contains(\n\t\t\t\t\t\t'block-editor-block-list__layout'\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\thideInsertionPoint();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tlet rootClientId;\n\t\t\t\tif (\n\t\t\t\t\t! event.target.classList.contains( 'is-root-container' )\n\t\t\t\t) {\n\t\t\t\t\tconst blockElement = !! event.target.getAttribute(\n\t\t\t\t\t\t'data-block'\n\t\t\t\t\t)\n\t\t\t\t\t\t? event.target\n\t\t\t\t\t\t: event.target.closest( '[data-block]' );\n\t\t\t\t\trootClientId = blockElement.getAttribute( 'data-block' );\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\tgetTemplateLock( rootClientId ) ||\n\t\t\t\t\tgetBlockEditingMode( rootClientId ) === 'disabled' ||\n\t\t\t\t\tgetBlockName( rootClientId ) === 'core/block' ||\n\t\t\t\t\t( rootClientId &&\n\t\t\t\t\t\tgetBlockAttributes( rootClientId ).layout\n\t\t\t\t\t\t\t?.isManualPlacement )\n\t\t\t\t) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst blockListSettings = getBlockListSettings( rootClientId );\n\t\t\t\tconst orientation =\n\t\t\t\t\tblockListSettings?.orientation || 'vertical';\n\t\t\t\tconst captureToolbars =\n\t\t\t\t\t!! blockListSettings?.__experimentalCaptureToolbars;\n\t\t\t\tconst offsetTop = event.clientY;\n\t\t\t\tconst offsetLeft = event.clientX;\n\n\t\t\t\tconst children = Array.from( event.target.children );\n\t\t\t\tlet element = children.find( ( blockEl ) => {\n\t\t\t\t\tconst blockElRect = blockEl.getBoundingClientRect();\n\t\t\t\t\treturn (\n\t\t\t\t\t\t( blockEl.classList.contains( 'wp-block' ) &&\n\t\t\t\t\t\t\torientation === 'vertical' &&\n\t\t\t\t\t\t\tblockElRect.top > offsetTop ) ||\n\t\t\t\t\t\t( blockEl.classList.contains( 'wp-block' ) &&\n\t\t\t\t\t\t\torientation === 'horizontal' &&\n\t\t\t\t\t\t\t( isRTL()\n\t\t\t\t\t\t\t\t? blockElRect.right < offsetLeft\n\t\t\t\t\t\t\t\t: blockElRect.left > offsetLeft ) )\n\t\t\t\t\t);\n\t\t\t\t} );\n\n\t\t\t\tif ( ! element ) {\n\t\t\t\t\thideInsertionPoint();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// The block may be in an alignment wrapper, so check the first direct\n\t\t\t\t// child if the element has no ID.\n\t\t\t\tif ( ! element.id ) {\n\t\t\t\t\telement = element.firstElementChild;\n\n\t\t\t\t\tif ( ! element ) {\n\t\t\t\t\t\thideInsertionPoint();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Don't show the insertion point if a parent block has an \"overlay\"\n\t\t\t\t// See https://github.com/WordPress/gutenberg/pull/34012#pullrequestreview-727762337\n\t\t\t\tconst clientId = element.id.slice( 'block-'.length );\n\t\t\t\tif (\n\t\t\t\t\t! clientId ||\n\t\t\t\t\t__unstableIsWithinBlockOverlay( clientId ) ||\n\t\t\t\t\t!! getParentSectionBlock( clientId )\n\t\t\t\t) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Don't show the inserter if the following conditions are met,\n\t\t\t\t// as it conflicts with the block toolbar:\n\t\t\t\t// 1. when hovering above or inside selected block(s)\n\t\t\t\t// 2. when the orientation is vertical\n\t\t\t\t// 3. when the __experimentalCaptureToolbars is not enabled\n\t\t\t\t// 4. when the Top Toolbar is not disabled\n\t\t\t\tif (\n\t\t\t\t\tgetSelectedBlockClientIds().includes( clientId ) &&\n\t\t\t\t\torientation === 'vertical' &&\n\t\t\t\t\t! captureToolbars &&\n\t\t\t\t\t! getSettings().hasFixedToolbar\n\t\t\t\t) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst elementRect = element.getBoundingClientRect();\n\n\t\t\t\tif (\n\t\t\t\t\t( orientation === 'horizontal' &&\n\t\t\t\t\t\t( event.clientY > elementRect.bottom ||\n\t\t\t\t\t\t\tevent.clientY < elementRect.top ) ) ||\n\t\t\t\t\t( orientation === 'vertical' &&\n\t\t\t\t\t\t( event.clientX > elementRect.right ||\n\t\t\t\t\t\t\tevent.clientX < elementRect.left ) )\n\t\t\t\t) {\n\t\t\t\t\thideInsertionPoint();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst index = getBlockIndex( clientId );\n\n\t\t\t\t// Don't show the in-between inserter before the first block in\n\t\t\t\t// the list (preserves the original behaviour).\n\t\t\t\tif ( index === 0 ) {\n\t\t\t\t\thideInsertionPoint();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tshowInsertionPoint( rootClientId, index, {\n\t\t\t\t\t__unstableWithInserter: true,\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tnode.addEventListener( 'mousemove', onMouseMove );\n\n\t\t\treturn () => {\n\t\t\t\tnode.removeEventListener( 'mousemove', onMouseMove );\n\t\t\t};\n\t\t},\n\t\t[\n\t\t\topenRef,\n\t\t\tgetBlockListSettings,\n\t\t\tgetBlockIndex,\n\t\t\tisMultiSelecting,\n\t\t\tshowInsertionPoint,\n\t\t\thideInsertionPoint,\n\t\t\tgetSelectedBlockClientIds,\n\t\t\tisInBetweenInserterDisabled,\n\t\t]\n\t);\n}\n"],
5
+ "mappings": "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",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/block-list/zoom-out-separator.js"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\t__unstableMotion as motion,\n\t__unstableAnimatePresence as AnimatePresence,\n} from '@wordpress/components';\nimport { useReducedMotion } from '@wordpress/compose';\nimport { useSelect } from '@wordpress/data';\nimport { useState } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nexport function ZoomOutSeparator( {\n\tclientId,\n\trootClientId = '',\n\tposition = 'top',\n} ) {\n\tconst [ isDraggedOver, setIsDraggedOver ] = useState( false );\n\tconst {\n\t\tsectionRootClientId,\n\t\tsectionClientIds,\n\t\tinsertionPoint,\n\t\tblockInsertionPointVisible,\n\t\tblockInsertionPoint,\n\t\tblocksBeingDragged,\n\t} = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetInsertionPoint,\n\t\t\tgetBlockOrder,\n\t\t\tgetSectionRootClientId,\n\t\t\tisBlockInsertionPointVisible,\n\t\t\tgetBlockInsertionPoint,\n\t\t\tgetDraggedBlockClientIds,\n\t\t} = unlock( select( blockEditorStore ) );\n\n\t\tconst root = getSectionRootClientId();\n\t\tconst sectionRootClientIds = getBlockOrder( root );\n\t\treturn {\n\t\t\tsectionRootClientId: root,\n\t\t\tsectionClientIds: sectionRootClientIds,\n\t\t\tinsertionPoint: getInsertionPoint(),\n\t\t\tblockInsertionPoint: getBlockInsertionPoint(),\n\t\t\tblockInsertionPointVisible: isBlockInsertionPointVisible(),\n\t\t\tblocksBeingDragged: getDraggedBlockClientIds(),\n\t\t};\n\t}, [] );\n\n\tconst isReducedMotion = useReducedMotion();\n\n\tif ( ! clientId ) {\n\t\treturn;\n\t}\n\n\tlet isVisible = false;\n\n\tconst isSectionBlock =\n\t\trootClientId === sectionRootClientId &&\n\t\tsectionClientIds &&\n\t\tsectionClientIds.includes( clientId );\n\n\tif ( ! isSectionBlock ) {\n\t\treturn null;\n\t}\n\n\tconst hasTopInsertionPoint =\n\t\tinsertionPoint?.index === 0 &&\n\t\tclientId === sectionClientIds[ insertionPoint.index ];\n\tconst hasBottomInsertionPoint =\n\t\tinsertionPoint &&\n\t\tinsertionPoint.hasOwnProperty( 'index' ) &&\n\t\tclientId === sectionClientIds[ insertionPoint.index - 1 ];\n\n\t// We want to show the zoom out separator in either of these conditions:\n\t// 1. If the inserter has an insertion index set\n\t// 2. We are dragging a pattern over an insertion point\n\tif ( position === 'top' ) {\n\t\tisVisible =\n\t\t\thasTopInsertionPoint ||\n\t\t\t( blockInsertionPointVisible &&\n\t\t\t\tblockInsertionPoint.index === 0 &&\n\t\t\t\tclientId === sectionClientIds[ blockInsertionPoint.index ] );\n\t}\n\n\tif ( position === 'bottom' ) {\n\t\tisVisible =\n\t\t\thasBottomInsertionPoint ||\n\t\t\t( blockInsertionPointVisible &&\n\t\t\t\tclientId ===\n\t\t\t\t\tsectionClientIds[ blockInsertionPoint.index - 1 ] );\n\t}\n\n\tconst blockBeingDraggedClientId = blocksBeingDragged[ 0 ];\n\n\tconst isCurrentBlockBeingDragged = blocksBeingDragged.includes( clientId );\n\n\tconst blockBeingDraggedIndex = sectionClientIds.indexOf(\n\t\tblockBeingDraggedClientId\n\t);\n\tconst blockBeingDraggedPreviousSiblingClientId =\n\t\tblockBeingDraggedIndex > 0\n\t\t\t? sectionClientIds[ blockBeingDraggedIndex - 1 ]\n\t\t\t: null;\n\n\tconst isCurrentBlockPreviousSiblingOfBlockBeingDragged =\n\t\tblockBeingDraggedPreviousSiblingClientId === clientId;\n\n\t// The separators are visually top/bottom of the block, but in actual fact\n\t// the \"top\" separator is the \"bottom\" separator of the previous block.\n\t// Therefore, this logic hides the separator if the current block is being dragged\n\t// or if the current block is the previous sibling of the block being dragged.\n\tif (\n\t\tisCurrentBlockBeingDragged ||\n\t\tisCurrentBlockPreviousSiblingOfBlockBeingDragged\n\t) {\n\t\tisVisible = false;\n\t}\n\n\treturn (\n\t\t<AnimatePresence>\n\t\t\t{ isVisible && (\n\t\t\t\t<motion.div\n\t\t\t\t\tinitial={ { height: 0 } }\n\t\t\t\t\tanimate={ {\n\t\t\t\t\t\t// Use a height equal to that of the zoom out frame size.\n\t\t\t\t\t\theight: 'calc(1 * var(--wp-block-editor-iframe-zoom-out-frame-size) / var(--wp-block-editor-iframe-zoom-out-scale)',\n\t\t\t\t\t} }\n\t\t\t\t\texit={ { height: 0 } }\n\t\t\t\t\ttransition={ {\n\t\t\t\t\t\ttype: 'tween',\n\t\t\t\t\t\tduration: isReducedMotion ? 0 : 0.2,\n\t\t\t\t\t\tease: [ 0.6, 0, 0.4, 1 ],\n\t\t\t\t\t} }\n\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t'block-editor-block-list__zoom-out-separator',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'is-dragged-over': isDraggedOver,\n\t\t\t\t\t\t}\n\t\t\t\t\t) }\n\t\t\t\t\tdata-is-insertion-point=\"true\"\n\t\t\t\t\tonDragOver={ () => setIsDraggedOver( true ) }\n\t\t\t\t\tonDragLeave={ () => setIsDraggedOver( false ) }\n\t\t\t\t>\n\t\t\t\t\t<motion.div\n\t\t\t\t\t\tinitial={ { opacity: 0 } }\n\t\t\t\t\t\tanimate={ { opacity: 1 } }\n\t\t\t\t\t\texit={ { opacity: 0, transition: { delay: -0.125 } } }\n\t\t\t\t\t\ttransition={ {\n\t\t\t\t\t\t\tease: 'linear',\n\t\t\t\t\t\t\tduration: 0.1,\n\t\t\t\t\t\t\tdelay: 0.125,\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Drop pattern.' ) }\n\t\t\t\t\t</motion.div>\n\t\t\t\t</motion.div>\n\t\t\t) }\n\t\t</AnimatePresence>\n\t);\n}\n"],
5
- "mappings": "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",
4
+ "sourcesContent": ["import clsx from 'clsx';\nimport {\n\t__unstableMotion as motion,\n\t__unstableAnimatePresence as AnimatePresence,\n} from '@wordpress/components';\nimport { useReducedMotion } from '@wordpress/compose';\nimport { useSelect } from '@wordpress/data';\nimport { useState } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { store as blockEditorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nexport function ZoomOutSeparator( {\n\tclientId,\n\trootClientId = '',\n\tposition = 'top',\n} ) {\n\tconst [ isDraggedOver, setIsDraggedOver ] = useState( false );\n\tconst {\n\t\tsectionRootClientId,\n\t\tsectionClientIds,\n\t\tinsertionPoint,\n\t\tblockInsertionPointVisible,\n\t\tblockInsertionPoint,\n\t\tblocksBeingDragged,\n\t} = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetInsertionPoint,\n\t\t\tgetBlockOrder,\n\t\t\tgetSectionRootClientId,\n\t\t\tisBlockInsertionPointVisible,\n\t\t\tgetBlockInsertionPoint,\n\t\t\tgetDraggedBlockClientIds,\n\t\t} = unlock( select( blockEditorStore ) );\n\n\t\tconst root = getSectionRootClientId();\n\t\tconst sectionRootClientIds = getBlockOrder( root );\n\t\treturn {\n\t\t\tsectionRootClientId: root,\n\t\t\tsectionClientIds: sectionRootClientIds,\n\t\t\tinsertionPoint: getInsertionPoint(),\n\t\t\tblockInsertionPoint: getBlockInsertionPoint(),\n\t\t\tblockInsertionPointVisible: isBlockInsertionPointVisible(),\n\t\t\tblocksBeingDragged: getDraggedBlockClientIds(),\n\t\t};\n\t}, [] );\n\n\tconst isReducedMotion = useReducedMotion();\n\n\tif ( ! clientId ) {\n\t\treturn;\n\t}\n\n\tlet isVisible = false;\n\n\tconst isSectionBlock =\n\t\trootClientId === sectionRootClientId &&\n\t\tsectionClientIds &&\n\t\tsectionClientIds.includes( clientId );\n\n\tif ( ! isSectionBlock ) {\n\t\treturn null;\n\t}\n\n\tconst hasTopInsertionPoint =\n\t\tinsertionPoint?.index === 0 &&\n\t\tclientId === sectionClientIds[ insertionPoint.index ];\n\tconst hasBottomInsertionPoint =\n\t\tinsertionPoint &&\n\t\tinsertionPoint.hasOwnProperty( 'index' ) &&\n\t\tclientId === sectionClientIds[ insertionPoint.index - 1 ];\n\n\t// We want to show the zoom out separator in either of these conditions:\n\t// 1. If the inserter has an insertion index set\n\t// 2. We are dragging a pattern over an insertion point\n\tif ( position === 'top' ) {\n\t\tisVisible =\n\t\t\thasTopInsertionPoint ||\n\t\t\t( blockInsertionPointVisible &&\n\t\t\t\tblockInsertionPoint.index === 0 &&\n\t\t\t\tclientId === sectionClientIds[ blockInsertionPoint.index ] );\n\t}\n\n\tif ( position === 'bottom' ) {\n\t\tisVisible =\n\t\t\thasBottomInsertionPoint ||\n\t\t\t( blockInsertionPointVisible &&\n\t\t\t\tclientId ===\n\t\t\t\t\tsectionClientIds[ blockInsertionPoint.index - 1 ] );\n\t}\n\n\tconst blockBeingDraggedClientId = blocksBeingDragged[ 0 ];\n\n\tconst isCurrentBlockBeingDragged = blocksBeingDragged.includes( clientId );\n\n\tconst blockBeingDraggedIndex = sectionClientIds.indexOf(\n\t\tblockBeingDraggedClientId\n\t);\n\tconst blockBeingDraggedPreviousSiblingClientId =\n\t\tblockBeingDraggedIndex > 0\n\t\t\t? sectionClientIds[ blockBeingDraggedIndex - 1 ]\n\t\t\t: null;\n\n\tconst isCurrentBlockPreviousSiblingOfBlockBeingDragged =\n\t\tblockBeingDraggedPreviousSiblingClientId === clientId;\n\n\t// The separators are visually top/bottom of the block, but in actual fact\n\t// the \"top\" separator is the \"bottom\" separator of the previous block.\n\t// Therefore, this logic hides the separator if the current block is being dragged\n\t// or if the current block is the previous sibling of the block being dragged.\n\tif (\n\t\tisCurrentBlockBeingDragged ||\n\t\tisCurrentBlockPreviousSiblingOfBlockBeingDragged\n\t) {\n\t\tisVisible = false;\n\t}\n\n\treturn (\n\t\t<AnimatePresence>\n\t\t\t{ isVisible && (\n\t\t\t\t<motion.div\n\t\t\t\t\tinitial={ { height: 0 } }\n\t\t\t\t\tanimate={ {\n\t\t\t\t\t\t// Use a height equal to that of the zoom out frame size.\n\t\t\t\t\t\theight: 'calc(1 * var(--wp-block-editor-iframe-zoom-out-frame-size) / var(--wp-block-editor-iframe-zoom-out-scale)',\n\t\t\t\t\t} }\n\t\t\t\t\texit={ { height: 0 } }\n\t\t\t\t\ttransition={ {\n\t\t\t\t\t\ttype: 'tween',\n\t\t\t\t\t\tduration: isReducedMotion ? 0 : 0.2,\n\t\t\t\t\t\tease: [ 0.6, 0, 0.4, 1 ],\n\t\t\t\t\t} }\n\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t'block-editor-block-list__zoom-out-separator',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'is-dragged-over': isDraggedOver,\n\t\t\t\t\t\t}\n\t\t\t\t\t) }\n\t\t\t\t\tdata-is-insertion-point=\"true\"\n\t\t\t\t\tonDragOver={ () => setIsDraggedOver( true ) }\n\t\t\t\t\tonDragLeave={ () => setIsDraggedOver( false ) }\n\t\t\t\t>\n\t\t\t\t\t<motion.div\n\t\t\t\t\t\tinitial={ { opacity: 0 } }\n\t\t\t\t\t\tanimate={ { opacity: 1 } }\n\t\t\t\t\t\texit={ { opacity: 0, transition: { delay: -0.125 } } }\n\t\t\t\t\t\ttransition={ {\n\t\t\t\t\t\t\tease: 'linear',\n\t\t\t\t\t\t\tduration: 0.1,\n\t\t\t\t\t\t\tdelay: 0.125,\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Drop pattern.' ) }\n\t\t\t\t\t</motion.div>\n\t\t\t\t</motion.div>\n\t\t\t) }\n\t\t</AnimatePresence>\n\t);\n}\n"],
5
+ "mappings": "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",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/block-list-appender/index.js"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { getDefaultBlockName } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport DefaultBlockAppender from '../default-block-appender';\nimport ButtonBlockAppender from '../button-block-appender';\nimport { store as blockEditorStore } from '../../store';\n\nfunction DefaultAppender( { rootClientId } ) {\n\tconst canInsertDefaultBlock = useSelect( ( select ) =>\n\t\tselect( blockEditorStore ).canInsertBlockType(\n\t\t\tgetDefaultBlockName(),\n\t\t\trootClientId\n\t\t)\n\t);\n\n\tif ( canInsertDefaultBlock ) {\n\t\t// Render the default block appender if the context supports use\n\t\t// of the default appender.\n\t\treturn <DefaultBlockAppender rootClientId={ rootClientId } />;\n\t}\n\n\t// Fallback in case the default block can't be inserted.\n\treturn (\n\t\t<ButtonBlockAppender\n\t\t\trootClientId={ rootClientId }\n\t\t\tclassName=\"block-list-appender__toggle\"\n\t\t/>\n\t);\n}\n\nexport default function BlockListAppender( {\n\trootClientId,\n\tCustomAppender,\n\tclassName,\n\ttagName: TagName = 'div',\n} ) {\n\tconst isDragOver = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlockInsertionPoint,\n\t\t\t\tisBlockInsertionPointVisible,\n\t\t\t\tgetBlockCount,\n\t\t\t} = select( blockEditorStore );\n\t\t\tconst insertionPoint = getBlockInsertionPoint();\n\t\t\t// Ideally we should also check for `isDragging` but currently it\n\t\t\t// requires a lot more setup. We can revisit this once we refactor\n\t\t\t// the DnD utility hooks.\n\t\t\treturn (\n\t\t\t\tisBlockInsertionPointVisible() &&\n\t\t\t\trootClientId === insertionPoint?.rootClientId &&\n\t\t\t\tgetBlockCount( rootClientId ) === 0\n\t\t\t);\n\t\t},\n\t\t[ rootClientId ]\n\t);\n\n\treturn (\n\t\t<TagName\n\t\t\t// A `tabIndex` is used on the wrapping `div` element in order to\n\t\t\t// force a focus event to occur when an appender `button` element\n\t\t\t// is clicked. In some browsers (Firefox, Safari), button clicks do\n\t\t\t// not emit a focus event, which could cause this event to propagate\n\t\t\t// unexpectedly. The `tabIndex` ensures that the interaction is\n\t\t\t// captured as a focus, without also adding an extra tab stop.\n\t\t\t//\n\t\t\t// See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#Clicking_and_focus\n\t\t\ttabIndex={ -1 }\n\t\t\tclassName={ clsx( 'block-list-appender wp-block', className, {\n\t\t\t\t'is-drag-over': isDragOver,\n\t\t\t} ) }\n\t\t\t// Needed in case the whole editor is content editable (for multi\n\t\t\t// selection). It fixes an edge case where ArrowDown and ArrowRight\n\t\t\t// should collapse the selection to the end of that selection and\n\t\t\t// not into the appender.\n\t\t\tcontentEditable={ false }\n\t\t\t// The appender exists to let you add the first Paragraph before\n\t\t\t// any is inserted. To that end, this appender should visually be\n\t\t\t// presented as a block. That means theme CSS should style it as if\n\t\t\t// it were an empty paragraph block. That means a `wp-block` class to\n\t\t\t// ensure the width is correct, and a [data-block] attribute to ensure\n\t\t\t// the correct margin is applied, especially for classic themes which\n\t\t\t// have commonly targeted that attribute for margins.\n\t\t\tdata-block\n\t\t>\n\t\t\t{ CustomAppender ? (\n\t\t\t\t<CustomAppender />\n\t\t\t) : (\n\t\t\t\t<DefaultAppender rootClientId={ rootClientId } />\n\t\t\t) }\n\t\t</TagName>\n\t);\n}\n"],
5
- "mappings": ";AAGA,OAAO,UAAU;AAKjB,SAAS,iBAAiB;AAC1B,SAAS,2BAA2B;AAKpC,OAAO,0BAA0B;AACjC,OAAO,yBAAyB;AAChC,SAAS,SAAS,wBAAwB;AAajC;AAXT,SAAS,gBAAiB,EAAE,aAAa,GAAI;AAC5C,QAAM,wBAAwB;AAAA,IAAW,CAAE,WAC1C,OAAQ,gBAAiB,EAAE;AAAA,MAC1B,oBAAoB;AAAA,MACpB;AAAA,IACD;AAAA,EACD;AAEA,MAAK,uBAAwB;AAG5B,WAAO,oBAAC,wBAAqB,cAA8B;AAAA,EAC5D;AAGA,SACC;AAAA,IAAC;AAAA;AAAA,MACA;AAAA,MACA,WAAU;AAAA;AAAA,EACX;AAEF;AAEe,SAAR,kBAAoC;AAAA,EAC1C;AAAA,EACA;AAAA,EACA;AAAA,EACA,SAAS,UAAU;AACpB,GAAI;AACH,QAAM,aAAa;AAAA,IAClB,CAAE,WAAY;AACb,YAAM;AAAA,QACL;AAAA,QACA;AAAA,QACA;AAAA,MACD,IAAI,OAAQ,gBAAiB;AAC7B,YAAM,iBAAiB,uBAAuB;AAI9C,aACC,6BAA6B,KAC7B,iBAAiB,gBAAgB,gBACjC,cAAe,YAAa,MAAM;AAAA,IAEpC;AAAA,IACA,CAAE,YAAa;AAAA,EAChB;AAEA,SACC;AAAA,IAAC;AAAA;AAAA,MASA,UAAW;AAAA,MACX,WAAY,KAAM,gCAAgC,WAAW;AAAA,QAC5D,gBAAgB;AAAA,MACjB,CAAE;AAAA,MAKF,iBAAkB;AAAA,MAQlB,cAAU;AAAA,MAER,2BACD,oBAAC,kBAAe,IAEhB,oBAAC,mBAAgB,cAA8B;AAAA;AAAA,EAEjD;AAEF;",
4
+ "sourcesContent": ["import clsx from 'clsx';\nimport { useSelect } from '@wordpress/data';\nimport { getDefaultBlockName } from '@wordpress/blocks';\nimport DefaultBlockAppender from '../default-block-appender';\nimport ButtonBlockAppender from '../button-block-appender';\nimport { store as blockEditorStore } from '../../store';\n\nfunction DefaultAppender( { rootClientId } ) {\n\tconst canInsertDefaultBlock = useSelect( ( select ) =>\n\t\tselect( blockEditorStore ).canInsertBlockType(\n\t\t\tgetDefaultBlockName(),\n\t\t\trootClientId\n\t\t)\n\t);\n\n\tif ( canInsertDefaultBlock ) {\n\t\t// Render the default block appender if the context supports use\n\t\t// of the default appender.\n\t\treturn <DefaultBlockAppender rootClientId={ rootClientId } />;\n\t}\n\n\t// Fallback in case the default block can't be inserted.\n\treturn (\n\t\t<ButtonBlockAppender\n\t\t\trootClientId={ rootClientId }\n\t\t\tclassName=\"block-list-appender__toggle\"\n\t\t/>\n\t);\n}\n\nexport default function BlockListAppender( {\n\trootClientId,\n\tCustomAppender,\n\tclassName,\n\ttagName: TagName = 'div',\n} ) {\n\tconst isDragOver = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlockInsertionPoint,\n\t\t\t\tisBlockInsertionPointVisible,\n\t\t\t\tgetBlockCount,\n\t\t\t} = select( blockEditorStore );\n\t\t\tconst insertionPoint = getBlockInsertionPoint();\n\t\t\t// Ideally we should also check for `isDragging` but currently it\n\t\t\t// requires a lot more setup. We can revisit this once we refactor\n\t\t\t// the DnD utility hooks.\n\t\t\treturn (\n\t\t\t\tisBlockInsertionPointVisible() &&\n\t\t\t\trootClientId === insertionPoint?.rootClientId &&\n\t\t\t\tgetBlockCount( rootClientId ) === 0\n\t\t\t);\n\t\t},\n\t\t[ rootClientId ]\n\t);\n\n\treturn (\n\t\t<TagName\n\t\t\t// A `tabIndex` is used on the wrapping `div` element in order to\n\t\t\t// force a focus event to occur when an appender `button` element\n\t\t\t// is clicked. In some browsers (Firefox, Safari), button clicks do\n\t\t\t// not emit a focus event, which could cause this event to propagate\n\t\t\t// unexpectedly. The `tabIndex` ensures that the interaction is\n\t\t\t// captured as a focus, without also adding an extra tab stop.\n\t\t\t//\n\t\t\t// See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#Clicking_and_focus\n\t\t\ttabIndex={ -1 }\n\t\t\tclassName={ clsx( 'block-list-appender wp-block', className, {\n\t\t\t\t'is-drag-over': isDragOver,\n\t\t\t} ) }\n\t\t\t// Needed in case the whole editor is content editable (for multi\n\t\t\t// selection). It fixes an edge case where ArrowDown and ArrowRight\n\t\t\t// should collapse the selection to the end of that selection and\n\t\t\t// not into the appender.\n\t\t\tcontentEditable={ false }\n\t\t\t// The appender exists to let you add the first Paragraph before\n\t\t\t// any is inserted. To that end, this appender should visually be\n\t\t\t// presented as a block. That means theme CSS should style it as if\n\t\t\t// it were an empty paragraph block. That means a `wp-block` class to\n\t\t\t// ensure the width is correct, and a [data-block] attribute to ensure\n\t\t\t// the correct margin is applied, especially for classic themes which\n\t\t\t// have commonly targeted that attribute for margins.\n\t\t\tdata-block\n\t\t>\n\t\t\t{ CustomAppender ? (\n\t\t\t\t<CustomAppender />\n\t\t\t) : (\n\t\t\t\t<DefaultAppender rootClientId={ rootClientId } />\n\t\t\t) }\n\t\t</TagName>\n\t);\n}\n"],
5
+ "mappings": ";AAAA,OAAO,UAAU;AACjB,SAAS,iBAAiB;AAC1B,SAAS,2BAA2B;AACpC,OAAO,0BAA0B;AACjC,OAAO,yBAAyB;AAChC,SAAS,SAAS,wBAAwB;AAajC;AAXT,SAAS,gBAAiB,EAAE,aAAa,GAAI;AAC5C,QAAM,wBAAwB;AAAA,IAAW,CAAE,WAC1C,OAAQ,gBAAiB,EAAE;AAAA,MAC1B,oBAAoB;AAAA,MACpB;AAAA,IACD;AAAA,EACD;AAEA,MAAK,uBAAwB;AAG5B,WAAO,oBAAC,wBAAqB,cAA8B;AAAA,EAC5D;AAGA,SACC;AAAA,IAAC;AAAA;AAAA,MACA;AAAA,MACA,WAAU;AAAA;AAAA,EACX;AAEF;AAEe,SAAR,kBAAoC;AAAA,EAC1C;AAAA,EACA;AAAA,EACA;AAAA,EACA,SAAS,UAAU;AACpB,GAAI;AACH,QAAM,aAAa;AAAA,IAClB,CAAE,WAAY;AACb,YAAM;AAAA,QACL;AAAA,QACA;AAAA,QACA;AAAA,MACD,IAAI,OAAQ,gBAAiB;AAC7B,YAAM,iBAAiB,uBAAuB;AAI9C,aACC,6BAA6B,KAC7B,iBAAiB,gBAAgB,gBACjC,cAAe,YAAa,MAAM;AAAA,IAEpC;AAAA,IACA,CAAE,YAAa;AAAA,EAChB;AAEA,SACC;AAAA,IAAC;AAAA;AAAA,MASA,UAAW;AAAA,MACX,WAAY,KAAM,gCAAgC,WAAW;AAAA,QAC5D,gBAAgB;AAAA,MACjB,CAAE;AAAA,MAKF,iBAAkB;AAAA,MAQlB,cAAU;AAAA,MAER,2BACD,oBAAC,kBAAe,IAEhB,oBAAC,mBAAgB,cAA8B;AAAA;AAAA,EAEjD;AAEF;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/block-lock/menu-item.js"],
4
- "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useReducer } from '@wordpress/element';\nimport { MenuItem } from '@wordpress/components';\nimport { lockOutline, unlock } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport useBlockLock from './use-block-lock';\nimport BlockLockModal from './modal';\n\nexport default function BlockLockMenuItem( { clientId } ) {\n\tconst { canLock, isLocked } = useBlockLock( clientId );\n\n\tconst [ isModalOpen, toggleModal ] = useReducer(\n\t\t( isActive ) => ! isActive,\n\t\tfalse\n\t);\n\n\tif ( ! canLock ) {\n\t\treturn null;\n\t}\n\n\tconst label = isLocked ? __( 'Unlock' ) : __( 'Lock' );\n\n\treturn (\n\t\t<>\n\t\t\t<MenuItem\n\t\t\t\ticon={ isLocked ? unlock : lockOutline }\n\t\t\t\tonClick={ toggleModal }\n\t\t\t\taria-expanded={ isModalOpen }\n\t\t\t\taria-haspopup=\"dialog\"\n\t\t\t>\n\t\t\t\t{ label }\n\t\t\t</MenuItem>\n\t\t\t{ isModalOpen && (\n\t\t\t\t<BlockLockModal clientId={ clientId } onClose={ toggleModal } />\n\t\t\t) }\n\t\t</>\n\t);\n}\n"],
5
- "mappings": ";AAGA,SAAS,UAAU;AACnB,SAAS,kBAAkB;AAC3B,SAAS,gBAAgB;AACzB,SAAS,aAAa,cAAc;AAKpC,OAAO,kBAAkB;AACzB,OAAO,oBAAoB;AAiBzB,mBACC,KADD;AAfa,SAAR,kBAAoC,EAAE,SAAS,GAAI;AACzD,QAAM,EAAE,SAAS,SAAS,IAAI,aAAc,QAAS;AAErD,QAAM,CAAE,aAAa,WAAY,IAAI;AAAA,IACpC,CAAE,aAAc,CAAE;AAAA,IAClB;AAAA,EACD;AAEA,MAAK,CAAE,SAAU;AAChB,WAAO;AAAA,EACR;AAEA,QAAM,QAAQ,WAAW,GAAI,QAAS,IAAI,GAAI,MAAO;AAErD,SACC,iCACC;AAAA;AAAA,MAAC;AAAA;AAAA,QACA,MAAO,WAAW,SAAS;AAAA,QAC3B,SAAU;AAAA,QACV,iBAAgB;AAAA,QAChB,iBAAc;AAAA,QAEZ;AAAA;AAAA,IACH;AAAA,IACE,eACD,oBAAC,kBAAe,UAAsB,SAAU,aAAc;AAAA,KAEhE;AAEF;",
4
+ "sourcesContent": ["import { __ } from '@wordpress/i18n';\nimport { useReducer } from '@wordpress/element';\nimport { MenuItem } from '@wordpress/components';\nimport { lockOutline, unlock } from '@wordpress/icons';\nimport useBlockLock from './use-block-lock';\nimport BlockLockModal from './modal';\n\nexport default function BlockLockMenuItem( { clientId } ) {\n\tconst { canLock, isLocked } = useBlockLock( clientId );\n\n\tconst [ isModalOpen, toggleModal ] = useReducer(\n\t\t( isActive ) => ! isActive,\n\t\tfalse\n\t);\n\n\tif ( ! canLock ) {\n\t\treturn null;\n\t}\n\n\tconst label = isLocked ? __( 'Unlock' ) : __( 'Lock' );\n\n\treturn (\n\t\t<>\n\t\t\t<MenuItem\n\t\t\t\ticon={ isLocked ? unlock : lockOutline }\n\t\t\t\tonClick={ toggleModal }\n\t\t\t\taria-expanded={ isModalOpen }\n\t\t\t\taria-haspopup=\"dialog\"\n\t\t\t>\n\t\t\t\t{ label }\n\t\t\t</MenuItem>\n\t\t\t{ isModalOpen && (\n\t\t\t\t<BlockLockModal clientId={ clientId } onClose={ toggleModal } />\n\t\t\t) }\n\t\t</>\n\t);\n}\n"],
5
+ "mappings": ";AAAA,SAAS,UAAU;AACnB,SAAS,kBAAkB;AAC3B,SAAS,gBAAgB;AACzB,SAAS,aAAa,cAAc;AACpC,OAAO,kBAAkB;AACzB,OAAO,oBAAoB;AAiBzB,mBACC,KADD;AAfa,SAAR,kBAAoC,EAAE,SAAS,GAAI;AACzD,QAAM,EAAE,SAAS,SAAS,IAAI,aAAc,QAAS;AAErD,QAAM,CAAE,aAAa,WAAY,IAAI;AAAA,IACpC,CAAE,aAAc,CAAE;AAAA,IAClB;AAAA,EACD;AAEA,MAAK,CAAE,SAAU;AAChB,WAAO;AAAA,EACR;AAEA,QAAM,QAAQ,WAAW,GAAI,QAAS,IAAI,GAAI,MAAO;AAErD,SACC,iCACC;AAAA;AAAA,MAAC;AAAA;AAAA,QACA,MAAO,WAAW,SAAS;AAAA,QAC3B,SAAU;AAAA,QACV,iBAAgB;AAAA,QAChB,iBAAc;AAAA,QAEZ;AAAA;AAAA,IACH;AAAA,IACE,eACD,oBAAC,kBAAe,UAAsB,SAAU,aAAc;AAAA,KAEhE;AAEF;",
6
6
  "names": []
7
7
  }