@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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/entities-saved-states/entity-type-list.js"],
4
- "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { PanelBody, PanelRow } from '@wordpress/components';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport EntityRecordItem from './entity-record-item';\nimport { unlock } from '../../lock-unlock';\n\nconst { getGlobalStylesChanges, GlobalStylesContext } = unlock(\n\tblockEditorPrivateApis\n);\n\nfunction getEntityDescription( entity, count ) {\n\tswitch ( entity ) {\n\t\tcase 'site':\n\t\t\treturn 1 === count\n\t\t\t\t? __( 'This change will affect your whole site.' )\n\t\t\t\t: __( 'These changes will affect your whole site.' );\n\t\tcase 'wp_template':\n\t\t\treturn __(\n\t\t\t\t'This change will affect other parts of your site that use this template.'\n\t\t\t);\n\t\tcase 'page':\n\t\tcase 'post':\n\t\t\treturn __( 'The following has been modified.' );\n\t}\n}\n\nfunction GlobalStylesDescription( { record } ) {\n\tconst { user: currentEditorGlobalStyles } =\n\t\tuseContext( GlobalStylesContext );\n\tconst savedRecord = useSelect(\n\t\t( select ) =>\n\t\t\tselect( coreStore ).getEntityRecord(\n\t\t\t\trecord.kind,\n\t\t\t\trecord.name,\n\t\t\t\trecord.key\n\t\t\t),\n\t\t[ record.kind, record.name, record.key ]\n\t);\n\n\tconst globalStylesChanges = getGlobalStylesChanges(\n\t\tcurrentEditorGlobalStyles,\n\t\tsavedRecord,\n\t\t{\n\t\t\tmaxResults: 10,\n\t\t}\n\t);\n\treturn globalStylesChanges.length ? (\n\t\t<ul className=\"entities-saved-states__changes\">\n\t\t\t{ globalStylesChanges.map( ( change ) => (\n\t\t\t\t<li key={ change }>{ change }</li>\n\t\t\t) ) }\n\t\t</ul>\n\t) : null;\n}\n\nfunction EntityDescription( { record, count } ) {\n\tif ( 'globalStyles' === record?.name ) {\n\t\treturn null;\n\t}\n\tconst description = getEntityDescription( record?.name, count );\n\treturn description ? <PanelRow>{ description }</PanelRow> : null;\n}\n\nexport default function EntityTypeList( {\n\tlist,\n\tunselectedEntities,\n\tsetUnselectedEntities,\n} ) {\n\tconst count = list.length;\n\tconst firstRecord = list[ 0 ];\n\tconst entityConfig = useSelect(\n\t\t( select ) =>\n\t\t\tselect( coreStore ).getEntityConfig(\n\t\t\t\tfirstRecord.kind,\n\t\t\t\tfirstRecord.name\n\t\t\t),\n\t\t[ firstRecord.kind, firstRecord.name ]\n\t);\n\n\tlet entityLabel = entityConfig.label;\n\tif ( firstRecord?.name === 'wp_template_part' ) {\n\t\tentityLabel =\n\t\t\t1 === count ? __( 'Template Part' ) : __( 'Template Parts' );\n\t}\n\n\treturn (\n\t\t<PanelBody\n\t\t\ttitle={ entityLabel }\n\t\t\tinitialOpen\n\t\t\tclassName=\"entities-saved-states__panel-body\"\n\t\t>\n\t\t\t<EntityDescription record={ firstRecord } count={ count } />\n\t\t\t{ list.map( ( record ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<EntityRecordItem\n\t\t\t\t\t\tkey={ record.key || record.property }\n\t\t\t\t\t\trecord={ record }\n\t\t\t\t\t\tchecked={\n\t\t\t\t\t\t\t! unselectedEntities.some(\n\t\t\t\t\t\t\t\t( elt ) =>\n\t\t\t\t\t\t\t\t\telt.kind === record.kind &&\n\t\t\t\t\t\t\t\t\telt.name === record.name &&\n\t\t\t\t\t\t\t\t\telt.key === record.key &&\n\t\t\t\t\t\t\t\t\telt.property === record.property\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\tsetUnselectedEntities( record, value )\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t\t{ 'globalStyles' === firstRecord?.name && (\n\t\t\t\t<GlobalStylesDescription record={ firstRecord } />\n\t\t\t) }\n\t\t</PanelBody>\n\t);\n}\n"],
5
- "mappings": "AA2DI,cAqCF,YArCE;AAxDJ,SAAS,UAAU;AACnB,SAAS,iBAAiB;AAC1B,SAAS,WAAW,gBAAgB;AACpC,SAAS,SAAS,iBAAiB;AACnC,SAAS,eAAe,8BAA8B;AACtD,SAAS,kBAAkB;AAK3B,OAAO,sBAAsB;AAC7B,SAAS,cAAc;AAEvB,MAAM,EAAE,wBAAwB,o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CAAE,YAAY,MAAM,YAAY,IAAK;AAAA,EACtC;AAEA,MAAI,cAAc,aAAa;AAC/B,MAAK,aAAa,SAAS,oBAAqB;AAC/C,kBACC,MAAM,QAAQ,GAAI,eAAgB,IAAI,GAAI,gBAAiB;AAAA,EAC7D;AAEA,SACC;AAAA,IAAC;AAAA;AAAA,MACA,OAAQ;AAAA,MACR,aAAW;AAAA,MACX,WAAU;AAAA,MAEV;AAAA,4BAAC,qBAAkB,QAAS,aAAc,OAAgB;AAAA,QACxD,KAAK,IAAK,CAAE,WAAY;AACzB,iBACC;AAAA,YAAC;AAAA;AAAA,cAEA;AAAA,cACA,SACC,CAAE,mBAAmB;AAAA,gBACpB,CAAE,QACD,IAAI,SAAS,OAAO,QACpB,IAAI,SAAS,OAAO,QACpB,IAAI,QAAQ,OAAO,OACnB,IAAI,aAAa,OAAO;AAAA,cAC1B;AAAA,cAED,UAAW,CAAE,UACZ,sBAAuB,QAAQ,KAAM;AAAA;AAAA,YAZhC,OAAO,OAAO,OAAO;AAAA,UAc5B;AAAA,QAEF,CAAE;AAAA,QACA,mBAAmB,aAAa,QACjC,oBAAC,2BAAwB,QAAS,aAAc;AAAA;AAAA;AAAA,EAElD;AAEF;",
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { PanelBody, PanelRow } from '@wordpress/components';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { getGlobalStylesChanges } from '@wordpress/global-styles-engine';\n\n/**\n * Internal dependencies\n */\nimport EntityRecordItem from './entity-record-item';\n\nfunction getEntityDescription( entity, count ) {\n\tswitch ( entity ) {\n\t\tcase 'site':\n\t\t\treturn 1 === count\n\t\t\t\t? __( 'This change will affect your whole site.' )\n\t\t\t\t: __( 'These changes will affect your whole site.' );\n\t\tcase 'wp_template':\n\t\t\treturn __(\n\t\t\t\t'This change will affect other parts of your site that use this template.'\n\t\t\t);\n\t\tcase 'page':\n\t\tcase 'post':\n\t\t\treturn __( 'The following has been modified.' );\n\t}\n}\n\nfunction GlobalStylesDescription( { record } ) {\n\tconst { editedRecord, savedRecord } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEditedEntityRecord, getEntityRecord } =\n\t\t\t\tselect( coreStore );\n\t\t\treturn {\n\t\t\t\teditedRecord: getEditedEntityRecord(\n\t\t\t\t\trecord.kind,\n\t\t\t\t\trecord.name,\n\t\t\t\t\trecord.key\n\t\t\t\t),\n\t\t\t\tsavedRecord: getEntityRecord(\n\t\t\t\t\trecord.kind,\n\t\t\t\t\trecord.name,\n\t\t\t\t\trecord.key\n\t\t\t\t),\n\t\t\t};\n\t\t},\n\t\t[ record.kind, record.name, record.key ]\n\t);\n\n\tconst globalStylesChanges = getGlobalStylesChanges(\n\t\teditedRecord,\n\t\tsavedRecord,\n\t\t{\n\t\t\tmaxResults: 10,\n\t\t}\n\t);\n\treturn globalStylesChanges.length ? (\n\t\t<ul className=\"entities-saved-states__changes\">\n\t\t\t{ globalStylesChanges.map( ( change ) => (\n\t\t\t\t<li key={ change }>{ change }</li>\n\t\t\t) ) }\n\t\t</ul>\n\t) : null;\n}\n\nfunction EntityDescription( { record, count } ) {\n\tif ( 'globalStyles' === record?.name ) {\n\t\treturn null;\n\t}\n\tconst description = getEntityDescription( record?.name, count );\n\treturn description ? <PanelRow>{ description }</PanelRow> : null;\n}\n\nexport default function EntityTypeList( {\n\tlist,\n\tunselectedEntities,\n\tsetUnselectedEntities,\n} ) {\n\tconst count = list.length;\n\tconst firstRecord = list[ 0 ];\n\tconst entityConfig = useSelect(\n\t\t( select ) =>\n\t\t\tselect( coreStore ).getEntityConfig(\n\t\t\t\tfirstRecord.kind,\n\t\t\t\tfirstRecord.name\n\t\t\t),\n\t\t[ firstRecord.kind, firstRecord.name ]\n\t);\n\n\tlet entityLabel = entityConfig.label;\n\tif ( firstRecord?.name === 'wp_template_part' ) {\n\t\tentityLabel =\n\t\t\t1 === count ? __( 'Template Part' ) : __( 'Template Parts' );\n\t}\n\n\treturn (\n\t\t<PanelBody\n\t\t\ttitle={ entityLabel }\n\t\t\tinitialOpen\n\t\t\tclassName=\"entities-saved-states__panel-body\"\n\t\t>\n\t\t\t<EntityDescription record={ firstRecord } count={ count } />\n\t\t\t{ list.map( ( record ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<EntityRecordItem\n\t\t\t\t\t\tkey={ record.key || record.property }\n\t\t\t\t\t\trecord={ record }\n\t\t\t\t\t\tchecked={\n\t\t\t\t\t\t\t! unselectedEntities.some(\n\t\t\t\t\t\t\t\t( elt ) =>\n\t\t\t\t\t\t\t\t\telt.kind === record.kind &&\n\t\t\t\t\t\t\t\t\telt.name === record.name &&\n\t\t\t\t\t\t\t\t\telt.key === record.key &&\n\t\t\t\t\t\t\t\t\telt.property === record.property\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\tsetUnselectedEntities( record, value )\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t\t{ 'globalStyles' === firstRecord?.name && (\n\t\t\t\t<GlobalStylesDescription record={ firstRecord } />\n\t\t\t) }\n\t\t</PanelBody>\n\t);\n}\n"],
5
+ "mappings": ";AAGA,SAAS,UAAU;AACnB,SAAS,iBAAiB;AAC1B,SAAS,WAAW,gBAAgB;AACpC,SAAS,SAAS,iBAAiB;AACnC,SAAS,8BAA8B;AAKvC,OAAO,sBAAsB;AAiDzB,cAqCF,YArCE;AA/CJ,SAAS,qBAAsB,QAAQ,OAAQ;AAC9C,UAAS,QAAS;AAAA,IACjB,KAAK;AACJ,aAAO,MAAM,QACV,GAAI,0CAA2C,IAC/C,GAAI,4CAA6C;AAAA,IACrD,KAAK;AACJ,aAAO;AAAA,QACN;AAAA,MACD;AAAA,IACD,KAAK;AAAA,IACL,KAAK;AACJ,aAAO,GAAI,kCAAmC;AAAA,EAChD;AACD;AAEA,SAAS,w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AAEA,SACC;AAAA,IAAC;AAAA;AAAA,MACA,OAAQ;AAAA,MACR,aAAW;AAAA,MACX,WAAU;AAAA,MAEV;AAAA,4BAAC,qBAAkB,QAAS,aAAc,OAAgB;AAAA,QACxD,KAAK,IAAK,CAAE,WAAY;AACzB,iBACC;AAAA,YAAC;AAAA;AAAA,cAEA;AAAA,cACA,SACC,CAAE,mBAAmB;AAAA,gBACpB,CAAE,QACD,IAAI,SAAS,OAAO,QACpB,IAAI,SAAS,OAAO,QACpB,IAAI,QAAQ,OAAO,OACnB,IAAI,aAAa,OAAO;AAAA,cAC1B;AAAA,cAED,UAAW,CAAE,UACZ,sBAAuB,QAAQ,KAAM;AAAA;AAAA,YAZhC,OAAO,OAAO,OAAO;AAAA,UAc5B;AAAA,QAEF,CAAE;AAAA,QACA,mBAAmB,aAAa,QACjC,oBAAC,2BAAwB,QAAS,aAAc;AAAA;AAAA;AAAA,EAElD;AAEF;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,8 @@
1
+ // packages/editor/src/components/entities-saved-states/hooks/use-is-dirty.js
1
2
  import { useSelect } from "@wordpress/data";
2
3
  import { store as coreStore } from "@wordpress/core-data";
3
4
  import { useMemo, useState } from "@wordpress/element";
4
- const useIsDirty = () => {
5
+ var useIsDirty = () => {
5
6
  const { editedEntities, siteEdits, siteEntityConfig } = useSelect(
6
7
  (select) => {
7
8
  const {
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/components/entities-saved-states/hooks/use-is-dirty.js"],
4
4
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useMemo, useState } from '@wordpress/element';\n\n/**\n * Custom hook that determines if any entities are dirty (edited) and provides a way to manage selected/unselected entities.\n *\n * @return {Object} An object containing the following properties:\n * - dirtyEntityRecords: An array of dirty entity records.\n * - isDirty: A boolean indicating if there are any dirty entity records.\n * - setUnselectedEntities: A function to set the unselected entities.\n * - unselectedEntities: An array of unselected entities.\n */\nexport const useIsDirty = () => {\n\tconst { editedEntities, siteEdits, siteEntityConfig } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\t__experimentalGetDirtyEntityRecords,\n\t\t\t\tgetEntityRecordEdits,\n\t\t\t\tgetEntityConfig,\n\t\t\t} = select( coreStore );\n\n\t\t\treturn {\n\t\t\t\teditedEntities: __experimentalGetDirtyEntityRecords(),\n\t\t\t\tsiteEdits: getEntityRecordEdits( 'root', 'site' ),\n\t\t\t\tsiteEntityConfig: getEntityConfig( 'root', 'site' ),\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\tconst dirtyEntityRecords = useMemo( () => {\n\t\t// Remove site object and decouple into its edited pieces.\n\t\tconst editedEntitiesWithoutSite = editedEntities.filter(\n\t\t\t( record ) => ! ( record.kind === 'root' && record.name === 'site' )\n\t\t);\n\n\t\tconst siteEntityLabels = siteEntityConfig?.meta?.labels ?? {};\n\t\tconst editedSiteEntities = [];\n\t\tfor ( const property in siteEdits ) {\n\t\t\teditedSiteEntities.push( {\n\t\t\t\tkind: 'root',\n\t\t\t\tname: 'site',\n\t\t\t\ttitle: siteEntityLabels[ property ] || property,\n\t\t\t\tproperty,\n\t\t\t} );\n\t\t}\n\n\t\treturn [ ...editedEntitiesWithoutSite, ...editedSiteEntities ];\n\t}, [ editedEntities, siteEdits, siteEntityConfig ] );\n\n\t// Unchecked entities to be ignored by save function.\n\tconst [ unselectedEntities, _setUnselectedEntities ] = useState( [] );\n\n\tconst setUnselectedEntities = (\n\t\t{ kind, name, key, property },\n\t\tchecked\n\t) => {\n\t\tif ( checked ) {\n\t\t\t_setUnselectedEntities(\n\t\t\t\tunselectedEntities.filter(\n\t\t\t\t\t( elt ) =>\n\t\t\t\t\t\telt.kind !== kind ||\n\t\t\t\t\t\telt.name !== name ||\n\t\t\t\t\t\telt.key !== key ||\n\t\t\t\t\t\telt.property !== property\n\t\t\t\t)\n\t\t\t);\n\t\t} else {\n\t\t\t_setUnselectedEntities( [\n\t\t\t\t...unselectedEntities,\n\t\t\t\t{ kind, name, key, property },\n\t\t\t] );\n\t\t}\n\t};\n\n\tconst isDirty = dirtyEntityRecords.length - unselectedEntities.length > 0;\n\n\treturn {\n\t\tdirtyEntityRecords,\n\t\tisDirty,\n\t\tsetUnselectedEntities,\n\t\tunselectedEntities,\n\t};\n};\n"],
5
- "mappings": "AAGA,SAAS,iBAAiB;AAC1B,SAAS,SAAS,iBAAiB;AACnC,SAAS,SAAS,gBAAgB;AAW3B,MAAM,aAAa,MAAM;AAC/B,QAAM,EAAE,gBAAgB,WAAW,iBAAiB,IAAI;AAAA,IACvD,CAAE,WAAY;AACb,YAAM;AAAA,QACL;AAAA,QACA;AAAA,QACA;AAAA,MACD,IAAI,OAAQ,SAAU;AAEtB,aAAO;AAAA,QACN,gBAAgB,oCAAoC;AAAA,QACpD,WAAW,qBAAsB,QAAQ,MAAO;AAAA,QAChD,kBAAkB,gBAAiB,QAAQ,MAAO;AAAA,MACnD;AAAA,IACD;AAAA,IACA,CAAC;AAAA,EACF;AAEA,QAAM,qBAAqB,QAAS,MAAM;AAEzC,UAAM,4BAA4B,eAAe;AAAA,MAChD,CAAE,WAAY,EAAI,OAAO,SAAS,UAAU,OAAO,SAAS;AAAA,IAC7D;AAEA,UAAM,mBAAmB,kBAAkB,MAAM,UAAU,CAAC;AAC5D,UAAM,qBAAqB,CAAC;AAC5B,eAAY,YAAY,WAAY;AACnC,yBAAmB,KAAM;AAAA,QACxB,MAAM;AAAA,QACN,MAAM;AAAA,QACN,OAAO,iBAAkB,QAAS,KAAK;AAAA,QACvC;AAAA,MACD,CAAE;AAAA,IACH;AAEA,WAAO,CAAE,GAAG,2BAA2B,GAAG,kBAAmB;AAAA,EAC9D,GAAG,CAAE,gBAAgB,WAAW,gBAAiB,CAAE;AAGnD,QAAM,CAAE,oBAAoB,sBAAuB,IAAI,SAAU,CAAC,CAAE;AAEpE,QAAM,wBAAwB,CAC7B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;AAAA,IACH;AAEA,WAAO,CAAE,GAAG,2BAA2B,GAAG,kBAAmB;AAAA,EAC9D,GAAG,CAAE,gBAAgB,WAAW,gBAAiB,CAAE;AAGnD,QAAM,CAAE,oBAAoB,sBAAuB,IAAI,SAAU,CAAC,CAAE;AAEpE,QAAM,wBAAwB,CAC7B,EAAE,MAAM,MAAM,KAAK,SAAS,GAC5B,YACI;AACJ,QAAK,SAAU;AACd;AAAA,QACC,mBAAmB;AAAA,UAClB,CAAE,QACD,IAAI,SAAS,QACb,IAAI,SAAS,QACb,IAAI,QAAQ,OACZ,IAAI,aAAa;AAAA,QACnB;AAAA,MACD;AAAA,IACD,OAAO;AACN,6BAAwB;AAAA,QACvB,GAAG;AAAA,QACH,EAAE,MAAM,MAAM,KAAK,SAAS;AAAA,MAC7B,CAAE;AAAA,IACH;AAAA,EACD;AAEA,QAAM,UAAU,mBAAmB,SAAS,mBAAmB,SAAS;AAExE,SAAO;AAAA,IACN;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD;AACD;",
6
6
  "names": []
7
7
  }
@@ -1,4 +1,4 @@
1
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
1
+ // packages/editor/src/components/entities-saved-states/index.js
2
2
  import clsx from "clsx";
3
3
  import { Button, Flex, FlexItem } from "@wordpress/components";
4
4
  import { __, _n, sprintf } from "@wordpress/i18n";
@@ -16,6 +16,7 @@ import EntityTypeList from "./entity-type-list";
16
16
  import { useIsDirty } from "./hooks/use-is-dirty";
17
17
  import { store as editorStore } from "../../store";
18
18
  import { unlock } from "../../lock-unlock";
19
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
19
20
  function identity(values) {
20
21
  return values;
21
22
  }
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/entities-saved-states/index.js"],
4
4
  "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { Button, Flex, FlexItem } from '@wordpress/components';\nimport { __, _n, sprintf } from '@wordpress/i18n';\nimport {\n\tuseCallback,\n\tuseRef,\n\tcreateInterpolateElement,\n} from '@wordpress/element';\nimport {\n\t__experimentalUseDialog as useDialog,\n\tuseInstanceId,\n} from '@wordpress/compose';\nimport { useDispatch } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport EntityTypeList from './entity-type-list';\nimport { useIsDirty } from './hooks/use-is-dirty';\nimport { store as editorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nfunction identity( values ) {\n\treturn values;\n}\n\n/**\n * Renders the component for managing saved states of entities.\n *\n * @param {Object} props The component props.\n * @param {Function} props.close The function to close the dialog.\n * @param {boolean} props.renderDialog Whether to render the component with modal dialog behavior.\n * @param {string} props.variant Changes the layout of the component. When an `inline` value is provided, the action buttons are rendered at the end of the component instead of at the start.\n *\n * @return {React.ReactNode} The rendered component.\n */\nexport default function EntitiesSavedStates( {\n\tclose,\n\trenderDialog,\n\tvariant,\n} ) {\n\tconst isDirtyProps = useIsDirty();\n\treturn (\n\t\t<EntitiesSavedStatesExtensible\n\t\t\tclose={ close }\n\t\t\trenderDialog={ renderDialog }\n\t\t\tvariant={ variant }\n\t\t\t{ ...isDirtyProps }\n\t\t/>\n\t);\n}\n\n/**\n * Renders a panel for saving entities with dirty records.\n *\n * @param {Object} props The component props.\n * @param {string} props.additionalPrompt Additional prompt to display.\n * @param {Function} props.close Function to close the panel.\n * @param {Function} props.onSave Function to call when saving entities.\n * @param {boolean} props.saveEnabled Flag indicating if save is enabled.\n * @param {string} props.saveLabel Label for the save button.\n * @param {boolean} props.renderDialog Whether to render the component with modal dialog behavior.\n * @param {Array} props.dirtyEntityRecords Array of dirty entity records.\n * @param {boolean} props.isDirty Flag indicating if there are dirty entities.\n * @param {Function} props.setUnselectedEntities Function to set unselected entities.\n * @param {Array} props.unselectedEntities Array of unselected entities.\n * @param {string} props.variant Changes the layout of the component. When an `inline` value is provided, the action buttons are rendered at the end of the component instead of at the start.\n *\n * @return {React.ReactNode} The rendered component.\n */\nexport function EntitiesSavedStatesExtensible( {\n\tadditionalPrompt = undefined,\n\tclose,\n\tonSave = identity,\n\tsaveEnabled: saveEnabledProp = undefined,\n\tsaveLabel = __( 'Save' ),\n\trenderDialog,\n\tdirtyEntityRecords,\n\tisDirty,\n\tsetUnselectedEntities,\n\tunselectedEntities,\n\tvariant = 'default',\n} ) {\n\tconst saveButtonRef = useRef();\n\tconst { saveDirtyEntities } = unlock( useDispatch( editorStore ) );\n\t// To group entities by type.\n\tconst partitionedSavables = dirtyEntityRecords.reduce( ( acc, record ) => {\n\t\tconst { name } = record;\n\t\tif ( ! acc[ name ] ) {\n\t\t\tacc[ name ] = [];\n\t\t}\n\t\tacc[ name ].push( record );\n\t\treturn acc;\n\t}, {} );\n\n\t// Sort entity groups.\n\tconst {\n\t\tsite: siteSavables,\n\t\twp_template: templateSavables,\n\t\twp_template_part: templatePartSavables,\n\t\t...contentSavables\n\t} = partitionedSavables;\n\tconst sortedPartitionedSavables = [\n\t\tsiteSavables,\n\t\ttemplateSavables,\n\t\ttemplatePartSavables,\n\t\t...Object.values( contentSavables ),\n\t].filter( Array.isArray );\n\n\tconst saveEnabled = saveEnabledProp ?? isDirty;\n\t// Explicitly define this with no argument passed. Using `close` on\n\t// its own will use the event object in place of the expected saved entities.\n\tconst dismissPanel = useCallback( () => close(), [ close ] );\n\n\tconst [ saveDialogRef, saveDialogProps ] = useDialog( {\n\t\tonClose: () => dismissPanel(),\n\t} );\n\tconst dialogLabelId = useInstanceId(\n\t\tEntitiesSavedStatesExtensible,\n\t\t'entities-saved-states__panel-label'\n\t);\n\tconst dialogDescriptionId = useInstanceId(\n\t\tEntitiesSavedStatesExtensible,\n\t\t'entities-saved-states__panel-description'\n\t);\n\n\tconst selectItemsToSaveDescription = !! dirtyEntityRecords.length\n\t\t? __( 'Select the items you want to save.' )\n\t\t: undefined;\n\n\tconst isInline = variant === 'inline';\n\n\tconst actionButtons = (\n\t\t<>\n\t\t\t<FlexItem\n\t\t\t\tisBlock={ isInline ? false : true }\n\t\t\t\tas={ Button }\n\t\t\t\tvariant={ isInline ? 'tertiary' : 'secondary' }\n\t\t\t\tsize={ isInline ? undefined : 'compact' }\n\t\t\t\tonClick={ dismissPanel }\n\t\t\t>\n\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t</FlexItem>\n\t\t\t<FlexItem\n\t\t\t\tisBlock={ isInline ? false : true }\n\t\t\t\tas={ Button }\n\t\t\t\tref={ saveButtonRef }\n\t\t\t\tvariant=\"primary\"\n\t\t\t\tsize={ isInline ? undefined : 'compact' }\n\t\t\t\tdisabled={ ! saveEnabled }\n\t\t\t\taccessibleWhenDisabled\n\t\t\t\tonClick={ () =>\n\t\t\t\t\tsaveDirtyEntities( {\n\t\t\t\t\t\tonSave,\n\t\t\t\t\t\tdirtyEntityRecords,\n\t\t\t\t\t\tentitiesToSkip: unselectedEntities,\n\t\t\t\t\t\tclose,\n\t\t\t\t\t} )\n\t\t\t\t}\n\t\t\t\tclassName=\"editor-entities-saved-states__save-button\"\n\t\t\t>\n\t\t\t\t{ saveLabel }\n\t\t\t</FlexItem>\n\t\t</>\n\t);\n\n\treturn (\n\t\t<div\n\t\t\tref={ renderDialog ? saveDialogRef : undefined }\n\t\t\t{ ...( renderDialog && saveDialogProps ) }\n\t\t\tclassName={ clsx( 'entities-saved-states__panel', {\n\t\t\t\t'is-inline': isInline,\n\t\t\t} ) }\n\t\t\trole={ renderDialog ? 'dialog' : undefined }\n\t\t\taria-labelledby={ renderDialog ? dialogLabelId : undefined }\n\t\t\taria-describedby={ renderDialog ? dialogDescriptionId : undefined }\n\t\t>\n\t\t\t{ ! isInline && (\n\t\t\t\t<Flex className=\"entities-saved-states__panel-header\" gap={ 2 }>\n\t\t\t\t\t{ actionButtons }\n\t\t\t\t</Flex>\n\t\t\t) }\n\n\t\t\t<div className=\"entities-saved-states__text-prompt\">\n\t\t\t\t<div className=\"entities-saved-states__text-prompt--header-wrapper\">\n\t\t\t\t\t<strong\n\t\t\t\t\t\tid={ renderDialog ? dialogLabelId : undefined }\n\t\t\t\t\t\tclassName=\"entities-saved-states__text-prompt--header\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Are you ready to save?' ) }\n\t\t\t\t\t</strong>\n\t\t\t\t</div>\n\t\t\t\t<div id={ renderDialog ? dialogDescriptionId : undefined }>\n\t\t\t\t\t{ additionalPrompt }\n\t\t\t\t\t<p className=\"entities-saved-states__text-prompt--changes-count\">\n\t\t\t\t\t\t{ isDirty\n\t\t\t\t\t\t\t? createInterpolateElement(\n\t\t\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t\t\t/* translators: %d: number of site changes waiting to be saved. */\n\t\t\t\t\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t\t\t\t\t'There is <strong>%d site change</strong> waiting to be saved.',\n\t\t\t\t\t\t\t\t\t\t\t'There are <strong>%d site changes</strong> waiting to be saved.',\n\t\t\t\t\t\t\t\t\t\t\tdirtyEntityRecords.length\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\tdirtyEntityRecords.length\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t{ strong: <strong /> }\n\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t: selectItemsToSaveDescription }\n\t\t\t\t\t</p>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t{ sortedPartitionedSavables.map( ( list ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<EntityTypeList\n\t\t\t\t\t\tkey={ list[ 0 ].name }\n\t\t\t\t\t\tlist={ list }\n\t\t\t\t\t\tunselectedEntities={ unselectedEntities }\n\t\t\t\t\t\tsetUnselectedEntities={ setUnselectedEntities }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} ) }\n\n\t\t\t{ isInline && (\n\t\t\t\t<Flex\n\t\t\t\t\tdirection=\"row\"\n\t\t\t\t\tjustify=\"flex-end\"\n\t\t\t\t\t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qBAAC,SAAI,WAAU,sCACd;AAAA,8BAAC,SAAI,WAAU,sDACd;AAAA,YAAC;AAAA;AAAA,cACA,IAAK,eAAe,gBAAgB;AAAA,cACpC,WAAU;AAAA,cAER,aAAI,wBAAyB;AAAA;AAAA,UAChC,GACD;AAAA,UACA,qBAAC,SAAI,IAAK,eAAe,sBAAsB,QAC5C;AAAA;AAAA,YACF,oBAAC,OAAE,WAAU,qDACV,oBACC;AAAA,cACA;AAAA;AAAA,gBAEC;AAAA,kBACC;AAAA,kBACA;AAAA,kBACA,mBAAmB;AAAA,gBACpB;AAAA,gBACA,mBAAmB;AAAA,cACpB;AAAA,cACA,EAAE,QAAQ,oBAAC,YAAO,EAAG;AAAA,YACrB,IACA,8BACJ;AAAA,aACD;AAAA,WACD;AAAA,QAEE,0BAA0B,IAAK,CAAE,SAAU;AAC5C,iBACC;AAAA,YAAC;AAAA;AAAA,cAEA;AAAA,cACA;AAAA,cACA;AAAA;AAAA,YAHM,KAAM,CAAE,EAAE;AAAA,UAIjB;AAAA,QAEF,CAAE;AAAA,QAEA,YACD;AAAA,UAAC;AAAA;AAAA,YACA,WAAU;AAAA,YACV,SAAQ;AAAA,YACR,WAAU;AAAA,YAER;AAAA;AAAA,QACH;AAAA;AAAA;AAAA,EAEF;AAEF;",
6
6
  "names": []
7
7
  }
@@ -1,4 +1,4 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
1
+ // packages/editor/src/components/error-boundary/index.js
2
2
  import { Component } from "@wordpress/element";
3
3
  import { __ } from "@wordpress/i18n";
4
4
  import {
@@ -10,6 +10,7 @@ import { select } from "@wordpress/data";
10
10
  import { useCopyToClipboard } from "@wordpress/compose";
11
11
  import { doAction } from "@wordpress/hooks";
12
12
  import { store as editorStore } from "../../store";
13
+ import { jsx, jsxs } from "react/jsx-runtime";
13
14
  function getContent() {
14
15
  try {
15
16
  return select(editorStore).getEditedPostContent();
@@ -20,7 +21,7 @@ function CopyButton({ text, children, variant = "secondary" }) {
20
21
  const ref = useCopyToClipboard(text);
21
22
  return /* @__PURE__ */ jsx(Button, { __next40pxDefaultSize: true, variant, ref, children });
22
23
  }
23
- class ErrorBoundary extends Component {
24
+ var ErrorBoundary = class extends Component {
24
25
  constructor() {
25
26
  super(...arguments);
26
27
  this.state = {
@@ -58,7 +59,7 @@ class ErrorBoundary extends Component {
58
59
  }
59
60
  );
60
61
  }
61
- }
62
+ };
62
63
  var error_boundary_default = ErrorBoundary;
63
64
  export {
64
65
  error_boundary_default as default
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/error-boundary/index.js"],
4
4
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tButton,\n\t__experimentalHStack as HStack,\n\t__experimentalText as Text,\n} from '@wordpress/components';\nimport { select } from '@wordpress/data';\nimport { useCopyToClipboard } from '@wordpress/compose';\nimport { doAction } from '@wordpress/hooks';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nfunction getContent() {\n\ttry {\n\t\t// While `select` in a component is generally discouraged, it is\n\t\t// used here because it (a) reduces the chance of data loss in the\n\t\t// case of additional errors by performing a direct retrieval and\n\t\t// (b) avoids the performance cost associated with unnecessary\n\t\t// content serialization throughout the lifetime of a non-erroring\n\t\t// application.\n\t\treturn select( editorStore ).getEditedPostContent();\n\t} catch ( error ) {}\n}\n\nfunction CopyButton( { text, children, variant = 'secondary' } ) {\n\tconst ref = useCopyToClipboard( text );\n\treturn (\n\t\t<Button __next40pxDefaultSize variant={ variant } ref={ ref }>\n\t\t\t{ children }\n\t\t</Button>\n\t);\n}\n\nclass ErrorBoundary extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.state = {\n\t\t\terror: null,\n\t\t};\n\t}\n\n\tcomponentDidCatch( error ) {\n\t\tdoAction( 'editor.ErrorBoundary.errorLogged', error );\n\t}\n\n\tstatic getDerivedStateFromError( error ) {\n\t\treturn { error };\n\t}\n\n\trender() {\n\t\tconst { error } = this.state;\n\t\tconst { canCopyContent = false } = this.props;\n\t\tif ( ! error ) {\n\t\t\treturn this.props.children;\n\t\t}\n\n\t\treturn (\n\t\t\t<HStack\n\t\t\t\tclassName=\"editor-error-boundary\"\n\t\t\t\talignment=\"baseline\"\n\t\t\t\tspacing={ 4 }\n\t\t\t\tjustify=\"space-between\"\n\t\t\t\texpanded={ false }\n\t\t\t\twrap\n\t\t\t>\n\t\t\t\t<Text as=\"p\">\n\t\t\t\t\t{ __( 'The editor has encountered an unexpected error.' ) }\n\t\t\t\t</Text>\n\t\t\t\t<HStack expanded={ false }>\n\t\t\t\t\t{ canCopyContent && (\n\t\t\t\t\t\t<CopyButton text={ getContent }>\n\t\t\t\t\t\t\t{ __( 'Copy contents' ) }\n\t\t\t\t\t\t</CopyButton>\n\t\t\t\t\t) }\n\t\t\t\t\t<CopyButton variant=\"primary\" text={ error?.stack }>\n\t\t\t\t\t\t{ __( 'Copy error' ) }\n\t\t\t\t\t</CopyButton>\n\t\t\t\t</HStack>\n\t\t\t</HStack>\n\t\t);\n\t}\n}\n\n/**\n * ErrorBoundary is used to catch JavaScript errors anywhere in a child component tree, log those errors, and display a fallback UI.\n *\n * It uses the lifecycle methods getDerivedStateFromError and componentDidCatch to catch errors in a child component tree.\n *\n * getDerivedStateFromError is used to render a fallback UI after an error has been thrown, and componentDidCatch is used to log error information.\n *\n * @class ErrorBoundary\n * @augments Component\n */\nexport default ErrorBoundary;\n"],
5
- "mappings": "AAkCE,cA0CE,YA1CF;AA/BF,SAAS,iBAAiB;AAC1B,SAAS,UAAU;AACnB;AAAA,EACC;AAAA,EACA,wBAAwB;AAAA,EACxB,sBAAsB;AAAA,OAChB;AACP,SAAS,cAAc;AACvB,SAAS,0BAA0B;AACnC,SAAS,gBAAgB;AAKzB,SAAS,SAAS,mBAAmB;AAErC,SAAS,aAAa;AACrB,MAAI;AAOH,WAAO,OAAQ,WAAY,EAAE,qBAA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/components/global-keyboard-shortcuts/index.js
1
2
  import { useShortcut } from "@wordpress/keyboard-shortcuts";
2
3
  import { useDispatch, useSelect } from "@wordpress/data";
3
4
  import { store as interfaceStore } from "@wordpress/interface";
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/global-keyboard-shortcuts/index.js"],
4
4
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useShortcut } from '@wordpress/keyboard-shortcuts';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { store as interfaceStore } from '@wordpress/interface';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * Handles the keyboard shortcuts for the editor.\n *\n * It provides functionality for various keyboard shortcuts such as toggling editor mode,\n * toggling distraction-free mode, undo/redo, saving the post, toggling list view,\n * and toggling the sidebar.\n */\nexport default function EditorKeyboardShortcuts() {\n\tconst isModeToggleDisabled = useSelect( ( select ) => {\n\t\tconst { richEditingEnabled, codeEditingEnabled } =\n\t\t\tselect( editorStore ).getEditorSettings();\n\t\treturn ! richEditingEnabled || ! codeEditingEnabled;\n\t}, [] );\n\tconst { getBlockSelectionStart } = useSelect( blockEditorStore );\n\tconst { getActiveComplementaryArea } = useSelect( interfaceStore );\n\tconst { enableComplementaryArea, disableComplementaryArea } =\n\t\tuseDispatch( interfaceStore );\n\tconst {\n\t\tredo,\n\t\tundo,\n\t\tsavePost,\n\t\tsetIsListViewOpened,\n\t\tswitchEditorMode,\n\t\ttoggleDistractionFree,\n\t} = useDispatch( editorStore );\n\tconst {\n\t\tisEditedPostDirty,\n\t\tisPostSavingLocked,\n\t\tisListViewOpened,\n\t\tgetEditorMode,\n\t} = useSelect( editorStore );\n\n\tuseShortcut(\n\t\t'core/editor/toggle-mode',\n\t\t() => {\n\t\t\tswitchEditorMode(\n\t\t\t\tgetEditorMode() === 'visual' ? 'text' : 'visual'\n\t\t\t);\n\t\t},\n\t\t{\n\t\t\tisDisabled: isModeToggleDisabled,\n\t\t}\n\t);\n\n\tuseShortcut( 'core/editor/toggle-distraction-free', () => {\n\t\ttoggleDistractionFree();\n\t} );\n\n\tuseShortcut( 'core/editor/undo', ( event ) => {\n\t\tundo();\n\t\tevent.preventDefault();\n\t} );\n\n\tuseShortcut( 'core/editor/redo', ( event ) => {\n\t\tredo();\n\t\tevent.preventDefault();\n\t} );\n\n\tuseShortcut( 'core/editor/save', ( event ) => {\n\t\tevent.preventDefault();\n\n\t\t/**\n\t\t * Do not save the post if post saving is locked.\n\t\t */\n\t\tif ( isPostSavingLocked() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// TODO: This should be handled in the `savePost` effect in\n\t\t// considering `isSaveable`. See note on `isEditedPostSaveable`\n\t\t// selector about dirtiness and meta-boxes.\n\t\t//\n\t\t// See: `isEditedPostSaveable`\n\t\tif ( ! isEditedPostDirty() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tsavePost();\n\t} );\n\n\t// Only opens the list view. Other functionality for this shortcut happens in the rendered sidebar.\n\tuseShortcut( 'core/editor/toggle-list-view', ( event ) => {\n\t\tif ( ! isListViewOpened() ) {\n\t\t\tevent.preventDefault();\n\t\t\tsetIsListViewOpened( true );\n\t\t}\n\t} );\n\n\tuseShortcut( 'core/editor/toggle-sidebar', ( event ) => {\n\t\t// This shortcut has no known clashes, but use preventDefault to prevent any\n\t\t// obscure shortcuts from triggering.\n\t\tevent.preventDefault();\n\t\tconst isEditorSidebarOpened = [\n\t\t\t'edit-post/document',\n\t\t\t'edit-post/block',\n\t\t].includes( getActiveComplementaryArea( 'core' ) );\n\n\t\tif ( isEditorSidebarOpened ) {\n\t\t\tdisableComplementaryArea( 'core' );\n\t\t} else {\n\t\t\tconst sidebarToOpen = getBlockSelectionStart()\n\t\t\t\t? 'edit-post/block'\n\t\t\t\t: 'edit-post/document';\n\t\t\tenableComplementaryArea( 'core', sidebarToOpen );\n\t\t}\n\t} );\n\n\treturn null;\n}\n"],
5
- "mapp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AA,EACD;AAEA,cAAa,uCAAuC,MAAM;AACzD,0BAAsB;AAAA,EACvB,CAAE;AAEF,cAAa,oBAAoB,CAAE,UAAW;AAC7C,SAAK;AACL,UAAM,eAAe;AAAA,EACtB,CAAE;AAEF,cAAa,oBAAoB,CAAE,UAAW;AAC7C,SAAK;AACL,UAAM,eAAe;AAAA,EACtB,CAAE;AAEF,cAAa,oBAAoB,CAAE,UAAW;AAC7C,UAAM,eAAe;AAKrB,QAAK,mBAAmB,GAAI;AAC3B;AAAA,IACD;AAOA,QAAK,CAAE,kBAAkB,GAAI;AAC5B;AAAA,IACD;AAEA,aAAS;AAAA,EACV,CAAE;AAGF,cAAa,gCAAgC,CAAE,UAAW;AACzD,QAAK,CAAE,iBAAiB,GAAI;AAC3B,YAAM,eAAe;AACrB,0BAAqB,IAAK;AAAA,IAC3B;AAAA,EACD,CAAE;AAEF,cAAa,8BAA8B,CAAE,UAAW;AAGvD,UAAM,eAAe;AACrB,UAAM,wBAAwB;AAAA,MAC7B;AAAA,MACA;AAAA,IACD,EAAE,SAAU,2BAA4B,MAAO,CAAE;AAEjD,QAAK,uBAAwB;AAC5B,+BAA0B,MAAO;AAAA,IAClC,OAAO;AACN,YAAM,gBAAgB,uBAAuB,IAC1C,oBACA;AACH,8BAAyB,QAAQ,aAAc;AAAA,IAChD;AAAA,EACD,CAAE;AAEF,SAAO;AACR;",
6
6
  "names": []
7
7
  }
@@ -1,10 +1,11 @@
1
- import { jsx } from "react/jsx-runtime";
1
+ // packages/editor/src/components/global-keyboard-shortcuts/register-shortcuts.js
2
2
  import { useEffect } from "@wordpress/element";
3
3
  import { useDispatch } from "@wordpress/data";
4
4
  import { __ } from "@wordpress/i18n";
5
5
  import { BlockEditorKeyboardShortcuts } from "@wordpress/block-editor";
6
6
  import { store as keyboardShortcutsStore } from "@wordpress/keyboard-shortcuts";
7
7
  import { isAppleOS } from "@wordpress/keycodes";
8
+ import { jsx } from "react/jsx-runtime";
8
9
  function EditorKeyboardShortcutsRegister() {
9
10
  const { registerShortcut } = useDispatch(keyboardShortcutsStore);
10
11
  useEffect(() => {
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/global-keyboard-shortcuts/register-shortcuts.js"],
4
4
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\nimport { useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { BlockEditorKeyboardShortcuts } from '@wordpress/block-editor';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport { isAppleOS } from '@wordpress/keycodes';\n\n/**\n * Component for registering editor keyboard shortcuts.\n *\n * @return {Element} The component to be rendered.\n */\nfunction EditorKeyboardShortcutsRegister() {\n\t// Registering the shortcuts.\n\tconst { registerShortcut } = useDispatch( keyboardShortcutsStore );\n\tuseEffect( () => {\n\t\tregisterShortcut( {\n\t\t\tname: 'core/editor/toggle-mode',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Switch between visual editor and code editor.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'secondary',\n\t\t\t\tcharacter: 'm',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/editor/save',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Save your changes.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primary',\n\t\t\t\tcharacter: 's',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/editor/undo',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Undo your last changes.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primary',\n\t\t\t\tcharacter: 'z',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/editor/redo',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Redo your last undo.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primaryShift',\n\t\t\t\tcharacter: 'z',\n\t\t\t},\n\t\t\t// Disable on Apple OS because it conflicts with the browser's\n\t\t\t// history shortcut. It's a fine alias for both Windows and Linux.\n\t\t\t// Since there's no conflict for Ctrl+Shift+Z on both Windows and\n\t\t\t// Linux, we keep it as the default for consistency.\n\t\t\taliases: isAppleOS()\n\t\t\t\t? []\n\t\t\t\t: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmodifier: 'primary',\n\t\t\t\t\t\t\tcharacter: 'y',\n\t\t\t\t\t\t},\n\t\t\t\t ],\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/editor/toggle-list-view',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Show or hide the List View.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'access',\n\t\t\t\tcharacter: 'o',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/editor/toggle-distraction-free',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Enter or exit distraction free mode.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primaryShift',\n\t\t\t\tcharacter: '\\\\',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/editor/toggle-sidebar',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Show or hide the Settings panel.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primaryShift',\n\t\t\t\tcharacter: ',',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/editor/keyboard-shortcuts',\n\t\t\tcategory: 'main',\n\t\t\tdescription: __( 'Display these keyboard shortcuts.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'access',\n\t\t\t\tcharacter: 'h',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/editor/next-region',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Navigate to the next part of the editor.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'ctrl',\n\t\t\t\tcharacter: '`',\n\t\t\t},\n\t\t\taliases: [\n\t\t\t\t{\n\t\t\t\t\tmodifier: 'access',\n\t\t\t\t\tcharacter: 'n',\n\t\t\t\t},\n\t\t\t],\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/editor/previous-region',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Navigate to the previous part of the editor.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'ctrlShift',\n\t\t\t\tcharacter: '`',\n\t\t\t},\n\t\t\taliases: [\n\t\t\t\t{\n\t\t\t\t\tmodifier: 'access',\n\t\t\t\t\tcharacter: 'p',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tmodifier: 'ctrlShift',\n\t\t\t\t\tcharacter: '~',\n\t\t\t\t},\n\t\t\t],\n\t\t} );\n\t}, [ registerShortcut ] );\n\n\treturn <BlockEditorKeyboardShortcuts.Register />;\n}\n\nexport default EditorKeyboardShortcutsRegister;\n"],
5
- "mappings": "AAoJQ;AAjJR,SAAS,iBAAiB;AAC1B,SAAS,mBAAmB;AAC5B,SAAS,UAAU;AACnB,SAAS,oCAAoC;AAC7C,SAAS,SAAS,8BAA8B;AAChD,SAAS,iBAAiB;AAO1B,SAAS,kCAAkC;AAE1C,QAAM,EAAE,iBAAiB,IAAI,YAAa,sBAAuB;AACjE,YAAW,MAAM;AAChB,qBAAkB;AAAA,MACjB,MAAM;AAAA,MACN,UAAU;AAAA,MACV,aAAa,GAAI,+CAAgD;AAAA,MACjE,gBAAgB;AAAA,QACf,UAAU;AAAA,QACV,WAAW;AAAA,MACZ;AAAA,IACD,CAAE;AAEF,qBAAkB;AAAA,MACjB,MAAM;AAAA,MACN,UAAU;AAAA,MACV,aAAa,GAAI,oBAAqB;AAAA,MACtC,gBAAgB;AAAA,QACf,UAAU;AAAA,QACV,WAAW;AAAA,MACZ;AAA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;AAAA,MACD;AAAA,IACD,CAAE;AAEF,qBAAkB;AAAA,MACjB,MAAM;AAAA,MACN,UAAU;AAAA,MACV,aAAa,GAAI,8CAA+C;AAAA,MAChE,gBAAgB;AAAA,QACf,UAAU;AAAA,QACV,WAAW;AAAA,MACZ;AAAA,MACA,SAAS;AAAA,QACR;AAAA,UACC,UAAU;AAAA,UACV,WAAW;AAAA,QACZ;AAAA,QACA;AAAA,UACC,UAAU;AAAA,UACV,WAAW;AAAA,QACZ;AAAA,MACD;AAAA,IACD,CAAE;AAAA,EACH,GAAG,CAAE,gBAAiB,CAAE;AAExB,SAAO,oBAAC,6BAA6B,UAA7B,EAAsC;AAC/C;AAEA,IAAO,6BAAQ;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,47 @@
1
+ // packages/editor/src/components/global-styles/block-link.js
2
+ import { useSelect } from "@wordpress/data";
3
+ import { useEffect } from "@wordpress/element";
4
+ import { store as blockEditorStore } from "@wordpress/block-editor";
5
+ import { usePrevious } from "@wordpress/compose";
6
+ function GlobalStylesBlockLink({ path, onPathChange }) {
7
+ const { selectedBlockName, selectedBlockClientId } = useSelect(
8
+ (select) => {
9
+ const { getSelectedBlockClientId, getBlockName } = select(blockEditorStore);
10
+ const clientId = getSelectedBlockClientId();
11
+ return {
12
+ selectedBlockName: getBlockName(clientId),
13
+ selectedBlockClientId: clientId
14
+ };
15
+ },
16
+ []
17
+ );
18
+ const blockHasGlobalStyles = true;
19
+ const previousBlockClientId = usePrevious(selectedBlockClientId);
20
+ useEffect(() => {
21
+ if (selectedBlockClientId === previousBlockClientId) {
22
+ return;
23
+ }
24
+ if (!selectedBlockClientId || !blockHasGlobalStyles) {
25
+ return;
26
+ }
27
+ if (!path || path !== "/blocks" && !path.startsWith("/blocks/")) {
28
+ return;
29
+ }
30
+ const newPath = "/blocks/" + encodeURIComponent(selectedBlockName);
31
+ if (newPath !== path) {
32
+ onPathChange?.(newPath);
33
+ }
34
+ }, [
35
+ selectedBlockClientId,
36
+ previousBlockClientId,
37
+ selectedBlockName,
38
+ blockHasGlobalStyles,
39
+ path,
40
+ onPathChange
41
+ ]);
42
+ return null;
43
+ }
44
+ export {
45
+ GlobalStylesBlockLink
46
+ };
47
+ //# sourceMappingURL=block-link.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/global-styles/block-link.js"],
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { useEffect } from '@wordpress/element';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { usePrevious } from '@wordpress/compose';\n\n/**\n * Auto-navigate to block styles when a block is selected in the canvas.\n *\n * @param {Object} props\n * @param {string} props.path Current navigation path.\n * @param {Function} props.onPathChange Callback to change the navigation path.\n */\nexport function GlobalStylesBlockLink( { path, onPathChange } ) {\n\tconst { selectedBlockName, selectedBlockClientId } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getSelectedBlockClientId, getBlockName } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst clientId = getSelectedBlockClientId();\n\t\t\treturn {\n\t\t\t\tselectedBlockName: getBlockName( clientId ),\n\t\t\t\tselectedBlockClientId: clientId,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\t// const blockHasGlobalStyles = useBlockHasGlobalStyles( selectedBlockName );\n\tconst blockHasGlobalStyles = true;\n\tconst previousBlockClientId = usePrevious( selectedBlockClientId );\n\n\t// When we're in the `Blocks` screen enable deep linking to the selected block.\n\tuseEffect( () => {\n\t\t// Only navigate when block selection changes, not when path changes\n\t\tif ( selectedBlockClientId === previousBlockClientId ) {\n\t\t\treturn;\n\t\t}\n\t\tif ( ! selectedBlockClientId || ! blockHasGlobalStyles ) {\n\t\t\treturn;\n\t\t}\n\t\tif (\n\t\t\t! path ||\n\t\t\t( path !== '/blocks' && ! path.startsWith( '/blocks/' ) )\n\t\t) {\n\t\t\treturn;\n\t\t}\n\t\tconst newPath = '/blocks/' + encodeURIComponent( selectedBlockName );\n\t\t// Avoid navigating to the same path. This can happen when selecting\n\t\t// a new block of the same type.\n\t\tif ( newPath !== path ) {\n\t\t\tonPathChange?.( newPath );\n\t\t}\n\t}, [\n\t\tselectedBlockClientId,\n\t\tpreviousBlockClientId,\n\t\tselectedBlockName,\n\t\tblockHasGlobalStyles,\n\t\tpath,\n\t\tonPathChange,\n\t] );\n\n\treturn null;\n}\n"],
5
+ "mappings": ";AAGA,SAAS,iBAAiB;AAC1B,SAAS,iBAAiB;AAC1B,SAAS,SAAS,wBAAwB;AAC1C,SAAS,mBAAmB;AASrB,SAAS,sBAAuB,EAAE,MAAM,aAAa,GAAI;AAC/D,QAAM,EAAE,mBAAmB,sBAAsB,IAAI;AAAA,IACpD,CAAE,WAAY;AACb,YAAM,EAAE,0BAA0B,aAAa,IAC9C,OAAQ,gBAAiB;AAC1B,YAAM,WAAW,yBAAyB;AAC1C,aAAO;AAAA,QACN,mBAAmB,aAAc,QAAS;AAAA,QAC1C,uBAAuB;AAAA,MACxB;AAAA,IACD;AAAA,IACA,CAAC;AAAA,EACF;AAGA,QAAM,uBAAuB;AAC7B,QAAM,wBAAwB,YAAa,qBAAsB;AAGjE,YAAW,MAAM;AAEhB,QAAK,0BAA0B,uBAAwB;AACtD;AAAA,IACD;AACA,QAAK,CAAE,yBAAyB,CAAE,sBAAuB;AACxD;AAAA,IACD;AACA,QACC,CAAE,QACA,SAAS,aAAa,CAAE,KAAK,WAAY,UAAW,GACrD;AACD;AAAA,IACD;AACA,UAAM,UAAU,aAAa,mBAAoB,iBAAkB;AAGnE,QAAK,YAAY,MAAO;AACvB,qBAAgB,OAAQ;AAAA,IACzB;AAAA,EACD,GAAG;AAAA,IACF;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD,CAAE;AAEF,SAAO;AACR;",
6
+ "names": []
7
+ }
@@ -0,0 +1,42 @@
1
+ // packages/editor/src/components/global-styles/header.js
2
+ import {
3
+ __experimentalHStack as HStack,
4
+ __experimentalVStack as VStack,
5
+ __experimentalSpacer as Spacer,
6
+ __experimentalHeading as Heading,
7
+ __experimentalView as View,
8
+ Navigator
9
+ } from "@wordpress/components";
10
+ import { isRTL, __ } from "@wordpress/i18n";
11
+ import { chevronRight, chevronLeft } from "@wordpress/icons";
12
+ import { jsx, jsxs } from "react/jsx-runtime";
13
+ function ScreenHeader({ title, description, onBack }) {
14
+ return /* @__PURE__ */ jsxs(VStack, { spacing: 0, children: [
15
+ /* @__PURE__ */ jsx(View, { children: /* @__PURE__ */ jsx(Spacer, { marginBottom: 0, paddingX: 4, paddingY: 3, children: /* @__PURE__ */ jsxs(HStack, { spacing: 2, children: [
16
+ /* @__PURE__ */ jsx(
17
+ Navigator.BackButton,
18
+ {
19
+ icon: isRTL() ? chevronRight : chevronLeft,
20
+ size: "small",
21
+ label: __("Back"),
22
+ onClick: onBack
23
+ }
24
+ ),
25
+ /* @__PURE__ */ jsx(Spacer, { children: /* @__PURE__ */ jsx(
26
+ Heading,
27
+ {
28
+ className: "editor-global-styles-header",
29
+ level: 2,
30
+ size: 13,
31
+ children: title
32
+ }
33
+ ) })
34
+ ] }) }) }),
35
+ description && /* @__PURE__ */ jsx("p", { className: "editor-global-styles-header__description", children: description })
36
+ ] });
37
+ }
38
+ var header_default = ScreenHeader;
39
+ export {
40
+ header_default as default
41
+ };
42
+ //# sourceMappingURL=header.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/global-styles/header.js"],
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\t__experimentalSpacer as Spacer,\n\t__experimentalHeading as Heading,\n\t__experimentalView as View,\n\tNavigator,\n} from '@wordpress/components';\nimport { isRTL, __ } from '@wordpress/i18n';\nimport { chevronRight, chevronLeft } from '@wordpress/icons';\n\nfunction ScreenHeader( { title, description, onBack } ) {\n\treturn (\n\t\t<VStack spacing={ 0 }>\n\t\t\t<View>\n\t\t\t\t<Spacer marginBottom={ 0 } paddingX={ 4 } paddingY={ 3 }>\n\t\t\t\t\t<HStack spacing={ 2 }>\n\t\t\t\t\t\t<Navigator.BackButton\n\t\t\t\t\t\t\ticon={ isRTL() ? chevronRight : chevronLeft }\n\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\tlabel={ __( 'Back' ) }\n\t\t\t\t\t\t\tonClick={ onBack }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Spacer>\n\t\t\t\t\t\t\t<Heading\n\t\t\t\t\t\t\t\tclassName=\"editor-global-styles-header\"\n\t\t\t\t\t\t\t\tlevel={ 2 }\n\t\t\t\t\t\t\t\tsize={ 13 }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ title }\n\t\t\t\t\t\t\t</Heading>\n\t\t\t\t\t\t</Spacer>\n\t\t\t\t\t</HStack>\n\t\t\t\t</Spacer>\n\t\t\t</View>\n\t\t\t{ description && (\n\t\t\t\t<p className=\"editor-global-styles-header__description\">\n\t\t\t\t\t{ description }\n\t\t\t\t</p>\n\t\t\t) }\n\t\t</VStack>\n\t);\n}\n\nexport default ScreenHeader;\n"],
5
+ "mappings": ";AAGA;AAAA,EACC,wBAAwB;AAAA,EACxB,wBAAwB;AAAA,EACxB,wBAAwB;AAAA,EACxB,yBAAyB;AAAA,EACzB,sBAAsB;AAAA,EACtB;AAAA,OACM;AACP,SAAS,OAAO,UAAU;AAC1B,SAAS,cAAc,mBAAmB;AAOrC,SACC,KADD;AALL,SAAS,aAAc,EAAE,OAAO,aAAa,OAAO,GAAI;AACvD,SACC,qBAAC,UAAO,SAAU,GACjB;AAAA,wBAAC,QACA,8BAAC,UAAO,cAAe,GAAI,UAAW,GAAI,UAAW,GACpD,+BAAC,UAAO,SAAU,GACjB;AAAA;AAAA,QAAC,UAAU;AAAA,QAAV;AAAA,UACA,MAAO,MAAM,IAAI,eAAe;AAAA,UAChC,MAAK;AAAA,UACL,OAAQ,GAAI,MAAO;AAAA,UACnB,SAAU;AAAA;AAAA,MACX;AAAA,MACA,oBAAC,UACA;AAAA,QAAC;AAAA;AAAA,UACA,WAAU;AAAA,UACV,OAAQ;AAAA,UACR,MAAO;AAAA,UAEL;AAAA;AAAA,MACH,GACD;AAAA,OACD,GACD,GACD;AAAA,IACE,eACD,oBAAC,OAAE,WAAU,4CACV,uBACH;AAAA,KAEF;AAEF;AAEA,IAAO,iBAAQ;",
6
+ "names": []
7
+ }
@@ -0,0 +1,155 @@
1
+ // packages/editor/src/components/global-styles/hooks.js
2
+ import { useMemo, useCallback } from "@wordpress/element";
3
+ import {
4
+ mergeGlobalStyles,
5
+ getStyle,
6
+ getSetting
7
+ } from "@wordpress/global-styles-engine";
8
+ import { store as coreStore } from "@wordpress/core-data";
9
+ import { useSelect, useDispatch } from "@wordpress/data";
10
+ import { privateApis as blockEditorPrivateApis } from "@wordpress/block-editor";
11
+ import { unlock } from "../../lock-unlock";
12
+ var { cleanEmptyObject } = unlock(blockEditorPrivateApis);
13
+ function useGlobalStylesUserConfig() {
14
+ const { globalStylesId, isReady, settings, styles, _links } = useSelect(
15
+ (select) => {
16
+ const {
17
+ getEntityRecord,
18
+ getEditedEntityRecord: getEditedEntityRecord2,
19
+ hasFinishedResolution,
20
+ canUser
21
+ } = select(coreStore);
22
+ const _globalStylesId = select(coreStore).__experimentalGetCurrentGlobalStylesId();
23
+ let record;
24
+ const userCanEditGlobalStyles = _globalStylesId ? canUser("update", {
25
+ kind: "root",
26
+ name: "globalStyles",
27
+ id: _globalStylesId
28
+ }) : null;
29
+ if (_globalStylesId && typeof userCanEditGlobalStyles === "boolean") {
30
+ if (userCanEditGlobalStyles) {
31
+ record = getEditedEntityRecord2(
32
+ "root",
33
+ "globalStyles",
34
+ _globalStylesId
35
+ );
36
+ } else {
37
+ record = getEntityRecord(
38
+ "root",
39
+ "globalStyles",
40
+ _globalStylesId,
41
+ { context: "view" }
42
+ );
43
+ }
44
+ }
45
+ let hasResolved = false;
46
+ if (hasFinishedResolution(
47
+ "__experimentalGetCurrentGlobalStylesId"
48
+ )) {
49
+ if (_globalStylesId) {
50
+ hasResolved = userCanEditGlobalStyles ? hasFinishedResolution("getEditedEntityRecord", [
51
+ "root",
52
+ "globalStyles",
53
+ _globalStylesId
54
+ ]) : hasFinishedResolution("getEntityRecord", [
55
+ "root",
56
+ "globalStyles",
57
+ _globalStylesId,
58
+ { context: "view" }
59
+ ]);
60
+ } else {
61
+ hasResolved = true;
62
+ }
63
+ }
64
+ return {
65
+ globalStylesId: _globalStylesId,
66
+ isReady: hasResolved,
67
+ settings: record?.settings,
68
+ styles: record?.styles,
69
+ _links: record?._links
70
+ };
71
+ },
72
+ []
73
+ );
74
+ const { getEditedEntityRecord } = useSelect(coreStore);
75
+ const { editEntityRecord } = useDispatch(coreStore);
76
+ const config = useMemo(() => {
77
+ return {
78
+ settings: settings ?? {},
79
+ styles: styles ?? {},
80
+ _links: _links ?? {}
81
+ };
82
+ }, [settings, styles, _links]);
83
+ const setConfig = useCallback(
84
+ (callbackOrObject, options = {}) => {
85
+ const record = getEditedEntityRecord(
86
+ "root",
87
+ "globalStyles",
88
+ globalStylesId
89
+ );
90
+ const currentConfig = {
91
+ styles: record?.styles ?? {},
92
+ settings: record?.settings ?? {},
93
+ _links: record?._links ?? {}
94
+ };
95
+ const updatedConfig = typeof callbackOrObject === "function" ? callbackOrObject(currentConfig) : callbackOrObject;
96
+ editEntityRecord(
97
+ "root",
98
+ "globalStyles",
99
+ globalStylesId,
100
+ {
101
+ styles: cleanEmptyObject(updatedConfig.styles) || {},
102
+ settings: cleanEmptyObject(updatedConfig.settings) || {},
103
+ _links: cleanEmptyObject(updatedConfig._links) || {}
104
+ },
105
+ options
106
+ );
107
+ },
108
+ [globalStylesId, editEntityRecord, getEditedEntityRecord]
109
+ );
110
+ return [isReady, config, setConfig];
111
+ }
112
+ function useGlobalStylesBaseConfig() {
113
+ const baseConfig = useSelect(
114
+ (select) => select(coreStore).__experimentalGetCurrentThemeBaseGlobalStyles(),
115
+ []
116
+ );
117
+ return [!!baseConfig, baseConfig];
118
+ }
119
+ function useGlobalStyles() {
120
+ const [isUserConfigReady, userConfig, setUserConfig] = useGlobalStylesUserConfig();
121
+ const [isBaseConfigReady, baseConfig] = useGlobalStylesBaseConfig();
122
+ const merged = useMemo(() => {
123
+ if (!isUserConfigReady || !isBaseConfigReady) {
124
+ return {};
125
+ }
126
+ return mergeGlobalStyles(baseConfig || {}, userConfig);
127
+ }, [isUserConfigReady, isBaseConfigReady, baseConfig, userConfig]);
128
+ return {
129
+ merged,
130
+ base: baseConfig || {},
131
+ user: userConfig,
132
+ setUser: setUserConfig,
133
+ isReady: isUserConfigReady && isBaseConfigReady
134
+ };
135
+ }
136
+ function useStyle(path, blockName) {
137
+ const { merged } = useGlobalStyles();
138
+ return useMemo(
139
+ () => getStyle(merged, path, blockName),
140
+ [merged, path, blockName]
141
+ );
142
+ }
143
+ function useSetting(path, blockName) {
144
+ const { merged } = useGlobalStyles();
145
+ return useMemo(
146
+ () => getSetting(merged, path, blockName),
147
+ [merged, path, blockName]
148
+ );
149
+ }
150
+ export {
151
+ useGlobalStyles,
152
+ useSetting,
153
+ useStyle
154
+ };
155
+ //# sourceMappingURL=hooks.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/global-styles/hooks.js"],
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useMemo, useCallback } from '@wordpress/element';\nimport {\n\tmergeGlobalStyles,\n\tgetStyle,\n\tgetSetting,\n} from '@wordpress/global-styles-engine';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst { cleanEmptyObject } = unlock( blockEditorPrivateApis );\n\n/**\n * Hook to fetch and manage user global styles config\n */\nfunction useGlobalStylesUserConfig() {\n\tconst { globalStylesId, isReady, settings, styles, _links } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetEntityRecord,\n\t\t\t\tgetEditedEntityRecord,\n\t\t\t\thasFinishedResolution,\n\t\t\t\tcanUser,\n\t\t\t} = select( coreStore );\n\t\t\tconst _globalStylesId =\n\t\t\t\tselect( coreStore ).__experimentalGetCurrentGlobalStylesId();\n\n\t\t\tlet record;\n\n\t\t\tconst userCanEditGlobalStyles = _globalStylesId\n\t\t\t\t? canUser( 'update', {\n\t\t\t\t\t\tkind: 'root',\n\t\t\t\t\t\tname: 'globalStyles',\n\t\t\t\t\t\tid: _globalStylesId,\n\t\t\t\t } )\n\t\t\t\t: null;\n\n\t\t\tif (\n\t\t\t\t_globalStylesId &&\n\t\t\t\ttypeof userCanEditGlobalStyles === 'boolean'\n\t\t\t) {\n\t\t\t\tif ( userCanEditGlobalStyles ) {\n\t\t\t\t\trecord = getEditedEntityRecord(\n\t\t\t\t\t\t'root',\n\t\t\t\t\t\t'globalStyles',\n\t\t\t\t\t\t_globalStylesId\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\trecord = getEntityRecord(\n\t\t\t\t\t\t'root',\n\t\t\t\t\t\t'globalStyles',\n\t\t\t\t\t\t_globalStylesId,\n\t\t\t\t\t\t{ context: 'view' }\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlet hasResolved = false;\n\t\t\tif (\n\t\t\t\thasFinishedResolution(\n\t\t\t\t\t'__experimentalGetCurrentGlobalStylesId'\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\tif ( _globalStylesId ) {\n\t\t\t\t\thasResolved = userCanEditGlobalStyles\n\t\t\t\t\t\t? hasFinishedResolution( 'getEditedEntityRecord', [\n\t\t\t\t\t\t\t\t'root',\n\t\t\t\t\t\t\t\t'globalStyles',\n\t\t\t\t\t\t\t\t_globalStylesId,\n\t\t\t\t\t\t ] )\n\t\t\t\t\t\t: hasFinishedResolution( 'getEntityRecord', [\n\t\t\t\t\t\t\t\t'root',\n\t\t\t\t\t\t\t\t'globalStyles',\n\t\t\t\t\t\t\t\t_globalStylesId,\n\t\t\t\t\t\t\t\t{ context: 'view' },\n\t\t\t\t\t\t ] );\n\t\t\t\t} else {\n\t\t\t\t\thasResolved = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tglobalStylesId: _globalStylesId,\n\t\t\t\tisReady: hasResolved,\n\t\t\t\tsettings: record?.settings,\n\t\t\t\tstyles: record?.styles,\n\t\t\t\t_links: record?._links,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\tconst { getEditedEntityRecord } = useSelect( coreStore );\n\tconst { editEntityRecord } = useDispatch( coreStore );\n\n\tconst config = useMemo( () => {\n\t\treturn {\n\t\t\tsettings: settings ?? {},\n\t\t\tstyles: styles ?? {},\n\t\t\t_links: _links ?? {},\n\t\t};\n\t}, [ settings, styles, _links ] );\n\n\tconst setConfig = useCallback(\n\t\t( callbackOrObject, options = {} ) => {\n\t\t\tconst record = getEditedEntityRecord(\n\t\t\t\t'root',\n\t\t\t\t'globalStyles',\n\t\t\t\tglobalStylesId\n\t\t\t);\n\n\t\t\tconst currentConfig = {\n\t\t\t\tstyles: record?.styles ?? {},\n\t\t\t\tsettings: record?.settings ?? {},\n\t\t\t\t_links: record?._links ?? {},\n\t\t\t};\n\n\t\t\tconst updatedConfig =\n\t\t\t\ttypeof callbackOrObject === 'function'\n\t\t\t\t\t? callbackOrObject( currentConfig )\n\t\t\t\t\t: callbackOrObject;\n\n\t\t\teditEntityRecord(\n\t\t\t\t'root',\n\t\t\t\t'globalStyles',\n\t\t\t\tglobalStylesId,\n\t\t\t\t{\n\t\t\t\t\tstyles: cleanEmptyObject( updatedConfig.styles ) || {},\n\t\t\t\t\tsettings: cleanEmptyObject( updatedConfig.settings ) || {},\n\t\t\t\t\t_links: cleanEmptyObject( updatedConfig._links ) || {},\n\t\t\t\t},\n\t\t\t\toptions\n\t\t\t);\n\t\t},\n\t\t[ globalStylesId, editEntityRecord, getEditedEntityRecord ]\n\t);\n\n\treturn [ isReady, config, setConfig ];\n}\n\n/**\n * Hook to fetch base/theme global styles config\n */\nfunction useGlobalStylesBaseConfig() {\n\tconst baseConfig = useSelect(\n\t\t( select ) =>\n\t\t\tselect( coreStore ).__experimentalGetCurrentThemeBaseGlobalStyles(),\n\t\t[]\n\t);\n\treturn [ !! baseConfig, baseConfig ];\n}\n\n/**\n * Hook to get merged global styles configuration\n *\n * @return {Object} Object containing merged, base, user configs and setUser function\n * { merged, base, user, setUser }\n */\nexport function useGlobalStyles() {\n\tconst [ isUserConfigReady, userConfig, setUserConfig ] =\n\t\tuseGlobalStylesUserConfig();\n\tconst [ isBaseConfigReady, baseConfig ] = useGlobalStylesBaseConfig();\n\n\tconst merged = useMemo( () => {\n\t\tif ( ! isUserConfigReady || ! isBaseConfigReady ) {\n\t\t\treturn {};\n\t\t}\n\t\treturn mergeGlobalStyles( baseConfig || {}, userConfig );\n\t}, [ isUserConfigReady, isBaseConfigReady, baseConfig, userConfig ] );\n\n\treturn {\n\t\tmerged,\n\t\tbase: baseConfig || {},\n\t\tuser: userConfig,\n\t\tsetUser: setUserConfig,\n\t\tisReady: isUserConfigReady && isBaseConfigReady,\n\t};\n}\n\n/**\n * Hook to get a style value from global styles\n *\n * @param {string} path Style path (e.g., 'color.background')\n * @param {string} blockName Optional block name\n * @return {*} Style value\n */\nexport function useStyle( path, blockName ) {\n\tconst { merged } = useGlobalStyles();\n\treturn useMemo(\n\t\t() => getStyle( merged, path, blockName ),\n\t\t[ merged, path, blockName ]\n\t);\n}\n\n/**\n * Hook to get a setting value from global styles\n *\n * @param {string} path Setting path (e.g., 'spacing.blockGap')\n * @param {string} blockName Optional block name\n * @return {*} Setting value\n */\nexport function useSetting( path, blockName ) {\n\tconst { merged } = useGlobalStyles();\n\treturn useMemo(\n\t\t() => getSetting( merged, path, blockName ),\n\t\t[ mer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