@wordpress/block-editor 14.8.1-next.cd6172eb0.0 → 14.10.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 (1161) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/LICENSE.md +1 -1
  3. package/README.md +48 -0
  4. package/build/autocompleters/block.js +1 -0
  5. package/build/autocompleters/block.js.map +1 -1
  6. package/build/autocompleters/link.js +1 -0
  7. package/build/autocompleters/link.js.map +1 -1
  8. package/build/components/alignment-control/ui.js +1 -0
  9. package/build/components/alignment-control/ui.js.map +1 -1
  10. package/build/components/audio-player/index.native.js +1 -1
  11. package/build/components/audio-player/index.native.js.map +1 -1
  12. package/build/components/autocomplete/index.js +1 -0
  13. package/build/components/autocomplete/index.js.map +1 -1
  14. package/build/components/background-image-control/index.js +5 -0
  15. package/build/components/background-image-control/index.js.map +1 -1
  16. package/build/components/block-actions/index.js +1 -0
  17. package/build/components/block-actions/index.js.map +1 -1
  18. package/build/components/block-alignment-control/ui.js +1 -0
  19. package/build/components/block-alignment-control/ui.js.map +1 -1
  20. package/build/components/block-alignment-control/ui.native.js +1 -0
  21. package/build/components/block-alignment-control/ui.native.js.map +1 -1
  22. package/build/components/block-alignment-control/use-available-alignments.js +1 -0
  23. package/build/components/block-alignment-control/use-available-alignments.js.map +1 -1
  24. package/build/components/block-alignment-matrix-control/index.js +32 -0
  25. package/build/components/block-alignment-matrix-control/index.js.map +1 -1
  26. package/build/components/block-breadcrumb/index.js +1 -0
  27. package/build/components/block-breadcrumb/index.js.map +1 -1
  28. package/build/components/block-card/index.js +45 -8
  29. package/build/components/block-card/index.js.map +1 -1
  30. package/build/components/block-compare/index.js +1 -0
  31. package/build/components/block-compare/index.js.map +1 -1
  32. package/build/components/block-controls/fill.js +1 -0
  33. package/build/components/block-controls/fill.js.map +1 -1
  34. package/build/components/block-edit/edit.js +148 -10
  35. package/build/components/block-edit/edit.js.map +1 -1
  36. package/build/components/block-edit/edit.native.js +1 -0
  37. package/build/components/block-edit/edit.native.js.map +1 -1
  38. package/build/components/block-heading-level-dropdown/index.js +1 -0
  39. package/build/components/block-heading-level-dropdown/index.js.map +1 -1
  40. package/build/components/block-heading-level-dropdown/index.native.js +1 -0
  41. package/build/components/block-heading-level-dropdown/index.native.js.map +1 -1
  42. package/build/components/block-inspector/index.js +1 -0
  43. package/build/components/block-inspector/index.js.map +1 -1
  44. package/build/components/block-list/block-invalid-warning.js +1 -0
  45. package/build/components/block-list/block-invalid-warning.js.map +1 -1
  46. package/build/components/block-list/block-list-context.native.js +1 -0
  47. package/build/components/block-list/block-list-context.native.js.map +1 -1
  48. package/build/components/block-list/block.js +1 -0
  49. package/build/components/block-list/block.js.map +1 -1
  50. package/build/components/block-list/block.native.js +1 -0
  51. package/build/components/block-list/block.native.js.map +1 -1
  52. package/build/components/block-list/index.js +2 -2
  53. package/build/components/block-list/index.js.map +1 -1
  54. package/build/components/block-list/index.native.js +1 -0
  55. package/build/components/block-list/index.native.js.map +1 -1
  56. package/build/components/block-list/use-block-props/index.js +4 -5
  57. package/build/components/block-list/use-block-props/index.js.map +1 -1
  58. package/build/components/block-list/use-block-props/use-firefox-draggable-compatibility.js +61 -8
  59. package/build/components/block-list/use-block-props/use-firefox-draggable-compatibility.js.map +1 -1
  60. package/build/components/block-list/use-block-props/use-focus-first-element.js +1 -0
  61. package/build/components/block-list/use-block-props/use-focus-first-element.js.map +1 -1
  62. package/build/components/block-list/use-in-between-inserter.js +1 -0
  63. package/build/components/block-list/use-in-between-inserter.js.map +1 -1
  64. package/build/components/block-list/zoom-out-separator.js +20 -3
  65. package/build/components/block-list/zoom-out-separator.js.map +1 -1
  66. package/build/components/block-lock/modal.js +5 -4
  67. package/build/components/block-lock/modal.js.map +1 -1
  68. package/build/components/block-manager/category.js +1 -0
  69. package/build/components/block-manager/category.js.map +1 -1
  70. package/build/components/block-manager/checklist.js +1 -0
  71. package/build/components/block-manager/checklist.js.map +1 -1
  72. package/build/components/block-manager/index.js +1 -0
  73. package/build/components/block-manager/index.js.map +1 -1
  74. package/build/components/block-media-update-progress/index.native.js +1 -0
  75. package/build/components/block-media-update-progress/index.native.js.map +1 -1
  76. package/build/components/block-mover/index.native.js +1 -0
  77. package/build/components/block-mover/index.native.js.map +1 -1
  78. package/build/components/block-mover/mover-description.native.js +1 -0
  79. package/build/components/block-mover/mover-description.native.js.map +1 -1
  80. package/build/components/block-parent-selector/index.js +2 -15
  81. package/build/components/block-parent-selector/index.js.map +1 -1
  82. package/build/components/block-pattern-setup/index.js +1 -0
  83. package/build/components/block-pattern-setup/index.js.map +1 -1
  84. package/build/components/block-pattern-setup/use-patterns-setup.js +1 -0
  85. package/build/components/block-pattern-setup/use-patterns-setup.js.map +1 -1
  86. package/build/components/block-patterns-list/index.js +1 -0
  87. package/build/components/block-patterns-list/index.js.map +1 -1
  88. package/build/components/block-quick-navigation/index.js +1 -0
  89. package/build/components/block-quick-navigation/index.js.map +1 -1
  90. package/build/components/block-rename/rename-control.js +1 -0
  91. package/build/components/block-rename/rename-control.js.map +1 -1
  92. package/build/components/block-settings-menu/block-settings-dropdown.js +6 -8
  93. package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  94. package/build/components/block-styles/index.js +1 -0
  95. package/build/components/block-styles/index.js.map +1 -1
  96. package/build/components/block-styles/index.native.js +1 -0
  97. package/build/components/block-styles/index.native.js.map +1 -1
  98. package/build/components/block-styles/menu-items.js +1 -0
  99. package/build/components/block-styles/menu-items.js.map +1 -1
  100. package/build/components/block-styles/preview.native.js +1 -0
  101. package/build/components/block-styles/preview.native.js.map +1 -1
  102. package/build/components/block-styles/utils.js +3 -3
  103. package/build/components/block-styles/utils.js.map +1 -1
  104. package/build/components/block-switcher/block-transformations-menu.js +1 -0
  105. package/build/components/block-switcher/block-transformations-menu.js.map +1 -1
  106. package/build/components/block-switcher/block-transformations-menu.native.js +1 -0
  107. package/build/components/block-switcher/block-transformations-menu.native.js.map +1 -1
  108. package/build/components/block-switcher/block-variation-transformations.js +1 -0
  109. package/build/components/block-switcher/block-variation-transformations.js.map +1 -1
  110. package/build/components/block-switcher/index.js +1 -0
  111. package/build/components/block-switcher/index.js.map +1 -1
  112. package/build/components/block-switcher/pattern-transformations-menu.js +1 -0
  113. package/build/components/block-switcher/pattern-transformations-menu.js.map +1 -1
  114. package/build/components/block-switcher/use-transformed-patterns.js +1 -0
  115. package/build/components/block-switcher/use-transformed-patterns.js.map +1 -1
  116. package/build/components/block-switcher/utils.js +1 -0
  117. package/build/components/block-switcher/utils.js.map +1 -1
  118. package/build/components/block-toolbar/block-toolbar-menu.native.js +1 -0
  119. package/build/components/block-toolbar/block-toolbar-menu.native.js.map +1 -1
  120. package/build/components/block-toolbar/change-design.js +1 -0
  121. package/build/components/block-toolbar/change-design.js.map +1 -1
  122. package/build/components/block-toolbar/index.js +2 -1
  123. package/build/components/block-toolbar/index.js.map +1 -1
  124. package/build/components/block-tools/use-selected-block-tool-props.js +1 -0
  125. package/build/components/block-tools/use-selected-block-tool-props.js.map +1 -1
  126. package/build/components/block-tools/zoom-out-mode-inserters.js +19 -6
  127. package/build/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
  128. package/build/components/block-types-list/index.js +1 -0
  129. package/build/components/block-types-list/index.js.map +1 -1
  130. package/build/components/block-variation-picker/index.js +1 -0
  131. package/build/components/block-variation-picker/index.js.map +1 -1
  132. package/build/components/block-variation-picker/index.native.js +1 -0
  133. package/build/components/block-variation-picker/index.native.js.map +1 -1
  134. package/build/components/block-variation-transforms/index.js +1 -0
  135. package/build/components/block-variation-transforms/index.js.map +1 -1
  136. package/build/components/block-vertical-alignment-control/ui.js +1 -0
  137. package/build/components/block-vertical-alignment-control/ui.js.map +1 -1
  138. package/build/components/border-radius-control/index.js +1 -0
  139. package/build/components/border-radius-control/index.js.map +1 -1
  140. package/build/components/border-radius-control/input-controls.js +1 -0
  141. package/build/components/border-radius-control/input-controls.js.map +1 -1
  142. package/build/components/border-radius-control/utils.js +1 -0
  143. package/build/components/border-radius-control/utils.js.map +1 -1
  144. package/build/components/button-block-appender/index.js +1 -5
  145. package/build/components/button-block-appender/index.js.map +1 -1
  146. package/build/components/child-layout-control/index.js +6 -0
  147. package/build/components/child-layout-control/index.js.map +1 -1
  148. package/build/components/colors/utils.js +1 -0
  149. package/build/components/colors/utils.js.map +1 -1
  150. package/build/components/colors/with-colors.js +1 -0
  151. package/build/components/colors/with-colors.js.map +1 -1
  152. package/build/components/colors-gradients/dropdown.js +52 -11
  153. package/build/components/colors-gradients/dropdown.js.map +1 -1
  154. package/build/components/colors-gradients/panel-color-gradient-settings.js +1 -0
  155. package/build/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
  156. package/build/components/colors-gradients/panel-color-gradient-settings.native.js +1 -0
  157. package/build/components/colors-gradients/panel-color-gradient-settings.native.js.map +1 -1
  158. package/build/components/contrast-checker/index.native.js +1 -1
  159. package/build/components/contrast-checker/index.native.js.map +1 -1
  160. package/build/components/convert-to-group-buttons/toolbar.js +1 -0
  161. package/build/components/convert-to-group-buttons/toolbar.js.map +1 -1
  162. package/build/components/date-format-picker/index.js +8 -16
  163. package/build/components/date-format-picker/index.js.map +1 -1
  164. package/build/components/dimensions-tool/scale-tool.js +1 -0
  165. package/build/components/dimensions-tool/scale-tool.js.map +1 -1
  166. package/build/components/duotone/utils.js +1 -0
  167. package/build/components/duotone/utils.js.map +1 -1
  168. package/build/components/editor-styles/index.js +1 -0
  169. package/build/components/editor-styles/index.js.map +1 -1
  170. package/build/components/font-appearance-control/index.js +10 -0
  171. package/build/components/font-appearance-control/index.js.map +1 -1
  172. package/build/components/font-family/index.js +11 -1
  173. package/build/components/font-family/index.js.map +1 -1
  174. package/build/components/font-sizes/with-font-sizes.js +1 -0
  175. package/build/components/font-sizes/with-font-sizes.js.map +1 -1
  176. package/build/components/global-styles/border-panel.js +1 -0
  177. package/build/components/global-styles/border-panel.js.map +1 -1
  178. package/build/components/global-styles/color-panel.js +28 -8
  179. package/build/components/global-styles/color-panel.js.map +1 -1
  180. package/build/components/global-styles/color-panel.native.js +1 -0
  181. package/build/components/global-styles/color-panel.native.js.map +1 -1
  182. package/build/components/global-styles/dimensions-panel.js +1 -0
  183. package/build/components/global-styles/dimensions-panel.js.map +1 -1
  184. package/build/components/global-styles/filters-panel.js +3 -2
  185. package/build/components/global-styles/filters-panel.js.map +1 -1
  186. package/build/components/global-styles/get-global-styles-changes.js +1 -0
  187. package/build/components/global-styles/get-global-styles-changes.js.map +1 -1
  188. package/build/components/global-styles/shadow-panel-components.js +1 -0
  189. package/build/components/global-styles/shadow-panel-components.js.map +1 -1
  190. package/build/components/global-styles/typography-utils.js +2 -1
  191. package/build/components/global-styles/typography-utils.js.map +1 -1
  192. package/build/components/global-styles/use-global-styles-context.native.js +1 -0
  193. package/build/components/global-styles/use-global-styles-context.native.js.map +1 -1
  194. package/build/components/global-styles/use-global-styles-output.js +2 -1
  195. package/build/components/global-styles/use-global-styles-output.js.map +1 -1
  196. package/build/components/global-styles/utils.js +1 -0
  197. package/build/components/global-styles/utils.js.map +1 -1
  198. package/build/components/grid/grid-visualizer.js +10 -0
  199. package/build/components/grid/grid-visualizer.js.map +1 -1
  200. package/build/components/grid/use-grid-layout-sync.js +1 -0
  201. package/build/components/grid/use-grid-layout-sync.js.map +1 -1
  202. package/build/components/grid/utils.js +13 -1
  203. package/build/components/grid/utils.js.map +1 -1
  204. package/build/components/iframe/get-compatibility-styles.js +1 -0
  205. package/build/components/iframe/get-compatibility-styles.js.map +1 -1
  206. package/build/components/iframe/index.js +1 -1
  207. package/build/components/iframe/index.js.map +1 -1
  208. package/build/components/image-editor/aspect-ratio-dropdown.js +1 -0
  209. package/build/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
  210. package/build/components/index.js +15 -8
  211. package/build/components/index.js.map +1 -1
  212. package/build/components/inner-blocks/use-block-context.js +1 -0
  213. package/build/components/inner-blocks/use-block-context.js.map +1 -1
  214. package/build/components/inner-blocks/use-inner-block-template-sync.js +11 -11
  215. package/build/components/inner-blocks/use-inner-block-template-sync.js.map +1 -1
  216. package/build/components/inserter/block-patterns-explorer/index.js +1 -1
  217. package/build/components/inserter/block-patterns-explorer/index.js.map +1 -1
  218. package/build/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js +1 -0
  219. package/build/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js.map +1 -1
  220. package/build/components/inserter/block-patterns-explorer/pattern-list.js +1 -0
  221. package/build/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
  222. package/build/components/inserter/block-patterns-tab/index.js +1 -1
  223. package/build/components/inserter/block-patterns-tab/index.js.map +1 -1
  224. package/build/components/inserter/block-patterns-tab/pattern-category-previews.js +5 -4
  225. package/build/components/inserter/block-patterns-tab/pattern-category-previews.js.map +1 -1
  226. package/build/components/inserter/block-patterns-tab/patterns-filter.js +2 -2
  227. package/build/components/inserter/block-patterns-tab/patterns-filter.js.map +1 -1
  228. package/build/components/inserter/block-patterns-tab/use-pattern-categories.js +1 -0
  229. package/build/components/inserter/block-patterns-tab/use-pattern-categories.js.map +1 -1
  230. package/build/components/inserter/block-types-tab.js +2 -1
  231. package/build/components/inserter/block-types-tab.js.map +1 -1
  232. package/build/components/inserter/block-types-tab.native.js +1 -0
  233. package/build/components/inserter/block-types-tab.native.js.map +1 -1
  234. package/build/components/inserter/category-tabs/index.js +2 -2
  235. package/build/components/inserter/category-tabs/index.js.map +1 -1
  236. package/build/components/inserter/hooks/use-block-type-impressions.native.js +1 -0
  237. package/build/components/inserter/hooks/use-block-type-impressions.native.js.map +1 -1
  238. package/build/components/inserter/hooks/use-patterns-state.js +1 -0
  239. package/build/components/inserter/hooks/use-patterns-state.js.map +1 -1
  240. package/build/components/inserter/index.js +7 -15
  241. package/build/components/inserter/index.js.map +1 -1
  242. package/build/components/inserter/index.native.js +1 -0
  243. package/build/components/inserter/index.native.js.map +1 -1
  244. package/build/components/inserter/media-tab/hooks.js +1 -0
  245. package/build/components/inserter/media-tab/hooks.js.map +1 -1
  246. package/build/components/inserter/media-tab/media-list.js +1 -0
  247. package/build/components/inserter/media-tab/media-list.js.map +1 -1
  248. package/build/components/inserter/media-tab/media-tab.js +1 -0
  249. package/build/components/inserter/media-tab/media-tab.js.map +1 -1
  250. package/build/components/inserter/menu.js +1 -0
  251. package/build/components/inserter/menu.js.map +1 -1
  252. package/build/components/inserter/mobile-tab-navigation.js +1 -0
  253. package/build/components/inserter/mobile-tab-navigation.js.map +1 -1
  254. package/build/components/inserter/quick-inserter.js +2 -13
  255. package/build/components/inserter/quick-inserter.js.map +1 -1
  256. package/build/components/inserter/search-items.js +1 -0
  257. package/build/components/inserter/search-items.js.map +1 -1
  258. package/build/components/inserter/search-results.js +1 -0
  259. package/build/components/inserter/search-results.js.map +1 -1
  260. package/build/components/inserter/tabs.native.js +1 -0
  261. package/build/components/inserter/tabs.native.js.map +1 -1
  262. package/build/components/inserter/utils.native.js +1 -0
  263. package/build/components/inserter/utils.native.js.map +1 -1
  264. package/build/components/inspector-controls/block-support-tools-panel.js +1 -0
  265. package/build/components/inspector-controls/block-support-tools-panel.js.map +1 -1
  266. package/build/components/inspector-controls/fill.js +1 -0
  267. package/build/components/inspector-controls/fill.js.map +1 -1
  268. package/build/components/inspector-controls/slot.js +2 -13
  269. package/build/components/inspector-controls/slot.js.map +1 -1
  270. package/build/components/inspector-controls-tabs/index.js +1 -0
  271. package/build/components/inspector-controls-tabs/index.js.map +1 -1
  272. package/build/components/inspector-controls-tabs/position-controls-panel.js +1 -0
  273. package/build/components/inspector-controls-tabs/position-controls-panel.js.map +1 -1
  274. package/build/components/inspector-popover-header/index.js +1 -0
  275. package/build/components/inspector-popover-header/index.js.map +1 -1
  276. package/build/components/justify-content-control/ui.js +1 -0
  277. package/build/components/justify-content-control/ui.js.map +1 -1
  278. package/build/components/keyboard-shortcuts/index.js +2 -2
  279. package/build/components/keyboard-shortcuts/index.js.map +1 -1
  280. package/build/components/line-height-control/index.js +9 -0
  281. package/build/components/line-height-control/index.js.map +1 -1
  282. package/build/components/link-control/index.js +13 -1
  283. package/build/components/link-control/index.js.map +1 -1
  284. package/build/components/link-control/search-input.js +11 -1
  285. package/build/components/link-control/search-input.js.map +1 -1
  286. package/build/components/link-control/search-item.js +12 -1
  287. package/build/components/link-control/search-item.js.map +1 -1
  288. package/build/components/link-control/search-results.js +13 -1
  289. package/build/components/link-control/search-results.js.map +1 -1
  290. package/build/components/link-control/settings.js +1 -0
  291. package/build/components/link-control/settings.js.map +1 -1
  292. package/build/components/link-control/use-internal-value.js +1 -0
  293. package/build/components/link-control/use-internal-value.js.map +1 -1
  294. package/build/components/link-control/use-search-handler.js +1 -0
  295. package/build/components/link-control/use-search-handler.js.map +1 -1
  296. package/build/components/list-view/block-select-button.js +1 -0
  297. package/build/components/list-view/block-select-button.js.map +1 -1
  298. package/build/components/list-view/block.js +1 -0
  299. package/build/components/list-view/block.js.map +1 -1
  300. package/build/components/list-view/branch.js +1 -0
  301. package/build/components/list-view/branch.js.map +1 -1
  302. package/build/components/list-view/index.js +1 -0
  303. package/build/components/list-view/index.js.map +1 -1
  304. package/build/components/list-view/use-block-selection.js +1 -0
  305. package/build/components/list-view/use-block-selection.js.map +1 -1
  306. package/build/components/list-view/use-clipboard-handler.js +1 -0
  307. package/build/components/list-view/use-clipboard-handler.js.map +1 -1
  308. package/build/components/list-view/use-list-view-block-indexes.js +1 -0
  309. package/build/components/list-view/use-list-view-block-indexes.js.map +1 -1
  310. package/build/components/list-view/use-list-view-drop-zone.js +1 -0
  311. package/build/components/list-view/use-list-view-drop-zone.js.map +1 -1
  312. package/build/components/list-view/utils.js +1 -0
  313. package/build/components/list-view/utils.js.map +1 -1
  314. package/build/components/media-placeholder/index.js +3 -2
  315. package/build/components/media-placeholder/index.js.map +1 -1
  316. package/build/components/media-placeholder/index.native.js +1 -0
  317. package/build/components/media-placeholder/index.native.js.map +1 -1
  318. package/build/components/media-replace-flow/index.js +27 -26
  319. package/build/components/media-replace-flow/index.js.map +1 -1
  320. package/build/components/media-upload/index.native.js +1 -0
  321. package/build/components/media-upload/index.native.js.map +1 -1
  322. package/build/components/multi-selection-inspector/index.js +9 -25
  323. package/build/components/multi-selection-inspector/index.js.map +1 -1
  324. package/build/components/navigable-toolbar/index.js +1 -0
  325. package/build/components/navigable-toolbar/index.js.map +1 -1
  326. package/build/components/panel-color-settings/index.js +1 -0
  327. package/build/components/panel-color-settings/index.js.map +1 -1
  328. package/build/components/plain-text/index.js +34 -0
  329. package/build/components/plain-text/index.js.map +1 -1
  330. package/build/components/provider/index.js +61 -5
  331. package/build/components/provider/index.js.map +1 -1
  332. package/build/components/provider/use-block-sync.js +1 -0
  333. package/build/components/provider/use-block-sync.js.map +1 -1
  334. package/build/components/provider/use-media-upload-settings.js +28 -0
  335. package/build/components/provider/use-media-upload-settings.js.map +1 -0
  336. package/build/components/resolution-tool/index.js +3 -1
  337. package/build/components/resolution-tool/index.js.map +1 -1
  338. package/build/components/responsive-block-control/index.js +2 -1
  339. package/build/components/responsive-block-control/index.js.map +1 -1
  340. package/build/components/rich-text/embed-handler-picker.native.js +1 -0
  341. package/build/components/rich-text/embed-handler-picker.native.js.map +1 -1
  342. package/build/components/rich-text/event-listeners/before-input-rules.js +1 -0
  343. package/build/components/rich-text/event-listeners/before-input-rules.js.map +1 -1
  344. package/build/components/rich-text/event-listeners/delete.js +7 -1
  345. package/build/components/rich-text/event-listeners/delete.js.map +1 -1
  346. package/build/components/rich-text/event-listeners/index.js +1 -0
  347. package/build/components/rich-text/event-listeners/index.js.map +1 -1
  348. package/build/components/rich-text/event-listeners/input-rules.js +1 -0
  349. package/build/components/rich-text/event-listeners/input-rules.js.map +1 -1
  350. package/build/components/rich-text/event-listeners/paste-handler.js +1 -0
  351. package/build/components/rich-text/event-listeners/paste-handler.js.map +1 -1
  352. package/build/components/rich-text/file-paste-handler.native.js +1 -0
  353. package/build/components/rich-text/file-paste-handler.native.js.map +1 -1
  354. package/build/components/rich-text/format-edit.js +1 -0
  355. package/build/components/rich-text/format-edit.js.map +1 -1
  356. package/build/components/rich-text/format-toolbar/index.js +1 -0
  357. package/build/components/rich-text/format-toolbar/index.js.map +1 -1
  358. package/build/components/rich-text/index.js +3 -2
  359. package/build/components/rich-text/index.js.map +1 -1
  360. package/build/components/rich-text/index.native.js +1 -0
  361. package/build/components/rich-text/index.native.js.map +1 -1
  362. package/build/components/rich-text/multiline.js +1 -0
  363. package/build/components/rich-text/multiline.js.map +1 -1
  364. package/build/components/rich-text/native/format-edit.js +1 -0
  365. package/build/components/rich-text/native/format-edit.js.map +1 -1
  366. package/build/components/rich-text/native/get-format-colors.native.js +1 -0
  367. package/build/components/rich-text/native/get-format-colors.native.js.map +1 -1
  368. package/build/components/rich-text/native/index.native.js +1 -0
  369. package/build/components/rich-text/native/index.native.js.map +1 -1
  370. package/build/components/rich-text/native/toolbar-button-with-options.native.js +1 -0
  371. package/build/components/rich-text/native/toolbar-button-with-options.native.js.map +1 -1
  372. package/build/components/rich-text/native/use-format-types.js +1 -0
  373. package/build/components/rich-text/native/use-format-types.js.map +1 -1
  374. package/build/components/rich-text/use-format-types.js +1 -0
  375. package/build/components/rich-text/use-format-types.js.map +1 -1
  376. package/build/components/spacing-sizes-control/hooks/use-spacing-sizes.js +1 -0
  377. package/build/components/spacing-sizes-control/hooks/use-spacing-sizes.js.map +1 -1
  378. package/build/components/spacing-sizes-control/input-controls/axial.js +1 -0
  379. package/build/components/spacing-sizes-control/input-controls/axial.js.map +1 -1
  380. package/build/components/spacing-sizes-control/input-controls/separated.js +1 -0
  381. package/build/components/spacing-sizes-control/input-controls/separated.js.map +1 -1
  382. package/build/components/spacing-sizes-control/input-controls/single.js +1 -0
  383. package/build/components/spacing-sizes-control/input-controls/single.js.map +1 -1
  384. package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js +1 -0
  385. package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
  386. package/build/components/spacing-sizes-control/utils.js +1 -0
  387. package/build/components/spacing-sizes-control/utils.js.map +1 -1
  388. package/build/components/tabbed-sidebar/index.js +1 -0
  389. package/build/components/tabbed-sidebar/index.js.map +1 -1
  390. package/build/components/text-alignment-control/index.js +1 -0
  391. package/build/components/text-alignment-control/index.js.map +1 -1
  392. package/build/components/text-decoration-control/index.js +1 -0
  393. package/build/components/text-decoration-control/index.js.map +1 -1
  394. package/build/components/text-transform-control/index.js +1 -0
  395. package/build/components/text-transform-control/index.js.map +1 -1
  396. package/build/components/unsupported-block-details/index.native.js +1 -0
  397. package/build/components/unsupported-block-details/index.native.js.map +1 -1
  398. package/build/components/url-input/index.js +1 -0
  399. package/build/components/url-input/index.js.map +1 -1
  400. package/build/components/url-popover/image-url-input-ui.js +1 -0
  401. package/build/components/url-popover/image-url-input-ui.js.map +1 -1
  402. package/build/components/use-block-commands/index.js +1 -0
  403. package/build/components/use-block-commands/index.js.map +1 -1
  404. package/build/components/use-block-drop-zone/index.js +3 -1
  405. package/build/components/use-block-drop-zone/index.js.map +1 -1
  406. package/build/components/use-block-drop-zone/index.native.js +1 -0
  407. package/build/components/use-block-drop-zone/index.native.js.map +1 -1
  408. package/build/components/use-flash-editable-blocks/index.js +1 -0
  409. package/build/components/use-flash-editable-blocks/index.js.map +1 -1
  410. package/build/components/use-on-block-drop/index.js +1 -0
  411. package/build/components/use-on-block-drop/index.js.map +1 -1
  412. package/build/components/use-on-block-drop/index.native.js +1 -0
  413. package/build/components/use-on-block-drop/index.native.js.map +1 -1
  414. package/build/components/use-paste-styles/index.js +1 -0
  415. package/build/components/use-paste-styles/index.js.map +1 -1
  416. package/build/components/warning/index.js +3 -3
  417. package/build/components/warning/index.js.map +1 -1
  418. package/build/components/writing-flow/use-arrow-nav.js +1 -0
  419. package/build/components/writing-flow/use-arrow-nav.js.map +1 -1
  420. package/build/components/writing-flow/use-clipboard-handler.js +1 -0
  421. package/build/components/writing-flow/use-clipboard-handler.js.map +1 -1
  422. package/build/components/writing-flow/use-input.js +1 -0
  423. package/build/components/writing-flow/use-input.js.map +1 -1
  424. package/build/components/writing-flow/use-tab-nav.js +1 -0
  425. package/build/components/writing-flow/use-tab-nav.js.map +1 -1
  426. package/build/components/writing-flow/utils.js +1 -0
  427. package/build/components/writing-flow/utils.js.map +1 -1
  428. package/build/components/writing-mode-control/index.js +1 -0
  429. package/build/components/writing-mode-control/index.js.map +1 -1
  430. package/build/hooks/align.js +1 -0
  431. package/build/hooks/align.js.map +1 -1
  432. package/build/hooks/align.native.js +1 -0
  433. package/build/hooks/align.native.js.map +1 -1
  434. package/build/hooks/background.js +2 -0
  435. package/build/hooks/background.js.map +1 -1
  436. package/build/hooks/block-bindings.js +16 -14
  437. package/build/hooks/block-bindings.js.map +1 -1
  438. package/build/hooks/block-hooks.js +1 -0
  439. package/build/hooks/block-hooks.js.map +1 -1
  440. package/build/hooks/block-style-variation.js +1 -0
  441. package/build/hooks/block-style-variation.js.map +1 -1
  442. package/build/hooks/border.js +4 -3
  443. package/build/hooks/border.js.map +1 -1
  444. package/build/hooks/color.js +1 -1
  445. package/build/hooks/color.js.map +1 -1
  446. package/build/hooks/dimensions.js +2 -2
  447. package/build/hooks/dimensions.js.map +1 -1
  448. package/build/hooks/duotone.js +1 -0
  449. package/build/hooks/duotone.js.map +1 -1
  450. package/build/hooks/font-family.js +1 -1
  451. package/build/hooks/font-family.js.map +1 -1
  452. package/build/hooks/gap.js +2 -2
  453. package/build/hooks/gap.js.map +1 -1
  454. package/build/hooks/index.js +1 -1
  455. package/build/hooks/index.js.map +1 -1
  456. package/build/hooks/index.native.js +7 -0
  457. package/build/hooks/index.native.js.map +1 -1
  458. package/build/hooks/layout.js +1 -0
  459. package/build/hooks/layout.js.map +1 -1
  460. package/build/hooks/position.js +1 -0
  461. package/build/hooks/position.js.map +1 -1
  462. package/build/hooks/style.js +7 -6
  463. package/build/hooks/style.js.map +1 -1
  464. package/build/hooks/supports.js +8 -7
  465. package/build/hooks/supports.js.map +1 -1
  466. package/build/hooks/text-align.js +1 -0
  467. package/build/hooks/text-align.js.map +1 -1
  468. package/build/hooks/typography.js +7 -6
  469. package/build/hooks/typography.js.map +1 -1
  470. package/build/hooks/use-zoom-out.js +58 -14
  471. package/build/hooks/use-zoom-out.js.map +1 -1
  472. package/build/hooks/utils.js +2 -1
  473. package/build/hooks/utils.js.map +1 -1
  474. package/build/layouts/constrained.js +1 -0
  475. package/build/layouts/constrained.js.map +1 -1
  476. package/build/layouts/flex.js +1 -0
  477. package/build/layouts/flex.js.map +1 -1
  478. package/build/layouts/flow.js +1 -0
  479. package/build/layouts/flow.js.map +1 -1
  480. package/build/layouts/index.js +1 -0
  481. package/build/layouts/index.js.map +1 -1
  482. package/build/layouts/utils.js +1 -0
  483. package/build/layouts/utils.js.map +1 -1
  484. package/build/store/actions.js +1 -0
  485. package/build/store/actions.js.map +1 -1
  486. package/build/store/get-block-settings.js +1 -0
  487. package/build/store/get-block-settings.js.map +1 -1
  488. package/build/store/private-actions.js +2 -1
  489. package/build/store/private-actions.js.map +1 -1
  490. package/build/store/private-selectors.js +12 -1
  491. package/build/store/private-selectors.js.map +1 -1
  492. package/build/store/reducer.js +94 -12
  493. package/build/store/reducer.js.map +1 -1
  494. package/build/store/selectors.js +19 -23
  495. package/build/store/selectors.js.map +1 -1
  496. package/build/store/utils.js +1 -0
  497. package/build/store/utils.js.map +1 -1
  498. package/build/utils/block-bindings.js +96 -0
  499. package/build/utils/block-bindings.js.map +1 -1
  500. package/build/utils/get-editor-region.js +1 -0
  501. package/build/utils/get-editor-region.js.map +1 -1
  502. package/build/utils/get-font-styles-and-weights.js +1 -0
  503. package/build/utils/get-font-styles-and-weights.js.map +1 -1
  504. package/build/utils/math.js +1 -0
  505. package/build/utils/math.js.map +1 -1
  506. package/build/utils/object.js +1 -0
  507. package/build/utils/object.js.map +1 -1
  508. package/build/utils/selection.js +1 -0
  509. package/build/utils/selection.js.map +1 -1
  510. package/build/utils/transform-styles/index.js +1 -0
  511. package/build/utils/transform-styles/index.js.map +1 -1
  512. package/build-module/autocompleters/block.js +1 -0
  513. package/build-module/autocompleters/block.js.map +1 -1
  514. package/build-module/autocompleters/link.js +1 -0
  515. package/build-module/autocompleters/link.js.map +1 -1
  516. package/build-module/components/alignment-control/ui.js +1 -0
  517. package/build-module/components/alignment-control/ui.js.map +1 -1
  518. package/build-module/components/audio-player/index.native.js +2 -2
  519. package/build-module/components/audio-player/index.native.js.map +1 -1
  520. package/build-module/components/autocomplete/index.js +1 -0
  521. package/build-module/components/autocomplete/index.js.map +1 -1
  522. package/build-module/components/background-image-control/index.js +6 -1
  523. package/build-module/components/background-image-control/index.js.map +1 -1
  524. package/build-module/components/block-actions/index.js +1 -0
  525. package/build-module/components/block-actions/index.js.map +1 -1
  526. package/build-module/components/block-alignment-control/ui.js +1 -0
  527. package/build-module/components/block-alignment-control/ui.js.map +1 -1
  528. package/build-module/components/block-alignment-control/ui.native.js +1 -0
  529. package/build-module/components/block-alignment-control/ui.native.js.map +1 -1
  530. package/build-module/components/block-alignment-control/use-available-alignments.js +1 -0
  531. package/build-module/components/block-alignment-control/use-available-alignments.js.map +1 -1
  532. package/build-module/components/block-alignment-matrix-control/index.js +32 -0
  533. package/build-module/components/block-alignment-matrix-control/index.js.map +1 -1
  534. package/build-module/components/block-breadcrumb/index.js +1 -0
  535. package/build-module/components/block-breadcrumb/index.js.map +1 -1
  536. package/build-module/components/block-card/index.js +45 -8
  537. package/build-module/components/block-card/index.js.map +1 -1
  538. package/build-module/components/block-compare/index.js +1 -0
  539. package/build-module/components/block-compare/index.js.map +1 -1
  540. package/build-module/components/block-controls/fill.js +1 -0
  541. package/build-module/components/block-controls/fill.js.map +1 -1
  542. package/build-module/components/block-edit/edit.js +149 -11
  543. package/build-module/components/block-edit/edit.js.map +1 -1
  544. package/build-module/components/block-edit/edit.native.js +1 -0
  545. package/build-module/components/block-edit/edit.native.js.map +1 -1
  546. package/build-module/components/block-heading-level-dropdown/index.js +1 -0
  547. package/build-module/components/block-heading-level-dropdown/index.js.map +1 -1
  548. package/build-module/components/block-heading-level-dropdown/index.native.js +1 -0
  549. package/build-module/components/block-heading-level-dropdown/index.native.js.map +1 -1
  550. package/build-module/components/block-inspector/index.js +1 -0
  551. package/build-module/components/block-inspector/index.js.map +1 -1
  552. package/build-module/components/block-list/block-invalid-warning.js +1 -0
  553. package/build-module/components/block-list/block-invalid-warning.js.map +1 -1
  554. package/build-module/components/block-list/block-list-context.native.js +1 -0
  555. package/build-module/components/block-list/block-list-context.native.js.map +1 -1
  556. package/build-module/components/block-list/block.js +1 -0
  557. package/build-module/components/block-list/block.js.map +1 -1
  558. package/build-module/components/block-list/block.native.js +1 -0
  559. package/build-module/components/block-list/block.native.js.map +1 -1
  560. package/build-module/components/block-list/index.js +3 -3
  561. package/build-module/components/block-list/index.js.map +1 -1
  562. package/build-module/components/block-list/index.native.js +1 -0
  563. package/build-module/components/block-list/index.native.js.map +1 -1
  564. package/build-module/components/block-list/use-block-props/index.js +3 -4
  565. package/build-module/components/block-list/use-block-props/index.js.map +1 -1
  566. package/build-module/components/block-list/use-block-props/use-firefox-draggable-compatibility.js +60 -8
  567. package/build-module/components/block-list/use-block-props/use-firefox-draggable-compatibility.js.map +1 -1
  568. package/build-module/components/block-list/use-block-props/use-focus-first-element.js +1 -0
  569. package/build-module/components/block-list/use-block-props/use-focus-first-element.js.map +1 -1
  570. package/build-module/components/block-list/use-in-between-inserter.js +1 -0
  571. package/build-module/components/block-list/use-in-between-inserter.js.map +1 -1
  572. package/build-module/components/block-list/zoom-out-separator.js +20 -3
  573. package/build-module/components/block-list/zoom-out-separator.js.map +1 -1
  574. package/build-module/components/block-lock/modal.js +5 -4
  575. package/build-module/components/block-lock/modal.js.map +1 -1
  576. package/build-module/components/block-manager/category.js +1 -0
  577. package/build-module/components/block-manager/category.js.map +1 -1
  578. package/build-module/components/block-manager/checklist.js +1 -0
  579. package/build-module/components/block-manager/checklist.js.map +1 -1
  580. package/build-module/components/block-manager/index.js +1 -0
  581. package/build-module/components/block-manager/index.js.map +1 -1
  582. package/build-module/components/block-media-update-progress/index.native.js +1 -0
  583. package/build-module/components/block-media-update-progress/index.native.js.map +1 -1
  584. package/build-module/components/block-mover/index.native.js +1 -0
  585. package/build-module/components/block-mover/index.native.js.map +1 -1
  586. package/build-module/components/block-mover/mover-description.native.js +1 -0
  587. package/build-module/components/block-mover/mover-description.native.js.map +1 -1
  588. package/build-module/components/block-parent-selector/index.js +2 -15
  589. package/build-module/components/block-parent-selector/index.js.map +1 -1
  590. package/build-module/components/block-pattern-setup/index.js +1 -0
  591. package/build-module/components/block-pattern-setup/index.js.map +1 -1
  592. package/build-module/components/block-pattern-setup/use-patterns-setup.js +1 -0
  593. package/build-module/components/block-pattern-setup/use-patterns-setup.js.map +1 -1
  594. package/build-module/components/block-patterns-list/index.js +1 -0
  595. package/build-module/components/block-patterns-list/index.js.map +1 -1
  596. package/build-module/components/block-quick-navigation/index.js +1 -0
  597. package/build-module/components/block-quick-navigation/index.js.map +1 -1
  598. package/build-module/components/block-rename/rename-control.js +1 -0
  599. package/build-module/components/block-rename/rename-control.js.map +1 -1
  600. package/build-module/components/block-settings-menu/block-settings-dropdown.js +6 -8
  601. package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  602. package/build-module/components/block-styles/index.js +1 -0
  603. package/build-module/components/block-styles/index.js.map +1 -1
  604. package/build-module/components/block-styles/index.native.js +1 -0
  605. package/build-module/components/block-styles/index.native.js.map +1 -1
  606. package/build-module/components/block-styles/menu-items.js +1 -0
  607. package/build-module/components/block-styles/menu-items.js.map +1 -1
  608. package/build-module/components/block-styles/preview.native.js +1 -0
  609. package/build-module/components/block-styles/preview.native.js.map +1 -1
  610. package/build-module/components/block-styles/utils.js +3 -3
  611. package/build-module/components/block-styles/utils.js.map +1 -1
  612. package/build-module/components/block-switcher/block-transformations-menu.js +1 -0
  613. package/build-module/components/block-switcher/block-transformations-menu.js.map +1 -1
  614. package/build-module/components/block-switcher/block-transformations-menu.native.js +1 -0
  615. package/build-module/components/block-switcher/block-transformations-menu.native.js.map +1 -1
  616. package/build-module/components/block-switcher/block-variation-transformations.js +1 -0
  617. package/build-module/components/block-switcher/block-variation-transformations.js.map +1 -1
  618. package/build-module/components/block-switcher/index.js +1 -0
  619. package/build-module/components/block-switcher/index.js.map +1 -1
  620. package/build-module/components/block-switcher/pattern-transformations-menu.js +1 -0
  621. package/build-module/components/block-switcher/pattern-transformations-menu.js.map +1 -1
  622. package/build-module/components/block-switcher/use-transformed-patterns.js +1 -0
  623. package/build-module/components/block-switcher/use-transformed-patterns.js.map +1 -1
  624. package/build-module/components/block-switcher/utils.js +1 -0
  625. package/build-module/components/block-switcher/utils.js.map +1 -1
  626. package/build-module/components/block-toolbar/block-toolbar-menu.native.js +1 -0
  627. package/build-module/components/block-toolbar/block-toolbar-menu.native.js.map +1 -1
  628. package/build-module/components/block-toolbar/change-design.js +1 -0
  629. package/build-module/components/block-toolbar/change-design.js.map +1 -1
  630. package/build-module/components/block-toolbar/index.js +2 -1
  631. package/build-module/components/block-toolbar/index.js.map +1 -1
  632. package/build-module/components/block-tools/use-selected-block-tool-props.js +1 -0
  633. package/build-module/components/block-tools/use-selected-block-tool-props.js.map +1 -1
  634. package/build-module/components/block-tools/zoom-out-mode-inserters.js +19 -6
  635. package/build-module/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
  636. package/build-module/components/block-types-list/index.js +1 -0
  637. package/build-module/components/block-types-list/index.js.map +1 -1
  638. package/build-module/components/block-variation-picker/index.js +1 -0
  639. package/build-module/components/block-variation-picker/index.js.map +1 -1
  640. package/build-module/components/block-variation-picker/index.native.js +1 -0
  641. package/build-module/components/block-variation-picker/index.native.js.map +1 -1
  642. package/build-module/components/block-variation-transforms/index.js +1 -0
  643. package/build-module/components/block-variation-transforms/index.js.map +1 -1
  644. package/build-module/components/block-vertical-alignment-control/ui.js +1 -0
  645. package/build-module/components/block-vertical-alignment-control/ui.js.map +1 -1
  646. package/build-module/components/border-radius-control/index.js +1 -0
  647. package/build-module/components/border-radius-control/index.js.map +1 -1
  648. package/build-module/components/border-radius-control/input-controls.js +1 -0
  649. package/build-module/components/border-radius-control/input-controls.js.map +1 -1
  650. package/build-module/components/border-radius-control/utils.js +1 -0
  651. package/build-module/components/border-radius-control/utils.js.map +1 -1
  652. package/build-module/components/button-block-appender/index.js +2 -6
  653. package/build-module/components/button-block-appender/index.js.map +1 -1
  654. package/build-module/components/child-layout-control/index.js +7 -1
  655. package/build-module/components/child-layout-control/index.js.map +1 -1
  656. package/build-module/components/colors/utils.js +1 -0
  657. package/build-module/components/colors/utils.js.map +1 -1
  658. package/build-module/components/colors/with-colors.js +1 -0
  659. package/build-module/components/colors/with-colors.js.map +1 -1
  660. package/build-module/components/colors-gradients/dropdown.js +52 -11
  661. package/build-module/components/colors-gradients/dropdown.js.map +1 -1
  662. package/build-module/components/colors-gradients/panel-color-gradient-settings.js +1 -0
  663. package/build-module/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
  664. package/build-module/components/colors-gradients/panel-color-gradient-settings.native.js +1 -0
  665. package/build-module/components/colors-gradients/panel-color-gradient-settings.native.js.map +1 -1
  666. package/build-module/components/contrast-checker/index.native.js +2 -2
  667. package/build-module/components/contrast-checker/index.native.js.map +1 -1
  668. package/build-module/components/convert-to-group-buttons/toolbar.js +1 -0
  669. package/build-module/components/convert-to-group-buttons/toolbar.js.map +1 -1
  670. package/build-module/components/date-format-picker/index.js +8 -16
  671. package/build-module/components/date-format-picker/index.js.map +1 -1
  672. package/build-module/components/dimensions-tool/scale-tool.js +1 -0
  673. package/build-module/components/dimensions-tool/scale-tool.js.map +1 -1
  674. package/build-module/components/duotone/utils.js +1 -0
  675. package/build-module/components/duotone/utils.js.map +1 -1
  676. package/build-module/components/editor-styles/index.js +1 -0
  677. package/build-module/components/editor-styles/index.js.map +1 -1
  678. package/build-module/components/font-appearance-control/index.js +9 -0
  679. package/build-module/components/font-appearance-control/index.js.map +1 -1
  680. package/build-module/components/font-family/index.js +11 -1
  681. package/build-module/components/font-family/index.js.map +1 -1
  682. package/build-module/components/font-sizes/with-font-sizes.js +1 -0
  683. package/build-module/components/font-sizes/with-font-sizes.js.map +1 -1
  684. package/build-module/components/global-styles/border-panel.js +1 -0
  685. package/build-module/components/global-styles/border-panel.js.map +1 -1
  686. package/build-module/components/global-styles/color-panel.js +30 -10
  687. package/build-module/components/global-styles/color-panel.js.map +1 -1
  688. package/build-module/components/global-styles/color-panel.native.js +1 -0
  689. package/build-module/components/global-styles/color-panel.native.js.map +1 -1
  690. package/build-module/components/global-styles/dimensions-panel.js +1 -0
  691. package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
  692. package/build-module/components/global-styles/filters-panel.js +4 -3
  693. package/build-module/components/global-styles/filters-panel.js.map +1 -1
  694. package/build-module/components/global-styles/get-global-styles-changes.js +1 -0
  695. package/build-module/components/global-styles/get-global-styles-changes.js.map +1 -1
  696. package/build-module/components/global-styles/shadow-panel-components.js +1 -0
  697. package/build-module/components/global-styles/shadow-panel-components.js.map +1 -1
  698. package/build-module/components/global-styles/typography-utils.js +2 -1
  699. package/build-module/components/global-styles/typography-utils.js.map +1 -1
  700. package/build-module/components/global-styles/use-global-styles-context.native.js +1 -0
  701. package/build-module/components/global-styles/use-global-styles-context.native.js.map +1 -1
  702. package/build-module/components/global-styles/use-global-styles-output.js +2 -1
  703. package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
  704. package/build-module/components/global-styles/utils.js +1 -0
  705. package/build-module/components/global-styles/utils.js.map +1 -1
  706. package/build-module/components/grid/grid-visualizer.js +10 -0
  707. package/build-module/components/grid/grid-visualizer.js.map +1 -1
  708. package/build-module/components/grid/use-grid-layout-sync.js +1 -0
  709. package/build-module/components/grid/use-grid-layout-sync.js.map +1 -1
  710. package/build-module/components/grid/utils.js +13 -1
  711. package/build-module/components/grid/utils.js.map +1 -1
  712. package/build-module/components/iframe/get-compatibility-styles.js +1 -0
  713. package/build-module/components/iframe/get-compatibility-styles.js.map +1 -1
  714. package/build-module/components/iframe/index.js +1 -1
  715. package/build-module/components/iframe/index.js.map +1 -1
  716. package/build-module/components/image-editor/aspect-ratio-dropdown.js +1 -0
  717. package/build-module/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
  718. package/build-module/components/index.js +4 -4
  719. package/build-module/components/index.js.map +1 -1
  720. package/build-module/components/inner-blocks/use-block-context.js +1 -0
  721. package/build-module/components/inner-blocks/use-block-context.js.map +1 -1
  722. package/build-module/components/inner-blocks/use-inner-block-template-sync.js +12 -12
  723. package/build-module/components/inner-blocks/use-inner-block-template-sync.js.map +1 -1
  724. package/build-module/components/inserter/block-patterns-explorer/index.js +1 -1
  725. package/build-module/components/inserter/block-patterns-explorer/index.js.map +1 -1
  726. package/build-module/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js +1 -0
  727. package/build-module/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js.map +1 -1
  728. package/build-module/components/inserter/block-patterns-explorer/pattern-list.js +1 -0
  729. package/build-module/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
  730. package/build-module/components/inserter/block-patterns-tab/index.js +1 -1
  731. package/build-module/components/inserter/block-patterns-tab/index.js.map +1 -1
  732. package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js +5 -4
  733. package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js.map +1 -1
  734. package/build-module/components/inserter/block-patterns-tab/patterns-filter.js +2 -2
  735. package/build-module/components/inserter/block-patterns-tab/patterns-filter.js.map +1 -1
  736. package/build-module/components/inserter/block-patterns-tab/use-pattern-categories.js +1 -0
  737. package/build-module/components/inserter/block-patterns-tab/use-pattern-categories.js.map +1 -1
  738. package/build-module/components/inserter/block-types-tab.js +2 -1
  739. package/build-module/components/inserter/block-types-tab.js.map +1 -1
  740. package/build-module/components/inserter/block-types-tab.native.js +1 -0
  741. package/build-module/components/inserter/block-types-tab.native.js.map +1 -1
  742. package/build-module/components/inserter/category-tabs/index.js +2 -2
  743. package/build-module/components/inserter/category-tabs/index.js.map +1 -1
  744. package/build-module/components/inserter/hooks/use-block-type-impressions.native.js +1 -0
  745. package/build-module/components/inserter/hooks/use-block-type-impressions.native.js.map +1 -1
  746. package/build-module/components/inserter/hooks/use-patterns-state.js +1 -0
  747. package/build-module/components/inserter/hooks/use-patterns-state.js.map +1 -1
  748. package/build-module/components/inserter/index.js +7 -15
  749. package/build-module/components/inserter/index.js.map +1 -1
  750. package/build-module/components/inserter/index.native.js +1 -0
  751. package/build-module/components/inserter/index.native.js.map +1 -1
  752. package/build-module/components/inserter/media-tab/hooks.js +1 -0
  753. package/build-module/components/inserter/media-tab/hooks.js.map +1 -1
  754. package/build-module/components/inserter/media-tab/media-list.js +1 -0
  755. package/build-module/components/inserter/media-tab/media-list.js.map +1 -1
  756. package/build-module/components/inserter/media-tab/media-tab.js +1 -0
  757. package/build-module/components/inserter/media-tab/media-tab.js.map +1 -1
  758. package/build-module/components/inserter/menu.js +1 -0
  759. package/build-module/components/inserter/menu.js.map +1 -1
  760. package/build-module/components/inserter/mobile-tab-navigation.js +1 -0
  761. package/build-module/components/inserter/mobile-tab-navigation.js.map +1 -1
  762. package/build-module/components/inserter/quick-inserter.js +2 -13
  763. package/build-module/components/inserter/quick-inserter.js.map +1 -1
  764. package/build-module/components/inserter/search-items.js +1 -0
  765. package/build-module/components/inserter/search-items.js.map +1 -1
  766. package/build-module/components/inserter/search-results.js +1 -0
  767. package/build-module/components/inserter/search-results.js.map +1 -1
  768. package/build-module/components/inserter/tabs.native.js +1 -0
  769. package/build-module/components/inserter/tabs.native.js.map +1 -1
  770. package/build-module/components/inserter/utils.native.js +1 -0
  771. package/build-module/components/inserter/utils.native.js.map +1 -1
  772. package/build-module/components/inspector-controls/block-support-tools-panel.js +1 -0
  773. package/build-module/components/inspector-controls/block-support-tools-panel.js.map +1 -1
  774. package/build-module/components/inspector-controls/fill.js +1 -0
  775. package/build-module/components/inspector-controls/fill.js.map +1 -1
  776. package/build-module/components/inspector-controls/slot.js +3 -14
  777. package/build-module/components/inspector-controls/slot.js.map +1 -1
  778. package/build-module/components/inspector-controls-tabs/index.js +1 -0
  779. package/build-module/components/inspector-controls-tabs/index.js.map +1 -1
  780. package/build-module/components/inspector-controls-tabs/position-controls-panel.js +1 -0
  781. package/build-module/components/inspector-controls-tabs/position-controls-panel.js.map +1 -1
  782. package/build-module/components/inspector-popover-header/index.js +1 -0
  783. package/build-module/components/inspector-popover-header/index.js.map +1 -1
  784. package/build-module/components/justify-content-control/ui.js +1 -0
  785. package/build-module/components/justify-content-control/ui.js.map +1 -1
  786. package/build-module/components/keyboard-shortcuts/index.js +2 -2
  787. package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
  788. package/build-module/components/line-height-control/index.js +8 -0
  789. package/build-module/components/line-height-control/index.js.map +1 -1
  790. package/build-module/components/link-control/index.js +11 -0
  791. package/build-module/components/link-control/index.js.map +1 -1
  792. package/build-module/components/link-control/search-input.js +9 -0
  793. package/build-module/components/link-control/search-input.js.map +1 -1
  794. package/build-module/components/link-control/search-item.js +9 -0
  795. package/build-module/components/link-control/search-item.js.map +1 -1
  796. package/build-module/components/link-control/search-results.js +12 -1
  797. package/build-module/components/link-control/search-results.js.map +1 -1
  798. package/build-module/components/link-control/settings.js +1 -0
  799. package/build-module/components/link-control/settings.js.map +1 -1
  800. package/build-module/components/link-control/use-internal-value.js +1 -0
  801. package/build-module/components/link-control/use-internal-value.js.map +1 -1
  802. package/build-module/components/link-control/use-search-handler.js +1 -0
  803. package/build-module/components/link-control/use-search-handler.js.map +1 -1
  804. package/build-module/components/list-view/block-select-button.js +1 -0
  805. package/build-module/components/list-view/block-select-button.js.map +1 -1
  806. package/build-module/components/list-view/block.js +1 -0
  807. package/build-module/components/list-view/block.js.map +1 -1
  808. package/build-module/components/list-view/branch.js +1 -0
  809. package/build-module/components/list-view/branch.js.map +1 -1
  810. package/build-module/components/list-view/index.js +1 -0
  811. package/build-module/components/list-view/index.js.map +1 -1
  812. package/build-module/components/list-view/use-block-selection.js +1 -0
  813. package/build-module/components/list-view/use-block-selection.js.map +1 -1
  814. package/build-module/components/list-view/use-clipboard-handler.js +1 -0
  815. package/build-module/components/list-view/use-clipboard-handler.js.map +1 -1
  816. package/build-module/components/list-view/use-list-view-block-indexes.js +1 -0
  817. package/build-module/components/list-view/use-list-view-block-indexes.js.map +1 -1
  818. package/build-module/components/list-view/use-list-view-drop-zone.js +1 -0
  819. package/build-module/components/list-view/use-list-view-drop-zone.js.map +1 -1
  820. package/build-module/components/list-view/utils.js +1 -0
  821. package/build-module/components/list-view/utils.js.map +1 -1
  822. package/build-module/components/media-placeholder/index.js +4 -3
  823. package/build-module/components/media-placeholder/index.js.map +1 -1
  824. package/build-module/components/media-placeholder/index.native.js +1 -0
  825. package/build-module/components/media-placeholder/index.native.js.map +1 -1
  826. package/build-module/components/media-replace-flow/index.js +29 -28
  827. package/build-module/components/media-replace-flow/index.js.map +1 -1
  828. package/build-module/components/media-upload/index.native.js +1 -0
  829. package/build-module/components/media-upload/index.native.js.map +1 -1
  830. package/build-module/components/multi-selection-inspector/index.js +9 -25
  831. package/build-module/components/multi-selection-inspector/index.js.map +1 -1
  832. package/build-module/components/navigable-toolbar/index.js +1 -0
  833. package/build-module/components/navigable-toolbar/index.js.map +1 -1
  834. package/build-module/components/panel-color-settings/index.js +1 -0
  835. package/build-module/components/panel-color-settings/index.js.map +1 -1
  836. package/build-module/components/plain-text/index.js +34 -0
  837. package/build-module/components/plain-text/index.js.map +1 -1
  838. package/build-module/components/provider/index.js +62 -5
  839. package/build-module/components/provider/index.js.map +1 -1
  840. package/build-module/components/provider/use-block-sync.js +1 -0
  841. package/build-module/components/provider/use-block-sync.js.map +1 -1
  842. package/build-module/components/provider/use-media-upload-settings.js +22 -0
  843. package/build-module/components/provider/use-media-upload-settings.js.map +1 -0
  844. package/build-module/components/resolution-tool/index.js +3 -1
  845. package/build-module/components/resolution-tool/index.js.map +1 -1
  846. package/build-module/components/responsive-block-control/index.js +2 -1
  847. package/build-module/components/responsive-block-control/index.js.map +1 -1
  848. package/build-module/components/rich-text/embed-handler-picker.native.js +1 -0
  849. package/build-module/components/rich-text/embed-handler-picker.native.js.map +1 -1
  850. package/build-module/components/rich-text/event-listeners/before-input-rules.js +1 -0
  851. package/build-module/components/rich-text/event-listeners/before-input-rules.js.map +1 -1
  852. package/build-module/components/rich-text/event-listeners/delete.js +7 -1
  853. package/build-module/components/rich-text/event-listeners/delete.js.map +1 -1
  854. package/build-module/components/rich-text/event-listeners/index.js +1 -0
  855. package/build-module/components/rich-text/event-listeners/index.js.map +1 -1
  856. package/build-module/components/rich-text/event-listeners/input-rules.js +1 -0
  857. package/build-module/components/rich-text/event-listeners/input-rules.js.map +1 -1
  858. package/build-module/components/rich-text/event-listeners/paste-handler.js +1 -0
  859. package/build-module/components/rich-text/event-listeners/paste-handler.js.map +1 -1
  860. package/build-module/components/rich-text/file-paste-handler.native.js +1 -0
  861. package/build-module/components/rich-text/file-paste-handler.native.js.map +1 -1
  862. package/build-module/components/rich-text/format-edit.js +1 -0
  863. package/build-module/components/rich-text/format-edit.js.map +1 -1
  864. package/build-module/components/rich-text/format-toolbar/index.js +1 -0
  865. package/build-module/components/rich-text/format-toolbar/index.js.map +1 -1
  866. package/build-module/components/rich-text/index.js +2 -1
  867. package/build-module/components/rich-text/index.js.map +1 -1
  868. package/build-module/components/rich-text/index.native.js +1 -0
  869. package/build-module/components/rich-text/index.native.js.map +1 -1
  870. package/build-module/components/rich-text/multiline.js +1 -0
  871. package/build-module/components/rich-text/multiline.js.map +1 -1
  872. package/build-module/components/rich-text/native/format-edit.js +1 -0
  873. package/build-module/components/rich-text/native/format-edit.js.map +1 -1
  874. package/build-module/components/rich-text/native/get-format-colors.native.js +1 -0
  875. package/build-module/components/rich-text/native/get-format-colors.native.js.map +1 -1
  876. package/build-module/components/rich-text/native/index.native.js +1 -0
  877. package/build-module/components/rich-text/native/index.native.js.map +1 -1
  878. package/build-module/components/rich-text/native/toolbar-button-with-options.native.js +1 -0
  879. package/build-module/components/rich-text/native/toolbar-button-with-options.native.js.map +1 -1
  880. package/build-module/components/rich-text/native/use-format-types.js +1 -0
  881. package/build-module/components/rich-text/native/use-format-types.js.map +1 -1
  882. package/build-module/components/rich-text/use-format-types.js +1 -0
  883. package/build-module/components/rich-text/use-format-types.js.map +1 -1
  884. package/build-module/components/spacing-sizes-control/hooks/use-spacing-sizes.js +1 -0
  885. package/build-module/components/spacing-sizes-control/hooks/use-spacing-sizes.js.map +1 -1
  886. package/build-module/components/spacing-sizes-control/input-controls/axial.js +1 -0
  887. package/build-module/components/spacing-sizes-control/input-controls/axial.js.map +1 -1
  888. package/build-module/components/spacing-sizes-control/input-controls/separated.js +1 -0
  889. package/build-module/components/spacing-sizes-control/input-controls/separated.js.map +1 -1
  890. package/build-module/components/spacing-sizes-control/input-controls/single.js +1 -0
  891. package/build-module/components/spacing-sizes-control/input-controls/single.js.map +1 -1
  892. package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js +1 -0
  893. package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
  894. package/build-module/components/spacing-sizes-control/utils.js +1 -0
  895. package/build-module/components/spacing-sizes-control/utils.js.map +1 -1
  896. package/build-module/components/tabbed-sidebar/index.js +1 -0
  897. package/build-module/components/tabbed-sidebar/index.js.map +1 -1
  898. package/build-module/components/text-alignment-control/index.js +1 -0
  899. package/build-module/components/text-alignment-control/index.js.map +1 -1
  900. package/build-module/components/text-decoration-control/index.js +1 -0
  901. package/build-module/components/text-decoration-control/index.js.map +1 -1
  902. package/build-module/components/text-transform-control/index.js +1 -0
  903. package/build-module/components/text-transform-control/index.js.map +1 -1
  904. package/build-module/components/unsupported-block-details/index.native.js +1 -0
  905. package/build-module/components/unsupported-block-details/index.native.js.map +1 -1
  906. package/build-module/components/url-input/index.js +1 -0
  907. package/build-module/components/url-input/index.js.map +1 -1
  908. package/build-module/components/url-popover/image-url-input-ui.js +1 -0
  909. package/build-module/components/url-popover/image-url-input-ui.js.map +1 -1
  910. package/build-module/components/use-block-commands/index.js +1 -0
  911. package/build-module/components/use-block-commands/index.js.map +1 -1
  912. package/build-module/components/use-block-drop-zone/index.js +3 -1
  913. package/build-module/components/use-block-drop-zone/index.js.map +1 -1
  914. package/build-module/components/use-block-drop-zone/index.native.js +1 -0
  915. package/build-module/components/use-block-drop-zone/index.native.js.map +1 -1
  916. package/build-module/components/use-flash-editable-blocks/index.js +1 -0
  917. package/build-module/components/use-flash-editable-blocks/index.js.map +1 -1
  918. package/build-module/components/use-on-block-drop/index.js +1 -0
  919. package/build-module/components/use-on-block-drop/index.js.map +1 -1
  920. package/build-module/components/use-on-block-drop/index.native.js +1 -0
  921. package/build-module/components/use-on-block-drop/index.native.js.map +1 -1
  922. package/build-module/components/use-paste-styles/index.js +1 -0
  923. package/build-module/components/use-paste-styles/index.js.map +1 -1
  924. package/build-module/components/warning/index.js +3 -3
  925. package/build-module/components/warning/index.js.map +1 -1
  926. package/build-module/components/writing-flow/use-arrow-nav.js +1 -0
  927. package/build-module/components/writing-flow/use-arrow-nav.js.map +1 -1
  928. package/build-module/components/writing-flow/use-clipboard-handler.js +1 -0
  929. package/build-module/components/writing-flow/use-clipboard-handler.js.map +1 -1
  930. package/build-module/components/writing-flow/use-input.js +1 -0
  931. package/build-module/components/writing-flow/use-input.js.map +1 -1
  932. package/build-module/components/writing-flow/use-tab-nav.js +1 -0
  933. package/build-module/components/writing-flow/use-tab-nav.js.map +1 -1
  934. package/build-module/components/writing-flow/utils.js +1 -0
  935. package/build-module/components/writing-flow/utils.js.map +1 -1
  936. package/build-module/components/writing-mode-control/index.js +1 -0
  937. package/build-module/components/writing-mode-control/index.js.map +1 -1
  938. package/build-module/hooks/align.js +1 -0
  939. package/build-module/hooks/align.js.map +1 -1
  940. package/build-module/hooks/align.native.js +1 -0
  941. package/build-module/hooks/align.native.js.map +1 -1
  942. package/build-module/hooks/background.js +2 -0
  943. package/build-module/hooks/background.js.map +1 -1
  944. package/build-module/hooks/block-bindings.js +14 -12
  945. package/build-module/hooks/block-bindings.js.map +1 -1
  946. package/build-module/hooks/block-hooks.js +1 -0
  947. package/build-module/hooks/block-hooks.js.map +1 -1
  948. package/build-module/hooks/block-style-variation.js +1 -0
  949. package/build-module/hooks/block-style-variation.js.map +1 -1
  950. package/build-module/hooks/border.js +4 -3
  951. package/build-module/hooks/border.js.map +1 -1
  952. package/build-module/hooks/color.js +1 -1
  953. package/build-module/hooks/color.js.map +1 -1
  954. package/build-module/hooks/dimensions.js +2 -2
  955. package/build-module/hooks/dimensions.js.map +1 -1
  956. package/build-module/hooks/duotone.js +1 -0
  957. package/build-module/hooks/duotone.js.map +1 -1
  958. package/build-module/hooks/font-family.js +1 -1
  959. package/build-module/hooks/font-family.js.map +1 -1
  960. package/build-module/hooks/gap.js +2 -2
  961. package/build-module/hooks/gap.js.map +1 -1
  962. package/build-module/hooks/index.js +1 -1
  963. package/build-module/hooks/index.js.map +1 -1
  964. package/build-module/hooks/index.native.js +1 -0
  965. package/build-module/hooks/index.native.js.map +1 -1
  966. package/build-module/hooks/layout.js +1 -0
  967. package/build-module/hooks/layout.js.map +1 -1
  968. package/build-module/hooks/position.js +1 -0
  969. package/build-module/hooks/position.js.map +1 -1
  970. package/build-module/hooks/style.js +7 -6
  971. package/build-module/hooks/style.js.map +1 -1
  972. package/build-module/hooks/supports.js +8 -7
  973. package/build-module/hooks/supports.js.map +1 -1
  974. package/build-module/hooks/text-align.js +1 -0
  975. package/build-module/hooks/text-align.js.map +1 -1
  976. package/build-module/hooks/typography.js +7 -6
  977. package/build-module/hooks/typography.js.map +1 -1
  978. package/build-module/hooks/use-zoom-out.js +58 -15
  979. package/build-module/hooks/use-zoom-out.js.map +1 -1
  980. package/build-module/hooks/utils.js +2 -1
  981. package/build-module/hooks/utils.js.map +1 -1
  982. package/build-module/layouts/constrained.js +1 -0
  983. package/build-module/layouts/constrained.js.map +1 -1
  984. package/build-module/layouts/flex.js +1 -0
  985. package/build-module/layouts/flex.js.map +1 -1
  986. package/build-module/layouts/flow.js +1 -0
  987. package/build-module/layouts/flow.js.map +1 -1
  988. package/build-module/layouts/index.js +1 -0
  989. package/build-module/layouts/index.js.map +1 -1
  990. package/build-module/layouts/utils.js +1 -0
  991. package/build-module/layouts/utils.js.map +1 -1
  992. package/build-module/store/actions.js +1 -0
  993. package/build-module/store/actions.js.map +1 -1
  994. package/build-module/store/get-block-settings.js +1 -0
  995. package/build-module/store/get-block-settings.js.map +1 -1
  996. package/build-module/store/private-actions.js +2 -1
  997. package/build-module/store/private-actions.js.map +1 -1
  998. package/build-module/store/private-selectors.js +12 -1
  999. package/build-module/store/private-selectors.js.map +1 -1
  1000. package/build-module/store/reducer.js +94 -12
  1001. package/build-module/store/reducer.js.map +1 -1
  1002. package/build-module/store/selectors.js +19 -23
  1003. package/build-module/store/selectors.js.map +1 -1
  1004. package/build-module/store/utils.js +1 -0
  1005. package/build-module/store/utils.js.map +1 -1
  1006. package/build-module/utils/block-bindings.js +91 -0
  1007. package/build-module/utils/block-bindings.js.map +1 -1
  1008. package/build-module/utils/get-editor-region.js +1 -0
  1009. package/build-module/utils/get-editor-region.js.map +1 -1
  1010. package/build-module/utils/get-font-styles-and-weights.js +1 -0
  1011. package/build-module/utils/get-font-styles-and-weights.js.map +1 -1
  1012. package/build-module/utils/math.js +1 -0
  1013. package/build-module/utils/math.js.map +1 -1
  1014. package/build-module/utils/object.js +1 -0
  1015. package/build-module/utils/object.js.map +1 -1
  1016. package/build-module/utils/selection.js +1 -0
  1017. package/build-module/utils/selection.js.map +1 -1
  1018. package/build-module/utils/transform-styles/index.js +1 -0
  1019. package/build-module/utils/transform-styles/index.js.map +1 -1
  1020. package/build-style/content-rtl.css +1 -1
  1021. package/build-style/content.css +1 -1
  1022. package/build-style/style-rtl.css +53 -57
  1023. package/build-style/style.css +53 -57
  1024. package/package.json +33 -33
  1025. package/src/components/alignment-control/stories/aliginment-toolbar.story.js +2 -2
  1026. package/src/components/alignment-control/stories/index.story.js +2 -2
  1027. package/src/components/audio-player/index.native.js +2 -2
  1028. package/src/components/background-image-control/index.js +4 -0
  1029. package/src/components/background-image-control/style.scss +4 -2
  1030. package/src/components/block-alignment-matrix-control/README.md +29 -6
  1031. package/src/components/block-alignment-matrix-control/index.js +31 -0
  1032. package/src/components/block-alignment-matrix-control/stories/index.story.js +78 -0
  1033. package/src/components/block-card/README.md +7 -0
  1034. package/src/components/block-card/index.js +41 -12
  1035. package/src/components/block-card/stories/index.story.js +79 -0
  1036. package/src/components/block-card/style.scss +9 -1
  1037. package/src/components/block-edit/edit.js +218 -11
  1038. package/src/components/block-heading-level-dropdown/stories/index.story.js +61 -0
  1039. package/src/components/block-list/index.js +2 -7
  1040. package/src/components/block-list/use-block-props/index.js +3 -5
  1041. package/src/components/block-list/use-block-props/use-firefox-draggable-compatibility.js +64 -6
  1042. package/src/components/block-list/zoom-out-separator.js +30 -0
  1043. package/src/components/block-lock/modal.js +4 -6
  1044. package/src/components/block-parent-selector/index.js +1 -19
  1045. package/src/components/block-patterns-list/stories/fixtures.js +1 -0
  1046. package/src/components/block-settings-menu/block-settings-dropdown.js +17 -20
  1047. package/src/components/block-styles/utils.js +3 -3
  1048. package/src/components/block-title/stories/index.story.js +76 -0
  1049. package/src/components/block-toolbar/index.js +1 -0
  1050. package/src/components/block-tools/style.scss +1 -0
  1051. package/src/components/block-tools/zoom-out-mode-inserters.js +21 -3
  1052. package/src/components/border-radius-control/README.md +59 -0
  1053. package/src/components/border-radius-control/stories/index.story.js +58 -0
  1054. package/src/components/button-block-appender/index.js +2 -7
  1055. package/src/components/child-layout-control/index.js +14 -0
  1056. package/src/components/colors-gradients/dropdown.js +57 -8
  1057. package/src/components/colors-gradients/style.scss +26 -0
  1058. package/src/components/contrast-checker/index.native.js +2 -2
  1059. package/src/components/contrast-checker/stories/index.story.js +117 -0
  1060. package/src/components/date-format-picker/README.md +6 -13
  1061. package/src/components/date-format-picker/index.js +10 -17
  1062. package/src/components/date-format-picker/stories/index.story.js +69 -0
  1063. package/src/components/date-format-picker/style.scss +3 -1
  1064. package/src/components/default-block-appender/content.scss +1 -0
  1065. package/src/components/dimensions-tool/stories/aspect-ratio-tool.story.js +3 -2
  1066. package/src/components/dimensions-tool/stories/index.story.js +3 -2
  1067. package/src/components/dimensions-tool/stories/scale-tool.story.js +3 -2
  1068. package/src/components/dimensions-tool/stories/width-height-tool.story.js +3 -2
  1069. package/src/components/font-appearance-control/index.js +15 -0
  1070. package/src/components/font-family/README.md +1 -0
  1071. package/src/components/font-family/index.js +17 -1
  1072. package/src/components/font-family/stories/index.story.js +1 -0
  1073. package/src/components/global-styles/color-panel.js +29 -7
  1074. package/src/components/global-styles/filters-panel.js +3 -6
  1075. package/src/components/global-styles/test/use-global-styles-output.js +1 -1
  1076. package/src/components/global-styles/typography-utils.js +1 -1
  1077. package/src/components/global-styles/use-global-styles-output.js +1 -1
  1078. package/src/components/grid/grid-visualizer.js +11 -0
  1079. package/src/components/grid/utils.js +19 -1
  1080. package/src/components/iframe/index.js +1 -1
  1081. package/src/components/index.js +7 -4
  1082. package/src/components/inner-blocks/use-inner-block-template-sync.js +17 -10
  1083. package/src/components/inserter/block-patterns-explorer/index.js +2 -3
  1084. package/src/components/inserter/block-patterns-tab/index.js +3 -1
  1085. package/src/components/inserter/block-patterns-tab/pattern-category-previews.js +4 -4
  1086. package/src/components/inserter/block-patterns-tab/patterns-filter.js +2 -2
  1087. package/src/components/inserter/block-types-tab.js +1 -1
  1088. package/src/components/inserter/category-tabs/index.js +3 -2
  1089. package/src/components/inserter/index.js +1 -13
  1090. package/src/components/inserter/menu.js +2 -0
  1091. package/src/components/inserter/quick-inserter.js +2 -25
  1092. package/src/components/inspector-controls/slot.js +3 -22
  1093. package/src/components/keyboard-shortcuts/index.js +2 -2
  1094. package/src/components/line-height-control/README.md +1 -0
  1095. package/src/components/line-height-control/index.js +12 -0
  1096. package/src/components/line-height-control/stories/index.story.js +1 -0
  1097. package/src/components/line-height-control/test/index.js +7 -1
  1098. package/src/components/link-control/index.js +10 -0
  1099. package/src/components/link-control/search-input.js +9 -0
  1100. package/src/components/link-control/search-item.js +9 -0
  1101. package/src/components/link-control/search-results.js +12 -1
  1102. package/src/components/list-view/style.scss +10 -5
  1103. package/src/components/media-placeholder/index.js +3 -3
  1104. package/src/components/media-replace-flow/README.md +7 -0
  1105. package/src/components/media-replace-flow/index.js +28 -36
  1106. package/src/components/media-replace-flow/style.scss +6 -6
  1107. package/src/components/multi-selection-inspector/index.js +17 -27
  1108. package/src/components/multi-selection-inspector/style.scss +0 -12
  1109. package/src/components/plain-text/README.md +2 -2
  1110. package/src/components/plain-text/index.js +34 -0
  1111. package/src/components/plain-text/stories/index.story.js +75 -0
  1112. package/src/components/provider/index.js +81 -4
  1113. package/src/components/provider/use-media-upload-settings.js +25 -0
  1114. package/src/components/resolution-tool/index.js +2 -0
  1115. package/src/components/resolution-tool/stories/index.story.js +37 -9
  1116. package/src/components/responsive-block-control/index.js +1 -1
  1117. package/src/components/rich-text/event-listeners/delete.js +6 -1
  1118. package/src/components/rich-text/index.js +1 -1
  1119. package/src/components/spacing-sizes-control/style.scss +0 -29
  1120. package/src/components/text-alignment-control/README.md +49 -0
  1121. package/src/components/text-alignment-control/stories/index.story.js +56 -18
  1122. package/src/components/text-decoration-control/README.md +0 -1
  1123. package/src/components/text-decoration-control/stories/index.story.js +51 -16
  1124. package/src/components/text-transform-control/README.md +3 -4
  1125. package/src/components/text-transform-control/stories/index.story.js +53 -16
  1126. package/src/components/use-block-drop-zone/index.js +8 -1
  1127. package/src/components/warning/index.js +3 -4
  1128. package/src/components/warning/stories/index.story.js +86 -0
  1129. package/src/components/warning/test/index.js +3 -1
  1130. package/src/components/writing-mode-control/stories/index.story.js +56 -0
  1131. package/src/hooks/background.js +6 -0
  1132. package/src/hooks/block-bindings.js +17 -18
  1133. package/src/hooks/border.js +9 -3
  1134. package/src/hooks/color.js +1 -1
  1135. package/src/hooks/dimensions.js +2 -2
  1136. package/src/hooks/font-family.js +1 -1
  1137. package/src/hooks/gap.js +2 -2
  1138. package/src/hooks/index.js +0 -1
  1139. package/src/hooks/index.native.js +1 -0
  1140. package/src/hooks/style.js +12 -6
  1141. package/src/hooks/supports.js +7 -7
  1142. package/src/hooks/test/font-size.js +15 -12
  1143. package/src/hooks/test/style.js +2 -1
  1144. package/src/hooks/typography.js +6 -6
  1145. package/src/hooks/use-zoom-out.js +56 -16
  1146. package/src/hooks/utils.js +1 -1
  1147. package/src/store/private-actions.js +1 -0
  1148. package/src/store/private-selectors.js +15 -5
  1149. package/src/store/reducer.js +112 -19
  1150. package/src/store/selectors.js +32 -32
  1151. package/src/store/test/private-selectors.js +53 -9
  1152. package/src/store/test/reducer.js +172 -166
  1153. package/src/store/test/selectors.js +24 -1
  1154. package/src/utils/block-bindings.js +95 -0
  1155. package/tsconfig.json +2 -5
  1156. package/tsconfig.tsbuildinfo +1 -1
  1157. package/build/hooks/use-bindings-attributes.js +0 -261
  1158. package/build/hooks/use-bindings-attributes.js.map +0 -1
  1159. package/build-module/hooks/use-bindings-attributes.js +0 -252
  1160. package/build-module/hooks/use-bindings-attributes.js.map +0 -1
  1161. package/src/hooks/use-bindings-attributes.js +0 -322
@@ -2,6 +2,64 @@
2
2
  * WordPress dependencies
3
3
  */
4
4
  import { useRefEffect } from '@wordpress/compose';
5
+ const nodesByDocument = new Map();
6
+ function add(doc, node) {
7
+ let set = nodesByDocument.get(doc);
8
+ if (!set) {
9
+ set = new Set();
10
+ nodesByDocument.set(doc, set);
11
+ doc.addEventListener('pointerdown', down);
12
+ }
13
+ set.add(node);
14
+ }
15
+ function remove(doc, node) {
16
+ const set = nodesByDocument.get(doc);
17
+ if (set) {
18
+ set.delete(node);
19
+ restore(node);
20
+ if (set.size === 0) {
21
+ nodesByDocument.delete(doc);
22
+ doc.removeEventListener('pointerdown', down);
23
+ }
24
+ }
25
+ }
26
+ function restore(node) {
27
+ const prevDraggable = node.getAttribute('data-draggable');
28
+ if (prevDraggable) {
29
+ node.removeAttribute('data-draggable');
30
+ // Only restore if `draggable` is still removed. It could have been
31
+ // changed by React in the meantime.
32
+ if (prevDraggable === 'true' && !node.getAttribute('draggable')) {
33
+ node.setAttribute('draggable', 'true');
34
+ }
35
+ }
36
+ }
37
+ function down(event) {
38
+ const {
39
+ target
40
+ } = event;
41
+ const {
42
+ ownerDocument,
43
+ isContentEditable
44
+ } = target;
45
+ const nodes = nodesByDocument.get(ownerDocument);
46
+ if (isContentEditable) {
47
+ // Whenever an editable element is clicked, check which draggable
48
+ // blocks contain this element, and temporarily disable draggability.
49
+ for (const node of nodes) {
50
+ if (node.getAttribute('draggable') === 'true' && node.contains(target)) {
51
+ node.removeAttribute('draggable');
52
+ node.setAttribute('data-draggable', 'true');
53
+ }
54
+ }
55
+ } else {
56
+ // Whenever a non-editable element is clicked, re-enable draggability
57
+ // for any blocks that were previously disabled.
58
+ for (const node of nodes) {
59
+ restore(node);
60
+ }
61
+ }
62
+ }
5
63
 
6
64
  /**
7
65
  * In Firefox, the `draggable` and `contenteditable` attributes don't play well
@@ -13,15 +71,9 @@ import { useRefEffect } from '@wordpress/compose';
13
71
  */
14
72
  export function useFirefoxDraggableCompatibility() {
15
73
  return useRefEffect(node => {
16
- function onDown(event) {
17
- node.draggable = !event.target.isContentEditable;
18
- }
19
- const {
20
- ownerDocument
21
- } = node;
22
- ownerDocument.addEventListener('pointerdown', onDown);
74
+ add(node.ownerDocument, node);
23
75
  return () => {
24
- ownerDocument.removeEventListener('pointerdown', onDown);
76
+ remove(node.ownerDocument, node);
25
77
  };
26
78
  }, []);
27
79
  }
@@ -1 +1 @@
1
- {"version":3,"names":["useRefEffect","useFirefoxDraggableCompatibility","node","onDown","event","draggable","target","isContentEditable","ownerDocument","addEventListener","removeEventListener"],"sources":["@wordpress/block-editor/src/components/block-list/use-block-props/use-firefox-draggable-compatibility.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useRefEffect } from '@wordpress/compose';\n\n/**\n * In Firefox, the `draggable` and `contenteditable` attributes don't play well\n * together. When `contenteditable` is within a `draggable` element, selection\n * doesn't get set in the right place. The only solution is to temporarily\n * remove the `draggable` attribute clicking inside `contenteditable` elements.\n *\n * @return {Function} Cleanup function.\n */\nexport function useFirefoxDraggableCompatibility() {\n\treturn useRefEffect( ( node ) => {\n\t\tfunction onDown( event ) {\n\t\t\tnode.draggable = ! event.target.isContentEditable;\n\t\t}\n\t\tconst { ownerDocument } = node;\n\t\townerDocument.addEventListener( 'pointerdown', onDown );\n\t\treturn () => {\n\t\t\townerDocument.removeEventListener( 'pointerdown', onDown );\n\t\t};\n\t}, [] );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,YAAY,QAAQ,oBAAoB;;AAEjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,gCAAgCA,CAAA,EAAG;EAClD,OAAOD,YAAY,CAAIE,IAAI,IAAM;IAChC,SAASC,MAAMA,CAAEC,KAAK,EAAG;MACxBF,IAAI,CAACG,SAAS,GAAG,CAAED,KAAK,CAACE,MAAM,CAACC,iBAAiB;IAClD;IACA,MAAM;MAAEC;IAAc,CAAC,GAAGN,IAAI;IAC9BM,aAAa,CAACC,gBAAgB,CAAE,aAAa,EAAEN,MAAO,CAAC;IACvD,OAAO,MAAM;MACZK,aAAa,CAACE,mBAAmB,CAAE,aAAa,EAAEP,MAAO,CAAC;IAC3D,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;AACR","ignoreList":[]}
1
+ {"version":3,"names":["useRefEffect","nodesByDocument","Map","add","doc","node","set","get","Set","addEventListener","down","remove","delete","restore","size","removeEventListener","prevDraggable","getAttribute","removeAttribute","setAttribute","event","target","ownerDocument","isContentEditable","nodes","contains","useFirefoxDraggableCompatibility"],"sources":["@wordpress/block-editor/src/components/block-list/use-block-props/use-firefox-draggable-compatibility.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useRefEffect } from '@wordpress/compose';\n\nconst nodesByDocument = new Map();\n\nfunction add( doc, node ) {\n\tlet set = nodesByDocument.get( doc );\n\tif ( ! set ) {\n\t\tset = new Set();\n\t\tnodesByDocument.set( doc, set );\n\t\tdoc.addEventListener( 'pointerdown', down );\n\t}\n\tset.add( node );\n}\n\nfunction remove( doc, node ) {\n\tconst set = nodesByDocument.get( doc );\n\tif ( set ) {\n\t\tset.delete( node );\n\t\trestore( node );\n\t\tif ( set.size === 0 ) {\n\t\t\tnodesByDocument.delete( doc );\n\t\t\tdoc.removeEventListener( 'pointerdown', down );\n\t\t}\n\t}\n}\n\nfunction restore( node ) {\n\tconst prevDraggable = node.getAttribute( 'data-draggable' );\n\tif ( prevDraggable ) {\n\t\tnode.removeAttribute( 'data-draggable' );\n\t\t// Only restore if `draggable` is still removed. It could have been\n\t\t// changed by React in the meantime.\n\t\tif ( prevDraggable === 'true' && ! node.getAttribute( 'draggable' ) ) {\n\t\t\tnode.setAttribute( 'draggable', 'true' );\n\t\t}\n\t}\n}\n\nfunction down( event ) {\n\tconst { target } = event;\n\tconst { ownerDocument, isContentEditable } = target;\n\tconst nodes = nodesByDocument.get( ownerDocument );\n\n\tif ( isContentEditable ) {\n\t\t// Whenever an editable element is clicked, check which draggable\n\t\t// blocks contain this element, and temporarily disable draggability.\n\t\tfor ( const node of nodes ) {\n\t\t\tif (\n\t\t\t\tnode.getAttribute( 'draggable' ) === 'true' &&\n\t\t\t\tnode.contains( target )\n\t\t\t) {\n\t\t\t\tnode.removeAttribute( 'draggable' );\n\t\t\t\tnode.setAttribute( 'data-draggable', 'true' );\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// Whenever a non-editable element is clicked, re-enable draggability\n\t\t// for any blocks that were previously disabled.\n\t\tfor ( const node of nodes ) {\n\t\t\trestore( node );\n\t\t}\n\t}\n}\n\n/**\n * In Firefox, the `draggable` and `contenteditable` attributes don't play well\n * together. When `contenteditable` is within a `draggable` element, selection\n * doesn't get set in the right place. The only solution is to temporarily\n * remove the `draggable` attribute clicking inside `contenteditable` elements.\n *\n * @return {Function} Cleanup function.\n */\nexport function useFirefoxDraggableCompatibility() {\n\treturn useRefEffect( ( node ) => {\n\t\tadd( node.ownerDocument, node );\n\t\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AAE,MAAO,CAAC;IACzC;EACD;AACD;AAEA,SAAST,IAAIA,CAAEU,KAAK,EAAG;EACtB,MAAM;IAAEC;EAAO,CAAC,GAAGD,KAAK;EACxB,MAAM;IAAEE,aAAa;IAAEC;EAAkB,CAAC,GAAGF,MAAM;EACnD,MAAMG,KAAK,GAAGvB,eAAe,CAACM,GAAG,CAAEe,aAAc,CAAC;EAElD,IAAKC,iBAAiB,EAAG;IACxB;IACA;IACA,KAAM,MAAMlB,IAAI,IAAImB,KAAK,EAAG;MAC3B,IACCnB,IAAI,CAACY,YAAY,CAAE,WAAY,CAAC,KAAK,MAAM,IAC3CZ,IAAI,CAACoB,QAAQ,CAAEJ,MAAO,CAAC,EACtB;QACDhB,IAAI,CAACa,eAAe,CAAE,WAAY,CAAC;QACnCb,IAAI,CAACc,YAAY,CAAE,gBAAgB,EAAE,MAAO,CAAC;MAC9C;IACD;EACD,CAAC,MAAM;IACN;IACA;IACA,KAAM,MAAMd,IAAI,IAAImB,KAAK,EAAG;MAC3BX,OAAO,CAAER,IAAK,CAAC;IAChB;EACD;AACD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASqB,gCAAgCA,CAAA,EAAG;EAClD,OAAO1B,YAAY,CAAIK,IAAI,IAAM;IAChCF,GAAG,CAAEE,IAAI,CAACiB,aAAa,EAAEjB,IAAK,CAAC;IAC/B,OAAO,MAAM;MACZM,MAAM,CAAEN,IAAI,CAACiB,aAAa,EAAEjB,IAAK,CAAC;IACnC,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;AACR","ignoreList":[]}
@@ -1,3 +1,4 @@
1
+ /* wp:polyfill */
1
2
  /**
2
3
  * WordPress dependencies
3
4
  */
@@ -1 +1 @@
1
- {"version":3,"names":["useEffect","useRef","focus","isFormElement","isTextField","placeCaretAtHorizontalEdge","useSelect","isInsideRootBlock","store","blockEditorStore","unlock","useFocusFirstElement","clientId","initialPosition","ref","isBlockSelected","isMultiSelecting","isZoomOut","undefined","current","ownerDocument","activeElement","textInputs","tabbable","find","filter","node","isReverse","target","length","getAttribute","focusElement","findNext"],"sources":["@wordpress/block-editor/src/components/block-list/use-block-props/use-focus-first-element.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useEffect, useRef } from '@wordpress/element';\nimport {\n\tfocus,\n\tisFormElement,\n\tisTextField,\n\tplaceCaretAtHorizontalEdge,\n} from '@wordpress/dom';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { isInsideRootBlock } from '../../../utils/dom';\nimport { store as blockEditorStore } from '../../../store';\nimport { unlock } from '../../../lock-unlock';\n\n/** @typedef {import('@wordpress/element').RefObject} RefObject */\n\n/**\n * Transitions focus to the block or inner tabbable when the block becomes\n * selected and an initial position is set.\n *\n * @param {string} clientId Block client ID.\n *\n * @return {RefObject} React ref with the block element.\n */\nexport function useFocusFirstElement( { clientId, initialPosition } ) {\n\tconst ref = useRef();\n\tconst { isBlockSelected, isMultiSelecting, isZoomOut } = unlock(\n\t\tuseSelect( blockEditorStore )\n\t);\n\n\tuseEffect( () => {\n\t\t// Check if the block is still selected at the time this effect runs.\n\t\tif (\n\t\t\t! isBlockSelected( clientId ) ||\n\t\t\tisMultiSelecting() ||\n\t\t\tisZoomOut()\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( initialPosition === undefined || initialPosition === null ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! ref.current ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { ownerDocument } = ref.current;\n\n\t\t// Do not focus the block if it already contains the active element.\n\t\tif ( isInsideRootBlock( ref.current, ownerDocument.activeElement ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Find all tabbables within node.\n\t\tconst textInputs = focus.tabbable\n\t\t\t.find( ref.current )\n\t\t\t.filter( ( node ) => isTextField( node ) );\n\n\t\t// If reversed (e.g. merge via backspace), use the last in the set of\n\t\t// tabbables.\n\t\tconst isReverse = -1 === initialPosition;\n\t\tconst target =\n\t\t\ttextInputs[ isReverse ? textInputs.length - 1 : 0 ] || ref.current;\n\n\t\tif ( ! isInsideRootBlock( ref.current, target ) ) {\n\t\t\tref.current.focus();\n\t\t\treturn;\n\t\t}\n\n\t\t// Check to see if element is focussable before a generic caret insert.\n\t\tif ( ! ref.current.getAttribute( 'contenteditable' ) ) {\n\t\t\tconst focusElement = focus.tabbable.findNext( ref.current );\n\t\t\t// Make sure focusElement is valid, contained in the same block, and a form field.\n\t\t\tif (\n\t\t\t\tfocusElement &&\n\t\t\t\tisInsideRootBlock( ref.current, focusElement ) &&\n\t\t\t\tisFormElement( focusElement )\n\t\t\t) {\n\t\t\t\tfocusElement.focus();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tplaceCaretAtHorizontalEdge( target, isReverse );\n\t}, [ initialPosition, clientId ] );\n\n\treturn ref;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,EAAEC,MAAM,QAAQ,oBAAoB;AACtD,SACCC,KAAK,EACLC,aAAa,EACbC,WAAW,EACXC,0BAA0B,QACpB,gBAAgB;AACvB,SAASC,SAAS,QAAQ,iBAAiB;;AAE3C;AACA;AACA;AACA,SAASC,iBAAiB,QAAQ,oBAAoB;AACtD,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,gBAAgB;AAC1D,SAASC,MAAM,QAAQ,sBAAsB;;AAE7C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,oBAAoBA,CAAE;EAAEC,QAAQ;EAAEC;AAAgB,CAAC,EAAG;EACrE,MAAMC,GAAG,GAAGb,MAAM,CAAC,CAAC;EACpB,MAAM;IAAEc,eAAe;IAAEC,gBAAgB;IAAEC;EAAU,CAAC,GAAGP,MAAM,CAC9DJ,SAAS,CAAEG,gBAAiB,CAC7B,CAAC;EAEDT,SAAS,CAAE,MAAM;IAChB;IACA,IACC,CAAEe,eAAe,CAAEH,QAAS,CAAC,IAC7BI,gBAAgB,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AU,CAAC;EAChD,CAAC,EAAE,CAAEd,eAAe,EAAED,QAAQ,CAAG,CAAC;EAElC,OAAOE,GAAG;AACX","ignoreList":[]}
1
+ {"version":3,"names":["useEffect","useRef","focus","isFormElement","isTextField","placeCaretAtHorizontalEdge","useSelect","isInsideRootBlock","store","blockEditorStore","unlock","useFocusFirstElement","clientId","initialPosition","ref","isBlockSelected","isMultiSelecting","isZoomOut","undefined","current","ownerDocument","activeElement","textInputs","tabbable","find","filter","node","isReverse","target","length","getAttribute","focusElement","findNext"],"sources":["@wordpress/block-editor/src/components/block-list/use-block-props/use-focus-first-element.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useEffect, useRef } from '@wordpress/element';\nimport {\n\tfocus,\n\tisFormElement,\n\tisTextField,\n\tplaceCaretAtHorizontalEdge,\n} from '@wordpress/dom';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { isInsideRootBlock } from '../../../utils/dom';\nimport { store as blockEditorStore } from '../../../store';\nimport { unlock } from '../../../lock-unlock';\n\n/** @typedef {import('@wordpress/element').RefObject} RefObject */\n\n/**\n * Transitions focus to the block or inner tabbable when the block becomes\n * selected and an initial position is set.\n *\n * @param {string} clientId Block client ID.\n *\n * @return {RefObject} React ref with the block element.\n */\nexport function useFocusFirstElement( { clientId, initialPosition } ) {\n\tconst ref = useRef();\n\tconst { isBlockSelected, isMultiSelecting, isZoomOut } = unlock(\n\t\tuseSelect( blockEditorStore )\n\t);\n\n\tuseEffect( () => {\n\t\t// Check if the block is still selected at the time this effect runs.\n\t\tif (\n\t\t\t! isBlockSelected( clientId ) ||\n\t\t\tisMultiSelecting() ||\n\t\t\tisZoomOut()\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( initialPosition === undefined || initialPosition === null ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! ref.current ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { ownerDocument } = ref.current;\n\n\t\t// Do not focus the block if it already contains the active element.\n\t\tif ( isInsideRootBlock( ref.current, ownerDocument.activeElement ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Find all tabbables within node.\n\t\tconst textInputs = focus.tabbable\n\t\t\t.find( ref.current )\n\t\t\t.filter( ( node ) => isTextField( node ) );\n\n\t\t// If reversed (e.g. merge via backspace), use the last in the set of\n\t\t// tabbables.\n\t\tconst isReverse = -1 === initialPosition;\n\t\tconst target =\n\t\t\ttextInputs[ isReverse ? textInputs.length - 1 : 0 ] || ref.current;\n\n\t\tif ( ! isInsideRootBlock( ref.current, target ) ) {\n\t\t\tref.current.focus();\n\t\t\treturn;\n\t\t}\n\n\t\t// Check to see if element is focussable before a generic caret insert.\n\t\tif ( ! ref.current.getAttribute( 'contenteditable' ) ) {\n\t\t\tconst focusElement = focus.tabbable.findNext( ref.current );\n\t\t\t// Make sure focusElement is valid, contained in the same block, and a form field.\n\t\t\tif (\n\t\t\t\tfocusElement &&\n\t\t\t\tisInsideRootBlock( ref.current, focusElement ) &&\n\t\t\t\tisFormElement( focusElement )\n\t\t\t) {\n\t\t\t\tfocusElement.focus();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tplaceCaretAtHorizontalEdge( target, isReverse );\n\t}, [ initialPosition, clientId ] );\n\n\treturn ref;\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,SAAS,EAAEC,MAAM,QAAQ,oBAAoB;AACtD,SACCC,KAAK,EACLC,aAAa,EACbC,WAAW,EACXC,0BAA0B,QACpB,gBAAgB;AACvB,SAASC,SAAS,QAAQ,iBAAiB;;AAE3C;AACA;AACA;AACA,SAASC,iBAAiB,QAAQ,oBAAoB;AACtD,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,gBAAgB;AAC1D,SAASC,MAAM,QAAQ,sBAAsB;;AAE7C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,oBAAoBA,CAAE;EAAEC,QAAQ;EAAEC;AAAgB,CAAC,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QAAQ,CAAElB,GAAG,CAACK,OAAQ,CAAC;MAC3D;MACA,IACCY,YAAY,IACZxB,iBAAiB,CAAEO,GAAG,CAACK,OAAO,EAAEY,YAAa,CAAC,IAC9C5B,aAAa,CAAE4B,YAAa,CAAC,EAC5B;QACDA,YAAY,CAAC7B,KAAK,CAAC,CAAC;QACpB;MACD;IACD;IACAG,0BAA0B,CAAEuB,MAAM,EAAED,SAAU,CAAC;EAChD,CAAC,EAAE,CAAEd,eAAe,EAAED,QAAQ,CAAG,CAAC;EAElC,OAAOE,GAAG;AACX","ignoreList":[]}
@@ -1,3 +1,4 @@
1
+ /* wp:polyfill */
1
2
  /**
2
3
  * WordPress dependencies
3
4
  */
@@ -1 +1 @@
1
- {"version":3,"names":["useRefEffect","useSelect","useDispatch","useContext","isRTL","store","blockEditorStore","InsertionPointOpenRef","unlock","useInBetweenInserter","openRef","isInBetweenInserterDisabled","select","getSettings","isDistractionFree","isZoomOut","getBlockListSettings","getBlockIndex","isMultiSelecting","getSelectedBlockClientIds","getTemplateLock","__unstableIsWithinBlockOverlay","getBlockEditingMode","getBlockName","getBlockAttributes","getParentSectionBlock","showInsertionPoint","hideInsertionPoint","node","onMouseMove","event","undefined","current","target","nodeType","TEXT_NODE","classList","contains","rootClientId","blockElement","getAttribute","closest","layout","isManualPlacement","blockListSettings","orientation","captureToolbars","__experimentalCaptureToolbars","offsetTop","clientY","offsetLeft","clientX","children","Array","from","element","find","blockEl","blockElRect","getBoundingClientRect","top","right","left","id","firstElementChild","clientId","slice","length","includes","hasFixedToolbar","elementRect","bottom","index","__unstableWithInserter","addEventListener","removeEventListener"],"sources":["@wordpress/block-editor/src/components/block-list/use-in-between-inserter.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useRefEffect } from '@wordpress/compose';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useContext } from '@wordpress/element';\nimport { isRTL } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\nimport { InsertionPointOpenRef } from '../block-tools/insertion-point';\nimport { unlock } from '../../lock-unlock';\n\nexport function useInBetweenInserter() {\n\tconst openRef = useContext( InsertionPointOpenRef );\n\tconst isInBetweenInserterDisabled = useSelect(\n\t\t( select ) =>\n\t\t\tselect( blockEditorStore ).getSettings().isDistractionFree ||\n\t\t\tunlock( select( blockEditorStore ) ).isZoomOut(),\n\t\t[]\n\t);\n\tconst {\n\t\tgetBlockListSettings,\n\t\tgetBlockIndex,\n\t\tisMultiSelecting,\n\t\tgetSelectedBlockClientIds,\n\t\tgetSettings,\n\t\tgetTemplateLock,\n\t\t__unstableIsWithinBlockOverlay,\n\t\tgetBlockEditingMode,\n\t\tgetBlockName,\n\t\tgetBlockAttributes,\n\t\tgetParentSectionBlock,\n\t} = unlock( useSelect( blockEditorStore ) );\n\tconst { showInsertionPoint, hideInsertionPoint } =\n\t\tuseDispatch( blockEditorStore );\n\n\treturn useRefEffect(\n\t\t( node ) => {\n\t\t\tif ( isInBetweenInserterDisabled ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfunction onMouseMove( event ) {\n\t\t\t\t// openRef is the reference to the insertion point between blocks.\n\t\t\t\t// If the reference is not set or the insertion point is already open, return.\n\t\t\t\tif ( openRef === undefined || openRef.current ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Ignore text nodes sometimes detected in FireFox.\n\t\t\t\tif ( event.target.nodeType === event.target.TEXT_NODE ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( isMultiSelecting() ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\t! event.target.classList.contains(\n\t\t\t\t\t\t'block-editor-block-list__layout'\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\thideInsertionPoint();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tlet rootClientId;\n\t\t\t\tif (\n\t\t\t\t\t! event.target.classList.contains( 'is-root-container' )\n\t\t\t\t) {\n\t\t\t\t\tconst blockElement = !! event.target.getAttribute(\n\t\t\t\t\t\t'data-block'\n\t\t\t\t\t)\n\t\t\t\t\t\t? event.target\n\t\t\t\t\t\t: event.target.closest( '[data-block]' );\n\t\t\t\t\trootClientId = blockElement.getAttribute( 'data-block' );\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\tgetTemplateLock( rootClientId ) ||\n\t\t\t\t\tgetBlockEditingMode( rootClientId ) === 'disabled' ||\n\t\t\t\t\tgetBlockName( rootClientId ) === 'core/block' ||\n\t\t\t\t\t( rootClientId &&\n\t\t\t\t\t\tgetBlockAttributes( rootClientId ).layout\n\t\t\t\t\t\t\t?.isManualPlacement )\n\t\t\t\t) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst blockListSettings = getBlockListSettings( rootClientId );\n\t\t\t\tconst orientation =\n\t\t\t\t\tblockListSettings?.orientation || 'vertical';\n\t\t\t\tconst captureToolbars =\n\t\t\t\t\t!! blockListSettings?.__experimentalCaptureToolbars;\n\t\t\t\tconst offsetTop = event.clientY;\n\t\t\t\tconst offsetLeft = event.clientX;\n\n\t\t\t\tconst children = Array.from( event.target.children );\n\t\t\t\tlet element = children.find( ( blockEl ) => {\n\t\t\t\t\tconst blockElRect = blockEl.getBoundingClientRect();\n\t\t\t\t\treturn (\n\t\t\t\t\t\t( blockEl.classList.contains( 'wp-block' ) &&\n\t\t\t\t\t\t\torientation === 'vertical' &&\n\t\t\t\t\t\t\tblockElRect.top > offsetTop ) ||\n\t\t\t\t\t\t( blockEl.classList.contains( 'wp-block' ) &&\n\t\t\t\t\t\t\torientation === 'horizontal' &&\n\t\t\t\t\t\t\t( isRTL()\n\t\t\t\t\t\t\t\t? blockElRect.right < offsetLeft\n\t\t\t\t\t\t\t\t: blockElRect.left > offsetLeft ) )\n\t\t\t\t\t);\n\t\t\t\t} );\n\n\t\t\t\tif ( ! element ) {\n\t\t\t\t\thideInsertionPoint();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// The block may be in an alignment wrapper, so check the first direct\n\t\t\t\t// child if the element has no ID.\n\t\t\t\tif ( ! element.id ) {\n\t\t\t\t\telement = element.firstElementChild;\n\n\t\t\t\t\tif ( ! element ) {\n\t\t\t\t\t\thideInsertionPoint();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Don't show the insertion point if a parent block has an \"overlay\"\n\t\t\t\t// See https://github.com/WordPress/gutenberg/pull/34012#pullrequestreview-727762337\n\t\t\t\tconst clientId = element.id.slice( 'block-'.length );\n\t\t\t\tif (\n\t\t\t\t\t! clientId ||\n\t\t\t\t\t__unstableIsWithinBlockOverlay( clientId ) ||\n\t\t\t\t\t!! getParentSectionBlock( clientId )\n\t\t\t\t) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Don't show the inserter if the following conditions are met,\n\t\t\t\t// as it conflicts with the block toolbar:\n\t\t\t\t// 1. when hovering above or inside selected block(s)\n\t\t\t\t// 2. when the orientation is vertical\n\t\t\t\t// 3. when the __experimentalCaptureToolbars is not enabled\n\t\t\t\t// 4. when the Top Toolbar is not disabled\n\t\t\t\tif (\n\t\t\t\t\tgetSelectedBlockClientIds().includes( clientId ) &&\n\t\t\t\t\torientation === 'vertical' &&\n\t\t\t\t\t! captureToolbars &&\n\t\t\t\t\t! getSettings().hasFixedToolbar\n\t\t\t\t) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst elementRect = element.getBoundingClientRect();\n\n\t\t\t\tif (\n\t\t\t\t\t( orientation === 'horizontal' &&\n\t\t\t\t\t\t( event.clientY > elementRect.bottom ||\n\t\t\t\t\t\t\tevent.clientY < elementRect.top ) ) ||\n\t\t\t\t\t( orientation === 'vertical' &&\n\t\t\t\t\t\t( event.clientX > elementRect.right ||\n\t\t\t\t\t\t\tevent.clientX < elementRect.left ) )\n\t\t\t\t) {\n\t\t\t\t\thideInsertionPoint();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst index = getBlockIndex( clientId );\n\n\t\t\t\t// Don't show the in-between inserter before the first block in\n\t\t\t\t// the list (preserves the original behaviour).\n\t\t\t\tif ( index === 0 ) {\n\t\t\t\t\thideInsertionPoint();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tshowInsertionPoint( rootClientId, index, {\n\t\t\t\t\t__unstableWithInserter: true,\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tnode.addEventListener( 'mousemove', onMouseMove );\n\n\t\t\treturn () => {\n\t\t\t\tnode.removeEventListener( 'mousemove', onMouseMove );\n\t\t\t};\n\t\t},\n\t\t[\n\t\t\topenRef,\n\t\t\tgetBlockListSettings,\n\t\t\tgetBlockIndex,\n\t\t\tisMultiSelecting,\n\t\t\tshowInsertionPoint,\n\t\t\thideInsertionPoint,\n\t\t\tgetSelectedBlockClientIds,\n\t\t\tisInBetweenInserterDisabled,\n\t\t]\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,YAAY,QAAQ,oBAAoB;AACjD,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,UAAU,QAAQ,oBAAoB;AAC/C,SAASC,KAAK,QAAQ,iBAAiB;;AAEvC;AACA;AACA;AACA,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;AACvD,SAASC,qBAAqB,QAAQ,gCAAgC;AACtE,SAASC,MAAM,QAAQ,mBAAmB;AAE1C,OAAO,SAASC,oBAAoBA,CAAA,EAAG;EACtC,MAAMC,OAAO,GAAGP,UAAU,CAAEI,qBAAsB,CAAC;EACnD,MAAMI,2BAA2B,GAAGV,SAAS,CAC1CW,MAAM,IACPA,MAAM,CAAEN,gBAAiB,CAAC,CAACO,WAAW,CAAC,CAAC,CAACC,iBAAiB,IAC1DN,MAAM,CAAEI,MAAM,CAAEN,gBAAiB,CAAE,CAAC,CAACS,SAAS,CAAC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CAAC,EACD,CACCnB,OAAO,EACPM,oBAAoB,EACpBC,aAAa,EACbC,gBAAgB,EAChBQ,kBAAkB,EAClBC,kBAAkB,EAClBR,yBAAyB,EACzBR,2BAA2B,CAE7B,CAAC;AACF","ignoreList":[]}
1
+ {"version":3,"names":["useRefEffect","useSelect","useDispatch","useContext","isRTL","store","blockEditorStore","InsertionPointOpenRef","unlock","useInBetweenInserter","openRef","isInBetweenInserterDisabled","select","getSettings","isDistractionFree","isZoomOut","getBlockListSettings","getBlockIndex","isMultiSelecting","getSelectedBlockClientIds","getTemplateLock","__unstableIsWithinBlockOverlay","getBlockEditingMode","getBlockName","getBlockAttributes","getParentSectionBlock","showInsertionPoint","hideInsertionPoint","node","onMouseMove","event","undefined","current","target","nodeType","TEXT_NODE","classList","contains","rootClientId","blockElement","getAttribute","closest","layout","isManualPlacement","blockListSettings","orientation","captureToolbars","__experimentalCaptureToolbars","offsetTop","clientY","offsetLeft","clientX","children","Array","from","element","find","blockEl","blockElRect","getBoundingClientRect","top","right","left","id","firstElementChild","clientId","slice","length","includes","hasFixedToolbar","elementRect","bottom","index","__unstableWithInserter","addEventListener","removeEventListener"],"sources":["@wordpress/block-editor/src/components/block-list/use-in-between-inserter.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useRefEffect } from '@wordpress/compose';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useContext } from '@wordpress/element';\nimport { isRTL } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\nimport { InsertionPointOpenRef } from '../block-tools/insertion-point';\nimport { unlock } from '../../lock-unlock';\n\nexport function useInBetweenInserter() {\n\tconst openRef = useContext( InsertionPointOpenRef );\n\tconst isInBetweenInserterDisabled = useSelect(\n\t\t( select ) =>\n\t\t\tselect( blockEditorStore ).getSettings().isDistractionFree ||\n\t\t\tunlock( select( blockEditorStore ) ).isZoomOut(),\n\t\t[]\n\t);\n\tconst {\n\t\tgetBlockListSettings,\n\t\tgetBlockIndex,\n\t\tisMultiSelecting,\n\t\tgetSelectedBlockClientIds,\n\t\tgetSettings,\n\t\tgetTemplateLock,\n\t\t__unstableIsWithinBlockOverlay,\n\t\tgetBlockEditingMode,\n\t\tgetBlockName,\n\t\tgetBlockAttributes,\n\t\tgetParentSectionBlock,\n\t} = unlock( useSelect( blockEditorStore ) );\n\tconst { showInsertionPoint, hideInsertionPoint } =\n\t\tuseDispatch( blockEditorStore );\n\n\treturn useRefEffect(\n\t\t( node ) => {\n\t\t\tif ( isInBetweenInserterDisabled ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfunction onMouseMove( event ) {\n\t\t\t\t// openRef is the reference to the insertion point between blocks.\n\t\t\t\t// If the reference is not set or the insertion point is already open, return.\n\t\t\t\tif ( openRef === undefined || openRef.current ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Ignore text nodes sometimes detected in FireFox.\n\t\t\t\tif ( event.target.nodeType === event.target.TEXT_NODE ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( isMultiSelecting() ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\t! event.target.classList.contains(\n\t\t\t\t\t\t'block-editor-block-list__layout'\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\thideInsertionPoint();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tlet rootClientId;\n\t\t\t\tif (\n\t\t\t\t\t! event.target.classList.contains( 'is-root-container' )\n\t\t\t\t) {\n\t\t\t\t\tconst blockElement = !! event.target.getAttribute(\n\t\t\t\t\t\t'data-block'\n\t\t\t\t\t)\n\t\t\t\t\t\t? event.target\n\t\t\t\t\t\t: event.target.closest( '[data-block]' );\n\t\t\t\t\trootClientId = blockElement.getAttribute( 'data-block' );\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\tgetTemplateLock( rootClientId ) ||\n\t\t\t\t\tgetBlockEditingMode( rootClientId ) === 'disabled' ||\n\t\t\t\t\tgetBlockName( rootClientId ) === 'core/block' ||\n\t\t\t\t\t( rootClientId &&\n\t\t\t\t\t\tgetBlockAttributes( rootClientId ).layout\n\t\t\t\t\t\t\t?.isManualPlacement )\n\t\t\t\t) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst blockListSettings = getBlockListSettings( rootClientId );\n\t\t\t\tconst orientation =\n\t\t\t\t\tblockListSettings?.orientation || 'vertical';\n\t\t\t\tconst captureToolbars =\n\t\t\t\t\t!! blockListSettings?.__experimentalCaptureToolbars;\n\t\t\t\tconst offsetTop = event.clientY;\n\t\t\t\tconst offsetLeft = event.clientX;\n\n\t\t\t\tconst children = Array.from( event.target.children );\n\t\t\t\tlet element = children.find( ( blockEl ) => {\n\t\t\t\t\tconst blockElRect = blockEl.getBoundingClientRect();\n\t\t\t\t\treturn (\n\t\t\t\t\t\t( blockEl.classList.contains( 'wp-block' ) &&\n\t\t\t\t\t\t\torientation === 'vertical' &&\n\t\t\t\t\t\t\tblockElRect.top > offsetTop ) ||\n\t\t\t\t\t\t( blockEl.classList.contains( 'wp-block' ) &&\n\t\t\t\t\t\t\torientation === 'horizontal' &&\n\t\t\t\t\t\t\t( isRTL()\n\t\t\t\t\t\t\t\t? blockElRect.right < offsetLeft\n\t\t\t\t\t\t\t\t: blockElRect.left > offsetLeft ) )\n\t\t\t\t\t);\n\t\t\t\t} );\n\n\t\t\t\tif ( ! element ) {\n\t\t\t\t\thideInsertionPoint();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// The block may be in an alignment wrapper, so check the first direct\n\t\t\t\t// child if the element has no ID.\n\t\t\t\tif ( ! element.id ) {\n\t\t\t\t\telement = element.firstElementChild;\n\n\t\t\t\t\tif ( ! element ) {\n\t\t\t\t\t\thideInsertionPoint();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Don't show the insertion point if a parent block has an \"overlay\"\n\t\t\t\t// See https://github.com/WordPress/gutenberg/pull/34012#pullrequestreview-727762337\n\t\t\t\tconst clientId = element.id.slice( 'block-'.length );\n\t\t\t\tif (\n\t\t\t\t\t! clientId ||\n\t\t\t\t\t__unstableIsWithinBlockOverlay( clientId ) ||\n\t\t\t\t\t!! getParentSectionBlock( clientId )\n\t\t\t\t) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Don't show the inserter if the following conditions are met,\n\t\t\t\t// as it conflicts with the block toolbar:\n\t\t\t\t// 1. when hovering above or inside selected block(s)\n\t\t\t\t// 2. when the orientation is vertical\n\t\t\t\t// 3. when the __experimentalCaptureToolbars is not enabled\n\t\t\t\t// 4. when the Top Toolbar is not disabled\n\t\t\t\tif (\n\t\t\t\t\tgetSelectedBlockClientIds().includes( clientId ) &&\n\t\t\t\t\torientation === 'vertical' &&\n\t\t\t\t\t! captureToolbars &&\n\t\t\t\t\t! getSettings().hasFixedToolbar\n\t\t\t\t) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst elementRect = element.getBoundingClientRect();\n\n\t\t\t\tif (\n\t\t\t\t\t( orientation === 'horizontal' &&\n\t\t\t\t\t\t( event.clientY > elementRect.bottom ||\n\t\t\t\t\t\t\tevent.clientY < elementRect.top ) ) ||\n\t\t\t\t\t( orientation === 'vertical' &&\n\t\t\t\t\t\t( event.clientX > elementRect.right ||\n\t\t\t\t\t\t\tevent.clientX < elementRect.left ) )\n\t\t\t\t) {\n\t\t\t\t\thideInsertionPoint();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst index = getBlockIndex( clientId );\n\n\t\t\t\t// Don't show the in-between inserter before the first block in\n\t\t\t\t// the list (preserves the original behaviour).\n\t\t\t\tif ( index === 0 ) {\n\t\t\t\t\thideInsertionPoint();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tshowInsertionPoint( rootClientId, index, {\n\t\t\t\t\t__unstableWithInserter: true,\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tnode.addEventListener( 'mousemove', onMouseMove );\n\n\t\t\treturn () => {\n\t\t\t\tnode.removeEventListener( 'mousemove', onMouseMove );\n\t\t\t};\n\t\t},\n\t\t[\n\t\t\topenRef,\n\t\t\tgetBlockListSettings,\n\t\t\tgetBlockIndex,\n\t\t\tisMultiSelecting,\n\t\t\tshowInsertionPoint,\n\t\t\thideInsertionPoint,\n\t\t\tgetSelectedBlockClientIds,\n\t\t\tisInBetweenInserterDisabled,\n\t\t]\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,YAAY,QAAQ,oBAAoB;AACjD,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,UAAU,QAAQ,oBAAoB;AAC/C,SAASC,KAAK,QAAQ,iBAAiB;;AAEvC;AACA;AACA;AACA,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;AACvD,SAASC,qBAAqB,QAAQ,gCAAgC;AACtE,SAASC,MAAM,QAAQ,mBAAmB;AAE1C,OAAO,SAASC,oBAAoBA,CAAA,EAAG;EACtC,MAAMC,OAAO,GAAGP,UAAU,CAAEI,qBAAsB,CAAC;EACnD,MAAMI,2BAA2B,GAAGV,SAAS,CAC1CW,MAAM,IACPA,MAAM,CAAEN,gBAAiB,CAAC,CAACO,WAAW,CAAC,CAAC,CAACC,iBAAiB,IAC1DN,MAAM,CAAEI,MAAM,CAAEN,gBAAiB,CAAE,CAAC,CAACS,SAAS,CAAC,CAAC,EACjD,EACD,CAAC;EACD,MAAM;IACLC,oBAAoB;IACpBC,aAAa;IACbC,gBAAgB;IAChBC,yBAAyB;IACzBN,WAAW;IACXO,eAAe;IACfC,8BAA8B;IAC9BC,mBAAmB;IACnBC,YAAY;IACZC,kBAAkB;IAClBC;EACD,CAAC,GAAGjB,MAAM,CAAEP,SAAS,CAAEK,gBAAiB,CAAE,CAAC;EAC3C,MAAM;IAAEoB,kBAAkB;IAAEC;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,CAAC,CAAC,CAACiD,QAAQ,CAAEH,QAAS,CAAC,IAChDpB,WAAW,KAAK,UAAU,IAC1B,CAAEC,eAAe,IACjB,CAAEjC,WAAW,CAAC,CAAC,CAACwD,eAAe,EAC9B;QACD;MACD;MACA,MAAMC,WAAW,GAAGf,OAAO,CAACI,qBAAqB,CAAC,CAAC;MAEnD,IACGd,WAAW,KAAK,YAAY,KAC3Bf,KAAK,CAACmB,OAAO,GAAGqB,WAAW,CAACC,MAAM,IACnCzC,KAAK,CAACmB,OAAO,GAAGqB,WAAW,CAACV,GAAG,CAAE,IACjCf,WAAW,KAAK,UAAU,KACzBf,KAAK,CAACqB,OAAO,GAAGmB,WAAW,CAACT,KAAK,IAClC/B,KAAK,CAACqB,OAAO,GAAGmB,WAAW,CAACR,IAAI,CAAI,EACrC;QACDnC,kBAAkB,CAAC,CAAC;QACpB;MACD;MAEA,MAAM6C,KAAK,GAAGvD,aAAa,CAAEgD,QAAS,CAAC;;MAEvC;MACA;MACA,IAAKO,KAAK,KAAK,CAAC,EAAG;QAClB7C,kBAAkB,CAAC,CAAC;QACpB;MACD;MAEAD,kBAAkB,CAAEY,YAAY,EAAEkC,KAAK,EAAE;QACxCC,sBAAsB,EAAE;MACzB,CAAE,CAAC;IACJ;IAEA7C,IAAI,CAAC8C,gBAAgB,CAAE,WAAW,EAAE7C,WAAY,CAAC;IAEjD,OAAO,MAAM;MACZD,IAAI,CAAC+C,mBAAmB,CAAE,WAAW,EAAE9C,WAAY,CAAC;IACrD,CAAC;EACF,CAAC,EACD,CACCnB,OAAO,EACPM,oBAAoB,EACpBC,aAAa,EACbC,gBAAgB,EAChBQ,kBAAkB,EAClBC,kBAAkB,EAClBR,yBAAyB,EACzBR,2BAA2B,CAE7B,CAAC;AACF","ignoreList":[]}
@@ -29,14 +29,16 @@ export function ZoomOutSeparator({
29
29
  sectionClientIds,
30
30
  insertionPoint,
31
31
  blockInsertionPointVisible,
32
- blockInsertionPoint
32
+ blockInsertionPoint,
33
+ blocksBeingDragged
33
34
  } = useSelect(select => {
34
35
  const {
35
36
  getInsertionPoint,
36
37
  getBlockOrder,
37
38
  getSectionRootClientId,
38
39
  isBlockInsertionPointVisible,
39
- getBlockInsertionPoint
40
+ getBlockInsertionPoint,
41
+ getDraggedBlockClientIds
40
42
  } = unlock(select(blockEditorStore));
41
43
  const root = getSectionRootClientId();
42
44
  const sectionRootClientIds = getBlockOrder(root);
@@ -46,7 +48,8 @@ export function ZoomOutSeparator({
46
48
  blockOrder: getBlockOrder(root),
47
49
  insertionPoint: getInsertionPoint(),
48
50
  blockInsertionPoint: getBlockInsertionPoint(),
49
- blockInsertionPointVisible: isBlockInsertionPointVisible()
51
+ blockInsertionPointVisible: isBlockInsertionPointVisible(),
52
+ blocksBeingDragged: getDraggedBlockClientIds()
50
53
  };
51
54
  }, []);
52
55
  const isReducedMotion = useReducedMotion();
@@ -60,6 +63,7 @@ export function ZoomOutSeparator({
60
63
  }
61
64
  const hasTopInsertionPoint = insertionPoint?.index === 0 && clientId === sectionClientIds[insertionPoint.index];
62
65
  const hasBottomInsertionPoint = insertionPoint && insertionPoint.hasOwnProperty('index') && clientId === sectionClientIds[insertionPoint.index - 1];
66
+
63
67
  // We want to show the zoom out separator in either of these conditions:
64
68
  // 1. If the inserter has an insertion index set
65
69
  // 2. We are dragging a pattern over an insertion point
@@ -69,6 +73,19 @@ export function ZoomOutSeparator({
69
73
  if (position === 'bottom') {
70
74
  isVisible = hasBottomInsertionPoint || blockInsertionPointVisible && clientId === sectionClientIds[blockInsertionPoint.index - 1];
71
75
  }
76
+ const blockBeingDraggedClientId = blocksBeingDragged[0];
77
+ const isCurrentBlockBeingDragged = blocksBeingDragged.includes(clientId);
78
+ const blockBeingDraggedIndex = sectionClientIds.indexOf(blockBeingDraggedClientId);
79
+ const blockBeingDraggedPreviousSiblingClientId = blockBeingDraggedIndex > 0 ? sectionClientIds[blockBeingDraggedIndex - 1] : null;
80
+ const isCurrentBlockPreviousSiblingOfBlockBeingDragged = blockBeingDraggedPreviousSiblingClientId === clientId;
81
+
82
+ // The separators are visually top/bottom of the block, but in actual fact
83
+ // the "top" separator is the "bottom" separator of the previous block.
84
+ // Therefore, this logic hides the separator if the current block is being dragged
85
+ // or if the current block is the previous sibling of the block being dragged.
86
+ if (isCurrentBlockBeingDragged || isCurrentBlockPreviousSiblingOfBlockBeingDragged) {
87
+ isVisible = false;
88
+ }
72
89
  return /*#__PURE__*/_jsx(AnimatePresence, {
73
90
  children: isVisible && /*#__PURE__*/_jsx(motion.div, {
74
91
  initial: {
@@ -1 +1 @@
1
- {"version":3,"names":["clsx","__unstableMotion","motion","__unstableAnimatePresence","AnimatePresence","useReducedMotion","useSelect","useState","__","store","blockEditorStore","unlock","jsx","_jsx","ZoomOutSeparator","clientId","rootClientId","position","isDraggedOver","setIsDraggedOver","sectionRootClientId","sectionClientIds","insertionPoint","blockInsertionPointVisible","blockInsertionPoint","select","getInsertionPoint","getBlockOrder","getSectionRootClientId","isBlockInsertionPointVisible","getBlockInsertionPoint","root","sectionRootClientIds","blockOrder","isReducedMotion","isVisible","isSectionBlock","includes","hasTopInsertionPoint","index","hasBottomInsertionPoint","hasOwnProperty","children","div","initial","height","animate","exit","transition","type","duration","ease","className","onDragOver","onDragLeave","opacity","delay"],"sources":["@wordpress/block-editor/src/components/block-list/zoom-out-separator.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\t__unstableMotion as motion,\n\t__unstableAnimatePresence as AnimatePresence,\n} from '@wordpress/components';\nimport { useReducedMotion } from '@wordpress/compose';\nimport { useSelect } from '@wordpress/data';\nimport { useState } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nexport function ZoomOutSeparator( {\n\tclientId,\n\trootClientId = '',\n\tposition = 'top',\n} ) {\n\tconst [ isDraggedOver, setIsDraggedOver ] = useState( false );\n\tconst {\n\t\tsectionRootClientId,\n\t\tsectionClientIds,\n\t\tinsertionPoint,\n\t\tblockInsertionPointVisible,\n\t\tblockInsertionPoint,\n\t} = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetInsertionPoint,\n\t\t\tgetBlockOrder,\n\t\t\tgetSectionRootClientId,\n\t\t\tisBlockInsertionPointVisible,\n\t\t\tgetBlockInsertionPoint,\n\t\t} = unlock( select( blockEditorStore ) );\n\n\t\tconst root = getSectionRootClientId();\n\t\tconst sectionRootClientIds = getBlockOrder( root );\n\t\treturn {\n\t\t\tsectionRootClientId: root,\n\t\t\tsectionClientIds: sectionRootClientIds,\n\t\t\tblockOrder: getBlockOrder( root ),\n\t\t\tinsertionPoint: getInsertionPoint(),\n\t\t\tblockInsertionPoint: getBlockInsertionPoint(),\n\t\t\tblockInsertionPointVisible: isBlockInsertionPointVisible(),\n\t\t};\n\t}, [] );\n\n\tconst isReducedMotion = useReducedMotion();\n\n\tif ( ! clientId ) {\n\t\treturn;\n\t}\n\n\tlet isVisible = false;\n\n\tconst isSectionBlock =\n\t\trootClientId === sectionRootClientId &&\n\t\tsectionClientIds &&\n\t\tsectionClientIds.includes( clientId );\n\n\tif ( ! isSectionBlock ) {\n\t\treturn null;\n\t}\n\n\tconst hasTopInsertionPoint =\n\t\tinsertionPoint?.index === 0 &&\n\t\tclientId === sectionClientIds[ insertionPoint.index ];\n\tconst hasBottomInsertionPoint =\n\t\tinsertionPoint &&\n\t\tinsertionPoint.hasOwnProperty( 'index' ) &&\n\t\tclientId === sectionClientIds[ insertionPoint.index - 1 ];\n\t// We want to show the zoom out separator in either of these conditions:\n\t// 1. If the inserter has an insertion index set\n\t// 2. We are dragging a pattern over an insertion point\n\tif ( position === 'top' ) {\n\t\tisVisible =\n\t\t\thasTopInsertionPoint ||\n\t\t\t( blockInsertionPointVisible &&\n\t\t\t\tblockInsertionPoint.index === 0 &&\n\t\t\t\tclientId === sectionClientIds[ blockInsertionPoint.index ] );\n\t}\n\n\tif ( position === 'bottom' ) {\n\t\tisVisible =\n\t\t\thasBottomInsertionPoint ||\n\t\t\t( blockInsertionPointVisible &&\n\t\t\t\tclientId ===\n\t\t\t\t\tsectionClientIds[ blockInsertionPoint.index - 1 ] );\n\t}\n\n\treturn (\n\t\t<AnimatePresence>\n\t\t\t{ isVisible && (\n\t\t\t\t<motion.div\n\t\t\t\t\tinitial={ { height: 0 } }\n\t\t\t\t\tanimate={ {\n\t\t\t\t\t\t// Use a height equal to that of the zoom out frame size.\n\t\t\t\t\t\theight: 'calc(1 * var(--wp-block-editor-iframe-zoom-out-frame-size) / var(--wp-block-editor-iframe-zoom-out-scale)',\n\t\t\t\t\t} }\n\t\t\t\t\texit={ { height: 0 } }\n\t\t\t\t\ttransition={ {\n\t\t\t\t\t\ttype: 'tween',\n\t\t\t\t\t\tduration: isReducedMotion ? 0 : 0.2,\n\t\t\t\t\t\tease: [ 0.6, 0, 0.4, 1 ],\n\t\t\t\t\t} }\n\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t'block-editor-block-list__zoom-out-separator',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'is-dragged-over': isDraggedOver,\n\t\t\t\t\t\t}\n\t\t\t\t\t) }\n\t\t\t\t\tdata-is-insertion-point=\"true\"\n\t\t\t\t\tonDragOver={ () => setIsDraggedOver( true ) }\n\t\t\t\t\tonDragLeave={ () => setIsDraggedOver( false ) }\n\t\t\t\t>\n\t\t\t\t\t<motion.div\n\t\t\t\t\t\tinitial={ { opacity: 0 } }\n\t\t\t\t\t\tanimate={ { opacity: 1 } }\n\t\t\t\t\t\texit={ { opacity: 0, transition: { delay: -0.125 } } }\n\t\t\t\t\t\ttransition={ {\n\t\t\t\t\t\t\tease: 'linear',\n\t\t\t\t\t\t\tduration: 0.1,\n\t\t\t\t\t\t\tdelay: 0.125,\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Drop pattern.' ) }\n\t\t\t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AO,EAAG;QACT;QACAD,MAAM,EAAE;MACT,CAAG;MACHE,IAAI,EAAG;QAAEF,MAAM,EAAE;MAAE,CAAG;MACtBG,UAAU,EAAG;QACZC,IAAI,EAAE,OAAO;QACbC,QAAQ,EAAEhB,eAAe,GAAG,CAAC,GAAG,GAAG;QACnCiB,IAAI,EAAE,CAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC;MACvB,CAAG;MACHC,SAAS,EAAGpD,IAAI,CACf,6CAA6C,EAC7C;QACC,iBAAiB,EAAEkB;MACpB,CACD,CAAG;MACH,2BAAwB,MAAM;MAC9BmC,UAAU,EAAGA,CAAA,KAAMlC,gBAAgB,CAAE,IAAK,CAAG;MAC7CmC,WAAW,EAAGA,CAAA,KAAMnC,gBAAgB,CAAE,KAAM,CAAG;MAAAuB,QAAA,eAE/C7B,IAAA,CAACX,MAAM,CAACyC,GAAG;QACVC,OAAO,EAAG;UAAEW,OAAO,EAAE;QAAE,CAAG;QAC1BT,OAAO,EAAG;UAAES,OAAO,EAAE;QAAE,CAAG;QAC1BR,IAAI,EAAG;UAAEQ,OAAO,EAAE,CAAC;UAAEP,UAAU,EAAE;YAAEQ,KAAK,EAAE,CAAC;UAAM;QAAE,CAAG;QACtDR,UAAU,EAAG;UACZG,IAAI,EAAE,QAAQ;UACdD,QAAQ,EAAE,GAAG;UACbM,KAAK,EAAE;QACR,CAAG;QAAAd,QAAA,EAEDlC,EAAE,CAAE,eAAgB;MAAC,CACZ;IAAC,CACF;EACZ,CACe,CAAC;AAEpB","ignoreList":[]}
1
+ {"version":3,"names":["clsx","__unstableMotion","motion","__unstableAnimatePresence","AnimatePresence","useReducedMotion","useSelect","useState","__","store","blockEditorStore","unlock","jsx","_jsx","ZoomOutSeparator","clientId","rootClientId","position","isDraggedOver","setIsDraggedOver","sectionRootClientId","sectionClientIds","insertionPoint","blockInsertionPointVisible","blockInsertionPoint","blocksBeingDragged","select","getInsertionPoint","getBlockOrder","getSectionRootClientId","isBlockInsertionPointVisible","getBlockInsertionPoint","getDraggedBlockClientIds","root","sectionRootClientIds","blockOrder","isReducedMotion","isVisible","isSectionBlock","includes","hasTopInsertionPoint","index","hasBottomInsertionPoint","hasOwnProperty","blockBeingDraggedClientId","isCurrentBlockBeingDragged","blockBeingDraggedIndex","indexOf","blockBeingDraggedPreviousSiblingClientId","isCurrentBlockPreviousSiblingOfBlockBeingDragged","children","div","initial","height","animate","exit","transition","type","duration","ease","className","onDragOver","onDragLeave","opacity","delay"],"sources":["@wordpress/block-editor/src/components/block-list/zoom-out-separator.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\t__unstableMotion as motion,\n\t__unstableAnimatePresence as AnimatePresence,\n} from '@wordpress/components';\nimport { useReducedMotion } from '@wordpress/compose';\nimport { useSelect } from '@wordpress/data';\nimport { useState } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nexport function ZoomOutSeparator( {\n\tclientId,\n\trootClientId = '',\n\tposition = 'top',\n} ) {\n\tconst [ isDraggedOver, setIsDraggedOver ] = useState( false );\n\tconst {\n\t\tsectionRootClientId,\n\t\tsectionClientIds,\n\t\tinsertionPoint,\n\t\tblockInsertionPointVisible,\n\t\tblockInsertionPoint,\n\t\tblocksBeingDragged,\n\t} = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetInsertionPoint,\n\t\t\tgetBlockOrder,\n\t\t\tgetSectionRootClientId,\n\t\t\tisBlockInsertionPointVisible,\n\t\t\tgetBlockInsertionPoint,\n\t\t\tgetDraggedBlockClientIds,\n\t\t} = unlock( select( blockEditorStore ) );\n\n\t\tconst root = getSectionRootClientId();\n\t\tconst sectionRootClientIds = getBlockOrder( root );\n\t\treturn {\n\t\t\tsectionRootClientId: root,\n\t\t\tsectionClientIds: sectionRootClientIds,\n\t\t\tblockOrder: getBlockOrder( root ),\n\t\t\tinsertionPoint: getInsertionPoint(),\n\t\t\tblockInsertionPoint: getBlockInsertionPoint(),\n\t\t\tblockInsertionPointVisible: isBlockInsertionPointVisible(),\n\t\t\tblocksBeingDragged: getDraggedBlockClientIds(),\n\t\t};\n\t}, [] );\n\n\tconst isReducedMotion = useReducedMotion();\n\n\tif ( ! clientId ) {\n\t\treturn;\n\t}\n\n\tlet isVisible = false;\n\n\tconst isSectionBlock =\n\t\trootClientId === sectionRootClientId &&\n\t\tsectionClientIds &&\n\t\tsectionClientIds.includes( clientId );\n\n\tif ( ! isSectionBlock ) {\n\t\treturn null;\n\t}\n\n\tconst hasTopInsertionPoint =\n\t\tinsertionPoint?.index === 0 &&\n\t\tclientId === sectionClientIds[ insertionPoint.index ];\n\tconst hasBottomInsertionPoint =\n\t\tinsertionPoint &&\n\t\tinsertionPoint.hasOwnProperty( 'index' ) &&\n\t\tclientId === sectionClientIds[ insertionPoint.index - 1 ];\n\n\t// We want to show the zoom out separator in either of these conditions:\n\t// 1. If the inserter has an insertion index set\n\t// 2. We are dragging a pattern over an insertion point\n\tif ( position === 'top' ) {\n\t\tisVisible =\n\t\t\thasTopInsertionPoint ||\n\t\t\t( blockInsertionPointVisible &&\n\t\t\t\tblockInsertionPoint.index === 0 &&\n\t\t\t\tclientId === sectionClientIds[ blockInsertionPoint.index ] );\n\t}\n\n\tif ( position === 'bottom' ) {\n\t\tisVisible =\n\t\t\thasBottomInsertionPoint ||\n\t\t\t( blockInsertionPointVisible &&\n\t\t\t\tclientId ===\n\t\t\t\t\tsectionClientIds[ blockInsertionPoint.index - 1 ] );\n\t}\n\n\tconst blockBeingDraggedClientId = blocksBeingDragged[ 0 ];\n\n\tconst isCurrentBlockBeingDragged = blocksBeingDragged.includes( clientId );\n\n\tconst blockBeingDraggedIndex = sectionClientIds.indexOf(\n\t\tblockBeingDraggedClientId\n\t);\n\tconst blockBeingDraggedPreviousSiblingClientId =\n\t\tblockBeingDraggedIndex > 0\n\t\t\t? sectionClientIds[ blockBeingDraggedIndex - 1 ]\n\t\t\t: null;\n\n\tconst isCurrentBlockPreviousSiblingOfBlockBeingDragged =\n\t\tblockBeingDraggedPreviousSiblingClientId === clientId;\n\n\t// The separators are visually top/bottom of the block, but in actual fact\n\t// the \"top\" separator is the \"bottom\" separator of the previous block.\n\t// Therefore, this logic hides the separator if the current block is being dragged\n\t// or if the current block is the previous sibling of the block being dragged.\n\tif (\n\t\tisCurrentBlockBeingDragged ||\n\t\tisCurrentBlockPreviousSiblingOfBlockBeingDragged\n\t) {\n\t\tisVisible = false;\n\t}\n\n\treturn (\n\t\t<AnimatePresence>\n\t\t\t{ isVisible && (\n\t\t\t\t<motion.div\n\t\t\t\t\tinitial={ { height: 0 } }\n\t\t\t\t\tanimate={ {\n\t\t\t\t\t\t// Use a height equal to that of the zoom out frame size.\n\t\t\t\t\t\theight: 'calc(1 * var(--wp-block-editor-iframe-zoom-out-frame-size) / var(--wp-block-editor-iframe-zoom-out-scale)',\n\t\t\t\t\t} }\n\t\t\t\t\texit={ { height: 0 } }\n\t\t\t\t\ttransition={ {\n\t\t\t\t\t\ttype: 'tween',\n\t\t\t\t\t\tduration: isReducedMotion ? 0 : 0.2,\n\t\t\t\t\t\tease: [ 0.6, 0, 0.4, 1 ],\n\t\t\t\t\t} }\n\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t'block-editor-block-list__zoom-out-separator',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'is-dragged-over': isDraggedOver,\n\t\t\t\t\t\t}\n\t\t\t\t\t) }\n\t\t\t\t\tdata-is-insertion-point=\"true\"\n\t\t\t\t\tonDragOver={ () => setIsDraggedOver( true ) }\n\t\t\t\t\tonDragLeave={ () => setIsDraggedOver( false ) }\n\t\t\t\t>\n\t\t\t\t\t<motion.div\n\t\t\t\t\t\tinitial={ { opacity: 0 } }\n\t\t\t\t\t\tanimate={ { opacity: 1 } }\n\t\t\t\t\t\texit={ { opacity: 0, transition: { delay: -0.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gB,CAAE,KAAM,CAAG;MAAA+B,QAAA,eAE/CrC,IAAA,CAACX,MAAM,CAACiD,GAAG;QACVC,OAAO,EAAG;UAAEW,OAAO,EAAE;QAAE,CAAG;QAC1BT,OAAO,EAAG;UAAES,OAAO,EAAE;QAAE,CAAG;QAC1BR,IAAI,EAAG;UAAEQ,OAAO,EAAE,CAAC;UAAEP,UAAU,EAAE;YAAEQ,KAAK,EAAE,CAAC;UAAM;QAAE,CAAG;QACtDR,UAAU,EAAG;UACZG,IAAI,EAAE,QAAQ;UACdD,QAAQ,EAAE,GAAG;UACbM,KAAK,EAAE;QACR,CAAG;QAAAd,QAAA,EAED1C,EAAE,CAAE,eAAgB;MAAC,CACZ;IAAC,CACF;EACZ,CACe,CAAC;AAEpB","ignoreList":[]}
@@ -1,3 +1,4 @@
1
+ /* wp:polyfill */
1
2
  /**
2
3
  * WordPress dependencies
3
4
  */
@@ -93,7 +94,7 @@ export default function BlockLockModal({
93
94
  children: [/*#__PURE__*/_jsxs("fieldset", {
94
95
  className: "block-editor-block-lock-modal__options",
95
96
  children: [/*#__PURE__*/_jsx("legend", {
96
- children: __('Choose specific attributes to restrict or lock all available options.')
97
+ children: __('Select the features you want to lock')
97
98
  }), /*#__PURE__*/_jsx("ul", {
98
99
  role: "list",
99
100
  className: "block-editor-block-lock-modal__checklist",
@@ -118,7 +119,7 @@ export default function BlockLockModal({
118
119
  className: "block-editor-block-lock-modal__checklist-item",
119
120
  children: [/*#__PURE__*/_jsx(CheckboxControl, {
120
121
  __nextHasNoMarginBottom: true,
121
- label: __('Restrict editing'),
122
+ label: __('Lock editing'),
122
123
  checked: !!lock.edit,
123
124
  onChange: edit => setLock(prevLock => ({
124
125
  ...prevLock,
@@ -132,7 +133,7 @@ export default function BlockLockModal({
132
133
  className: "block-editor-block-lock-modal__checklist-item",
133
134
  children: [/*#__PURE__*/_jsx(CheckboxControl, {
134
135
  __nextHasNoMarginBottom: true,
135
- label: __('Disable movement'),
136
+ label: __('Lock movement'),
136
137
  checked: lock.move,
137
138
  onChange: move => setLock(prevLock => ({
138
139
  ...prevLock,
@@ -146,7 +147,7 @@ export default function BlockLockModal({
146
147
  className: "block-editor-block-lock-modal__checklist-item",
147
148
  children: [/*#__PURE__*/_jsx(CheckboxControl, {
148
149
  __nextHasNoMarginBottom: true,
149
- label: __('Prevent removal'),
150
+ label: __('Lock removal'),
150
151
  checked: lock.remove,
151
152
  onChange: remove => setLock(prevLock => ({
152
153
  ...prevLock,
@@ -1 +1 @@
1
- {"version":3,"names":["__","sprintf","useEffect","useState","Button","CheckboxControl","Flex","FlexItem","Icon","Modal","ToggleControl","lock","lockIcon","unlock","unlockIcon","useDispatch","useSelect","getBlockType","useBlockLock","useBlockDisplayInformation","store","blockEditorStore","jsx","_jsx","jsxs","_jsxs","ALLOWS_EDIT_LOCKING","getTemplateLockValue","remove","move","BlockLockModal","clientId","onClose","setLock","canEdit","canMove","canRemove","allowsEditLocking","templateLock","hasTemplateLock","select","getBlockName","getBlockAttributes","blockName","blockType","includes","attributes","applyTemplateLock","setApplyTemplateLock","updateBlockAttributes","blockInformation","edit","isAllChecked","Object","values","every","Boolean","isMixed","some","title","overlayClassName","onRequestClose","children","onSubmit","event","preventDefault","undefined","className","role","__nextHasNoMarginBottom","label","checked","indeterminate","onChange","newValue","prevLock","icon","disabled","justify","expanded","variant","onClick","__next40pxDefaultSize","type"],"sources":["@wordpress/block-editor/src/components/block-lock/modal.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useEffect, useState } from '@wordpress/element';\nimport {\n\tButton,\n\tCheckboxControl,\n\tFlex,\n\tFlexItem,\n\tIcon,\n\tModal,\n\tToggleControl,\n} from '@wordpress/components';\nimport { lock as lockIcon, unlock as unlockIcon } from '@wordpress/icons';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { getBlockType } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport useBlockLock from './use-block-lock';\nimport useBlockDisplayInformation from '../use-block-display-information';\nimport { store as blockEditorStore } from '../../store';\n\n// Entity based blocks which allow edit locking\nconst ALLOWS_EDIT_LOCKING = [ 'core/navigation' ];\n\nfunction getTemplateLockValue( lock ) {\n\t// Prevents all operations.\n\tif ( lock.remove && lock.move ) {\n\t\treturn 'all';\n\t}\n\n\t// Prevents inserting or removing blocks, but allows moving existing blocks.\n\tif ( lock.remove && ! lock.move ) {\n\t\treturn 'insert';\n\t}\n\n\treturn false;\n}\n\nexport default function BlockLockModal( { clientId, onClose } ) {\n\tconst [ lock, setLock ] = useState( { move: false, remove: false } );\n\tconst { canEdit, canMove, canRemove } = useBlockLock( clientId );\n\tconst { allowsEditLocking, templateLock, hasTemplateLock } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockName, getBlockAttributes } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst blockName = getBlockName( clientId );\n\t\t\tconst blockType = getBlockType( blockName );\n\n\t\t\treturn {\n\t\t\t\tallowsEditLocking: ALLOWS_EDIT_LOCKING.includes( blockName ),\n\t\t\t\ttemplateLock: getBlockAttributes( clientId )?.templateLock,\n\t\t\t\thasTemplateLock: !! blockType?.attributes?.templateLock,\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\tconst [ applyTemplateLock, setApplyTemplateLock ] = useState(\n\t\t!! templateLock\n\t);\n\tconst { updateBlockAttributes } = useDispatch( blockEditorStore );\n\tconst blockInformation = useBlockDisplayInformation( clientId );\n\n\tuseEffect( () => {\n\t\tsetLock( {\n\t\t\tmove: ! canMove,\n\t\t\tremove: ! canRemove,\n\t\t\t...( allowsEditLocking ? { edit: ! canEdit } : {} ),\n\t\t} );\n\t}, [ canEdit, canMove, canRemove, allowsEditLocking ] );\n\n\tconst isAllChecked = Object.values( lock ).every( Boolean );\n\tconst isMixed = Object.values( lock ).some( Boolean ) && ! isAllChecked;\n\n\treturn (\n\t\t<Modal\n\t\t\ttitle={ sprintf(\n\t\t\t\t/* translators: %s: Name of the block. */\n\t\t\t\t__( 'Lock %s' ),\n\t\t\t\tblockInformation.title\n\t\t\t) }\n\t\t\toverlayClassName=\"block-editor-block-lock-modal\"\n\t\t\tonRequestClose={ onClose }\n\t\t>\n\t\t\t<form\n\t\t\t\tonSubmit={ ( event ) => {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tupdateBlockAttributes( [ clientId ], {\n\t\t\t\t\t\tlock,\n\t\t\t\t\t\ttemplateLock: applyTemplateLock\n\t\t\t\t\t\t\t? getTemplateLockValue( lock )\n\t\t\t\t\t\t\t: undefined,\n\t\t\t\t\t} );\n\t\t\t\t\tonClose();\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t<fieldset className=\"block-editor-block-lock-modal__options\">\n\t\t\t\t\t<legend>\n\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t'Choose specific attributes to restrict or lock all available options.'\n\t\t\t\t\t\t) }\n\t\t\t\t\t</legend>\n\t\t\t\t\t{ /*\n\t\t\t\t\t * Disable reason: The `list` ARIA role is redundant but\n\t\t\t\t\t * Safari+VoiceOver won't announce the list otherwise.\n\t\t\t\t\t */\n\t\t\t\t\t/* eslint-disable jsx-a11y/no-redundant-roles */ }\n\t\t\t\t\t<ul\n\t\t\t\t\t\trole=\"list\"\n\t\t\t\t\t\tclassName=\"block-editor-block-lock-modal__checklist\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<CheckboxControl\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\tclassName=\"block-editor-block-lock-modal__options-all\"\n\t\t\t\t\t\t\t\tlabel={ __( 'Lock all' ) }\n\t\t\t\t\t\t\t\tchecked={ isAllChecked }\n\t\t\t\t\t\t\t\tindeterminate={ isMixed }\n\t\t\t\t\t\t\t\tonChange={ ( newValue ) =>\n\t\t\t\t\t\t\t\t\tsetLock( {\n\t\t\t\t\t\t\t\t\t\tmove: newValue,\n\t\t\t\t\t\t\t\t\t\tremove: newValue,\n\t\t\t\t\t\t\t\t\t\t...( allowsEditLocking\n\t\t\t\t\t\t\t\t\t\t\t? { edit: newValue }\n\t\t\t\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}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<ul\n\t\t\t\t\t\t\t\trole=\"list\"\n\t\t\t\t\t\t\t\tclassName=\"block-editor-block-lock-modal__checklist\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ allowsEditLocking && (\n\t\t\t\t\t\t\t\t\t<li className=\"block-editor-block-lock-modal__checklist-item\">\n\t\t\t\t\t\t\t\t\t\t<CheckboxControl\n\t\t\t\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Restrict editing' ) }\n\t\t\t\t\t\t\t\t\t\t\tchecked={ !! lock.edit }\n\t\t\t\t\t\t\t\t\t\t\tonChange={ ( edit ) =>\n\t\t\t\t\t\t\t\t\t\t\t\tsetLock( ( prevLock ) => ( {\n\t\t\t\t\t\t\t\t\t\t\t\t\t...prevLock,\n\t\t\t\t\t\t\t\t\t\t\t\t\tedit,\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/>\n\t\t\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"block-editor-block-lock-modal__lock-icon\"\n\t\t\t\t\t\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t\t\t\t\t\tlock.edit\n\t\t\t\t\t\t\t\t\t\t\t\t\t? lockIcon\n\t\t\t\t\t\t\t\t\t\t\t\t\t: unlockIcon\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t<li className=\"block-editor-block-lock-modal__checklist-item\">\n\t\t\t\t\t\t\t\t\t<CheckboxControl\n\t\t\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Disable movement' ) }\n\t\t\t\t\t\t\t\t\t\tchecked={ lock.move }\n\t\t\t\t\t\t\t\t\t\tonChange={ ( move ) =>\n\t\t\t\t\t\t\t\t\t\t\tsetLock( ( prevLock ) => ( {\n\t\t\t\t\t\t\t\t\t\t\t\t...prevLock,\n\t\t\t\t\t\t\t\t\t\t\t\tmove,\n\t\t\t\t\t\t\t\t\t\t\t} ) )\n\t\t\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<Icon\n\t\t\t\t\t\t\t\t\t\tclassName=\"block-editor-block-lock-modal__lock-icon\"\n\t\t\t\t\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t\t\t\t\tlock.move ? lockIcon : unlockIcon\n\t\t\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</li>\n\t\t\t\t\t\t\t\t<li className=\"block-editor-block-lock-modal__checklist-item\">\n\t\t\t\t\t\t\t\t\t<CheckboxControl\n\t\t\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Prevent removal' ) }\n\t\t\t\t\t\t\t\t\t\tchecked={ lock.remove }\n\t\t\t\t\t\t\t\t\t\tonChange={ ( remove ) =>\n\t\t\t\t\t\t\t\t\t\t\tsetLock( ( prevLock ) => ( {\n\t\t\t\t\t\t\t\t\t\t\t\t...prevLock,\n\t\t\t\t\t\t\t\t\t\t\t\tremove,\n\t\t\t\t\t\t\t\t\t\t\t} ) )\n\t\t\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<Icon\n\t\t\t\t\t\t\t\t\t\tclassName=\"block-editor-block-lock-modal__lock-icon\"\n\t\t\t\t\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t\t\t\t\tlock.remove ? lockIcon : unlockIcon\n\t\t\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</li>\n\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ul>\n\t\t\t\t\t{ /* eslint-enable jsx-a11y/no-redundant-roles */ }\n\t\t\t\t\t{ hasTemplateLock && (\n\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\tclassName=\"block-editor-block-lock-modal__template-lock\"\n\t\t\t\t\t\t\tlabel={ __( 'Apply to all blocks inside' ) }\n\t\t\t\t\t\t\tchecked={ applyTemplateLock }\n\t\t\t\t\t\t\tdisabled={ lock.move && ! lock.remove }\n\t\t\t\t\t\t\tonChange={ () =>\n\t\t\t\t\t\t\t\tsetApplyTemplateLock( ! applyTemplateLock )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</fieldset>\n\t\t\t\t<Flex\n\t\t\t\t\tclassName=\"block-editor-block-lock-modal__actions\"\n\t\t\t\t\tjustify=\"flex-end\"\n\t\t\t\t\texpanded={ false }\n\t\t\t\t>\n\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\tonClick={ onClose }\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</FlexItem>\n\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t>\n\t\t\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AApB,QAAA,EAEnB9D,EAAE,CAAE,OAAQ;UAAC,CACR;QAAC,CACA,CAAC;MAAA,CACN,CAAC;IAAA,CACF;EAAC,CACD,CAAC;AAEV","ignoreList":[]}
1
+ {"version":3,"names":["__","sprintf","useEffect","useState","Button","CheckboxControl","Flex","FlexItem","Icon","Modal","ToggleControl","lock","lockIcon","unlock","unlockIcon","useDispatch","useSelect","getBlockType","useBlockLock","useBlockDisplayInformation","store","blockEditorStore","jsx","_jsx","jsxs","_jsxs","ALLOWS_EDIT_LOCKING","getTemplateLockValue","remove","move","BlockLockModal","clientId","onClose","setLock","canEdit","canMove","canRemove","allowsEditLocking","templateLock","hasTemplateLock","select","getBlockName","getBlockAttributes","blockName","blockType","includes","attributes","applyTemplateLock","setApplyTemplateLock","updateBlockAttributes","blockInformation","edit","isAllChecked","Object","values","every","Boolean","isMixed","some","title","overlayClassName","onRequestClose","children","onSubmit","event","preventDefault","undefined","className","role","__nextHasNoMarginBottom","label","checked","indeterminate","onChange","newValue","prevLock","icon","disabled","justify","expanded","variant","onClick","__next40pxDefaultSize","type"],"sources":["@wordpress/block-editor/src/components/block-lock/modal.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useEffect, useState } from '@wordpress/element';\nimport {\n\tButton,\n\tCheckboxControl,\n\tFlex,\n\tFlexItem,\n\tIcon,\n\tModal,\n\tToggleControl,\n} from '@wordpress/components';\nimport { lock as lockIcon, unlock as unlockIcon } from '@wordpress/icons';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { getBlockType } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport useBlockLock from './use-block-lock';\nimport useBlockDisplayInformation from '../use-block-display-information';\nimport { store as blockEditorStore } from '../../store';\n\n// Entity based blocks which allow edit locking\nconst ALLOWS_EDIT_LOCKING = [ 'core/navigation' ];\n\nfunction getTemplateLockValue( lock ) {\n\t// Prevents all operations.\n\tif ( lock.remove && lock.move ) {\n\t\treturn 'all';\n\t}\n\n\t// Prevents inserting or removing blocks, but allows moving existing blocks.\n\tif ( lock.remove && ! lock.move ) {\n\t\treturn 'insert';\n\t}\n\n\treturn false;\n}\n\nexport default function BlockLockModal( { clientId, onClose } ) {\n\tconst [ lock, setLock ] = useState( { move: false, remove: false } );\n\tconst { canEdit, canMove, canRemove } = useBlockLock( clientId );\n\tconst { allowsEditLocking, templateLock, hasTemplateLock } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockName, getBlockAttributes } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst blockName = getBlockName( clientId );\n\t\t\tconst blockType = getBlockType( blockName );\n\n\t\t\treturn {\n\t\t\t\tallowsEditLocking: ALLOWS_EDIT_LOCKING.includes( blockName ),\n\t\t\t\ttemplateLock: getBlockAttributes( clientId )?.templateLock,\n\t\t\t\thasTemplateLock: !! blockType?.attributes?.templateLock,\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\tconst [ applyTemplateLock, setApplyTemplateLock ] = useState(\n\t\t!! templateLock\n\t);\n\tconst { updateBlockAttributes } = useDispatch( blockEditorStore );\n\tconst blockInformation = useBlockDisplayInformation( clientId );\n\n\tuseEffect( () => {\n\t\tsetLock( {\n\t\t\tmove: ! canMove,\n\t\t\tremove: ! canRemove,\n\t\t\t...( allowsEditLocking ? { edit: ! canEdit } : {} ),\n\t\t} );\n\t}, [ canEdit, canMove, canRemove, allowsEditLocking ] );\n\n\tconst isAllChecked = Object.values( lock ).every( Boolean );\n\tconst isMixed = Object.values( lock ).some( Boolean ) && ! isAllChecked;\n\n\treturn (\n\t\t<Modal\n\t\t\ttitle={ sprintf(\n\t\t\t\t/* translators: %s: Name of the block. */\n\t\t\t\t__( 'Lock %s' ),\n\t\t\t\tblockInformation.title\n\t\t\t) }\n\t\t\toverlayClassName=\"block-editor-block-lock-modal\"\n\t\t\tonRequestClose={ onClose }\n\t\t>\n\t\t\t<form\n\t\t\t\tonSubmit={ ( event ) => {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tupdateBlockAttributes( [ clientId ], {\n\t\t\t\t\t\tlock,\n\t\t\t\t\t\ttemplateLock: applyTemplateLock\n\t\t\t\t\t\t\t? getTemplateLockValue( lock )\n\t\t\t\t\t\t\t: undefined,\n\t\t\t\t\t} );\n\t\t\t\t\tonClose();\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t<fieldset className=\"block-editor-block-lock-modal__options\">\n\t\t\t\t\t<legend>\n\t\t\t\t\t\t{ __( 'Select the features you want to lock' ) }\n\t\t\t\t\t</legend>\n\t\t\t\t\t{ /*\n\t\t\t\t\t * Disable reason: The `list` ARIA role is redundant but\n\t\t\t\t\t * Safari+VoiceOver won't announce the list otherwise.\n\t\t\t\t\t */\n\t\t\t\t\t/* eslint-disable jsx-a11y/no-redundant-roles */ }\n\t\t\t\t\t<ul\n\t\t\t\t\t\trole=\"list\"\n\t\t\t\t\t\tclassName=\"block-editor-block-lock-modal__checklist\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<CheckboxControl\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\tclassName=\"block-editor-block-lock-modal__options-all\"\n\t\t\t\t\t\t\t\tlabel={ __( 'Lock all' ) }\n\t\t\t\t\t\t\t\tchecked={ isAllChecked }\n\t\t\t\t\t\t\t\tindeterminate={ isMixed }\n\t\t\t\t\t\t\t\tonChange={ ( newValue ) =>\n\t\t\t\t\t\t\t\t\tsetLock( {\n\t\t\t\t\t\t\t\t\t\tmove: newValue,\n\t\t\t\t\t\t\t\t\t\tremove: newValue,\n\t\t\t\t\t\t\t\t\t\t...( allowsEditLocking\n\t\t\t\t\t\t\t\t\t\t\t? { edit: newValue }\n\t\t\t\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}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<ul\n\t\t\t\t\t\t\t\trole=\"list\"\n\t\t\t\t\t\t\t\tclassName=\"block-editor-block-lock-modal__checklist\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ allowsEditLocking && (\n\t\t\t\t\t\t\t\t\t<li className=\"block-editor-block-lock-modal__checklist-item\">\n\t\t\t\t\t\t\t\t\t\t<CheckboxControl\n\t\t\t\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Lock editing' ) }\n\t\t\t\t\t\t\t\t\t\t\tchecked={ !! lock.edit }\n\t\t\t\t\t\t\t\t\t\t\tonChange={ ( edit ) =>\n\t\t\t\t\t\t\t\t\t\t\t\tsetLock( ( prevLock ) => ( {\n\t\t\t\t\t\t\t\t\t\t\t\t\t...prevLock,\n\t\t\t\t\t\t\t\t\t\t\t\t\tedit,\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/>\n\t\t\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"block-editor-block-lock-modal__lock-icon\"\n\t\t\t\t\t\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t\t\t\t\t\tlock.edit\n\t\t\t\t\t\t\t\t\t\t\t\t\t? lockIcon\n\t\t\t\t\t\t\t\t\t\t\t\t\t: unlockIcon\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t<li className=\"block-editor-block-lock-modal__checklist-item\">\n\t\t\t\t\t\t\t\t\t<CheckboxControl\n\t\t\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Lock movement' ) }\n\t\t\t\t\t\t\t\t\t\tchecked={ lock.move }\n\t\t\t\t\t\t\t\t\t\tonChange={ ( move ) =>\n\t\t\t\t\t\t\t\t\t\t\tsetLock( ( prevLock ) => ( {\n\t\t\t\t\t\t\t\t\t\t\t\t...prevLock,\n\t\t\t\t\t\t\t\t\t\t\t\tmove,\n\t\t\t\t\t\t\t\t\t\t\t} ) )\n\t\t\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<Icon\n\t\t\t\t\t\t\t\t\t\tclassName=\"block-editor-block-lock-modal__lock-icon\"\n\t\t\t\t\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t\t\t\t\tlock.move ? lockIcon : unlockIcon\n\t\t\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</li>\n\t\t\t\t\t\t\t\t<li className=\"block-editor-block-lock-modal__checklist-item\">\n\t\t\t\t\t\t\t\t\t<CheckboxControl\n\t\t\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Lock removal' ) }\n\t\t\t\t\t\t\t\t\t\tchecked={ lock.remove }\n\t\t\t\t\t\t\t\t\t\tonChange={ ( remove ) =>\n\t\t\t\t\t\t\t\t\t\t\tsetLock( ( prevLock ) => ( {\n\t\t\t\t\t\t\t\t\t\t\t\t...prevLock,\n\t\t\t\t\t\t\t\t\t\t\t\tremove,\n\t\t\t\t\t\t\t\t\t\t\t} ) )\n\t\t\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<Icon\n\t\t\t\t\t\t\t\t\t\tclassName=\"block-editor-block-lock-modal__lock-icon\"\n\t\t\t\t\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t\t\t\t\tlock.remove ? lockIcon : unlockIcon\n\t\t\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</li>\n\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ul>\n\t\t\t\t\t{ /* eslint-enable jsx-a11y/no-redundant-roles */ }\n\t\t\t\t\t{ hasTemplateLock && (\n\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\tclassName=\"block-editor-block-lock-modal__template-lock\"\n\t\t\t\t\t\t\tlabel={ __( 'Apply to all blocks inside' ) }\n\t\t\t\t\t\t\tchecked={ applyTemplateLock }\n\t\t\t\t\t\t\tdisabled={ lock.move && ! lock.remove }\n\t\t\t\t\t\t\tonChange={ () =>\n\t\t\t\t\t\t\t\tsetApplyTemplateLock( ! applyTemplateLock )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</fieldset>\n\t\t\t\t<Flex\n\t\t\t\t\tclassName=\"block-editor-block-lock-modal__actions\"\n\t\t\t\t\tjustify=\"flex-end\"\n\t\t\t\t\texpanded={ false }\n\t\t\t\t>\n\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\tonClick={ onClose }\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</FlexItem>\n\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Apply' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</FlexItem>\n\t\t\t\t</Flex>\n\t\t\t</form>\n\t\t</Modal>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAC7C,SAASC,SAAS,EAAEC,QA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":3,"names":["useCallback","useInstanceId","CheckboxControl","BlockTypesChecklist","jsx","_jsx","jsxs","_jsxs","BlockManagerCategory","title","blockTypes","selectedBlockTypes","onChange","instanceId","toggleVisible","blockType","nextIsChecked","filter","name","toggleAllVisible","find","selectedBlockType","length","checkedBlockNames","map","type","some","titleId","isAllChecked","isIndeterminate","role","className","children","__nextHasNoMarginBottom","checked","indeterminate","label","id","value","onItemChange"],"sources":["@wordpress/block-editor/src/components/block-manager/category.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useCallback } from '@wordpress/element';\nimport { useInstanceId } from '@wordpress/compose';\nimport { CheckboxControl } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport BlockTypesChecklist from './checklist';\n\nfunction BlockManagerCategory( {\n\ttitle,\n\tblockTypes,\n\tselectedBlockTypes,\n\tonChange,\n} ) {\n\tconst instanceId = useInstanceId( BlockManagerCategory );\n\n\tconst toggleVisible = useCallback(\n\t\t( blockType, nextIsChecked ) => {\n\t\t\tif ( nextIsChecked ) {\n\t\t\t\tonChange( [ ...selectedBlockTypes, blockType ] );\n\t\t\t} else {\n\t\t\t\tonChange(\n\t\t\t\t\tselectedBlockTypes.filter(\n\t\t\t\t\t\t( { name } ) => name !== blockType.name\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t\t[ selectedBlockTypes, onChange ]\n\t);\n\n\tconst toggleAllVisible = useCallback(\n\t\t( nextIsChecked ) => {\n\t\t\tif ( nextIsChecked ) {\n\t\t\t\tonChange( [\n\t\t\t\t\t...selectedBlockTypes,\n\t\t\t\t\t...blockTypes.filter(\n\t\t\t\t\t\t( blockType ) =>\n\t\t\t\t\t\t\t! selectedBlockTypes.find(\n\t\t\t\t\t\t\t\t( { name } ) => name === blockType.name\n\t\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t\t\t] );\n\t\t\t} else {\n\t\t\t\tonChange(\n\t\t\t\t\tselectedBlockTypes.filter(\n\t\t\t\t\t\t( selectedBlockType ) =>\n\t\t\t\t\t\t\t! blockTypes.find(\n\t\t\t\t\t\t\t\t( { name } ) => name === selectedBlockType.name\n\t\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t\t[ blockTypes, selectedBlockTypes, onChange ]\n\t);\n\n\tif ( ! blockTypes.length ) {\n\t\treturn null;\n\t}\n\n\tconst checkedBlockNames = blockTypes\n\t\t.map( ( { name } ) => name )\n\t\t.filter( ( type ) =>\n\t\t\t( selectedBlockTypes ?? [] ).some(\n\t\t\t\t( selectedBlockType ) => selectedBlockType.name === type\n\t\t\t)\n\t\t);\n\n\tconst titleId = 'block-editor-block-manager__category-title-' + instanceId;\n\n\tconst isAllChecked = checkedBlockNames.length === blockTypes.length;\n\tconst isIndeterminate = ! isAllChecked && checkedBlockNames.length > 0;\n\n\treturn (\n\t\t<div\n\t\t\trole=\"group\"\n\t\t\taria-labelledby={ titleId }\n\t\t\tclassName=\"block-editor-block-manager__category\"\n\t\t>\n\t\t\t<CheckboxControl\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\tchecked={ isAllChecked }\n\t\t\t\tonChange={ toggleAllVisible }\n\t\t\t\tclassName=\"block-editor-block-manager__category-title\"\n\t\t\t\tindeterminate={ isIndeterminate }\n\t\t\t\tlabel={ <span id={ titleId }>{ title }</span> }\n\t\t\t/>\n\t\t\t<BlockTypesChecklist\n\t\t\t\tblockTypes={ blockTypes }\n\t\t\t\tvalue={ checkedBlockNames }\n\t\t\t\tonItemChange={ toggleVisible }\n\t\t\t/>\n\t\t</div>\n\t);\n}\n\nexport default BlockManagerCategory;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,WAAW,QAAQ,oBAAoB;AAChD,SAASC,aAAa,QAAQ,oBAAoB;AAClD,SAASC,eAAe,QAAQ,uBAAuB;;AAEvD;AACA;AACA;AACA,OAAOC,mBAAmB,MAAM,aAAa;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IA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AK,CAAC,KAAMA,IAAK,CAAC,CAC3BD,MAAM,CAAIQ,IAAI,IACd,CAAEd,kBAAkB,aAAlBA,kBAAkB,cAAlBA,kBAAkB,GAAI,EAAE,EAAGe,IAAI,CAC9BL,iBAAiB,IAAMA,iBAAiB,CAACH,IAAI,KAAKO,IACrD,CACD,CAAC;EAEF,MAAME,OAAO,GAAG,6CAA6C,GAAGd,UAAU;EAE1E,MAAMe,YAAY,GAAGL,iBAAiB,CAACD,MAAM,KAAKZ,UAAU,CAACY,MAAM;EACnE,MAAMO,eAAe,GAAG,CAAED,YAAY,IAAIL,iBAAiB,CAACD,MAAM,GAAG,CAAC;EAEtE,oBACCf,KAAA;IACCuB,IAAI,EAAC,OAAO;IACZ,mBAAkBH,OAAS;IAC3BI,SAAS,EAAC,sCAAsC;IAAAC,QAAA,gBAEhD3B,IAAA,CAACH,eAAe;MACf+B,uBAAuB;MACvBC,OAAO,EAAGN,YAAc;MACxBhB,QAAQ,EAAGO,gBAAkB;MAC7BY,SAAS,EAAC,4CAA4C;MACtDI,aAAa,EAAGN,eAAiB;MACjCO,KAAK,eAAG/B,IAAA;QAAMgC,EAAE,EAAGV,OAAS;QAAAK,QAAA,EAAGvB;MAAK,CAAQ;IAAG,CAC/C,CAAC,eACFJ,IAAA,CAACF,mBAAmB;MACnBO,UAAU,EAAGA,UAAY;MACzB4B,KAAK,EAAGf,iBAAmB;MAC3BgB,YAAY,EAAGzB;IAAe,CAC9B,CAAC;EAAA,CACE,CAAC;AAER;AAEA,eAAeN,oBAAoB","ignoreList":[]}
1
+ {"version":3,"names":["useCallback","useInstanceId","CheckboxControl","BlockTypesChecklist","jsx","_jsx","jsxs","_jsxs","BlockManagerCategory","title","blockTypes","selectedBlockTypes","onChange","instanceId","toggleVisible","blockType","nextIsChecked","filter","name","toggleAllVisible","find","selectedBlockType","length","checkedBlockNames","map","type","some","titleId","isAllChecked","isIndeterminate","role","className","children","__nextHasNoMarginBottom","checked","indeterminate","label","id","value","onItemChange"],"sources":["@wordpress/block-editor/src/components/block-manager/category.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useCallback } from '@wordpress/element';\nimport { useInstanceId } from '@wordpress/compose';\nimport { CheckboxControl } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport BlockTypesChecklist from './checklist';\n\nfunction BlockManagerCategory( {\n\ttitle,\n\tblockTypes,\n\tselectedBlockTypes,\n\tonChange,\n} ) {\n\tconst instanceId = useInstanceId( BlockManagerCategory );\n\n\tconst toggleVisible = useCallback(\n\t\t( blockType, nextIsChecked ) => {\n\t\t\tif ( nextIsChecked ) {\n\t\t\t\tonChange( [ ...selectedBlockTypes, blockType ] );\n\t\t\t} else {\n\t\t\t\tonChange(\n\t\t\t\t\tselectedBlockTypes.filter(\n\t\t\t\t\t\t( { name } ) => name !== blockType.name\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t\t[ selectedBlockTypes, onChange ]\n\t);\n\n\tconst toggleAllVisible = useCallback(\n\t\t( nextIsChecked ) => {\n\t\t\tif ( nextIsChecked ) {\n\t\t\t\tonChange( [\n\t\t\t\t\t...selectedBlockTypes,\n\t\t\t\t\t...blockTypes.filter(\n\t\t\t\t\t\t( blockType ) =>\n\t\t\t\t\t\t\t! selectedBlockTypes.find(\n\t\t\t\t\t\t\t\t( { name } ) => name === blockType.name\n\t\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t\t\t] );\n\t\t\t} else {\n\t\t\t\tonChange(\n\t\t\t\t\tselectedBlockTypes.filter(\n\t\t\t\t\t\t( selectedBlockType ) =>\n\t\t\t\t\t\t\t! blockTypes.find(\n\t\t\t\t\t\t\t\t( { name } ) => name === selectedBlockType.name\n\t\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t\t[ blockTypes, selectedBlockTypes, onChange ]\n\t);\n\n\tif ( ! blockTypes.length ) {\n\t\treturn null;\n\t}\n\n\tconst checkedBlockNames = blockTypes\n\t\t.map( ( { name } ) => name )\n\t\t.filter( ( type ) =>\n\t\t\t( selectedBlockTypes ?? [] ).some(\n\t\t\t\t( selectedBlockType ) => selectedBlockType.name === type\n\t\t\t)\n\t\t);\n\n\tconst titleId = 'block-editor-block-manager__category-title-' + instanceId;\n\n\tconst isAllChecked = checkedBlockNames.length === blockTypes.length;\n\tconst isIndeterminate = ! isAllChecked && checkedBlockNames.length > 0;\n\n\treturn (\n\t\t<div\n\t\t\trole=\"group\"\n\t\t\taria-labelledby={ titleId }\n\t\t\tclassName=\"block-editor-block-manager__category\"\n\t\t>\n\t\t\t<CheckboxControl\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\tchecked={ isAllChecked }\n\t\t\t\tonChange={ toggleAllVisible }\n\t\t\t\tclassName=\"block-editor-block-manager__category-title\"\n\t\t\t\tindeterminate={ isIndeterminate }\n\t\t\t\tlabel={ <span id={ titleId }>{ title }</span> }\n\t\t\t/>\n\t\t\t<BlockTypesChecklist\n\t\t\t\tblockTypes={ blockTypes }\n\t\t\t\tvalue={ checkedBlockNames }\n\t\t\t\tonItemChange={ toggleVisible }\n\t\t\t/>\n\t\t</div>\n\t);\n}\n\nexport default BlockManagerCategory;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,WAAW,QAAQ,oBAAoB;AAChD,SAASC,aAAa,QAAQ,oBAAoB;AAClD,SAASC,eAAe,QAAQ,uBAAuB;;AAEvD;AACA;AACA;AACA,OAAOC,mBAAmB,MAAM,aAAa;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAE9C,SAASC,oBAAoBA,CAAE;EAC9BC,KAAK;EACLC,UAAU;EACVC,kBAAkB;EAClBC;AACD,CAAC,EAAG;EACH,MAAMC,UAAU,GAAGZ,aAAa,CAAEO,oBAAqB,CAAC;EAExD,MAAMM,aAAa,GAAGd,WAAW,CAChC,CAAEe,SAAS,EAAEC,aAAa,KAAM;IAC/B,IAAKA,aAAa,EAA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AAMe,YAAY,GAAGL,iBAAiB,CAACD,MAAM,KAAKZ,UAAU,CAACY,MAAM;EACnE,MAAMO,eAAe,GAAG,CAAED,YAAY,IAAIL,iBAAiB,CAACD,MAAM,GAAG,CAAC;EAEtE,oBACCf,KAAA;IACCuB,IAAI,EAAC,OAAO;IACZ,mBAAkBH,OAAS;IAC3BI,SAAS,EAAC,sCAAsC;IAAAC,QAAA,gBAEhD3B,IAAA,CAACH,eAAe;MACf+B,uBAAuB;MACvBC,OAAO,EAAGN,YAAc;MACxBhB,QAAQ,EAAGO,gBAAkB;MAC7BY,SAAS,EAAC,4CAA4C;MACtDI,aAAa,EAAGN,eAAiB;MACjCO,KAAK,eAAG/B,IAAA;QAAMgC,EAAE,EAAGV,OAAS;QAAAK,QAAA,EAAGvB;MAAK,CAAQ;IAAG,CAC/C,CAAC,eACFJ,IAAA,CAACF,mBAAmB;MACnBO,UAAU,EAAGA,UAAY;MACzB4B,KAAK,EAAGf,iBAAmB;MAC3BgB,YAAY,EAAGzB;IAAe,CAC9B,CAAC;EAAA,CACE,CAAC;AAER;AAEA,eAAeN,oBAAoB","ignoreList":[]}
@@ -1,3 +1,4 @@
1
+ /* wp:polyfill */
1
2
  /**
2
3
  * WordPress dependencies
3
4
  */
@@ -1 +1 @@
1
- {"version":3,"names":["CheckboxControl","BlockIcon","jsx","_jsx","jsxs","_jsxs","BlockTypesChecklist","blockTypes","value","onItemChange","className","children","map","blockType","__nextHasNoMarginBottom","label","title","checked","includes","name","onChange","args","icon"],"sources":["@wordpress/block-editor/src/components/block-manager/checklist.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { CheckboxControl } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport BlockIcon from '../block-icon';\n\nfunction BlockTypesChecklist( { blockTypes, value, onItemChange } ) {\n\treturn (\n\t\t<ul className=\"block-editor-block-manager__checklist\">\n\t\t\t{ blockTypes.map( ( blockType ) => (\n\t\t\t\t<li\n\t\t\t\t\tkey={ blockType.name }\n\t\t\t\t\tclassName=\"block-editor-block-manager__checklist-item\"\n\t\t\t\t>\n\t\t\t\t\t<CheckboxControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\tlabel={ blockType.title }\n\t\t\t\t\t\tchecked={ value.includes( blockType.name ) }\n\t\t\t\t\t\tonChange={ ( ...args ) =>\n\t\t\t\t\t\t\tonItemChange( blockType, ...args )\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t\t<BlockIcon icon={ blockType.icon } />\n\t\t\t\t</li>\n\t\t\t) ) }\n\t\t</ul>\n\t);\n}\n\nexport default BlockTypesChecklist;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,eAAe,QAAQ,uBAAuB;;AAEvD;AACA;AACA;AACA,OAAOC,SAAS,MAAM,eAAe;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAEtC,SAASC,mBAAmBA,CAAE;EAAEC,UAAU;EAAEC,KAAK;EAAEC;AAAa,CAAC,EAAG;EACnE,oBACCN,IAAA;IAAIO,SAAS,EAAC,uCAAuC;IAAAC,QAAA,EAClDJ,UAAU,CAACK,GAAG,CAAIC,SAAS,iBAC5BR,KAAA;MAECK,SAAS,EAAC,4CAA4C;MAAAC,QAAA,gBAEtDR,IAAA,CAACH,eAAe;QACfc,uBAAuB;QACvBC,KAAK,EAAGF,SAAS,CAACG,KAAO;QACzBC,OAAO,EAAGT,KAAK,CAACU,QAAQ,CAAEL,SAAS,CAACM,IAAK,CAAG;QAC5CC,QAAQ,EAAGA,CAAE,GAAGC,IAAI,KACnBZ,YAAY,CAAEI,SAAS,EAAE,GAAGQ,IAAK;MACjC,CACD,CAAC,eACFlB,IAAA,CAACF,SAAS;QAACqB,IAAI,EAAGT,SAAS,CAACS;MAAM,CAAE,CAAC;IAAA,GAX/BT,SAAS,CAACM,IAYb,CACH;EAAC,CACA,CAAC;AAEP;AAEA,eAAeb,mBAAmB","ignoreList":[]}
1
+ {"version":3,"names":["CheckboxControl","BlockIcon","jsx","_jsx","jsxs","_jsxs","BlockTypesChecklist","blockTypes","value","onItemChange","className","children","map","blockType","__nextHasNoMarginBottom","label","title","checked","includes","name","onChange","args","icon"],"sources":["@wordpress/block-editor/src/components/block-manager/checklist.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { CheckboxControl } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport BlockIcon from '../block-icon';\n\nfunction BlockTypesChecklist( { blockTypes, value, onItemChange } ) {\n\treturn (\n\t\t<ul className=\"block-editor-block-manager__checklist\">\n\t\t\t{ blockTypes.map( ( blockType ) => (\n\t\t\t\t<li\n\t\t\t\t\tkey={ blockType.name }\n\t\t\t\t\tclassName=\"block-editor-block-manager__checklist-item\"\n\t\t\t\t>\n\t\t\t\t\t<CheckboxControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\tlabel={ blockType.title }\n\t\t\t\t\t\tchecked={ value.includes( blockType.name ) }\n\t\t\t\t\t\tonChange={ ( ...args ) =>\n\t\t\t\t\t\t\tonItemChange( blockType, ...args )\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t\t<BlockIcon icon={ blockType.icon } />\n\t\t\t\t</li>\n\t\t\t) ) }\n\t\t</ul>\n\t);\n}\n\nexport default BlockTypesChecklist;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,eAAe,QAAQ,uBAAuB;;AAEvD;AACA;AACA;AACA,OAAOC,SAAS,MAAM,eAAe;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAEtC,SAASC,mBAAmBA,CAAE;EAAEC,UAAU;EAAEC,KAAK;EAAEC;AAAa,CAAC,EAAG;EACnE,oBACCN,IAAA;IAAIO,SAAS,EAAC,uCAAuC;IAAAC,QAAA,EAClDJ,UAAU,CAACK,GAAG,CAAIC,SAAS,iBAC5BR,KAAA;MAECK,SAAS,EAAC,4CAA4C;MAAAC,QAAA,gBAEtDR,IAAA,CAACH,eAAe;QACfc,uBAAuB;QACvBC,KAAK,EAAGF,SAAS,CAACG,KAAO;QACzBC,OAAO,EAAGT,KAAK,CAACU,QAAQ,CAAEL,SAAS,CAACM,IAAK,CAAG;QAC5CC,QAAQ,EAAGA,CAAE,GAAGC,IAAI,KACnBZ,YAAY,CAAEI,SAAS,EAAE,GAAGQ,IAAK;MACjC,CACD,CAAC,eACFlB,IAAA,CAACF,SAAS;QAACqB,IAAI,EAAGT,SAAS,CAACS;MAAM,CAAE,CAAC;IAAA,GAX/BT,SAAS,CAACM,IAYb,CACH;EAAC,CACA,CAAC;AAEP;AAEA,eAAeb,mBAAmB","ignoreList":[]}
@@ -1,3 +1,4 @@
1
+ /* wp:polyfill */
1
2
  /**
2
3
  * WordPress dependencies
3
4
  */
@@ -1 +1 @@
1
- {"version":3,"names":["store","blocksStore","useSelect","SearchControl","Button","__","_n","sprintf","useEffect","useState","useDebounce","speak","BlockManagerCategory","jsx","_jsx","jsxs","_jsxs","BlockManager","blockTypes","selectedBlockTypes","onChange","debouncedSpeak","search","setSearch","categories","isMatchingSearchTerm","select","getCategories","enableAllBlockTypes","filteredBlockTypes","filter","blockType","numberOfHiddenBlocks","length","count","resultsFoundMessage","className","children","__next40pxDefaultSize","variant","onClick","__nextHasNoMarginBottom","label","placeholder","value","nextSearch","tabIndex","role","map","category","title","slug"],"sources":["@wordpress/block-editor/src/components/block-manager/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport { useSelect } from '@wordpress/data';\nimport { SearchControl, Button } from '@wordpress/components';\nimport { __, _n, sprintf } from '@wordpress/i18n';\nimport { useEffect, useState } from '@wordpress/element';\nimport { useDebounce } from '@wordpress/compose';\nimport { speak } from '@wordpress/a11y';\n\n/**\n * Internal dependencies\n */\nimport BlockManagerCategory from './category';\n\n/**\n * Provides a list of blocks with checkboxes.\n *\n * @param {Object} props Props.\n * @param {Array} props.blockTypes An array of blocks.\n * @param {Array} props.selectedBlockTypes An array of selected blocks.\n * @param {Function} props.onChange Function to be called when the selected blocks change.\n */\nexport default function BlockManager( {\n\tblockTypes,\n\tselectedBlockTypes,\n\tonChange,\n} ) {\n\tconst debouncedSpeak = useDebounce( speak, 500 );\n\tconst [ search, setSearch ] = useState( '' );\n\tconst { categories, isMatchingSearchTerm } = useSelect( ( select ) => {\n\t\treturn {\n\t\t\tcategories: select( blocksStore ).getCategories(),\n\t\t\tisMatchingSearchTerm: select( blocksStore ).isMatchingSearchTerm,\n\t\t};\n\t}, [] );\n\n\tfunction enableAllBlockTypes() {\n\t\tonChange( blockTypes );\n\t}\n\n\tconst filteredBlockTypes = blockTypes.filter( ( blockType ) => {\n\t\treturn ! search || isMatchingSearchTerm( blockType, search );\n\t} );\n\n\tconst numberOfHiddenBlocks = blockTypes.length - selectedBlockTypes.length;\n\n\t// Announce search results on change\n\tuseEffect( () => {\n\t\tif ( ! search ) {\n\t\t\treturn;\n\t\t}\n\t\tconst count = filteredBlockTypes.length;\n\t\tconst resultsFoundMessage = sprintf(\n\t\t\t/* translators: %d: number of results. */\n\t\t\t_n( '%d result found.', '%d results found.', count ),\n\t\t\tcount\n\t\t);\n\t\tdebouncedSpeak( resultsFoundMessage );\n\t}, [ filteredBlockTypes?.length, search, debouncedSpeak ] );\n\n\treturn (\n\t\t<div className=\"block-editor-block-manager__content\">\n\t\t\t{ !! numberOfHiddenBlocks && (\n\t\t\t\t<div className=\"block-editor-block-manager__disabled-blocks-count\">\n\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t/* translators: %d: number of blocks. */\n\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t'%d block is hidden.',\n\t\t\t\t\t\t\t'%d blocks are hidden.',\n\t\t\t\t\t\t\tnumberOfHiddenBlocks\n\t\t\t\t\t\t),\n\t\t\t\t\t\tnumberOfHiddenBlocks\n\t\t\t\t\t) }\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvariant=\"link\"\n\t\t\t\t\t\tonClick={ enableAllBlockTypes }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Reset' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t<SearchControl\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\tlabel={ __( 'Search for a block' ) }\n\t\t\t\tplaceholder={ __( 'Search for a block' ) }\n\t\t\t\tvalue={ search }\n\t\t\t\tonChange={ ( nextSearch ) => setSearch( nextSearch ) }\n\t\t\t\tclassName=\"block-editor-block-manager__search\"\n\t\t\t/>\n\t\t\t<div\n\t\t\t\ttabIndex=\"0\"\n\t\t\t\trole=\"region\"\n\t\t\t\taria-label={ __( 'Available block types' ) }\n\t\t\t\tclassName=\"block-editor-block-manager__results\"\n\t\t\t>\n\t\t\t\t{ filteredBlockTypes.length === 0 && (\n\t\t\t\t\t<p className=\"block-editor-block-manager__no-results\">\n\t\t\t\t\t\t{ __( 'No blocks found.' ) }\n\t\t\t\t\t</p>\n\t\t\t\t) }\n\t\t\t\t{ categories.map( ( category ) => (\n\t\t\t\t\t<BlockManagerCategory\n\t\t\t\t\t\tkey={ category.slug }\n\t\t\t\t\t\ttitle={ category.title }\n\t\t\t\t\t\tblockTypes={ filteredBlockTypes.filter(\n\t\t\t\t\t\t\t( blockType ) =>\n\t\t\t\t\t\t\t\tblockType.category === category.slug\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tselectedBlockTypes={ selectedBlockTypes }\n\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t\t<BlockManagerCategory\n\t\t\t\t\ttitle={ __( 'Uncategorized' ) }\n\t\t\t\t\tblockTypes={ filteredBlockTypes.filter(\n\t\t\t\t\t\t( { category } ) => ! category\n\t\t\t\t\t) }\n\t\t\t\t\tselectedBlockTypes={ selectedBlockTypes }\n\t\t\t\t\tonChange={ onChange }\n\t\t\t\t/>\n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5C+B,SAAS,EAAC,qCAAqC;MAAAC,QAAA,GAE7CR,kBAAkB,CAACI,MAAM,KAAK,CAAC,iBAChCnB,IAAA;QAAGsB,SAAS,EAAC,wCAAwC;QAAAC,QAAA,EAClDhC,EAAE,CAAE,kBAAmB;MAAC,CACxB,CACH,EACCmB,UAAU,CAACwB,GAAG,CAAIC,QAAQ,iBAC3BnC,IAAA,CAACF,oBAAoB;QAEpBsC,KAAK,EAAGD,QAAQ,CAACC,KAAO;QACxBhC,UAAU,EAAGW,kBAAkB,CAACC,MAAM,CACnCC,SAAS,IACVA,SAAS,CAACkB,QAAQ,KAAKA,QAAQ,CAACE,IAClC,CAAG;QACHhC,kBAAkB,EAAGA,kBAAoB;QACzCC,QAAQ,EAAGA;MAAU,GAPf6B,QAAQ,CAACE,IAQf,CACA,CAAC,eACHrC,IAAA,CAACF,oBAAoB;QACpBsC,KAAK,EAAG7C,EAAE,CAAE,eAAgB,CAAG;QAC/Ba,UAAU,EAAGW,kBAAkB,CAACC,MAAM,CACrC,CAAE;UAAEmB;QAAS,CAAC,KAAM,CAAEA,QACvB,CAAG;QACH9B,kBAAkB,EAAGA,kBAAoB;QACzCC,QAAQ,EAAGA;MAAU,CACrB,CAAC;IAAA,CACE,CAAC;EAAA,CACF,CAAC;AAER","ignoreList":[]}
1
+ {"version":3,"names":["store","blocksStore","useSelect","SearchControl","Button","__","_n","sprintf","useEffect","useState","useDebounce","speak","BlockManagerCategory","jsx","_jsx","jsxs","_jsxs","BlockManager","blockTypes","selectedBlockTypes","onChange","debouncedSpeak","search","setSearch","categories","isMatchingSearchTerm","select","getCategories","enableAllBlockTypes","filteredBlockTypes","filter","blockType","numberOfHiddenBlocks","length","count","resultsFoundMessage","className","children","__next40pxDefaultSize","variant","onClick","__nextHasNoMarginBottom","label","placeholder","value","nextSearch","tabIndex","role","map","category","title","slug"],"sources":["@wordpress/block-editor/src/components/block-manager/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport { useSelect } from '@wordpress/data';\nimport { SearchControl, Button } from '@wordpress/components';\nimport { __, _n, sprintf } from '@wordpress/i18n';\nimport { useEffect, useState } from '@wordpress/element';\nimport { useDebounce } from '@wordpress/compose';\nimport { speak } from '@wordpress/a11y';\n\n/**\n * Internal dependencies\n */\nimport BlockManagerCategory from './category';\n\n/**\n * Provides a list of blocks with checkboxes.\n *\n * @param {Object} props Props.\n * @param {Array} props.blockTypes An array of blocks.\n * @param {Array} props.selectedBlockTypes An array of selected blocks.\n * @param {Function} props.onChange Function to be called when the selected blocks change.\n */\nexport default function BlockManager( {\n\tblockTypes,\n\tselectedBlockTypes,\n\tonChange,\n} ) {\n\tconst debouncedSpeak = useDebounce( speak, 500 );\n\tconst [ search, setSearch ] = useState( '' );\n\tconst { categories, isMatchingSearchTerm } = useSelect( ( select ) => {\n\t\treturn {\n\t\t\tcategories: select( blocksStore ).getCategories(),\n\t\t\tisMatchingSearchTerm: select( blocksStore ).isMatchingSearchTerm,\n\t\t};\n\t}, [] );\n\n\tfunction enableAllBlockTypes() {\n\t\tonChange( blockTypes );\n\t}\n\n\tconst filteredBlockTypes = blockTypes.filter( ( blockType ) => {\n\t\treturn ! search || isMatchingSearchTerm( blockType, search );\n\t} );\n\n\tconst numberOfHiddenBlocks = blockTypes.length - selectedBlockTypes.length;\n\n\t// Announce search results on change\n\tuseEffect( () => {\n\t\tif ( ! search ) {\n\t\t\treturn;\n\t\t}\n\t\tconst count = filteredBlockTypes.length;\n\t\tconst resultsFoundMessage = sprintf(\n\t\t\t/* translators: %d: number of results. */\n\t\t\t_n( '%d result found.', '%d results found.', count ),\n\t\t\tcount\n\t\t);\n\t\tdebouncedSpeak( resultsFoundMessage );\n\t}, [ filteredBlockTypes?.length, search, debouncedSpeak ] );\n\n\treturn (\n\t\t<div className=\"block-editor-block-manager__content\">\n\t\t\t{ !! numberOfHiddenBlocks && (\n\t\t\t\t<div className=\"block-editor-block-manager__disabled-blocks-count\">\n\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t/* translators: %d: number of blocks. */\n\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t'%d block is hidden.',\n\t\t\t\t\t\t\t'%d blocks are hidden.',\n\t\t\t\t\t\t\tnumberOfHiddenBlocks\n\t\t\t\t\t\t),\n\t\t\t\t\t\tnumberOfHiddenBlocks\n\t\t\t\t\t) }\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvariant=\"link\"\n\t\t\t\t\t\tonClick={ enableAllBlockTypes }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Reset' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t<SearchControl\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\tlabel={ __( 'Search for a block' ) }\n\t\t\t\tplaceholder={ __( 'Search for a block' ) }\n\t\t\t\tvalue={ search }\n\t\t\t\tonChange={ ( nextSearch ) => setSearch( nextSearch ) }\n\t\t\t\tclassName=\"block-editor-block-manager__search\"\n\t\t\t/>\n\t\t\t<div\n\t\t\t\ttabIndex=\"0\"\n\t\t\t\trole=\"region\"\n\t\t\t\taria-label={ __( 'Available block types' ) }\n\t\t\t\tclassName=\"block-editor-block-manager__results\"\n\t\t\t>\n\t\t\t\t{ filteredBlockTypes.length === 0 && (\n\t\t\t\t\t<p className=\"block-editor-block-manager__no-results\">\n\t\t\t\t\t\t{ __( 'No blocks found.' ) }\n\t\t\t\t\t</p>\n\t\t\t\t) }\n\t\t\t\t{ categories.map( ( category ) => (\n\t\t\t\t\t<BlockManagerCategory\n\t\t\t\t\t\tkey={ category.slug }\n\t\t\t\t\t\ttitle={ category.title }\n\t\t\t\t\t\tblockTypes={ filteredBlockTypes.filter(\n\t\t\t\t\t\t\t( blockType ) =>\n\t\t\t\t\t\t\t\tblockType.category === category.slug\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tselectedBlockTypes={ selectedBlockTypes }\n\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t\t<BlockManagerCategory\n\t\t\t\t\ttitle={ __( 'Uncategorized' ) }\n\t\t\t\t\tblockTypes={ filteredBlockTypes.filter(\n\t\t\t\t\t\t( { category } ) => ! category\n\t\t\t\t\t) }\n\t\t\t\t\tselectedBlockTypes={ selectedBlockTypes }\n\t\t\t\t\tonChange={ onChange }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,KAAK,IAAIC,WAAW,QAAQ,mBAAmB;AACxD,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,aAAa,EAAEC,MAAM,QAAQ,uBAAuB;AAC7D,SAASC,EAAE,EAAEC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AACjD,SAASC,SAAS,EAAEC,QAAQ,QAAQ,oBAAoB;AACxD,SAASC,WAAW,QAAQ,oBAAoB;AAChD,SAASC,KAAK,QAAQ,iBAAiB;;AAEvC;AACA;AACA;AACA,OAAOC,oBAAoB,MAAM,YAAY;;AAE7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAPA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAQA,eAAe,SAASC,YAAYA,CAAE;EACrCC,UAAU;EACVC,kBAAkB;EAClBC;AACD,CAAC,EAAG;EACH,MAAMC,cAAc,GAAGX,WAAW,CAAEC,KAAK,EAAE,GAAI,CAAC;EAChD,MAAM,CAAEW,MAAM,EAAEC,SAAS,CAAE,GAAGd,QAAQ,CAAE,EAAG,CAAC;EAC5C,MAAM;IAAEe,UAAU;IAAEC;EAAqB,CAAC,GAAGvB,SAAS,CAAIwB,MAAM,IAAM;IACrE,OAAO;MACNF,UAAU,EAAEE,MAAM,CAAEzB,WAAY,CAAC,CAAC0B,aAAa,CAAC,CAAC;MACjDF,oBAAoB,EAAEC,MAAM,CAAEzB,WAAY,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