@wordpress/block-editor 17.0.0 → 17.1.1-next.v.202609031004.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 (1802) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/build/autocompleters/block.cjs +1 -1
  3. package/build/autocompleters/block.cjs.map +1 -1
  4. package/build/components/alignment-control/index.cjs +1 -1
  5. package/build/components/alignment-control/index.cjs.map +1 -1
  6. package/build/components/alignment-control/ui.cjs +1 -1
  7. package/build/components/alignment-control/ui.cjs.map +1 -1
  8. package/build/components/autocomplete/index.cjs +1 -1
  9. package/build/components/autocomplete/index.cjs.map +1 -1
  10. package/build/components/background-image-control/index.cjs +19 -2
  11. package/build/components/background-image-control/index.cjs.map +3 -3
  12. package/build/components/block-alignment-control/index.cjs +1 -1
  13. package/build/components/block-alignment-control/index.cjs.map +1 -1
  14. package/build/components/block-alignment-control/ui.cjs +1 -1
  15. package/build/components/block-alignment-control/ui.cjs.map +1 -1
  16. package/build/components/block-alignment-matrix-control/index.cjs +1 -1
  17. package/build/components/block-alignment-matrix-control/index.cjs.map +1 -1
  18. package/build/components/block-allowed-blocks/allowed-blocks-control.cjs +1 -1
  19. package/build/components/block-allowed-blocks/allowed-blocks-control.cjs.map +1 -1
  20. package/build/components/block-allowed-blocks/modal.cjs +1 -1
  21. package/build/components/block-allowed-blocks/modal.cjs.map +1 -1
  22. package/build/components/block-bindings/attribute-control.cjs +1 -1
  23. package/build/components/block-bindings/attribute-control.cjs.map +1 -1
  24. package/build/components/block-bindings/source-fields-list.cjs +1 -1
  25. package/build/components/block-bindings/source-fields-list.cjs.map +1 -1
  26. package/build/components/block-breadcrumb/index.cjs +1 -1
  27. package/build/components/block-breadcrumb/index.cjs.map +1 -1
  28. package/build/components/block-canvas/index.cjs +1 -1
  29. package/build/components/block-canvas/index.cjs.map +1 -1
  30. package/build/components/block-card/index.cjs +1 -1
  31. package/build/components/block-card/index.cjs.map +1 -1
  32. package/build/components/block-compare/block-view.cjs +1 -1
  33. package/build/components/block-compare/block-view.cjs.map +1 -1
  34. package/build/components/block-compare/index.cjs +1 -1
  35. package/build/components/block-compare/index.cjs.map +1 -1
  36. package/build/components/block-context/index.cjs +1 -1
  37. package/build/components/block-context/index.cjs.map +1 -1
  38. package/build/components/block-controls/fill.cjs +1 -1
  39. package/build/components/block-controls/fill.cjs.map +1 -1
  40. package/build/components/block-controls/index.cjs +1 -1
  41. package/build/components/block-controls/index.cjs.map +1 -1
  42. package/build/components/block-controls/slot.cjs +1 -1
  43. package/build/components/block-controls/slot.cjs.map +1 -1
  44. package/build/components/block-draggable/draggable-chip.cjs +1 -1
  45. package/build/components/block-draggable/draggable-chip.cjs.map +1 -1
  46. package/build/components/block-draggable/index.cjs +1 -1
  47. package/build/components/block-draggable/index.cjs.map +1 -1
  48. package/build/components/block-edit/edit.cjs +1 -1
  49. package/build/components/block-edit/edit.cjs.map +2 -2
  50. package/build/components/block-edit/index.cjs +1 -1
  51. package/build/components/block-edit/index.cjs.map +1 -1
  52. package/build/components/block-edit/multiple-usage-warning.cjs +1 -1
  53. package/build/components/block-edit/multiple-usage-warning.cjs.map +1 -1
  54. package/build/components/block-edit-visually-button/index.cjs +1 -1
  55. package/build/components/block-edit-visually-button/index.cjs.map +1 -1
  56. package/build/components/block-full-height-alignment-control/index.cjs +1 -1
  57. package/build/components/block-full-height-alignment-control/index.cjs.map +1 -1
  58. package/build/components/block-heading-level-dropdown/heading-level-icon.cjs +1 -1
  59. package/build/components/block-heading-level-dropdown/heading-level-icon.cjs.map +1 -1
  60. package/build/components/block-heading-level-dropdown/index.cjs +1 -1
  61. package/build/components/block-heading-level-dropdown/index.cjs.map +1 -1
  62. package/build/components/block-icon/index.cjs +1 -1
  63. package/build/components/block-icon/index.cjs.map +1 -1
  64. package/build/components/block-inspector/edit-contents.cjs +1 -1
  65. package/build/components/block-inspector/edit-contents.cjs.map +1 -1
  66. package/build/components/block-inspector/index.cjs +8 -16
  67. package/build/components/block-inspector/index.cjs.map +3 -3
  68. package/build/components/block-keyboard-shortcuts/index.cjs +1 -1
  69. package/build/components/block-keyboard-shortcuts/index.cjs.map +1 -1
  70. package/build/components/block-list/block-crash-warning.cjs +1 -1
  71. package/build/components/block-list/block-crash-warning.cjs.map +1 -1
  72. package/build/components/block-list/block-html.cjs +1 -1
  73. package/build/components/block-list/block-html.cjs.map +1 -1
  74. package/build/components/block-list/block-invalid-warning.cjs +1 -1
  75. package/build/components/block-list/block-invalid-warning.cjs.map +1 -1
  76. package/build/components/block-list/block.cjs +1 -1
  77. package/build/components/block-list/block.cjs.map +1 -1
  78. package/build/components/block-list/index.cjs +1 -1
  79. package/build/components/block-list/index.cjs.map +1 -1
  80. package/build/components/block-list/layout.cjs +1 -1
  81. package/build/components/block-list/layout.cjs.map +1 -1
  82. package/build/components/block-list/subdirectory-icon.cjs +1 -1
  83. package/build/components/block-list/subdirectory-icon.cjs.map +1 -1
  84. package/build/components/block-list/use-block-props/use-is-hovered.cjs +17 -4
  85. package/build/components/block-list/use-block-props/use-is-hovered.cjs.map +2 -2
  86. package/build/components/block-list/zoom-out-separator.cjs +1 -1
  87. package/build/components/block-list/zoom-out-separator.cjs.map +1 -1
  88. package/build/components/block-list-appender/index.cjs +1 -1
  89. package/build/components/block-list-appender/index.cjs.map +1 -1
  90. package/build/components/block-lock/menu-item.cjs +1 -1
  91. package/build/components/block-lock/menu-item.cjs.map +1 -1
  92. package/build/components/block-lock/modal.cjs +1 -1
  93. package/build/components/block-lock/modal.cjs.map +1 -1
  94. package/build/components/block-lock/toolbar.cjs +1 -1
  95. package/build/components/block-lock/toolbar.cjs.map +1 -1
  96. package/build/components/block-manager/category.cjs +1 -1
  97. package/build/components/block-manager/category.cjs.map +1 -1
  98. package/build/components/block-manager/checklist.cjs +1 -1
  99. package/build/components/block-manager/checklist.cjs.map +1 -1
  100. package/build/components/block-manager/index.cjs +1 -1
  101. package/build/components/block-manager/index.cjs.map +1 -1
  102. package/build/components/block-mover/button.cjs +1 -1
  103. package/build/components/block-mover/button.cjs.map +1 -1
  104. package/build/components/block-mover/index.cjs +1 -1
  105. package/build/components/block-mover/index.cjs.map +1 -1
  106. package/build/components/block-navigation/dropdown.cjs +1 -1
  107. package/build/components/block-navigation/dropdown.cjs.map +1 -1
  108. package/build/components/block-parent-selector/index.cjs +1 -1
  109. package/build/components/block-parent-selector/index.cjs.map +1 -1
  110. package/build/components/block-pattern-setup/index.cjs +1 -1
  111. package/build/components/block-pattern-setup/index.cjs.map +1 -1
  112. package/build/components/block-pattern-setup/setup-toolbar.cjs +1 -1
  113. package/build/components/block-pattern-setup/setup-toolbar.cjs.map +1 -1
  114. package/build/components/block-patterns-list/index.cjs +1 -1
  115. package/build/components/block-patterns-list/index.cjs.map +1 -1
  116. package/build/components/block-patterns-paging/index.cjs +1 -1
  117. package/build/components/block-patterns-paging/index.cjs.map +1 -1
  118. package/build/components/block-popover/cover.cjs +1 -1
  119. package/build/components/block-popover/cover.cjs.map +1 -1
  120. package/build/components/block-popover/drop-zone.cjs +1 -1
  121. package/build/components/block-popover/drop-zone.cjs.map +1 -1
  122. package/build/components/block-popover/inbetween.cjs +1 -1
  123. package/build/components/block-popover/inbetween.cjs.map +1 -1
  124. package/build/components/block-popover/index.cjs +1 -1
  125. package/build/components/block-popover/index.cjs.map +1 -1
  126. package/build/components/block-preview/auto.cjs +1 -1
  127. package/build/components/block-preview/auto.cjs.map +1 -1
  128. package/build/components/block-preview/index.cjs +1 -1
  129. package/build/components/block-preview/index.cjs.map +1 -1
  130. package/build/components/block-quick-navigation/index.cjs +1 -1
  131. package/build/components/block-quick-navigation/index.cjs.map +1 -1
  132. package/build/components/block-removal-warning-modal/index.cjs +1 -1
  133. package/build/components/block-removal-warning-modal/index.cjs.map +1 -1
  134. package/build/components/block-rename/modal.cjs +1 -1
  135. package/build/components/block-rename/modal.cjs.map +1 -1
  136. package/build/components/block-rename/rename-control.cjs +1 -1
  137. package/build/components/block-rename/rename-control.cjs.map +1 -1
  138. package/build/components/block-selection-clearer/index.cjs +1 -1
  139. package/build/components/block-selection-clearer/index.cjs.map +1 -1
  140. package/build/components/block-settings-menu/block-html-convert-button.cjs +1 -1
  141. package/build/components/block-settings-menu/block-html-convert-button.cjs.map +1 -1
  142. package/build/components/block-settings-menu/block-mode-toggle.cjs +1 -1
  143. package/build/components/block-settings-menu/block-mode-toggle.cjs.map +1 -1
  144. package/build/components/block-settings-menu/block-parent-selector-menu-item.cjs +1 -1
  145. package/build/components/block-settings-menu/block-parent-selector-menu-item.cjs.map +1 -1
  146. package/build/components/block-settings-menu/block-settings-dropdown.cjs +1 -1
  147. package/build/components/block-settings-menu/block-settings-dropdown.cjs.map +1 -1
  148. package/build/components/block-settings-menu/index.cjs +1 -1
  149. package/build/components/block-settings-menu/index.cjs.map +1 -1
  150. package/build/components/block-settings-menu-controls/index.cjs +1 -1
  151. package/build/components/block-settings-menu-controls/index.cjs.map +1 -1
  152. package/build/components/block-styles/index.cjs +1 -1
  153. package/build/components/block-styles/index.cjs.map +1 -1
  154. package/build/components/block-styles/menu-items.cjs +1 -1
  155. package/build/components/block-styles/menu-items.cjs.map +1 -1
  156. package/build/components/block-switcher/block-styles-menu.cjs +1 -1
  157. package/build/components/block-switcher/block-styles-menu.cjs.map +1 -1
  158. package/build/components/block-switcher/block-transformations-menu.cjs +1 -1
  159. package/build/components/block-switcher/block-transformations-menu.cjs.map +1 -1
  160. package/build/components/block-switcher/block-variation-transformations.cjs +1 -1
  161. package/build/components/block-switcher/block-variation-transformations.cjs.map +1 -1
  162. package/build/components/block-switcher/index.cjs +1 -1
  163. package/build/components/block-switcher/index.cjs.map +1 -1
  164. package/build/components/block-switcher/pattern-transformations-menu.cjs +1 -1
  165. package/build/components/block-switcher/pattern-transformations-menu.cjs.map +1 -1
  166. package/build/components/block-switcher/preview-block-popover.cjs +1 -1
  167. package/build/components/block-switcher/preview-block-popover.cjs.map +1 -1
  168. package/build/components/block-toolbar/block-styles-dropdown.cjs +1 -1
  169. package/build/components/block-toolbar/block-styles-dropdown.cjs.map +1 -1
  170. package/build/components/block-toolbar/block-toolbar-icon.cjs +1 -1
  171. package/build/components/block-toolbar/block-toolbar-icon.cjs.map +1 -1
  172. package/build/components/block-toolbar/change-design.cjs +1 -1
  173. package/build/components/block-toolbar/change-design.cjs.map +1 -1
  174. package/build/components/block-toolbar/edit-section-button.cjs +1 -1
  175. package/build/components/block-toolbar/edit-section-button.cjs.map +1 -1
  176. package/build/components/block-toolbar/index.cjs +1 -1
  177. package/build/components/block-toolbar/index.cjs.map +1 -1
  178. package/build/components/block-toolbar/pattern-overrides-dropdown.cjs +1 -1
  179. package/build/components/block-toolbar/pattern-overrides-dropdown.cjs.map +1 -1
  180. package/build/components/block-toolbar/switch-section-style.cjs +1 -1
  181. package/build/components/block-toolbar/switch-section-style.cjs.map +1 -1
  182. package/build/components/block-tools/block-toolbar-popover.cjs +1 -1
  183. package/build/components/block-tools/block-toolbar-popover.cjs.map +1 -1
  184. package/build/components/block-tools/empty-block-inserter.cjs +1 -1
  185. package/build/components/block-tools/empty-block-inserter.cjs.map +1 -1
  186. package/build/components/block-tools/index.cjs +1 -1
  187. package/build/components/block-tools/index.cjs.map +1 -1
  188. package/build/components/block-tools/insertion-point.cjs +1 -1
  189. package/build/components/block-tools/insertion-point.cjs.map +1 -1
  190. package/build/components/block-tools/zoom-out-mode-inserter-button.cjs +1 -1
  191. package/build/components/block-tools/zoom-out-mode-inserter-button.cjs.map +1 -1
  192. package/build/components/block-tools/zoom-out-mode-inserters.cjs +1 -1
  193. package/build/components/block-tools/zoom-out-mode-inserters.cjs.map +1 -1
  194. package/build/components/block-types-list/index.cjs +1 -1
  195. package/build/components/block-types-list/index.cjs.map +1 -1
  196. package/build/components/block-variation-picker/index.cjs +1 -1
  197. package/build/components/block-variation-picker/index.cjs.map +1 -1
  198. package/build/components/block-variation-transforms/index.cjs +1 -1
  199. package/build/components/block-variation-transforms/index.cjs.map +1 -1
  200. package/build/components/block-vertical-alignment-control/index.cjs +1 -1
  201. package/build/components/block-vertical-alignment-control/index.cjs.map +1 -1
  202. package/build/components/block-vertical-alignment-control/ui.cjs +1 -1
  203. package/build/components/block-vertical-alignment-control/ui.cjs.map +1 -1
  204. package/build/components/block-visibility/constants.cjs.map +1 -1
  205. package/build/components/block-visibility/modal.cjs +1 -1
  206. package/build/components/block-visibility/modal.cjs.map +1 -1
  207. package/build/components/block-visibility/viewport-menu-item.cjs +1 -1
  208. package/build/components/block-visibility/viewport-menu-item.cjs.map +1 -1
  209. package/build/components/block-visibility/viewport-toolbar.cjs +1 -1
  210. package/build/components/block-visibility/viewport-toolbar.cjs.map +1 -1
  211. package/build/components/block-visibility/viewport-visibility-info.cjs +1 -1
  212. package/build/components/block-visibility/viewport-visibility-info.cjs.map +1 -1
  213. package/build/components/border-radius-control/index.cjs +1 -1
  214. package/build/components/border-radius-control/index.cjs.map +1 -1
  215. package/build/components/border-radius-control/linked-button.cjs +1 -1
  216. package/build/components/border-radius-control/linked-button.cjs.map +1 -1
  217. package/build/components/button-block-appender/index.cjs +1 -1
  218. package/build/components/button-block-appender/index.cjs.map +1 -1
  219. package/build/components/child-layout-control/index.cjs +1 -1
  220. package/build/components/child-layout-control/index.cjs.map +1 -1
  221. package/build/components/color-palette/control.cjs +1 -1
  222. package/build/components/color-palette/control.cjs.map +1 -1
  223. package/build/components/color-palette/with-color-context.cjs +1 -1
  224. package/build/components/color-palette/with-color-context.cjs.map +1 -1
  225. package/build/components/color-style-selector/index.cjs +1 -1
  226. package/build/components/color-style-selector/index.cjs.map +1 -1
  227. package/build/components/colors/with-colors.cjs +1 -1
  228. package/build/components/colors/with-colors.cjs.map +1 -1
  229. package/build/components/colors-gradients/control.cjs +1 -1
  230. package/build/components/colors-gradients/control.cjs.map +1 -1
  231. package/build/components/colors-gradients/dropdown.cjs +1 -1
  232. package/build/components/colors-gradients/dropdown.cjs.map +1 -1
  233. package/build/components/colors-gradients/panel-color-gradient-settings.cjs +1 -1
  234. package/build/components/colors-gradients/panel-color-gradient-settings.cjs.map +1 -1
  235. package/build/components/contrast-checker/index.cjs +1 -1
  236. package/build/components/contrast-checker/index.cjs.map +1 -1
  237. package/build/components/convert-to-group-buttons/index.cjs +1 -1
  238. package/build/components/convert-to-group-buttons/index.cjs.map +1 -1
  239. package/build/components/convert-to-group-buttons/toolbar.cjs +1 -1
  240. package/build/components/convert-to-group-buttons/toolbar.cjs.map +1 -1
  241. package/build/components/copy-handler/index.cjs +1 -1
  242. package/build/components/copy-handler/index.cjs.map +1 -1
  243. package/build/components/date-format-picker/index.cjs +1 -1
  244. package/build/components/date-format-picker/index.cjs.map +1 -1
  245. package/build/components/default-block-appender/index.cjs +1 -1
  246. package/build/components/default-block-appender/index.cjs.map +1 -1
  247. package/build/components/dimension-control/index.cjs +1 -1
  248. package/build/components/dimension-control/index.cjs.map +1 -1
  249. package/build/components/dimensions-tool/aspect-ratio-tool.cjs +1 -1
  250. package/build/components/dimensions-tool/aspect-ratio-tool.cjs.map +1 -1
  251. package/build/components/dimensions-tool/index.cjs +1 -1
  252. package/build/components/dimensions-tool/index.cjs.map +1 -1
  253. package/build/components/dimensions-tool/scale-tool.cjs +1 -1
  254. package/build/components/dimensions-tool/scale-tool.cjs.map +1 -1
  255. package/build/components/dimensions-tool/width-height-tool.cjs +1 -1
  256. package/build/components/dimensions-tool/width-height-tool.cjs.map +1 -1
  257. package/build/components/duotone-control/index.cjs +1 -1
  258. package/build/components/duotone-control/index.cjs.map +1 -1
  259. package/build/components/editable-text/index.cjs +1 -1
  260. package/build/components/editable-text/index.cjs.map +1 -1
  261. package/build/components/editor-styles/index.cjs +1 -1
  262. package/build/components/editor-styles/index.cjs.map +1 -1
  263. package/build/components/fit-text-size-warning/index.cjs +1 -1
  264. package/build/components/fit-text-size-warning/index.cjs.map +1 -1
  265. package/build/components/font-appearance-control/index.cjs +1 -1
  266. package/build/components/font-appearance-control/index.cjs.map +1 -1
  267. package/build/components/font-family/index.cjs +1 -1
  268. package/build/components/font-family/index.cjs.map +1 -1
  269. package/build/components/font-sizes/font-size-picker.cjs +1 -1
  270. package/build/components/font-sizes/font-size-picker.cjs.map +1 -1
  271. package/build/components/font-sizes/with-font-sizes.cjs +1 -1
  272. package/build/components/font-sizes/with-font-sizes.cjs.map +1 -1
  273. package/build/components/global-styles/advanced-panel.cjs +1 -1
  274. package/build/components/global-styles/advanced-panel.cjs.map +1 -1
  275. package/build/components/global-styles/background-panel.cjs +1 -1
  276. package/build/components/global-styles/background-panel.cjs.map +2 -2
  277. package/build/components/global-styles/border-panel.cjs +20 -43
  278. package/build/components/global-styles/border-panel.cjs.map +3 -3
  279. package/build/components/global-styles/color-gradient-dropdown-item.cjs +1 -1
  280. package/build/components/global-styles/color-gradient-dropdown-item.cjs.map +1 -1
  281. package/build/components/global-styles/color-panel.cjs +1 -1
  282. package/build/components/global-styles/color-panel.cjs.map +1 -1
  283. package/build/components/global-styles/dimensions-panel.cjs +1 -1
  284. package/build/components/global-styles/dimensions-panel.cjs.map +1 -1
  285. package/build/components/global-styles/filters-panel.cjs +1 -1
  286. package/build/components/global-styles/filters-panel.cjs.map +1 -1
  287. package/build/components/global-styles/image-settings-panel.cjs +1 -1
  288. package/build/components/global-styles/image-settings-panel.cjs.map +2 -2
  289. package/build/components/global-styles/inheritance/index.cjs +1 -1
  290. package/build/components/global-styles/inheritance/index.cjs.map +1 -1
  291. package/build/components/global-styles/shadow-panel-components.cjs +1 -1
  292. package/build/components/global-styles/shadow-panel-components.cjs.map +1 -1
  293. package/build/components/global-styles/state-control-badges.cjs +1 -1
  294. package/build/components/global-styles/state-control-badges.cjs.map +1 -1
  295. package/build/components/global-styles/state-control.cjs +1 -1
  296. package/build/components/global-styles/state-control.cjs.map +1 -1
  297. package/build/components/global-styles/typography-panel.cjs +1 -1
  298. package/build/components/global-styles/typography-panel.cjs.map +1 -1
  299. package/build/components/grid/grid-item-movers.cjs +1 -1
  300. package/build/components/grid/grid-item-movers.cjs.map +1 -1
  301. package/build/components/grid/grid-item-resizer.cjs +1 -1
  302. package/build/components/grid/grid-item-resizer.cjs.map +1 -1
  303. package/build/components/grid/grid-visualizer.cjs +1 -1
  304. package/build/components/grid/grid-visualizer.cjs.map +1 -1
  305. package/build/components/height-control/index.cjs +1 -1
  306. package/build/components/height-control/index.cjs.map +1 -1
  307. package/build/components/html-element-control/index.cjs +1 -1
  308. package/build/components/html-element-control/index.cjs.map +1 -1
  309. package/build/components/iframe/index.cjs +1 -1
  310. package/build/components/iframe/index.cjs.map +2 -2
  311. package/build/components/image-editor/aspect-ratio-dropdown.cjs +1 -1
  312. package/build/components/image-editor/aspect-ratio-dropdown.cjs.map +1 -1
  313. package/build/components/image-editor/context.cjs +1 -1
  314. package/build/components/image-editor/context.cjs.map +1 -1
  315. package/build/components/image-editor/cropper.cjs +1 -1
  316. package/build/components/image-editor/cropper.cjs.map +1 -1
  317. package/build/components/image-editor/form-controls.cjs +1 -1
  318. package/build/components/image-editor/form-controls.cjs.map +1 -1
  319. package/build/components/image-editor/index.cjs +1 -1
  320. package/build/components/image-editor/index.cjs.map +1 -1
  321. package/build/components/image-editor/rotation-button.cjs +1 -1
  322. package/build/components/image-editor/rotation-button.cjs.map +1 -1
  323. package/build/components/image-editor/zoom-dropdown.cjs +1 -1
  324. package/build/components/image-editor/zoom-dropdown.cjs.map +1 -1
  325. package/build/components/image-size-control/index.cjs +1 -1
  326. package/build/components/image-size-control/index.cjs.map +1 -1
  327. package/build/components/inner-blocks/button-block-appender.cjs +1 -1
  328. package/build/components/inner-blocks/button-block-appender.cjs.map +1 -1
  329. package/build/components/inner-blocks/default-block-appender.cjs +1 -1
  330. package/build/components/inner-blocks/default-block-appender.cjs.map +1 -1
  331. package/build/components/inner-blocks/index.cjs +1 -1
  332. package/build/components/inner-blocks/index.cjs.map +1 -1
  333. package/build/components/inner-content/index.cjs +1 -1
  334. package/build/components/inner-content/index.cjs.map +1 -1
  335. package/build/components/inserter/block-patterns-explorer/index.cjs +1 -1
  336. package/build/components/inserter/block-patterns-explorer/index.cjs.map +1 -1
  337. package/build/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.cjs +1 -1
  338. package/build/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.cjs.map +1 -1
  339. package/build/components/inserter/block-patterns-explorer/pattern-list.cjs +1 -1
  340. package/build/components/inserter/block-patterns-explorer/pattern-list.cjs.map +1 -1
  341. package/build/components/inserter/block-patterns-tab/index.cjs +1 -1
  342. package/build/components/inserter/block-patterns-tab/index.cjs.map +1 -1
  343. package/build/components/inserter/block-patterns-tab/pattern-category-previews.cjs +1 -1
  344. package/build/components/inserter/block-patterns-tab/pattern-category-previews.cjs.map +1 -1
  345. package/build/components/inserter/block-patterns-tab/patterns-filter.cjs +1 -1
  346. package/build/components/inserter/block-patterns-tab/patterns-filter.cjs.map +1 -1
  347. package/build/components/inserter/block-types-tab.cjs +1 -1
  348. package/build/components/inserter/block-types-tab.cjs.map +1 -1
  349. package/build/components/inserter/category-tabs/index.cjs +1 -1
  350. package/build/components/inserter/category-tabs/index.cjs.map +1 -1
  351. package/build/components/inserter/hooks/use-patterns-paging.cjs.map +1 -1
  352. package/build/components/inserter/index.cjs +1 -1
  353. package/build/components/inserter/index.cjs.map +1 -1
  354. package/build/components/inserter/library.cjs +1 -1
  355. package/build/components/inserter/library.cjs.map +1 -1
  356. package/build/components/inserter/media-tab/media-list.cjs +1 -1
  357. package/build/components/inserter/media-tab/media-list.cjs.map +1 -1
  358. package/build/components/inserter/media-tab/media-panel.cjs +1 -1
  359. package/build/components/inserter/media-tab/media-panel.cjs.map +1 -1
  360. package/build/components/inserter/media-tab/media-preview.cjs +1 -1
  361. package/build/components/inserter/media-tab/media-preview.cjs.map +1 -1
  362. package/build/components/inserter/media-tab/media-tab.cjs +1 -1
  363. package/build/components/inserter/media-tab/media-tab.cjs.map +1 -1
  364. package/build/components/inserter/media-tab/utils.cjs +1 -1
  365. package/build/components/inserter/media-tab/utils.cjs.map +1 -1
  366. package/build/components/inserter/menu.cjs +2 -2
  367. package/build/components/inserter/menu.cjs.map +3 -3
  368. package/build/components/inserter/mobile-tab-navigation.cjs +1 -1
  369. package/build/components/inserter/mobile-tab-navigation.cjs.map +1 -1
  370. package/build/components/inserter/no-results.cjs +1 -1
  371. package/build/components/inserter/no-results.cjs.map +1 -1
  372. package/build/components/inserter/panel.cjs +1 -1
  373. package/build/components/inserter/panel.cjs.map +1 -1
  374. package/build/components/inserter/preview-panel.cjs +1 -1
  375. package/build/components/inserter/preview-panel.cjs.map +1 -1
  376. package/build/components/inserter/quick-inserter.cjs +1 -1
  377. package/build/components/inserter/quick-inserter.cjs.map +1 -1
  378. package/build/components/inserter/search-results.cjs +1 -1
  379. package/build/components/inserter/search-results.cjs.map +1 -1
  380. package/build/components/inserter/tips.cjs +1 -1
  381. package/build/components/inserter/tips.cjs.map +1 -1
  382. package/build/components/inserter-draggable-blocks/index.cjs +1 -1
  383. package/build/components/inserter-draggable-blocks/index.cjs.map +2 -2
  384. package/build/components/inserter-list-item/index.cjs +1 -1
  385. package/build/components/inserter-list-item/index.cjs.map +1 -1
  386. package/build/components/inserter-listbox/group.cjs +1 -1
  387. package/build/components/inserter-listbox/group.cjs.map +1 -1
  388. package/build/components/inserter-listbox/index.cjs +1 -1
  389. package/build/components/inserter-listbox/index.cjs.map +1 -1
  390. package/build/components/inserter-listbox/item.cjs +1 -1
  391. package/build/components/inserter-listbox/item.cjs.map +1 -1
  392. package/build/components/inserter-listbox/row.cjs +1 -1
  393. package/build/components/inserter-listbox/row.cjs.map +1 -1
  394. package/build/components/inspector-controls/block-support-slot-container.cjs +1 -1
  395. package/build/components/inspector-controls/block-support-slot-container.cjs.map +1 -1
  396. package/build/components/inspector-controls/block-support-tools-panel.cjs +1 -1
  397. package/build/components/inspector-controls/block-support-tools-panel.cjs.map +1 -1
  398. package/build/components/inspector-controls/fill.cjs +1 -1
  399. package/build/components/inspector-controls/fill.cjs.map +1 -1
  400. package/build/components/inspector-controls/groups.cjs +3 -1
  401. package/build/components/inspector-controls/groups.cjs.map +2 -2
  402. package/build/components/inspector-controls/index.cjs +1 -1
  403. package/build/components/inspector-controls/index.cjs.map +1 -1
  404. package/build/components/inspector-controls/last-item.cjs +1 -1
  405. package/build/components/inspector-controls/last-item.cjs.map +1 -1
  406. package/build/components/inspector-controls/list-view-content-popover.cjs +1 -1
  407. package/build/components/inspector-controls/list-view-content-popover.cjs.map +1 -1
  408. package/build/components/inspector-controls/slot.cjs +1 -1
  409. package/build/components/inspector-controls/slot.cjs.map +1 -1
  410. package/build/components/inspector-controls-tabs/advanced-controls-panel.cjs +1 -1
  411. package/build/components/inspector-controls-tabs/advanced-controls-panel.cjs.map +1 -1
  412. package/build/components/inspector-controls-tabs/content-tab.cjs +1 -1
  413. package/build/components/inspector-controls-tabs/content-tab.cjs.map +1 -1
  414. package/build/components/inspector-controls-tabs/index.cjs +1 -1
  415. package/build/components/inspector-controls-tabs/index.cjs.map +1 -1
  416. package/build/components/inspector-controls-tabs/position-controls-panel.cjs +1 -1
  417. package/build/components/inspector-controls-tabs/position-controls-panel.cjs.map +1 -1
  418. package/build/components/inspector-controls-tabs/settings-tab.cjs +1 -1
  419. package/build/components/inspector-controls-tabs/settings-tab.cjs.map +1 -1
  420. package/build/components/inspector-controls-tabs/styles-tab.cjs +2 -4
  421. package/build/components/inspector-controls-tabs/styles-tab.cjs.map +3 -3
  422. package/build/components/inspector-popover-header/index.cjs +1 -1
  423. package/build/components/inspector-popover-header/index.cjs.map +1 -1
  424. package/build/components/justify-content-control/index.cjs +1 -1
  425. package/build/components/justify-content-control/index.cjs.map +1 -1
  426. package/build/components/justify-content-control/ui.cjs +1 -1
  427. package/build/components/justify-content-control/ui.cjs.map +1 -1
  428. package/build/components/letter-spacing-control/index.cjs +1 -1
  429. package/build/components/letter-spacing-control/index.cjs.map +1 -1
  430. package/build/components/line-height-control/index.cjs +1 -1
  431. package/build/components/line-height-control/index.cjs.map +1 -1
  432. package/build/components/link-control/index.cjs +1 -1
  433. package/build/components/link-control/index.cjs.map +3 -3
  434. package/build/components/link-control/link-preview.cjs +1 -1
  435. package/build/components/link-control/link-preview.cjs.map +1 -1
  436. package/build/components/link-control/search-create-button.cjs +1 -1
  437. package/build/components/link-control/search-create-button.cjs.map +1 -1
  438. package/build/components/link-control/search-input.cjs +1 -1
  439. package/build/components/link-control/search-input.cjs.map +2 -2
  440. package/build/components/link-control/search-item.cjs +1 -1
  441. package/build/components/link-control/search-item.cjs.map +1 -1
  442. package/build/components/link-control/search-results.cjs +1 -1
  443. package/build/components/link-control/search-results.cjs.map +1 -1
  444. package/build/components/link-control/settings-drawer.cjs +1 -1
  445. package/build/components/link-control/settings-drawer.cjs.map +1 -1
  446. package/build/components/link-control/settings.cjs +1 -1
  447. package/build/components/link-control/settings.cjs.map +1 -1
  448. package/build/components/link-picker/link-picker.cjs +1 -1
  449. package/build/components/link-picker/link-picker.cjs.map +1 -1
  450. package/build/components/link-picker/link-preview.cjs +1 -1
  451. package/build/components/link-picker/link-preview.cjs.map +1 -1
  452. package/build/components/list-view/appender.cjs +1 -1
  453. package/build/components/list-view/appender.cjs.map +1 -1
  454. package/build/components/list-view/aria-referenced-text.cjs +1 -1
  455. package/build/components/list-view/aria-referenced-text.cjs.map +1 -1
  456. package/build/components/list-view/block-contents.cjs +1 -1
  457. package/build/components/list-view/block-contents.cjs.map +1 -1
  458. package/build/components/list-view/block-select-button.cjs +1 -1
  459. package/build/components/list-view/block-select-button.cjs.map +1 -1
  460. package/build/components/list-view/block.cjs +2 -2
  461. package/build/components/list-view/block.cjs.map +3 -3
  462. package/build/components/list-view/branch.cjs +1 -1
  463. package/build/components/list-view/branch.cjs.map +1 -1
  464. package/build/components/list-view/drop-indicator.cjs +1 -1
  465. package/build/components/list-view/drop-indicator.cjs.map +1 -1
  466. package/build/components/list-view/expander.cjs +1 -1
  467. package/build/components/list-view/expander.cjs.map +1 -1
  468. package/build/components/list-view/index.cjs +1 -1
  469. package/build/components/list-view/index.cjs.map +1 -1
  470. package/build/components/list-view/leaf.cjs +1 -1
  471. package/build/components/list-view/leaf.cjs.map +1 -1
  472. package/build/components/list-view/use-list-view-drop-zone.cjs.map +1 -1
  473. package/build/components/media-placeholder/index.cjs +1 -1
  474. package/build/components/media-placeholder/index.cjs.map +1 -1
  475. package/build/components/media-replace-flow/index.cjs +1 -1
  476. package/build/components/media-replace-flow/index.cjs.map +1 -1
  477. package/build/components/multi-selection-inspector/index.cjs +1 -1
  478. package/build/components/multi-selection-inspector/index.cjs.map +1 -1
  479. package/build/components/navigable-toolbar/index.cjs +1 -1
  480. package/build/components/navigable-toolbar/index.cjs.map +1 -1
  481. package/build/components/observe-typing/index.cjs +1 -1
  482. package/build/components/observe-typing/index.cjs.map +1 -1
  483. package/build/components/panel-color-settings/index.cjs +1 -1
  484. package/build/components/panel-color-settings/index.cjs.map +1 -1
  485. package/build/components/plain-text/index.cjs +1 -1
  486. package/build/components/plain-text/index.cjs.map +1 -1
  487. package/build/components/preset-input-control/custom-value-controls.cjs +1 -1
  488. package/build/components/preset-input-control/custom-value-controls.cjs.map +1 -1
  489. package/build/components/preset-input-control/index.cjs +1 -1
  490. package/build/components/preset-input-control/index.cjs.map +1 -1
  491. package/build/components/provider/block-refs-provider.cjs +1 -1
  492. package/build/components/provider/block-refs-provider.cjs.map +1 -1
  493. package/build/components/provider/index.cjs +21 -4
  494. package/build/components/provider/index.cjs.map +3 -3
  495. package/build/components/provider/with-registry-provider.cjs +1 -1
  496. package/build/components/provider/with-registry-provider.cjs.map +1 -1
  497. package/build/components/publish-date-time-picker/index.cjs +1 -1
  498. package/build/components/publish-date-time-picker/index.cjs.map +1 -1
  499. package/build/components/recursion-provider/index.cjs +1 -1
  500. package/build/components/recursion-provider/index.cjs.map +1 -1
  501. package/build/components/resizable-box-popover/index.cjs +1 -1
  502. package/build/components/resizable-box-popover/index.cjs.map +1 -1
  503. package/build/components/resolution-tool/index.cjs +1 -1
  504. package/build/components/resolution-tool/index.cjs.map +1 -1
  505. package/build/components/responsive-block-control/index.cjs +1 -1
  506. package/build/components/responsive-block-control/index.cjs.map +1 -1
  507. package/build/components/responsive-block-control/label.cjs +1 -1
  508. package/build/components/responsive-block-control/label.cjs.map +1 -1
  509. package/build/components/rich-text/content.cjs +1 -1
  510. package/build/components/rich-text/content.cjs.map +1 -1
  511. package/build/components/rich-text/event-listeners/input-rules.cjs +4 -2
  512. package/build/components/rich-text/event-listeners/input-rules.cjs.map +2 -2
  513. package/build/components/rich-text/format-edit.cjs +1 -1
  514. package/build/components/rich-text/format-edit.cjs.map +1 -1
  515. package/build/components/rich-text/format-toolbar/index.cjs +1 -1
  516. package/build/components/rich-text/format-toolbar/index.cjs.map +1 -1
  517. package/build/components/rich-text/format-toolbar-container.cjs +1 -1
  518. package/build/components/rich-text/format-toolbar-container.cjs.map +1 -1
  519. package/build/components/rich-text/get-rich-text-values.cjs +1 -1
  520. package/build/components/rich-text/get-rich-text-values.cjs.map +1 -1
  521. package/build/components/rich-text/index.cjs +1 -1
  522. package/build/components/rich-text/index.cjs.map +1 -1
  523. package/build/components/rich-text/multiline.cjs +1 -1
  524. package/build/components/rich-text/multiline.cjs.map +1 -1
  525. package/build/components/rich-text/toolbar-button.cjs +1 -1
  526. package/build/components/rich-text/toolbar-button.cjs.map +1 -1
  527. package/build/components/rich-text/utils.cjs +1 -1
  528. package/build/components/rich-text/utils.cjs.map +1 -1
  529. package/build/components/rich-text/with-deprecations.cjs +1 -1
  530. package/build/components/rich-text/with-deprecations.cjs.map +1 -1
  531. package/build/components/skip-to-selected-block/index.cjs +1 -1
  532. package/build/components/skip-to-selected-block/index.cjs.map +1 -1
  533. package/build/components/spacing-sizes-control/index.cjs +1 -1
  534. package/build/components/spacing-sizes-control/index.cjs.map +1 -1
  535. package/build/components/spacing-sizes-control/input-controls/axial.cjs +1 -1
  536. package/build/components/spacing-sizes-control/input-controls/axial.cjs.map +1 -1
  537. package/build/components/spacing-sizes-control/input-controls/separated.cjs +1 -1
  538. package/build/components/spacing-sizes-control/input-controls/separated.cjs.map +1 -1
  539. package/build/components/spacing-sizes-control/input-controls/single.cjs +1 -1
  540. package/build/components/spacing-sizes-control/input-controls/single.cjs.map +1 -1
  541. package/build/components/spacing-sizes-control/input-controls/spacing-input-control.cjs +1 -1
  542. package/build/components/spacing-sizes-control/input-controls/spacing-input-control.cjs.map +1 -1
  543. package/build/components/spacing-sizes-control/linked-button.cjs +1 -1
  544. package/build/components/spacing-sizes-control/linked-button.cjs.map +1 -1
  545. package/build/components/tabbed-sidebar/index.cjs +1 -1
  546. package/build/components/tabbed-sidebar/index.cjs.map +1 -1
  547. package/build/components/text-alignment-control/index.cjs +1 -1
  548. package/build/components/text-alignment-control/index.cjs.map +1 -1
  549. package/build/components/text-decoration-control/index.cjs +1 -1
  550. package/build/components/text-decoration-control/index.cjs.map +1 -1
  551. package/build/components/text-indent-control/index.cjs +1 -1
  552. package/build/components/text-indent-control/index.cjs.map +1 -1
  553. package/build/components/text-transform-control/index.cjs +1 -1
  554. package/build/components/text-transform-control/index.cjs.map +1 -1
  555. package/build/components/typewriter/index.cjs +1 -1
  556. package/build/components/typewriter/index.cjs.map +1 -1
  557. package/build/components/unit-control/index.cjs +1 -1
  558. package/build/components/unit-control/index.cjs.map +1 -1
  559. package/build/components/url-input/button.cjs +1 -1
  560. package/build/components/url-input/button.cjs.map +1 -1
  561. package/build/components/url-input/index.cjs +1 -1
  562. package/build/components/url-input/index.cjs.map +1 -1
  563. package/build/components/url-popover/image-url-input-ui.cjs +1 -1
  564. package/build/components/url-popover/image-url-input-ui.cjs.map +1 -1
  565. package/build/components/url-popover/index.cjs +1 -1
  566. package/build/components/url-popover/index.cjs.map +1 -1
  567. package/build/components/url-popover/link-editor.cjs +1 -1
  568. package/build/components/url-popover/link-editor.cjs.map +1 -1
  569. package/build/components/url-popover/link-viewer-url.cjs +1 -1
  570. package/build/components/url-popover/link-viewer-url.cjs.map +1 -1
  571. package/build/components/url-popover/link-viewer.cjs +1 -1
  572. package/build/components/url-popover/link-viewer.cjs.map +1 -1
  573. package/build/components/use-block-drop-zone/index.cjs.map +1 -1
  574. package/build/components/warning/index.cjs +1 -1
  575. package/build/components/warning/index.cjs.map +1 -1
  576. package/build/components/writing-flow/index.cjs +1 -1
  577. package/build/components/writing-flow/index.cjs.map +1 -1
  578. package/build/components/writing-flow/use-arrow-nav.cjs.map +1 -1
  579. package/build/components/writing-flow/use-tab-nav.cjs +13 -28
  580. package/build/components/writing-flow/use-tab-nav.cjs.map +4 -4
  581. package/build/components/writing-mode-control/index.cjs +1 -1
  582. package/build/components/writing-mode-control/index.cjs.map +1 -1
  583. package/build/hooks/align.cjs +1 -1
  584. package/build/hooks/align.cjs.map +1 -1
  585. package/build/hooks/allowed-blocks.cjs +1 -1
  586. package/build/hooks/allowed-blocks.cjs.map +1 -1
  587. package/build/hooks/anchor.cjs +1 -1
  588. package/build/hooks/anchor.cjs.map +1 -1
  589. package/build/hooks/auto-inspector-controls.cjs +1 -1
  590. package/build/hooks/auto-inspector-controls.cjs.map +1 -1
  591. package/build/hooks/background.cjs +1 -1
  592. package/build/hooks/background.cjs.map +1 -1
  593. package/build/hooks/block-bindings.cjs +1 -1
  594. package/build/hooks/block-bindings.cjs.map +1 -1
  595. package/build/hooks/block-fields/fields-dropdown-menu.cjs +1 -1
  596. package/build/hooks/block-fields/fields-dropdown-menu.cjs.map +1 -1
  597. package/build/hooks/block-fields/index.cjs +1 -1
  598. package/build/hooks/block-fields/index.cjs.map +1 -1
  599. package/build/hooks/block-fields/link/index.cjs +1 -1
  600. package/build/hooks/block-fields/link/index.cjs.map +1 -1
  601. package/build/hooks/block-fields/media/index.cjs +1 -1
  602. package/build/hooks/block-fields/media/index.cjs.map +1 -1
  603. package/build/hooks/block-fields/rich-text/index.cjs +1 -1
  604. package/build/hooks/block-fields/rich-text/index.cjs.map +1 -1
  605. package/build/hooks/block-hooks.cjs +1 -1
  606. package/build/hooks/block-hooks.cjs.map +1 -1
  607. package/build/hooks/block-style-variation.cjs +1 -1
  608. package/build/hooks/block-style-variation.cjs.map +1 -1
  609. package/build/hooks/border.cjs +3 -47
  610. package/build/hooks/border.cjs.map +3 -3
  611. package/build/hooks/custom-class-name.cjs +1 -1
  612. package/build/hooks/custom-class-name.cjs.map +1 -1
  613. package/build/hooks/custom-css.cjs +1 -1
  614. package/build/hooks/custom-css.cjs.map +1 -1
  615. package/build/hooks/dimensions.cjs +1 -1
  616. package/build/hooks/dimensions.cjs.map +1 -1
  617. package/build/hooks/duotone.cjs +1 -1
  618. package/build/hooks/duotone.cjs.map +1 -1
  619. package/build/hooks/elements.cjs +1 -1
  620. package/build/hooks/elements.cjs.map +1 -1
  621. package/build/hooks/fit-text.cjs +1 -1
  622. package/build/hooks/fit-text.cjs.map +1 -1
  623. package/build/hooks/font-size.cjs +1 -1
  624. package/build/hooks/font-size.cjs.map +1 -1
  625. package/build/hooks/grid-visualizer.cjs +1 -1
  626. package/build/hooks/grid-visualizer.cjs.map +2 -2
  627. package/build/hooks/layout-child.cjs +1 -1
  628. package/build/hooks/layout-child.cjs.map +1 -1
  629. package/build/hooks/layout.cjs +1 -1
  630. package/build/hooks/layout.cjs.map +1 -1
  631. package/build/hooks/line-height.cjs +1 -1
  632. package/build/hooks/line-height.cjs.map +1 -1
  633. package/build/hooks/list-view.cjs +1 -1
  634. package/build/hooks/list-view.cjs.map +1 -1
  635. package/build/hooks/position.cjs +2 -2
  636. package/build/hooks/position.cjs.map +3 -3
  637. package/build/hooks/spacing-visualizer.cjs +1 -1
  638. package/build/hooks/spacing-visualizer.cjs.map +1 -1
  639. package/build/hooks/states.cjs +1 -1
  640. package/build/hooks/states.cjs.map +1 -1
  641. package/build/hooks/style.cjs +3 -3
  642. package/build/hooks/style.cjs.map +3 -3
  643. package/build/hooks/text-align.cjs +1 -1
  644. package/build/hooks/text-align.cjs.map +1 -1
  645. package/build/hooks/typography.cjs +1 -1
  646. package/build/hooks/typography.cjs.map +1 -1
  647. package/build/hooks/utils.cjs +1 -1
  648. package/build/hooks/utils.cjs.map +1 -1
  649. package/build/layouts/constrained.cjs +1 -1
  650. package/build/layouts/constrained.cjs.map +1 -1
  651. package/build/layouts/flex.cjs +4 -1
  652. package/build/layouts/flex.cjs.map +3 -3
  653. package/build/layouts/grid.cjs +1 -1
  654. package/build/layouts/grid.cjs.map +1 -1
  655. package/build-module/autocompleters/block.mjs +1 -1
  656. package/build-module/autocompleters/block.mjs.map +1 -1
  657. package/build-module/components/alignment-control/index.mjs +1 -1
  658. package/build-module/components/alignment-control/index.mjs.map +1 -1
  659. package/build-module/components/alignment-control/ui.mjs +1 -1
  660. package/build-module/components/alignment-control/ui.mjs.map +1 -1
  661. package/build-module/components/autocomplete/index.mjs +1 -1
  662. package/build-module/components/autocomplete/index.mjs.map +1 -1
  663. package/build-module/components/background-image-control/index.mjs +19 -2
  664. package/build-module/components/background-image-control/index.mjs.map +3 -3
  665. package/build-module/components/block-alignment-control/index.mjs +1 -1
  666. package/build-module/components/block-alignment-control/index.mjs.map +1 -1
  667. package/build-module/components/block-alignment-control/ui.mjs +1 -1
  668. package/build-module/components/block-alignment-control/ui.mjs.map +1 -1
  669. package/build-module/components/block-alignment-matrix-control/index.mjs +1 -1
  670. package/build-module/components/block-alignment-matrix-control/index.mjs.map +1 -1
  671. package/build-module/components/block-allowed-blocks/allowed-blocks-control.mjs +1 -1
  672. package/build-module/components/block-allowed-blocks/allowed-blocks-control.mjs.map +1 -1
  673. package/build-module/components/block-allowed-blocks/modal.mjs +1 -1
  674. package/build-module/components/block-allowed-blocks/modal.mjs.map +1 -1
  675. package/build-module/components/block-bindings/attribute-control.mjs +1 -1
  676. package/build-module/components/block-bindings/attribute-control.mjs.map +1 -1
  677. package/build-module/components/block-bindings/source-fields-list.mjs +1 -1
  678. package/build-module/components/block-bindings/source-fields-list.mjs.map +1 -1
  679. package/build-module/components/block-breadcrumb/index.mjs +1 -1
  680. package/build-module/components/block-breadcrumb/index.mjs.map +1 -1
  681. package/build-module/components/block-canvas/index.mjs +1 -1
  682. package/build-module/components/block-canvas/index.mjs.map +1 -1
  683. package/build-module/components/block-card/index.mjs +1 -1
  684. package/build-module/components/block-card/index.mjs.map +1 -1
  685. package/build-module/components/block-compare/block-view.mjs +1 -1
  686. package/build-module/components/block-compare/block-view.mjs.map +1 -1
  687. package/build-module/components/block-compare/index.mjs +1 -1
  688. package/build-module/components/block-compare/index.mjs.map +1 -1
  689. package/build-module/components/block-context/index.mjs +1 -1
  690. package/build-module/components/block-context/index.mjs.map +1 -1
  691. package/build-module/components/block-controls/fill.mjs +1 -1
  692. package/build-module/components/block-controls/fill.mjs.map +1 -1
  693. package/build-module/components/block-controls/index.mjs +1 -1
  694. package/build-module/components/block-controls/index.mjs.map +1 -1
  695. package/build-module/components/block-controls/slot.mjs +1 -1
  696. package/build-module/components/block-controls/slot.mjs.map +1 -1
  697. package/build-module/components/block-draggable/draggable-chip.mjs +1 -1
  698. package/build-module/components/block-draggable/draggable-chip.mjs.map +1 -1
  699. package/build-module/components/block-draggable/index.mjs +1 -1
  700. package/build-module/components/block-draggable/index.mjs.map +1 -1
  701. package/build-module/components/block-edit/edit.mjs +1 -1
  702. package/build-module/components/block-edit/edit.mjs.map +2 -2
  703. package/build-module/components/block-edit/index.mjs +1 -1
  704. package/build-module/components/block-edit/index.mjs.map +1 -1
  705. package/build-module/components/block-edit/multiple-usage-warning.mjs +1 -1
  706. package/build-module/components/block-edit/multiple-usage-warning.mjs.map +1 -1
  707. package/build-module/components/block-edit-visually-button/index.mjs +1 -1
  708. package/build-module/components/block-edit-visually-button/index.mjs.map +1 -1
  709. package/build-module/components/block-full-height-alignment-control/index.mjs +1 -1
  710. package/build-module/components/block-full-height-alignment-control/index.mjs.map +1 -1
  711. package/build-module/components/block-heading-level-dropdown/heading-level-icon.mjs +1 -1
  712. package/build-module/components/block-heading-level-dropdown/heading-level-icon.mjs.map +1 -1
  713. package/build-module/components/block-heading-level-dropdown/index.mjs +1 -1
  714. package/build-module/components/block-heading-level-dropdown/index.mjs.map +1 -1
  715. package/build-module/components/block-icon/index.mjs +1 -1
  716. package/build-module/components/block-icon/index.mjs.map +1 -1
  717. package/build-module/components/block-inspector/edit-contents.mjs +1 -1
  718. package/build-module/components/block-inspector/edit-contents.mjs.map +1 -1
  719. package/build-module/components/block-inspector/index.mjs +8 -16
  720. package/build-module/components/block-inspector/index.mjs.map +3 -3
  721. package/build-module/components/block-keyboard-shortcuts/index.mjs +1 -1
  722. package/build-module/components/block-keyboard-shortcuts/index.mjs.map +1 -1
  723. package/build-module/components/block-list/block-crash-warning.mjs +1 -1
  724. package/build-module/components/block-list/block-crash-warning.mjs.map +1 -1
  725. package/build-module/components/block-list/block-html.mjs +1 -1
  726. package/build-module/components/block-list/block-html.mjs.map +1 -1
  727. package/build-module/components/block-list/block-invalid-warning.mjs +1 -1
  728. package/build-module/components/block-list/block-invalid-warning.mjs.map +1 -1
  729. package/build-module/components/block-list/block.mjs +1 -1
  730. package/build-module/components/block-list/block.mjs.map +1 -1
  731. package/build-module/components/block-list/index.mjs +1 -1
  732. package/build-module/components/block-list/index.mjs.map +1 -1
  733. package/build-module/components/block-list/layout.mjs +1 -1
  734. package/build-module/components/block-list/layout.mjs.map +1 -1
  735. package/build-module/components/block-list/subdirectory-icon.mjs +1 -1
  736. package/build-module/components/block-list/subdirectory-icon.mjs.map +1 -1
  737. package/build-module/components/block-list/use-block-props/use-is-hovered.mjs +17 -4
  738. package/build-module/components/block-list/use-block-props/use-is-hovered.mjs.map +2 -2
  739. package/build-module/components/block-list/zoom-out-separator.mjs +1 -1
  740. package/build-module/components/block-list/zoom-out-separator.mjs.map +1 -1
  741. package/build-module/components/block-list-appender/index.mjs +1 -1
  742. package/build-module/components/block-list-appender/index.mjs.map +1 -1
  743. package/build-module/components/block-lock/menu-item.mjs +1 -1
  744. package/build-module/components/block-lock/menu-item.mjs.map +1 -1
  745. package/build-module/components/block-lock/modal.mjs +1 -1
  746. package/build-module/components/block-lock/modal.mjs.map +1 -1
  747. package/build-module/components/block-lock/toolbar.mjs +1 -1
  748. package/build-module/components/block-lock/toolbar.mjs.map +1 -1
  749. package/build-module/components/block-manager/category.mjs +1 -1
  750. package/build-module/components/block-manager/category.mjs.map +1 -1
  751. package/build-module/components/block-manager/checklist.mjs +1 -1
  752. package/build-module/components/block-manager/checklist.mjs.map +1 -1
  753. package/build-module/components/block-manager/index.mjs +1 -1
  754. package/build-module/components/block-manager/index.mjs.map +1 -1
  755. package/build-module/components/block-mover/button.mjs +1 -1
  756. package/build-module/components/block-mover/button.mjs.map +1 -1
  757. package/build-module/components/block-mover/index.mjs +1 -1
  758. package/build-module/components/block-mover/index.mjs.map +1 -1
  759. package/build-module/components/block-navigation/dropdown.mjs +1 -1
  760. package/build-module/components/block-navigation/dropdown.mjs.map +1 -1
  761. package/build-module/components/block-parent-selector/index.mjs +1 -1
  762. package/build-module/components/block-parent-selector/index.mjs.map +1 -1
  763. package/build-module/components/block-pattern-setup/index.mjs +1 -1
  764. package/build-module/components/block-pattern-setup/index.mjs.map +1 -1
  765. package/build-module/components/block-pattern-setup/setup-toolbar.mjs +1 -1
  766. package/build-module/components/block-pattern-setup/setup-toolbar.mjs.map +1 -1
  767. package/build-module/components/block-patterns-list/index.mjs +1 -1
  768. package/build-module/components/block-patterns-list/index.mjs.map +1 -1
  769. package/build-module/components/block-patterns-paging/index.mjs +1 -1
  770. package/build-module/components/block-patterns-paging/index.mjs.map +1 -1
  771. package/build-module/components/block-popover/cover.mjs +1 -1
  772. package/build-module/components/block-popover/cover.mjs.map +1 -1
  773. package/build-module/components/block-popover/drop-zone.mjs +1 -1
  774. package/build-module/components/block-popover/drop-zone.mjs.map +1 -1
  775. package/build-module/components/block-popover/inbetween.mjs +1 -1
  776. package/build-module/components/block-popover/inbetween.mjs.map +1 -1
  777. package/build-module/components/block-popover/index.mjs +1 -1
  778. package/build-module/components/block-popover/index.mjs.map +1 -1
  779. package/build-module/components/block-preview/auto.mjs +1 -1
  780. package/build-module/components/block-preview/auto.mjs.map +1 -1
  781. package/build-module/components/block-preview/index.mjs +1 -1
  782. package/build-module/components/block-preview/index.mjs.map +1 -1
  783. package/build-module/components/block-quick-navigation/index.mjs +1 -1
  784. package/build-module/components/block-quick-navigation/index.mjs.map +1 -1
  785. package/build-module/components/block-removal-warning-modal/index.mjs +1 -1
  786. package/build-module/components/block-removal-warning-modal/index.mjs.map +1 -1
  787. package/build-module/components/block-rename/modal.mjs +1 -1
  788. package/build-module/components/block-rename/modal.mjs.map +1 -1
  789. package/build-module/components/block-rename/rename-control.mjs +1 -1
  790. package/build-module/components/block-rename/rename-control.mjs.map +1 -1
  791. package/build-module/components/block-selection-clearer/index.mjs +1 -1
  792. package/build-module/components/block-selection-clearer/index.mjs.map +1 -1
  793. package/build-module/components/block-settings-menu/block-html-convert-button.mjs +1 -1
  794. package/build-module/components/block-settings-menu/block-html-convert-button.mjs.map +1 -1
  795. package/build-module/components/block-settings-menu/block-mode-toggle.mjs +1 -1
  796. package/build-module/components/block-settings-menu/block-mode-toggle.mjs.map +1 -1
  797. package/build-module/components/block-settings-menu/block-parent-selector-menu-item.mjs +1 -1
  798. package/build-module/components/block-settings-menu/block-parent-selector-menu-item.mjs.map +1 -1
  799. package/build-module/components/block-settings-menu/block-settings-dropdown.mjs +1 -1
  800. package/build-module/components/block-settings-menu/block-settings-dropdown.mjs.map +1 -1
  801. package/build-module/components/block-settings-menu/index.mjs +1 -1
  802. package/build-module/components/block-settings-menu/index.mjs.map +1 -1
  803. package/build-module/components/block-settings-menu-controls/index.mjs +1 -1
  804. package/build-module/components/block-settings-menu-controls/index.mjs.map +1 -1
  805. package/build-module/components/block-styles/index.mjs +1 -1
  806. package/build-module/components/block-styles/index.mjs.map +1 -1
  807. package/build-module/components/block-styles/menu-items.mjs +1 -1
  808. package/build-module/components/block-styles/menu-items.mjs.map +1 -1
  809. package/build-module/components/block-switcher/block-styles-menu.mjs +1 -1
  810. package/build-module/components/block-switcher/block-styles-menu.mjs.map +1 -1
  811. package/build-module/components/block-switcher/block-transformations-menu.mjs +1 -1
  812. package/build-module/components/block-switcher/block-transformations-menu.mjs.map +1 -1
  813. package/build-module/components/block-switcher/block-variation-transformations.mjs +1 -1
  814. package/build-module/components/block-switcher/block-variation-transformations.mjs.map +1 -1
  815. package/build-module/components/block-switcher/index.mjs +1 -1
  816. package/build-module/components/block-switcher/index.mjs.map +1 -1
  817. package/build-module/components/block-switcher/pattern-transformations-menu.mjs +1 -1
  818. package/build-module/components/block-switcher/pattern-transformations-menu.mjs.map +1 -1
  819. package/build-module/components/block-switcher/preview-block-popover.mjs +1 -1
  820. package/build-module/components/block-switcher/preview-block-popover.mjs.map +1 -1
  821. package/build-module/components/block-toolbar/block-styles-dropdown.mjs +1 -1
  822. package/build-module/components/block-toolbar/block-styles-dropdown.mjs.map +1 -1
  823. package/build-module/components/block-toolbar/block-toolbar-icon.mjs +1 -1
  824. package/build-module/components/block-toolbar/block-toolbar-icon.mjs.map +1 -1
  825. package/build-module/components/block-toolbar/change-design.mjs +1 -1
  826. package/build-module/components/block-toolbar/change-design.mjs.map +1 -1
  827. package/build-module/components/block-toolbar/edit-section-button.mjs +1 -1
  828. package/build-module/components/block-toolbar/edit-section-button.mjs.map +1 -1
  829. package/build-module/components/block-toolbar/index.mjs +1 -1
  830. package/build-module/components/block-toolbar/index.mjs.map +1 -1
  831. package/build-module/components/block-toolbar/pattern-overrides-dropdown.mjs +1 -1
  832. package/build-module/components/block-toolbar/pattern-overrides-dropdown.mjs.map +1 -1
  833. package/build-module/components/block-toolbar/switch-section-style.mjs +1 -1
  834. package/build-module/components/block-toolbar/switch-section-style.mjs.map +1 -1
  835. package/build-module/components/block-tools/block-toolbar-popover.mjs +1 -1
  836. package/build-module/components/block-tools/block-toolbar-popover.mjs.map +1 -1
  837. package/build-module/components/block-tools/empty-block-inserter.mjs +1 -1
  838. package/build-module/components/block-tools/empty-block-inserter.mjs.map +1 -1
  839. package/build-module/components/block-tools/index.mjs +1 -1
  840. package/build-module/components/block-tools/index.mjs.map +1 -1
  841. package/build-module/components/block-tools/insertion-point.mjs +1 -1
  842. package/build-module/components/block-tools/insertion-point.mjs.map +1 -1
  843. package/build-module/components/block-tools/zoom-out-mode-inserter-button.mjs +1 -1
  844. package/build-module/components/block-tools/zoom-out-mode-inserter-button.mjs.map +1 -1
  845. package/build-module/components/block-tools/zoom-out-mode-inserters.mjs +1 -1
  846. package/build-module/components/block-tools/zoom-out-mode-inserters.mjs.map +1 -1
  847. package/build-module/components/block-types-list/index.mjs +1 -1
  848. package/build-module/components/block-types-list/index.mjs.map +1 -1
  849. package/build-module/components/block-variation-picker/index.mjs +1 -1
  850. package/build-module/components/block-variation-picker/index.mjs.map +1 -1
  851. package/build-module/components/block-variation-transforms/index.mjs +1 -1
  852. package/build-module/components/block-variation-transforms/index.mjs.map +1 -1
  853. package/build-module/components/block-vertical-alignment-control/index.mjs +1 -1
  854. package/build-module/components/block-vertical-alignment-control/index.mjs.map +1 -1
  855. package/build-module/components/block-vertical-alignment-control/ui.mjs +1 -1
  856. package/build-module/components/block-vertical-alignment-control/ui.mjs.map +1 -1
  857. package/build-module/components/block-visibility/constants.mjs.map +1 -1
  858. package/build-module/components/block-visibility/modal.mjs +1 -1
  859. package/build-module/components/block-visibility/modal.mjs.map +1 -1
  860. package/build-module/components/block-visibility/viewport-menu-item.mjs +1 -1
  861. package/build-module/components/block-visibility/viewport-menu-item.mjs.map +1 -1
  862. package/build-module/components/block-visibility/viewport-toolbar.mjs +1 -1
  863. package/build-module/components/block-visibility/viewport-toolbar.mjs.map +1 -1
  864. package/build-module/components/block-visibility/viewport-visibility-info.mjs +1 -1
  865. package/build-module/components/block-visibility/viewport-visibility-info.mjs.map +1 -1
  866. package/build-module/components/border-radius-control/index.mjs +1 -1
  867. package/build-module/components/border-radius-control/index.mjs.map +1 -1
  868. package/build-module/components/border-radius-control/linked-button.mjs +1 -1
  869. package/build-module/components/border-radius-control/linked-button.mjs.map +1 -1
  870. package/build-module/components/button-block-appender/index.mjs +1 -1
  871. package/build-module/components/button-block-appender/index.mjs.map +1 -1
  872. package/build-module/components/child-layout-control/index.mjs +1 -1
  873. package/build-module/components/child-layout-control/index.mjs.map +1 -1
  874. package/build-module/components/color-palette/control.mjs +1 -1
  875. package/build-module/components/color-palette/control.mjs.map +1 -1
  876. package/build-module/components/color-palette/with-color-context.mjs +1 -1
  877. package/build-module/components/color-palette/with-color-context.mjs.map +1 -1
  878. package/build-module/components/color-style-selector/index.mjs +1 -1
  879. package/build-module/components/color-style-selector/index.mjs.map +1 -1
  880. package/build-module/components/colors/with-colors.mjs +1 -1
  881. package/build-module/components/colors/with-colors.mjs.map +1 -1
  882. package/build-module/components/colors-gradients/control.mjs +1 -1
  883. package/build-module/components/colors-gradients/control.mjs.map +1 -1
  884. package/build-module/components/colors-gradients/dropdown.mjs +1 -1
  885. package/build-module/components/colors-gradients/dropdown.mjs.map +1 -1
  886. package/build-module/components/colors-gradients/panel-color-gradient-settings.mjs +1 -1
  887. package/build-module/components/colors-gradients/panel-color-gradient-settings.mjs.map +1 -1
  888. package/build-module/components/contrast-checker/index.mjs +1 -1
  889. package/build-module/components/contrast-checker/index.mjs.map +1 -1
  890. package/build-module/components/convert-to-group-buttons/index.mjs +1 -1
  891. package/build-module/components/convert-to-group-buttons/index.mjs.map +1 -1
  892. package/build-module/components/convert-to-group-buttons/toolbar.mjs +1 -1
  893. package/build-module/components/convert-to-group-buttons/toolbar.mjs.map +1 -1
  894. package/build-module/components/copy-handler/index.mjs +1 -1
  895. package/build-module/components/copy-handler/index.mjs.map +1 -1
  896. package/build-module/components/date-format-picker/index.mjs +1 -1
  897. package/build-module/components/date-format-picker/index.mjs.map +1 -1
  898. package/build-module/components/default-block-appender/index.mjs +1 -1
  899. package/build-module/components/default-block-appender/index.mjs.map +1 -1
  900. package/build-module/components/dimension-control/index.mjs +1 -1
  901. package/build-module/components/dimension-control/index.mjs.map +1 -1
  902. package/build-module/components/dimensions-tool/aspect-ratio-tool.mjs +1 -1
  903. package/build-module/components/dimensions-tool/aspect-ratio-tool.mjs.map +1 -1
  904. package/build-module/components/dimensions-tool/index.mjs +1 -1
  905. package/build-module/components/dimensions-tool/index.mjs.map +1 -1
  906. package/build-module/components/dimensions-tool/scale-tool.mjs +1 -1
  907. package/build-module/components/dimensions-tool/scale-tool.mjs.map +1 -1
  908. package/build-module/components/dimensions-tool/width-height-tool.mjs +1 -1
  909. package/build-module/components/dimensions-tool/width-height-tool.mjs.map +1 -1
  910. package/build-module/components/duotone-control/index.mjs +1 -1
  911. package/build-module/components/duotone-control/index.mjs.map +1 -1
  912. package/build-module/components/editable-text/index.mjs +1 -1
  913. package/build-module/components/editable-text/index.mjs.map +1 -1
  914. package/build-module/components/editor-styles/index.mjs +1 -1
  915. package/build-module/components/editor-styles/index.mjs.map +1 -1
  916. package/build-module/components/fit-text-size-warning/index.mjs +1 -1
  917. package/build-module/components/fit-text-size-warning/index.mjs.map +1 -1
  918. package/build-module/components/font-appearance-control/index.mjs +1 -1
  919. package/build-module/components/font-appearance-control/index.mjs.map +1 -1
  920. package/build-module/components/font-family/index.mjs +1 -1
  921. package/build-module/components/font-family/index.mjs.map +1 -1
  922. package/build-module/components/font-sizes/font-size-picker.mjs +1 -1
  923. package/build-module/components/font-sizes/font-size-picker.mjs.map +1 -1
  924. package/build-module/components/font-sizes/with-font-sizes.mjs +1 -1
  925. package/build-module/components/font-sizes/with-font-sizes.mjs.map +1 -1
  926. package/build-module/components/global-styles/advanced-panel.mjs +1 -1
  927. package/build-module/components/global-styles/advanced-panel.mjs.map +1 -1
  928. package/build-module/components/global-styles/background-panel.mjs +1 -1
  929. package/build-module/components/global-styles/background-panel.mjs.map +2 -2
  930. package/build-module/components/global-styles/border-panel.mjs +20 -43
  931. package/build-module/components/global-styles/border-panel.mjs.map +3 -3
  932. package/build-module/components/global-styles/color-gradient-dropdown-item.mjs +1 -1
  933. package/build-module/components/global-styles/color-gradient-dropdown-item.mjs.map +1 -1
  934. package/build-module/components/global-styles/color-panel.mjs +1 -1
  935. package/build-module/components/global-styles/color-panel.mjs.map +1 -1
  936. package/build-module/components/global-styles/dimensions-panel.mjs +1 -1
  937. package/build-module/components/global-styles/dimensions-panel.mjs.map +1 -1
  938. package/build-module/components/global-styles/filters-panel.mjs +1 -1
  939. package/build-module/components/global-styles/filters-panel.mjs.map +1 -1
  940. package/build-module/components/global-styles/image-settings-panel.mjs +1 -1
  941. package/build-module/components/global-styles/image-settings-panel.mjs.map +2 -2
  942. package/build-module/components/global-styles/inheritance/index.mjs +1 -1
  943. package/build-module/components/global-styles/inheritance/index.mjs.map +1 -1
  944. package/build-module/components/global-styles/shadow-panel-components.mjs +1 -1
  945. package/build-module/components/global-styles/shadow-panel-components.mjs.map +1 -1
  946. package/build-module/components/global-styles/state-control-badges.mjs +1 -1
  947. package/build-module/components/global-styles/state-control-badges.mjs.map +1 -1
  948. package/build-module/components/global-styles/state-control.mjs +1 -1
  949. package/build-module/components/global-styles/state-control.mjs.map +1 -1
  950. package/build-module/components/global-styles/typography-panel.mjs +1 -1
  951. package/build-module/components/global-styles/typography-panel.mjs.map +1 -1
  952. package/build-module/components/grid/grid-item-movers.mjs +1 -1
  953. package/build-module/components/grid/grid-item-movers.mjs.map +1 -1
  954. package/build-module/components/grid/grid-item-resizer.mjs +1 -1
  955. package/build-module/components/grid/grid-item-resizer.mjs.map +1 -1
  956. package/build-module/components/grid/grid-visualizer.mjs +1 -1
  957. package/build-module/components/grid/grid-visualizer.mjs.map +1 -1
  958. package/build-module/components/height-control/index.mjs +1 -1
  959. package/build-module/components/height-control/index.mjs.map +1 -1
  960. package/build-module/components/html-element-control/index.mjs +1 -1
  961. package/build-module/components/html-element-control/index.mjs.map +1 -1
  962. package/build-module/components/iframe/index.mjs +1 -1
  963. package/build-module/components/iframe/index.mjs.map +2 -2
  964. package/build-module/components/image-editor/aspect-ratio-dropdown.mjs +1 -1
  965. package/build-module/components/image-editor/aspect-ratio-dropdown.mjs.map +1 -1
  966. package/build-module/components/image-editor/context.mjs +1 -1
  967. package/build-module/components/image-editor/context.mjs.map +1 -1
  968. package/build-module/components/image-editor/cropper.mjs +1 -1
  969. package/build-module/components/image-editor/cropper.mjs.map +1 -1
  970. package/build-module/components/image-editor/form-controls.mjs +1 -1
  971. package/build-module/components/image-editor/form-controls.mjs.map +1 -1
  972. package/build-module/components/image-editor/index.mjs +1 -1
  973. package/build-module/components/image-editor/index.mjs.map +1 -1
  974. package/build-module/components/image-editor/rotation-button.mjs +1 -1
  975. package/build-module/components/image-editor/rotation-button.mjs.map +1 -1
  976. package/build-module/components/image-editor/zoom-dropdown.mjs +1 -1
  977. package/build-module/components/image-editor/zoom-dropdown.mjs.map +1 -1
  978. package/build-module/components/image-size-control/index.mjs +1 -1
  979. package/build-module/components/image-size-control/index.mjs.map +1 -1
  980. package/build-module/components/inner-blocks/button-block-appender.mjs +1 -1
  981. package/build-module/components/inner-blocks/button-block-appender.mjs.map +1 -1
  982. package/build-module/components/inner-blocks/default-block-appender.mjs +1 -1
  983. package/build-module/components/inner-blocks/default-block-appender.mjs.map +1 -1
  984. package/build-module/components/inner-blocks/index.mjs +1 -1
  985. package/build-module/components/inner-blocks/index.mjs.map +1 -1
  986. package/build-module/components/inner-content/index.mjs +1 -1
  987. package/build-module/components/inner-content/index.mjs.map +1 -1
  988. package/build-module/components/inserter/block-patterns-explorer/index.mjs +1 -1
  989. package/build-module/components/inserter/block-patterns-explorer/index.mjs.map +1 -1
  990. package/build-module/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.mjs +1 -1
  991. package/build-module/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.mjs.map +1 -1
  992. package/build-module/components/inserter/block-patterns-explorer/pattern-list.mjs +1 -1
  993. package/build-module/components/inserter/block-patterns-explorer/pattern-list.mjs.map +1 -1
  994. package/build-module/components/inserter/block-patterns-tab/index.mjs +1 -1
  995. package/build-module/components/inserter/block-patterns-tab/index.mjs.map +1 -1
  996. package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.mjs +1 -1
  997. package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.mjs.map +1 -1
  998. package/build-module/components/inserter/block-patterns-tab/patterns-filter.mjs +1 -1
  999. package/build-module/components/inserter/block-patterns-tab/patterns-filter.mjs.map +1 -1
  1000. package/build-module/components/inserter/block-types-tab.mjs +1 -1
  1001. package/build-module/components/inserter/block-types-tab.mjs.map +1 -1
  1002. package/build-module/components/inserter/category-tabs/index.mjs +1 -1
  1003. package/build-module/components/inserter/category-tabs/index.mjs.map +1 -1
  1004. package/build-module/components/inserter/hooks/use-patterns-paging.mjs.map +1 -1
  1005. package/build-module/components/inserter/index.mjs +1 -1
  1006. package/build-module/components/inserter/index.mjs.map +1 -1
  1007. package/build-module/components/inserter/library.mjs +1 -1
  1008. package/build-module/components/inserter/library.mjs.map +1 -1
  1009. package/build-module/components/inserter/media-tab/media-list.mjs +1 -1
  1010. package/build-module/components/inserter/media-tab/media-list.mjs.map +1 -1
  1011. package/build-module/components/inserter/media-tab/media-panel.mjs +1 -1
  1012. package/build-module/components/inserter/media-tab/media-panel.mjs.map +1 -1
  1013. package/build-module/components/inserter/media-tab/media-preview.mjs +1 -1
  1014. package/build-module/components/inserter/media-tab/media-preview.mjs.map +1 -1
  1015. package/build-module/components/inserter/media-tab/media-tab.mjs +1 -1
  1016. package/build-module/components/inserter/media-tab/media-tab.mjs.map +1 -1
  1017. package/build-module/components/inserter/media-tab/utils.mjs +1 -1
  1018. package/build-module/components/inserter/media-tab/utils.mjs.map +1 -1
  1019. package/build-module/components/inserter/menu.mjs +2 -2
  1020. package/build-module/components/inserter/menu.mjs.map +3 -3
  1021. package/build-module/components/inserter/mobile-tab-navigation.mjs +1 -1
  1022. package/build-module/components/inserter/mobile-tab-navigation.mjs.map +1 -1
  1023. package/build-module/components/inserter/no-results.mjs +1 -1
  1024. package/build-module/components/inserter/no-results.mjs.map +1 -1
  1025. package/build-module/components/inserter/panel.mjs +1 -1
  1026. package/build-module/components/inserter/panel.mjs.map +1 -1
  1027. package/build-module/components/inserter/preview-panel.mjs +1 -1
  1028. package/build-module/components/inserter/preview-panel.mjs.map +1 -1
  1029. package/build-module/components/inserter/quick-inserter.mjs +1 -1
  1030. package/build-module/components/inserter/quick-inserter.mjs.map +1 -1
  1031. package/build-module/components/inserter/search-results.mjs +1 -1
  1032. package/build-module/components/inserter/search-results.mjs.map +1 -1
  1033. package/build-module/components/inserter/tips.mjs +1 -1
  1034. package/build-module/components/inserter/tips.mjs.map +1 -1
  1035. package/build-module/components/inserter-draggable-blocks/index.mjs +1 -1
  1036. package/build-module/components/inserter-draggable-blocks/index.mjs.map +2 -2
  1037. package/build-module/components/inserter-list-item/index.mjs +1 -1
  1038. package/build-module/components/inserter-list-item/index.mjs.map +1 -1
  1039. package/build-module/components/inserter-listbox/group.mjs +1 -1
  1040. package/build-module/components/inserter-listbox/group.mjs.map +1 -1
  1041. package/build-module/components/inserter-listbox/index.mjs +1 -1
  1042. package/build-module/components/inserter-listbox/index.mjs.map +1 -1
  1043. package/build-module/components/inserter-listbox/item.mjs +1 -1
  1044. package/build-module/components/inserter-listbox/item.mjs.map +1 -1
  1045. package/build-module/components/inserter-listbox/row.mjs +1 -1
  1046. package/build-module/components/inserter-listbox/row.mjs.map +1 -1
  1047. package/build-module/components/inspector-controls/block-support-slot-container.mjs +1 -1
  1048. package/build-module/components/inspector-controls/block-support-slot-container.mjs.map +1 -1
  1049. package/build-module/components/inspector-controls/block-support-tools-panel.mjs +1 -1
  1050. package/build-module/components/inspector-controls/block-support-tools-panel.mjs.map +1 -1
  1051. package/build-module/components/inspector-controls/fill.mjs +1 -1
  1052. package/build-module/components/inspector-controls/fill.mjs.map +1 -1
  1053. package/build-module/components/inspector-controls/groups.mjs +3 -1
  1054. package/build-module/components/inspector-controls/groups.mjs.map +2 -2
  1055. package/build-module/components/inspector-controls/index.mjs +1 -1
  1056. package/build-module/components/inspector-controls/index.mjs.map +1 -1
  1057. package/build-module/components/inspector-controls/last-item.mjs +1 -1
  1058. package/build-module/components/inspector-controls/last-item.mjs.map +1 -1
  1059. package/build-module/components/inspector-controls/list-view-content-popover.mjs +1 -1
  1060. package/build-module/components/inspector-controls/list-view-content-popover.mjs.map +1 -1
  1061. package/build-module/components/inspector-controls/slot.mjs +1 -1
  1062. package/build-module/components/inspector-controls/slot.mjs.map +1 -1
  1063. package/build-module/components/inspector-controls-tabs/advanced-controls-panel.mjs +1 -1
  1064. package/build-module/components/inspector-controls-tabs/advanced-controls-panel.mjs.map +1 -1
  1065. package/build-module/components/inspector-controls-tabs/content-tab.mjs +1 -1
  1066. package/build-module/components/inspector-controls-tabs/content-tab.mjs.map +1 -1
  1067. package/build-module/components/inspector-controls-tabs/index.mjs +1 -1
  1068. package/build-module/components/inspector-controls-tabs/index.mjs.map +1 -1
  1069. package/build-module/components/inspector-controls-tabs/position-controls-panel.mjs +1 -1
  1070. package/build-module/components/inspector-controls-tabs/position-controls-panel.mjs.map +1 -1
  1071. package/build-module/components/inspector-controls-tabs/settings-tab.mjs +1 -1
  1072. package/build-module/components/inspector-controls-tabs/settings-tab.mjs.map +1 -1
  1073. package/build-module/components/inspector-controls-tabs/styles-tab.mjs +2 -4
  1074. package/build-module/components/inspector-controls-tabs/styles-tab.mjs.map +3 -3
  1075. package/build-module/components/inspector-popover-header/index.mjs +1 -1
  1076. package/build-module/components/inspector-popover-header/index.mjs.map +1 -1
  1077. package/build-module/components/justify-content-control/index.mjs +1 -1
  1078. package/build-module/components/justify-content-control/index.mjs.map +1 -1
  1079. package/build-module/components/justify-content-control/ui.mjs +1 -1
  1080. package/build-module/components/justify-content-control/ui.mjs.map +1 -1
  1081. package/build-module/components/letter-spacing-control/index.mjs +1 -1
  1082. package/build-module/components/letter-spacing-control/index.mjs.map +1 -1
  1083. package/build-module/components/line-height-control/index.mjs +1 -1
  1084. package/build-module/components/line-height-control/index.mjs.map +1 -1
  1085. package/build-module/components/link-control/index.mjs +1 -1
  1086. package/build-module/components/link-control/index.mjs.map +3 -3
  1087. package/build-module/components/link-control/link-preview.mjs +1 -1
  1088. package/build-module/components/link-control/link-preview.mjs.map +1 -1
  1089. package/build-module/components/link-control/search-create-button.mjs +1 -1
  1090. package/build-module/components/link-control/search-create-button.mjs.map +1 -1
  1091. package/build-module/components/link-control/search-input.mjs +1 -1
  1092. package/build-module/components/link-control/search-input.mjs.map +2 -2
  1093. package/build-module/components/link-control/search-item.mjs +1 -1
  1094. package/build-module/components/link-control/search-item.mjs.map +1 -1
  1095. package/build-module/components/link-control/search-results.mjs +1 -1
  1096. package/build-module/components/link-control/search-results.mjs.map +1 -1
  1097. package/build-module/components/link-control/settings-drawer.mjs +1 -1
  1098. package/build-module/components/link-control/settings-drawer.mjs.map +1 -1
  1099. package/build-module/components/link-control/settings.mjs +1 -1
  1100. package/build-module/components/link-control/settings.mjs.map +1 -1
  1101. package/build-module/components/link-picker/link-picker.mjs +1 -1
  1102. package/build-module/components/link-picker/link-picker.mjs.map +1 -1
  1103. package/build-module/components/link-picker/link-preview.mjs +1 -1
  1104. package/build-module/components/link-picker/link-preview.mjs.map +1 -1
  1105. package/build-module/components/list-view/appender.mjs +1 -1
  1106. package/build-module/components/list-view/appender.mjs.map +1 -1
  1107. package/build-module/components/list-view/aria-referenced-text.mjs +1 -1
  1108. package/build-module/components/list-view/aria-referenced-text.mjs.map +1 -1
  1109. package/build-module/components/list-view/block-contents.mjs +1 -1
  1110. package/build-module/components/list-view/block-contents.mjs.map +1 -1
  1111. package/build-module/components/list-view/block-select-button.mjs +1 -1
  1112. package/build-module/components/list-view/block-select-button.mjs.map +1 -1
  1113. package/build-module/components/list-view/block.mjs +2 -2
  1114. package/build-module/components/list-view/block.mjs.map +3 -3
  1115. package/build-module/components/list-view/branch.mjs +1 -1
  1116. package/build-module/components/list-view/branch.mjs.map +1 -1
  1117. package/build-module/components/list-view/drop-indicator.mjs +1 -1
  1118. package/build-module/components/list-view/drop-indicator.mjs.map +1 -1
  1119. package/build-module/components/list-view/expander.mjs +1 -1
  1120. package/build-module/components/list-view/expander.mjs.map +1 -1
  1121. package/build-module/components/list-view/index.mjs +1 -1
  1122. package/build-module/components/list-view/index.mjs.map +1 -1
  1123. package/build-module/components/list-view/leaf.mjs +1 -1
  1124. package/build-module/components/list-view/leaf.mjs.map +1 -1
  1125. package/build-module/components/list-view/use-list-view-drop-zone.mjs.map +1 -1
  1126. package/build-module/components/media-placeholder/index.mjs +1 -1
  1127. package/build-module/components/media-placeholder/index.mjs.map +1 -1
  1128. package/build-module/components/media-replace-flow/index.mjs +1 -1
  1129. package/build-module/components/media-replace-flow/index.mjs.map +1 -1
  1130. package/build-module/components/multi-selection-inspector/index.mjs +1 -1
  1131. package/build-module/components/multi-selection-inspector/index.mjs.map +1 -1
  1132. package/build-module/components/navigable-toolbar/index.mjs +1 -1
  1133. package/build-module/components/navigable-toolbar/index.mjs.map +1 -1
  1134. package/build-module/components/observe-typing/index.mjs +1 -1
  1135. package/build-module/components/observe-typing/index.mjs.map +1 -1
  1136. package/build-module/components/panel-color-settings/index.mjs +1 -1
  1137. package/build-module/components/panel-color-settings/index.mjs.map +1 -1
  1138. package/build-module/components/plain-text/index.mjs +1 -1
  1139. package/build-module/components/plain-text/index.mjs.map +1 -1
  1140. package/build-module/components/preset-input-control/custom-value-controls.mjs +1 -1
  1141. package/build-module/components/preset-input-control/custom-value-controls.mjs.map +1 -1
  1142. package/build-module/components/preset-input-control/index.mjs +1 -1
  1143. package/build-module/components/preset-input-control/index.mjs.map +1 -1
  1144. package/build-module/components/provider/block-refs-provider.mjs +1 -1
  1145. package/build-module/components/provider/block-refs-provider.mjs.map +1 -1
  1146. package/build-module/components/provider/index.mjs +21 -4
  1147. package/build-module/components/provider/index.mjs.map +3 -3
  1148. package/build-module/components/provider/with-registry-provider.mjs +1 -1
  1149. package/build-module/components/provider/with-registry-provider.mjs.map +1 -1
  1150. package/build-module/components/publish-date-time-picker/index.mjs +1 -1
  1151. package/build-module/components/publish-date-time-picker/index.mjs.map +1 -1
  1152. package/build-module/components/recursion-provider/index.mjs +1 -1
  1153. package/build-module/components/recursion-provider/index.mjs.map +1 -1
  1154. package/build-module/components/resizable-box-popover/index.mjs +1 -1
  1155. package/build-module/components/resizable-box-popover/index.mjs.map +1 -1
  1156. package/build-module/components/resolution-tool/index.mjs +1 -1
  1157. package/build-module/components/resolution-tool/index.mjs.map +1 -1
  1158. package/build-module/components/responsive-block-control/index.mjs +1 -1
  1159. package/build-module/components/responsive-block-control/index.mjs.map +1 -1
  1160. package/build-module/components/responsive-block-control/label.mjs +1 -1
  1161. package/build-module/components/responsive-block-control/label.mjs.map +1 -1
  1162. package/build-module/components/rich-text/content.mjs +1 -1
  1163. package/build-module/components/rich-text/content.mjs.map +1 -1
  1164. package/build-module/components/rich-text/event-listeners/input-rules.mjs +4 -2
  1165. package/build-module/components/rich-text/event-listeners/input-rules.mjs.map +2 -2
  1166. package/build-module/components/rich-text/format-edit.mjs +1 -1
  1167. package/build-module/components/rich-text/format-edit.mjs.map +1 -1
  1168. package/build-module/components/rich-text/format-toolbar/index.mjs +1 -1
  1169. package/build-module/components/rich-text/format-toolbar/index.mjs.map +1 -1
  1170. package/build-module/components/rich-text/format-toolbar-container.mjs +1 -1
  1171. package/build-module/components/rich-text/format-toolbar-container.mjs.map +1 -1
  1172. package/build-module/components/rich-text/get-rich-text-values.mjs +1 -1
  1173. package/build-module/components/rich-text/get-rich-text-values.mjs.map +1 -1
  1174. package/build-module/components/rich-text/index.mjs +1 -1
  1175. package/build-module/components/rich-text/index.mjs.map +1 -1
  1176. package/build-module/components/rich-text/multiline.mjs +1 -1
  1177. package/build-module/components/rich-text/multiline.mjs.map +1 -1
  1178. package/build-module/components/rich-text/toolbar-button.mjs +1 -1
  1179. package/build-module/components/rich-text/toolbar-button.mjs.map +1 -1
  1180. package/build-module/components/rich-text/utils.mjs +1 -1
  1181. package/build-module/components/rich-text/utils.mjs.map +1 -1
  1182. package/build-module/components/rich-text/with-deprecations.mjs +1 -1
  1183. package/build-module/components/rich-text/with-deprecations.mjs.map +1 -1
  1184. package/build-module/components/skip-to-selected-block/index.mjs +1 -1
  1185. package/build-module/components/skip-to-selected-block/index.mjs.map +1 -1
  1186. package/build-module/components/spacing-sizes-control/index.mjs +1 -1
  1187. package/build-module/components/spacing-sizes-control/index.mjs.map +1 -1
  1188. package/build-module/components/spacing-sizes-control/input-controls/axial.mjs +1 -1
  1189. package/build-module/components/spacing-sizes-control/input-controls/axial.mjs.map +1 -1
  1190. package/build-module/components/spacing-sizes-control/input-controls/separated.mjs +1 -1
  1191. package/build-module/components/spacing-sizes-control/input-controls/separated.mjs.map +1 -1
  1192. package/build-module/components/spacing-sizes-control/input-controls/single.mjs +1 -1
  1193. package/build-module/components/spacing-sizes-control/input-controls/single.mjs.map +1 -1
  1194. package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.mjs +1 -1
  1195. package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.mjs.map +1 -1
  1196. package/build-module/components/spacing-sizes-control/linked-button.mjs +1 -1
  1197. package/build-module/components/spacing-sizes-control/linked-button.mjs.map +1 -1
  1198. package/build-module/components/tabbed-sidebar/index.mjs +1 -1
  1199. package/build-module/components/tabbed-sidebar/index.mjs.map +1 -1
  1200. package/build-module/components/text-alignment-control/index.mjs +1 -1
  1201. package/build-module/components/text-alignment-control/index.mjs.map +1 -1
  1202. package/build-module/components/text-decoration-control/index.mjs +1 -1
  1203. package/build-module/components/text-decoration-control/index.mjs.map +1 -1
  1204. package/build-module/components/text-indent-control/index.mjs +1 -1
  1205. package/build-module/components/text-indent-control/index.mjs.map +1 -1
  1206. package/build-module/components/text-transform-control/index.mjs +1 -1
  1207. package/build-module/components/text-transform-control/index.mjs.map +1 -1
  1208. package/build-module/components/typewriter/index.mjs +1 -1
  1209. package/build-module/components/typewriter/index.mjs.map +1 -1
  1210. package/build-module/components/unit-control/index.mjs +1 -1
  1211. package/build-module/components/unit-control/index.mjs.map +1 -1
  1212. package/build-module/components/url-input/button.mjs +1 -1
  1213. package/build-module/components/url-input/button.mjs.map +1 -1
  1214. package/build-module/components/url-input/index.mjs +1 -1
  1215. package/build-module/components/url-input/index.mjs.map +1 -1
  1216. package/build-module/components/url-popover/image-url-input-ui.mjs +1 -1
  1217. package/build-module/components/url-popover/image-url-input-ui.mjs.map +1 -1
  1218. package/build-module/components/url-popover/index.mjs +1 -1
  1219. package/build-module/components/url-popover/index.mjs.map +1 -1
  1220. package/build-module/components/url-popover/link-editor.mjs +1 -1
  1221. package/build-module/components/url-popover/link-editor.mjs.map +1 -1
  1222. package/build-module/components/url-popover/link-viewer-url.mjs +1 -1
  1223. package/build-module/components/url-popover/link-viewer-url.mjs.map +1 -1
  1224. package/build-module/components/url-popover/link-viewer.mjs +1 -1
  1225. package/build-module/components/url-popover/link-viewer.mjs.map +1 -1
  1226. package/build-module/components/use-block-drop-zone/index.mjs.map +1 -1
  1227. package/build-module/components/warning/index.mjs +1 -1
  1228. package/build-module/components/warning/index.mjs.map +1 -1
  1229. package/build-module/components/writing-flow/index.mjs +1 -1
  1230. package/build-module/components/writing-flow/index.mjs.map +1 -1
  1231. package/build-module/components/writing-flow/use-arrow-nav.mjs.map +1 -1
  1232. package/build-module/components/writing-flow/use-tab-nav.mjs +13 -28
  1233. package/build-module/components/writing-flow/use-tab-nav.mjs.map +4 -4
  1234. package/build-module/components/writing-mode-control/index.mjs +1 -1
  1235. package/build-module/components/writing-mode-control/index.mjs.map +1 -1
  1236. package/build-module/hooks/align.mjs +1 -1
  1237. package/build-module/hooks/align.mjs.map +1 -1
  1238. package/build-module/hooks/allowed-blocks.mjs +1 -1
  1239. package/build-module/hooks/allowed-blocks.mjs.map +1 -1
  1240. package/build-module/hooks/anchor.mjs +1 -1
  1241. package/build-module/hooks/anchor.mjs.map +1 -1
  1242. package/build-module/hooks/auto-inspector-controls.mjs +1 -1
  1243. package/build-module/hooks/auto-inspector-controls.mjs.map +1 -1
  1244. package/build-module/hooks/background.mjs +1 -1
  1245. package/build-module/hooks/background.mjs.map +1 -1
  1246. package/build-module/hooks/block-bindings.mjs +1 -1
  1247. package/build-module/hooks/block-bindings.mjs.map +1 -1
  1248. package/build-module/hooks/block-fields/fields-dropdown-menu.mjs +1 -1
  1249. package/build-module/hooks/block-fields/fields-dropdown-menu.mjs.map +1 -1
  1250. package/build-module/hooks/block-fields/index.mjs +1 -1
  1251. package/build-module/hooks/block-fields/index.mjs.map +1 -1
  1252. package/build-module/hooks/block-fields/link/index.mjs +1 -1
  1253. package/build-module/hooks/block-fields/link/index.mjs.map +1 -1
  1254. package/build-module/hooks/block-fields/media/index.mjs +1 -1
  1255. package/build-module/hooks/block-fields/media/index.mjs.map +1 -1
  1256. package/build-module/hooks/block-fields/rich-text/index.mjs +1 -1
  1257. package/build-module/hooks/block-fields/rich-text/index.mjs.map +1 -1
  1258. package/build-module/hooks/block-hooks.mjs +1 -1
  1259. package/build-module/hooks/block-hooks.mjs.map +1 -1
  1260. package/build-module/hooks/block-style-variation.mjs +1 -1
  1261. package/build-module/hooks/block-style-variation.mjs.map +1 -1
  1262. package/build-module/hooks/border.mjs +2 -46
  1263. package/build-module/hooks/border.mjs.map +3 -3
  1264. package/build-module/hooks/custom-class-name.mjs +1 -1
  1265. package/build-module/hooks/custom-class-name.mjs.map +1 -1
  1266. package/build-module/hooks/custom-css.mjs +1 -1
  1267. package/build-module/hooks/custom-css.mjs.map +1 -1
  1268. package/build-module/hooks/dimensions.mjs +1 -1
  1269. package/build-module/hooks/dimensions.mjs.map +1 -1
  1270. package/build-module/hooks/duotone.mjs +1 -1
  1271. package/build-module/hooks/duotone.mjs.map +1 -1
  1272. package/build-module/hooks/elements.mjs +1 -1
  1273. package/build-module/hooks/elements.mjs.map +1 -1
  1274. package/build-module/hooks/fit-text.mjs +1 -1
  1275. package/build-module/hooks/fit-text.mjs.map +1 -1
  1276. package/build-module/hooks/font-size.mjs +1 -1
  1277. package/build-module/hooks/font-size.mjs.map +1 -1
  1278. package/build-module/hooks/grid-visualizer.mjs +1 -1
  1279. package/build-module/hooks/grid-visualizer.mjs.map +2 -2
  1280. package/build-module/hooks/layout-child.mjs +1 -1
  1281. package/build-module/hooks/layout-child.mjs.map +1 -1
  1282. package/build-module/hooks/layout.mjs +1 -1
  1283. package/build-module/hooks/layout.mjs.map +1 -1
  1284. package/build-module/hooks/line-height.mjs +1 -1
  1285. package/build-module/hooks/line-height.mjs.map +1 -1
  1286. package/build-module/hooks/list-view.mjs +1 -1
  1287. package/build-module/hooks/list-view.mjs.map +1 -1
  1288. package/build-module/hooks/position.mjs +2 -2
  1289. package/build-module/hooks/position.mjs.map +3 -3
  1290. package/build-module/hooks/spacing-visualizer.mjs +1 -1
  1291. package/build-module/hooks/spacing-visualizer.mjs.map +1 -1
  1292. package/build-module/hooks/states.mjs +1 -1
  1293. package/build-module/hooks/states.mjs.map +1 -1
  1294. package/build-module/hooks/style.mjs +4 -3
  1295. package/build-module/hooks/style.mjs.map +3 -3
  1296. package/build-module/hooks/text-align.mjs +1 -1
  1297. package/build-module/hooks/text-align.mjs.map +1 -1
  1298. package/build-module/hooks/typography.mjs +1 -1
  1299. package/build-module/hooks/typography.mjs.map +1 -1
  1300. package/build-module/hooks/utils.mjs +1 -1
  1301. package/build-module/hooks/utils.mjs.map +1 -1
  1302. package/build-module/layouts/constrained.mjs +1 -1
  1303. package/build-module/layouts/constrained.mjs.map +1 -1
  1304. package/build-module/layouts/flex.mjs +4 -1
  1305. package/build-module/layouts/flex.mjs.map +3 -3
  1306. package/build-module/layouts/grid.mjs +1 -1
  1307. package/build-module/layouts/grid.mjs.map +1 -1
  1308. package/build-style/content-rtl.css +14 -14
  1309. package/build-style/content.css +14 -14
  1310. package/build-style/style-rtl.css +15 -44
  1311. package/build-style/style.css +15 -44
  1312. package/build-types/components/block-context/index.d.ts.map +1 -1
  1313. package/build-types/components/block-visibility/constants.d.ts +1 -1
  1314. package/package.json +41 -43
  1315. package/src/autocompleters/test/block.js +1 -0
  1316. package/src/components/alignment-control/test/__snapshots__/{index.js.snap → index.jsdom.test.jsx.snap} +30 -12
  1317. package/src/components/background-image-control/README.md +1 -1
  1318. package/src/components/background-image-control/{index.js → index.jsx} +32 -1
  1319. package/src/components/background-image-control/style.scss +5 -3
  1320. package/src/components/block-alignment-control/test/__snapshots__/{index.js.snap → index.jsdom.test.jsx.snap} +65 -10
  1321. package/src/components/block-edit/{edit.js → edit.jsx} +1 -1
  1322. package/src/components/block-icon/test/__snapshots__/{index.js.snap → index.jsdom.test.jsx.snap} +6 -2
  1323. package/src/components/block-inspector/{index.js → index.jsx} +8 -13
  1324. package/src/components/block-list/content.scss +4 -1
  1325. package/src/components/block-list/use-block-props/use-is-hovered.js +24 -5
  1326. package/src/components/block-manager/style.scss +2 -0
  1327. package/src/components/block-mover/test/mover-description.js +1 -0
  1328. package/src/components/block-styles/test/utils.js +1 -0
  1329. package/src/components/block-switcher/test/use-transformed.patterns.js +1 -0
  1330. package/src/components/block-switcher/test/utils.js +1 -0
  1331. package/src/components/block-toolbar/style.scss +1 -1
  1332. package/src/components/block-variation-picker/content.scss +5 -3
  1333. package/src/components/block-vertical-alignment-control/test/__snapshots__/{index.js.snap → index.jsdom.test.jsx.snap} +52 -8
  1334. package/src/components/block-visibility/constants.ts +1 -1
  1335. package/src/components/block-visibility/test/utils.js +2 -1
  1336. package/src/components/border-radius-control/test/utils.js +1 -0
  1337. package/src/components/button-block-appender/content.scss +1 -1
  1338. package/src/components/color-palette/test/__snapshots__/{control.js.snap → control.jsdom.test.jsx.snap} +6 -2
  1339. package/src/components/colors/test/utils.js +1 -0
  1340. package/src/components/dimensions-tool/test/utils.js +1 -0
  1341. package/src/components/font-sizes/test/fluid-utils.js +1 -0
  1342. package/src/components/font-sizes/test/utils.js +1 -0
  1343. package/src/components/global-styles/{background-panel.js → background-panel.jsx} +2 -2
  1344. package/src/components/global-styles/{border-panel.js → border-panel.jsx} +17 -40
  1345. package/src/components/global-styles/{image-settings-panel.js → image-settings-panel.jsx} +1 -1
  1346. package/src/components/global-styles/test/{background-panel.js → background-panel.jsdom.test.jsx} +1 -1
  1347. package/src/components/global-styles/test/{border-panel.js → border-panel.jsdom.test.jsx} +97 -0
  1348. package/src/components/global-styles/test/{inherited-value-context-core.js → inherited-value-context-core.jsdom.test.js} +1 -1
  1349. package/src/components/global-styles/test/{inherited-value-context.js → inherited-value-context.jsdom.test.jsx} +1 -1
  1350. package/src/components/global-styles/test/{typography-panel.js → typography-panel.jsdom.test.jsx} +1 -1
  1351. package/src/components/global-styles/test/typography-utils.js +1 -0
  1352. package/src/components/global-styles/test/utils.js +1 -0
  1353. package/src/components/iframe/{index.js → index.jsx} +3 -3
  1354. package/src/components/image-editor/test/index.js +1 -0
  1355. package/src/components/inserter/hooks/use-patterns-paging.js +1 -1
  1356. package/src/components/inserter/{menu.js → menu.jsx} +1 -1
  1357. package/src/components/inserter/style.scss +2 -6
  1358. package/src/components/inserter/test/get-appender-label.js +12 -11
  1359. package/src/components/inserter/test/search-items.js +1 -0
  1360. package/src/components/inserter-draggable-blocks/{index.js → index.jsx} +1 -1
  1361. package/src/components/inserter-list-item/style.scss +1 -0
  1362. package/src/components/inspector-controls/groups.js +2 -0
  1363. package/src/components/inspector-controls-tabs/{styles-tab.js → styles-tab.jsx} +1 -4
  1364. package/src/components/link-control/{index.js → index.jsx} +3 -0
  1365. package/src/components/link-control/{search-input.js → search-input.jsx} +1 -1
  1366. package/src/components/link-control/style.scss +1 -1
  1367. package/src/components/link-control/test/is-url-like.js +1 -0
  1368. package/src/components/list-view/{block.js → block.jsx} +5 -4
  1369. package/src/components/list-view/test/use-list-view-drop-zone.js +1 -0
  1370. package/src/components/list-view/test/utils.js +1 -0
  1371. package/src/components/list-view/use-list-view-drop-zone.js +1 -1
  1372. package/src/components/media-placeholder/test/get-computed-accept-attribute.js +1 -0
  1373. package/src/components/preset-input-control/test/utils.js +1 -0
  1374. package/src/components/provider/{index.js → index.jsx} +38 -0
  1375. package/src/components/responsive-block-control/style.scss +1 -0
  1376. package/src/components/rich-text/content.scss +6 -0
  1377. package/src/components/rich-text/event-listeners/input-rules.js +7 -2
  1378. package/src/components/spacing-sizes-control/test/utils.js +1 -0
  1379. package/src/components/url-input/test/{index.js → index.jsdom.test.jsx} +9 -3
  1380. package/src/components/use-block-drop-zone/index.js +2 -2
  1381. package/src/components/use-block-drop-zone/test/index.js +1 -0
  1382. package/src/components/use-on-block-drop/test/index.js +28 -31
  1383. package/src/components/writing-flow/use-arrow-nav.js +2 -2
  1384. package/src/components/writing-flow/{use-tab-nav.js → use-tab-nav.jsx} +15 -42
  1385. package/src/hooks/block-hooks.scss +0 -9
  1386. package/src/hooks/{border.js → border.jsx} +0 -53
  1387. package/src/hooks/{grid-visualizer.js → grid-visualizer.jsx} +1 -1
  1388. package/src/hooks/{position.js → position.jsx} +1 -1
  1389. package/src/hooks/{style.js → style.jsx} +3 -2
  1390. package/src/hooks/test/allowed-blocks.js +1 -0
  1391. package/src/hooks/test/gap.js +1 -0
  1392. package/src/hooks/test/generate-fields-from-attributes.js +1 -0
  1393. package/src/hooks/test/generated-class-name.js +1 -0
  1394. package/src/hooks/test/metadata.js +1 -0
  1395. package/src/hooks/test/preset-round-trip.js +2 -0
  1396. package/src/hooks/test/{settings.js → settings.jsx} +1 -0
  1397. package/src/hooks/test/state-utils.js +1 -0
  1398. package/src/layouts/{flex.js → flex.jsx} +7 -0
  1399. package/src/layouts/test/{flex.js → flex.jsdom.test.jsx} +45 -0
  1400. package/src/layouts/test/utils.js +1 -0
  1401. package/src/store/test/array.js +1 -0
  1402. package/src/store/test/get-block-settings.js +1 -0
  1403. package/src/store/test/performance.js +2 -1
  1404. package/src/store/test/private-actions.js +1 -0
  1405. package/src/store/test/private-selectors.js +13 -3
  1406. package/src/store/test/reducer.js +37 -8
  1407. package/src/utils/test/block-bindings.js +1 -0
  1408. package/src/utils/test/color-values.js +1 -0
  1409. package/src/utils/test/format-font-style.js +1 -0
  1410. package/src/utils/test/format-font-weight.js +1 -0
  1411. package/src/utils/test/get-font-styles-and-weights.js +1 -0
  1412. package/src/utils/test/math.js +1 -0
  1413. package/src/utils/test/object.js +1 -0
  1414. package/src/utils/test/pasting.js +1 -0
  1415. package/src/utils/test/selection.js +1 -0
  1416. package/src/utils/test/sorting.js +1 -0
  1417. package/src/utils/test/transform-styles.js +2 -1
  1418. /package/src/autocompleters/{block.js → block.jsx} +0 -0
  1419. /package/src/components/alignment-control/{index.js → index.jsx} +0 -0
  1420. /package/src/components/alignment-control/test/{index.js → index.jsdom.test.jsx} +0 -0
  1421. /package/src/components/alignment-control/{ui.js → ui.jsx} +0 -0
  1422. /package/src/components/autocomplete/{index.js → index.jsx} +0 -0
  1423. /package/src/components/background-image-control/test/{index.js → index.jsdom.test.js} +0 -0
  1424. /package/src/components/block-alignment-control/{index.js → index.jsx} +0 -0
  1425. /package/src/components/block-alignment-control/test/{index.js → index.jsdom.test.jsx} +0 -0
  1426. /package/src/components/block-alignment-control/{ui.js → ui.jsx} +0 -0
  1427. /package/src/components/block-alignment-matrix-control/{index.js → index.jsx} +0 -0
  1428. /package/src/components/block-allowed-blocks/{allowed-blocks-control.js → allowed-blocks-control.jsx} +0 -0
  1429. /package/src/components/block-allowed-blocks/{modal.js → modal.jsx} +0 -0
  1430. /package/src/components/block-bindings/{attribute-control.js → attribute-control.jsx} +0 -0
  1431. /package/src/components/block-bindings/{source-fields-list.js → source-fields-list.jsx} +0 -0
  1432. /package/src/components/block-bindings/test/{use-block-bindings-utils.js → use-block-bindings-utils.jsdom.test.js} +0 -0
  1433. /package/src/components/block-breadcrumb/{index.js → index.jsx} +0 -0
  1434. /package/src/components/block-breadcrumb/test/__snapshots__/{index.js.snap → index.jsdom.test.jsx.snap} +0 -0
  1435. /package/src/components/block-breadcrumb/test/{index.js → index.jsdom.test.jsx} +0 -0
  1436. /package/src/components/block-canvas/{index.js → index.jsx} +0 -0
  1437. /package/src/components/block-card/{index.js → index.jsx} +0 -0
  1438. /package/src/components/block-compare/{block-view.js → block-view.jsx} +0 -0
  1439. /package/src/components/block-compare/{index.js → index.jsx} +0 -0
  1440. /package/src/components/block-compare/test/__snapshots__/{block-view.js.snap → block-view.jsdom.test.jsx.snap} +0 -0
  1441. /package/src/components/block-compare/test/{block-view.js → block-view.jsdom.test.jsx} +0 -0
  1442. /package/src/components/block-context/{index.js → index.jsx} +0 -0
  1443. /package/src/components/block-controls/{fill.js → fill.jsx} +0 -0
  1444. /package/src/components/block-controls/{index.js → index.jsx} +0 -0
  1445. /package/src/components/block-controls/{slot.js → slot.jsx} +0 -0
  1446. /package/src/components/block-controls/test/{index.js → index.jsdom.test.jsx} +0 -0
  1447. /package/src/components/block-draggable/{draggable-chip.js → draggable-chip.jsx} +0 -0
  1448. /package/src/components/block-draggable/{index.js → index.jsx} +0 -0
  1449. /package/src/components/block-edit/{index.js → index.jsx} +0 -0
  1450. /package/src/components/block-edit/{multiple-usage-warning.js → multiple-usage-warning.jsx} +0 -0
  1451. /package/src/components/block-edit/test/{edit.js → edit.jsdom.test.jsx} +0 -0
  1452. /package/src/components/block-edit-visually-button/{index.js → index.jsx} +0 -0
  1453. /package/src/components/block-full-height-alignment-control/{index.js → index.jsx} +0 -0
  1454. /package/src/components/block-heading-level-dropdown/{heading-level-icon.js → heading-level-icon.jsx} +0 -0
  1455. /package/src/components/block-heading-level-dropdown/{index.js → index.jsx} +0 -0
  1456. /package/src/components/block-icon/{index.js → index.jsx} +0 -0
  1457. /package/src/components/block-icon/test/{index.js → index.jsdom.test.jsx} +0 -0
  1458. /package/src/components/block-inspector/{edit-contents.js → edit-contents.jsx} +0 -0
  1459. /package/src/components/block-keyboard-shortcuts/{index.js → index.jsx} +0 -0
  1460. /package/src/components/block-list/{block-crash-warning.js → block-crash-warning.jsx} +0 -0
  1461. /package/src/components/block-list/{block-html.js → block-html.jsx} +0 -0
  1462. /package/src/components/block-list/{block-invalid-warning.js → block-invalid-warning.jsx} +0 -0
  1463. /package/src/components/block-list/{block.js → block.jsx} +0 -0
  1464. /package/src/components/block-list/{index.js → index.jsx} +0 -0
  1465. /package/src/components/block-list/{layout.js → layout.jsx} +0 -0
  1466. /package/src/components/block-list/{subdirectory-icon.js → subdirectory-icon.jsx} +0 -0
  1467. /package/src/components/block-list/{zoom-out-separator.js → zoom-out-separator.jsx} +0 -0
  1468. /package/src/components/block-list-appender/{index.js → index.jsx} +0 -0
  1469. /package/src/components/block-lock/{menu-item.js → menu-item.jsx} +0 -0
  1470. /package/src/components/block-lock/{modal.js → modal.jsx} +0 -0
  1471. /package/src/components/block-lock/{toolbar.js → toolbar.jsx} +0 -0
  1472. /package/src/components/block-manager/{category.js → category.jsx} +0 -0
  1473. /package/src/components/block-manager/{checklist.js → checklist.jsx} +0 -0
  1474. /package/src/components/block-manager/{index.js → index.jsx} +0 -0
  1475. /package/src/components/block-mover/{button.js → button.jsx} +0 -0
  1476. /package/src/components/block-mover/{index.js → index.jsx} +0 -0
  1477. /package/src/components/block-navigation/{dropdown.js → dropdown.jsx} +0 -0
  1478. /package/src/components/block-parent-selector/{index.js → index.jsx} +0 -0
  1479. /package/src/components/block-pattern-setup/{index.js → index.jsx} +0 -0
  1480. /package/src/components/block-pattern-setup/{setup-toolbar.js → setup-toolbar.jsx} +0 -0
  1481. /package/src/components/block-patterns-list/{index.js → index.jsx} +0 -0
  1482. /package/src/components/block-patterns-paging/{index.js → index.jsx} +0 -0
  1483. /package/src/components/block-popover/{cover.js → cover.jsx} +0 -0
  1484. /package/src/components/block-popover/{drop-zone.js → drop-zone.jsx} +0 -0
  1485. /package/src/components/block-popover/{inbetween.js → inbetween.jsx} +0 -0
  1486. /package/src/components/block-popover/{index.js → index.jsx} +0 -0
  1487. /package/src/components/block-preview/{auto.js → auto.jsx} +0 -0
  1488. /package/src/components/block-preview/{index.js → index.jsx} +0 -0
  1489. /package/src/components/block-preview/test/{index.js → index.jsdom.test.jsx} +0 -0
  1490. /package/src/components/block-quick-navigation/{index.js → index.jsx} +0 -0
  1491. /package/src/components/block-removal-warning-modal/{index.js → index.jsx} +0 -0
  1492. /package/src/components/block-rename/{modal.js → modal.jsx} +0 -0
  1493. /package/src/components/block-rename/{rename-control.js → rename-control.jsx} +0 -0
  1494. /package/src/components/block-selection-clearer/{index.js → index.jsx} +0 -0
  1495. /package/src/components/block-selection-clearer/test/{index.js → index.jsdom.test.jsx} +0 -0
  1496. /package/src/components/block-settings-menu/{block-html-convert-button.js → block-html-convert-button.jsx} +0 -0
  1497. /package/src/components/block-settings-menu/{block-mode-toggle.js → block-mode-toggle.jsx} +0 -0
  1498. /package/src/components/block-settings-menu/{block-parent-selector-menu-item.js → block-parent-selector-menu-item.jsx} +0 -0
  1499. /package/src/components/block-settings-menu/{block-settings-dropdown.js → block-settings-dropdown.jsx} +0 -0
  1500. /package/src/components/block-settings-menu/{index.js → index.jsx} +0 -0
  1501. /package/src/components/block-settings-menu/test/{block-mode-toggle.js → block-mode-toggle.jsdom.test.jsx} +0 -0
  1502. /package/src/components/block-settings-menu-controls/{index.js → index.jsx} +0 -0
  1503. /package/src/components/block-styles/{index.js → index.jsx} +0 -0
  1504. /package/src/components/block-styles/{menu-items.js → menu-items.jsx} +0 -0
  1505. /package/src/components/block-switcher/{block-styles-menu.js → block-styles-menu.jsx} +0 -0
  1506. /package/src/components/block-switcher/{block-transformations-menu.js → block-transformations-menu.jsx} +0 -0
  1507. /package/src/components/block-switcher/{block-variation-transformations.js → block-variation-transformations.jsx} +0 -0
  1508. /package/src/components/block-switcher/{index.js → index.jsx} +0 -0
  1509. /package/src/components/block-switcher/{pattern-transformations-menu.js → pattern-transformations-menu.jsx} +0 -0
  1510. /package/src/components/block-switcher/{preview-block-popover.js → preview-block-popover.jsx} +0 -0
  1511. /package/src/components/block-switcher/test/{index.js → index.jsdom.test.jsx} +0 -0
  1512. /package/src/components/block-title/test/{index.js → index.jsdom.test.jsx} +0 -0
  1513. /package/src/components/block-toolbar/{block-styles-dropdown.js → block-styles-dropdown.jsx} +0 -0
  1514. /package/src/components/block-toolbar/{block-toolbar-icon.js → block-toolbar-icon.jsx} +0 -0
  1515. /package/src/components/block-toolbar/{change-design.js → change-design.jsx} +0 -0
  1516. /package/src/components/block-toolbar/{edit-section-button.js → edit-section-button.jsx} +0 -0
  1517. /package/src/components/block-toolbar/{index.js → index.jsx} +0 -0
  1518. /package/src/components/block-toolbar/{pattern-overrides-dropdown.js → pattern-overrides-dropdown.jsx} +0 -0
  1519. /package/src/components/block-toolbar/{switch-section-style.js → switch-section-style.jsx} +0 -0
  1520. /package/src/components/block-toolbar/test/{block-toolbar-icon.js → block-toolbar-icon.jsdom.test.jsx} +0 -0
  1521. /package/src/components/block-tools/{block-toolbar-popover.js → block-toolbar-popover.jsx} +0 -0
  1522. /package/src/components/block-tools/{empty-block-inserter.js → empty-block-inserter.jsx} +0 -0
  1523. /package/src/components/block-tools/{index.js → index.jsx} +0 -0
  1524. /package/src/components/block-tools/{insertion-point.js → insertion-point.jsx} +0 -0
  1525. /package/src/components/block-tools/{zoom-out-mode-inserter-button.js → zoom-out-mode-inserter-button.jsx} +0 -0
  1526. /package/src/components/block-tools/{zoom-out-mode-inserters.js → zoom-out-mode-inserters.jsx} +0 -0
  1527. /package/src/components/block-types-list/{index.js → index.jsx} +0 -0
  1528. /package/src/components/block-variation-picker/{index.js → index.jsx} +0 -0
  1529. /package/src/components/block-variation-transforms/{index.js → index.jsx} +0 -0
  1530. /package/src/components/block-vertical-alignment-control/{index.js → index.jsx} +0 -0
  1531. /package/src/components/block-vertical-alignment-control/test/{index.js → index.jsdom.test.jsx} +0 -0
  1532. /package/src/components/block-vertical-alignment-control/{ui.js → ui.jsx} +0 -0
  1533. /package/src/components/block-visibility/{modal.js → modal.jsx} +0 -0
  1534. /package/src/components/block-visibility/test/{use-block-visibility.js → use-block-visibility.jsdom.test.js} +0 -0
  1535. /package/src/components/block-visibility/{viewport-menu-item.js → viewport-menu-item.jsx} +0 -0
  1536. /package/src/components/block-visibility/{viewport-toolbar.js → viewport-toolbar.jsx} +0 -0
  1537. /package/src/components/block-visibility/{viewport-visibility-info.js → viewport-visibility-info.jsx} +0 -0
  1538. /package/src/components/border-radius-control/{index.js → index.jsx} +0 -0
  1539. /package/src/components/border-radius-control/{linked-button.js → linked-button.jsx} +0 -0
  1540. /package/src/components/border-radius-control/test/{index.js → index.jsdom.test.jsx} +0 -0
  1541. /package/src/components/button-block-appender/{index.js → index.jsx} +0 -0
  1542. /package/src/components/child-layout-control/{index.js → index.jsx} +0 -0
  1543. /package/src/components/child-layout-control/test/{index.js → index.jsdom.test.jsx} +0 -0
  1544. /package/src/components/color-palette/{control.js → control.jsx} +0 -0
  1545. /package/src/components/color-palette/test/{control.js → control.jsdom.test.jsx} +0 -0
  1546. /package/src/components/color-palette/{with-color-context.js → with-color-context.jsx} +0 -0
  1547. /package/src/components/color-style-selector/{index.js → index.jsx} +0 -0
  1548. /package/src/components/colors/test/{with-colors.js → with-colors.jsdom.test.jsx} +0 -0
  1549. /package/src/components/colors/{with-colors.js → with-colors.jsx} +0 -0
  1550. /package/src/components/colors-gradients/{control.js → control.jsx} +0 -0
  1551. /package/src/components/colors-gradients/{dropdown.js → dropdown.jsx} +0 -0
  1552. /package/src/components/colors-gradients/{panel-color-gradient-settings.js → panel-color-gradient-settings.jsx} +0 -0
  1553. /package/src/components/colors-gradients/test/{control.js → control.jsdom.test.jsx} +0 -0
  1554. /package/src/components/contrast-checker/{index.js → index.jsx} +0 -0
  1555. /package/src/components/contrast-checker/test/{index.js → index.jsdom.test.jsx} +0 -0
  1556. /package/src/components/convert-to-group-buttons/{index.js → index.jsx} +0 -0
  1557. /package/src/components/convert-to-group-buttons/{toolbar.js → toolbar.jsx} +0 -0
  1558. /package/src/components/copy-handler/{index.js → index.jsx} +0 -0
  1559. /package/src/components/date-format-picker/{index.js → index.jsx} +0 -0
  1560. /package/src/components/default-block-appender/{index.js → index.jsx} +0 -0
  1561. /package/src/components/default-block-appender/test/__snapshots__/{index.js.snap → index.jsdom.test.jsx.snap} +0 -0
  1562. /package/src/components/default-block-appender/test/{index.js → index.jsdom.test.jsx} +0 -0
  1563. /package/src/components/dimension-control/{index.js → index.jsx} +0 -0
  1564. /package/src/components/dimensions-tool/{aspect-ratio-tool.js → aspect-ratio-tool.jsx} +0 -0
  1565. /package/src/components/dimensions-tool/{index.js → index.jsx} +0 -0
  1566. /package/src/components/dimensions-tool/{scale-tool.js → scale-tool.jsx} +0 -0
  1567. /package/src/components/dimensions-tool/test/{index.js → index.jsdom.test.jsx} +0 -0
  1568. /package/src/components/dimensions-tool/{width-height-tool.js → width-height-tool.jsx} +0 -0
  1569. /package/src/components/duotone-control/{index.js → index.jsx} +0 -0
  1570. /package/src/components/duotone-control/test/{index.js → index.jsdom.test.jsx} +0 -0
  1571. /package/src/components/editable-text/{index.js → index.jsx} +0 -0
  1572. /package/src/components/editor-styles/{index.js → index.jsx} +0 -0
  1573. /package/src/components/fit-text-size-warning/{index.js → index.jsx} +0 -0
  1574. /package/src/components/font-appearance-control/{index.js → index.jsx} +0 -0
  1575. /package/src/components/font-family/{index.js → index.jsx} +0 -0
  1576. /package/src/components/font-sizes/{font-size-picker.js → font-size-picker.jsx} +0 -0
  1577. /package/src/components/font-sizes/{with-font-sizes.js → with-font-sizes.jsx} +0 -0
  1578. /package/src/components/global-styles/{advanced-panel.js → advanced-panel.jsx} +0 -0
  1579. /package/src/components/global-styles/{color-gradient-dropdown-item.js → color-gradient-dropdown-item.jsx} +0 -0
  1580. /package/src/components/global-styles/{color-panel.js → color-panel.jsx} +0 -0
  1581. /package/src/components/global-styles/{dimensions-panel.js → dimensions-panel.jsx} +0 -0
  1582. /package/src/components/global-styles/{filters-panel.js → filters-panel.jsx} +0 -0
  1583. /package/src/components/global-styles/inheritance/{index.js → index.jsx} +0 -0
  1584. /package/src/components/global-styles/inheritance/test/{index.js → index.jsdom.test.jsx} +0 -0
  1585. /package/src/components/global-styles/{shadow-panel-components.js → shadow-panel-components.jsx} +0 -0
  1586. /package/src/components/global-styles/{state-control-badges.js → state-control-badges.jsx} +0 -0
  1587. /package/src/components/global-styles/{state-control.js → state-control.jsx} +0 -0
  1588. /package/src/components/global-styles/test/{color-panel.js → color-panel.jsdom.test.jsx} +0 -0
  1589. /package/src/components/global-styles/test/{dimensions-panel.js → dimensions-panel.jsdom.test.jsx} +0 -0
  1590. /package/src/components/global-styles/test/{filters-panel.js → filters-panel.jsdom.test.jsx} +0 -0
  1591. /package/src/components/global-styles/test/{state-control-badges.js → state-control-badges.jsdom.test.jsx} +0 -0
  1592. /package/src/components/global-styles/test/{typography-panel-core.js → typography-panel-core.jsdom.test.jsx} +0 -0
  1593. /package/src/components/global-styles/{typography-panel.js → typography-panel.jsx} +0 -0
  1594. /package/src/components/grid/{grid-item-movers.js → grid-item-movers.jsx} +0 -0
  1595. /package/src/components/grid/{grid-item-resizer.js → grid-item-resizer.jsx} +0 -0
  1596. /package/src/components/grid/{grid-visualizer.js → grid-visualizer.jsx} +0 -0
  1597. /package/src/components/height-control/{index.js → index.jsx} +0 -0
  1598. /package/src/components/html-element-control/{index.js → index.jsx} +0 -0
  1599. /package/src/components/image-editor/{aspect-ratio-dropdown.js → aspect-ratio-dropdown.jsx} +0 -0
  1600. /package/src/components/image-editor/{context.js → context.jsx} +0 -0
  1601. /package/src/components/image-editor/{cropper.js → cropper.jsx} +0 -0
  1602. /package/src/components/image-editor/{form-controls.js → form-controls.jsx} +0 -0
  1603. /package/src/components/image-editor/{index.js → index.jsx} +0 -0
  1604. /package/src/components/image-editor/{rotation-button.js → rotation-button.jsx} +0 -0
  1605. /package/src/components/image-editor/{zoom-dropdown.js → zoom-dropdown.jsx} +0 -0
  1606. /package/src/components/image-size-control/{index.js → index.jsx} +0 -0
  1607. /package/src/components/image-size-control/test/{index.js → index.jsdom.test.jsx} +0 -0
  1608. /package/src/components/inner-blocks/{button-block-appender.js → button-block-appender.jsx} +0 -0
  1609. /package/src/components/inner-blocks/{default-block-appender.js → default-block-appender.jsx} +0 -0
  1610. /package/src/components/inner-blocks/{index.js → index.jsx} +0 -0
  1611. /package/src/components/inner-blocks/test/__snapshots__/{index.js.snap → index.jsdom.test.jsx.snap} +0 -0
  1612. /package/src/components/inner-blocks/test/{index.js → index.jsdom.test.jsx} +0 -0
  1613. /package/src/components/inner-content/{index.js → index.jsx} +0 -0
  1614. /package/src/components/inner-content/test/{index.js → index.jsdom.test.jsx} +0 -0
  1615. /package/src/components/inserter/block-patterns-explorer/{index.js → index.jsx} +0 -0
  1616. /package/src/components/inserter/block-patterns-explorer/{pattern-explorer-sidebar.js → pattern-explorer-sidebar.jsx} +0 -0
  1617. /package/src/components/inserter/block-patterns-explorer/{pattern-list.js → pattern-list.jsx} +0 -0
  1618. /package/src/components/inserter/block-patterns-tab/{index.js → index.jsx} +0 -0
  1619. /package/src/components/inserter/block-patterns-tab/{pattern-category-previews.js → pattern-category-previews.jsx} +0 -0
  1620. /package/src/components/inserter/block-patterns-tab/{patterns-filter.js → patterns-filter.jsx} +0 -0
  1621. /package/src/components/inserter/{block-types-tab.js → block-types-tab.jsx} +0 -0
  1622. /package/src/components/inserter/category-tabs/{index.js → index.jsx} +0 -0
  1623. /package/src/components/inserter/{index.js → index.jsx} +0 -0
  1624. /package/src/components/inserter/{library.js → library.jsx} +0 -0
  1625. /package/src/components/inserter/media-tab/{media-list.js → media-list.jsx} +0 -0
  1626. /package/src/components/inserter/media-tab/{media-panel.js → media-panel.jsx} +0 -0
  1627. /package/src/components/inserter/media-tab/{media-preview.js → media-preview.jsx} +0 -0
  1628. /package/src/components/inserter/media-tab/{media-tab.js → media-tab.jsx} +0 -0
  1629. /package/src/components/inserter/media-tab/test/{hooks.js → hooks.jsdom.test.js} +0 -0
  1630. /package/src/components/inserter/media-tab/test/{media-panel.js → media-panel.jsdom.test.jsx} +0 -0
  1631. /package/src/components/inserter/media-tab/{utils.js → utils.jsx} +0 -0
  1632. /package/src/components/inserter/{mobile-tab-navigation.js → mobile-tab-navigation.jsx} +0 -0
  1633. /package/src/components/inserter/{no-results.js → no-results.jsx} +0 -0
  1634. /package/src/components/inserter/{panel.js → panel.jsx} +0 -0
  1635. /package/src/components/inserter/{preview-panel.js → preview-panel.jsx} +0 -0
  1636. /package/src/components/inserter/{quick-inserter.js → quick-inserter.jsx} +0 -0
  1637. /package/src/components/inserter/{search-results.js → search-results.jsx} +0 -0
  1638. /package/src/components/inserter/{tips.js → tips.jsx} +0 -0
  1639. /package/src/components/inserter-list-item/{index.js → index.jsx} +0 -0
  1640. /package/src/components/inserter-listbox/{group.js → group.jsx} +0 -0
  1641. /package/src/components/inserter-listbox/{index.js → index.jsx} +0 -0
  1642. /package/src/components/inserter-listbox/{item.js → item.jsx} +0 -0
  1643. /package/src/components/inserter-listbox/{row.js → row.jsx} +0 -0
  1644. /package/src/components/inspector-controls/{block-support-slot-container.js → block-support-slot-container.jsx} +0 -0
  1645. /package/src/components/inspector-controls/{block-support-tools-panel.js → block-support-tools-panel.jsx} +0 -0
  1646. /package/src/components/inspector-controls/{fill.js → fill.jsx} +0 -0
  1647. /package/src/components/inspector-controls/{index.js → index.jsx} +0 -0
  1648. /package/src/components/inspector-controls/{last-item.js → last-item.jsx} +0 -0
  1649. /package/src/components/inspector-controls/{list-view-content-popover.js → list-view-content-popover.jsx} +0 -0
  1650. /package/src/components/inspector-controls/{slot.js → slot.jsx} +0 -0
  1651. /package/src/components/inspector-controls-tabs/{advanced-controls-panel.js → advanced-controls-panel.jsx} +0 -0
  1652. /package/src/components/inspector-controls-tabs/{content-tab.js → content-tab.jsx} +0 -0
  1653. /package/src/components/inspector-controls-tabs/{index.js → index.jsx} +0 -0
  1654. /package/src/components/inspector-controls-tabs/{position-controls-panel.js → position-controls-panel.jsx} +0 -0
  1655. /package/src/components/inspector-controls-tabs/{settings-tab.js → settings-tab.jsx} +0 -0
  1656. /package/src/components/inspector-popover-header/{index.js → index.jsx} +0 -0
  1657. /package/src/components/justify-content-control/{index.js → index.jsx} +0 -0
  1658. /package/src/components/justify-content-control/{ui.js → ui.jsx} +0 -0
  1659. /package/src/components/letter-spacing-control/{index.js → index.jsx} +0 -0
  1660. /package/src/components/line-height-control/{index.js → index.jsx} +0 -0
  1661. /package/src/components/line-height-control/test/{index.js → index.jsdom.test.jsx} +0 -0
  1662. /package/src/components/link-control/{link-preview.js → link-preview.jsx} +0 -0
  1663. /package/src/components/link-control/{search-create-button.js → search-create-button.jsx} +0 -0
  1664. /package/src/components/link-control/{search-item.js → search-item.jsx} +0 -0
  1665. /package/src/components/link-control/{search-results.js → search-results.jsx} +0 -0
  1666. /package/src/components/link-control/{settings-drawer.js → settings-drawer.jsx} +0 -0
  1667. /package/src/components/link-control/{settings.js → settings.jsx} +0 -0
  1668. /package/src/components/link-control/test/{index.js → index.jsdom.test.jsx} +0 -0
  1669. /package/src/components/link-control/test/{url-normalization.test.js → url-normalization.jsdom.test.jsx} +0 -0
  1670. /package/src/components/link-picker/{link-picker.js → link-picker.jsx} +0 -0
  1671. /package/src/components/link-picker/{link-preview.js → link-preview.jsx} +0 -0
  1672. /package/src/components/link-picker/test/{index.js → index.jsdom.test.jsx} +0 -0
  1673. /package/src/components/list-view/{appender.js → appender.jsx} +0 -0
  1674. /package/src/components/list-view/{aria-referenced-text.js → aria-referenced-text.jsx} +0 -0
  1675. /package/src/components/list-view/{block-contents.js → block-contents.jsx} +0 -0
  1676. /package/src/components/list-view/{block-select-button.js → block-select-button.jsx} +0 -0
  1677. /package/src/components/list-view/{branch.js → branch.jsx} +0 -0
  1678. /package/src/components/list-view/{drop-indicator.js → drop-indicator.jsx} +0 -0
  1679. /package/src/components/list-view/{expander.js → expander.jsx} +0 -0
  1680. /package/src/components/list-view/{index.js → index.jsx} +0 -0
  1681. /package/src/components/list-view/{leaf.js → leaf.jsx} +0 -0
  1682. /package/src/components/media-placeholder/{index.js → index.jsx} +0 -0
  1683. /package/src/components/media-placeholder/test/{index.js → index.jsdom.test.jsx} +0 -0
  1684. /package/src/components/media-replace-flow/{index.js → index.jsx} +0 -0
  1685. /package/src/components/media-replace-flow/test/{index.js → index.jsdom.test.jsx} +0 -0
  1686. /package/src/components/multi-selection-inspector/{index.js → index.jsx} +0 -0
  1687. /package/src/components/navigable-toolbar/{index.js → index.jsx} +0 -0
  1688. /package/src/components/observe-typing/{index.js → index.jsx} +0 -0
  1689. /package/src/components/panel-color-settings/{index.js → index.jsx} +0 -0
  1690. /package/src/components/panel-color-settings/test/{index.js → index.jsdom.test.jsx} +0 -0
  1691. /package/src/components/plain-text/{index.js → index.jsx} +0 -0
  1692. /package/src/components/preset-input-control/{custom-value-controls.js → custom-value-controls.jsx} +0 -0
  1693. /package/src/components/preset-input-control/{index.js → index.jsx} +0 -0
  1694. /package/src/components/preset-input-control/test/{index.js → index.jsdom.test.jsx} +0 -0
  1695. /package/src/components/provider/{block-refs-provider.js → block-refs-provider.jsx} +0 -0
  1696. /package/src/components/provider/test/{experimental-provider.js → experimental-provider.jsdom.test.jsx} +0 -0
  1697. /package/src/components/provider/test/{use-block-sync.js → use-block-sync.jsdom.test.jsx} +0 -0
  1698. /package/src/components/provider/{with-registry-provider.js → with-registry-provider.jsx} +0 -0
  1699. /package/src/components/publish-date-time-picker/{index.js → index.jsx} +0 -0
  1700. /package/src/components/recursion-provider/{index.js → index.jsx} +0 -0
  1701. /package/src/components/recursion-provider/test/{index.js → index.jsdom.test.jsx} +0 -0
  1702. /package/src/components/resizable-box-popover/{index.js → index.jsx} +0 -0
  1703. /package/src/components/resolution-tool/{index.js → index.jsx} +0 -0
  1704. /package/src/components/responsive-block-control/{index.js → index.jsx} +0 -0
  1705. /package/src/components/responsive-block-control/{label.js → label.jsx} +0 -0
  1706. /package/src/components/responsive-block-control/test/{index.js → index.jsdom.test.jsx} +0 -0
  1707. /package/src/components/rich-text/{content.js → content.jsx} +0 -0
  1708. /package/src/components/rich-text/{format-edit.js → format-edit.jsx} +0 -0
  1709. /package/src/components/rich-text/format-toolbar/{index.js → index.jsx} +0 -0
  1710. /package/src/components/rich-text/{format-toolbar-container.js → format-toolbar-container.jsx} +0 -0
  1711. /package/src/components/rich-text/{get-rich-text-values.js → get-rich-text-values.jsx} +0 -0
  1712. /package/src/components/rich-text/{index.js → index.jsx} +0 -0
  1713. /package/src/components/rich-text/{multiline.js → multiline.jsx} +0 -0
  1714. /package/src/components/rich-text/{toolbar-button.js → toolbar-button.jsx} +0 -0
  1715. /package/src/components/rich-text/{utils.js → utils.jsx} +0 -0
  1716. /package/src/components/rich-text/{with-deprecations.js → with-deprecations.jsx} +0 -0
  1717. /package/src/components/skip-to-selected-block/{index.js → index.jsx} +0 -0
  1718. /package/src/components/spacing-sizes-control/{index.js → index.jsx} +0 -0
  1719. /package/src/components/spacing-sizes-control/input-controls/{axial.js → axial.jsx} +0 -0
  1720. /package/src/components/spacing-sizes-control/input-controls/{separated.js → separated.jsx} +0 -0
  1721. /package/src/components/spacing-sizes-control/input-controls/{single.js → single.jsx} +0 -0
  1722. /package/src/components/spacing-sizes-control/input-controls/{spacing-input-control.js → spacing-input-control.jsx} +0 -0
  1723. /package/src/components/spacing-sizes-control/{linked-button.js → linked-button.jsx} +0 -0
  1724. /package/src/components/spacing-sizes-control/test/{index.js → index.jsdom.test.jsx} +0 -0
  1725. /package/src/components/tabbed-sidebar/{index.js → index.jsx} +0 -0
  1726. /package/src/components/text-alignment-control/{index.js → index.jsx} +0 -0
  1727. /package/src/components/text-decoration-control/{index.js → index.jsx} +0 -0
  1728. /package/src/components/text-indent-control/{index.js → index.jsx} +0 -0
  1729. /package/src/components/text-transform-control/{index.js → index.jsx} +0 -0
  1730. /package/src/components/typewriter/{index.js → index.jsx} +0 -0
  1731. /package/src/components/unit-control/{index.js → index.jsx} +0 -0
  1732. /package/src/components/url-input/{button.js → button.jsx} +0 -0
  1733. /package/src/components/url-input/{index.js → index.jsx} +0 -0
  1734. /package/src/components/url-input/test/{button.js → button.jsdom.test.jsx} +0 -0
  1735. /package/src/components/url-popover/{image-url-input-ui.js → image-url-input-ui.jsx} +0 -0
  1736. /package/src/components/url-popover/{index.js → index.jsx} +0 -0
  1737. /package/src/components/url-popover/{link-editor.js → link-editor.jsx} +0 -0
  1738. /package/src/components/url-popover/{link-viewer-url.js → link-viewer-url.jsx} +0 -0
  1739. /package/src/components/url-popover/{link-viewer.js → link-viewer.jsx} +0 -0
  1740. /package/src/components/use-block-display-information/test/{index.js → index.jsdom.test.jsx} +0 -0
  1741. /package/src/components/warning/{index.js → index.jsx} +0 -0
  1742. /package/src/components/warning/test/__snapshots__/{index.js.snap → index.jsdom.test.jsx.snap} +0 -0
  1743. /package/src/components/warning/test/{index.js → index.jsdom.test.jsx} +0 -0
  1744. /package/src/components/writing-flow/{index.js → index.jsx} +0 -0
  1745. /package/src/components/writing-flow/test/{index.js → index.jsdom.test.js} +0 -0
  1746. /package/src/components/writing-mode-control/{index.js → index.jsx} +0 -0
  1747. /package/src/elements/test/{index.js → index.jsdom.test.js} +0 -0
  1748. /package/src/hooks/{align.js → align.jsx} +0 -0
  1749. /package/src/hooks/{allowed-blocks.js → allowed-blocks.jsx} +0 -0
  1750. /package/src/hooks/{anchor.js → anchor.jsx} +0 -0
  1751. /package/src/hooks/{auto-inspector-controls.js → auto-inspector-controls.jsx} +0 -0
  1752. /package/src/hooks/{background.js → background.jsx} +0 -0
  1753. /package/src/hooks/{block-bindings.js → block-bindings.jsx} +0 -0
  1754. /package/src/hooks/block-fields/{fields-dropdown-menu.js → fields-dropdown-menu.jsx} +0 -0
  1755. /package/src/hooks/block-fields/{index.js → index.jsx} +0 -0
  1756. /package/src/hooks/block-fields/link/{index.js → index.jsx} +0 -0
  1757. /package/src/hooks/block-fields/media/{index.js → index.jsx} +0 -0
  1758. /package/src/hooks/block-fields/rich-text/{index.js → index.jsx} +0 -0
  1759. /package/src/hooks/{block-hooks.js → block-hooks.jsx} +0 -0
  1760. /package/src/hooks/{block-style-variation.js → block-style-variation.jsx} +0 -0
  1761. /package/src/hooks/{custom-class-name.js → custom-class-name.jsx} +0 -0
  1762. /package/src/hooks/{custom-css.js → custom-css.jsx} +0 -0
  1763. /package/src/hooks/{dimensions.js → dimensions.jsx} +0 -0
  1764. /package/src/hooks/{duotone.js → duotone.jsx} +0 -0
  1765. /package/src/hooks/{elements.js → elements.jsx} +0 -0
  1766. /package/src/hooks/{fit-text.js → fit-text.jsx} +0 -0
  1767. /package/src/hooks/{font-size.js → font-size.jsx} +0 -0
  1768. /package/src/hooks/{layout-child.js → layout-child.jsx} +0 -0
  1769. /package/src/hooks/{layout.js → layout.jsx} +0 -0
  1770. /package/src/hooks/{line-height.js → line-height.jsx} +0 -0
  1771. /package/src/hooks/{list-view.js → list-view.jsx} +0 -0
  1772. /package/src/hooks/{spacing-visualizer.js → spacing-visualizer.jsx} +0 -0
  1773. /package/src/hooks/{states.js → states.jsx} +0 -0
  1774. /package/src/hooks/test/{align.js → align.jsdom.test.jsx} +0 -0
  1775. /package/src/hooks/test/{anchor.js → anchor.jsdom.test.js} +0 -0
  1776. /package/src/hooks/test/{auto-inspector-controls.js → auto-inspector-controls.jsdom.test.js} +0 -0
  1777. /package/src/hooks/test/{background.js → background.jsdom.test.jsx} +0 -0
  1778. /package/src/hooks/test/{block-style-state.js → block-style-state.jsdom.test.js} +0 -0
  1779. /package/src/hooks/test/{cross-origin-isolation.js → cross-origin-isolation.jsdom.test.js} +0 -0
  1780. /package/src/hooks/test/{custom-class-name.js → custom-class-name.jsdom.test.jsx} +0 -0
  1781. /package/src/hooks/test/{dimensions.js → dimensions.jsdom.test.js} +0 -0
  1782. /package/src/hooks/test/{duotone.js → duotone.jsdom.test.js} +0 -0
  1783. /package/src/hooks/test/{font-size.js → font-size.jsdom.test.js} +0 -0
  1784. /package/src/hooks/test/{inherited-value-wiring.js → inherited-value-wiring.jsdom.test.jsx} +0 -0
  1785. /package/src/hooks/test/{layout-child.js → layout-child.jsdom.test.js} +0 -0
  1786. /package/src/hooks/test/{layout.js → layout.jsdom.test.js} +0 -0
  1787. /package/src/hooks/test/{style.js → style.jsdom.test.jsx} +0 -0
  1788. /package/src/hooks/test/{text-align.js → text-align.jsdom.test.jsx} +0 -0
  1789. /package/src/hooks/test/{use-typography-props.js → use-typography-props.jsdom.test.js} +0 -0
  1790. /package/src/hooks/test/{utils.js → utils.jsdom.test.js} +0 -0
  1791. /package/src/hooks/{text-align.js → text-align.jsx} +0 -0
  1792. /package/src/hooks/{typography.js → typography.jsx} +0 -0
  1793. /package/src/hooks/{utils.js → utils.jsx} +0 -0
  1794. /package/src/layouts/{constrained.js → constrained.jsx} +0 -0
  1795. /package/src/layouts/{grid.js → grid.jsx} +0 -0
  1796. /package/src/layouts/test/{constrained.js → constrained.jsdom.test.jsx} +0 -0
  1797. /package/src/layouts/test/{flow.js → flow.jsdom.test.js} +0 -0
  1798. /package/src/layouts/test/{grid.js → grid.jsdom.test.jsx} +0 -0
  1799. /package/src/store/test/{actions.js → actions.jsdom.test.js} +0 -0
  1800. /package/src/store/test/{registry-selectors.js → registry-selectors.jsdom.test.js} +0 -0
  1801. /package/src/store/test/{selectors.js → selectors.jsdom.test.jsx} +0 -0
  1802. /package/src/utils/test/{dom.js → dom.jsdom.test.jsx} +0 -0
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/use-block-drop-zone/index.js"],
4
- "sourcesContent": ["import { useDispatch, useSelect, useRegistry } from '@wordpress/data';\nimport { useCallback, useState } from '@wordpress/element';\nimport {\n\tuseThrottle,\n\t__experimentalUseDropZone as useDropZone,\n} from '@wordpress/compose';\nimport { isRTL } from '@wordpress/i18n';\nimport {\n\thasBlockSupport,\n\tisUnmodifiedDefaultBlock as getIsUnmodifiedDefaultBlock,\n\tstore as blocksStore,\n} from '@wordpress/blocks';\nimport useOnBlockDrop from '../use-on-block-drop';\nimport {\n\tgetDistanceToNearestEdge,\n\tisPointContainedByRect,\n\tisPointWithinTopAndBottomBoundariesOfRect,\n} from '../../utils/math';\nimport { store as blockEditorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst THRESHOLD_DISTANCE = 30;\nconst MINIMUM_HEIGHT_FOR_THRESHOLD = 120;\nconst MINIMUM_WIDTH_FOR_THRESHOLD = 120;\n\n/** @typedef {import('../../utils/math').WPPoint} WPPoint */\n/** @typedef {import('../use-on-block-drop/types').WPDropOperation} WPDropOperation */\n\n/**\n * The orientation of a block list.\n *\n * @typedef {'horizontal'|'vertical'|undefined} WPBlockListOrientation\n */\n\n/**\n * The insert position when dropping a block.\n *\n * @typedef {'before'|'after'} WPInsertPosition\n */\n\n/**\n * @typedef {Object} WPBlockData\n * @property {boolean} isUnmodifiedDefaultBlock Is the block unmodified default block.\n * @property {() => DOMRect} getBoundingClientRect Get the bounding client rect of the block.\n * @property {number} blockIndex The index of the block.\n */\n\n/**\n * Get the drop target position from a given drop point and the orientation.\n *\n * @param {WPBlockData[]} blocksData The block data list.\n * @param {WPPoint} position The position of the item being dragged.\n * @param {WPBlockListOrientation} orientation The orientation of the block list.\n * @param {Object} options Additional options.\n * @return {[number, WPDropOperation]} The drop target position.\n */\nexport function getDropTargetPosition(\n\tblocksData,\n\tposition,\n\torientation = 'vertical',\n\toptions = {}\n) {\n\tconst allowedEdges =\n\t\torientation === 'horizontal'\n\t\t\t? [ 'left', 'right' ]\n\t\t\t: [ 'top', 'bottom' ];\n\n\tlet nearestIndex = 0;\n\tlet insertPosition = 'before';\n\tlet minDistance = Infinity;\n\tlet targetBlockIndex = null;\n\tlet nearestSide = 'right';\n\n\tconst {\n\t\tdropZoneElement,\n\t\tparentBlockOrientation,\n\t\trootBlockIndex = 0,\n\t} = options;\n\n\t// Allow before/after when dragging over the top/bottom edges of the drop zone.\n\tif ( dropZoneElement && parentBlockOrientation !== 'horizontal' ) {\n\t\tconst rect = dropZoneElement.getBoundingClientRect();\n\t\tconst [ distance, edge ] = getDistanceToNearestEdge( position, rect, [\n\t\t\t'top',\n\t\t\t'bottom',\n\t\t] );\n\n\t\t// If dragging over the top or bottom of the drop zone, insert the block\n\t\t// before or after the parent block. This only applies to blocks that use\n\t\t// a drop zone element, typically container blocks such as Group or Cover.\n\t\tif (\n\t\t\trect.height > MINIMUM_HEIGHT_FOR_THRESHOLD &&\n\t\t\tdistance < THRESHOLD_DISTANCE\n\t\t) {\n\t\t\tif ( edge === 'top' ) {\n\t\t\t\treturn [ rootBlockIndex, 'before' ];\n\t\t\t}\n\t\t\tif ( edge === 'bottom' ) {\n\t\t\t\treturn [ rootBlockIndex + 1, 'after' ];\n\t\t\t}\n\t\t}\n\t}\n\n\tconst isRightToLeft = isRTL();\n\n\t// Allow before/after when dragging over the left/right edges of the drop zone.\n\tif ( dropZoneElement && parentBlockOrientation === 'horizontal' ) {\n\t\tconst rect = dropZoneElement.getBoundingClientRect();\n\t\tconst [ distance, edge ] = getDistanceToNearestEdge( position, rect, [\n\t\t\t'left',\n\t\t\t'right',\n\t\t] );\n\n\t\t// If dragging over the left or right of the drop zone, insert the block\n\t\t// before or after the parent block. This only applies to blocks that use\n\t\t// a drop zone element, typically container blocks such as Group.\n\t\tif (\n\t\t\trect.width > MINIMUM_WIDTH_FOR_THRESHOLD &&\n\t\t\tdistance < THRESHOLD_DISTANCE\n\t\t) {\n\t\t\tif (\n\t\t\t\t( isRightToLeft && edge === 'right' ) ||\n\t\t\t\t( ! isRightToLeft && edge === 'left' )\n\t\t\t) {\n\t\t\t\treturn [ rootBlockIndex, 'before' ];\n\t\t\t}\n\t\t\tif (\n\t\t\t\t( isRightToLeft && edge === 'left' ) ||\n\t\t\t\t( ! isRightToLeft && edge === 'right' )\n\t\t\t) {\n\t\t\t\treturn [ rootBlockIndex + 1, 'after' ];\n\t\t\t}\n\t\t}\n\t}\n\n\tblocksData.forEach(\n\t\t( {\n\t\t\tisUnmodifiedDefaultBlock,\n\t\t\tgetBoundingClientRect,\n\t\t\tblockIndex,\n\t\t\tblockOrientation,\n\t\t} ) => {\n\t\t\tconst rect = getBoundingClientRect();\n\n\t\t\tif ( ! rect ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlet [ distance, edge ] = getDistanceToNearestEdge(\n\t\t\t\tposition,\n\t\t\t\trect,\n\t\t\t\tallowedEdges\n\t\t\t);\n\t\t\t// If the the point is close to a side, prioritize that side.\n\t\t\tconst [ sideDistance, sideEdge ] = getDistanceToNearestEdge(\n\t\t\t\tposition,\n\t\t\t\trect,\n\t\t\t\t[ 'left', 'right' ]\n\t\t\t);\n\n\t\t\tconst isPointInsideRect = isPointContainedByRect( position, rect );\n\n\t\t\t// Prioritize the element if the point is inside of an unmodified default block.\n\t\t\tif ( isUnmodifiedDefaultBlock && isPointInsideRect ) {\n\t\t\t\tdistance = 0;\n\t\t\t} else if (\n\t\t\t\torientation === 'vertical' &&\n\t\t\t\tblockOrientation !== 'horizontal' &&\n\t\t\t\t( ( isPointInsideRect && sideDistance < THRESHOLD_DISTANCE ) ||\n\t\t\t\t\t( ! isPointInsideRect &&\n\t\t\t\t\t\tisPointWithinTopAndBottomBoundariesOfRect(\n\t\t\t\t\t\t\tposition,\n\t\t\t\t\t\t\trect\n\t\t\t\t\t\t) ) )\n\t\t\t) {\n\t\t\t\t/**\n\t\t\t\t * This condition should only apply when the layout is vertical (otherwise there's\n\t\t\t\t * no need to create a Row) and dropzones should only activate when the block is\n\t\t\t\t * either within and close to the sides of the target block or on its outer sides.\n\t\t\t\t */\n\t\t\t\ttargetBlockIndex = blockIndex;\n\t\t\t\tnearestSide = sideEdge;\n\t\t\t}\n\n\t\t\tif ( distance < minDistance ) {\n\t\t\t\t// Where the dropped block will be inserted on the nearest block.\n\t\t\t\tinsertPosition =\n\t\t\t\t\tedge === 'bottom' ||\n\t\t\t\t\t( ! isRightToLeft && edge === 'right' ) ||\n\t\t\t\t\t( isRightToLeft && edge === 'left' )\n\t\t\t\t\t\t? 'after'\n\t\t\t\t\t\t: 'before';\n\n\t\t\t\t// Update the currently known best candidate.\n\t\t\t\tminDistance = distance;\n\t\t\t\tnearestIndex = blockIndex;\n\t\t\t}\n\t\t}\n\t);\n\n\tconst adjacentIndex =\n\t\tnearestIndex + ( insertPosition === 'after' ? 1 : -1 );\n\tconst isNearestBlockUnmodifiedDefaultBlock =\n\t\t!! blocksData[ nearestIndex ]?.isUnmodifiedDefaultBlock;\n\tconst isAdjacentBlockUnmodifiedDefaultBlock =\n\t\t!! blocksData[ adjacentIndex ]?.isUnmodifiedDefaultBlock;\n\n\t// If the target index is set then group with the block at that index.\n\tif ( targetBlockIndex !== null ) {\n\t\treturn [ targetBlockIndex, 'group', nearestSide ];\n\t}\n\t// If both blocks are not unmodified default blocks then just insert between them.\n\tif (\n\t\t! isNearestBlockUnmodifiedDefaultBlock &&\n\t\t! isAdjacentBlockUnmodifiedDefaultBlock\n\t) {\n\t\t// If the user is dropping to the trailing edge of the block\n\t\t// add 1 to the index to represent dragging after.\n\t\tconst insertionIndex =\n\t\t\tinsertPosition === 'after' ? nearestIndex + 1 : nearestIndex;\n\t\treturn [ insertionIndex, 'insert' ];\n\t}\n\n\t// Otherwise, replace the nearest unmodified default block.\n\treturn [\n\t\tisNearestBlockUnmodifiedDefaultBlock ? nearestIndex : adjacentIndex,\n\t\t'replace',\n\t];\n}\n\n/**\n * Check if the dragged blocks can be dropped on the target.\n * @param {Function} getBlockType\n * @param {Object[]} allowedBlocks\n * @param {string[]} draggedBlockNames\n * @param {string} targetBlockName\n * @return {boolean} Whether the dragged blocks can be dropped on the target.\n */\nexport function isDropTargetValid(\n\tgetBlockType,\n\tallowedBlocks,\n\tdraggedBlockNames,\n\ttargetBlockName\n) {\n\t// At root level allowedBlocks is undefined and all blocks are allowed.\n\t// Otherwise, check if all dragged blocks are allowed.\n\tlet areBlocksAllowed = true;\n\tif ( allowedBlocks ) {\n\t\tconst allowedBlockNames = allowedBlocks?.map( ( { name } ) => name );\n\n\t\tareBlocksAllowed = draggedBlockNames.every( ( name ) =>\n\t\t\tallowedBlockNames?.includes( name )\n\t\t);\n\t}\n\n\t// Work out if dragged blocks have an allowed parent and if so\n\t// check target block matches the allowed parent.\n\tconst draggedBlockTypes = draggedBlockNames.map( ( name ) =>\n\t\tgetBlockType( name )\n\t);\n\tconst targetMatchesDraggedBlockParents = draggedBlockTypes.every(\n\t\t( block ) => {\n\t\t\tconst [ allowedParentName ] = block?.parent || [];\n\t\t\tif ( ! allowedParentName ) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn allowedParentName === targetBlockName;\n\t\t}\n\t);\n\n\treturn areBlocksAllowed && targetMatchesDraggedBlockParents;\n}\n\n/**\n * Checks if the given element is an insertion point.\n *\n * @param {EventTarget|null} targetToCheck - The element to check.\n * @param {Document} ownerDocument - The owner document of the element.\n * @return {boolean} True if the element is a insertion point, false otherwise.\n */\nfunction isInsertionPoint( targetToCheck, ownerDocument ) {\n\tconst { defaultView } = ownerDocument;\n\n\treturn !! (\n\t\tdefaultView &&\n\t\ttargetToCheck instanceof defaultView.HTMLElement &&\n\t\ttargetToCheck.closest( '[data-is-insertion-point]' )\n\t);\n}\n\n/**\n * @typedef {Object} WPBlockDropZoneConfig\n * @property {?HTMLElement} dropZoneElement Optional element to be used as the drop zone.\n * @property {string} rootClientId The root client id for the block list.\n */\n\n/**\n * A React hook that can be used to make a block list handle drag and drop.\n *\n * @param {WPBlockDropZoneConfig} dropZoneConfig configuration data for the drop zone.\n */\nexport default function useBlockDropZone( {\n\tdropZoneElement,\n\t// An undefined value represents a top-level block. Default to an empty\n\t// string for this so that `targetRootClientId` can be easily compared to\n\t// values returned by the `getRootBlockClientId` selector, which also uses\n\t// an empty string to represent top-level blocks.\n\trootClientId: targetRootClientId = '',\n\tparentClientId: parentBlockClientId = '',\n\tisDisabled = false,\n} = {} ) {\n\tconst registry = useRegistry();\n\tconst [ dropTarget, setDropTarget ] = useState( {\n\t\tindex: null,\n\t\toperation: 'insert',\n\t} );\n\n\tconst { getBlockType, getBlockVariations, getGroupingBlockName } =\n\t\tuseSelect( blocksStore );\n\tconst {\n\t\tcanInsertBlockType,\n\t\tgetBlockListSettings,\n\t\tgetBlocks,\n\t\tgetBlockIndex,\n\t\tgetDraggedBlockClientIds,\n\t\tgetBlockNamesByClientId,\n\t\tgetAllowedBlocks,\n\t\tisDragging,\n\t\tisGroupable,\n\t\tisZoomOut,\n\t\tgetSectionRootClientId,\n\t\tgetBlockParents,\n\t} = unlock( useSelect( blockEditorStore ) );\n\tconst {\n\t\tshowInsertionPoint,\n\t\thideInsertionPoint,\n\t\tstartDragging,\n\t\tstopDragging,\n\t} = unlock( useDispatch( blockEditorStore ) );\n\n\tconst onBlockDrop = useOnBlockDrop(\n\t\tdropTarget.operation === 'before' || dropTarget.operation === 'after'\n\t\t\t? parentBlockClientId\n\t\t\t: targetRootClientId,\n\t\tdropTarget.index,\n\t\t{\n\t\t\toperation: dropTarget.operation,\n\t\t\tnearestSide: dropTarget.nearestSide,\n\t\t}\n\t);\n\tconst throttled = useThrottle(\n\t\tuseCallback(\n\t\t\t( event, ownerDocument ) => {\n\t\t\t\tif ( ! isDragging() ) {\n\t\t\t\t\t// When dragging from the desktop, no drag start event is fired.\n\t\t\t\t\t// So, ensure that the drag state is set when the user drags over a drop zone.\n\t\t\t\t\tstartDragging();\n\t\t\t\t}\n\n\t\t\t\tconst draggedBlockClientIds = getDraggedBlockClientIds();\n\t\t\t\tconst targetParents = [\n\t\t\t\t\ttargetRootClientId,\n\t\t\t\t\t...getBlockParents( targetRootClientId, true ),\n\t\t\t\t];\n\n\t\t\t\t// Check if the target is within any of the dragged blocks.\n\t\t\t\tconst isTargetWithinDraggedBlocks = draggedBlockClientIds.some(\n\t\t\t\t\t( clientId ) => targetParents.includes( clientId )\n\t\t\t\t);\n\n\t\t\t\tif ( isTargetWithinDraggedBlocks ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst allowedBlocks = getAllowedBlocks( targetRootClientId );\n\t\t\t\tconst targetBlockName = getBlockNamesByClientId( [\n\t\t\t\t\ttargetRootClientId,\n\t\t\t\t] )[ 0 ];\n\n\t\t\t\tconst draggedBlockNames = getBlockNamesByClientId(\n\t\t\t\t\tdraggedBlockClientIds\n\t\t\t\t);\n\t\t\t\tconst isBlockDroppingAllowed = isDropTargetValid(\n\t\t\t\t\tgetBlockType,\n\t\t\t\t\tallowedBlocks,\n\t\t\t\t\tdraggedBlockNames,\n\t\t\t\t\ttargetBlockName\n\t\t\t\t);\n\n\t\t\t\tif ( ! isBlockDroppingAllowed ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst sectionRootClientId = getSectionRootClientId();\n\n\t\t\t\t// In Zoom Out mode, if the target is not the section root provided by settings then\n\t\t\t\t// do not allow dropping as the drop target is not within the root (that which is\n\t\t\t\t// treated as \"the content\" by Zoom Out Mode).\n\t\t\t\tif (\n\t\t\t\t\tisZoomOut() &&\n\t\t\t\t\tsectionRootClientId !== targetRootClientId\n\t\t\t\t) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst blocks = getBlocks( targetRootClientId )\n\t\t\t\t\t// Filter out blocks that are hidden\n\t\t\t\t\t.filter( ( block ) => {\n\t\t\t\t\t\treturn ! (\n\t\t\t\t\t\t\thasBlockSupport( block.name, 'visibility', true ) &&\n\t\t\t\t\t\t\tblock.attributes?.metadata?.blockVisibility ===\n\t\t\t\t\t\t\t\tfalse\n\t\t\t\t\t\t);\n\t\t\t\t\t} );\n\n\t\t\t\t// The block list is empty, don't show the insertion point but still allow dropping.\n\t\t\t\tif ( blocks.length === 0 ) {\n\t\t\t\t\tregistry.batch( () => {\n\t\t\t\t\t\tsetDropTarget( {\n\t\t\t\t\t\t\tindex: 0,\n\t\t\t\t\t\t\toperation: 'insert',\n\t\t\t\t\t\t} );\n\t\t\t\t\t\tshowInsertionPoint( targetRootClientId, 0, {\n\t\t\t\t\t\t\toperation: 'insert',\n\t\t\t\t\t\t} );\n\t\t\t\t\t} );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst blocksData = blocks.map( ( block ) => {\n\t\t\t\t\tconst clientId = block.clientId;\n\n\t\t\t\t\treturn {\n\t\t\t\t\t\tisUnmodifiedDefaultBlock:\n\t\t\t\t\t\t\tgetIsUnmodifiedDefaultBlock( block ),\n\t\t\t\t\t\tgetBoundingClientRect: () => {\n\t\t\t\t\t\t\tconst blockElement = ownerDocument.getElementById(\n\t\t\t\t\t\t\t\t`block-${ clientId }`\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\treturn blockElement\n\t\t\t\t\t\t\t\t? blockElement.getBoundingClientRect()\n\t\t\t\t\t\t\t\t: null;\n\t\t\t\t\t\t},\n\t\t\t\t\t\tblockIndex: getBlockIndex( clientId ),\n\t\t\t\t\t\tblockOrientation:\n\t\t\t\t\t\t\tgetBlockListSettings( clientId )?.orientation,\n\t\t\t\t\t};\n\t\t\t\t} );\n\n\t\t\t\tconst dropTargetPosition = getDropTargetPosition(\n\t\t\t\t\tblocksData,\n\t\t\t\t\t{ x: event.clientX, y: event.clientY },\n\t\t\t\t\tgetBlockListSettings( targetRootClientId )?.orientation,\n\t\t\t\t\t{\n\t\t\t\t\t\tdropZoneElement,\n\t\t\t\t\t\tparentBlockClientId,\n\t\t\t\t\t\tparentBlockOrientation: parentBlockClientId\n\t\t\t\t\t\t\t? getBlockListSettings( parentBlockClientId )\n\t\t\t\t\t\t\t\t\t?.orientation\n\t\t\t\t\t\t\t: undefined,\n\t\t\t\t\t\trootBlockIndex: getBlockIndex( targetRootClientId ),\n\t\t\t\t\t}\n\t\t\t\t);\n\n\t\t\t\tconst [ targetIndex, operation, nearestSide ] =\n\t\t\t\t\tdropTargetPosition;\n\n\t\t\t\tconst isTargetIndexEmptyDefaultBlock =\n\t\t\t\t\tblocksData[ targetIndex ]?.isUnmodifiedDefaultBlock;\n\n\t\t\t\tif (\n\t\t\t\t\tisZoomOut() &&\n\t\t\t\t\t! isTargetIndexEmptyDefaultBlock &&\n\t\t\t\t\toperation !== 'insert'\n\t\t\t\t) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( operation === 'group' ) {\n\t\t\t\t\tconst targetBlock = blocks[ targetIndex ];\n\t\t\t\t\tconst areAllImages = [\n\t\t\t\t\t\ttargetBlock.name,\n\t\t\t\t\t\t...draggedBlockNames,\n\t\t\t\t\t].every( ( name ) => name === 'core/image' );\n\t\t\t\t\tconst canInsertGalleryBlock = canInsertBlockType(\n\t\t\t\t\t\t'core/gallery',\n\t\t\t\t\t\ttargetRootClientId\n\t\t\t\t\t);\n\t\t\t\t\tconst areGroupableBlocks = isGroupable( [\n\t\t\t\t\t\ttargetBlock.clientId,\n\t\t\t\t\t\tgetDraggedBlockClientIds(),\n\t\t\t\t\t] );\n\t\t\t\t\tconst groupBlockVariations = getBlockVariations(\n\t\t\t\t\t\tgetGroupingBlockName(),\n\t\t\t\t\t\t'block'\n\t\t\t\t\t);\n\t\t\t\t\tconst canInsertRow =\n\t\t\t\t\t\tgroupBlockVariations &&\n\t\t\t\t\t\tgroupBlockVariations.find(\n\t\t\t\t\t\t\t( { name } ) => name === 'group-row'\n\t\t\t\t\t\t);\n\n\t\t\t\t\t// If the dragged blocks and the target block are all images,\n\t\t\t\t\t// check if it is creatable either a Row variation or a Gallery block.\n\t\t\t\t\tif (\n\t\t\t\t\t\tareAllImages &&\n\t\t\t\t\t\t! canInsertGalleryBlock &&\n\t\t\t\t\t\t( ! areGroupableBlocks || ! canInsertRow )\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t// If the dragged blocks and the target block are not all images,\n\t\t\t\t\t// check if it is creatable a Row variation.\n\t\t\t\t\tif (\n\t\t\t\t\t\t! areAllImages &&\n\t\t\t\t\t\t( ! areGroupableBlocks || ! canInsertRow )\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tregistry.batch( () => {\n\t\t\t\t\tsetDropTarget( {\n\t\t\t\t\t\tindex: targetIndex,\n\t\t\t\t\t\toperation,\n\t\t\t\t\t\tnearestSide,\n\t\t\t\t\t} );\n\n\t\t\t\t\tconst insertionPointClientId = [\n\t\t\t\t\t\t'before',\n\t\t\t\t\t\t'after',\n\t\t\t\t\t].includes( operation )\n\t\t\t\t\t\t? parentBlockClientId\n\t\t\t\t\t\t: targetRootClientId;\n\n\t\t\t\t\tshowInsertionPoint( insertionPointClientId, targetIndex, {\n\t\t\t\t\t\toperation,\n\t\t\t\t\t\tnearestSide,\n\t\t\t\t\t} );\n\t\t\t\t} );\n\t\t\t},\n\t\t\t[\n\t\t\t\tisDragging,\n\t\t\t\tgetAllowedBlocks,\n\t\t\t\ttargetRootClientId,\n\t\t\t\tgetBlockNamesByClientId,\n\t\t\t\tgetDraggedBlockClientIds,\n\t\t\t\tgetBlockType,\n\t\t\t\tgetSectionRootClientId,\n\t\t\t\tisZoomOut,\n\t\t\t\tgetBlocks,\n\t\t\t\tgetBlockListSettings,\n\t\t\t\tdropZoneElement,\n\t\t\t\tparentBlockClientId,\n\t\t\t\tgetBlockIndex,\n\t\t\t\tregistry,\n\t\t\t\tstartDragging,\n\t\t\t\tshowInsertionPoint,\n\t\t\t\tcanInsertBlockType,\n\t\t\t\tisGroupable,\n\t\t\t\tgetBlockVariations,\n\t\t\t\tgetGroupingBlockName,\n\t\t\t]\n\t\t),\n\t\t200\n\t);\n\n\treturn useDropZone( {\n\t\tdropZoneElement,\n\t\tisDisabled,\n\t\tonDrop: onBlockDrop,\n\t\tonDragOver( event ) {\n\t\t\t// `currentTarget` is only available while the event is being\n\t\t\t// handled, so get it now and pass it to the thottled function.\n\t\t\t// https://developer.mozilla.org/en-US/docs/Web/API/Event/currentTarget\n\t\t\tthrottled( event, event.currentTarget.ownerDocument );\n\t\t},\n\t\tonDragLeave( event ) {\n\t\t\tconst { ownerDocument } = event.currentTarget;\n\n\t\t\t// If the drag event is leaving the drop zone and entering an insertion point,\n\t\t\t// do not hide the insertion point as it is conceptually within the dropzone.\n\t\t\tif (\n\t\t\t\tisInsertionPoint( event.relatedTarget, ownerDocument ) ||\n\t\t\t\tisInsertionPoint( event.target, ownerDocument )\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthrottled.cancel();\n\t\t\thideInsertionPoint();\n\t\t},\n\t\tonDragEnd() {\n\t\t\tthrottled.cancel();\n\t\t\tstopDragging();\n\t\t\thideInsertionPoint();\n\t\t},\n\t} );\n}\n"],
4
+ "sourcesContent": ["import { useDispatch, useSelect, useRegistry } from '@wordpress/data';\nimport { useCallback, useState } from '@wordpress/element';\nimport {\n\tuseThrottle,\n\t__experimentalUseDropZone as useDropZone,\n} from '@wordpress/compose';\nimport { isRTL } from '@wordpress/i18n';\nimport {\n\thasBlockSupport,\n\tisUnmodifiedDefaultBlock as getIsUnmodifiedDefaultBlock,\n\tstore as blocksStore,\n} from '@wordpress/blocks';\nimport useOnBlockDrop from '../use-on-block-drop';\nimport {\n\tgetDistanceToNearestEdge,\n\tisPointContainedByRect,\n\tisPointWithinTopAndBottomBoundariesOfRect,\n} from '../../utils/math';\nimport { store as blockEditorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst THRESHOLD_DISTANCE = 30;\nconst MINIMUM_HEIGHT_FOR_THRESHOLD = 120;\nconst MINIMUM_WIDTH_FOR_THRESHOLD = 120;\n\n/** @typedef {import('../../utils/math').WPPoint} WPPoint */\n/** @typedef {import('../use-on-block-drop/types').WPDropOperation} WPDropOperation */\n\n/**\n * The orientation of a block list.\n *\n * @typedef {'horizontal'|'vertical'|undefined} WPBlockListOrientation\n */\n\n/**\n * The insert position when dropping a block.\n *\n * @typedef {'before'|'after'} WPInsertPosition\n */\n\n/**\n * @typedef {Object} WPBlockData\n * @property {boolean} isUnmodifiedDefaultBlock Is the block unmodified default block.\n * @property {() => DOMRect} getBoundingClientRect Get the bounding client rect of the block.\n * @property {number} blockIndex The index of the block.\n */\n\n/**\n * Get the drop target position from a given drop point and the orientation.\n *\n * @param {WPBlockData[]} blocksData The block data list.\n * @param {WPPoint} position The position of the item being dragged.\n * @param {WPBlockListOrientation} orientation The orientation of the block list.\n * @param {Object} options Additional options.\n * @return {[number, WPDropOperation]} The drop target position.\n */\nexport function getDropTargetPosition(\n\tblocksData,\n\tposition,\n\torientation = 'vertical',\n\toptions = {}\n) {\n\tconst allowedEdges =\n\t\torientation === 'horizontal'\n\t\t\t? [ 'left', 'right' ]\n\t\t\t: [ 'top', 'bottom' ];\n\n\tlet nearestIndex = 0;\n\tlet insertPosition = 'before';\n\tlet minDistance = Infinity;\n\tlet targetBlockIndex = null;\n\tlet nearestSide = 'right';\n\n\tconst {\n\t\tdropZoneElement,\n\t\tparentBlockOrientation,\n\t\trootBlockIndex = 0,\n\t} = options;\n\n\t// Allow before/after when dragging over the top/bottom edges of the drop zone.\n\tif ( dropZoneElement && parentBlockOrientation !== 'horizontal' ) {\n\t\tconst rect = dropZoneElement.getBoundingClientRect();\n\t\tconst [ distance, edge ] = getDistanceToNearestEdge( position, rect, [\n\t\t\t'top',\n\t\t\t'bottom',\n\t\t] );\n\n\t\t// If dragging over the top or bottom of the drop zone, insert the block\n\t\t// before or after the parent block. This only applies to blocks that use\n\t\t// a drop zone element, typically container blocks such as Group or Cover.\n\t\tif (\n\t\t\trect.height > MINIMUM_HEIGHT_FOR_THRESHOLD &&\n\t\t\tdistance < THRESHOLD_DISTANCE\n\t\t) {\n\t\t\tif ( edge === 'top' ) {\n\t\t\t\treturn [ rootBlockIndex, 'before' ];\n\t\t\t}\n\t\t\tif ( edge === 'bottom' ) {\n\t\t\t\treturn [ rootBlockIndex + 1, 'after' ];\n\t\t\t}\n\t\t}\n\t}\n\n\tconst isRightToLeft = isRTL();\n\n\t// Allow before/after when dragging over the left/right edges of the drop zone.\n\tif ( dropZoneElement && parentBlockOrientation === 'horizontal' ) {\n\t\tconst rect = dropZoneElement.getBoundingClientRect();\n\t\tconst [ distance, edge ] = getDistanceToNearestEdge( position, rect, [\n\t\t\t'left',\n\t\t\t'right',\n\t\t] );\n\n\t\t// If dragging over the left or right of the drop zone, insert the block\n\t\t// before or after the parent block. This only applies to blocks that use\n\t\t// a drop zone element, typically container blocks such as Group.\n\t\tif (\n\t\t\trect.width > MINIMUM_WIDTH_FOR_THRESHOLD &&\n\t\t\tdistance < THRESHOLD_DISTANCE\n\t\t) {\n\t\t\tif (\n\t\t\t\t( isRightToLeft && edge === 'right' ) ||\n\t\t\t\t( ! isRightToLeft && edge === 'left' )\n\t\t\t) {\n\t\t\t\treturn [ rootBlockIndex, 'before' ];\n\t\t\t}\n\t\t\tif (\n\t\t\t\t( isRightToLeft && edge === 'left' ) ||\n\t\t\t\t( ! isRightToLeft && edge === 'right' )\n\t\t\t) {\n\t\t\t\treturn [ rootBlockIndex + 1, 'after' ];\n\t\t\t}\n\t\t}\n\t}\n\n\tblocksData.forEach(\n\t\t( {\n\t\t\tisUnmodifiedDefaultBlock,\n\t\t\tgetBoundingClientRect,\n\t\t\tblockIndex,\n\t\t\tblockOrientation,\n\t\t} ) => {\n\t\t\tconst rect = getBoundingClientRect();\n\n\t\t\tif ( ! rect ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlet [ distance, edge ] = getDistanceToNearestEdge(\n\t\t\t\tposition,\n\t\t\t\trect,\n\t\t\t\tallowedEdges\n\t\t\t);\n\t\t\t// If the point is close to a side, prioritize that side.\n\t\t\tconst [ sideDistance, sideEdge ] = getDistanceToNearestEdge(\n\t\t\t\tposition,\n\t\t\t\trect,\n\t\t\t\t[ 'left', 'right' ]\n\t\t\t);\n\n\t\t\tconst isPointInsideRect = isPointContainedByRect( position, rect );\n\n\t\t\t// Prioritize the element if the point is inside of an unmodified default block.\n\t\t\tif ( isUnmodifiedDefaultBlock && isPointInsideRect ) {\n\t\t\t\tdistance = 0;\n\t\t\t} else if (\n\t\t\t\torientation === 'vertical' &&\n\t\t\t\tblockOrientation !== 'horizontal' &&\n\t\t\t\t( ( isPointInsideRect && sideDistance < THRESHOLD_DISTANCE ) ||\n\t\t\t\t\t( ! isPointInsideRect &&\n\t\t\t\t\t\tisPointWithinTopAndBottomBoundariesOfRect(\n\t\t\t\t\t\t\tposition,\n\t\t\t\t\t\t\trect\n\t\t\t\t\t\t) ) )\n\t\t\t) {\n\t\t\t\t/**\n\t\t\t\t * This condition should only apply when the layout is vertical (otherwise there's\n\t\t\t\t * no need to create a Row) and dropzones should only activate when the block is\n\t\t\t\t * either within and close to the sides of the target block or on its outer sides.\n\t\t\t\t */\n\t\t\t\ttargetBlockIndex = blockIndex;\n\t\t\t\tnearestSide = sideEdge;\n\t\t\t}\n\n\t\t\tif ( distance < minDistance ) {\n\t\t\t\t// Where the dropped block will be inserted on the nearest block.\n\t\t\t\tinsertPosition =\n\t\t\t\t\tedge === 'bottom' ||\n\t\t\t\t\t( ! isRightToLeft && edge === 'right' ) ||\n\t\t\t\t\t( isRightToLeft && edge === 'left' )\n\t\t\t\t\t\t? 'after'\n\t\t\t\t\t\t: 'before';\n\n\t\t\t\t// Update the currently known best candidate.\n\t\t\t\tminDistance = distance;\n\t\t\t\tnearestIndex = blockIndex;\n\t\t\t}\n\t\t}\n\t);\n\n\tconst adjacentIndex =\n\t\tnearestIndex + ( insertPosition === 'after' ? 1 : -1 );\n\tconst isNearestBlockUnmodifiedDefaultBlock =\n\t\t!! blocksData[ nearestIndex ]?.isUnmodifiedDefaultBlock;\n\tconst isAdjacentBlockUnmodifiedDefaultBlock =\n\t\t!! blocksData[ adjacentIndex ]?.isUnmodifiedDefaultBlock;\n\n\t// If the target index is set then group with the block at that index.\n\tif ( targetBlockIndex !== null ) {\n\t\treturn [ targetBlockIndex, 'group', nearestSide ];\n\t}\n\t// If both blocks are not unmodified default blocks then just insert between them.\n\tif (\n\t\t! isNearestBlockUnmodifiedDefaultBlock &&\n\t\t! isAdjacentBlockUnmodifiedDefaultBlock\n\t) {\n\t\t// If the user is dropping to the trailing edge of the block\n\t\t// add 1 to the index to represent dragging after.\n\t\tconst insertionIndex =\n\t\t\tinsertPosition === 'after' ? nearestIndex + 1 : nearestIndex;\n\t\treturn [ insertionIndex, 'insert' ];\n\t}\n\n\t// Otherwise, replace the nearest unmodified default block.\n\treturn [\n\t\tisNearestBlockUnmodifiedDefaultBlock ? nearestIndex : adjacentIndex,\n\t\t'replace',\n\t];\n}\n\n/**\n * Check if the dragged blocks can be dropped on the target.\n * @param {Function} getBlockType\n * @param {Object[]} allowedBlocks\n * @param {string[]} draggedBlockNames\n * @param {string} targetBlockName\n * @return {boolean} Whether the dragged blocks can be dropped on the target.\n */\nexport function isDropTargetValid(\n\tgetBlockType,\n\tallowedBlocks,\n\tdraggedBlockNames,\n\ttargetBlockName\n) {\n\t// At root level allowedBlocks is undefined and all blocks are allowed.\n\t// Otherwise, check if all dragged blocks are allowed.\n\tlet areBlocksAllowed = true;\n\tif ( allowedBlocks ) {\n\t\tconst allowedBlockNames = allowedBlocks?.map( ( { name } ) => name );\n\n\t\tareBlocksAllowed = draggedBlockNames.every( ( name ) =>\n\t\t\tallowedBlockNames?.includes( name )\n\t\t);\n\t}\n\n\t// Work out if dragged blocks have an allowed parent and if so\n\t// check target block matches the allowed parent.\n\tconst draggedBlockTypes = draggedBlockNames.map( ( name ) =>\n\t\tgetBlockType( name )\n\t);\n\tconst targetMatchesDraggedBlockParents = draggedBlockTypes.every(\n\t\t( block ) => {\n\t\t\tconst [ allowedParentName ] = block?.parent || [];\n\t\t\tif ( ! allowedParentName ) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn allowedParentName === targetBlockName;\n\t\t}\n\t);\n\n\treturn areBlocksAllowed && targetMatchesDraggedBlockParents;\n}\n\n/**\n * Checks if the given element is an insertion point.\n *\n * @param {EventTarget|null} targetToCheck - The element to check.\n * @param {Document} ownerDocument - The owner document of the element.\n * @return {boolean} True if the element is a insertion point, false otherwise.\n */\nfunction isInsertionPoint( targetToCheck, ownerDocument ) {\n\tconst { defaultView } = ownerDocument;\n\n\treturn !! (\n\t\tdefaultView &&\n\t\ttargetToCheck instanceof defaultView.HTMLElement &&\n\t\ttargetToCheck.closest( '[data-is-insertion-point]' )\n\t);\n}\n\n/**\n * @typedef {Object} WPBlockDropZoneConfig\n * @property {?HTMLElement} dropZoneElement Optional element to be used as the drop zone.\n * @property {string} rootClientId The root client id for the block list.\n */\n\n/**\n * A React hook that can be used to make a block list handle drag and drop.\n *\n * @param {WPBlockDropZoneConfig} dropZoneConfig configuration data for the drop zone.\n */\nexport default function useBlockDropZone( {\n\tdropZoneElement,\n\t// An undefined value represents a top-level block. Default to an empty\n\t// string for this so that `targetRootClientId` can be easily compared to\n\t// values returned by the `getRootBlockClientId` selector, which also uses\n\t// an empty string to represent top-level blocks.\n\trootClientId: targetRootClientId = '',\n\tparentClientId: parentBlockClientId = '',\n\tisDisabled = false,\n} = {} ) {\n\tconst registry = useRegistry();\n\tconst [ dropTarget, setDropTarget ] = useState( {\n\t\tindex: null,\n\t\toperation: 'insert',\n\t} );\n\n\tconst { getBlockType, getBlockVariations, getGroupingBlockName } =\n\t\tuseSelect( blocksStore );\n\tconst {\n\t\tcanInsertBlockType,\n\t\tgetBlockListSettings,\n\t\tgetBlocks,\n\t\tgetBlockIndex,\n\t\tgetDraggedBlockClientIds,\n\t\tgetBlockNamesByClientId,\n\t\tgetAllowedBlocks,\n\t\tisDragging,\n\t\tisGroupable,\n\t\tisZoomOut,\n\t\tgetSectionRootClientId,\n\t\tgetBlockParents,\n\t} = unlock( useSelect( blockEditorStore ) );\n\tconst {\n\t\tshowInsertionPoint,\n\t\thideInsertionPoint,\n\t\tstartDragging,\n\t\tstopDragging,\n\t} = unlock( useDispatch( blockEditorStore ) );\n\n\tconst onBlockDrop = useOnBlockDrop(\n\t\tdropTarget.operation === 'before' || dropTarget.operation === 'after'\n\t\t\t? parentBlockClientId\n\t\t\t: targetRootClientId,\n\t\tdropTarget.index,\n\t\t{\n\t\t\toperation: dropTarget.operation,\n\t\t\tnearestSide: dropTarget.nearestSide,\n\t\t}\n\t);\n\tconst throttled = useThrottle(\n\t\tuseCallback(\n\t\t\t( event, ownerDocument ) => {\n\t\t\t\tif ( ! isDragging() ) {\n\t\t\t\t\t// When dragging from the desktop, no drag start event is fired.\n\t\t\t\t\t// So, ensure that the drag state is set when the user drags over a drop zone.\n\t\t\t\t\tstartDragging();\n\t\t\t\t}\n\n\t\t\t\tconst draggedBlockClientIds = getDraggedBlockClientIds();\n\t\t\t\tconst targetParents = [\n\t\t\t\t\ttargetRootClientId,\n\t\t\t\t\t...getBlockParents( targetRootClientId, true ),\n\t\t\t\t];\n\n\t\t\t\t// Check if the target is within any of the dragged blocks.\n\t\t\t\tconst isTargetWithinDraggedBlocks = draggedBlockClientIds.some(\n\t\t\t\t\t( clientId ) => targetParents.includes( clientId )\n\t\t\t\t);\n\n\t\t\t\tif ( isTargetWithinDraggedBlocks ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst allowedBlocks = getAllowedBlocks( targetRootClientId );\n\t\t\t\tconst targetBlockName = getBlockNamesByClientId( [\n\t\t\t\t\ttargetRootClientId,\n\t\t\t\t] )[ 0 ];\n\n\t\t\t\tconst draggedBlockNames = getBlockNamesByClientId(\n\t\t\t\t\tdraggedBlockClientIds\n\t\t\t\t);\n\t\t\t\tconst isBlockDroppingAllowed = isDropTargetValid(\n\t\t\t\t\tgetBlockType,\n\t\t\t\t\tallowedBlocks,\n\t\t\t\t\tdraggedBlockNames,\n\t\t\t\t\ttargetBlockName\n\t\t\t\t);\n\n\t\t\t\tif ( ! isBlockDroppingAllowed ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst sectionRootClientId = getSectionRootClientId();\n\n\t\t\t\t// In Zoom Out mode, if the target is not the section root provided by settings then\n\t\t\t\t// do not allow dropping as the drop target is not within the root (that which is\n\t\t\t\t// treated as \"the content\" by Zoom Out Mode).\n\t\t\t\tif (\n\t\t\t\t\tisZoomOut() &&\n\t\t\t\t\tsectionRootClientId !== targetRootClientId\n\t\t\t\t) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst blocks = getBlocks( targetRootClientId )\n\t\t\t\t\t// Filter out blocks that are hidden\n\t\t\t\t\t.filter( ( block ) => {\n\t\t\t\t\t\treturn ! (\n\t\t\t\t\t\t\thasBlockSupport( block.name, 'visibility', true ) &&\n\t\t\t\t\t\t\tblock.attributes?.metadata?.blockVisibility ===\n\t\t\t\t\t\t\t\tfalse\n\t\t\t\t\t\t);\n\t\t\t\t\t} );\n\n\t\t\t\t// The block list is empty, don't show the insertion point but still allow dropping.\n\t\t\t\tif ( blocks.length === 0 ) {\n\t\t\t\t\tregistry.batch( () => {\n\t\t\t\t\t\tsetDropTarget( {\n\t\t\t\t\t\t\tindex: 0,\n\t\t\t\t\t\t\toperation: 'insert',\n\t\t\t\t\t\t} );\n\t\t\t\t\t\tshowInsertionPoint( targetRootClientId, 0, {\n\t\t\t\t\t\t\toperation: 'insert',\n\t\t\t\t\t\t} );\n\t\t\t\t\t} );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst blocksData = blocks.map( ( block ) => {\n\t\t\t\t\tconst clientId = block.clientId;\n\n\t\t\t\t\treturn {\n\t\t\t\t\t\tisUnmodifiedDefaultBlock:\n\t\t\t\t\t\t\tgetIsUnmodifiedDefaultBlock( block ),\n\t\t\t\t\t\tgetBoundingClientRect: () => {\n\t\t\t\t\t\t\tconst blockElement = ownerDocument.getElementById(\n\t\t\t\t\t\t\t\t`block-${ clientId }`\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\treturn blockElement\n\t\t\t\t\t\t\t\t? blockElement.getBoundingClientRect()\n\t\t\t\t\t\t\t\t: null;\n\t\t\t\t\t\t},\n\t\t\t\t\t\tblockIndex: getBlockIndex( clientId ),\n\t\t\t\t\t\tblockOrientation:\n\t\t\t\t\t\t\tgetBlockListSettings( clientId )?.orientation,\n\t\t\t\t\t};\n\t\t\t\t} );\n\n\t\t\t\tconst dropTargetPosition = getDropTargetPosition(\n\t\t\t\t\tblocksData,\n\t\t\t\t\t{ x: event.clientX, y: event.clientY },\n\t\t\t\t\tgetBlockListSettings( targetRootClientId )?.orientation,\n\t\t\t\t\t{\n\t\t\t\t\t\tdropZoneElement,\n\t\t\t\t\t\tparentBlockClientId,\n\t\t\t\t\t\tparentBlockOrientation: parentBlockClientId\n\t\t\t\t\t\t\t? getBlockListSettings( parentBlockClientId )\n\t\t\t\t\t\t\t\t\t?.orientation\n\t\t\t\t\t\t\t: undefined,\n\t\t\t\t\t\trootBlockIndex: getBlockIndex( targetRootClientId ),\n\t\t\t\t\t}\n\t\t\t\t);\n\n\t\t\t\tconst [ targetIndex, operation, nearestSide ] =\n\t\t\t\t\tdropTargetPosition;\n\n\t\t\t\tconst isTargetIndexEmptyDefaultBlock =\n\t\t\t\t\tblocksData[ targetIndex ]?.isUnmodifiedDefaultBlock;\n\n\t\t\t\tif (\n\t\t\t\t\tisZoomOut() &&\n\t\t\t\t\t! isTargetIndexEmptyDefaultBlock &&\n\t\t\t\t\toperation !== 'insert'\n\t\t\t\t) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( operation === 'group' ) {\n\t\t\t\t\tconst targetBlock = blocks[ targetIndex ];\n\t\t\t\t\tconst areAllImages = [\n\t\t\t\t\t\ttargetBlock.name,\n\t\t\t\t\t\t...draggedBlockNames,\n\t\t\t\t\t].every( ( name ) => name === 'core/image' );\n\t\t\t\t\tconst canInsertGalleryBlock = canInsertBlockType(\n\t\t\t\t\t\t'core/gallery',\n\t\t\t\t\t\ttargetRootClientId\n\t\t\t\t\t);\n\t\t\t\t\tconst areGroupableBlocks = isGroupable( [\n\t\t\t\t\t\ttargetBlock.clientId,\n\t\t\t\t\t\tgetDraggedBlockClientIds(),\n\t\t\t\t\t] );\n\t\t\t\t\tconst groupBlockVariations = getBlockVariations(\n\t\t\t\t\t\tgetGroupingBlockName(),\n\t\t\t\t\t\t'block'\n\t\t\t\t\t);\n\t\t\t\t\tconst canInsertRow =\n\t\t\t\t\t\tgroupBlockVariations &&\n\t\t\t\t\t\tgroupBlockVariations.find(\n\t\t\t\t\t\t\t( { name } ) => name === 'group-row'\n\t\t\t\t\t\t);\n\n\t\t\t\t\t// If the dragged blocks and the target block are all images,\n\t\t\t\t\t// check if it is creatable either a Row variation or a Gallery block.\n\t\t\t\t\tif (\n\t\t\t\t\t\tareAllImages &&\n\t\t\t\t\t\t! canInsertGalleryBlock &&\n\t\t\t\t\t\t( ! areGroupableBlocks || ! canInsertRow )\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t// If the dragged blocks and the target block are not all images,\n\t\t\t\t\t// check if it is creatable a Row variation.\n\t\t\t\t\tif (\n\t\t\t\t\t\t! areAllImages &&\n\t\t\t\t\t\t( ! areGroupableBlocks || ! canInsertRow )\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tregistry.batch( () => {\n\t\t\t\t\tsetDropTarget( {\n\t\t\t\t\t\tindex: targetIndex,\n\t\t\t\t\t\toperation,\n\t\t\t\t\t\tnearestSide,\n\t\t\t\t\t} );\n\n\t\t\t\t\tconst insertionPointClientId = [\n\t\t\t\t\t\t'before',\n\t\t\t\t\t\t'after',\n\t\t\t\t\t].includes( operation )\n\t\t\t\t\t\t? parentBlockClientId\n\t\t\t\t\t\t: targetRootClientId;\n\n\t\t\t\t\tshowInsertionPoint( insertionPointClientId, targetIndex, {\n\t\t\t\t\t\toperation,\n\t\t\t\t\t\tnearestSide,\n\t\t\t\t\t} );\n\t\t\t\t} );\n\t\t\t},\n\t\t\t[\n\t\t\t\tisDragging,\n\t\t\t\tgetAllowedBlocks,\n\t\t\t\ttargetRootClientId,\n\t\t\t\tgetBlockNamesByClientId,\n\t\t\t\tgetDraggedBlockClientIds,\n\t\t\t\tgetBlockType,\n\t\t\t\tgetSectionRootClientId,\n\t\t\t\tisZoomOut,\n\t\t\t\tgetBlocks,\n\t\t\t\tgetBlockListSettings,\n\t\t\t\tdropZoneElement,\n\t\t\t\tparentBlockClientId,\n\t\t\t\tgetBlockIndex,\n\t\t\t\tregistry,\n\t\t\t\tstartDragging,\n\t\t\t\tshowInsertionPoint,\n\t\t\t\tcanInsertBlockType,\n\t\t\t\tisGroupable,\n\t\t\t\tgetBlockVariations,\n\t\t\t\tgetGroupingBlockName,\n\t\t\t]\n\t\t),\n\t\t200\n\t);\n\n\treturn useDropZone( {\n\t\tdropZoneElement,\n\t\tisDisabled,\n\t\tonDrop: onBlockDrop,\n\t\tonDragOver( event ) {\n\t\t\t// `currentTarget` is only available while the event is being\n\t\t\t// handled, so get it now and pass it to the throttled function.\n\t\t\t// https://developer.mozilla.org/en-US/docs/Web/API/Event/currentTarget\n\t\t\tthrottled( event, event.currentTarget.ownerDocument );\n\t\t},\n\t\tonDragLeave( event ) {\n\t\t\tconst { ownerDocument } = event.currentTarget;\n\n\t\t\t// If the drag event is leaving the drop zone and entering an insertion point,\n\t\t\t// do not hide the insertion point as it is conceptually within the dropzone.\n\t\t\tif (\n\t\t\t\tisInsertionPoint( event.relatedTarget, ownerDocument ) ||\n\t\t\t\tisInsertionPoint( event.target, ownerDocument )\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthrottled.cancel();\n\t\t\thideInsertionPoint();\n\t\t},\n\t\tonDragEnd() {\n\t\t\tthrottled.cancel();\n\t\t\tstopDragging();\n\t\t\thideInsertionPoint();\n\t\t},\n\t} );\n}\n"],
5
5
  "mappings": "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",
6
6
  "names": []
7
7
  }
@@ -1,4 +1,4 @@
1
- // packages/block-editor/src/components/warning/index.js
1
+ // packages/block-editor/src/components/warning/index.jsx
2
2
  import clsx from "clsx";
3
3
  import { DropdownMenu, MenuGroup, MenuItem } from "@wordpress/components";
4
4
  import { __ } from "@wordpress/i18n";
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/components/warning/index.js"],
3
+ "sources": ["../../../src/components/warning/index.jsx"],
4
4
  "sourcesContent": ["import clsx from 'clsx';\nimport { DropdownMenu, MenuGroup, MenuItem } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { moreVertical } from '@wordpress/icons';\n\nfunction Warning( { className, actions, children, secondaryActions } ) {\n\treturn (\n\t\t<div style={ { display: 'contents', all: 'initial' } }>\n\t\t\t<div className={ clsx( className, 'block-editor-warning' ) }>\n\t\t\t\t<div className=\"block-editor-warning__contents\">\n\t\t\t\t\t<p className=\"block-editor-warning__message\">\n\t\t\t\t\t\t{ children }\n\t\t\t\t\t</p>\n\n\t\t\t\t\t{ ( actions?.length > 0 || secondaryActions ) && (\n\t\t\t\t\t\t<div className=\"block-editor-warning__actions\">\n\t\t\t\t\t\t\t{ actions?.length > 0 &&\n\t\t\t\t\t\t\t\tactions.map( ( action, i ) => (\n\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\tkey={ i }\n\t\t\t\t\t\t\t\t\t\tclassName=\"block-editor-warning__action\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ action }\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t) ) }\n\t\t\t\t\t\t\t{ secondaryActions && (\n\t\t\t\t\t\t\t\t<DropdownMenu\n\t\t\t\t\t\t\t\t\tclassName=\"block-editor-warning__secondary\"\n\t\t\t\t\t\t\t\t\ticon={ moreVertical }\n\t\t\t\t\t\t\t\t\tlabel={ __( 'More options' ) }\n\t\t\t\t\t\t\t\t\tpopoverProps={ {\n\t\t\t\t\t\t\t\t\t\tplacement: 'bottom-end',\n\t\t\t\t\t\t\t\t\t\tclassName:\n\t\t\t\t\t\t\t\t\t\t\t'block-editor-warning__dropdown',\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\tnoIcons\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ () => (\n\t\t\t\t\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t\t\t\t\t{ secondaryActions.map(\n\t\t\t\t\t\t\t\t\t\t\t\t( item, pos ) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={ item.onClick }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={ pos }\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{ item.title }\n\t\t\t\t\t\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</DropdownMenu>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/warning/README.md\n */\nexport default Warning;\n"],
5
5
  "mappings": ";AAAA,OAAO,UAAU;AACjB,SAAS,cAAc,WAAW,gBAAgB;AAClD,SAAS,UAAU;AACnB,SAAS,oBAAoB;AAOxB,cAKC,YALD;AALL,SAAS,QAAS,EAAE,WAAW,SAAS,UAAU,iBAAiB,GAAI;AACtE,SACC,oBAAC,SAAI,OAAQ,EAAE,SAAS,YAAY,KAAK,UAAU,GAClD,8BAAC,SAAI,WAAY,KAAM,WAAW,sBAAuB,GACxD,+BAAC,SAAI,WAAU,kCACd;AAAA,wBAAC,OAAE,WAAU,iCACV,UACH;AAAA,KAEI,SAAS,SAAS,KAAK,qBAC1B,qBAAC,SAAI,WAAU,iCACZ;AAAA,eAAS,SAAS,KACnB,QAAQ,IAAK,CAAE,QAAQ,MACtB;AAAA,QAAC;AAAA;AAAA,UAEA,WAAU;AAAA,UAER;AAAA;AAAA,QAHI;AAAA,MAIP,CACC;AAAA,MACD,oBACD;AAAA,QAAC;AAAA;AAAA,UACA,WAAU;AAAA,UACV,MAAO;AAAA,UACP,OAAQ,GAAI,cAAe;AAAA,UAC3B,cAAe;AAAA,YACd,WAAW;AAAA,YACX,WACC;AAAA,UACF;AAAA,UACA,SAAO;AAAA,UAEL,gBACD,oBAAC,aACE,2BAAiB;AAAA,YAClB,CAAE,MAAM,QACP;AAAA,cAAC;AAAA;AAAA,gBACA,SAAU,KAAK;AAAA,gBAGb,eAAK;AAAA;AAAA,cAFD;AAAA,YAGP;AAAA,UAEF,GACD;AAAA;AAAA,MAEF;AAAA,OAEF;AAAA,KAEF,GACD,GACD;AAEF;AAKA,IAAO,kBAAQ;",
6
6
  "names": []
@@ -1,4 +1,4 @@
1
- // packages/block-editor/src/components/writing-flow/index.js
1
+ // packages/block-editor/src/components/writing-flow/index.jsx
2
2
  import clsx from "clsx";
3
3
  import { useSelect } from "@wordpress/data";
4
4
  import { __ } from "@wordpress/i18n";
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/components/writing-flow/index.js"],
3
+ "sources": ["../../../src/components/writing-flow/index.jsx"],
4
4
  "sourcesContent": ["import clsx from 'clsx';\nimport { useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { useMergeRefs, useRefEffect } from '@wordpress/compose';\nimport { forwardRef } from '@wordpress/element';\nimport useEditableRoot from './use-editable-root';\nimport useHomeEnd from './use-home-end';\nimport useMultiSelection from './use-multi-selection';\nimport useTabNav from './use-tab-nav';\nimport useArrowNav from './use-arrow-nav';\nimport { usePreviewModeNav } from './use-preview-mode-nav';\nimport useSelectAll from './use-select-all';\nimport useDragSelection from './use-drag-selection';\nimport useSelectionObserver from './use-selection-observer';\nimport useEditableRootEventHandlers from './use-editable-root-event-handlers';\nimport useClickSelection from './use-click-selection';\nimport useInput from './use-input';\nimport useClipboardHandler from './use-clipboard-handler';\nimport { store as blockEditorStore } from '../../store';\n\nexport function useWritingFlow() {\n\tconst [ before, ref, after ] = useTabNav();\n\tconst hasMultiSelection = useSelect(\n\t\t( select ) => select( blockEditorStore ).hasMultiSelection(),\n\t\t[]\n\t);\n\n\treturn [\n\t\tbefore,\n\t\tuseMergeRefs( [\n\t\t\tref,\n\t\t\tuseEditableRootEventHandlers(),\n\t\t\tuseClipboardHandler(),\n\t\t\tuseInput(),\n\t\t\tuseEditableRoot(),\n\t\t\tuseHomeEnd(),\n\t\t\tuseDragSelection(),\n\t\t\tuseSelectionObserver(),\n\t\t\tuseClickSelection(),\n\t\t\tuseMultiSelection(),\n\t\t\tuseSelectAll(),\n\t\t\tuseArrowNav(),\n\t\t\tusePreviewModeNav(),\n\t\t\tuseRefEffect(\n\t\t\t\t( node ) => {\n\t\t\t\t\tnode.tabIndex = 0;\n\t\t\t\t\tnode.dataset.hasMultiSelection = hasMultiSelection;\n\n\t\t\t\t\tif ( ! hasMultiSelection ) {\n\t\t\t\t\t\treturn () => {\n\t\t\t\t\t\t\tdelete node.dataset.hasMultiSelection;\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\n\t\t\t\t\tnode.setAttribute(\n\t\t\t\t\t\t'aria-label',\n\t\t\t\t\t\t__( 'Multiple selected blocks' )\n\t\t\t\t\t);\n\n\t\t\t\t\treturn () => {\n\t\t\t\t\t\tdelete node.dataset.hasMultiSelection;\n\t\t\t\t\t\t// The wrapper may remain the editing host (the\n\t\t\t\t\t\t// collapsed block supports `editableRoot`): keep it\n\t\t\t\t\t\t// named, as the textbox role requires.\n\t\t\t\t\t\tif ( node.contentEditable === 'true' ) {\n\t\t\t\t\t\t\tnode.setAttribute(\n\t\t\t\t\t\t\t\t'aria-label',\n\t\t\t\t\t\t\t\t__( 'Editor canvas' )\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tnode.removeAttribute( 'aria-label' );\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t[ hasMultiSelection ]\n\t\t\t),\n\t\t] ),\n\t\tafter,\n\t];\n}\n\nfunction WritingFlow( { children, ...props }, forwardedRef ) {\n\tconst [ before, ref, after ] = useWritingFlow();\n\treturn (\n\t\t<>\n\t\t\t{ before }\n\t\t\t<div\n\t\t\t\t{ ...props }\n\t\t\t\tref={ useMergeRefs( [ ref, forwardedRef ] ) }\n\t\t\t\tclassName={ clsx(\n\t\t\t\t\tprops.className,\n\t\t\t\t\t'block-editor-writing-flow'\n\t\t\t\t) }\n\t\t\t>\n\t\t\t\t{ children }\n\t\t\t</div>\n\t\t\t{ after }\n\t\t</>\n\t);\n}\n\n/**\n * Handles selection and navigation across blocks. This component should be\n * wrapped around BlockList.\n *\n * @param {Object} props Component properties.\n * @param {Element} props.children Children to be rendered.\n */\nexport default forwardRef( WritingFlow );\n"],
5
5
  "mappings": ";AAAA,OAAO,UAAU;AACjB,SAAS,iBAAiB;AAC1B,SAAS,UAAU;AACnB,SAAS,cAAc,oBAAoB;AAC3C,SAAS,kBAAkB;AAC3B,OAAO,qBAAqB;AAC5B,OAAO,gBAAgB;AACvB,OAAO,uBAAuB;AAC9B,OAAO,eAAe;AACtB,OAAO,iBAAiB;AACxB,SAAS,yBAAyB;AAClC,OAAO,kBAAkB;AACzB,OAAO,sBAAsB;AAC7B,OAAO,0BAA0B;AACjC,OAAO,kCAAkC;AACzC,OAAO,uBAAuB;AAC9B,OAAO,cAAc;AACrB,OAAO,yBAAyB;AAChC,SAAS,SAAS,wBAAwB;AAkExC,mBAEC,KAFD;AAhEK,SAAS,iBAAiB;AAChC,QAAM,CAAE,QAAQ,KAAK,KAAM,IAAI,UAAU;AACzC,QAAM,oBAAoB;AAAA,IACzB,CAAE,WAAY,OAAQ,gBAAiB,EAAE,kBAAkB;AAAA,IAC3D,CAAC;AAAA,EACF;AAEA,SAAO;AAAA,IACN;AAAA,IACA,aAAc;AAAA,MACb;AAAA,MACA,6BAA6B;AAAA,MAC7B,oBAAoB;AAAA,MACpB,SAAS;AAAA,MACT,gBAAgB;AAAA,MAChB,WAAW;AAAA,MACX,iBAAiB;AAAA,MACjB,qBAAqB;AAAA,MACrB,kBAAkB;AAAA,MAClB,kBAAkB;AAAA,MAClB,aAAa;AAAA,MACb,YAAY;AAAA,MACZ,kBAAkB;AAAA,MAClB;AAAA,QACC,CAAE,SAAU;AACX,eAAK,WAAW;AAChB,eAAK,QAAQ,oBAAoB;AAEjC,cAAK,CAAE,mBAAoB;AAC1B,mBAAO,MAAM;AACZ,qBAAO,KAAK,QAAQ;AAAA,YACrB;AAAA,UACD;AAEA,eAAK;AAAA,YACJ;AAAA,YACA,GAAI,0BAA2B;AAAA,UAChC;AAEA,iBAAO,MAAM;AACZ,mBAAO,KAAK,QAAQ;AAIpB,gBAAK,KAAK,oBAAoB,QAAS;AACtC,mBAAK;AAAA,gBACJ;AAAA,gBACA,GAAI,eAAgB;AAAA,cACrB;AAAA,YACD,OAAO;AACN,mBAAK,gBAAiB,YAAa;AAAA,YACpC;AAAA,UACD;AAAA,QACD;AAAA,QACA,CAAE,iBAAkB;AAAA,MACrB;AAAA,IACD,CAAE;AAAA,IACF;AAAA,EACD;AACD;AAEA,SAAS,YAAa,EAAE,UAAU,GAAG,MAAM,GAAG,cAAe;AAC5D,QAAM,CAAE,QAAQ,KAAK,KAAM,IAAI,eAAe;AAC9C,SACC,iCACG;AAAA;AAAA,IACF;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACL,KAAM,aAAc,CAAE,KAAK,YAAa,CAAE;AAAA,QAC1C,WAAY;AAAA,UACX,MAAM;AAAA,UACN;AAAA,QACD;AAAA,QAEE;AAAA;AAAA,IACH;AAAA,IACE;AAAA,KACH;AAEF;AASA,IAAO,uBAAQ,WAAY,WAAY;",
6
6
  "names": []
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/writing-flow/use-arrow-nav.js"],
4
- "sourcesContent": ["import {\n\tcomputeCaretRect,\n\tfocus,\n\tisHorizontalEdge,\n\tisVerticalEdge,\n\tplaceCaretAtHorizontalEdge,\n\tplaceCaretAtVerticalEdge,\n\tisRTL,\n\tisFormElement,\n} from '@wordpress/dom';\nimport { UP, DOWN, LEFT, RIGHT } from '@wordpress/keycodes';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useRefEffect } from '@wordpress/compose';\nimport { getBlockType, hasBlockSupport } from '@wordpress/blocks';\nimport {\n\tgetBlockClientId,\n\tgetSelectionEditableElement,\n\tisInSameBlock,\n} from '../../utils/dom';\nimport { store as blockEditorStore } from '../../store';\nimport { setContentEditableWrapper } from './utils';\n\n/**\n * Returns true if the element should consider edge navigation upon a keyboard\n * event of the given directional key code, or false otherwise.\n *\n * @param {Element} element HTML element to test.\n * @param {number} keyCode KeyboardEvent keyCode to test.\n * @param {boolean} hasModifier Whether a modifier is pressed.\n *\n * @return {boolean} Whether element should consider edge navigation.\n */\nexport function isNavigationCandidate( element, keyCode, hasModifier ) {\n\tconst isVertical = keyCode === UP || keyCode === DOWN;\n\tconst { tagName } = element;\n\tconst elementType = element.getAttribute( 'type' );\n\n\t// Native inputs should not navigate vertically, unless they are simple types that don't need up/down arrow keys.\n\tif ( isVertical && ! hasModifier ) {\n\t\tif ( tagName === 'INPUT' ) {\n\t\t\tconst verticalInputTypes = [\n\t\t\t\t'date',\n\t\t\t\t'datetime-local',\n\t\t\t\t'month',\n\t\t\t\t'number',\n\t\t\t\t'range',\n\t\t\t\t'time',\n\t\t\t\t'week',\n\t\t\t];\n\t\t\treturn ! verticalInputTypes.includes( elementType );\n\t\t}\n\t\treturn true;\n\t}\n\n\t// Native inputs should not navigate horizontally, unless they are simple types that don't need left/right arrow keys.\n\tif ( tagName === 'INPUT' ) {\n\t\tconst simpleInputTypes = [\n\t\t\t'button',\n\t\t\t'checkbox',\n\t\t\t'number',\n\t\t\t'color',\n\t\t\t'file',\n\t\t\t'image',\n\t\t\t'radio',\n\t\t\t'reset',\n\t\t\t'submit',\n\t\t];\n\t\treturn simpleInputTypes.includes( elementType );\n\t}\n\n\t// Native textareas should not navigate horizontally.\n\treturn tagName !== 'TEXTAREA';\n}\n\n/**\n * Returns the optimal tab target from the given focused element in the desired\n * direction. A preference is made toward text fields, falling back to the block\n * focus stop if no other candidates exist for the block.\n *\n * @param {Element} target Currently focused text field.\n * @param {boolean} isReverse True if considering as the first field.\n * @param {Element} containerElement Element containing all blocks.\n * @param {boolean} onlyVertical Whether to only consider tabbable elements\n * that are visually above or under the\n * target.\n *\n * @return {?Element} Optimal tab target, if one exists.\n */\nexport function getClosestTabbable(\n\ttarget,\n\tisReverse,\n\tcontainerElement,\n\tonlyVertical\n) {\n\t// Since the current focus target is not guaranteed to be a text field, find\n\t// all focusables. Tabbability is considered later.\n\tlet focusableNodes = focus.focusable.find( containerElement );\n\n\tif ( isReverse ) {\n\t\tfocusableNodes.reverse();\n\t}\n\n\t// Consider as candidates those focusables after the current target. It's\n\t// assumed this can only be reached if the target is focusable (on its\n\t// keydown event), so no need to verify it exists in the set.\n\tfocusableNodes = focusableNodes.slice(\n\t\tfocusableNodes.indexOf( target ) + 1\n\t);\n\n\tlet targetRect;\n\n\tif ( onlyVertical ) {\n\t\ttargetRect = target.getBoundingClientRect();\n\t}\n\n\tfunction isTabCandidate( node ) {\n\t\t// Skip if there's only one child that is content editable (and thus a\n\t\t// better candidate).\n\t\tif (\n\t\t\tnode.children.length === 1 &&\n\t\t\tisInSameBlock( node, node.firstElementChild ) &&\n\t\t\tnode.firstElementChild.getAttribute( 'contenteditable' ) === 'true'\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Wrappers that merge with the text flow dissolve into it: their\n\t\t// content is the better candidate. Any other container is a\n\t\t// boundary the caret stops on.\n\t\tconst blockType = getBlockType( node.getAttribute( 'data-type' ) );\n\t\tif (\n\t\t\tnode.contentEditable !== 'true' &&\n\t\t\tgetBlockClientId( node ) &&\n\t\t\tblockType &&\n\t\t\t( blockType.merge ||\n\t\t\t\thasBlockSupport( blockType, '__experimentalOnMerge' ) ) &&\n\t\t\tfocus.focusable\n\t\t\t\t.find( node )\n\t\t\t\t// Exclude form elements for now because primary+a cannot be\n\t\t\t\t// used to select the parent element.\n\t\t\t\t.filter( ( element ) => ! isFormElement( element ) ).length !==\n\t\t\t\t0\n\t\t) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Not a candidate if the node is not tabbable.\n\t\tif ( ! focus.tabbable.isTabbableIndex( node ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Skip focusable elements such as links within content editable\n\t\t// nodes: nodes whose closest editable host is an editable element\n\t\t// within a block. When an editable root (e.g. the canvas wrapper)\n\t\t// is the editing host, everything within it is content editable,\n\t\t// but focusables like block wrappers are not text content.\n\t\tif (\n\t\t\tnode.isContentEditable &&\n\t\t\tnode.contentEditable !== 'true' &&\n\t\t\tgetBlockClientId( node.closest( '[contenteditable=\"true\"]' ) )\n\t\t) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( onlyVertical ) {\n\t\t\tconst nodeRect = node.getBoundingClientRect();\n\n\t\t\tif (\n\t\t\t\tnodeRect.left >= targetRect.right ||\n\t\t\t\tnodeRect.right <= targetRect.left\n\t\t\t) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\treturn focusableNodes.find( isTabCandidate );\n}\n\nexport default function useArrowNav() {\n\tconst {\n\t\tgetMultiSelectedBlocksStartClientId,\n\t\tgetMultiSelectedBlocksEndClientId,\n\t\tgetNextBlockClientId,\n\t\tgetPreviousBlockClientId,\n\t\tgetSelectedBlockClientId,\n\t\tgetSelectionStart,\n\t\tgetSettings,\n\t\thasMultiSelection,\n\t\t__unstableIsFullySelected,\n\t} = useSelect( blockEditorStore );\n\tconst { selectBlock, multiSelect } = useDispatch( blockEditorStore );\n\treturn useRefEffect( ( node ) => {\n\t\t// Here a DOMRect is stored while moving the caret vertically so\n\t\t// vertical position of the start position can be restored. This is to\n\t\t// recreate browser behaviour across blocks.\n\t\tlet verticalRect;\n\n\t\tfunction onMouseDown() {\n\t\t\tverticalRect = null;\n\t\t}\n\n\t\tfunction isClosestTabbableABlock( target, isReverse ) {\n\t\t\tconst closestTabbable = getClosestTabbable(\n\t\t\t\ttarget,\n\t\t\t\tisReverse,\n\t\t\t\tnode\n\t\t\t);\n\t\t\treturn closestTabbable && getBlockClientId( closestTabbable );\n\t\t}\n\n\t\tfunction onKeyDown( event ) {\n\t\t\t// Abort if navigation has already been handled (e.g. RichText\n\t\t\t// inline boundaries).\n\t\t\tif ( event.defaultPrevented ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst { keyCode, shiftKey, ctrlKey, altKey, metaKey } = event;\n\t\t\t// When the wrapper is contentEditable and holds focus (the\n\t\t\t// selected block supports `editableRoot`), the event targets the\n\t\t\t// wrapper; resolve the editable element containing the selection.\n\t\t\tconst target =\n\t\t\t\t( event.target === node &&\n\t\t\t\t\tgetSelectionEditableElement(\n\t\t\t\t\t\tnode.ownerDocument.defaultView.getSelection(),\n\t\t\t\t\t\tnode\n\t\t\t\t\t) ) ||\n\t\t\t\tevent.target;\n\t\t\tconst isUp = keyCode === UP;\n\t\t\tconst isDown = keyCode === DOWN;\n\t\t\tconst isLeft = keyCode === LEFT;\n\t\t\tconst isRight = keyCode === RIGHT;\n\t\t\tconst isReverse = isUp || isLeft;\n\t\t\tconst isHorizontal = isLeft || isRight;\n\t\t\tconst isVertical = isUp || isDown;\n\t\t\tconst isNav = isHorizontal || isVertical;\n\t\t\tconst hasModifier = shiftKey || ctrlKey || altKey || metaKey;\n\t\t\tconst isNavEdge = isVertical ? isVerticalEdge : isHorizontalEdge;\n\t\t\tconst { ownerDocument } = node;\n\t\t\tconst { defaultView } = ownerDocument;\n\n\t\t\tif ( ! isNav ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// In preview mode, navigation is handled by useSelectableBlocksNav.\n\t\t\tif ( getSettings().isPreviewMode ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// If there is a multi-selection, the arrow keys should collapse the\n\t\t\t// selection to the start or end of the selection.\n\t\t\tif ( hasMultiSelection() ) {\n\t\t\t\tif ( shiftKey ) {\n\t\t\t\t\t// A fully selected multi-selection has no native\n\t\t\t\t\t// selection to extend (use-multi-selection cleared it),\n\t\t\t\t\t// so grow or shrink it by one block at the focus end.\n\t\t\t\t\t// Only without a usable native selection: a selection\n\t\t\t\t\t// that is fully selected because it resolves to a\n\t\t\t\t\t// nesting ancestor keeps its native selection, which\n\t\t\t\t\t// the browser extends natively (and the observer\n\t\t\t\t\t// promotes to the common level).\n\t\t\t\t\tconst selection = defaultView.getSelection();\n\t\t\t\t\tif (\n\t\t\t\t\t\t__unstableIsFullySelected() &&\n\t\t\t\t\t\t( ! selection.rangeCount || selection.isCollapsed )\n\t\t\t\t\t) {\n\t\t\t\t\t\tconst anchorClientId =\n\t\t\t\t\t\t\tgetMultiSelectedBlocksStartClientId();\n\t\t\t\t\t\tconst focusClientId =\n\t\t\t\t\t\t\tgetMultiSelectedBlocksEndClientId();\n\t\t\t\t\t\tconst nextClientId = isReverse\n\t\t\t\t\t\t\t? getPreviousBlockClientId( focusClientId )\n\t\t\t\t\t\t\t: getNextBlockClientId( focusClientId );\n\n\t\t\t\t\t\tif ( nextClientId ) {\n\t\t\t\t\t\t\tmultiSelect( anchorClientId, nextClientId );\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Only handle if we have a full selection (not a native partial\n\t\t\t\t// selection).\n\t\t\t\tif ( ! __unstableIsFullySelected() ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tevent.preventDefault();\n\n\t\t\t\tif ( isReverse ) {\n\t\t\t\t\tselectBlock( getMultiSelectedBlocksStartClientId() );\n\t\t\t\t} else {\n\t\t\t\t\tselectBlock( getMultiSelectedBlocksEndClientId(), -1 );\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// A block selected without a text selection within it (e.g. an\n\t\t\t// image or spacer) has no native selection to extend: start a\n\t\t\t// block multi-selection with the adjacent block.\n\t\t\tif (\n\t\t\t\tshiftKey &&\n\t\t\t\tgetSelectedBlockClientId() &&\n\t\t\t\t! getSelectionStart().attributeKey\n\t\t\t) {\n\t\t\t\tconst selectedClientId = getSelectedBlockClientId();\n\t\t\t\tconst nextClientId = isReverse\n\t\t\t\t\t? getPreviousBlockClientId( selectedClientId )\n\t\t\t\t\t: getNextBlockClientId( selectedClientId );\n\n\t\t\t\tif ( nextClientId ) {\n\t\t\t\t\tmultiSelect( selectedClientId, nextClientId );\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Abort if our current target is not a candidate for navigation\n\t\t\t// (e.g. preserve native input behaviors).\n\t\t\tif ( ! isNavigationCandidate( target, keyCode, hasModifier ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// When presing any key other than up or down, the initial vertical\n\t\t\t// position must ALWAYS be reset. The vertical position is saved so\n\t\t\t// it can be restored as well as possible on sebsequent vertical\n\t\t\t// arrow key presses. It may not always be possible to restore the\n\t\t\t// exact same position (such as at an empty line), so it wouldn't be\n\t\t\t// good to compute the position right before any vertical arrow key\n\t\t\t// press.\n\t\t\tif ( ! isVertical ) {\n\t\t\t\tverticalRect = null;\n\t\t\t} else if ( ! verticalRect ) {\n\t\t\t\tverticalRect = computeCaretRect( defaultView );\n\t\t\t}\n\n\t\t\t// In the case of RTL scripts, right means previous and left means\n\t\t\t// next, which is the exact reverse of LTR.\n\t\t\tconst isReverseDir = isRTL( target ) ? ! isReverse : isReverse;\n\t\t\tconst { keepCaretInsideBlock } = getSettings();\n\n\t\t\tif ( shiftKey ) {\n\t\t\t\tif ( isNavEdge( target, isReverse ) ) {\n\t\t\t\t\tif ( isClosestTabbableABlock( target, isReverse ) ) {\n\t\t\t\t\t\tsetContentEditableWrapper( node, true );\n\t\t\t\t\t} else if ( node.contentEditable === 'true' ) {\n\t\t\t\t\t\t// There is no block to extend the selection into.\n\t\t\t\t\t\t// Within an editable wrapper the selection could\n\t\t\t\t\t\t// natively escape into surrounding editable elements\n\t\t\t\t\t\t// (e.g. the post title), so keep it inside the block\n\t\t\t\t\t\t// by extending it to the block's edge.\n\t\t\t\t\t\tconst selection = defaultView.getSelection();\n\t\t\t\t\t\tselection.extend(\n\t\t\t\t\t\t\ttarget,\n\t\t\t\t\t\t\tisReverse ? 0 : target.childNodes.length\n\t\t\t\t\t\t);\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (\n\t\t\t\tisVertical &&\n\t\t\t\tisVerticalEdge( target, isReverse ) &&\n\t\t\t\t// When Alt is pressed, only intercept if the caret is also at\n\t\t\t\t// the horizontal edge.\n\t\t\t\t( altKey ? isHorizontalEdge( target, isReverseDir ) : true ) &&\n\t\t\t\t! keepCaretInsideBlock\n\t\t\t) {\n\t\t\t\tconst closestTabbable = getClosestTabbable(\n\t\t\t\t\ttarget,\n\t\t\t\t\tisReverse,\n\t\t\t\t\tnode,\n\t\t\t\t\ttrue\n\t\t\t\t);\n\n\t\t\t\tif ( closestTabbable ) {\n\t\t\t\t\tplaceCaretAtVerticalEdge(\n\t\t\t\t\t\tclosestTabbable,\n\t\t\t\t\t\t// When Alt is pressed, place the caret at the furthest\n\t\t\t\t\t\t// horizontal edge and the furthest vertical edge.\n\t\t\t\t\t\taltKey ? ! isReverse : isReverse,\n\t\t\t\t\t\taltKey ? undefined : verticalRect\n\t\t\t\t\t);\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t} else if (\n\t\t\t\tisHorizontal &&\n\t\t\t\tdefaultView.getSelection().isCollapsed &&\n\t\t\t\tisHorizontalEdge( target, isReverseDir ) &&\n\t\t\t\t! keepCaretInsideBlock\n\t\t\t) {\n\t\t\t\tconst closestTabbable = getClosestTabbable(\n\t\t\t\t\ttarget,\n\t\t\t\t\tisReverseDir,\n\t\t\t\t\tnode\n\t\t\t\t);\n\t\t\t\tplaceCaretAtHorizontalEdge( closestTabbable, isReverse );\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t}\n\n\t\tnode.addEventListener( 'mousedown', onMouseDown );\n\t\tnode.addEventListener( 'keydown', onKeyDown );\n\t\treturn () => {\n\t\t\tnode.removeEventListener( 'mousedown', onMouseDown );\n\t\t\tnode.removeEventListener( 'keydown', onKeyDown );\n\t\t};\n\t}, [] );\n}\n"],
4
+ "sourcesContent": ["import {\n\tcomputeCaretRect,\n\tfocus,\n\tisHorizontalEdge,\n\tisVerticalEdge,\n\tplaceCaretAtHorizontalEdge,\n\tplaceCaretAtVerticalEdge,\n\tisRTL,\n\tisFormElement,\n} from '@wordpress/dom';\nimport { UP, DOWN, LEFT, RIGHT } from '@wordpress/keycodes';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useRefEffect } from '@wordpress/compose';\nimport { getBlockType, hasBlockSupport } from '@wordpress/blocks';\nimport {\n\tgetBlockClientId,\n\tgetSelectionEditableElement,\n\tisInSameBlock,\n} from '../../utils/dom';\nimport { store as blockEditorStore } from '../../store';\nimport { setContentEditableWrapper } from './utils';\n\n/**\n * Returns true if the element should consider edge navigation upon a keyboard\n * event of the given directional key code, or false otherwise.\n *\n * @param {Element} element HTML element to test.\n * @param {number} keyCode KeyboardEvent keyCode to test.\n * @param {boolean} hasModifier Whether a modifier is pressed.\n *\n * @return {boolean} Whether element should consider edge navigation.\n */\nexport function isNavigationCandidate( element, keyCode, hasModifier ) {\n\tconst isVertical = keyCode === UP || keyCode === DOWN;\n\tconst { tagName } = element;\n\tconst elementType = element.getAttribute( 'type' );\n\n\t// Native inputs should not navigate vertically, unless they are simple types that don't need up/down arrow keys.\n\tif ( isVertical && ! hasModifier ) {\n\t\tif ( tagName === 'INPUT' ) {\n\t\t\tconst verticalInputTypes = [\n\t\t\t\t'date',\n\t\t\t\t'datetime-local',\n\t\t\t\t'month',\n\t\t\t\t'number',\n\t\t\t\t'range',\n\t\t\t\t'time',\n\t\t\t\t'week',\n\t\t\t];\n\t\t\treturn ! verticalInputTypes.includes( elementType );\n\t\t}\n\t\treturn true;\n\t}\n\n\t// Native inputs should not navigate horizontally, unless they are simple types that don't need left/right arrow keys.\n\tif ( tagName === 'INPUT' ) {\n\t\tconst simpleInputTypes = [\n\t\t\t'button',\n\t\t\t'checkbox',\n\t\t\t'number',\n\t\t\t'color',\n\t\t\t'file',\n\t\t\t'image',\n\t\t\t'radio',\n\t\t\t'reset',\n\t\t\t'submit',\n\t\t];\n\t\treturn simpleInputTypes.includes( elementType );\n\t}\n\n\t// Native textareas should not navigate horizontally.\n\treturn tagName !== 'TEXTAREA';\n}\n\n/**\n * Returns the optimal tab target from the given focused element in the desired\n * direction. A preference is made toward text fields, falling back to the block\n * focus stop if no other candidates exist for the block.\n *\n * @param {Element} target Currently focused text field.\n * @param {boolean} isReverse True if considering as the first field.\n * @param {Element} containerElement Element containing all blocks.\n * @param {boolean} onlyVertical Whether to only consider tabbable elements\n * that are visually above or under the\n * target.\n *\n * @return {?Element} Optimal tab target, if one exists.\n */\nexport function getClosestTabbable(\n\ttarget,\n\tisReverse,\n\tcontainerElement,\n\tonlyVertical\n) {\n\t// Since the current focus target is not guaranteed to be a text field, find\n\t// all focusables. Tabbability is considered later.\n\tlet focusableNodes = focus.focusable.find( containerElement );\n\n\tif ( isReverse ) {\n\t\tfocusableNodes.reverse();\n\t}\n\n\t// Consider as candidates those focusables after the current target. It's\n\t// assumed this can only be reached if the target is focusable (on its\n\t// keydown event), so no need to verify it exists in the set.\n\tfocusableNodes = focusableNodes.slice(\n\t\tfocusableNodes.indexOf( target ) + 1\n\t);\n\n\tlet targetRect;\n\n\tif ( onlyVertical ) {\n\t\ttargetRect = target.getBoundingClientRect();\n\t}\n\n\tfunction isTabCandidate( node ) {\n\t\t// Skip if there's only one child that is content editable (and thus a\n\t\t// better candidate).\n\t\tif (\n\t\t\tnode.children.length === 1 &&\n\t\t\tisInSameBlock( node, node.firstElementChild ) &&\n\t\t\tnode.firstElementChild.getAttribute( 'contenteditable' ) === 'true'\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Wrappers that merge with the text flow dissolve into it: their\n\t\t// content is the better candidate. Any other container is a\n\t\t// boundary the caret stops on.\n\t\tconst blockType = getBlockType( node.getAttribute( 'data-type' ) );\n\t\tif (\n\t\t\tnode.contentEditable !== 'true' &&\n\t\t\tgetBlockClientId( node ) &&\n\t\t\tblockType &&\n\t\t\t( blockType.merge ||\n\t\t\t\thasBlockSupport( blockType, '__experimentalOnMerge' ) ) &&\n\t\t\tfocus.focusable\n\t\t\t\t.find( node )\n\t\t\t\t// Exclude form elements for now because primary+a cannot be\n\t\t\t\t// used to select the parent element.\n\t\t\t\t.filter( ( element ) => ! isFormElement( element ) ).length !==\n\t\t\t\t0\n\t\t) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Not a candidate if the node is not tabbable.\n\t\tif ( ! focus.tabbable.isTabbableIndex( node ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Skip focusable elements such as links within content editable\n\t\t// nodes: nodes whose closest editable host is an editable element\n\t\t// within a block. When an editable root (e.g. the canvas wrapper)\n\t\t// is the editing host, everything within it is content editable,\n\t\t// but focusables like block wrappers are not text content.\n\t\tif (\n\t\t\tnode.isContentEditable &&\n\t\t\tnode.contentEditable !== 'true' &&\n\t\t\tgetBlockClientId( node.closest( '[contenteditable=\"true\"]' ) )\n\t\t) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( onlyVertical ) {\n\t\t\tconst nodeRect = node.getBoundingClientRect();\n\n\t\t\tif (\n\t\t\t\tnodeRect.left >= targetRect.right ||\n\t\t\t\tnodeRect.right <= targetRect.left\n\t\t\t) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\treturn focusableNodes.find( isTabCandidate );\n}\n\nexport default function useArrowNav() {\n\tconst {\n\t\tgetMultiSelectedBlocksStartClientId,\n\t\tgetMultiSelectedBlocksEndClientId,\n\t\tgetNextBlockClientId,\n\t\tgetPreviousBlockClientId,\n\t\tgetSelectedBlockClientId,\n\t\tgetSelectionStart,\n\t\tgetSettings,\n\t\thasMultiSelection,\n\t\t__unstableIsFullySelected,\n\t} = useSelect( blockEditorStore );\n\tconst { selectBlock, multiSelect } = useDispatch( blockEditorStore );\n\treturn useRefEffect( ( node ) => {\n\t\t// Here a DOMRect is stored while moving the caret vertically so\n\t\t// vertical position of the start position can be restored. This is to\n\t\t// recreate browser behaviour across blocks.\n\t\tlet verticalRect;\n\n\t\tfunction onMouseDown() {\n\t\t\tverticalRect = null;\n\t\t}\n\n\t\tfunction isClosestTabbableABlock( target, isReverse ) {\n\t\t\tconst closestTabbable = getClosestTabbable(\n\t\t\t\ttarget,\n\t\t\t\tisReverse,\n\t\t\t\tnode\n\t\t\t);\n\t\t\treturn closestTabbable && getBlockClientId( closestTabbable );\n\t\t}\n\n\t\tfunction onKeyDown( event ) {\n\t\t\t// Abort if navigation has already been handled (e.g. RichText\n\t\t\t// inline boundaries).\n\t\t\tif ( event.defaultPrevented ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst { keyCode, shiftKey, ctrlKey, altKey, metaKey } = event;\n\t\t\t// When the wrapper is contentEditable and holds focus (the\n\t\t\t// selected block supports `editableRoot`), the event targets the\n\t\t\t// wrapper; resolve the editable element containing the selection.\n\t\t\tconst target =\n\t\t\t\t( event.target === node &&\n\t\t\t\t\tgetSelectionEditableElement(\n\t\t\t\t\t\tnode.ownerDocument.defaultView.getSelection(),\n\t\t\t\t\t\tnode\n\t\t\t\t\t) ) ||\n\t\t\t\tevent.target;\n\t\t\tconst isUp = keyCode === UP;\n\t\t\tconst isDown = keyCode === DOWN;\n\t\t\tconst isLeft = keyCode === LEFT;\n\t\t\tconst isRight = keyCode === RIGHT;\n\t\t\tconst isReverse = isUp || isLeft;\n\t\t\tconst isHorizontal = isLeft || isRight;\n\t\t\tconst isVertical = isUp || isDown;\n\t\t\tconst isNav = isHorizontal || isVertical;\n\t\t\tconst hasModifier = shiftKey || ctrlKey || altKey || metaKey;\n\t\t\tconst isNavEdge = isVertical ? isVerticalEdge : isHorizontalEdge;\n\t\t\tconst { ownerDocument } = node;\n\t\t\tconst { defaultView } = ownerDocument;\n\n\t\t\tif ( ! isNav ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// In preview mode, navigation is handled by useSelectableBlocksNav.\n\t\t\tif ( getSettings().isPreviewMode ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// If there is a multi-selection, the arrow keys should collapse the\n\t\t\t// selection to the start or end of the selection.\n\t\t\tif ( hasMultiSelection() ) {\n\t\t\t\tif ( shiftKey ) {\n\t\t\t\t\t// A fully selected multi-selection has no native\n\t\t\t\t\t// selection to extend (use-multi-selection cleared it),\n\t\t\t\t\t// so grow or shrink it by one block at the focus end.\n\t\t\t\t\t// Only without a usable native selection: a selection\n\t\t\t\t\t// that is fully selected because it resolves to a\n\t\t\t\t\t// nesting ancestor keeps its native selection, which\n\t\t\t\t\t// the browser extends natively (and the observer\n\t\t\t\t\t// promotes to the common level).\n\t\t\t\t\tconst selection = defaultView.getSelection();\n\t\t\t\t\tif (\n\t\t\t\t\t\t__unstableIsFullySelected() &&\n\t\t\t\t\t\t( ! selection.rangeCount || selection.isCollapsed )\n\t\t\t\t\t) {\n\t\t\t\t\t\tconst anchorClientId =\n\t\t\t\t\t\t\tgetMultiSelectedBlocksStartClientId();\n\t\t\t\t\t\tconst focusClientId =\n\t\t\t\t\t\t\tgetMultiSelectedBlocksEndClientId();\n\t\t\t\t\t\tconst nextClientId = isReverse\n\t\t\t\t\t\t\t? getPreviousBlockClientId( focusClientId )\n\t\t\t\t\t\t\t: getNextBlockClientId( focusClientId );\n\n\t\t\t\t\t\tif ( nextClientId ) {\n\t\t\t\t\t\t\tmultiSelect( anchorClientId, nextClientId );\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Only handle if we have a full selection (not a native partial\n\t\t\t\t// selection).\n\t\t\t\tif ( ! __unstableIsFullySelected() ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tevent.preventDefault();\n\n\t\t\t\tif ( isReverse ) {\n\t\t\t\t\tselectBlock( getMultiSelectedBlocksStartClientId() );\n\t\t\t\t} else {\n\t\t\t\t\tselectBlock( getMultiSelectedBlocksEndClientId(), -1 );\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// A block selected without a text selection within it (e.g. an\n\t\t\t// image or spacer) has no native selection to extend: start a\n\t\t\t// block multi-selection with the adjacent block.\n\t\t\tif (\n\t\t\t\tshiftKey &&\n\t\t\t\tgetSelectedBlockClientId() &&\n\t\t\t\t! getSelectionStart().attributeKey\n\t\t\t) {\n\t\t\t\tconst selectedClientId = getSelectedBlockClientId();\n\t\t\t\tconst nextClientId = isReverse\n\t\t\t\t\t? getPreviousBlockClientId( selectedClientId )\n\t\t\t\t\t: getNextBlockClientId( selectedClientId );\n\n\t\t\t\tif ( nextClientId ) {\n\t\t\t\t\tmultiSelect( selectedClientId, nextClientId );\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Abort if our current target is not a candidate for navigation\n\t\t\t// (e.g. preserve native input behaviors).\n\t\t\tif ( ! isNavigationCandidate( target, keyCode, hasModifier ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// When pressing any key other than up or down, the initial vertical\n\t\t\t// position must ALWAYS be reset. The vertical position is saved so\n\t\t\t// it can be restored as well as possible on subsequent vertical\n\t\t\t// arrow key presses. It may not always be possible to restore the\n\t\t\t// exact same position (such as at an empty line), so it wouldn't be\n\t\t\t// good to compute the position right before any vertical arrow key\n\t\t\t// press.\n\t\t\tif ( ! isVertical ) {\n\t\t\t\tverticalRect = null;\n\t\t\t} else if ( ! verticalRect ) {\n\t\t\t\tverticalRect = computeCaretRect( defaultView );\n\t\t\t}\n\n\t\t\t// In the case of RTL scripts, right means previous and left means\n\t\t\t// next, which is the exact reverse of LTR.\n\t\t\tconst isReverseDir = isRTL( target ) ? ! isReverse : isReverse;\n\t\t\tconst { keepCaretInsideBlock } = getSettings();\n\n\t\t\tif ( shiftKey ) {\n\t\t\t\tif ( isNavEdge( target, isReverse ) ) {\n\t\t\t\t\tif ( isClosestTabbableABlock( target, isReverse ) ) {\n\t\t\t\t\t\tsetContentEditableWrapper( node, true );\n\t\t\t\t\t} else if ( node.contentEditable === 'true' ) {\n\t\t\t\t\t\t// There is no block to extend the selection into.\n\t\t\t\t\t\t// Within an editable wrapper the selection could\n\t\t\t\t\t\t// natively escape into surrounding editable elements\n\t\t\t\t\t\t// (e.g. the post title), so keep it inside the block\n\t\t\t\t\t\t// by extending it to the block's edge.\n\t\t\t\t\t\tconst selection = defaultView.getSelection();\n\t\t\t\t\t\tselection.extend(\n\t\t\t\t\t\t\ttarget,\n\t\t\t\t\t\t\tisReverse ? 0 : target.childNodes.length\n\t\t\t\t\t\t);\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (\n\t\t\t\tisVertical &&\n\t\t\t\tisVerticalEdge( target, isReverse ) &&\n\t\t\t\t// When Alt is pressed, only intercept if the caret is also at\n\t\t\t\t// the horizontal edge.\n\t\t\t\t( altKey ? isHorizontalEdge( target, isReverseDir ) : true ) &&\n\t\t\t\t! keepCaretInsideBlock\n\t\t\t) {\n\t\t\t\tconst closestTabbable = getClosestTabbable(\n\t\t\t\t\ttarget,\n\t\t\t\t\tisReverse,\n\t\t\t\t\tnode,\n\t\t\t\t\ttrue\n\t\t\t\t);\n\n\t\t\t\tif ( closestTabbable ) {\n\t\t\t\t\tplaceCaretAtVerticalEdge(\n\t\t\t\t\t\tclosestTabbable,\n\t\t\t\t\t\t// When Alt is pressed, place the caret at the furthest\n\t\t\t\t\t\t// horizontal edge and the furthest vertical edge.\n\t\t\t\t\t\taltKey ? ! isReverse : isReverse,\n\t\t\t\t\t\taltKey ? undefined : verticalRect\n\t\t\t\t\t);\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t} else if (\n\t\t\t\tisHorizontal &&\n\t\t\t\tdefaultView.getSelection().isCollapsed &&\n\t\t\t\tisHorizontalEdge( target, isReverseDir ) &&\n\t\t\t\t! keepCaretInsideBlock\n\t\t\t) {\n\t\t\t\tconst closestTabbable = getClosestTabbable(\n\t\t\t\t\ttarget,\n\t\t\t\t\tisReverseDir,\n\t\t\t\t\tnode\n\t\t\t\t);\n\t\t\t\tplaceCaretAtHorizontalEdge( closestTabbable, isReverse );\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t}\n\n\t\tnode.addEventListener( 'mousedown', onMouseDown );\n\t\tnode.addEventListener( 'keydown', onKeyDown );\n\t\treturn () => {\n\t\t\tnode.removeEventListener( 'mousedown', onMouseDown );\n\t\t\tnode.removeEventListener( 'keydown', onKeyDown );\n\t\t};\n\t}, [] );\n}\n"],
5
5
  "mappings": "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",
6
6
  "names": []
7
7
  }
@@ -1,4 +1,4 @@
1
- // packages/block-editor/src/components/writing-flow/use-tab-nav.js
1
+ // packages/block-editor/src/components/writing-flow/use-tab-nav.jsx
2
2
  import { focus, isFormElement } from "@wordpress/dom";
3
3
  import { TAB } from "@wordpress/keycodes";
4
4
  import { useSelect, useDispatch } from "@wordpress/data";
@@ -8,6 +8,11 @@ import { store as blockEditorStore } from "../../store/index.mjs";
8
8
  import { isInSameBlock, isInsideRootBlock } from "../../utils/dom.mjs";
9
9
  import { unlock } from "../../lock-unlock.mjs";
10
10
  import { jsx } from "react/jsx-runtime";
11
+ var PREVENT_SCROLL_ON_FOCUS = {
12
+ position: "absolute",
13
+ inset: 0,
14
+ pointerEvents: "none"
15
+ };
11
16
  function useTabNav() {
12
17
  const containerRef = (
13
18
  /** @type {typeof useRef<HTMLElement>} */
@@ -67,7 +72,8 @@ function useTabNav() {
67
72
  {
68
73
  ref: focusCaptureBeforeRef,
69
74
  tabIndex: "0",
70
- onFocus: onFocusCapture
75
+ onFocus: onFocusCapture,
76
+ style: PREVENT_SCROLL_ON_FOCUS
71
77
  }
72
78
  );
73
79
  const after = /* @__PURE__ */ jsx(
@@ -75,7 +81,8 @@ function useTabNav() {
75
81
  {
76
82
  ref: focusCaptureAfterRef,
77
83
  tabIndex: "0",
78
- onFocus: onFocusCapture
84
+ onFocus: onFocusCapture,
85
+ style: PREVENT_SCROLL_ON_FOCUS
79
86
  }
80
87
  );
81
88
  const ref = useRefEffect((node) => {
@@ -104,42 +111,20 @@ function useTabNav() {
104
111
  }
105
112
  const next = isShift ? focusCaptureBeforeRef : focusCaptureAfterRef;
106
113
  noCaptureRef.current = true;
107
- next.current.focus({ preventScroll: true });
114
+ next.current.focus();
108
115
  }
109
116
  function onFocusOut(event) {
110
117
  if (!node.contains(event.relatedTarget)) {
111
118
  setLastFocus({ current: event.target });
112
119
  }
113
- const { ownerDocument: ownerDocument2 } = node;
114
- if (!event.relatedTarget && event.target.hasAttribute("data-block") && ownerDocument2.activeElement === ownerDocument2.body && getBlockCount() === 0) {
120
+ const { ownerDocument } = node;
121
+ if (!event.relatedTarget && event.target.hasAttribute("data-block") && ownerDocument.activeElement === ownerDocument.body && getBlockCount() === 0) {
115
122
  node.focus();
116
123
  }
117
124
  }
118
- function preventScrollOnTab(event) {
119
- if (event.keyCode !== TAB) {
120
- return;
121
- }
122
- if (event.target?.getAttribute("role") === "region") {
123
- return;
124
- }
125
- if (containerRef.current === event.target) {
126
- return;
127
- }
128
- const isShift = event.shiftKey;
129
- const direction = isShift ? "findPrevious" : "findNext";
130
- const target = focus.tabbable[direction](event.target);
131
- if (target === focusCaptureBeforeRef.current || target === focusCaptureAfterRef.current) {
132
- event.preventDefault();
133
- target.focus({ preventScroll: true });
134
- }
135
- }
136
- const { ownerDocument } = node;
137
- const { defaultView } = ownerDocument;
138
- defaultView.addEventListener("keydown", preventScrollOnTab);
139
125
  node.addEventListener("keydown", onKeyDown);
140
126
  node.addEventListener("focusout", onFocusOut);
141
127
  return () => {
142
- defaultView.removeEventListener("keydown", preventScrollOnTab);
143
128
  node.removeEventListener("keydown", onKeyDown);
144
129
  node.removeEventListener("focusout", onFocusOut);
145
130
  };
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/components/writing-flow/use-tab-nav.js"],
4
- "sourcesContent": ["import { focus, isFormElement } from '@wordpress/dom';\nimport { TAB } from '@wordpress/keycodes';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useRefEffect, useMergeRefs } from '@wordpress/compose';\nimport { useRef } from '@wordpress/element';\nimport { store as blockEditorStore } from '../../store';\nimport { isInSameBlock, isInsideRootBlock } from '../../utils/dom';\nimport { unlock } from '../../lock-unlock';\n\nexport default function useTabNav() {\n\tconst containerRef = /** @type {typeof useRef<HTMLElement>} */ ( useRef )();\n\tconst focusCaptureBeforeRef = useRef();\n\tconst focusCaptureAfterRef = useRef();\n\n\tconst {\n\t\thasMultiSelection,\n\t\tgetSelectedBlockClientId,\n\t\tgetBlockCount,\n\t\tgetBlockOrder,\n\t\tgetLastFocus,\n\t\tgetSectionRootClientId,\n\t\tisZoomOut,\n\t} = unlock( useSelect( blockEditorStore ) );\n\tconst { setLastFocus } = unlock( useDispatch( blockEditorStore ) );\n\n\t// Reference that holds the a flag for enabling or disabling\n\t// capturing on the focus capture elements.\n\tconst noCaptureRef = useRef();\n\n\tfunction onFocusCapture( event ) {\n\t\tconst canvasElement =\n\t\t\tcontainerRef.current.ownerDocument === event.target.ownerDocument\n\t\t\t\t? containerRef.current\n\t\t\t\t: containerRef.current.ownerDocument.defaultView.frameElement;\n\n\t\t// Do not capture incoming focus if set by us in WritingFlow.\n\t\tif ( noCaptureRef.current ) {\n\t\t\tnoCaptureRef.current = null;\n\t\t} else if ( hasMultiSelection() ) {\n\t\t\tcontainerRef.current.focus();\n\t\t} else if ( getSelectedBlockClientId() ) {\n\t\t\tif ( getLastFocus()?.current ) {\n\t\t\t\tgetLastFocus().current.focus();\n\t\t\t} else {\n\t\t\t\t// Handles when the last focus has not been set yet, or has been cleared by new blocks being added via the inserter.\n\t\t\t\tcontainerRef.current\n\t\t\t\t\t.querySelector(\n\t\t\t\t\t\t`[data-block=\"${ getSelectedBlockClientId() }\"]`\n\t\t\t\t\t)\n\t\t\t\t\t.focus();\n\t\t\t}\n\t\t}\n\t\t// In \"compose\" mode without a selected ID, we want to place focus on the section root when tabbing to the canvas.\n\t\telse if ( isZoomOut() ) {\n\t\t\tconst sectionRootClientId = getSectionRootClientId();\n\t\t\tconst sectionBlocks = getBlockOrder( sectionRootClientId );\n\n\t\t\t// If we have section within the section root, focus the first one.\n\t\t\tif ( sectionBlocks.length ) {\n\t\t\t\tcontainerRef.current\n\t\t\t\t\t.querySelector( `[data-block=\"${ sectionBlocks[ 0 ] }\"]` )\n\t\t\t\t\t.focus();\n\t\t\t}\n\t\t\t// If we don't have any section blocks, focus the section root.\n\t\t\telse if ( sectionRootClientId ) {\n\t\t\t\tcontainerRef.current\n\t\t\t\t\t.querySelector( `[data-block=\"${ sectionRootClientId }\"]` )\n\t\t\t\t\t.focus();\n\t\t\t} else {\n\t\t\t\t// If we don't have any section root, focus the canvas.\n\t\t\t\tcanvasElement.focus();\n\t\t\t}\n\t\t} else {\n\t\t\tconst isBefore =\n\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\tevent.target.compareDocumentPosition( canvasElement ) &\n\t\t\t\tevent.target.DOCUMENT_POSITION_FOLLOWING;\n\t\t\tconst tabbables = focus.tabbable.find( containerRef.current );\n\t\t\tif ( tabbables.length ) {\n\t\t\t\tconst next = isBefore\n\t\t\t\t\t? tabbables[ 0 ]\n\t\t\t\t\t: tabbables[ tabbables.length - 1 ];\n\t\t\t\tnext.focus();\n\t\t\t}\n\t\t}\n\t}\n\n\tconst before = (\n\t\t<div\n\t\t\tref={ focusCaptureBeforeRef }\n\t\t\ttabIndex=\"0\"\n\t\t\tonFocus={ onFocusCapture }\n\t\t/>\n\t);\n\n\tconst after = (\n\t\t<div\n\t\t\tref={ focusCaptureAfterRef }\n\t\t\ttabIndex=\"0\"\n\t\t\tonFocus={ onFocusCapture }\n\t\t/>\n\t);\n\n\tconst ref = useRefEffect( ( node ) => {\n\t\tfunction onKeyDown( event ) {\n\t\t\tif ( event.defaultPrevented ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// In Edit mode, Tab should focus the first tabbable element after\n\t\t\t// the content, which is normally the sidebar (with block controls)\n\t\t\t// and Shift+Tab should focus the first tabbable element before the\n\t\t\t// content, which is normally the block toolbar.\n\t\t\t// Arrow keys can be used, and Tab and arrow keys can be used in\n\t\t\t// Navigation mode (press Esc), to navigate through blocks.\n\t\t\tif ( event.keyCode !== TAB ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\t// Bails in case the focus capture elements aren’t present. They\n\t\t\t\t// may be omitted to avoid silent tab stops in preview mode.\n\t\t\t\t// See: https://github.com/WordPress/gutenberg/pull/59317\n\t\t\t\t! focusCaptureAfterRef.current ||\n\t\t\t\t! focusCaptureBeforeRef.current\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst { target, shiftKey: isShift } = event;\n\t\t\tconst direction = isShift ? 'findPrevious' : 'findNext';\n\t\t\tconst nextTabbable = focus.tabbable[ direction ]( target );\n\n\t\t\t// We want to constrain the tabbing to the block and its child blocks.\n\t\t\t// If the preceding form element is within a different block,\n\t\t\t// such as two sibling image blocks in the placeholder state,\n\t\t\t// we want shift + tab from the first form element to move to the image\n\t\t\t// block toolbar and not the previous image block's form element.\n\t\t\tconst currentBlock = target.closest( '[data-block]' );\n\t\t\tconst isElementPartOfSelectedBlock =\n\t\t\t\tcurrentBlock &&\n\t\t\t\tnextTabbable &&\n\t\t\t\t( isInSameBlock( currentBlock, nextTabbable ) ||\n\t\t\t\t\tisInsideRootBlock( currentBlock, nextTabbable ) );\n\n\t\t\t// Allow tabbing from the block wrapper to a form element,\n\t\t\t// and between form elements rendered in a block and its child blocks,\n\t\t\t// such as inside a placeholder. Form elements are generally\n\t\t\t// meant to be UI rather than part of the content. Ideally\n\t\t\t// these are not rendered in the content and perhaps in the\n\t\t\t// future they can be rendered in an iframe or shadow DOM.\n\t\t\tif (\n\t\t\t\tisFormElement( nextTabbable ) &&\n\t\t\t\tisElementPartOfSelectedBlock\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst next = isShift ? focusCaptureBeforeRef : focusCaptureAfterRef;\n\n\t\t\t// Disable focus capturing on the focus capture element, so it\n\t\t\t// doesn't refocus this block and so it allows default behaviour\n\t\t\t// (moving focus to the next tabbable element).\n\t\t\tnoCaptureRef.current = true;\n\n\t\t\t// Focusing the focus capture element, which is located above and\n\t\t\t// below the editor, should not scroll the page all the way up or\n\t\t\t// down.\n\t\t\tnext.current.focus( { preventScroll: true } );\n\t\t}\n\n\t\tfunction onFocusOut( event ) {\n\t\t\t// `focusout` also fires when focus moves between elements within the\n\t\t\t// canvas, but only the element focus left the canvas from is of\n\t\t\t// interest. `contains` is false for a null `relatedTarget`, which is\n\t\t\t// what focus moving to another document reports.\n\t\t\tif ( ! node.contains( event.relatedTarget ) ) {\n\t\t\t\tsetLastFocus( { current: event.target } );\n\t\t\t}\n\n\t\t\tconst { ownerDocument } = node;\n\n\t\t\t// If focus disappears due to there being no blocks, move focus to\n\t\t\t// the writing flow wrapper.\n\t\t\tif (\n\t\t\t\t! event.relatedTarget &&\n\t\t\t\tevent.target.hasAttribute( 'data-block' ) &&\n\t\t\t\townerDocument.activeElement === ownerDocument.body &&\n\t\t\t\tgetBlockCount() === 0\n\t\t\t) {\n\t\t\t\tnode.focus();\n\t\t\t}\n\t\t}\n\n\t\t// When tabbing back to an element in block list, this event handler prevents scrolling if the\n\t\t// focus capture divs (before/after) are outside of the viewport. (For example shift+tab back to a paragraph\n\t\t// when focus is on a sidebar element. This prevents the scrollable writing area from jumping either to the\n\t\t// top or bottom of the document.\n\t\t//\n\t\t// Note that it isn't possible to disable scrolling in the onFocus event. We need to intercept this\n\t\t// earlier in the keypress handler, and call focus( { preventScroll: true } ) instead.\n\t\t// https://developer.mozilla.org/en-US/docs/Web/API/HTMLOrForeignElement/focus#parameters\n\t\tfunction preventScrollOnTab( event ) {\n\t\t\tif ( event.keyCode !== TAB ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( event.target?.getAttribute( 'role' ) === 'region' ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( containerRef.current === event.target ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst isShift = event.shiftKey;\n\t\t\tconst direction = isShift ? 'findPrevious' : 'findNext';\n\t\t\tconst target = focus.tabbable[ direction ]( event.target );\n\t\t\t// Only do something when the next tabbable is a focus capture div (before/after)\n\t\t\tif (\n\t\t\t\ttarget === focusCaptureBeforeRef.current ||\n\t\t\t\ttarget === focusCaptureAfterRef.current\n\t\t\t) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\ttarget.focus( { preventScroll: true } );\n\t\t\t}\n\t\t}\n\n\t\tconst { ownerDocument } = node;\n\t\tconst { defaultView } = ownerDocument;\n\t\tdefaultView.addEventListener( 'keydown', preventScrollOnTab );\n\t\tnode.addEventListener( 'keydown', onKeyDown );\n\t\tnode.addEventListener( 'focusout', onFocusOut );\n\t\treturn () => {\n\t\t\tdefaultView.removeEventListener( 'keydown', preventScrollOnTab );\n\t\t\tnode.removeEventListener( 'keydown', onKeyDown );\n\t\t\tnode.removeEventListener( 'focusout', onFocusOut );\n\t\t};\n\t}, [] );\n\n\tconst mergedRefs = useMergeRefs( [ containerRef, ref ] );\n\n\treturn [ before, mergedRefs, after ];\n}\n"],
5
- "mappings": "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",
6
- "names": ["ownerDocument"]
3
+ "sources": ["../../../src/components/writing-flow/use-tab-nav.jsx"],
4
+ "sourcesContent": ["import { focus, isFormElement } from '@wordpress/dom';\nimport { TAB } from '@wordpress/keycodes';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useRefEffect, useMergeRefs } from '@wordpress/compose';\nimport { useRef } from '@wordpress/element';\nimport { store as blockEditorStore } from '../../store';\nimport { isInSameBlock, isInsideRootBlock } from '../../utils/dom';\nimport { unlock } from '../../lock-unlock';\n\n/**\n * Spans the element over the canvas, so it is always at least partially in\n * view and focussing it never scrolls the content. Fixed positioning would\n * achieve that too, but makes Safari composite the scrollable canvas on a\n * layer sized to the whole document instead of the visible pane.\n */\nconst PREVENT_SCROLL_ON_FOCUS = {\n\tposition: 'absolute',\n\tinset: 0,\n\tpointerEvents: 'none',\n};\n\nexport default function useTabNav() {\n\tconst containerRef = /** @type {typeof useRef<HTMLElement>} */ ( useRef )();\n\tconst focusCaptureBeforeRef = useRef();\n\tconst focusCaptureAfterRef = useRef();\n\n\tconst {\n\t\thasMultiSelection,\n\t\tgetSelectedBlockClientId,\n\t\tgetBlockCount,\n\t\tgetBlockOrder,\n\t\tgetLastFocus,\n\t\tgetSectionRootClientId,\n\t\tisZoomOut,\n\t} = unlock( useSelect( blockEditorStore ) );\n\tconst { setLastFocus } = unlock( useDispatch( blockEditorStore ) );\n\n\t// Reference that holds the a flag for enabling or disabling\n\t// capturing on the focus capture elements.\n\tconst noCaptureRef = useRef();\n\n\tfunction onFocusCapture( event ) {\n\t\tconst canvasElement =\n\t\t\tcontainerRef.current.ownerDocument === event.target.ownerDocument\n\t\t\t\t? containerRef.current\n\t\t\t\t: containerRef.current.ownerDocument.defaultView.frameElement;\n\n\t\t// Do not capture incoming focus if set by us in WritingFlow.\n\t\tif ( noCaptureRef.current ) {\n\t\t\tnoCaptureRef.current = null;\n\t\t} else if ( hasMultiSelection() ) {\n\t\t\tcontainerRef.current.focus();\n\t\t} else if ( getSelectedBlockClientId() ) {\n\t\t\tif ( getLastFocus()?.current ) {\n\t\t\t\tgetLastFocus().current.focus();\n\t\t\t} else {\n\t\t\t\t// Handles when the last focus has not been set yet, or has been cleared by new blocks being added via the inserter.\n\t\t\t\tcontainerRef.current\n\t\t\t\t\t.querySelector(\n\t\t\t\t\t\t`[data-block=\"${ getSelectedBlockClientId() }\"]`\n\t\t\t\t\t)\n\t\t\t\t\t.focus();\n\t\t\t}\n\t\t}\n\t\t// In \"compose\" mode without a selected ID, we want to place focus on the section root when tabbing to the canvas.\n\t\telse if ( isZoomOut() ) {\n\t\t\tconst sectionRootClientId = getSectionRootClientId();\n\t\t\tconst sectionBlocks = getBlockOrder( sectionRootClientId );\n\n\t\t\t// If we have section within the section root, focus the first one.\n\t\t\tif ( sectionBlocks.length ) {\n\t\t\t\tcontainerRef.current\n\t\t\t\t\t.querySelector( `[data-block=\"${ sectionBlocks[ 0 ] }\"]` )\n\t\t\t\t\t.focus();\n\t\t\t}\n\t\t\t// If we don't have any section blocks, focus the section root.\n\t\t\telse if ( sectionRootClientId ) {\n\t\t\t\tcontainerRef.current\n\t\t\t\t\t.querySelector( `[data-block=\"${ sectionRootClientId }\"]` )\n\t\t\t\t\t.focus();\n\t\t\t} else {\n\t\t\t\t// If we don't have any section root, focus the canvas.\n\t\t\t\tcanvasElement.focus();\n\t\t\t}\n\t\t} else {\n\t\t\tconst isBefore =\n\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\tevent.target.compareDocumentPosition( canvasElement ) &\n\t\t\t\tevent.target.DOCUMENT_POSITION_FOLLOWING;\n\t\t\tconst tabbables = focus.tabbable.find( containerRef.current );\n\t\t\tif ( tabbables.length ) {\n\t\t\t\tconst next = isBefore\n\t\t\t\t\t? tabbables[ 0 ]\n\t\t\t\t\t: tabbables[ tabbables.length - 1 ];\n\t\t\t\tnext.focus();\n\t\t\t}\n\t\t}\n\t}\n\n\tconst before = (\n\t\t<div\n\t\t\tref={ focusCaptureBeforeRef }\n\t\t\ttabIndex=\"0\"\n\t\t\tonFocus={ onFocusCapture }\n\t\t\tstyle={ PREVENT_SCROLL_ON_FOCUS }\n\t\t/>\n\t);\n\n\tconst after = (\n\t\t<div\n\t\t\tref={ focusCaptureAfterRef }\n\t\t\ttabIndex=\"0\"\n\t\t\tonFocus={ onFocusCapture }\n\t\t\tstyle={ PREVENT_SCROLL_ON_FOCUS }\n\t\t/>\n\t);\n\n\tconst ref = useRefEffect( ( node ) => {\n\t\tfunction onKeyDown( event ) {\n\t\t\tif ( event.defaultPrevented ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// In Edit mode, Tab should focus the first tabbable element after\n\t\t\t// the content, which is normally the sidebar (with block controls)\n\t\t\t// and Shift+Tab should focus the first tabbable element before the\n\t\t\t// content, which is normally the block toolbar.\n\t\t\t// Arrow keys can be used, and Tab and arrow keys can be used in\n\t\t\t// Navigation mode (press Esc), to navigate through blocks.\n\t\t\tif ( event.keyCode !== TAB ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\t// Bails in case the focus capture elements aren’t present. They\n\t\t\t\t// may be omitted to avoid silent tab stops in preview mode.\n\t\t\t\t// See: https://github.com/WordPress/gutenberg/pull/59317\n\t\t\t\t! focusCaptureAfterRef.current ||\n\t\t\t\t! focusCaptureBeforeRef.current\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst { target, shiftKey: isShift } = event;\n\t\t\tconst direction = isShift ? 'findPrevious' : 'findNext';\n\t\t\tconst nextTabbable = focus.tabbable[ direction ]( target );\n\n\t\t\t// We want to constrain the tabbing to the block and its child blocks.\n\t\t\t// If the preceding form element is within a different block,\n\t\t\t// such as two sibling image blocks in the placeholder state,\n\t\t\t// we want shift + tab from the first form element to move to the image\n\t\t\t// block toolbar and not the previous image block's form element.\n\t\t\tconst currentBlock = target.closest( '[data-block]' );\n\t\t\tconst isElementPartOfSelectedBlock =\n\t\t\t\tcurrentBlock &&\n\t\t\t\tnextTabbable &&\n\t\t\t\t( isInSameBlock( currentBlock, nextTabbable ) ||\n\t\t\t\t\tisInsideRootBlock( currentBlock, nextTabbable ) );\n\n\t\t\t// Allow tabbing from the block wrapper to a form element,\n\t\t\t// and between form elements rendered in a block and its child blocks,\n\t\t\t// such as inside a placeholder. Form elements are generally\n\t\t\t// meant to be UI rather than part of the content. Ideally\n\t\t\t// these are not rendered in the content and perhaps in the\n\t\t\t// future they can be rendered in an iframe or shadow DOM.\n\t\t\tif (\n\t\t\t\tisFormElement( nextTabbable ) &&\n\t\t\t\tisElementPartOfSelectedBlock\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst next = isShift ? focusCaptureBeforeRef : focusCaptureAfterRef;\n\n\t\t\t// Disable focus capturing on the focus capture element, so it\n\t\t\t// doesn't refocus this block and so it allows default behaviour\n\t\t\t// (moving focus to the next tabbable element).\n\t\t\tnoCaptureRef.current = true;\n\n\t\t\tnext.current.focus();\n\t\t}\n\n\t\tfunction onFocusOut( event ) {\n\t\t\t// `focusout` also fires when focus moves between elements within the\n\t\t\t// canvas, but only the element focus left the canvas from is of\n\t\t\t// interest. `contains` is false for a null `relatedTarget`, which is\n\t\t\t// what focus moving to another document reports.\n\t\t\tif ( ! node.contains( event.relatedTarget ) ) {\n\t\t\t\tsetLastFocus( { current: event.target } );\n\t\t\t}\n\n\t\t\tconst { ownerDocument } = node;\n\n\t\t\t// If focus disappears due to there being no blocks, move focus to\n\t\t\t// the writing flow wrapper.\n\t\t\tif (\n\t\t\t\t! event.relatedTarget &&\n\t\t\t\tevent.target.hasAttribute( 'data-block' ) &&\n\t\t\t\townerDocument.activeElement === ownerDocument.body &&\n\t\t\t\tgetBlockCount() === 0\n\t\t\t) {\n\t\t\t\tnode.focus();\n\t\t\t}\n\t\t}\n\n\t\tnode.addEventListener( 'keydown', onKeyDown );\n\t\tnode.addEventListener( 'focusout', onFocusOut );\n\t\treturn () => {\n\t\t\tnode.removeEventListener( 'keydown', onKeyDown );\n\t\t\tnode.removeEventListener( 'focusout', onFocusOut );\n\t\t};\n\t}, [] );\n\n\tconst mergedRefs = useMergeRefs( [ containerRef, ref ] );\n\n\treturn [ before, mergedRefs, after ];\n}\n"],
5
+ "mappings": "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",
6
+ "names": []
7
7
  }
@@ -1,4 +1,4 @@
1
- // packages/block-editor/src/components/writing-mode-control/index.js
1
+ // packages/block-editor/src/components/writing-mode-control/index.jsx
2
2
  import clsx from "clsx";
3
3
  import { __, isRTL } from "@wordpress/i18n";
4
4
  import { textHorizontal, textVertical } from "@wordpress/icons";
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/components/writing-mode-control/index.js"],
3
+ "sources": ["../../../src/components/writing-mode-control/index.jsx"],
4
4
  "sourcesContent": ["import clsx from 'clsx';\nimport { __, isRTL } from '@wordpress/i18n';\nimport { textHorizontal, textVertical } from '@wordpress/icons';\nimport {\n\t__experimentalToggleGroupControl as ToggleGroupControl,\n\t__experimentalToggleGroupControlOptionIcon as ToggleGroupControlOptionIcon,\n} from '@wordpress/components';\n\nconst WRITING_MODES = [\n\t{\n\t\tlabel: __( 'Horizontal' ),\n\t\tvalue: 'horizontal-tb',\n\t\ticon: textHorizontal,\n\t},\n\t{\n\t\tlabel: __( 'Vertical' ),\n\t\tvalue: isRTL() ? 'vertical-lr' : 'vertical-rl',\n\t\ticon: textVertical,\n\t},\n];\n\n/**\n * Control to facilitate writing mode selections.\n *\n * @param {Object} props Component props.\n * @param {string} props.className Class name to add to the control.\n * @param {string} props.value Currently selected writing mode.\n * @param {Function} props.onChange Handles change in the writing mode selection.\n *\n * @return {Element} Writing Mode control.\n */\nexport default function WritingModeControl( { className, value, onChange } ) {\n\treturn (\n\t\t<ToggleGroupControl\n\t\t\tisDeselectable\n\t\t\tlabel={ __( 'Orientation' ) }\n\t\t\tclassName={ clsx( 'block-editor-writing-mode-control', className ) }\n\t\t\tvalue={ value }\n\t\t\tonChange={ ( newValue ) => {\n\t\t\t\tonChange( newValue === value ? undefined : newValue );\n\t\t\t} }\n\t\t>\n\t\t\t{ WRITING_MODES.map( ( option ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<ToggleGroupControlOptionIcon\n\t\t\t\t\t\tkey={ option.value }\n\t\t\t\t\t\tvalue={ option.value }\n\t\t\t\t\t\ticon={ option.icon }\n\t\t\t\t\t\tlabel={ option.label }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</ToggleGroupControl>\n\t);\n}\n"],
5
5
  "mappings": ";AAAA,OAAO,UAAU;AACjB,SAAS,IAAI,aAAa;AAC1B,SAAS,gBAAgB,oBAAoB;AAC7C;AAAA,EACC,oCAAoC;AAAA,EACpC,8CAA8C;AAAA,OACxC;AAsCF;AApCL,IAAM,gBAAgB;AAAA,EACrB;AAAA,IACC,OAAO,GAAI,YAAa;AAAA,IACxB,OAAO;AAAA,IACP,MAAM;AAAA,EACP;AAAA,EACA;AAAA,IACC,OAAO,GAAI,UAAW;AAAA,IACtB,OAAO,MAAM,IAAI,gBAAgB;AAAA,IACjC,MAAM;AAAA,EACP;AACD;AAYe,SAAR,mBAAqC,EAAE,WAAW,OAAO,SAAS,GAAI;AAC5E,SACC;AAAA,IAAC;AAAA;AAAA,MACA,gBAAc;AAAA,MACd,OAAQ,GAAI,aAAc;AAAA,MAC1B,WAAY,KAAM,qCAAqC,SAAU;AAAA,MACjE;AAAA,MACA,UAAW,CAAE,aAAc;AAC1B,iBAAU,aAAa,QAAQ,SAAY,QAAS;AAAA,MACrD;AAAA,MAEE,wBAAc,IAAK,CAAE,WAAY;AAClC,eACC;AAAA,UAAC;AAAA;AAAA,YAEA,OAAQ,OAAO;AAAA,YACf,MAAO,OAAO;AAAA,YACd,OAAQ,OAAO;AAAA;AAAA,UAHT,OAAO;AAAA,QAId;AAAA,MAEF,CAAE;AAAA;AAAA,EACH;AAEF;",
6
6
  "names": []
@@ -1,4 +1,4 @@
1
- // packages/block-editor/src/hooks/align.js
1
+ // packages/block-editor/src/hooks/align.jsx
2
2
  import clsx from "clsx";
3
3
  import { addFilter } from "@wordpress/hooks";
4
4
  import {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../src/hooks/align.js"],
3
+ "sources": ["../../src/hooks/align.jsx"],
4
4
  "sourcesContent": ["import clsx from 'clsx';\nimport { addFilter } from '@wordpress/hooks';\nimport {\n\tgetBlockSupport,\n\tgetBlockType,\n\thasBlockSupport,\n} from '@wordpress/blocks';\nimport { BlockControls, BlockAlignmentControl } from '../components';\nimport useAvailableAlignments from '../components/block-alignment-control/use-available-alignments';\nimport { useBlockEditingMode } from '../components/block-editing-mode';\n\n/**\n * An array which includes all possible valid alignments,\n * used to validate if an alignment is valid or not.\n *\n * @constant\n * @type {string[]}\n */\nconst ALL_ALIGNMENTS = [ 'left', 'center', 'right', 'wide', 'full' ];\n\n/**\n * An array which includes all wide alignments.\n * In order for this alignments to be valid they need to be supported by the block,\n * and by the theme.\n *\n * @constant\n * @type {string[]}\n */\nconst WIDE_ALIGNMENTS = [ 'wide', 'full' ];\n\n/**\n * Returns the valid alignments.\n * Takes into consideration the aligns supported by a block, if the block supports wide controls or not and if theme supports wide controls or not.\n * Exported just for testing purposes, not exported outside the module.\n *\n * @param {?boolean|string[]} blockAlign Aligns supported by the block.\n * @param {?boolean} hasWideBlockSupport True if block supports wide alignments. And False otherwise.\n * @param {?boolean} hasWideEnabled True if theme supports wide alignments. And False otherwise.\n *\n * @return {string[]} Valid alignments.\n */\nexport function getValidAlignments(\n\tblockAlign,\n\thasWideBlockSupport = true,\n\thasWideEnabled = true\n) {\n\tlet validAlignments;\n\tif ( Array.isArray( blockAlign ) ) {\n\t\tvalidAlignments = ALL_ALIGNMENTS.filter( ( value ) =>\n\t\t\tblockAlign.includes( value )\n\t\t);\n\t} else if ( blockAlign === true ) {\n\t\t// `true` includes all alignments...\n\t\tvalidAlignments = [ ...ALL_ALIGNMENTS ];\n\t} else {\n\t\tvalidAlignments = [];\n\t}\n\n\tif (\n\t\t! hasWideEnabled ||\n\t\t( blockAlign === true && ! hasWideBlockSupport )\n\t) {\n\t\treturn validAlignments.filter(\n\t\t\t( alignment ) => ! WIDE_ALIGNMENTS.includes( alignment )\n\t\t);\n\t}\n\n\treturn validAlignments;\n}\n\n/**\n * Filters registered block settings, extending attributes to include `align`.\n *\n * @param {Object} settings Original block settings.\n *\n * @return {Object} Filtered block settings.\n */\nexport function addAttribute( settings ) {\n\t// Allow blocks to specify their own attribute definition with default values if needed.\n\tif ( 'type' in ( settings.attributes?.align ?? {} ) ) {\n\t\treturn settings;\n\t}\n\tif ( hasBlockSupport( settings, 'align' ) ) {\n\t\t// Gracefully handle if settings.attributes is undefined.\n\t\tsettings.attributes = {\n\t\t\t...settings.attributes,\n\t\t\talign: {\n\t\t\t\ttype: 'string',\n\t\t\t\t// Allow for '' since it is used by the `updateAlignment` function\n\t\t\t\t// in toolbar controls for special cases with defined default values.\n\t\t\t\tenum: [ ...ALL_ALIGNMENTS, '' ],\n\t\t\t},\n\t\t};\n\t}\n\n\treturn settings;\n}\n\nfunction BlockEditAlignmentToolbarControlsPure( {\n\tname: blockName,\n\talign,\n\tsetAttributes,\n} ) {\n\t// Compute the block valid alignments by taking into account,\n\t// if the theme supports wide alignments or not and the layout's\n\t// available alignments. We do that for conditionally rendering\n\t// Slot.\n\tconst blockAllowedAlignments = getValidAlignments(\n\t\tgetBlockSupport( blockName, 'align' ),\n\t\thasBlockSupport( blockName, 'alignWide', true )\n\t);\n\n\tconst validAlignments = useAvailableAlignments(\n\t\tblockAllowedAlignments\n\t).map( ( { name } ) => name );\n\tconst blockEditingMode = useBlockEditingMode();\n\tif ( ! validAlignments.length || blockEditingMode !== 'default' ) {\n\t\treturn null;\n\t}\n\n\tconst updateAlignment = ( nextAlign ) => {\n\t\tif ( ! nextAlign ) {\n\t\t\tconst blockType = getBlockType( blockName );\n\t\t\tconst blockDefaultAlign = blockType?.attributes?.align?.default;\n\t\t\tif ( blockDefaultAlign ) {\n\t\t\t\tnextAlign = '';\n\t\t\t}\n\t\t}\n\t\tsetAttributes( { align: nextAlign } );\n\t};\n\n\treturn (\n\t\t<BlockControls group=\"block\" __experimentalShareWithChildBlocks>\n\t\t\t<BlockAlignmentControl\n\t\t\t\tvalue={ align }\n\t\t\t\tonChange={ updateAlignment }\n\t\t\t\tcontrols={ validAlignments }\n\t\t\t/>\n\t\t</BlockControls>\n\t);\n}\n\nexport default {\n\tshareWithChildBlocks: true,\n\tedit: BlockEditAlignmentToolbarControlsPure,\n\tuseBlockProps,\n\taddSaveProps: addAssignedAlign,\n\tattributeKeys: [ 'align' ],\n\thasSupport( name ) {\n\t\treturn hasBlockSupport( name, 'align', false );\n\t},\n};\n\nfunction useBlockProps( { name, align } ) {\n\tconst blockAllowedAlignments = getValidAlignments(\n\t\tgetBlockSupport( name, 'align' ),\n\t\thasBlockSupport( name, 'alignWide', true )\n\t);\n\tconst validAlignments = useAvailableAlignments( blockAllowedAlignments );\n\n\tif ( validAlignments.some( ( alignment ) => alignment.name === align ) ) {\n\t\treturn { 'data-align': align };\n\t}\n\n\treturn {};\n}\n\n/**\n * Override props assigned to save component to inject alignment class name if\n * block supports it.\n *\n * @param {Object} props Additional props applied to save element.\n * @param {Object} blockType Block type.\n * @param {Object} attributes Block attributes.\n *\n * @return {Object} Filtered props applied to save element.\n */\nexport function addAssignedAlign( props, blockType, attributes ) {\n\tconst { align } = attributes;\n\tconst blockAlign = getBlockSupport( blockType, 'align' );\n\tconst hasWideBlockSupport = hasBlockSupport( blockType, 'alignWide', true );\n\n\t// Compute valid alignments without taking into account if\n\t// the theme supports wide alignments or not.\n\t// This way changing themes does not impact the block save.\n\tconst isAlignValid = getValidAlignments(\n\t\tblockAlign,\n\t\thasWideBlockSupport\n\t).includes( align );\n\tif ( isAlignValid ) {\n\t\tprops.className = clsx( `align${ align }`, props.className );\n\t}\n\n\treturn props;\n}\n\naddFilter(\n\t'blocks.registerBlockType',\n\t'core/editor/align/addAttribute',\n\taddAttribute\n);\n"],
5
5
  "mappings": "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",
6
6
  "names": []
@@ -1,4 +1,4 @@
1
- // packages/block-editor/src/hooks/allowed-blocks.js
1
+ // packages/block-editor/src/hooks/allowed-blocks.jsx
2
2
  import { addFilter } from "@wordpress/hooks";
3
3
  import { hasBlockSupport, getBlockType } from "@wordpress/blocks";
4
4
  import { PrivateInspectorControlsAllowedBlocks } from "../components/inspector-controls/groups.mjs";
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../src/hooks/allowed-blocks.js"],
3
+ "sources": ["../../src/hooks/allowed-blocks.jsx"],
4
4
  "sourcesContent": ["import { addFilter } from '@wordpress/hooks';\nimport { hasBlockSupport, getBlockType } from '@wordpress/blocks';\nimport { PrivateInspectorControlsAllowedBlocks } from '../components/inspector-controls/groups';\nimport BlockAllowedBlocksControl from '../components/block-allowed-blocks/allowed-blocks-control';\nimport { useBlockEditingMode } from '../components/block-editing-mode';\n\nfunction BlockEditAllowedBlocksControlPure( { clientId } ) {\n\tconst blockEditingMode = useBlockEditingMode();\n\tconst isContentOnly = blockEditingMode === 'contentOnly';\n\n\tif ( isContentOnly ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PrivateInspectorControlsAllowedBlocks.Fill>\n\t\t\t<BlockAllowedBlocksControl clientId={ clientId } />\n\t\t</PrivateInspectorControlsAllowedBlocks.Fill>\n\t);\n}\n\nexport default {\n\tedit: BlockEditAllowedBlocksControlPure,\n\tattributeKeys: [ 'allowedBlocks' ],\n\thasSupport( name ) {\n\t\treturn hasBlockSupport( name, 'allowedBlocks' );\n\t},\n};\n\n/**\n * Filters registered block settings, extending attributes with allowedBlocks.\n *\n * @param {Object} settings Original block settings.\n *\n * @return {Object} Filtered block settings.\n */\nexport function addAttribute( settings ) {\n\t// Allow blocks to specify their own attribute definition with default values if needed.\n\tif ( settings?.attributes?.allowedBlocks?.type ) {\n\t\treturn settings;\n\t}\n\tif ( hasBlockSupport( settings, 'allowedBlocks' ) ) {\n\t\t// Gracefully handle if settings.attributes is undefined.\n\t\tsettings.attributes = {\n\t\t\t...settings.attributes,\n\t\t\tallowedBlocks: {\n\t\t\t\ttype: 'array',\n\t\t\t},\n\t\t};\n\t}\n\n\treturn settings;\n}\n\naddFilter(\n\t'blocks.registerBlockType',\n\t'core/allowedBlocks/attribute',\n\taddAttribute\n);\n\n/**\n * Add transforms to preserve allowedBlocks on block transformations.\n *\n * @param {Object} result The transformed block.\n * @param {Array} source Original blocks transformed.\n * @param {number} index Index of the transformed block.\n * @param {Array} results All blocks that resulted from the transformation.\n * @return {Object} Modified transformed block.\n */\nexport function addTransforms( result, source, index, results ) {\n\tif ( ! hasBlockSupport( result.name, 'allowedBlocks' ) ) {\n\t\treturn result;\n\t}\n\n\t// If the condition verifies we are probably in the presence of a wrapping transform\n\t// e.g: nesting paragraphs in a group or columns and in that case the attribute should not be kept.\n\tif (\n\t\tsource.length !== 1 &&\n\t\tresults.length === 1 &&\n\t\tresult.innerBlocks.length === source.length\n\t) {\n\t\treturn result;\n\t}\n\n\t// If we are transforming one block to multiple blocks or multiple blocks to one block,\n\t// we ignore the attribute during the transform.\n\tif (\n\t\t( results.length === 1 && source.length > 1 ) ||\n\t\t( results.length > 1 && source.length === 1 )\n\t) {\n\t\treturn result;\n\t}\n\n\t// If we are transforming multiple blocks to multiple blocks with different counts,\n\t// we ignore the attribute during the transform.\n\tif (\n\t\tresults.length > 1 &&\n\t\tsource.length > 1 &&\n\t\tresults.length !== source.length\n\t) {\n\t\treturn result;\n\t}\n\n\t// If the target block already has allowedBlocks, we don't need to preserve\n\t// the source allowedBlocks.\n\tif ( result.attributes.allowedBlocks ) {\n\t\treturn result;\n\t}\n\n\tconst sourceAllowedBlocks = source[ index ]?.attributes?.allowedBlocks;\n\n\tif ( ! sourceAllowedBlocks ) {\n\t\treturn result;\n\t}\n\n\tconst blockType = getBlockType( result.name );\n\tconst destinationAllowedBlocks = blockType?.allowedBlocks || [];\n\n\tif ( ! destinationAllowedBlocks.length ) {\n\t\treturn {\n\t\t\t...result,\n\t\t\tattributes: {\n\t\t\t\t...result.attributes,\n\t\t\t\tallowedBlocks: sourceAllowedBlocks,\n\t\t\t},\n\t\t};\n\t}\n\n\t// Filter out any source allowed blocks that are not defined in the destination allowed blocks.\n\tconst filteredSourceAllowedBlocks = sourceAllowedBlocks.filter( ( block ) =>\n\t\tdestinationAllowedBlocks.includes( block )\n\t);\n\n\treturn {\n\t\t...result,\n\t\tattributes: {\n\t\t\t...result.attributes,\n\t\t\tallowedBlocks: filteredSourceAllowedBlocks,\n\t\t},\n\t};\n}\n\naddFilter(\n\t'blocks.switchToBlockType.transformedBlock',\n\t'core/allowedBlocks/addTransforms',\n\taddTransforms\n);\n"],
5
5
  "mappings": ";AAAA,SAAS,iBAAiB;AAC1B,SAAS,iBAAiB,oBAAoB;AAC9C,SAAS,6CAA6C;AACtD,OAAO,+BAA+B;AACtC,SAAS,2BAA2B;AAYjC;AAVH,SAAS,kCAAmC,EAAE,SAAS,GAAI;AAC1D,QAAM,mBAAmB,oBAAoB;AAC7C,QAAM,gBAAgB,qBAAqB;AAE3C,MAAK,eAAgB;AACpB,WAAO;AAAA,EACR;AAEA,SACC,oBAAC,sCAAsC,MAAtC,EACA,8BAAC,6BAA0B,UAAsB,GAClD;AAEF;AAEA,IAAO,yBAAQ;AAAA,EACd,MAAM;AAAA,EACN,eAAe,CAAE,eAAgB;AAAA,EACjC,WAAY,MAAO;AAClB,WAAO,gBAAiB,MAAM,eAAgB;AAAA,EAC/C;AACD;AASO,SAAS,aAAc,UAAW;AAExC,MAAK,UAAU,YAAY,eAAe,MAAO;AAChD,WAAO;AAAA,EACR;AACA,MAAK,gBAAiB,UAAU,eAAgB,GAAI;AAEnD,aAAS,aAAa;AAAA,MACrB,GAAG,SAAS;AAAA,MACZ,eAAe;AAAA,QACd,MAAM;AAAA,MACP;AAAA,IACD;AAAA,EACD;AAEA,SAAO;AACR;AAEA;AAAA,EACC;AAAA,EACA;AAAA,EACA;AACD;AAWO,SAAS,cAAe,QAAQ,QAAQ,OAAO,SAAU;AAC/D,MAAK,CAAE,gBAAiB,OAAO,MAAM,eAAgB,GAAI;AACxD,WAAO;AAAA,EACR;AAIA,MACC,OAAO,WAAW,KAClB,QAAQ,WAAW,KACnB,OAAO,YAAY,WAAW,OAAO,QACpC;AACD,WAAO;AAAA,EACR;AAIA,MACG,QAAQ,WAAW,KAAK,OAAO,SAAS,KACxC,QAAQ,SAAS,KAAK,OAAO,WAAW,GACzC;AACD,WAAO;AAAA,EACR;AAIA,MACC,QAAQ,SAAS,KACjB,OAAO,SAAS,KAChB,QAAQ,WAAW,OAAO,QACzB;AACD,WAAO;AAAA,EACR;AAIA,MAAK,OAAO,WAAW,eAAgB;AACtC,WAAO;AAAA,EACR;AAEA,QAAM,sBAAsB,OAAQ,KAAM,GAAG,YAAY;AAEzD,MAAK,CAAE,qBAAsB;AAC5B,WAAO;AAAA,EACR;AAEA,QAAM,YAAY,aAAc,OAAO,IAAK;AAC5C,QAAM,2BAA2B,WAAW,iBAAiB,CAAC;AAE9D,MAAK,CAAE,yBAAyB,QAAS;AACxC,WAAO;AAAA,MACN,GAAG;AAAA,MACH,YAAY;AAAA,QACX,GAAG,OAAO;AAAA,QACV,eAAe;AAAA,MAChB;AAAA,IACD;AAAA,EACD;AAGA,QAAM,8BAA8B,oBAAoB;AAAA,IAAQ,CAAE,UACjE,yBAAyB,SAAU,KAAM;AAAA,EAC1C;AAEA,SAAO;AAAA,IACN,GAAG;AAAA,IACH,YAAY;AAAA,MACX,GAAG,OAAO;AAAA,MACV,eAAe;AAAA,IAChB;AAAA,EACD;AACD;AAEA;AAAA,EACC;AAAA,EACA;AAAA,EACA;AACD;",
6
6
  "names": []
@@ -1,4 +1,4 @@
1
- // packages/block-editor/src/hooks/anchor.js
1
+ // packages/block-editor/src/hooks/anchor.jsx
2
2
  import { addFilter } from "@wordpress/hooks";
3
3
  import { TextControl, ExternalLink } from "@wordpress/components";
4
4
  import { __ } from "@wordpress/i18n";
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../src/hooks/anchor.js"],
3
+ "sources": ["../../src/hooks/anchor.jsx"],
4
4
  "sourcesContent": ["import { addFilter } from '@wordpress/hooks';\nimport { TextControl, ExternalLink } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { hasBlockSupport } from '@wordpress/blocks';\nimport { InspectorControls } from '../components';\nimport { useBlockEditingMode } from '../components/block-editing-mode';\n\n/**\n * Regular expression matching invalid anchor characters for replacement.\n *\n * @type {RegExp}\n */\nconst ANCHOR_REGEX = /[\\s#]/g;\n\n/**\n * Filters registered block settings, extending attributes with anchor using ID\n * of the first node.\n *\n * @param {Object} settings Original block settings.\n *\n * @return {Object} Filtered block settings.\n */\nexport function addAttribute( settings ) {\n\t// Allow blocks to specify their own attribute definition with default values if needed.\n\tif ( 'type' in ( settings.attributes?.anchor ?? {} ) ) {\n\t\treturn settings;\n\t}\n\tif ( hasBlockSupport( settings, 'anchor' ) ) {\n\t\t// Gracefully handle if settings.attributes is undefined.\n\t\tsettings.attributes = {\n\t\t\t...settings.attributes,\n\t\t\tanchor: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t};\n\t}\n\n\treturn settings;\n}\n\nfunction BlockEditAnchorControlPure( { anchor, setAttributes } ) {\n\tconst blockEditingMode = useBlockEditingMode();\n\n\tif ( blockEditingMode !== 'default' ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<InspectorControls group=\"advanced\">\n\t\t\t<TextControl\n\t\t\t\tclassName=\"html-anchor-control\"\n\t\t\t\tlabel={ __( 'HTML anchor' ) }\n\t\t\t\thelp={\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t'Enter a word or two—without spaces—to make a unique web address just for this block, called an “anchor”. Then, you’ll be able to link directly to this section of your page.'\n\t\t\t\t\t\t) }{ ' ' }\n\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\thref={ __(\n\t\t\t\t\t\t\t\t'https://wordpress.org/documentation/article/page-jumps/'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Learn more about anchors' ) }\n\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t</>\n\t\t\t\t}\n\t\t\t\tvalue={ anchor || '' }\n\t\t\t\tplaceholder={ null }\n\t\t\t\tonChange={ ( nextValue ) => {\n\t\t\t\t\tnextValue = nextValue.replace( ANCHOR_REGEX, '-' );\n\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\tanchor: nextValue !== '' ? nextValue : undefined,\n\t\t\t\t\t} );\n\t\t\t\t} }\n\t\t\t\tautoCapitalize=\"none\"\n\t\t\t\tautoComplete=\"off\"\n\t\t\t/>\n\t\t</InspectorControls>\n\t);\n}\n\nexport default {\n\taddSaveProps,\n\tedit: BlockEditAnchorControlPure,\n\tattributeKeys: [ 'anchor' ],\n\thasSupport( name ) {\n\t\treturn hasBlockSupport( name, 'anchor' );\n\t},\n};\n\n/**\n * Override props assigned to save component to inject anchor ID, if block\n * supports anchor. This is only applied if the block's save result is an\n * element and not a markup string.\n *\n * @param {Object} extraProps Additional props applied to save element.\n * @param {Object} blockType Block type.\n * @param {Object} attributes Current block attributes.\n *\n * @return {Object} Filtered props applied to save element.\n */\nexport function addSaveProps( extraProps, blockType, attributes ) {\n\tif ( hasBlockSupport( blockType, 'anchor' ) ) {\n\t\textraProps.id = attributes.anchor === '' ? null : attributes.anchor;\n\t}\n\n\treturn extraProps;\n}\n\naddFilter( 'blocks.registerBlockType', 'core/anchor/attribute', addAttribute );\n"],
5
5
  "mappings": ";AAAA,SAAS,iBAAiB;AAC1B,SAAS,aAAa,oBAAoB;AAC1C,SAAS,UAAU;AACnB,SAAS,uBAAuB;AAChC,SAAS,yBAAyB;AAClC,SAAS,2BAA2B;AAgD/B,mBAIC,KAJD;AAzCL,IAAM,eAAe;AAUd,SAAS,aAAc,UAAW;AAExC,MAAK,WAAY,SAAS,YAAY,UAAU,CAAC,IAAM;AACtD,WAAO;AAAA,EACR;AACA,MAAK,gBAAiB,UAAU,QAAS,GAAI;AAE5C,aAAS,aAAa;AAAA,MACrB,GAAG,SAAS;AAAA,MACZ,QAAQ;AAAA,QACP,MAAM;AAAA,MACP;AAAA,IACD;AAAA,EACD;AAEA,SAAO;AACR;AAEA,SAAS,2BAA4B,EAAE,QAAQ,cAAc,GAAI;AAChE,QAAM,mBAAmB,oBAAoB;AAE7C,MAAK,qBAAqB,WAAY;AACrC,WAAO;AAAA,EACR;AAEA,SACC,oBAAC,qBAAkB,OAAM,YACxB;AAAA,IAAC;AAAA;AAAA,MACA,WAAU;AAAA,MACV,OAAQ,GAAI,aAAc;AAAA,MAC1B,MACC,iCACG;AAAA;AAAA,UACD;AAAA,QACD;AAAA,QAAK;AAAA,QACL;AAAA,UAAC;AAAA;AAAA,YACA,MAAO;AAAA,cACN;AAAA,YACD;AAAA,YAEE,aAAI,0BAA2B;AAAA;AAAA,QAClC;AAAA,SACD;AAAA,MAED,OAAQ,UAAU;AAAA,MAClB,aAAc;AAAA,MACd,UAAW,CAAE,cAAe;AAC3B,oBAAY,UAAU,QAAS,cAAc,GAAI;AACjD,sBAAe;AAAA,UACd,QAAQ,cAAc,KAAK,YAAY;AAAA,QACxC,CAAE;AAAA,MACH;AAAA,MACA,gBAAe;AAAA,MACf,cAAa;AAAA;AAAA,EACd,GACD;AAEF;AAEA,IAAO,iBAAQ;AAAA,EACd;AAAA,EACA,MAAM;AAAA,EACN,eAAe,CAAE,QAAS;AAAA,EAC1B,WAAY,MAAO;AAClB,WAAO,gBAAiB,MAAM,QAAS;AAAA,EACxC;AACD;AAaO,SAAS,aAAc,YAAY,WAAW,YAAa;AACjE,MAAK,gBAAiB,WAAW,QAAS,GAAI;AAC7C,eAAW,KAAK,WAAW,WAAW,KAAK,OAAO,WAAW;AAAA,EAC9D;AAEA,SAAO;AACR;AAEA,UAAW,4BAA4B,yBAAyB,YAAa;",
6
6
  "names": []
@@ -1,4 +1,4 @@
1
- // packages/block-editor/src/hooks/auto-inspector-controls.js
1
+ // packages/block-editor/src/hooks/auto-inspector-controls.jsx
2
2
  import { getBlockType, store as blocksStore } from "@wordpress/blocks";
3
3
  import { PanelBody } from "@wordpress/components";
4
4
  import { useSelect } from "@wordpress/data";
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../src/hooks/auto-inspector-controls.js"],
3
+ "sources": ["../../src/hooks/auto-inspector-controls.jsx"],
4
4
  "sourcesContent": ["import { getBlockType, store as blocksStore } from '@wordpress/blocks';\nimport { PanelBody } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\nimport { DataForm } from '@wordpress/dataviews';\nimport { useContext, useMemo } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport InspectorControls from '../components/inspector-controls';\nimport { useBlockEditingMode } from '../components/block-editing-mode';\nimport { store as blockEditorStore } from '../store';\nimport { unlock } from '../lock-unlock';\nimport BlockContext from '../components/block-context';\nimport { generateFieldsFromAttributes } from './generate-fields-from-attributes';\n\n/**\n * Checks if a block has any attributes marked for auto-generated inspector controls.\n *\n * @param {Object} blockTypeAttributes - The block type's attributes object.\n * @return {boolean} True if any attribute has autoGenerateControl marker.\n */\nfunction hasAutoGenerateControl( blockTypeAttributes ) {\n\tif ( ! blockTypeAttributes ) {\n\t\treturn false;\n\t}\n\treturn Object.values( blockTypeAttributes ).some(\n\t\t( attr ) => attr?.autoGenerateControl\n\t);\n}\n\n/**\n * Renders DataForm-based inspector controls for auto-registered PHP-only blocks.\n *\n * Fields are generated on-the-fly from attributes marked with `autoGenerateControl`\n * during PHP registration.\n *\n * @param {Object} props Component props.\n * @param {string} props.name Block name.\n * @param {string} props.clientId Block client ID.\n * @param {Function} props.setAttributes Function to update block attributes.\n */\nfunction AutoRegisterControls( { name, clientId, setAttributes } ) {\n\tconst blockEditingMode = useBlockEditingMode();\n\n\tconst blockContext = useContext( BlockContext );\n\n\tconst attributes = useSelect(\n\t\t( select ) => {\n\t\t\tconst _attributes =\n\t\t\t\tselect( blockEditorStore ).getBlockAttributes( clientId );\n\t\t\tif ( ! _attributes?.metadata?.bindings ) {\n\t\t\t\treturn _attributes;\n\t\t\t}\n\n\t\t\tconst { getBlockBindingsSource } = unlock( select( blocksStore ) );\n\t\t\treturn Object.entries( _attributes.metadata.bindings ).reduce(\n\t\t\t\t( acc, [ attribute, binding ] ) => {\n\t\t\t\t\tconst source = getBlockBindingsSource( binding.source );\n\t\t\t\t\tif ( ! source ) {\n\t\t\t\t\t\treturn acc;\n\t\t\t\t\t}\n\t\t\t\t\tconst values = source.getValues( {\n\t\t\t\t\t\tselect,\n\t\t\t\t\t\tcontext: blockContext,\n\t\t\t\t\t\tbindings: { [ attribute ]: binding },\n\t\t\t\t\t} );\n\t\t\t\t\treturn { ...acc, ...values };\n\t\t\t\t},\n\t\t\t\t_attributes\n\t\t\t);\n\t\t},\n\t\t[ blockContext, clientId ]\n\t);\n\n\tconst blockType = getBlockType( name );\n\n\t// Generate fields from user-defined attributes marked by PHP.\n\t// The autoGenerateControl marker excludes block support attributes\n\t// (which have their own UI) and internal state (role: 'local').\n\t// Memoized since blockType.attributes don't change after registration.\n\tconst { fields, form } = useMemo( () => {\n\t\tif ( ! blockType?.attributes ) {\n\t\t\treturn { fields: [], form: { fields: [] } };\n\t\t}\n\t\treturn generateFieldsFromAttributes( blockType.attributes );\n\t}, [ blockType?.attributes ] );\n\n\tif ( blockEditingMode !== 'default' ) {\n\t\treturn null;\n\t}\n\n\tif ( ! fields || fields.length === 0 ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<InspectorControls>\n\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t<DataForm\n\t\t\t\t\tdata={ attributes }\n\t\t\t\t\tfields={ fields }\n\t\t\t\t\tform={ form }\n\t\t\t\t\tonChange={ setAttributes }\n\t\t\t\t/>\n\t\t\t</PanelBody>\n\t\t</InspectorControls>\n\t);\n}\n\nexport default {\n\tedit: AutoRegisterControls,\n\tattributeKeys: [],\n\thasSupport( name ) {\n\t\tconst blockType = getBlockType( name );\n\t\treturn hasAutoGenerateControl( blockType?.attributes );\n\t},\n};\n"],
5
5
  "mappings": ";AAAA,SAAS,cAAc,SAAS,mBAAmB;AACnD,SAAS,iBAAiB;AAC1B,SAAS,iBAAiB;AAC1B,SAAS,gBAAgB;AACzB,SAAS,YAAY,eAAe;AACpC,SAAS,UAAU;AACnB,OAAO,uBAAuB;AAC9B,SAAS,2BAA2B;AACpC,SAAS,SAAS,wBAAwB;AAC1C,SAAS,cAAc;AACvB,OAAO,kBAAkB;AACzB,SAAS,oCAAoC;AAqFzC;AA7EJ,SAAS,uBAAwB,qBAAsB;AACtD,MAAK,CAAE,qBAAsB;AAC5B,WAAO;AAAA,EACR;AACA,SAAO,OAAO,OAAQ,mBAAoB,EAAE;AAAA,IAC3C,CAAE,SAAU,MAAM;AAAA,EACnB;AACD;AAaA,SAAS,qBAAsB,EAAE,MAAM,UAAU,cAAc,GAAI;AAClE,QAAM,mBAAmB,oBAAoB;AAE7C,QAAM,eAAe,WAAY,YAAa;AAE9C,QAAM,aAAa;AAAA,IAClB,CAAE,WAAY;AACb,YAAM,cACL,OAAQ,gBAAiB,EAAE,mBAAoB,QAAS;AACzD,UAAK,CAAE,aAAa,UAAU,UAAW;AACxC,eAAO;AAAA,MACR;AAEA,YAAM,EAAE,uBAAuB,IAAI,OAAQ,OAAQ,WAAY,CAAE;AACjE,aAAO,OAAO,QAAS,YAAY,SAAS,QAAS,EAAE;AAAA,QACtD,CAAE,KAAK,CAAE,WAAW,OAAQ,MAAO;AAClC,gBAAM,SAAS,uBAAwB,QAAQ,MAAO;AACtD,cAAK,CAAE,QAAS;AACf,mBAAO;AAAA,UACR;AACA,gBAAM,SAAS,OAAO,UAAW;AAAA,YAChC;AAAA,YACA,SAAS;AAAA,YACT,UAAU,EAAE,CAAE,SAAU,GAAG,QAAQ;AAAA,UACpC,CAAE;AACF,iBAAO,EAAE,GAAG,KAAK,GAAG,OAAO;AAAA,QAC5B;AAAA,QACA;AAAA,MACD;AAAA,IACD;AAAA,IACA,CAAE,cAAc,QAAS;AAAA,EAC1B;AAEA,QAAM,YAAY,aAAc,IAAK;AAMrC,QAAM,EAAE,QAAQ,KAAK,IAAI,QAAS,MAAM;AACvC,QAAK,CAAE,WAAW,YAAa;AAC9B,aAAO,EAAE,QAAQ,CAAC,GAAG,MAAM,EAAE,QAAQ,CAAC,EAAE,EAAE;AAAA,IAC3C;AACA,WAAO,6BAA8B,UAAU,UAAW;AAAA,EAC3D,GAAG,CAAE,WAAW,UAAW,CAAE;AAE7B,MAAK,qBAAqB,WAAY;AACrC,WAAO;AAAA,EACR;AAEA,MAAK,CAAE,UAAU,OAAO,WAAW,GAAI;AACtC,WAAO;AAAA,EACR;AAEA,SACC,oBAAC,qBACA,8BAAC,aAAU,OAAQ,GAAI,UAAW,GACjC;AAAA,IAAC;AAAA;AAAA,MACA,MAAO;AAAA,MACP;AAAA,MACA;AAAA,MACA,UAAW;AAAA;AAAA,EACZ,GACD,GACD;AAEF;AAEA,IAAO,kCAAQ;AAAA,EACd,MAAM;AAAA,EACN,eAAe,CAAC;AAAA,EAChB,WAAY,MAAO;AAClB,UAAM,YAAY,aAAc,IAAK;AACrC,WAAO,uBAAwB,WAAW,UAAW;AAAA,EACtD;AACD;",
6
6
  "names": []
@@ -1,4 +1,4 @@
1
- // packages/block-editor/src/hooks/background.js
1
+ // packages/block-editor/src/hooks/background.jsx
2
2
  import clsx from "clsx";
3
3
  import { getBlockSupport } from "@wordpress/blocks";
4
4
  import { useSelect } from "@wordpress/data";