@wordpress/block-editor 12.18.1 → 12.19.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 (912) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/build/autocompleters/block.js +1 -2
  3. package/build/autocompleters/block.js.map +1 -1
  4. package/build/autocompleters/link.js +1 -2
  5. package/build/autocompleters/link.js.map +1 -1
  6. package/build/components/alignment-control/ui.js +1 -2
  7. package/build/components/alignment-control/ui.js.map +1 -1
  8. package/build/components/autocomplete/index.js +1 -2
  9. package/build/components/autocomplete/index.js.map +1 -1
  10. package/build/components/block-alignment-control/constants.js +2 -4
  11. package/build/components/block-alignment-control/constants.js.map +1 -1
  12. package/build/components/block-alignment-control/ui.js +1 -2
  13. package/build/components/block-alignment-control/ui.js.map +1 -1
  14. package/build/components/block-alignment-control/ui.native.js +1 -2
  15. package/build/components/block-alignment-control/ui.native.js.map +1 -1
  16. package/build/components/block-alignment-matrix-control/index.js +1 -2
  17. package/build/components/block-alignment-matrix-control/index.js.map +1 -1
  18. package/build/components/block-breadcrumb/index.js +1 -2
  19. package/build/components/block-breadcrumb/index.js.map +1 -1
  20. package/build/components/block-canvas/index.js +1 -2
  21. package/build/components/block-canvas/index.js.map +1 -1
  22. package/build/components/block-caption/index.native.js +1 -2
  23. package/build/components/block-caption/index.native.js.map +1 -1
  24. package/build/components/block-card/index.js +1 -2
  25. package/build/components/block-card/index.js.map +1 -1
  26. package/build/components/block-compare/index.js +1 -2
  27. package/build/components/block-compare/index.js.map +1 -1
  28. package/build/components/block-context/index.js +1 -2
  29. package/build/components/block-context/index.js.map +1 -1
  30. package/build/components/block-controls/groups.js +1 -2
  31. package/build/components/block-controls/groups.js.map +1 -1
  32. package/build/components/block-controls/index.js +1 -2
  33. package/build/components/block-controls/index.js.map +1 -1
  34. package/build/components/block-draggable/dropping-insertion-point.native.js +2 -2
  35. package/build/components/block-draggable/dropping-insertion-point.native.js.map +1 -1
  36. package/build/components/block-draggable/index.js +1 -2
  37. package/build/components/block-draggable/index.js.map +1 -1
  38. package/build/components/block-draggable/index.native.js +3 -4
  39. package/build/components/block-draggable/index.native.js.map +1 -1
  40. package/build/components/block-edit/context.js +4 -8
  41. package/build/components/block-edit/context.js.map +1 -1
  42. package/build/components/block-edit/edit.js +1 -2
  43. package/build/components/block-edit/edit.js.map +1 -1
  44. package/build/components/block-edit/edit.native.js +1 -2
  45. package/build/components/block-edit/edit.native.js.map +1 -1
  46. package/build/components/block-full-height-alignment-control/index.js +1 -2
  47. package/build/components/block-full-height-alignment-control/index.js.map +1 -1
  48. package/build/components/block-icon/index.js +1 -2
  49. package/build/components/block-icon/index.js.map +1 -1
  50. package/build/components/block-icon/index.native.js +1 -2
  51. package/build/components/block-icon/index.native.js.map +1 -1
  52. package/build/components/block-info-slot-fill/index.js +1 -2
  53. package/build/components/block-info-slot-fill/index.js.map +1 -1
  54. package/build/components/block-inspector/index.js +11 -9
  55. package/build/components/block-inspector/index.js.map +1 -1
  56. package/build/components/block-list/block-crash-boundary.js +1 -2
  57. package/build/components/block-list/block-crash-boundary.js.map +1 -1
  58. package/build/components/block-list/block-html.js +1 -2
  59. package/build/components/block-list/block-html.js.map +1 -1
  60. package/build/components/block-list/block-list-context.native.js +1 -2
  61. package/build/components/block-list/block-list-context.native.js.map +1 -1
  62. package/build/components/block-list/block-list-item-cell.native.js +1 -2
  63. package/build/components/block-list/block-list-item-cell.native.js.map +1 -1
  64. package/build/components/block-list/block-list-item.native.js +1 -2
  65. package/build/components/block-list/block-list-item.native.js.map +1 -1
  66. package/build/components/block-list/block-outline.native.js +1 -2
  67. package/build/components/block-list/block-outline.native.js.map +1 -1
  68. package/build/components/block-list/block-selection-button.native.js +1 -2
  69. package/build/components/block-list/block-selection-button.native.js.map +1 -1
  70. package/build/components/block-list/block.js +32 -21
  71. package/build/components/block-list/block.js.map +1 -1
  72. package/build/components/block-list/block.native.js +7 -6
  73. package/build/components/block-list/block.native.js.map +1 -1
  74. package/build/components/block-list/grid-item.native.js +1 -2
  75. package/build/components/block-list/grid-item.native.js.map +1 -1
  76. package/build/components/block-list/index.js +19 -9
  77. package/build/components/block-list/index.js.map +1 -1
  78. package/build/components/block-list/insertion-point.native.js +1 -2
  79. package/build/components/block-list/insertion-point.native.js.map +1 -1
  80. package/build/components/block-list/layout.js +2 -4
  81. package/build/components/block-list/layout.js.map +1 -1
  82. package/build/components/block-list/private-block-context.js +1 -2
  83. package/build/components/block-list/private-block-context.js.map +1 -1
  84. package/build/components/block-list/subdirectory-icon.js +1 -2
  85. package/build/components/block-list/subdirectory-icon.js.map +1 -1
  86. package/build/components/block-list/use-block-props/index.js +8 -1
  87. package/build/components/block-list/use-block-props/index.js.map +1 -1
  88. package/build/components/block-list/use-scroll-upon-insertion.native.js +1 -2
  89. package/build/components/block-list/use-scroll-upon-insertion.native.js.map +1 -1
  90. package/build/components/block-list-appender/index.js +5 -52
  91. package/build/components/block-list-appender/index.js.map +1 -1
  92. package/build/components/block-media-update-progress/index.native.js +11 -22
  93. package/build/components/block-media-update-progress/index.native.js.map +1 -1
  94. package/build/components/block-mover/button.js +2 -4
  95. package/build/components/block-mover/button.js.map +1 -1
  96. package/build/components/block-mover/index.js +1 -2
  97. package/build/components/block-mover/index.js.map +1 -1
  98. package/build/components/block-mover/index.native.js +3 -6
  99. package/build/components/block-mover/index.native.js.map +1 -1
  100. package/build/components/block-mover/mover-description.native.js +0 -2
  101. package/build/components/block-mover/mover-description.native.js.map +1 -1
  102. package/build/components/block-navigation/dropdown.js +1 -2
  103. package/build/components/block-navigation/dropdown.js.map +1 -1
  104. package/build/components/block-pattern-setup/constants.js +1 -2
  105. package/build/components/block-pattern-setup/constants.js.map +1 -1
  106. package/build/components/block-pattern-setup/index.js +1 -2
  107. package/build/components/block-pattern-setup/index.js.map +1 -1
  108. package/build/components/block-pattern-setup/setup-toolbar.js +1 -2
  109. package/build/components/block-pattern-setup/setup-toolbar.js.map +1 -1
  110. package/build/components/block-pattern-setup/use-patterns-setup.js +1 -2
  111. package/build/components/block-pattern-setup/use-patterns-setup.js.map +1 -1
  112. package/build/components/block-patterns-list/index.js +1 -2
  113. package/build/components/block-patterns-list/index.js.map +1 -1
  114. package/build/components/block-popover/drop-zone.js +1 -2
  115. package/build/components/block-popover/drop-zone.js.map +1 -1
  116. package/build/components/block-popover/inbetween.js +2 -4
  117. package/build/components/block-popover/inbetween.js.map +1 -1
  118. package/build/components/block-popover/index.js +1 -2
  119. package/build/components/block-popover/index.js.map +1 -1
  120. package/build/components/block-popover/use-popover-scroll.js +1 -2
  121. package/build/components/block-popover/use-popover-scroll.js.map +1 -1
  122. package/build/components/block-preview/auto.js +2 -1
  123. package/build/components/block-preview/auto.js.map +1 -1
  124. package/build/components/block-preview/index.js +1 -2
  125. package/build/components/block-preview/index.js.map +1 -1
  126. package/build/components/block-removal-warning-modal/index.js +4 -2
  127. package/build/components/block-removal-warning-modal/index.js.map +1 -1
  128. package/build/components/block-settings/button.native.js +1 -2
  129. package/build/components/block-settings/button.native.js.map +1 -1
  130. package/build/components/block-settings/container.native.js +1 -2
  131. package/build/components/block-settings/container.native.js.map +1 -1
  132. package/build/components/block-settings/index.native.js +2 -2
  133. package/build/components/block-settings/index.native.js.map +1 -1
  134. package/build/components/block-settings-menu/block-html-convert-button.js +1 -2
  135. package/build/components/block-settings-menu/block-html-convert-button.js.map +1 -1
  136. package/build/components/block-settings-menu/block-mode-toggle.js +1 -2
  137. package/build/components/block-settings-menu/block-mode-toggle.js.map +1 -1
  138. package/build/components/block-settings-menu/block-settings-dropdown.js +1 -2
  139. package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  140. package/build/components/block-settings-menu/block-settings-menu-first-item.js +1 -2
  141. package/build/components/block-settings-menu/block-settings-menu-first-item.js.map +1 -1
  142. package/build/components/block-settings-menu/index.js +1 -2
  143. package/build/components/block-settings-menu/index.js.map +1 -1
  144. package/build/components/block-settings-menu-controls/index.js +1 -2
  145. package/build/components/block-settings-menu-controls/index.js.map +1 -1
  146. package/build/components/block-styles/index.js +1 -2
  147. package/build/components/block-styles/index.js.map +1 -1
  148. package/build/components/block-styles/index.native.js +1 -2
  149. package/build/components/block-styles/index.native.js.map +1 -1
  150. package/build/components/block-styles/preview.native.js +1 -2
  151. package/build/components/block-styles/preview.native.js.map +1 -1
  152. package/build/components/block-switcher/block-transformations-menu.js +1 -2
  153. package/build/components/block-switcher/block-transformations-menu.js.map +1 -1
  154. package/build/components/block-switcher/block-transformations-menu.native.js +1 -2
  155. package/build/components/block-switcher/block-transformations-menu.native.js.map +1 -1
  156. package/build/components/block-switcher/block-variation-transformations.js +1 -2
  157. package/build/components/block-switcher/block-variation-transformations.js.map +1 -1
  158. package/build/components/block-switcher/index.js +13 -11
  159. package/build/components/block-switcher/index.js.map +1 -1
  160. package/build/components/block-switcher/pattern-transformations-menu.js +1 -2
  161. package/build/components/block-switcher/pattern-transformations-menu.js.map +1 -1
  162. package/build/components/block-switcher/use-transformed-patterns.js +1 -2
  163. package/build/components/block-switcher/use-transformed-patterns.js.map +1 -1
  164. package/build/components/block-title/use-block-display-title.js +21 -28
  165. package/build/components/block-title/use-block-display-title.js.map +1 -1
  166. package/build/components/block-toolbar/block-name-context.js +1 -2
  167. package/build/components/block-toolbar/block-name-context.js.map +1 -1
  168. package/build/components/block-toolbar/block-toolbar-last-item.js +1 -2
  169. package/build/components/block-toolbar/block-toolbar-last-item.js.map +1 -1
  170. package/build/components/block-toolbar/block-toolbar-menu.native.js +1 -2
  171. package/build/components/block-toolbar/block-toolbar-menu.native.js.map +1 -1
  172. package/build/components/block-tools/block-selection-button.js +20 -18
  173. package/build/components/block-tools/block-selection-button.js.map +1 -1
  174. package/build/components/block-tools/index.js +4 -12
  175. package/build/components/block-tools/index.js.map +1 -1
  176. package/build/components/block-tools/insertion-point.js +1 -2
  177. package/build/components/block-tools/insertion-point.js.map +1 -1
  178. package/build/components/block-tools/zoom-out-mode-inserters.js +1 -2
  179. package/build/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
  180. package/build/components/block-types-list/index.js +1 -2
  181. package/build/components/block-types-list/index.js.map +1 -1
  182. package/build/components/block-variation-picker/index.js +1 -2
  183. package/build/components/block-variation-picker/index.js.map +1 -1
  184. package/build/components/block-variation-picker/index.native.js +1 -2
  185. package/build/components/block-variation-picker/index.native.js.map +1 -1
  186. package/build/components/block-variation-transforms/index.js +1 -2
  187. package/build/components/block-variation-transforms/index.js.map +1 -1
  188. package/build/components/block-vertical-alignment-control/icons.js +5 -10
  189. package/build/components/block-vertical-alignment-control/icons.js.map +1 -1
  190. package/build/components/block-vertical-alignment-control/ui.js +1 -2
  191. package/build/components/block-vertical-alignment-control/ui.js.map +1 -1
  192. package/build/components/button-block-appender/index.js +2 -4
  193. package/build/components/button-block-appender/index.js.map +1 -1
  194. package/build/components/button-block-appender/index.native.js +1 -2
  195. package/build/components/button-block-appender/index.native.js.map +1 -1
  196. package/build/components/caption/index.native.js +1 -2
  197. package/build/components/caption/index.native.js.map +1 -1
  198. package/build/components/color-palette/index.js +1 -2
  199. package/build/components/color-palette/index.js.map +1 -1
  200. package/build/components/color-palette/with-color-context.js +1 -2
  201. package/build/components/color-palette/with-color-context.js.map +1 -1
  202. package/build/components/color-style-selector/index.js +1 -2
  203. package/build/components/color-style-selector/index.js.map +1 -1
  204. package/build/components/colors/index.js +2 -2
  205. package/build/components/colors/index.js.map +1 -1
  206. package/build/components/colors-gradients/control.js +1 -3
  207. package/build/components/colors-gradients/control.js.map +1 -1
  208. package/build/components/colors-gradients/panel-color-gradient-settings.js +1 -2
  209. package/build/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
  210. package/build/components/contrast-checker/index.js +1 -2
  211. package/build/components/contrast-checker/index.js.map +1 -1
  212. package/build/components/contrast-checker/index.native.js +1 -2
  213. package/build/components/contrast-checker/index.native.js.map +1 -1
  214. package/build/components/convert-to-group-buttons/toolbar.js +1 -2
  215. package/build/components/convert-to-group-buttons/toolbar.js.map +1 -1
  216. package/build/components/default-block-appender/index.js +31 -40
  217. package/build/components/default-block-appender/index.js.map +1 -1
  218. package/build/components/default-block-appender/index.native.js +1 -2
  219. package/build/components/default-block-appender/index.native.js.map +1 -1
  220. package/build/components/dimensions-tool/aspect-ratio-tool.js +2 -2
  221. package/build/components/dimensions-tool/aspect-ratio-tool.js.map +1 -1
  222. package/build/components/dimensions-tool/index.js +1 -2
  223. package/build/components/dimensions-tool/index.js.map +1 -1
  224. package/build/components/duotone-control/index.js +1 -2
  225. package/build/components/duotone-control/index.js.map +1 -1
  226. package/build/components/editable-text/index.js +1 -2
  227. package/build/components/editable-text/index.js.map +1 -1
  228. package/build/components/floating-toolbar/index.native.js +1 -2
  229. package/build/components/floating-toolbar/index.native.js.map +1 -1
  230. package/build/components/floating-toolbar/nav-up-icon.js +1 -2
  231. package/build/components/floating-toolbar/nav-up-icon.js.map +1 -1
  232. package/build/components/font-sizes/font-size-picker.js +1 -2
  233. package/build/components/font-sizes/font-size-picker.js.map +1 -1
  234. package/build/components/global-styles/border-panel.js +56 -8
  235. package/build/components/global-styles/border-panel.js.map +1 -1
  236. package/build/components/global-styles/color-panel.native.js +1 -2
  237. package/build/components/global-styles/color-panel.native.js.map +1 -1
  238. package/build/components/global-styles/context.js +2 -4
  239. package/build/components/global-styles/context.js.map +1 -1
  240. package/build/components/global-styles/get-global-styles-changes.js +2 -4
  241. package/build/components/global-styles/get-global-styles-changes.js.map +1 -1
  242. package/build/components/global-styles/hooks.js +2 -3
  243. package/build/components/global-styles/hooks.js.map +1 -1
  244. package/build/components/global-styles/index.js +2 -15
  245. package/build/components/global-styles/index.js.map +1 -1
  246. package/build/components/global-styles/shadow-panel-components.js +133 -0
  247. package/build/components/global-styles/shadow-panel-components.js.map +1 -0
  248. package/build/components/global-styles/typography-panel.js +18 -36
  249. package/build/components/global-styles/typography-panel.js.map +1 -1
  250. package/build/components/global-styles/use-global-styles-output.js +1 -1
  251. package/build/components/global-styles/use-global-styles-output.js.map +1 -1
  252. package/build/components/global-styles/utils.js +38 -14
  253. package/build/components/global-styles/utils.js.map +1 -1
  254. package/build/components/iframe/index.js +1 -2
  255. package/build/components/iframe/index.js.map +1 -1
  256. package/build/components/image-editor/constants.js +3 -6
  257. package/build/components/image-editor/constants.js.map +1 -1
  258. package/build/components/image-link-destinations/index.native.js +1 -2
  259. package/build/components/image-link-destinations/index.native.js.map +1 -1
  260. package/build/components/index.js +2 -2
  261. package/build/components/index.js.map +1 -1
  262. package/build/components/index.native.js +2 -2
  263. package/build/components/index.native.js.map +1 -1
  264. package/build/components/inner-blocks/button-block-appender.js +1 -2
  265. package/build/components/inner-blocks/button-block-appender.js.map +1 -1
  266. package/build/components/inner-blocks/constants.native.js +1 -2
  267. package/build/components/inner-blocks/constants.native.js.map +1 -1
  268. package/build/components/inner-blocks/default-block-appender.js +1 -2
  269. package/build/components/inner-blocks/default-block-appender.js.map +1 -1
  270. package/build/components/inner-blocks/index.js +33 -30
  271. package/build/components/inner-blocks/index.js.map +1 -1
  272. package/build/components/inner-blocks/index.native.js +2 -6
  273. package/build/components/inner-blocks/index.native.js.map +1 -1
  274. package/build/components/inner-blocks/use-inner-block-template-sync.js +2 -3
  275. package/build/components/inner-blocks/use-inner-block-template-sync.js.map +1 -1
  276. package/build/components/inner-blocks/warning-max-depth-exceeded.native.js +1 -2
  277. package/build/components/inner-blocks/warning-max-depth-exceeded.native.js.map +1 -1
  278. package/build/components/inner-blocks/with-client-id.js +1 -2
  279. package/build/components/inner-blocks/with-client-id.js.map +1 -1
  280. package/build/components/inserter/block-patterns-explorer/index.js +1 -2
  281. package/build/components/inserter/block-patterns-explorer/index.js.map +1 -1
  282. package/build/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js +1 -2
  283. package/build/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js.map +1 -1
  284. package/build/components/inserter/block-patterns-explorer/pattern-list.js +1 -2
  285. package/build/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
  286. package/build/components/inserter/block-patterns-tab/index.js +1 -2
  287. package/build/components/inserter/block-patterns-tab/index.js.map +1 -1
  288. package/build/components/inserter/block-patterns-tab/patterns-filter.js +4 -4
  289. package/build/components/inserter/block-patterns-tab/patterns-filter.js.map +1 -1
  290. package/build/components/inserter/block-patterns-tab/utils.js +5 -9
  291. package/build/components/inserter/block-patterns-tab/utils.js.map +1 -1
  292. package/build/components/inserter/block-types-tab.js +1 -2
  293. package/build/components/inserter/block-types-tab.js.map +1 -1
  294. package/build/components/inserter/block-types-tab.native.js +1 -2
  295. package/build/components/inserter/block-types-tab.native.js.map +1 -1
  296. package/build/components/inserter/hooks/use-block-type-impressions.native.js +1 -2
  297. package/build/components/inserter/hooks/use-block-type-impressions.native.js.map +1 -1
  298. package/build/components/inserter/hooks/use-block-types-state.js +1 -2
  299. package/build/components/inserter/hooks/use-block-types-state.js.map +1 -1
  300. package/build/components/inserter/hooks/use-insertion-point.js +1 -2
  301. package/build/components/inserter/hooks/use-insertion-point.js.map +1 -1
  302. package/build/components/inserter/hooks/use-patterns-state.js +1 -2
  303. package/build/components/inserter/hooks/use-patterns-state.js.map +1 -1
  304. package/build/components/inserter/index.js +2 -4
  305. package/build/components/inserter/index.js.map +1 -1
  306. package/build/components/inserter/index.native.js +1 -2
  307. package/build/components/inserter/index.native.js.map +1 -1
  308. package/build/components/inserter/library.js +1 -2
  309. package/build/components/inserter/library.js.map +1 -1
  310. package/build/components/inserter/media-tab/media-list.js +1 -2
  311. package/build/components/inserter/media-tab/media-list.js.map +1 -1
  312. package/build/components/inserter/media-tab/media-tab.js +1 -2
  313. package/build/components/inserter/media-tab/media-tab.js.map +1 -1
  314. package/build/components/inserter/menu.js +1 -2
  315. package/build/components/inserter/menu.js.map +1 -1
  316. package/build/components/inserter/menu.native.js +1 -2
  317. package/build/components/inserter/menu.native.js.map +1 -1
  318. package/build/components/inserter/no-results.js +1 -2
  319. package/build/components/inserter/no-results.js.map +1 -1
  320. package/build/components/inserter/no-results.native.js +1 -2
  321. package/build/components/inserter/no-results.native.js.map +1 -1
  322. package/build/components/inserter/panel.js +1 -2
  323. package/build/components/inserter/panel.js.map +1 -1
  324. package/build/components/inserter/preview-panel.js +1 -2
  325. package/build/components/inserter/preview-panel.js.map +1 -1
  326. package/build/components/inserter/quick-inserter.js +3 -2
  327. package/build/components/inserter/quick-inserter.js.map +1 -1
  328. package/build/components/inserter/reusable-blocks-tab.native.js +1 -2
  329. package/build/components/inserter/reusable-blocks-tab.native.js.map +1 -1
  330. package/build/components/inserter/search-items.js +0 -1
  331. package/build/components/inserter/search-items.js.map +1 -1
  332. package/build/components/inserter/search-results.js +1 -2
  333. package/build/components/inserter/search-results.js.map +1 -1
  334. package/build/components/inserter/search-results.native.js +1 -2
  335. package/build/components/inserter/search-results.native.js.map +1 -1
  336. package/build/components/inserter/tabs.js +1 -2
  337. package/build/components/inserter/tabs.js.map +1 -1
  338. package/build/components/inserter/tabs.native.js +1 -2
  339. package/build/components/inserter/tabs.native.js.map +1 -1
  340. package/build/components/inserter/tips.js +1 -2
  341. package/build/components/inserter/tips.js.map +1 -1
  342. package/build/components/inserter-button/index.native.js +1 -2
  343. package/build/components/inserter-button/index.native.js.map +1 -1
  344. package/build/components/inserter-button/sparkles.js +1 -2
  345. package/build/components/inserter-button/sparkles.js.map +1 -1
  346. package/build/components/inserter-draggable-blocks/index.js +11 -2
  347. package/build/components/inserter-draggable-blocks/index.js.map +1 -1
  348. package/build/components/inserter-list-item/index.js +1 -2
  349. package/build/components/inserter-list-item/index.js.map +1 -1
  350. package/build/components/inserter-listbox/context.js +1 -2
  351. package/build/components/inserter-listbox/context.js.map +1 -1
  352. package/build/components/inserter-listbox/group.js +1 -2
  353. package/build/components/inserter-listbox/group.js.map +1 -1
  354. package/build/components/inserter-listbox/index.js +1 -2
  355. package/build/components/inserter-listbox/index.js.map +1 -1
  356. package/build/components/inserter-listbox/item.js +1 -2
  357. package/build/components/inserter-listbox/item.js.map +1 -1
  358. package/build/components/inserter-listbox/row.js +1 -2
  359. package/build/components/inserter-listbox/row.js.map +1 -1
  360. package/build/components/inserter-menu-extension/index.js +1 -2
  361. package/build/components/inserter-menu-extension/index.js.map +1 -1
  362. package/build/components/inspector-controls/groups.js +1 -2
  363. package/build/components/inspector-controls/groups.js.map +1 -1
  364. package/build/components/inspector-controls/index.js +1 -2
  365. package/build/components/inspector-controls/index.js.map +1 -1
  366. package/build/components/inspector-controls-tabs/advanced-controls-panel.js +3 -4
  367. package/build/components/inspector-controls-tabs/advanced-controls-panel.js.map +1 -1
  368. package/build/components/inspector-controls-tabs/position-controls-panel.js +1 -2
  369. package/build/components/inspector-controls-tabs/position-controls-panel.js.map +1 -1
  370. package/build/components/inspector-controls-tabs/settings-tab.js +1 -2
  371. package/build/components/inspector-controls-tabs/settings-tab.js.map +1 -1
  372. package/build/components/inspector-controls-tabs/styles-tab.js +6 -6
  373. package/build/components/inspector-controls-tabs/styles-tab.js.map +1 -1
  374. package/build/components/inspector-controls-tabs/use-is-list-view-tab-disabled.js +1 -2
  375. package/build/components/inspector-controls-tabs/use-is-list-view-tab-disabled.js.map +1 -1
  376. package/build/components/inspector-controls-tabs/utils.js +3 -6
  377. package/build/components/inspector-controls-tabs/utils.js.map +1 -1
  378. package/build/components/justify-content-control/ui.js +1 -2
  379. package/build/components/justify-content-control/ui.js.map +1 -1
  380. package/build/components/keyboard-shortcuts/index.js +1 -2
  381. package/build/components/keyboard-shortcuts/index.js.map +1 -1
  382. package/build/components/line-height-control/index.js +1 -2
  383. package/build/components/line-height-control/index.js.map +1 -1
  384. package/build/components/line-height-control/utils.js +4 -8
  385. package/build/components/line-height-control/utils.js.map +1 -1
  386. package/build/components/link-control/constants.js +7 -14
  387. package/build/components/link-control/constants.js.map +1 -1
  388. package/build/components/link-control/index.js +2 -16
  389. package/build/components/link-control/index.js.map +1 -1
  390. package/build/components/link-control/link-preview.js +13 -15
  391. package/build/components/link-control/link-preview.js.map +1 -1
  392. package/build/components/link-control/search-create-button.js +1 -2
  393. package/build/components/link-control/search-create-button.js.map +1 -1
  394. package/build/components/link-control/search-input.js +1 -2
  395. package/build/components/link-control/search-input.js.map +1 -1
  396. package/build/components/link-control/search-item.js +1 -2
  397. package/build/components/link-control/search-item.js.map +1 -1
  398. package/build/components/link-control/settings-drawer.js +1 -2
  399. package/build/components/link-control/settings-drawer.js.map +1 -1
  400. package/build/components/link-control/settings.js +1 -2
  401. package/build/components/link-control/settings.js.map +1 -1
  402. package/build/components/link-control/use-create-page.js +0 -1
  403. package/build/components/link-control/use-create-page.js.map +1 -1
  404. package/build/components/link-control/use-rich-url-data.js +1 -2
  405. package/build/components/link-control/use-rich-url-data.js.map +1 -1
  406. package/build/components/link-control/viewer-slot.js +1 -2
  407. package/build/components/link-control/viewer-slot.js.map +1 -1
  408. package/build/components/list-view/appender.js +1 -2
  409. package/build/components/list-view/appender.js.map +1 -1
  410. package/build/components/list-view/block-contents.js +1 -2
  411. package/build/components/list-view/block-contents.js.map +1 -1
  412. package/build/components/list-view/block-select-button.js +1 -2
  413. package/build/components/list-view/block-select-button.js.map +1 -1
  414. package/build/components/list-view/block.js +33 -28
  415. package/build/components/list-view/block.js.map +1 -1
  416. package/build/components/list-view/branch.js +1 -2
  417. package/build/components/list-view/branch.js.map +1 -1
  418. package/build/components/list-view/context.js +1 -2
  419. package/build/components/list-view/context.js.map +1 -1
  420. package/build/components/list-view/index.js +20 -17
  421. package/build/components/list-view/index.js.map +1 -1
  422. package/build/components/list-view/leaf.js +1 -2
  423. package/build/components/list-view/leaf.js.map +1 -1
  424. package/build/components/list-view/use-clipboard-handler.js +159 -0
  425. package/build/components/list-view/use-clipboard-handler.js.map +1 -0
  426. package/build/components/list-view/use-list-view-drop-zone.js +1 -2
  427. package/build/components/list-view/use-list-view-drop-zone.js.map +1 -1
  428. package/build/components/list-view/utils.js +4 -4
  429. package/build/components/list-view/utils.js.map +1 -1
  430. package/build/components/media-placeholder/index.js +1 -2
  431. package/build/components/media-placeholder/index.js.map +1 -1
  432. package/build/components/media-placeholder/index.native.js +1 -2
  433. package/build/components/media-placeholder/index.native.js.map +1 -1
  434. package/build/components/media-replace-flow/index.js +1 -2
  435. package/build/components/media-replace-flow/index.js.map +1 -1
  436. package/build/components/media-replace-flow/index.native.js +1 -2
  437. package/build/components/media-replace-flow/index.native.js.map +1 -1
  438. package/build/components/media-upload/check.js +1 -2
  439. package/build/components/media-upload/check.js.map +1 -1
  440. package/build/components/media-upload/constants.native.js +8 -16
  441. package/build/components/media-upload/constants.native.js.map +1 -1
  442. package/build/components/media-upload/index.js +1 -2
  443. package/build/components/media-upload/index.js.map +1 -1
  444. package/build/components/media-upload/index.native.js +1 -2
  445. package/build/components/media-upload/index.native.js.map +1 -1
  446. package/build/components/media-upload-progress/constants.js +6 -12
  447. package/build/components/media-upload-progress/constants.js.map +1 -1
  448. package/build/components/media-upload-progress/index.native.js +1 -2
  449. package/build/components/media-upload-progress/index.native.js.map +1 -1
  450. package/build/components/multi-selection-inspector/index.js +1 -2
  451. package/build/components/multi-selection-inspector/index.js.map +1 -1
  452. package/build/components/navigable-toolbar/index.js +5 -2
  453. package/build/components/navigable-toolbar/index.js.map +1 -1
  454. package/build/components/observe-typing/index.js +1 -2
  455. package/build/components/observe-typing/index.js.map +1 -1
  456. package/build/components/panel-color-settings/index.js +1 -2
  457. package/build/components/panel-color-settings/index.js.map +1 -1
  458. package/build/components/plain-text/index.js +1 -2
  459. package/build/components/plain-text/index.js.map +1 -1
  460. package/build/components/provider/block-refs-provider.js +1 -2
  461. package/build/components/provider/block-refs-provider.js.map +1 -1
  462. package/build/components/provider/index.js +3 -5
  463. package/build/components/provider/index.js.map +1 -1
  464. package/build/components/provider/index.native.js +2 -4
  465. package/build/components/provider/index.native.js.map +1 -1
  466. package/build/components/provider/with-registry-provider.js +1 -2
  467. package/build/components/provider/with-registry-provider.js.map +1 -1
  468. package/build/components/publish-date-time-picker/index.js +1 -2
  469. package/build/components/publish-date-time-picker/index.js.map +1 -1
  470. package/build/components/responsive-block-control/index.js +3 -7
  471. package/build/components/responsive-block-control/index.js.map +1 -1
  472. package/build/components/rich-text/embed-handler-picker.native.js +1 -2
  473. package/build/components/rich-text/embed-handler-picker.native.js.map +1 -1
  474. package/build/components/rich-text/format-edit.js +1 -2
  475. package/build/components/rich-text/format-edit.js.map +1 -1
  476. package/build/components/rich-text/format-toolbar/index.js +1 -2
  477. package/build/components/rich-text/format-toolbar/index.js.map +1 -1
  478. package/build/components/rich-text/format-toolbar/index.native.js +1 -2
  479. package/build/components/rich-text/format-toolbar/index.native.js.map +1 -1
  480. package/build/components/rich-text/format-toolbar-container.js +1 -2
  481. package/build/components/rich-text/format-toolbar-container.js.map +1 -1
  482. package/build/components/rich-text/format-toolbar-container.native.js +1 -2
  483. package/build/components/rich-text/format-toolbar-container.native.js.map +1 -1
  484. package/build/components/rich-text/index.js +7 -8
  485. package/build/components/rich-text/index.js.map +1 -1
  486. package/build/components/rich-text/index.native.js +1 -2
  487. package/build/components/rich-text/index.native.js.map +1 -1
  488. package/build/components/rich-text/multiline.js +1 -2
  489. package/build/components/rich-text/multiline.js.map +1 -1
  490. package/build/components/rich-text/native/index.native.js +1 -6
  491. package/build/components/rich-text/native/index.native.js.map +1 -1
  492. package/build/components/rich-text/native/toolbar-button-with-options.native.js +1 -2
  493. package/build/components/rich-text/native/toolbar-button-with-options.native.js.map +1 -1
  494. package/build/components/skip-to-selected-block/index.js +1 -2
  495. package/build/components/skip-to-selected-block/index.js.map +1 -1
  496. package/build/components/spacing-sizes-control/index.js +3 -1
  497. package/build/components/spacing-sizes-control/index.js.map +1 -1
  498. package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js +0 -1
  499. package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
  500. package/build/components/spacing-sizes-control/utils.js +5 -10
  501. package/build/components/spacing-sizes-control/utils.js.map +1 -1
  502. package/build/components/tool-selector/index.js +1 -2
  503. package/build/components/tool-selector/index.js.map +1 -1
  504. package/build/components/typewriter/index.js +1 -2
  505. package/build/components/typewriter/index.js.map +1 -1
  506. package/build/components/ungroup-button/index.native.js +1 -2
  507. package/build/components/ungroup-button/index.native.js.map +1 -1
  508. package/build/components/unsupported-block-details/index.native.js +1 -2
  509. package/build/components/unsupported-block-details/index.native.js.map +1 -1
  510. package/build/components/url-input/button.js +1 -2
  511. package/build/components/url-input/button.js.map +1 -1
  512. package/build/components/url-input/index.js +1 -2
  513. package/build/components/url-input/index.js.map +1 -1
  514. package/build/components/url-popover/image-url-input-ui.js +66 -35
  515. package/build/components/url-popover/image-url-input-ui.js.map +1 -1
  516. package/build/components/url-popover/index.js +8 -6
  517. package/build/components/url-popover/index.js.map +1 -1
  518. package/build/components/url-popover/link-editor.js +2 -1
  519. package/build/components/url-popover/link-editor.js.map +1 -1
  520. package/build/components/url-popover/link-viewer.js +2 -1
  521. package/build/components/url-popover/link-viewer.js.map +1 -1
  522. package/build/components/use-block-drop-zone/index.js +15 -5
  523. package/build/components/use-block-drop-zone/index.js.map +1 -1
  524. package/build/components/use-flash-editable-blocks/index.js +60 -0
  525. package/build/components/use-flash-editable-blocks/index.js.map +1 -0
  526. package/build/components/use-moving-animation/index.js +1 -2
  527. package/build/components/use-moving-animation/index.js.map +1 -1
  528. package/build/components/use-on-block-drop/index.js +4 -4
  529. package/build/components/use-on-block-drop/index.js.map +1 -1
  530. package/build/components/use-settings/index.js +3 -162
  531. package/build/components/use-settings/index.js.map +1 -1
  532. package/build/components/video-player/gridicon-play.native.js +1 -2
  533. package/build/components/video-player/gridicon-play.native.js.map +1 -1
  534. package/build/components/video-player/index.native.js +2 -4
  535. package/build/components/video-player/index.native.js.map +1 -1
  536. package/build/components/warning/index.js +1 -2
  537. package/build/components/warning/index.js.map +1 -1
  538. package/build/components/warning/index.native.js +1 -2
  539. package/build/components/warning/index.native.js.map +1 -1
  540. package/build/components/writing-flow/index.js +1 -2
  541. package/build/components/writing-flow/index.js.map +1 -1
  542. package/build/components/writing-flow/use-clipboard-handler.js +3 -48
  543. package/build/components/writing-flow/use-clipboard-handler.js.map +1 -1
  544. package/build/components/writing-flow/use-drag-selection.js +13 -2
  545. package/build/components/writing-flow/use-drag-selection.js.map +1 -1
  546. package/build/components/writing-flow/utils.js +86 -0
  547. package/build/components/writing-flow/utils.js.map +1 -0
  548. package/build/hooks/align.js +1 -2
  549. package/build/hooks/align.js.map +1 -1
  550. package/build/hooks/align.native.js +2 -2
  551. package/build/hooks/align.native.js.map +1 -1
  552. package/build/hooks/anchor.js +1 -2
  553. package/build/hooks/anchor.js.map +1 -1
  554. package/build/hooks/aria-label.js +1 -2
  555. package/build/hooks/aria-label.js.map +1 -1
  556. package/build/hooks/background.js +52 -14
  557. package/build/hooks/background.js.map +1 -1
  558. package/build/hooks/block-hooks.js +1 -2
  559. package/build/hooks/block-hooks.js.map +1 -1
  560. package/build/hooks/block-renaming.js +1 -2
  561. package/build/hooks/block-renaming.js.map +1 -1
  562. package/build/hooks/border.js +42 -7
  563. package/build/hooks/border.js.map +1 -1
  564. package/build/hooks/color.js +4 -6
  565. package/build/hooks/color.js.map +1 -1
  566. package/build/hooks/content-lock-ui.js +1 -2
  567. package/build/hooks/content-lock-ui.js.map +1 -1
  568. package/build/hooks/custom-class-name.js +1 -2
  569. package/build/hooks/custom-class-name.js.map +1 -1
  570. package/build/hooks/custom-class-name.native.js +1 -2
  571. package/build/hooks/custom-class-name.native.js.map +1 -1
  572. package/build/hooks/dimensions.js +5 -10
  573. package/build/hooks/dimensions.js.map +1 -1
  574. package/build/hooks/duotone.js +1 -3
  575. package/build/hooks/duotone.js.map +1 -1
  576. package/build/hooks/font-family.js +2 -4
  577. package/build/hooks/font-family.js.map +1 -1
  578. package/build/hooks/font-size.js +25 -31
  579. package/build/hooks/font-size.js.map +1 -1
  580. package/build/hooks/index.js +2 -8
  581. package/build/hooks/index.js.map +1 -1
  582. package/build/hooks/index.native.js +0 -6
  583. package/build/hooks/index.native.js.map +1 -1
  584. package/build/hooks/layout-child.js +1 -2
  585. package/build/hooks/layout-child.js.map +1 -1
  586. package/build/hooks/layout.js +2 -4
  587. package/build/hooks/layout.js.map +1 -1
  588. package/build/hooks/line-height.js +1 -2
  589. package/build/hooks/line-height.js.map +1 -1
  590. package/build/hooks/position.js +1 -2
  591. package/build/hooks/position.js.map +1 -1
  592. package/build/hooks/style.js +3 -8
  593. package/build/hooks/style.js.map +1 -1
  594. package/build/hooks/typography.js +4 -6
  595. package/build/hooks/typography.js.map +1 -1
  596. package/build/hooks/typography.native.js +3 -6
  597. package/build/hooks/typography.native.js.map +1 -1
  598. package/build/hooks/use-bindings-attributes.js +12 -11
  599. package/build/hooks/use-bindings-attributes.js.map +1 -1
  600. package/build/hooks/use-shadow-props.js +0 -15
  601. package/build/hooks/use-shadow-props.js.map +1 -1
  602. package/build/hooks/utils.js +3 -6
  603. package/build/hooks/utils.js.map +1 -1
  604. package/build/index.js +0 -7
  605. package/build/index.js.map +1 -1
  606. package/build/layouts/constrained.js +1 -2
  607. package/build/layouts/constrained.js.map +1 -1
  608. package/build/layouts/definitions.js +1 -2
  609. package/build/layouts/definitions.js.map +1 -1
  610. package/build/layouts/flex.js +1 -2
  611. package/build/layouts/flex.js.map +1 -1
  612. package/build/layouts/flow.js +1 -2
  613. package/build/layouts/flow.js.map +1 -1
  614. package/build/layouts/grid.js +1 -2
  615. package/build/layouts/grid.js.map +1 -1
  616. package/build/private-apis.js +8 -5
  617. package/build/private-apis.js.map +1 -1
  618. package/build/private-apis.native.js +3 -4
  619. package/build/private-apis.native.js.map +1 -1
  620. package/build/store/actions.js +2 -4
  621. package/build/store/actions.js.map +1 -1
  622. package/build/store/constants.js +1 -2
  623. package/build/store/constants.js.map +1 -1
  624. package/build/store/defaults.js +2 -4
  625. package/build/store/defaults.js.map +1 -1
  626. package/build/store/defaults.native.js +1 -2
  627. package/build/store/defaults.native.js.map +1 -1
  628. package/build/store/get-block-settings.js +180 -0
  629. package/build/store/get-block-settings.js.map +1 -0
  630. package/build/store/index.js +4 -6
  631. package/build/store/index.js.map +1 -1
  632. package/build/store/private-actions.js +37 -3
  633. package/build/store/private-actions.js.map +1 -1
  634. package/build/store/private-selectors.js +55 -29
  635. package/build/store/private-selectors.js.map +1 -1
  636. package/build/store/reducer.js +27 -6
  637. package/build/store/reducer.js.map +1 -1
  638. package/build/store/selectors.js +98 -102
  639. package/build/store/selectors.js.map +1 -1
  640. package/build/store/undo-ignore.js +1 -2
  641. package/build/store/undo-ignore.js.map +1 -1
  642. package/build/utils/object.js +0 -17
  643. package/build/utils/object.js.map +1 -1
  644. package/build/utils/selection.js +1 -2
  645. package/build/utils/selection.js.map +1 -1
  646. package/build/utils/transform-styles/index.js +3 -4
  647. package/build/utils/transform-styles/index.js.map +1 -1
  648. package/build-module/components/block-breadcrumb/index.js +0 -1
  649. package/build-module/components/block-breadcrumb/index.js.map +1 -1
  650. package/build-module/components/block-inspector/index.js +10 -7
  651. package/build-module/components/block-inspector/index.js.map +1 -1
  652. package/build-module/components/block-list/block.js +32 -20
  653. package/build-module/components/block-list/block.js.map +1 -1
  654. package/build-module/components/block-list/block.native.js +6 -4
  655. package/build-module/components/block-list/block.native.js.map +1 -1
  656. package/build-module/components/block-list/index.js +18 -7
  657. package/build-module/components/block-list/index.js.map +1 -1
  658. package/build-module/components/block-list/use-block-props/index.js +8 -1
  659. package/build-module/components/block-list/use-block-props/index.js.map +1 -1
  660. package/build-module/components/block-list-appender/index.js +5 -51
  661. package/build-module/components/block-list-appender/index.js.map +1 -1
  662. package/build-module/components/block-mover/mover-description.native.js +0 -2
  663. package/build-module/components/block-mover/mover-description.native.js.map +1 -1
  664. package/build-module/components/block-popover/inbetween.js +0 -1
  665. package/build-module/components/block-popover/inbetween.js.map +1 -1
  666. package/build-module/components/block-preview/auto.js +2 -1
  667. package/build-module/components/block-preview/auto.js.map +1 -1
  668. package/build-module/components/block-removal-warning-modal/index.js +4 -2
  669. package/build-module/components/block-removal-warning-modal/index.js.map +1 -1
  670. package/build-module/components/block-switcher/index.js +12 -9
  671. package/build-module/components/block-switcher/index.js.map +1 -1
  672. package/build-module/components/block-title/use-block-display-title.js +22 -28
  673. package/build-module/components/block-title/use-block-display-title.js.map +1 -1
  674. package/build-module/components/block-tools/block-selection-button.js +20 -17
  675. package/build-module/components/block-tools/block-selection-button.js.map +1 -1
  676. package/build-module/components/block-tools/index.js +2 -10
  677. package/build-module/components/block-tools/index.js.map +1 -1
  678. package/build-module/components/colors-gradients/control.js +0 -1
  679. package/build-module/components/colors-gradients/control.js.map +1 -1
  680. package/build-module/components/default-block-appender/index.js +30 -37
  681. package/build-module/components/default-block-appender/index.js.map +1 -1
  682. package/build-module/components/global-styles/border-panel.js +57 -9
  683. package/build-module/components/global-styles/border-panel.js.map +1 -1
  684. package/build-module/components/global-styles/get-global-styles-changes.js +2 -4
  685. package/build-module/components/global-styles/get-global-styles-changes.js.map +1 -1
  686. package/build-module/components/global-styles/hooks.js +2 -3
  687. package/build-module/components/global-styles/hooks.js.map +1 -1
  688. package/build-module/components/global-styles/index.js +0 -1
  689. package/build-module/components/global-styles/index.js.map +1 -1
  690. package/build-module/components/global-styles/shadow-panel-components.js +121 -0
  691. package/build-module/components/global-styles/shadow-panel-components.js.map +1 -0
  692. package/build-module/components/global-styles/typography-panel.js +17 -35
  693. package/build-module/components/global-styles/typography-panel.js.map +1 -1
  694. package/build-module/components/global-styles/use-global-styles-output.js +2 -2
  695. package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
  696. package/build-module/components/global-styles/utils.js +30 -1
  697. package/build-module/components/global-styles/utils.js.map +1 -1
  698. package/build-module/components/inner-blocks/index.js +33 -29
  699. package/build-module/components/inner-blocks/index.js.map +1 -1
  700. package/build-module/components/inner-blocks/index.native.js +1 -4
  701. package/build-module/components/inner-blocks/index.native.js.map +1 -1
  702. package/build-module/components/inner-blocks/use-inner-block-template-sync.js +2 -3
  703. package/build-module/components/inner-blocks/use-inner-block-template-sync.js.map +1 -1
  704. package/build-module/components/inserter/block-patterns-tab/patterns-filter.js +4 -4
  705. package/build-module/components/inserter/block-patterns-tab/patterns-filter.js.map +1 -1
  706. package/build-module/components/inserter/block-patterns-tab/utils.js +2 -2
  707. package/build-module/components/inserter/block-patterns-tab/utils.js.map +1 -1
  708. package/build-module/components/inserter/quick-inserter.js +3 -2
  709. package/build-module/components/inserter/quick-inserter.js.map +1 -1
  710. package/build-module/components/inserter/search-items.js +0 -1
  711. package/build-module/components/inserter/search-items.js.map +1 -1
  712. package/build-module/components/inserter-draggable-blocks/index.js +12 -1
  713. package/build-module/components/inserter-draggable-blocks/index.js.map +1 -1
  714. package/build-module/components/inspector-controls-tabs/styles-tab.js +5 -4
  715. package/build-module/components/inspector-controls-tabs/styles-tab.js.map +1 -1
  716. package/build-module/components/link-control/index.js +1 -14
  717. package/build-module/components/link-control/index.js.map +1 -1
  718. package/build-module/components/link-control/link-preview.js +16 -18
  719. package/build-module/components/link-control/link-preview.js.map +1 -1
  720. package/build-module/components/link-control/use-create-page.js +0 -1
  721. package/build-module/components/link-control/use-create-page.js.map +1 -1
  722. package/build-module/components/list-view/block.js +32 -26
  723. package/build-module/components/list-view/block.js.map +1 -1
  724. package/build-module/components/list-view/index.js +17 -11
  725. package/build-module/components/list-view/index.js.map +1 -1
  726. package/build-module/components/list-view/use-clipboard-handler.js +153 -0
  727. package/build-module/components/list-view/use-clipboard-handler.js.map +1 -0
  728. package/build-module/components/list-view/utils.js +4 -4
  729. package/build-module/components/list-view/utils.js.map +1 -1
  730. package/build-module/components/navigable-toolbar/index.js +5 -2
  731. package/build-module/components/navigable-toolbar/index.js.map +1 -1
  732. package/build-module/components/provider/index.js +1 -1
  733. package/build-module/components/provider/index.js.map +1 -1
  734. package/build-module/components/responsive-block-control/index.js +3 -6
  735. package/build-module/components/responsive-block-control/index.js.map +1 -1
  736. package/build-module/components/rich-text/index.js +4 -2
  737. package/build-module/components/rich-text/index.js.map +1 -1
  738. package/build-module/components/rich-text/native/index.native.js +0 -4
  739. package/build-module/components/rich-text/native/index.native.js.map +1 -1
  740. package/build-module/components/spacing-sizes-control/index.js +4 -2
  741. package/build-module/components/spacing-sizes-control/index.js.map +1 -1
  742. package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js +0 -1
  743. package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
  744. package/build-module/components/url-popover/image-url-input-ui.js +69 -38
  745. package/build-module/components/url-popover/image-url-input-ui.js.map +1 -1
  746. package/build-module/components/url-popover/index.js +8 -5
  747. package/build-module/components/url-popover/index.js.map +1 -1
  748. package/build-module/components/url-popover/link-editor.js +2 -1
  749. package/build-module/components/url-popover/link-editor.js.map +1 -1
  750. package/build-module/components/url-popover/link-viewer.js +2 -1
  751. package/build-module/components/url-popover/link-viewer.js.map +1 -1
  752. package/build-module/components/use-block-drop-zone/index.js +15 -5
  753. package/build-module/components/use-block-drop-zone/index.js.map +1 -1
  754. package/build-module/components/use-flash-editable-blocks/index.js +53 -0
  755. package/build-module/components/use-flash-editable-blocks/index.js.map +1 -0
  756. package/build-module/components/use-on-block-drop/index.js +4 -4
  757. package/build-module/components/use-on-block-drop/index.js.map +1 -1
  758. package/build-module/components/use-settings/index.js +3 -159
  759. package/build-module/components/use-settings/index.js.map +1 -1
  760. package/build-module/components/writing-flow/use-clipboard-handler.js +4 -49
  761. package/build-module/components/writing-flow/use-clipboard-handler.js.map +1 -1
  762. package/build-module/components/writing-flow/use-drag-selection.js +13 -2
  763. package/build-module/components/writing-flow/use-drag-selection.js.map +1 -1
  764. package/build-module/components/writing-flow/utils.js +79 -0
  765. package/build-module/components/writing-flow/utils.js.map +1 -0
  766. package/build-module/hooks/background.js +48 -10
  767. package/build-module/hooks/background.js.map +1 -1
  768. package/build-module/hooks/border.js +38 -3
  769. package/build-module/hooks/border.js.map +1 -1
  770. package/build-module/hooks/duotone.js +0 -1
  771. package/build-module/hooks/duotone.js.map +1 -1
  772. package/build-module/hooks/font-size.js +23 -27
  773. package/build-module/hooks/font-size.js.map +1 -1
  774. package/build-module/hooks/index.js +1 -1
  775. package/build-module/hooks/index.js.map +1 -1
  776. package/build-module/hooks/index.native.js +1 -1
  777. package/build-module/hooks/index.native.js.map +1 -1
  778. package/build-module/hooks/style.js +3 -7
  779. package/build-module/hooks/style.js.map +1 -1
  780. package/build-module/hooks/use-bindings-attributes.js +10 -13
  781. package/build-module/hooks/use-bindings-attributes.js.map +1 -1
  782. package/build-module/hooks/use-shadow-props.js +0 -14
  783. package/build-module/hooks/use-shadow-props.js.map +1 -1
  784. package/build-module/hooks/utils.js +3 -6
  785. package/build-module/hooks/utils.js.map +1 -1
  786. package/build-module/index.js +1 -1
  787. package/build-module/index.js.map +1 -1
  788. package/build-module/private-apis.js +5 -1
  789. package/build-module/private-apis.js.map +1 -1
  790. package/build-module/store/get-block-settings.js +171 -0
  791. package/build-module/store/get-block-settings.js.map +1 -0
  792. package/build-module/store/private-actions.js +35 -3
  793. package/build-module/store/private-actions.js.map +1 -1
  794. package/build-module/store/private-selectors.js +42 -19
  795. package/build-module/store/private-selectors.js.map +1 -1
  796. package/build-module/store/reducer.js +24 -2
  797. package/build-module/store/reducer.js.map +1 -1
  798. package/build-module/store/selectors.js +65 -34
  799. package/build-module/store/selectors.js.map +1 -1
  800. package/build-module/utils/object.js +0 -16
  801. package/build-module/utils/object.js.map +1 -1
  802. package/build-style/content-rtl.css +23 -15
  803. package/build-style/content.css +23 -15
  804. package/build-style/style-rtl.css +97 -67
  805. package/build-style/style.css +97 -67
  806. package/package.json +31 -31
  807. package/src/components/block-canvas/style.scss +3 -3
  808. package/src/components/block-card/style.scss +3 -1
  809. package/src/components/block-controls/README.md +2 -2
  810. package/src/components/block-inspector/index.js +11 -9
  811. package/src/components/block-list/block.js +45 -20
  812. package/src/components/block-list/block.native.js +7 -4
  813. package/src/components/block-list/content.scss +23 -28
  814. package/src/components/block-list/index.js +49 -25
  815. package/src/components/block-list/use-block-props/index.js +8 -0
  816. package/src/components/block-list-appender/index.js +7 -74
  817. package/src/components/block-mover/style.scss +4 -3
  818. package/src/components/block-preview/auto.js +2 -1
  819. package/src/components/block-removal-warning-modal/index.js +17 -10
  820. package/src/components/block-switcher/index.js +22 -13
  821. package/src/components/block-title/test/index.js +86 -85
  822. package/src/components/block-title/use-block-display-title.js +25 -36
  823. package/src/components/block-toolbar/style.scss +8 -1
  824. package/src/components/block-tools/block-selection-button.js +23 -26
  825. package/src/components/block-tools/index.js +2 -12
  826. package/src/components/colors-gradients/control.js +0 -1
  827. package/src/components/default-block-appender/index.js +26 -38
  828. package/src/components/default-block-appender/test/index.js +24 -16
  829. package/src/components/font-sizes/README.MD +0 -9
  830. package/src/components/global-styles/border-panel.js +72 -1
  831. package/src/components/global-styles/get-global-styles-changes.js +2 -8
  832. package/src/components/global-styles/hooks.js +0 -2
  833. package/src/components/global-styles/index.js +0 -1
  834. package/src/components/global-styles/shadow-panel-components.js +125 -0
  835. package/src/components/global-styles/style.scss +8 -9
  836. package/src/components/global-styles/test/get-global-styles-changes.js +3 -3
  837. package/src/components/global-styles/test/use-global-styles-output.js +1 -1
  838. package/src/components/global-styles/test/utils.js +86 -0
  839. package/src/components/global-styles/typography-panel.js +14 -47
  840. package/src/components/global-styles/use-global-styles-output.js +5 -1
  841. package/src/components/global-styles/utils.js +36 -0
  842. package/src/components/inner-blocks/index.js +31 -32
  843. package/src/components/inner-blocks/index.native.js +3 -9
  844. package/src/components/inner-blocks/use-inner-block-template-sync.js +1 -3
  845. package/src/components/inserter/block-patterns-tab/patterns-filter.js +4 -10
  846. package/src/components/inserter/block-patterns-tab/utils.js +2 -2
  847. package/src/components/inserter/quick-inserter.js +4 -2
  848. package/src/components/inserter/style.scss +3 -13
  849. package/src/components/inserter-draggable-blocks/index.js +12 -1
  850. package/src/components/inspector-controls-tabs/styles-tab.js +4 -2
  851. package/src/components/link-control/index.js +1 -20
  852. package/src/components/link-control/link-preview.js +19 -24
  853. package/src/components/link-control/style.scss +5 -11
  854. package/src/components/link-control/test/index.js +11 -90
  855. package/src/components/list-view/block.js +49 -41
  856. package/src/components/list-view/index.js +22 -9
  857. package/src/components/list-view/use-clipboard-handler.js +199 -0
  858. package/src/components/list-view/utils.js +4 -4
  859. package/src/components/media-replace-flow/test/index.js +1 -1
  860. package/src/components/navigable-toolbar/index.js +8 -4
  861. package/src/components/provider/index.js +1 -1
  862. package/src/components/responsive-block-control/index.js +3 -5
  863. package/src/components/rich-text/index.js +4 -3
  864. package/src/components/spacing-sizes-control/index.js +2 -1
  865. package/src/components/url-input/style.scss +4 -2
  866. package/src/components/url-popover/image-url-input-ui.js +98 -37
  867. package/src/components/url-popover/index.js +75 -67
  868. package/src/components/url-popover/link-editor.js +1 -0
  869. package/src/components/url-popover/link-viewer.js +1 -0
  870. package/src/components/url-popover/style.scss +42 -31
  871. package/src/components/use-block-drop-zone/index.js +17 -3
  872. package/src/components/use-flash-editable-blocks/index.js +62 -0
  873. package/src/components/use-on-block-drop/index.js +11 -4
  874. package/src/components/use-settings/index.js +9 -232
  875. package/src/components/writing-flow/use-clipboard-handler.js +6 -78
  876. package/src/components/writing-flow/use-drag-selection.js +12 -3
  877. package/src/components/writing-flow/utils.js +103 -0
  878. package/src/hooks/background.js +53 -8
  879. package/src/hooks/border.js +47 -6
  880. package/src/hooks/font-size.js +33 -33
  881. package/src/hooks/index.js +1 -1
  882. package/src/hooks/index.native.js +1 -1
  883. package/src/hooks/style.js +5 -9
  884. package/src/hooks/test/background.js +50 -0
  885. package/src/hooks/test/font-size.js +164 -0
  886. package/src/hooks/use-bindings-attributes.js +10 -23
  887. package/src/hooks/use-shadow-props.js +0 -14
  888. package/src/hooks/utils.js +4 -16
  889. package/src/index.js +0 -1
  890. package/src/private-apis.js +4 -0
  891. package/src/store/get-block-settings.js +225 -0
  892. package/src/store/private-actions.js +44 -2
  893. package/src/store/private-selectors.js +53 -38
  894. package/src/store/reducer.js +29 -1
  895. package/src/store/selectors.js +74 -48
  896. package/src/store/test/get-block-settings.js +90 -0
  897. package/src/store/test/private-actions.js +18 -0
  898. package/src/store/test/private-selectors.js +19 -0
  899. package/src/store/test/reducer.js +19 -0
  900. package/src/utils/object.js +0 -16
  901. package/build/components/global-styles/effects-panel.js +0 -219
  902. package/build/components/global-styles/effects-panel.js.map +0 -1
  903. package/build/hooks/effects.js +0 -66
  904. package/build/hooks/effects.js.map +0 -1
  905. package/build-module/components/global-styles/effects-panel.js +0 -210
  906. package/build-module/components/global-styles/effects-panel.js.map +0 -1
  907. package/build-module/hooks/effects.js +0 -51
  908. package/build-module/hooks/effects.js.map +0 -1
  909. package/src/components/global-styles/effects-panel.js +0 -244
  910. package/src/components/use-settings/test/index.js +0 -141
  911. package/src/hooks/effects.js +0 -57
  912. package/src/hooks/test/effects.js +0 -39
@@ -8,7 +8,7 @@ import classnames from 'classnames';
8
8
  * WordPress dependencies
9
9
  */
10
10
  import { useMergeRefs } from '@wordpress/compose';
11
- import { forwardRef, useMemo } from '@wordpress/element';
11
+ import { forwardRef, useMemo, memo } from '@wordpress/element';
12
12
  import { useSelect } from '@wordpress/data';
13
13
  import { getBlockSupport, store as blocksStore, __unstableGetInnerBlocksProps as getInnerBlocksProps } from '@wordpress/blocks';
14
14
 
@@ -26,7 +26,7 @@ import { useBlockEditContext } from '../block-edit/context';
26
26
  import useBlockSync from '../provider/use-block-sync';
27
27
  import { store as blockEditorStore } from '../../store';
28
28
  import useBlockDropZone from '../use-block-drop-zone';
29
- import { useSettings } from '../use-settings';
29
+ import { unlock } from '../../lock-unlock';
30
30
  const EMPTY_OBJECT = {};
31
31
  function BlockContext({
32
32
  children,
@@ -37,6 +37,7 @@ function BlockContext({
37
37
  value: context
38
38
  }, children);
39
39
  }
40
+ const BlockListItemsMemo = memo(BlockListItems);
40
41
 
41
42
  /**
42
43
  * InnerBlocks is a component which allows a single block to have multiple blocks
@@ -67,16 +68,15 @@ function UncontrolledInnerBlocks(props) {
67
68
  layout,
68
69
  name,
69
70
  blockType,
70
- innerBlocks,
71
- parentLock
71
+ parentLock,
72
+ defaultLayout
72
73
  } = props;
73
74
  useNestedSettingsUpdate(clientId, parentLock, allowedBlocks, prioritizedInserterBlocks, defaultBlock, directInsert, __experimentalDefaultBlock, __experimentalDirectInsert, templateLock, captureToolbars, orientation, layout);
74
- useInnerBlockTemplateSync(clientId, innerBlocks, template, templateLock, templateInsertUpdatesSelection);
75
+ useInnerBlockTemplateSync(clientId, template, templateLock, templateInsertUpdatesSelection);
75
76
  const defaultLayoutBlockSupport = getBlockSupport(name, 'layout') || getBlockSupport(name, '__experimentalLayout') || EMPTY_OBJECT;
76
77
  const {
77
78
  allowSizingOnChildren = false
78
79
  } = defaultLayoutBlockSupport;
79
- const [defaultLayout] = useSettings('layout');
80
80
  const usedLayout = layout || defaultLayoutBlockSupport;
81
81
  const memoedLayout = useMemo(() => ({
82
82
  // Default layout will know about any content/wide size defined by the theme.
@@ -86,7 +86,10 @@ function UncontrolledInnerBlocks(props) {
86
86
  allowSizingOnChildren: true
87
87
  })
88
88
  }), [defaultLayout, usedLayout, allowSizingOnChildren]);
89
- const items = createElement(BlockListItems, {
89
+
90
+ // For controlled inner blocks, we don't want a change in blocks to
91
+ // re-render the blocks list.
92
+ const items = createElement(BlockListItemsMemo, {
90
93
  rootClientId: clientId,
91
94
  renderAppender: renderAppender,
92
95
  __experimentalAppenderTagName: __experimentalAppenderTagName,
@@ -154,16 +157,7 @@ export function useInnerBlocksProps(props = {}, options = {}) {
154
157
  layout = null,
155
158
  __unstableLayoutClassNames: layoutClassNames = ''
156
159
  } = useBlockEditContext();
157
- const {
158
- __experimentalCaptureToolbars,
159
- hasOverlay,
160
- name,
161
- blockType,
162
- innerBlocks,
163
- parentLock,
164
- parentClientId,
165
- isDropZoneDisabled
166
- } = useSelect(select => {
160
+ const selected = useSelect(select => {
167
161
  if (!clientId) {
168
162
  return {};
169
163
  }
@@ -172,13 +166,12 @@ export function useInnerBlocksProps(props = {}, options = {}) {
172
166
  isBlockSelected,
173
167
  hasSelectedInnerBlock,
174
168
  __unstableGetEditorMode,
175
- getBlocks,
176
169
  getTemplateLock,
177
170
  getBlockRootClientId,
178
- __unstableIsWithinBlockOverlay,
179
- __unstableHasActiveBlockOverlayActive,
180
- getBlockEditingMode
181
- } = select(blockEditorStore);
171
+ getBlockEditingMode,
172
+ getBlockSettings,
173
+ isDragging
174
+ } = unlock(select(blockEditorStore));
182
175
  const {
183
176
  hasBlockSupport,
184
177
  getBlockType
@@ -186,18 +179,29 @@ export function useInnerBlocksProps(props = {}, options = {}) {
186
179
  const blockName = getBlockName(clientId);
187
180
  const enableClickThrough = __unstableGetEditorMode() === 'navigation';
188
181
  const blockEditingMode = getBlockEditingMode(clientId);
189
- const _parentClientId = getBlockRootClientId(clientId);
182
+ const parentClientId = getBlockRootClientId(clientId);
183
+ const [defaultLayout] = getBlockSettings(clientId, 'layout');
190
184
  return {
191
185
  __experimentalCaptureToolbars: hasBlockSupport(blockName, '__experimentalExposeControlsToChildren', false),
192
- hasOverlay: blockName !== 'core/template' && !isBlockSelected(clientId) && !hasSelectedInnerBlock(clientId, true) && enableClickThrough,
186
+ hasOverlay: blockName !== 'core/template' && !isBlockSelected(clientId) && !hasSelectedInnerBlock(clientId, true) && enableClickThrough && !isDragging(),
193
187
  name: blockName,
194
188
  blockType: getBlockType(blockName),
195
- innerBlocks: getBlocks(clientId),
196
- parentLock: getTemplateLock(_parentClientId),
197
- parentClientId: _parentClientId,
198
- isDropZoneDisabled: blockEditingMode !== 'default' || __unstableHasActiveBlockOverlayActive(clientId) || __unstableIsWithinBlockOverlay(clientId)
189
+ parentLock: getTemplateLock(parentClientId),
190
+ parentClientId,
191
+ isDropZoneDisabled: blockEditingMode === 'disabled',
192
+ defaultLayout
199
193
  };
200
194
  }, [clientId]);
195
+ const {
196
+ __experimentalCaptureToolbars,
197
+ hasOverlay,
198
+ name,
199
+ blockType,
200
+ parentLock,
201
+ parentClientId,
202
+ isDropZoneDisabled,
203
+ defaultLayout
204
+ } = selected;
201
205
  const blockDropZoneRef = useBlockDropZone({
202
206
  dropZoneElement,
203
207
  rootClientId: clientId,
@@ -210,8 +214,8 @@ export function useInnerBlocksProps(props = {}, options = {}) {
210
214
  layout,
211
215
  name,
212
216
  blockType,
213
- innerBlocks,
214
217
  parentLock,
218
+ defaultLayout,
215
219
  ...options
216
220
  };
217
221
  const InnerBlocks = innerBlocksProps.value && innerBlocksProps.onChange ? ControlledInnerBlocks : UncontrolledInnerBlocks;
@@ -1 +1 @@
1
- {"version":3,"names":["classnames","useMergeRefs","forwardRef","useMemo","useSelect","getBlockSupport","store","blocksStore","__unstableGetInnerBlocksProps","getInnerBlocksProps","ButtonBlockAppender","DefaultBlockAppender","useNestedSettingsUpdate","useInnerBlockTemplateSync","useBlockContext","BlockListItems","BlockContextProvider","useBlockEditContext","useBlockSync","blockEditorStore","useBlockDropZone","useSettings","EMPTY_OBJECT","BlockContext","children","clientId","context","createElement","value","UncontrolledInnerBlocks","props","allowedBlocks","prioritizedInserterBlocks","defaultBlock","directInsert","__experimentalDefaultBlock","__experimentalDirectInsert","template","templateLock","wrapperRef","templateInsertUpdatesSelection","__experimentalCaptureToolbars","captureToolbars","__experimentalAppenderTagName","renderAppender","orientation","placeholder","layout","name","blockType","innerBlocks","parentLock","defaultLayoutBlockSupport","allowSizingOnChildren","defaultLayout","usedLayout","memoedLayout","items","rootClientId","Object","keys","providesContext","length","ControlledInnerBlocks","ForwardedInnerBlocks","ref","innerBlocksProps","useInnerBlocksProps","className","options","__unstableDisableLayoutClassNames","__unstableDisableDropZone","dropZoneElement","__unstableLayoutClassNames","layoutClassNames","hasOverlay","parentClientId","isDropZoneDisabled","select","getBlockName","isBlockSelected","hasSelectedInnerBlock","__unstableGetEditorMode","getBlocks","getTemplateLock","getBlockRootClientId","__unstableIsWithinBlockOverlay","__unstableHasActiveBlockOverlayActive","getBlockEditingMode","hasBlockSupport","getBlockType","blockName","enableClickThrough","blockEditingMode","_parentClientId","blockDropZoneRef","isDisabled","InnerBlocks","onChange","save","Content"],"sources":["@wordpress/block-editor/src/components/inner-blocks/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useMergeRefs } from '@wordpress/compose';\nimport { forwardRef, useMemo } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport {\n\tgetBlockSupport,\n\tstore as blocksStore,\n\t__unstableGetInnerBlocksProps as getInnerBlocksProps,\n} from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport ButtonBlockAppender from './button-block-appender';\nimport DefaultBlockAppender from './default-block-appender';\nimport useNestedSettingsUpdate from './use-nested-settings-update';\nimport useInnerBlockTemplateSync from './use-inner-block-template-sync';\nimport useBlockContext from './use-block-context';\nimport { BlockListItems } from '../block-list';\nimport { BlockContextProvider } from '../block-context';\nimport { useBlockEditContext } from '../block-edit/context';\nimport useBlockSync from '../provider/use-block-sync';\nimport { store as blockEditorStore } from '../../store';\nimport useBlockDropZone from '../use-block-drop-zone';\nimport { useSettings } from '../use-settings';\n\nconst EMPTY_OBJECT = {};\n\nfunction BlockContext( { children, clientId } ) {\n\tconst context = useBlockContext( clientId );\n\treturn (\n\t\t<BlockContextProvider value={ context }>\n\t\t\t{ children }\n\t\t</BlockContextProvider>\n\t);\n}\n\n/**\n * InnerBlocks is a component which allows a single block to have multiple blocks\n * as children. The UncontrolledInnerBlocks component is used whenever the inner\n * blocks are not controlled by another entity. In other words, it is normally\n * used for inner blocks in the post editor\n *\n * @param {Object} props The component props.\n */\nfunction UncontrolledInnerBlocks( props ) {\n\tconst {\n\t\tclientId,\n\t\tallowedBlocks,\n\t\tprioritizedInserterBlocks,\n\t\tdefaultBlock,\n\t\tdirectInsert,\n\t\t__experimentalDefaultBlock,\n\t\t__experimentalDirectInsert,\n\t\ttemplate,\n\t\ttemplateLock,\n\t\twrapperRef,\n\t\ttemplateInsertUpdatesSelection,\n\t\t__experimentalCaptureToolbars: captureToolbars,\n\t\t__experimentalAppenderTagName,\n\t\trenderAppender,\n\t\torientation,\n\t\tplaceholder,\n\t\tlayout,\n\t\tname,\n\t\tblockType,\n\t\tinnerBlocks,\n\t\tparentLock,\n\t} = props;\n\n\tuseNestedSettingsUpdate(\n\t\tclientId,\n\t\tparentLock,\n\t\tallowedBlocks,\n\t\tprioritizedInserterBlocks,\n\t\tdefaultBlock,\n\t\tdirectInsert,\n\t\t__experimentalDefaultBlock,\n\t\t__experimentalDirectInsert,\n\t\ttemplateLock,\n\t\tcaptureToolbars,\n\t\torientation,\n\t\tlayout\n\t);\n\n\tuseInnerBlockTemplateSync(\n\t\tclientId,\n\t\tinnerBlocks,\n\t\ttemplate,\n\t\ttemplateLock,\n\t\ttemplateInsertUpdatesSelection\n\t);\n\n\tconst defaultLayoutBlockSupport =\n\t\tgetBlockSupport( name, 'layout' ) ||\n\t\tgetBlockSupport( name, '__experimentalLayout' ) ||\n\t\tEMPTY_OBJECT;\n\n\tconst { allowSizingOnChildren = false } = defaultLayoutBlockSupport;\n\n\tconst [ defaultLayout ] = useSettings( 'layout' );\n\n\tconst usedLayout = layout || defaultLayoutBlockSupport;\n\n\tconst memoedLayout = useMemo(\n\t\t() => ( {\n\t\t\t// Default layout will know about any content/wide size defined by the theme.\n\t\t\t...defaultLayout,\n\t\t\t...usedLayout,\n\t\t\t...( allowSizingOnChildren && {\n\t\t\t\tallowSizingOnChildren: true,\n\t\t\t} ),\n\t\t} ),\n\t\t[ defaultLayout, usedLayout, allowSizingOnChildren ]\n\t);\n\n\tconst items = (\n\t\t<BlockListItems\n\t\t\trootClientId={ clientId }\n\t\t\trenderAppender={ renderAppender }\n\t\t\t__experimentalAppenderTagName={ __experimentalAppenderTagName }\n\t\t\tlayout={ memoedLayout }\n\t\t\twrapperRef={ wrapperRef }\n\t\t\tplaceholder={ placeholder }\n\t\t/>\n\t);\n\n\tif ( Object.keys( blockType.providesContext ).length === 0 ) {\n\t\treturn items;\n\t}\n\n\treturn <BlockContext clientId={ clientId }>{ items }</BlockContext>;\n}\n\n/**\n * The controlled inner blocks component wraps the uncontrolled inner blocks\n * component with the blockSync hook. This keeps the innerBlocks of the block in\n * the block-editor store in sync with the blocks of the controlling entity. An\n * example of an inner block controller is a template part block, which provides\n * its own blocks from the template part entity data source.\n *\n * @param {Object} props The component props.\n */\nfunction ControlledInnerBlocks( props ) {\n\tuseBlockSync( props );\n\treturn <UncontrolledInnerBlocks { ...props } />;\n}\n\nconst ForwardedInnerBlocks = forwardRef( ( props, ref ) => {\n\tconst innerBlocksProps = useInnerBlocksProps( { ref }, props );\n\treturn (\n\t\t<div className=\"block-editor-inner-blocks\">\n\t\t\t<div { ...innerBlocksProps } />\n\t\t</div>\n\t);\n} );\n\n/**\n * This hook is used to lightly mark an element as an inner blocks wrapper\n * element. Call this hook and pass the returned props to the element to mark as\n * an inner blocks wrapper, automatically rendering inner blocks as children. If\n * you define a ref for the element, it is important to pass the ref to this\n * hook, which the hook in turn will pass to the component through the props it\n * returns. Optionally, you can also pass any other props through this hook, and\n * they will be merged and returned.\n *\n * @param {Object} props Optional. Props to pass to the element. Must contain\n * the ref if one is defined.\n * @param {Object} options Optional. Inner blocks options.\n *\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/inner-blocks/README.md\n */\nexport function useInnerBlocksProps( props = {}, options = {} ) {\n\tconst {\n\t\t__unstableDisableLayoutClassNames,\n\t\t__unstableDisableDropZone,\n\t\tdropZoneElement,\n\t} = options;\n\tconst {\n\t\tclientId,\n\t\tlayout = null,\n\t\t__unstableLayoutClassNames: layoutClassNames = '',\n\t} = useBlockEditContext();\n\tconst {\n\t\t__experimentalCaptureToolbars,\n\t\thasOverlay,\n\t\tname,\n\t\tblockType,\n\t\tinnerBlocks,\n\t\tparentLock,\n\t\tparentClientId,\n\t\tisDropZoneDisabled,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tif ( ! clientId ) {\n\t\t\t\treturn {};\n\t\t\t}\n\n\t\t\tconst {\n\t\t\t\tgetBlockName,\n\t\t\t\tisBlockSelected,\n\t\t\t\thasSelectedInnerBlock,\n\t\t\t\t__unstableGetEditorMode,\n\t\t\t\tgetBlocks,\n\t\t\t\tgetTemplateLock,\n\t\t\t\tgetBlockRootClientId,\n\t\t\t\t__unstableIsWithinBlockOverlay,\n\t\t\t\t__unstableHasActiveBlockOverlayActive,\n\t\t\t\tgetBlockEditingMode,\n\t\t\t} = select( blockEditorStore );\n\t\t\tconst { hasBlockSupport, getBlockType } = select( blocksStore );\n\t\t\tconst blockName = getBlockName( clientId );\n\t\t\tconst enableClickThrough =\n\t\t\t\t__unstableGetEditorMode() === 'navigation';\n\t\t\tconst blockEditingMode = getBlockEditingMode( clientId );\n\t\t\tconst _parentClientId = getBlockRootClientId( clientId );\n\t\t\treturn {\n\t\t\t\t__experimentalCaptureToolbars: hasBlockSupport(\n\t\t\t\t\tblockName,\n\t\t\t\t\t'__experimentalExposeControlsToChildren',\n\t\t\t\t\tfalse\n\t\t\t\t),\n\t\t\t\thasOverlay:\n\t\t\t\t\tblockName !== 'core/template' &&\n\t\t\t\t\t! isBlockSelected( clientId ) &&\n\t\t\t\t\t! hasSelectedInnerBlock( clientId, true ) &&\n\t\t\t\t\tenableClickThrough,\n\t\t\t\tname: blockName,\n\t\t\t\tblockType: getBlockType( blockName ),\n\t\t\t\tinnerBlocks: getBlocks( clientId ),\n\t\t\t\tparentLock: getTemplateLock( _parentClientId ),\n\t\t\t\tparentClientId: _parentClientId,\n\t\t\t\tisDropZoneDisabled:\n\t\t\t\t\tblockEditingMode !== 'default' ||\n\t\t\t\t\t__unstableHasActiveBlockOverlayActive( clientId ) ||\n\t\t\t\t\t__unstableIsWithinBlockOverlay( clientId ),\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tconst blockDropZoneRef = useBlockDropZone( {\n\t\tdropZoneElement,\n\t\trootClientId: clientId,\n\t\tparentClientId,\n\t\tisDisabled: isDropZoneDisabled,\n\t} );\n\n\tconst ref = useMergeRefs( [\n\t\tprops.ref,\n\t\t__unstableDisableDropZone ? null : blockDropZoneRef,\n\t] );\n\n\tconst innerBlocksProps = {\n\t\t__experimentalCaptureToolbars,\n\t\tlayout,\n\t\tname,\n\t\tblockType,\n\t\tinnerBlocks,\n\t\tparentLock,\n\t\t...options,\n\t};\n\tconst InnerBlocks =\n\t\tinnerBlocksProps.value && innerBlocksProps.onChange\n\t\t\t? ControlledInnerBlocks\n\t\t\t: UncontrolledInnerBlocks;\n\n\treturn {\n\t\t...props,\n\t\tref,\n\t\tclassName: classnames(\n\t\t\tprops.className,\n\t\t\t'block-editor-block-list__layout',\n\t\t\t__unstableDisableLayoutClassNames ? '' : layoutClassNames,\n\t\t\t{\n\t\t\t\t'has-overlay': hasOverlay,\n\t\t\t}\n\t\t),\n\t\tchildren: clientId ? (\n\t\t\t<InnerBlocks { ...innerBlocksProps } clientId={ clientId } />\n\t\t) : (\n\t\t\t<BlockListItems { ...options } />\n\t\t),\n\t};\n}\n\nuseInnerBlocksProps.save = getInnerBlocksProps;\n\n// Expose default appender placeholders as components.\nForwardedInnerBlocks.DefaultBlockAppender = DefaultBlockAppender;\nForwardedInnerBlocks.ButtonBlockAppender = ButtonBlockAppender;\n\nForwardedInnerBlocks.Content = () => useInnerBlocksProps.save().children;\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/inner-blocks/README.md\n */\nexport default ForwardedInnerBlocks;\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,YAAY,QAAQ,oBAAoB;AACjD,SAASC,UAAU,EAAEC,OAAO,QAAQ,oBAAoB;AACxD,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SACCC,eAAe,EACfC,KAAK,IAAIC,WAAW,EACpBC,6BAA6B,IAAIC,mBAAmB,QAC9C,mBAAmB;;AAE1B;AACA;AACA;AACA,OAAOC,mBAAmB,MAAM,yBAAyB;AACzD,OAAOC,oBAAoB,MAAM,0BAA0B;AAC3D,OAAOC,uBAAuB,MAAM,8BAA8B;AAClE,OAAOC,yBAAyB,MAAM,iCAAiC;AACvE,OAAOC,eAAe,MAAM,qBAAqB;AACj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B,KAAK,CAACsC,SAAS,EACf,iCAAiC,EACjCE,iCAAiC,GAAG,EAAE,GAAGI,gBAAgB,EACzD;MACC,aAAa,EAAEC;IAChB,CACD,CAAC;IACDnD,QAAQ,EAAEC,QAAQ,GACjBE,aAAA,CAACsE,WAAW;MAAA,GAAM/B,gBAAgB;MAAGzC,QAAQ,EAAGA;IAAU,CAAE,CAAC,GAE7DE,aAAA,CAACZ,cAAc;MAAA,GAAMsD;IAAO,CAAI;EAElC,CAAC;AACF;AAEAF,mBAAmB,CAACgC,IAAI,GAAG1F,mBAAmB;;AAE9C;AACAuD,oBAAoB,CAACrD,oBAAoB,GAAGA,oBAAoB;AAChEqD,oBAAoB,CAACtD,mBAAmB,GAAGA,mBAAmB;AAE9DsD,oBAAoB,CAACoC,OAAO,GAAG,MAAMjC,mBAAmB,CAACgC,IAAI,CAAC,CAAC,CAAC3E,QAAQ;;AAExE;AACA;AACA;AACA,eAAewC,oBAAoB"}
1
+ {"version":3,"names":["classnames","useMergeRefs","forwardRef","useMemo","memo","useSelect","getBlockSupport","store","blocksStore","__unstableGetInnerBlocksProps","getInnerBlocksProps","ButtonBlockAppender","DefaultBlockAppender","useNestedSettingsUpdate","useInnerBlockTemplateSync","useBlockContext","BlockListItems","BlockContextProvider","useBlockEditContext","useBlockSync","blockEditorStore","useBlockDropZone","unlock","EMPTY_OBJECT","BlockContext","children","clientId","context","createElement","value","BlockListItemsMemo","UncontrolledInnerBlocks","props","allowedBlocks","prioritizedInserterBlocks","defaultBlock","directInsert","__experimentalDefaultBlock","__experimentalDirectInsert","template","templateLock","wrapperRef","templateInsertUpdatesSelection","__experimentalCaptureToolbars","captureToolbars","__experimentalAppenderTagName","renderAppender","orientation","placeholder","layout","name","blockType","parentLock","defaultLayout","defaultLayoutBlockSupport","allowSizingOnChildren","usedLayout","memoedLayout","items","rootClientId","Object","keys","providesContext","length","ControlledInnerBlocks","ForwardedInnerBlocks","ref","innerBlocksProps","useInnerBlocksProps","className","options","__unstableDisableLayoutClassNames","__unstableDisableDropZone","dropZoneElement","__unstableLayoutClassNames","layoutClassNames","selected","select","getBlockName","isBlockSelected","hasSelectedInnerBlock","__unstableGetEditorMode","getTemplateLock","getBlockRootClientId","getBlockEditingMode","getBlockSettings","isDragging","hasBlockSupport","getBlockType","blockName","enableClickThrough","blockEditingMode","parentClientId","hasOverlay","isDropZoneDisabled","blockDropZoneRef","isDisabled","InnerBlocks","onChange","save","Content"],"sources":["@wordpress/block-editor/src/components/inner-blocks/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useMergeRefs } from '@wordpress/compose';\nimport { forwardRef, useMemo, memo } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport {\n\tgetBlockSupport,\n\tstore as blocksStore,\n\t__unstableGetInnerBlocksProps as getInnerBlocksProps,\n} from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport ButtonBlockAppender from './button-block-appender';\nimport DefaultBlockAppender from './default-block-appender';\nimport useNestedSettingsUpdate from './use-nested-settings-update';\nimport useInnerBlockTemplateSync from './use-inner-block-template-sync';\nimport useBlockContext from './use-block-context';\nimport { BlockListItems } from '../block-list';\nimport { BlockContextProvider } from '../block-context';\nimport { useBlockEditContext } from '../block-edit/context';\nimport useBlockSync from '../provider/use-block-sync';\nimport { store as blockEditorStore } from '../../store';\nimport useBlockDropZone from '../use-block-drop-zone';\nimport { unlock } from '../../lock-unlock';\n\nconst EMPTY_OBJECT = {};\n\nfunction BlockContext( { children, clientId } ) {\n\tconst context = useBlockContext( clientId );\n\treturn (\n\t\t<BlockContextProvider value={ context }>\n\t\t\t{ children }\n\t\t</BlockContextProvider>\n\t);\n}\n\nconst BlockListItemsMemo = memo( BlockListItems );\n\n/**\n * InnerBlocks is a component which allows a single block to have multiple blocks\n * as children. The UncontrolledInnerBlocks component is used whenever the inner\n * blocks are not controlled by another entity. In other words, it is normally\n * used for inner blocks in the post editor\n *\n * @param {Object} props The component props.\n */\nfunction UncontrolledInnerBlocks( props ) {\n\tconst {\n\t\tclientId,\n\t\tallowedBlocks,\n\t\tprioritizedInserterBlocks,\n\t\tdefaultBlock,\n\t\tdirectInsert,\n\t\t__experimentalDefaultBlock,\n\t\t__experimentalDirectInsert,\n\t\ttemplate,\n\t\ttemplateLock,\n\t\twrapperRef,\n\t\ttemplateInsertUpdatesSelection,\n\t\t__experimentalCaptureToolbars: captureToolbars,\n\t\t__experimentalAppenderTagName,\n\t\trenderAppender,\n\t\torientation,\n\t\tplaceholder,\n\t\tlayout,\n\t\tname,\n\t\tblockType,\n\t\tparentLock,\n\t\tdefaultLayout,\n\t} = props;\n\n\tuseNestedSettingsUpdate(\n\t\tclientId,\n\t\tparentLock,\n\t\tallowedBlocks,\n\t\tprioritizedInserterBlocks,\n\t\tdefaultBlock,\n\t\tdirectInsert,\n\t\t__experimentalDefaultBlock,\n\t\t__experimentalDirectInsert,\n\t\ttemplateLock,\n\t\tcaptureToolbars,\n\t\torientation,\n\t\tlayout\n\t);\n\n\tuseInnerBlockTemplateSync(\n\t\tclientId,\n\t\ttemplate,\n\t\ttemplateLock,\n\t\ttemplateInsertUpdatesSelection\n\t);\n\n\tconst defaultLayoutBlockSupport =\n\t\tgetBlockSupport( name, 'layout' ) ||\n\t\tgetBlockSupport( name, '__experimentalLayout' ) ||\n\t\tEMPTY_OBJECT;\n\n\tconst { allowSizingOnChildren = false } = defaultLayoutBlockSupport;\n\tconst usedLayout = layout || defaultLayoutBlockSupport;\n\n\tconst memoedLayout = useMemo(\n\t\t() => ( {\n\t\t\t// Default layout will know about any content/wide size defined by the theme.\n\t\t\t...defaultLayout,\n\t\t\t...usedLayout,\n\t\t\t...( allowSizingOnChildren && {\n\t\t\t\tallowSizingOnChildren: true,\n\t\t\t} ),\n\t\t} ),\n\t\t[ defaultLayout, usedLayout, allowSizingOnChildren ]\n\t);\n\n\t// For controlled inner blocks, we don't want a change in blocks to\n\t// re-render the blocks list.\n\tconst items = (\n\t\t<BlockListItemsMemo\n\t\t\trootClientId={ clientId }\n\t\t\trenderAppender={ renderAppender }\n\t\t\t__experimentalAppenderTagName={ __experimentalAppenderTagName }\n\t\t\tlayout={ memoedLayout }\n\t\t\twrapperRef={ wrapperRef }\n\t\t\tplaceholder={ placeholder }\n\t\t/>\n\t);\n\n\tif ( Object.keys( blockType.providesContext ).length === 0 ) {\n\t\treturn items;\n\t}\n\n\treturn <BlockContext clientId={ clientId }>{ items }</BlockContext>;\n}\n\n/**\n * The controlled inner blocks component wraps the uncontrolled inner blocks\n * component with the blockSync hook. This keeps the innerBlocks of the block in\n * the block-editor store in sync with the blocks of the controlling entity. An\n * example of an inner block controller is a template part block, which provides\n * its own blocks from the template part entity data source.\n *\n * @param {Object} props The component props.\n */\nfunction ControlledInnerBlocks( props ) {\n\tuseBlockSync( props );\n\treturn <UncontrolledInnerBlocks { ...props } />;\n}\n\nconst ForwardedInnerBlocks = forwardRef( ( props, ref ) => {\n\tconst innerBlocksProps = useInnerBlocksProps( { ref }, props );\n\treturn (\n\t\t<div className=\"block-editor-inner-blocks\">\n\t\t\t<div { ...innerBlocksProps } />\n\t\t</div>\n\t);\n} );\n\n/**\n * This hook is used to lightly mark an element as an inner blocks wrapper\n * element. Call this hook and pass the returned props to the element to mark as\n * an inner blocks wrapper, automatically rendering inner blocks as children. If\n * you define a ref for the element, it is important to pass the ref to this\n * hook, which the hook in turn will pass to the component through the props it\n * returns. Optionally, you can also pass any other props through this hook, and\n * they will be merged and returned.\n *\n * @param {Object} props Optional. Props to pass to the element. Must contain\n * the ref if one is defined.\n * @param {Object} options Optional. Inner blocks options.\n *\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/inner-blocks/README.md\n */\nexport function useInnerBlocksProps( props = {}, options = {} ) {\n\tconst {\n\t\t__unstableDisableLayoutClassNames,\n\t\t__unstableDisableDropZone,\n\t\tdropZoneElement,\n\t} = options;\n\tconst {\n\t\tclientId,\n\t\tlayout = null,\n\t\t__unstableLayoutClassNames: layoutClassNames = '',\n\t} = useBlockEditContext();\n\tconst selected = useSelect(\n\t\t( select ) => {\n\t\t\tif ( ! clientId ) {\n\t\t\t\treturn {};\n\t\t\t}\n\n\t\t\tconst {\n\t\t\t\tgetBlockName,\n\t\t\t\tisBlockSelected,\n\t\t\t\thasSelectedInnerBlock,\n\t\t\t\t__unstableGetEditorMode,\n\t\t\t\tgetTemplateLock,\n\t\t\t\tgetBlockRootClientId,\n\t\t\t\tgetBlockEditingMode,\n\t\t\t\tgetBlockSettings,\n\t\t\t\tisDragging,\n\t\t\t} = unlock( select( blockEditorStore ) );\n\t\t\tconst { hasBlockSupport, getBlockType } = select( blocksStore );\n\t\t\tconst blockName = getBlockName( clientId );\n\t\t\tconst enableClickThrough =\n\t\t\t\t__unstableGetEditorMode() === 'navigation';\n\t\t\tconst blockEditingMode = getBlockEditingMode( clientId );\n\t\t\tconst parentClientId = getBlockRootClientId( clientId );\n\t\t\tconst [ defaultLayout ] = getBlockSettings( clientId, 'layout' );\n\t\t\treturn {\n\t\t\t\t__experimentalCaptureToolbars: hasBlockSupport(\n\t\t\t\t\tblockName,\n\t\t\t\t\t'__experimentalExposeControlsToChildren',\n\t\t\t\t\tfalse\n\t\t\t\t),\n\t\t\t\thasOverlay:\n\t\t\t\t\tblockName !== 'core/template' &&\n\t\t\t\t\t! isBlockSelected( clientId ) &&\n\t\t\t\t\t! hasSelectedInnerBlock( clientId, true ) &&\n\t\t\t\t\tenableClickThrough &&\n\t\t\t\t\t! isDragging(),\n\t\t\t\tname: blockName,\n\t\t\t\tblockType: getBlockType( blockName ),\n\t\t\t\tparentLock: getTemplateLock( parentClientId ),\n\t\t\t\tparentClientId,\n\t\t\t\tisDropZoneDisabled: blockEditingMode === 'disabled',\n\t\t\t\tdefaultLayout,\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\tconst {\n\t\t__experimentalCaptureToolbars,\n\t\thasOverlay,\n\t\tname,\n\t\tblockType,\n\t\tparentLock,\n\t\tparentClientId,\n\t\tisDropZoneDisabled,\n\t\tdefaultLayout,\n\t} = selected;\n\n\tconst blockDropZoneRef = useBlockDropZone( {\n\t\tdropZoneElement,\n\t\trootClientId: clientId,\n\t\tparentClientId,\n\t\tisDisabled: isDropZoneDisabled,\n\t} );\n\n\tconst ref = useMergeRefs( [\n\t\tprops.ref,\n\t\t__unstableDisableDropZone ? null : blockDropZoneRef,\n\t] );\n\n\tconst innerBlocksProps = {\n\t\t__experimentalCaptureToolbars,\n\t\tlayout,\n\t\tname,\n\t\tblockType,\n\t\tparentLock,\n\t\tdefaultLayout,\n\t\t...options,\n\t};\n\tconst InnerBlocks =\n\t\tinnerBlocksProps.value && innerBlocksProps.onChange\n\t\t\t? ControlledInnerBlocks\n\t\t\t: UncontrolledInnerBlocks;\n\n\treturn {\n\t\t...props,\n\t\tref,\n\t\tclassName: classnames(\n\t\t\tprops.className,\n\t\t\t'block-editor-block-list__layout',\n\t\t\t__unstableDisableLayoutClassNames ? '' : layoutClassNames,\n\t\t\t{\n\t\t\t\t'has-overlay': hasOverlay,\n\t\t\t}\n\t\t),\n\t\tchildren: clientId ? (\n\t\t\t<InnerBlocks { ...innerBlocksProps } clientId={ clientId } />\n\t\t) : (\n\t\t\t<BlockListItems { ...options } />\n\t\t),\n\t};\n}\n\nuseInnerBlocksProps.save = getInnerBlocksProps;\n\n// Expose default appender placeholders as components.\nForwardedInnerBlocks.DefaultBlockAppender = DefaultBlockAppender;\nForwardedInnerBlocks.ButtonBlockAppender = ButtonBlockAppender;\n\nForwardedInnerBlocks.Content = () => useInnerBlocksProps.save().children;\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/inner-blocks/README.md\n */\nexport default ForwardedInnerBlocks;\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,YAAY,QAAQ,oBAAoB;AACjD,SAASC,UAAU,EAAEC,OAAO,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AyB,GAAG,IAAI,GAAGuB,gBAAgB,CAClD,CAAC;EAEH,MAAM5B,gBAAgB,GAAG;IACxBxB,6BAA6B;IAC7BM,MAAM;IACNC,IAAI;IACJC,SAAS;IACTC,UAAU;IACVC,aAAa;IACb,GAAGiB;EACJ,CAAC;EACD,MAAM2B,WAAW,GAChB9B,gBAAgB,CAACtC,KAAK,IAAIsC,gBAAgB,CAAC+B,QAAQ,GAChDlC,qBAAqB,GACrBjC,uBAAuB;EAE3B,OAAO;IACN,GAAGC,KAAK;IACRkC,GAAG;IACHG,SAAS,EAAErE,UAAU,CACpBgC,KAAK,CAACqC,SAAS,EACf,iCAAiC,EACjCE,iCAAiC,GAAG,EAAE,GAAGI,gBAAgB,EACzD;MACC,aAAa,EAAEkB;IAChB,CACD,CAAC;IACDpE,QAAQ,EAAEC,QAAQ,GACjBE,aAAA,CAACqE,WAAW;MAAA,GAAM9B,gBAAgB;MAAGzC,QAAQ,EAAGA;IAAU,CAAE,CAAC,GAE7DE,aAAA,CAACZ,cAAc;MAAA,GAAMsD;IAAO,CAAI;EAElC,CAAC;AACF;AAEAF,mBAAmB,CAAC+B,IAAI,GAAGzF,mBAAmB;;AAE9C;AACAuD,oBAAoB,CAACrD,oBAAoB,GAAGA,oBAAoB;AAChEqD,oBAAoB,CAACtD,mBAAmB,GAAGA,mBAAmB;AAE9DsD,oBAAoB,CAACmC,OAAO,GAAG,MAAMhC,mBAAmB,CAAC+B,IAAI,CAAC,CAAC,CAAC1E,QAAQ;;AAExE;AACA;AACA;AACA,eAAewC,oBAAoB"}
@@ -101,23 +101,20 @@ function UncontrolledInnerBlocks(props) {
101
101
  const context = useBlockContext(clientId);
102
102
  const {
103
103
  nestingLevel,
104
- innerBlocks,
105
104
  parentLock
106
105
  } = useSelect(select => {
107
106
  const {
108
107
  getBlockParents,
109
- getBlocks,
110
108
  getTemplateLock,
111
109
  getBlockRootClientId
112
110
  } = select(blockEditorStore);
113
111
  return {
114
112
  nestingLevel: getBlockParents(clientId)?.length,
115
- innerBlocks: getBlocks(clientId),
116
113
  parentLock: getTemplateLock(getBlockRootClientId(clientId))
117
114
  };
118
115
  }, [clientId]);
119
116
  useNestedSettingsUpdate(clientId, parentLock, allowedBlocks, prioritizedInserterBlocks, defaultBlock, directInsert, __experimentalDefaultBlock, __experimentalDirectInsert, templateLock, captureToolbars, orientation, layout);
120
- useInnerBlockTemplateSync(clientId, innerBlocks, template, templateLock, templateInsertUpdatesSelection);
117
+ useInnerBlockTemplateSync(clientId, template, templateLock, templateInsertUpdatesSelection);
121
118
  if (nestingLevel >= MAX_NESTING_DEPTH) {
122
119
  return createElement(WarningMaxDepthExceeded, {
123
120
  clientId: clientId
@@ -1 +1 @@
1
- {"version":3,"names":["__unstableGetInnerBlocksProps","getInnerBlocksProps","useRef","useSelect","ButtonBlockAppender","DefaultBlockAppender","useNestedSettingsUpdate","useInnerBlockTemplateSync","useBlockContext","BlockList","useBlockEditContext","useBlockSync","BlockContextProvider","defaultLayout","LayoutProvider","store","blockEditorStore","WarningMaxDepthExceeded","MAX_NESTING_DEPTH","useInnerBlocksProps","props","options","fallbackRef","clientId","ref","InnerBlocks","value","onChange","ControlledInnerBlocks","UncontrolledInnerBlocks","children","createElement","wrapperRef","allowedBlocks","prioritizedInserterBlocks","defaultBlock","directInsert","__experimentalDefaultBlock","__experimentalDirectInsert","template","templateLock","templateInsertUpdatesSelection","__experimentalCaptureToolbars","captureToolbars","orientation","renderAppender","renderFooterAppender","parentWidth","horizontal","contentResizeMode","contentStyle","onAddBlock","onDeleteBlock","marginVertical","marginHorizontal","horizontalAlignment","filterInnerBlocks","blockWidth","layout","gridProperties","context","nestingLevel","innerBlocks","parentLock","select","getBlockParents","getBlocks","getTemplateLock","getBlockRootClientId","length","rootClientId","withFooter","allProps","save","Content"],"sources":["@wordpress/block-editor/src/components/inner-blocks/index.native.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __unstableGetInnerBlocksProps as getInnerBlocksProps } from '@wordpress/blocks';\nimport { useRef } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport ButtonBlockAppender from './button-block-appender';\nimport DefaultBlockAppender from './default-block-appender';\nimport useNestedSettingsUpdate from './use-nested-settings-update';\nimport useInnerBlockTemplateSync from './use-inner-block-template-sync';\nimport useBlockContext from './use-block-context';\n\n/**\n * Internal dependencies\n */\nimport BlockList from '../block-list';\nimport { useBlockEditContext } from '../block-edit/context';\nimport useBlockSync from '../provider/use-block-sync';\nimport { BlockContextProvider } from '../block-context';\nimport { defaultLayout, LayoutProvider } from '../block-list/layout';\nimport { store as blockEditorStore } from '../../store';\nimport WarningMaxDepthExceeded from './warning-max-depth-exceeded';\nimport { MAX_NESTING_DEPTH } from './constants';\n\n/**\n * This hook is used to lightly mark an element as an inner blocks wrapper\n * element. Call this hook and pass the returned props to the element to mark as\n * an inner blocks wrapper, automatically rendering inner blocks as children. If\n * you define a ref for the element, it is important to pass the ref to this\n * hook, which the hook in turn will pass to the component through the props it\n * returns. Optionally, you can also pass any other props through this hook, and\n * they will be merged and returned.\n *\n * @param {Object} props Optional. Props to pass to the element. Must contain\n * the ref if one is defined.\n * @param {Object} options Optional. Inner blocks options.\n *\n * @see https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/inner-blocks/README.md\n */\nexport function useInnerBlocksProps( props = {}, options = {} ) {\n\tconst fallbackRef = useRef();\n\tconst { clientId } = useBlockEditContext();\n\n\tconst ref = props.ref || fallbackRef;\n\tconst InnerBlocks =\n\t\toptions.value && options.onChange\n\t\t\t? ControlledInnerBlocks\n\t\t\t: UncontrolledInnerBlocks;\n\n\treturn {\n\t\t...props,\n\t\tref,\n\t\tchildren: (\n\t\t\t<InnerBlocks\n\t\t\t\t{ ...options }\n\t\t\t\tclientId={ clientId }\n\t\t\t\twrapperRef={ ref }\n\t\t\t/>\n\t\t),\n\t};\n}\n\n/**\n * InnerBlocks is a component which allows a single block to have multiple blocks\n * as children. The UncontrolledInnerBlocks component is used whenever the inner\n * blocks are not controlled by another entity. In other words, it is normally\n * used for inner blocks in the post editor\n *\n * @param {Object} props The component props.\n */\nfunction UncontrolledInnerBlocks( props ) {\n\tconst {\n\t\tclientId,\n\t\tallowedBlocks,\n\t\tprioritizedInserterBlocks,\n\t\tdefaultBlock,\n\t\tdirectInsert,\n\t\t__experimentalDefaultBlock,\n\t\t__experimentalDirectInsert,\n\t\ttemplate,\n\t\ttemplateLock,\n\t\ttemplateInsertUpdatesSelection,\n\t\t__experimentalCaptureToolbars: captureToolbars,\n\t\torientation,\n\t\trenderAppender,\n\t\trenderFooterAppender,\n\t\tparentWidth,\n\t\thorizontal,\n\t\tcontentResizeMode,\n\t\tcontentStyle,\n\t\tonAddBlock,\n\t\tonDeleteBlock,\n\t\tmarginVertical,\n\t\tmarginHorizontal,\n\t\thorizontalAlignment,\n\t\tfilterInnerBlocks,\n\t\tblockWidth,\n\t\tlayout = defaultLayout,\n\t\tgridProperties,\n\t} = props;\n\n\tconst context = useBlockContext( clientId );\n\n\tconst { nestingLevel, innerBlocks, parentLock } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlockParents,\n\t\t\t\tgetBlocks,\n\t\t\t\tgetTemplateLock,\n\t\t\t\tgetBlockRootClientId,\n\t\t\t} = select( blockEditorStore );\n\t\t\treturn {\n\t\t\t\tnestingLevel: getBlockParents( clientId )?.length,\n\t\t\t\tinnerBlocks: getBlocks( clientId ),\n\t\t\t\tparentLock: getTemplateLock( getBlockRootClientId( clientId ) ),\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tuseNestedSettingsUpdate(\n\t\tclientId,\n\t\tparentLock,\n\t\tallowedBlocks,\n\t\tprioritizedInserterBlocks,\n\t\tdefaultBlock,\n\t\tdirectInsert,\n\t\t__experimentalDefaultBlock,\n\t\t__experimentalDirectInsert,\n\t\ttemplateLock,\n\t\tcaptureToolbars,\n\t\torientation,\n\t\tlayout\n\t);\n\n\tuseInnerBlockTemplateSync(\n\t\tclientId,\n\t\tinnerBlocks,\n\t\ttemplate,\n\t\ttemplateLock,\n\t\ttemplateInsertUpdatesSelection\n\t);\n\n\tif ( nestingLevel >= MAX_NESTING_DEPTH ) {\n\t\treturn <WarningMaxDepthExceeded clientId={ clientId } />;\n\t}\n\n\treturn (\n\t\t<LayoutProvider value={ layout }>\n\t\t\t<BlockContextProvider value={ context }>\n\t\t\t\t<BlockList\n\t\t\t\t\tmarginVertical={ marginVertical }\n\t\t\t\t\tmarginHorizontal={ marginHorizontal }\n\t\t\t\t\trootClientId={ clientId }\n\t\t\t\t\trenderAppender={ renderAppender }\n\t\t\t\t\trenderFooterAppender={ renderFooterAppender }\n\t\t\t\t\twithFooter={ false }\n\t\t\t\t\torientation={ orientation }\n\t\t\t\t\tparentWidth={ parentWidth }\n\t\t\t\t\thorizontalAlignment={ horizontalAlignment }\n\t\t\t\t\thorizontal={ horizontal }\n\t\t\t\t\tcontentResizeMode={ contentResizeMode }\n\t\t\t\t\tcontentStyle={ contentStyle }\n\t\t\t\t\tonAddBlock={ onAddBlock }\n\t\t\t\t\tonDeleteBlock={ onDeleteBlock }\n\t\t\t\t\tfilterInnerBlocks={ filterInnerBlocks }\n\t\t\t\t\tgridProperties={ gridProperties }\n\t\t\t\t\tblockWidth={ blockWidth }\n\t\t\t\t/>\n\t\t\t</BlockContextProvider>\n\t\t</LayoutProvider>\n\t);\n}\n\n/**\n * The controlled inner blocks component wraps the uncontrolled inner blocks\n * component with the blockSync hook. This keeps the innerBlocks of the block in\n * the block-editor store in sync with the blocks of the controlling entity. An\n * example of an inner block controller is a template part block, which provides\n * its own blocks from the template part entity data source.\n *\n * @param {Object} props The component props.\n */\nfunction ControlledInnerBlocks( props ) {\n\tuseBlockSync( props );\n\treturn <UncontrolledInnerBlocks { ...props } />;\n}\n\n/**\n * Wrapped InnerBlocks component which detects whether to use the controlled or\n * uncontrolled variations of the InnerBlocks component. This is the component\n * which should be used throughout the application.\n *\n * @param {Object} props The component props.\n */\nconst InnerBlocks = ( props ) => {\n\tconst { clientId } = useBlockEditContext();\n\n\tconst allProps = {\n\t\tclientId,\n\t\t...props,\n\t};\n\n\t// Detects if the InnerBlocks should be controlled by an incoming value.\n\treturn props.value && props.onChange ? (\n\t\t<ControlledInnerBlocks { ...allProps } />\n\t) : (\n\t\t<UncontrolledInnerBlocks { ...allProps } />\n\t);\n};\n\n// Expose default appender placeholders as components.\nInnerBlocks.DefaultBlockAppender = DefaultBlockAppender;\nInnerBlocks.ButtonBlockAppender = ButtonBlockAppender;\n\nuseInnerBlocksProps.save = getInnerBlocksProps;\n\nInnerBlocks.Content = () => useInnerBlocksProps.save().children;\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/inner-blocks/README.md\n */\nexport default InnerBlocks;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,6BAA6B,IAAIC,mBAAmB,QAAQ,mBAAmB;AACxF,SAASC,MAAM,QAAQ,oBAAoB;AAC3C,SAASC,SAAS,QAAQ,iBAAiB;;AAE3C;AACA;AACA;AACA,OAAOC,mBAAmB,MAAM,yBAAyB;AACzD,OAAOC,oBAAoB,MAAM,0BAA0B;AAC3D,OAAOC,uBAAuB,MAAM,8BAA8B;AAClE,OAAOC,yBAAyB,MAAM,iCAAiC;AACvE,OAAOC,eAAe,MAAM,qBAAqB;;AAEjD;AACA;AACA;AACA,OAAOC,SAAS,MAAM,eAAe;AACrC,SAASC,mBAAmB,QAAQ,uBAAuB;AAC3D,OAAOC,YAAY,MAAM,4BAA4B;AACrD,SAASC,oBAAoB,QAAQ,kBAAkB;AACvD,SAASC,aAAa,EAAEC,cAAc,QAAQ,sBAAsB;AACpE,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;AACvD,OAAOC,uBAAuB,MAAM,8BAA8B;AAClE,SAASC,iBAAiB,QAAQ,aAAa;;AAE/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A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AAY;IACzBC,aAAa,EAAGA,aAAe;IAC/BI,iBAAiB,EAAGA,iBAAmB;IACvCG,cAAc,EAAGA,cAAgB;IACjCF,UAAU,EAAGA;EAAY,CACzB,CACoB,CACP,CAAC;AAEnB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS7B,qBAAqBA,CAAER,KAAK,EAAG;EACvCT,YAAY,CAAES,KAAM,CAAC;EACrB,OAAOW,aAAA,CAACF,uBAAuB;IAAA,GAAMT;EAAK,CAAI,CAAC;AAChD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMK,WAAW,GAAKL,KAAK,IAAM;EAChC,MAAM;IAAEG;EAAS,CAAC,GAAGb,mBAAmB,CAAC,CAAC;EAE1C,MAAM8D,QAAQ,GAAG;IAChBjD,QAAQ;IACR,GAAGH;EACJ,CAAC;;EAED;EACA,OAAOA,KAAK,CAACM,KAAK,IAAIN,KAAK,CAACO,QAAQ,GACnCI,aAAA,CAACH,qBAAqB;IAAA,GAAM4C;EAAQ,CAAI,CAAC,GAEzCzC,aAAA,CAACF,uBAAuB;IAAA,GAAM2C;EAAQ,CAAI,CAC1C;AACF,CAAC;;AAED;AACA/C,WAAW,CAACpB,oBAAoB,GAAGA,oBAAoB;AACvDoB,WAAW,CAACrB,mBAAmB,GAAGA,mBAAmB;AAErDe,mBAAmB,CAACsD,IAAI,GAAGxE,mBAAmB;AAE9CwB,WAAW,CAACiD,OAAO,GAAG,MAAMvD,mBAAmB,CAACsD,IAAI,CAAC,CAAC,CAAC3C,QAAQ;;AAE/D;AACA;AACA;AACA,eAAeL,WAAW"}
1
+ {"version":3,"names":["__unstableGetInnerBlocksProps","getInnerBlocksProps","useRef","useSelect","ButtonBlockAppender","DefaultBlockAppender","useNestedSettingsUpdate","useInnerBlockTemplateSync","useBlockContext","BlockList","useBlockEditContext","useBlockSync","BlockContextProvider","defaultLayout","LayoutProvider","store","blockEditorStore","WarningMaxDepthExceeded","MAX_NESTING_DEPTH","useInnerBlocksProps","props","options","fallbackRef","clientId","ref","InnerBlocks","value","onChange","ControlledInnerBlocks","UncontrolledInnerBlocks","children","createElement","wrapperRef","allowedBlocks","prioritizedInserterBlocks","defaultBlock","directInsert","__experimentalDefaultBlock","__experimentalDirectInsert","template","templateLock","templateInsertUpdatesSelection","__experimentalCaptureToolbars","captureToolbars","orientation","renderAppender","renderFooterAppender","parentWidth","horizontal","contentResizeMode","contentStyle","onAddBlock","onDeleteBlock","marginVertical","marginHorizontal","horizontalAlignment","filterInnerBlocks","blockWidth","layout","gridProperties","context","nestingLevel","parentLock","select","getBlockParents","getTemplateLock","getBlockRootClientId","length","rootClientId","withFooter","allProps","save","Content"],"sources":["@wordpress/block-editor/src/components/inner-blocks/index.native.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __unstableGetInnerBlocksProps as getInnerBlocksProps } from '@wordpress/blocks';\nimport { useRef } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport ButtonBlockAppender from './button-block-appender';\nimport DefaultBlockAppender from './default-block-appender';\nimport useNestedSettingsUpdate from './use-nested-settings-update';\nimport useInnerBlockTemplateSync from './use-inner-block-template-sync';\nimport useBlockContext from './use-block-context';\n\n/**\n * Internal dependencies\n */\nimport BlockList from '../block-list';\nimport { useBlockEditContext } from '../block-edit/context';\nimport useBlockSync from '../provider/use-block-sync';\nimport { BlockContextProvider } from '../block-context';\nimport { defaultLayout, LayoutProvider } from '../block-list/layout';\nimport { store as blockEditorStore } from '../../store';\nimport WarningMaxDepthExceeded from './warning-max-depth-exceeded';\nimport { MAX_NESTING_DEPTH } from './constants';\n\n/**\n * This hook is used to lightly mark an element as an inner blocks wrapper\n * element. Call this hook and pass the returned props to the element to mark as\n * an inner blocks wrapper, automatically rendering inner blocks as children. If\n * you define a ref for the element, it is important to pass the ref to this\n * hook, which the hook in turn will pass to the component through the props it\n * returns. Optionally, you can also pass any other props through this hook, and\n * they will be merged and returned.\n *\n * @param {Object} props Optional. Props to pass to the element. Must contain\n * the ref if one is defined.\n * @param {Object} options Optional. Inner blocks options.\n *\n * @see https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/inner-blocks/README.md\n */\nexport function useInnerBlocksProps( props = {}, options = {} ) {\n\tconst fallbackRef = useRef();\n\tconst { clientId } = useBlockEditContext();\n\n\tconst ref = props.ref || fallbackRef;\n\tconst InnerBlocks =\n\t\toptions.value && options.onChange\n\t\t\t? ControlledInnerBlocks\n\t\t\t: UncontrolledInnerBlocks;\n\n\treturn {\n\t\t...props,\n\t\tref,\n\t\tchildren: (\n\t\t\t<InnerBlocks\n\t\t\t\t{ ...options }\n\t\t\t\tclientId={ clientId }\n\t\t\t\twrapperRef={ ref }\n\t\t\t/>\n\t\t),\n\t};\n}\n\n/**\n * InnerBlocks is a component which allows a single block to have multiple blocks\n * as children. The UncontrolledInnerBlocks component is used whenever the inner\n * blocks are not controlled by another entity. In other words, it is normally\n * used for inner blocks in the post editor\n *\n * @param {Object} props The component props.\n */\nfunction UncontrolledInnerBlocks( props ) {\n\tconst {\n\t\tclientId,\n\t\tallowedBlocks,\n\t\tprioritizedInserterBlocks,\n\t\tdefaultBlock,\n\t\tdirectInsert,\n\t\t__experimentalDefaultBlock,\n\t\t__experimentalDirectInsert,\n\t\ttemplate,\n\t\ttemplateLock,\n\t\ttemplateInsertUpdatesSelection,\n\t\t__experimentalCaptureToolbars: captureToolbars,\n\t\torientation,\n\t\trenderAppender,\n\t\trenderFooterAppender,\n\t\tparentWidth,\n\t\thorizontal,\n\t\tcontentResizeMode,\n\t\tcontentStyle,\n\t\tonAddBlock,\n\t\tonDeleteBlock,\n\t\tmarginVertical,\n\t\tmarginHorizontal,\n\t\thorizontalAlignment,\n\t\tfilterInnerBlocks,\n\t\tblockWidth,\n\t\tlayout = defaultLayout,\n\t\tgridProperties,\n\t} = props;\n\n\tconst context = useBlockContext( clientId );\n\n\tconst { nestingLevel, parentLock } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockParents, getTemplateLock, getBlockRootClientId } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\treturn {\n\t\t\t\tnestingLevel: getBlockParents( clientId )?.length,\n\t\t\t\tparentLock: getTemplateLock( getBlockRootClientId( clientId ) ),\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tuseNestedSettingsUpdate(\n\t\tclientId,\n\t\tparentLock,\n\t\tallowedBlocks,\n\t\tprioritizedInserterBlocks,\n\t\tdefaultBlock,\n\t\tdirectInsert,\n\t\t__experimentalDefaultBlock,\n\t\t__experimentalDirectInsert,\n\t\ttemplateLock,\n\t\tcaptureToolbars,\n\t\torientation,\n\t\tlayout\n\t);\n\n\tuseInnerBlockTemplateSync(\n\t\tclientId,\n\t\ttemplate,\n\t\ttemplateLock,\n\t\ttemplateInsertUpdatesSelection\n\t);\n\n\tif ( nestingLevel >= MAX_NESTING_DEPTH ) {\n\t\treturn <WarningMaxDepthExceeded clientId={ clientId } />;\n\t}\n\n\treturn (\n\t\t<LayoutProvider value={ layout }>\n\t\t\t<BlockContextProvider value={ context }>\n\t\t\t\t<BlockList\n\t\t\t\t\tmarginVertical={ marginVertical }\n\t\t\t\t\tmarginHorizontal={ marginHorizontal }\n\t\t\t\t\trootClientId={ clientId }\n\t\t\t\t\trenderAppender={ renderAppender }\n\t\t\t\t\trenderFooterAppender={ renderFooterAppender }\n\t\t\t\t\twithFooter={ false }\n\t\t\t\t\torientation={ orientation }\n\t\t\t\t\tparentWidth={ parentWidth }\n\t\t\t\t\thorizontalAlignment={ horizontalAlignment }\n\t\t\t\t\thorizontal={ horizontal }\n\t\t\t\t\tcontentResizeMode={ contentResizeMode }\n\t\t\t\t\tcontentStyle={ contentStyle }\n\t\t\t\t\tonAddBlock={ onAddBlock }\n\t\t\t\t\tonDeleteBlock={ onDeleteBlock }\n\t\t\t\t\tfilterInnerBlocks={ filterInnerBlocks }\n\t\t\t\t\tgridProperties={ gridProperties }\n\t\t\t\t\tblockWidth={ blockWidth }\n\t\t\t\t/>\n\t\t\t</BlockContextProvider>\n\t\t</LayoutProvider>\n\t);\n}\n\n/**\n * The controlled inner blocks component wraps the uncontrolled inner blocks\n * component with the blockSync hook. This keeps the innerBlocks of the block in\n * the block-editor store in sync with the blocks of the controlling entity. An\n * example of an inner block controller is a template part block, which provides\n * its own blocks from the template part entity data source.\n *\n * @param {Object} props The component props.\n */\nfunction ControlledInnerBlocks( props ) {\n\tuseBlockSync( props );\n\treturn <UncontrolledInnerBlocks { ...props } />;\n}\n\n/**\n * Wrapped InnerBlocks component which detects whether to use the controlled or\n * uncontrolled variations of the InnerBlocks component. This is the component\n * which should be used throughout the application.\n *\n * @param {Object} props The component props.\n */\nconst InnerBlocks = ( props ) => {\n\tconst { clientId } = useBlockEditContext();\n\n\tconst allProps = {\n\t\tclientId,\n\t\t...props,\n\t};\n\n\t// Detects if the InnerBlocks should be controlled by an incoming value.\n\treturn props.value && props.onChange ? (\n\t\t<ControlledInnerBlocks { ...allProps } />\n\t) : (\n\t\t<UncontrolledInnerBlocks { ...allProps } />\n\t);\n};\n\n// Expose default appender placeholders as components.\nInnerBlocks.DefaultBlockAppender = DefaultBlockAppender;\nInnerBlocks.ButtonBlockAppender = ButtonBlockAppender;\n\nuseInnerBlocksProps.save = getInnerBlocksProps;\n\nInnerBlocks.Content = () => useInnerBlocksProps.save().children;\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/inner-blocks/README.md\n */\nexport default InnerBlocks;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,6BAA6B,IAAIC,mBAAmB,QAAQ,mBAAmB;AACxF,SAASC,MAAM,QAAQ,oBAAoB;AAC3C,SAASC,SAAS,QAAQ,iBAAiB;;AAE3C;AACA;AACA;AACA,OAAOC,mBAAmB,MAAM,yBAAyB;AACzD,OAAOC,oBAAoB,MAAM,0BAA0B;AAC3D,OAAOC,uBAAuB,MAAM,8BAA8B;AAClE,OAAOC,yB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BAAmB;AAE9CwB,WAAW,CAAC+C,OAAO,GAAG,MAAMrD,mBAAmB,CAACoD,IAAI,CAAC,CAAC,CAACzC,QAAQ;;AAE/D;AACA;AACA;AACA,eAAeL,WAAW"}
@@ -23,7 +23,6 @@ import { store as blockEditorStore } from '../../store';
23
23
  * then we replace the inner blocks with the correct value after synchronizing it with the template.
24
24
  *
25
25
  * @param {string} clientId The block client ID.
26
- * @param {Array} innerBlocks
27
26
  * @param {Object} template The template to match.
28
27
  * @param {string} templateLock The template lock state for the inner blocks. For
29
28
  * example, if the template lock is set to "all",
@@ -35,7 +34,7 @@ import { store as blockEditorStore } from '../../store';
35
34
  * block-editor selection state when inner blocks
36
35
  * are replaced after template synchronization.
37
36
  */
38
- export default function useInnerBlockTemplateSync(clientId, innerBlocks, template, templateLock, templateInsertUpdatesSelection) {
37
+ export default function useInnerBlockTemplateSync(clientId, template, templateLock, templateInsertUpdatesSelection) {
39
38
  // Instead of adding a useSelect mapping here, please add to the useSelect
40
39
  // mapping in InnerBlocks! Every subscription impacts performance.
41
40
 
@@ -86,6 +85,6 @@ export default function useInnerBlockTemplateSync(clientId, innerBlocks, templat
86
85
  return () => {
87
86
  isCancelled = true;
88
87
  };
89
- }, [innerBlocks, template, templateLock, clientId]);
88
+ }, [template, templateLock, clientId]);
90
89
  }
91
90
  //# sourceMappingURL=use-inner-block-template-sync.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["fastDeepEqual","useRef","useLayoutEffect","useSelect","useDispatch","synchronizeBlocksWithTemplate","store","blockEditorStore","useInnerBlockTemplateSync","clientId","innerBlocks","template","templateLock","templateInsertUpdatesSelection","getBlocks","getSelectedBlocksInitialCaretPosition","isBlockSelected","replaceInnerBlocks","__unstableMarkNextChangeAsNotPersistent","existingTemplate","isCancelled","window","queueMicrotask","currentInnerBlocks","shouldApplyTemplate","length","hasTemplateChanged","current","nextBlocks"],"sources":["@wordpress/block-editor/src/components/inner-blocks/use-inner-block-template-sync.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport fastDeepEqual from 'fast-deep-equal/es6';\n\n/**\n * WordPress dependencies\n */\nimport { useRef, useLayoutEffect } from '@wordpress/element';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { synchronizeBlocksWithTemplate } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\n\n/**\n * This hook makes sure that a block's inner blocks stay in sync with the given\n * block \"template\". The template is a block hierarchy to which inner blocks must\n * conform. If the blocks get \"out of sync\" with the template and the template\n * is meant to be locked (e.g. templateLock = \"all\" or templateLock = \"contentOnly\"),\n * then we replace the inner blocks with the correct value after synchronizing it with the template.\n *\n * @param {string} clientId The block client ID.\n * @param {Array} innerBlocks\n * @param {Object} template The template to match.\n * @param {string} templateLock The template lock state for the inner blocks. For\n * example, if the template lock is set to \"all\",\n * then the inner blocks will stay in sync with the\n * template. If not defined or set to false, then\n * the inner blocks will not be synchronized with\n * the given template.\n * @param {boolean} templateInsertUpdatesSelection Whether or not to update the\n * block-editor selection state when inner blocks\n * are replaced after template synchronization.\n */\nexport default function useInnerBlockTemplateSync(\n\tclientId,\n\tinnerBlocks,\n\ttemplate,\n\ttemplateLock,\n\ttemplateInsertUpdatesSelection\n) {\n\t// Instead of adding a useSelect mapping here, please add to the useSelect\n\t// mapping in InnerBlocks! Every subscription impacts performance.\n\n\tconst {\n\t\tgetBlocks,\n\t\tgetSelectedBlocksInitialCaretPosition,\n\t\tisBlockSelected,\n\t} = useSelect( blockEditorStore );\n\tconst { replaceInnerBlocks, __unstableMarkNextChangeAsNotPersistent } =\n\t\tuseDispatch( blockEditorStore );\n\n\t// Maintain a reference to the previous value so we can do a deep equality check.\n\tconst existingTemplate = useRef( null );\n\n\tuseLayoutEffect( () => {\n\t\tlet isCancelled = false;\n\n\t\t// There's an implicit dependency between useInnerBlockTemplateSync and useNestedSettingsUpdate\n\t\t// The former needs to happen after the latter and since the latter is using microtasks to batch updates (performance optimization),\n\t\t// we need to schedule this one in a microtask as well.\n\t\t// Example: If you remove queueMicrotask here, ctrl + click to insert quote block won't close the inserter.\n\t\twindow.queueMicrotask( () => {\n\t\t\tif ( isCancelled ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Only synchronize innerBlocks with template if innerBlocks are empty\n\t\t\t// or a locking \"all\" or \"contentOnly\" exists directly on the block.\n\t\t\tconst currentInnerBlocks = getBlocks( clientId );\n\t\t\tconst shouldApplyTemplate =\n\t\t\t\tcurrentInnerBlocks.length === 0 ||\n\t\t\t\ttemplateLock === 'all' ||\n\t\t\t\ttemplateLock === 'contentOnly';\n\n\t\t\tconst hasTemplateChanged = ! fastDeepEqual(\n\t\t\t\ttemplate,\n\t\t\t\texistingTemplate.current\n\t\t\t);\n\n\t\t\tif ( ! shouldApplyTemplate || ! hasTemplateChanged ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\texistingTemplate.current = template;\n\t\t\tconst nextBlocks = synchronizeBlocksWithTemplate(\n\t\t\t\tcurrentInnerBlocks,\n\t\t\t\ttemplate\n\t\t\t);\n\n\t\t\tif ( ! fastDeepEqual( nextBlocks, currentInnerBlocks ) ) {\n\t\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t\t\treplaceInnerBlocks(\n\t\t\t\t\tclientId,\n\t\t\t\t\tnextBlocks,\n\t\t\t\t\tcurrentInnerBlocks.length === 0 &&\n\t\t\t\t\t\ttemplateInsertUpdatesSelection &&\n\t\t\t\t\t\tnextBlocks.length !== 0 &&\n\t\t\t\t\t\tisBlockSelected( clientId ),\n\t\t\t\t\t// This ensures the \"initialPosition\" doesn't change when applying the template\n\t\t\t\t\t// If we're supposed to focus the block, we'll focus the first inner block\n\t\t\t\t\t// otherwise, we won't apply any auto-focus.\n\t\t\t\t\t// This ensures for instance that the focus stays in the inserter when inserting the \"buttons\" block.\n\t\t\t\t\tgetSelectedBlocksInitialCaretPosition()\n\t\t\t\t);\n\t\t\t}\n\t\t} );\n\n\t\treturn () => {\n\t\t\tisCancelled = true;\n\t\t};\n\t}, [ innerBlocks, template, templateLock, clientId ] );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,aAAa,MAAM,qBAAqB;;AAE/C;AACA;AACA;AACA,SAASC,MAAM,EAAEC,eAAe,QAAQ,oBAAoB;AAC5D,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,6BAA6B,QAAQ,mBAAmB;;AAEjE;AACA;AACA;AACA,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASC,yBAAyBA,CAChDC,QAAQ,EACRC,WAAW,EACXC,QAAQ,EACRC,YAAY,EACZC,8BAA8B,EAC7B;EACD;EACA;;EAEA,MAAM;IACLC,SAAS;IACTC,qCAAqC;IACrCC;EACD,CAAC,GAAGb,SAAS,CAAEI,gBAAiB,CAAC;EACjC,MAAM;IAAEU,kBAAkB;IAAEC;EAAwC,CAAC,GACpEd,WAAW,CAAEG,gBAAiB,CAAC;;EAEhC;EACA,MAAMY,gBAAgB,GAAGlB,MAAM,CAAE,IAAK,CAAC;EAEvCC,eAAe,CAAE,MAAM;IACtB,IAAIkB,WAAW,GAAG,KAAK;;IAEvB;IACA;IACA;IACA;IACAC,MAAM,CAACC,cAAc,CAAE,MAAM;MAC5B,IAAKF,WAAW,EAAG;QAClB;MACD;;MAEA;MACA;MACA,MAAMG,kBAAkB,GAAGT,SAAS,CAAEL,QAAS,CAAC;MAChD,MAAMe,mBAAmB,GACxBD,kBAAkB,CAACE,MAAM,KAAK,CAAC,IAC/Bb,YAAY,KAAK,KAAK,IACtBA,YAAY,KAAK,aAAa;MAE/B,MAAMc,kBAAkB,GAAG,CAAE1B,aAAa,CACzCW,QAAQ,EACRQ,gBAAgB,CAACQ,OAClB,CAAC;MAED,IAAK,CAAEH,mBAAmB,IAAI,CAAEE,kBAAkB,EAAG;QACpD;MACD;MAEAP,gBAAgB,CAACQ,OAAO,GAAGhB,QAAQ;MACnC,MAAMiB,UAAU,GAAGvB,6BAA6B,CAC/CkB,kBAAkB,EAClBZ,QACD,CAAC;MAED,IAAK,CAAEX,aAAa,CAAE4B,UAAU,EAAEL,kBAAmB,CAAC,EAAG;QACxDL,uCAAuC,CAAC,CAAC;QACzCD,kBAAkB,CACjBR,QAAQ,EACRmB,UAAU,EACVL,kBAAkB,CAACE,MAAM,KAAK,CAAC,IAC9BZ,8BAA8B,IAC9Be,UAAU,CAACH,MAAM,KAAK,CAAC,IACvBT,eAAe,CAAEP,QAAS,CAAC;QAC5B;QACA;QACA;QACA;QACAM,qCAAqC,CAAC,CACvC,CAAC;MACF;IACD,CAAE,CAAC;IAEH,OAAO,MAAM;MACZK,WAAW,GAAG,IAAI;IACnB,CAAC;EACF,CAAC,EAAE,CAAEV,WAAW,EAAEC,QAAQ,EAAEC,YAAY,EAAEH,QAAQ,CAAG,CAAC;AACvD"}
1
+ {"version":3,"names":["fastDeepEqual","useRef","useLayoutEffect","useSelect","useDispatch","synchronizeBlocksWithTemplate","store","blockEditorStore","useInnerBlockTemplateSync","clientId","template","templateLock","templateInsertUpdatesSelection","getBlocks","getSelectedBlocksInitialCaretPosition","isBlockSelected","replaceInnerBlocks","__unstableMarkNextChangeAsNotPersistent","existingTemplate","isCancelled","window","queueMicrotask","currentInnerBlocks","shouldApplyTemplate","length","hasTemplateChanged","current","nextBlocks"],"sources":["@wordpress/block-editor/src/components/inner-blocks/use-inner-block-template-sync.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport fastDeepEqual from 'fast-deep-equal/es6';\n\n/**\n * WordPress dependencies\n */\nimport { useRef, useLayoutEffect } from '@wordpress/element';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { synchronizeBlocksWithTemplate } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\n\n/**\n * This hook makes sure that a block's inner blocks stay in sync with the given\n * block \"template\". The template is a block hierarchy to which inner blocks must\n * conform. If the blocks get \"out of sync\" with the template and the template\n * is meant to be locked (e.g. templateLock = \"all\" or templateLock = \"contentOnly\"),\n * then we replace the inner blocks with the correct value after synchronizing it with the template.\n *\n * @param {string} clientId The block client ID.\n * @param {Object} template The template to match.\n * @param {string} templateLock The template lock state for the inner blocks. For\n * example, if the template lock is set to \"all\",\n * then the inner blocks will stay in sync with the\n * template. If not defined or set to false, then\n * the inner blocks will not be synchronized with\n * the given template.\n * @param {boolean} templateInsertUpdatesSelection Whether or not to update the\n * block-editor selection state when inner blocks\n * are replaced after template synchronization.\n */\nexport default function useInnerBlockTemplateSync(\n\tclientId,\n\ttemplate,\n\ttemplateLock,\n\ttemplateInsertUpdatesSelection\n) {\n\t// Instead of adding a useSelect mapping here, please add to the useSelect\n\t// mapping in InnerBlocks! Every subscription impacts performance.\n\n\tconst {\n\t\tgetBlocks,\n\t\tgetSelectedBlocksInitialCaretPosition,\n\t\tisBlockSelected,\n\t} = useSelect( blockEditorStore );\n\tconst { replaceInnerBlocks, __unstableMarkNextChangeAsNotPersistent } =\n\t\tuseDispatch( blockEditorStore );\n\n\t// Maintain a reference to the previous value so we can do a deep equality check.\n\tconst existingTemplate = useRef( null );\n\n\tuseLayoutEffect( () => {\n\t\tlet isCancelled = false;\n\n\t\t// There's an implicit dependency between useInnerBlockTemplateSync and useNestedSettingsUpdate\n\t\t// The former needs to happen after the latter and since the latter is using microtasks to batch updates (performance optimization),\n\t\t// we need to schedule this one in a microtask as well.\n\t\t// Example: If you remove queueMicrotask here, ctrl + click to insert quote block won't close the inserter.\n\t\twindow.queueMicrotask( () => {\n\t\t\tif ( isCancelled ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Only synchronize innerBlocks with template if innerBlocks are empty\n\t\t\t// or a locking \"all\" or \"contentOnly\" exists directly on the block.\n\t\t\tconst currentInnerBlocks = getBlocks( clientId );\n\t\t\tconst shouldApplyTemplate =\n\t\t\t\tcurrentInnerBlocks.length === 0 ||\n\t\t\t\ttemplateLock === 'all' ||\n\t\t\t\ttemplateLock === 'contentOnly';\n\n\t\t\tconst hasTemplateChanged = ! fastDeepEqual(\n\t\t\t\ttemplate,\n\t\t\t\texistingTemplate.current\n\t\t\t);\n\n\t\t\tif ( ! shouldApplyTemplate || ! hasTemplateChanged ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\texistingTemplate.current = template;\n\t\t\tconst nextBlocks = synchronizeBlocksWithTemplate(\n\t\t\t\tcurrentInnerBlocks,\n\t\t\t\ttemplate\n\t\t\t);\n\n\t\t\tif ( ! fastDeepEqual( nextBlocks, currentInnerBlocks ) ) {\n\t\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t\t\treplaceInnerBlocks(\n\t\t\t\t\tclientId,\n\t\t\t\t\tnextBlocks,\n\t\t\t\t\tcurrentInnerBlocks.length === 0 &&\n\t\t\t\t\t\ttemplateInsertUpdatesSelection &&\n\t\t\t\t\t\tnextBlocks.length !== 0 &&\n\t\t\t\t\t\tisBlockSelected( clientId ),\n\t\t\t\t\t// This ensures the \"initialPosition\" doesn't change when applying the template\n\t\t\t\t\t// If we're supposed to focus the block, we'll focus the first inner block\n\t\t\t\t\t// otherwise, we won't apply any auto-focus.\n\t\t\t\t\t// This ensures for instance that the focus stays in the inserter when inserting the \"buttons\" block.\n\t\t\t\t\tgetSelectedBlocksInitialCaretPosition()\n\t\t\t\t);\n\t\t\t}\n\t\t} );\n\n\t\treturn () => {\n\t\t\tisCancelled = true;\n\t\t};\n\t}, [ template, templateLock, clientId ] );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,aAAa,MAAM,qBAAqB;;AAE/C;AACA;AACA;AACA,SAASC,MAAM,EAAEC,eAAe,QAAQ,oBAAoB;AAC5D,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,6BAA6B,QAAQ,mBAAmB;;AAEjE;AACA;A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L,kBAAkB,CAACE,MAAM,KAAK,CAAC,IAC9BZ,8BAA8B,IAC9Be,UAAU,CAACH,MAAM,KAAK,CAAC,IACvBT,eAAe,CAAEN,QAAS,CAAC;QAC5B;QACA;QACA;QACA;QACAK,qCAAqC,CAAC,CACvC,CAAC;MACF;IACD,CAAE,CAAC;IAEH,OAAO,MAAM;MACZK,WAAW,GAAG,IAAI;IACnB,CAAC;EACF,CAAC,EAAE,CAAET,QAAQ,EAAEC,YAAY,EAAEF,QAAQ,CAAG,CAAC;AAC1C"}
@@ -38,19 +38,19 @@ export function PatternsFilter({
38
38
  const shouldDisableNonUserSources = getShouldDisableNonUserSources(category);
39
39
  const patternSyncMenuOptions = useMemo(() => [{
40
40
  value: 'all',
41
- label: _x('All', 'Option that shows all patterns')
41
+ label: _x('All', 'patterns')
42
42
  }, {
43
43
  value: INSERTER_SYNC_TYPES.full,
44
- label: _x('Synced', 'Option that shows all synchronized patterns'),
44
+ label: _x('Synced', 'patterns'),
45
45
  disabled: shouldDisableSyncFilter
46
46
  }, {
47
47
  value: INSERTER_SYNC_TYPES.unsynced,
48
- label: _x('Not synced', 'Option that shows all patterns that are not synchronized'),
48
+ label: _x('Not synced', 'patterns'),
49
49
  disabled: shouldDisableSyncFilter
50
50
  }], [shouldDisableSyncFilter]);
51
51
  const patternSourceMenuOptions = useMemo(() => [{
52
52
  value: 'all',
53
- label: __('All'),
53
+ label: _x('All', 'patterns'),
54
54
  disabled: shouldDisableNonUserSources
55
55
  }, {
56
56
  value: INSERTER_PATTERN_TYPES.directory,
@@ -1 +1 @@
1
- {"version":3,"names":["SVG","Path","DropdownMenu","MenuGroup","MenuItemsChoice","ExternalLink","__","_x","Icon","useMemo","createInterpolateElement","myPatternsCategory","INSERTER_SYNC_TYPES","INSERTER_PATTERN_TYPES","getShouldDisableSyncFilter","sourceFilter","getShouldDisableNonUserSources","category","name","PatternsFilter","setPatternSyncFilter","setPatternSourceFilter","patternSyncFilter","patternSourceFilter","scrollContainerRef","currentPatternSourceFilter","user","shouldDisableSyncFilter","shouldDisableNonUserSources","patternSyncMenuOptions","value","label","full","disabled","unsynced","patternSourceMenuOptions","directory","theme","handleSetSourceFilterChange","newSourceFilter","createElement","Fragment","popoverProps","placement","icon","width","height","viewBox","fill","xmlns","d","choices","onSelect","current","scrollTo","className","Link","href"],"sources":["@wordpress/block-editor/src/components/inserter/block-patterns-tab/patterns-filter.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tSVG,\n\tPath,\n\tDropdownMenu,\n\tMenuGroup,\n\tMenuItemsChoice,\n\tExternalLink,\n} from '@wordpress/components';\nimport { __, _x } from '@wordpress/i18n';\nimport { Icon } from '@wordpress/icons';\nimport { useMemo, createInterpolateElement } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport {\n\tmyPatternsCategory,\n\tINSERTER_SYNC_TYPES,\n\tINSERTER_PATTERN_TYPES,\n} from './utils';\n\nconst getShouldDisableSyncFilter = ( sourceFilter ) => sourceFilter !== 'all';\nconst getShouldDisableNonUserSources = ( category ) => {\n\treturn category.name === myPatternsCategory.name;\n};\n\nexport function PatternsFilter( {\n\tsetPatternSyncFilter,\n\tsetPatternSourceFilter,\n\tpatternSyncFilter,\n\tpatternSourceFilter,\n\tscrollContainerRef,\n\tcategory,\n} ) {\n\t// If the category is `myPatterns` then we need to set the source filter to `user`, but\n\t// we do this by deriving from props rather than calling setPatternSourceFilter otherwise\n\t// the user may be confused when switching to another category if the haven't explicity set\n\t// this filter themselves.\n\tconst currentPatternSourceFilter =\n\t\tcategory.name === myPatternsCategory.name\n\t\t\t? INSERTER_PATTERN_TYPES.user\n\t\t\t: patternSourceFilter;\n\n\t// We need to disable the sync filter option if the source filter is not 'all' or 'user'\n\t// otherwise applying them will just result in no patterns being shown.\n\tconst shouldDisableSyncFilter = getShouldDisableSyncFilter(\n\t\tcurrentPatternSourceFilter\n\t);\n\n\t// We also need to disable the directory and theme source filter options if the category\n\t// is `myPatterns` otherwise applying them will also just result in no patterns being shown.\n\tconst shouldDisableNonUserSources =\n\t\tgetShouldDisableNonUserSources( category );\n\n\tconst patternSyncMenuOptions = useMemo(\n\t\t() => [\n\t\t\t{\n\t\t\t\tvalue: 'all',\n\t\t\t\tlabel: _x( 'All', 'Option that shows all patterns' ),\n\t\t\t},\n\t\t\t{\n\t\t\t\tvalue: INSERTER_SYNC_TYPES.full,\n\t\t\t\tlabel: _x(\n\t\t\t\t\t'Synced',\n\t\t\t\t\t'Option that shows all synchronized patterns'\n\t\t\t\t),\n\t\t\t\tdisabled: shouldDisableSyncFilter,\n\t\t\t},\n\t\t\t{\n\t\t\t\tvalue: INSERTER_SYNC_TYPES.unsynced,\n\t\t\t\tlabel: _x(\n\t\t\t\t\t'Not synced',\n\t\t\t\t\t'Option that shows all patterns that are not synchronized'\n\t\t\t\t),\n\t\t\t\tdisabled: shouldDisableSyncFilter,\n\t\t\t},\n\t\t],\n\t\t[ shouldDisableSyncFilter ]\n\t);\n\n\tconst patternSourceMenuOptions = useMemo(\n\t\t() => [\n\t\t\t{\n\t\t\t\tvalue: 'all',\n\t\t\t\tlabel: __( 'All' ),\n\t\t\t\tdisabled: shouldDisableNonUserSources,\n\t\t\t},\n\t\t\t{\n\t\t\t\tvalue: INSERTER_PATTERN_TYPES.directory,\n\t\t\t\tlabel: __( 'Pattern Directory' ),\n\t\t\t\tdisabled: shouldDisableNonUserSources,\n\t\t\t},\n\t\t\t{\n\t\t\t\tvalue: INSERTER_PATTERN_TYPES.theme,\n\t\t\t\tlabel: __( 'Theme & Plugins' ),\n\t\t\t\tdisabled: shouldDisableNonUserSources,\n\t\t\t},\n\t\t\t{\n\t\t\t\tvalue: INSERTER_PATTERN_TYPES.user,\n\t\t\t\tlabel: __( 'User' ),\n\t\t\t},\n\t\t],\n\t\t[ shouldDisableNonUserSources ]\n\t);\n\n\tfunction handleSetSourceFilterChange( newSourceFilter ) {\n\t\tsetPatternSourceFilter( newSourceFilter );\n\t\tif ( getShouldDisableSyncFilter( newSourceFilter ) ) {\n\t\t\tsetPatternSyncFilter( 'all' );\n\t\t}\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<DropdownMenu\n\t\t\t\tpopoverProps={ {\n\t\t\t\t\tplacement: 'right-end',\n\t\t\t\t} }\n\t\t\t\tlabel=\"Filter patterns\"\n\t\t\t\ticon={\n\t\t\t\t\t<Icon\n\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t<SVG\n\t\t\t\t\t\t\t\twidth=\"24\"\n\t\t\t\t\t\t\t\theight=\"24\"\n\t\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<Path\n\t\t\t\t\t\t\t\t\td=\"M10 17.5H14V16H10V17.5ZM6 6V7.5H18V6H6ZM8 12.5H16V11H8V12.5Z\"\n\t\t\t\t\t\t\t\t\tfill=\"#1E1E1E\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</SVG>\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t}\n\t\t\t>\n\t\t\t\t{ () => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<MenuGroup label={ __( 'Source' ) }>\n\t\t\t\t\t\t\t<MenuItemsChoice\n\t\t\t\t\t\t\t\tchoices={ patternSourceMenuOptions }\n\t\t\t\t\t\t\t\tonSelect={ ( value ) => {\n\t\t\t\t\t\t\t\t\thandleSetSourceFilterChange( value );\n\t\t\t\t\t\t\t\t\tscrollContainerRef.current?.scrollTo(\n\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t0\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\tvalue={ currentPatternSourceFilter }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t<MenuGroup label={ __( 'Type' ) }>\n\t\t\t\t\t\t\t<MenuItemsChoice\n\t\t\t\t\t\t\t\tchoices={ patternSyncMenuOptions }\n\t\t\t\t\t\t\t\tonSelect={ ( value ) => {\n\t\t\t\t\t\t\t\t\tsetPatternSyncFilter( value );\n\t\t\t\t\t\t\t\t\tscrollContainerRef.current?.scrollTo(\n\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t0\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\tvalue={ patternSyncFilter }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t<div className=\"block-editor-tool-selector__help\">\n\t\t\t\t\t\t\t{ createInterpolateElement(\n\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t'Patterns are available from the <Link>WordPress.org Pattern Directory</Link>, bundled in the active theme, or created by users on this site. Only patterns created on this site can be synced.'\n\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\t\tLink: (\n\t\t\t\t\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\t\t\t\t\thref={ __(\n\t\t\t\t\t\t\t\t\t\t\t\t'https://wordpress.org/patterns/'\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}\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</DropdownMenu>\n\t\t</>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,GAAG,EACHC,IAAI,EACJC,YAAY,EACZC,SAAS,EACTC,eAAe,EACfC,YAAY,QACN,uBAAuB;AAC9B,SAASC,EAAE,EAAEC,EAAE,QAAQ,iBAAiB;AACxC,SAASC,IAAI,QAAQ,kBAAkB;AACvC,SAASC,OA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AAO,EAAGhB,wBAA0B;IACpCiB,QAAQ,EAAKtB,KAAK,IAAM;MACvBQ,2BAA2B,CAAER,KAAM,CAAC;MACpCN,kBAAkB,CAAC6B,OAAO,EAAEC,QAAQ,CACnC,CAAC,EACD,CACD,CAAC;IACF,CAAG;IACHxB,KAAK,EAAGL;EAA4B,CACpC,CACS,CAAC,EACZe,aAAA,CAACrC,SAAS;IAAC4B,KAAK,EAAGzB,EAAE,CAAE,MAAO;EAAG,GAChCkC,aAAA,CAACpC,eAAe;IACf+C,OAAO,EAAGtB,sBAAwB;IAClCuB,QAAQ,EAAKtB,KAAK,IAAM;MACvBV,oBAAoB,CAAEU,KAAM,CAAC;MAC7BN,kBAAkB,CAAC6B,OAAO,EAAEC,QAAQ,CACnC,CAAC,EACD,CACD,CAAC;IACF,CAAG;IACHxB,KAAK,EAAGR;EAAmB,CAC3B,CACS,CAAC,EACZkB,aAAA;IAAKe,SAAS,EAAC;EAAkC,GAC9C7C,wBAAwB,CACzBJ,EAAE,CACD,gMACD,CAAC,EACD;IACCkD,IAAI,EACHhB,aAAA,CAACnC,YAAY;MACZoD,IAAI,EAAGnD,EAAE,CACR,iCACD;IAAG,CACH;EAEH,CACD,CACI,CACJ,CAEU,CACb,CAAC;AAEL"}
1
+ {"version":3,"names":["SVG","Path","DropdownMenu","MenuGroup","MenuItemsChoice","ExternalLink","__","_x","Icon","useMemo","createInterpolateElement","myPatternsCategory","INSERTER_SYNC_TYPES","INSERTER_PATTERN_TYPES","getShouldDisableSyncFilter","sourceFilter","getShouldDisableNonUserSources","category","name","PatternsFilter","setPatternSyncFilter","setPatternSourceFilter","patternSyncFilter","patternSourceFilter","scrollContainerRef","currentPatternSourceFilter","user","shouldDisableSyncFilter","shouldDisableNonUserSources","patternSyncMenuOptions","value","label","full","disabled","unsynced","patternSourceMenuOptions","directory","theme","handleSetSourceFilterChange","newSourceFilter","createElement","Fragment","popoverProps","placement","icon","width","height","viewBox","fill","xmlns","d","choices","onSelect","current","scrollTo","className","Link","href"],"sources":["@wordpress/block-editor/src/components/inserter/block-patterns-tab/patterns-filter.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tSVG,\n\tPath,\n\tDropdownMenu,\n\tMenuGroup,\n\tMenuItemsChoice,\n\tExternalLink,\n} from '@wordpress/components';\nimport { __, _x } from '@wordpress/i18n';\nimport { Icon } from '@wordpress/icons';\nimport { useMemo, createInterpolateElement } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport {\n\tmyPatternsCategory,\n\tINSERTER_SYNC_TYPES,\n\tINSERTER_PATTERN_TYPES,\n} from './utils';\n\nconst getShouldDisableSyncFilter = ( sourceFilter ) => sourceFilter !== 'all';\nconst getShouldDisableNonUserSources = ( category ) => {\n\treturn category.name === myPatternsCategory.name;\n};\n\nexport function PatternsFilter( {\n\tsetPatternSyncFilter,\n\tsetPatternSourceFilter,\n\tpatternSyncFilter,\n\tpatternSourceFilter,\n\tscrollContainerRef,\n\tcategory,\n} ) {\n\t// If the category is `myPatterns` then we need to set the source filter to `user`, but\n\t// we do this by deriving from props rather than calling setPatternSourceFilter otherwise\n\t// the user may be confused when switching to another category if the haven't explicity set\n\t// this filter themselves.\n\tconst currentPatternSourceFilter =\n\t\tcategory.name === myPatternsCategory.name\n\t\t\t? INSERTER_PATTERN_TYPES.user\n\t\t\t: patternSourceFilter;\n\n\t// We need to disable the sync filter option if the source filter is not 'all' or 'user'\n\t// otherwise applying them will just result in no patterns being shown.\n\tconst shouldDisableSyncFilter = getShouldDisableSyncFilter(\n\t\tcurrentPatternSourceFilter\n\t);\n\n\t// We also need to disable the directory and theme source filter options if the category\n\t// is `myPatterns` otherwise applying them will also just result in no patterns being shown.\n\tconst shouldDisableNonUserSources =\n\t\tgetShouldDisableNonUserSources( category );\n\n\tconst patternSyncMenuOptions = useMemo(\n\t\t() => [\n\t\t\t{\n\t\t\t\tvalue: 'all',\n\t\t\t\tlabel: _x( 'All', 'patterns' ),\n\t\t\t},\n\t\t\t{\n\t\t\t\tvalue: INSERTER_SYNC_TYPES.full,\n\t\t\t\tlabel: _x( 'Synced', 'patterns' ),\n\t\t\t\tdisabled: shouldDisableSyncFilter,\n\t\t\t},\n\t\t\t{\n\t\t\t\tvalue: INSERTER_SYNC_TYPES.unsynced,\n\t\t\t\tlabel: _x( 'Not synced', 'patterns' ),\n\t\t\t\tdisabled: shouldDisableSyncFilter,\n\t\t\t},\n\t\t],\n\t\t[ shouldDisableSyncFilter ]\n\t);\n\n\tconst patternSourceMenuOptions = useMemo(\n\t\t() => [\n\t\t\t{\n\t\t\t\tvalue: 'all',\n\t\t\t\tlabel: _x( 'All', 'patterns' ),\n\t\t\t\tdisabled: shouldDisableNonUserSources,\n\t\t\t},\n\t\t\t{\n\t\t\t\tvalue: INSERTER_PATTERN_TYPES.directory,\n\t\t\t\tlabel: __( 'Pattern Directory' ),\n\t\t\t\tdisabled: shouldDisableNonUserSources,\n\t\t\t},\n\t\t\t{\n\t\t\t\tvalue: INSERTER_PATTERN_TYPES.theme,\n\t\t\t\tlabel: __( 'Theme & Plugins' ),\n\t\t\t\tdisabled: shouldDisableNonUserSources,\n\t\t\t},\n\t\t\t{\n\t\t\t\tvalue: INSERTER_PATTERN_TYPES.user,\n\t\t\t\tlabel: __( 'User' ),\n\t\t\t},\n\t\t],\n\t\t[ shouldDisableNonUserSources ]\n\t);\n\n\tfunction handleSetSourceFilterChange( newSourceFilter ) {\n\t\tsetPatternSourceFilter( newSourceFilter );\n\t\tif ( getShouldDisableSyncFilter( newSourceFilter ) ) {\n\t\t\tsetPatternSyncFilter( 'all' );\n\t\t}\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<DropdownMenu\n\t\t\t\tpopoverProps={ {\n\t\t\t\t\tplacement: 'right-end',\n\t\t\t\t} }\n\t\t\t\tlabel=\"Filter patterns\"\n\t\t\t\ticon={\n\t\t\t\t\t<Icon\n\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t<SVG\n\t\t\t\t\t\t\t\twidth=\"24\"\n\t\t\t\t\t\t\t\theight=\"24\"\n\t\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<Path\n\t\t\t\t\t\t\t\t\td=\"M10 17.5H14V16H10V17.5ZM6 6V7.5H18V6H6ZM8 12.5H16V11H8V12.5Z\"\n\t\t\t\t\t\t\t\t\tfill=\"#1E1E1E\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</SVG>\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t}\n\t\t\t>\n\t\t\t\t{ () => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<MenuGroup label={ __( 'Source' ) }>\n\t\t\t\t\t\t\t<MenuItemsChoice\n\t\t\t\t\t\t\t\tchoices={ patternSourceMenuOptions }\n\t\t\t\t\t\t\t\tonSelect={ ( value ) => {\n\t\t\t\t\t\t\t\t\thandleSetSourceFilterChange( value );\n\t\t\t\t\t\t\t\t\tscrollContainerRef.current?.scrollTo(\n\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t0\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\tvalue={ currentPatternSourceFilter }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t<MenuGroup label={ __( 'Type' ) }>\n\t\t\t\t\t\t\t<MenuItemsChoice\n\t\t\t\t\t\t\t\tchoices={ patternSyncMenuOptions }\n\t\t\t\t\t\t\t\tonSelect={ ( value ) => {\n\t\t\t\t\t\t\t\t\tsetPatternSyncFilter( value );\n\t\t\t\t\t\t\t\t\tscrollContainerRef.current?.scrollTo(\n\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t0\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\tvalue={ patternSyncFilter }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t<div className=\"block-editor-tool-selector__help\">\n\t\t\t\t\t\t\t{ createInterpolateElement(\n\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t'Patterns are available from the <Link>WordPress.org Pattern Directory</Link>, bundled in the active theme, or created by users on this site. Only patterns created on this site can be synced.'\n\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\t\tLink: (\n\t\t\t\t\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\t\t\t\t\thref={ __(\n\t\t\t\t\t\t\t\t\t\t\t\t'https://wordpress.org/patterns/'\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}\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</DropdownMenu>\n\t\t</>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,GAAG,EACHC,IAAI,EACJC,YAAY,EACZC,SAAS,EACTC,eAAe,EACfC,YAAY,QACN,uBAAuB;AAC9B,SAASC,EAAE,EAAEC,EAAE,QAAQ,iBAAiB;AACxC,SAASC,IAAI,QAAQ,kBAAkB;AACvC,SAASC,OAAO,EAAEC,wBAAwB,QAAQ,oBAAoB;;AAEtE;AACA;AACA;AACA,SACCC,kBAAkB,EAClBC,mBAAmB,EACnBC,sBAAsB,QAChB,SAAS;AAEhB,MAAMC,0BAA0B,GAAKC,YAAY,IAAMA,YAAY,KAAK,KAAK;AAC7E,MAAMC,8BAA8B,GAAKC,QAAQ,IAAM;EACtD,OAAOA,QAAQ,CAACC,IAAI,KAAKP,kBAAkB,CAACO,IAAI;AACjD,CAAC;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AAE,MAAO;EAAG,GAChCkC,aAAA,CAACpC,eAAe;IACf+C,OAAO,EAAGtB,sBAAwB;IAClCuB,QAAQ,EAAKtB,KAAK,IAAM;MACvBV,oBAAoB,CAAEU,KAAM,CAAC;MAC7BN,kBAAkB,CAAC6B,OAAO,EAAEC,QAAQ,CACnC,CAAC,EACD,CACD,CAAC;IACF,CAAG;IACHxB,KAAK,EAAGR;EAAmB,CAC3B,CACS,CAAC,EACZkB,aAAA;IAAKe,SAAS,EAAC;EAAkC,GAC9C7C,wBAAwB,CACzBJ,EAAE,CACD,gMACD,CAAC,EACD;IACCkD,IAAI,EACHhB,aAAA,CAACnC,YAAY;MACZoD,IAAI,EAAGnD,EAAE,CACR,iCACD;IAAG,CACH;EAEH,CACD,CACI,CACJ,CAEU,CACb,CAAC;AAEL"}
@@ -2,7 +2,7 @@
2
2
  * WordPress dependencies
3
3
  */
4
4
 
5
- import { __ } from '@wordpress/i18n';
5
+ import { __, _x } from '@wordpress/i18n';
6
6
  export const INSERTER_PATTERN_TYPES = {
7
7
  user: 'user',
8
8
  theme: 'theme',
@@ -14,7 +14,7 @@ export const INSERTER_SYNC_TYPES = {
14
14
  };
15
15
  export const allPatternsCategory = {
16
16
  name: 'allPatterns',
17
- label: __('All')
17
+ label: _x('All', 'patterns')
18
18
  };
19
19
  export const myPatternsCategory = {
20
20
  name: 'myPatterns',
@@ -1 +1 @@
1
- {"version":3,"names":["__","INSERTER_PATTERN_TYPES","user","theme","directory","INSERTER_SYNC_TYPES","full","unsynced","allPatternsCategory","name","label","myPatternsCategory","isPatternFiltered","pattern","sourceFilter","syncFilter","isUserPattern","startsWith","isDirectoryPattern","source","type","syncStatus"],"sources":["@wordpress/block-editor/src/components/inserter/block-patterns-tab/utils.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\n\nimport { __ } from '@wordpress/i18n';\n\nexport const INSERTER_PATTERN_TYPES = {\n\tuser: 'user',\n\ttheme: 'theme',\n\tdirectory: 'directory',\n};\n\nexport const INSERTER_SYNC_TYPES = {\n\tfull: 'fully',\n\tunsynced: 'unsynced',\n};\n\nexport const allPatternsCategory = {\n\tname: 'allPatterns',\n\tlabel: __( 'All' ),\n};\n\nexport const myPatternsCategory = {\n\tname: 'myPatterns',\n\tlabel: __( 'My patterns' ),\n};\n\nexport function isPatternFiltered( pattern, sourceFilter, syncFilter ) {\n\tconst isUserPattern = pattern.name.startsWith( 'core/block' );\n\tconst isDirectoryPattern =\n\t\tpattern.source === 'core' ||\n\t\tpattern.source?.startsWith( 'pattern-directory' );\n\n\t// If theme source selected, filter out user created patterns and those from\n\t// the core patterns directory.\n\tif (\n\t\tsourceFilter === INSERTER_PATTERN_TYPES.theme &&\n\t\t( isUserPattern || isDirectoryPattern )\n\t) {\n\t\treturn true;\n\t}\n\n\t// If the directory source is selected, filter out user created patterns\n\t// and those bundled with the theme.\n\tif (\n\t\tsourceFilter === INSERTER_PATTERN_TYPES.directory &&\n\t\t( isUserPattern || ! isDirectoryPattern )\n\t) {\n\t\treturn true;\n\t}\n\n\t// If user source selected, filter out theme patterns.\n\tif (\n\t\tsourceFilter === INSERTER_PATTERN_TYPES.user &&\n\t\tpattern.type !== INSERTER_PATTERN_TYPES.user\n\t) {\n\t\treturn true;\n\t}\n\n\t// Filter by sync status.\n\tif (\n\t\tsyncFilter === INSERTER_SYNC_TYPES.full &&\n\t\tpattern.syncStatus !== ''\n\t) {\n\t\treturn true;\n\t}\n\n\tif (\n\t\tsyncFilter === INSERTER_SYNC_TYPES.unsynced &&\n\t\tpattern.syncStatus !== 'unsynced' &&\n\t\tisUserPattern\n\t) {\n\t\treturn true;\n\t}\n\n\treturn false;\n}\n"],"mappings":"AAAA;AACA;AACA;;AAEA,SAASA,EAAE,QAAQ,iBAAiB;AAEpC,OAAO,MAAMC,sBAAsB,GAAG;EACrCC,IAAI,EAAE,MAAM;EACZC,KAAK,EAAE,OAAO;EACdC,SAAS,EAAE;AACZ,CAAC;AAED,OAAO,MAAMC,mBAAmB,GAAG;EACl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ATTERN_TYPES","user","theme","directory","INSERTER_SYNC_TYPES","full","unsynced","allPatternsCategory","name","label","myPatternsCategory","isPatternFiltered","pattern","sourceFilter","syncFilter","isUserPattern","startsWith","isDirectoryPattern","source","type","syncStatus"],"sources":["@wordpress/block-editor/src/components/inserter/block-patterns-tab/utils.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\n\nimport { __, _x } from '@wordpress/i18n';\n\nexport const INSERTER_PATTERN_TYPES = {\n\tuser: 'user',\n\ttheme: 'theme',\n\tdirectory: 'directory',\n};\n\nexport const INSERTER_SYNC_TYPES = {\n\tfull: 'fully',\n\tunsynced: 'unsynced',\n};\n\nexport const allPatternsCategory = {\n\tname: 'allPatterns',\n\tlabel: _x( 'All', 'patterns' ),\n};\n\nexport const myPatternsCategory = {\n\tname: 'myPatterns',\n\tlabel: __( 'My patterns' ),\n};\n\nexport function isPatternFiltered( pattern, sourceFilter, syncFilter ) {\n\tconst isUserPattern = pattern.name.startsWith( 'core/block' );\n\tconst isDirectoryPattern =\n\t\tpattern.source === 'core' ||\n\t\tpattern.source?.startsWith( 'pattern-directory' );\n\n\t// If theme source selected, filter out user created patterns and those from\n\t// the core patterns directory.\n\tif (\n\t\tsourceFilter === INSERTER_PATTERN_TYPES.theme &&\n\t\t( isUserPattern || isDirectoryPattern )\n\t) {\n\t\treturn true;\n\t}\n\n\t// If the directory source is selected, filter out user created patterns\n\t// and those bundled with the theme.\n\tif (\n\t\tsourceFilter === INSERTER_PATTERN_TYPES.directory &&\n\t\t( isUserPattern || ! isDirectoryPattern )\n\t) {\n\t\treturn true;\n\t}\n\n\t// If user source selected, filter out theme patterns.\n\tif (\n\t\tsourceFilter === INSERTER_PATTERN_TYPES.user &&\n\t\tpattern.type !== INSERTER_PATTERN_TYPES.user\n\t) {\n\t\treturn true;\n\t}\n\n\t// Filter by sync status.\n\tif (\n\t\tsyncFilter === INSERTER_SYNC_TYPES.full &&\n\t\tpattern.syncStatus !== ''\n\t) {\n\t\treturn true;\n\t}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,CAACO,IAAI,KAAKnB,sBAAsB,CAACC,IAAI,EAC3C;IACD,OAAO,IAAI;EACZ;;EAEA;EACA,IACCa,UAAU,KAAKV,mBAAmB,CAACC,IAAI,IACvCO,OAAO,CAACQ,UAAU,KAAK,EAAE,EACxB;IACD,OAAO,IAAI;EACZ;EAEA,IACCN,UAAU,KAAKV,mBAAmB,CAACE,QAAQ,IAC3CM,OAAO,CAACQ,UAAU,KAAK,UAAU,IACjCL,aAAa,EACZ;IACD,OAAO,IAAI;EACZ;EAEA,OAAO,KAAK;AACb"}
@@ -30,7 +30,8 @@ export default function QuickInserter({
30
30
  clientId,
31
31
  isAppender,
32
32
  prioritizePatterns,
33
- selectBlockOnInsert
33
+ selectBlockOnInsert,
34
+ hasSearch = true
34
35
  }) {
35
36
  const [filterValue, setFilterValue] = useState('');
36
37
  const [destinationRootClientId, onInsertBlocks] = useInsertionPoint({
@@ -60,7 +61,7 @@ export default function QuickInserter({
60
61
  };
61
62
  }, [clientId]);
62
63
  const showPatterns = patterns.length && (!!filterValue || prioritizePatterns);
63
- const showSearch = showPatterns && patterns.length > SEARCH_THRESHOLD || blockTypes.length > SEARCH_THRESHOLD;
64
+ const showSearch = hasSearch && (showPatterns && patterns.length > SEARCH_THRESHOLD || blockTypes.length > SEARCH_THRESHOLD);
64
65
  useEffect(() => {
65
66
  if (setInserterIsOpened) {
66
67
  setInserterIsOpened(false);
@@ -1 +1 @@
1
- {"version":3,"names":["classnames","useState","useEffect","__","Button","SearchControl","useSelect","InserterSearchResults","useInsertionPoint","usePatternsState","useBlockTypesState","store","blockEditorStore","SEARCH_THRESHOLD","SHOWN_BLOCK_TYPES","SHOWN_BLOCK_PATTERNS","SHOWN_BLOCK_PATTERNS_WITH_PRIORITIZATION","QuickInserter","onSelect","rootClientId","clientId","isAppender","prioritizePatterns","selectBlockOnInsert","filterValue","setFilterValue","destinationRootClientId","onInsertBlocks","blockTypes","patterns","setInserterIsOpened","insertionIndex","select","getSettings","getBlockIndex","getBlockCount","settings","index","blockCount","__experimentalSetIsInserterOpened","showPatterns","length","showSearch","onBrowseAll","maxBlockPatterns","createElement","className","__nextHasNoMarginBottom","value","onChange","label","placeholder","maxBlockTypes","isDraggable","onClick"],"sources":["@wordpress/block-editor/src/components/inserter/quick-inserter.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useState, useEffect } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { Button, SearchControl } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport InserterSearchResults from './search-results';\nimport useInsertionPoint from './hooks/use-insertion-point';\nimport usePatternsState from './hooks/use-patterns-state';\nimport useBlockTypesState from './hooks/use-block-types-state';\nimport { store as blockEditorStore } from '../../store';\n\nconst SEARCH_THRESHOLD = 6;\nconst SHOWN_BLOCK_TYPES = 6;\nconst SHOWN_BLOCK_PATTERNS = 2;\nconst SHOWN_BLOCK_PATTERNS_WITH_PRIORITIZATION = 4;\n\nexport default function QuickInserter( {\n\tonSelect,\n\trootClientId,\n\tclientId,\n\tisAppender,\n\tprioritizePatterns,\n\tselectBlockOnInsert,\n} ) {\n\tconst [ filterValue, setFilterValue ] = useState( '' );\n\tconst [ destinationRootClientId, onInsertBlocks ] = useInsertionPoint( {\n\t\tonSelect,\n\t\trootClientId,\n\t\tclientId,\n\t\tisAppender,\n\t\tselectBlockOnInsert,\n\t} );\n\tconst [ blockTypes ] = useBlockTypesState(\n\t\tdestinationRootClientId,\n\t\tonInsertBlocks\n\t);\n\n\tconst [ patterns ] = usePatternsState(\n\t\tonInsertBlocks,\n\t\tdestinationRootClientId\n\t);\n\n\tconst { setInserterIsOpened, insertionIndex } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getSettings, getBlockIndex, getBlockCount } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst settings = getSettings();\n\t\t\tconst index = getBlockIndex( clientId );\n\t\t\tconst blockCount = getBlockCount();\n\n\t\t\treturn {\n\t\t\t\tsetInserterIsOpened: settings.__experimentalSetIsInserterOpened,\n\t\t\t\tinsertionIndex: index === -1 ? blockCount : index,\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tconst showPatterns =\n\t\tpatterns.length && ( !! filterValue || prioritizePatterns );\n\tconst showSearch =\n\t\t( showPatterns && patterns.length > SEARCH_THRESHOLD ) ||\n\t\tblockTypes.length > SEARCH_THRESHOLD;\n\n\tuseEffect( () => {\n\t\tif ( setInserterIsOpened ) {\n\t\t\tsetInserterIsOpened( false );\n\t\t}\n\t}, [ setInserterIsOpened ] );\n\n\t// When clicking Browse All select the appropriate block so as\n\t// the insertion point can work as expected.\n\tconst onBrowseAll = () => {\n\t\tsetInserterIsOpened( { rootClientId, insertionIndex, filterValue } );\n\t};\n\n\tlet maxBlockPatterns = 0;\n\tif ( showPatterns ) {\n\t\tmaxBlockPatterns = prioritizePatterns\n\t\t\t? SHOWN_BLOCK_PATTERNS_WITH_PRIORITIZATION\n\t\t\t: SHOWN_BLOCK_PATTERNS;\n\t}\n\n\treturn (\n\t\t<div\n\t\t\tclassName={ classnames( 'block-editor-inserter__quick-inserter', {\n\t\t\t\t'has-search': showSearch,\n\t\t\t\t'has-expand': setInserterIsOpened,\n\t\t\t} ) }\n\t\t>\n\t\t\t{ showSearch && (\n\t\t\t\t<SearchControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tclassName=\"block-editor-inserter__search\"\n\t\t\t\t\tvalue={ filterValue }\n\t\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\t\tsetFilterValue( value );\n\t\t\t\t\t} }\n\t\t\t\t\tlabel={ __( 'Search for blocks and patterns' ) }\n\t\t\t\t\tplaceholder={ __( 'Search' ) }\n\t\t\t\t/>\n\t\t\t) }\n\n\t\t\t<div className=\"block-editor-inserter__quick-inserter-results\">\n\t\t\t\t<InserterSearchResults\n\t\t\t\t\tfilterValue={ filterValue }\n\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\trootClientId={ rootClientId }\n\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\tisAppender={ isAppender }\n\t\t\t\t\tmaxBlockPatterns={ maxBlockPatterns }\n\t\t\t\t\tmaxBlockTypes={ SHOWN_BLOCK_TYPES }\n\t\t\t\t\tisDraggable={ false }\n\t\t\t\t\tprioritizePatterns={ prioritizePatterns }\n\t\t\t\t\tselectBlockOnInsert={ selectBlockOnInsert }\n\t\t\t\t/>\n\t\t\t</div>\n\n\t\t\t{ setInserterIsOpened && (\n\t\t\t\t<Button\n\t\t\t\t\tclassName=\"block-editor-inserter__quick-inserter-expand\"\n\t\t\t\t\tonClick={ onBrowseAll }\n\t\t\t\t\taria-label={ __(\n\t\t\t\t\t\t'Browse all. This will open the main inserter panel in the editor toolbar.'\n\t\t\t\t\t) }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Browse all' ) }\n\t\t\t\t</Button>\n\t\t\t) }\n\t\t</div>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,QAAQ,EAAEC,SAAS,QAAQ,oBAAoB;AACxD,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,MAAM,EAAEC,aAAa,QAAQ,uBAAuB;AAC7D,SAASC,SAAS,QAAQ,iBAAiB;;AAE3C;AACA;AACA;AACA,OAAOC,qBAAqB,MAAM,kBAAkB;AACpD,OAAOC,iBAAiB,MAAM,6BAA6B;AAC3D,OAAOC,gBAAgB,MAAM,4BAA4B;AACzD,OAAOC,kBAAkB,MAAM,+BAA+B;AAC9D,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;AAEvD,MAAMC,gBAAgB,GAAG,CAAC;AAC1B,MAAMC,iBAAiB,GAAG,CAAC;AAC3B,MAAMC,oBAAoB,GAAG,CAAC;AAC9B,MAAMC,wCAAwC,GAAG,CAAC;AAElD,eAAe,SAASC,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,EAAC,8CAA8C;IACxDQ,OAAO,EAAGX,WAAa;IACvB,cAAaxC,EAAE,CACd,2EACD;EAAG,GAEDA,EAAE,CAAE,YAAa,CACZ,CAEL,CAAC;AAER"}
1
+ {"version":3,"names":["classnames","useState","useEffect","__","Button","SearchControl","useSelect","InserterSearchResults","useInsertionPoint","usePatternsState","useBlockTypesState","store","blockEditorStore","SEARCH_THRESHOLD","SHOWN_BLOCK_TYPES","SHOWN_BLOCK_PATTERNS","SHOWN_BLOCK_PATTERNS_WITH_PRIORITIZATION","QuickInserter","onSelect","rootClientId","clientId","isAppender","prioritizePatterns","selectBlockOnInsert","hasSearch","filterValue","setFilterValue","destinationRootClientId","onInsertBlocks","blockTypes","patterns","setInserterIsOpened","insertionIndex","select","getSettings","getBlockIndex","getBlockCount","settings","index","blockCount","__experimentalSetIsInserterOpened","showPatterns","length","showSearch","onBrowseAll","maxBlockPatterns","createElement","className","__nextHasNoMarginBottom","value","onChange","label","placeholder","maxBlockTypes","isDraggable","onClick"],"sources":["@wordpress/block-editor/src/components/inserter/quick-inserter.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useState, useEffect } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { Button, SearchControl } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport InserterSearchResults from './search-results';\nimport useInsertionPoint from './hooks/use-insertion-point';\nimport usePatternsState from './hooks/use-patterns-state';\nimport useBlockTypesState from './hooks/use-block-types-state';\nimport { store as blockEditorStore } from '../../store';\n\nconst SEARCH_THRESHOLD = 6;\nconst SHOWN_BLOCK_TYPES = 6;\nconst SHOWN_BLOCK_PATTERNS = 2;\nconst SHOWN_BLOCK_PATTERNS_WITH_PRIORITIZATION = 4;\n\nexport default function QuickInserter( {\n\tonSelect,\n\trootClientId,\n\tclientId,\n\tisAppender,\n\tprioritizePatterns,\n\tselectBlockOnInsert,\n\thasSearch = true,\n} ) {\n\tconst [ filterValue, setFilterValue ] = useState( '' );\n\tconst [ destinationRootClientId, onInsertBlocks ] = useInsertionPoint( {\n\t\tonSelect,\n\t\trootClientId,\n\t\tclientId,\n\t\tisAppender,\n\t\tselectBlockOnInsert,\n\t} );\n\tconst [ blockTypes ] = useBlockTypesState(\n\t\tdestinationRootClientId,\n\t\tonInsertBlocks\n\t);\n\n\tconst [ patterns ] = usePatternsState(\n\t\tonInsertBlocks,\n\t\tdestinationRootClientId\n\t);\n\n\tconst { setInserterIsOpened, insertionIndex } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getSettings, getBlockIndex, getBlockCount } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst settings = getSettings();\n\t\t\tconst index = getBlockIndex( clientId );\n\t\t\tconst blockCount = getBlockCount();\n\n\t\t\treturn {\n\t\t\t\tsetInserterIsOpened: settings.__experimentalSetIsInserterOpened,\n\t\t\t\tinsertionIndex: index === -1 ? blockCount : index,\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tconst showPatterns =\n\t\tpatterns.length && ( !! filterValue || prioritizePatterns );\n\tconst showSearch =\n\t\thasSearch &&\n\t\t( ( showPatterns && patterns.length > SEARCH_THRESHOLD ) ||\n\t\t\tblockTypes.length > SEARCH_THRESHOLD );\n\n\tuseEffect( () => {\n\t\tif ( setInserterIsOpened ) {\n\t\t\tsetInserterIsOpened( false );\n\t\t}\n\t}, [ setInserterIsOpened ] );\n\n\t// When clicking Browse All select the appropriate block so as\n\t// the insertion point can work as expected.\n\tconst onBrowseAll = () => {\n\t\tsetInserterIsOpened( { rootClientId, insertionIndex, filterValue } );\n\t};\n\n\tlet maxBlockPatterns = 0;\n\tif ( showPatterns ) {\n\t\tmaxBlockPatterns = prioritizePatterns\n\t\t\t? SHOWN_BLOCK_PATTERNS_WITH_PRIORITIZATION\n\t\t\t: SHOWN_BLOCK_PATTERNS;\n\t}\n\n\treturn (\n\t\t<div\n\t\t\tclassName={ classnames( 'block-editor-inserter__quick-inserter', {\n\t\t\t\t'has-search': showSearch,\n\t\t\t\t'has-expand': setInserterIsOpened,\n\t\t\t} ) }\n\t\t>\n\t\t\t{ showSearch && (\n\t\t\t\t<SearchControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tclassName=\"block-editor-inserter__search\"\n\t\t\t\t\tvalue={ filterValue }\n\t\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\t\tsetFilterValue( value );\n\t\t\t\t\t} }\n\t\t\t\t\tlabel={ __( 'Search for blocks and patterns' ) }\n\t\t\t\t\tplaceholder={ __( 'Search' ) }\n\t\t\t\t/>\n\t\t\t) }\n\n\t\t\t<div className=\"block-editor-inserter__quick-inserter-results\">\n\t\t\t\t<InserterSearchResults\n\t\t\t\t\tfilterValue={ filterValue }\n\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\trootClientId={ rootClientId }\n\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\tisAppender={ isAppender }\n\t\t\t\t\tmaxBlockPatterns={ maxBlockPatterns }\n\t\t\t\t\tmaxBlockTypes={ SHOWN_BLOCK_TYPES }\n\t\t\t\t\tisDraggable={ false }\n\t\t\t\t\tprioritizePatterns={ prioritizePatterns }\n\t\t\t\t\tselectBlockOnInsert={ selectBlockOnInsert }\n\t\t\t\t/>\n\t\t\t</div>\n\n\t\t\t{ setInserterIsOpened && (\n\t\t\t\t<Button\n\t\t\t\t\tclassName=\"block-editor-inserter__quick-inserter-expand\"\n\t\t\t\t\tonClick={ onBrowseAll }\n\t\t\t\t\taria-label={ __(\n\t\t\t\t\t\t'Browse all. This will open the main inserter panel in the editor toolbar.'\n\t\t\t\t\t) }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Browse all' ) }\n\t\t\t\t</Button>\n\t\t\t) }\n\t\t</div>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAAS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AAEuB,KAAM,CAAC;IACxB,CAAG;IACHE,KAAK,EAAGhD,EAAE,CAAE,gCAAiC,CAAG;IAChDiD,WAAW,EAAGjD,EAAE,CAAE,QAAS;EAAG,CAC9B,CACD,EAED2C,aAAA;IAAKC,SAAS,EAAC;EAA+C,GAC7DD,aAAA,CAACvC,qBAAqB;IACrBkB,WAAW,EAAGA,WAAa;IAC3BP,QAAQ,EAAGA,QAAU;IACrBC,YAAY,EAAGA,YAAc;IAC7BC,QAAQ,EAAGA,QAAU;IACrBC,UAAU,EAAGA,UAAY;IACzBwB,gBAAgB,EAAGA,gBAAkB;IACrCQ,aAAa,EAAGvC,iBAAmB;IACnCwC,WAAW,EAAG,KAAO;IACrBhC,kBAAkB,EAAGA,kBAAoB;IACzCC,mBAAmB,EAAGA;EAAqB,CAC3C,CACG,CAAC,EAEJQ,mBAAmB,IACpBe,aAAA,CAAC1C,MAAM;IACN2C,SAAS,EAAC,8CAA8C;IACxDQ,OAAO,EAAGX,WAAa;IACvB,cAAazC,EAAE,CACd,2EACD;EAAG,GAEDA,EAAE,CAAE,YAAa,CACZ,CAEL,CAAC;AAER"}
@@ -25,7 +25,6 @@ function extractWords(input = '') {
25
25
  // One lowercase or digit, followed by one uppercase.
26
26
  /([\p{Lu}\p{Lt}])([\p{Lu}\p{Lt}][\p{Ll}\p{Lo}])/gu // One uppercase followed by one uppercase and one lowercase.
27
27
  ],
28
-
29
28
  stripRegexp: /(\p{C}|\p{P}|\p{S})+/giu // Anything that's not a punctuation, symbol or control/format character.
30
29
  }).split(' ').filter(Boolean);
31
30
  }