@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
@@ -16,15 +16,17 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // packages/editor/src/components/post-excerpt/plugin.js
19
21
  var plugin_exports = {};
20
22
  __export(plugin_exports, {
21
23
  default: () => plugin_default
22
24
  });
23
25
  module.exports = __toCommonJS(plugin_exports);
24
- var import_jsx_runtime = require("react/jsx-runtime");
25
26
  var import_components = require("@wordpress/components");
26
- const { Fill, Slot } = (0, import_components.createSlotFill)("PluginPostExcerpt");
27
- const PluginPostExcerpt = ({ children, className }) => {
27
+ var import_jsx_runtime = require("react/jsx-runtime");
28
+ var { Fill, Slot } = (0, import_components.createSlotFill)("PluginPostExcerpt");
29
+ var PluginPostExcerpt = ({ children, className }) => {
28
30
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Fill, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components.PanelRow, { className, children }) });
29
31
  };
30
32
  PluginPostExcerpt.Slot = Slot;
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/post-excerpt/plugin.js"],
4
4
  "sourcesContent": ["/**\n * Defines as extensibility slot for the Excerpt panel.\n */\n\n/**\n * WordPress dependencies\n */\nimport { createSlotFill, PanelRow } from '@wordpress/components';\n\nconst { Fill, Slot } = createSlotFill( 'PluginPostExcerpt' );\n\n/**\n * Renders a post excerpt panel in the post sidebar.\n *\n * @param {Object} props Component properties.\n * @param {string} [props.className] An optional class name added to the row.\n * @param {React.ReactNode} props.children Children to be rendered.\n *\n * @example\n * ```js\n * // Using ES5 syntax\n * var __ = wp.i18n.__;\n * var PluginPostExcerpt = wp.editPost.__experimentalPluginPostExcerpt;\n *\n * function MyPluginPostExcerpt() {\n * \treturn React.createElement(\n * \t\tPluginPostExcerpt,\n * \t\t{\n * \t\t\tclassName: 'my-plugin-post-excerpt',\n * \t\t},\n * \t\t__( 'Post excerpt custom content' )\n * \t)\n * }\n * ```\n *\n * @example\n * ```jsx\n * // Using ESNext syntax\n * import { __ } from '@wordpress/i18n';\n * import { __experimentalPluginPostExcerpt as PluginPostExcerpt } from '@wordpress/edit-post';\n *\n * const MyPluginPostExcerpt = () => (\n * \t<PluginPostExcerpt className=\"my-plugin-post-excerpt\">\n * \t\t{ __( 'Post excerpt custom content' ) }\n * \t</PluginPostExcerpt>\n * );\n * ```\n *\n * @return {React.ReactNode} The rendered component.\n */\nconst PluginPostExcerpt = ( { children, className } ) => {\n\treturn (\n\t\t<Fill>\n\t\t\t<PanelRow className={ className }>{ children }</PanelRow>\n\t\t</Fill>\n\t);\n};\n\nPluginPostExcerpt.Slot = Slot;\n\nexport default PluginPostExcerpt;\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAqDG;AA9CH,wBAAyC;AAEzC,MAAM,EAAE,MAAM,KAAK,QAAI,kCAAgB,mBAAoB;AAyC3D,MAAM,oBAAoB,CAAE,EAAE,UAAU,UAAU,MAAO;AACxD,SACC,4CAAC,QACA,sDAAC,8BAAS,WAA0B,UAAU,GAC/C;AAEF;AAEA,kBAAkB,OAAO;AAEzB,IAAO,iBAAQ;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,wBAAyC;AA8CtC;AA5CH,IAAM,EAAE,MAAM,KAAK,QAAI,kCAAgB,mBAAoB;AAyC3D,IAAM,oBAAoB,CAAE,EAAE,UAAU,UAAU,MAAO;AACxD,SACC,4CAAC,QACA,sDAAC,8BAAS,WAA0B,UAAU,GAC/C;AAEF;AAEA,kBAAkB,OAAO;AAEzB,IAAO,iBAAQ;",
6
6
  "names": []
7
7
  }
@@ -26,14 +26,16 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // packages/editor/src/components/post-featured-image/check.js
29
31
  var check_exports = {};
30
32
  __export(check_exports, {
31
33
  default: () => check_default
32
34
  });
33
35
  module.exports = __toCommonJS(check_exports);
34
- var import_jsx_runtime = require("react/jsx-runtime");
35
36
  var import_post_type_support_check = __toESM(require("../post-type-support-check"));
36
37
  var import_theme_support_check = __toESM(require("../theme-support-check"));
38
+ var import_jsx_runtime = require("react/jsx-runtime");
37
39
  function PostFeaturedImageCheck({ children }) {
38
40
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_theme_support_check.default, { supportKeys: "post-thumbnails", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_post_type_support_check.default, { supportKeys: "thumbnail", children }) });
39
41
  }
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/post-featured-image/check.js"],
4
4
  "sourcesContent": ["/**\n * Internal dependencies\n */\nimport PostTypeSupportCheck from '../post-type-support-check';\nimport ThemeSupportCheck from '../theme-support-check';\n\n/**\n * Wrapper component that renders its children only if the post type supports a featured image\n * and the theme supports post thumbnails.\n *\n * @param {Object} props Props.\n * @param {React.ReactNode} props.children Children to be rendered.\n *\n * @return {React.ReactNode} The rendered component.\n */\nfunction PostFeaturedImageCheck( { children } ) {\n\treturn (\n\t\t<ThemeSupportCheck supportKeys=\"post-thumbnails\">\n\t\t\t<PostTypeSupportCheck supportKeys=\"thumbnail\">\n\t\t\t\t{ children }\n\t\t\t</PostTypeSupportCheck>\n\t\t</ThemeSupportCheck>\n\t);\n}\n\nexport default PostFeaturedImageCheck;\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAkBG;AAfH,qCAAiC;AACjC,iCAA8B;AAW9B,SAAS,uBAAwB,EAAE,SAAS,GAAI;AAC/C,SACC,4CAAC,2BAAAA,SAAA,EAAkB,aAAY,mBAC9B,sDAAC,+BAAAC,SAAA,EAAqB,aAAY,aAC/B,UACH,GACD;AAEF;AAEA,IAAO,gBAAQ;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qCAAiC;AACjC,iCAA8B;AAc3B;AAHH,SAAS,uBAAwB,EAAE,SAAS,GAAI;AAC/C,SACC,4CAAC,2BAAAA,SAAA,EAAkB,aAAY,mBAC9B,sDAAC,+BAAAC,SAAA,EAAqB,aAAY,aAC/B,UACH,GACD;AAEF;AAEA,IAAO,gBAAQ;",
6
6
  "names": ["ThemeSupportCheck", "PostTypeSupportCheck"]
7
7
  }
@@ -26,12 +26,13 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // packages/editor/src/components/post-featured-image/index.js
29
31
  var post_featured_image_exports = {};
30
32
  __export(post_featured_image_exports, {
31
33
  default: () => post_featured_image_default
32
34
  });
33
35
  module.exports = __toCommonJS(post_featured_image_exports);
34
- var import_jsx_runtime = require("react/jsx-runtime");
35
36
  var import_clsx = __toESM(require("clsx"));
36
37
  var import_i18n = require("@wordpress/i18n");
37
38
  var import_hooks = require("@wordpress/hooks");
@@ -42,14 +43,46 @@ var import_compose = require("@wordpress/compose");
42
43
  var import_data = require("@wordpress/data");
43
44
  var import_block_editor = require("@wordpress/block-editor");
44
45
  var import_core_data = require("@wordpress/core-data");
46
+ var import_lock_unlock = require("../../lock-unlock");
45
47
  var import_check = __toESM(require("./check"));
46
48
  var import_store = require("../../store");
47
- const ALLOWED_MEDIA_TYPES = ["image"];
48
- const DEFAULT_FEATURE_IMAGE_LABEL = (0, import_i18n.__)("Featured image");
49
- const DEFAULT_SET_FEATURE_IMAGE_LABEL = (0, import_i18n.__)("Add a featured image");
50
- const instructions = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { children: (0, import_i18n.__)(
49
+ var import_jsx_runtime = require("react/jsx-runtime");
50
+ var { MediaUploadModal } = (0, import_lock_unlock.unlock)(import_block_editor.privateApis);
51
+ var ALLOWED_MEDIA_TYPES = ["image"];
52
+ var DEFAULT_FEATURE_IMAGE_LABEL = (0, import_i18n.__)("Featured image");
53
+ var DEFAULT_SET_FEATURE_IMAGE_LABEL = (0, import_i18n.__)("Add a featured image");
54
+ var instructions = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { children: (0, import_i18n.__)(
51
55
  "To edit the featured image, you need permission to upload media."
52
56
  ) });
57
+ function ConditionalMediaUpload({ render, ...props }) {
58
+ const [isModalOpen, setIsModalOpen] = (0, import_element.useState)(false);
59
+ const mediaUpload = (0, import_data.useSelect)((select) => {
60
+ const { getSettings } = select(import_block_editor.store);
61
+ return getSettings().mediaUpload;
62
+ }, []);
63
+ if (window.__experimentalDataViewsMediaModal) {
64
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
65
+ render && render({ open: () => setIsModalOpen(true) }),
66
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
67
+ MediaUploadModal,
68
+ {
69
+ ...props,
70
+ isOpen: isModalOpen,
71
+ onClose: () => {
72
+ setIsModalOpen(false);
73
+ props.onClose?.();
74
+ },
75
+ onSelect: (media) => {
76
+ setIsModalOpen(false);
77
+ props.onSelect?.(media);
78
+ },
79
+ onUpload: mediaUpload
80
+ }
81
+ )
82
+ ] });
83
+ }
84
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_block_editor.MediaUpload, { ...props, render });
85
+ }
53
86
  function getMediaDetails(media, postId) {
54
87
  if (!media) {
55
88
  return {};
@@ -157,7 +190,7 @@ function PostFeaturedImage({
157
190
  }
158
191
  ),
159
192
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_block_editor.MediaUploadCheck, { fallback: instructions, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
160
- import_block_editor.MediaUpload,
193
+ ConditionalMediaUpload,
161
194
  {
162
195
  title: postType?.labels?.featured_image || DEFAULT_FEATURE_IMAGE_LABEL,
163
196
  onSelect: onUpdateImage,
@@ -251,7 +284,7 @@ function PostFeaturedImage({
251
284
  ] })
252
285
  ] });
253
286
  }
254
- const applyWithSelect = (0, import_data.withSelect)((select) => {
287
+ var applyWithSelect = (0, import_data.withSelect)((select) => {
255
288
  const { getEntityRecord, getPostType, hasFinishedResolution } = select(import_core_data.store);
256
289
  const { getCurrentPostId, getEditedPostAttribute } = select(import_store.store);
257
290
  const featuredImageId = getEditedPostAttribute("featured_media");
@@ -270,7 +303,7 @@ const applyWithSelect = (0, import_data.withSelect)((select) => {
270
303
  ])
271
304
  };
272
305
  });
273
- const applyWithDispatch = (0, import_data.withDispatch)(
306
+ var applyWithDispatch = (0, import_data.withDispatch)(
274
307
  (dispatch, { noticeOperations }, { select }) => {
275
308
  const { editPost } = dispatch(import_store.store);
276
309
  return {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/post-featured-image/index.js"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { applyFilters } from '@wordpress/hooks';\nimport {\n\tDropZone,\n\tButton,\n\tSpinner,\n\twithNotices,\n\twithFilters,\n\t__experimentalHStack as HStack,\n\tNotice,\n} from '@wordpress/components';\nimport { isBlobURL } from '@wordpress/blob';\nimport { useState, useRef } from '@wordpress/element';\nimport { compose } from '@wordpress/compose';\nimport { useSelect, withDispatch, withSelect } from '@wordpress/data';\nimport {\n\tMediaUpload,\n\tMediaUploadCheck,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport PostFeaturedImageCheck from './check';\nimport { store as editorStore } from '../../store';\n\nconst ALLOWED_MEDIA_TYPES = [ 'image' ];\n\n// Used when labels from post type were not yet loaded or when they are not present.\nconst DEFAULT_FEATURE_IMAGE_LABEL = __( 'Featured image' );\nconst DEFAULT_SET_FEATURE_IMAGE_LABEL = __( 'Add a featured image' );\n\nconst instructions = (\n\t<p>\n\t\t{ __(\n\t\t\t'To edit the featured image, you need permission to upload media.'\n\t\t) }\n\t</p>\n);\n\nfunction getMediaDetails( media, postId ) {\n\tif ( ! media ) {\n\t\treturn {};\n\t}\n\n\tconst defaultSize = applyFilters(\n\t\t'editor.PostFeaturedImage.imageSize',\n\t\t'large',\n\t\tmedia.id,\n\t\tpostId\n\t);\n\tif ( defaultSize in ( media?.media_details?.sizes ?? {} ) ) {\n\t\treturn {\n\t\t\tmediaWidth: media.media_details.sizes[ defaultSize ].width,\n\t\t\tmediaHeight: media.media_details.sizes[ defaultSize ].height,\n\t\t\tmediaSourceUrl: media.media_details.sizes[ defaultSize ].source_url,\n\t\t};\n\t}\n\n\t// Use fallbackSize when defaultSize is not available.\n\tconst fallbackSize = applyFilters(\n\t\t'editor.PostFeaturedImage.imageSize',\n\t\t'thumbnail',\n\t\tmedia.id,\n\t\tpostId\n\t);\n\tif ( fallbackSize in ( media?.media_details?.sizes ?? {} ) ) {\n\t\treturn {\n\t\t\tmediaWidth: media.media_details.sizes[ fallbackSize ].width,\n\t\t\tmediaHeight: media.media_details.sizes[ fallbackSize ].height,\n\t\t\tmediaSourceUrl:\n\t\t\t\tmedia.media_details.sizes[ fallbackSize ].source_url,\n\t\t};\n\t}\n\n\t// Use full image size when fallbackSize and defaultSize are not available.\n\treturn {\n\t\tmediaWidth: media.media_details.width,\n\t\tmediaHeight: media.media_details.height,\n\t\tmediaSourceUrl: media.source_url,\n\t};\n}\n\nfunction PostFeaturedImage( {\n\tcurrentPostId,\n\tfeaturedImageId,\n\tonUpdateImage,\n\tonRemoveImage,\n\tmedia,\n\tpostType,\n\tnoticeUI,\n\tnoticeOperations,\n\tisRequestingFeaturedImageMedia,\n} ) {\n\tconst returnsFocusRef = useRef( false );\n\tconst [ isLoading, setIsLoading ] = useState( false );\n\tconst { getSettings } = useSelect( blockEditorStore );\n\tconst { mediaSourceUrl } = getMediaDetails( media, currentPostId );\n\n\tfunction onDropFiles( filesList ) {\n\t\tgetSettings().mediaUpload( {\n\t\t\tallowedTypes: ALLOWED_MEDIA_TYPES,\n\t\t\tfilesList,\n\t\t\tonFileChange( [ image ] ) {\n\t\t\t\tif ( isBlobURL( image?.url ) ) {\n\t\t\t\t\tsetIsLoading( true );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif ( image ) {\n\t\t\t\t\tonUpdateImage( image );\n\t\t\t\t}\n\t\t\t\tsetIsLoading( false );\n\t\t\t},\n\t\t\tonError( message ) {\n\t\t\t\tnoticeOperations.removeAllNotices();\n\t\t\t\tnoticeOperations.createErrorNotice( message );\n\t\t\t},\n\t\t\tmultiple: false,\n\t\t} );\n\t}\n\n\t/**\n\t * Generates the featured image alt text for this editing context.\n\t *\n\t * @param {Object} imageMedia The image media object.\n\t * @param {string} imageMedia.alt_text The alternative text of the image.\n\t * @param {Object} imageMedia.media_details The media details of the image.\n\t * @param {Object} imageMedia.media_details.sizes The sizes of the image.\n\t * @param {Object} imageMedia.media_details.sizes.full The full size details of the image.\n\t * @param {string} imageMedia.media_details.sizes.full.file The file name of the full size image.\n\t * @param {string} imageMedia.slug The slug of the image.\n\t * @return {string} The featured image alt text.\n\t */\n\tfunction getImageDescription( imageMedia ) {\n\t\tif ( imageMedia.alt_text ) {\n\t\t\treturn sprintf(\n\t\t\t\t// Translators: %s: The selected image alt text.\n\t\t\t\t__( 'Current image: %s' ),\n\t\t\t\timageMedia.alt_text\n\t\t\t);\n\t\t}\n\t\treturn sprintf(\n\t\t\t// Translators: %s: The selected image filename.\n\t\t\t__(\n\t\t\t\t'The current image has no alternative text. The file name is: %s'\n\t\t\t),\n\t\t\timageMedia.media_details.sizes?.full?.file || imageMedia.slug\n\t\t);\n\t}\n\n\tfunction returnFocus( node ) {\n\t\tif ( returnsFocusRef.current && node ) {\n\t\t\tnode.focus();\n\t\t\treturnsFocusRef.current = false;\n\t\t}\n\t}\n\n\tconst isMissingMedia =\n\t\t! isRequestingFeaturedImageMedia && !! featuredImageId && ! media;\n\n\treturn (\n\t\t<PostFeaturedImageCheck>\n\t\t\t{ noticeUI }\n\t\t\t<div className=\"editor-post-featured-image\">\n\t\t\t\t{ media && (\n\t\t\t\t\t<div\n\t\t\t\t\t\tid={ `editor-post-featured-image-${ featuredImageId }-describedby` }\n\t\t\t\t\t\tclassName=\"hidden\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ getImageDescription( media ) }\n\t\t\t\t\t</div>\n\t\t\t\t) }\n\t\t\t\t<MediaUploadCheck fallback={ instructions }>\n\t\t\t\t\t<MediaUpload\n\t\t\t\t\t\ttitle={\n\t\t\t\t\t\t\tpostType?.labels?.featured_image ||\n\t\t\t\t\t\t\tDEFAULT_FEATURE_IMAGE_LABEL\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonSelect={ onUpdateImage }\n\t\t\t\t\t\tunstableFeaturedImageFlow\n\t\t\t\t\t\tallowedTypes={ ALLOWED_MEDIA_TYPES }\n\t\t\t\t\t\tmodalClass=\"editor-post-featured-image__media-modal\"\n\t\t\t\t\t\trender={ ( { open } ) => (\n\t\t\t\t\t\t\t<div className=\"editor-post-featured-image__container\">\n\t\t\t\t\t\t\t\t{ isMissingMedia ? (\n\t\t\t\t\t\t\t\t\t<Notice\n\t\t\t\t\t\t\t\t\t\tstatus=\"warning\"\n\t\t\t\t\t\t\t\t\t\tisDismissible={ false }\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t\t'Could not retrieve the featured image data.'\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t</Notice>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t\t\tref={ returnFocus }\n\t\t\t\t\t\t\t\t\t\tclassName={\n\t\t\t\t\t\t\t\t\t\t\t! featuredImageId\n\t\t\t\t\t\t\t\t\t\t\t\t? 'editor-post-featured-image__toggle'\n\t\t\t\t\t\t\t\t\t\t\t\t: 'editor-post-featured-image__preview'\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tonClick={ open }\n\t\t\t\t\t\t\t\t\t\taria-label={\n\t\t\t\t\t\t\t\t\t\t\t! featuredImageId\n\t\t\t\t\t\t\t\t\t\t\t\t? null\n\t\t\t\t\t\t\t\t\t\t\t\t: __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Edit or replace the featured image'\n\t\t\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\taria-describedby={\n\t\t\t\t\t\t\t\t\t\t\t! featuredImageId\n\t\t\t\t\t\t\t\t\t\t\t\t? null\n\t\t\t\t\t\t\t\t\t\t\t\t: `editor-post-featured-image-${ featuredImageId }-describedby`\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\taria-haspopup=\"dialog\"\n\t\t\t\t\t\t\t\t\t\tdisabled={ isLoading }\n\t\t\t\t\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ !! featuredImageId && media && (\n\t\t\t\t\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"editor-post-featured-image__preview-image\"\n\t\t\t\t\t\t\t\t\t\t\t\tsrc={ mediaSourceUrl }\n\t\t\t\t\t\t\t\t\t\t\t\talt={ getImageDescription(\n\t\t\t\t\t\t\t\t\t\t\t\t\tmedia\n\t\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t{ ( isLoading ||\n\t\t\t\t\t\t\t\t\t\t\tisRequestingFeaturedImageMedia ) && (\n\t\t\t\t\t\t\t\t\t\t\t<Spinner />\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t{ ! featuredImageId &&\n\t\t\t\t\t\t\t\t\t\t\t! isLoading &&\n\t\t\t\t\t\t\t\t\t\t\t( postType?.labels\n\t\t\t\t\t\t\t\t\t\t\t\t?.set_featured_image ||\n\t\t\t\t\t\t\t\t\t\t\t\tDEFAULT_SET_FEATURE_IMAGE_LABEL ) }\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t{ !! featuredImageId && (\n\t\t\t\t\t\t\t\t\t<HStack\n\t\t\t\t\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t\t\t\t\t'editor-post-featured-image__actions',\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t'editor-post-featured-image__actions-missing-image':\n\t\t\t\t\t\t\t\t\t\t\t\t\tisMissingMedia,\n\t\t\t\t\t\t\t\t\t\t\t\t'editor-post-featured-image__actions-is-requesting-image':\n\t\t\t\t\t\t\t\t\t\t\t\t\tisRequestingFeaturedImageMedia,\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"editor-post-featured-image__action\"\n\t\t\t\t\t\t\t\t\t\t\tonClick={ open }\n\t\t\t\t\t\t\t\t\t\t\taria-haspopup=\"dialog\"\n\t\t\t\t\t\t\t\t\t\t\tvariant={\n\t\t\t\t\t\t\t\t\t\t\t\tisMissingMedia\n\t\t\t\t\t\t\t\t\t\t\t\t\t? 'secondary'\n\t\t\t\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ __( 'Replace' ) }\n\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"editor-post-featured-image__action\"\n\t\t\t\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\t\t\t\tonRemoveImage();\n\t\t\t\t\t\t\t\t\t\t\t\t// Signal that the toggle button should be focused,\n\t\t\t\t\t\t\t\t\t\t\t\t// when it is rendered. Can't focus it directly here\n\t\t\t\t\t\t\t\t\t\t\t\t// because it's rendered conditionally.\n\t\t\t\t\t\t\t\t\t\t\t\treturnsFocusRef.current = true;\n\t\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\t\tvariant={\n\t\t\t\t\t\t\t\t\t\t\t\tisMissingMedia\n\t\t\t\t\t\t\t\t\t\t\t\t\t? 'secondary'\n\t\t\t\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tisDestructive={ isMissingMedia }\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ __( 'Remove' ) }\n\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t</HStack>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t<DropZone onFilesDrop={ onDropFiles } />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tvalue={ featuredImageId }\n\t\t\t\t\t/>\n\t\t\t\t</MediaUploadCheck>\n\t\t\t</div>\n\t\t</PostFeaturedImageCheck>\n\t);\n}\n\nconst applyWithSelect = withSelect( ( select ) => {\n\tconst { getEntityRecord, getPostType, hasFinishedResolution } =\n\t\tselect( coreStore );\n\tconst { getCurrentPostId, getEditedPostAttribute } = select( editorStore );\n\tconst featuredImageId = getEditedPostAttribute( 'featured_media' );\n\n\treturn {\n\t\tmedia: featuredImageId\n\t\t\t? getEntityRecord( 'postType', 'attachment', featuredImageId, {\n\t\t\t\t\tcontext: 'view',\n\t\t\t } )\n\t\t\t: null,\n\t\tcurrentPostId: getCurrentPostId(),\n\t\tpostType: getPostType( getEditedPostAttribute( 'type' ) ),\n\t\tfeaturedImageId,\n\t\tisRequestingFeaturedImageMedia:\n\t\t\t!! featuredImageId &&\n\t\t\t! hasFinishedResolution( 'getEntityRecord', [\n\t\t\t\t'postType',\n\t\t\t\t'attachment',\n\t\t\t\tfeaturedImageId,\n\t\t\t\t{ context: 'view' },\n\t\t\t] ),\n\t};\n} );\n\nconst applyWithDispatch = withDispatch(\n\t( dispatch, { noticeOperations }, { select } ) => {\n\t\tconst { editPost } = dispatch( editorStore );\n\t\treturn {\n\t\t\tonUpdateImage( image ) {\n\t\t\t\teditPost( { featured_media: image.id } );\n\t\t\t},\n\t\t\tonDropImage( filesList ) {\n\t\t\t\tselect( blockEditorStore )\n\t\t\t\t\t.getSettings()\n\t\t\t\t\t.mediaUpload( {\n\t\t\t\t\t\tallowedTypes: [ 'image' ],\n\t\t\t\t\t\tfilesList,\n\t\t\t\t\t\tonFileChange( [ image ] ) {\n\t\t\t\t\t\t\teditPost( { featured_media: image.id } );\n\t\t\t\t\t\t},\n\t\t\t\t\t\tonError( message ) {\n\t\t\t\t\t\t\tnoticeOperations.removeAllNotices();\n\t\t\t\t\t\t\tnoticeOperations.createErrorNotice( message );\n\t\t\t\t\t\t},\n\t\t\t\t\t\tmultiple: false,\n\t\t\t\t\t} );\n\t\t\t},\n\t\t\tonRemoveImage() {\n\t\t\t\teditPost( { featured_media: 0 } );\n\t\t\t},\n\t\t};\n\t}\n);\n\n/**\n * Renders the component for managing the featured image of a post.\n *\n * @param {Object} props Props.\n * @param {number} props.currentPostId ID of the current post.\n * @param {number} props.featuredImageId ID of the featured image.\n * @param {Function} props.onUpdateImage Function to call when the image is updated.\n * @param {Function} props.onRemoveImage Function to call when the image is removed.\n * @param {Object} props.media The media object representing the featured image.\n * @param {string} props.postType Post type.\n * @param {Element} props.noticeUI UI for displaying notices.\n * @param {Object} props.noticeOperations Operations for managing notices.\n *\n * @return {Element} Component to be rendered .\n */\nexport default compose(\n\twithNotices,\n\tapplyWithSelect,\n\tapplyWithDispatch,\n\twithFilters( 'editor.PostFeaturedImage' )\n)( Post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,UAAM,EAAE,SAAS,IAAI,SAAU,aAAAA,KAAY;AAC3C,WAAO;AAAA,MACN,cAAe,OAAQ;AACtB,iBAAU,EAAE,gBAAgB,MAAM,GAAG,CAAE;AAAA,MACxC;AAAA,MACA,YAAa,WAAY;AACxB,eAAQ,oBAAAL,KAAiB,EACvB,YAAY,EACZ,YAAa;AAAA,UACb,cAAc,CAAE,OAAQ;AAAA,UACxB;AAAA,UACA,aAAc,CAAE,KAAM,GAAI;AACzB,qBAAU,EAAE,gBAAgB,MAAM,GAAG,CAAE;AAAA,UACxC;AAAA,UACA,QAAS,SAAU;AAClB,6BAAiB,iBAAiB;AAClC,6BAAiB,kBAAmB,OAAQ;AAAA,UAC7C;AAAA,UACA,UAAU;AAAA,QACX,CAAE;AAAA,MACJ;AAAA,MACA,gBAAgB;AACf,iBAAU,EAAE,gBAAgB,EAAE,CAAE;AAAA,MACjC;AAAA,IACD;AAAA,EACD;AACD;AAiBA,IAAO,kCAAQ;AAAA,EACd;AAAA,EACA;AAAA,EACA;AAAA,MACA,+BAAa,0BAA2B;AACzC,EAAG,iBAAkB;",
6
- "names": ["blockEditorStore", "PostFeaturedImageCheck", "HStack", "clsx", "coreStore", "editorStore"]
4
+ "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { applyFilters } from '@wordpress/hooks';\nimport {\n\tDropZone,\n\tButton,\n\tSpinner,\n\twithNotices,\n\twithFilters,\n\t__experimentalHStack as HStack,\n\tNotice,\n} from '@wordpress/components';\nimport { isBlobURL } from '@wordpress/blob';\nimport { useState, useRef } from '@wordpress/element';\nimport { compose } from '@wordpress/compose';\nimport { useSelect, withDispatch, withSelect } from '@wordpress/data';\nimport {\n\tMediaUpload,\n\tMediaUploadCheck,\n\tstore as blockEditorStore,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport PostFeaturedImageCheck from './check';\nimport { store as editorStore } from '../../store';\n\nconst { MediaUploadModal } = unlock( blockEditorPrivateApis );\n\nconst ALLOWED_MEDIA_TYPES = [ 'image' ];\n\n// Used when labels from post type were not yet loaded or when they are not present.\nconst DEFAULT_FEATURE_IMAGE_LABEL = __( 'Featured image' );\nconst DEFAULT_SET_FEATURE_IMAGE_LABEL = __( 'Add a featured image' );\n\nconst instructions = (\n\t<p>\n\t\t{ __(\n\t\t\t'To edit the featured image, you need permission to upload media.'\n\t\t) }\n\t</p>\n);\n\n/**\n * Conditional Media component that uses MediaUploadModal when experiment is enabled,\n * otherwise falls back to MediaUpload.\n *\n * @param {Object} root0 Component props.\n * @param {Function} root0.render Render prop function that receives { open } object.\n * @return {JSX.Element} The component.\n */\nfunction ConditionalMediaUpload( { render, ...props } ) {\n\tconst [ isModalOpen, setIsModalOpen ] = useState( false );\n\tconst mediaUpload = useSelect( ( select ) => {\n\t\tconst { getSettings } = select( blockEditorStore );\n\t\treturn getSettings().mediaUpload;\n\t}, [] );\n\n\tif ( window.__experimentalDataViewsMediaModal ) {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{ render && render( { open: () => setIsModalOpen( true ) } ) }\n\t\t\t\t<MediaUploadModal\n\t\t\t\t\t{ ...props }\n\t\t\t\t\tisOpen={ isModalOpen }\n\t\t\t\t\tonClose={ () => {\n\t\t\t\t\t\tsetIsModalOpen( false );\n\t\t\t\t\t\tprops.onClose?.();\n\t\t\t\t\t} }\n\t\t\t\t\tonSelect={ ( media ) => {\n\t\t\t\t\t\tsetIsModalOpen( false );\n\t\t\t\t\t\tprops.onSelect?.( media );\n\t\t\t\t\t} }\n\t\t\t\t\tonUpload={ mediaUpload }\n\t\t\t\t/>\n\t\t\t</>\n\t\t);\n\t}\n\n\treturn <MediaUpload { ...props } render={ render } />;\n}\n\nfunction getMediaDetails( media, postId ) {\n\tif ( ! media ) {\n\t\treturn {};\n\t}\n\n\tconst defaultSize = applyFilters(\n\t\t'editor.PostFeaturedImage.imageSize',\n\t\t'large',\n\t\tmedia.id,\n\t\tpostId\n\t);\n\tif ( defaultSize in ( media?.media_details?.sizes ?? {} ) ) {\n\t\treturn {\n\t\t\tmediaWidth: media.media_details.sizes[ defaultSize ].width,\n\t\t\tmediaHeight: media.media_details.sizes[ defaultSize ].height,\n\t\t\tmediaSourceUrl: media.media_details.sizes[ defaultSize ].source_url,\n\t\t};\n\t}\n\n\t// Use fallbackSize when defaultSize is not available.\n\tconst fallbackSize = applyFilters(\n\t\t'editor.PostFeaturedImage.imageSize',\n\t\t'thumbnail',\n\t\tmedia.id,\n\t\tpostId\n\t);\n\tif ( fallbackSize in ( media?.media_details?.sizes ?? {} ) ) {\n\t\treturn {\n\t\t\tmediaWidth: media.media_details.sizes[ fallbackSize ].width,\n\t\t\tmediaHeight: media.media_details.sizes[ fallbackSize ].height,\n\t\t\tmediaSourceUrl:\n\t\t\t\tmedia.media_details.sizes[ fallbackSize ].source_url,\n\t\t};\n\t}\n\n\t// Use full image size when fallbackSize and defaultSize are not available.\n\treturn {\n\t\tmediaWidth: media.media_details.width,\n\t\tmediaHeight: media.media_details.height,\n\t\tmediaSourceUrl: media.source_url,\n\t};\n}\n\nfunction PostFeaturedImage( {\n\tcurrentPostId,\n\tfeaturedImageId,\n\tonUpdateImage,\n\tonRemoveImage,\n\tmedia,\n\tpostType,\n\tnoticeUI,\n\tnoticeOperations,\n\tisRequestingFeaturedImageMedia,\n} ) {\n\tconst returnsFocusRef = useRef( false );\n\tconst [ isLoading, setIsLoading ] = useState( false );\n\tconst { getSettings } = useSelect( blockEditorStore );\n\tconst { mediaSourceUrl } = getMediaDetails( media, currentPostId );\n\n\tfunction onDropFiles( filesList ) {\n\t\tgetSettings().mediaUpload( {\n\t\t\tallowedTypes: ALLOWED_MEDIA_TYPES,\n\t\t\tfilesList,\n\t\t\tonFileChange( [ image ] ) {\n\t\t\t\tif ( isBlobURL( image?.url ) ) {\n\t\t\t\t\tsetIsLoading( true );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif ( image ) {\n\t\t\t\t\tonUpdateImage( image );\n\t\t\t\t}\n\t\t\t\tsetIsLoading( false );\n\t\t\t},\n\t\t\tonError( message ) {\n\t\t\t\tnoticeOperations.removeAllNotices();\n\t\t\t\tnoticeOperations.createErrorNotice( message );\n\t\t\t},\n\t\t\tmultiple: false,\n\t\t} );\n\t}\n\n\t/**\n\t * Generates the featured image alt text for this editing context.\n\t *\n\t * @param {Object} imageMedia The image media object.\n\t * @param {string} imageMedia.alt_text The alternative text of the image.\n\t * @param {Object} imageMedia.media_details The media details of the image.\n\t * @param {Object} imageMedia.media_details.sizes The sizes of the image.\n\t * @param {Object} imageMedia.media_details.sizes.full The full size details of the image.\n\t * @param {string} imageMedia.media_details.sizes.full.file The file name of the full size image.\n\t * @param {string} imageMedia.slug The slug of the image.\n\t * @return {string} The featured image alt text.\n\t */\n\tfunction getImageDescription( imageMedia ) {\n\t\tif ( imageMedia.alt_text ) {\n\t\t\treturn sprintf(\n\t\t\t\t// Translators: %s: The selected image alt text.\n\t\t\t\t__( 'Current image: %s' ),\n\t\t\t\timageMedia.alt_text\n\t\t\t);\n\t\t}\n\t\treturn sprintf(\n\t\t\t// Translators: %s: The selected image filename.\n\t\t\t__(\n\t\t\t\t'The current image has no alternative text. The file name is: %s'\n\t\t\t),\n\t\t\timageMedia.media_details.sizes?.full?.file || imageMedia.slug\n\t\t);\n\t}\n\n\tfunction returnFocus( node ) {\n\t\tif ( returnsFocusRef.current && node ) {\n\t\t\tnode.focus();\n\t\t\treturnsFocusRef.current = false;\n\t\t}\n\t}\n\n\tconst isMissingMedia =\n\t\t! isRequestingFeaturedImageMedia && !! featuredImageId && ! media;\n\n\treturn (\n\t\t<PostFeaturedImageCheck>\n\t\t\t{ noticeUI }\n\t\t\t<div className=\"editor-post-featured-image\">\n\t\t\t\t{ media && (\n\t\t\t\t\t<div\n\t\t\t\t\t\tid={ `editor-post-featured-image-${ featuredImageId }-describedby` }\n\t\t\t\t\t\tclassName=\"hidden\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ getImageDescription( media ) }\n\t\t\t\t\t</div>\n\t\t\t\t) }\n\t\t\t\t<MediaUploadCheck fallback={ instructions }>\n\t\t\t\t\t<ConditionalMediaUpload\n\t\t\t\t\t\ttitle={\n\t\t\t\t\t\t\tpostType?.labels?.featured_image ||\n\t\t\t\t\t\t\tDEFAULT_FEATURE_IMAGE_LABEL\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonSelect={ onUpdateImage }\n\t\t\t\t\t\tunstableFeaturedImageFlow\n\t\t\t\t\t\tallowedTypes={ ALLOWED_MEDIA_TYPES }\n\t\t\t\t\t\tmodalClass=\"editor-post-featured-image__media-modal\"\n\t\t\t\t\t\trender={ ( { open } ) => (\n\t\t\t\t\t\t\t<div className=\"editor-post-featured-image__container\">\n\t\t\t\t\t\t\t\t{ isMissingMedia ? (\n\t\t\t\t\t\t\t\t\t<Notice\n\t\t\t\t\t\t\t\t\t\tstatus=\"warning\"\n\t\t\t\t\t\t\t\t\t\tisDismissible={ false }\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t\t'Could not retrieve the featured image data.'\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t</Notice>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t\t\tref={ returnFocus }\n\t\t\t\t\t\t\t\t\t\tclassName={\n\t\t\t\t\t\t\t\t\t\t\t! featuredImageId\n\t\t\t\t\t\t\t\t\t\t\t\t? 'editor-post-featured-image__toggle'\n\t\t\t\t\t\t\t\t\t\t\t\t: 'editor-post-featured-image__preview'\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tonClick={ open }\n\t\t\t\t\t\t\t\t\t\taria-label={\n\t\t\t\t\t\t\t\t\t\t\t! featuredImageId\n\t\t\t\t\t\t\t\t\t\t\t\t? null\n\t\t\t\t\t\t\t\t\t\t\t\t: __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Edit or replace the featured image'\n\t\t\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\taria-describedby={\n\t\t\t\t\t\t\t\t\t\t\t! featuredImageId\n\t\t\t\t\t\t\t\t\t\t\t\t? null\n\t\t\t\t\t\t\t\t\t\t\t\t: `editor-post-featured-image-${ featuredImageId }-describedby`\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\taria-haspopup=\"dialog\"\n\t\t\t\t\t\t\t\t\t\tdisabled={ isLoading }\n\t\t\t\t\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ !! featuredImageId && media && (\n\t\t\t\t\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"editor-post-featured-image__preview-image\"\n\t\t\t\t\t\t\t\t\t\t\t\tsrc={ mediaSourceUrl }\n\t\t\t\t\t\t\t\t\t\t\t\talt={ getImageDescription(\n\t\t\t\t\t\t\t\t\t\t\t\t\tmedia\n\t\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t{ ( isLoading ||\n\t\t\t\t\t\t\t\t\t\t\tisRequestingFeaturedImageMedia ) && (\n\t\t\t\t\t\t\t\t\t\t\t<Spinner />\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t{ ! featuredImageId &&\n\t\t\t\t\t\t\t\t\t\t\t! isLoading &&\n\t\t\t\t\t\t\t\t\t\t\t( postType?.labels\n\t\t\t\t\t\t\t\t\t\t\t\t?.set_featured_image ||\n\t\t\t\t\t\t\t\t\t\t\t\tDEFAULT_SET_FEATURE_IMAGE_LABEL ) }\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t{ !! featuredImageId && (\n\t\t\t\t\t\t\t\t\t<HStack\n\t\t\t\t\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t\t\t\t\t'editor-post-featured-image__actions',\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t'editor-post-featured-image__actions-missing-image':\n\t\t\t\t\t\t\t\t\t\t\t\t\tisMissingMedia,\n\t\t\t\t\t\t\t\t\t\t\t\t'editor-post-featured-image__actions-is-requesting-image':\n\t\t\t\t\t\t\t\t\t\t\t\t\tisRequestingFeaturedImageMedia,\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"editor-post-featured-image__action\"\n\t\t\t\t\t\t\t\t\t\t\tonClick={ open }\n\t\t\t\t\t\t\t\t\t\t\taria-haspopup=\"dialog\"\n\t\t\t\t\t\t\t\t\t\t\tvariant={\n\t\t\t\t\t\t\t\t\t\t\t\tisMissingMedia\n\t\t\t\t\t\t\t\t\t\t\t\t\t? 'secondary'\n\t\t\t\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ __( 'Replace' ) }\n\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"editor-post-featured-image__action\"\n\t\t\t\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\t\t\t\tonRemoveImage();\n\t\t\t\t\t\t\t\t\t\t\t\t// Signal that the toggle button should be focused,\n\t\t\t\t\t\t\t\t\t\t\t\t// when it is rendered. Can't focus it directly here\n\t\t\t\t\t\t\t\t\t\t\t\t// because it's rendered conditionally.\n\t\t\t\t\t\t\t\t\t\t\t\treturnsFocusRef.current = true;\n\t\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\t\tvariant={\n\t\t\t\t\t\t\t\t\t\t\t\tisMissingMedia\n\t\t\t\t\t\t\t\t\t\t\t\t\t? 'secondary'\n\t\t\t\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tisDestructive={ isMissingMedia }\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ __( 'Remove' ) }\n\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t</HStack>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t<DropZone onFilesDrop={ onDropFiles } />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tvalue={ featuredImageId }\n\t\t\t\t\t/>\n\t\t\t\t</MediaUploadCheck>\n\t\t\t</div>\n\t\t</PostFeaturedImageCheck>\n\t);\n}\n\nconst applyWithSelect = withSelect( ( select ) => {\n\tconst { getEntityRecord, getPostType, hasFinishedResolution } =\n\t\tselect( coreStore );\n\tconst { getCurrentPostId, getEditedPostAttribute } = select( editorStore );\n\tconst featuredImageId = getEditedPostAttribute( 'featured_media' );\n\n\treturn {\n\t\tmedia: featuredImageId\n\t\t\t? getEntityRecord( 'postType', 'attachment', featuredImageId, {\n\t\t\t\t\tcontext: 'view',\n\t\t\t } )\n\t\t\t: null,\n\t\tcurrentPostId: getCurrentPostId(),\n\t\tpostType: getPostType( getEditedPostAttribute( 'type' ) ),\n\t\tfeaturedImageId,\n\t\tisRequestingFeaturedImageMedia:\n\t\t\t!! featuredImageId &&\n\t\t\t! hasFinishedResolution( 'getEntityRecord', [\n\t\t\t\t'postType',\n\t\t\t\t'attachment',\n\t\t\t\tfeaturedImageId,\n\t\t\t\t{ context: 'view' },\n\t\t\t] ),\n\t};\n} );\n\nconst applyWithDispatch = withDispatch(\n\t( dispatch, { noticeOperations }, { select } ) => {\n\t\tconst { editPost } = dispatch( editorStore );\n\t\treturn {\n\t\t\tonUpdateImage( image ) {\n\t\t\t\teditPost( { featured_media: image.id } );\n\t\t\t},\n\t\t\tonDropImage( filesList ) {\n\t\t\t\tselect( blockEditorStore )\n\t\t\t\t\t.getSettings()\n\t\t\t\t\t.mediaUpload( {\n\t\t\t\t\t\tallowedTypes: [ 'image' ],\n\t\t\t\t\t\tfilesList,\n\t\t\t\t\t\tonFileChange( [ image ] ) {\n\t\t\t\t\t\t\teditPost( { featured_media: image.id } );\n\t\t\t\t\t\t},\n\t\t\t\t\t\tonError( message ) {\n\t\t\t\t\t\t\tnoticeOperations.removeAllNotices();\n\t\t\t\t\t\t\tnoticeOperations.createErrorNotice( message );\n\t\t\t\t\t\t},\n\t\t\t\t\t\tmultiple: false,\n\t\t\t\t\t} );\n\t\t\t},\n\t\t\tonRemoveImage() {\n\t\t\t\teditPost( { featured_media: 0 } );\n\t\t\t},\n\t\t};\n\t}\n);\n\n/**\n * Renders the component for managing the featured image of a post.\n *\n * @param {Object} props Props.\n * @param {number} props.currentPostId ID of the current post.\n * @param {number} props.featuredImageId ID of the featured image.\n * @param {Function} props.onUpdateImage Function to call when the image is updated.\n * @param {Function} props.onRemoveImage Function to call when the image is removed.\n * @param {Object} props.media The media object representing the featured image.\n * @param {string} props.postType Post type.\n * @param {Element} props.noticeUI UI for displaying notices.\n * @param {Object} props.noticeOperations Operations for managing notices.\n *\n * @return {Element} Component to be rendered .\n */\nexport default compose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B,iBAAiB;AAClC,6BAAiB,kBAAmB,OAAQ;AAAA,UAC7C;AAAA,UACA,UAAU;AAAA,QACX,CAAE;AAAA,MACJ;AAAA,MACA,gBAAgB;AACf,iBAAU,EAAE,gBAAgB,EAAE,CAAE;AAAA,MACjC;AAAA,IACD;AAAA,EACD;AACD;AAiBA,IAAO,kCAAQ;AAAA,EACd;AAAA,EACA;AAAA,EACA;AAAA,MACA,+BAAa,0BAA2B;AACzC,EAAG,iBAAkB;",
6
+ "names": ["blockEditorPrivateApis", "blockEditorStore", "PostFeaturedImageCheck", "HStack", "clsx", "coreStore", "editorStore"]
7
7
  }
@@ -26,12 +26,13 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // packages/editor/src/components/post-featured-image/panel.js
29
31
  var panel_exports = {};
30
32
  __export(panel_exports, {
31
33
  default: () => PostFeaturedImagePanel
32
34
  });
33
35
  module.exports = __toCommonJS(panel_exports);
34
- var import_jsx_runtime = require("react/jsx-runtime");
35
36
  var import_i18n = require("@wordpress/i18n");
36
37
  var import_components = require("@wordpress/components");
37
38
  var import_data = require("@wordpress/data");
@@ -39,7 +40,8 @@ var import_core_data = require("@wordpress/core-data");
39
40
  var import_store = require("../../store");
40
41
  var import_index = __toESM(require("./index"));
41
42
  var import_check = __toESM(require("./check"));
42
- const PANEL_NAME = "featured-image";
43
+ var import_jsx_runtime = require("react/jsx-runtime");
44
+ var PANEL_NAME = "featured-image";
43
45
  function PostFeaturedImagePanel({ withPanelBody = true }) {
44
46
  const { postType, isEnabled, isOpened } = (0, import_data.useSelect)((select) => {
45
47
  const {
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/post-featured-image/panel.js"],
4
4
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { PanelBody } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport PostFeaturedImage from './index';\nimport PostFeaturedImageCheck from './check';\n\nconst PANEL_NAME = 'featured-image';\n\n/**\n * Renders the panel for the post featured image.\n *\n * @param {Object} props Props.\n * @param {boolean} props.withPanelBody Whether to include the panel body. Default true.\n *\n * @return {React.ReactNode} The component to be rendered.\n * Return Null if the editor panel is disabled for featured image.\n */\nexport default function PostFeaturedImagePanel( { withPanelBody = true } ) {\n\tconst { postType, isEnabled, isOpened } = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetEditedPostAttribute,\n\t\t\tisEditorPanelEnabled,\n\t\t\tisEditorPanelOpened,\n\t\t} = select( editorStore );\n\t\tconst { getPostType } = select( coreStore );\n\n\t\treturn {\n\t\t\tpostType: getPostType( getEditedPostAttribute( 'type' ) ),\n\t\t\tisEnabled: isEditorPanelEnabled( PANEL_NAME ),\n\t\t\tisOpened: isEditorPanelOpened( PANEL_NAME ),\n\t\t};\n\t}, [] );\n\n\tconst { toggleEditorPanelOpened } = useDispatch( editorStore );\n\n\tif ( ! isEnabled ) {\n\t\treturn null;\n\t}\n\n\tif ( ! withPanelBody ) {\n\t\treturn (\n\t\t\t<PostFeaturedImageCheck>\n\t\t\t\t<PostFeaturedImage />\n\t\t\t</PostFeaturedImageCheck>\n\t\t);\n\t}\n\n\treturn (\n\t\t<PostFeaturedImageCheck>\n\t\t\t<PanelBody\n\t\t\t\ttitle={\n\t\t\t\t\tpostType?.labels?.featured_image ?? __( 'Featured image' )\n\t\t\t\t}\n\t\t\t\topened={ isOpened }\n\t\t\t\tonToggle={ () => toggleEditorPanelOpened( PANEL_NAME ) }\n\t\t\t>\n\t\t\t\t<PostFeaturedImage />\n\t\t\t</PanelBody>\n\t\t</PostFeaturedImageCheck>\n\t);\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;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AAWJ,SAAR,uBAAyC,EAAE,gBAAgB,KAAK,GAAI;AAC1E,QAAM,EAAE,UAAU,WAAW,SAAS,QAAI,uBAAW,CAAE,WAAY;AAClE,UAAM;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,IACD,IAAI,OAAQ,aAAAA,KAAY;AACxB,UAAM,EAAE,YAAY,IAAI,OAAQ,iBAAAC,KAAU;AAE1C,WAAO;AAAA,MACN,UAAU,YAAa,uBAAwB,MAAO,CAAE;AAAA,MACxD,WAAW,qBAAsB,UAAW;AAAA,MAC5C,UAAU,oBAAqB,UAAW;AAAA,IAC3C;AAAA,EACD,GAAG,CAAC,CAAE;AAEN,QAAM,EAAE,wBAAwB,QAAI,yBAAa,aAAAD,KAAY;AAE7D,MAAK,CAAE,WAAY;AAClB,WAAO;AAAA,EACR;AAEA,MAAK,CAAE,eAAgB;AACtB,WACC,4CAAC,aAAAE,SAAA,EACA,sDAAC,aAAAC,SAAA,EAAkB,GACpB;AAAA,EAEF;AAEA,SACC,4CAAC,aAAAD,SAAA,EACA;AAAA,IAAC;AAAA;AAAA,MACA,OACC,UAAU,QAAQ,sBAAkB,gBAAI,gBAAiB;AAAA,MAE1D,QAAS;AAAA,MACT,UAAW,MAAM,wBAAyB,UAAW;AAAA,MAErD,sDAAC,aAAAC,SAAA,EAAkB;AAAA;AAAA,EACpB,GACD;AAEF;",
6
6
  "names": ["editorStore", "coreStore", "PostFeaturedImageCheck", "PostFeaturedImage"]
7
7
  }
@@ -16,6 +16,8 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // packages/editor/src/components/post-fields/index.ts
19
21
  var post_fields_exports = {};
20
22
  __export(post_fields_exports, {
21
23
  default: () => post_fields_default
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/post-fields/index.ts"],
4
4
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport type { Field } from '@wordpress/dataviews';\nimport type { BasePostWithEmbeddedAuthor } from '@wordpress/fields';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as editorStore } from '../../store';\n\nfunction usePostFields( {\n\tpostType,\n}: {\n\tpostType: string;\n} ): Field< BasePostWithEmbeddedAuthor >[] {\n\tconst { registerPostTypeSchema } = unlock( useDispatch( editorStore ) );\n\tuseEffect( () => {\n\t\tregisterPostTypeSchema( postType );\n\t}, [ registerPostTypeSchema, postType ] );\n\n\tconst { fields } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEntityFields } = unlock( select( editorStore ) );\n\t\t\treturn {\n\t\t\t\tfields: getEntityFields( 'postType', postType ),\n\t\t\t};\n\t\t},\n\t\t[ postType ]\n\t);\n\n\treturn fields;\n}\n\n/**\n * Hook to get the fields for a post (BasePost or BasePostWithEmbeddedAuthor).\n */\nexport default usePostFields;\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAA0B;AAC1B,kBAAuC;AAOvC,yBAAuB;AACvB,mBAAqC;AAErC,SAAS,cAAe;AAAA,EACvB;AACD,GAE2C;AAC1C,QAAM,EAAE,uBAAuB,QAAI,+BAAQ,yBAAa,aAAAA,KAAY,CAAE;AACtE,gCAAW,MAAM;AAChB,2BAAwB,QAAS;AAAA,EAClC,GAAG,CAAE,wBAAwB,QAAS,CAAE;AAExC,QAAM,EAAE,OAAO,QAAI;AAAA,IAClB,CAAE,WAAY;AACb,YAAM,EAAE,gBAAgB,QAAI,2BAAQ,OAAQ,aAAAA,KAAY,CAAE;AAC1D,aAAO;AAAA,QACN,QAAQ,gBAAiB,YAAY,QAAS;AAAA,MAC/C;AAAA,IACD;AAAA,IACA,CAAE,QAAS;AAAA,EACZ;AAEA,SAAO;AACR;AAKA,IAAO,sBAAQ;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAA0B;AAC1B,kBAAuC;AAOvC,yBAAuB;AACvB,mBAAqC;AAErC,SAAS,cAAe;AAAA,EACvB;AACD,GAE2C;AAC1C,QAAM,EAAE,uBAAuB,QAAI,+BAAQ,yBAAa,aAAAA,KAAY,CAAE;AACtE,gCAAW,MAAM;AAChB,2BAAwB,QAAS;AAAA,EAClC,GAAG,CAAE,wBAAwB,QAAS,CAAE;AAExC,QAAM,EAAE,OAAO,QAAI;AAAA,IAClB,CAAE,WAAY;AACb,YAAM,EAAE,gBAAgB,QAAI,2BAAQ,OAAQ,aAAAA,KAAY,CAAE;AAC1D,aAAO;AAAA,QACN,QAAQ,gBAAiB,YAAY,QAAS;AAAA,MAC/C;AAAA,IACD;AAAA,IACA,CAAE,QAAS;AAAA,EACZ;AAEA,SAAO;AACR;AAKA,IAAO,sBAAQ;",
6
6
  "names": ["editorStore"]
7
7
  }
@@ -26,15 +26,17 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // packages/editor/src/components/post-format/check.js
29
31
  var check_exports = {};
30
32
  __export(check_exports, {
31
33
  default: () => PostFormatCheck
32
34
  });
33
35
  module.exports = __toCommonJS(check_exports);
34
- var import_jsx_runtime = require("react/jsx-runtime");
35
36
  var import_data = require("@wordpress/data");
36
37
  var import_post_type_support_check = __toESM(require("../post-type-support-check"));
37
38
  var import_store = require("../../store");
39
+ var import_jsx_runtime = require("react/jsx-runtime");
38
40
  function PostFormatCheck({ children }) {
39
41
  const disablePostFormats = (0, import_data.useSelect)(
40
42
  (select) => select(import_store.store).getEditorSettings().disablePostFormats,
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/post-format/check.js"],
4
4
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport PostTypeSupportCheck from '../post-type-support-check';\nimport { store as editorStore } from '../../store';\n\n/**\n * Component check if there are any post formats.\n *\n * @param {Object} props The component props.\n * @param {React.ReactNode} props.children The child elements to render.\n *\n * @return {React.ReactNode} The rendered component or null if post formats are disabled.\n */\nexport default function PostFormatCheck( { children } ) {\n\tconst disablePostFormats = useSelect(\n\t\t( select ) =>\n\t\t\tselect( editorStore ).getEditorSettings().disablePostFormats,\n\t\t[]\n\t);\n\n\tif ( disablePostFormats ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PostTypeSupportCheck supportKeys=\"post-formats\">\n\t\t\t{ children }\n\t\t</PostTypeSupportCheck>\n\t);\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA+BE;AA5BF,kBAA0B;AAK1B,qCAAiC;AACjC,mBAAqC;AAUtB,SAAR,gBAAkC,EAAE,SAAS,GAAI;AACvD,QAAM,yBAAqB;AAAA,IAC1B,CAAE,WACD,OAAQ,aAAAA,KAAY,EAAE,kBAAkB,EAAE;AAAA,IAC3C,CAAC;AAAA,EACF;AAEA,MAAK,oBAAqB;AACzB,WAAO;AAAA,EACR;AAEA,SACC,4CAAC,+BAAAC,SAAA,EAAqB,aAAY,gBAC/B,UACH;AAEF;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAA0B;AAK1B,qCAAiC;AACjC,mBAAqC;AAsBnC;AAZa,SAAR,gBAAkC,EAAE,SAAS,GAAI;AACvD,QAAM,yBAAqB;AAAA,IAC1B,CAAE,WACD,OAAQ,aAAAA,KAAY,EAAE,kBAAkB,EAAE;AAAA,IAC3C,CAAC;AAAA,EACF;AAEA,MAAK,oBAAqB;AACzB,WAAO;AAAA,EACR;AAEA,SACC,4CAAC,+BAAAC,SAAA,EAAqB,aAAY,gBAC/B,UACH;AAEF;",
6
6
  "names": ["editorStore", "PostTypeSupportCheck"]
7
7
  }
@@ -26,13 +26,14 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // packages/editor/src/components/post-format/index.js
29
31
  var post_format_exports = {};
30
32
  __export(post_format_exports, {
31
33
  POST_FORMATS: () => POST_FORMATS,
32
34
  default: () => PostFormat
33
35
  });
34
36
  module.exports = __toCommonJS(post_format_exports);
35
- var import_jsx_runtime = require("react/jsx-runtime");
36
37
  var import_i18n = require("@wordpress/i18n");
37
38
  var import_components = require("@wordpress/components");
38
39
  var import_data = require("@wordpress/data");
@@ -40,7 +41,8 @@ var import_compose = require("@wordpress/compose");
40
41
  var import_core_data = require("@wordpress/core-data");
41
42
  var import_check = __toESM(require("./check"));
42
43
  var import_store = require("../../store");
43
- const POST_FORMATS = [
44
+ var import_jsx_runtime = require("react/jsx-runtime");
45
+ var POST_FORMATS = [
44
46
  { id: "aside", caption: (0, import_i18n.__)("Aside") },
45
47
  { id: "audio", caption: (0, import_i18n.__)("Audio") },
46
48
  { id: "chat", caption: (0, import_i18n.__)("Chat") },
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/post-format/index.js"],
4
4
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { Button, RadioControl } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useInstanceId } from '@wordpress/compose';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport PostFormatCheck from './check';\nimport { store as editorStore } from '../../store';\n\n// All WP post formats, sorted alphabetically by translated name.\nexport const POST_FORMATS = [\n\t{ id: 'aside', caption: __( 'Aside' ) },\n\t{ id: 'audio', caption: __( 'Audio' ) },\n\t{ id: 'chat', caption: __( 'Chat' ) },\n\t{ id: 'gallery', caption: __( 'Gallery' ) },\n\t{ id: 'image', caption: __( 'Image' ) },\n\t{ id: 'link', caption: __( 'Link' ) },\n\t{ id: 'quote', caption: __( 'Quote' ) },\n\t{ id: 'standard', caption: __( 'Standard' ) },\n\t{ id: 'status', caption: __( 'Status' ) },\n\t{ id: 'video', caption: __( 'Video' ) },\n].sort( ( a, b ) => {\n\tconst normalizedA = a.caption.toUpperCase();\n\tconst normalizedB = b.caption.toUpperCase();\n\n\tif ( normalizedA < normalizedB ) {\n\t\treturn -1;\n\t}\n\tif ( normalizedA > normalizedB ) {\n\t\treturn 1;\n\t}\n\treturn 0;\n} );\n\n/**\n * `PostFormat` a component that allows changing the post format while also providing a suggestion for the current post.\n *\n * @example\n * ```jsx\n * <PostFormat />\n * ```\n *\n * @return {React.ReactNode} The rendered PostFormat component.\n */\nexport default function PostFormat() {\n\tconst instanceId = useInstanceId( PostFormat );\n\tconst postFormatSelectorId = `post-format-selector-${ instanceId }`;\n\n\tconst { postFormat, suggestedFormat, supportedFormats } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEditedPostAttribute, getSuggestedPostFormat } =\n\t\t\t\tselect( editorStore );\n\t\t\tconst _postFormat = getEditedPostAttribute( 'format' );\n\t\t\tconst themeSupports = select( coreStore ).getThemeSupports();\n\t\t\treturn {\n\t\t\t\tpostFormat: _postFormat ?? 'standard',\n\t\t\t\tsuggestedFormat: getSuggestedPostFormat(),\n\t\t\t\tsupportedFormats: themeSupports.formats,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\tconst formats = POST_FORMATS.filter( ( format ) => {\n\t\t// Ensure current format is always in the set.\n\t\t// The current format may not be a format supported by the theme.\n\t\treturn (\n\t\t\tsupportedFormats?.includes( format.id ) || postFormat === format.id\n\t\t);\n\t} );\n\tconst suggestion = formats.find(\n\t\t( format ) => format.id === suggestedFormat\n\t);\n\n\tconst { editPost } = useDispatch( editorStore );\n\n\tconst onUpdatePostFormat = ( format ) => editPost( { format } );\n\n\treturn (\n\t\t<PostFormatCheck>\n\t\t\t<div className=\"editor-post-format\">\n\t\t\t\t<RadioControl\n\t\t\t\t\tclassName=\"editor-post-format__options\"\n\t\t\t\t\tlabel={ __( 'Post Format' ) }\n\t\t\t\t\tselected={ postFormat }\n\t\t\t\t\tonChange={ ( format ) => onUpdatePostFormat( format ) }\n\t\t\t\t\tid={ postFormatSelectorId }\n\t\t\t\t\toptions={ formats.map( ( format ) => ( {\n\t\t\t\t\t\tlabel: format.caption,\n\t\t\t\t\t\tvalue: format.id,\n\t\t\t\t\t} ) ) }\n\t\t\t\t\thideLabelFromVision\n\t\t\t\t/>\n\t\t\t\t{ suggestion && suggestion.id !== postFormat && (\n\t\t\t\t\t<p className=\"editor-post-format__suggestion\">\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tvariant=\"link\"\n\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\tonUpdatePostFormat( suggestion.id )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t\t\t/* translators: %s: post format */\n\t\t\t\t\t\t\t\t__( 'Apply suggested format: %s' ),\n\t\t\t\t\t\t\t\tsuggestion.caption\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</p>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t</PostFormatCheck>\n\t);\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAsFG;AAnFH,kBAA4B;AAC5B,wBAAqC;AACrC,kBAAuC;AACvC,qBAA8B;AAC9B,uBAAmC;AAKnC,mBAA4B;AAC5B,mBAAqC;AAG9B,MAAM,eAAe;AAAA,EAC3B,EAAE,IAAI,SAAS,aAAS,gBAAI,OA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e,OAAO;AAAA,EAEnE,CAAE;AACF,QAAM,aAAa,QAAQ;AAAA,IAC1B,CAAE,WAAY,OAAO,OAAO;AAAA,EAC7B;AAEA,QAAM,EAAE,SAAS,QAAI,yBAAa,aAAAD,KAAY;AAE9C,QAAM,qBAAqB,CAAE,WAAY,SAAU,EAAE,OAAO,CAAE;AAE9D,SACC,4CAAC,aAAAE,SAAA,EACA,uDAAC,SAAI,WAAU,sBACd;AAAA;AAAA,MAAC;AAAA;AAAA,QACA,WAAU;AAAA,QACV,WAAQ,gBAAI,aAAc;AAAA,QAC1B,UAAW;AAAA,QACX,UAAW,CAAE,WAAY,mBAAoB,MAAO;AAAA,QACpD,IAAK;AAAA,QACL,SAAU,QAAQ,IAAK,CAAE,YAAc;AAAA,UACtC,OAAO,OAAO;AAAA,UACd,OAAO,OAAO;AAAA,QACf,EAAI;AAAA,QACJ,qBAAmB;AAAA;AAAA,IACpB;AAAA,IACE,cAAc,WAAW,OAAO,cACjC,4CAAC,OAAE,WAAU,kCACZ;AAAA,MAAC;AAAA;AAAA,QACA,uBAAqB;AAAA,QACrB,SAAQ;AAAA,QACR,SAAU,MACT,mBAAoB,WAAW,EAAG;AAAA,QAGjC;AAAA;AAAA,cAED,gBAAI,4BAA6B;AAAA,UACjC,WAAW;AAAA,QACZ;AAAA;AAAA,IACD,GACD;AAAA,KAEF,GACD;AAEF;",
6
6
  "names": ["editorStore", "coreStore", "PostFormatCheck"]
7
7
  }
@@ -26,12 +26,13 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // packages/editor/src/components/post-format/panel.js
29
31
  var panel_exports = {};
30
32
  __export(panel_exports, {
31
33
  default: () => panel_default
32
34
  });
33
35
  module.exports = __toCommonJS(panel_exports);
34
- var import_jsx_runtime = require("react/jsx-runtime");
35
36
  var import_components = require("@wordpress/components");
36
37
  var import_i18n = require("@wordpress/i18n");
37
38
  var import_data = require("@wordpress/data");
@@ -41,6 +42,7 @@ var import__ = __toESM(require("./"));
41
42
  var import_check = __toESM(require("./check"));
42
43
  var import_post_panel_row = __toESM(require("../post-panel-row"));
43
44
  var import_store = require("../../store");
45
+ var import_jsx_runtime = require("react/jsx-runtime");
44
46
  function PostFormat() {
45
47
  const { postFormat } = (0, import_data.useSelect)((select) => {
46
48
  const { getEditedPostAttribute } = select(import_store.store);
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/post-format/panel.js"],
4
4
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { Button, Dropdown } from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { useState, useMemo } from '@wordpress/element';\nimport { __experimentalInspectorPopoverHeader as InspectorPopoverHeader } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { default as PostFormatForm, POST_FORMATS } from './';\nimport PostFormatCheck from './check';\nimport PostPanelRow from '../post-panel-row';\nimport { store as editorStore } from '../../store';\n\n/**\n * Renders the Post Author Panel component.\n *\n * @return {React.ReactNode} The rendered component.\n */\nfunction PostFormat() {\n\tconst { postFormat } = useSelect( ( select ) => {\n\t\tconst { getEditedPostAttribute } = select( editorStore );\n\t\tconst _postFormat = getEditedPostAttribute( 'format' );\n\t\treturn {\n\t\t\tpostFormat: _postFormat ?? 'standard',\n\t\t};\n\t}, [] );\n\tconst activeFormat = POST_FORMATS.find(\n\t\t( format ) => format.id === postFormat\n\t);\n\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the popover's anchor updates.\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\t// Memoize popoverProps to avoid returning a new object every time.\n\tconst popoverProps = useMemo(\n\t\t() => ( {\n\t\t\t// Anchor the popover to the middle of the entire row so that it doesn't\n\t\t\t// move around when the label changes.\n\t\t\tanchor: popoverAnchor,\n\t\t\tplacement: 'left-start',\n\t\t\toffset: 36,\n\t\t\tshift: true,\n\t\t} ),\n\t\t[ popoverAnchor ]\n\t);\n\treturn (\n\t\t<PostFormatCheck>\n\t\t\t<PostPanelRow label={ __( 'Format' ) } ref={ setPopoverAnchor }>\n\t\t\t\t<Dropdown\n\t\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\t\tcontentClassName=\"editor-post-format__dialog\"\n\t\t\t\t\tfocusOnMount\n\t\t\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\t\t\taria-label={ sprintf(\n\t\t\t\t\t\t\t\t// translators: %s: Current post format.\n\t\t\t\t\t\t\t\t__( 'Change format: %s' ),\n\t\t\t\t\t\t\t\tactiveFormat?.caption\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ activeFormat?.caption }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t) }\n\t\t\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t\t\t<div className=\"editor-post-format__dialog-content\">\n\t\t\t\t\t\t\t<InspectorPopoverHeader\n\t\t\t\t\t\t\t\ttitle={ __( 'Format' ) }\n\t\t\t\t\t\t\t\tonClose={ onClose }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<PostFormatForm />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t</PostPanelRow>\n\t\t</PostFormatCheck>\n\t);\n}\n\nexport default PostFormat;\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAyDM;AAtDN,wBAAiC;AACjC,kBAA4B;AAC5B,kBAA0B;AAC1B,qBAAkC;AAClC,0BAA+E;AA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,MAED,eAAgB,CAAE,EAAE,QAAQ,MAC3B,6CAAC,SAAI,WAAU,sCACd;AAAA;AAAA,UAAC,oBAAAC;AAAA,UAAA;AAAA,YACA,WAAQ,gBAAI,QAAS;AAAA,YACrB;AAAA;AAAA,QACD;AAAA,QACA,4CAAC,SAAAC,SAAA,EAAe;AAAA,SACjB;AAAA;AAAA,EAEF,GACD,GACD;AAEF;AAEA,IAAO,gBAAQ;",
6
6
  "names": ["editorStore", "PostFormatCheck", "PostPanelRow", "InspectorPopoverHeader", "PostFormatForm"]
7
7
  }
@@ -16,17 +16,19 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // packages/editor/src/components/post-last-edited-panel/index.js
19
21
  var post_last_edited_panel_exports = {};
20
22
  __export(post_last_edited_panel_exports, {
21
23
  default: () => PostLastEditedPanel
22
24
  });
23
25
  module.exports = __toCommonJS(post_last_edited_panel_exports);
24
- var import_jsx_runtime = require("react/jsx-runtime");
25
26
  var import_components = require("@wordpress/components");
26
27
  var import_data = require("@wordpress/data");
27
28
  var import_i18n = require("@wordpress/i18n");
28
29
  var import_date = require("@wordpress/date");
29
30
  var import_store = require("../../store");
31
+ var import_jsx_runtime = require("react/jsx-runtime");
30
32
  function PostLastEditedPanel() {
31
33
  const modified = (0, import_data.useSelect)(
32
34
  (select) => select(import_store.store).getEditedPostAttribute("modified"),
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/post-last-edited-panel/index.js"],
4
4
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __experimentalText as Text } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { humanTimeDiff } from '@wordpress/date';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nexport default function PostLastEditedPanel() {\n\tconst modified = useSelect(\n\t\t( select ) =>\n\t\t\tselect( editorStore ).getEditedPostAttribute( 'modified' ),\n\t\t[]\n\t);\n\tconst lastEditedText =\n\t\tmodified &&\n\t\tsprintf(\n\t\t\t// translators: %s: Human-readable time difference, e.g. \"2 days ago\".\n\t\t\t__( 'Last edited %s.' ),\n\t\t\thumanTimeDiff( modified )\n\t\t);\n\tif ( ! lastEditedText ) {\n\t\treturn null;\n\t}\n\treturn (\n\t\t<div className=\"editor-post-last-edited-panel\">\n\t\t\t<Text>{ lastEditedText }</Text>\n\t\t</div>\n\t);\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA+BG;AA5BH,wBAA2C;AAC3C,kBAA0B;AAC1B,kBAA4B;AAC5B,kBAA8B;AAK9B,mBAAqC;AAEtB,SAAR,sBAAuC;AAC7C,QAAM,eAAW;AAAA,IAChB,CAAE,WACD,OAAQ,aAAAA,KAAY,EAAE,uBAAwB,UAAW;AAAA,IAC1D,CAAC;AAAA,EACF;AACA,QAAM,iBACL,gBACA;AAAA;AAAA,QAEC,gBAAI,iBAAkB;AAAA,QACtB,2BAAe,QAAS;AAAA,EACzB;AACD,MAAK,CAAE,gBAAiB;AACvB,WAAO;AAAA,EACR;AACA,SACC,4CAAC,SAAI,WAAU,iCACd,sDAAC,kBAAAC,oBAAA,EAAO,0BAAgB,GACzB;AAEF;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,wBAA2C;AAC3C,kBAA0B;AAC1B,kBAA4B;AAC5B,kBAA8B;AAK9B,mBAAqC;AAoBlC;AAlBY,SAAR,sBAAuC;AAC7C,QAAM,eAAW;AAAA,IAChB,CAAE,WACD,OAAQ,aAAAA,KAAY,EAAE,uBAAwB,UAAW;AAAA,IAC1D,CAAC;AAAA,EACF;AACA,QAAM,iBACL,gBACA;AAAA;AAAA,QAEC,gBAAI,iBAAkB;AAAA,QACtB,2BAAe,QAAS;AAAA,EACzB;AACD,MAAK,CAAE,gBAAiB;AACvB,WAAO;AAAA,EACR;AACA,SACC,4CAAC,SAAI,WAAU,iCACd,sDAAC,kBAAAC,oBAAA,EAAO,0BAAgB,GACzB;AAEF;",
6
6
  "names": ["editorStore", "Text"]
7
7
  }
@@ -26,15 +26,17 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // packages/editor/src/components/post-last-revision/check.js
29
31
  var check_exports = {};
30
32
  __export(check_exports, {
31
33
  default: () => check_default
32
34
  });
33
35
  module.exports = __toCommonJS(check_exports);
34
- var import_jsx_runtime = require("react/jsx-runtime");
35
36
  var import_data = require("@wordpress/data");
36
37
  var import_post_type_support_check = __toESM(require("../post-type-support-check"));
37
38
  var import_store = require("../../store");
39
+ var import_jsx_runtime = require("react/jsx-runtime");
38
40
  function PostLastRevisionCheck({ children }) {
39
41
  const { lastRevisionId, revisionsCount } = (0, import_data.useSelect)((select) => {
40
42
  const { getCurrentPostLastRevisionId, getCurrentPostRevisionsCount } = select(import_store.store);
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/post-last-revision/check.js"],
4
4
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport PostTypeSupportCheck from '../post-type-support-check';\nimport { store as editorStore } from '../../store';\n\n/**\n * Wrapper component that renders its children if the post has more than one revision.\n *\n * @param {Object} props Props.\n * @param {React.ReactNode} props.children Children to be rendered.\n *\n * @return {React.ReactNode} Rendered child components if post has more than one revision, otherwise null.\n */\nfunction PostLastRevisionCheck( { children } ) {\n\tconst { lastRevisionId, revisionsCount } = useSelect( ( select ) => {\n\t\tconst { getCurrentPostLastRevisionId, getCurrentPostRevisionsCount } =\n\t\t\tselect( editorStore );\n\t\treturn {\n\t\t\tlastRevisionId: getCurrentPostLastRevisionId(),\n\t\t\trevisionsCount: getCurrentPostRevisionsCount(),\n\t\t};\n\t}, [] );\n\n\tif ( ! lastRevisionId || revisionsCount < 2 ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PostTypeSupportCheck supportKeys=\"revisions\">\n\t\t\t{ children }\n\t\t</PostTypeSupportCheck>\n\t);\n}\n\nexport default PostLastRevisionCheck;\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAkCE;AA/BF,kBAA0B;AAK1B,qCAAiC;AACjC,mBAAqC;AAUrC,SAAS,sBAAuB,EAAE,SAAS,GAAI;AAC9C,QAAM,EAAE,gBAAgB,eAAe,QAAI,uBAAW,CAAE,WAAY;AACnE,UAAM,EAAE,8BAA8B,6BAA6B,IAClE,OAAQ,aAAAA,KAAY;AACrB,WAAO;AAAA,MACN,gBAAgB,6BAA6B;AAAA,MAC7C,gBAAgB,6BAA6B;AAAA,IAC9C;AAAA,EACD,GAAG,CAAC,CAAE;AAEN,MAAK,CAAE,kBAAkB,iBAAiB,GAAI;AAC7C,WAAO;AAAA,EACR;AAEA,SACC,4CAAC,+BAAAC,SAAA,EAAqB,aAAY,aAC/B,UACH;AAEF;AAEA,IAAO,gBAAQ;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAA0B;AAK1B,qCAAiC;AACjC,mBAAqC;AAyBnC;AAfF,SAAS,sBAAuB,EAAE,SAAS,GAAI;AAC9C,QAAM,EAAE,gBAAgB,eAAe,QAAI,uBAAW,CAAE,WAAY;AACnE,UAAM,EAAE,8BAA8B,6BAA6B,IAClE,OAAQ,aAAAA,KAAY;AACrB,WAAO;AAAA,MACN,gBAAgB,6BAA6B;AAAA,MAC7C,gBAAgB,6BAA6B;AAAA,IAC9C;AAAA,EACD,GAAG,CAAC,CAAE;AAEN,MAAK,CAAE,kBAAkB,iBAAiB,GAAI;AAC7C,WAAO;AAAA,EACR;AAEA,SACC,4CAAC,+BAAAC,SAAA,EAAqB,aAAY,aAC/B,UACH;AAEF;AAEA,IAAO,gBAAQ;",
6
6
  "names": ["editorStore", "PostTypeSupportCheck"]
7
7
  }
@@ -26,13 +26,14 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // packages/editor/src/components/post-last-revision/index.js
29
31
  var post_last_revision_exports = {};
30
32
  __export(post_last_revision_exports, {
31
33
  PrivatePostLastRevision: () => PrivatePostLastRevision,
32
34
  default: () => post_last_revision_default
33
35
  });
34
36
  module.exports = __toCommonJS(post_last_revision_exports);
35
- var import_jsx_runtime = require("react/jsx-runtime");
36
37
  var import_i18n = require("@wordpress/i18n");
37
38
  var import_components = require("@wordpress/components");
38
39
  var import_data = require("@wordpress/data");
@@ -41,6 +42,7 @@ var import_url = require("@wordpress/url");
41
42
  var import_check = __toESM(require("./check"));
42
43
  var import_post_panel_row = __toESM(require("../post-panel-row"));
43
44
  var import_store = require("../../store");
45
+ var import_jsx_runtime = require("react/jsx-runtime");
44
46
  function usePostLastRevisionInfo() {
45
47
  return (0, import_data.useSelect)((select) => {
46
48
  const { getCurrentPostLastRevisionId, getCurrentPostRevisionsCount } = select(import_store.store);
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/post-last-revision/index.js"],
4
4
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { sprintf, __ } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\nimport { backup } from '@wordpress/icons';\nimport { addQueryArgs } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport PostLastRevisionCheck from './check';\nimport PostPanelRow from '../post-panel-row';\nimport { store as editorStore } from '../../store';\n\nfunction usePostLastRevisionInfo() {\n\treturn useSelect( ( select ) => {\n\t\tconst { getCurrentPostLastRevisionId, getCurrentPostRevisionsCount } =\n\t\t\tselect( editorStore );\n\t\treturn {\n\t\t\tlastRevisionId: getCurrentPostLastRevisionId(),\n\t\t\trevisionsCount: getCurrentPostRevisionsCount(),\n\t\t};\n\t}, [] );\n}\n\n/**\n * Renders the component for displaying the last revision of a post.\n *\n * @return {React.ReactNode} The rendered component.\n */\nfunction PostLastRevision() {\n\tconst { lastRevisionId, revisionsCount } = usePostLastRevisionInfo();\n\n\treturn (\n\t\t<PostLastRevisionCheck>\n\t\t\t<Button\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\thref={ addQueryArgs( 'revision.php', {\n\t\t\t\t\trevision: lastRevisionId,\n\t\t\t\t} ) }\n\t\t\t\tclassName=\"editor-post-last-revision__title\"\n\t\t\t\ticon={ backup }\n\t\t\t\ticonPosition=\"right\"\n\t\t\t\ttext={ sprintf(\n\t\t\t\t\t/* translators: %s: number of revisions. */\n\t\t\t\t\t__( 'Revisions (%s)' ),\n\t\t\t\t\trevisionsCount\n\t\t\t\t) }\n\t\t\t/>\n\t\t</PostLastRevisionCheck>\n\t);\n}\n\nexport function PrivatePostLastRevision() {\n\tconst { lastRevisionId, revisionsCount } = usePostLastRevisionInfo();\n\treturn (\n\t\t<PostLastRevisionCheck>\n\t\t\t<PostPanelRow label={ __( 'Revisions' ) }>\n\t\t\t\t<Button\n\t\t\t\t\thref={ addQueryArgs( 'revision.php', {\n\t\t\t\t\t\trevision: lastRevisionId,\n\t\t\t\t\t} ) }\n\t\t\t\t\tclassName=\"editor-private-post-last-revision__button\"\n\t\t\t\t\ttext={ revisionsCount }\n\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\tsize=\"compact\"\n\t\t\t\t/>\n\t\t\t</PostPanelRow>\n\t\t</PostLastRevisionCheck>\n\t);\n}\n\nexport default PostLastRevision;\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AA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ACvB,kBAA0B;AAC1B,mBAAuB;AACvB,iBAA6B;AAK7B,mBAAkC;AAClC,4BAAyB;AACzB,mBAAqC;AAuBlC;AArBH,SAAS,0BAA0B;AAClC,aAAO,uBAAW,CAAE,WAAY;AAC/B,UAAM,EAAE,8BAA8B,6BAA6B,IAClE,OAAQ,aAAAA,KAAY;AACrB,WAAO;AAAA,MACN,gBAAgB,6BAA6B;AAAA,MAC7C,gBAAgB,6BAA6B;AAAA,IAC9C;AAAA,EACD,GAAG,CAAC,CAAE;AACP;AAOA,SAAS,mBAAmB;AAC3B,QAAM,EAAE,gBAAgB,eAAe,IAAI,wBAAwB;AAEnE,SACC,4CAAC,aAAAC,SAAA,EACA;AAAA,IAAC;AAAA;AAAA,MACA,uBAAqB;AAAA,MACrB,UAAO,yBAAc,gBAAgB;AAAA,QACpC,UAAU;AAAA,MACX,CAAE;AAAA,MACF,WAAU;AAAA,MACV,MAAO;AAAA,MACP,cAAa;AAAA,MACb,UAAO;AAAA;AAAA,YAEN,gBAAI,gBAAiB;AAAA,QACrB;AAAA,MACD;AAAA;AAAA,EACD,GACD;AAEF;AAEO,SAAS,0BAA0B;AACzC,QAAM,EAAE,gBAAgB,eAAe,IAAI,wBAAwB;AACnE,SACC,4CAAC,aAAAA,SAAA,EACA,sDAAC,sBAAAC,SAAA,EAAa,WAAQ,gBAAI,WAAY,GACrC;AAAA,IAAC;AAAA;AAAA,MACA,UAAO,yBAAc,gBAAgB;AAAA,QACpC,UAAU;AAAA,MACX,CAAE;AAAA,MACF,WAAU;AAAA,MACV,MAAO;AAAA,MACP,SAAQ;AAAA,MACR,MAAK;AAAA;AAAA,EACN,GACD,GACD;AAEF;AAEA,IAAO,6BAAQ;",
6
6
  "names": ["editorStore", "PostLastRevisionCheck", "PostPanelRow"]
7
7
  }
@@ -26,15 +26,17 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // packages/editor/src/components/post-last-revision/panel.js
29
31
  var panel_exports = {};
30
32
  __export(panel_exports, {
31
33
  default: () => panel_default
32
34
  });
33
35
  module.exports = __toCommonJS(panel_exports);
34
- var import_jsx_runtime = require("react/jsx-runtime");
35
36
  var import_components = require("@wordpress/components");
36
37
  var import__ = __toESM(require("./"));
37
38
  var import_check = __toESM(require("./check"));
39
+ var import_jsx_runtime = require("react/jsx-runtime");
38
40
  function PostLastRevisionPanel() {
39
41
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_check.default, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components.PanelBody, { className: "editor-post-last-revision__panel", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default, {}) }) });
40
42
  }
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/post-last-revision/panel.js"],
4
4
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { PanelBody } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport PostLastRevision from './';\nimport PostLastRevisionCheck from './check';\n\n/**\n * Renders the panel for displaying the last revision of a post.\n *\n * @return {React.ReactNode} The rendered component.\n */\nfunction PostLastRevisionPanel() {\n\treturn (\n\t\t<PostLastRevisionCheck>\n\t\t\t<PanelBody className=\"editor-post-last-revision__panel\">\n\t\t\t\t<PostLastRevision />\n\t\t\t</PanelBody>\n\t\t</PostLastRevisionCheck>\n\t);\n}\n\nexport default PostLastRevisionPanel;\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBI;AAjBJ,wBAA0B;AAK1B,eAA6B;AAC7B,mBAAkC;AAOlC,SAAS,wBAAwB;AAChC,SACC,4CAAC,aAAAA,SAAA,EACA,sDAAC,+BAAU,WAAU,oCACpB,sDAAC,SAAAC,SAAA,EAAiB,GACnB,GACD;AAEF;AAEA,IAAO,gBAAQ;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,wBAA0B;AAK1B,eAA6B;AAC7B,mBAAkC;AAW9B;AAJJ,SAAS,wBAAwB;AAChC,SACC,4CAAC,aAAAA,SAAA,EACA,sDAAC,+BAAU,WAAU,oCACpB,sDAAC,SAAAC,SAAA,EAAiB,GACnB,GACD;AAEF;AAEA,IAAO,gBAAQ;",
6
6
  "names": ["PostLastRevisionCheck", "PostLastRevision"]
7
7
  }