@wordpress/editor 14.34.0 → 14.35.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 (1189) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/README.md +1 -1
  3. package/build/bindings/api.js +2 -0
  4. package/build/bindings/api.js.map +1 -1
  5. package/build/bindings/pattern-overrides.js +3 -1
  6. package/build/bindings/pattern-overrides.js.map +1 -1
  7. package/build/bindings/post-data.js +50 -64
  8. package/build/bindings/post-data.js.map +3 -3
  9. package/build/bindings/post-meta.js +47 -39
  10. package/build/bindings/post-meta.js.map +2 -2
  11. package/build/bindings/term-data.js +3 -1
  12. package/build/bindings/term-data.js.map +1 -1
  13. package/build/components/autocompleters/index.js +2 -0
  14. package/build/components/autocompleters/index.js.map +1 -1
  15. package/build/components/autocompleters/user.js +3 -1
  16. package/build/components/autocompleters/user.js.map +1 -1
  17. package/build/components/autosave-monitor/index.js +4 -2
  18. package/build/components/autosave-monitor/index.js.map +1 -1
  19. package/build/components/block-removal-warnings/index.js +6 -4
  20. package/build/components/block-removal-warnings/index.js.map +1 -1
  21. package/build/components/block-settings-menu/plugin-block-settings-menu-item.js +6 -4
  22. package/build/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -1
  23. package/build/components/block-visibility/index.js +5 -3
  24. package/build/components/block-visibility/index.js.map +1 -1
  25. package/build/components/blog-title/index.js +4 -2
  26. package/build/components/blog-title/index.js.map +1 -1
  27. package/build/components/character-count/index.js +2 -0
  28. package/build/components/character-count/index.js.map +1 -1
  29. package/build/components/collab-sidebar/add-comment.js +21 -17
  30. package/build/components/collab-sidebar/add-comment.js.map +2 -2
  31. package/build/components/collab-sidebar/comment-author-info.js +4 -2
  32. package/build/components/collab-sidebar/comment-author-info.js.map +2 -2
  33. package/build/components/collab-sidebar/comment-form.js +17 -6
  34. package/build/components/collab-sidebar/comment-form.js.map +2 -2
  35. package/build/components/collab-sidebar/comment-indicator-toolbar.js +14 -26
  36. package/build/components/collab-sidebar/comment-indicator-toolbar.js.map +3 -3
  37. package/build/components/collab-sidebar/comment-menu-item.js +40 -8
  38. package/build/components/collab-sidebar/comment-menu-item.js.map +3 -3
  39. package/build/components/collab-sidebar/comments.js +386 -325
  40. package/build/components/collab-sidebar/comments.js.map +3 -3
  41. package/build/components/collab-sidebar/constants.js +5 -3
  42. package/build/components/collab-sidebar/constants.js.map +1 -1
  43. package/build/components/collab-sidebar/hooks.js +8 -4
  44. package/build/components/collab-sidebar/hooks.js.map +2 -2
  45. package/build/components/collab-sidebar/index.js +53 -27
  46. package/build/components/collab-sidebar/index.js.map +3 -3
  47. package/build/components/collab-sidebar/utils.js +4 -2
  48. package/build/components/collab-sidebar/utils.js.map +2 -2
  49. package/build/components/collapsible-block-toolbar/index.js +4 -2
  50. package/build/components/collapsible-block-toolbar/index.js.map +1 -1
  51. package/build/components/commands/index.js +22 -8
  52. package/build/components/commands/index.js.map +2 -2
  53. package/build/components/deprecated.js +55 -53
  54. package/build/components/deprecated.js.map +1 -1
  55. package/build/components/document-bar/index.js +4 -2
  56. package/build/components/document-bar/index.js.map +1 -1
  57. package/build/components/document-outline/check.js +2 -0
  58. package/build/components/document-outline/check.js.map +1 -1
  59. package/build/components/document-outline/index.js +9 -7
  60. package/build/components/document-outline/index.js.map +1 -1
  61. package/build/components/document-outline/item.js +4 -2
  62. package/build/components/document-outline/item.js.map +1 -1
  63. package/build/components/document-tools/index.js +3 -1
  64. package/build/components/document-tools/index.js.map +1 -1
  65. package/build/components/editor/index.js +14 -4
  66. package/build/components/editor/index.js.map +3 -3
  67. package/build/components/editor-history/redo.js +3 -1
  68. package/build/components/editor-history/redo.js.map +1 -1
  69. package/build/components/editor-history/undo.js +3 -1
  70. package/build/components/editor-history/undo.js.map +1 -1
  71. package/build/components/editor-interface/index.js +4 -2
  72. package/build/components/editor-interface/index.js.map +1 -1
  73. package/build/components/editor-notices/index.js +3 -1
  74. package/build/components/editor-notices/index.js.map +1 -1
  75. package/build/components/editor-snackbars/index.js +4 -2
  76. package/build/components/editor-snackbars/index.js.map +1 -1
  77. package/build/components/entities-saved-states/entity-record-item.js +3 -1
  78. package/build/components/entities-saved-states/entity-record-item.js.map +1 -1
  79. package/build/components/entities-saved-states/entity-type-list.js +3 -1
  80. package/build/components/entities-saved-states/entity-type-list.js.map +1 -1
  81. package/build/components/entities-saved-states/hooks/use-is-dirty.js +3 -1
  82. package/build/components/entities-saved-states/hooks/use-is-dirty.js.map +1 -1
  83. package/build/components/entities-saved-states/index.js +3 -1
  84. package/build/components/entities-saved-states/index.js.map +2 -2
  85. package/build/components/error-boundary/index.js +5 -3
  86. package/build/components/error-boundary/index.js.map +1 -1
  87. package/build/components/global-keyboard-shortcuts/index.js +2 -0
  88. package/build/components/global-keyboard-shortcuts/index.js.map +1 -1
  89. package/build/components/global-keyboard-shortcuts/register-shortcuts.js +3 -1
  90. package/build/components/global-keyboard-shortcuts/register-shortcuts.js.map +1 -1
  91. package/build/components/global-styles/block-link.js +2 -0
  92. package/build/components/global-styles/block-link.js.map +1 -1
  93. package/build/components/global-styles/header.js +3 -1
  94. package/build/components/global-styles/header.js.map +1 -1
  95. package/build/components/global-styles/hooks.js +3 -1
  96. package/build/components/global-styles/hooks.js.map +2 -2
  97. package/build/components/global-styles/index.js +3 -1
  98. package/build/components/global-styles/index.js.map +1 -1
  99. package/build/components/global-styles/menu.js +3 -1
  100. package/build/components/global-styles/menu.js.map +1 -1
  101. package/build/components/global-styles-provider/index.js +3 -1
  102. package/build/components/global-styles-provider/index.js.map +1 -1
  103. package/build/components/global-styles-renderer/index.js +2 -0
  104. package/build/components/global-styles-renderer/index.js.map +1 -1
  105. package/build/components/global-styles-sidebar/default-sidebar.js +3 -1
  106. package/build/components/global-styles-sidebar/default-sidebar.js.map +1 -1
  107. package/build/components/global-styles-sidebar/index.js +3 -1
  108. package/build/components/global-styles-sidebar/index.js.map +1 -1
  109. package/build/components/global-styles-sidebar/welcome-guide-image.js +2 -0
  110. package/build/components/global-styles-sidebar/welcome-guide-image.js.map +1 -1
  111. package/build/components/global-styles-sidebar/welcome-guide.js +3 -1
  112. package/build/components/global-styles-sidebar/welcome-guide.js.map +1 -1
  113. package/build/components/header/back-button.js +8 -6
  114. package/build/components/header/back-button.js.map +1 -1
  115. package/build/components/header/index.js +5 -3
  116. package/build/components/header/index.js.map +1 -1
  117. package/build/components/index.js +4 -2
  118. package/build/components/index.js.map +2 -2
  119. package/build/components/inserter-sidebar/index.js +4 -2
  120. package/build/components/inserter-sidebar/index.js.map +1 -1
  121. package/build/components/keyboard-shortcut-help-modal/config.js +3 -1
  122. package/build/components/keyboard-shortcut-help-modal/config.js.map +1 -1
  123. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +3 -1
  124. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
  125. package/build/components/keyboard-shortcut-help-modal/index.js +7 -5
  126. package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  127. package/build/components/keyboard-shortcut-help-modal/shortcut.js +3 -1
  128. package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
  129. package/build/components/list-view-sidebar/index.js +4 -2
  130. package/build/components/list-view-sidebar/index.js.map +1 -1
  131. package/build/components/list-view-sidebar/list-view-outline.js +3 -1
  132. package/build/components/list-view-sidebar/list-view-outline.js.map +1 -1
  133. package/build/components/local-autosave-monitor/index.js +6 -4
  134. package/build/components/local-autosave-monitor/index.js.map +1 -1
  135. package/build/components/media-categories/index.js +8 -6
  136. package/build/components/media-categories/index.js.map +1 -1
  137. package/build/components/mode-switcher/index.js +4 -2
  138. package/build/components/mode-switcher/index.js.map +1 -1
  139. package/build/components/more-menu/copy-content-menu-item.js +3 -1
  140. package/build/components/more-menu/copy-content-menu-item.js.map +1 -1
  141. package/build/components/more-menu/index.js +4 -2
  142. package/build/components/more-menu/index.js.map +2 -2
  143. package/build/components/more-menu/tools-more-menu-group.js +4 -2
  144. package/build/components/more-menu/tools-more-menu-group.js.map +1 -1
  145. package/build/components/more-menu/view-more-menu-group.js +4 -2
  146. package/build/components/more-menu/view-more-menu-group.js.map +1 -1
  147. package/build/components/page-attributes/check.js +2 -0
  148. package/build/components/page-attributes/check.js.map +1 -1
  149. package/build/components/page-attributes/order.js +3 -1
  150. package/build/components/page-attributes/order.js.map +1 -1
  151. package/build/components/page-attributes/panel.js +4 -2
  152. package/build/components/page-attributes/panel.js.map +1 -1
  153. package/build/components/page-attributes/parent.js +4 -2
  154. package/build/components/page-attributes/parent.js.map +1 -1
  155. package/build/components/pattern-duplicate-modal/index.js +5 -3
  156. package/build/components/pattern-duplicate-modal/index.js.map +1 -1
  157. package/build/components/pattern-overrides-panel/index.js +4 -2
  158. package/build/components/pattern-overrides-panel/index.js.map +1 -1
  159. package/build/components/pattern-rename-modal/index.js +5 -3
  160. package/build/components/pattern-rename-modal/index.js.map +1 -1
  161. package/build/components/plugin-document-setting-panel/index.js +5 -3
  162. package/build/components/plugin-document-setting-panel/index.js.map +1 -1
  163. package/build/components/plugin-more-menu-item/index.js +3 -1
  164. package/build/components/plugin-more-menu-item/index.js.map +1 -1
  165. package/build/components/plugin-post-publish-panel/index.js +5 -3
  166. package/build/components/plugin-post-publish-panel/index.js.map +1 -1
  167. package/build/components/plugin-post-status-info/index.js +5 -3
  168. package/build/components/plugin-post-status-info/index.js.map +1 -1
  169. package/build/components/plugin-pre-publish-panel/index.js +5 -3
  170. package/build/components/plugin-pre-publish-panel/index.js.map +1 -1
  171. package/build/components/plugin-preview-menu-item/index.js +3 -1
  172. package/build/components/plugin-preview-menu-item/index.js.map +1 -1
  173. package/build/components/plugin-sidebar/index.js +3 -1
  174. package/build/components/plugin-sidebar/index.js.map +1 -1
  175. package/build/components/plugin-sidebar-more-menu-item/index.js +3 -1
  176. package/build/components/plugin-sidebar-more-menu-item/index.js.map +1 -1
  177. package/build/components/post-actions/actions.js +3 -1
  178. package/build/components/post-actions/actions.js.map +1 -1
  179. package/build/components/post-actions/index.js +4 -2
  180. package/build/components/post-actions/index.js.map +1 -1
  181. package/build/components/post-actions/set-as-homepage.js +5 -3
  182. package/build/components/post-actions/set-as-homepage.js.map +1 -1
  183. package/build/components/post-actions/set-as-posts-page.js +5 -3
  184. package/build/components/post-actions/set-as-posts-page.js.map +1 -1
  185. package/build/components/post-author/check.js +3 -1
  186. package/build/components/post-author/check.js.map +1 -1
  187. package/build/components/post-author/combobox.js +3 -1
  188. package/build/components/post-author/combobox.js.map +1 -1
  189. package/build/components/post-author/constants.js +4 -2
  190. package/build/components/post-author/constants.js.map +1 -1
  191. package/build/components/post-author/hook.js +2 -0
  192. package/build/components/post-author/hook.js.map +1 -1
  193. package/build/components/post-author/index.js +4 -2
  194. package/build/components/post-author/index.js.map +1 -1
  195. package/build/components/post-author/panel.js +3 -1
  196. package/build/components/post-author/panel.js.map +1 -1
  197. package/build/components/post-author/select.js +3 -1
  198. package/build/components/post-author/select.js.map +1 -1
  199. package/build/components/post-card-panel/index.js +4 -2
  200. package/build/components/post-card-panel/index.js.map +1 -1
  201. package/build/components/post-comments/index.js +4 -2
  202. package/build/components/post-comments/index.js.map +1 -1
  203. package/build/components/post-content-information/index.js +4 -2
  204. package/build/components/post-content-information/index.js.map +1 -1
  205. package/build/components/post-discussion/panel.js +4 -2
  206. package/build/components/post-discussion/panel.js.map +1 -1
  207. package/build/components/post-excerpt/check.js +3 -1
  208. package/build/components/post-excerpt/check.js.map +1 -1
  209. package/build/components/post-excerpt/index.js +3 -1
  210. package/build/components/post-excerpt/index.js.map +1 -1
  211. package/build/components/post-excerpt/panel.js +4 -2
  212. package/build/components/post-excerpt/panel.js.map +1 -1
  213. package/build/components/post-excerpt/plugin.js +5 -3
  214. package/build/components/post-excerpt/plugin.js.map +1 -1
  215. package/build/components/post-featured-image/check.js +3 -1
  216. package/build/components/post-featured-image/check.js.map +1 -1
  217. package/build/components/post-featured-image/index.js +10 -8
  218. package/build/components/post-featured-image/index.js.map +1 -1
  219. package/build/components/post-featured-image/panel.js +4 -2
  220. package/build/components/post-featured-image/panel.js.map +1 -1
  221. package/build/components/post-fields/index.js +2 -0
  222. package/build/components/post-fields/index.js.map +1 -1
  223. package/build/components/post-format/check.js +3 -1
  224. package/build/components/post-format/check.js.map +1 -1
  225. package/build/components/post-format/index.js +4 -2
  226. package/build/components/post-format/index.js.map +1 -1
  227. package/build/components/post-format/panel.js +3 -1
  228. package/build/components/post-format/panel.js.map +1 -1
  229. package/build/components/post-last-edited-panel/index.js +3 -1
  230. package/build/components/post-last-edited-panel/index.js.map +1 -1
  231. package/build/components/post-last-revision/check.js +3 -1
  232. package/build/components/post-last-revision/check.js.map +1 -1
  233. package/build/components/post-last-revision/index.js +3 -1
  234. package/build/components/post-last-revision/index.js.map +1 -1
  235. package/build/components/post-last-revision/panel.js +3 -1
  236. package/build/components/post-last-revision/panel.js.map +1 -1
  237. package/build/components/post-locked-modal/index.js +3 -1
  238. package/build/components/post-locked-modal/index.js.map +1 -1
  239. package/build/components/post-panel-row/index.js +4 -2
  240. package/build/components/post-panel-row/index.js.map +1 -1
  241. package/build/components/post-panel-section/index.js +3 -1
  242. package/build/components/post-panel-section/index.js.map +1 -1
  243. package/build/components/post-pending-status/check.js +2 -0
  244. package/build/components/post-pending-status/check.js.map +1 -1
  245. package/build/components/post-pending-status/index.js +3 -1
  246. package/build/components/post-pending-status/index.js.map +1 -1
  247. package/build/components/post-pingbacks/index.js +3 -1
  248. package/build/components/post-pingbacks/index.js.map +1 -1
  249. package/build/components/post-preview-button/index.js +3 -1
  250. package/build/components/post-preview-button/index.js.map +1 -1
  251. package/build/components/post-publish-button/index.js +6 -4
  252. package/build/components/post-publish-button/index.js.map +1 -1
  253. package/build/components/post-publish-button/label.js +2 -0
  254. package/build/components/post-publish-button/label.js.map +1 -1
  255. package/build/components/post-publish-button/post-publish-button-or-toggle.js +5 -3
  256. package/build/components/post-publish-button/post-publish-button-or-toggle.js.map +1 -1
  257. package/build/components/post-publish-panel/index.js +5 -3
  258. package/build/components/post-publish-panel/index.js.map +1 -1
  259. package/build/components/post-publish-panel/maybe-category-panel.js +3 -1
  260. package/build/components/post-publish-panel/maybe-category-panel.js.map +1 -1
  261. package/build/components/post-publish-panel/maybe-post-format-panel.js +5 -3
  262. package/build/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
  263. package/build/components/post-publish-panel/maybe-tags-panel.js +5 -3
  264. package/build/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
  265. package/build/components/post-publish-panel/maybe-upload-media.js +3 -1
  266. package/build/components/post-publish-panel/maybe-upload-media.js.map +1 -1
  267. package/build/components/post-publish-panel/media-util.js +2 -0
  268. package/build/components/post-publish-panel/media-util.js.map +1 -1
  269. package/build/components/post-publish-panel/postpublish.js +6 -4
  270. package/build/components/post-publish-panel/postpublish.js.map +1 -1
  271. package/build/components/post-publish-panel/prepublish.js +3 -1
  272. package/build/components/post-publish-panel/prepublish.js.map +1 -1
  273. package/build/components/post-saved-state/index.js +3 -1
  274. package/build/components/post-saved-state/index.js.map +1 -1
  275. package/build/components/post-schedule/check.js +2 -0
  276. package/build/components/post-schedule/check.js.map +1 -1
  277. package/build/components/post-schedule/index.js +4 -2
  278. package/build/components/post-schedule/index.js.map +1 -1
  279. package/build/components/post-schedule/label.js +2 -0
  280. package/build/components/post-schedule/label.js.map +1 -1
  281. package/build/components/post-schedule/panel.js +4 -2
  282. package/build/components/post-schedule/panel.js.map +1 -1
  283. package/build/components/post-status/index.js +6 -4
  284. package/build/components/post-status/index.js.map +1 -1
  285. package/build/components/post-sticky/check.js +2 -0
  286. package/build/components/post-sticky/check.js.map +1 -1
  287. package/build/components/post-sticky/index.js +3 -1
  288. package/build/components/post-sticky/index.js.map +1 -1
  289. package/build/components/post-sticky/panel.js +3 -1
  290. package/build/components/post-sticky/panel.js.map +1 -1
  291. package/build/components/post-switch-to-draft-button/index.js +3 -1
  292. package/build/components/post-switch-to-draft-button/index.js.map +1 -1
  293. package/build/components/post-sync-status/index.js +3 -1
  294. package/build/components/post-sync-status/index.js.map +1 -1
  295. package/build/components/post-taxonomies/check.js +2 -0
  296. package/build/components/post-taxonomies/check.js.map +1 -1
  297. package/build/components/post-taxonomies/flat-term-selector.js +9 -7
  298. package/build/components/post-taxonomies/flat-term-selector.js.map +1 -1
  299. package/build/components/post-taxonomies/hierarchical-term-selector.js +8 -6
  300. package/build/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
  301. package/build/components/post-taxonomies/index.js +4 -2
  302. package/build/components/post-taxonomies/index.js.map +1 -1
  303. package/build/components/post-taxonomies/most-used-terms.js +5 -3
  304. package/build/components/post-taxonomies/most-used-terms.js.map +1 -1
  305. package/build/components/post-taxonomies/panel.js +3 -1
  306. package/build/components/post-taxonomies/panel.js.map +1 -1
  307. package/build/components/post-template/block-theme.js +3 -1
  308. package/build/components/post-template/block-theme.js.map +1 -1
  309. package/build/components/post-template/classic-theme.js +3 -1
  310. package/build/components/post-template/classic-theme.js.map +1 -1
  311. package/build/components/post-template/create-new-template-modal.js +4 -2
  312. package/build/components/post-template/create-new-template-modal.js.map +1 -1
  313. package/build/components/post-template/create-new-template.js +3 -1
  314. package/build/components/post-template/create-new-template.js.map +1 -1
  315. package/build/components/post-template/hooks.js +2 -0
  316. package/build/components/post-template/hooks.js.map +1 -1
  317. package/build/components/post-template/panel.js +12 -7
  318. package/build/components/post-template/panel.js.map +2 -2
  319. package/build/components/post-template/reset-default-template.js +3 -1
  320. package/build/components/post-template/reset-default-template.js.map +1 -1
  321. package/build/components/post-template/swap-template-button.js +3 -1
  322. package/build/components/post-template/swap-template-button.js.map +1 -1
  323. package/build/components/post-text-editor/index.js +3 -1
  324. package/build/components/post-text-editor/index.js.map +1 -1
  325. package/build/components/post-title/constants.js +4 -2
  326. package/build/components/post-title/constants.js.map +1 -1
  327. package/build/components/post-title/index.js +25 -14
  328. package/build/components/post-title/index.js.map +2 -2
  329. package/build/components/post-title/post-title-raw.js +3 -1
  330. package/build/components/post-title/post-title-raw.js.map +1 -1
  331. package/build/components/post-title/use-post-title-focus.js +2 -0
  332. package/build/components/post-title/use-post-title-focus.js.map +1 -1
  333. package/build/components/post-title/use-post-title.js +2 -0
  334. package/build/components/post-title/use-post-title.js.map +1 -1
  335. package/build/components/post-transform-panel/hooks.js +3 -1
  336. package/build/components/post-transform-panel/hooks.js.map +1 -1
  337. package/build/components/post-transform-panel/index.js +3 -1
  338. package/build/components/post-transform-panel/index.js.map +1 -1
  339. package/build/components/post-trash/check.js +2 -0
  340. package/build/components/post-trash/check.js.map +1 -1
  341. package/build/components/post-trash/index.js +3 -1
  342. package/build/components/post-trash/index.js.map +1 -1
  343. package/build/components/post-type-support-check/index.js +2 -0
  344. package/build/components/post-type-support-check/index.js.map +1 -1
  345. package/build/components/post-url/check.js +2 -0
  346. package/build/components/post-url/check.js.map +1 -1
  347. package/build/components/post-url/index.js +3 -1
  348. package/build/components/post-url/index.js.map +1 -1
  349. package/build/components/post-url/label.js +2 -0
  350. package/build/components/post-url/label.js.map +1 -1
  351. package/build/components/post-url/panel.js +3 -1
  352. package/build/components/post-url/panel.js.map +1 -1
  353. package/build/components/post-view-link/index.js +3 -1
  354. package/build/components/post-view-link/index.js.map +1 -1
  355. package/build/components/post-visibility/check.js +2 -0
  356. package/build/components/post-visibility/check.js.map +1 -1
  357. package/build/components/post-visibility/index.js +3 -1
  358. package/build/components/post-visibility/index.js.map +1 -1
  359. package/build/components/post-visibility/label.js +2 -0
  360. package/build/components/post-visibility/label.js.map +1 -1
  361. package/build/components/post-visibility/utils.js +3 -1
  362. package/build/components/post-visibility/utils.js.map +1 -1
  363. package/build/components/posts-per-page/index.js +3 -1
  364. package/build/components/posts-per-page/index.js.map +1 -1
  365. package/build/components/preferences-modal/enable-panel.js +4 -2
  366. package/build/components/preferences-modal/enable-panel.js.map +1 -1
  367. package/build/components/preferences-modal/enable-plugin-document-setting-panel.js +5 -3
  368. package/build/components/preferences-modal/enable-plugin-document-setting-panel.js.map +1 -1
  369. package/build/components/preferences-modal/enable-publish-sidebar.js +4 -2
  370. package/build/components/preferences-modal/enable-publish-sidebar.js.map +1 -1
  371. package/build/components/preferences-modal/index.js +5 -3
  372. package/build/components/preferences-modal/index.js.map +2 -2
  373. package/build/components/preview-dropdown/index.js +3 -1
  374. package/build/components/preview-dropdown/index.js.map +1 -1
  375. package/build/components/provider/disable-non-page-content-blocks.js +2 -0
  376. package/build/components/provider/disable-non-page-content-blocks.js.map +1 -1
  377. package/build/components/provider/index.js +8 -6
  378. package/build/components/provider/index.js.map +1 -1
  379. package/build/components/provider/navigation-block-editing-mode.js +2 -0
  380. package/build/components/provider/navigation-block-editing-mode.js.map +1 -1
  381. package/build/components/provider/use-auto-switch-editor-sidebars.js +2 -0
  382. package/build/components/provider/use-auto-switch-editor-sidebars.js.map +1 -1
  383. package/build/components/provider/use-block-editor-settings.js +5 -3
  384. package/build/components/provider/use-block-editor-settings.js.map +1 -1
  385. package/build/components/provider/use-hide-blocks-from-inserter.js +3 -1
  386. package/build/components/provider/use-hide-blocks-from-inserter.js.map +1 -1
  387. package/build/components/provider/use-post-content-blocks.js +3 -1
  388. package/build/components/provider/use-post-content-blocks.js.map +1 -1
  389. package/build/components/provider/with-registry-provider.js +4 -2
  390. package/build/components/provider/with-registry-provider.js.map +1 -1
  391. package/build/components/resizable-editor/index.js +4 -2
  392. package/build/components/resizable-editor/index.js.map +1 -1
  393. package/build/components/resizable-editor/resize-handle.js +4 -2
  394. package/build/components/resizable-editor/resize-handle.js.map +1 -1
  395. package/build/components/save-publish-panels/index.js +5 -3
  396. package/build/components/save-publish-panels/index.js.map +1 -1
  397. package/build/components/sidebar/constants.js +3 -1
  398. package/build/components/sidebar/constants.js.map +1 -1
  399. package/build/components/sidebar/header.js +5 -3
  400. package/build/components/sidebar/header.js.map +1 -1
  401. package/build/components/sidebar/index.js +7 -5
  402. package/build/components/sidebar/index.js.map +1 -1
  403. package/build/components/sidebar/post-summary.js +4 -2
  404. package/build/components/sidebar/post-summary.js.map +1 -1
  405. package/build/components/site-discussion/index.js +4 -2
  406. package/build/components/site-discussion/index.js.map +1 -1
  407. package/build/components/start-page-options/index.js +7 -6
  408. package/build/components/start-page-options/index.js.map +2 -2
  409. package/build/components/start-template-options/index.js +3 -1
  410. package/build/components/start-template-options/index.js.map +1 -1
  411. package/build/components/style-book/categories.js +2 -0
  412. package/build/components/style-book/categories.js.map +1 -1
  413. package/build/components/style-book/color-examples.js +4 -2
  414. package/build/components/style-book/color-examples.js.map +1 -1
  415. package/build/components/style-book/constants.js +9 -7
  416. package/build/components/style-book/constants.js.map +1 -1
  417. package/build/components/style-book/duotone-examples.js +4 -2
  418. package/build/components/style-book/duotone-examples.js.map +1 -1
  419. package/build/components/style-book/examples.js +3 -1
  420. package/build/components/style-book/examples.js.map +1 -1
  421. package/build/components/style-book/index.js +13 -11
  422. package/build/components/style-book/index.js.map +1 -1
  423. package/build/components/style-book/types.js +2 -0
  424. package/build/components/style-book/types.js.map +1 -1
  425. package/build/components/styles-canvas/index.js +3 -1
  426. package/build/components/styles-canvas/index.js.map +1 -1
  427. package/build/components/styles-canvas/revisions.js +4 -2
  428. package/build/components/styles-canvas/revisions.js.map +1 -1
  429. package/build/components/styles-canvas/style-book.js +3 -1
  430. package/build/components/styles-canvas/style-book.js.map +1 -1
  431. package/build/components/table-of-contents/index.js +3 -1
  432. package/build/components/table-of-contents/index.js.map +1 -1
  433. package/build/components/table-of-contents/panel.js +3 -1
  434. package/build/components/table-of-contents/panel.js.map +1 -1
  435. package/build/components/template-content-panel/index.js +6 -4
  436. package/build/components/template-content-panel/index.js.map +1 -1
  437. package/build/components/template-part-content-panel/index.js +4 -2
  438. package/build/components/template-part-content-panel/index.js.map +1 -1
  439. package/build/components/template-part-menu-items/convert-to-regular.js +3 -1
  440. package/build/components/template-part-menu-items/convert-to-regular.js.map +1 -1
  441. package/build/components/template-part-menu-items/convert-to-template-part.js +3 -1
  442. package/build/components/template-part-menu-items/convert-to-template-part.js.map +1 -1
  443. package/build/components/template-part-menu-items/index.js +3 -1
  444. package/build/components/template-part-menu-items/index.js.map +1 -1
  445. package/build/components/template-validation-notice/index.js +3 -1
  446. package/build/components/template-validation-notice/index.js.map +1 -1
  447. package/build/components/text-editor/index.js +3 -1
  448. package/build/components/text-editor/index.js.map +1 -1
  449. package/build/components/theme-support-check/index.js +2 -0
  450. package/build/components/theme-support-check/index.js.map +1 -1
  451. package/build/components/time-to-read/index.js +4 -2
  452. package/build/components/time-to-read/index.js.map +1 -1
  453. package/build/components/unsaved-changes-warning/index.js +2 -0
  454. package/build/components/unsaved-changes-warning/index.js.map +1 -1
  455. package/build/components/visual-editor/edit-template-blocks-notification.js +3 -1
  456. package/build/components/visual-editor/edit-template-blocks-notification.js.map +1 -1
  457. package/build/components/visual-editor/index.js +34 -13
  458. package/build/components/visual-editor/index.js.map +2 -2
  459. package/build/components/visual-editor/use-edit-content-only-section-exit.js +65 -0
  460. package/build/components/visual-editor/use-edit-content-only-section-exit.js.map +7 -0
  461. package/build/components/visual-editor/use-padding-appender.js +75 -0
  462. package/build/components/visual-editor/use-padding-appender.js.map +7 -0
  463. package/build/components/visual-editor/use-select-nearest-editable-block.js +3 -1
  464. package/build/components/visual-editor/use-select-nearest-editable-block.js.map +1 -1
  465. package/build/components/visual-editor/use-zoom-out-mode-exit.js +2 -0
  466. package/build/components/visual-editor/use-zoom-out-mode-exit.js.map +1 -1
  467. package/build/components/word-count/index.js +3 -1
  468. package/build/components/word-count/index.js.map +1 -1
  469. package/build/components/zoom-out-toggle/index.js +4 -2
  470. package/build/components/zoom-out-toggle/index.js.map +1 -1
  471. package/build/dataviews/api.js +2 -0
  472. package/build/dataviews/api.js.map +1 -1
  473. package/build/dataviews/fields/content-preview/content-preview-view.js +5 -3
  474. package/build/dataviews/fields/content-preview/content-preview-view.js.map +3 -3
  475. package/build/dataviews/fields/content-preview/index.js +3 -1
  476. package/build/dataviews/fields/content-preview/index.js.map +1 -1
  477. package/build/dataviews/store/private-actions.js +3 -1
  478. package/build/dataviews/store/private-actions.js.map +1 -1
  479. package/build/dataviews/store/private-selectors.js +3 -1
  480. package/build/dataviews/store/private-selectors.js.map +1 -1
  481. package/build/dataviews/store/reducer.js +2 -0
  482. package/build/dataviews/store/reducer.js.map +1 -1
  483. package/build/hooks/custom-sources-backwards-compatibility.js +4 -2
  484. package/build/hooks/custom-sources-backwards-compatibility.js.map +1 -1
  485. package/build/hooks/default-autocompleters.js +2 -0
  486. package/build/hooks/default-autocompleters.js.map +1 -1
  487. package/build/hooks/index.js +2 -0
  488. package/build/hooks/index.js.map +1 -1
  489. package/build/hooks/media-upload.js +3 -1
  490. package/build/hooks/media-upload.js.map +1 -1
  491. package/build/hooks/navigation-link-view-button.js +5 -3
  492. package/build/hooks/navigation-link-view-button.js.map +1 -1
  493. package/build/hooks/pattern-overrides.js +6 -6
  494. package/build/hooks/pattern-overrides.js.map +2 -2
  495. package/build/hooks/push-changes-to-global-styles/index.js +12 -10
  496. package/build/hooks/push-changes-to-global-styles/index.js.map +1 -1
  497. package/build/hooks/template-part-navigation-edit-button.js +7 -5
  498. package/build/hooks/template-part-navigation-edit-button.js.map +1 -1
  499. package/build/hooks/use-global-styles-output.js +2 -0
  500. package/build/hooks/use-global-styles-output.js.map +1 -1
  501. package/build/index.js +2 -0
  502. package/build/index.js.map +1 -1
  503. package/build/lock-unlock.js +3 -1
  504. package/build/lock-unlock.js.map +1 -1
  505. package/build/private-apis.js +4 -2
  506. package/build/private-apis.js.map +1 -1
  507. package/build/store/actions.js +54 -52
  508. package/build/store/actions.js.map +2 -2
  509. package/build/store/constants.js +15 -13
  510. package/build/store/constants.js.map +1 -1
  511. package/build/store/defaults.js +3 -1
  512. package/build/store/defaults.js.map +1 -1
  513. package/build/store/index.js +4 -2
  514. package/build/store/index.js.map +1 -1
  515. package/build/store/local-autosave.js +2 -0
  516. package/build/store/local-autosave.js.map +1 -1
  517. package/build/store/private-actions.js +17 -7
  518. package/build/store/private-actions.js.map +2 -2
  519. package/build/store/private-selectors.js +15 -8
  520. package/build/store/private-selectors.js.map +2 -2
  521. package/build/store/reducer.js +12 -0
  522. package/build/store/reducer.js.map +2 -2
  523. package/build/store/selectors.js +80 -78
  524. package/build/store/selectors.js.map +2 -2
  525. package/build/store/utils/is-template-revertable.js +2 -0
  526. package/build/store/utils/is-template-revertable.js.map +1 -1
  527. package/build/store/utils/notice-builder.js +2 -0
  528. package/build/store/utils/notice-builder.js.map +1 -1
  529. package/build/utils/get-item-title.js +2 -0
  530. package/build/utils/get-item-title.js.map +1 -1
  531. package/build/utils/get-template-info.js +4 -2
  532. package/build/utils/get-template-info.js.map +1 -1
  533. package/build/utils/get-template-part-icon.js +2 -0
  534. package/build/utils/get-template-part-icon.js.map +1 -1
  535. package/build/utils/index.js +2 -0
  536. package/build/utils/index.js.map +1 -1
  537. package/build/utils/media-sideload/index.js +3 -1
  538. package/build/utils/media-sideload/index.js.map +1 -1
  539. package/build/utils/media-upload/index.js +3 -1
  540. package/build/utils/media-upload/index.js.map +1 -1
  541. package/build/utils/pageTypeBadge.js +2 -0
  542. package/build/utils/pageTypeBadge.js.map +1 -1
  543. package/build/utils/search-templates.js +2 -0
  544. package/build/utils/search-templates.js.map +1 -1
  545. package/build/utils/set-nested-value.js +2 -0
  546. package/build/utils/set-nested-value.js.map +1 -1
  547. package/build/utils/terms.js +5 -3
  548. package/build/utils/terms.js.map +1 -1
  549. package/build/utils/url.js +2 -0
  550. package/build/utils/url.js.map +1 -1
  551. package/build-module/bindings/api.js +1 -0
  552. package/build-module/bindings/api.js.map +1 -1
  553. package/build-module/bindings/pattern-overrides.js +2 -1
  554. package/build-module/bindings/pattern-overrides.js.map +1 -1
  555. package/build-module/bindings/post-data.js +49 -64
  556. package/build-module/bindings/post-data.js.map +2 -2
  557. package/build-module/bindings/post-meta.js +46 -39
  558. package/build-module/bindings/post-meta.js.map +2 -2
  559. package/build-module/bindings/term-data.js +2 -1
  560. package/build-module/bindings/term-data.js.map +1 -1
  561. package/build-module/components/autocompleters/index.js +1 -0
  562. package/build-module/components/autocompleters/index.js.map +1 -1
  563. package/build-module/components/autocompleters/user.js +2 -1
  564. package/build-module/components/autocompleters/user.js.map +1 -1
  565. package/build-module/components/autosave-monitor/index.js +3 -2
  566. package/build-module/components/autosave-monitor/index.js.map +1 -1
  567. package/build-module/components/block-removal-warnings/index.js +5 -4
  568. package/build-module/components/block-removal-warnings/index.js.map +1 -1
  569. package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js +5 -4
  570. package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -1
  571. package/build-module/components/block-visibility/index.js +4 -3
  572. package/build-module/components/block-visibility/index.js.map +1 -1
  573. package/build-module/components/blog-title/index.js +3 -2
  574. package/build-module/components/blog-title/index.js.map +1 -1
  575. package/build-module/components/character-count/index.js +1 -0
  576. package/build-module/components/character-count/index.js.map +1 -1
  577. package/build-module/components/collab-sidebar/add-comment.js +21 -18
  578. package/build-module/components/collab-sidebar/add-comment.js.map +2 -2
  579. package/build-module/components/collab-sidebar/comment-author-info.js +3 -2
  580. package/build-module/components/collab-sidebar/comment-author-info.js.map +2 -2
  581. package/build-module/components/collab-sidebar/comment-form.js +16 -6
  582. package/build-module/components/collab-sidebar/comment-form.js.map +2 -2
  583. package/build-module/components/collab-sidebar/comment-indicator-toolbar.js +19 -28
  584. package/build-module/components/collab-sidebar/comment-indicator-toolbar.js.map +2 -2
  585. package/build-module/components/collab-sidebar/comment-menu-item.js +43 -9
  586. package/build-module/components/collab-sidebar/comment-menu-item.js.map +2 -2
  587. package/build-module/components/collab-sidebar/comments.js +387 -326
  588. package/build-module/components/collab-sidebar/comments.js.map +2 -2
  589. package/build-module/components/collab-sidebar/constants.js +4 -3
  590. package/build-module/components/collab-sidebar/constants.js.map +1 -1
  591. package/build-module/components/collab-sidebar/hooks.js +7 -4
  592. package/build-module/components/collab-sidebar/hooks.js.map +2 -2
  593. package/build-module/components/collab-sidebar/index.js +52 -27
  594. package/build-module/components/collab-sidebar/index.js.map +2 -2
  595. package/build-module/components/collab-sidebar/utils.js +3 -2
  596. package/build-module/components/collab-sidebar/utils.js.map +2 -2
  597. package/build-module/components/collapsible-block-toolbar/index.js +3 -2
  598. package/build-module/components/collapsible-block-toolbar/index.js.map +1 -1
  599. package/build-module/components/commands/index.js +21 -8
  600. package/build-module/components/commands/index.js.map +2 -2
  601. package/build-module/components/deprecated.js +54 -53
  602. package/build-module/components/deprecated.js.map +1 -1
  603. package/build-module/components/document-bar/index.js +3 -2
  604. package/build-module/components/document-bar/index.js.map +1 -1
  605. package/build-module/components/document-outline/check.js +1 -0
  606. package/build-module/components/document-outline/check.js.map +1 -1
  607. package/build-module/components/document-outline/index.js +8 -7
  608. package/build-module/components/document-outline/index.js.map +1 -1
  609. package/build-module/components/document-outline/item.js +3 -2
  610. package/build-module/components/document-outline/item.js.map +1 -1
  611. package/build-module/components/document-tools/index.js +2 -1
  612. package/build-module/components/document-tools/index.js.map +1 -1
  613. package/build-module/components/editor/index.js +13 -4
  614. package/build-module/components/editor/index.js.map +2 -2
  615. package/build-module/components/editor-history/redo.js +2 -1
  616. package/build-module/components/editor-history/redo.js.map +1 -1
  617. package/build-module/components/editor-history/undo.js +2 -1
  618. package/build-module/components/editor-history/undo.js.map +1 -1
  619. package/build-module/components/editor-interface/index.js +3 -2
  620. package/build-module/components/editor-interface/index.js.map +1 -1
  621. package/build-module/components/editor-notices/index.js +2 -1
  622. package/build-module/components/editor-notices/index.js.map +1 -1
  623. package/build-module/components/editor-snackbars/index.js +3 -2
  624. package/build-module/components/editor-snackbars/index.js.map +1 -1
  625. package/build-module/components/entities-saved-states/entity-record-item.js +2 -1
  626. package/build-module/components/entities-saved-states/entity-record-item.js.map +1 -1
  627. package/build-module/components/entities-saved-states/entity-type-list.js +2 -1
  628. package/build-module/components/entities-saved-states/entity-type-list.js.map +1 -1
  629. package/build-module/components/entities-saved-states/hooks/use-is-dirty.js +2 -1
  630. package/build-module/components/entities-saved-states/hooks/use-is-dirty.js.map +1 -1
  631. package/build-module/components/entities-saved-states/index.js +2 -1
  632. package/build-module/components/entities-saved-states/index.js.map +2 -2
  633. package/build-module/components/error-boundary/index.js +4 -3
  634. package/build-module/components/error-boundary/index.js.map +1 -1
  635. package/build-module/components/global-keyboard-shortcuts/index.js +1 -0
  636. package/build-module/components/global-keyboard-shortcuts/index.js.map +1 -1
  637. package/build-module/components/global-keyboard-shortcuts/register-shortcuts.js +2 -1
  638. package/build-module/components/global-keyboard-shortcuts/register-shortcuts.js.map +1 -1
  639. package/build-module/components/global-styles/block-link.js +1 -0
  640. package/build-module/components/global-styles/block-link.js.map +1 -1
  641. package/build-module/components/global-styles/header.js +2 -1
  642. package/build-module/components/global-styles/header.js.map +1 -1
  643. package/build-module/components/global-styles/hooks.js +2 -1
  644. package/build-module/components/global-styles/hooks.js.map +2 -2
  645. package/build-module/components/global-styles/index.js +3 -2
  646. package/build-module/components/global-styles/index.js.map +1 -1
  647. package/build-module/components/global-styles/menu.js +2 -1
  648. package/build-module/components/global-styles/menu.js.map +1 -1
  649. package/build-module/components/global-styles-provider/index.js +2 -1
  650. package/build-module/components/global-styles-provider/index.js.map +1 -1
  651. package/build-module/components/global-styles-renderer/index.js +1 -0
  652. package/build-module/components/global-styles-renderer/index.js.map +1 -1
  653. package/build-module/components/global-styles-sidebar/default-sidebar.js +2 -1
  654. package/build-module/components/global-styles-sidebar/default-sidebar.js.map +1 -1
  655. package/build-module/components/global-styles-sidebar/index.js +2 -1
  656. package/build-module/components/global-styles-sidebar/index.js.map +1 -1
  657. package/build-module/components/global-styles-sidebar/welcome-guide-image.js +1 -0
  658. package/build-module/components/global-styles-sidebar/welcome-guide-image.js.map +1 -1
  659. package/build-module/components/global-styles-sidebar/welcome-guide.js +2 -1
  660. package/build-module/components/global-styles-sidebar/welcome-guide.js.map +1 -1
  661. package/build-module/components/header/back-button.js +7 -6
  662. package/build-module/components/header/back-button.js.map +1 -1
  663. package/build-module/components/header/index.js +4 -3
  664. package/build-module/components/header/index.js.map +1 -1
  665. package/build-module/components/index.js +3 -2
  666. package/build-module/components/index.js.map +1 -1
  667. package/build-module/components/inserter-sidebar/index.js +3 -2
  668. package/build-module/components/inserter-sidebar/index.js.map +1 -1
  669. package/build-module/components/keyboard-shortcut-help-modal/config.js +2 -1
  670. package/build-module/components/keyboard-shortcut-help-modal/config.js.map +1 -1
  671. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +2 -1
  672. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
  673. package/build-module/components/keyboard-shortcut-help-modal/index.js +6 -5
  674. package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  675. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +5 -4
  676. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
  677. package/build-module/components/list-view-sidebar/index.js +3 -2
  678. package/build-module/components/list-view-sidebar/index.js.map +1 -1
  679. package/build-module/components/list-view-sidebar/list-view-outline.js +2 -1
  680. package/build-module/components/list-view-sidebar/list-view-outline.js.map +1 -1
  681. package/build-module/components/local-autosave-monitor/index.js +5 -4
  682. package/build-module/components/local-autosave-monitor/index.js.map +1 -1
  683. package/build-module/components/media-categories/index.js +7 -6
  684. package/build-module/components/media-categories/index.js.map +1 -1
  685. package/build-module/components/mode-switcher/index.js +3 -2
  686. package/build-module/components/mode-switcher/index.js.map +1 -1
  687. package/build-module/components/more-menu/copy-content-menu-item.js +2 -1
  688. package/build-module/components/more-menu/copy-content-menu-item.js.map +1 -1
  689. package/build-module/components/more-menu/index.js +3 -2
  690. package/build-module/components/more-menu/index.js.map +2 -2
  691. package/build-module/components/more-menu/tools-more-menu-group.js +3 -2
  692. package/build-module/components/more-menu/tools-more-menu-group.js.map +1 -1
  693. package/build-module/components/more-menu/view-more-menu-group.js +3 -2
  694. package/build-module/components/more-menu/view-more-menu-group.js.map +1 -1
  695. package/build-module/components/page-attributes/check.js +1 -0
  696. package/build-module/components/page-attributes/check.js.map +1 -1
  697. package/build-module/components/page-attributes/order.js +2 -1
  698. package/build-module/components/page-attributes/order.js.map +1 -1
  699. package/build-module/components/page-attributes/panel.js +3 -2
  700. package/build-module/components/page-attributes/panel.js.map +1 -1
  701. package/build-module/components/page-attributes/parent.js +3 -2
  702. package/build-module/components/page-attributes/parent.js.map +1 -1
  703. package/build-module/components/pattern-duplicate-modal/index.js +4 -3
  704. package/build-module/components/pattern-duplicate-modal/index.js.map +1 -1
  705. package/build-module/components/pattern-overrides-panel/index.js +3 -2
  706. package/build-module/components/pattern-overrides-panel/index.js.map +1 -1
  707. package/build-module/components/pattern-rename-modal/index.js +4 -3
  708. package/build-module/components/pattern-rename-modal/index.js.map +1 -1
  709. package/build-module/components/plugin-document-setting-panel/index.js +4 -3
  710. package/build-module/components/plugin-document-setting-panel/index.js.map +1 -1
  711. package/build-module/components/plugin-more-menu-item/index.js +2 -1
  712. package/build-module/components/plugin-more-menu-item/index.js.map +1 -1
  713. package/build-module/components/plugin-post-publish-panel/index.js +4 -3
  714. package/build-module/components/plugin-post-publish-panel/index.js.map +1 -1
  715. package/build-module/components/plugin-post-status-info/index.js +4 -3
  716. package/build-module/components/plugin-post-status-info/index.js.map +1 -1
  717. package/build-module/components/plugin-pre-publish-panel/index.js +4 -3
  718. package/build-module/components/plugin-pre-publish-panel/index.js.map +1 -1
  719. package/build-module/components/plugin-preview-menu-item/index.js +2 -1
  720. package/build-module/components/plugin-preview-menu-item/index.js.map +1 -1
  721. package/build-module/components/plugin-sidebar/index.js +2 -1
  722. package/build-module/components/plugin-sidebar/index.js.map +1 -1
  723. package/build-module/components/plugin-sidebar-more-menu-item/index.js +2 -1
  724. package/build-module/components/plugin-sidebar-more-menu-item/index.js.map +1 -1
  725. package/build-module/components/post-actions/actions.js +2 -1
  726. package/build-module/components/post-actions/actions.js.map +1 -1
  727. package/build-module/components/post-actions/index.js +3 -2
  728. package/build-module/components/post-actions/index.js.map +1 -1
  729. package/build-module/components/post-actions/set-as-homepage.js +4 -3
  730. package/build-module/components/post-actions/set-as-homepage.js.map +1 -1
  731. package/build-module/components/post-actions/set-as-posts-page.js +4 -3
  732. package/build-module/components/post-actions/set-as-posts-page.js.map +1 -1
  733. package/build-module/components/post-author/check.js +2 -1
  734. package/build-module/components/post-author/check.js.map +1 -1
  735. package/build-module/components/post-author/combobox.js +2 -1
  736. package/build-module/components/post-author/combobox.js.map +1 -1
  737. package/build-module/components/post-author/constants.js +3 -2
  738. package/build-module/components/post-author/constants.js.map +1 -1
  739. package/build-module/components/post-author/hook.js +1 -0
  740. package/build-module/components/post-author/hook.js.map +1 -1
  741. package/build-module/components/post-author/index.js +3 -2
  742. package/build-module/components/post-author/index.js.map +1 -1
  743. package/build-module/components/post-author/panel.js +2 -1
  744. package/build-module/components/post-author/panel.js.map +1 -1
  745. package/build-module/components/post-author/select.js +2 -1
  746. package/build-module/components/post-author/select.js.map +1 -1
  747. package/build-module/components/post-card-panel/index.js +3 -2
  748. package/build-module/components/post-card-panel/index.js.map +1 -1
  749. package/build-module/components/post-comments/index.js +3 -2
  750. package/build-module/components/post-comments/index.js.map +1 -1
  751. package/build-module/components/post-content-information/index.js +3 -2
  752. package/build-module/components/post-content-information/index.js.map +1 -1
  753. package/build-module/components/post-discussion/panel.js +3 -2
  754. package/build-module/components/post-discussion/panel.js.map +1 -1
  755. package/build-module/components/post-excerpt/check.js +2 -1
  756. package/build-module/components/post-excerpt/check.js.map +1 -1
  757. package/build-module/components/post-excerpt/index.js +2 -1
  758. package/build-module/components/post-excerpt/index.js.map +1 -1
  759. package/build-module/components/post-excerpt/panel.js +3 -2
  760. package/build-module/components/post-excerpt/panel.js.map +1 -1
  761. package/build-module/components/post-excerpt/plugin.js +4 -3
  762. package/build-module/components/post-excerpt/plugin.js.map +1 -1
  763. package/build-module/components/post-featured-image/check.js +2 -1
  764. package/build-module/components/post-featured-image/check.js.map +1 -1
  765. package/build-module/components/post-featured-image/index.js +9 -8
  766. package/build-module/components/post-featured-image/index.js.map +1 -1
  767. package/build-module/components/post-featured-image/panel.js +3 -2
  768. package/build-module/components/post-featured-image/panel.js.map +1 -1
  769. package/build-module/components/post-fields/index.js +1 -0
  770. package/build-module/components/post-fields/index.js.map +1 -1
  771. package/build-module/components/post-format/check.js +2 -1
  772. package/build-module/components/post-format/check.js.map +1 -1
  773. package/build-module/components/post-format/index.js +3 -2
  774. package/build-module/components/post-format/index.js.map +1 -1
  775. package/build-module/components/post-format/panel.js +2 -1
  776. package/build-module/components/post-format/panel.js.map +1 -1
  777. package/build-module/components/post-last-edited-panel/index.js +2 -1
  778. package/build-module/components/post-last-edited-panel/index.js.map +1 -1
  779. package/build-module/components/post-last-revision/check.js +2 -1
  780. package/build-module/components/post-last-revision/check.js.map +1 -1
  781. package/build-module/components/post-last-revision/index.js +2 -1
  782. package/build-module/components/post-last-revision/index.js.map +1 -1
  783. package/build-module/components/post-last-revision/panel.js +2 -1
  784. package/build-module/components/post-last-revision/panel.js.map +1 -1
  785. package/build-module/components/post-locked-modal/index.js +2 -1
  786. package/build-module/components/post-locked-modal/index.js.map +1 -1
  787. package/build-module/components/post-panel-row/index.js +3 -2
  788. package/build-module/components/post-panel-row/index.js.map +1 -1
  789. package/build-module/components/post-panel-section/index.js +2 -1
  790. package/build-module/components/post-panel-section/index.js.map +1 -1
  791. package/build-module/components/post-pending-status/check.js +1 -0
  792. package/build-module/components/post-pending-status/check.js.map +1 -1
  793. package/build-module/components/post-pending-status/index.js +2 -1
  794. package/build-module/components/post-pending-status/index.js.map +1 -1
  795. package/build-module/components/post-pingbacks/index.js +2 -1
  796. package/build-module/components/post-pingbacks/index.js.map +1 -1
  797. package/build-module/components/post-preview-button/index.js +2 -1
  798. package/build-module/components/post-preview-button/index.js.map +1 -1
  799. package/build-module/components/post-publish-button/index.js +5 -4
  800. package/build-module/components/post-publish-button/index.js.map +1 -1
  801. package/build-module/components/post-publish-button/label.js +1 -0
  802. package/build-module/components/post-publish-button/label.js.map +1 -1
  803. package/build-module/components/post-publish-button/post-publish-button-or-toggle.js +4 -3
  804. package/build-module/components/post-publish-button/post-publish-button-or-toggle.js.map +1 -1
  805. package/build-module/components/post-publish-panel/index.js +4 -3
  806. package/build-module/components/post-publish-panel/index.js.map +1 -1
  807. package/build-module/components/post-publish-panel/maybe-category-panel.js +2 -1
  808. package/build-module/components/post-publish-panel/maybe-category-panel.js.map +1 -1
  809. package/build-module/components/post-publish-panel/maybe-post-format-panel.js +4 -3
  810. package/build-module/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
  811. package/build-module/components/post-publish-panel/maybe-tags-panel.js +4 -3
  812. package/build-module/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
  813. package/build-module/components/post-publish-panel/maybe-upload-media.js +2 -1
  814. package/build-module/components/post-publish-panel/maybe-upload-media.js.map +1 -1
  815. package/build-module/components/post-publish-panel/media-util.js +1 -0
  816. package/build-module/components/post-publish-panel/media-util.js.map +1 -1
  817. package/build-module/components/post-publish-panel/postpublish.js +5 -4
  818. package/build-module/components/post-publish-panel/postpublish.js.map +1 -1
  819. package/build-module/components/post-publish-panel/prepublish.js +2 -1
  820. package/build-module/components/post-publish-panel/prepublish.js.map +1 -1
  821. package/build-module/components/post-saved-state/index.js +2 -1
  822. package/build-module/components/post-saved-state/index.js.map +1 -1
  823. package/build-module/components/post-schedule/check.js +1 -0
  824. package/build-module/components/post-schedule/check.js.map +1 -1
  825. package/build-module/components/post-schedule/index.js +3 -2
  826. package/build-module/components/post-schedule/index.js.map +1 -1
  827. package/build-module/components/post-schedule/label.js +1 -0
  828. package/build-module/components/post-schedule/label.js.map +1 -1
  829. package/build-module/components/post-schedule/panel.js +3 -2
  830. package/build-module/components/post-schedule/panel.js.map +1 -1
  831. package/build-module/components/post-status/index.js +5 -4
  832. package/build-module/components/post-status/index.js.map +1 -1
  833. package/build-module/components/post-sticky/check.js +1 -0
  834. package/build-module/components/post-sticky/check.js.map +1 -1
  835. package/build-module/components/post-sticky/index.js +2 -1
  836. package/build-module/components/post-sticky/index.js.map +1 -1
  837. package/build-module/components/post-sticky/panel.js +2 -1
  838. package/build-module/components/post-sticky/panel.js.map +1 -1
  839. package/build-module/components/post-switch-to-draft-button/index.js +2 -1
  840. package/build-module/components/post-switch-to-draft-button/index.js.map +1 -1
  841. package/build-module/components/post-sync-status/index.js +2 -1
  842. package/build-module/components/post-sync-status/index.js.map +1 -1
  843. package/build-module/components/post-taxonomies/check.js +1 -0
  844. package/build-module/components/post-taxonomies/check.js.map +1 -1
  845. package/build-module/components/post-taxonomies/flat-term-selector.js +8 -7
  846. package/build-module/components/post-taxonomies/flat-term-selector.js.map +1 -1
  847. package/build-module/components/post-taxonomies/hierarchical-term-selector.js +7 -6
  848. package/build-module/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
  849. package/build-module/components/post-taxonomies/index.js +3 -2
  850. package/build-module/components/post-taxonomies/index.js.map +1 -1
  851. package/build-module/components/post-taxonomies/most-used-terms.js +4 -3
  852. package/build-module/components/post-taxonomies/most-used-terms.js.map +1 -1
  853. package/build-module/components/post-taxonomies/panel.js +2 -1
  854. package/build-module/components/post-taxonomies/panel.js.map +1 -1
  855. package/build-module/components/post-template/block-theme.js +2 -1
  856. package/build-module/components/post-template/block-theme.js.map +1 -1
  857. package/build-module/components/post-template/classic-theme.js +2 -1
  858. package/build-module/components/post-template/classic-theme.js.map +1 -1
  859. package/build-module/components/post-template/create-new-template-modal.js +3 -2
  860. package/build-module/components/post-template/create-new-template-modal.js.map +1 -1
  861. package/build-module/components/post-template/create-new-template.js +2 -1
  862. package/build-module/components/post-template/create-new-template.js.map +1 -1
  863. package/build-module/components/post-template/hooks.js +1 -0
  864. package/build-module/components/post-template/hooks.js.map +1 -1
  865. package/build-module/components/post-template/panel.js +11 -7
  866. package/build-module/components/post-template/panel.js.map +2 -2
  867. package/build-module/components/post-template/reset-default-template.js +2 -1
  868. package/build-module/components/post-template/reset-default-template.js.map +1 -1
  869. package/build-module/components/post-template/swap-template-button.js +2 -1
  870. package/build-module/components/post-template/swap-template-button.js.map +1 -1
  871. package/build-module/components/post-text-editor/index.js +2 -1
  872. package/build-module/components/post-text-editor/index.js.map +1 -1
  873. package/build-module/components/post-title/constants.js +3 -2
  874. package/build-module/components/post-title/constants.js.map +1 -1
  875. package/build-module/components/post-title/index.js +21 -11
  876. package/build-module/components/post-title/index.js.map +2 -2
  877. package/build-module/components/post-title/post-title-raw.js +2 -1
  878. package/build-module/components/post-title/post-title-raw.js.map +1 -1
  879. package/build-module/components/post-title/use-post-title-focus.js +1 -0
  880. package/build-module/components/post-title/use-post-title-focus.js.map +1 -1
  881. package/build-module/components/post-title/use-post-title.js +1 -0
  882. package/build-module/components/post-title/use-post-title.js.map +1 -1
  883. package/build-module/components/post-transform-panel/hooks.js +2 -1
  884. package/build-module/components/post-transform-panel/hooks.js.map +1 -1
  885. package/build-module/components/post-transform-panel/index.js +2 -1
  886. package/build-module/components/post-transform-panel/index.js.map +1 -1
  887. package/build-module/components/post-trash/check.js +1 -0
  888. package/build-module/components/post-trash/check.js.map +1 -1
  889. package/build-module/components/post-trash/index.js +2 -1
  890. package/build-module/components/post-trash/index.js.map +1 -1
  891. package/build-module/components/post-type-support-check/index.js +1 -0
  892. package/build-module/components/post-type-support-check/index.js.map +1 -1
  893. package/build-module/components/post-url/check.js +1 -0
  894. package/build-module/components/post-url/check.js.map +1 -1
  895. package/build-module/components/post-url/index.js +2 -1
  896. package/build-module/components/post-url/index.js.map +1 -1
  897. package/build-module/components/post-url/label.js +1 -0
  898. package/build-module/components/post-url/label.js.map +1 -1
  899. package/build-module/components/post-url/panel.js +2 -1
  900. package/build-module/components/post-url/panel.js.map +1 -1
  901. package/build-module/components/post-view-link/index.js +2 -1
  902. package/build-module/components/post-view-link/index.js.map +1 -1
  903. package/build-module/components/post-visibility/check.js +1 -0
  904. package/build-module/components/post-visibility/check.js.map +1 -1
  905. package/build-module/components/post-visibility/index.js +2 -1
  906. package/build-module/components/post-visibility/index.js.map +1 -1
  907. package/build-module/components/post-visibility/label.js +1 -0
  908. package/build-module/components/post-visibility/label.js.map +1 -1
  909. package/build-module/components/post-visibility/utils.js +2 -1
  910. package/build-module/components/post-visibility/utils.js.map +1 -1
  911. package/build-module/components/posts-per-page/index.js +2 -1
  912. package/build-module/components/posts-per-page/index.js.map +1 -1
  913. package/build-module/components/preferences-modal/enable-panel.js +3 -2
  914. package/build-module/components/preferences-modal/enable-panel.js.map +1 -1
  915. package/build-module/components/preferences-modal/enable-plugin-document-setting-panel.js +4 -3
  916. package/build-module/components/preferences-modal/enable-plugin-document-setting-panel.js.map +1 -1
  917. package/build-module/components/preferences-modal/enable-publish-sidebar.js +3 -2
  918. package/build-module/components/preferences-modal/enable-publish-sidebar.js.map +1 -1
  919. package/build-module/components/preferences-modal/index.js +4 -3
  920. package/build-module/components/preferences-modal/index.js.map +2 -2
  921. package/build-module/components/preview-dropdown/index.js +2 -1
  922. package/build-module/components/preview-dropdown/index.js.map +1 -1
  923. package/build-module/components/provider/disable-non-page-content-blocks.js +1 -0
  924. package/build-module/components/provider/disable-non-page-content-blocks.js.map +1 -1
  925. package/build-module/components/provider/index.js +7 -6
  926. package/build-module/components/provider/index.js.map +1 -1
  927. package/build-module/components/provider/navigation-block-editing-mode.js +1 -0
  928. package/build-module/components/provider/navigation-block-editing-mode.js.map +1 -1
  929. package/build-module/components/provider/use-auto-switch-editor-sidebars.js +1 -0
  930. package/build-module/components/provider/use-auto-switch-editor-sidebars.js.map +1 -1
  931. package/build-module/components/provider/use-block-editor-settings.js +4 -3
  932. package/build-module/components/provider/use-block-editor-settings.js.map +1 -1
  933. package/build-module/components/provider/use-hide-blocks-from-inserter.js +2 -1
  934. package/build-module/components/provider/use-hide-blocks-from-inserter.js.map +1 -1
  935. package/build-module/components/provider/use-post-content-blocks.js +2 -1
  936. package/build-module/components/provider/use-post-content-blocks.js.map +1 -1
  937. package/build-module/components/provider/with-registry-provider.js +3 -2
  938. package/build-module/components/provider/with-registry-provider.js.map +1 -1
  939. package/build-module/components/resizable-editor/index.js +3 -2
  940. package/build-module/components/resizable-editor/index.js.map +1 -1
  941. package/build-module/components/resizable-editor/resize-handle.js +3 -2
  942. package/build-module/components/resizable-editor/resize-handle.js.map +1 -1
  943. package/build-module/components/save-publish-panels/index.js +4 -3
  944. package/build-module/components/save-publish-panels/index.js.map +1 -1
  945. package/build-module/components/sidebar/constants.js +2 -1
  946. package/build-module/components/sidebar/constants.js.map +1 -1
  947. package/build-module/components/sidebar/header.js +4 -3
  948. package/build-module/components/sidebar/header.js.map +1 -1
  949. package/build-module/components/sidebar/index.js +6 -5
  950. package/build-module/components/sidebar/index.js.map +1 -1
  951. package/build-module/components/sidebar/post-summary.js +3 -2
  952. package/build-module/components/sidebar/post-summary.js.map +1 -1
  953. package/build-module/components/site-discussion/index.js +3 -2
  954. package/build-module/components/site-discussion/index.js.map +1 -1
  955. package/build-module/components/start-page-options/index.js +7 -7
  956. package/build-module/components/start-page-options/index.js.map +2 -2
  957. package/build-module/components/start-template-options/index.js +2 -1
  958. package/build-module/components/start-template-options/index.js.map +1 -1
  959. package/build-module/components/style-book/categories.js +1 -0
  960. package/build-module/components/style-book/categories.js.map +1 -1
  961. package/build-module/components/style-book/color-examples.js +3 -2
  962. package/build-module/components/style-book/color-examples.js.map +1 -1
  963. package/build-module/components/style-book/constants.js +8 -7
  964. package/build-module/components/style-book/constants.js.map +1 -1
  965. package/build-module/components/style-book/duotone-examples.js +3 -2
  966. package/build-module/components/style-book/duotone-examples.js.map +1 -1
  967. package/build-module/components/style-book/examples.js +2 -1
  968. package/build-module/components/style-book/examples.js.map +1 -1
  969. package/build-module/components/style-book/index.js +12 -11
  970. package/build-module/components/style-book/index.js.map +1 -1
  971. package/build-module/components/styles-canvas/index.js +2 -1
  972. package/build-module/components/styles-canvas/index.js.map +1 -1
  973. package/build-module/components/styles-canvas/revisions.js +3 -2
  974. package/build-module/components/styles-canvas/revisions.js.map +1 -1
  975. package/build-module/components/styles-canvas/style-book.js +2 -1
  976. package/build-module/components/styles-canvas/style-book.js.map +1 -1
  977. package/build-module/components/table-of-contents/index.js +2 -1
  978. package/build-module/components/table-of-contents/index.js.map +1 -1
  979. package/build-module/components/table-of-contents/panel.js +2 -1
  980. package/build-module/components/table-of-contents/panel.js.map +1 -1
  981. package/build-module/components/template-content-panel/index.js +5 -4
  982. package/build-module/components/template-content-panel/index.js.map +1 -1
  983. package/build-module/components/template-part-content-panel/index.js +3 -2
  984. package/build-module/components/template-part-content-panel/index.js.map +1 -1
  985. package/build-module/components/template-part-menu-items/convert-to-regular.js +2 -1
  986. package/build-module/components/template-part-menu-items/convert-to-regular.js.map +1 -1
  987. package/build-module/components/template-part-menu-items/convert-to-template-part.js +2 -1
  988. package/build-module/components/template-part-menu-items/convert-to-template-part.js.map +1 -1
  989. package/build-module/components/template-part-menu-items/index.js +2 -1
  990. package/build-module/components/template-part-menu-items/index.js.map +1 -1
  991. package/build-module/components/template-validation-notice/index.js +2 -1
  992. package/build-module/components/template-validation-notice/index.js.map +1 -1
  993. package/build-module/components/text-editor/index.js +2 -1
  994. package/build-module/components/text-editor/index.js.map +1 -1
  995. package/build-module/components/theme-support-check/index.js +1 -0
  996. package/build-module/components/theme-support-check/index.js.map +1 -1
  997. package/build-module/components/time-to-read/index.js +3 -2
  998. package/build-module/components/time-to-read/index.js.map +1 -1
  999. package/build-module/components/unsaved-changes-warning/index.js +1 -0
  1000. package/build-module/components/unsaved-changes-warning/index.js.map +1 -1
  1001. package/build-module/components/visual-editor/edit-template-blocks-notification.js +2 -1
  1002. package/build-module/components/visual-editor/edit-template-blocks-notification.js.map +1 -1
  1003. package/build-module/components/visual-editor/index.js +33 -13
  1004. package/build-module/components/visual-editor/index.js.map +2 -2
  1005. package/build-module/components/visual-editor/use-edit-content-only-section-exit.js +40 -0
  1006. package/build-module/components/visual-editor/use-edit-content-only-section-exit.js.map +7 -0
  1007. package/build-module/components/visual-editor/use-padding-appender.js +50 -0
  1008. package/build-module/components/visual-editor/use-padding-appender.js.map +7 -0
  1009. package/build-module/components/visual-editor/use-select-nearest-editable-block.js +2 -1
  1010. package/build-module/components/visual-editor/use-select-nearest-editable-block.js.map +1 -1
  1011. package/build-module/components/visual-editor/use-zoom-out-mode-exit.js +1 -0
  1012. package/build-module/components/visual-editor/use-zoom-out-mode-exit.js.map +1 -1
  1013. package/build-module/components/word-count/index.js +2 -1
  1014. package/build-module/components/word-count/index.js.map +1 -1
  1015. package/build-module/components/zoom-out-toggle/index.js +3 -2
  1016. package/build-module/components/zoom-out-toggle/index.js.map +1 -1
  1017. package/build-module/dataviews/api.js +1 -0
  1018. package/build-module/dataviews/api.js.map +1 -1
  1019. package/build-module/dataviews/fields/content-preview/content-preview-view.js +5 -5
  1020. package/build-module/dataviews/fields/content-preview/content-preview-view.js.map +2 -2
  1021. package/build-module/dataviews/fields/content-preview/index.js +2 -1
  1022. package/build-module/dataviews/fields/content-preview/index.js.map +1 -1
  1023. package/build-module/dataviews/store/private-actions.js +2 -1
  1024. package/build-module/dataviews/store/private-actions.js.map +1 -1
  1025. package/build-module/dataviews/store/private-selectors.js +2 -1
  1026. package/build-module/dataviews/store/private-selectors.js.map +1 -1
  1027. package/build-module/dataviews/store/reducer.js +1 -0
  1028. package/build-module/dataviews/store/reducer.js.map +1 -1
  1029. package/build-module/hooks/custom-sources-backwards-compatibility.js +3 -2
  1030. package/build-module/hooks/custom-sources-backwards-compatibility.js.map +1 -1
  1031. package/build-module/hooks/default-autocompleters.js +1 -0
  1032. package/build-module/hooks/default-autocompleters.js.map +1 -1
  1033. package/build-module/hooks/index.js +1 -0
  1034. package/build-module/hooks/index.js.map +1 -1
  1035. package/build-module/hooks/media-upload.js +2 -1
  1036. package/build-module/hooks/media-upload.js.map +1 -1
  1037. package/build-module/hooks/navigation-link-view-button.js +4 -3
  1038. package/build-module/hooks/navigation-link-view-button.js.map +1 -1
  1039. package/build-module/hooks/pattern-overrides.js +5 -6
  1040. package/build-module/hooks/pattern-overrides.js.map +2 -2
  1041. package/build-module/hooks/push-changes-to-global-styles/index.js +11 -10
  1042. package/build-module/hooks/push-changes-to-global-styles/index.js.map +1 -1
  1043. package/build-module/hooks/template-part-navigation-edit-button.js +6 -5
  1044. package/build-module/hooks/template-part-navigation-edit-button.js.map +1 -1
  1045. package/build-module/hooks/use-global-styles-output.js +1 -0
  1046. package/build-module/hooks/use-global-styles-output.js.map +1 -1
  1047. package/build-module/index.js +1 -0
  1048. package/build-module/index.js.map +1 -1
  1049. package/build-module/lock-unlock.js +2 -1
  1050. package/build-module/lock-unlock.js.map +1 -1
  1051. package/build-module/private-apis.js +3 -2
  1052. package/build-module/private-apis.js.map +1 -1
  1053. package/build-module/store/actions.js +53 -52
  1054. package/build-module/store/actions.js.map +2 -2
  1055. package/build-module/store/constants.js +14 -13
  1056. package/build-module/store/constants.js.map +1 -1
  1057. package/build-module/store/defaults.js +2 -1
  1058. package/build-module/store/defaults.js.map +1 -1
  1059. package/build-module/store/index.js +3 -2
  1060. package/build-module/store/index.js.map +1 -1
  1061. package/build-module/store/local-autosave.js +1 -0
  1062. package/build-module/store/local-autosave.js.map +1 -1
  1063. package/build-module/store/private-actions.js +15 -7
  1064. package/build-module/store/private-actions.js.map +2 -2
  1065. package/build-module/store/private-selectors.js +13 -8
  1066. package/build-module/store/private-selectors.js.map +2 -2
  1067. package/build-module/store/reducer.js +10 -0
  1068. package/build-module/store/reducer.js.map +2 -2
  1069. package/build-module/store/selectors.js +79 -78
  1070. package/build-module/store/selectors.js.map +2 -2
  1071. package/build-module/store/utils/is-template-revertable.js +1 -0
  1072. package/build-module/store/utils/is-template-revertable.js.map +1 -1
  1073. package/build-module/store/utils/notice-builder.js +1 -0
  1074. package/build-module/store/utils/notice-builder.js.map +1 -1
  1075. package/build-module/utils/get-item-title.js +1 -0
  1076. package/build-module/utils/get-item-title.js.map +1 -1
  1077. package/build-module/utils/get-template-info.js +3 -2
  1078. package/build-module/utils/get-template-info.js.map +1 -1
  1079. package/build-module/utils/get-template-part-icon.js +1 -0
  1080. package/build-module/utils/get-template-part-icon.js.map +1 -1
  1081. package/build-module/utils/index.js +1 -0
  1082. package/build-module/utils/index.js.map +1 -1
  1083. package/build-module/utils/media-sideload/index.js +2 -1
  1084. package/build-module/utils/media-sideload/index.js.map +1 -1
  1085. package/build-module/utils/media-upload/index.js +2 -1
  1086. package/build-module/utils/media-upload/index.js.map +1 -1
  1087. package/build-module/utils/pageTypeBadge.js +1 -0
  1088. package/build-module/utils/pageTypeBadge.js.map +1 -1
  1089. package/build-module/utils/search-templates.js +1 -0
  1090. package/build-module/utils/search-templates.js.map +1 -1
  1091. package/build-module/utils/set-nested-value.js +1 -0
  1092. package/build-module/utils/set-nested-value.js.map +1 -1
  1093. package/build-module/utils/terms.js +4 -3
  1094. package/build-module/utils/terms.js.map +1 -1
  1095. package/build-module/utils/url.js +1 -0
  1096. package/build-module/utils/url.js.map +1 -1
  1097. package/build-style/style-rtl.css +58 -82
  1098. package/build-style/style.css +58 -82
  1099. package/build-types/bindings/post-data.d.ts +18 -8
  1100. package/build-types/bindings/post-meta.d.ts +1 -7
  1101. package/build-types/components/collab-sidebar/add-comment.d.ts +3 -3
  1102. package/build-types/components/collab-sidebar/add-comment.d.ts.map +1 -1
  1103. package/build-types/components/collab-sidebar/comment-form.d.ts.map +1 -1
  1104. package/build-types/components/collab-sidebar/comment-indicator-toolbar.d.ts.map +1 -1
  1105. package/build-types/components/collab-sidebar/comment-menu-item.d.ts +3 -2
  1106. package/build-types/components/collab-sidebar/comment-menu-item.d.ts.map +1 -1
  1107. package/build-types/components/collab-sidebar/comments.d.ts +3 -3
  1108. package/build-types/components/collab-sidebar/comments.d.ts.map +1 -1
  1109. package/build-types/components/collab-sidebar/hooks.d.ts.map +1 -1
  1110. package/build-types/components/collab-sidebar/index.d.ts.map +1 -1
  1111. package/build-types/components/collab-sidebar/utils.d.ts.map +1 -1
  1112. package/build-types/components/commands/index.d.ts.map +1 -1
  1113. package/build-types/components/editor/index.d.ts.map +1 -1
  1114. package/build-types/components/entities-saved-states/index.d.ts +2 -2
  1115. package/build-types/components/entities-saved-states/index.d.ts.map +1 -1
  1116. package/build-types/components/global-styles/hooks.d.ts +6 -6
  1117. package/build-types/components/global-styles/hooks.d.ts.map +1 -1
  1118. package/build-types/components/header/back-button.d.ts.map +1 -1
  1119. package/build-types/components/local-autosave-monitor/index.d.ts.map +1 -1
  1120. package/build-types/components/more-menu/tools-more-menu-group.d.ts.map +1 -1
  1121. package/build-types/components/more-menu/view-more-menu-group.d.ts.map +1 -1
  1122. package/build-types/components/plugin-document-setting-panel/index.d.ts.map +1 -1
  1123. package/build-types/components/plugin-post-publish-panel/index.d.ts.map +1 -1
  1124. package/build-types/components/plugin-post-status-info/index.d.ts.map +1 -1
  1125. package/build-types/components/plugin-pre-publish-panel/index.d.ts.map +1 -1
  1126. package/build-types/components/post-excerpt/plugin.d.ts.map +1 -1
  1127. package/build-types/components/post-locked-modal/index.d.ts.map +1 -1
  1128. package/build-types/components/post-publish-button/index.d.ts.map +1 -1
  1129. package/build-types/components/post-taxonomies/flat-term-selector.d.ts.map +1 -1
  1130. package/build-types/components/post-taxonomies/hierarchical-term-selector.d.ts +1 -10
  1131. package/build-types/components/post-taxonomies/hierarchical-term-selector.d.ts.map +1 -1
  1132. package/build-types/components/post-template/panel.d.ts.map +1 -1
  1133. package/build-types/components/preferences-modal/enable-plugin-document-setting-panel.d.ts.map +1 -1
  1134. package/build-types/components/save-publish-panels/index.d.ts.map +1 -1
  1135. package/build-types/components/start-page-options/index.d.ts.map +1 -1
  1136. package/build-types/components/style-book/color-examples.d.ts.map +1 -1
  1137. package/build-types/components/style-book/duotone-examples.d.ts.map +1 -1
  1138. package/build-types/components/visual-editor/index.d.ts.map +1 -1
  1139. package/build-types/components/visual-editor/use-edit-content-only-section-exit.d.ts +6 -0
  1140. package/build-types/components/visual-editor/use-edit-content-only-section-exit.d.ts.map +1 -0
  1141. package/build-types/components/visual-editor/use-padding-appender.d.ts +2 -0
  1142. package/build-types/components/visual-editor/use-padding-appender.d.ts.map +1 -0
  1143. package/build-types/dataviews/fields/content-preview/content-preview-view.d.ts.map +1 -1
  1144. package/build-types/dataviews/store/private-actions.d.ts.map +1 -1
  1145. package/build-types/store/actions.d.ts +3 -4
  1146. package/build-types/store/actions.d.ts.map +1 -1
  1147. package/build-types/store/private-actions.d.ts +7 -0
  1148. package/build-types/store/private-actions.d.ts.map +1 -1
  1149. package/build-types/store/private-selectors.d.ts +12 -5
  1150. package/build-types/store/private-selectors.d.ts.map +1 -1
  1151. package/build-types/store/reducer.d.ts +10 -0
  1152. package/build-types/store/reducer.d.ts.map +1 -1
  1153. package/build-types/store/selectors.d.ts +68 -68
  1154. package/build-types/store/selectors.d.ts.map +1 -1
  1155. package/package.json +40 -40
  1156. package/src/bindings/post-data.js +63 -111
  1157. package/src/bindings/post-meta.js +55 -46
  1158. package/src/bindings/test/post-meta.js +211 -0
  1159. package/src/components/collab-sidebar/add-comment.js +19 -16
  1160. package/src/components/collab-sidebar/comment-author-info.js +1 -1
  1161. package/src/components/collab-sidebar/comment-form.js +16 -4
  1162. package/src/components/collab-sidebar/comment-indicator-toolbar.js +19 -29
  1163. package/src/components/collab-sidebar/comment-menu-item.js +51 -11
  1164. package/src/components/collab-sidebar/comments.js +173 -80
  1165. package/src/components/collab-sidebar/hooks.js +6 -4
  1166. package/src/components/collab-sidebar/index.js +78 -40
  1167. package/src/components/collab-sidebar/style.scss +20 -44
  1168. package/src/components/collab-sidebar/utils.js +3 -2
  1169. package/src/components/commands/index.js +32 -19
  1170. package/src/components/editor/index.js +12 -1
  1171. package/src/components/entities-saved-states/index.js +1 -1
  1172. package/src/components/global-styles/hooks.js +4 -4
  1173. package/src/components/more-menu/index.js +1 -1
  1174. package/src/components/post-template/panel.js +11 -8
  1175. package/src/components/post-title/index.js +22 -9
  1176. package/src/components/preferences-modal/index.js +1 -1
  1177. package/src/components/start-page-options/index.js +5 -6
  1178. package/src/components/start-page-options/style.scss +1 -1
  1179. package/src/components/visual-editor/index.js +36 -6
  1180. package/src/components/visual-editor/use-edit-content-only-section-exit.js +55 -0
  1181. package/src/components/visual-editor/use-padding-appender.js +70 -0
  1182. package/src/dataviews/fields/content-preview/content-preview-view.tsx +2 -5
  1183. package/src/hooks/pattern-overrides.js +0 -2
  1184. package/src/store/actions.js +9 -1
  1185. package/src/store/private-actions.js +13 -0
  1186. package/src/store/private-selectors.js +10 -0
  1187. package/src/store/reducer.js +16 -0
  1188. package/src/store/selectors.js +0 -2
  1189. package/tsconfig.tsbuildinfo +1 -1
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/store/selectors.js"],
4
- "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport {\n\tgetFreeformContentHandlerName,\n\tgetDefaultBlockName,\n\t__unstableSerializeAndClean,\n\tparse,\n} from '@wordpress/blocks';\nimport { isInTheFuture, getDate } from '@wordpress/date';\nimport { addQueryArgs, cleanForSlug } from '@wordpress/url';\nimport { createSelector, createRegistrySelector } from '@wordpress/data';\nimport deprecated from '@wordpress/deprecated';\nimport { Platform } from '@wordpress/element';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport {\n\tEDIT_MERGE_PROPERTIES,\n\tPERMALINK_POSTNAME_REGEX,\n\tONE_MINUTE_IN_MS,\n\tAUTOSAVE_PROPERTIES,\n} from './constants';\nimport { getPostRawValue } from './reducer';\nimport { getTemplatePartIcon } from '../utils/get-template-part-icon';\nimport { unlock } from '../lock-unlock';\nimport { getTemplateInfo } from '../utils/get-template-info';\n\n/**\n * Shared reference to an empty object for cases where it is important to avoid\n * returning a new object reference on every invocation, as in a connected or\n * other pure component which performs `shouldComponentUpdate` check on props.\n * This should be used as a last resort, since the normalized data should be\n * maintained by the reducer result in state.\n */\nconst EMPTY_OBJECT = {};\n\n/**\n * Returns true if any past editor history snapshots exist, or false otherwise.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether undo history exists.\n */\nexport const hasEditorUndo = createRegistrySelector( ( select ) => () => {\n\treturn select( coreStore ).hasUndo();\n} );\n\n/**\n * Returns true if any future editor history snapshots exist, or false\n * otherwise.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether redo history exists.\n */\nexport const hasEditorRedo = createRegistrySelector( ( select ) => () => {\n\treturn select( coreStore ).hasRedo();\n} );\n\n/**\n * Returns true if the currently edited post is yet to be saved, or false if\n * the post has been saved.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the post is new.\n */\nexport function isEditedPostNew( state ) {\n\treturn getCurrentPost( state ).status === 'auto-draft';\n}\n\n/**\n * Returns true if content includes unsaved changes, or false otherwise.\n *\n * @param {Object} state Editor state.\n *\n * @return {boolean} Whether content includes unsaved changes.\n */\nexport function hasChangedContent( state ) {\n\tconst edits = getPostEdits( state );\n\treturn 'content' in edits;\n}\n\n/**\n * Returns true if there are unsaved values for the current edit session, or\n * false if the editing state matches the saved or new post.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether unsaved values exist.\n */\nexport const isEditedPostDirty = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\t// Edits should contain only fields which differ from the saved post (reset\n\t\t// at initial load and save complete). Thus, a non-empty edits state can be\n\t\t// inferred to contain unsaved values.\n\t\tconst postType = getCurrentPostType( state );\n\t\tconst postId = getCurrentPostId( state );\n\t\treturn select( coreStore ).hasEditsForEntityRecord(\n\t\t\t'postType',\n\t\t\tpostType,\n\t\t\tpostId\n\t\t);\n\t}\n);\n\n/**\n * Returns true if there are unsaved edits for entities other than\n * the editor's post, and false otherwise.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether there are edits or not.\n */\nexport const hasNonPostEntityChanges = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\tconst dirtyEntityRecords =\n\t\t\tselect( coreStore ).__experimentalGetDirtyEntityRecords();\n\t\tconst { type, id } = getCurrentPost( state );\n\t\treturn dirtyEntityRecords.some(\n\t\t\t( entityRecord ) =>\n\t\t\t\tentityRecord.kind !== 'postType' ||\n\t\t\t\tentityRecord.name !== type ||\n\t\t\t\tentityRecord.key !== id\n\t\t);\n\t}\n);\n\n/**\n * Returns true if there are no unsaved values for the current edit session and\n * if the currently edited post is new (has never been saved before).\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether new post and unsaved values exist.\n */\nexport function isCleanNewPost( state ) {\n\treturn ! isEditedPostDirty( state ) && isEditedPostNew( state );\n}\n\n/**\n * Returns the post currently being edited in its last known saved state, not\n * including unsaved edits. Returns an object containing relevant default post\n * values if the post has not yet been saved.\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} Post object.\n */\nexport const getCurrentPost = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\tconst postId = getCurrentPostId( state );\n\t\tconst postType = getCurrentPostType( state );\n\n\t\tconst post = select( coreStore ).getRawEntityRecord(\n\t\t\t'postType',\n\t\t\tpostType,\n\t\t\tpostId\n\t\t);\n\t\tif ( post ) {\n\t\t\treturn post;\n\t\t}\n\n\t\t// This exists for compatibility with the previous selector behavior\n\t\t// which would guarantee an object return based on the editor reducer's\n\t\t// default empty object state.\n\t\treturn EMPTY_OBJECT;\n\t}\n);\n\n/**\n * Returns the post type of the post currently being edited.\n *\n * @param {Object} state Global application state.\n *\n * @example\n *\n *```js\n * const currentPostType = wp.data.select( 'core/editor' ).getCurrentPostType();\n *```\n * @return {string} Post type.\n */\nexport function getCurrentPostType( state ) {\n\treturn state.postType;\n}\n\n/**\n * Returns the ID of the post currently being edited, or null if the post has\n * not yet been saved.\n *\n * @param {Object} state Global application state.\n *\n * @return {?(number|string)} The current post ID (number) or template slug (string).\n */\nexport function getCurrentPostId( state ) {\n\treturn state.postId;\n}\n\n/**\n * Returns the template ID currently being rendered/edited\n *\n * @param {Object} state Global application state.\n *\n * @return {?string} Template ID.\n */\nexport function getCurrentTemplateId( state ) {\n\treturn state.templateId;\n}\n\n/**\n * Returns the number of revisions of the post currently being edited.\n *\n * @param {Object} state Global application state.\n *\n * @return {number} Number of revisions.\n */\nexport function getCurrentPostRevisionsCount( state ) {\n\treturn (\n\t\tgetCurrentPost( state )._links?.[ 'version-history' ]?.[ 0 ]?.count ?? 0\n\t);\n}\n\n/**\n * Returns the last revision ID of the post currently being edited,\n * or null if the post has no revisions.\n *\n * @param {Object} state Global application state.\n *\n * @return {?number} ID of the last revision.\n */\nexport function getCurrentPostLastRevisionId( state ) {\n\treturn (\n\t\tgetCurrentPost( state )._links?.[ 'predecessor-version' ]?.[ 0 ]?.id ??\n\t\tnull\n\t);\n}\n\n/**\n * Returns any post values which have been changed in the editor but not yet\n * been saved.\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} Object of key value pairs comprising unsaved edits.\n */\nexport const getPostEdits = createRegistrySelector( ( select ) => ( state ) => {\n\tconst postType = getCurrentPostType( state );\n\tconst postId = getCurrentPostId( state );\n\treturn (\n\t\tselect( coreStore ).getEntityRecordEdits(\n\t\t\t'postType',\n\t\t\tpostType,\n\t\t\tpostId\n\t\t) || EMPTY_OBJECT\n\t);\n} );\n\n/**\n * Returns an attribute value of the saved post.\n *\n * @param {Object} state Global application state.\n * @param {string} attributeName Post attribute name.\n *\n * @return {*} Post attribute value.\n */\nexport function getCurrentPostAttribute( state, attributeName ) {\n\tswitch ( attributeName ) {\n\t\tcase 'type':\n\t\t\treturn getCurrentPostType( state );\n\n\t\tcase 'id':\n\t\t\treturn getCurrentPostId( state );\n\n\t\tdefault:\n\t\t\tconst post = getCurrentPost( state );\n\t\t\tif ( ! post.hasOwnProperty( attributeName ) ) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\treturn getPostRawValue( post[ attributeName ] );\n\t}\n}\n\n/**\n * Returns a single attribute of the post being edited, preferring the unsaved\n * edit if one exists, but merging with the attribute value for the last known\n * saved state of the post (this is needed for some nested attributes like meta).\n *\n * @param {Object} state Global application state.\n * @param {string} attributeName Post attribute name.\n *\n * @return {*} Post attribute value.\n */\nconst getNestedEditedPostProperty = createSelector(\n\t( state, attributeName ) => {\n\t\tconst edits = getPostEdits( state );\n\t\tif ( ! edits.hasOwnProperty( attributeName ) ) {\n\t\t\treturn getCurrentPostAttribute( state, attributeName );\n\t\t}\n\n\t\treturn {\n\t\t\t...getCurrentPostAttribute( state, attributeName ),\n\t\t\t...edits[ attributeName ],\n\t\t};\n\t},\n\t( state, attributeName ) => [\n\t\tgetCurrentPostAttribute( state, attributeName ),\n\t\tgetPostEdits( state )[ attributeName ],\n\t]\n);\n\n/**\n * Returns a single attribute of the post being edited, preferring the unsaved\n * edit if one exists, but falling back to the attribute for the last known\n * saved state of the post.\n *\n * @param {Object} state Global application state.\n * @param {string} attributeName Post attribute name.\n *\n * @example\n *\n *```js\n * \t// Get specific media size based on the featured media ID\n * \t// Note: change sizes?.large for any registered size\n * \tconst getFeaturedMediaUrl = useSelect( ( select ) => {\n * \t\tconst getFeaturedMediaId =\n * \t\t\tselect( 'core/editor' ).getEditedPostAttribute( 'featured_media' );\n * \t\tconst media = select( 'core' ).getEntityRecord(\n * \t\t\t'postType',\n * \t\t\t'attachment',\n * \t\t\tgetFeaturedMediaId\n * \t\t);\n *\n * \t\treturn (\n * \t\t\tmedia?.media_details?.sizes?.large?.source_url || media?.source_url || ''\n * \t\t);\n * }, [] );\n *```\n *\n * @return {*} Post attribute value.\n */\nexport function getEditedPostAttribute( state, attributeName ) {\n\t// Special cases.\n\tswitch ( attributeName ) {\n\t\tcase 'content':\n\t\t\treturn getEditedPostContent( state );\n\t}\n\n\t// Fall back to saved post value if not edited.\n\tconst edits = getPostEdits( state );\n\tif ( ! edits.hasOwnProperty( attributeName ) ) {\n\t\treturn getCurrentPostAttribute( state, attributeName );\n\t}\n\n\t// Merge properties are objects which contain only the patch edit in state,\n\t// and thus must be merged with the current post attribute.\n\tif ( EDIT_MERGE_PROPERTIES.has( attributeName ) ) {\n\t\treturn getNestedEditedPostProperty( state, attributeName );\n\t}\n\n\treturn edits[ attributeName ];\n}\n\n/**\n * Returns an attribute value of the current autosave revision for a post, or\n * null if there is no autosave for the post.\n *\n * @deprecated since 5.6. Callers should use the `getAutosave( postType, postId, userId )` selector\n * \t\t\t from the '@wordpress/core-data' package and access properties on the returned\n * \t\t\t autosave object using getPostRawValue.\n *\n * @param {Object} state Global application state.\n * @param {string} attributeName Autosave attribute name.\n *\n * @return {*} Autosave attribute value.\n */\nexport const getAutosaveAttribute = createRegistrySelector(\n\t( select ) => ( state, attributeName ) => {\n\t\tif (\n\t\t\t! AUTOSAVE_PROPERTIES.includes( attributeName ) &&\n\t\t\tattributeName !== 'preview_link'\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst postType = getCurrentPostType( state );\n\n\t\t// Currently template autosaving is not supported.\n\t\tif ( postType === 'wp_template' ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst postId = getCurrentPostId( state );\n\t\tconst currentUserId = select( coreStore ).getCurrentUser()?.id;\n\t\tconst autosave = select( coreStore ).getAutosave(\n\t\t\tpostType,\n\t\t\tpostId,\n\t\t\tcurrentUserId\n\t\t);\n\n\t\tif ( autosave ) {\n\t\t\treturn getPostRawValue( autosave[ attributeName ] );\n\t\t}\n\t}\n);\n\n/**\n * Returns the current visibility of the post being edited, preferring the\n * unsaved value if different than the saved post. The return value is one of\n * \"private\", \"password\", or \"public\".\n *\n * @param {Object} state Global application state.\n *\n * @return {string} Post visibility.\n */\nexport function getEditedPostVisibility( state ) {\n\tconst status = getEditedPostAttribute( state, 'status' );\n\tif ( status === 'private' ) {\n\t\treturn 'private';\n\t}\n\n\tconst password = getEditedPostAttribute( state, 'password' );\n\tif ( password ) {\n\t\treturn 'password';\n\t}\n\n\treturn 'public';\n}\n\n/**\n * Returns true if post is pending review.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether current post is pending review.\n */\nexport function isCurrentPostPending( state ) {\n\treturn getCurrentPost( state ).status === 'pending';\n}\n\n/**\n * Return true if the current post has already been published.\n *\n * @param {Object} state Global application state.\n * @param {Object} [currentPost] Explicit current post for bypassing registry selector.\n *\n * @return {boolean} Whether the post has been published.\n */\nexport function isCurrentPostPublished( state, currentPost ) {\n\tconst post = currentPost || getCurrentPost( state );\n\n\treturn (\n\t\t[ 'publish', 'private' ].indexOf( post.status ) !== -1 ||\n\t\t( post.status === 'future' &&\n\t\t\t! isInTheFuture(\n\t\t\t\tnew Date( Number( getDate( post.date ) ) - ONE_MINUTE_IN_MS )\n\t\t\t) )\n\t);\n}\n\n/**\n * Returns true if post is already scheduled.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether current post is scheduled to be posted.\n */\nexport function isCurrentPostScheduled( state ) {\n\treturn (\n\t\tgetCurrentPost( state ).status === 'future' &&\n\t\t! isCurrentPostPublished( state )\n\t);\n}\n\n/**\n * Return true if the post being edited can be published.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the post can been published.\n */\nexport function isEditedPostPublishable( state ) {\n\tconst post = getCurrentPost( state );\n\n\t// TODO: Post being publishable should be superset of condition of post\n\t// being saveable. Currently this restriction is imposed at UI.\n\t//\n\t// See: <PostPublishButton /> (`isButtonEnabled` assigned by `isSaveable`).\n\n\treturn (\n\t\tisEditedPostDirty( state ) ||\n\t\t[ 'publish', 'private', 'future' ].indexOf( post.status ) === -1\n\t);\n}\n\n/**\n * Returns true if the post can be saved, or false otherwise. A post must\n * contain a title, an excerpt, or non-empty content to be valid for save.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the post can be saved.\n */\nexport function isEditedPostSaveable( state ) {\n\tif ( isSavingPost( state ) ) {\n\t\treturn false;\n\t}\n\n\t// TODO: Post should not be saveable if not dirty. Cannot be added here at\n\t// this time since posts where meta boxes are present can be saved even if\n\t// the post is not dirty. Currently this restriction is imposed at UI, but\n\t// should be moved here.\n\t//\n\t// See: `isEditedPostPublishable` (includes `isEditedPostDirty` condition)\n\t// See: <PostSavedState /> (`forceIsDirty` prop)\n\t// See: <PostPublishButton /> (`forceIsDirty` prop)\n\t// See: https://github.com/WordPress/gutenberg/pull/4184.\n\n\treturn (\n\t\t!! getEditedPostAttribute( state, 'title' ) ||\n\t\t!! getEditedPostAttribute( state, 'excerpt' ) ||\n\t\t! isEditedPostEmpty( state ) ||\n\t\tPlatform.OS === 'native'\n\t);\n}\n\n/**\n * Returns true if the edited post has content. A post has content if it has at\n * least one saveable block or otherwise has a non-empty content property\n * assigned.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether post has content.\n */\nexport const isEditedPostEmpty = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\t// While the condition of truthy content string is sufficient to determine\n\t\t// emptiness, testing saveable blocks length is a trivial operation. Since\n\t\t// this function can be called frequently, optimize for the fast case as a\n\t\t// condition of the mere existence of blocks. Note that the value of edited\n\t\t// content takes precedent over block content, and must fall through to the\n\t\t// default logic.\n\t\tconst postId = getCurrentPostId( state );\n\t\tconst postType = getCurrentPostType( state );\n\t\tconst record = select( coreStore ).getEditedEntityRecord(\n\t\t\t'postType',\n\t\t\tpostType,\n\t\t\tpostId\n\t\t);\n\t\tif ( typeof record.content !== 'function' ) {\n\t\t\treturn ! record.content;\n\t\t}\n\n\t\tconst blocks = getEditedPostAttribute( state, 'blocks' );\n\n\t\tif ( blocks.length === 0 ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Pierce the abstraction of the serializer in knowing that blocks are\n\t\t// joined with newlines such that even if every individual block\n\t\t// produces an empty save result, the serialized content is non-empty.\n\t\tif ( blocks.length > 1 ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// There are two conditions under which the optimization cannot be\n\t\t// assumed, and a fallthrough to getEditedPostContent must occur:\n\t\t//\n\t\t// 1. getBlocksForSerialization has special treatment in omitting a\n\t\t// single unmodified default block.\n\t\t// 2. Comment delimiters are omitted for a freeform or unregistered\n\t\t// block in its serialization. The freeform block specifically may\n\t\t// produce an empty string in its saved output.\n\t\t//\n\t\t// For all other content, the single block is assumed to make a post\n\t\t// non-empty, if only by virtue of its own comment delimiters.\n\t\tconst blockName = blocks[ 0 ].name;\n\t\tif (\n\t\t\tblockName !== getDefaultBlockName() &&\n\t\t\tblockName !== getFreeformContentHandlerName()\n\t\t) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn ! getEditedPostContent( state );\n\t}\n);\n\n/**\n * Returns true if the post can be autosaved, or false otherwise.\n *\n * @param {Object} state Global application state.\n * @param {Object} autosave A raw autosave object from the REST API.\n *\n * @return {boolean} Whether the post can be autosaved.\n */\nexport const isEditedPostAutosaveable = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\t// A post must contain a title, an excerpt, or non-empty content to be valid for autosaving.\n\t\tif ( ! isEditedPostSaveable( state ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// A post is not autosavable when there is a post autosave lock.\n\t\tif ( isPostAutosavingLocked( state ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst postType = getCurrentPostType( state );\n\t\tconst postTypeObject = select( coreStore ).getPostType( postType );\n\n\t\t// Currently template autosaving is not supported.\n\t\t// @todo: Remove hardcode check for template after bumping required WP version to 6.8.\n\t\tif (\n\t\t\tpostType === 'wp_template' ||\n\t\t\t! postTypeObject?.supports?.autosave\n\t\t) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst postId = getCurrentPostId( state );\n\t\tconst hasFetchedAutosave = select( coreStore ).hasFetchedAutosaves(\n\t\t\tpostType,\n\t\t\tpostId\n\t\t);\n\t\tconst currentUserId = select( coreStore ).getCurrentUser()?.id;\n\n\t\t// Disable reason - this line causes the side-effect of fetching the autosave\n\t\t// via a resolver, moving below the return would result in the autosave never\n\t\t// being fetched.\n\t\t// eslint-disable-next-line @wordpress/no-unused-vars-before-return\n\t\tconst autosave = select( coreStore ).getAutosave(\n\t\t\tpostType,\n\t\t\tpostId,\n\t\t\tcurrentUserId\n\t\t);\n\n\t\t// If any existing autosaves have not yet been fetched, this function is\n\t\t// unable to determine if the post is autosaveable, so return false.\n\t\tif ( ! hasFetchedAutosave ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// If we don't already have an autosave, the post is autosaveable.\n\t\tif ( ! autosave ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// To avoid an expensive content serialization, use the content dirtiness\n\t\t// flag in place of content field comparison against the known autosave.\n\t\t// This is not strictly accurate, and relies on a tolerance toward autosave\n\t\t// request failures for unnecessary saves.\n\t\tif ( hasChangedContent( state ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// If title, excerpt, or meta have changed, the post is autosaveable.\n\t\treturn [ 'title', 'excerpt', 'meta' ].some(\n\t\t\t( field ) =>\n\t\t\t\tgetPostRawValue( autosave[ field ] ) !==\n\t\t\t\tgetEditedPostAttribute( state, field )\n\t\t);\n\t}\n);\n\n/**\n * Return true if the post being edited is being scheduled. Preferring the\n * unsaved status values.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the post has been published.\n */\nexport function isEditedPostBeingScheduled( state ) {\n\tconst date = getEditedPostAttribute( state, 'date' );\n\t// Offset the date by one minute (network latency).\n\tconst checkedDate = new Date(\n\t\tNumber( getDate( date ) ) - ONE_MINUTE_IN_MS\n\t);\n\n\treturn isInTheFuture( checkedDate );\n}\n\n/**\n * Returns whether the current post should be considered to have a \"floating\"\n * date (i.e. that it would publish \"Immediately\" rather than at a set time).\n *\n * Unlike in the PHP backend, the REST API returns a full date string for posts\n * where the 0000-00-00T00:00:00 placeholder is present in the database. To\n * infer that a post is set to publish \"Immediately\" we check whether the date\n * and modified date are the same.\n *\n * @param {Object} state Editor state.\n *\n * @return {boolean} Whether the edited post has a floating date value.\n */\nexport function isEditedPostDateFloating( state ) {\n\tconst date = getEditedPostAttribute( state, 'date' );\n\tconst modified = getEditedPostAttribute( state, 'modified' );\n\n\t// This should be the status of the persisted post\n\t// It shouldn't use the \"edited\" status otherwise it breaks the\n\t// inferred post data floating status\n\t// See https://github.com/WordPress/gutenberg/issues/28083.\n\tconst status = getCurrentPost( state ).status;\n\tif (\n\t\tstatus === 'draft' ||\n\t\tstatus === 'auto-draft' ||\n\t\tstatus === 'pending'\n\t) {\n\t\treturn date === modified || date === null;\n\t}\n\treturn false;\n}\n\n/**\n * Returns true if the post is currently being deleted, or false otherwise.\n *\n * @param {Object} state Editor state.\n *\n * @return {boolean} Whether post is being deleted.\n */\nexport function isDeletingPost( state ) {\n\treturn !! state.deleting.pending;\n}\n\n/**\n * Returns true if the post is currently being saved, or false otherwise.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether post is being saved.\n */\nexport function isSavingPost( state ) {\n\treturn !! state.saving.pending;\n}\n\n/**\n * Returns true if non-post entities are currently being saved, or false otherwise.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether non-post entities are being saved.\n */\nexport const isSavingNonPostEntityChanges = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\tconst entitiesBeingSaved =\n\t\t\tselect( coreStore ).__experimentalGetEntitiesBeingSaved();\n\t\tconst { type, id } = getCurrentPost( state );\n\t\treturn entitiesBeingSaved.some(\n\t\t\t( entityRecord ) =>\n\t\t\t\tentityRecord.kind !== 'postType' ||\n\t\t\t\tentityRecord.name !== type ||\n\t\t\t\tentityRecord.key !== id\n\t\t);\n\t}\n);\n\n/**\n * Returns true if a previous post save was attempted successfully, or false\n * otherwise.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the post was saved successfully.\n */\nexport const didPostSaveRequestSucceed = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\tconst postType = getCurrentPostType( state );\n\t\tconst postId = getCurrentPostId( state );\n\t\treturn ! select( coreStore ).getLastEntitySaveError(\n\t\t\t'postType',\n\t\t\tpostType,\n\t\t\tpostId\n\t\t);\n\t}\n);\n\n/**\n * Returns true if a previous post save was attempted but failed, or false\n * otherwise.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the post save failed.\n */\nexport const didPostSaveRequestFail = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\tconst postType = getCurrentPostType( state );\n\t\tconst postId = getCurrentPostId( state );\n\t\treturn !! select( coreStore ).getLastEntitySaveError(\n\t\t\t'postType',\n\t\t\tpostType,\n\t\t\tpostId\n\t\t);\n\t}\n);\n\n/**\n * Returns true if the post is autosaving, or false otherwise.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the post is autosaving.\n */\nexport function isAutosavingPost( state ) {\n\treturn isSavingPost( state ) && Boolean( state.saving.options?.isAutosave );\n}\n\n/**\n * Returns true if the post is being previewed, or false otherwise.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the post is being previewed.\n */\nexport function isPreviewingPost( state ) {\n\treturn isSavingPost( state ) && Boolean( state.saving.options?.isPreview );\n}\n\n/**\n * Returns the post preview link\n *\n * @param {Object} state Global application state.\n *\n * @return {string | undefined} Preview Link.\n */\nexport function getEditedPostPreviewLink( state ) {\n\tif ( state.saving.pending || isSavingPost( state ) ) {\n\t\treturn;\n\t}\n\n\tlet previewLink = getAutosaveAttribute( state, 'preview_link' );\n\t// Fix for issue: https://github.com/WordPress/gutenberg/issues/33616\n\t// If the post is draft, ignore the preview link from the autosave record,\n\t// because the preview could be a stale autosave if the post was switched from\n\t// published to draft.\n\t// See: https://github.com/WordPress/gutenberg/pull/37952.\n\tif ( ! previewLink || 'draft' === getCurrentPost( state ).status ) {\n\t\tpreviewLink = getEditedPostAttribute( state, 'link' );\n\t\tif ( previewLink ) {\n\t\t\tpreviewLink = addQueryArgs( previewLink, { preview: true } );\n\t\t}\n\t}\n\tconst featuredImageId = getEditedPostAttribute( state, 'featured_media' );\n\n\tif ( previewLink && featuredImageId ) {\n\t\treturn addQueryArgs( previewLink, { _thumbnail_id: featuredImageId } );\n\t}\n\n\treturn previewLink;\n}\n\n/**\n * Returns a suggested post format for the current post, inferred only if there\n * is a single block within the post and it is of a type known to match a\n * default post format. Returns null if the format cannot be determined.\n *\n * @return {?string} Suggested post format.\n */\nexport const getSuggestedPostFormat = createRegistrySelector(\n\t( select ) => () => {\n\t\tconst blocks = select( blockEditorStore ).getBlocks();\n\n\t\tif ( blocks.length > 2 ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tlet name;\n\t\t// If there is only one block in the content of the post grab its name\n\t\t// so we can derive a suitable post format from it.\n\t\tif ( blocks.length === 1 ) {\n\t\t\tname = blocks[ 0 ].name;\n\t\t\t// Check for core/embed `video` and `audio` eligible suggestions.\n\t\t\tif ( name === 'core/embed' ) {\n\t\t\t\tconst provider = blocks[ 0 ].attributes?.providerNameSlug;\n\t\t\t\tif ( [ 'youtube', 'vimeo' ].includes( provider ) ) {\n\t\t\t\t\tname = 'core/video';\n\t\t\t\t} else if ( [ 'spotify', 'soundcloud' ].includes( provider ) ) {\n\t\t\t\t\tname = 'core/audio';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// If there are two blocks in the content and the last one is a text blocks\n\t\t// grab the name of the first one to also suggest a post format from it.\n\t\tif ( blocks.length === 2 && blocks[ 1 ].name === 'core/paragraph' ) {\n\t\t\tname = blocks[ 0 ].name;\n\t\t}\n\n\t\t// We only convert to default post formats in core.\n\t\tswitch ( name ) {\n\t\t\tcase 'core/image':\n\t\t\t\treturn 'image';\n\t\t\tcase 'core/quote':\n\t\t\tcase 'core/pullquote':\n\t\t\t\treturn 'quote';\n\t\t\tcase 'core/gallery':\n\t\t\t\treturn 'gallery';\n\t\t\tcase 'core/video':\n\t\t\t\treturn 'video';\n\t\t\tcase 'core/audio':\n\t\t\t\treturn 'audio';\n\t\t\tdefault:\n\t\t\t\treturn null;\n\t\t}\n\t}\n);\n\n/**\n * Returns the content of the post being edited.\n *\n * @param {Object} state Global application state.\n *\n * @return {string} Post content.\n */\nexport const getEditedPostContent = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\tconst postId = getCurrentPostId( state );\n\t\tconst postType = getCurrentPostType( state );\n\t\tconst record = select( coreStore ).getEditedEntityRecord(\n\t\t\t'postType',\n\t\t\tpostType,\n\t\t\tpostId\n\t\t);\n\t\tif ( record ) {\n\t\t\tif ( typeof record.content === 'function' ) {\n\t\t\t\treturn record.content( record );\n\t\t\t} else if ( record.blocks ) {\n\t\t\t\treturn __unstableSerializeAndClean( record.blocks );\n\t\t\t} else if ( record.content ) {\n\t\t\t\treturn record.content;\n\t\t\t}\n\t\t}\n\t\treturn '';\n\t}\n);\n\n/**\n * Returns true if the post is being published, or false otherwise.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether post is being published.\n */\nexport function isPublishingPost( state ) {\n\treturn (\n\t\tisSavingPost( state ) &&\n\t\t! isCurrentPostPublished( state ) &&\n\t\tgetEditedPostAttribute( state, 'status' ) === 'publish'\n\t);\n}\n\n/**\n * Returns whether the permalink is editable or not.\n *\n * @param {Object} state Editor state.\n *\n * @return {boolean} Whether or not the permalink is editable.\n */\nexport function isPermalinkEditable( state ) {\n\tconst permalinkTemplate = getEditedPostAttribute(\n\t\tstate,\n\t\t'permalink_template'\n\t);\n\n\treturn PERMALINK_POSTNAME_REGEX.test( permalinkTemplate );\n}\n\n/**\n * Returns the permalink for the post.\n *\n * @param {Object} state Editor state.\n *\n * @return {?string} The permalink, or null if the post is not viewable.\n */\nexport function getPermalink( state ) {\n\tconst permalinkParts = getPermalinkParts( state );\n\tif ( ! permalinkParts ) {\n\t\treturn null;\n\t}\n\n\tconst { prefix, postName, suffix } = permalinkParts;\n\n\tif ( isPermalinkEditable( state ) ) {\n\t\treturn prefix + postName + suffix;\n\t}\n\n\treturn prefix;\n}\n\n/**\n * Returns the slug for the post being edited, preferring a manually edited\n * value if one exists, then a sanitized version of the current post title, and\n * finally the post ID.\n *\n * @param {Object} state Editor state.\n *\n * @return {string} The current slug to be displayed in the editor\n */\nexport function getEditedPostSlug( state ) {\n\treturn (\n\t\tgetEditedPostAttribute( state, 'slug' ) ||\n\t\tcleanForSlug( getEditedPostAttribute( state, 'title' ) ) ||\n\t\tgetCurrentPostId( state )\n\t);\n}\n\n/**\n * Returns the permalink for a post, split into its three parts: the prefix,\n * the postName, and the suffix.\n *\n * @param {Object} state Editor state.\n *\n * @return {Object} An object containing the prefix, postName, and suffix for\n * the permalink, or null if the post is not viewable.\n */\nexport function getPermalinkParts( state ) {\n\tconst permalinkTemplate = getEditedPostAttribute(\n\t\tstate,\n\t\t'permalink_template'\n\t);\n\tif ( ! permalinkTemplate ) {\n\t\treturn null;\n\t}\n\n\tconst postName =\n\t\tgetEditedPostAttribute( state, 'slug' ) ||\n\t\tgetEditedPostAttribute( state, 'generated_slug' );\n\n\tconst [ prefix, suffix ] = permalinkTemplate.split(\n\t\tPERMALINK_POSTNAME_REGEX\n\t);\n\n\treturn {\n\t\tprefix,\n\t\tpostName,\n\t\tsuffix,\n\t};\n}\n\n/**\n * Returns whether the post is locked.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Is locked.\n */\nexport function isPostLocked( state ) {\n\treturn state.postLock.isLocked;\n}\n\n/**\n * Returns whether post saving is locked.\n *\n * @param {Object} state Global application state.\n *\n * @example\n * ```jsx\n * import { __ } from '@wordpress/i18n';\n * import { store as editorStore } from '@wordpress/editor';\n * import { useSelect } from '@wordpress/data';\n *\n * const ExampleComponent = () => {\n * \tconst isSavingLocked = useSelect(\n * \t\t( select ) => select( editorStore ).isPostSavingLocked(),\n * \t\t[]\n * \t);\n *\n * \treturn isSavingLocked ? (\n * \t\t<p>{ __( 'Post saving is locked' ) }</p>\n * \t) : (\n * \t\t<p>{ __( 'Post saving is not locked' ) }</p>\n * \t);\n * };\n * ```\n *\n * @return {boolean} Is locked.\n */\nexport function isPostSavingLocked( state ) {\n\treturn Object.keys( state.postSavingLock ).length > 0;\n}\n\n/**\n * Returns whether post autosaving is locked.\n *\n * @param {Object} state Global application state.\n *\n * @example\n * ```jsx\n * import { __ } from '@wordpress/i18n';\n * import { store as editorStore } from '@wordpress/editor';\n * import { useSelect } from '@wordpress/data';\n *\n * const ExampleComponent = () => {\n * \tconst isAutoSavingLocked = useSelect(\n * \t\t( select ) => select( editorStore ).isPostAutosavingLocked(),\n * \t\t[]\n * \t);\n *\n * \treturn isAutoSavingLocked ? (\n * \t\t<p>{ __( 'Post auto saving is locked' ) }</p>\n * \t) : (\n * \t\t<p>{ __( 'Post auto saving is not locked' ) }</p>\n * \t);\n * };\n * ```\n *\n * @return {boolean} Is locked.\n */\nexport function isPostAutosavingLocked( state ) {\n\treturn Object.keys( state.postAutosavingLock ).length > 0;\n}\n\n/**\n * Returns whether the edition of the post has been taken over.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Is post lock takeover.\n */\nexport function isPostLockTakeover( state ) {\n\treturn state.postLock.isTakeover;\n}\n\n/**\n * Returns details about the post lock user.\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} A user object.\n */\nexport function getPostLockUser( state ) {\n\treturn state.postLock.user;\n}\n\n/**\n * Returns the active post lock.\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} The lock object.\n */\nexport function getActivePostLock( state ) {\n\treturn state.postLock.activePostLock;\n}\n\n/**\n * Returns whether or not the user has the unfiltered_html capability.\n *\n * @param {Object} state Editor state.\n *\n * @return {boolean} Whether the user can or can't post unfiltered HTML.\n */\nexport function canUserUseUnfilteredHTML( state ) {\n\treturn Boolean(\n\t\tgetCurrentPost( state )._links?.hasOwnProperty(\n\t\t\t'wp:action-unfiltered-html'\n\t\t)\n\t);\n}\n\n/**\n * Returns whether the pre-publish panel should be shown\n * or skipped when the user clicks the \"publish\" button.\n *\n * @return {boolean} Whether the pre-publish panel should be shown or not.\n */\nexport const isPublishSidebarEnabled = createRegistrySelector(\n\t( select ) => () =>\n\t\t!! select( preferencesStore ).get( 'core', 'isPublishSidebarEnabled' )\n);\n\n/**\n * Return the current block list.\n *\n * @param {Object} state\n * @return {Array} Block list.\n */\nexport const getEditorBlocks = createSelector(\n\t( state ) => {\n\t\treturn (\n\t\t\tgetEditedPostAttribute( state, 'blocks' ) ||\n\t\t\tparse( getEditedPostContent( state ) )\n\t\t);\n\t},\n\t( state ) => [\n\t\tgetEditedPostAttribute( state, 'blocks' ),\n\t\tgetEditedPostContent( state ),\n\t]\n);\n\n/**\n * Returns true if the given panel was programmatically removed, or false otherwise.\n * All panels are not removed by default.\n *\n * @param {Object} state Global application state.\n * @param {string} panelName A string that identifies the panel.\n *\n * @return {boolean} Whether or not the panel is removed.\n */\nexport function isEditorPanelRemoved( state, panelName ) {\n\treturn state.removedPanels.includes( panelName );\n}\n\n/**\n * Returns true if the given panel is enabled, or false otherwise. Panels are\n * enabled by default.\n *\n * @param {Object} state Global application state.\n * @param {string} panelName A string that identifies the panel.\n *\n * @return {boolean} Whether or not the panel is enabled.\n */\nexport const isEditorPanelEnabled = createRegistrySelector(\n\t( select ) => ( state, panelName ) => {\n\t\t// For backward compatibility, we check edit-post\n\t\t// even though now this is in \"editor\" package.\n\t\tconst inactivePanels = select( preferencesStore ).get(\n\t\t\t'core',\n\t\t\t'inactivePanels'\n\t\t);\n\t\treturn (\n\t\t\t! isEditorPanelRemoved( state, panelName ) &&\n\t\t\t! inactivePanels?.includes( panelName )\n\t\t);\n\t}\n);\n\n/**\n * Returns true if the given panel is open, or false otherwise. Panels are\n * closed by default.\n *\n * @param {Object} state Global application state.\n * @param {string} panelName A string that identifies the panel.\n *\n * @return {boolean} Whether or not the panel is open.\n */\nexport const isEditorPanelOpened = createRegistrySelector(\n\t( select ) => ( state, panelName ) => {\n\t\t// For backward compatibility, we check edit-post\n\t\t// even though now this is in \"editor\" package.\n\t\tconst openPanels = select( preferencesStore ).get(\n\t\t\t'core',\n\t\t\t'openPanels'\n\t\t);\n\t\treturn !! openPanels?.includes( panelName );\n\t}\n);\n\n/**\n * A block selection object.\n *\n * @typedef {Object} WPBlockSelection\n *\n * @property {string} clientId A block client ID.\n * @property {string} attributeKey A block attribute key.\n * @property {number} offset An attribute value offset, based on the rich\n * text value. See `wp.richText.create`.\n */\n\n/**\n * Returns the current selection start.\n *\n * @deprecated since Gutenberg 10.0.0.\n *\n * @param {Object} state\n * @return {WPBlockSelection} The selection start.\n */\nexport function getEditorSelectionStart( state ) {\n\tdeprecated( \"select('core/editor').getEditorSelectionStart\", {\n\t\tsince: '5.8',\n\t\talternative: \"select('core/editor').getEditorSelection\",\n\t} );\n\treturn getEditedPostAttribute( state, 'selection' )?.selectionStart;\n}\n\n/**\n * Returns the current selection end.\n *\n * @deprecated since Gutenberg 10.0.0.\n *\n * @param {Object} state\n * @return {WPBlockSelection} The selection end.\n */\nexport function getEditorSelectionEnd( state ) {\n\tdeprecated( \"select('core/editor').getEditorSelectionStart\", {\n\t\tsince: '5.8',\n\t\talternative: \"select('core/editor').getEditorSelection\",\n\t} );\n\treturn getEditedPostAttribute( state, 'selection' )?.selectionEnd;\n}\n\n/**\n * Returns the current selection.\n *\n * @param {Object} state\n * @return {WPBlockSelection} The selection end.\n */\nexport function getEditorSelection( state ) {\n\treturn getEditedPostAttribute( state, 'selection' );\n}\n\n/**\n * Is the editor ready\n *\n * @param {Object} state\n * @return {boolean} is Ready.\n */\nexport function __unstableIsEditorReady( state ) {\n\treturn !! state.postId;\n}\n\n/**\n * Returns the post editor settings.\n *\n * @param {Object} state Editor state.\n *\n * @return {Object} The editor settings object.\n */\nexport function getEditorSettings( state ) {\n\treturn state.editorSettings;\n}\n\n/**\n * Returns the post editor's rendering mode.\n *\n * @param {Object} state Editor state.\n *\n * @return {string} Rendering mode.\n */\nexport function getRenderingMode( state ) {\n\treturn state.renderingMode;\n}\n\n/**\n * Returns the current editing canvas device type.\n *\n * @param {Object} state Global application state.\n *\n * @return {string} Device type.\n */\nexport const getDeviceType = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\tconst isZoomOut = unlock( select( blockEditorStore ) ).isZoomOut();\n\t\tif ( isZoomOut ) {\n\t\t\treturn 'Desktop';\n\t\t}\n\t\treturn state.deviceType;\n\t}\n);\n\n/**\n * Returns true if the list view is opened.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the list view is opened.\n */\nexport function isListViewOpened( state ) {\n\treturn state.listViewPanel;\n}\n\n/**\n * Returns true if the inserter is opened.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the inserter is opened.\n */\nexport function isInserterOpened( state ) {\n\treturn !! state.blockInserterPanel;\n}\n\n/**\n * Returns the current editing mode.\n *\n * @param {Object} state Global application state.\n *\n * @return {string} Editing mode.\n */\nexport const getEditorMode = createRegistrySelector(\n\t( select ) => () =>\n\t\tselect( preferencesStore ).get( 'core', 'editorMode' ) ?? 'visual'\n);\n\n/*\n * Backward compatibility\n */\n\n/**\n * Returns state object prior to a specified optimist transaction ID, or `null`\n * if the transaction corresponding to the given ID cannot be found.\n *\n * @deprecated since Gutenberg 9.7.0.\n */\nexport function getStateBeforeOptimisticTransaction() {\n\tdeprecated( \"select('core/editor').getStateBeforeOptimisticTransaction\", {\n\t\tsince: '5.7',\n\t\thint: 'No state history is kept on this store anymore',\n\t} );\n\n\treturn null;\n}\n/**\n * Returns true if an optimistic transaction is pending commit, for which the\n * before state satisfies the given predicate function.\n *\n * @deprecated since Gutenberg 9.7.0.\n */\nexport function inSomeHistory() {\n\tdeprecated( \"select('core/editor').inSomeHistory\", {\n\t\tsince: '5.7',\n\t\thint: 'No state history is kept on this store anymore',\n\t} );\n\treturn false;\n}\n\nfunction getBlockEditorSelector( name ) {\n\treturn createRegistrySelector( ( select ) => ( state, ...args ) => {\n\t\tdeprecated( \"`wp.data.select( 'core/editor' ).\" + name + '`', {\n\t\t\tsince: '5.3',\n\t\t\talternative: \"`wp.data.select( 'core/block-editor' ).\" + name + '`',\n\t\t\tversion: '6.2',\n\t\t} );\n\n\t\treturn select( blockEditorStore )[ name ]( ...args );\n\t} );\n}\n\n/**\n * @see getBlockName in core/block-editor store.\n */\nexport const getBlockName = getBlockEditorSelector( 'getBlockName' );\n\n/**\n * @see isBlockValid in core/block-editor store.\n */\nexport const isBlockValid = getBlockEditorSelector( 'isBlockValid' );\n\n/**\n * @see getBlockAttributes in core/block-editor store.\n */\nexport const getBlockAttributes =\n\tgetBlockEditorSelector( 'getBlockAttributes' );\n\n/**\n * @see getBlock in core/block-editor store.\n */\nexport const getBlock = getBlockEditorSelector( 'getBlock' );\n\n/**\n * @see getBlocks in core/block-editor store.\n */\nexport const getBlocks = getBlockEditorSelector( 'getBlocks' );\n\n/**\n * @see getClientIdsOfDescendants in core/block-editor store.\n */\nexport const getClientIdsOfDescendants = getBlockEditorSelector(\n\t'getClientIdsOfDescendants'\n);\n\n/**\n * @see getClientIdsWithDescendants in core/block-editor store.\n */\nexport const getClientIdsWithDescendants = getBlockEditorSelector(\n\t'getClientIdsWithDescendants'\n);\n\n/**\n * @see getGlobalBlockCount in core/block-editor store.\n */\nexport const getGlobalBlockCount = getBlockEditorSelector(\n\t'getGlobalBlockCount'\n);\n\n/**\n * @see getBlocksByClientId in core/block-editor store.\n */\nexport const getBlocksByClientId = getBlockEditorSelector(\n\t'getBlocksByClientId'\n);\n\n/**\n * @see getBlockCount in core/block-editor store.\n */\nexport const getBlockCount = getBlockEditorSelector( 'getBlockCount' );\n\n/**\n * @see getBlockSelectionStart in core/block-editor store.\n */\nexport const getBlockSelectionStart = getBlockEditorSelector(\n\t'getBlockSelectionStart'\n);\n\n/**\n * @see getBlockSelectionEnd in core/block-editor store.\n */\nexport const getBlockSelectionEnd = getBlockEditorSelector(\n\t'getBlockSelectionEnd'\n);\n\n/**\n * @see getSelectedBlockCount in core/block-editor store.\n */\nexport const getSelectedBlockCount = getBlockEditorSelector(\n\t'getSelectedBlockCount'\n);\n\n/**\n * @see hasSelectedBlock in core/block-editor store.\n */\nexport const hasSelectedBlock = getBlockEditorSelector( 'hasSelectedBlock' );\n\n/**\n * @see getSelectedBlockClientId in core/block-editor store.\n */\nexport const getSelectedBlockClientId = getBlockEditorSelector(\n\t'getSelectedBlockClientId'\n);\n\n/**\n * @see getSelectedBlock in core/block-editor store.\n */\nexport const getSelectedBlock = getBlockEditorSelector( 'getSelectedBlock' );\n\n/**\n * @see getBlockRootClientId in core/block-editor store.\n */\nexport const getBlockRootClientId = getBlockEditorSelector(\n\t'getBlockRootClientId'\n);\n\n/**\n * @see getBlockHierarchyRootClientId in core/block-editor store.\n */\nexport const getBlockHierarchyRootClientId = getBlockEditorSelector(\n\t'getBlockHierarchyRootClientId'\n);\n\n/**\n * @see getAdjacentBlockClientId in core/block-editor store.\n */\nexport const getAdjacentBlockClientId = getBlockEditorSelector(\n\t'getAdjacentBlockClientId'\n);\n\n/**\n * @see getPreviousBlockClientId in core/block-editor store.\n */\nexport const getPreviousBlockClientId = getBlockEditorSelector(\n\t'getPreviousBlockClientId'\n);\n\n/**\n * @see getNextBlockClientId in core/block-editor store.\n */\nexport const getNextBlockClientId = getBlockEditorSelector(\n\t'getNextBlockClientId'\n);\n\n/**\n * @see getSelectedBlocksInitialCaretPosition in core/block-editor store.\n */\nexport const getSelectedBlocksInitialCaretPosition = getBlockEditorSelector(\n\t'getSelectedBlocksInitialCaretPosition'\n);\n\n/**\n * @see getMultiSelectedBlockClientIds in core/block-editor store.\n */\nexport const getMultiSelectedBlockClientIds = getBlockEditorSelector(\n\t'getMultiSelectedBlockClientIds'\n);\n\n/**\n * @see getMultiSelectedBlocks in core/block-editor store.\n */\nexport const getMultiSelectedBlocks = getBlockEditorSelector(\n\t'getMultiSelectedBlocks'\n);\n\n/**\n * @see getFirstMultiSelectedBlockClientId in core/block-editor store.\n */\nexport const getFirstMultiSelectedBlockClientId = getBlockEditorSelector(\n\t'getFirstMultiSelectedBlockClientId'\n);\n\n/**\n * @see getLastMultiSelectedBlockClientId in core/block-editor store.\n */\nexport const getLastMultiSelectedBlockClientId = getBlockEditorSelector(\n\t'getLastMultiSelectedBlockClientId'\n);\n\n/**\n * @see isFirstMultiSelectedBlock in core/block-editor store.\n */\nexport const isFirstMultiSelectedBlock = getBlockEditorSelector(\n\t'isFirstMultiSelectedBlock'\n);\n\n/**\n * @see isBlockMultiSelected in core/block-editor store.\n */\nexport const isBlockMultiSelected = getBlockEditorSelector(\n\t'isBlockMultiSelected'\n);\n\n/**\n * @see isAncestorMultiSelected in core/block-editor store.\n */\nexport const isAncestorMultiSelected = getBlockEditorSelector(\n\t'isAncestorMultiSelected'\n);\n\n/**\n * @see getMultiSelectedBlocksStartClientId in core/block-editor store.\n */\nexport const getMultiSelectedBlocksStartClientId = getBlockEditorSelector(\n\t'getMultiSelectedBlocksStartClientId'\n);\n\n/**\n * @see getMultiSelectedBlocksEndClientId in core/block-editor store.\n */\nexport const getMultiSelectedBlocksEndClientId = getBlockEditorSelector(\n\t'getMultiSelectedBlocksEndClientId'\n);\n\n/**\n * @see getBlockOrder in core/block-editor store.\n */\nexport const getBlockOrder = getBlockEditorSelector( 'getBlockOrder' );\n\n/**\n * @see getBlockIndex in core/block-editor store.\n */\nexport const getBlockIndex = getBlockEditorSelector( 'getBlockIndex' );\n\n/**\n * @see isBlockSelected in core/block-editor store.\n */\nexport const isBlockSelected = getBlockEditorSelector( 'isBlockSelected' );\n\n/**\n * @see hasSelectedInnerBlock in core/block-editor store.\n */\nexport const hasSelectedInnerBlock = getBlockEditorSelector(\n\t'hasSelectedInnerBlock'\n);\n\n/**\n * @see isBlockWithinSelection in core/block-editor store.\n */\nexport const isBlockWithinSelection = getBlockEditorSelector(\n\t'isBlockWithinSelection'\n);\n\n/**\n * @see hasMultiSelection in core/block-editor store.\n */\nexport const hasMultiSelection = getBlockEditorSelector( 'hasMultiSelection' );\n\n/**\n * @see isMultiSelecting in core/block-editor store.\n */\nexport const isMultiSelecting = getBlockEditorSelector( 'isMultiSelecting' );\n\n/**\n * @see isSelectionEnabled in core/block-editor store.\n */\nexport const isSelectionEnabled =\n\tgetBlockEditorSelector( 'isSelectionEnabled' );\n\n/**\n * @see getBlockMode in core/block-editor store.\n */\nexport const getBlockMode = getBlockEditorSelector( 'getBlockMode' );\n\n/**\n * @see isTyping in core/block-editor store.\n */\nexport const isTyping = getBlockEditorSelector( 'isTyping' );\n\n/**\n * @see isCaretWithinFormattedText in core/block-editor store.\n */\nexport const isCaretWithinFormattedText = getBlockEditorSelector(\n\t'isCaretWithinFormattedText'\n);\n\n/**\n * @see getBlockInsertionPoint in core/block-editor store.\n */\nexport const getBlockInsertionPoint = getBlockEditorSelector(\n\t'getBlockInsertionPoint'\n);\n\n/**\n * @see isBlockInsertionPointVisible in core/block-editor store.\n */\nexport const isBlockInsertionPointVisible = getBlockEditorSelector(\n\t'isBlockInsertionPointVisible'\n);\n\n/**\n * @see isValidTemplate in core/block-editor store.\n */\nexport const isValidTemplate = getBlockEditorSelector( 'isValidTemplate' );\n\n/**\n * @see getTemplate in core/block-editor store.\n */\nexport const getTemplate = getBlockEditorSelector( 'getTemplate' );\n\n/**\n * @see getTemplateLock in core/block-editor store.\n */\nexport const getTemplateLock = getBlockEditorSelector( 'getTemplateLock' );\n\n/**\n * @see canInsertBlockType in core/block-editor store.\n */\nexport const canInsertBlockType =\n\tgetBlockEditorSelector( 'canInsertBlockType' );\n\n/**\n * @see getInserterItems in core/block-editor store.\n */\nexport const getInserterItems = getBlockEditorSelector( 'getInserterItems' );\n\n/**\n * @see hasInserterItems in core/block-editor store.\n */\nexport const hasInserterItems = getBlockEditorSelector( 'hasInserterItems' );\n\n/**\n * @see getBlockListSettings in core/block-editor store.\n */\nexport const getBlockListSettings = getBlockEditorSelector(\n\t'getBlockListSettings'\n);\n\nexport const __experimentalGetDefaultTemplateTypes = createRegistrySelector(\n\t( select ) => () => {\n\t\tdeprecated(\n\t\t\t\"select('core/editor').__experimentalGetDefaultTemplateTypes\",\n\t\t\t{\n\t\t\t\tsince: '6.8',\n\t\t\t\talternative:\n\t\t\t\t\t\"select('core/core-data').getCurrentTheme()?.default_template_types\",\n\t\t\t}\n\t\t);\n\t\treturn select( coreStore ).getCurrentTheme()?.default_template_types;\n\t}\n);\n\n/**\n * Returns the default template part areas.\n *\n * @param {Object} state Global application state.\n *\n * @return {Array} The template part areas.\n */\nexport const __experimentalGetDefaultTemplatePartAreas = createRegistrySelector(\n\t( select ) =>\n\t\tcreateSelector( () => {\n\t\t\tdeprecated(\n\t\t\t\t\"select('core/editor').__experimentalGetDefaultTemplatePartAreas\",\n\t\t\t\t{\n\t\t\t\t\tsince: '6.8',\n\t\t\t\t\talternative:\n\t\t\t\t\t\t\"select('core/core-data').getCurrentTheme()?.default_template_part_areas\",\n\t\t\t\t}\n\t\t\t);\n\n\t\t\tconst areas =\n\t\t\t\tselect( coreStore ).getCurrentTheme()\n\t\t\t\t\t?.default_template_part_areas || [];\n\n\t\t\treturn areas.map( ( item ) => {\n\t\t\t\treturn { ...item, icon: getTemplatePartIcon( item.icon ) };\n\t\t\t} );\n\t\t} )\n);\n\n/**\n * Returns a default template type searched by slug.\n *\n * @param {Object} state Global application state.\n * @param {string} slug The template type slug.\n *\n * @return {Object} The template type.\n */\nexport const __experimentalGetDefaultTemplateType = createRegistrySelector(\n\t( select ) =>\n\t\tcreateSelector( ( state, slug ) => {\n\t\t\tdeprecated(\n\t\t\t\t\"select('core/editor').__experimentalGetDefaultTemplateType\",\n\t\t\t\t{\n\t\t\t\t\tsince: '6.8',\n\t\t\t\t}\n\t\t\t);\n\t\t\tconst templateTypes =\n\t\t\t\tselect( coreStore ).getCurrentTheme()?.default_template_types;\n\n\t\t\tif ( ! templateTypes ) {\n\t\t\t\treturn EMPTY_OBJECT;\n\t\t\t}\n\n\t\t\treturn (\n\t\t\t\tObject.values( templateTypes ).find(\n\t\t\t\t\t( type ) => type.slug === slug\n\t\t\t\t) ?? EMPTY_OBJECT\n\t\t\t);\n\t\t} )\n);\n\n/**\n * Given a template entity, return information about it which is ready to be\n * rendered, such as the title, description, and icon.\n *\n * @param {Object} state Global application state.\n * @param {Object} template The template for which we need information.\n * @return {Object} Information about the template, including title, description, and icon.\n */\nexport const __experimentalGetTemplateInfo = createRegistrySelector(\n\t( select ) =>\n\t\tcreateSelector( ( state, template ) => {\n\t\t\tdeprecated( \"select('core/editor').__experimentalGetTemplateInfo\", {\n\t\t\t\tsince: '6.8',\n\t\t\t} );\n\n\t\t\tif ( ! template ) {\n\t\t\t\treturn EMPTY_OBJECT;\n\t\t\t}\n\n\t\t\tconst currentTheme = select( coreStore ).getCurrentTheme();\n\n\t\t\tconst templateTypes = currentTheme?.default_template_types || [];\n\t\t\tconst templateAreas =\n\t\t\t\tcurrentTheme?.default_template_part_areas || [];\n\n\t\t\treturn getTemplateInfo( {\n\t\t\t\ttemplate,\n\t\t\t\ttemplateAreas,\n\t\t\t\ttemplateTypes,\n\t\t\t} );\n\t\t} )\n);\n\n/**\n * Returns a post type label depending on the current post.\n *\n * @param {Object} state Global application state.\n *\n * @return {string|undefined} The post type label if available, otherwise undefined.\n */\nexport const getPostTypeLabel = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\tconst currentPostType = getCurrentPostType( state );\n\t\tconst postType = select( coreStore ).getPostType( currentPostType );\n\t\t// Disable reason: Post type labels object is shaped like this.\n\t\t// eslint-disable-next-line camelcase\n\t\treturn postType?.labels?.singular_name;\n\t}\n);\n\n/**\n * Returns true if the publish sidebar is opened.\n *\n * @param {Object} state Global application state\n *\n * @return {boolean} Whether the publish sidebar is open.\n */\nexport function isPublishSidebarOpened( state ) {\n\treturn state.publishSidebarActive;\n}\n"],
5
- "mappings": "AAGA;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACM;AACP,SAAS,eAAe,eAAe;AACvC,SAAS,cAAc,oBAAoB;AAC3C,SAAS,gBAAgB,8BAA8B;AACvD,OAAO,gBAAgB;AACvB,SAAS,gBAAgB;AACzB,SAAS,SAAS,wBAAwB;AAC1C,SAAS,SAAS,iBAAiB;AACnC,SAAS,SAAS,wBAAwB;AAK1C;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACM;AACP,SAAS,uBAAuB;AAChC,SAAS,2BAA2B;AACpC,SAAS,cAAc;AACvB,SAAS,uBAAuB;AAShC,MAAM,eAAe,CAAC;AASf,MAAM,gBAAgB,uBAAwB,CAAE,WAAY,MAAM;AACxE,SAAO,OAAQ,SAAU,EAAE,QAAQ;AACpC,CAAE;AAUK,MAAM,gBAAgB,uBAAwB,CAAE,WAAY,MAAM;AACxE,SAAO,OAAQ,SAAU,EAAE,QAAQ;AACpC,CAAE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AAG,MAAM,MAAM,oBAAqB,KAAK,IAAK,EAAE;AAAA,IAC1D,CAAE;AAAA,EACH,CAAE;AACJ;AAUO,MAAM,uCAAuC;AAAA,EACnD,CAAE,WACD,eAAgB,CAAE,OAAO,SAAU;AAClC;AAAA,MACC;AAAA,MACA;AAAA,QACC,OAAO;AAAA,MACR;AAAA,IACD;AACA,UAAM,gBACL,OAAQ,SAAU,EAAE,gBAAgB,GAAG;AAExC,QAAK,CAAE,eAAgB;AACtB,aAAO;AAAA,IACR;AAEA,WACC,OAAO,OAAQ,aAAc,EAAE;AAAA,MAC9B,CAAE,SAAU,KAAK,SAAS;AAAA,IAC3B,KAAK;AAAA,EAEP,CAAE;AACJ;AAUO,MAAM,gCAAgC;AAAA,EAC5C,CAAE,WACD,eAAgB,CAAE,OAAO,aAAc;AACtC,eAAY,uDAAuD;AAAA,MAClE,OAAO;AAAA,IACR,CAAE;AAEF,QAAK,CAAE,UAAW;AACjB,aAAO;AAAA,IACR;AAEA,UAAM,eAAe,OAAQ,SAAU,EAAE,gBAAgB;AAEzD,UAAM,gBAAgB,cAAc,0BAA0B,CAAC;AAC/D,UAAM,gBACL,cAAc,+BAA+B,CAAC;AAE/C,WAAO,gBAAiB;AAAA,MACvB;AAAA,MACA;AAAA,MACA;AAAA,IACD,CAAE;AAAA,EACH,CAAE;AACJ;AASO,MAAM,mBAAmB;AAAA,EAC/B,CAAE,WAAY,CAAE,UAAW;AAC1B,UAAM,kBAAkB,mBAAoB,KAAM;AAClD,UAAM,WAAW,OAAQ,SAAU,EAAE,YAAa,eAAgB;AAGlE,WAAO,UAAU,QAAQ;AAAA,EAC1B;AACD;AASO,SAAS,uBAAwB,OAAQ;AAC/C,SAAO,MAAM;AACd;",
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport {\n\tgetFreeformContentHandlerName,\n\tgetDefaultBlockName,\n\t__unstableSerializeAndClean,\n\tparse,\n} from '@wordpress/blocks';\nimport { isInTheFuture, getDate } from '@wordpress/date';\nimport { addQueryArgs, cleanForSlug } from '@wordpress/url';\nimport { createSelector, createRegistrySelector } from '@wordpress/data';\nimport deprecated from '@wordpress/deprecated';\nimport { Platform } from '@wordpress/element';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport {\n\tEDIT_MERGE_PROPERTIES,\n\tPERMALINK_POSTNAME_REGEX,\n\tONE_MINUTE_IN_MS,\n\tAUTOSAVE_PROPERTIES,\n} from './constants';\nimport { getPostRawValue } from './reducer';\nimport { getTemplatePartIcon } from '../utils/get-template-part-icon';\nimport { unlock } from '../lock-unlock';\nimport { getTemplateInfo } from '../utils/get-template-info';\n\n/**\n * Shared reference to an empty object for cases where it is important to avoid\n * returning a new object reference on every invocation, as in a connected or\n * other pure component which performs `shouldComponentUpdate` check on props.\n * This should be used as a last resort, since the normalized data should be\n * maintained by the reducer result in state.\n */\nconst EMPTY_OBJECT = {};\n\n/**\n * Returns true if any past editor history snapshots exist, or false otherwise.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether undo history exists.\n */\nexport const hasEditorUndo = createRegistrySelector( ( select ) => () => {\n\treturn select( coreStore ).hasUndo();\n} );\n\n/**\n * Returns true if any future editor history snapshots exist, or false\n * otherwise.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether redo history exists.\n */\nexport const hasEditorRedo = createRegistrySelector( ( select ) => () => {\n\treturn select( coreStore ).hasRedo();\n} );\n\n/**\n * Returns true if the currently edited post is yet to be saved, or false if\n * the post has been saved.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the post is new.\n */\nexport function isEditedPostNew( state ) {\n\treturn getCurrentPost( state ).status === 'auto-draft';\n}\n\n/**\n * Returns true if content includes unsaved changes, or false otherwise.\n *\n * @param {Object} state Editor state.\n *\n * @return {boolean} Whether content includes unsaved changes.\n */\nexport function hasChangedContent( state ) {\n\tconst edits = getPostEdits( state );\n\treturn 'content' in edits;\n}\n\n/**\n * Returns true if there are unsaved values for the current edit session, or\n * false if the editing state matches the saved or new post.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether unsaved values exist.\n */\nexport const isEditedPostDirty = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\t// Edits should contain only fields which differ from the saved post (reset\n\t\t// at initial load and save complete). Thus, a non-empty edits state can be\n\t\t// inferred to contain unsaved values.\n\t\tconst postType = getCurrentPostType( state );\n\t\tconst postId = getCurrentPostId( state );\n\t\treturn select( coreStore ).hasEditsForEntityRecord(\n\t\t\t'postType',\n\t\t\tpostType,\n\t\t\tpostId\n\t\t);\n\t}\n);\n\n/**\n * Returns true if there are unsaved edits for entities other than\n * the editor's post, and false otherwise.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether there are edits or not.\n */\nexport const hasNonPostEntityChanges = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\tconst dirtyEntityRecords =\n\t\t\tselect( coreStore ).__experimentalGetDirtyEntityRecords();\n\t\tconst { type, id } = getCurrentPost( state );\n\t\treturn dirtyEntityRecords.some(\n\t\t\t( entityRecord ) =>\n\t\t\t\tentityRecord.kind !== 'postType' ||\n\t\t\t\tentityRecord.name !== type ||\n\t\t\t\tentityRecord.key !== id\n\t\t);\n\t}\n);\n\n/**\n * Returns true if there are no unsaved values for the current edit session and\n * if the currently edited post is new (has never been saved before).\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether new post and unsaved values exist.\n */\nexport function isCleanNewPost( state ) {\n\treturn ! isEditedPostDirty( state ) && isEditedPostNew( state );\n}\n\n/**\n * Returns the post currently being edited in its last known saved state, not\n * including unsaved edits. Returns an object containing relevant default post\n * values if the post has not yet been saved.\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} Post object.\n */\nexport const getCurrentPost = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\tconst postId = getCurrentPostId( state );\n\t\tconst postType = getCurrentPostType( state );\n\n\t\tconst post = select( coreStore ).getRawEntityRecord(\n\t\t\t'postType',\n\t\t\tpostType,\n\t\t\tpostId\n\t\t);\n\t\tif ( post ) {\n\t\t\treturn post;\n\t\t}\n\n\t\t// This exists for compatibility with the previous selector behavior\n\t\t// which would guarantee an object return based on the editor reducer's\n\t\t// default empty object state.\n\t\treturn EMPTY_OBJECT;\n\t}\n);\n\n/**\n * Returns the post type of the post currently being edited.\n *\n * @param {Object} state Global application state.\n *\n * @example\n *\n *```js\n * const currentPostType = wp.data.select( 'core/editor' ).getCurrentPostType();\n *```\n * @return {string} Post type.\n */\nexport function getCurrentPostType( state ) {\n\treturn state.postType;\n}\n\n/**\n * Returns the ID of the post currently being edited, or null if the post has\n * not yet been saved.\n *\n * @param {Object} state Global application state.\n *\n * @return {?(number|string)} The current post ID (number) or template slug (string).\n */\nexport function getCurrentPostId( state ) {\n\treturn state.postId;\n}\n\n/**\n * Returns the template ID currently being rendered/edited\n *\n * @param {Object} state Global application state.\n *\n * @return {?string} Template ID.\n */\nexport function getCurrentTemplateId( state ) {\n\treturn state.templateId;\n}\n\n/**\n * Returns the number of revisions of the post currently being edited.\n *\n * @param {Object} state Global application state.\n *\n * @return {number} Number of revisions.\n */\nexport function getCurrentPostRevisionsCount( state ) {\n\treturn (\n\t\tgetCurrentPost( state )._links?.[ 'version-history' ]?.[ 0 ]?.count ?? 0\n\t);\n}\n\n/**\n * Returns the last revision ID of the post currently being edited,\n * or null if the post has no revisions.\n *\n * @param {Object} state Global application state.\n *\n * @return {?number} ID of the last revision.\n */\nexport function getCurrentPostLastRevisionId( state ) {\n\treturn (\n\t\tgetCurrentPost( state )._links?.[ 'predecessor-version' ]?.[ 0 ]?.id ??\n\t\tnull\n\t);\n}\n\n/**\n * Returns any post values which have been changed in the editor but not yet\n * been saved.\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} Object of key value pairs comprising unsaved edits.\n */\nexport const getPostEdits = createRegistrySelector( ( select ) => ( state ) => {\n\tconst postType = getCurrentPostType( state );\n\tconst postId = getCurrentPostId( state );\n\treturn (\n\t\tselect( coreStore ).getEntityRecordEdits(\n\t\t\t'postType',\n\t\t\tpostType,\n\t\t\tpostId\n\t\t) || EMPTY_OBJECT\n\t);\n} );\n\n/**\n * Returns an attribute value of the saved post.\n *\n * @param {Object} state Global application state.\n * @param {string} attributeName Post attribute name.\n *\n * @return {*} Post attribute value.\n */\nexport function getCurrentPostAttribute( state, attributeName ) {\n\tswitch ( attributeName ) {\n\t\tcase 'type':\n\t\t\treturn getCurrentPostType( state );\n\n\t\tcase 'id':\n\t\t\treturn getCurrentPostId( state );\n\n\t\tdefault:\n\t\t\tconst post = getCurrentPost( state );\n\t\t\tif ( ! post.hasOwnProperty( attributeName ) ) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\treturn getPostRawValue( post[ attributeName ] );\n\t}\n}\n\n/**\n * Returns a single attribute of the post being edited, preferring the unsaved\n * edit if one exists, but merging with the attribute value for the last known\n * saved state of the post (this is needed for some nested attributes like meta).\n *\n * @param {Object} state Global application state.\n * @param {string} attributeName Post attribute name.\n *\n * @return {*} Post attribute value.\n */\nconst getNestedEditedPostProperty = createSelector(\n\t( state, attributeName ) => {\n\t\tconst edits = getPostEdits( state );\n\t\tif ( ! edits.hasOwnProperty( attributeName ) ) {\n\t\t\treturn getCurrentPostAttribute( state, attributeName );\n\t\t}\n\n\t\treturn {\n\t\t\t...getCurrentPostAttribute( state, attributeName ),\n\t\t\t...edits[ attributeName ],\n\t\t};\n\t},\n\t( state, attributeName ) => [\n\t\tgetCurrentPostAttribute( state, attributeName ),\n\t\tgetPostEdits( state )[ attributeName ],\n\t]\n);\n\n/**\n * Returns a single attribute of the post being edited, preferring the unsaved\n * edit if one exists, but falling back to the attribute for the last known\n * saved state of the post.\n *\n * @param {Object} state Global application state.\n * @param {string} attributeName Post attribute name.\n *\n * @example\n *\n *```js\n * \t// Get specific media size based on the featured media ID\n * \t// Note: change sizes?.large for any registered size\n * \tconst getFeaturedMediaUrl = useSelect( ( select ) => {\n * \t\tconst getFeaturedMediaId =\n * \t\t\tselect( 'core/editor' ).getEditedPostAttribute( 'featured_media' );\n * \t\tconst media = select( 'core' ).getEntityRecord(\n * \t\t\t'postType',\n * \t\t\t'attachment',\n * \t\t\tgetFeaturedMediaId\n * \t\t);\n *\n * \t\treturn (\n * \t\t\tmedia?.media_details?.sizes?.large?.source_url || media?.source_url || ''\n * \t\t);\n * }, [] );\n *```\n *\n * @return {*} Post attribute value.\n */\nexport function getEditedPostAttribute( state, attributeName ) {\n\t// Special cases.\n\tswitch ( attributeName ) {\n\t\tcase 'content':\n\t\t\treturn getEditedPostContent( state );\n\t}\n\n\t// Fall back to saved post value if not edited.\n\tconst edits = getPostEdits( state );\n\tif ( ! edits.hasOwnProperty( attributeName ) ) {\n\t\treturn getCurrentPostAttribute( state, attributeName );\n\t}\n\n\t// Merge properties are objects which contain only the patch edit in state,\n\t// and thus must be merged with the current post attribute.\n\tif ( EDIT_MERGE_PROPERTIES.has( attributeName ) ) {\n\t\treturn getNestedEditedPostProperty( state, attributeName );\n\t}\n\n\treturn edits[ attributeName ];\n}\n\n/**\n * Returns an attribute value of the current autosave revision for a post, or\n * null if there is no autosave for the post.\n *\n * @deprecated since 5.6. Callers should use the `getAutosave( postType, postId, userId )` selector\n * \t\t\t from the '@wordpress/core-data' package and access properties on the returned\n * \t\t\t autosave object using getPostRawValue.\n *\n * @param {Object} state Global application state.\n * @param {string} attributeName Autosave attribute name.\n *\n * @return {*} Autosave attribute value.\n */\nexport const getAutosaveAttribute = createRegistrySelector(\n\t( select ) => ( state, attributeName ) => {\n\t\tif (\n\t\t\t! AUTOSAVE_PROPERTIES.includes( attributeName ) &&\n\t\t\tattributeName !== 'preview_link'\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst postType = getCurrentPostType( state );\n\n\t\t// Currently template autosaving is not supported.\n\t\tif ( postType === 'wp_template' ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst postId = getCurrentPostId( state );\n\t\tconst currentUserId = select( coreStore ).getCurrentUser()?.id;\n\t\tconst autosave = select( coreStore ).getAutosave(\n\t\t\tpostType,\n\t\t\tpostId,\n\t\t\tcurrentUserId\n\t\t);\n\n\t\tif ( autosave ) {\n\t\t\treturn getPostRawValue( autosave[ attributeName ] );\n\t\t}\n\t}\n);\n\n/**\n * Returns the current visibility of the post being edited, preferring the\n * unsaved value if different than the saved post. The return value is one of\n * \"private\", \"password\", or \"public\".\n *\n * @param {Object} state Global application state.\n *\n * @return {string} Post visibility.\n */\nexport function getEditedPostVisibility( state ) {\n\tconst status = getEditedPostAttribute( state, 'status' );\n\tif ( status === 'private' ) {\n\t\treturn 'private';\n\t}\n\n\tconst password = getEditedPostAttribute( state, 'password' );\n\tif ( password ) {\n\t\treturn 'password';\n\t}\n\n\treturn 'public';\n}\n\n/**\n * Returns true if post is pending review.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether current post is pending review.\n */\nexport function isCurrentPostPending( state ) {\n\treturn getCurrentPost( state ).status === 'pending';\n}\n\n/**\n * Return true if the current post has already been published.\n *\n * @param {Object} state Global application state.\n * @param {Object} [currentPost] Explicit current post for bypassing registry selector.\n *\n * @return {boolean} Whether the post has been published.\n */\nexport function isCurrentPostPublished( state, currentPost ) {\n\tconst post = currentPost || getCurrentPost( state );\n\n\treturn (\n\t\t[ 'publish', 'private' ].indexOf( post.status ) !== -1 ||\n\t\t( post.status === 'future' &&\n\t\t\t! isInTheFuture(\n\t\t\t\tnew Date( Number( getDate( post.date ) ) - ONE_MINUTE_IN_MS )\n\t\t\t) )\n\t);\n}\n\n/**\n * Returns true if post is already scheduled.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether current post is scheduled to be posted.\n */\nexport function isCurrentPostScheduled( state ) {\n\treturn (\n\t\tgetCurrentPost( state ).status === 'future' &&\n\t\t! isCurrentPostPublished( state )\n\t);\n}\n\n/**\n * Return true if the post being edited can be published.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the post can been published.\n */\nexport function isEditedPostPublishable( state ) {\n\tconst post = getCurrentPost( state );\n\n\t// TODO: Post being publishable should be superset of condition of post\n\t// being saveable. Currently this restriction is imposed at UI.\n\t//\n\t// See: <PostPublishButton /> (`isButtonEnabled` assigned by `isSaveable`).\n\n\treturn (\n\t\tisEditedPostDirty( state ) ||\n\t\t[ 'publish', 'private', 'future' ].indexOf( post.status ) === -1\n\t);\n}\n\n/**\n * Returns true if the post can be saved, or false otherwise. A post must\n * contain a title, an excerpt, or non-empty content to be valid for save.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the post can be saved.\n */\nexport function isEditedPostSaveable( state ) {\n\tif ( isSavingPost( state ) ) {\n\t\treturn false;\n\t}\n\n\t// TODO: Post should not be saveable if not dirty. Cannot be added here at\n\t// this time since posts where meta boxes are present can be saved even if\n\t// the post is not dirty. Currently this restriction is imposed at UI, but\n\t// should be moved here.\n\t//\n\t// See: `isEditedPostPublishable` (includes `isEditedPostDirty` condition)\n\t// See: <PostSavedState /> (`forceIsDirty` prop)\n\t// See: <PostPublishButton /> (`forceIsDirty` prop)\n\t// See: https://github.com/WordPress/gutenberg/pull/4184.\n\n\treturn (\n\t\t!! getEditedPostAttribute( state, 'title' ) ||\n\t\t!! getEditedPostAttribute( state, 'excerpt' ) ||\n\t\t! isEditedPostEmpty( state ) ||\n\t\tPlatform.OS === 'native'\n\t);\n}\n\n/**\n * Returns true if the edited post has content. A post has content if it has at\n * least one saveable block or otherwise has a non-empty content property\n * assigned.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether post has content.\n */\nexport const isEditedPostEmpty = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\t// While the condition of truthy content string is sufficient to determine\n\t\t// emptiness, testing saveable blocks length is a trivial operation. Since\n\t\t// this function can be called frequently, optimize for the fast case as a\n\t\t// condition of the mere existence of blocks. Note that the value of edited\n\t\t// content takes precedent over block content, and must fall through to the\n\t\t// default logic.\n\t\tconst postId = getCurrentPostId( state );\n\t\tconst postType = getCurrentPostType( state );\n\t\tconst record = select( coreStore ).getEditedEntityRecord(\n\t\t\t'postType',\n\t\t\tpostType,\n\t\t\tpostId\n\t\t);\n\t\tif ( typeof record.content !== 'function' ) {\n\t\t\treturn ! record.content;\n\t\t}\n\n\t\tconst blocks = getEditedPostAttribute( state, 'blocks' );\n\n\t\tif ( blocks.length === 0 ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Pierce the abstraction of the serializer in knowing that blocks are\n\t\t// joined with newlines such that even if every individual block\n\t\t// produces an empty save result, the serialized content is non-empty.\n\t\tif ( blocks.length > 1 ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// There are two conditions under which the optimization cannot be\n\t\t// assumed, and a fallthrough to getEditedPostContent must occur:\n\t\t//\n\t\t// 1. getBlocksForSerialization has special treatment in omitting a\n\t\t// single unmodified default block.\n\t\t// 2. Comment delimiters are omitted for a freeform or unregistered\n\t\t// block in its serialization. The freeform block specifically may\n\t\t// produce an empty string in its saved output.\n\t\t//\n\t\t// For all other content, the single block is assumed to make a post\n\t\t// non-empty, if only by virtue of its own comment delimiters.\n\t\tconst blockName = blocks[ 0 ].name;\n\t\tif (\n\t\t\tblockName !== getDefaultBlockName() &&\n\t\t\tblockName !== getFreeformContentHandlerName()\n\t\t) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn ! getEditedPostContent( state );\n\t}\n);\n\n/**\n * Returns true if the post can be autosaved, or false otherwise.\n *\n * @param {Object} state Global application state.\n * @param {Object} autosave A raw autosave object from the REST API.\n *\n * @return {boolean} Whether the post can be autosaved.\n */\nexport const isEditedPostAutosaveable = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\t// A post must contain a title, an excerpt, or non-empty content to be valid for autosaving.\n\t\tif ( ! isEditedPostSaveable( state ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// A post is not autosavable when there is a post autosave lock.\n\t\tif ( isPostAutosavingLocked( state ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst postType = getCurrentPostType( state );\n\t\tconst postTypeObject = select( coreStore ).getPostType( postType );\n\n\t\t// Currently template autosaving is not supported.\n\t\t// @todo: Remove hardcode check for template after bumping required WP version to 6.8.\n\t\tif (\n\t\t\tpostType === 'wp_template' ||\n\t\t\t! postTypeObject?.supports?.autosave\n\t\t) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst postId = getCurrentPostId( state );\n\t\tconst hasFetchedAutosave = select( coreStore ).hasFetchedAutosaves(\n\t\t\tpostType,\n\t\t\tpostId\n\t\t);\n\t\tconst currentUserId = select( coreStore ).getCurrentUser()?.id;\n\n\t\t// Disable reason - this line causes the side-effect of fetching the autosave\n\t\t// via a resolver, moving below the return would result in the autosave never\n\t\t// being fetched.\n\t\t// eslint-disable-next-line @wordpress/no-unused-vars-before-return\n\t\tconst autosave = select( coreStore ).getAutosave(\n\t\t\tpostType,\n\t\t\tpostId,\n\t\t\tcurrentUserId\n\t\t);\n\n\t\t// If any existing autosaves have not yet been fetched, this function is\n\t\t// unable to determine if the post is autosaveable, so return false.\n\t\tif ( ! hasFetchedAutosave ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// If we don't already have an autosave, the post is autosaveable.\n\t\tif ( ! autosave ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// To avoid an expensive content serialization, use the content dirtiness\n\t\t// flag in place of content field comparison against the known autosave.\n\t\t// This is not strictly accurate, and relies on a tolerance toward autosave\n\t\t// request failures for unnecessary saves.\n\t\tif ( hasChangedContent( state ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// If title, excerpt, or meta have changed, the post is autosaveable.\n\t\treturn [ 'title', 'excerpt', 'meta' ].some(\n\t\t\t( field ) =>\n\t\t\t\tgetPostRawValue( autosave[ field ] ) !==\n\t\t\t\tgetEditedPostAttribute( state, field )\n\t\t);\n\t}\n);\n\n/**\n * Return true if the post being edited is being scheduled. Preferring the\n * unsaved status values.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the post has been published.\n */\nexport function isEditedPostBeingScheduled( state ) {\n\tconst date = getEditedPostAttribute( state, 'date' );\n\t// Offset the date by one minute (network latency).\n\tconst checkedDate = new Date(\n\t\tNumber( getDate( date ) ) - ONE_MINUTE_IN_MS\n\t);\n\n\treturn isInTheFuture( checkedDate );\n}\n\n/**\n * Returns whether the current post should be considered to have a \"floating\"\n * date (i.e. that it would publish \"Immediately\" rather than at a set time).\n *\n * Unlike in the PHP backend, the REST API returns a full date string for posts\n * where the 0000-00-00T00:00:00 placeholder is present in the database. To\n * infer that a post is set to publish \"Immediately\" we check whether the date\n * and modified date are the same.\n *\n * @param {Object} state Editor state.\n *\n * @return {boolean} Whether the edited post has a floating date value.\n */\nexport function isEditedPostDateFloating( state ) {\n\tconst date = getEditedPostAttribute( state, 'date' );\n\tconst modified = getEditedPostAttribute( state, 'modified' );\n\n\t// This should be the status of the persisted post\n\t// It shouldn't use the \"edited\" status otherwise it breaks the\n\t// inferred post data floating status\n\t// See https://github.com/WordPress/gutenberg/issues/28083.\n\tconst status = getCurrentPost( state ).status;\n\tif (\n\t\tstatus === 'draft' ||\n\t\tstatus === 'auto-draft' ||\n\t\tstatus === 'pending'\n\t) {\n\t\treturn date === modified || date === null;\n\t}\n\treturn false;\n}\n\n/**\n * Returns true if the post is currently being deleted, or false otherwise.\n *\n * @param {Object} state Editor state.\n *\n * @return {boolean} Whether post is being deleted.\n */\nexport function isDeletingPost( state ) {\n\treturn !! state.deleting.pending;\n}\n\n/**\n * Returns true if the post is currently being saved, or false otherwise.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether post is being saved.\n */\nexport function isSavingPost( state ) {\n\treturn !! state.saving.pending;\n}\n\n/**\n * Returns true if non-post entities are currently being saved, or false otherwise.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether non-post entities are being saved.\n */\nexport const isSavingNonPostEntityChanges = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\tconst entitiesBeingSaved =\n\t\t\tselect( coreStore ).__experimentalGetEntitiesBeingSaved();\n\t\tconst { type, id } = getCurrentPost( state );\n\t\treturn entitiesBeingSaved.some(\n\t\t\t( entityRecord ) =>\n\t\t\t\tentityRecord.kind !== 'postType' ||\n\t\t\t\tentityRecord.name !== type ||\n\t\t\t\tentityRecord.key !== id\n\t\t);\n\t}\n);\n\n/**\n * Returns true if a previous post save was attempted successfully, or false\n * otherwise.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the post was saved successfully.\n */\nexport const didPostSaveRequestSucceed = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\tconst postType = getCurrentPostType( state );\n\t\tconst postId = getCurrentPostId( state );\n\t\treturn ! select( coreStore ).getLastEntitySaveError(\n\t\t\t'postType',\n\t\t\tpostType,\n\t\t\tpostId\n\t\t);\n\t}\n);\n\n/**\n * Returns true if a previous post save was attempted but failed, or false\n * otherwise.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the post save failed.\n */\nexport const didPostSaveRequestFail = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\tconst postType = getCurrentPostType( state );\n\t\tconst postId = getCurrentPostId( state );\n\t\treturn !! select( coreStore ).getLastEntitySaveError(\n\t\t\t'postType',\n\t\t\tpostType,\n\t\t\tpostId\n\t\t);\n\t}\n);\n\n/**\n * Returns true if the post is autosaving, or false otherwise.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the post is autosaving.\n */\nexport function isAutosavingPost( state ) {\n\treturn isSavingPost( state ) && Boolean( state.saving.options?.isAutosave );\n}\n\n/**\n * Returns true if the post is being previewed, or false otherwise.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the post is being previewed.\n */\nexport function isPreviewingPost( state ) {\n\treturn isSavingPost( state ) && Boolean( state.saving.options?.isPreview );\n}\n\n/**\n * Returns the post preview link\n *\n * @param {Object} state Global application state.\n *\n * @return {string | undefined} Preview Link.\n */\nexport function getEditedPostPreviewLink( state ) {\n\tif ( state.saving.pending || isSavingPost( state ) ) {\n\t\treturn;\n\t}\n\n\tlet previewLink = getAutosaveAttribute( state, 'preview_link' );\n\t// Fix for issue: https://github.com/WordPress/gutenberg/issues/33616\n\t// If the post is draft, ignore the preview link from the autosave record,\n\t// because the preview could be a stale autosave if the post was switched from\n\t// published to draft.\n\t// See: https://github.com/WordPress/gutenberg/pull/37952.\n\tif ( ! previewLink || 'draft' === getCurrentPost( state ).status ) {\n\t\tpreviewLink = getEditedPostAttribute( state, 'link' );\n\t\tif ( previewLink ) {\n\t\t\tpreviewLink = addQueryArgs( previewLink, { preview: true } );\n\t\t}\n\t}\n\tconst featuredImageId = getEditedPostAttribute( state, 'featured_media' );\n\n\tif ( previewLink && featuredImageId ) {\n\t\treturn addQueryArgs( previewLink, { _thumbnail_id: featuredImageId } );\n\t}\n\n\treturn previewLink;\n}\n\n/**\n * Returns a suggested post format for the current post, inferred only if there\n * is a single block within the post and it is of a type known to match a\n * default post format. Returns null if the format cannot be determined.\n *\n * @return {?string} Suggested post format.\n */\nexport const getSuggestedPostFormat = createRegistrySelector(\n\t( select ) => () => {\n\t\tconst blocks = select( blockEditorStore ).getBlocks();\n\n\t\tif ( blocks.length > 2 ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tlet name;\n\t\t// If there is only one block in the content of the post grab its name\n\t\t// so we can derive a suitable post format from it.\n\t\tif ( blocks.length === 1 ) {\n\t\t\tname = blocks[ 0 ].name;\n\t\t\t// Check for core/embed `video` and `audio` eligible suggestions.\n\t\t\tif ( name === 'core/embed' ) {\n\t\t\t\tconst provider = blocks[ 0 ].attributes?.providerNameSlug;\n\t\t\t\tif ( [ 'youtube', 'vimeo' ].includes( provider ) ) {\n\t\t\t\t\tname = 'core/video';\n\t\t\t\t} else if ( [ 'spotify', 'soundcloud' ].includes( provider ) ) {\n\t\t\t\t\tname = 'core/audio';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// If there are two blocks in the content and the last one is a text blocks\n\t\t// grab the name of the first one to also suggest a post format from it.\n\t\tif ( blocks.length === 2 && blocks[ 1 ].name === 'core/paragraph' ) {\n\t\t\tname = blocks[ 0 ].name;\n\t\t}\n\n\t\t// We only convert to default post formats in core.\n\t\tswitch ( name ) {\n\t\t\tcase 'core/image':\n\t\t\t\treturn 'image';\n\t\t\tcase 'core/quote':\n\t\t\tcase 'core/pullquote':\n\t\t\t\treturn 'quote';\n\t\t\tcase 'core/gallery':\n\t\t\t\treturn 'gallery';\n\t\t\tcase 'core/video':\n\t\t\t\treturn 'video';\n\t\t\tcase 'core/audio':\n\t\t\t\treturn 'audio';\n\t\t\tdefault:\n\t\t\t\treturn null;\n\t\t}\n\t}\n);\n\n/**\n * Returns the content of the post being edited.\n *\n * @param {Object} state Global application state.\n *\n * @return {string} Post content.\n */\nexport const getEditedPostContent = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\tconst postId = getCurrentPostId( state );\n\t\tconst postType = getCurrentPostType( state );\n\t\tconst record = select( coreStore ).getEditedEntityRecord(\n\t\t\t'postType',\n\t\t\tpostType,\n\t\t\tpostId\n\t\t);\n\t\tif ( record ) {\n\t\t\tif ( typeof record.content === 'function' ) {\n\t\t\t\treturn record.content( record );\n\t\t\t} else if ( record.blocks ) {\n\t\t\t\treturn __unstableSerializeAndClean( record.blocks );\n\t\t\t} else if ( record.content ) {\n\t\t\t\treturn record.content;\n\t\t\t}\n\t\t}\n\t\treturn '';\n\t}\n);\n\n/**\n * Returns true if the post is being published, or false otherwise.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether post is being published.\n */\nexport function isPublishingPost( state ) {\n\treturn (\n\t\tisSavingPost( state ) &&\n\t\t! isCurrentPostPublished( state ) &&\n\t\tgetEditedPostAttribute( state, 'status' ) === 'publish'\n\t);\n}\n\n/**\n * Returns whether the permalink is editable or not.\n *\n * @param {Object} state Editor state.\n *\n * @return {boolean} Whether or not the permalink is editable.\n */\nexport function isPermalinkEditable( state ) {\n\tconst permalinkTemplate = getEditedPostAttribute(\n\t\tstate,\n\t\t'permalink_template'\n\t);\n\n\treturn PERMALINK_POSTNAME_REGEX.test( permalinkTemplate );\n}\n\n/**\n * Returns the permalink for the post.\n *\n * @param {Object} state Editor state.\n *\n * @return {?string} The permalink, or null if the post is not viewable.\n */\nexport function getPermalink( state ) {\n\tconst permalinkParts = getPermalinkParts( state );\n\tif ( ! permalinkParts ) {\n\t\treturn null;\n\t}\n\n\tconst { prefix, postName, suffix } = permalinkParts;\n\n\tif ( isPermalinkEditable( state ) ) {\n\t\treturn prefix + postName + suffix;\n\t}\n\n\treturn prefix;\n}\n\n/**\n * Returns the slug for the post being edited, preferring a manually edited\n * value if one exists, then a sanitized version of the current post title, and\n * finally the post ID.\n *\n * @param {Object} state Editor state.\n *\n * @return {string} The current slug to be displayed in the editor\n */\nexport function getEditedPostSlug( state ) {\n\treturn (\n\t\tgetEditedPostAttribute( state, 'slug' ) ||\n\t\tcleanForSlug( getEditedPostAttribute( state, 'title' ) ) ||\n\t\tgetCurrentPostId( state )\n\t);\n}\n\n/**\n * Returns the permalink for a post, split into its three parts: the prefix,\n * the postName, and the suffix.\n *\n * @param {Object} state Editor state.\n *\n * @return {Object} An object containing the prefix, postName, and suffix for\n * the permalink, or null if the post is not viewable.\n */\nexport function getPermalinkParts( state ) {\n\tconst permalinkTemplate = getEditedPostAttribute(\n\t\tstate,\n\t\t'permalink_template'\n\t);\n\tif ( ! permalinkTemplate ) {\n\t\treturn null;\n\t}\n\n\tconst postName =\n\t\tgetEditedPostAttribute( state, 'slug' ) ||\n\t\tgetEditedPostAttribute( state, 'generated_slug' );\n\n\tconst [ prefix, suffix ] = permalinkTemplate.split(\n\t\tPERMALINK_POSTNAME_REGEX\n\t);\n\n\treturn {\n\t\tprefix,\n\t\tpostName,\n\t\tsuffix,\n\t};\n}\n\n/**\n * Returns whether the post is locked.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Is locked.\n */\nexport function isPostLocked( state ) {\n\treturn state.postLock.isLocked;\n}\n\n/**\n * Returns whether post saving is locked.\n *\n * @param {Object} state Global application state.\n *\n * @example\n * ```jsx\n * import { __ } from '@wordpress/i18n';\n * import { store as editorStore } from '@wordpress/editor';\n * import { useSelect } from '@wordpress/data';\n *\n * const ExampleComponent = () => {\n * \tconst isSavingLocked = useSelect(\n * \t\t( select ) => select( editorStore ).isPostSavingLocked(),\n * \t\t[]\n * \t);\n *\n * \treturn isSavingLocked ? (\n * \t\t<p>{ __( 'Post saving is locked' ) }</p>\n * \t) : (\n * \t\t<p>{ __( 'Post saving is not locked' ) }</p>\n * \t);\n * };\n * ```\n *\n * @return {boolean} Is locked.\n */\nexport function isPostSavingLocked( state ) {\n\treturn Object.keys( state.postSavingLock ).length > 0;\n}\n\n/**\n * Returns whether post autosaving is locked.\n *\n * @param {Object} state Global application state.\n *\n * @example\n * ```jsx\n * import { __ } from '@wordpress/i18n';\n * import { store as editorStore } from '@wordpress/editor';\n * import { useSelect } from '@wordpress/data';\n *\n * const ExampleComponent = () => {\n * \tconst isAutoSavingLocked = useSelect(\n * \t\t( select ) => select( editorStore ).isPostAutosavingLocked(),\n * \t\t[]\n * \t);\n *\n * \treturn isAutoSavingLocked ? (\n * \t\t<p>{ __( 'Post auto saving is locked' ) }</p>\n * \t) : (\n * \t\t<p>{ __( 'Post auto saving is not locked' ) }</p>\n * \t);\n * };\n * ```\n *\n * @return {boolean} Is locked.\n */\nexport function isPostAutosavingLocked( state ) {\n\treturn Object.keys( state.postAutosavingLock ).length > 0;\n}\n\n/**\n * Returns whether the edition of the post has been taken over.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Is post lock takeover.\n */\nexport function isPostLockTakeover( state ) {\n\treturn state.postLock.isTakeover;\n}\n\n/**\n * Returns details about the post lock user.\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} A user object.\n */\nexport function getPostLockUser( state ) {\n\treturn state.postLock.user;\n}\n\n/**\n * Returns the active post lock.\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} The lock object.\n */\nexport function getActivePostLock( state ) {\n\treturn state.postLock.activePostLock;\n}\n\n/**\n * Returns whether or not the user has the unfiltered_html capability.\n *\n * @param {Object} state Editor state.\n *\n * @return {boolean} Whether the user can or can't post unfiltered HTML.\n */\nexport function canUserUseUnfilteredHTML( state ) {\n\treturn Boolean(\n\t\tgetCurrentPost( state )._links?.hasOwnProperty(\n\t\t\t'wp:action-unfiltered-html'\n\t\t)\n\t);\n}\n\n/**\n * Returns whether the pre-publish panel should be shown\n * or skipped when the user clicks the \"publish\" button.\n *\n * @return {boolean} Whether the pre-publish panel should be shown or not.\n */\nexport const isPublishSidebarEnabled = createRegistrySelector(\n\t( select ) => () =>\n\t\t!! select( preferencesStore ).get( 'core', 'isPublishSidebarEnabled' )\n);\n\n/**\n * Return the current block list.\n *\n * @param {Object} state\n * @return {Array} Block list.\n */\nexport const getEditorBlocks = createSelector(\n\t( state ) => {\n\t\treturn (\n\t\t\tgetEditedPostAttribute( state, 'blocks' ) ||\n\t\t\tparse( getEditedPostContent( state ) )\n\t\t);\n\t},\n\t( state ) => [\n\t\tgetEditedPostAttribute( state, 'blocks' ),\n\t\tgetEditedPostContent( state ),\n\t]\n);\n\n/**\n * Returns true if the given panel was programmatically removed, or false otherwise.\n * All panels are not removed by default.\n *\n * @param {Object} state Global application state.\n * @param {string} panelName A string that identifies the panel.\n *\n * @return {boolean} Whether or not the panel is removed.\n */\nexport function isEditorPanelRemoved( state, panelName ) {\n\treturn state.removedPanels.includes( panelName );\n}\n\n/**\n * Returns true if the given panel is enabled, or false otherwise. Panels are\n * enabled by default.\n *\n * @param {Object} state Global application state.\n * @param {string} panelName A string that identifies the panel.\n *\n * @return {boolean} Whether or not the panel is enabled.\n */\nexport const isEditorPanelEnabled = createRegistrySelector(\n\t( select ) => ( state, panelName ) => {\n\t\t// For backward compatibility, we check edit-post\n\t\t// even though now this is in \"editor\" package.\n\t\tconst inactivePanels = select( preferencesStore ).get(\n\t\t\t'core',\n\t\t\t'inactivePanels'\n\t\t);\n\t\treturn (\n\t\t\t! isEditorPanelRemoved( state, panelName ) &&\n\t\t\t! inactivePanels?.includes( panelName )\n\t\t);\n\t}\n);\n\n/**\n * Returns true if the given panel is open, or false otherwise. Panels are\n * closed by default.\n *\n * @param {Object} state Global application state.\n * @param {string} panelName A string that identifies the panel.\n *\n * @return {boolean} Whether or not the panel is open.\n */\nexport const isEditorPanelOpened = createRegistrySelector(\n\t( select ) => ( state, panelName ) => {\n\t\t// For backward compatibility, we check edit-post\n\t\t// even though now this is in \"editor\" package.\n\t\tconst openPanels = select( preferencesStore ).get(\n\t\t\t'core',\n\t\t\t'openPanels'\n\t\t);\n\t\treturn !! openPanels?.includes( panelName );\n\t}\n);\n\n/**\n * A block selection object.\n *\n * @typedef {Object} WPBlockSelection\n *\n * @property {string} clientId A block client ID.\n * @property {string} attributeKey A block attribute key.\n * @property {number} offset An attribute value offset, based on the rich\n * text value. See `wp.richText.create`.\n */\n\n/**\n * Returns the current selection start.\n *\n * @deprecated since Gutenberg 10.0.0.\n *\n * @param {Object} state\n * @return {WPBlockSelection} The selection start.\n */\nexport function getEditorSelectionStart( state ) {\n\tdeprecated( \"select('core/editor').getEditorSelectionStart\", {\n\t\tsince: '5.8',\n\t\talternative: \"select('core/editor').getEditorSelection\",\n\t} );\n\treturn getEditedPostAttribute( state, 'selection' )?.selectionStart;\n}\n\n/**\n * Returns the current selection end.\n *\n * @deprecated since Gutenberg 10.0.0.\n *\n * @param {Object} state\n * @return {WPBlockSelection} The selection end.\n */\nexport function getEditorSelectionEnd( state ) {\n\tdeprecated( \"select('core/editor').getEditorSelectionStart\", {\n\t\tsince: '5.8',\n\t\talternative: \"select('core/editor').getEditorSelection\",\n\t} );\n\treturn getEditedPostAttribute( state, 'selection' )?.selectionEnd;\n}\n\n/**\n * Returns the current selection.\n *\n * @param {Object} state\n * @return {WPBlockSelection} The selection end.\n */\nexport function getEditorSelection( state ) {\n\treturn getEditedPostAttribute( state, 'selection' );\n}\n\n/**\n * Is the editor ready\n *\n * @param {Object} state\n * @return {boolean} is Ready.\n */\nexport function __unstableIsEditorReady( state ) {\n\treturn !! state.postId;\n}\n\n/**\n * Returns the post editor settings.\n *\n * @param {Object} state Editor state.\n *\n * @return {Object} The editor settings object.\n */\nexport function getEditorSettings( state ) {\n\treturn state.editorSettings;\n}\n\n/**\n * Returns the post editor's rendering mode.\n *\n * @param {Object} state Editor state.\n *\n * @return {string} Rendering mode.\n */\nexport function getRenderingMode( state ) {\n\treturn state.renderingMode;\n}\n\n/**\n * Returns the current editing canvas device type.\n *\n * @param {Object} state Global application state.\n *\n * @return {string} Device type.\n */\nexport const getDeviceType = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\tconst isZoomOut = unlock( select( blockEditorStore ) ).isZoomOut();\n\t\tif ( isZoomOut ) {\n\t\t\treturn 'Desktop';\n\t\t}\n\t\treturn state.deviceType;\n\t}\n);\n\n/**\n * Returns true if the list view is opened.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the list view is opened.\n */\nexport function isListViewOpened( state ) {\n\treturn state.listViewPanel;\n}\n\n/**\n * Returns true if the inserter is opened.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the inserter is opened.\n */\nexport function isInserterOpened( state ) {\n\treturn !! state.blockInserterPanel;\n}\n\n/**\n * Returns the current editing mode.\n *\n * @param {Object} state Global application state.\n *\n * @return {string} Editing mode.\n */\nexport const getEditorMode = createRegistrySelector(\n\t( select ) => () =>\n\t\tselect( preferencesStore ).get( 'core', 'editorMode' ) ?? 'visual'\n);\n\n/*\n * Backward compatibility\n */\n\n/**\n * Returns state object prior to a specified optimist transaction ID, or `null`\n * if the transaction corresponding to the given ID cannot be found.\n *\n * @deprecated since Gutenberg 9.7.0.\n */\nexport function getStateBeforeOptimisticTransaction() {\n\tdeprecated( \"select('core/editor').getStateBeforeOptimisticTransaction\", {\n\t\tsince: '5.7',\n\t\thint: 'No state history is kept on this store anymore',\n\t} );\n\n\treturn null;\n}\n/**\n * Returns true if an optimistic transaction is pending commit, for which the\n * before state satisfies the given predicate function.\n *\n * @deprecated since Gutenberg 9.7.0.\n */\nexport function inSomeHistory() {\n\tdeprecated( \"select('core/editor').inSomeHistory\", {\n\t\tsince: '5.7',\n\t\thint: 'No state history is kept on this store anymore',\n\t} );\n\treturn false;\n}\n\nfunction getBlockEditorSelector( name ) {\n\treturn createRegistrySelector( ( select ) => ( state, ...args ) => {\n\t\tdeprecated( \"`wp.data.select( 'core/editor' ).\" + name + '`', {\n\t\t\tsince: '5.3',\n\t\t\talternative: \"`wp.data.select( 'core/block-editor' ).\" + name + '`',\n\t\t\tversion: '6.2',\n\t\t} );\n\n\t\treturn select( blockEditorStore )[ name ]( ...args );\n\t} );\n}\n\n/**\n * @see getBlockName in core/block-editor store.\n */\nexport const getBlockName = getBlockEditorSelector( 'getBlockName' );\n\n/**\n * @see isBlockValid in core/block-editor store.\n */\nexport const isBlockValid = getBlockEditorSelector( 'isBlockValid' );\n\n/**\n * @see getBlockAttributes in core/block-editor store.\n */\nexport const getBlockAttributes =\n\tgetBlockEditorSelector( 'getBlockAttributes' );\n\n/**\n * @see getBlock in core/block-editor store.\n */\nexport const getBlock = getBlockEditorSelector( 'getBlock' );\n\n/**\n * @see getBlocks in core/block-editor store.\n */\nexport const getBlocks = getBlockEditorSelector( 'getBlocks' );\n\n/**\n * @see getClientIdsOfDescendants in core/block-editor store.\n */\nexport const getClientIdsOfDescendants = getBlockEditorSelector(\n\t'getClientIdsOfDescendants'\n);\n\n/**\n * @see getClientIdsWithDescendants in core/block-editor store.\n */\nexport const getClientIdsWithDescendants = getBlockEditorSelector(\n\t'getClientIdsWithDescendants'\n);\n\n/**\n * @see getGlobalBlockCount in core/block-editor store.\n */\nexport const getGlobalBlockCount = getBlockEditorSelector(\n\t'getGlobalBlockCount'\n);\n\n/**\n * @see getBlocksByClientId in core/block-editor store.\n */\nexport const getBlocksByClientId = getBlockEditorSelector(\n\t'getBlocksByClientId'\n);\n\n/**\n * @see getBlockCount in core/block-editor store.\n */\nexport const getBlockCount = getBlockEditorSelector( 'getBlockCount' );\n\n/**\n * @see getBlockSelectionStart in core/block-editor store.\n */\nexport const getBlockSelectionStart = getBlockEditorSelector(\n\t'getBlockSelectionStart'\n);\n\n/**\n * @see getBlockSelectionEnd in core/block-editor store.\n */\nexport const getBlockSelectionEnd = getBlockEditorSelector(\n\t'getBlockSelectionEnd'\n);\n\n/**\n * @see getSelectedBlockCount in core/block-editor store.\n */\nexport const getSelectedBlockCount = getBlockEditorSelector(\n\t'getSelectedBlockCount'\n);\n\n/**\n * @see hasSelectedBlock in core/block-editor store.\n */\nexport const hasSelectedBlock = getBlockEditorSelector( 'hasSelectedBlock' );\n\n/**\n * @see getSelectedBlockClientId in core/block-editor store.\n */\nexport const getSelectedBlockClientId = getBlockEditorSelector(\n\t'getSelectedBlockClientId'\n);\n\n/**\n * @see getSelectedBlock in core/block-editor store.\n */\nexport const getSelectedBlock = getBlockEditorSelector( 'getSelectedBlock' );\n\n/**\n * @see getBlockRootClientId in core/block-editor store.\n */\nexport const getBlockRootClientId = getBlockEditorSelector(\n\t'getBlockRootClientId'\n);\n\n/**\n * @see getBlockHierarchyRootClientId in core/block-editor store.\n */\nexport const getBlockHierarchyRootClientId = getBlockEditorSelector(\n\t'getBlockHierarchyRootClientId'\n);\n\n/**\n * @see getAdjacentBlockClientId in core/block-editor store.\n */\nexport const getAdjacentBlockClientId = getBlockEditorSelector(\n\t'getAdjacentBlockClientId'\n);\n\n/**\n * @see getPreviousBlockClientId in core/block-editor store.\n */\nexport const getPreviousBlockClientId = getBlockEditorSelector(\n\t'getPreviousBlockClientId'\n);\n\n/**\n * @see getNextBlockClientId in core/block-editor store.\n */\nexport const getNextBlockClientId = getBlockEditorSelector(\n\t'getNextBlockClientId'\n);\n\n/**\n * @see getSelectedBlocksInitialCaretPosition in core/block-editor store.\n */\nexport const getSelectedBlocksInitialCaretPosition = getBlockEditorSelector(\n\t'getSelectedBlocksInitialCaretPosition'\n);\n\n/**\n * @see getMultiSelectedBlockClientIds in core/block-editor store.\n */\nexport const getMultiSelectedBlockClientIds = getBlockEditorSelector(\n\t'getMultiSelectedBlockClientIds'\n);\n\n/**\n * @see getMultiSelectedBlocks in core/block-editor store.\n */\nexport const getMultiSelectedBlocks = getBlockEditorSelector(\n\t'getMultiSelectedBlocks'\n);\n\n/**\n * @see getFirstMultiSelectedBlockClientId in core/block-editor store.\n */\nexport const getFirstMultiSelectedBlockClientId = getBlockEditorSelector(\n\t'getFirstMultiSelectedBlockClientId'\n);\n\n/**\n * @see getLastMultiSelectedBlockClientId in core/block-editor store.\n */\nexport const getLastMultiSelectedBlockClientId = getBlockEditorSelector(\n\t'getLastMultiSelectedBlockClientId'\n);\n\n/**\n * @see isFirstMultiSelectedBlock in core/block-editor store.\n */\nexport const isFirstMultiSelectedBlock = getBlockEditorSelector(\n\t'isFirstMultiSelectedBlock'\n);\n\n/**\n * @see isBlockMultiSelected in core/block-editor store.\n */\nexport const isBlockMultiSelected = getBlockEditorSelector(\n\t'isBlockMultiSelected'\n);\n\n/**\n * @see isAncestorMultiSelected in core/block-editor store.\n */\nexport const isAncestorMultiSelected = getBlockEditorSelector(\n\t'isAncestorMultiSelected'\n);\n\n/**\n * @see getMultiSelectedBlocksStartClientId in core/block-editor store.\n */\nexport const getMultiSelectedBlocksStartClientId = getBlockEditorSelector(\n\t'getMultiSelectedBlocksStartClientId'\n);\n\n/**\n * @see getMultiSelectedBlocksEndClientId in core/block-editor store.\n */\nexport const getMultiSelectedBlocksEndClientId = getBlockEditorSelector(\n\t'getMultiSelectedBlocksEndClientId'\n);\n\n/**\n * @see getBlockOrder in core/block-editor store.\n */\nexport const getBlockOrder = getBlockEditorSelector( 'getBlockOrder' );\n\n/**\n * @see getBlockIndex in core/block-editor store.\n */\nexport const getBlockIndex = getBlockEditorSelector( 'getBlockIndex' );\n\n/**\n * @see isBlockSelected in core/block-editor store.\n */\nexport const isBlockSelected = getBlockEditorSelector( 'isBlockSelected' );\n\n/**\n * @see hasSelectedInnerBlock in core/block-editor store.\n */\nexport const hasSelectedInnerBlock = getBlockEditorSelector(\n\t'hasSelectedInnerBlock'\n);\n\n/**\n * @see isBlockWithinSelection in core/block-editor store.\n */\nexport const isBlockWithinSelection = getBlockEditorSelector(\n\t'isBlockWithinSelection'\n);\n\n/**\n * @see hasMultiSelection in core/block-editor store.\n */\nexport const hasMultiSelection = getBlockEditorSelector( 'hasMultiSelection' );\n\n/**\n * @see isMultiSelecting in core/block-editor store.\n */\nexport const isMultiSelecting = getBlockEditorSelector( 'isMultiSelecting' );\n\n/**\n * @see isSelectionEnabled in core/block-editor store.\n */\nexport const isSelectionEnabled =\n\tgetBlockEditorSelector( 'isSelectionEnabled' );\n\n/**\n * @see getBlockMode in core/block-editor store.\n */\nexport const getBlockMode = getBlockEditorSelector( 'getBlockMode' );\n\n/**\n * @see isTyping in core/block-editor store.\n */\nexport const isTyping = getBlockEditorSelector( 'isTyping' );\n\n/**\n * @see isCaretWithinFormattedText in core/block-editor store.\n */\nexport const isCaretWithinFormattedText = getBlockEditorSelector(\n\t'isCaretWithinFormattedText'\n);\n\n/**\n * @see getBlockInsertionPoint in core/block-editor store.\n */\nexport const getBlockInsertionPoint = getBlockEditorSelector(\n\t'getBlockInsertionPoint'\n);\n\n/**\n * @see isBlockInsertionPointVisible in core/block-editor store.\n */\nexport const isBlockInsertionPointVisible = getBlockEditorSelector(\n\t'isBlockInsertionPointVisible'\n);\n\n/**\n * @see isValidTemplate in core/block-editor store.\n */\nexport const isValidTemplate = getBlockEditorSelector( 'isValidTemplate' );\n\n/**\n * @see getTemplate in core/block-editor store.\n */\nexport const getTemplate = getBlockEditorSelector( 'getTemplate' );\n\n/**\n * @see getTemplateLock in core/block-editor store.\n */\nexport const getTemplateLock = getBlockEditorSelector( 'getTemplateLock' );\n\n/**\n * @see canInsertBlockType in core/block-editor store.\n */\nexport const canInsertBlockType =\n\tgetBlockEditorSelector( 'canInsertBlockType' );\n\n/**\n * @see getInserterItems in core/block-editor store.\n */\nexport const getInserterItems = getBlockEditorSelector( 'getInserterItems' );\n\n/**\n * @see hasInserterItems in core/block-editor store.\n */\nexport const hasInserterItems = getBlockEditorSelector( 'hasInserterItems' );\n\n/**\n * @see getBlockListSettings in core/block-editor store.\n */\nexport const getBlockListSettings = getBlockEditorSelector(\n\t'getBlockListSettings'\n);\n\nexport const __experimentalGetDefaultTemplateTypes = createRegistrySelector(\n\t( select ) => () => {\n\t\tdeprecated(\n\t\t\t\"select('core/editor').__experimentalGetDefaultTemplateTypes\",\n\t\t\t{\n\t\t\t\tsince: '6.8',\n\t\t\t\talternative:\n\t\t\t\t\t\"select('core/core-data').getCurrentTheme()?.default_template_types\",\n\t\t\t}\n\t\t);\n\t\treturn select( coreStore ).getCurrentTheme()?.default_template_types;\n\t}\n);\n\n/**\n * Returns the default template part areas.\n *\n * @param {Object} state Global application state.\n *\n * @return {Array} The template part areas.\n */\nexport const __experimentalGetDefaultTemplatePartAreas = createRegistrySelector(\n\t( select ) =>\n\t\tcreateSelector( () => {\n\t\t\tdeprecated(\n\t\t\t\t\"select('core/editor').__experimentalGetDefaultTemplatePartAreas\",\n\t\t\t\t{\n\t\t\t\t\tsince: '6.8',\n\t\t\t\t\talternative:\n\t\t\t\t\t\t\"select('core/core-data').getCurrentTheme()?.default_template_part_areas\",\n\t\t\t\t}\n\t\t\t);\n\n\t\t\tconst areas =\n\t\t\t\tselect( coreStore ).getCurrentTheme()\n\t\t\t\t\t?.default_template_part_areas || [];\n\n\t\t\treturn areas.map( ( item ) => {\n\t\t\t\treturn { ...item, icon: getTemplatePartIcon( item.icon ) };\n\t\t\t} );\n\t\t} )\n);\n\n/**\n * Returns a default template type searched by slug.\n *\n * @param {Object} state Global application state.\n * @param {string} slug The template type slug.\n *\n * @return {Object} The template type.\n */\nexport const __experimentalGetDefaultTemplateType = createRegistrySelector(\n\t( select ) =>\n\t\tcreateSelector( ( state, slug ) => {\n\t\t\tdeprecated(\n\t\t\t\t\"select('core/editor').__experimentalGetDefaultTemplateType\",\n\t\t\t\t{\n\t\t\t\t\tsince: '6.8',\n\t\t\t\t}\n\t\t\t);\n\t\t\tconst templateTypes =\n\t\t\t\tselect( coreStore ).getCurrentTheme()?.default_template_types;\n\n\t\t\tif ( ! templateTypes ) {\n\t\t\t\treturn EMPTY_OBJECT;\n\t\t\t}\n\n\t\t\treturn (\n\t\t\t\tObject.values( templateTypes ).find(\n\t\t\t\t\t( type ) => type.slug === slug\n\t\t\t\t) ?? EMPTY_OBJECT\n\t\t\t);\n\t\t} )\n);\n\n/**\n * Given a template entity, return information about it which is ready to be\n * rendered, such as the title, description, and icon.\n *\n * @param {Object} state Global application state.\n * @param {Object} template The template for which we need information.\n * @return {Object} Information about the template, including title, description, and icon.\n */\nexport const __experimentalGetTemplateInfo = createRegistrySelector(\n\t( select ) =>\n\t\tcreateSelector( ( state, template ) => {\n\t\t\tdeprecated( \"select('core/editor').__experimentalGetTemplateInfo\", {\n\t\t\t\tsince: '6.8',\n\t\t\t} );\n\n\t\t\tif ( ! template ) {\n\t\t\t\treturn EMPTY_OBJECT;\n\t\t\t}\n\n\t\t\tconst currentTheme = select( coreStore ).getCurrentTheme();\n\n\t\t\tconst templateTypes = currentTheme?.default_template_types || [];\n\t\t\tconst templateAreas =\n\t\t\t\tcurrentTheme?.default_template_part_areas || [];\n\n\t\t\treturn getTemplateInfo( {\n\t\t\t\ttemplate,\n\t\t\t\ttemplateAreas,\n\t\t\t\ttemplateTypes,\n\t\t\t} );\n\t\t} )\n);\n\n/**\n * Returns a post type label depending on the current post.\n *\n * @param {Object} state Global application state.\n *\n * @return {string|undefined} The post type label if available, otherwise undefined.\n */\nexport const getPostTypeLabel = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\tconst currentPostType = getCurrentPostType( state );\n\t\tconst postType = select( coreStore ).getPostType( currentPostType );\n\t\treturn postType?.labels?.singular_name;\n\t}\n);\n\n/**\n * Returns true if the publish sidebar is opened.\n *\n * @param {Object} state Global application state\n *\n * @return {boolean} Whether the publish sidebar is open.\n */\nexport function isPublishSidebarOpened( state ) {\n\treturn state.publishSidebarActive;\n}\n"],
5
+ "mappings": ";AAGA;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACM;AACP,SAAS,eAAe,eAAe;AACvC,SAAS,cAAc,oBAAoB;AAC3C,SAAS,gBAAgB,8BAA8B;AACvD,OAAO,gBAAgB;AACvB,SAAS,gBAAgB;AACzB,SAAS,SAAS,wBAAwB;AAC1C,SAAS,SAAS,iBAAiB;AACnC,SAAS,SAAS,wBAAwB;AAK1C;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACM;AACP,SAAS,uBAAuB;AAChC,SAAS,2BAA2B;AACpC,SAAS,cAAc;AACvB,SAAS,uBAAuB;AAShC,IAAM,eAAe,CAAC;AASf,IAAM,gBAAgB,uBAAwB,CAAE,WAAY,MAAM;AACxE,SAAO,OAAQ,SAAU,EAAE,QAAQ;AACpC,CAAE;AAUK,IAAM,gBAAgB,uBAAwB,CAAE,WAAY,MAAM;AACxE,SAAO,OAAQ,SAAU,EAAE,QAAQ;AACpC,CAAE;AAUK,SAAS,gBAAiB,OAAQ;AACxC,SAAO,eAAgB,KAAM,EAAE,WAAW;AAC3C;AASO,SAAS,kBAAmB,OAAQ;AAC1C,QAAM,QAAQ,aAAc,KAAM;AAClC,SAAO,aAAa;AACrB;AAUO,IAAM,oBAAoB;AAAA,EAChC,CAAE,WAAY,CAAE,UAAW;AAI1B,UAAM,WAAW,mBAAoB,KAAM;AAC3C,UAAM,SAAS,iBAAkB,KAAM;AACvC,WAAO,OAAQ,SAAU,EAAE;AAAA,MAC1B;AAAA,MACA;AAAA,MACA;AAAA,IACD;AAAA,EACD;AACD;AAUO,IAAM,0BAA0B;AAAA,EACtC,CAAE,WAAY,CAAE,UAAW;AAC1B,UAAM,qBACL,OAAQ,SAAU,EAAE,oCAAoC;AACzD,UAAM,EAAE,MAAM,GAAG,IAA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,eAAY,uDAAuD;AAAA,MAClE,OAAO;AAAA,IACR,CAAE;AAEF,QAAK,CAAE,UAAW;AACjB,aAAO;AAAA,IACR;AAEA,UAAM,eAAe,OAAQ,SAAU,EAAE,gBAAgB;AAEzD,UAAM,gBAAgB,cAAc,0BAA0B,CAAC;AAC/D,UAAM,gBACL,cAAc,+BAA+B,CAAC;AAE/C,WAAO,gBAAiB;AAAA,MACvB;AAAA,MACA;AAAA,MACA;AAAA,IACD,CAAE;AAAA,EACH,CAAE;AACJ;AASO,IAAM,mBAAmB;AAAA,EAC/B,CAAE,WAAY,CAAE,UAAW;AAC1B,UAAM,kBAAkB,mBAAoB,KAAM;AAClD,UAAM,WAAW,OAAQ,SAAU,EAAE,YAAa,eAAgB;AAClE,WAAO,UAAU,QAAQ;AAAA,EAC1B;AACD;AASO,SAAS,uBAAwB,OAAQ;AAC/C,SAAO,MAAM;AACd;",
6
6
  "names": []
7
7
  }
@@ -1,3 +1,4 @@
1
+ // packages/editor/src/store/utils/is-template-revertable.js
1
2
  import { TEMPLATE_ORIGINS } from "../constants";
2
3
  function isTemplateRevertable(templateOrTemplatePart) {
3
4
  if (!templateOrTemplatePart) {
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/store/utils/is-template-revertable.js"],
4
4
  "sourcesContent": ["/**\n * Internal dependencies\n */\nimport { TEMPLATE_ORIGINS } from '../constants';\n\n// Copy of the function from packages/edit-site/src/utils/is-template-revertable.js\n\n/**\n * Check if a template or template part is revertable to its original theme-provided file.\n *\n * @param {Object} templateOrTemplatePart The entity to check.\n * @return {boolean} Whether the entity is revertable.\n */\nexport default function isTemplateRevertable( templateOrTemplatePart ) {\n\tif ( ! templateOrTemplatePart ) {\n\t\treturn false;\n\t}\n\n\treturn (\n\t\ttemplateOrTemplatePart.source === TEMPLATE_ORIGINS.custom &&\n\t\t( Boolean( templateOrTemplatePart?.plugin ) ||\n\t\t\ttemplateOrTemplatePart?.has_theme_file )\n\t);\n}\n"],
5
- "mappings": "AAGA,SAAS,wBAAwB;AAUlB,SAAR,qBAAuC,wBAAyB;AACtE,MAAK,CAAE,wBAAyB;AAC/B,WAAO;AAAA,EACR;AAEA,SACC,uBAAuB,WAAW,iBAAiB,WACjD,QAAS,wBAAwB,MAAO,KACzC,wBAAwB;AAE3B;",
5
+ "mappings": ";AAGA,SAAS,wBAAwB;AAUlB,SAAR,qBAAuC,wBAAyB;AACtE,MAAK,CAAE,wBAAyB;AAC/B,WAAO;AAAA,EACR;AAEA,SACC,uBAAuB,WAAW,iBAAiB,WACjD,QAAS,wBAAwB,MAAO,KACzC,wBAAwB;AAE3B;",
6
6
  "names": []
7
7
  }
@@ -1,3 +1,4 @@
1
+ // packages/editor/src/store/utils/notice-builder.js
1
2
  import { __ } from "@wordpress/i18n";
2
3
  function getNotificationArgumentsForSaveSuccess(data) {
3
4
  const { previousPost, post, postType } = data;
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/store/utils/notice-builder.js"],
4
4
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Builds the arguments for a success notification dispatch.\n *\n * @param {Object} data Incoming data to build the arguments from.\n *\n * @return {Array} Arguments for dispatch. An empty array signals no\n * notification should be sent.\n */\nexport function getNotificationArgumentsForSaveSuccess( data ) {\n\tconst { previousPost, post, postType } = data;\n\t// Autosaves are neither shown a notice nor redirected.\n\tif ( data.options?.isAutosave ) {\n\t\treturn [];\n\t}\n\n\tconst publishStatus = [ 'publish', 'private', 'future' ];\n\tconst isPublished = publishStatus.includes( previousPost.status );\n\tconst willPublish = publishStatus.includes( post.status );\n\tconst willTrash =\n\t\tpost.status === 'trash' && previousPost.status !== 'trash';\n\n\tlet noticeMessage;\n\tlet shouldShowLink = postType?.viewable ?? false;\n\tlet isDraft;\n\n\t// Always should a notice, which will be spoken for accessibility.\n\tif ( willTrash ) {\n\t\tnoticeMessage = postType.labels.item_trashed;\n\t\tshouldShowLink = false;\n\t} else if ( ! isPublished && ! willPublish ) {\n\t\t// If saving a non-published post, don't show notice.\n\t\tnoticeMessage = __( 'Draft saved.' );\n\t\tisDraft = true;\n\t} else if ( isPublished && ! willPublish ) {\n\t\t// If undoing publish status, show specific notice.\n\t\tnoticeMessage = postType.labels.item_reverted_to_draft;\n\t\tshouldShowLink = false;\n\t} else if ( ! isPublished && willPublish ) {\n\t\t// If publishing or scheduling a post, show the corresponding\n\t\t// publish message.\n\t\tnoticeMessage = {\n\t\t\tpublish: postType.labels.item_published,\n\t\t\tprivate: postType.labels.item_published_privately,\n\t\t\tfuture: postType.labels.item_scheduled,\n\t\t}[ post.status ];\n\t} else {\n\t\t// Generic fallback notice.\n\t\tnoticeMessage = postType.labels.item_updated;\n\t}\n\n\tconst actions = [];\n\tif ( shouldShowLink ) {\n\t\tactions.push( {\n\t\t\tlabel: isDraft ? __( 'View Preview' ) : postType.labels.view_item,\n\t\t\turl: post.link,\n\t\t\topenInNewTab: true,\n\t\t} );\n\t}\n\treturn [\n\t\tnoticeMessage,\n\t\t{\n\t\t\tid: 'editor-save',\n\t\t\ttype: 'snackbar',\n\t\t\tactions,\n\t\t},\n\t];\n}\n\n/**\n * Builds the fail notification arguments for dispatch.\n *\n * @param {Object} data Incoming data to build the arguments with.\n *\n * @return {Array} Arguments for dispatch. An empty array signals no\n * notification should be sent.\n */\nexport function getNotificationArgumentsForSaveFail( data ) {\n\tconst { post, edits, error } = data;\n\tif ( error && 'rest_autosave_no_changes' === error.code ) {\n\t\t// Autosave requested a new autosave, but there were no changes. This shouldn't\n\t\t// result in an error notice for the user.\n\t\treturn [];\n\t}\n\n\tconst publishStatus = [ 'publish', 'private', 'future' ];\n\tconst isPublished = publishStatus.indexOf( post.status ) !== -1;\n\n\tif ( error.code === 'offline_error' ) {\n\t\tconst messages = {\n\t\t\tpublish: __( 'Publishing failed because you were offline.' ),\n\t\t\tprivate: __( 'Publishing failed because you were offline.' ),\n\t\t\tfuture: __( 'Scheduling failed because you were offline.' ),\n\t\t\tdefault: __( 'Updating failed because you were offline.' ),\n\t\t};\n\n\t\tconst noticeMessage =\n\t\t\t! isPublished && edits.status in messages\n\t\t\t\t? messages[ edits.status ]\n\t\t\t\t: messages.default;\n\n\t\treturn [ noticeMessage, { id: 'editor-save' } ];\n\t}\n\n\tconst messages = {\n\t\tpublish: __( 'Publishing failed.' ),\n\t\tprivate: __( 'Publishing failed.' ),\n\t\tfuture: __( 'Scheduling failed.' ),\n\t\tdefault: __( 'Updating failed.' ),\n\t};\n\n\tlet noticeMessage =\n\t\t! isPublished && edits.status in messages\n\t\t\t? messages[ edits.status ]\n\t\t\t: messages.default;\n\n\t// Check if message string contains HTML. Notice text is currently only\n\t// supported as plaintext, and stripping the tags may muddle the meaning.\n\tif ( error.message && ! /<\\/?[^>]*>/.test( error.message ) ) {\n\t\tnoticeMessage = [ noticeMessage, error.message ].join( ' ' );\n\t}\n\treturn [\n\t\tnoticeMessage,\n\t\t{\n\t\t\tid: 'editor-save',\n\t\t},\n\t];\n}\n\n/**\n * Builds the trash fail notification arguments for dispatch.\n *\n * @param {Object} data\n *\n * @return {Array} Arguments for dispatch.\n */\nexport function getNotificationArgumentsForTrashFail( data ) {\n\treturn [\n\t\tdata.error.message && data.error.code !== 'unknown_error'\n\t\t\t? data.error.message\n\t\t\t: __( 'Trashing failed' ),\n\t\t{\n\t\t\tid: 'editor-trash-fail',\n\t\t},\n\t];\n}\n"],
5
- "mappings": "AAGA,SAAS,UAAU;AAUZ,SAAS,uCAAwC,MAAO;AAC9D,QAAM,EAAE,cAAc,MAAM,SAAS,IAAI;AAEzC,MAAK,KAAK,SAAS,YAAa;AAC/B,WAAO,CAAC;AAAA,EACT;AAEA,QAAM,gBAAgB,CAAE,WAAW,WAAW,QAAS;AACvD,QAAM,cAAc,cAAc,SAAU,aAAa,MAAO;AAChE,QAAM,cAAc,cAAc,SAAU,KAAK,MAAO;AACxD,QAAM,YACL,KAAK,WAAW,WAAW,aAAa,WAAW;A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AI,cAAc,CAAE;AAAA,EAC/C;AAEA,QAAM,WAAW;AAAA,IAChB,SAAS,GAAI,oBAAqB;AAAA,IAClC,SAAS,GAAI,oBAAqB;AAAA,IAClC,QAAQ,GAAI,oBAAqB;AAAA,IACjC,SAAS,GAAI,kBAAmB;AAAA,EACjC;AAEA,MAAI,gBACH,CAAE,eAAe,MAAM,UAAU,WAC9B,SAAU,MAAM,MAAO,IACvB,SAAS;AAIb,MAAK,MAAM,WAAW,CAAE,aAAa,KAAM,MAAM,OAAQ,GAAI;AAC5D,oBAAgB,CAAE,eAAe,MAAM,OAAQ,EAAE,KAAM,GAAI;AAAA,EAC5D;AACA,SAAO;AAAA,IACN;AAAA,IACA;AAAA,MACC,IAAI;AAAA,IACL;AAAA,EACD;AACD;AASO,SAAS,qCAAsC,MAAO;AAC5D,SAAO;AAAA,IACN,KAAK,MAAM,WAAW,KAAK,MAAM,SAAS,kBACvC,KAAK,MAAM,UACX,GAAI,iBAAkB;AAAA,IACzB;AAAA,MACC,IAAI;AAAA,IACL;AAAA,EACD;AACD;",
6
6
  "names": ["messages", "noticeMessage"]
7
7
  }
@@ -1,3 +1,4 @@
1
+ // packages/editor/src/utils/get-item-title.js
1
2
  import { decodeEntities } from "@wordpress/html-entities";
2
3
  function getItemTitle(item) {
3
4
  if (typeof item.title === "string") {
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/utils/get-item-title.js"],
4
4
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Helper function to get the title of a post item.\n * This is duplicated from the `@wordpress/fields` package.\n * `packages/fields/src/actions/utils.ts`\n *\n * @param {Object} item The post item.\n * @return {string} The title of the item, or an empty string if the title is not found.\n */\nexport function getItemTitle( item ) {\n\tif ( typeof item.title === 'string' ) {\n\t\treturn decodeEntities( item.title );\n\t}\n\tif ( item.title && 'rendered' in item.title ) {\n\t\treturn decodeEntities( item.title.rendered );\n\t}\n\tif ( item.title && 'raw' in item.title ) {\n\t\treturn decodeEntities( item.title.raw );\n\t}\n\treturn '';\n}\n"],
5
- "mappings": "AAGA,SAAS,sBAAsB;AAUxB,SAAS,aAAc,MAAO;AACpC,MAAK,OAAO,KAAK,UAAU,UAAW;AACrC,WAAO,eAAgB,KAAK,KAAM;AAAA,EACnC;AACA,MAAK,KAAK,SAAS,cAAc,KAAK,OAAQ;AAC7C,WAAO,eAAgB,KAAK,MAAM,QAAS;AAAA,EAC5C;AACA,MAAK,KAAK,SAAS,SAAS,KAAK,OAAQ;AACxC,WAAO,eAAgB,KAAK,MAAM,GAAI;AAAA,EACvC;AACA,SAAO;AACR;",
5
+ "mappings": ";AAGA,SAAS,sBAAsB;AAUxB,SAAS,aAAc,MAAO;AACpC,MAAK,OAAO,KAAK,UAAU,UAAW;AACrC,WAAO,eAAgB,KAAK,KAAM;AAAA,EACnC;AACA,MAAK,KAAK,SAAS,cAAc,KAAK,OAAQ;AAC7C,WAAO,eAAgB,KAAK,MAAM,QAAS;AAAA,EAC5C;AACA,MAAK,KAAK,SAAS,SAAS,KAAK,OAAQ;AACxC,WAAO,eAAgB,KAAK,MAAM,GAAI;AAAA,EACvC;AACA,SAAO;AACR;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,8 @@
1
+ // packages/editor/src/utils/get-template-info.js
1
2
  import { layout } from "@wordpress/icons";
2
3
  import { getTemplatePartIcon } from "./get-template-part-icon";
3
- const EMPTY_OBJECT = {};
4
- const getTemplateInfo = (params) => {
4
+ var EMPTY_OBJECT = {};
5
+ var getTemplateInfo = (params) => {
5
6
  if (!params) {
6
7
  return EMPTY_OBJECT;
7
8
  }
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/utils/get-template-info.js"],
4
4
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { layout } from '@wordpress/icons';\n/**\n * Internal dependencies\n */\nimport { getTemplatePartIcon } from './get-template-part-icon';\nconst EMPTY_OBJECT = {};\n\n/**\n * Helper function to retrieve the corresponding template info for a given template.\n * @param {Object} params\n * @param {Array} params.templateTypes\n * @param {Array} [params.templateAreas]\n * @param {Object} params.template\n */\nexport const getTemplateInfo = ( params ) => {\n\tif ( ! params ) {\n\t\treturn EMPTY_OBJECT;\n\t}\n\n\tconst { templateTypes, templateAreas, template } = params;\n\n\tconst { description, slug, title, area } = template;\n\n\tconst { title: defaultTitle, description: defaultDescription } =\n\t\tObject.values( templateTypes ).find( ( type ) => type.slug === slug ) ??\n\t\tEMPTY_OBJECT;\n\n\tconst templateTitle = typeof title === 'string' ? title : title?.rendered;\n\tconst templateDescription =\n\t\ttypeof description === 'string' ? description : description?.raw;\n\n\tconst templateAreasWithIcon = templateAreas?.map( ( item ) => ( {\n\t\t...item,\n\t\ticon: getTemplatePartIcon( item.icon ),\n\t} ) );\n\n\tconst templateIcon =\n\t\ttemplateAreasWithIcon?.find( ( item ) => area === item.area )?.icon ||\n\t\tlayout;\n\n\treturn {\n\t\ttitle:\n\t\t\ttemplateTitle && templateTitle !== slug\n\t\t\t\t? templateTitle\n\t\t\t\t: defaultTitle || slug,\n\t\tdescription: templateDescription || defaultDescription,\n\t\ticon: templateIcon,\n\t};\n};\n"],
5
- "mappings": "AAGA,SAAS,cAAc;AAIvB,SAAS,2BAA2B;AACpC,MAAM,eAAe,CAAC;AASf,MAAM,kBAAkB,CAAE,WAAY;AAC5C,MAAK,CAAE,QAAS;AACf,WAAO;AAAA,EACR;AAEA,QAAM,EAAE,eAAe,eAAe,SAAS,IAAI;AAEnD,QAAM,EAAE,aAAa,MAAM,OAAO,KAAK,IAAI;AAE3C,QAAM,EAAE,OAAO,cAAc,aAAa,mBAAmB,IAC5D,OAAO,OAAQ,aAAc,EAAE,KAAM,CAAE,SAAU,KAAK,SAAS,IAAK,KACpE;AAED,QAAM,gBAAgB,OAAO,UAAU,WAAW,QAAQ,OAAO;AACjE,QAAM,sBACL,OAAO,gBAAgB,WAAW,cAAc,aAAa;AAE9D,QAAM,wBAAwB,eAAe,IAAK,CAAE,UAAY;AAAA,IAC/D,GAAG;AAAA,IACH,MAAM,oBAAqB,KAAK,IAAK;AAAA,EACtC,EAAI;AAEJ,QAAM,eACL,uBAAuB,KAAM,CAAE,SAAU,SAAS,KAAK,IAAK,GAAG,QAC/D;AAED,SAAO;AAAA,IACN,OACC,iBAAiB,kBAAkB,OAChC,gBACA,gBAAgB;AAAA,IACpB,aAAa,uBAAuB;AAAA,IACpC,MAAM;AAAA,EACP;AACD;",
5
+ "mappings": ";AAGA,SAAS,cAAc;AAIvB,SAAS,2BAA2B;AACpC,IAAM,eAAe,CAAC;AASf,IAAM,kBAAkB,CAAE,WAAY;AAC5C,MAAK,CAAE,QAAS;AACf,WAAO;AAAA,EACR;AAEA,QAAM,EAAE,eAAe,eAAe,SAAS,IAAI;AAEnD,QAAM,EAAE,aAAa,MAAM,OAAO,KAAK,IAAI;AAE3C,QAAM,EAAE,OAAO,cAAc,aAAa,mBAAmB,IAC5D,OAAO,OAAQ,aAAc,EAAE,KAAM,CAAE,SAAU,KAAK,SAAS,IAAK,KACpE;AAED,QAAM,gBAAgB,OAAO,UAAU,WAAW,QAAQ,OAAO;AACjE,QAAM,sBACL,OAAO,gBAAgB,WAAW,cAAc,aAAa;AAE9D,QAAM,wBAAwB,eAAe,IAAK,CAAE,UAAY;AAAA,IAC/D,GAAG;AAAA,IACH,MAAM,oBAAqB,KAAK,IAAK;AAAA,EACtC,EAAI;AAEJ,QAAM,eACL,uBAAuB,KAAM,CAAE,SAAU,SAAS,KAAK,IAAK,GAAG,QAC/D;AAED,SAAO;AAAA,IACN,OACC,iBAAiB,kBAAkB,OAChC,gBACA,gBAAgB;AAAA,IACpB,aAAa,uBAAuB;AAAA,IACpC,MAAM;AAAA,EACP;AACD;",
6
6
  "names": []
7
7
  }
@@ -1,3 +1,4 @@
1
+ // packages/editor/src/utils/get-template-part-icon.js
1
2
  import {
2
3
  header as headerIcon,
3
4
  footer as footerIcon,
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/utils/get-template-part-icon.js"],
4
4
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport {\n\theader as headerIcon,\n\tfooter as footerIcon,\n\tsidebar as sidebarIcon,\n\tsymbolFilled as symbolFilledIcon,\n} from '@wordpress/icons';\n/**\n * Helper function to retrieve the corresponding icon by name.\n *\n * @param {string} iconName The name of the icon.\n *\n * @return {Object} The corresponding icon.\n */\nexport function getTemplatePartIcon( iconName ) {\n\tif ( 'header' === iconName ) {\n\t\treturn headerIcon;\n\t} else if ( 'footer' === iconName ) {\n\t\treturn footerIcon;\n\t} else if ( 'sidebar' === iconName ) {\n\t\treturn sidebarIcon;\n\t}\n\treturn symbolFilledIcon;\n}\n"],
5
- "mappings": "AAGA;AAAA,EACC,UAAU;AAAA,EACV,UAAU;AAAA,EACV,WAAW;AAAA,EACX,gBAAgB;AAAA,OACV;AAQA,SAAS,oBAAqB,UAAW;AAC/C,MAAK,aAAa,UAAW;AAC5B,WAAO;AAAA,EACR,WAAY,aAAa,UAAW;AACnC,WAAO;AAAA,EACR,WAAY,cAAc,UAAW;AACpC,WAAO;AAAA,EACR;AACA,SAAO;AACR;",
5
+ "mappings": ";AAGA;AAAA,EACC,UAAU;AAAA,EACV,UAAU;AAAA,EACV,WAAW;AAAA,EACX,gBAAgB;AAAA,OACV;AAQA,SAAS,oBAAqB,UAAW;AAC/C,MAAK,aAAa,UAAW;AAC5B,WAAO;AAAA,EACR,WAAY,aAAa,UAAW;AACnC,WAAO;AAAA,EACR,WAAY,cAAc,UAAW;AACpC,WAAO;AAAA,EACR;AACA,SAAO;AACR;",
6
6
  "names": []
7
7
  }
@@ -1,3 +1,4 @@
1
+ // packages/editor/src/utils/index.js
1
2
  import mediaUpload from "./media-upload";
2
3
  import { cleanForSlug } from "./url.js";
3
4
  import { getTemplatePartIcon } from "./get-template-part-icon";
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/utils/index.js"],
4
4
  "sourcesContent": ["/**\n * Internal dependencies\n */\nimport mediaUpload from './media-upload';\n\nexport { mediaUpload };\nexport { cleanForSlug } from './url.js';\nexport { getTemplatePartIcon } from './get-template-part-icon';\n"],
5
- "mappings": "AAGA,OAAO,iBAAiB;AAGxB,SAAS,oBAAoB;AAC7B,SAAS,2BAA2B;",
5
+ "mappings": ";AAGA,OAAO,iBAAiB;AAGxB,SAAS,oBAAoB;AAC7B,SAAS,2BAA2B;",
6
6
  "names": []
7
7
  }
@@ -1,6 +1,7 @@
1
+ // packages/editor/src/utils/media-sideload/index.js
1
2
  import { privateApis } from "@wordpress/media-utils";
2
3
  import { unlock } from "../../lock-unlock";
3
- const { sideloadMedia: mediaSideload } = unlock(privateApis);
4
+ var { sideloadMedia: mediaSideload } = unlock(privateApis);
4
5
  var media_sideload_default = mediaSideload;
5
6
  export {
6
7
  media_sideload_default as default
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/utils/media-sideload/index.js"],
4
4
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { privateApis } from '@wordpress/media-utils';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst { sideloadMedia: mediaSideload } = unlock( privateApis );\n\nexport default mediaSideload;\n"],
5
- "mappings": "AAGA,SAAS,mBAAmB;AAK5B,SAAS,cAAc;AAEvB,MAAM,EAAE,eAAe,cAAc,IAAI,OAAQ,WAAY;AAE7D,IAAO,yBAAQ;",
5
+ "mappings": ";AAGA,SAAS,mBAAmB;AAK5B,SAAS,cAAc;AAEvB,IAAM,EAAE,eAAe,cAAc,IAAI,OAAQ,WAAY;AAE7D,IAAO,yBAAQ;",
6
6
  "names": []
7
7
  }
@@ -1,9 +1,10 @@
1
+ // packages/editor/src/utils/media-upload/index.js
1
2
  import { v4 as uuid } from "uuid";
2
3
  import { select, dispatch } from "@wordpress/data";
3
4
  import { store as coreDataStore } from "@wordpress/core-data";
4
5
  import { uploadMedia } from "@wordpress/media-utils";
5
6
  import { store as editorStore } from "../../store";
6
- const noop = () => {
7
+ var noop = () => {
7
8
  };
8
9
  function mediaUpload({
9
10
  additionalData = {},
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/utils/media-upload/index.js"],
4
4
  "sourcesContent": ["/**\n * External dependencies\n */\nimport { v4 as uuid } from 'uuid';\n\n/**\n * WordPress dependencies\n */\nimport { select, dispatch } from '@wordpress/data';\nimport { store as coreDataStore } from '@wordpress/core-data';\nimport { uploadMedia } from '@wordpress/media-utils';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nconst noop = () => {};\n\n/**\n * Upload a media file when the file upload button is activated.\n * Wrapper around uploadMedia() that injects the current post ID.\n *\n * @param {Object} $0 Parameters object passed to the function.\n * @param {?Object} $0.additionalData Additional data to include in the request.\n * @param {string} $0.allowedTypes Array with the types of media that can be uploaded, if unset all types are allowed.\n * @param {Array} $0.filesList List of files.\n * @param {?number} $0.maxUploadFileSize Maximum upload size in bytes allowed for the site.\n * @param {Function} $0.onError Function called when an error happens.\n * @param {Function} $0.onFileChange Function called each time a file or a temporary representation of the file is available.\n * @param {Function} $0.onSuccess Function called after the final representation of the file is available.\n * @param {boolean} $0.multiple Whether to allow multiple files to be uploaded.\n */\nexport default function mediaUpload( {\n\tadditionalData = {},\n\tallowedTypes,\n\tfilesList,\n\tmaxUploadFileSize,\n\tonError = noop,\n\tonFileChange,\n\tonSuccess,\n\tmultiple = true,\n} ) {\n\tconst { receiveEntityRecords } = dispatch( coreDataStore );\n\tconst { getCurrentPost, getEditorSettings } = select( editorStore );\n\tconst {\n\t\tlockPostAutosaving,\n\t\tunlockPostAutosaving,\n\t\tlockPostSaving,\n\t\tunlockPostSaving,\n\t} = dispatch( editorStore );\n\n\tconst wpAllowedMimeTypes = getEditorSettings().allowedMimeTypes;\n\tconst lockKey = `image-upload-${ uuid() }`;\n\tlet imageIsUploading = false;\n\tmaxUploadFileSize =\n\t\tmaxUploadFileSize || getEditorSettings().maxUploadFileSize;\n\tconst currentPost = getCurrentPost();\n\t// Templates and template parts' numerical ID is stored in `wp_id`.\n\tconst currentPostId =\n\t\ttypeof currentPost?.id === 'number'\n\t\t\t? currentPost.id\n\t\t\t: currentPost?.wp_id;\n\tconst setSaveLock = () => {\n\t\tlockPostSaving( lockKey );\n\t\tlockPostAutosaving( lockKey );\n\t\timageIsUploading = true;\n\t};\n\n\tconst postData = currentPostId ? { post: currentPostId } : {};\n\tconst clearSaveLock = () => {\n\t\tunlockPostSaving( lockKey );\n\t\tunlockPostAutosaving( lockKey );\n\t\timageIsUploading = false;\n\t};\n\n\tuploadMedia( {\n\t\tallowedTypes,\n\t\tfilesList,\n\t\tonFileChange: ( file ) => {\n\t\t\tif ( ! imageIsUploading ) {\n\t\t\t\tsetSaveLock();\n\t\t\t} else {\n\t\t\t\tclearSaveLock();\n\t\t\t}\n\t\t\tonFileChange?.( file );\n\n\t\t\t// Files are initially received by `onFileChange` as a blob.\n\t\t\t// After that the function is called a second time with the file as an entity.\n\t\t\t// For core-data, we only care about receiving/invalidating entities.\n\t\t\tconst entityFiles = file.filter( ( _file ) => _file?.id );\n\t\t\tif ( entityFiles?.length ) {\n\t\t\t\tconst invalidateCache = true;\n\t\t\t\treceiveEntityRecords(\n\t\t\t\t\t'postType',\n\t\t\t\t\t'attachment',\n\t\t\t\t\tentityFiles,\n\t\t\t\t\tundefined,\n\t\t\t\t\tinvalidateCache\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t\tonSuccess,\n\t\tadditionalData: {\n\t\t\t...postData,\n\t\t\t...additionalData,\n\t\t},\n\t\tmaxUploadFileSize,\n\t\tonError: ( { message } ) => {\n\t\t\tclearSaveLock();\n\t\t\tonError( message );\n\t\t},\n\t\twpAllowedMimeTypes,\n\t\tmultiple,\n\t} );\n}\n"],
5
- "mappings": "AAGA,SAAS,MAAM,YAAY;AAK3B,SAAS,QAAQ,gBAAgB;AACjC,SAAS,SAAS,qBAAqB;A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,IACA,cAAc,CAAE,SAAU;AACzB,UAAK,CAAE,kBAAmB;AACzB,oBAAY;AAAA,MACb,OAAO;AACN,sBAAc;AAAA,MACf;AACA,qBAAgB,IAAK;AAKrB,YAAM,cAAc,KAAK,OAAQ,CAAE,UAAW,OAAO,EAAG;AACxD,UAAK,aAAa,QAAS;AAC1B,cAAM,kBAAkB;AACxB;AAAA,UACC;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QACD;AAAA,MACD;AAAA,IACD;AAAA,IACA;AAAA,IACA,gBAAgB;AAAA,MACf,GAAG;AAAA,MACH,GAAG;AAAA,IACJ;AAAA,IACA;AAAA,IACA,SAAS,CAAE,EAAE,QAAQ,MAAO;AAC3B,oBAAc;AACd,cAAS,OAAQ;AAAA,IAClB;AAAA,IACA;AAAA,IACA;AAAA,EACD,CAAE;AACH;",
6
6
  "names": []
7
7
  }
@@ -1,3 +1,4 @@
1
+ // packages/editor/src/utils/pageTypeBadge.js
1
2
  import { __ } from "@wordpress/i18n";
2
3
  import { useSelect } from "@wordpress/data";
3
4
  import { store as coreStore } from "@wordpress/core-data";
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/utils/pageTypeBadge.js"],
4
4
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Custom hook to get the page type badge for the current post on edit site view.\n *\n * @param {number|string} postId postId of the current post being edited.\n */\nexport default function usePageTypeBadge( postId ) {\n\tconst { isFrontPage, isPostsPage } = useSelect( ( select ) => {\n\t\tconst { canUser, getEditedEntityRecord } = select( coreStore );\n\t\tconst siteSettings = canUser( 'read', {\n\t\t\tkind: 'root',\n\t\t\tname: 'site',\n\t\t} )\n\t\t\t? getEditedEntityRecord( 'root', 'site' )\n\t\t\t: undefined;\n\n\t\tconst _postId = parseInt( postId, 10 );\n\n\t\treturn {\n\t\t\tisFrontPage: siteSettings?.page_on_front === _postId,\n\t\t\tisPostsPage: siteSettings?.page_for_posts === _postId,\n\t\t};\n\t} );\n\n\tif ( isFrontPage ) {\n\t\treturn __( 'Homepage' );\n\t} else if ( isPostsPage ) {\n\t\treturn __( 'Posts Page' );\n\t}\n\n\treturn false;\n}\n"],
5
- "mappings": "AAGA,SAAS,UAAU;AACnB,SAAS,iBAAiB;AAC1B,SAAS,SAAS,iBAAiB;AAOpB,SAAR,iBAAmC,QAAS;AAClD,QAAM,EAAE,aAAa,YAAY,IAAI,UAAW,CAAE,WAAY;AAC7D,UAAM,EAAE,SAAS,sBAAsB,IAAI,OAAQ,SAAU;AAC7D,UAAM,eAAe,QAAS,QAAQ;AAAA,MACrC,MAAM;AAAA,MACN,MAAM;AAAA,IACP,CAAE,IACC,sBAAuB,QAAQ,MAAO,IACtC;AAEH,UAAM,UAAU,SAAU,QAAQ,EAAG;AAErC,WAAO;AAAA,MACN,aAAa,cAAc,kBAAkB;AAAA,MAC7C,aAAa,cAAc,mBAAmB;AAAA,IAC/C;AAAA,EACD,CAAE;AAEF,MAAK,aAAc;AAClB,WAAO,GAAI,UAAW;AAAA,EACvB,WAAY,aAAc;AACzB,WAAO,GAAI,YAAa;AAAA,EACzB;AAEA,SAAO;AACR;",
5
+ "mappings": ";AAGA,SAAS,UAAU;AACnB,SAAS,iBAAiB;AAC1B,SAAS,SAAS,iBAAiB;AAOpB,SAAR,iBAAmC,QAAS;AAClD,QAAM,EAAE,aAAa,YAAY,IAAI,UAAW,CAAE,WAAY;AAC7D,UAAM,EAAE,SAAS,sBAAsB,IAAI,OAAQ,SAAU;AAC7D,UAAM,eAAe,QAAS,QAAQ;AAAA,MACrC,MAAM;AAAA,MACN,MAAM;AAAA,IACP,CAAE,IACC,sBAAuB,QAAQ,MAAO,IACtC;AAEH,UAAM,UAAU,SAAU,QAAQ,EAAG;AAErC,WAAO;AAAA,MACN,aAAa,cAAc,kBAAkB;AAAA,MAC7C,aAAa,cAAc,mBAAmB;AAAA,IAC/C;AAAA,EACD,CAAE;AAEF,MAAK,aAAc;AAClB,WAAO,GAAI,UAAW;AAAA,EACvB,WAAY,aAAc;AACzB,WAAO,GAAI,YAAa;AAAA,EACzB;AAEA,SAAO;AACR;",
6
6
  "names": []
7
7
  }
@@ -1,3 +1,4 @@
1
+ // packages/editor/src/utils/search-templates.js
1
2
  import removeAccents from "remove-accents";
2
3
  function normalizeSearchInput(input = "") {
3
4
  input = removeAccents(input);
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/utils/search-templates.js"],
4
4
  "sourcesContent": ["/**\n * External dependencies\n */\nimport removeAccents from 'remove-accents';\n\n/**\n * Sanitizes the search input string.\n *\n * @param {string} input The search input to normalize.\n *\n * @return {string} The normalized search input.\n */\nfunction normalizeSearchInput( input = '' ) {\n\t// Disregard diacritics.\n\tinput = removeAccents( input );\n\n\t// Trim & Lowercase.\n\tinput = input.trim().toLowerCase();\n\n\treturn input;\n}\n\n/**\n * Get the search rank for a given template and a specific search term.\n *\n * @param {Object} template Template to rank\n * @param {string} searchValue Search term\n *\n * @return {number} A template search rank\n */\nfunction getTemplateSearchRank( template, searchValue ) {\n\tconst normalizedSearchValue = normalizeSearchInput( searchValue );\n\tconst normalizedTitle = normalizeSearchInput( template.title );\n\n\tlet rank = 0;\n\n\tif ( normalizedSearchValue === normalizedTitle ) {\n\t\trank += 30;\n\t} else if ( normalizedTitle.startsWith( normalizedSearchValue ) ) {\n\t\trank += 20;\n\t} else {\n\t\tconst searchTerms = normalizedSearchValue.split( ' ' );\n\t\tconst hasMatchedTerms = searchTerms.every( ( searchTerm ) =>\n\t\t\tnormalizedTitle.includes( searchTerm )\n\t\t);\n\n\t\t// Prefer template with every search word in the title.\n\t\tif ( hasMatchedTerms ) {\n\t\t\trank += 10;\n\t\t}\n\t}\n\n\treturn rank;\n}\n\n/**\n * Filters a template list given a search term.\n *\n * @param {Array} templates Item list\n * @param {string} searchValue Search input.\n *\n * @return {Array} Filtered template list.\n */\nexport function searchTemplates( templates = [], searchValue = '' ) {\n\tif ( ! searchValue ) {\n\t\treturn templates;\n\t}\n\n\tconst rankedTemplates = templates\n\t\t.map( ( template ) => {\n\t\t\treturn [ template, getTemplateSearchRank( template, searchValue ) ];\n\t\t} )\n\t\t.filter( ( [ , rank ] ) => rank > 0 );\n\n\trankedTemplates.sort( ( [ , rank1 ], [ , rank2 ] ) => rank2 - rank1 );\n\treturn rankedTemplates.map( ( [ template ] ) => template );\n}\n"],
5
- "mappings": "AAGA,OAAO,mBAAmB;AAS1B,SAAS,qBAAsB,QAAQ,IAAK;AAE3C,UAAQ,cAAe,KAAM;AAG7B,UAAQ,MAAM,KAAK,EAAE,YAAY;AAEjC,SAAO;AACR;AAUA,SAAS,sBAAuB,UAAU,aAAc;AACvD,QAAM,wBAAwB,qBAAsB,WAAY;AAChE,QAAM,kBAAkB,qBAAsB,SAAS,KAAM;AAE7D,MAAI,OAAO;AAEX,MAAK,0BAA0B,iBAAkB;AAChD,YAAQ;AAAA,EACT,WAAY,gBAAgB,WAAY,qBAAsB,GAAI;AACjE,YAAQ;AAAA,EACT,OAAO;AACN,UAAM,cAAc,sBAAsB,MAAO,GAAI;AACrD,UAAM,kBAAkB,YAAY;AAAA,MAAO,CAAE,eAC5C,gBAAgB,SAAU,UAAW;AAAA,IACtC;AAGA,QAAK,iBAAkB;AACtB,cAAQ;AAAA,IACT;AAAA,EACD;AAEA,SAAO;AACR;AAUO,SAAS,gBAAiB,YAAY,CAAC,GAAG,cAAc,IAAK;AACnE,MAAK,CAAE,aAAc;AACpB,WAAO;AAAA,EACR;AAEA,QAAM,kBAAkB,UACtB,IAAK,CAAE,aAAc;AACrB,WAAO,CAAE,UAAU,sBAAuB,UAAU,WAAY,CAAE;AAAA,EACnE,CAAE,EACD,OAAQ,CAAE,CAAE,EAAE,IAAK,MAAO,OAAO,CAAE;AAErC,kBAAgB,KAAM,CAAE,CAAE,EAAE,KAAM,GAAG,CAAE,EAAE,KAAM,MAAO,QAAQ,KAAM;AACpE,SAAO,gBAAgB,IAAK,CAAE,CAAE,QAAS,MAAO,QAAS;AAC1D;",
5
+ "mappings": ";AAGA,OAAO,mBAAmB;AAS1B,SAAS,qBAAsB,QAAQ,IAAK;AAE3C,UAAQ,cAAe,KAAM;AAG7B,UAAQ,MAAM,KAAK,EAAE,YAAY;AAEjC,SAAO;AACR;AAUA,SAAS,sBAAuB,UAAU,aAAc;AACvD,QAAM,wBAAwB,qBAAsB,WAAY;AAChE,QAAM,kBAAkB,qBAAsB,SAAS,KAAM;AAE7D,MAAI,OAAO;AAEX,MAAK,0BAA0B,iBAAkB;AAChD,YAAQ;AAAA,EACT,WAAY,gBAAgB,WAAY,qBAAsB,GAAI;AACjE,YAAQ;AAAA,EACT,OAAO;AACN,UAAM,cAAc,sBAAsB,MAAO,GAAI;AACrD,UAAM,kBAAkB,YAAY;AAAA,MAAO,CAAE,eAC5C,gBAAgB,SAAU,UAAW;AAAA,IACtC;AAGA,QAAK,iBAAkB;AACtB,cAAQ;AAAA,IACT;AAAA,EACD;AAEA,SAAO;AACR;AAUO,SAAS,gBAAiB,YAAY,CAAC,GAAG,cAAc,IAAK;AACnE,MAAK,CAAE,aAAc;AACpB,WAAO;AAAA,EACR;AAEA,QAAM,kBAAkB,UACtB,IAAK,CAAE,aAAc;AACrB,WAAO,CAAE,UAAU,sBAAuB,UAAU,WAAY,CAAE;AAAA,EACnE,CAAE,EACD,OAAQ,CAAE,CAAE,EAAE,IAAK,MAAO,OAAO,CAAE;AAErC,kBAAgB,KAAM,CAAE,CAAE,EAAE,KAAM,GAAG,CAAE,EAAE,KAAM,MAAO,QAAQ,KAAM;AACpE,SAAO,gBAAgB,IAAK,CAAE,CAAE,QAAS,MAAO,QAAS;AAC1D;",
6
6
  "names": []
7
7
  }
@@ -1,3 +1,4 @@
1
+ // packages/editor/src/utils/set-nested-value.js
1
2
  function setNestedValue(object, path, value) {
2
3
  if (!object || typeof object !== "object") {
3
4
  return object;