@wordpress/block-editor 12.18.2 → 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 (870) 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/index.js +2 -15
  243. package/build/components/global-styles/index.js.map +1 -1
  244. package/build/components/global-styles/shadow-panel-components.js +133 -0
  245. package/build/components/global-styles/shadow-panel-components.js.map +1 -0
  246. package/build/components/global-styles/typography-panel.js +6 -7
  247. package/build/components/global-styles/typography-panel.js.map +1 -1
  248. package/build/components/global-styles/use-global-styles-output.js +1 -1
  249. package/build/components/global-styles/use-global-styles-output.js.map +1 -1
  250. package/build/components/global-styles/utils.js +38 -14
  251. package/build/components/global-styles/utils.js.map +1 -1
  252. package/build/components/iframe/index.js +1 -2
  253. package/build/components/iframe/index.js.map +1 -1
  254. package/build/components/image-editor/constants.js +3 -6
  255. package/build/components/image-editor/constants.js.map +1 -1
  256. package/build/components/image-link-destinations/index.native.js +1 -2
  257. package/build/components/image-link-destinations/index.native.js.map +1 -1
  258. package/build/components/index.js +2 -2
  259. package/build/components/index.js.map +1 -1
  260. package/build/components/index.native.js +2 -2
  261. package/build/components/index.native.js.map +1 -1
  262. package/build/components/inner-blocks/button-block-appender.js +1 -2
  263. package/build/components/inner-blocks/button-block-appender.js.map +1 -1
  264. package/build/components/inner-blocks/constants.native.js +1 -2
  265. package/build/components/inner-blocks/constants.native.js.map +1 -1
  266. package/build/components/inner-blocks/default-block-appender.js +1 -2
  267. package/build/components/inner-blocks/default-block-appender.js.map +1 -1
  268. package/build/components/inner-blocks/index.js +33 -30
  269. package/build/components/inner-blocks/index.js.map +1 -1
  270. package/build/components/inner-blocks/index.native.js +2 -6
  271. package/build/components/inner-blocks/index.native.js.map +1 -1
  272. package/build/components/inner-blocks/use-inner-block-template-sync.js +2 -3
  273. package/build/components/inner-blocks/use-inner-block-template-sync.js.map +1 -1
  274. package/build/components/inner-blocks/warning-max-depth-exceeded.native.js +1 -2
  275. package/build/components/inner-blocks/warning-max-depth-exceeded.native.js.map +1 -1
  276. package/build/components/inner-blocks/with-client-id.js +1 -2
  277. package/build/components/inner-blocks/with-client-id.js.map +1 -1
  278. package/build/components/inserter/block-patterns-explorer/index.js +1 -2
  279. package/build/components/inserter/block-patterns-explorer/index.js.map +1 -1
  280. package/build/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js +1 -2
  281. package/build/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js.map +1 -1
  282. package/build/components/inserter/block-patterns-explorer/pattern-list.js +1 -2
  283. package/build/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
  284. package/build/components/inserter/block-patterns-tab/index.js +1 -2
  285. package/build/components/inserter/block-patterns-tab/index.js.map +1 -1
  286. package/build/components/inserter/block-patterns-tab/patterns-filter.js +4 -4
  287. package/build/components/inserter/block-patterns-tab/patterns-filter.js.map +1 -1
  288. package/build/components/inserter/block-patterns-tab/utils.js +5 -9
  289. package/build/components/inserter/block-patterns-tab/utils.js.map +1 -1
  290. package/build/components/inserter/block-types-tab.js +1 -2
  291. package/build/components/inserter/block-types-tab.js.map +1 -1
  292. package/build/components/inserter/block-types-tab.native.js +1 -2
  293. package/build/components/inserter/block-types-tab.native.js.map +1 -1
  294. package/build/components/inserter/hooks/use-block-type-impressions.native.js +1 -2
  295. package/build/components/inserter/hooks/use-block-type-impressions.native.js.map +1 -1
  296. package/build/components/inserter/hooks/use-block-types-state.js +1 -2
  297. package/build/components/inserter/hooks/use-block-types-state.js.map +1 -1
  298. package/build/components/inserter/hooks/use-insertion-point.js +1 -2
  299. package/build/components/inserter/hooks/use-insertion-point.js.map +1 -1
  300. package/build/components/inserter/hooks/use-patterns-state.js +1 -2
  301. package/build/components/inserter/hooks/use-patterns-state.js.map +1 -1
  302. package/build/components/inserter/index.js +2 -4
  303. package/build/components/inserter/index.js.map +1 -1
  304. package/build/components/inserter/index.native.js +1 -2
  305. package/build/components/inserter/index.native.js.map +1 -1
  306. package/build/components/inserter/library.js +1 -2
  307. package/build/components/inserter/library.js.map +1 -1
  308. package/build/components/inserter/media-tab/media-list.js +1 -2
  309. package/build/components/inserter/media-tab/media-list.js.map +1 -1
  310. package/build/components/inserter/media-tab/media-tab.js +1 -2
  311. package/build/components/inserter/media-tab/media-tab.js.map +1 -1
  312. package/build/components/inserter/menu.js +1 -2
  313. package/build/components/inserter/menu.js.map +1 -1
  314. package/build/components/inserter/menu.native.js +1 -2
  315. package/build/components/inserter/menu.native.js.map +1 -1
  316. package/build/components/inserter/no-results.js +1 -2
  317. package/build/components/inserter/no-results.js.map +1 -1
  318. package/build/components/inserter/no-results.native.js +1 -2
  319. package/build/components/inserter/no-results.native.js.map +1 -1
  320. package/build/components/inserter/panel.js +1 -2
  321. package/build/components/inserter/panel.js.map +1 -1
  322. package/build/components/inserter/preview-panel.js +1 -2
  323. package/build/components/inserter/preview-panel.js.map +1 -1
  324. package/build/components/inserter/quick-inserter.js +3 -2
  325. package/build/components/inserter/quick-inserter.js.map +1 -1
  326. package/build/components/inserter/reusable-blocks-tab.native.js +1 -2
  327. package/build/components/inserter/reusable-blocks-tab.native.js.map +1 -1
  328. package/build/components/inserter/search-items.js +0 -1
  329. package/build/components/inserter/search-items.js.map +1 -1
  330. package/build/components/inserter/search-results.js +1 -2
  331. package/build/components/inserter/search-results.js.map +1 -1
  332. package/build/components/inserter/search-results.native.js +1 -2
  333. package/build/components/inserter/search-results.native.js.map +1 -1
  334. package/build/components/inserter/tabs.js +1 -2
  335. package/build/components/inserter/tabs.js.map +1 -1
  336. package/build/components/inserter/tabs.native.js +1 -2
  337. package/build/components/inserter/tabs.native.js.map +1 -1
  338. package/build/components/inserter/tips.js +1 -2
  339. package/build/components/inserter/tips.js.map +1 -1
  340. package/build/components/inserter-button/index.native.js +1 -2
  341. package/build/components/inserter-button/index.native.js.map +1 -1
  342. package/build/components/inserter-button/sparkles.js +1 -2
  343. package/build/components/inserter-button/sparkles.js.map +1 -1
  344. package/build/components/inserter-draggable-blocks/index.js +11 -2
  345. package/build/components/inserter-draggable-blocks/index.js.map +1 -1
  346. package/build/components/inserter-list-item/index.js +1 -2
  347. package/build/components/inserter-list-item/index.js.map +1 -1
  348. package/build/components/inserter-listbox/context.js +1 -2
  349. package/build/components/inserter-listbox/context.js.map +1 -1
  350. package/build/components/inserter-listbox/group.js +1 -2
  351. package/build/components/inserter-listbox/group.js.map +1 -1
  352. package/build/components/inserter-listbox/index.js +1 -2
  353. package/build/components/inserter-listbox/index.js.map +1 -1
  354. package/build/components/inserter-listbox/item.js +1 -2
  355. package/build/components/inserter-listbox/item.js.map +1 -1
  356. package/build/components/inserter-listbox/row.js +1 -2
  357. package/build/components/inserter-listbox/row.js.map +1 -1
  358. package/build/components/inserter-menu-extension/index.js +1 -2
  359. package/build/components/inserter-menu-extension/index.js.map +1 -1
  360. package/build/components/inspector-controls/groups.js +1 -2
  361. package/build/components/inspector-controls/groups.js.map +1 -1
  362. package/build/components/inspector-controls/index.js +1 -2
  363. package/build/components/inspector-controls/index.js.map +1 -1
  364. package/build/components/inspector-controls-tabs/advanced-controls-panel.js +3 -4
  365. package/build/components/inspector-controls-tabs/advanced-controls-panel.js.map +1 -1
  366. package/build/components/inspector-controls-tabs/position-controls-panel.js +1 -2
  367. package/build/components/inspector-controls-tabs/position-controls-panel.js.map +1 -1
  368. package/build/components/inspector-controls-tabs/settings-tab.js +1 -2
  369. package/build/components/inspector-controls-tabs/settings-tab.js.map +1 -1
  370. package/build/components/inspector-controls-tabs/styles-tab.js +6 -6
  371. package/build/components/inspector-controls-tabs/styles-tab.js.map +1 -1
  372. package/build/components/inspector-controls-tabs/use-is-list-view-tab-disabled.js +1 -2
  373. package/build/components/inspector-controls-tabs/use-is-list-view-tab-disabled.js.map +1 -1
  374. package/build/components/inspector-controls-tabs/utils.js +3 -6
  375. package/build/components/inspector-controls-tabs/utils.js.map +1 -1
  376. package/build/components/justify-content-control/ui.js +1 -2
  377. package/build/components/justify-content-control/ui.js.map +1 -1
  378. package/build/components/keyboard-shortcuts/index.js +1 -2
  379. package/build/components/keyboard-shortcuts/index.js.map +1 -1
  380. package/build/components/line-height-control/index.js +1 -2
  381. package/build/components/line-height-control/index.js.map +1 -1
  382. package/build/components/line-height-control/utils.js +4 -8
  383. package/build/components/line-height-control/utils.js.map +1 -1
  384. package/build/components/link-control/constants.js +7 -14
  385. package/build/components/link-control/constants.js.map +1 -1
  386. package/build/components/link-control/index.js +2 -16
  387. package/build/components/link-control/index.js.map +1 -1
  388. package/build/components/link-control/link-preview.js +13 -15
  389. package/build/components/link-control/link-preview.js.map +1 -1
  390. package/build/components/link-control/search-create-button.js +1 -2
  391. package/build/components/link-control/search-create-button.js.map +1 -1
  392. package/build/components/link-control/search-input.js +1 -2
  393. package/build/components/link-control/search-input.js.map +1 -1
  394. package/build/components/link-control/search-item.js +1 -2
  395. package/build/components/link-control/search-item.js.map +1 -1
  396. package/build/components/link-control/settings-drawer.js +1 -2
  397. package/build/components/link-control/settings-drawer.js.map +1 -1
  398. package/build/components/link-control/settings.js +1 -2
  399. package/build/components/link-control/settings.js.map +1 -1
  400. package/build/components/link-control/use-create-page.js +0 -1
  401. package/build/components/link-control/use-create-page.js.map +1 -1
  402. package/build/components/link-control/use-rich-url-data.js +1 -2
  403. package/build/components/link-control/use-rich-url-data.js.map +1 -1
  404. package/build/components/link-control/viewer-slot.js +1 -2
  405. package/build/components/link-control/viewer-slot.js.map +1 -1
  406. package/build/components/list-view/appender.js +1 -2
  407. package/build/components/list-view/appender.js.map +1 -1
  408. package/build/components/list-view/block-contents.js +1 -2
  409. package/build/components/list-view/block-contents.js.map +1 -1
  410. package/build/components/list-view/block-select-button.js +1 -2
  411. package/build/components/list-view/block-select-button.js.map +1 -1
  412. package/build/components/list-view/block.js +33 -28
  413. package/build/components/list-view/block.js.map +1 -1
  414. package/build/components/list-view/branch.js +1 -2
  415. package/build/components/list-view/branch.js.map +1 -1
  416. package/build/components/list-view/context.js +1 -2
  417. package/build/components/list-view/context.js.map +1 -1
  418. package/build/components/list-view/index.js +20 -17
  419. package/build/components/list-view/index.js.map +1 -1
  420. package/build/components/list-view/leaf.js +1 -2
  421. package/build/components/list-view/leaf.js.map +1 -1
  422. package/build/components/list-view/use-clipboard-handler.js +159 -0
  423. package/build/components/list-view/use-clipboard-handler.js.map +1 -0
  424. package/build/components/list-view/use-list-view-drop-zone.js +1 -2
  425. package/build/components/list-view/use-list-view-drop-zone.js.map +1 -1
  426. package/build/components/list-view/utils.js +4 -4
  427. package/build/components/list-view/utils.js.map +1 -1
  428. package/build/components/media-placeholder/index.js +1 -2
  429. package/build/components/media-placeholder/index.js.map +1 -1
  430. package/build/components/media-placeholder/index.native.js +1 -2
  431. package/build/components/media-placeholder/index.native.js.map +1 -1
  432. package/build/components/media-replace-flow/index.js +1 -2
  433. package/build/components/media-replace-flow/index.js.map +1 -1
  434. package/build/components/media-replace-flow/index.native.js +1 -2
  435. package/build/components/media-replace-flow/index.native.js.map +1 -1
  436. package/build/components/media-upload/check.js +1 -2
  437. package/build/components/media-upload/check.js.map +1 -1
  438. package/build/components/media-upload/constants.native.js +8 -16
  439. package/build/components/media-upload/constants.native.js.map +1 -1
  440. package/build/components/media-upload/index.js +1 -2
  441. package/build/components/media-upload/index.js.map +1 -1
  442. package/build/components/media-upload/index.native.js +1 -2
  443. package/build/components/media-upload/index.native.js.map +1 -1
  444. package/build/components/media-upload-progress/constants.js +6 -12
  445. package/build/components/media-upload-progress/constants.js.map +1 -1
  446. package/build/components/media-upload-progress/index.native.js +1 -2
  447. package/build/components/media-upload-progress/index.native.js.map +1 -1
  448. package/build/components/multi-selection-inspector/index.js +1 -2
  449. package/build/components/multi-selection-inspector/index.js.map +1 -1
  450. package/build/components/navigable-toolbar/index.js +5 -2
  451. package/build/components/navigable-toolbar/index.js.map +1 -1
  452. package/build/components/observe-typing/index.js +1 -2
  453. package/build/components/observe-typing/index.js.map +1 -1
  454. package/build/components/panel-color-settings/index.js +1 -2
  455. package/build/components/panel-color-settings/index.js.map +1 -1
  456. package/build/components/plain-text/index.js +1 -2
  457. package/build/components/plain-text/index.js.map +1 -1
  458. package/build/components/provider/block-refs-provider.js +1 -2
  459. package/build/components/provider/block-refs-provider.js.map +1 -1
  460. package/build/components/provider/index.js +3 -5
  461. package/build/components/provider/index.js.map +1 -1
  462. package/build/components/provider/index.native.js +2 -4
  463. package/build/components/provider/index.native.js.map +1 -1
  464. package/build/components/provider/with-registry-provider.js +1 -2
  465. package/build/components/provider/with-registry-provider.js.map +1 -1
  466. package/build/components/publish-date-time-picker/index.js +1 -2
  467. package/build/components/publish-date-time-picker/index.js.map +1 -1
  468. package/build/components/responsive-block-control/index.js +3 -7
  469. package/build/components/responsive-block-control/index.js.map +1 -1
  470. package/build/components/rich-text/embed-handler-picker.native.js +1 -2
  471. package/build/components/rich-text/embed-handler-picker.native.js.map +1 -1
  472. package/build/components/rich-text/format-edit.js +1 -2
  473. package/build/components/rich-text/format-edit.js.map +1 -1
  474. package/build/components/rich-text/format-toolbar/index.js +1 -2
  475. package/build/components/rich-text/format-toolbar/index.js.map +1 -1
  476. package/build/components/rich-text/format-toolbar/index.native.js +1 -2
  477. package/build/components/rich-text/format-toolbar/index.native.js.map +1 -1
  478. package/build/components/rich-text/format-toolbar-container.js +1 -2
  479. package/build/components/rich-text/format-toolbar-container.js.map +1 -1
  480. package/build/components/rich-text/format-toolbar-container.native.js +1 -2
  481. package/build/components/rich-text/format-toolbar-container.native.js.map +1 -1
  482. package/build/components/rich-text/index.js +6 -7
  483. package/build/components/rich-text/index.js.map +1 -1
  484. package/build/components/rich-text/index.native.js +1 -2
  485. package/build/components/rich-text/index.native.js.map +1 -1
  486. package/build/components/rich-text/multiline.js +1 -2
  487. package/build/components/rich-text/multiline.js.map +1 -1
  488. package/build/components/rich-text/native/index.native.js +1 -6
  489. package/build/components/rich-text/native/index.native.js.map +1 -1
  490. package/build/components/rich-text/native/toolbar-button-with-options.native.js +1 -2
  491. package/build/components/rich-text/native/toolbar-button-with-options.native.js.map +1 -1
  492. package/build/components/skip-to-selected-block/index.js +1 -2
  493. package/build/components/skip-to-selected-block/index.js.map +1 -1
  494. package/build/components/spacing-sizes-control/index.js +3 -1
  495. package/build/components/spacing-sizes-control/index.js.map +1 -1
  496. package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js +0 -1
  497. package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
  498. package/build/components/spacing-sizes-control/utils.js +5 -10
  499. package/build/components/spacing-sizes-control/utils.js.map +1 -1
  500. package/build/components/tool-selector/index.js +1 -2
  501. package/build/components/tool-selector/index.js.map +1 -1
  502. package/build/components/typewriter/index.js +1 -2
  503. package/build/components/typewriter/index.js.map +1 -1
  504. package/build/components/ungroup-button/index.native.js +1 -2
  505. package/build/components/ungroup-button/index.native.js.map +1 -1
  506. package/build/components/unsupported-block-details/index.native.js +1 -2
  507. package/build/components/unsupported-block-details/index.native.js.map +1 -1
  508. package/build/components/url-input/button.js +1 -2
  509. package/build/components/url-input/button.js.map +1 -1
  510. package/build/components/url-input/index.js +1 -2
  511. package/build/components/url-input/index.js.map +1 -1
  512. package/build/components/url-popover/image-url-input-ui.js +18 -8
  513. package/build/components/url-popover/image-url-input-ui.js.map +1 -1
  514. package/build/components/url-popover/index.js +5 -5
  515. package/build/components/url-popover/index.js.map +1 -1
  516. package/build/components/use-block-drop-zone/index.js +15 -5
  517. package/build/components/use-block-drop-zone/index.js.map +1 -1
  518. package/build/components/use-flash-editable-blocks/index.js +60 -0
  519. package/build/components/use-flash-editable-blocks/index.js.map +1 -0
  520. package/build/components/use-moving-animation/index.js +1 -2
  521. package/build/components/use-moving-animation/index.js.map +1 -1
  522. package/build/components/use-on-block-drop/index.js +4 -4
  523. package/build/components/use-on-block-drop/index.js.map +1 -1
  524. package/build/components/use-settings/index.js +3 -162
  525. package/build/components/use-settings/index.js.map +1 -1
  526. package/build/components/video-player/gridicon-play.native.js +1 -2
  527. package/build/components/video-player/gridicon-play.native.js.map +1 -1
  528. package/build/components/video-player/index.native.js +2 -4
  529. package/build/components/video-player/index.native.js.map +1 -1
  530. package/build/components/warning/index.js +1 -2
  531. package/build/components/warning/index.js.map +1 -1
  532. package/build/components/warning/index.native.js +1 -2
  533. package/build/components/warning/index.native.js.map +1 -1
  534. package/build/components/writing-flow/index.js +1 -2
  535. package/build/components/writing-flow/index.js.map +1 -1
  536. package/build/components/writing-flow/use-clipboard-handler.js +3 -48
  537. package/build/components/writing-flow/use-clipboard-handler.js.map +1 -1
  538. package/build/components/writing-flow/use-drag-selection.js +13 -2
  539. package/build/components/writing-flow/use-drag-selection.js.map +1 -1
  540. package/build/components/writing-flow/utils.js +86 -0
  541. package/build/components/writing-flow/utils.js.map +1 -0
  542. package/build/hooks/align.js +1 -2
  543. package/build/hooks/align.js.map +1 -1
  544. package/build/hooks/align.native.js +2 -2
  545. package/build/hooks/align.native.js.map +1 -1
  546. package/build/hooks/anchor.js +1 -2
  547. package/build/hooks/anchor.js.map +1 -1
  548. package/build/hooks/aria-label.js +1 -2
  549. package/build/hooks/aria-label.js.map +1 -1
  550. package/build/hooks/background.js +52 -14
  551. package/build/hooks/background.js.map +1 -1
  552. package/build/hooks/block-hooks.js +1 -2
  553. package/build/hooks/block-hooks.js.map +1 -1
  554. package/build/hooks/block-renaming.js +1 -2
  555. package/build/hooks/block-renaming.js.map +1 -1
  556. package/build/hooks/border.js +42 -7
  557. package/build/hooks/border.js.map +1 -1
  558. package/build/hooks/color.js +4 -6
  559. package/build/hooks/color.js.map +1 -1
  560. package/build/hooks/content-lock-ui.js +1 -2
  561. package/build/hooks/content-lock-ui.js.map +1 -1
  562. package/build/hooks/custom-class-name.js +1 -2
  563. package/build/hooks/custom-class-name.js.map +1 -1
  564. package/build/hooks/custom-class-name.native.js +1 -2
  565. package/build/hooks/custom-class-name.native.js.map +1 -1
  566. package/build/hooks/dimensions.js +5 -10
  567. package/build/hooks/dimensions.js.map +1 -1
  568. package/build/hooks/duotone.js +1 -3
  569. package/build/hooks/duotone.js.map +1 -1
  570. package/build/hooks/font-family.js +2 -4
  571. package/build/hooks/font-family.js.map +1 -1
  572. package/build/hooks/font-size.js +25 -31
  573. package/build/hooks/font-size.js.map +1 -1
  574. package/build/hooks/index.js +2 -2
  575. package/build/hooks/index.js.map +1 -1
  576. package/build/hooks/layout-child.js +1 -2
  577. package/build/hooks/layout-child.js.map +1 -1
  578. package/build/hooks/layout.js +2 -4
  579. package/build/hooks/layout.js.map +1 -1
  580. package/build/hooks/line-height.js +1 -2
  581. package/build/hooks/line-height.js.map +1 -1
  582. package/build/hooks/position.js +1 -2
  583. package/build/hooks/position.js.map +1 -1
  584. package/build/hooks/style.js +3 -8
  585. package/build/hooks/style.js.map +1 -1
  586. package/build/hooks/typography.js +4 -6
  587. package/build/hooks/typography.js.map +1 -1
  588. package/build/hooks/typography.native.js +3 -6
  589. package/build/hooks/typography.native.js.map +1 -1
  590. package/build/hooks/use-bindings-attributes.js +10 -9
  591. package/build/hooks/use-bindings-attributes.js.map +1 -1
  592. package/build/layouts/constrained.js +1 -2
  593. package/build/layouts/constrained.js.map +1 -1
  594. package/build/layouts/definitions.js +1 -2
  595. package/build/layouts/definitions.js.map +1 -1
  596. package/build/layouts/flex.js +1 -2
  597. package/build/layouts/flex.js.map +1 -1
  598. package/build/layouts/flow.js +1 -2
  599. package/build/layouts/flow.js.map +1 -1
  600. package/build/layouts/grid.js +1 -2
  601. package/build/layouts/grid.js.map +1 -1
  602. package/build/private-apis.js +8 -5
  603. package/build/private-apis.js.map +1 -1
  604. package/build/private-apis.native.js +3 -4
  605. package/build/private-apis.native.js.map +1 -1
  606. package/build/store/actions.js +2 -4
  607. package/build/store/actions.js.map +1 -1
  608. package/build/store/constants.js +1 -2
  609. package/build/store/constants.js.map +1 -1
  610. package/build/store/defaults.js +2 -4
  611. package/build/store/defaults.js.map +1 -1
  612. package/build/store/defaults.native.js +1 -2
  613. package/build/store/defaults.native.js.map +1 -1
  614. package/build/store/get-block-settings.js +180 -0
  615. package/build/store/get-block-settings.js.map +1 -0
  616. package/build/store/index.js +4 -6
  617. package/build/store/index.js.map +1 -1
  618. package/build/store/private-actions.js +37 -3
  619. package/build/store/private-actions.js.map +1 -1
  620. package/build/store/private-selectors.js +55 -29
  621. package/build/store/private-selectors.js.map +1 -1
  622. package/build/store/reducer.js +27 -6
  623. package/build/store/reducer.js.map +1 -1
  624. package/build/store/selectors.js +98 -102
  625. package/build/store/selectors.js.map +1 -1
  626. package/build/store/undo-ignore.js +1 -2
  627. package/build/store/undo-ignore.js.map +1 -1
  628. package/build/utils/selection.js +1 -2
  629. package/build/utils/selection.js.map +1 -1
  630. package/build/utils/transform-styles/index.js +3 -4
  631. package/build/utils/transform-styles/index.js.map +1 -1
  632. package/build-module/components/block-breadcrumb/index.js +0 -1
  633. package/build-module/components/block-breadcrumb/index.js.map +1 -1
  634. package/build-module/components/block-inspector/index.js +10 -7
  635. package/build-module/components/block-inspector/index.js.map +1 -1
  636. package/build-module/components/block-list/block.js +32 -20
  637. package/build-module/components/block-list/block.js.map +1 -1
  638. package/build-module/components/block-list/block.native.js +6 -4
  639. package/build-module/components/block-list/block.native.js.map +1 -1
  640. package/build-module/components/block-list/index.js +18 -7
  641. package/build-module/components/block-list/index.js.map +1 -1
  642. package/build-module/components/block-list/use-block-props/index.js +8 -1
  643. package/build-module/components/block-list/use-block-props/index.js.map +1 -1
  644. package/build-module/components/block-list-appender/index.js +5 -51
  645. package/build-module/components/block-list-appender/index.js.map +1 -1
  646. package/build-module/components/block-mover/mover-description.native.js +0 -2
  647. package/build-module/components/block-mover/mover-description.native.js.map +1 -1
  648. package/build-module/components/block-popover/inbetween.js +0 -1
  649. package/build-module/components/block-popover/inbetween.js.map +1 -1
  650. package/build-module/components/block-preview/auto.js +2 -1
  651. package/build-module/components/block-preview/auto.js.map +1 -1
  652. package/build-module/components/block-removal-warning-modal/index.js +4 -2
  653. package/build-module/components/block-removal-warning-modal/index.js.map +1 -1
  654. package/build-module/components/block-switcher/index.js +12 -9
  655. package/build-module/components/block-switcher/index.js.map +1 -1
  656. package/build-module/components/block-title/use-block-display-title.js +22 -28
  657. package/build-module/components/block-title/use-block-display-title.js.map +1 -1
  658. package/build-module/components/block-tools/block-selection-button.js +20 -17
  659. package/build-module/components/block-tools/block-selection-button.js.map +1 -1
  660. package/build-module/components/block-tools/index.js +2 -10
  661. package/build-module/components/block-tools/index.js.map +1 -1
  662. package/build-module/components/colors-gradients/control.js +0 -1
  663. package/build-module/components/colors-gradients/control.js.map +1 -1
  664. package/build-module/components/default-block-appender/index.js +30 -37
  665. package/build-module/components/default-block-appender/index.js.map +1 -1
  666. package/build-module/components/global-styles/border-panel.js +57 -9
  667. package/build-module/components/global-styles/border-panel.js.map +1 -1
  668. package/build-module/components/global-styles/get-global-styles-changes.js +2 -4
  669. package/build-module/components/global-styles/get-global-styles-changes.js.map +1 -1
  670. package/build-module/components/global-styles/index.js +0 -1
  671. package/build-module/components/global-styles/index.js.map +1 -1
  672. package/build-module/components/global-styles/shadow-panel-components.js +121 -0
  673. package/build-module/components/global-styles/shadow-panel-components.js.map +1 -0
  674. package/build-module/components/global-styles/typography-panel.js +2 -3
  675. package/build-module/components/global-styles/typography-panel.js.map +1 -1
  676. package/build-module/components/global-styles/use-global-styles-output.js +2 -2
  677. package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
  678. package/build-module/components/global-styles/utils.js +30 -1
  679. package/build-module/components/global-styles/utils.js.map +1 -1
  680. package/build-module/components/inner-blocks/index.js +33 -29
  681. package/build-module/components/inner-blocks/index.js.map +1 -1
  682. package/build-module/components/inner-blocks/index.native.js +1 -4
  683. package/build-module/components/inner-blocks/index.native.js.map +1 -1
  684. package/build-module/components/inner-blocks/use-inner-block-template-sync.js +2 -3
  685. package/build-module/components/inner-blocks/use-inner-block-template-sync.js.map +1 -1
  686. package/build-module/components/inserter/block-patterns-tab/patterns-filter.js +4 -4
  687. package/build-module/components/inserter/block-patterns-tab/patterns-filter.js.map +1 -1
  688. package/build-module/components/inserter/block-patterns-tab/utils.js +2 -2
  689. package/build-module/components/inserter/block-patterns-tab/utils.js.map +1 -1
  690. package/build-module/components/inserter/quick-inserter.js +3 -2
  691. package/build-module/components/inserter/quick-inserter.js.map +1 -1
  692. package/build-module/components/inserter/search-items.js +0 -1
  693. package/build-module/components/inserter/search-items.js.map +1 -1
  694. package/build-module/components/inserter-draggable-blocks/index.js +12 -1
  695. package/build-module/components/inserter-draggable-blocks/index.js.map +1 -1
  696. package/build-module/components/inspector-controls-tabs/styles-tab.js +5 -4
  697. package/build-module/components/inspector-controls-tabs/styles-tab.js.map +1 -1
  698. package/build-module/components/link-control/index.js +1 -14
  699. package/build-module/components/link-control/index.js.map +1 -1
  700. package/build-module/components/link-control/link-preview.js +16 -18
  701. package/build-module/components/link-control/link-preview.js.map +1 -1
  702. package/build-module/components/link-control/use-create-page.js +0 -1
  703. package/build-module/components/link-control/use-create-page.js.map +1 -1
  704. package/build-module/components/list-view/block.js +32 -26
  705. package/build-module/components/list-view/block.js.map +1 -1
  706. package/build-module/components/list-view/index.js +17 -11
  707. package/build-module/components/list-view/index.js.map +1 -1
  708. package/build-module/components/list-view/use-clipboard-handler.js +153 -0
  709. package/build-module/components/list-view/use-clipboard-handler.js.map +1 -0
  710. package/build-module/components/list-view/utils.js +4 -4
  711. package/build-module/components/list-view/utils.js.map +1 -1
  712. package/build-module/components/navigable-toolbar/index.js +5 -2
  713. package/build-module/components/navigable-toolbar/index.js.map +1 -1
  714. package/build-module/components/provider/index.js +1 -1
  715. package/build-module/components/provider/index.js.map +1 -1
  716. package/build-module/components/responsive-block-control/index.js +3 -6
  717. package/build-module/components/responsive-block-control/index.js.map +1 -1
  718. package/build-module/components/rich-text/index.js +3 -1
  719. package/build-module/components/rich-text/index.js.map +1 -1
  720. package/build-module/components/rich-text/native/index.native.js +0 -4
  721. package/build-module/components/rich-text/native/index.native.js.map +1 -1
  722. package/build-module/components/spacing-sizes-control/index.js +4 -2
  723. package/build-module/components/spacing-sizes-control/index.js.map +1 -1
  724. package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js +0 -1
  725. package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
  726. package/build-module/components/url-popover/image-url-input-ui.js +21 -11
  727. package/build-module/components/url-popover/image-url-input-ui.js.map +1 -1
  728. package/build-module/components/url-popover/index.js +5 -4
  729. package/build-module/components/url-popover/index.js.map +1 -1
  730. package/build-module/components/use-block-drop-zone/index.js +15 -5
  731. package/build-module/components/use-block-drop-zone/index.js.map +1 -1
  732. package/build-module/components/use-flash-editable-blocks/index.js +53 -0
  733. package/build-module/components/use-flash-editable-blocks/index.js.map +1 -0
  734. package/build-module/components/use-on-block-drop/index.js +4 -4
  735. package/build-module/components/use-on-block-drop/index.js.map +1 -1
  736. package/build-module/components/use-settings/index.js +3 -159
  737. package/build-module/components/use-settings/index.js.map +1 -1
  738. package/build-module/components/writing-flow/use-clipboard-handler.js +4 -49
  739. package/build-module/components/writing-flow/use-clipboard-handler.js.map +1 -1
  740. package/build-module/components/writing-flow/use-drag-selection.js +13 -2
  741. package/build-module/components/writing-flow/use-drag-selection.js.map +1 -1
  742. package/build-module/components/writing-flow/utils.js +79 -0
  743. package/build-module/components/writing-flow/utils.js.map +1 -0
  744. package/build-module/hooks/background.js +48 -10
  745. package/build-module/hooks/background.js.map +1 -1
  746. package/build-module/hooks/border.js +38 -3
  747. package/build-module/hooks/border.js.map +1 -1
  748. package/build-module/hooks/duotone.js +0 -1
  749. package/build-module/hooks/duotone.js.map +1 -1
  750. package/build-module/hooks/font-size.js +23 -27
  751. package/build-module/hooks/font-size.js.map +1 -1
  752. package/build-module/hooks/style.js +3 -7
  753. package/build-module/hooks/style.js.map +1 -1
  754. package/build-module/hooks/use-bindings-attributes.js +8 -11
  755. package/build-module/hooks/use-bindings-attributes.js.map +1 -1
  756. package/build-module/private-apis.js +5 -1
  757. package/build-module/private-apis.js.map +1 -1
  758. package/build-module/store/get-block-settings.js +171 -0
  759. package/build-module/store/get-block-settings.js.map +1 -0
  760. package/build-module/store/private-actions.js +35 -3
  761. package/build-module/store/private-actions.js.map +1 -1
  762. package/build-module/store/private-selectors.js +42 -19
  763. package/build-module/store/private-selectors.js.map +1 -1
  764. package/build-module/store/reducer.js +24 -2
  765. package/build-module/store/reducer.js.map +1 -1
  766. package/build-module/store/selectors.js +65 -34
  767. package/build-module/store/selectors.js.map +1 -1
  768. package/build-style/content-rtl.css +23 -15
  769. package/build-style/content.css +23 -15
  770. package/build-style/style-rtl.css +66 -53
  771. package/build-style/style.css +66 -53
  772. package/package.json +31 -31
  773. package/src/components/block-canvas/style.scss +1 -1
  774. package/src/components/block-card/style.scss +3 -1
  775. package/src/components/block-controls/README.md +2 -2
  776. package/src/components/block-inspector/index.js +11 -9
  777. package/src/components/block-list/block.js +45 -20
  778. package/src/components/block-list/block.native.js +7 -4
  779. package/src/components/block-list/content.scss +23 -28
  780. package/src/components/block-list/index.js +49 -25
  781. package/src/components/block-list/use-block-props/index.js +8 -0
  782. package/src/components/block-list-appender/index.js +7 -74
  783. package/src/components/block-mover/style.scss +4 -3
  784. package/src/components/block-preview/auto.js +2 -1
  785. package/src/components/block-removal-warning-modal/index.js +17 -10
  786. package/src/components/block-switcher/index.js +22 -13
  787. package/src/components/block-title/test/index.js +86 -85
  788. package/src/components/block-title/use-block-display-title.js +25 -36
  789. package/src/components/block-toolbar/style.scss +8 -1
  790. package/src/components/block-tools/block-selection-button.js +23 -26
  791. package/src/components/block-tools/index.js +2 -12
  792. package/src/components/colors-gradients/control.js +0 -1
  793. package/src/components/default-block-appender/index.js +26 -38
  794. package/src/components/default-block-appender/test/index.js +24 -16
  795. package/src/components/font-sizes/README.MD +0 -9
  796. package/src/components/global-styles/border-panel.js +72 -1
  797. package/src/components/global-styles/get-global-styles-changes.js +2 -8
  798. package/src/components/global-styles/index.js +0 -1
  799. package/src/components/global-styles/shadow-panel-components.js +125 -0
  800. package/src/components/global-styles/style.scss +8 -9
  801. package/src/components/global-styles/test/get-global-styles-changes.js +3 -3
  802. package/src/components/global-styles/test/use-global-styles-output.js +1 -1
  803. package/src/components/global-styles/test/utils.js +86 -0
  804. package/src/components/global-styles/typography-panel.js +1 -2
  805. package/src/components/global-styles/use-global-styles-output.js +5 -1
  806. package/src/components/global-styles/utils.js +36 -0
  807. package/src/components/inner-blocks/index.js +31 -32
  808. package/src/components/inner-blocks/index.native.js +3 -9
  809. package/src/components/inner-blocks/use-inner-block-template-sync.js +1 -3
  810. package/src/components/inserter/block-patterns-tab/patterns-filter.js +4 -10
  811. package/src/components/inserter/block-patterns-tab/utils.js +2 -2
  812. package/src/components/inserter/quick-inserter.js +4 -2
  813. package/src/components/inserter/style.scss +3 -13
  814. package/src/components/inserter-draggable-blocks/index.js +12 -1
  815. package/src/components/inspector-controls-tabs/styles-tab.js +4 -2
  816. package/src/components/link-control/index.js +1 -20
  817. package/src/components/link-control/link-preview.js +19 -24
  818. package/src/components/link-control/style.scss +5 -11
  819. package/src/components/link-control/test/index.js +11 -90
  820. package/src/components/list-view/block.js +49 -41
  821. package/src/components/list-view/index.js +22 -9
  822. package/src/components/list-view/use-clipboard-handler.js +199 -0
  823. package/src/components/list-view/utils.js +4 -4
  824. package/src/components/media-replace-flow/style.scss +1 -1
  825. package/src/components/media-replace-flow/test/index.js +1 -1
  826. package/src/components/navigable-toolbar/index.js +8 -4
  827. package/src/components/provider/index.js +1 -1
  828. package/src/components/responsive-block-control/index.js +3 -5
  829. package/src/components/rich-text/index.js +3 -1
  830. package/src/components/spacing-sizes-control/index.js +2 -1
  831. package/src/components/url-input/style.scss +4 -2
  832. package/src/components/url-popover/image-url-input-ui.js +22 -10
  833. package/src/components/url-popover/index.js +75 -69
  834. package/src/components/url-popover/style.scss +12 -21
  835. package/src/components/use-block-drop-zone/index.js +17 -3
  836. package/src/components/use-flash-editable-blocks/index.js +62 -0
  837. package/src/components/use-on-block-drop/index.js +11 -4
  838. package/src/components/use-settings/index.js +9 -232
  839. package/src/components/writing-flow/use-clipboard-handler.js +6 -78
  840. package/src/components/writing-flow/use-drag-selection.js +12 -3
  841. package/src/components/writing-flow/utils.js +103 -0
  842. package/src/hooks/background.js +53 -8
  843. package/src/hooks/border.js +47 -6
  844. package/src/hooks/font-size.js +33 -33
  845. package/src/hooks/style.js +5 -9
  846. package/src/hooks/test/background.js +50 -0
  847. package/src/hooks/test/font-size.js +164 -0
  848. package/src/hooks/use-bindings-attributes.js +8 -18
  849. package/src/private-apis.js +4 -0
  850. package/src/store/get-block-settings.js +225 -0
  851. package/src/store/private-actions.js +44 -2
  852. package/src/store/private-selectors.js +53 -38
  853. package/src/store/reducer.js +29 -1
  854. package/src/store/selectors.js +74 -48
  855. package/src/store/test/get-block-settings.js +90 -0
  856. package/src/store/test/private-actions.js +18 -0
  857. package/src/store/test/private-selectors.js +19 -0
  858. package/src/store/test/reducer.js +19 -0
  859. package/build/components/global-styles/effects-panel.js +0 -219
  860. package/build/components/global-styles/effects-panel.js.map +0 -1
  861. package/build/hooks/effects.js +0 -66
  862. package/build/hooks/effects.js.map +0 -1
  863. package/build-module/components/global-styles/effects-panel.js +0 -210
  864. package/build-module/components/global-styles/effects-panel.js.map +0 -1
  865. package/build-module/hooks/effects.js +0 -51
  866. package/build-module/hooks/effects.js.map +0 -1
  867. package/src/components/global-styles/effects-panel.js +0 -244
  868. package/src/components/use-settings/test/index.js +0 -141
  869. package/src/hooks/effects.js +0 -57
  870. package/src/hooks/test/effects.js +0 -39
@@ -4,6 +4,5 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.STORE_NAME = void 0;
7
- const STORE_NAME = 'core/block-editor';
8
- exports.STORE_NAME = STORE_NAME;
7
+ const STORE_NAME = exports.STORE_NAME = 'core/block-editor';
9
8
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["STORE_NAME","exports"],"sources":["@wordpress/block-editor/src/store/constants.js"],"sourcesContent":["export const STORE_NAME = 'core/block-editor';\n"],"mappings":";;;;;;AAAO,MAAMA,UAAU,GAAG,mBAAmB;AAACC,OAAA,CAAAD,UAAA,GAAAA,UAAA"}
1
+ {"version":3,"names":["STORE_NAME","exports"],"sources":["@wordpress/block-editor/src/store/constants.js"],"sourcesContent":["export const STORE_NAME = 'core/block-editor';\n"],"mappings":";;;;;;AAAO,MAAMA,UAAU,GAAAC,OAAA,CAAAD,UAAA,GAAG,mBAAmB"}
@@ -9,7 +9,7 @@ var _i18n = require("@wordpress/i18n");
9
9
  * WordPress dependencies
10
10
  */
11
11
 
12
- const PREFERENCES_DEFAULTS = {
12
+ const PREFERENCES_DEFAULTS = exports.PREFERENCES_DEFAULTS = {
13
13
  insertUsage: {}
14
14
  };
15
15
 
@@ -41,8 +41,7 @@ const PREFERENCES_DEFAULTS = {
41
41
  * @property {Array} __experimentalBlockPatternCategories Array of objects representing the block pattern categories
42
42
  * @property {boolean} __unstableGalleryWithImageBlocks Whether the user has enabled the refactored gallery block which uses InnerBlocks
43
43
  */
44
- exports.PREFERENCES_DEFAULTS = PREFERENCES_DEFAULTS;
45
- const SETTINGS_DEFAULTS = {
44
+ const SETTINGS_DEFAULTS = exports.SETTINGS_DEFAULTS = {
46
45
  alignWide: false,
47
46
  supportsLayout: true,
48
47
  // colors setting is not used anymore now defaults are passed from theme.json on the server and core has its own defaults.
@@ -253,5 +252,4 @@ const SETTINGS_DEFAULTS = {
253
252
  scripts: []
254
253
  }
255
254
  };
256
- exports.SETTINGS_DEFAULTS = SETTINGS_DEFAULTS;
257
255
  //# sourceMappingURL=defaults.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_i18n","require","PREFERENCES_DEFAULTS","insertUsage","exports","SETTINGS_DEFAULTS","alignWide","supportsLayout","colors","name","__","slug","color","fontSizes","_x","size","imageDefaultSize","imageSizes","imageEditing","maxWidth","allowedBlockTypes","maxUploadFileSize","allowedMimeTypes","canLockBlocks","enableOpenverseMediaCategory","clearBlockSelection","__experimentalCanUserUseUnfilteredHTML","__experimentalBlockDirectory","__mobileEnablePageTemplates","__experimentalBlockPatterns","__experimentalBlockPatternCategories","__unstableGalleryWithImageBlocks","__unstableIsPreviewMode","blockInspectorAnimation","animationParent","enterDirection","generateAnchors","gradients","gradient","__unstableResolvedAssets","styles","scripts"],"sources":["@wordpress/block-editor/src/store/defaults.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\n\nexport const PREFERENCES_DEFAULTS = {\n\tinsertUsage: {},\n};\n\n/**\n * The default editor settings\n *\n * @typedef {Object} SETTINGS_DEFAULT\n * @property {boolean} alignWide Enable/Disable Wide/Full Alignments\n * @property {boolean} supportsLayout Enable/disable layouts support in container blocks.\n * @property {boolean} imageEditing Image Editing settings set to false to disable.\n * @property {Array} imageSizes Available image sizes\n * @property {number} maxWidth Max width to constraint resizing\n * @property {boolean|Array} allowedBlockTypes Allowed block types\n * @property {boolean} hasFixedToolbar Whether or not the editor toolbar is fixed\n * @property {boolean} distractionFree Whether or not the editor UI is distraction free\n * @property {boolean} focusMode Whether the focus mode is enabled or not\n * @property {Array} styles Editor Styles\n * @property {boolean} keepCaretInsideBlock Whether caret should move between blocks in edit mode\n * @property {string} bodyPlaceholder Empty post placeholder\n * @property {string} titlePlaceholder Empty title placeholder\n * @property {boolean} canLockBlocks Whether the user can manage Block Lock state\n * @property {boolean} codeEditingEnabled Whether or not the user can switch to the code editor\n * @property {boolean} generateAnchors Enable/Disable auto anchor generation for Heading blocks\n * @property {boolean} enableOpenverseMediaCategory Enable/Disable the Openverse media category in the inserter.\n * @property {boolean} clearBlockSelection Whether the block editor should clear selection on mousedown when a block is not clicked.\n * @property {boolean} __experimentalCanUserUseUnfilteredHTML Whether the user should be able to use unfiltered HTML or the HTML should be filtered e.g., to remove elements considered insecure like iframes.\n * @property {boolean} __experimentalBlockDirectory Whether the user has enabled the Block Directory\n * @property {Array} __experimentalBlockPatterns Array of objects representing the block patterns\n * @property {Array} __experimentalBlockPatternCategories Array of objects representing the block pattern categories\n * @property {boolean} __unstableGalleryWithImageBlocks Whether the user has enabled the refactored gallery block which uses InnerBlocks\n */\nexport const SETTINGS_DEFAULTS = {\n\talignWide: false,\n\tsupportsLayout: true,\n\n\t// colors setting is not used anymore now defaults are passed from theme.json on the server and core has its own defaults.\n\t// The setting is only kept for backward compatibility purposes.\n\tcolors: [\n\t\t{\n\t\t\tname: __( 'Black' ),\n\t\t\tslug: 'black',\n\t\t\tcolor: '#000000',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Cyan bluish gray' ),\n\t\t\tslug: 'cyan-bluish-gray',\n\t\t\tcolor: '#abb8c3',\n\t\t},\n\t\t{\n\t\t\tname: __( 'White' ),\n\t\t\tslug: 'white',\n\t\t\tcolor: '#ffffff',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Pale pink' ),\n\t\t\tslug: 'pale-pink',\n\t\t\tcolor: '#f78da7',\n\t\t},\n\t\t{ name: __( 'Vivid red' ), slug: 'vivid-red', color: '#cf2e2e' },\n\t\t{\n\t\t\tname: __( 'Luminous vivid orange' ),\n\t\t\tslug: 'luminous-vivid-orange',\n\t\t\tcolor: '#ff6900',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Luminous vivid amber' ),\n\t\t\tslug: 'luminous-vivid-amber',\n\t\t\tcolor: '#fcb900',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Light green cyan' ),\n\t\t\tslug: 'light-green-cyan',\n\t\t\tcolor: '#7bdcb5',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Vivid green cyan' ),\n\t\t\tslug: 'vivid-green-cyan',\n\t\t\tcolor: '#00d084',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Pale cyan blue' ),\n\t\t\tslug: 'pale-cyan-blue',\n\t\t\tcolor: '#8ed1fc',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Vivid cyan blue' ),\n\t\t\tslug: 'vivid-cyan-blue',\n\t\t\tcolor: '#0693e3',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Vivid purple' ),\n\t\t\tslug: 'vivid-purple',\n\t\t\tcolor: '#9b51e0',\n\t\t},\n\t],\n\t// fontSizes setting is not used anymore now defaults are passed from theme.json on the server and core has its own defaults.\n\t// The setting is only kept for backward compatibility purposes.\n\tfontSizes: [\n\t\t{\n\t\t\tname: _x( 'Small', 'font size name' ),\n\t\t\tsize: 13,\n\t\t\tslug: 'small',\n\t\t},\n\t\t{\n\t\t\tname: _x( 'Normal', 'font size name' ),\n\t\t\tsize: 16,\n\t\t\tslug: 'normal',\n\t\t},\n\t\t{\n\t\t\tname: _x( 'Medium', 'font size name' ),\n\t\t\tsize: 20,\n\t\t\tslug: 'medium',\n\t\t},\n\t\t{\n\t\t\tname: _x( 'Large', 'font size name' ),\n\t\t\tsize: 36,\n\t\t\tslug: 'large',\n\t\t},\n\t\t{\n\t\t\tname: _x( 'Huge', 'font size name' ),\n\t\t\tsize: 42,\n\t\t\tslug: 'huge',\n\t\t},\n\t],\n\n\t// Image default size slug.\n\timageDefaultSize: 'large',\n\n\timageSizes: [\n\t\t{ slug: 'thumbnail', name: __( 'Thumbnail' ) },\n\t\t{ slug: 'medium', name: __( 'Medium' ) },\n\t\t{ slug: 'large', name: __( 'Large' ) },\n\t\t{ slug: 'full', name: __( 'Full Size' ) },\n\t],\n\n\t// Allow plugin to disable Image Editor if need be.\n\timageEditing: true,\n\n\t// This is current max width of the block inner area\n\t// It's used to constraint image resizing and this value could be overridden later by themes\n\tmaxWidth: 580,\n\n\t// Allowed block types for the editor, defaulting to true (all supported).\n\tallowedBlockTypes: true,\n\n\t// Maximum upload size in bytes allowed for the site.\n\tmaxUploadFileSize: 0,\n\n\t// List of allowed mime types and file extensions.\n\tallowedMimeTypes: null,\n\n\t// Allows to disable block locking interface.\n\tcanLockBlocks: true,\n\n\t// Allows to disable Openverse media category in the inserter.\n\tenableOpenverseMediaCategory: true,\n\n\tclearBlockSelection: true,\n\n\t__experimentalCanUserUseUnfilteredHTML: false,\n\t__experimentalBlockDirectory: false,\n\t__mobileEnablePageTemplates: false,\n\t__experimentalBlockPatterns: [],\n\t__experimentalBlockPatternCategories: [],\n\t__unstableGalleryWithImageBlocks: false,\n\t__unstableIsPreviewMode: false,\n\n\t// These settings will be completely revamped in the future.\n\t// The goal is to evolve this into an API which will instruct\n\t// the block inspector to animate transitions between what it\n\t// displays based on the relationship between the selected block\n\t// and its parent, and only enable it if the parent is controlling\n\t// its children blocks.\n\tblockInspectorAnimation: {\n\t\tanimationParent: 'core/navigation',\n\t\t'core/navigation': { enterDirection: 'leftToRight' },\n\t\t'core/navigation-submenu': { enterDirection: 'rightToLeft' },\n\t\t'core/navigation-link': { enterDirection: 'rightToLeft' },\n\t\t'core/search': { enterDirection: 'rightToLeft' },\n\t\t'core/social-links': { enterDirection: 'rightToLeft' },\n\t\t'core/page-list': { enterDirection: 'rightToLeft' },\n\t\t'core/spacer': { enterDirection: 'rightToLeft' },\n\t\t'core/home-link': { enterDirection: 'rightToLeft' },\n\t\t'core/site-title': { enterDirection: 'rightToLeft' },\n\t\t'core/site-logo': { enterDirection: 'rightToLeft' },\n\t},\n\n\tgenerateAnchors: false,\n\t// gradients setting is not used anymore now defaults are passed from theme.json on the server and core has its own defaults.\n\t// The setting is only kept for backward compatibility purposes.\n\tgradients: [\n\t\t{\n\t\t\tname: __( 'Vivid cyan blue to vivid purple' ),\n\t\t\tgradient:\n\t\t\t\t'linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)',\n\t\t\tslug: 'vivid-cyan-blue-to-vivid-purple',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Light green cyan to vivid green cyan' ),\n\t\t\tgradient:\n\t\t\t\t'linear-gradient(135deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%)',\n\t\t\tslug: 'light-green-cyan-to-vivid-green-cyan',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Luminous vivid amber to luminous vivid orange' ),\n\t\t\tgradient:\n\t\t\t\t'linear-gradient(135deg,rgba(252,185,0,1) 0%,rgba(255,105,0,1) 100%)',\n\t\t\tslug: 'luminous-vivid-amber-to-luminous-vivid-orange',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Luminous vivid orange to vivid red' ),\n\t\t\tgradient:\n\t\t\t\t'linear-gradient(135deg,rgba(255,105,0,1) 0%,rgb(207,46,46) 100%)',\n\t\t\tslug: 'luminous-vivid-orange-to-vivid-red',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Very light gray to cyan bluish gray' ),\n\t\t\tgradient:\n\t\t\t\t'linear-gradient(135deg,rgb(238,238,238) 0%,rgb(169,184,195) 100%)',\n\t\t\tslug: 'very-light-gray-to-cyan-bluish-gray',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Cool to warm spectrum' ),\n\t\t\tgradient:\n\t\t\t\t'linear-gradient(135deg,rgb(74,234,220) 0%,rgb(151,120,209) 20%,rgb(207,42,186) 40%,rgb(238,44,130) 60%,rgb(251,105,98) 80%,rgb(254,248,76) 100%)',\n\t\t\tslug: 'cool-to-warm-spectrum',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Blush light purple' ),\n\t\t\tgradient:\n\t\t\t\t'linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)',\n\t\t\tslug: 'blush-light-purple',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Blush bordeaux' ),\n\t\t\tgradient:\n\t\t\t\t'linear-gradient(135deg,rgb(254,205,165) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%)',\n\t\t\tslug: 'blush-bordeaux',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Luminous dusk' ),\n\t\t\tgradient:\n\t\t\t\t'linear-gradient(135deg,rgb(255,203,112) 0%,rgb(199,81,192) 50%,rgb(65,88,208) 100%)',\n\t\t\tslug: 'luminous-dusk',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Pale ocean' ),\n\t\t\tgradient:\n\t\t\t\t'linear-gradient(135deg,rgb(255,245,203) 0%,rgb(182,227,212) 50%,rgb(51,167,181) 100%)',\n\t\t\tslug: 'pale-ocean',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Electric grass' ),\n\t\t\tgradient:\n\t\t\t\t'linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)',\n\t\t\tslug: 'electric-grass',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Midnight' ),\n\t\t\tgradient:\n\t\t\t\t'linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)',\n\t\t\tslug: 'midnight',\n\t\t},\n\t],\n\n\t__unstableResolvedAssets: { styles: [], scripts: [] },\n};\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGO,MAAMC,oBAAoB,GAAG;EACnCC,WAAW,EAAE,CAAC;AACf,CAAC;;AAED;AACA;AACA;AACA;AACA;A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Q,EACP,uFAAuF;IACxF3B,IAAI,EAAE;EACP,CAAC,EACD;IACCF,IAAI,EAAE,IAAAC,QAAE,EAAE,gBAAiB,CAAC;IAC5B4B,QAAQ,EACP,mEAAmE;IACpE3B,IAAI,EAAE;EACP,CAAC,EACD;IACCF,IAAI,EAAE,IAAAC,QAAE,EAAE,UAAW,CAAC;IACtB4B,QAAQ,EACP,8DAA8D;IAC/D3B,IAAI,EAAE;EACP,CAAC,CACD;EAED4B,wBAAwB,EAAE;IAAEC,MAAM,EAAE,EAAE;IAAEC,OAAO,EAAE;EAAG;AACrD,CAAC;AAACrC,OAAA,CAAAC,iBAAA,GAAAA,iBAAA"}
1
+ {"version":3,"names":["_i18n","require","PREFERENCES_DEFAULTS","exports","insertUsage","SETTINGS_DEFAULTS","alignWide","supportsLayout","colors","name","__","slug","color","fontSizes","_x","size","imageDefaultSize","imageSizes","imageEditing","maxWidth","allowedBlockTypes","maxUploadFileSize","allowedMimeTypes","canLockBlocks","enableOpenverseMediaCategory","clearBlockSelection","__experimentalCanUserUseUnfilteredHTML","__experimentalBlockDirectory","__mobileEnablePageTemplates","__experimentalBlockPatterns","__experimentalBlockPatternCategories","__unstableGalleryWithImageBlocks","__unstableIsPreviewMode","blockInspectorAnimation","animationParent","enterDirection","generateAnchors","gradients","gradient","__unstableResolvedAssets","styles","scripts"],"sources":["@wordpress/block-editor/src/store/defaults.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\n\nexport const PREFERENCES_DEFAULTS = {\n\tinsertUsage: {},\n};\n\n/**\n * The default editor settings\n *\n * @typedef {Object} SETTINGS_DEFAULT\n * @property {boolean} alignWide Enable/Disable Wide/Full Alignments\n * @property {boolean} supportsLayout Enable/disable layouts support in container blocks.\n * @property {boolean} imageEditing Image Editing settings set to false to disable.\n * @property {Array} imageSizes Available image sizes\n * @property {number} maxWidth Max width to constraint resizing\n * @property {boolean|Array} allowedBlockTypes Allowed block types\n * @property {boolean} hasFixedToolbar Whether or not the editor toolbar is fixed\n * @property {boolean} distractionFree Whether or not the editor UI is distraction free\n * @property {boolean} focusMode Whether the focus mode is enabled or not\n * @property {Array} styles Editor Styles\n * @property {boolean} keepCaretInsideBlock Whether caret should move between blocks in edit mode\n * @property {string} bodyPlaceholder Empty post placeholder\n * @property {string} titlePlaceholder Empty title placeholder\n * @property {boolean} canLockBlocks Whether the user can manage Block Lock state\n * @property {boolean} codeEditingEnabled Whether or not the user can switch to the code editor\n * @property {boolean} generateAnchors Enable/Disable auto anchor generation for Heading blocks\n * @property {boolean} enableOpenverseMediaCategory Enable/Disable the Openverse media category in the inserter.\n * @property {boolean} clearBlockSelection Whether the block editor should clear selection on mousedown when a block is not clicked.\n * @property {boolean} __experimentalCanUserUseUnfilteredHTML Whether the user should be able to use unfiltered HTML or the HTML should be filtered e.g., to remove elements considered insecure like iframes.\n * @property {boolean} __experimentalBlockDirectory Whether the user has enabled the Block Directory\n * @property {Array} __experimentalBlockPatterns Array of objects representing the block patterns\n * @property {Array} __experimentalBlockPatternCategories Array of objects representing the block pattern categories\n * @property {boolean} __unstableGalleryWithImageBlocks Whether the user has enabled the refactored gallery block which uses InnerBlocks\n */\nexport const SETTINGS_DEFAULTS = {\n\talignWide: false,\n\tsupportsLayout: true,\n\n\t// colors setting is not used anymore now defaults are passed from theme.json on the server and core has its own defaults.\n\t// The setting is only kept for backward compatibility purposes.\n\tcolors: [\n\t\t{\n\t\t\tname: __( 'Black' ),\n\t\t\tslug: 'black',\n\t\t\tcolor: '#000000',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Cyan bluish gray' ),\n\t\t\tslug: 'cyan-bluish-gray',\n\t\t\tcolor: '#abb8c3',\n\t\t},\n\t\t{\n\t\t\tname: __( 'White' ),\n\t\t\tslug: 'white',\n\t\t\tcolor: '#ffffff',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Pale pink' ),\n\t\t\tslug: 'pale-pink',\n\t\t\tcolor: '#f78da7',\n\t\t},\n\t\t{ name: __( 'Vivid red' ), slug: 'vivid-red', color: '#cf2e2e' },\n\t\t{\n\t\t\tname: __( 'Luminous vivid orange' ),\n\t\t\tslug: 'luminous-vivid-orange',\n\t\t\tcolor: '#ff6900',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Luminous vivid amber' ),\n\t\t\tslug: 'luminous-vivid-amber',\n\t\t\tcolor: '#fcb900',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Light green cyan' ),\n\t\t\tslug: 'light-green-cyan',\n\t\t\tcolor: '#7bdcb5',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Vivid green cyan' ),\n\t\t\tslug: 'vivid-green-cyan',\n\t\t\tcolor: '#00d084',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Pale cyan blue' ),\n\t\t\tslug: 'pale-cyan-blue',\n\t\t\tcolor: '#8ed1fc',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Vivid cyan blue' ),\n\t\t\tslug: 'vivid-cyan-blue',\n\t\t\tcolor: '#0693e3',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Vivid purple' ),\n\t\t\tslug: 'vivid-purple',\n\t\t\tcolor: '#9b51e0',\n\t\t},\n\t],\n\t// fontSizes setting is not used anymore now defaults are passed from theme.json on the server and core has its own defaults.\n\t// The setting is only kept for backward compatibility purposes.\n\tfontSizes: [\n\t\t{\n\t\t\tname: _x( 'Small', 'font size name' ),\n\t\t\tsize: 13,\n\t\t\tslug: 'small',\n\t\t},\n\t\t{\n\t\t\tname: _x( 'Normal', 'font size name' ),\n\t\t\tsize: 16,\n\t\t\tslug: 'normal',\n\t\t},\n\t\t{\n\t\t\tname: _x( 'Medium', 'font size name' ),\n\t\t\tsize: 20,\n\t\t\tslug: 'medium',\n\t\t},\n\t\t{\n\t\t\tname: _x( 'Large', 'font size name' ),\n\t\t\tsize: 36,\n\t\t\tslug: 'large',\n\t\t},\n\t\t{\n\t\t\tname: _x( 'Huge', 'font size name' ),\n\t\t\tsize: 42,\n\t\t\tslug: 'huge',\n\t\t},\n\t],\n\n\t// Image default size slug.\n\timageDefaultSize: 'large',\n\n\timageSizes: [\n\t\t{ slug: 'thumbnail', name: __( 'Thumbnail' ) },\n\t\t{ slug: 'medium', name: __( 'Medium' ) },\n\t\t{ slug: 'large', name: __( 'Large' ) },\n\t\t{ slug: 'full', name: __( 'Full Size' ) },\n\t],\n\n\t// Allow plugin to disable Image Editor if need be.\n\timageEditing: true,\n\n\t// This is current max width of the block inner area\n\t// It's used to constraint image resizing and this value could be overridden later by themes\n\tmaxWidth: 580,\n\n\t// Allowed block types for the editor, defaulting to true (all supported).\n\tallowedBlockTypes: true,\n\n\t// Maximum upload size in bytes allowed for the site.\n\tmaxUploadFileSize: 0,\n\n\t// List of allowed mime types and file extensions.\n\tallowedMimeTypes: null,\n\n\t// Allows to disable block locking interface.\n\tcanLockBlocks: true,\n\n\t// Allows to disable Openverse media category in the inserter.\n\tenableOpenverseMediaCategory: true,\n\n\tclearBlockSelection: true,\n\n\t__experimentalCanUserUseUnfilteredHTML: false,\n\t__experimentalBlockDirectory: false,\n\t__mobileEnablePageTemplates: false,\n\t__experimentalBlockPatterns: [],\n\t__experimentalBlockPatternCategories: [],\n\t__unstableGalleryWithImageBlocks: false,\n\t__unstableIsPreviewMode: false,\n\n\t// These settings will be completely revamped in the future.\n\t// The goal is to evolve this into an API which will instruct\n\t// the block inspector to animate transitions between what it\n\t// displays based on the relationship between the selected block\n\t// and its parent, and only enable it if the parent is controlling\n\t// its children blocks.\n\tblockInspectorAnimation: {\n\t\tanimationParent: 'core/navigation',\n\t\t'core/navigation': { enterDirection: 'leftToRight' },\n\t\t'core/navigation-submenu': { enterDirection: 'rightToLeft' },\n\t\t'core/navigation-link': { enterDirection: 'rightToLeft' },\n\t\t'core/search': { enterDirection: 'rightToLeft' },\n\t\t'core/social-links': { enterDirection: 'rightToLeft' },\n\t\t'core/page-list': { enterDirection: 'rightToLeft' },\n\t\t'core/spacer': { enterDirection: 'rightToLeft' },\n\t\t'core/home-link': { enterDirection: 'rightToLeft' },\n\t\t'core/site-title': { enterDirection: 'rightToLeft' },\n\t\t'core/site-logo': { enterDirection: 'rightToLeft' },\n\t},\n\n\tgenerateAnchors: false,\n\t// gradients setting is not used anymore now defaults are passed from theme.json on the server and core has its own defaults.\n\t// The setting is only kept for backward compatibility purposes.\n\tgradients: [\n\t\t{\n\t\t\tname: __( 'Vivid cyan blue to vivid purple' ),\n\t\t\tgradient:\n\t\t\t\t'linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)',\n\t\t\tslug: 'vivid-cyan-blue-to-vivid-purple',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Light green cyan to vivid green cyan' ),\n\t\t\tgradient:\n\t\t\t\t'linear-gradient(135deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%)',\n\t\t\tslug: 'light-green-cyan-to-vivid-green-cyan',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Luminous vivid amber to luminous vivid orange' ),\n\t\t\tgradient:\n\t\t\t\t'linear-gradient(135deg,rgba(252,185,0,1) 0%,rgba(255,105,0,1) 100%)',\n\t\t\tslug: 'luminous-vivid-amber-to-luminous-vivid-orange',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Luminous vivid orange to vivid red' ),\n\t\t\tgradient:\n\t\t\t\t'linear-gradient(135deg,rgba(255,105,0,1) 0%,rgb(207,46,46) 100%)',\n\t\t\tslug: 'luminous-vivid-orange-to-vivid-red',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Very light gray to cyan bluish gray' ),\n\t\t\tgradient:\n\t\t\t\t'linear-gradient(135deg,rgb(238,238,238) 0%,rgb(169,184,195) 100%)',\n\t\t\tslug: 'very-light-gray-to-cyan-bluish-gray',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Cool to warm spectrum' ),\n\t\t\tgradient:\n\t\t\t\t'linear-gradient(135deg,rgb(74,234,220) 0%,rgb(151,120,209) 20%,rgb(207,42,186) 40%,rgb(238,44,130) 60%,rgb(251,105,98) 80%,rgb(254,248,76) 100%)',\n\t\t\tslug: 'cool-to-warm-spectrum',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Blush light purple' ),\n\t\t\tgradient:\n\t\t\t\t'linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)',\n\t\t\tslug: 'blush-light-purple',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Blush bordeaux' ),\n\t\t\tgradient:\n\t\t\t\t'linear-gradient(135deg,rgb(254,205,165) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%)',\n\t\t\tslug: 'blush-bordeaux',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Luminous dusk' ),\n\t\t\tgradient:\n\t\t\t\t'linear-gradient(135deg,rgb(255,203,112) 0%,rgb(199,81,192) 50%,rgb(65,88,208) 100%)',\n\t\t\tslug: 'luminous-dusk',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Pale ocean' ),\n\t\t\tgradient:\n\t\t\t\t'linear-gradient(135deg,rgb(255,245,203) 0%,rgb(182,227,212) 50%,rgb(51,167,181) 100%)',\n\t\t\tslug: 'pale-ocean',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Electric grass' ),\n\t\t\tgradient:\n\t\t\t\t'linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)',\n\t\t\tslug: 'electric-grass',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Midnight' ),\n\t\t\tgradient:\n\t\t\t\t'linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)',\n\t\t\tslug: 'midnight',\n\t\t},\n\t],\n\n\t__unstableResolvedAssets: { styles: [], scripts: [] },\n};\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGO,MAAMC,oBAAoB,GAAAC,OAAA,CAAAD,oBAAA,GAAG;EACnCE,WAAW,EAAE,CAAC;AACf,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;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AAI,EAAE;EACP,CAAC,EACD;IACCF,IAAI,EAAE,IAAAC,QAAE,EAAE,gBAAiB,CAAC;IAC5B4B,QAAQ,EACP,mEAAmE;IACpE3B,IAAI,EAAE;EACP,CAAC,EACD;IACCF,IAAI,EAAE,IAAAC,QAAE,EAAE,UAAW,CAAC;IACtB4B,QAAQ,EACP,8DAA8D;IAC/D3B,IAAI,EAAE;EACP,CAAC,CACD;EAED4B,wBAAwB,EAAE;IAAEC,MAAM,EAAE,EAAE;IAAEC,OAAO,EAAE;EAAG;AACrD,CAAC"}
@@ -15,7 +15,7 @@ var _defaults = require("./defaults.js");
15
15
  * Internal dependencies
16
16
  */
17
17
 
18
- const SETTINGS_DEFAULTS = {
18
+ const SETTINGS_DEFAULTS = exports.SETTINGS_DEFAULTS = {
19
19
  ..._defaults.SETTINGS_DEFAULTS,
20
20
  // Don't add the default font sizes for standard themes
21
21
  fontSizes: undefined,
@@ -31,5 +31,4 @@ const SETTINGS_DEFAULTS = {
31
31
  }
32
32
  }
33
33
  };
34
- exports.SETTINGS_DEFAULTS = SETTINGS_DEFAULTS;
35
34
  //# sourceMappingURL=defaults.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_defaults","require","SETTINGS_DEFAULTS","SETTINGS","fontSizes","undefined","__unstableGalleryWithImageBlocks","__DEV__","alignWide","supportsLayout","__experimentalFeatures","color","text","background","exports"],"sources":["@wordpress/block-editor/src/store/defaults.native.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport {\n\tPREFERENCES_DEFAULTS,\n\tSETTINGS_DEFAULTS as SETTINGS,\n} from './defaults.js';\n\nconst SETTINGS_DEFAULTS = {\n\t...SETTINGS,\n\t// Don't add the default font sizes for standard themes\n\tfontSizes: undefined,\n\t// FOR TESTING ONLY - Later, this will come from a REST API\n\t// eslint-disable-next-line no-undef\n\t__unstableGalleryWithImageBlocks: __DEV__,\n\talignWide: true,\n\tsupportsLayout: false,\n\t__experimentalFeatures: {\n\t\tcolor: {\n\t\t\ttext: true,\n\t\t\tbackground: true,\n\t\t},\n\t},\n};\n\nexport { PREFERENCES_DEFAULTS, SETTINGS_DEFAULTS };\n"],"mappings":";;;;;;;;;;;;AAGA,IAAAA,SAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAMA,MAAMC,iBAAiB,GAAG;EACzB,GAAGC,2BAAQ;EACX;EACAC,SAAS,EAAEC,SAAS;EACpB;EACA;EACAC,gCAAgC,EAAEC,OAAO;EACzCC,SAAS,EAAE,IAAI;EACfC,cAAc,EAAE,KAAK;EACrBC,sBAAsB,EAAE;IACvBC,KAAK,EAAE;MACNC,IAAI,EAAE,IAAI;MACVC,UAAU,EAAE;IACb;EACD;AACD,CAAC;AAACC,OAAA,CAAAZ,iBAAA,GAAAA,iBAAA"}
1
+ {"version":3,"names":["_defaults","require","SETTINGS_DEFAULTS","exports","SETTINGS","fontSizes","undefined","__unstableGalleryWithImageBlocks","__DEV__","alignWide","supportsLayout","__experimentalFeatures","color","text","background"],"sources":["@wordpress/block-editor/src/store/defaults.native.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport {\n\tPREFERENCES_DEFAULTS,\n\tSETTINGS_DEFAULTS as SETTINGS,\n} from './defaults.js';\n\nconst SETTINGS_DEFAULTS = {\n\t...SETTINGS,\n\t// Don't add the default font sizes for standard themes\n\tfontSizes: undefined,\n\t// FOR TESTING ONLY - Later, this will come from a REST API\n\t// eslint-disable-next-line no-undef\n\t__unstableGalleryWithImageBlocks: __DEV__,\n\talignWide: true,\n\tsupportsLayout: false,\n\t__experimentalFeatures: {\n\t\tcolor: {\n\t\t\ttext: true,\n\t\t\tbackground: true,\n\t\t},\n\t},\n};\n\nexport { PREFERENCES_DEFAULTS, SETTINGS_DEFAULTS };\n"],"mappings":";;;;;;;;;;;;AAGA,IAAAA,SAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAMA,MAAMC,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,GAAG;EACzB,GAAGE,2BAAQ;EACX;EACAC,SAAS,EAAEC,SAAS;EACpB;EACA;EACAC,gCAAgC,EAAEC,OAAO;EACzCC,SAAS,EAAE,IAAI;EACfC,cAAc,EAAE,KAAK;EACrBC,sBAAsB,EAAE;IACvBC,KAAK,EAAE;MACNC,IAAI,EAAE,IAAI;MACVC,UAAU,EAAE;IACb;EACD;AACD,CAAC"}
@@ -0,0 +1,180 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getBlockSettings = getBlockSettings;
7
+ exports.hasMergedOrigins = hasMergedOrigins;
8
+ exports.mergeOrigins = mergeOrigins;
9
+ var _blocks = require("@wordpress/blocks");
10
+ var _hooks = require("@wordpress/hooks");
11
+ var _object = require("../utils/object");
12
+ var _selectors = require("./selectors");
13
+ /**
14
+ * WordPress dependencies
15
+ */
16
+
17
+ /**
18
+ * Internal dependencies
19
+ */
20
+
21
+ const blockedPaths = ['color', 'border', 'dimensions', 'typography', 'spacing'];
22
+ const deprecatedFlags = {
23
+ 'color.palette': settings => settings.colors,
24
+ 'color.gradients': settings => settings.gradients,
25
+ 'color.custom': settings => settings.disableCustomColors === undefined ? undefined : !settings.disableCustomColors,
26
+ 'color.customGradient': settings => settings.disableCustomGradients === undefined ? undefined : !settings.disableCustomGradients,
27
+ 'typography.fontSizes': settings => settings.fontSizes,
28
+ 'typography.customFontSize': settings => settings.disableCustomFontSizes === undefined ? undefined : !settings.disableCustomFontSizes,
29
+ 'typography.lineHeight': settings => settings.enableCustomLineHeight,
30
+ 'spacing.units': settings => {
31
+ if (settings.enableCustomUnits === undefined) {
32
+ return;
33
+ }
34
+ if (settings.enableCustomUnits === true) {
35
+ return ['px', 'em', 'rem', 'vh', 'vw', '%'];
36
+ }
37
+ return settings.enableCustomUnits;
38
+ },
39
+ 'spacing.padding': settings => settings.enableCustomSpacing
40
+ };
41
+ const prefixedFlags = {
42
+ /*
43
+ * These were only available in the plugin
44
+ * and can be removed when the minimum WordPress version
45
+ * for the plugin is 5.9.
46
+ */
47
+ 'border.customColor': 'border.color',
48
+ 'border.customStyle': 'border.style',
49
+ 'border.customWidth': 'border.width',
50
+ 'typography.customFontStyle': 'typography.fontStyle',
51
+ 'typography.customFontWeight': 'typography.fontWeight',
52
+ 'typography.customLetterSpacing': 'typography.letterSpacing',
53
+ 'typography.customTextDecorations': 'typography.textDecoration',
54
+ 'typography.customTextTransforms': 'typography.textTransform',
55
+ /*
56
+ * These were part of WordPress 5.8 and we need to keep them.
57
+ */
58
+ 'border.customRadius': 'border.radius',
59
+ 'spacing.customMargin': 'spacing.margin',
60
+ 'spacing.customPadding': 'spacing.padding',
61
+ 'typography.customLineHeight': 'typography.lineHeight'
62
+ };
63
+
64
+ /**
65
+ * Remove `custom` prefixes for flags that did not land in 5.8.
66
+ *
67
+ * This provides continued support for `custom` prefixed properties. It will
68
+ * be removed once third party devs have had sufficient time to update themes,
69
+ * plugins, etc.
70
+ *
71
+ * @see https://github.com/WordPress/gutenberg/pull/34485
72
+ *
73
+ * @param {string} path Path to desired value in settings.
74
+ * @return {string} The value for defined setting.
75
+ */
76
+ const removeCustomPrefixes = path => {
77
+ return prefixedFlags[path] || path;
78
+ };
79
+
80
+ /**
81
+ * For settings like `color.palette`, which have a value that is an object
82
+ * with `default`, `theme`, `custom`, with field values that are arrays of
83
+ * items, merge these three arrays into one and return it. The calculation
84
+ * is memoized so that identical input values produce identical output.
85
+ * @param {Object} value Object to merge
86
+ * @return {Array} Array of merged items
87
+ */
88
+ function mergeOrigins(value) {
89
+ let result = mergeCache.get(value);
90
+ if (!result) {
91
+ result = ['default', 'theme', 'custom'].flatMap(key => {
92
+ var _value$key;
93
+ return (_value$key = value[key]) !== null && _value$key !== void 0 ? _value$key : [];
94
+ });
95
+ mergeCache.set(value, result);
96
+ }
97
+ return result;
98
+ }
99
+ const mergeCache = new WeakMap();
100
+
101
+ /**
102
+ * For settings like `color.palette`, which have a value that is an object
103
+ * with `default`, `theme`, `custom`, with field values that are arrays of
104
+ * items, see if any of the three origins have values.
105
+ *
106
+ * @param {Object} value Object to check
107
+ * @return {boolean} Whether the object has values in any of the three origins
108
+ */
109
+ function hasMergedOrigins(value) {
110
+ return ['default', 'theme', 'custom'].some(key => value?.[key]?.length);
111
+ }
112
+ function getBlockSettings(state, clientId, ...paths) {
113
+ const blockName = (0, _selectors.getBlockName)(state, clientId);
114
+ const candidates = [];
115
+ if (clientId) {
116
+ let id = clientId;
117
+ do {
118
+ const name = (0, _selectors.getBlockName)(state, id);
119
+ if ((0, _blocks.hasBlockSupport)(name, '__experimentalSettings', false)) {
120
+ candidates.push(id);
121
+ }
122
+ } while (id = state.blocks.parents.get(id));
123
+ }
124
+ return paths.map(path => {
125
+ if (blockedPaths.includes(path)) {
126
+ // eslint-disable-next-line no-console
127
+ console.warn('Top level useSetting paths are disabled. Please use a subpath to query the information needed.');
128
+ return undefined;
129
+ }
130
+
131
+ // 0. Allow third parties to filter the block's settings at runtime.
132
+ let result = (0, _hooks.applyFilters)('blockEditor.useSetting.before', undefined, path, clientId, blockName);
133
+ if (undefined !== result) {
134
+ return result;
135
+ }
136
+ const normalizedPath = removeCustomPrefixes(path);
137
+
138
+ // 1. Take settings from the block instance or its ancestors.
139
+ // Start from the current block and work our way up the ancestors.
140
+ for (const candidateClientId of candidates) {
141
+ var _getValueFromObjectPa;
142
+ const candidateAtts = (0, _selectors.getBlockAttributes)(state, candidateClientId);
143
+ result = (_getValueFromObjectPa = (0, _object.getValueFromObjectPath)(candidateAtts.settings?.blocks?.[blockName], normalizedPath)) !== null && _getValueFromObjectPa !== void 0 ? _getValueFromObjectPa : (0, _object.getValueFromObjectPath)(candidateAtts.settings, normalizedPath);
144
+ if (result !== undefined) {
145
+ // Stop the search for more distant ancestors and move on.
146
+ break;
147
+ }
148
+ }
149
+
150
+ // 2. Fall back to the settings from the block editor store (__experimentalFeatures).
151
+ const settings = (0, _selectors.getSettings)(state);
152
+ if (result === undefined && blockName) {
153
+ result = (0, _object.getValueFromObjectPath)(settings.__experimentalFeatures?.blocks?.[blockName], normalizedPath);
154
+ }
155
+ if (result === undefined) {
156
+ result = (0, _object.getValueFromObjectPath)(settings.__experimentalFeatures, normalizedPath);
157
+ }
158
+
159
+ // Return if the setting was found in either the block instance or the store.
160
+ if (result !== undefined) {
161
+ if (_blocks.__EXPERIMENTAL_PATHS_WITH_MERGE[normalizedPath]) {
162
+ return mergeOrigins(result);
163
+ }
164
+ return result;
165
+ }
166
+
167
+ // 3. Otherwise, use deprecated settings.
168
+ const deprecatedSettingsValue = deprecatedFlags[normalizedPath]?.(settings);
169
+ if (deprecatedSettingsValue !== undefined) {
170
+ return deprecatedSettingsValue;
171
+ }
172
+
173
+ // 4. Fallback for typography.dropCap:
174
+ // This is only necessary to support typography.dropCap.
175
+ // when __experimentalFeatures are not present (core without plugin).
176
+ // To remove when __experimentalFeatures are ported to core.
177
+ return normalizedPath === 'typography.dropCap' ? true : undefined;
178
+ });
179
+ }
180
+ //# sourceMappingURL=get-block-settings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_blocks","require","_hooks","_object","_selectors","blockedPaths","deprecatedFlags","settings","colors","gradients","disableCustomColors","undefined","disableCustomGradients","fontSizes","disableCustomFontSizes","enableCustomLineHeight","enableCustomUnits","enableCustomSpacing","prefixedFlags","removeCustomPrefixes","path","mergeOrigins","value","result","mergeCache","get","flatMap","key","_value$key","set","WeakMap","hasMergedOrigins","some","length","getBlockSettings","state","clientId","paths","blockName","getBlockName","candidates","id","name","hasBlockSupport","push","blocks","parents","map","includes","console","warn","applyFilters","normalizedPath","candidateClientId","_getValueFromObjectPa","candidateAtts","getBlockAttributes","getValueFromObjectPath","getSettings","__experimentalFeatures","PATHS_WITH_MERGE","deprecatedSettingsValue"],"sources":["@wordpress/block-editor/src/store/get-block-settings.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__EXPERIMENTAL_PATHS_WITH_MERGE as PATHS_WITH_MERGE,\n\thasBlockSupport,\n} from '@wordpress/blocks';\nimport { applyFilters } from '@wordpress/hooks';\n\n/**\n * Internal dependencies\n */\nimport { getValueFromObjectPath } from '../utils/object';\nimport { getBlockName, getSettings, getBlockAttributes } from './selectors';\n\nconst blockedPaths = [\n\t'color',\n\t'border',\n\t'dimensions',\n\t'typography',\n\t'spacing',\n];\n\nconst deprecatedFlags = {\n\t'color.palette': ( settings ) => settings.colors,\n\t'color.gradients': ( settings ) => settings.gradients,\n\t'color.custom': ( settings ) =>\n\t\tsettings.disableCustomColors === undefined\n\t\t\t? undefined\n\t\t\t: ! settings.disableCustomColors,\n\t'color.customGradient': ( settings ) =>\n\t\tsettings.disableCustomGradients === undefined\n\t\t\t? undefined\n\t\t\t: ! settings.disableCustomGradients,\n\t'typography.fontSizes': ( settings ) => settings.fontSizes,\n\t'typography.customFontSize': ( settings ) =>\n\t\tsettings.disableCustomFontSizes === undefined\n\t\t\t? undefined\n\t\t\t: ! settings.disableCustomFontSizes,\n\t'typography.lineHeight': ( settings ) => settings.enableCustomLineHeight,\n\t'spacing.units': ( settings ) => {\n\t\tif ( settings.enableCustomUnits === undefined ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( settings.enableCustomUnits === true ) {\n\t\t\treturn [ 'px', 'em', 'rem', 'vh', 'vw', '%' ];\n\t\t}\n\n\t\treturn settings.enableCustomUnits;\n\t},\n\t'spacing.padding': ( settings ) => settings.enableCustomSpacing,\n};\n\nconst prefixedFlags = {\n\t/*\n\t * These were only available in the plugin\n\t * and can be removed when the minimum WordPress version\n\t * for the plugin is 5.9.\n\t */\n\t'border.customColor': 'border.color',\n\t'border.customStyle': 'border.style',\n\t'border.customWidth': 'border.width',\n\t'typography.customFontStyle': 'typography.fontStyle',\n\t'typography.customFontWeight': 'typography.fontWeight',\n\t'typography.customLetterSpacing': 'typography.letterSpacing',\n\t'typography.customTextDecorations': 'typography.textDecoration',\n\t'typography.customTextTransforms': 'typography.textTransform',\n\t/*\n\t * These were part of WordPress 5.8 and we need to keep them.\n\t */\n\t'border.customRadius': 'border.radius',\n\t'spacing.customMargin': 'spacing.margin',\n\t'spacing.customPadding': 'spacing.padding',\n\t'typography.customLineHeight': 'typography.lineHeight',\n};\n\n/**\n * Remove `custom` prefixes for flags that did not land in 5.8.\n *\n * This provides continued support for `custom` prefixed properties. It will\n * be removed once third party devs have had sufficient time to update themes,\n * plugins, etc.\n *\n * @see https://github.com/WordPress/gutenberg/pull/34485\n *\n * @param {string} path Path to desired value in settings.\n * @return {string} The value for defined setting.\n */\nconst removeCustomPrefixes = ( path ) => {\n\treturn prefixedFlags[ path ] || path;\n};\n\n/**\n * For settings like `color.palette`, which have a value that is an object\n * with `default`, `theme`, `custom`, with field values that are arrays of\n * items, merge these three arrays into one and return it. The calculation\n * is memoized so that identical input values produce identical output.\n * @param {Object} value Object to merge\n * @return {Array} Array of merged items\n */\nexport function mergeOrigins( value ) {\n\tlet result = mergeCache.get( value );\n\tif ( ! result ) {\n\t\tresult = [ 'default', 'theme', 'custom' ].flatMap(\n\t\t\t( key ) => value[ key ] ?? []\n\t\t);\n\t\tmergeCache.set( value, result );\n\t}\n\treturn result;\n}\nconst mergeCache = new WeakMap();\n\n/**\n * For settings like `color.palette`, which have a value that is an object\n * with `default`, `theme`, `custom`, with field values that are arrays of\n * items, see if any of the three origins have values.\n *\n * @param {Object} value Object to check\n * @return {boolean} Whether the object has values in any of the three origins\n */\nexport function hasMergedOrigins( value ) {\n\treturn [ 'default', 'theme', 'custom' ].some(\n\t\t( key ) => value?.[ key ]?.length\n\t);\n}\n\nexport function getBlockSettings( state, clientId, ...paths ) {\n\tconst blockName = getBlockName( state, clientId );\n\tconst candidates = [];\n\n\tif ( clientId ) {\n\t\tlet id = clientId;\n\t\tdo {\n\t\t\tconst name = getBlockName( state, id );\n\t\t\tif ( hasBlockSupport( name, '__experimentalSettings', false ) ) {\n\t\t\t\tcandidates.push( id );\n\t\t\t}\n\t\t} while ( ( id = state.blocks.parents.get( id ) ) );\n\t}\n\n\treturn paths.map( ( path ) => {\n\t\tif ( blockedPaths.includes( path ) ) {\n\t\t\t// eslint-disable-next-line no-console\n\t\t\tconsole.warn(\n\t\t\t\t'Top level useSetting paths are disabled. Please use a subpath to query the information needed.'\n\t\t\t);\n\t\t\treturn undefined;\n\t\t}\n\n\t\t// 0. Allow third parties to filter the block's settings at runtime.\n\t\tlet result = applyFilters(\n\t\t\t'blockEditor.useSetting.before',\n\t\t\tundefined,\n\t\t\tpath,\n\t\t\tclientId,\n\t\t\tblockName\n\t\t);\n\n\t\tif ( undefined !== result ) {\n\t\t\treturn result;\n\t\t}\n\n\t\tconst normalizedPath = removeCustomPrefixes( path );\n\n\t\t// 1. Take settings from the block instance or its ancestors.\n\t\t// Start from the current block and work our way up the ancestors.\n\t\tfor ( const candidateClientId of candidates ) {\n\t\t\tconst candidateAtts = getBlockAttributes(\n\t\t\t\tstate,\n\t\t\t\tcandidateClientId\n\t\t\t);\n\t\t\tresult =\n\t\t\t\tgetValueFromObjectPath(\n\t\t\t\t\tcandidateAtts.settings?.blocks?.[ blockName ],\n\t\t\t\t\tnormalizedPath\n\t\t\t\t) ??\n\t\t\t\tgetValueFromObjectPath(\n\t\t\t\t\tcandidateAtts.settings,\n\t\t\t\t\tnormalizedPath\n\t\t\t\t);\n\t\t\tif ( result !== undefined ) {\n\t\t\t\t// Stop the search for more distant ancestors and move on.\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// 2. Fall back to the settings from the block editor store (__experimentalFeatures).\n\t\tconst settings = getSettings( state );\n\t\tif ( result === undefined && blockName ) {\n\t\t\tresult = getValueFromObjectPath(\n\t\t\t\tsettings.__experimentalFeatures?.blocks?.[ blockName ],\n\t\t\t\tnormalizedPath\n\t\t\t);\n\t\t}\n\n\t\tif ( result === undefined ) {\n\t\t\tresult = getValueFromObjectPath(\n\t\t\t\tsettings.__experimentalFeatures,\n\t\t\t\tnormalizedPath\n\t\t\t);\n\t\t}\n\n\t\t// Return if the setting was found in either the block instance or the store.\n\t\tif ( result !== undefined ) {\n\t\t\tif ( PATHS_WITH_MERGE[ normalizedPath ] ) {\n\t\t\t\treturn mergeOrigins( result );\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\n\t\t// 3. Otherwise, use deprecated settings.\n\t\tconst deprecatedSettingsValue =\n\t\t\tdeprecatedFlags[ normalizedPath ]?.( settings );\n\t\tif ( deprecatedSettingsValue !== undefined ) {\n\t\t\treturn deprecatedSettingsValue;\n\t\t}\n\n\t\t// 4. Fallback for typography.dropCap:\n\t\t// This is only necessary to support typography.dropCap.\n\t\t// when __experimentalFeatures are not present (core without plugin).\n\t\t// To remove when __experimentalFeatures are ported to core.\n\t\treturn normalizedPath === 'typography.dropCap' ? true : undefined;\n\t} );\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AAIA,IAAAC,MAAA,GAAAD,OAAA;AAKA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AAbA;AACA;AACA;;AAOA;AACA;AACA;;AAIA,MAAMI,YAAY,GAAG,CACpB,OAAO,EACP,QAAQ,EACR,YAAY,EACZ,YAAY,EACZ,SAAS,CACT;AAED,MAAMC,eAAe,GAAG;EACvB,eAAe,EAAIC,QAAQ,IAAMA,QAAQ,CAACC,MAAM;EAChD,iBAAiB,EAAID,QAAQ,IAAMA,QAAQ,CAACE,SAAS;EACrD,cAAc,EAAIF,QAAQ,IACzBA,QAAQ,CAACG,mBAAmB,KAAKC,SAAS,GACvCA,SAAS,GACT,CAAEJ,QAAQ,CAACG,mBAAmB;EAClC,sBAAsB,EAAIH,QAAQ,IACjCA,QAAQ,CAACK,sBAAsB,KAAKD,SAAS,GAC1CA,SAAS,GACT,CAAEJ,QAAQ,CAACK,sBAAsB;EACrC,sBAAsB,EAAIL,QAAQ,IAAMA,QAAQ,CAACM,SAAS;EAC1D,2BAA2B,EAAIN,QAAQ,IACtCA,QAAQ,CAACO,sBAAsB,KAAKH,SAAS,GAC1CA,SAAS,GACT,CAAEJ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CAAC;MAC9B;MACA,OAAOA,MAAM;IACd;;IAEA;IACA,MAAMsC,uBAAuB,GAC5BvD,eAAe,CAAE8C,cAAc,CAAE,GAAI7C,QAAS,CAAC;IAChD,IAAKsD,uBAAuB,KAAKlD,SAAS,EAAG;MAC5C,OAAOkD,uBAAuB;IAC/B;;IAEA;IACA;IACA;IACA;IACA,OAAOT,cAAc,KAAK,oBAAoB,GAAG,IAAI,GAAGzC,SAAS;EAClE,CAAE,CAAC;AACJ"}
@@ -14,8 +14,8 @@ var resolvers = _interopRequireWildcard(require("./resolvers"));
14
14
  var actions = _interopRequireWildcard(require("./actions"));
15
15
  var _constants = require("./constants");
16
16
  var _lockUnlock = require("../lock-unlock");
17
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
18
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
17
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
18
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
19
19
  /**
20
20
  * WordPress dependencies
21
21
  */
@@ -29,7 +29,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
29
29
  *
30
30
  * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#registerStore
31
31
  */
32
- const storeConfig = {
32
+ const storeConfig = exports.storeConfig = {
33
33
  reducer: _reducer.default,
34
34
  selectors,
35
35
  resolvers,
@@ -41,15 +41,13 @@ const storeConfig = {
41
41
  *
42
42
  * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore
43
43
  */
44
- exports.storeConfig = storeConfig;
45
- const store = (0, _data.createReduxStore)(_constants.STORE_NAME, {
44
+ const store = exports.store = (0, _data.createReduxStore)(_constants.STORE_NAME, {
46
45
  ...storeConfig,
47
46
  persist: ['preferences']
48
47
  });
49
48
 
50
49
  // We will be able to use the `register` function once we switch
51
50
  // the "preferences" persistence to use the new preferences package.
52
- exports.store = store;
53
51
  const registeredStore = (0, _data.registerStore)(_constants.STORE_NAME, {
54
52
  ...storeConfig,
55
53
  persist: ['preferences']
@@ -1 +1 @@
1
- {"version":3,"names":["_data","require","_reducer","_interopRequireDefault","selectors","_interopRequireWildcard","privateActions","privateSelectors","resolvers","actions","_constants","_lockUnlock","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","storeConfig","reducer","exports","store","createReduxStore","STORE_NAME","persist","registeredStore","registerStore","unlock","registerPrivateActions","registerPrivateSelectors"],"sources":["@wordpress/block-editor/src/store/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createReduxStore, registerStore } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport reducer from './reducer';\nimport * as selectors from './selectors';\nimport * as privateActions from './private-actions';\nimport * as privateSelectors from './private-selectors';\nimport * as resolvers from './resolvers';\nimport * as actions from './actions';\nimport { STORE_NAME } from './constants';\nimport { unlock } from '../lock-unlock';\n\n/**\n * Block editor data store configuration.\n *\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#registerStore\n */\nexport const storeConfig = {\n\treducer,\n\tselectors,\n\tresolvers,\n\tactions,\n};\n\n/**\n * Store definition for the block editor namespace.\n *\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore\n */\nexport const store = createReduxStore( STORE_NAME, {\n\t...storeConfig,\n\tpersist: [ 'preferences' ],\n} );\n\n// We will be able to use the `register` function once we switch\n// the \"preferences\" persistence to use the new preferences package.\nconst registeredStore = registerStore( STORE_NAME, {\n\t...storeConfig,\n\tpersist: [ 'preferences' ],\n} );\nunlock( registeredStore ).registerPrivateActions( privateActions );\nunlock( registeredStore ).registerPrivateSelectors( privateSelectors );\n\n// TODO: Remove once we switch to the `register` function (see above).\n//\n// Until then, private functions also need to be attached to the original\n// `store` descriptor in order to avoid unit tests failing, which could happen\n// when tests create new registries in which they register stores.\n//\n// @see https://github.com/WordPress/gutenberg/pull/51145#discussion_r1239999590\nunlock( store ).registerPrivateActions( privateActions );\nunlock( store ).registerPrivateSelectors( privateSelectors );\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,SAAA,GAAAC,uBAAA,CAAAJ,OAAA;AACA,IAAAK,cAAA,GAAAD,uBAAA,CAAAJ,OAAA;AACA,IAAAM,gBAAA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a,GAAA,CAAAhB,GAAA,EAAAM,MAAA,YAAAA,MAAA;AAfxC;AACA;AACA;;AAGA;AACA;AACA;;AAUA;AACA;AACA;AACA;AACA;AACO,MAAMW,WAAW,GAAG;EAC1BC,OAAO,EAAPA,gBAAO;EACP/B,SAAS;EACTI,SAAS;EACTC;AACD,CAAC;;AAED;AACA;AACA;AACA;AACA;AAJA2B,OAAA,CAAAF,WAAA,GAAAA,WAAA;AAKO,MAAMG,KAAK,GAAG,IAAAC,sBAAgB,EAAEC,qBAAU,EAAE;EAClD,GAAGL,WAAW;EACdM,OAAO,EAAE,CAAE,aAAa;AACzB,CAAE,CAAC;;AAEH;AACA;AAAAJ,OAAA,CAAAC,KAAA,GAAAA,KAAA;AACA,MAAMI,eAAe,GAAG,IAAAC,mBAAa,EAAEH,qBAAU,EAAE;EAClD,GAAGL,WAAW;EACdM,OAAO,EAAE,CAAE,aAAa;AACzB,CAAE,CAAC;AACH,IAAAG,kBAAM,EAAEF,eAAgB,CAAC,CAACG,sBAAsB,CAAEtC,cAAe,CAAC;AAClE,IAAAqC,kBAAM,EAAEF,eAAgB,CAAC,CAACI,wBAAwB,CAAEtC,gBAAiB,CAAC;;AAEtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAAoC,kBAAM,EAAEN,KAAM,CAAC,CAACO,sBAAsB,CAAEtC,cAAe,CAAC;AACxD,IAAAqC,kBAAM,EAAEN,KAAM,CAAC,CAACQ,wBAAwB,CAAEtC,gBAAiB,CAAC"}
1
+ {"version":3,"names":["_data","require","_reducer","_interopRequireDefault","selectors","_interopRequireWildcard","privateActions","privateSelectors","resolvers","actions","_constants","_lockUnlock","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","storeConfig","exports","reducer","store","createReduxStore","STORE_NAME","persist","registeredStore","registerStore","unlock","registerPrivateActions","registerPrivateSelectors"],"sources":["@wordpress/block-editor/src/store/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createReduxStore, registerStore } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport reducer from './reducer';\nimport * as selectors from './selectors';\nimport * as privateActions from './private-actions';\nimport * as privateSelectors from './private-selectors';\nimport * as resolvers from './resolvers';\nimport * as actions from './actions';\nimport { STORE_NAME } from './constants';\nimport { unlock } from '../lock-unlock';\n\n/**\n * Block editor data store configuration.\n *\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#registerStore\n */\nexport const storeConfig = {\n\treducer,\n\tselectors,\n\tresolvers,\n\tactions,\n};\n\n/**\n * Store definition for the block editor namespace.\n *\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore\n */\nexport const store = createReduxStore( STORE_NAME, {\n\t...storeConfig,\n\tpersist: [ 'preferences' ],\n} );\n\n// We will be able to use the `register` function once we switch\n// the \"preferences\" persistence to use the new preferences package.\nconst registeredStore = registerStore( STORE_NAME, {\n\t...storeConfig,\n\tpersist: [ 'preferences' ],\n} );\nunlock( registeredStore ).registerPrivateActions( privateActions );\nunlock( registeredStore ).registerPrivateSelectors( privateSelectors );\n\n// TODO: Remove once we switch to the `register` function (see above).\n//\n// Until then, private functions also need to be attached to the original\n// `store` descriptor in order to avoid unit tests failing, which could happen\n// when tests create new registries in which they register stores.\n//\n// @see https://github.com/WordPress/gutenberg/pull/51145#discussion_r1239999590\nunlock( store ).registerPrivateActions( privateActions );\nunlock( store ).registerPrivateSelectors( privateSelectors );\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,SAAA,GAAAC,uBAAA,CAAAJ,OAAA;AACA,IAAAK,cAAA,GAAAD,uBAAA,CAAAJ,OAAA;AACA,IAAAM,gBAAA,GAAAF,uBAAA,CAAAJ,OAAA;AACA,IAAAO,SAAA,GAAAH,uBAAA,CA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xC;AACA;AACA;;AAGA;AACA;AACA;;AAUA;AACA;AACA;AACA;AACA;AACO,MAAMY,WAAW,GAAAC,OAAA,CAAAD,WAAA,GAAG;EAC1BE,OAAO,EAAPA,gBAAO;EACP/B,SAAS;EACTI,SAAS;EACTC;AACD,CAAC;;AAED;AACA;AACA;AACA;AACA;AACO,MAAM2B,KAAK,GAAAF,OAAA,CAAAE,KAAA,GAAG,IAAAC,sBAAgB,EAAEC,qBAAU,EAAE;EAClD,GAAGL,WAAW;EACdM,OAAO,EAAE,CAAE,aAAa;AACzB,CAAE,CAAC;;AAEH;AACA;AACA,MAAMC,eAAe,GAAG,IAAAC,mBAAa,EAAEH,qBAAU,EAAE;EAClD,GAAGL,WAAW;EACdM,OAAO,EAAE,CAAE,aAAa;AACzB,CAAE,CAAC;AACH,IAAAG,kBAAM,EAAEF,eAAgB,CAAC,CAACG,sBAAsB,CAAErC,cAAe,CAAC;AAClE,IAAAoC,kBAAM,EAAEF,eAAgB,CAAC,CAACI,wBAAwB,CAAErC,gBAAiB,CAAC;;AAEtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAAmC,kBAAM,EAAEN,KAAM,CAAC,CAACO,sBAAsB,CAAErC,cAAe,CAAC;AACxD,IAAAoC,kBAAM,EAAEN,KAAM,CAAC,CAACQ,wBAAwB,CAAErC,gBAAiB,CAAC"}
@@ -15,6 +15,8 @@ exports.setLastFocus = setLastFocus;
15
15
  exports.setOpenedBlockSettingsMenu = setOpenedBlockSettingsMenu;
16
16
  exports.setStyleOverride = setStyleOverride;
17
17
  exports.showBlockInterface = showBlockInterface;
18
+ exports.startDragging = startDragging;
19
+ exports.stopDragging = stopDragging;
18
20
  exports.stopEditingAsBlocks = stopEditingAsBlocks;
19
21
  exports.syncDerivedUpdates = syncDerivedUpdates;
20
22
  var _element = require("@wordpress/element");
@@ -143,12 +145,20 @@ const privateRemoveBlocks = (clientIds, selectPrevious = true, forceRemove = fal
143
145
  // corresponding to "important" blocks, i.e. blocks that require a
144
146
  // removal prompt.
145
147
  const queue = [...clientIds];
148
+ let messageType = 'templates';
146
149
  while (queue.length) {
147
150
  const clientId = queue.shift();
148
151
  const blockName = select.getBlockName(clientId);
149
152
  if (rules[blockName]) {
150
153
  blockNamesForPrompt.add(blockName);
151
154
  }
155
+ if (rules['bindings/core/pattern-overrides']) {
156
+ const blockAttributes = select.getBlockAttributes(clientId);
157
+ if (blockAttributes?.metadata?.bindings && JSON.stringify(blockAttributes.metadata.bindings).includes('core/pattern-overrides')) {
158
+ blockNamesForPrompt.add(blockName);
159
+ messageType = 'patternOverrides';
160
+ }
161
+ }
152
162
  const innerBlocks = select.getBlockOrder(clientId);
153
163
  queue.push(...innerBlocks);
154
164
  }
@@ -156,7 +166,7 @@ const privateRemoveBlocks = (clientIds, selectPrevious = true, forceRemove = fal
156
166
  // If any such blocks were found, trigger the removal prompt and
157
167
  // skip any other steps (thus postponing actual removal).
158
168
  if (blockNamesForPrompt.size) {
159
- dispatch(displayBlockRemovalPrompt(clientIds, selectPrevious, Array.from(blockNamesForPrompt)));
169
+ dispatch(displayBlockRemovalPrompt(clientIds, selectPrevious, Array.from(blockNamesForPrompt), messageType));
160
170
  return;
161
171
  }
162
172
  }
@@ -222,16 +232,18 @@ const ensureDefaultBlock = () => ({
222
232
  * @param {string[]} blockNamesForPrompt Names of the blocks that
223
233
  * triggered the need for
224
234
  * confirmation before removal.
235
+ * @param {string} messageType The type of message to display.
225
236
  *
226
237
  * @return {Object} Action object.
227
238
  */
228
239
  exports.ensureDefaultBlock = ensureDefaultBlock;
229
- function displayBlockRemovalPrompt(clientIds, selectPrevious, blockNamesForPrompt) {
240
+ function displayBlockRemovalPrompt(clientIds, selectPrevious, blockNamesForPrompt, messageType) {
230
241
  return {
231
242
  type: 'DISPLAY_BLOCK_REMOVAL_PROMPT',
232
243
  clientIds,
233
244
  selectPrevious,
234
- blockNamesForPrompt
245
+ blockNamesForPrompt,
246
+ messageType
235
247
  };
236
248
  }
237
249
 
@@ -383,4 +395,26 @@ function registerBlockBindingsSource(source) {
383
395
  lockAttributesEditing: source.lockAttributesEditing
384
396
  };
385
397
  }
398
+
399
+ /**
400
+ * Returns an action object used in signalling that the user has begun to drag.
401
+ *
402
+ * @return {Object} Action object.
403
+ */
404
+ function startDragging() {
405
+ return {
406
+ type: 'START_DRAGGING'
407
+ };
408
+ }
409
+
410
+ /**
411
+ * Returns an action object used in signalling that the user has stopped dragging.
412
+ *
413
+ * @return {Object} Action object.
414
+ */
415
+ function stopDragging() {
416
+ return {
417
+ type: 'STOP_DRAGGING'
418
+ };
419
+ }
386
420
  //# sourceMappingURL=private-actions.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_undoIgnore","castArray","maybeArray","Array","isArray","privateSettings","__experimentalUpdateSettings","settings","stripExperimentalSettings","reset","cleanSettings","Platform","OS","key","includes","type","hideBlockInterface","showBlockInterface","privateRemoveBlocks","clientIds","selectPrevious","forceRemove","select","dispatch","registry","length","rootClientId","getBlockRootClientId","canRemoveBlocks","rules","getBlockRemovalRules","blockNamesForPrompt","Set","queue","clientId","shift","blockName","getBlockName","add","innerBlocks","getBlockOrder","push","size","displayBlockRemovalPrompt","from","selectPreviousBlock","batch","ensureDefaultBlock","exports","count","getBlockCount","__unstableHasCustomAppender","getSettings","insertDefaultBlock","clearBlockRemovalPrompt","setBlockRemovalRules","setOpenedBlockSettingsMenu","setStyleOverride","id","style","deleteStyleOverride","syncDerivedUpdates","callback","isPersistentChange","undefined","updatedBlocks","getBlocks","undoIgnoreBlocks","setLastFocus","lastFocus","stopEditingAsBlocks","focusModeToRevert","__unstableGetTemporarilyEditingFocusModeToRevert","__unstableMarkNextChangeAsNotPersistent","updateBlockAttributes","templateLock","updateBlockListSettings","getBlockListSettings","updateSettings","focusMode","__unstableSetTemporarilyEditingAsBlocks","registerBlockBindingsSource","source","sourceName","name","sourceLabel","label","useSource","lockAttributesEditing"],"sources":["@wordpress/block-editor/src/store/private-actions.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Platform } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { undoIgnoreBlocks } from './undo-ignore';\n\nconst castArray = ( maybeArray ) =>\n\tArray.isArray( maybeArray ) ? maybeArray : [ maybeArray ];\n\n/**\n * A list of private/experimental block editor settings that\n * should not become a part of the WordPress public API.\n * BlockEditorProvider will remove these settings from the\n * settings object it receives.\n *\n * @see https://github.com/WordPress/gutenberg/pull/46131\n */\nconst privateSettings = [\n\t'inserterMediaCategories',\n\t'blockInspectorAnimation',\n];\n\n/**\n * Action that updates the block editor settings and\n * conditionally preserves the experimental ones.\n *\n * @param {Object} settings Updated settings\n * @param {Object} options Options object.\n * @param {boolean} options.stripExperimentalSettings Whether to strip experimental settings.\n * @param {boolean} options.reset Whether to reset the settings.\n * @return {Object} Action object\n */\nexport function __experimentalUpdateSettings(\n\tsettings,\n\t{ stripExperimentalSettings = false, reset = false } = {}\n) {\n\tlet cleanSettings = settings;\n\t// There are no plugins in the mobile apps, so there is no\n\t// need to strip the experimental settings:\n\tif ( stripExperimentalSettings && Platform.OS === 'web' ) {\n\t\tcleanSettings = {};\n\t\tfor ( const key in settings ) {\n\t\t\tif ( ! privateSettings.includes( key ) ) {\n\t\t\t\tcleanSettings[ key ] = settings[ key ];\n\t\t\t}\n\t\t}\n\t}\n\treturn {\n\t\ttype: 'UPDATE_SETTINGS',\n\t\tsettings: cleanSettings,\n\t\treset,\n\t};\n}\n\n/**\n * Hides the block interface (eg. toolbar, outline, etc.)\n *\n * @return {Object} Action object.\n */\nexport function hideBlockInterface() {\n\treturn {\n\t\ttype: 'HIDE_BLOCK_INTERFACE',\n\t};\n}\n\n/**\n * Shows the block interface (eg. toolbar, outline, etc.)\n *\n * @return {Object} Action object.\n */\nexport function showBlockInterface() {\n\treturn {\n\t\ttype: 'SHOW_BLOCK_INTERFACE',\n\t};\n}\n\n/**\n * Yields action objects used in signalling that the blocks corresponding to\n * the set of specified client IDs are to be removed.\n *\n * Compared to `removeBlocks`, this private interface exposes an additional\n * parameter; see `forceRemove`.\n *\n * @param {string|string[]} clientIds Client IDs of blocks to remove.\n * @param {boolean} selectPrevious True if the previous block\n * or the immediate parent\n * (if no previous block exists)\n * should be selected\n * when a block is removed.\n * @param {boolean} forceRemove Whether to force the operation,\n * bypassing any checks for certain\n * block types.\n */\nexport const privateRemoveBlocks =\n\t( clientIds, selectPrevious = true, forceRemove = false ) =>\n\t( { select, dispatch, registry } ) => {\n\t\tif ( ! clientIds || ! clientIds.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\tclientIds = castArray( clientIds );\n\t\tconst rootClientId = select.getBlockRootClientId( clientIds[ 0 ] );\n\t\tconst canRemoveBlocks = select.canRemoveBlocks(\n\t\t\tclientIds,\n\t\t\trootClientId\n\t\t);\n\n\t\tif ( ! canRemoveBlocks ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// In certain editing contexts, we'd like to prevent accidental removal\n\t\t// of important blocks. For example, in the site editor, the Query Loop\n\t\t// block is deemed important. In such cases, we'll ask the user for\n\t\t// confirmation that they intended to remove such block(s). However,\n\t\t// the editor instance is responsible for presenting those confirmation\n\t\t// prompts to the user. Any instance opting into removal prompts must\n\t\t// register using `setBlockRemovalRules()`.\n\t\t//\n\t\t// @see https://github.com/WordPress/gutenberg/pull/51145\n\t\tconst rules = ! forceRemove && select.getBlockRemovalRules();\n\t\tif ( rules ) {\n\t\t\tconst blockNamesForPrompt = new Set();\n\n\t\t\t// Given a list of client IDs of blocks that the user intended to\n\t\t\t// remove, perform a tree search (BFS) to find all block names\n\t\t\t// corresponding to \"important\" blocks, i.e. blocks that require a\n\t\t\t// removal prompt.\n\t\t\tconst queue = [ ...clientIds ];\n\t\t\twhile ( queue.length ) {\n\t\t\t\tconst clientId = queue.shift();\n\t\t\t\tconst blockName = select.getBlockName( clientId );\n\t\t\t\tif ( rules[ blockName ] ) {\n\t\t\t\t\tblockNamesForPrompt.add( blockName );\n\t\t\t\t}\n\t\t\t\tconst innerBlocks = select.getBlockOrder( clientId );\n\t\t\t\tqueue.push( ...innerBlocks );\n\t\t\t}\n\n\t\t\t// If any such blocks were found, trigger the removal prompt and\n\t\t\t// skip any other steps (thus postponing actual removal).\n\t\t\tif ( blockNamesForPrompt.size ) {\n\t\t\t\tdispatch(\n\t\t\t\t\tdisplayBlockRemovalPrompt(\n\t\t\t\t\t\tclientIds,\n\t\t\t\t\t\tselectPrevious,\n\t\t\t\t\t\tArray.from( blockNamesForPrompt )\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tif ( selectPrevious ) {\n\t\t\tdispatch.selectPreviousBlock( clientIds[ 0 ], selectPrevious );\n\t\t}\n\n\t\t// We're batching these two actions because an extra `undo/redo` step can\n\t\t// be created, based on whether we insert a default block or not.\n\t\tregistry.batch( () => {\n\t\t\tdispatch( { type: 'REMOVE_BLOCKS', clientIds } );\n\t\t\t// To avoid a focus loss when removing the last block, assure there is\n\t\t\t// always a default block if the last of the blocks have been removed.\n\t\t\tdispatch( ensureDefaultBlock() );\n\t\t} );\n\t};\n\n/**\n * Action which will insert a default block insert action if there\n * are no other blocks at the root of the editor. This action should be used\n * in actions which may result in no blocks remaining in the editor (removal,\n * replacement, etc).\n */\nexport const ensureDefaultBlock =\n\t() =>\n\t( { select, dispatch } ) => {\n\t\t// To avoid a focus loss when removing the last block, assure there is\n\t\t// always a default block if the last of the blocks have been removed.\n\t\tconst count = select.getBlockCount();\n\t\tif ( count > 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If there's an custom appender, don't insert default block.\n\t\t// We have to remember to manually move the focus elsewhere to\n\t\t// prevent it from being lost though.\n\t\tconst { __unstableHasCustomAppender } = select.getSettings();\n\t\tif ( __unstableHasCustomAppender ) {\n\t\t\treturn;\n\t\t}\n\n\t\tdispatch.insertDefaultBlock();\n\t};\n\n/**\n * Returns an action object used in signalling that a block removal prompt must\n * be displayed.\n *\n * Contrast with `setBlockRemovalRules`.\n *\n * @param {string|string[]} clientIds Client IDs of blocks to remove.\n * @param {boolean} selectPrevious True if the previous block\n * or the immediate parent\n * (if no previous block exists)\n * should be selected\n * when a block is removed.\n * @param {string[]} blockNamesForPrompt Names of the blocks that\n * triggered the need for\n * confirmation before removal.\n *\n * @return {Object} Action object.\n */\nfunction displayBlockRemovalPrompt(\n\tclientIds,\n\tselectPrevious,\n\tblockNamesForPrompt\n) {\n\treturn {\n\t\ttype: 'DISPLAY_BLOCK_REMOVAL_PROMPT',\n\t\tclientIds,\n\t\tselectPrevious,\n\t\tblockNamesForPrompt,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that a block removal prompt must\n * be cleared, either be cause the user has confirmed or canceled the request\n * for removal.\n *\n * @return {Object} Action object.\n */\nexport function clearBlockRemovalPrompt() {\n\treturn {\n\t\ttype: 'CLEAR_BLOCK_REMOVAL_PROMPT',\n\t};\n}\n\n/**\n * Returns an action object used to set up any rules that a block editor may\n * provide in order to prevent a user from accidentally removing certain\n * blocks. These rules are then used to display a confirmation prompt to the\n * user. For instance, in the Site Editor, the Query Loop block is important\n * enough to warrant such confirmation.\n *\n * IMPORTANT: Registering rules implicitly signals to the `privateRemoveBlocks`\n * action that the editor will be responsible for displaying block removal\n * prompts and confirming deletions. This action is meant to be used by\n * component `BlockRemovalWarningModal` only.\n *\n * The data is a record whose keys are block types (e.g. 'core/query') and\n * whose values are the explanation to be shown to users (e.g. 'Query Loop\n * displays a list of posts or pages.').\n *\n * Contrast with `displayBlockRemovalPrompt`.\n *\n * @param {Record<string,string>|false} rules Block removal rules.\n * @return {Object} Action object.\n */\nexport function setBlockRemovalRules( rules = false ) {\n\treturn {\n\t\ttype: 'SET_BLOCK_REMOVAL_RULES',\n\t\trules,\n\t};\n}\n\n/**\n * Sets the client ID of the block settings menu that is currently open.\n *\n * @param {?string} clientId The block client ID.\n * @return {Object} Action object.\n */\nexport function setOpenedBlockSettingsMenu( clientId ) {\n\treturn {\n\t\ttype: 'SET_OPENED_BLOCK_SETTINGS_MENU',\n\t\tclientId,\n\t};\n}\n\nexport function setStyleOverride( id, style ) {\n\treturn {\n\t\ttype: 'SET_STYLE_OVERRIDE',\n\t\tid,\n\t\tstyle,\n\t};\n}\n\nexport function deleteStyleOverride( id ) {\n\treturn {\n\t\ttype: 'DELETE_STYLE_OVERRIDE',\n\t\tid,\n\t};\n}\n\n/**\n * A higher-order action that mark every change inside a callback as \"non-persistent\"\n * and ignore pushing to the undo history stack. It's primarily used for synchronized\n * derived updates from the block editor without affecting the undo history.\n *\n * @param {() => void} callback The synchronous callback to derive updates.\n */\nexport function syncDerivedUpdates( callback ) {\n\treturn ( { dispatch, select, registry } ) => {\n\t\tregistry.batch( () => {\n\t\t\t// Mark every change in the `callback` as non-persistent.\n\t\t\tdispatch( {\n\t\t\t\ttype: 'SET_EXPLICIT_PERSISTENT',\n\t\t\t\tisPersistentChange: false,\n\t\t\t} );\n\t\t\tcallback();\n\t\t\tdispatch( {\n\t\t\t\ttype: 'SET_EXPLICIT_PERSISTENT',\n\t\t\t\tisPersistentChange: undefined,\n\t\t\t} );\n\n\t\t\t// Ignore pushing undo stack for the updated blocks.\n\t\t\tconst updatedBlocks = select.getBlocks();\n\t\t\tundoIgnoreBlocks.add( updatedBlocks );\n\t\t} );\n\t};\n}\n\n/**\n * Action that sets the element that had focus when focus leaves the editor canvas.\n *\n * @param {Object} lastFocus The last focused element.\n *\n *\n * @return {Object} Action object.\n */\nexport function setLastFocus( lastFocus = null ) {\n\treturn {\n\t\ttype: 'LAST_FOCUS',\n\t\tlastFocus,\n\t};\n}\n\n/**\n * Action that stops temporarily editing as blocks.\n *\n * @param {string} clientId The block's clientId.\n */\nexport function stopEditingAsBlocks( clientId ) {\n\treturn ( { select, dispatch } ) => {\n\t\tconst focusModeToRevert =\n\t\t\tselect.__unstableGetTemporarilyEditingFocusModeToRevert();\n\t\tdispatch.__unstableMarkNextChangeAsNotPersistent();\n\t\tdispatch.updateBlockAttributes( clientId, {\n\t\t\ttemplateLock: 'contentOnly',\n\t\t} );\n\t\tdispatch.updateBlockListSettings( clientId, {\n\t\t\t...select.getBlockListSettings( clientId ),\n\t\t\ttemplateLock: 'contentOnly',\n\t\t} );\n\t\tdispatch.updateSettings( { focusMode: focusModeToRevert } );\n\t\tdispatch.__unstableSetTemporarilyEditingAsBlocks();\n\t};\n}\n\nexport function registerBlockBindingsSource( source ) {\n\treturn {\n\t\ttype: 'REGISTER_BLOCK_BINDINGS_SOURCE',\n\t\tsourceName: source.name,\n\t\tsourceLabel: source.label,\n\t\tuseSource: source.useSource,\n\t\tlockAttributesEditing: source.lockAttributesEditing,\n\t};\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AARA;AACA;AACA;;AAGA;AACA;AACA;;AAGA,MAAME,SAAS,GAAKC,UAAU,IAC7BC,KAAK,CAACC,OAAO,CAAEF,UAAW,CAAC,GAAGA,UAAU,GAAG,CAAEA,UAAU,CAAE;;AAE1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMG,eAAe,GAAG,CACvB,yBAAyB,EACzB,yBAAyB,CACzB;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,4BAA4BA,CAC3CC,QAAQ,EACR;EAAEC,yBAAyB,GAAG,KAAK;EAAEC,KAAK,GAAG;AAAM,CAAC,GAAG,CAAC,CAAC,EACxD;EACD,IAAIC,aAAa,GAAGH,QAAQ;EAC5B;EACA;EACA,IAAKC,yBAAyB,IAAIG,iBAAQ,CAACC,EAAE,KAAK,KAAK,EAAG;IACzDF,aAAa,GAAG,CAAC,CAAC;IAClB,KAAM,MAAMG,GAAG,IAAIN,QAAQ,EAAG;MAC7B,IAAK,CAAEF,eAAe,CAACS,QAAQ,CAAED,GAAI,CAAC,EAAG;QACxCH,aAAa,CAAEG,GAAG,CAAE,GAAGN,QAAQ,CAAEM,GAAG,CAAE;MACvC;IACD;EACD;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ACvBC,WAAW,EAAEH,MAAM,CAACI,KAAK;IACzBC,SAAS,EAAEL,MAAM,CAACK,SAAS;IAC3BC,qBAAqB,EAAEN,MAAM,CAACM;EAC/B,CAAC;AACF"}
1
+ {"version":3,"names":["_element","require","_undoIgnore","castArray","maybeArray","Array","isArray","privateSettings","__experimentalUpdateSettings","settings","stripExperimentalSettings","reset","cleanSettings","Platform","OS","key","includes","type","hideBlockInterface","showBlockInterface","privateRemoveBlocks","clientIds","selectPrevious","forceRemove","select","dispatch","registry","length","rootClientId","getBlockRootClientId","canRemoveBlocks","rules","getBlockRemovalRules","blockNamesForPrompt","Set","queue","messageType","clientId","shift","blockName","getBlockName","add","blockAttributes","getBlockAttributes","metadata","bindings","JSON","stringify","innerBlocks","getBlockOrder","push","size","displayBlockRemovalPrompt","from","selectPreviousBlock","batch","ensureDefaultBlock","exports","count","getBlockCount","__unstableHasCustomAppender","getSettings","insertDefaultBlock","clearBlockRemovalPrompt","setBlockRemovalRules","setOpenedBlockSettingsMenu","setStyleOverride","id","style","deleteStyleOverride","syncDerivedUpdates","callback","isPersistentChange","undefined","updatedBlocks","getBlocks","undoIgnoreBlocks","setLastFocus","lastFocus","stopEditingAsBlocks","focusModeToRevert","__unstableGetTemporarilyEditingFocusModeToRevert","__unstableMarkNextChangeAsNotPersistent","updateBlockAttributes","templateLock","updateBlockListSettings","getBlockListSettings","updateSettings","focusMode","__unstableSetTemporarilyEditingAsBlocks","registerBlockBindingsSource","source","sourceName","name","sourceLabel","label","useSource","lockAttributesEditing","startDragging","stopDragging"],"sources":["@wordpress/block-editor/src/store/private-actions.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Platform } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { undoIgnoreBlocks } from './undo-ignore';\n\nconst castArray = ( maybeArray ) =>\n\tArray.isArray( maybeArray ) ? maybeArray : [ maybeArray ];\n\n/**\n * A list of private/experimental block editor settings that\n * should not become a part of the WordPress public API.\n * BlockEditorProvider will remove these settings from the\n * settings object it receives.\n *\n * @see https://github.com/WordPress/gutenberg/pull/46131\n */\nconst privateSettings = [\n\t'inserterMediaCategories',\n\t'blockInspectorAnimation',\n];\n\n/**\n * Action that updates the block editor settings and\n * conditionally preserves the experimental ones.\n *\n * @param {Object} settings Updated settings\n * @param {Object} options Options object.\n * @param {boolean} options.stripExperimentalSettings Whether to strip experimental settings.\n * @param {boolean} options.reset Whether to reset the settings.\n * @return {Object} Action object\n */\nexport function __experimentalUpdateSettings(\n\tsettings,\n\t{ stripExperimentalSettings = false, reset = false } = {}\n) {\n\tlet cleanSettings = settings;\n\t// There are no plugins in the mobile apps, so there is no\n\t// need to strip the experimental settings:\n\tif ( stripExperimentalSettings && Platform.OS === 'web' ) {\n\t\tcleanSettings = {};\n\t\tfor ( const key in settings ) {\n\t\t\tif ( ! privateSettings.includes( key ) ) {\n\t\t\t\tcleanSettings[ key ] = settings[ key ];\n\t\t\t}\n\t\t}\n\t}\n\treturn {\n\t\ttype: 'UPDATE_SETTINGS',\n\t\tsettings: cleanSettings,\n\t\treset,\n\t};\n}\n\n/**\n * Hides the block interface (eg. toolbar, outline, etc.)\n *\n * @return {Object} Action object.\n */\nexport function hideBlockInterface() {\n\treturn {\n\t\ttype: 'HIDE_BLOCK_INTERFACE',\n\t};\n}\n\n/**\n * Shows the block interface (eg. toolbar, outline, etc.)\n *\n * @return {Object} Action object.\n */\nexport function showBlockInterface() {\n\treturn {\n\t\ttype: 'SHOW_BLOCK_INTERFACE',\n\t};\n}\n\n/**\n * Yields action objects used in signalling that the blocks corresponding to\n * the set of specified client IDs are to be removed.\n *\n * Compared to `removeBlocks`, this private interface exposes an additional\n * parameter; see `forceRemove`.\n *\n * @param {string|string[]} clientIds Client IDs of blocks to remove.\n * @param {boolean} selectPrevious True if the previous block\n * or the immediate parent\n * (if no previous block exists)\n * should be selected\n * when a block is removed.\n * @param {boolean} forceRemove Whether to force the operation,\n * bypassing any checks for certain\n * block types.\n */\nexport const privateRemoveBlocks =\n\t( clientIds, selectPrevious = true, forceRemove = false ) =>\n\t( { select, dispatch, registry } ) => {\n\t\tif ( ! clientIds || ! clientIds.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\tclientIds = castArray( clientIds );\n\t\tconst rootClientId = select.getBlockRootClientId( clientIds[ 0 ] );\n\t\tconst canRemoveBlocks = select.canRemoveBlocks(\n\t\t\tclientIds,\n\t\t\trootClientId\n\t\t);\n\n\t\tif ( ! canRemoveBlocks ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// In certain editing contexts, we'd like to prevent accidental removal\n\t\t// of important blocks. For example, in the site editor, the Query Loop\n\t\t// block is deemed important. In such cases, we'll ask the user for\n\t\t// confirmation that they intended to remove such block(s). However,\n\t\t// the editor instance is responsible for presenting those confirmation\n\t\t// prompts to the user. Any instance opting into removal prompts must\n\t\t// register using `setBlockRemovalRules()`.\n\t\t//\n\t\t// @see https://github.com/WordPress/gutenberg/pull/51145\n\t\tconst rules = ! forceRemove && select.getBlockRemovalRules();\n\t\tif ( rules ) {\n\t\t\tconst blockNamesForPrompt = new Set();\n\n\t\t\t// Given a list of client IDs of blocks that the user intended to\n\t\t\t// remove, perform a tree search (BFS) to find all block names\n\t\t\t// corresponding to \"important\" blocks, i.e. blocks that require a\n\t\t\t// removal prompt.\n\t\t\tconst queue = [ ...clientIds ];\n\t\t\tlet messageType = 'templates';\n\t\t\twhile ( queue.length ) {\n\t\t\t\tconst clientId = queue.shift();\n\t\t\t\tconst blockName = select.getBlockName( clientId );\n\t\t\t\tif ( rules[ blockName ] ) {\n\t\t\t\t\tblockNamesForPrompt.add( blockName );\n\t\t\t\t}\n\n\t\t\t\tif ( rules[ 'bindings/core/pattern-overrides' ] ) {\n\t\t\t\t\tconst blockAttributes =\n\t\t\t\t\t\tselect.getBlockAttributes( clientId );\n\t\t\t\t\tif (\n\t\t\t\t\t\tblockAttributes?.metadata?.bindings &&\n\t\t\t\t\t\tJSON.stringify(\n\t\t\t\t\t\t\tblockAttributes.metadata.bindings\n\t\t\t\t\t\t).includes( 'core/pattern-overrides' )\n\t\t\t\t\t) {\n\t\t\t\t\t\tblockNamesForPrompt.add( blockName );\n\t\t\t\t\t\tmessageType = 'patternOverrides';\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tconst innerBlocks = select.getBlockOrder( clientId );\n\t\t\t\tqueue.push( ...innerBlocks );\n\t\t\t}\n\n\t\t\t// If any such blocks were found, trigger the removal prompt and\n\t\t\t// skip any other steps (thus postponing actual removal).\n\t\t\tif ( blockNamesForPrompt.size ) {\n\t\t\t\tdispatch(\n\t\t\t\t\tdisplayBlockRemovalPrompt(\n\t\t\t\t\t\tclientIds,\n\t\t\t\t\t\tselectPrevious,\n\t\t\t\t\t\tArray.from( blockNamesForPrompt ),\n\t\t\t\t\t\tmessageType\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tif ( selectPrevious ) {\n\t\t\tdispatch.selectPreviousBlock( clientIds[ 0 ], selectPrevious );\n\t\t}\n\n\t\t// We're batching these two actions because an extra `undo/redo` step can\n\t\t// be created, based on whether we insert a default block or not.\n\t\tregistry.batch( () => {\n\t\t\tdispatch( { type: 'REMOVE_BLOCKS', clientIds } );\n\t\t\t// To avoid a focus loss when removing the last block, assure there is\n\t\t\t// always a default block if the last of the blocks have been removed.\n\t\t\tdispatch( ensureDefaultBlock() );\n\t\t} );\n\t};\n\n/**\n * Action which will insert a default block insert action if there\n * are no other blocks at the root of the editor. This action should be used\n * in actions which may result in no blocks remaining in the editor (removal,\n * replacement, etc).\n */\nexport const ensureDefaultBlock =\n\t() =>\n\t( { select, dispatch } ) => {\n\t\t// To avoid a focus loss when removing the last block, assure there is\n\t\t// always a default block if the last of the blocks have been removed.\n\t\tconst count = select.getBlockCount();\n\t\tif ( count > 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If there's an custom appender, don't insert default block.\n\t\t// We have to remember to manually move the focus elsewhere to\n\t\t// prevent it from being lost though.\n\t\tconst { __unstableHasCustomAppender } = select.getSettings();\n\t\tif ( __unstableHasCustomAppender ) {\n\t\t\treturn;\n\t\t}\n\n\t\tdispatch.insertDefaultBlock();\n\t};\n\n/**\n * Returns an action object used in signalling that a block removal prompt must\n * be displayed.\n *\n * Contrast with `setBlockRemovalRules`.\n *\n * @param {string|string[]} clientIds Client IDs of blocks to remove.\n * @param {boolean} selectPrevious True if the previous block\n * or the immediate parent\n * (if no previous block exists)\n * should be selected\n * when a block is removed.\n * @param {string[]} blockNamesForPrompt Names of the blocks that\n * triggered the need for\n * confirmation before removal.\n * @param {string} messageType The type of message to display.\n *\n * @return {Object} Action object.\n */\nfunction displayBlockRemovalPrompt(\n\tclientIds,\n\tselectPrevious,\n\tblockNamesForPrompt,\n\tmessageType\n) {\n\treturn {\n\t\ttype: 'DISPLAY_BLOCK_REMOVAL_PROMPT',\n\t\tclientIds,\n\t\tselectPrevious,\n\t\tblockNamesForPrompt,\n\t\tmessageType,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that a block removal prompt must\n * be cleared, either be cause the user has confirmed or canceled the request\n * for removal.\n *\n * @return {Object} Action object.\n */\nexport function clearBlockRemovalPrompt() {\n\treturn {\n\t\ttype: 'CLEAR_BLOCK_REMOVAL_PROMPT',\n\t};\n}\n\n/**\n * Returns an action object used to set up any rules that a block editor may\n * provide in order to prevent a user from accidentally removing certain\n * blocks. These rules are then used to display a confirmation prompt to the\n * user. For instance, in the Site Editor, the Query Loop block is important\n * enough to warrant such confirmation.\n *\n * IMPORTANT: Registering rules implicitly signals to the `privateRemoveBlocks`\n * action that the editor will be responsible for displaying block removal\n * prompts and confirming deletions. This action is meant to be used by\n * component `BlockRemovalWarningModal` only.\n *\n * The data is a record whose keys are block types (e.g. 'core/query') and\n * whose values are the explanation to be shown to users (e.g. 'Query Loop\n * displays a list of posts or pages.').\n *\n * Contrast with `displayBlockRemovalPrompt`.\n *\n * @param {Record<string,string>|false} rules Block removal rules.\n * @return {Object} Action object.\n */\nexport function setBlockRemovalRules( rules = false ) {\n\treturn {\n\t\ttype: 'SET_BLOCK_REMOVAL_RULES',\n\t\trules,\n\t};\n}\n\n/**\n * Sets the client ID of the block settings menu that is currently open.\n *\n * @param {?string} clientId The block client ID.\n * @return {Object} Action object.\n */\nexport function setOpenedBlockSettingsMenu( clientId ) {\n\treturn {\n\t\ttype: 'SET_OPENED_BLOCK_SETTINGS_MENU',\n\t\tclientId,\n\t};\n}\n\nexport function setStyleOverride( id, style ) {\n\treturn {\n\t\ttype: 'SET_STYLE_OVERRIDE',\n\t\tid,\n\t\tstyle,\n\t};\n}\n\nexport function deleteStyleOverride( id ) {\n\treturn {\n\t\ttype: 'DELETE_STYLE_OVERRIDE',\n\t\tid,\n\t};\n}\n\n/**\n * A higher-order action that mark every change inside a callback as \"non-persistent\"\n * and ignore pushing to the undo history stack. It's primarily used for synchronized\n * derived updates from the block editor without affecting the undo history.\n *\n * @param {() => void} callback The synchronous callback to derive updates.\n */\nexport function syncDerivedUpdates( callback ) {\n\treturn ( { dispatch, select, registry } ) => {\n\t\tregistry.batch( () => {\n\t\t\t// Mark every change in the `callback` as non-persistent.\n\t\t\tdispatch( {\n\t\t\t\ttype: 'SET_EXPLICIT_PERSISTENT',\n\t\t\t\tisPersistentChange: false,\n\t\t\t} );\n\t\t\tcallback();\n\t\t\tdispatch( {\n\t\t\t\ttype: 'SET_EXPLICIT_PERSISTENT',\n\t\t\t\tisPersistentChange: undefined,\n\t\t\t} );\n\n\t\t\t// Ignore pushing undo stack for the updated blocks.\n\t\t\tconst updatedBlocks = select.getBlocks();\n\t\t\tundoIgnoreBlocks.add( updatedBlocks );\n\t\t} );\n\t};\n}\n\n/**\n * Action that sets the element that had focus when focus leaves the editor canvas.\n *\n * @param {Object} lastFocus The last focused element.\n *\n *\n * @return {Object} Action object.\n */\nexport function setLastFocus( lastFocus = null ) {\n\treturn {\n\t\ttype: 'LAST_FOCUS',\n\t\tlastFocus,\n\t};\n}\n\n/**\n * Action that stops temporarily editing as blocks.\n *\n * @param {string} clientId The block's clientId.\n */\nexport function stopEditingAsBlocks( clientId ) {\n\treturn ( { select, dispatch } ) => {\n\t\tconst focusModeToRevert =\n\t\t\tselect.__unstableGetTemporarilyEditingFocusModeToRevert();\n\t\tdispatch.__unstableMarkNextChangeAsNotPersistent();\n\t\tdispatch.updateBlockAttributes( clientId, {\n\t\t\ttemplateLock: 'contentOnly',\n\t\t} );\n\t\tdispatch.updateBlockListSettings( clientId, {\n\t\t\t...select.getBlockListSettings( clientId ),\n\t\t\ttemplateLock: 'contentOnly',\n\t\t} );\n\t\tdispatch.updateSettings( { focusMode: focusModeToRevert } );\n\t\tdispatch.__unstableSetTemporarilyEditingAsBlocks();\n\t};\n}\n\nexport function registerBlockBindingsSource( source ) {\n\treturn {\n\t\ttype: 'REGISTER_BLOCK_BINDINGS_SOURCE',\n\t\tsourceName: source.name,\n\t\tsourceLabel: source.label,\n\t\tuseSource: source.useSource,\n\t\tlockAttributesEditing: source.lockAttributesEditing,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the user has begun to drag.\n *\n * @return {Object} Action object.\n */\nexport function startDragging() {\n\treturn {\n\t\ttype: 'START_DRAGGING',\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the user has stopped dragging.\n *\n * @return {Object} Action object.\n */\nexport function stopDragging() {\n\treturn {\n\t\ttype: 'STOP_DRAGGING',\n\t};\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AARA;AACA;AACA;;AAGA;AACA;AACA;;AAGA,MAAME,SAAS,GAAKC,UAAU,IAC7BC,KAAK,CAACC,OAAO,CAAEF,UAAW,CAAC,GAAGA,UAAU,GAAG,CAAEA,UAAU,CAAE;;AAE1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMG,eAAe,GAAG,CACvB,yBAAyB,EACzB,yBAAyB,CACzB;;AAED;AACA;A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