@wordpress/editor 14.33.5 → 14.34.1-next.2f1c7c01b.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 (1245) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/bindings/api.js +2 -0
  3. package/build/bindings/api.js.map +1 -1
  4. package/build/bindings/pattern-overrides.js +3 -1
  5. package/build/bindings/pattern-overrides.js.map +1 -1
  6. package/build/bindings/post-data.js +4 -2
  7. package/build/bindings/post-data.js.map +1 -1
  8. package/build/bindings/post-meta.js +2 -0
  9. package/build/bindings/post-meta.js.map +1 -1
  10. package/build/bindings/term-data.js +3 -1
  11. package/build/bindings/term-data.js.map +1 -1
  12. package/build/components/autocompleters/index.js +2 -0
  13. package/build/components/autocompleters/index.js.map +1 -1
  14. package/build/components/autocompleters/user.js +3 -1
  15. package/build/components/autocompleters/user.js.map +1 -1
  16. package/build/components/autosave-monitor/index.js +4 -2
  17. package/build/components/autosave-monitor/index.js.map +1 -1
  18. package/build/components/block-removal-warnings/index.js +6 -4
  19. package/build/components/block-removal-warnings/index.js.map +1 -1
  20. package/build/components/block-settings-menu/plugin-block-settings-menu-item.js +6 -4
  21. package/build/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -1
  22. package/build/components/block-visibility/index.js +5 -3
  23. package/build/components/block-visibility/index.js.map +1 -1
  24. package/build/components/blog-title/index.js +4 -2
  25. package/build/components/blog-title/index.js.map +1 -1
  26. package/build/components/character-count/index.js +2 -0
  27. package/build/components/character-count/index.js.map +1 -1
  28. package/build/components/collab-sidebar/add-comment.js +10 -8
  29. package/build/components/collab-sidebar/add-comment.js.map +2 -2
  30. package/build/components/collab-sidebar/comment-author-info.js +3 -1
  31. package/build/components/collab-sidebar/comment-author-info.js.map +1 -1
  32. package/build/components/collab-sidebar/comment-form.js +3 -1
  33. package/build/components/collab-sidebar/comment-form.js.map +1 -1
  34. package/build/components/collab-sidebar/comment-indicator-toolbar.js +5 -3
  35. package/build/components/collab-sidebar/comment-indicator-toolbar.js.map +1 -1
  36. package/build/components/collab-sidebar/comment-menu-item.js +6 -4
  37. package/build/components/collab-sidebar/comment-menu-item.js.map +1 -1
  38. package/build/components/collab-sidebar/comments.js +40 -31
  39. package/build/components/collab-sidebar/comments.js.map +2 -2
  40. package/build/components/collab-sidebar/constants.js +5 -3
  41. package/build/components/collab-sidebar/constants.js.map +1 -1
  42. package/build/components/collab-sidebar/hooks.js +3 -1
  43. package/build/components/collab-sidebar/hooks.js.map +1 -1
  44. package/build/components/collab-sidebar/index.js +15 -13
  45. package/build/components/collab-sidebar/index.js.map +2 -2
  46. package/build/components/collab-sidebar/utils.js +5 -6
  47. package/build/components/collab-sidebar/utils.js.map +2 -2
  48. package/build/components/collapsible-block-toolbar/index.js +4 -2
  49. package/build/components/collapsible-block-toolbar/index.js.map +1 -1
  50. package/build/components/commands/index.js +6 -4
  51. package/build/components/commands/index.js.map +1 -1
  52. package/build/components/deprecated.js +55 -53
  53. package/build/components/deprecated.js.map +1 -1
  54. package/build/components/document-bar/index.js +20 -5
  55. package/build/components/document-bar/index.js.map +2 -2
  56. package/build/components/document-outline/check.js +2 -0
  57. package/build/components/document-outline/check.js.map +1 -1
  58. package/build/components/document-outline/index.js +9 -7
  59. package/build/components/document-outline/index.js.map +1 -1
  60. package/build/components/document-outline/item.js +4 -2
  61. package/build/components/document-outline/item.js.map +1 -1
  62. package/build/components/document-tools/index.js +3 -1
  63. package/build/components/document-tools/index.js.map +1 -1
  64. package/build/components/editor/index.js +26 -5
  65. package/build/components/editor/index.js.map +3 -3
  66. package/build/components/editor-history/redo.js +3 -1
  67. package/build/components/editor-history/redo.js.map +1 -1
  68. package/build/components/editor-history/undo.js +3 -1
  69. package/build/components/editor-history/undo.js.map +1 -1
  70. package/build/components/editor-interface/index.js +19 -12
  71. package/build/components/editor-interface/index.js.map +3 -3
  72. package/build/components/editor-notices/index.js +3 -1
  73. package/build/components/editor-notices/index.js.map +1 -1
  74. package/build/components/editor-snackbars/index.js +4 -2
  75. package/build/components/editor-snackbars/index.js.map +1 -1
  76. package/build/components/entities-saved-states/entity-record-item.js +3 -1
  77. package/build/components/entities-saved-states/entity-record-item.js.map +1 -1
  78. package/build/components/entities-saved-states/entity-type-list.js +22 -16
  79. package/build/components/entities-saved-states/entity-type-list.js.map +3 -3
  80. package/build/components/entities-saved-states/hooks/use-is-dirty.js +3 -1
  81. package/build/components/entities-saved-states/hooks/use-is-dirty.js.map +1 -1
  82. package/build/components/entities-saved-states/index.js +3 -1
  83. package/build/components/entities-saved-states/index.js.map +1 -1
  84. package/build/components/error-boundary/index.js +5 -3
  85. package/build/components/error-boundary/index.js.map +1 -1
  86. package/build/components/global-keyboard-shortcuts/index.js +2 -0
  87. package/build/components/global-keyboard-shortcuts/index.js.map +1 -1
  88. package/build/components/global-keyboard-shortcuts/register-shortcuts.js +3 -1
  89. package/build/components/global-keyboard-shortcuts/register-shortcuts.js.map +1 -1
  90. package/build/components/global-styles/block-link.js +72 -0
  91. package/build/components/global-styles/block-link.js.map +7 -0
  92. package/build/components/global-styles/header.js +56 -0
  93. package/build/components/global-styles/header.js.map +7 -0
  94. package/build/components/global-styles/hooks.js +178 -0
  95. package/build/components/global-styles/hooks.js.map +7 -0
  96. package/build/components/global-styles/index.js +140 -0
  97. package/build/components/global-styles/index.js.map +7 -0
  98. package/build/components/global-styles/menu.js +97 -0
  99. package/build/components/global-styles/menu.js.map +7 -0
  100. package/build/components/global-styles-provider/index.js +5 -49
  101. package/build/components/global-styles-provider/index.js.map +3 -3
  102. package/build/components/global-styles-renderer/index.js +57 -0
  103. package/build/components/global-styles-renderer/index.js.map +7 -0
  104. package/build/components/global-styles-sidebar/default-sidebar.js +68 -0
  105. package/build/components/global-styles-sidebar/default-sidebar.js.map +7 -0
  106. package/build/components/global-styles-sidebar/index.js +184 -0
  107. package/build/components/global-styles-sidebar/index.js.map +7 -0
  108. package/build/components/global-styles-sidebar/welcome-guide-image.js +39 -0
  109. package/build/components/global-styles-sidebar/welcome-guide-image.js.map +7 -0
  110. package/build/components/global-styles-sidebar/welcome-guide.js +145 -0
  111. package/build/components/global-styles-sidebar/welcome-guide.js.map +7 -0
  112. package/build/components/header/back-button.js +8 -6
  113. package/build/components/header/back-button.js.map +1 -1
  114. package/build/components/header/index.js +17 -12
  115. package/build/components/header/index.js.map +2 -2
  116. package/build/components/index.js +4 -2
  117. package/build/components/index.js.map +2 -2
  118. package/build/components/inserter-sidebar/index.js +4 -2
  119. package/build/components/inserter-sidebar/index.js.map +1 -1
  120. package/build/components/keyboard-shortcut-help-modal/config.js +3 -1
  121. package/build/components/keyboard-shortcut-help-modal/config.js.map +1 -1
  122. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +3 -1
  123. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
  124. package/build/components/keyboard-shortcut-help-modal/index.js +7 -5
  125. package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  126. package/build/components/keyboard-shortcut-help-modal/shortcut.js +3 -1
  127. package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
  128. package/build/components/list-view-sidebar/index.js +4 -2
  129. package/build/components/list-view-sidebar/index.js.map +1 -1
  130. package/build/components/list-view-sidebar/list-view-outline.js +3 -1
  131. package/build/components/list-view-sidebar/list-view-outline.js.map +1 -1
  132. package/build/components/local-autosave-monitor/index.js +6 -4
  133. package/build/components/local-autosave-monitor/index.js.map +1 -1
  134. package/build/components/media-categories/index.js +8 -6
  135. package/build/components/media-categories/index.js.map +1 -1
  136. package/build/components/mode-switcher/index.js +4 -2
  137. package/build/components/mode-switcher/index.js.map +1 -1
  138. package/build/components/more-menu/copy-content-menu-item.js +3 -1
  139. package/build/components/more-menu/copy-content-menu-item.js.map +1 -1
  140. package/build/components/more-menu/index.js +3 -1
  141. package/build/components/more-menu/index.js.map +1 -1
  142. package/build/components/more-menu/tools-more-menu-group.js +4 -2
  143. package/build/components/more-menu/tools-more-menu-group.js.map +1 -1
  144. package/build/components/more-menu/view-more-menu-group.js +4 -2
  145. package/build/components/more-menu/view-more-menu-group.js.map +1 -1
  146. package/build/components/page-attributes/check.js +2 -0
  147. package/build/components/page-attributes/check.js.map +1 -1
  148. package/build/components/page-attributes/order.js +3 -1
  149. package/build/components/page-attributes/order.js.map +1 -1
  150. package/build/components/page-attributes/panel.js +4 -2
  151. package/build/components/page-attributes/panel.js.map +1 -1
  152. package/build/components/page-attributes/parent.js +4 -2
  153. package/build/components/page-attributes/parent.js.map +1 -1
  154. package/build/components/pattern-duplicate-modal/index.js +5 -3
  155. package/build/components/pattern-duplicate-modal/index.js.map +1 -1
  156. package/build/components/pattern-overrides-panel/index.js +4 -2
  157. package/build/components/pattern-overrides-panel/index.js.map +1 -1
  158. package/build/components/pattern-rename-modal/index.js +5 -3
  159. package/build/components/pattern-rename-modal/index.js.map +1 -1
  160. package/build/components/plugin-document-setting-panel/index.js +5 -3
  161. package/build/components/plugin-document-setting-panel/index.js.map +1 -1
  162. package/build/components/plugin-more-menu-item/index.js +3 -1
  163. package/build/components/plugin-more-menu-item/index.js.map +1 -1
  164. package/build/components/plugin-post-publish-panel/index.js +5 -3
  165. package/build/components/plugin-post-publish-panel/index.js.map +1 -1
  166. package/build/components/plugin-post-status-info/index.js +5 -3
  167. package/build/components/plugin-post-status-info/index.js.map +1 -1
  168. package/build/components/plugin-pre-publish-panel/index.js +5 -3
  169. package/build/components/plugin-pre-publish-panel/index.js.map +1 -1
  170. package/build/components/plugin-preview-menu-item/index.js +3 -1
  171. package/build/components/plugin-preview-menu-item/index.js.map +1 -1
  172. package/build/components/plugin-sidebar/index.js +3 -1
  173. package/build/components/plugin-sidebar/index.js.map +1 -1
  174. package/build/components/plugin-sidebar-more-menu-item/index.js +3 -1
  175. package/build/components/plugin-sidebar-more-menu-item/index.js.map +1 -1
  176. package/build/components/post-actions/actions.js +3 -1
  177. package/build/components/post-actions/actions.js.map +1 -1
  178. package/build/components/post-actions/index.js +4 -2
  179. package/build/components/post-actions/index.js.map +1 -1
  180. package/build/components/post-actions/set-as-homepage.js +5 -3
  181. package/build/components/post-actions/set-as-homepage.js.map +1 -1
  182. package/build/components/post-actions/set-as-posts-page.js +5 -3
  183. package/build/components/post-actions/set-as-posts-page.js.map +1 -1
  184. package/build/components/post-author/check.js +3 -1
  185. package/build/components/post-author/check.js.map +1 -1
  186. package/build/components/post-author/combobox.js +3 -1
  187. package/build/components/post-author/combobox.js.map +1 -1
  188. package/build/components/post-author/constants.js +4 -2
  189. package/build/components/post-author/constants.js.map +1 -1
  190. package/build/components/post-author/hook.js +2 -0
  191. package/build/components/post-author/hook.js.map +1 -1
  192. package/build/components/post-author/index.js +4 -2
  193. package/build/components/post-author/index.js.map +1 -1
  194. package/build/components/post-author/panel.js +3 -1
  195. package/build/components/post-author/panel.js.map +1 -1
  196. package/build/components/post-author/select.js +3 -1
  197. package/build/components/post-author/select.js.map +1 -1
  198. package/build/components/post-card-panel/index.js +4 -2
  199. package/build/components/post-card-panel/index.js.map +1 -1
  200. package/build/components/post-comments/index.js +4 -2
  201. package/build/components/post-comments/index.js.map +1 -1
  202. package/build/components/post-content-information/index.js +4 -2
  203. package/build/components/post-content-information/index.js.map +1 -1
  204. package/build/components/post-discussion/panel.js +4 -2
  205. package/build/components/post-discussion/panel.js.map +1 -1
  206. package/build/components/post-excerpt/check.js +3 -1
  207. package/build/components/post-excerpt/check.js.map +1 -1
  208. package/build/components/post-excerpt/index.js +3 -1
  209. package/build/components/post-excerpt/index.js.map +1 -1
  210. package/build/components/post-excerpt/panel.js +4 -2
  211. package/build/components/post-excerpt/panel.js.map +1 -1
  212. package/build/components/post-excerpt/plugin.js +5 -3
  213. package/build/components/post-excerpt/plugin.js.map +1 -1
  214. package/build/components/post-featured-image/check.js +3 -1
  215. package/build/components/post-featured-image/check.js.map +1 -1
  216. package/build/components/post-featured-image/index.js +41 -8
  217. package/build/components/post-featured-image/index.js.map +3 -3
  218. package/build/components/post-featured-image/panel.js +4 -2
  219. package/build/components/post-featured-image/panel.js.map +1 -1
  220. package/build/components/post-fields/index.js +2 -0
  221. package/build/components/post-fields/index.js.map +1 -1
  222. package/build/components/post-format/check.js +3 -1
  223. package/build/components/post-format/check.js.map +1 -1
  224. package/build/components/post-format/index.js +4 -2
  225. package/build/components/post-format/index.js.map +1 -1
  226. package/build/components/post-format/panel.js +3 -1
  227. package/build/components/post-format/panel.js.map +1 -1
  228. package/build/components/post-last-edited-panel/index.js +3 -1
  229. package/build/components/post-last-edited-panel/index.js.map +1 -1
  230. package/build/components/post-last-revision/check.js +3 -1
  231. package/build/components/post-last-revision/check.js.map +1 -1
  232. package/build/components/post-last-revision/index.js +3 -1
  233. package/build/components/post-last-revision/index.js.map +1 -1
  234. package/build/components/post-last-revision/panel.js +3 -1
  235. package/build/components/post-last-revision/panel.js.map +1 -1
  236. package/build/components/post-locked-modal/index.js +3 -1
  237. package/build/components/post-locked-modal/index.js.map +1 -1
  238. package/build/components/post-panel-row/index.js +4 -2
  239. package/build/components/post-panel-row/index.js.map +1 -1
  240. package/build/components/post-panel-section/index.js +3 -1
  241. package/build/components/post-panel-section/index.js.map +1 -1
  242. package/build/components/post-pending-status/check.js +2 -0
  243. package/build/components/post-pending-status/check.js.map +1 -1
  244. package/build/components/post-pending-status/index.js +3 -1
  245. package/build/components/post-pending-status/index.js.map +1 -1
  246. package/build/components/post-pingbacks/index.js +3 -1
  247. package/build/components/post-pingbacks/index.js.map +1 -1
  248. package/build/components/post-preview-button/index.js +3 -1
  249. package/build/components/post-preview-button/index.js.map +1 -1
  250. package/build/components/post-publish-button/index.js +6 -4
  251. package/build/components/post-publish-button/index.js.map +1 -1
  252. package/build/components/post-publish-button/label.js +2 -0
  253. package/build/components/post-publish-button/label.js.map +1 -1
  254. package/build/components/post-publish-button/post-publish-button-or-toggle.js +5 -3
  255. package/build/components/post-publish-button/post-publish-button-or-toggle.js.map +1 -1
  256. package/build/components/post-publish-panel/index.js +5 -3
  257. package/build/components/post-publish-panel/index.js.map +1 -1
  258. package/build/components/post-publish-panel/maybe-category-panel.js +3 -1
  259. package/build/components/post-publish-panel/maybe-category-panel.js.map +1 -1
  260. package/build/components/post-publish-panel/maybe-post-format-panel.js +5 -3
  261. package/build/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
  262. package/build/components/post-publish-panel/maybe-tags-panel.js +5 -3
  263. package/build/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
  264. package/build/components/post-publish-panel/maybe-upload-media.js +3 -1
  265. package/build/components/post-publish-panel/maybe-upload-media.js.map +1 -1
  266. package/build/components/post-publish-panel/media-util.js +2 -0
  267. package/build/components/post-publish-panel/media-util.js.map +1 -1
  268. package/build/components/post-publish-panel/postpublish.js +6 -4
  269. package/build/components/post-publish-panel/postpublish.js.map +1 -1
  270. package/build/components/post-publish-panel/prepublish.js +3 -1
  271. package/build/components/post-publish-panel/prepublish.js.map +1 -1
  272. package/build/components/post-saved-state/index.js +3 -1
  273. package/build/components/post-saved-state/index.js.map +1 -1
  274. package/build/components/post-schedule/check.js +2 -0
  275. package/build/components/post-schedule/check.js.map +1 -1
  276. package/build/components/post-schedule/index.js +4 -2
  277. package/build/components/post-schedule/index.js.map +1 -1
  278. package/build/components/post-schedule/label.js +2 -0
  279. package/build/components/post-schedule/label.js.map +1 -1
  280. package/build/components/post-schedule/panel.js +4 -2
  281. package/build/components/post-schedule/panel.js.map +1 -1
  282. package/build/components/post-status/index.js +6 -4
  283. package/build/components/post-status/index.js.map +1 -1
  284. package/build/components/post-sticky/check.js +2 -0
  285. package/build/components/post-sticky/check.js.map +1 -1
  286. package/build/components/post-sticky/index.js +3 -1
  287. package/build/components/post-sticky/index.js.map +1 -1
  288. package/build/components/post-sticky/panel.js +3 -1
  289. package/build/components/post-sticky/panel.js.map +1 -1
  290. package/build/components/post-switch-to-draft-button/index.js +3 -1
  291. package/build/components/post-switch-to-draft-button/index.js.map +1 -1
  292. package/build/components/post-sync-status/index.js +3 -1
  293. package/build/components/post-sync-status/index.js.map +1 -1
  294. package/build/components/post-taxonomies/check.js +2 -0
  295. package/build/components/post-taxonomies/check.js.map +1 -1
  296. package/build/components/post-taxonomies/flat-term-selector.js +9 -7
  297. package/build/components/post-taxonomies/flat-term-selector.js.map +1 -1
  298. package/build/components/post-taxonomies/hierarchical-term-selector.js +8 -6
  299. package/build/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
  300. package/build/components/post-taxonomies/index.js +4 -2
  301. package/build/components/post-taxonomies/index.js.map +1 -1
  302. package/build/components/post-taxonomies/most-used-terms.js +5 -3
  303. package/build/components/post-taxonomies/most-used-terms.js.map +1 -1
  304. package/build/components/post-taxonomies/panel.js +3 -1
  305. package/build/components/post-taxonomies/panel.js.map +1 -1
  306. package/build/components/post-template/block-theme.js +3 -1
  307. package/build/components/post-template/block-theme.js.map +1 -1
  308. package/build/components/post-template/classic-theme.js +3 -1
  309. package/build/components/post-template/classic-theme.js.map +1 -1
  310. package/build/components/post-template/create-new-template-modal.js +4 -2
  311. package/build/components/post-template/create-new-template-modal.js.map +1 -1
  312. package/build/components/post-template/create-new-template.js +3 -1
  313. package/build/components/post-template/create-new-template.js.map +1 -1
  314. package/build/components/post-template/hooks.js +2 -0
  315. package/build/components/post-template/hooks.js.map +1 -1
  316. package/build/components/post-template/panel.js +3 -1
  317. package/build/components/post-template/panel.js.map +1 -1
  318. package/build/components/post-template/reset-default-template.js +3 -1
  319. package/build/components/post-template/reset-default-template.js.map +1 -1
  320. package/build/components/post-template/swap-template-button.js +3 -1
  321. package/build/components/post-template/swap-template-button.js.map +1 -1
  322. package/build/components/post-text-editor/index.js +3 -1
  323. package/build/components/post-text-editor/index.js.map +1 -1
  324. package/build/components/post-title/constants.js +4 -2
  325. package/build/components/post-title/constants.js.map +1 -1
  326. package/build/components/post-title/index.js +7 -5
  327. package/build/components/post-title/index.js.map +1 -1
  328. package/build/components/post-title/post-title-raw.js +3 -1
  329. package/build/components/post-title/post-title-raw.js.map +1 -1
  330. package/build/components/post-title/use-post-title-focus.js +2 -0
  331. package/build/components/post-title/use-post-title-focus.js.map +1 -1
  332. package/build/components/post-title/use-post-title.js +2 -0
  333. package/build/components/post-title/use-post-title.js.map +1 -1
  334. package/build/components/post-transform-panel/hooks.js +3 -1
  335. package/build/components/post-transform-panel/hooks.js.map +1 -1
  336. package/build/components/post-transform-panel/index.js +3 -1
  337. package/build/components/post-transform-panel/index.js.map +1 -1
  338. package/build/components/post-trash/check.js +2 -0
  339. package/build/components/post-trash/check.js.map +1 -1
  340. package/build/components/post-trash/index.js +3 -1
  341. package/build/components/post-trash/index.js.map +1 -1
  342. package/build/components/post-type-support-check/index.js +2 -0
  343. package/build/components/post-type-support-check/index.js.map +1 -1
  344. package/build/components/post-url/check.js +2 -0
  345. package/build/components/post-url/check.js.map +1 -1
  346. package/build/components/post-url/index.js +3 -1
  347. package/build/components/post-url/index.js.map +1 -1
  348. package/build/components/post-url/label.js +2 -0
  349. package/build/components/post-url/label.js.map +1 -1
  350. package/build/components/post-url/panel.js +3 -1
  351. package/build/components/post-url/panel.js.map +1 -1
  352. package/build/components/post-view-link/index.js +3 -1
  353. package/build/components/post-view-link/index.js.map +1 -1
  354. package/build/components/post-visibility/check.js +2 -0
  355. package/build/components/post-visibility/check.js.map +1 -1
  356. package/build/components/post-visibility/index.js +3 -1
  357. package/build/components/post-visibility/index.js.map +1 -1
  358. package/build/components/post-visibility/label.js +2 -0
  359. package/build/components/post-visibility/label.js.map +1 -1
  360. package/build/components/post-visibility/utils.js +3 -1
  361. package/build/components/post-visibility/utils.js.map +1 -1
  362. package/build/components/posts-per-page/index.js +3 -1
  363. package/build/components/posts-per-page/index.js.map +1 -1
  364. package/build/components/preferences-modal/enable-panel.js +4 -2
  365. package/build/components/preferences-modal/enable-panel.js.map +1 -1
  366. package/build/components/preferences-modal/enable-plugin-document-setting-panel.js +5 -3
  367. package/build/components/preferences-modal/enable-plugin-document-setting-panel.js.map +1 -1
  368. package/build/components/preferences-modal/enable-publish-sidebar.js +4 -2
  369. package/build/components/preferences-modal/enable-publish-sidebar.js.map +1 -1
  370. package/build/components/preferences-modal/index.js +5 -3
  371. package/build/components/preferences-modal/index.js.map +2 -2
  372. package/build/components/preview-dropdown/index.js +3 -1
  373. package/build/components/preview-dropdown/index.js.map +1 -1
  374. package/build/components/provider/disable-non-page-content-blocks.js +2 -0
  375. package/build/components/provider/disable-non-page-content-blocks.js.map +1 -1
  376. package/build/components/provider/index.js +8 -8
  377. package/build/components/provider/index.js.map +3 -3
  378. package/build/components/provider/navigation-block-editing-mode.js +2 -0
  379. package/build/components/provider/navigation-block-editing-mode.js.map +1 -1
  380. package/build/components/provider/use-auto-switch-editor-sidebars.js +2 -0
  381. package/build/components/provider/use-auto-switch-editor-sidebars.js.map +1 -1
  382. package/build/components/provider/use-block-editor-settings.js +5 -3
  383. package/build/components/provider/use-block-editor-settings.js.map +1 -1
  384. package/build/components/provider/use-hide-blocks-from-inserter.js +3 -1
  385. package/build/components/provider/use-hide-blocks-from-inserter.js.map +1 -1
  386. package/build/components/provider/use-post-content-blocks.js +3 -1
  387. package/build/components/provider/use-post-content-blocks.js.map +1 -1
  388. package/build/components/provider/with-registry-provider.js +4 -2
  389. package/build/components/provider/with-registry-provider.js.map +1 -1
  390. package/build/components/resizable-editor/index.js +4 -2
  391. package/build/components/resizable-editor/index.js.map +1 -1
  392. package/build/components/resizable-editor/resize-handle.js +4 -2
  393. package/build/components/resizable-editor/resize-handle.js.map +1 -1
  394. package/build/components/save-publish-panels/index.js +5 -3
  395. package/build/components/save-publish-panels/index.js.map +1 -1
  396. package/build/components/sidebar/constants.js +3 -1
  397. package/build/components/sidebar/constants.js.map +1 -1
  398. package/build/components/sidebar/header.js +5 -3
  399. package/build/components/sidebar/header.js.map +1 -1
  400. package/build/components/sidebar/index.js +7 -5
  401. package/build/components/sidebar/index.js.map +1 -1
  402. package/build/components/sidebar/post-summary.js +4 -2
  403. package/build/components/sidebar/post-summary.js.map +1 -1
  404. package/build/components/site-discussion/index.js +4 -2
  405. package/build/components/site-discussion/index.js.map +1 -1
  406. package/build/components/start-page-options/index.js +7 -6
  407. package/build/components/start-page-options/index.js.map +2 -2
  408. package/build/components/start-template-options/index.js +3 -1
  409. package/build/components/start-template-options/index.js.map +1 -1
  410. package/build/components/style-book/categories.js +88 -0
  411. package/build/components/style-book/categories.js.map +7 -0
  412. package/build/components/style-book/color-examples.js +66 -0
  413. package/build/components/style-book/color-examples.js.map +7 -0
  414. package/build/components/style-book/constants.js +321 -0
  415. package/build/components/style-book/constants.js.map +7 -0
  416. package/build/components/style-book/duotone-examples.js +70 -0
  417. package/build/components/style-book/duotone-examples.js.map +7 -0
  418. package/build/components/style-book/examples.js +239 -0
  419. package/build/components/style-book/examples.js.map +7 -0
  420. package/build/components/style-book/index.js +629 -0
  421. package/build/components/style-book/index.js.map +7 -0
  422. package/build/components/style-book/types.js +19 -0
  423. package/build/components/style-book/types.js.map +7 -0
  424. package/build/components/styles-canvas/index.js +140 -0
  425. package/build/components/styles-canvas/index.js.map +7 -0
  426. package/build/components/styles-canvas/revisions.js +123 -0
  427. package/build/components/styles-canvas/revisions.js.map +7 -0
  428. package/build/components/styles-canvas/style-book.js +70 -0
  429. package/build/components/styles-canvas/style-book.js.map +7 -0
  430. package/build/components/table-of-contents/index.js +3 -1
  431. package/build/components/table-of-contents/index.js.map +1 -1
  432. package/build/components/table-of-contents/panel.js +3 -1
  433. package/build/components/table-of-contents/panel.js.map +1 -1
  434. package/build/components/template-content-panel/index.js +6 -4
  435. package/build/components/template-content-panel/index.js.map +1 -1
  436. package/build/components/template-part-content-panel/index.js +4 -2
  437. package/build/components/template-part-content-panel/index.js.map +1 -1
  438. package/build/components/template-part-menu-items/convert-to-regular.js +3 -1
  439. package/build/components/template-part-menu-items/convert-to-regular.js.map +1 -1
  440. package/build/components/template-part-menu-items/convert-to-template-part.js +3 -1
  441. package/build/components/template-part-menu-items/convert-to-template-part.js.map +1 -1
  442. package/build/components/template-part-menu-items/index.js +3 -1
  443. package/build/components/template-part-menu-items/index.js.map +1 -1
  444. package/build/components/template-validation-notice/index.js +3 -1
  445. package/build/components/template-validation-notice/index.js.map +1 -1
  446. package/build/components/text-editor/index.js +3 -1
  447. package/build/components/text-editor/index.js.map +1 -1
  448. package/build/components/theme-support-check/index.js +2 -0
  449. package/build/components/theme-support-check/index.js.map +1 -1
  450. package/build/components/time-to-read/index.js +4 -2
  451. package/build/components/time-to-read/index.js.map +1 -1
  452. package/build/components/unsaved-changes-warning/index.js +2 -0
  453. package/build/components/unsaved-changes-warning/index.js.map +1 -1
  454. package/build/components/visual-editor/edit-template-blocks-notification.js +3 -1
  455. package/build/components/visual-editor/edit-template-blocks-notification.js.map +1 -1
  456. package/build/components/visual-editor/index.js +7 -4
  457. package/build/components/visual-editor/index.js.map +2 -2
  458. package/build/components/visual-editor/use-select-nearest-editable-block.js +3 -1
  459. package/build/components/visual-editor/use-select-nearest-editable-block.js.map +1 -1
  460. package/build/components/visual-editor/use-zoom-out-mode-exit.js +2 -0
  461. package/build/components/visual-editor/use-zoom-out-mode-exit.js.map +1 -1
  462. package/build/components/word-count/index.js +3 -1
  463. package/build/components/word-count/index.js.map +1 -1
  464. package/build/components/zoom-out-toggle/index.js +4 -2
  465. package/build/components/zoom-out-toggle/index.js.map +1 -1
  466. package/build/dataviews/api.js +2 -0
  467. package/build/dataviews/api.js.map +1 -1
  468. package/build/dataviews/fields/content-preview/content-preview-view.js +4 -2
  469. package/build/dataviews/fields/content-preview/content-preview-view.js.map +2 -2
  470. package/build/dataviews/fields/content-preview/index.js +3 -1
  471. package/build/dataviews/fields/content-preview/index.js.map +1 -1
  472. package/build/dataviews/store/private-actions.js +3 -1
  473. package/build/dataviews/store/private-actions.js.map +1 -1
  474. package/build/dataviews/store/private-selectors.js +3 -1
  475. package/build/dataviews/store/private-selectors.js.map +1 -1
  476. package/build/dataviews/store/reducer.js +2 -0
  477. package/build/dataviews/store/reducer.js.map +1 -1
  478. package/build/hooks/custom-sources-backwards-compatibility.js +4 -2
  479. package/build/hooks/custom-sources-backwards-compatibility.js.map +1 -1
  480. package/build/hooks/default-autocompleters.js +2 -0
  481. package/build/hooks/default-autocompleters.js.map +1 -1
  482. package/build/hooks/index.js +3 -0
  483. package/build/hooks/index.js.map +2 -2
  484. package/build/hooks/media-upload.js +17 -4
  485. package/build/hooks/media-upload.js.map +3 -3
  486. package/build/hooks/navigation-link-view-button.js +5 -3
  487. package/build/hooks/navigation-link-view-button.js.map +1 -1
  488. package/build/hooks/pattern-overrides.js +5 -3
  489. package/build/hooks/pattern-overrides.js.map +1 -1
  490. package/build/hooks/push-changes-to-global-styles/index.js +324 -0
  491. package/build/hooks/push-changes-to-global-styles/index.js.map +7 -0
  492. package/build/hooks/template-part-navigation-edit-button.js +7 -5
  493. package/build/hooks/template-part-navigation-edit-button.js.map +1 -1
  494. package/build/hooks/use-global-styles-output.js +76 -0
  495. package/build/hooks/use-global-styles-output.js.map +7 -0
  496. package/build/index.js +2 -0
  497. package/build/index.js.map +1 -1
  498. package/build/lock-unlock.js +3 -1
  499. package/build/lock-unlock.js.map +1 -1
  500. package/build/private-apis.js +14 -7
  501. package/build/private-apis.js.map +3 -3
  502. package/build/store/actions.js +53 -51
  503. package/build/store/actions.js.map +1 -1
  504. package/build/store/constants.js +15 -13
  505. package/build/store/constants.js.map +1 -1
  506. package/build/store/defaults.js +3 -1
  507. package/build/store/defaults.js.map +1 -1
  508. package/build/store/index.js +4 -2
  509. package/build/store/index.js.map +1 -1
  510. package/build/store/local-autosave.js +2 -0
  511. package/build/store/local-autosave.js.map +1 -1
  512. package/build/store/private-actions.js +32 -7
  513. package/build/store/private-actions.js.map +2 -2
  514. package/build/store/private-selectors.js +20 -8
  515. package/build/store/private-selectors.js.map +2 -2
  516. package/build/store/reducer.js +26 -0
  517. package/build/store/reducer.js.map +2 -2
  518. package/build/store/selectors.js +80 -78
  519. package/build/store/selectors.js.map +2 -2
  520. package/build/store/utils/is-template-revertable.js +2 -0
  521. package/build/store/utils/is-template-revertable.js.map +1 -1
  522. package/build/store/utils/notice-builder.js +2 -0
  523. package/build/store/utils/notice-builder.js.map +1 -1
  524. package/build/utils/get-item-title.js +2 -0
  525. package/build/utils/get-item-title.js.map +1 -1
  526. package/build/utils/get-template-info.js +4 -2
  527. package/build/utils/get-template-info.js.map +1 -1
  528. package/build/utils/get-template-part-icon.js +2 -0
  529. package/build/utils/get-template-part-icon.js.map +1 -1
  530. package/build/utils/index.js +2 -0
  531. package/build/utils/index.js.map +1 -1
  532. package/build/utils/media-sideload/index.js +3 -1
  533. package/build/utils/media-sideload/index.js.map +1 -1
  534. package/build/utils/media-upload/index.js +3 -1
  535. package/build/utils/media-upload/index.js.map +1 -1
  536. package/build/utils/pageTypeBadge.js +2 -0
  537. package/build/utils/pageTypeBadge.js.map +1 -1
  538. package/build/utils/search-templates.js +2 -0
  539. package/build/utils/search-templates.js.map +1 -1
  540. package/build/{components/editor-interface/content-slot-fill.js → utils/set-nested-value.js} +26 -10
  541. package/build/utils/set-nested-value.js.map +7 -0
  542. package/build/utils/terms.js +5 -3
  543. package/build/utils/terms.js.map +1 -1
  544. package/build/utils/url.js +2 -0
  545. package/build/utils/url.js.map +1 -1
  546. package/build-module/bindings/api.js +1 -0
  547. package/build-module/bindings/api.js.map +1 -1
  548. package/build-module/bindings/pattern-overrides.js +2 -1
  549. package/build-module/bindings/pattern-overrides.js.map +1 -1
  550. package/build-module/bindings/post-data.js +3 -2
  551. package/build-module/bindings/post-data.js.map +1 -1
  552. package/build-module/bindings/post-meta.js +1 -0
  553. package/build-module/bindings/post-meta.js.map +1 -1
  554. package/build-module/bindings/term-data.js +2 -1
  555. package/build-module/bindings/term-data.js.map +1 -1
  556. package/build-module/components/autocompleters/index.js +1 -0
  557. package/build-module/components/autocompleters/index.js.map +1 -1
  558. package/build-module/components/autocompleters/user.js +2 -1
  559. package/build-module/components/autocompleters/user.js.map +1 -1
  560. package/build-module/components/autosave-monitor/index.js +3 -2
  561. package/build-module/components/autosave-monitor/index.js.map +1 -1
  562. package/build-module/components/block-removal-warnings/index.js +5 -4
  563. package/build-module/components/block-removal-warnings/index.js.map +1 -1
  564. package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js +5 -4
  565. package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -1
  566. package/build-module/components/block-visibility/index.js +4 -3
  567. package/build-module/components/block-visibility/index.js.map +1 -1
  568. package/build-module/components/blog-title/index.js +3 -2
  569. package/build-module/components/blog-title/index.js.map +1 -1
  570. package/build-module/components/character-count/index.js +1 -0
  571. package/build-module/components/character-count/index.js.map +1 -1
  572. package/build-module/components/collab-sidebar/add-comment.js +9 -8
  573. package/build-module/components/collab-sidebar/add-comment.js.map +2 -2
  574. package/build-module/components/collab-sidebar/comment-author-info.js +2 -1
  575. package/build-module/components/collab-sidebar/comment-author-info.js.map +1 -1
  576. package/build-module/components/collab-sidebar/comment-form.js +2 -1
  577. package/build-module/components/collab-sidebar/comment-form.js.map +1 -1
  578. package/build-module/components/collab-sidebar/comment-indicator-toolbar.js +4 -3
  579. package/build-module/components/collab-sidebar/comment-indicator-toolbar.js.map +1 -1
  580. package/build-module/components/collab-sidebar/comment-menu-item.js +5 -4
  581. package/build-module/components/collab-sidebar/comment-menu-item.js.map +1 -1
  582. package/build-module/components/collab-sidebar/comments.js +39 -31
  583. package/build-module/components/collab-sidebar/comments.js.map +2 -2
  584. package/build-module/components/collab-sidebar/constants.js +4 -3
  585. package/build-module/components/collab-sidebar/constants.js.map +1 -1
  586. package/build-module/components/collab-sidebar/hooks.js +2 -1
  587. package/build-module/components/collab-sidebar/hooks.js.map +1 -1
  588. package/build-module/components/collab-sidebar/index.js +14 -13
  589. package/build-module/components/collab-sidebar/index.js.map +2 -2
  590. package/build-module/components/collab-sidebar/utils.js +4 -6
  591. package/build-module/components/collab-sidebar/utils.js.map +2 -2
  592. package/build-module/components/collapsible-block-toolbar/index.js +3 -2
  593. package/build-module/components/collapsible-block-toolbar/index.js.map +1 -1
  594. package/build-module/components/commands/index.js +5 -4
  595. package/build-module/components/commands/index.js.map +1 -1
  596. package/build-module/components/deprecated.js +54 -53
  597. package/build-module/components/deprecated.js.map +1 -1
  598. package/build-module/components/document-bar/index.js +19 -5
  599. package/build-module/components/document-bar/index.js.map +2 -2
  600. package/build-module/components/document-outline/check.js +1 -0
  601. package/build-module/components/document-outline/check.js.map +1 -1
  602. package/build-module/components/document-outline/index.js +8 -7
  603. package/build-module/components/document-outline/index.js.map +1 -1
  604. package/build-module/components/document-outline/item.js +3 -2
  605. package/build-module/components/document-outline/item.js.map +1 -1
  606. package/build-module/components/document-tools/index.js +2 -1
  607. package/build-module/components/document-tools/index.js.map +1 -1
  608. package/build-module/components/editor/index.js +25 -5
  609. package/build-module/components/editor/index.js.map +2 -2
  610. package/build-module/components/editor-history/redo.js +2 -1
  611. package/build-module/components/editor-history/redo.js.map +1 -1
  612. package/build-module/components/editor-history/undo.js +2 -1
  613. package/build-module/components/editor-history/undo.js.map +1 -1
  614. package/build-module/components/editor-interface/index.js +18 -12
  615. package/build-module/components/editor-interface/index.js.map +2 -2
  616. package/build-module/components/editor-notices/index.js +2 -1
  617. package/build-module/components/editor-notices/index.js.map +1 -1
  618. package/build-module/components/editor-snackbars/index.js +3 -2
  619. package/build-module/components/editor-snackbars/index.js.map +1 -1
  620. package/build-module/components/entities-saved-states/entity-record-item.js +2 -1
  621. package/build-module/components/entities-saved-states/entity-record-item.js.map +1 -1
  622. package/build-module/components/entities-saved-states/entity-type-list.js +20 -15
  623. package/build-module/components/entities-saved-states/entity-type-list.js.map +2 -2
  624. package/build-module/components/entities-saved-states/hooks/use-is-dirty.js +2 -1
  625. package/build-module/components/entities-saved-states/hooks/use-is-dirty.js.map +1 -1
  626. package/build-module/components/entities-saved-states/index.js +2 -1
  627. package/build-module/components/entities-saved-states/index.js.map +1 -1
  628. package/build-module/components/error-boundary/index.js +4 -3
  629. package/build-module/components/error-boundary/index.js.map +1 -1
  630. package/build-module/components/global-keyboard-shortcuts/index.js +1 -0
  631. package/build-module/components/global-keyboard-shortcuts/index.js.map +1 -1
  632. package/build-module/components/global-keyboard-shortcuts/register-shortcuts.js +2 -1
  633. package/build-module/components/global-keyboard-shortcuts/register-shortcuts.js.map +1 -1
  634. package/build-module/components/global-styles/block-link.js +47 -0
  635. package/build-module/components/global-styles/block-link.js.map +7 -0
  636. package/build-module/components/global-styles/header.js +42 -0
  637. package/build-module/components/global-styles/header.js.map +7 -0
  638. package/build-module/components/global-styles/hooks.js +155 -0
  639. package/build-module/components/global-styles/hooks.js.map +7 -0
  640. package/build-module/components/global-styles/index.js +113 -0
  641. package/build-module/components/global-styles/index.js.map +7 -0
  642. package/build-module/components/global-styles/menu.js +72 -0
  643. package/build-module/components/global-styles/menu.js.map +7 -0
  644. package/build-module/components/global-styles-provider/index.js +4 -37
  645. package/build-module/components/global-styles-provider/index.js.map +2 -2
  646. package/build-module/components/global-styles-renderer/index.js +32 -0
  647. package/build-module/components/global-styles-renderer/index.js.map +7 -0
  648. package/build-module/components/global-styles-sidebar/default-sidebar.js +50 -0
  649. package/build-module/components/global-styles-sidebar/default-sidebar.js.map +7 -0
  650. package/build-module/components/global-styles-sidebar/index.js +153 -0
  651. package/build-module/components/global-styles-sidebar/index.js.map +7 -0
  652. package/build-module/components/global-styles-sidebar/welcome-guide-image.js +18 -0
  653. package/build-module/components/global-styles-sidebar/welcome-guide-image.js.map +7 -0
  654. package/build-module/components/global-styles-sidebar/welcome-guide.js +114 -0
  655. package/build-module/components/global-styles-sidebar/welcome-guide.js.map +7 -0
  656. package/build-module/components/header/back-button.js +7 -6
  657. package/build-module/components/header/back-button.js.map +1 -1
  658. package/build-module/components/header/index.js +16 -12
  659. package/build-module/components/header/index.js.map +2 -2
  660. package/build-module/components/index.js +3 -2
  661. package/build-module/components/index.js.map +1 -1
  662. package/build-module/components/inserter-sidebar/index.js +3 -2
  663. package/build-module/components/inserter-sidebar/index.js.map +1 -1
  664. package/build-module/components/keyboard-shortcut-help-modal/config.js +2 -1
  665. package/build-module/components/keyboard-shortcut-help-modal/config.js.map +1 -1
  666. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +2 -1
  667. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
  668. package/build-module/components/keyboard-shortcut-help-modal/index.js +6 -5
  669. package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  670. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +5 -4
  671. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
  672. package/build-module/components/list-view-sidebar/index.js +3 -2
  673. package/build-module/components/list-view-sidebar/index.js.map +1 -1
  674. package/build-module/components/list-view-sidebar/list-view-outline.js +2 -1
  675. package/build-module/components/list-view-sidebar/list-view-outline.js.map +1 -1
  676. package/build-module/components/local-autosave-monitor/index.js +5 -4
  677. package/build-module/components/local-autosave-monitor/index.js.map +1 -1
  678. package/build-module/components/media-categories/index.js +7 -6
  679. package/build-module/components/media-categories/index.js.map +1 -1
  680. package/build-module/components/mode-switcher/index.js +3 -2
  681. package/build-module/components/mode-switcher/index.js.map +1 -1
  682. package/build-module/components/more-menu/copy-content-menu-item.js +2 -1
  683. package/build-module/components/more-menu/copy-content-menu-item.js.map +1 -1
  684. package/build-module/components/more-menu/index.js +2 -1
  685. package/build-module/components/more-menu/index.js.map +1 -1
  686. package/build-module/components/more-menu/tools-more-menu-group.js +3 -2
  687. package/build-module/components/more-menu/tools-more-menu-group.js.map +1 -1
  688. package/build-module/components/more-menu/view-more-menu-group.js +3 -2
  689. package/build-module/components/more-menu/view-more-menu-group.js.map +1 -1
  690. package/build-module/components/page-attributes/check.js +1 -0
  691. package/build-module/components/page-attributes/check.js.map +1 -1
  692. package/build-module/components/page-attributes/order.js +2 -1
  693. package/build-module/components/page-attributes/order.js.map +1 -1
  694. package/build-module/components/page-attributes/panel.js +3 -2
  695. package/build-module/components/page-attributes/panel.js.map +1 -1
  696. package/build-module/components/page-attributes/parent.js +3 -2
  697. package/build-module/components/page-attributes/parent.js.map +1 -1
  698. package/build-module/components/pattern-duplicate-modal/index.js +4 -3
  699. package/build-module/components/pattern-duplicate-modal/index.js.map +1 -1
  700. package/build-module/components/pattern-overrides-panel/index.js +3 -2
  701. package/build-module/components/pattern-overrides-panel/index.js.map +1 -1
  702. package/build-module/components/pattern-rename-modal/index.js +4 -3
  703. package/build-module/components/pattern-rename-modal/index.js.map +1 -1
  704. package/build-module/components/plugin-document-setting-panel/index.js +4 -3
  705. package/build-module/components/plugin-document-setting-panel/index.js.map +1 -1
  706. package/build-module/components/plugin-more-menu-item/index.js +2 -1
  707. package/build-module/components/plugin-more-menu-item/index.js.map +1 -1
  708. package/build-module/components/plugin-post-publish-panel/index.js +4 -3
  709. package/build-module/components/plugin-post-publish-panel/index.js.map +1 -1
  710. package/build-module/components/plugin-post-status-info/index.js +4 -3
  711. package/build-module/components/plugin-post-status-info/index.js.map +1 -1
  712. package/build-module/components/plugin-pre-publish-panel/index.js +4 -3
  713. package/build-module/components/plugin-pre-publish-panel/index.js.map +1 -1
  714. package/build-module/components/plugin-preview-menu-item/index.js +2 -1
  715. package/build-module/components/plugin-preview-menu-item/index.js.map +1 -1
  716. package/build-module/components/plugin-sidebar/index.js +2 -1
  717. package/build-module/components/plugin-sidebar/index.js.map +1 -1
  718. package/build-module/components/plugin-sidebar-more-menu-item/index.js +2 -1
  719. package/build-module/components/plugin-sidebar-more-menu-item/index.js.map +1 -1
  720. package/build-module/components/post-actions/actions.js +2 -1
  721. package/build-module/components/post-actions/actions.js.map +1 -1
  722. package/build-module/components/post-actions/index.js +3 -2
  723. package/build-module/components/post-actions/index.js.map +1 -1
  724. package/build-module/components/post-actions/set-as-homepage.js +4 -3
  725. package/build-module/components/post-actions/set-as-homepage.js.map +1 -1
  726. package/build-module/components/post-actions/set-as-posts-page.js +4 -3
  727. package/build-module/components/post-actions/set-as-posts-page.js.map +1 -1
  728. package/build-module/components/post-author/check.js +2 -1
  729. package/build-module/components/post-author/check.js.map +1 -1
  730. package/build-module/components/post-author/combobox.js +2 -1
  731. package/build-module/components/post-author/combobox.js.map +1 -1
  732. package/build-module/components/post-author/constants.js +3 -2
  733. package/build-module/components/post-author/constants.js.map +1 -1
  734. package/build-module/components/post-author/hook.js +1 -0
  735. package/build-module/components/post-author/hook.js.map +1 -1
  736. package/build-module/components/post-author/index.js +3 -2
  737. package/build-module/components/post-author/index.js.map +1 -1
  738. package/build-module/components/post-author/panel.js +2 -1
  739. package/build-module/components/post-author/panel.js.map +1 -1
  740. package/build-module/components/post-author/select.js +2 -1
  741. package/build-module/components/post-author/select.js.map +1 -1
  742. package/build-module/components/post-card-panel/index.js +3 -2
  743. package/build-module/components/post-card-panel/index.js.map +1 -1
  744. package/build-module/components/post-comments/index.js +3 -2
  745. package/build-module/components/post-comments/index.js.map +1 -1
  746. package/build-module/components/post-content-information/index.js +3 -2
  747. package/build-module/components/post-content-information/index.js.map +1 -1
  748. package/build-module/components/post-discussion/panel.js +3 -2
  749. package/build-module/components/post-discussion/panel.js.map +1 -1
  750. package/build-module/components/post-excerpt/check.js +2 -1
  751. package/build-module/components/post-excerpt/check.js.map +1 -1
  752. package/build-module/components/post-excerpt/index.js +2 -1
  753. package/build-module/components/post-excerpt/index.js.map +1 -1
  754. package/build-module/components/post-excerpt/panel.js +3 -2
  755. package/build-module/components/post-excerpt/panel.js.map +1 -1
  756. package/build-module/components/post-excerpt/plugin.js +4 -3
  757. package/build-module/components/post-excerpt/plugin.js.map +1 -1
  758. package/build-module/components/post-featured-image/check.js +2 -1
  759. package/build-module/components/post-featured-image/check.js.map +1 -1
  760. package/build-module/components/post-featured-image/index.js +42 -9
  761. package/build-module/components/post-featured-image/index.js.map +2 -2
  762. package/build-module/components/post-featured-image/panel.js +3 -2
  763. package/build-module/components/post-featured-image/panel.js.map +1 -1
  764. package/build-module/components/post-fields/index.js +1 -0
  765. package/build-module/components/post-fields/index.js.map +1 -1
  766. package/build-module/components/post-format/check.js +2 -1
  767. package/build-module/components/post-format/check.js.map +1 -1
  768. package/build-module/components/post-format/index.js +3 -2
  769. package/build-module/components/post-format/index.js.map +1 -1
  770. package/build-module/components/post-format/panel.js +2 -1
  771. package/build-module/components/post-format/panel.js.map +1 -1
  772. package/build-module/components/post-last-edited-panel/index.js +2 -1
  773. package/build-module/components/post-last-edited-panel/index.js.map +1 -1
  774. package/build-module/components/post-last-revision/check.js +2 -1
  775. package/build-module/components/post-last-revision/check.js.map +1 -1
  776. package/build-module/components/post-last-revision/index.js +2 -1
  777. package/build-module/components/post-last-revision/index.js.map +1 -1
  778. package/build-module/components/post-last-revision/panel.js +2 -1
  779. package/build-module/components/post-last-revision/panel.js.map +1 -1
  780. package/build-module/components/post-locked-modal/index.js +2 -1
  781. package/build-module/components/post-locked-modal/index.js.map +1 -1
  782. package/build-module/components/post-panel-row/index.js +3 -2
  783. package/build-module/components/post-panel-row/index.js.map +1 -1
  784. package/build-module/components/post-panel-section/index.js +2 -1
  785. package/build-module/components/post-panel-section/index.js.map +1 -1
  786. package/build-module/components/post-pending-status/check.js +1 -0
  787. package/build-module/components/post-pending-status/check.js.map +1 -1
  788. package/build-module/components/post-pending-status/index.js +2 -1
  789. package/build-module/components/post-pending-status/index.js.map +1 -1
  790. package/build-module/components/post-pingbacks/index.js +2 -1
  791. package/build-module/components/post-pingbacks/index.js.map +1 -1
  792. package/build-module/components/post-preview-button/index.js +2 -1
  793. package/build-module/components/post-preview-button/index.js.map +1 -1
  794. package/build-module/components/post-publish-button/index.js +5 -4
  795. package/build-module/components/post-publish-button/index.js.map +1 -1
  796. package/build-module/components/post-publish-button/label.js +1 -0
  797. package/build-module/components/post-publish-button/label.js.map +1 -1
  798. package/build-module/components/post-publish-button/post-publish-button-or-toggle.js +4 -3
  799. package/build-module/components/post-publish-button/post-publish-button-or-toggle.js.map +1 -1
  800. package/build-module/components/post-publish-panel/index.js +4 -3
  801. package/build-module/components/post-publish-panel/index.js.map +1 -1
  802. package/build-module/components/post-publish-panel/maybe-category-panel.js +2 -1
  803. package/build-module/components/post-publish-panel/maybe-category-panel.js.map +1 -1
  804. package/build-module/components/post-publish-panel/maybe-post-format-panel.js +4 -3
  805. package/build-module/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
  806. package/build-module/components/post-publish-panel/maybe-tags-panel.js +4 -3
  807. package/build-module/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
  808. package/build-module/components/post-publish-panel/maybe-upload-media.js +2 -1
  809. package/build-module/components/post-publish-panel/maybe-upload-media.js.map +1 -1
  810. package/build-module/components/post-publish-panel/media-util.js +1 -0
  811. package/build-module/components/post-publish-panel/media-util.js.map +1 -1
  812. package/build-module/components/post-publish-panel/postpublish.js +5 -4
  813. package/build-module/components/post-publish-panel/postpublish.js.map +1 -1
  814. package/build-module/components/post-publish-panel/prepublish.js +2 -1
  815. package/build-module/components/post-publish-panel/prepublish.js.map +1 -1
  816. package/build-module/components/post-saved-state/index.js +2 -1
  817. package/build-module/components/post-saved-state/index.js.map +1 -1
  818. package/build-module/components/post-schedule/check.js +1 -0
  819. package/build-module/components/post-schedule/check.js.map +1 -1
  820. package/build-module/components/post-schedule/index.js +3 -2
  821. package/build-module/components/post-schedule/index.js.map +1 -1
  822. package/build-module/components/post-schedule/label.js +1 -0
  823. package/build-module/components/post-schedule/label.js.map +1 -1
  824. package/build-module/components/post-schedule/panel.js +3 -2
  825. package/build-module/components/post-schedule/panel.js.map +1 -1
  826. package/build-module/components/post-status/index.js +5 -4
  827. package/build-module/components/post-status/index.js.map +1 -1
  828. package/build-module/components/post-sticky/check.js +1 -0
  829. package/build-module/components/post-sticky/check.js.map +1 -1
  830. package/build-module/components/post-sticky/index.js +2 -1
  831. package/build-module/components/post-sticky/index.js.map +1 -1
  832. package/build-module/components/post-sticky/panel.js +2 -1
  833. package/build-module/components/post-sticky/panel.js.map +1 -1
  834. package/build-module/components/post-switch-to-draft-button/index.js +2 -1
  835. package/build-module/components/post-switch-to-draft-button/index.js.map +1 -1
  836. package/build-module/components/post-sync-status/index.js +2 -1
  837. package/build-module/components/post-sync-status/index.js.map +1 -1
  838. package/build-module/components/post-taxonomies/check.js +1 -0
  839. package/build-module/components/post-taxonomies/check.js.map +1 -1
  840. package/build-module/components/post-taxonomies/flat-term-selector.js +8 -7
  841. package/build-module/components/post-taxonomies/flat-term-selector.js.map +1 -1
  842. package/build-module/components/post-taxonomies/hierarchical-term-selector.js +7 -6
  843. package/build-module/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
  844. package/build-module/components/post-taxonomies/index.js +3 -2
  845. package/build-module/components/post-taxonomies/index.js.map +1 -1
  846. package/build-module/components/post-taxonomies/most-used-terms.js +4 -3
  847. package/build-module/components/post-taxonomies/most-used-terms.js.map +1 -1
  848. package/build-module/components/post-taxonomies/panel.js +2 -1
  849. package/build-module/components/post-taxonomies/panel.js.map +1 -1
  850. package/build-module/components/post-template/block-theme.js +2 -1
  851. package/build-module/components/post-template/block-theme.js.map +1 -1
  852. package/build-module/components/post-template/classic-theme.js +2 -1
  853. package/build-module/components/post-template/classic-theme.js.map +1 -1
  854. package/build-module/components/post-template/create-new-template-modal.js +3 -2
  855. package/build-module/components/post-template/create-new-template-modal.js.map +1 -1
  856. package/build-module/components/post-template/create-new-template.js +2 -1
  857. package/build-module/components/post-template/create-new-template.js.map +1 -1
  858. package/build-module/components/post-template/hooks.js +1 -0
  859. package/build-module/components/post-template/hooks.js.map +1 -1
  860. package/build-module/components/post-template/panel.js +2 -1
  861. package/build-module/components/post-template/panel.js.map +1 -1
  862. package/build-module/components/post-template/reset-default-template.js +2 -1
  863. package/build-module/components/post-template/reset-default-template.js.map +1 -1
  864. package/build-module/components/post-template/swap-template-button.js +2 -1
  865. package/build-module/components/post-template/swap-template-button.js.map +1 -1
  866. package/build-module/components/post-text-editor/index.js +2 -1
  867. package/build-module/components/post-text-editor/index.js.map +1 -1
  868. package/build-module/components/post-title/constants.js +3 -2
  869. package/build-module/components/post-title/constants.js.map +1 -1
  870. package/build-module/components/post-title/index.js +3 -2
  871. package/build-module/components/post-title/index.js.map +1 -1
  872. package/build-module/components/post-title/post-title-raw.js +2 -1
  873. package/build-module/components/post-title/post-title-raw.js.map +1 -1
  874. package/build-module/components/post-title/use-post-title-focus.js +1 -0
  875. package/build-module/components/post-title/use-post-title-focus.js.map +1 -1
  876. package/build-module/components/post-title/use-post-title.js +1 -0
  877. package/build-module/components/post-title/use-post-title.js.map +1 -1
  878. package/build-module/components/post-transform-panel/hooks.js +2 -1
  879. package/build-module/components/post-transform-panel/hooks.js.map +1 -1
  880. package/build-module/components/post-transform-panel/index.js +2 -1
  881. package/build-module/components/post-transform-panel/index.js.map +1 -1
  882. package/build-module/components/post-trash/check.js +1 -0
  883. package/build-module/components/post-trash/check.js.map +1 -1
  884. package/build-module/components/post-trash/index.js +2 -1
  885. package/build-module/components/post-trash/index.js.map +1 -1
  886. package/build-module/components/post-type-support-check/index.js +1 -0
  887. package/build-module/components/post-type-support-check/index.js.map +1 -1
  888. package/build-module/components/post-url/check.js +1 -0
  889. package/build-module/components/post-url/check.js.map +1 -1
  890. package/build-module/components/post-url/index.js +2 -1
  891. package/build-module/components/post-url/index.js.map +1 -1
  892. package/build-module/components/post-url/label.js +1 -0
  893. package/build-module/components/post-url/label.js.map +1 -1
  894. package/build-module/components/post-url/panel.js +2 -1
  895. package/build-module/components/post-url/panel.js.map +1 -1
  896. package/build-module/components/post-view-link/index.js +2 -1
  897. package/build-module/components/post-view-link/index.js.map +1 -1
  898. package/build-module/components/post-visibility/check.js +1 -0
  899. package/build-module/components/post-visibility/check.js.map +1 -1
  900. package/build-module/components/post-visibility/index.js +2 -1
  901. package/build-module/components/post-visibility/index.js.map +1 -1
  902. package/build-module/components/post-visibility/label.js +1 -0
  903. package/build-module/components/post-visibility/label.js.map +1 -1
  904. package/build-module/components/post-visibility/utils.js +2 -1
  905. package/build-module/components/post-visibility/utils.js.map +1 -1
  906. package/build-module/components/posts-per-page/index.js +2 -1
  907. package/build-module/components/posts-per-page/index.js.map +1 -1
  908. package/build-module/components/preferences-modal/enable-panel.js +3 -2
  909. package/build-module/components/preferences-modal/enable-panel.js.map +1 -1
  910. package/build-module/components/preferences-modal/enable-plugin-document-setting-panel.js +4 -3
  911. package/build-module/components/preferences-modal/enable-plugin-document-setting-panel.js.map +1 -1
  912. package/build-module/components/preferences-modal/enable-publish-sidebar.js +3 -2
  913. package/build-module/components/preferences-modal/enable-publish-sidebar.js.map +1 -1
  914. package/build-module/components/preferences-modal/index.js +4 -3
  915. package/build-module/components/preferences-modal/index.js.map +2 -2
  916. package/build-module/components/preview-dropdown/index.js +2 -1
  917. package/build-module/components/preview-dropdown/index.js.map +1 -1
  918. package/build-module/components/provider/disable-non-page-content-blocks.js +1 -0
  919. package/build-module/components/provider/disable-non-page-content-blocks.js.map +1 -1
  920. package/build-module/components/provider/index.js +7 -8
  921. package/build-module/components/provider/index.js.map +2 -2
  922. package/build-module/components/provider/navigation-block-editing-mode.js +1 -0
  923. package/build-module/components/provider/navigation-block-editing-mode.js.map +1 -1
  924. package/build-module/components/provider/use-auto-switch-editor-sidebars.js +1 -0
  925. package/build-module/components/provider/use-auto-switch-editor-sidebars.js.map +1 -1
  926. package/build-module/components/provider/use-block-editor-settings.js +4 -3
  927. package/build-module/components/provider/use-block-editor-settings.js.map +1 -1
  928. package/build-module/components/provider/use-hide-blocks-from-inserter.js +2 -1
  929. package/build-module/components/provider/use-hide-blocks-from-inserter.js.map +1 -1
  930. package/build-module/components/provider/use-post-content-blocks.js +2 -1
  931. package/build-module/components/provider/use-post-content-blocks.js.map +1 -1
  932. package/build-module/components/provider/with-registry-provider.js +3 -2
  933. package/build-module/components/provider/with-registry-provider.js.map +1 -1
  934. package/build-module/components/resizable-editor/index.js +3 -2
  935. package/build-module/components/resizable-editor/index.js.map +1 -1
  936. package/build-module/components/resizable-editor/resize-handle.js +3 -2
  937. package/build-module/components/resizable-editor/resize-handle.js.map +1 -1
  938. package/build-module/components/save-publish-panels/index.js +4 -3
  939. package/build-module/components/save-publish-panels/index.js.map +1 -1
  940. package/build-module/components/sidebar/constants.js +2 -1
  941. package/build-module/components/sidebar/constants.js.map +1 -1
  942. package/build-module/components/sidebar/header.js +4 -3
  943. package/build-module/components/sidebar/header.js.map +1 -1
  944. package/build-module/components/sidebar/index.js +6 -5
  945. package/build-module/components/sidebar/index.js.map +1 -1
  946. package/build-module/components/sidebar/post-summary.js +3 -2
  947. package/build-module/components/sidebar/post-summary.js.map +1 -1
  948. package/build-module/components/site-discussion/index.js +3 -2
  949. package/build-module/components/site-discussion/index.js.map +1 -1
  950. package/build-module/components/start-page-options/index.js +7 -7
  951. package/build-module/components/start-page-options/index.js.map +2 -2
  952. package/build-module/components/start-template-options/index.js +2 -1
  953. package/build-module/components/start-template-options/index.js.map +1 -1
  954. package/build-module/components/style-book/categories.js +65 -0
  955. package/build-module/components/style-book/categories.js.map +7 -0
  956. package/build-module/components/style-book/color-examples.js +38 -0
  957. package/build-module/components/style-book/color-examples.js.map +7 -0
  958. package/build-module/components/style-book/constants.js +291 -0
  959. package/build-module/components/style-book/constants.js.map +7 -0
  960. package/build-module/components/style-book/duotone-examples.js +49 -0
  961. package/build-module/components/style-book/duotone-examples.js.map +7 -0
  962. package/build-module/components/style-book/examples.js +209 -0
  963. package/build-module/components/style-book/examples.js.map +7 -0
  964. package/build-module/components/style-book/index.js +619 -0
  965. package/build-module/components/style-book/index.js.map +7 -0
  966. package/build-module/components/style-book/types.js +1 -0
  967. package/build-module/components/style-book/types.js.map +7 -0
  968. package/build-module/components/styles-canvas/index.js +105 -0
  969. package/build-module/components/styles-canvas/index.js.map +7 -0
  970. package/build-module/components/styles-canvas/revisions.js +108 -0
  971. package/build-module/components/styles-canvas/revisions.js.map +7 -0
  972. package/build-module/components/styles-canvas/style-book.js +39 -0
  973. package/build-module/components/styles-canvas/style-book.js.map +7 -0
  974. package/build-module/components/table-of-contents/index.js +2 -1
  975. package/build-module/components/table-of-contents/index.js.map +1 -1
  976. package/build-module/components/table-of-contents/panel.js +2 -1
  977. package/build-module/components/table-of-contents/panel.js.map +1 -1
  978. package/build-module/components/template-content-panel/index.js +5 -4
  979. package/build-module/components/template-content-panel/index.js.map +1 -1
  980. package/build-module/components/template-part-content-panel/index.js +3 -2
  981. package/build-module/components/template-part-content-panel/index.js.map +1 -1
  982. package/build-module/components/template-part-menu-items/convert-to-regular.js +2 -1
  983. package/build-module/components/template-part-menu-items/convert-to-regular.js.map +1 -1
  984. package/build-module/components/template-part-menu-items/convert-to-template-part.js +2 -1
  985. package/build-module/components/template-part-menu-items/convert-to-template-part.js.map +1 -1
  986. package/build-module/components/template-part-menu-items/index.js +2 -1
  987. package/build-module/components/template-part-menu-items/index.js.map +1 -1
  988. package/build-module/components/template-validation-notice/index.js +2 -1
  989. package/build-module/components/template-validation-notice/index.js.map +1 -1
  990. package/build-module/components/text-editor/index.js +2 -1
  991. package/build-module/components/text-editor/index.js.map +1 -1
  992. package/build-module/components/theme-support-check/index.js +1 -0
  993. package/build-module/components/theme-support-check/index.js.map +1 -1
  994. package/build-module/components/time-to-read/index.js +3 -2
  995. package/build-module/components/time-to-read/index.js.map +1 -1
  996. package/build-module/components/unsaved-changes-warning/index.js +1 -0
  997. package/build-module/components/unsaved-changes-warning/index.js.map +1 -1
  998. package/build-module/components/visual-editor/edit-template-blocks-notification.js +2 -1
  999. package/build-module/components/visual-editor/edit-template-blocks-notification.js.map +1 -1
  1000. package/build-module/components/visual-editor/index.js +6 -4
  1001. package/build-module/components/visual-editor/index.js.map +2 -2
  1002. package/build-module/components/visual-editor/use-select-nearest-editable-block.js +2 -1
  1003. package/build-module/components/visual-editor/use-select-nearest-editable-block.js.map +1 -1
  1004. package/build-module/components/visual-editor/use-zoom-out-mode-exit.js +1 -0
  1005. package/build-module/components/visual-editor/use-zoom-out-mode-exit.js.map +1 -1
  1006. package/build-module/components/word-count/index.js +2 -1
  1007. package/build-module/components/word-count/index.js.map +1 -1
  1008. package/build-module/components/zoom-out-toggle/index.js +3 -2
  1009. package/build-module/components/zoom-out-toggle/index.js.map +1 -1
  1010. package/build-module/dataviews/api.js +1 -0
  1011. package/build-module/dataviews/api.js.map +1 -1
  1012. package/build-module/dataviews/fields/content-preview/content-preview-view.js +3 -2
  1013. package/build-module/dataviews/fields/content-preview/content-preview-view.js.map +2 -2
  1014. package/build-module/dataviews/fields/content-preview/index.js +2 -1
  1015. package/build-module/dataviews/fields/content-preview/index.js.map +1 -1
  1016. package/build-module/dataviews/store/private-actions.js +2 -1
  1017. package/build-module/dataviews/store/private-actions.js.map +1 -1
  1018. package/build-module/dataviews/store/private-selectors.js +2 -1
  1019. package/build-module/dataviews/store/private-selectors.js.map +1 -1
  1020. package/build-module/dataviews/store/reducer.js +1 -0
  1021. package/build-module/dataviews/store/reducer.js.map +1 -1
  1022. package/build-module/hooks/custom-sources-backwards-compatibility.js +3 -2
  1023. package/build-module/hooks/custom-sources-backwards-compatibility.js.map +1 -1
  1024. package/build-module/hooks/default-autocompleters.js +1 -0
  1025. package/build-module/hooks/default-autocompleters.js.map +1 -1
  1026. package/build-module/hooks/index.js +2 -0
  1027. package/build-module/hooks/index.js.map +2 -2
  1028. package/build-module/hooks/media-upload.js +20 -5
  1029. package/build-module/hooks/media-upload.js.map +2 -2
  1030. package/build-module/hooks/navigation-link-view-button.js +4 -3
  1031. package/build-module/hooks/navigation-link-view-button.js.map +1 -1
  1032. package/build-module/hooks/pattern-overrides.js +4 -3
  1033. package/build-module/hooks/pattern-overrides.js.map +1 -1
  1034. package/build-module/hooks/push-changes-to-global-styles/index.js +310 -0
  1035. package/build-module/hooks/push-changes-to-global-styles/index.js.map +7 -0
  1036. package/build-module/hooks/template-part-navigation-edit-button.js +6 -5
  1037. package/build-module/hooks/template-part-navigation-edit-button.js.map +1 -1
  1038. package/build-module/hooks/use-global-styles-output.js +50 -0
  1039. package/build-module/hooks/use-global-styles-output.js.map +7 -0
  1040. package/build-module/index.js +1 -0
  1041. package/build-module/index.js.map +1 -1
  1042. package/build-module/lock-unlock.js +2 -1
  1043. package/build-module/lock-unlock.js.map +1 -1
  1044. package/build-module/private-apis.js +13 -10
  1045. package/build-module/private-apis.js.map +2 -2
  1046. package/build-module/store/actions.js +52 -51
  1047. package/build-module/store/actions.js.map +1 -1
  1048. package/build-module/store/constants.js +14 -13
  1049. package/build-module/store/constants.js.map +1 -1
  1050. package/build-module/store/defaults.js +2 -1
  1051. package/build-module/store/defaults.js.map +1 -1
  1052. package/build-module/store/index.js +3 -2
  1053. package/build-module/store/index.js.map +1 -1
  1054. package/build-module/store/local-autosave.js +1 -0
  1055. package/build-module/store/local-autosave.js.map +1 -1
  1056. package/build-module/store/private-actions.js +28 -7
  1057. package/build-module/store/private-actions.js.map +2 -2
  1058. package/build-module/store/private-selectors.js +17 -8
  1059. package/build-module/store/private-selectors.js.map +2 -2
  1060. package/build-module/store/reducer.js +23 -0
  1061. package/build-module/store/reducer.js.map +2 -2
  1062. package/build-module/store/selectors.js +79 -78
  1063. package/build-module/store/selectors.js.map +2 -2
  1064. package/build-module/store/utils/is-template-revertable.js +1 -0
  1065. package/build-module/store/utils/is-template-revertable.js.map +1 -1
  1066. package/build-module/store/utils/notice-builder.js +1 -0
  1067. package/build-module/store/utils/notice-builder.js.map +1 -1
  1068. package/build-module/utils/get-item-title.js +1 -0
  1069. package/build-module/utils/get-item-title.js.map +1 -1
  1070. package/build-module/utils/get-template-info.js +3 -2
  1071. package/build-module/utils/get-template-info.js.map +1 -1
  1072. package/build-module/utils/get-template-part-icon.js +1 -0
  1073. package/build-module/utils/get-template-part-icon.js.map +1 -1
  1074. package/build-module/utils/index.js +1 -0
  1075. package/build-module/utils/index.js.map +1 -1
  1076. package/build-module/utils/media-sideload/index.js +2 -1
  1077. package/build-module/utils/media-sideload/index.js.map +1 -1
  1078. package/build-module/utils/media-upload/index.js +2 -1
  1079. package/build-module/utils/media-upload/index.js.map +1 -1
  1080. package/build-module/utils/pageTypeBadge.js +1 -0
  1081. package/build-module/utils/pageTypeBadge.js.map +1 -1
  1082. package/build-module/utils/search-templates.js +1 -0
  1083. package/build-module/utils/search-templates.js.map +1 -1
  1084. package/build-module/utils/set-nested-value.js +24 -0
  1085. package/build-module/utils/set-nested-value.js.map +7 -0
  1086. package/build-module/utils/terms.js +4 -3
  1087. package/build-module/utils/terms.js.map +1 -1
  1088. package/build-module/utils/url.js +1 -0
  1089. package/build-module/utils/url.js.map +1 -1
  1090. package/build-style/style-rtl.css +3020 -13
  1091. package/build-style/style.css +3021 -13
  1092. package/build-types/components/collab-sidebar/add-comment.d.ts +3 -3
  1093. package/build-types/components/collab-sidebar/add-comment.d.ts.map +1 -1
  1094. package/build-types/components/collab-sidebar/comments.d.ts +3 -3
  1095. package/build-types/components/collab-sidebar/comments.d.ts.map +1 -1
  1096. package/build-types/components/collab-sidebar/index.d.ts.map +1 -1
  1097. package/build-types/components/collab-sidebar/utils.d.ts +2 -2
  1098. package/build-types/components/collab-sidebar/utils.d.ts.map +1 -1
  1099. package/build-types/components/document-bar/index.d.ts +2 -2
  1100. package/build-types/components/document-bar/index.d.ts.map +1 -1
  1101. package/build-types/components/editor/index.d.ts.map +1 -1
  1102. package/build-types/components/editor-interface/index.d.ts +1 -3
  1103. package/build-types/components/editor-interface/index.d.ts.map +1 -1
  1104. package/build-types/components/entities-saved-states/entity-type-list.d.ts.map +1 -1
  1105. package/build-types/components/global-styles/block-link.d.ts +12 -0
  1106. package/build-types/components/global-styles/block-link.d.ts.map +1 -0
  1107. package/build-types/components/global-styles/header.d.ts +7 -0
  1108. package/build-types/components/global-styles/header.d.ts.map +1 -0
  1109. package/build-types/components/global-styles/hooks.d.ts +24 -0
  1110. package/build-types/components/global-styles/hooks.d.ts.map +1 -0
  1111. package/build-types/components/global-styles/index.d.ts +6 -0
  1112. package/build-types/components/global-styles/index.d.ts.map +1 -0
  1113. package/build-types/components/global-styles/menu.d.ts +13 -0
  1114. package/build-types/components/global-styles/menu.d.ts.map +1 -0
  1115. package/build-types/components/global-styles-provider/index.d.ts +1 -5
  1116. package/build-types/components/global-styles-provider/index.d.ts.map +1 -1
  1117. package/build-types/components/global-styles-renderer/index.d.ts +4 -0
  1118. package/build-types/components/global-styles-renderer/index.d.ts.map +1 -0
  1119. package/build-types/components/global-styles-sidebar/default-sidebar.d.ts +13 -0
  1120. package/build-types/components/global-styles-sidebar/default-sidebar.d.ts.map +1 -0
  1121. package/build-types/components/global-styles-sidebar/index.d.ts +2 -0
  1122. package/build-types/components/global-styles-sidebar/index.d.ts.map +1 -0
  1123. package/build-types/components/global-styles-sidebar/welcome-guide-image.d.ts +5 -0
  1124. package/build-types/components/global-styles-sidebar/welcome-guide-image.d.ts.map +1 -0
  1125. package/build-types/components/global-styles-sidebar/welcome-guide.d.ts +2 -0
  1126. package/build-types/components/global-styles-sidebar/welcome-guide.d.ts.map +1 -0
  1127. package/build-types/components/header/index.d.ts +1 -3
  1128. package/build-types/components/header/index.d.ts.map +1 -1
  1129. package/build-types/components/provider/index.d.ts.map +1 -1
  1130. package/build-types/components/start-page-options/index.d.ts.map +1 -1
  1131. package/build-types/components/style-book/categories.d.ts +18 -0
  1132. package/build-types/components/style-book/categories.d.ts.map +1 -0
  1133. package/build-types/components/style-book/color-examples.d.ts +7 -0
  1134. package/build-types/components/style-book/color-examples.d.ts.map +1 -0
  1135. package/build-types/components/style-book/constants.d.ts +11 -0
  1136. package/build-types/components/style-book/constants.d.ts.map +1 -0
  1137. package/build-types/components/style-book/duotone-examples.d.ts +9 -0
  1138. package/build-types/components/style-book/duotone-examples.d.ts.map +1 -0
  1139. package/build-types/components/style-book/examples.d.ts +12 -0
  1140. package/build-types/components/style-book/examples.d.ts.map +1 -0
  1141. package/build-types/components/style-book/index.d.ts +31 -0
  1142. package/build-types/components/style-book/index.d.ts.map +1 -0
  1143. package/build-types/components/style-book/types.d.ts +72 -0
  1144. package/build-types/components/style-book/types.d.ts.map +1 -0
  1145. package/build-types/components/styles-canvas/index.d.ts +16 -0
  1146. package/build-types/components/styles-canvas/index.d.ts.map +1 -0
  1147. package/build-types/components/styles-canvas/revisions.d.ts +5 -0
  1148. package/build-types/components/styles-canvas/revisions.d.ts.map +1 -0
  1149. package/build-types/components/styles-canvas/style-book.d.ts +6 -0
  1150. package/build-types/components/styles-canvas/style-book.d.ts.map +1 -0
  1151. package/build-types/components/visual-editor/index.d.ts +1 -2
  1152. package/build-types/components/visual-editor/index.d.ts.map +1 -1
  1153. package/build-types/dataviews/fields/content-preview/content-preview-view.d.ts.map +1 -1
  1154. package/build-types/hooks/push-changes-to-global-styles/index.d.ts +2 -0
  1155. package/build-types/hooks/push-changes-to-global-styles/index.d.ts.map +1 -0
  1156. package/build-types/hooks/use-global-styles-output.d.ts +18 -0
  1157. package/build-types/hooks/use-global-styles-output.d.ts.map +1 -0
  1158. package/build-types/private-apis.d.ts.map +1 -1
  1159. package/build-types/store/private-actions.d.ts +20 -0
  1160. package/build-types/store/private-actions.d.ts.map +1 -1
  1161. package/build-types/store/private-selectors.d.ts +14 -0
  1162. package/build-types/store/private-selectors.d.ts.map +1 -1
  1163. package/build-types/store/reducer.d.ts +20 -0
  1164. package/build-types/store/reducer.d.ts.map +1 -1
  1165. package/build-types/store/selectors.d.ts.map +1 -1
  1166. package/build-types/utils/set-nested-value.d.ts +20 -0
  1167. package/build-types/utils/set-nested-value.d.ts.map +1 -0
  1168. package/package.json +40 -40
  1169. package/src/components/collab-sidebar/add-comment.js +10 -6
  1170. package/src/components/collab-sidebar/comments.js +42 -28
  1171. package/src/components/collab-sidebar/index.js +14 -12
  1172. package/src/components/collab-sidebar/style.scss +2 -1
  1173. package/src/components/collab-sidebar/utils.js +3 -12
  1174. package/src/components/document-bar/index.js +18 -3
  1175. package/src/components/editor/index.js +25 -1
  1176. package/src/components/editor-help/style.scss +1 -1
  1177. package/src/components/editor-interface/index.js +40 -39
  1178. package/src/components/entities-saved-states/entity-type-list.js +19 -17
  1179. package/src/components/global-styles/block-link.js +65 -0
  1180. package/src/components/global-styles/header.js +48 -0
  1181. package/src/components/global-styles/hooks.js +216 -0
  1182. package/src/components/global-styles/index.js +125 -0
  1183. package/src/components/global-styles/menu.js +101 -0
  1184. package/src/components/global-styles/style.scss +11 -0
  1185. package/src/components/global-styles-provider/index.js +3 -45
  1186. package/src/components/global-styles-renderer/index.js +39 -0
  1187. package/src/components/global-styles-sidebar/default-sidebar.js +46 -0
  1188. package/src/components/global-styles-sidebar/index.js +177 -0
  1189. package/src/components/global-styles-sidebar/style.scss +119 -0
  1190. package/src/components/global-styles-sidebar/welcome-guide-image.js +11 -0
  1191. package/src/components/global-styles-sidebar/welcome-guide.js +136 -0
  1192. package/src/components/header/index.js +11 -6
  1193. package/src/components/post-featured-image/index.js +44 -1
  1194. package/src/components/post-last-revision/style.scss +1 -1
  1195. package/src/components/post-panel-row/style.scss +1 -0
  1196. package/src/components/post-publish-panel/style.scss +1 -1
  1197. package/src/components/post-publish-panel/test/__snapshots__/index.js.snap +2 -2
  1198. package/src/components/preferences-modal/index.js +1 -1
  1199. package/src/components/provider/index.js +0 -2
  1200. package/src/components/start-page-options/index.js +5 -6
  1201. package/src/components/start-page-options/style.scss +1 -1
  1202. package/src/components/style-book/categories.ts +97 -0
  1203. package/src/components/style-book/color-examples.tsx +56 -0
  1204. package/src/components/style-book/constants.ts +308 -0
  1205. package/src/components/style-book/duotone-examples.tsx +56 -0
  1206. package/src/components/style-book/examples.tsx +273 -0
  1207. package/src/components/style-book/index.js +794 -0
  1208. package/src/components/style-book/style.scss +44 -0
  1209. package/src/components/style-book/test/categories.js +166 -0
  1210. package/src/components/style-book/types.ts +80 -0
  1211. package/src/components/styles-canvas/index.js +126 -0
  1212. package/src/components/styles-canvas/revisions.js +144 -0
  1213. package/src/components/styles-canvas/style-book.js +57 -0
  1214. package/src/components/styles-canvas/style.scss +40 -0
  1215. package/src/components/visual-editor/index.js +2 -1
  1216. package/src/dataviews/fields/content-preview/content-preview-view.tsx +2 -0
  1217. package/src/hooks/index.js +1 -0
  1218. package/src/hooks/media-upload.js +25 -5
  1219. package/src/hooks/push-changes-to-global-styles/index.js +391 -0
  1220. package/src/hooks/push-changes-to-global-styles/style.scss +4 -0
  1221. package/src/hooks/use-global-styles-output.js +76 -0
  1222. package/src/private-apis.js +10 -8
  1223. package/src/store/private-actions.js +37 -0
  1224. package/src/store/private-selectors.js +20 -0
  1225. package/src/store/reducer.js +36 -0
  1226. package/src/store/selectors.js +0 -2
  1227. package/src/style.scss +7 -1
  1228. package/src/utils/set-nested-value.js +39 -0
  1229. package/tsconfig.json +3 -0
  1230. package/tsconfig.tsbuildinfo +1 -1
  1231. package/build/components/block-settings-menu/content-only-settings-menu.js +0 -186
  1232. package/build/components/block-settings-menu/content-only-settings-menu.js.map +0 -7
  1233. package/build/components/editor-interface/content-slot-fill.js.map +0 -7
  1234. package/build-module/components/block-settings-menu/content-only-settings-menu.js +0 -161
  1235. package/build-module/components/block-settings-menu/content-only-settings-menu.js.map +0 -7
  1236. package/build-module/components/editor-interface/content-slot-fill.js +0 -9
  1237. package/build-module/components/editor-interface/content-slot-fill.js.map +0 -7
  1238. package/build-types/components/block-settings-menu/content-only-settings-menu.d.ts +0 -2
  1239. package/build-types/components/block-settings-menu/content-only-settings-menu.d.ts.map +0 -1
  1240. package/build-types/components/editor-interface/content-slot-fill.d.ts +0 -14
  1241. package/build-types/components/editor-interface/content-slot-fill.d.ts.map +0 -1
  1242. package/src/components/block-settings-menu/content-only-settings-menu.js +0 -185
  1243. package/src/components/block-settings-menu/content-only-settings-menu.native.js +0 -4
  1244. package/src/components/block-settings-menu/style.scss +0 -6
  1245. package/src/components/editor-interface/content-slot-fill.js +0 -10
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/hooks/push-changes-to-global-styles/index.js"],
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { addFilter } from '@wordpress/hooks';\nimport { createHigherOrderComponent } from '@wordpress/compose';\nimport {\n\tInspectorAdvancedControls,\n\tstore as blockEditorStore,\n\tprivateApis as blockEditorPrivateApis,\n\tuseBlockEditingMode,\n} from '@wordpress/block-editor';\nimport { BaseControl, Button } from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\t__EXPERIMENTAL_STYLE_PROPERTY,\n\tgetBlockType,\n\thasBlockSupport,\n\tstore as blocksStore,\n} from '@wordpress/blocks';\nimport { useMemo, useCallback } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport setNestedValue from '../../utils/set-nested-value';\nimport { useGlobalStyles } from '../../components/global-styles/hooks';\n\nconst { cleanEmptyObject } = unlock( blockEditorPrivateApis );\n\n// Block Gap is a special case and isn't defined within the blocks\n// style properties config. We'll add it here to allow it to be pushed\n// to global styles as well.\nconst STYLE_PROPERTY = {\n\t...__EXPERIMENTAL_STYLE_PROPERTY,\n\tblockGap: { value: [ 'spacing', 'blockGap' ] },\n};\n\n// TODO: Temporary duplication of constant in @wordpress/block-editor. Can be\n// removed by moving PushChangesToGlobalStylesControl to\n// @wordpress/block-editor.\nconst STYLE_PATH_TO_CSS_VAR_INFIX = {\n\t'border.color': 'color',\n\t'color.background': 'color',\n\t'color.text': 'color',\n\t'elements.link.color.text': 'color',\n\t'elements.link.:hover.color.text': 'color',\n\t'elements.link.typography.fontFamily': 'font-family',\n\t'elements.link.typography.fontSize': 'font-size',\n\t'elements.button.color.text': 'color',\n\t'elements.button.color.background': 'color',\n\t'elements.button.typography.fontFamily': 'font-family',\n\t'elements.button.typography.fontSize': 'font-size',\n\t'elements.caption.color.text': 'color',\n\t'elements.heading.color': 'color',\n\t'elements.heading.color.background': 'color',\n\t'elements.heading.typography.fontFamily': 'font-family',\n\t'elements.heading.gradient': 'gradient',\n\t'elements.heading.color.gradient': 'gradient',\n\t'elements.h1.color': 'color',\n\t'elements.h1.color.background': 'color',\n\t'elements.h1.typography.fontFamily': 'font-family',\n\t'elements.h1.color.gradient': 'gradient',\n\t'elements.h2.color': 'color',\n\t'elements.h2.color.background': 'color',\n\t'elements.h2.typography.fontFamily': 'font-family',\n\t'elements.h2.color.gradient': 'gradient',\n\t'elements.h3.color': 'color',\n\t'elements.h3.color.background': 'color',\n\t'elements.h3.typography.fontFamily': 'font-family',\n\t'elements.h3.color.gradient': 'gradient',\n\t'elements.h4.color': 'color',\n\t'elements.h4.color.background': 'color',\n\t'elements.h4.typography.fontFamily': 'font-family',\n\t'elements.h4.color.gradient': 'gradient',\n\t'elements.h5.color': 'color',\n\t'elements.h5.color.background': 'color',\n\t'elements.h5.typography.fontFamily': 'font-family',\n\t'elements.h5.color.gradient': 'gradient',\n\t'elements.h6.color': 'color',\n\t'elements.h6.color.background': 'color',\n\t'elements.h6.typography.fontFamily': 'font-family',\n\t'elements.h6.color.gradient': 'gradient',\n\t'color.gradient': 'gradient',\n\tblockGap: 'spacing',\n\t'typography.fontSize': 'font-size',\n\t'typography.fontFamily': 'font-family',\n};\n\n// TODO: Temporary duplication of constant in @wordpress/block-editor. Can be\n// removed by moving PushChangesToGlobalStylesControl to\n// @wordpress/block-editor.\nconst STYLE_PATH_TO_PRESET_BLOCK_ATTRIBUTE = {\n\t'border.color': 'borderColor',\n\t'color.background': 'backgroundColor',\n\t'color.text': 'textColor',\n\t'color.gradient': 'gradient',\n\t'typography.fontSize': 'fontSize',\n\t'typography.fontFamily': 'fontFamily',\n};\n\nconst SUPPORTED_STYLES = [ 'border', 'color', 'spacing', 'typography' ];\n\nconst getValueFromObjectPath = ( object, path ) => {\n\tlet value = object;\n\tpath.forEach( ( fieldName ) => {\n\t\tvalue = value?.[ fieldName ];\n\t} );\n\treturn value;\n};\n\nconst flatBorderProperties = [ 'borderColor', 'borderWidth', 'borderStyle' ];\nconst sides = [ 'top', 'right', 'bottom', 'left' ];\n\nfunction getBorderStyleChanges( border, presetColor, userStyle ) {\n\tif ( ! border && ! presetColor ) {\n\t\treturn [];\n\t}\n\n\tconst changes = [\n\t\t...getFallbackBorderStyleChange( 'top', border, userStyle ),\n\t\t...getFallbackBorderStyleChange( 'right', border, userStyle ),\n\t\t...getFallbackBorderStyleChange( 'bottom', border, userStyle ),\n\t\t...getFallbackBorderStyleChange( 'left', border, userStyle ),\n\t];\n\n\t// Handle a flat border i.e. all sides the same, CSS shorthand.\n\tconst { color: customColor, style, width } = border || {};\n\tconst hasColorOrWidth = presetColor || customColor || width;\n\n\tif ( hasColorOrWidth && ! style ) {\n\t\t// Global Styles need individual side configurations to overcome\n\t\t// theme.json configurations which are per side as well.\n\t\tsides.forEach( ( side ) => {\n\t\t\t// Only add fallback border-style if global styles don't already\n\t\t\t// have something set.\n\t\t\tif ( ! userStyle?.[ side ]?.style ) {\n\t\t\t\tchanges.push( {\n\t\t\t\t\tpath: [ 'border', side, 'style' ],\n\t\t\t\t\tvalue: 'solid',\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\t}\n\n\treturn changes;\n}\n\nfunction getFallbackBorderStyleChange( side, border, globalBorderStyle ) {\n\tif ( ! border?.[ side ] || globalBorderStyle?.[ side ]?.style ) {\n\t\treturn [];\n\t}\n\n\tconst { color, style, width } = border[ side ];\n\tconst hasColorOrWidth = color || width;\n\n\tif ( ! hasColorOrWidth || style ) {\n\t\treturn [];\n\t}\n\n\treturn [ { path: [ 'border', side, 'style' ], value: 'solid' } ];\n}\n\nfunction useChangesToPush( name, attributes, userConfig ) {\n\tconst supports = useSelect(\n\t\t( select ) => {\n\t\t\treturn unlock( select( blocksStore ) ).getSupportedStyles( name );\n\t\t},\n\t\t[ name ]\n\t);\n\tconst blockUserConfig = userConfig?.styles?.blocks?.[ name ];\n\n\treturn useMemo( () => {\n\t\tconst changes = supports.flatMap( ( key ) => {\n\t\t\tif ( ! STYLE_PROPERTY[ key ] ) {\n\t\t\t\treturn [];\n\t\t\t}\n\t\t\tconst { value: path } = STYLE_PROPERTY[ key ];\n\t\t\tconst presetAttributeKey = path.join( '.' );\n\t\t\tconst presetAttributeValue =\n\t\t\t\tattributes[\n\t\t\t\t\tSTYLE_PATH_TO_PRESET_BLOCK_ATTRIBUTE[ presetAttributeKey ]\n\t\t\t\t];\n\t\t\tconst value = presetAttributeValue\n\t\t\t\t? `var:preset|${ STYLE_PATH_TO_CSS_VAR_INFIX[ presetAttributeKey ] }|${ presetAttributeValue }`\n\t\t\t\t: getValueFromObjectPath( attributes.style, path );\n\n\t\t\t// Links only have a single support entry but have two element\n\t\t\t// style properties, color and hover color. The following check\n\t\t\t// will add the hover color to the changes if required.\n\t\t\tif ( key === 'linkColor' ) {\n\t\t\t\tconst linkChanges = value ? [ { path, value } ] : [];\n\t\t\t\tconst hoverPath = [\n\t\t\t\t\t'elements',\n\t\t\t\t\t'link',\n\t\t\t\t\t':hover',\n\t\t\t\t\t'color',\n\t\t\t\t\t'text',\n\t\t\t\t];\n\t\t\t\tconst hoverValue = getValueFromObjectPath(\n\t\t\t\t\tattributes.style,\n\t\t\t\t\thoverPath\n\t\t\t\t);\n\n\t\t\t\tif ( hoverValue ) {\n\t\t\t\t\tlinkChanges.push( { path: hoverPath, value: hoverValue } );\n\t\t\t\t}\n\n\t\t\t\treturn linkChanges;\n\t\t\t}\n\n\t\t\t// The shorthand border styles can't be mapped directly as global\n\t\t\t// styles requires longhand config.\n\t\t\tif ( flatBorderProperties.includes( key ) && value ) {\n\t\t\t\t// The shorthand config path is included to clear the block attribute.\n\t\t\t\tconst borderChanges = [ { path, value } ];\n\t\t\t\tsides.forEach( ( side ) => {\n\t\t\t\t\tconst currentPath = [ ...path ];\n\t\t\t\t\tcurrentPath.splice( -1, 0, side );\n\t\t\t\t\tborderChanges.push( { path: currentPath, value } );\n\t\t\t\t} );\n\t\t\t\treturn borderChanges;\n\t\t\t}\n\n\t\t\treturn value ? [ { path, value } ] : [];\n\t\t} );\n\n\t\t// To ensure display of a visible border, global styles require a\n\t\t// default border style if a border color or width is present.\n\t\tgetBorderStyleChanges(\n\t\t\tattributes.style?.border,\n\t\t\tattributes.borderColor,\n\t\t\tblockUserConfig?.border\n\t\t).forEach( ( change ) => changes.push( change ) );\n\n\t\treturn changes;\n\t}, [ supports, attributes, blockUserConfig ] );\n}\n\nfunction PushChangesToGlobalStylesControl( {\n\tname,\n\tattributes,\n\tsetAttributes,\n} ) {\n\tconst { user: userConfig, setUser: setUserConfig } = useGlobalStyles();\n\n\tconst changes = useChangesToPush( name, attributes, userConfig );\n\n\tconst { __unstableMarkNextChangeAsNotPersistent } =\n\t\tuseDispatch( blockEditorStore );\n\tconst { createSuccessNotice } = useDispatch( noticesStore );\n\n\tconst pushChanges = useCallback( () => {\n\t\tif ( changes.length === 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( changes.length > 0 ) {\n\t\t\tconst { style: blockStyles } = attributes;\n\n\t\t\tconst newBlockStyles = structuredClone( blockStyles );\n\t\t\tconst newUserConfig = structuredClone( userConfig );\n\n\t\t\tfor ( const { path, value } of changes ) {\n\t\t\t\tsetNestedValue( newBlockStyles, path, undefined );\n\t\t\t\tsetNestedValue(\n\t\t\t\t\tnewUserConfig,\n\t\t\t\t\t[ 'styles', 'blocks', name, ...path ],\n\t\t\t\t\tvalue\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst newBlockAttributes = {\n\t\t\t\tborderColor: undefined,\n\t\t\t\tbackgroundColor: undefined,\n\t\t\t\ttextColor: undefined,\n\t\t\t\tgradient: undefined,\n\t\t\t\tfontSize: undefined,\n\t\t\t\tfontFamily: undefined,\n\t\t\t\tstyle: cleanEmptyObject( newBlockStyles ),\n\t\t\t};\n\n\t\t\t// @wordpress/core-data doesn't support editing multiple entity types in\n\t\t\t// a single undo level. So for now, we disable @wordpress/core-data undo\n\t\t\t// tracking and implement our own Undo button in the snackbar\n\t\t\t// notification.\n\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t\tsetAttributes( newBlockAttributes );\n\t\t\tsetUserConfig( newUserConfig, { undoIgnore: true } );\n\t\t\tcreateSuccessNotice(\n\t\t\t\tsprintf(\n\t\t\t\t\t// translators: %s: Title of the block e.g. 'Heading'.\n\t\t\t\t\t__( '%s styles applied.' ),\n\t\t\t\t\tgetBlockType( name ).title\n\t\t\t\t),\n\t\t\t\t{\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\tactions: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlabel: __( 'Undo' ),\n\t\t\t\t\t\t\tonClick() {\n\t\t\t\t\t\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t\t\t\t\t\t\tsetAttributes( attributes );\n\t\t\t\t\t\t\t\tsetUserConfig( userConfig, {\n\t\t\t\t\t\t\t\t\tundoIgnore: true,\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t}, [\n\t\t__unstableMarkNextChangeAsNotPersistent,\n\t\tattributes,\n\t\tchanges,\n\t\tcreateSuccessNotice,\n\t\tname,\n\t\tsetAttributes,\n\t\tsetUserConfig,\n\t\tuserConfig,\n\t] );\n\n\treturn (\n\t\t<BaseControl\n\t\t\t__nextHasNoMarginBottom\n\t\t\tclassName=\"editor-push-changes-to-global-styles-control\"\n\t\t\thelp={ sprintf(\n\t\t\t\t// translators: %s: Title of the block e.g. 'Heading'.\n\t\t\t\t__(\n\t\t\t\t\t'Apply this block\u2019s typography, spacing, dimensions, and color styles to all %s blocks.'\n\t\t\t\t),\n\t\t\t\tgetBlockType( name ).title\n\t\t\t) }\n\t\t>\n\t\t\t<BaseControl.VisualLabel>\n\t\t\t\t{ __( 'Styles' ) }\n\t\t\t</BaseControl.VisualLabel>\n\t\t\t<Button\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\tvariant=\"secondary\"\n\t\t\t\taccessibleWhenDisabled\n\t\t\t\tdisabled={ changes.length === 0 }\n\t\t\t\tonClick={ pushChanges }\n\t\t\t>\n\t\t\t\t{ __( 'Apply globally' ) }\n\t\t\t</Button>\n\t\t</BaseControl>\n\t);\n}\n\nfunction PushChangesToGlobalStyles( props ) {\n\tconst blockEditingMode = useBlockEditingMode();\n\tconst isBlockBasedTheme = useSelect(\n\t\t( select ) => select( coreStore ).getCurrentTheme()?.is_block_theme,\n\t\t[]\n\t);\n\tconst supportsStyles = SUPPORTED_STYLES.some( ( feature ) =>\n\t\thasBlockSupport( props.name, feature )\n\t);\n\tconst isDisplayed =\n\t\tblockEditingMode === 'default' && supportsStyles && isBlockBasedTheme;\n\n\tif ( ! isDisplayed ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<InspectorAdvancedControls>\n\t\t\t<PushChangesToGlobalStylesControl { ...props } />\n\t\t</InspectorAdvancedControls>\n\t);\n}\n\nconst withPushChangesToGlobalStyles = createHigherOrderComponent(\n\t( BlockEdit ) => ( props ) => (\n\t\t<>\n\t\t\t<BlockEdit key=\"edit\" { ...props } />\n\t\t\t{ props.isSelected && <PushChangesToGlobalStyles { ...props } /> }\n\t\t</>\n\t)\n);\n\naddFilter(\n\t'editor.BlockEdit',\n\t'core/editor/push-changes-to-global-styles',\n\twithPushChangesToGlobalStyles\n);\n"],
5
+ "mappings": ";AAGA,SAAS,iBAAiB;AAC1B,SAAS,kCAAkC;AAC3C;AAAA,EACC;AAAA,EACA,SAAS;AAAA,EACT,eAAe;AAAA,EACf;AAAA,OACM;AACP,SAAS,aAAa,cAAc;AACpC,SAAS,IAAI,eAAe;AAC5B;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA,SAAS;AAAA,OACH;AACP,SAAS,SAAS,mBAAmB;AACrC,SAAS,aAAa,iBAAiB;AACvC,SAAS,SAAS,oBAAoB;AACtC,SAAS,SAAS,iBAAiB;AAKnC,SAAS,cAAc;AACvB,OAAO,oBAAoB;AAC3B,SAAS,uBAAuB;AA0S9B,SAoDA,UAzCC,KAXD;AAxSF,IAAM,EAAE,iBAAiB,IAAI,OAAQ,sBAAuB;AAK5D,IAAM,iBAAiB;AAAA,EACtB,GAAG;AAAA,EACH,UAAU,EAAE,OAAO,CAAE,WAAW,UAAW,EAAE;AAC9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AmC,GAAG,OAAQ,GAChD;AAEF;AAEA,IAAM,gCAAgC;AAAA,EACrC,CAAE,cAAe,CAAE,UAClB,iCACC;AAAA,wBAAC,aAAuB,GAAG,SAAZ,MAAoB;AAAA,IACjC,MAAM,cAAc,oBAAC,6BAA4B,GAAG,OAAQ;AAAA,KAC/D;AAEF;AAEA;AAAA,EACC;AAAA,EACA;AAAA,EACA;AACD;",
6
+ "names": []
7
+ }
@@ -1,4 +1,4 @@
1
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
1
+ // packages/editor/src/hooks/template-part-navigation-edit-button.js
2
2
  import { addFilter } from "@wordpress/hooks";
3
3
  import { createHigherOrderComponent } from "@wordpress/compose";
4
4
  import { useCallback } from "@wordpress/element";
@@ -14,9 +14,10 @@ import {
14
14
  } from "@wordpress/components";
15
15
  import { useSelect, useDispatch } from "@wordpress/data";
16
16
  import { store as interfaceStore } from "@wordpress/interface";
17
- const NAVIGATION_BLOCK_NAME = "core/navigation";
18
- const TEMPLATE_PART_BLOCK_NAME = "core/template-part";
19
- const BLOCK_INSPECTOR_AREA = "edit-post/block";
17
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
18
+ var NAVIGATION_BLOCK_NAME = "core/navigation";
19
+ var TEMPLATE_PART_BLOCK_NAME = "core/template-part";
20
+ var BLOCK_INSPECTOR_AREA = "edit-post/block";
20
21
  function TemplatePartNavigationEditButton({ clientId }) {
21
22
  const { selectBlock, flashBlock } = useDispatch(blockEditorStore);
22
23
  const { enableComplementaryArea } = useDispatch(interfaceStore);
@@ -74,7 +75,7 @@ function TemplatePartNavigationEditButton({ clientId }) {
74
75
  )
75
76
  ] }) });
76
77
  }
77
- const withTemplatePartNavigationEditButton = createHigherOrderComponent(
78
+ var withTemplatePartNavigationEditButton = createHigherOrderComponent(
78
79
  (BlockEdit) => (props) => {
79
80
  const isTemplatePart = props.name === TEMPLATE_PART_BLOCK_NAME;
80
81
  return /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/hooks/template-part-navigation-edit-button.js"],
4
4
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { addFilter } from '@wordpress/hooks';\nimport { createHigherOrderComponent } from '@wordpress/compose';\nimport { useCallback } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tBlockControls,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport {\n\tToolbarButton,\n\tToolbarGroup,\n\t__experimentalDivider as Divider,\n} from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as interfaceStore } from '@wordpress/interface';\n\n// Block name constants\nconst NAVIGATION_BLOCK_NAME = 'core/navigation';\nconst TEMPLATE_PART_BLOCK_NAME = 'core/template-part';\n\n// Complementary area identifier for the block inspector\nconst BLOCK_INSPECTOR_AREA = 'edit-post/block';\n\n/**\n * Component that renders the \"Edit navigation\" button for template parts\n * that contain navigation blocks.\n *\n * @param {Object} props Component props.\n * @param {string} props.clientId The template part block client ID.\n * @return {JSX.Element|null} The Edit navigation button component or null if not applicable.\n */\nfunction TemplatePartNavigationEditButton( { clientId } ) {\n\tconst { selectBlock, flashBlock } = useDispatch( blockEditorStore );\n\tconst { enableComplementaryArea } = useDispatch( interfaceStore );\n\n\tconst {\n\t\thasNavigationBlocks,\n\t\tfirstNavigationBlockId,\n\t\tisNavigationEditable,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetClientIdsOfDescendants,\n\t\t\t\tgetBlockName,\n\t\t\t\tgetBlockEditingMode,\n\t\t\t} = select( blockEditorStore );\n\n\t\t\tconst descendants = getClientIdsOfDescendants( clientId );\n\t\t\tconst navigationBlocksInTemplatePart = descendants.filter(\n\t\t\t\t( blockId ) => getBlockName( blockId ) === NAVIGATION_BLOCK_NAME\n\t\t\t);\n\n\t\t\tconst _hasNavigationBlocks =\n\t\t\t\tnavigationBlocksInTemplatePart.length > 0;\n\t\t\tconst _firstNavigationBlockId = _hasNavigationBlocks\n\t\t\t\t? navigationBlocksInTemplatePart[ 0 ]\n\t\t\t\t: null;\n\n\t\t\treturn {\n\t\t\t\thasNavigationBlocks: _hasNavigationBlocks,\n\t\t\t\tfirstNavigationBlockId: _firstNavigationBlockId,\n\t\t\t\t// We can't use the useBlockEditingMode hook here because the current\n\t\t\t\t// context is the template part, not the navigation block.\n\t\t\t\tisNavigationEditable:\n\t\t\t\t\tgetBlockEditingMode( _firstNavigationBlockId ) !==\n\t\t\t\t\t'disabled',\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tconst onEditNavigation = useCallback( () => {\n\t\tif ( firstNavigationBlockId ) {\n\t\t\t// Select the first Navigation block\n\t\t\tselectBlock( firstNavigationBlockId );\n\n\t\t\t// Flash the block for 500ms to make it obvious\n\t\t\tflashBlock( firstNavigationBlockId, 500 );\n\n\t\t\t// Enable the complementary area (inspector)\n\t\t\tenableComplementaryArea( 'core', BLOCK_INSPECTOR_AREA );\n\t\t}\n\t}, [\n\t\tfirstNavigationBlockId,\n\t\tselectBlock,\n\t\tflashBlock,\n\t\tenableComplementaryArea,\n\t] );\n\n\t// Only show if template part contains navigation blocks and they are editable\n\tif ( ! hasNavigationBlocks || ! isNavigationEditable ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<BlockControls group=\"other\">\n\t\t\t<ToolbarGroup>\n\t\t\t\t{ /*\n\t\t\t\t * Add a vertical divider to visually separate the \"Edit navigation\"\n\t\t\t\t * button from the template part's \"Edit\" button. Both buttons share\n\t\t\t\t * the same toolbar group (\"other\"), so without this divider they\n\t\t\t\t * would appear directly adjacent with no visual separation.\n\t\t\t\t */ }\n\t\t\t\t<Divider orientation=\"vertical\" marginEnd={ 3 } />\n\t\t\t\t<ToolbarButton\n\t\t\t\t\tlabel={ __( 'Edit navigation' ) }\n\t\t\t\t\tonClick={ onEditNavigation }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Edit navigation' ) }\n\t\t\t\t</ToolbarButton>\n\t\t\t</ToolbarGroup>\n\t\t</BlockControls>\n\t);\n}\n\n/**\n * Higher-order component that adds the Edit navigation button to template part blocks.\n */\nconst withTemplatePartNavigationEditButton = createHigherOrderComponent(\n\t( BlockEdit ) => ( props ) => {\n\t\tconst isTemplatePart = props.name === TEMPLATE_PART_BLOCK_NAME;\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<BlockEdit key=\"edit\" { ...props } />\n\t\t\t\t{ props.isSelected && isTemplatePart && (\n\t\t\t\t\t<TemplatePartNavigationEditButton\n\t\t\t\t\t\tclientId={ props.clientId }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</>\n\t\t);\n\t},\n\t'withTemplatePartNavigationEditButton'\n);\n\n// Register the filter.\naddFilter(\n\t'editor.BlockEdit',\n\t'core/editor/with-template-part-navigation-edit-button',\n\twithTemplatePartNavigationEditButton\n);\n"],
5
- "mappings": "AAmGG,SA2BA,UApBC,KAPD;AAhGH,SAAS,iBAAiB;AAC1B,SAAS,kCAAkC;AAC3C,SAAS,mBAAmB;AAC5B,SAAS,UAAU;AACnB;AAAA,EACC;AAAA,EACA,SAAS;AAAA,OACH;AACP;AAAA,EACC;AAAA,EACA;AAAA,EACA,yBAAyB;AAAA,OACnB;AACP,SAAS,WAAW,mBAAmB;AACvC,SAAS,SAAS,sBAAsB;AAGxC,MAAM,wBAAwB;AAC9B,MAAM,2BAA2B;AAGjC,MAAM,uBAAuB;AAU7B,SAAS,iCAAkC,EAAE,SAAS,GAAI;AACzD,QAAM,EAAE,aAAa,WAAW,IAAI,YAAa,gBAAiB;AAClE,QAAM,EAAE,wBAAwB,IAAI,YAAa,cAAe;AAEhE,QAAM;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,EACD,IAAI;AAAA,IACH,CAAE,WAAY;AACb,YAAM;AAAA,QACL;AAAA,QACA;AAAA,QACA;AAAA,MACD,IAAI,OAAQ,gBAAiB;AAE7B,YAAM,cAAc,0BAA2B,QA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,WAAO;AAAA,EACR;AAEA,SACC,oBAAC,iBAAc,OAAM,SACpB,+BAAC,gBAOA;AAAA,wBAAC,WAAQ,aAAY,YAAW,WAAY,GAAI;AAAA,IAChD;AAAA,MAAC;AAAA;AAAA,QACA,OAAQ,GAAI,iBAAkB;AAAA,QAC9B,SAAU;AAAA,QAER,aAAI,iBAAkB;AAAA;AAAA,IACzB;AAAA,KACD,GACD;AAEF;AAKA,IAAM,uCAAuC;AAAA,EAC5C,CAAE,cAAe,CAAE,UAAW;AAC7B,UAAM,iBAAiB,MAAM,SAAS;AAEtC,WACC,iCACC;AAAA,0BAAC,aAAuB,GAAG,SAAZ,MAAoB;AAAA,MACjC,MAAM,cAAc,kBACrB;AAAA,QAAC;AAAA;AAAA,UACA,UAAW,MAAM;AAAA;AAAA,MAClB;AAAA,OAEF;AAAA,EAEF;AAAA,EACA;AACD;AAGA;AAAA,EACC;AAAA,EACA;AAAA,EACA;AACD;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,50 @@
1
+ // packages/editor/src/hooks/use-global-styles-output.js
2
+ import { getBlockTypes, store as blocksStore } from "@wordpress/blocks";
3
+ import { useSelect } from "@wordpress/data";
4
+ import { useMemo } from "@wordpress/element";
5
+ import { generateGlobalStyles } from "@wordpress/global-styles-engine";
6
+ import { store as editorStore } from "../store";
7
+ import { useSetting, useGlobalStyles } from "../components/global-styles";
8
+ function useGlobalStylesOutputWithConfig(mergedConfig = {}, disableRootPadding = false) {
9
+ const blockGap = useSetting("spacing.blockGap");
10
+ const hasBlockGapSupport = blockGap !== null;
11
+ const hasFallbackGapSupport = !hasBlockGapSupport;
12
+ const { disableLayoutStyles, getBlockStyles } = useSelect((select) => {
13
+ const { getEditorSettings } = select(editorStore);
14
+ const { getBlockStyles: getBlockStylesSelector } = select(blocksStore);
15
+ const settings = getEditorSettings();
16
+ return {
17
+ disableLayoutStyles: !!settings?.disableLayoutStyles,
18
+ getBlockStyles: getBlockStylesSelector
19
+ };
20
+ }, []);
21
+ return useMemo(() => {
22
+ if (!mergedConfig?.styles || !mergedConfig?.settings) {
23
+ return [[], {}];
24
+ }
25
+ const blockTypes = getBlockTypes();
26
+ return generateGlobalStyles(mergedConfig, blockTypes, {
27
+ hasBlockGapSupport,
28
+ hasFallbackGapSupport,
29
+ disableLayoutStyles,
30
+ disableRootPadding,
31
+ getBlockStyles
32
+ });
33
+ }, [
34
+ hasBlockGapSupport,
35
+ hasFallbackGapSupport,
36
+ mergedConfig,
37
+ disableLayoutStyles,
38
+ disableRootPadding,
39
+ getBlockStyles
40
+ ]);
41
+ }
42
+ function useGlobalStylesOutput(disableRootPadding = false) {
43
+ const { merged: mergedConfig } = useGlobalStyles();
44
+ return useGlobalStylesOutputWithConfig(mergedConfig, disableRootPadding);
45
+ }
46
+ export {
47
+ useGlobalStylesOutput,
48
+ useGlobalStylesOutputWithConfig
49
+ };
50
+ //# sourceMappingURL=use-global-styles-output.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/hooks/use-global-styles-output.js"],
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { getBlockTypes, store as blocksStore } from '@wordpress/blocks';\nimport { useSelect } from '@wordpress/data';\nimport { useMemo } from '@wordpress/element';\nimport { generateGlobalStyles } from '@wordpress/global-styles-engine';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../store';\nimport { useSetting, useGlobalStyles } from '../components/global-styles';\n\n/**\n * Returns the global styles output based on the provided global styles config.\n *\n * @param {Object} mergedConfig The merged global styles config.\n * @param {boolean} disableRootPadding Disable root padding styles.\n *\n * @return {Array} Array of stylesheets and settings.\n */\nexport function useGlobalStylesOutputWithConfig(\n\tmergedConfig = {},\n\tdisableRootPadding = false\n) {\n\tconst blockGap = useSetting( 'spacing.blockGap' );\n\tconst hasBlockGapSupport = blockGap !== null;\n\tconst hasFallbackGapSupport = ! hasBlockGapSupport;\n\n\tconst { disableLayoutStyles, getBlockStyles } = useSelect( ( select ) => {\n\t\tconst { getEditorSettings } = select( editorStore );\n\t\tconst { getBlockStyles: getBlockStylesSelector } =\n\t\t\tselect( blocksStore );\n\t\tconst settings = getEditorSettings();\n\t\treturn {\n\t\t\tdisableLayoutStyles: !! settings?.disableLayoutStyles,\n\t\t\tgetBlockStyles: getBlockStylesSelector,\n\t\t};\n\t}, [] );\n\n\treturn useMemo( () => {\n\t\tif ( ! mergedConfig?.styles || ! mergedConfig?.settings ) {\n\t\t\treturn [ [], {} ];\n\t\t}\n\n\t\tconst blockTypes = getBlockTypes();\n\n\t\treturn generateGlobalStyles( mergedConfig, blockTypes, {\n\t\t\thasBlockGapSupport,\n\t\t\thasFallbackGapSupport,\n\t\t\tdisableLayoutStyles,\n\t\t\tdisableRootPadding,\n\t\t\tgetBlockStyles,\n\t\t} );\n\t}, [\n\t\thasBlockGapSupport,\n\t\thasFallbackGapSupport,\n\t\tmergedConfig,\n\t\tdisableLayoutStyles,\n\t\tdisableRootPadding,\n\t\tgetBlockStyles,\n\t] );\n}\n\n/**\n * Returns the global styles output based on the current state of global styles config loaded in the editor context.\n *\n * @param {boolean} disableRootPadding Disable root padding styles.\n *\n * @return {Array} Array of stylesheets and settings.\n */\nexport function useGlobalStylesOutput( disableRootPadding = false ) {\n\tconst { merged: mergedConfig } = useGlobalStyles();\n\treturn useGlobalStylesOutputWithConfig( mergedConfig, disableRootPadding );\n}\n"],
5
+ "mappings": ";AAGA,SAAS,eAAe,SAAS,mBAAmB;AACpD,SAAS,iBAAiB;AAC1B,SAAS,eAAe;AACxB,SAAS,4BAA4B;AAKrC,SAAS,SAAS,mBAAmB;AACrC,SAAS,YAAY,uBAAuB;AAUrC,SAAS,gCACf,eAAe,CAAC,GAChB,qBAAqB,OACpB;AACD,QAAM,WAAW,WAAY,kBAAmB;AAChD,QAAM,qBAAqB,aAAa;AACxC,QAAM,wBAAwB,CAAE;AAEhC,QAAM,EAAE,qBAAqB,eAAe,IAAI,UAAW,CAAE,WAAY;AACxE,UAAM,EAAE,kBAAkB,IAAI,OAAQ,WAAY;AAClD,UAAM,EAAE,gBAAgB,uBAAuB,IAC9C,OAAQ,WAAY;AACrB,UAAM,WAAW,kBAAkB;AACnC,WAAO;AAAA,MACN,qBAAqB,CAAC,CAAE,UAAU;AAAA,MAClC,gBAAgB;AAAA,IACjB;AAAA,EACD,GAAG,CAAC,CAAE;AAEN,SAAO,QAAS,MAAM;AACrB,QAAK,CAAE,cAAc,UAAU,CAAE,cAAc,UAAW;AACzD,aAAO,CAAE,CAAC,GAAG,CAAC,CAAE;AAAA,IACjB;AAEA,UAAM,aAAa,cAAc;AAEjC,WAAO,qBAAsB,cAAc,YAAY;AAAA,MACtD;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACD,CAAE;AAAA,EACH,GAAG;AAAA,IACF;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD,CAAE;AACH;AASO,SAAS,sBAAuB,qBAAqB,OAAQ;AACnE,QAAM,EAAE,QAAQ,aAAa,IAAI,gBAAgB;AACjD,SAAO,gCAAiC,cAAc,kBAAmB;AAC1E;",
6
+ "names": []
7
+ }
@@ -1,3 +1,4 @@
1
+ // packages/editor/src/index.js
1
2
  import "./hooks";
2
3
  import { storeConfig, store } from "./store";
3
4
  export * from "./components";
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../src/index.js"],
4
4
  "sourcesContent": ["/**\n * Internal dependencies\n */\nimport './hooks';\n\nexport { storeConfig, store } from './store';\nexport * from './components';\nexport * from './utils';\nexport * from './private-apis';\nexport * from './dataviews/api';\n\n/*\n * Backward compatibility\n */\nexport { transformStyles } from '@wordpress/block-editor';\n"],
5
- "mappings": "AAGA,OAAO;AAEP,SAAS,aAAa,aAAa;AACnC,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAKd,SAAS,uBAAuB;",
5
+ "mappings": ";AAGA,OAAO;AAEP,SAAS,aAAa,aAAa;AACnC,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAKd,SAAS,uBAAuB;",
6
6
  "names": []
7
7
  }
@@ -1,5 +1,6 @@
1
+ // packages/editor/src/lock-unlock.js
1
2
  import { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from "@wordpress/private-apis";
2
- const { lock, unlock } = __dangerousOptInToUnstableAPIsOnlyForCoreModules(
3
+ var { lock, unlock } = __dangerousOptInToUnstableAPIsOnlyForCoreModules(
3
4
  "I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.",
4
5
  "@wordpress/editor"
5
6
  );
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../src/lock-unlock.js"],
4
4
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/private-apis';\nexport const { lock, unlock } =\n\t__dangerousOptInToUnstableAPIsOnlyForCoreModules(\n\t\t'I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.',\n\t\t'@wordpress/editor'\n\t);\n"],
5
- "mappings": "AAGA,SAAS,wDAAwD;AAC1D,MAAM,EAAE,MAAM,OAAO,IAC3B;AAAA,EACC;AAAA,EACA;AACD;",
5
+ "mappings": ";AAGA,SAAS,wDAAwD;AAC1D,IAAM,EAAE,MAAM,OAAO,IAC3B;AAAA,EACC;AAAA,EACA;AACD;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
+ // packages/editor/src/private-apis.js
1
2
  import * as interfaceApis from "@wordpress/interface";
2
3
  import { lock } from "./lock-unlock";
3
4
  import { EntitiesSavedStatesExtensible } from "./components/entities-saved-states";
4
- import EditorContentSlotFill from "./components/editor-interface/content-slot-fill";
5
5
  import BackButton from "./components/header/back-button";
6
6
  import Editor from "./components/editor";
7
7
  import PluginPostExcerpt from "./components/post-excerpt/plugin";
@@ -12,10 +12,6 @@ import usePostFields from "./components/post-fields";
12
12
  import ToolsMoreMenuGroup from "./components/more-menu/tools-more-menu-group";
13
13
  import ViewMoreMenuGroup from "./components/more-menu/view-more-menu-group";
14
14
  import ResizableEditor from "./components/resizable-editor";
15
- import {
16
- mergeBaseAndUserConfigs,
17
- GlobalStylesProvider
18
- } from "./components/global-styles-provider";
19
15
  import {
20
16
  CreateTemplatePartModal,
21
17
  patternTitleField,
@@ -23,8 +19,12 @@ import {
23
19
  } from "@wordpress/fields";
24
20
  import { registerCoreBlockBindingsSources } from "./bindings/api";
25
21
  import { getTemplateInfo } from "./utils/get-template-info";
26
- const { store: interfaceStore, ...remainingInterfaceApis } = interfaceApis;
27
- const privateApis = {};
22
+ import GlobalStylesUIWrapper from "./components/global-styles";
23
+ import { StyleBookPreview } from "./components/style-book";
24
+ import { useGlobalStyles, useStyle } from "./components/global-styles/hooks";
25
+ import { GlobalStylesActionMenu } from "./components/global-styles/menu";
26
+ var { store: interfaceStore, ...remainingInterfaceApis } = interfaceApis;
27
+ var privateApis = {};
28
28
  lock(privateApis, {
29
29
  CreateTemplatePartModal,
30
30
  patternTitleField,
@@ -32,9 +32,6 @@ lock(privateApis, {
32
32
  BackButton,
33
33
  EntitiesSavedStatesExtensible,
34
34
  Editor,
35
- EditorContentSlotFill,
36
- GlobalStylesProvider,
37
- mergeBaseAndUserConfigs,
38
35
  PluginPostExcerpt,
39
36
  PostCardPanel,
40
37
  PreferencesModal,
@@ -45,6 +42,12 @@ lock(privateApis, {
45
42
  ResizableEditor,
46
43
  registerCoreBlockBindingsSources,
47
44
  getTemplateInfo,
45
+ // Global Styles
46
+ GlobalStylesUIWrapper,
47
+ GlobalStylesActionMenu,
48
+ StyleBookPreview,
49
+ useGlobalStyles,
50
+ useStyle,
48
51
  // This is a temporary private API while we're updating the site editor to use EditorProvider.
49
52
  interfaceStore,
50
53
  ...remainingInterfaceApis
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/private-apis.js"],
4
- "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport * as interfaceApis from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport { lock } from './lock-unlock';\nimport { EntitiesSavedStatesExtensible } from './components/entities-saved-states';\nimport EditorContentSlotFill from './components/editor-interface/content-slot-fill';\nimport BackButton from './components/header/back-button';\nimport Editor from './components/editor';\nimport PluginPostExcerpt from './components/post-excerpt/plugin';\nimport PostCardPanel from './components/post-card-panel';\nimport PreferencesModal from './components/preferences-modal';\nimport { usePostActions } from './components/post-actions/actions';\nimport usePostFields from './components/post-fields';\nimport ToolsMoreMenuGroup from './components/more-menu/tools-more-menu-group';\nimport ViewMoreMenuGroup from './components/more-menu/view-more-menu-group';\nimport ResizableEditor from './components/resizable-editor';\nimport {\n\tmergeBaseAndUserConfigs,\n\tGlobalStylesProvider,\n} from './components/global-styles-provider';\nimport {\n\tCreateTemplatePartModal,\n\tpatternTitleField,\n\ttemplateTitleField,\n} from '@wordpress/fields';\nimport { registerCoreBlockBindingsSources } from './bindings/api';\nimport { getTemplateInfo } from './utils/get-template-info';\n\nconst { store: interfaceStore, ...remainingInterfaceApis } = interfaceApis;\n\nexport const privateApis = {};\nlock( privateApis, {\n\tCreateTemplatePartModal,\n\tpatternTitleField,\n\ttemplateTitleField,\n\tBackButton,\n\tEntitiesSavedStatesExtensible,\n\tEditor,\n\tEditorContentSlotFill,\n\tGlobalStylesProvider,\n\tmergeBaseAndUserConfigs,\n\tPluginPostExcerpt,\n\tPostCardPanel,\n\tPreferencesModal,\n\tusePostActions,\n\tusePostFields,\n\tToolsMoreMenuGroup,\n\tViewMoreMenuGroup,\n\tResizableEditor,\n\tregisterCoreBlockBindingsSources,\n\tgetTemplateInfo,\n\t// This is a temporary private API while we're updating the site editor to use EditorProvider.\n\tinterfaceStore,\n\t...remainingInterfaceApis,\n} );\n"],
5
- "mappings": "AAGA,YAAY,mBAAmB;AAK/B,SAAS,YAAY;AACrB,SAAS,qCAAqC;AAC9C,OAAO,2BAA2B;AAClC,OAAO,gBAAgB;AACvB,OAAO,YAAY;AACnB,OAAO,uBAAuB;AAC9B,OAAO,mBAAmB;AAC1B,OAAO,sBAAsB;AAC7B,SAAS,sBAAsB;AAC/B,OAAO,mBAAmB;AAC1B,OAAO,wBAAwB;AAC/B,OAAO,uBAAuB;AAC9B,OAAO,qBAAqB;AAC5B;AAAA,EACC;AAAA,EACA;AAAA,OACM;AACP;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,OACM;AACP,SAAS,wCAAwC;AACjD,SAAS,uBAAuB;AAEhC,MAAM,EAAE,OAAO,gBAAgB,GAAG,uBAAuB,IAAI;AAEtD,MAAM,cAAc,CAAC;AAC5B,KAAM,aAAa;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA,GAAG;AACJ,CAAE;",
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport * as interfaceApis from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport { lock } from './lock-unlock';\nimport { EntitiesSavedStatesExtensible } from './components/entities-saved-states';\nimport BackButton from './components/header/back-button';\nimport Editor from './components/editor';\nimport PluginPostExcerpt from './components/post-excerpt/plugin';\nimport PostCardPanel from './components/post-card-panel';\nimport PreferencesModal from './components/preferences-modal';\nimport { usePostActions } from './components/post-actions/actions';\nimport usePostFields from './components/post-fields';\nimport ToolsMoreMenuGroup from './components/more-menu/tools-more-menu-group';\nimport ViewMoreMenuGroup from './components/more-menu/view-more-menu-group';\nimport ResizableEditor from './components/resizable-editor';\nimport {\n\tCreateTemplatePartModal,\n\tpatternTitleField,\n\ttemplateTitleField,\n} from '@wordpress/fields';\nimport { registerCoreBlockBindingsSources } from './bindings/api';\nimport { getTemplateInfo } from './utils/get-template-info';\nimport GlobalStylesUIWrapper from './components/global-styles';\nimport { StyleBookPreview } from './components/style-book';\nimport { useGlobalStyles, useStyle } from './components/global-styles/hooks';\nimport { GlobalStylesActionMenu } from './components/global-styles/menu';\n\nconst { store: interfaceStore, ...remainingInterfaceApis } = interfaceApis;\n\nexport const privateApis = {};\nlock( privateApis, {\n\tCreateTemplatePartModal,\n\tpatternTitleField,\n\ttemplateTitleField,\n\tBackButton,\n\tEntitiesSavedStatesExtensible,\n\tEditor,\n\tPluginPostExcerpt,\n\tPostCardPanel,\n\tPreferencesModal,\n\tusePostActions,\n\tusePostFields,\n\tToolsMoreMenuGroup,\n\tViewMoreMenuGroup,\n\tResizableEditor,\n\tregisterCoreBlockBindingsSources,\n\tgetTemplateInfo,\n\t// Global Styles\n\tGlobalStylesUIWrapper,\n\tGlobalStylesActionMenu,\n\tStyleBookPreview,\n\tuseGlobalStyles,\n\tuseStyle,\n\t// This is a temporary private API while we're updating the site editor to use EditorProvider.\n\tinterfaceStore,\n\t...remainingInterfaceApis,\n} );\n"],
5
+ "mappings": ";AAGA,YAAY,mBAAmB;AAK/B,SAAS,YAAY;AACrB,SAAS,qCAAqC;AAC9C,OAAO,gBAAgB;AACvB,OAAO,YAAY;AACnB,OAAO,uBAAuB;AAC9B,OAAO,mBAAmB;AAC1B,OAAO,sBAAsB;AAC7B,SAAS,sBAAsB;AAC/B,OAAO,mBAAmB;AAC1B,OAAO,wBAAwB;AAC/B,OAAO,uBAAuB;AAC9B,OAAO,qBAAqB;AAC5B;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,OACM;AACP,SAAS,wCAAwC;AACjD,SAAS,uBAAuB;AAChC,OAAO,2BAA2B;AAClC,SAAS,wBAAwB;AACjC,SAAS,iBAAiB,gBAAgB;AAC1C,SAAS,8BAA8B;AAEvC,IAAM,EAAE,OAAO,gBAAgB,GAAG,uBAAuB,IAAI;AAEtD,IAAM,cAAc,CAAC;AAC5B,KAAM,aAAa;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA,GAAG;AACJ,CAAE;",
6
6
  "names": []
7
7
  }
@@ -1,3 +1,4 @@
1
+ // packages/editor/src/store/actions.js
1
2
  import { speak } from "@wordpress/a11y";
2
3
  import apiFetch from "@wordpress/api-fetch";
3
4
  import deprecated from "@wordpress/deprecated";
@@ -23,7 +24,7 @@ import {
23
24
  getNotificationArgumentsForTrashFail
24
25
  } from "./utils/notice-builder";
25
26
  import { unlock } from "../lock-unlock";
26
- const setupEditor = (post, edits, template) => ({ dispatch }) => {
27
+ var setupEditor = (post, edits, template) => ({ dispatch }) => {
27
28
  dispatch.setEditedPost(post.type, post.id);
28
29
  const isNewPost = post.status === "auto-draft";
29
30
  if (isNewPost && template) {
@@ -85,11 +86,11 @@ function setEditedPost(postType, postId) {
85
86
  postId
86
87
  };
87
88
  }
88
- const editPost = (edits, options) => ({ select, registry }) => {
89
+ var editPost = (edits, options) => ({ select, registry }) => {
89
90
  const { id, type } = select.getCurrentPost();
90
91
  registry.dispatch(coreStore).editEntityRecord("postType", type, id, edits, options);
91
92
  };
92
- const savePost = (options = {}) => async ({ select, dispatch, registry }) => {
93
+ var savePost = (options = {}) => async ({ select, dispatch, registry }) => {
93
94
  if (!select.isEditedPostSaveable()) {
94
95
  return;
95
96
  }
@@ -258,7 +259,7 @@ function refreshPost() {
258
259
  });
259
260
  return { type: "DO_NOTHING" };
260
261
  }
261
- const trashPost = () => async ({ select, dispatch, registry }) => {
262
+ var trashPost = () => async ({ select, dispatch, registry }) => {
262
263
  const postTypeSlug = select.getCurrentPostType();
263
264
  const postType = await registry.resolveSelect(coreStore).getPostType(postTypeSlug);
264
265
  const { rest_base: restBase, rest_namespace: restNamespace = "wp/v2" } = postType;
@@ -277,7 +278,7 @@ const trashPost = () => async ({ select, dispatch, registry }) => {
277
278
  }
278
279
  dispatch({ type: "REQUEST_POST_DELETE_FINISH" });
279
280
  };
280
- const autosave = ({ local = false, ...options } = {}) => async ({ select, dispatch }) => {
281
+ var autosave = ({ local = false, ...options } = {}) => async ({ select, dispatch }) => {
281
282
  const post = select.getCurrentPost();
282
283
  if (post.type === "wp_template") {
283
284
  return;
@@ -292,7 +293,7 @@ const autosave = ({ local = false, ...options } = {}) => async ({ select, dispat
292
293
  await dispatch.savePost({ isAutosave: true, ...options });
293
294
  }
294
295
  };
295
- const __unstableSaveForPreview = ({ forceIsAutosaveable } = {}) => async ({ select, dispatch }) => {
296
+ var __unstableSaveForPreview = ({ forceIsAutosaveable } = {}) => async ({ select, dispatch }) => {
296
297
  if ((forceIsAutosaveable || select.isEditedPostAutosaveable()) && !select.isPostLocked()) {
297
298
  const isDraft = ["draft", "auto-draft"].includes(
298
299
  select.getEditedPostAttribute("status")
@@ -305,10 +306,10 @@ const __unstableSaveForPreview = ({ forceIsAutosaveable } = {}) => async ({ sele
305
306
  }
306
307
  return select.getEditedPostPreviewLink();
307
308
  };
308
- const redo = () => ({ registry }) => {
309
+ var redo = () => ({ registry }) => {
309
310
  registry.dispatch(coreStore).redo();
310
311
  };
311
- const undo = () => ({ registry }) => {
312
+ var undo = () => ({ registry }) => {
312
313
  registry.dispatch(coreStore).undo();
313
314
  };
314
315
  function createUndoLevel() {
@@ -325,10 +326,10 @@ function updatePostLock(lock) {
325
326
  lock
326
327
  };
327
328
  }
328
- const enablePublishSidebar = () => ({ registry }) => {
329
+ var enablePublishSidebar = () => ({ registry }) => {
329
330
  registry.dispatch(preferencesStore).set("core", "isPublishSidebarEnabled", true);
330
331
  };
331
- const disablePublishSidebar = () => ({ registry }) => {
332
+ var disablePublishSidebar = () => ({ registry }) => {
332
333
  registry.dispatch(preferencesStore).set("core", "isPublishSidebarEnabled", false);
333
334
  };
334
335
  function lockPostSaving(lockName) {
@@ -355,7 +356,7 @@ function unlockPostAutosaving(lockName) {
355
356
  lockName
356
357
  };
357
358
  }
358
- const resetEditorBlocks = (blocks, options = {}) => ({ select, dispatch, registry }) => {
359
+ var resetEditorBlocks = (blocks, options = {}) => ({ select, dispatch, registry }) => {
359
360
  const { __unstableShouldCreateUndoLevel, selection } = options;
360
361
  const edits = { blocks, selection };
361
362
  if (__unstableShouldCreateUndoLevel !== false) {
@@ -375,7 +376,7 @@ function updateEditorSettings(settings) {
375
376
  settings
376
377
  };
377
378
  }
378
- const setRenderingMode = (mode) => ({ dispatch, registry, select }) => {
379
+ var setRenderingMode = (mode) => ({ dispatch, registry, select }) => {
379
380
  if (select.__unstableIsEditorReady() && !select.getEditorSettings().isPreviewMode) {
380
381
  registry.dispatch(blockEditorStore).clearSelectedBlock();
381
382
  dispatch.editPost({ selection: void 0 }, { undoIgnore: true });
@@ -391,7 +392,7 @@ function setDeviceType(deviceType) {
391
392
  deviceType
392
393
  };
393
394
  }
394
- const toggleEditorPanelEnabled = (panelName) => ({ registry }) => {
395
+ var toggleEditorPanelEnabled = (panelName) => ({ registry }) => {
395
396
  const inactivePanels = registry.select(preferencesStore).get("core", "inactivePanels") ?? [];
396
397
  const isPanelInactive = !!inactivePanels?.includes(panelName);
397
398
  let updatedInactivePanels;
@@ -404,7 +405,7 @@ const toggleEditorPanelEnabled = (panelName) => ({ registry }) => {
404
405
  }
405
406
  registry.dispatch(preferencesStore).set("core", "inactivePanels", updatedInactivePanels);
406
407
  };
407
- const toggleEditorPanelOpened = (panelName) => ({ registry }) => {
408
+ var toggleEditorPanelOpened = (panelName) => ({ registry }) => {
408
409
  const openPanels = registry.select(preferencesStore).get("core", "openPanels") ?? [];
409
410
  const isPanelOpen = !!openPanels?.includes(panelName);
410
411
  let updatedOpenPanels;
@@ -423,7 +424,7 @@ function removeEditorPanel(panelName) {
423
424
  panelName
424
425
  };
425
426
  }
426
- const setIsInserterOpened = (value) => ({ dispatch, registry }) => {
427
+ var setIsInserterOpened = (value) => ({ dispatch, registry }) => {
427
428
  if (typeof value === "object" && value.hasOwnProperty("rootClientId") && value.hasOwnProperty("insertionIndex")) {
428
429
  unlock(registry.dispatch(blockEditorStore)).setInsertionPoint({
429
430
  rootClientId: value.rootClientId,
@@ -441,7 +442,7 @@ function setIsListViewOpened(isOpen) {
441
442
  isOpen
442
443
  };
443
444
  }
444
- const toggleDistractionFree = ({ createNotice = true } = {}) => ({ dispatch, registry }) => {
445
+ var toggleDistractionFree = ({ createNotice = true } = {}) => ({ dispatch, registry }) => {
445
446
  const isDistractionFree = registry.select(preferencesStore).get("core", "distractionFree");
446
447
  if (isDistractionFree) {
447
448
  registry.dispatch(preferencesStore).set("core", "fixedToolbar", false);
@@ -487,7 +488,7 @@ const toggleDistractionFree = ({ createNotice = true } = {}) => ({ dispatch, reg
487
488
  }
488
489
  });
489
490
  };
490
- const toggleSpotlightMode = () => ({ registry }) => {
491
+ var toggleSpotlightMode = () => ({ registry }) => {
491
492
  registry.dispatch(preferencesStore).toggle("core", "focusMode");
492
493
  const isFocusMode = registry.select(preferencesStore).get("core", "focusMode");
493
494
  registry.dispatch(noticesStore).createInfoNotice(
@@ -506,7 +507,7 @@ const toggleSpotlightMode = () => ({ registry }) => {
506
507
  }
507
508
  );
508
509
  };
509
- const toggleTopToolbar = () => ({ registry }) => {
510
+ var toggleTopToolbar = () => ({ registry }) => {
510
511
  registry.dispatch(preferencesStore).toggle("core", "fixedToolbar");
511
512
  const isTopToolbar = registry.select(preferencesStore).get("core", "fixedToolbar");
512
513
  registry.dispatch(noticesStore).createInfoNotice(
@@ -525,7 +526,7 @@ const toggleTopToolbar = () => ({ registry }) => {
525
526
  }
526
527
  );
527
528
  };
528
- const switchEditorMode = (mode) => ({ dispatch, registry }) => {
529
+ var switchEditorMode = (mode) => ({ dispatch, registry }) => {
529
530
  registry.dispatch(preferencesStore).set("core", "editorMode", mode);
530
531
  if (mode !== "visual") {
531
532
  registry.dispatch(blockEditorStore).clearSelectedBlock();
@@ -556,7 +557,7 @@ function togglePublishSidebar() {
556
557
  type: "TOGGLE_PUBLISH_SIDEBAR"
557
558
  };
558
559
  }
559
- const getBlockEditorAction = (name) => (...args) => ({ registry }) => {
560
+ var getBlockEditorAction = (name) => (...args) => ({ registry }) => {
560
561
  deprecated("`wp.data.dispatch( 'core/editor' )." + name + "`", {
561
562
  since: "5.3",
562
563
  alternative: "`wp.data.dispatch( 'core/block-editor' )." + name + "`",
@@ -564,45 +565,45 @@ const getBlockEditorAction = (name) => (...args) => ({ registry }) => {
564
565
  });
565
566
  registry.dispatch(blockEditorStore)[name](...args);
566
567
  };
567
- const resetBlocks = getBlockEditorAction("resetBlocks");
568
- const receiveBlocks = getBlockEditorAction("receiveBlocks");
569
- const updateBlock = getBlockEditorAction("updateBlock");
570
- const updateBlockAttributes = getBlockEditorAction(
568
+ var resetBlocks = getBlockEditorAction("resetBlocks");
569
+ var receiveBlocks = getBlockEditorAction("receiveBlocks");
570
+ var updateBlock = getBlockEditorAction("updateBlock");
571
+ var updateBlockAttributes = getBlockEditorAction(
571
572
  "updateBlockAttributes"
572
573
  );
573
- const selectBlock = getBlockEditorAction("selectBlock");
574
- const startMultiSelect = getBlockEditorAction("startMultiSelect");
575
- const stopMultiSelect = getBlockEditorAction("stopMultiSelect");
576
- const multiSelect = getBlockEditorAction("multiSelect");
577
- const clearSelectedBlock = getBlockEditorAction("clearSelectedBlock");
578
- const toggleSelection = getBlockEditorAction("toggleSelection");
579
- const replaceBlocks = getBlockEditorAction("replaceBlocks");
580
- const replaceBlock = getBlockEditorAction("replaceBlock");
581
- const moveBlocksDown = getBlockEditorAction("moveBlocksDown");
582
- const moveBlocksUp = getBlockEditorAction("moveBlocksUp");
583
- const moveBlockToPosition = getBlockEditorAction(
574
+ var selectBlock = getBlockEditorAction("selectBlock");
575
+ var startMultiSelect = getBlockEditorAction("startMultiSelect");
576
+ var stopMultiSelect = getBlockEditorAction("stopMultiSelect");
577
+ var multiSelect = getBlockEditorAction("multiSelect");
578
+ var clearSelectedBlock = getBlockEditorAction("clearSelectedBlock");
579
+ var toggleSelection = getBlockEditorAction("toggleSelection");
580
+ var replaceBlocks = getBlockEditorAction("replaceBlocks");
581
+ var replaceBlock = getBlockEditorAction("replaceBlock");
582
+ var moveBlocksDown = getBlockEditorAction("moveBlocksDown");
583
+ var moveBlocksUp = getBlockEditorAction("moveBlocksUp");
584
+ var moveBlockToPosition = getBlockEditorAction(
584
585
  "moveBlockToPosition"
585
586
  );
586
- const insertBlock = getBlockEditorAction("insertBlock");
587
- const insertBlocks = getBlockEditorAction("insertBlocks");
588
- const showInsertionPoint = getBlockEditorAction("showInsertionPoint");
589
- const hideInsertionPoint = getBlockEditorAction("hideInsertionPoint");
590
- const setTemplateValidity = getBlockEditorAction(
587
+ var insertBlock = getBlockEditorAction("insertBlock");
588
+ var insertBlocks = getBlockEditorAction("insertBlocks");
589
+ var showInsertionPoint = getBlockEditorAction("showInsertionPoint");
590
+ var hideInsertionPoint = getBlockEditorAction("hideInsertionPoint");
591
+ var setTemplateValidity = getBlockEditorAction(
591
592
  "setTemplateValidity"
592
593
  );
593
- const synchronizeTemplate = getBlockEditorAction(
594
+ var synchronizeTemplate = getBlockEditorAction(
594
595
  "synchronizeTemplate"
595
596
  );
596
- const mergeBlocks = getBlockEditorAction("mergeBlocks");
597
- const removeBlocks = getBlockEditorAction("removeBlocks");
598
- const removeBlock = getBlockEditorAction("removeBlock");
599
- const toggleBlockMode = getBlockEditorAction("toggleBlockMode");
600
- const startTyping = getBlockEditorAction("startTyping");
601
- const stopTyping = getBlockEditorAction("stopTyping");
602
- const enterFormattedText = getBlockEditorAction("enterFormattedText");
603
- const exitFormattedText = getBlockEditorAction("exitFormattedText");
604
- const insertDefaultBlock = getBlockEditorAction("insertDefaultBlock");
605
- const updateBlockListSettings = getBlockEditorAction(
597
+ var mergeBlocks = getBlockEditorAction("mergeBlocks");
598
+ var removeBlocks = getBlockEditorAction("removeBlocks");
599
+ var removeBlock = getBlockEditorAction("removeBlock");
600
+ var toggleBlockMode = getBlockEditorAction("toggleBlockMode");
601
+ var startTyping = getBlockEditorAction("startTyping");
602
+ var stopTyping = getBlockEditorAction("stopTyping");
603
+ var enterFormattedText = getBlockEditorAction("enterFormattedText");
604
+ var exitFormattedText = getBlockEditorAction("exitFormattedText");
605
+ var insertDefaultBlock = getBlockEditorAction("insertDefaultBlock");
606
+ var updateBlockListSettings = getBlockEditorAction(
606
607
  "updateBlockListSettings"
607
608
  );
608
609
  export {