@wordpress/editor 14.32.0 → 14.32.1-next.ff1cebbba.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 (1263) hide show
  1. package/build/bindings/api.js +45 -33
  2. package/build/bindings/api.js.map +7 -1
  3. package/build/bindings/entity.js +78 -0
  4. package/build/bindings/entity.js.map +7 -0
  5. package/build/bindings/pattern-overrides.js +58 -65
  6. package/build/bindings/pattern-overrides.js.map +7 -1
  7. package/build/bindings/post-data.js +71 -91
  8. package/build/bindings/post-data.js.map +7 -1
  9. package/build/bindings/post-meta.js +74 -106
  10. package/build/bindings/post-meta.js.map +7 -1
  11. package/build/components/autocompleters/index.js +36 -11
  12. package/build/components/autocompleters/index.js.map +7 -1
  13. package/build/components/autocompleters/user.js +66 -54
  14. package/build/components/autocompleters/user.js.map +7 -1
  15. package/build/components/autosave-monitor/index.js +59 -73
  16. package/build/components/autosave-monitor/index.js.map +7 -1
  17. package/build/components/block-removal-warnings/index.js +81 -57
  18. package/build/components/block-removal-warnings/index.js.map +7 -1
  19. package/build/components/block-settings-menu/content-only-settings-menu.js +161 -121
  20. package/build/components/block-settings-menu/content-only-settings-menu.js.map +7 -1
  21. package/build/components/block-settings-menu/plugin-block-settings-menu-item.js +42 -99
  22. package/build/components/block-settings-menu/plugin-block-settings-menu-item.js.map +7 -1
  23. package/build/components/block-visibility/index.js +123 -0
  24. package/build/components/block-visibility/index.js.map +7 -0
  25. package/build/components/blog-title/index.js +127 -108
  26. package/build/components/blog-title/index.js.map +7 -1
  27. package/build/components/character-count/index.js +30 -23
  28. package/build/components/character-count/index.js.map +7 -1
  29. package/build/components/collab-sidebar/add-comment.js +89 -70
  30. package/build/components/collab-sidebar/add-comment.js.map +7 -1
  31. package/build/components/collab-sidebar/comment-author-info.js +72 -84
  32. package/build/components/collab-sidebar/comment-author-info.js.map +7 -1
  33. package/build/components/collab-sidebar/comment-form.js +92 -81
  34. package/build/components/collab-sidebar/comment-form.js.map +7 -1
  35. package/build/components/collab-sidebar/comment-indicator-toolbar.js +96 -83
  36. package/build/components/collab-sidebar/comment-indicator-toolbar.js.map +7 -1
  37. package/build/components/collab-sidebar/comment-menu-item.js +46 -0
  38. package/build/components/collab-sidebar/comment-menu-item.js.map +7 -0
  39. package/build/components/collab-sidebar/comments.js +544 -317
  40. package/build/components/collab-sidebar/comments.js.map +7 -1
  41. package/build/components/collab-sidebar/constants.js +30 -7
  42. package/build/components/collab-sidebar/constants.js.map +7 -1
  43. package/build/components/collab-sidebar/hooks.js +312 -58
  44. package/build/components/collab-sidebar/hooks.js.map +7 -1
  45. package/build/components/collab-sidebar/index.js +183 -252
  46. package/build/components/collab-sidebar/index.js.map +7 -1
  47. package/build/components/collab-sidebar/utils.js +94 -79
  48. package/build/components/collab-sidebar/utils.js.map +7 -1
  49. package/build/components/collapsible-block-toolbar/index.js +70 -60
  50. package/build/components/collapsible-block-toolbar/index.js.map +7 -1
  51. package/build/components/commands/index.js +218 -268
  52. package/build/components/commands/index.js.map +7 -1
  53. package/build/components/deprecated.js +328 -248
  54. package/build/components/deprecated.js.map +7 -1
  55. package/build/components/document-bar/index.js +145 -153
  56. package/build/components/document-bar/index.js.map +7 -1
  57. package/build/components/document-outline/check.js +28 -27
  58. package/build/components/document-outline/check.js.map +7 -1
  59. package/build/components/document-outline/index.js +169 -207
  60. package/build/components/document-outline/index.js.map +7 -1
  61. package/build/components/document-outline/item.js +68 -35
  62. package/build/components/document-outline/item.js.map +7 -1
  63. package/build/components/document-tools/index.js +145 -133
  64. package/build/components/document-tools/index.js.map +7 -1
  65. package/build/components/editor/index.js +99 -63
  66. package/build/components/editor/index.js.map +7 -1
  67. package/build/components/editor-history/redo.js +51 -54
  68. package/build/components/editor-history/redo.js.map +7 -1
  69. package/build/components/editor-history/undo.js +50 -53
  70. package/build/components/editor-history/undo.js.map +7 -1
  71. package/build/components/editor-interface/content-slot-fill.js +27 -12
  72. package/build/components/editor-interface/content-slot-fill.js.map +7 -1
  73. package/build/components/editor-interface/index.js +142 -127
  74. package/build/components/editor-interface/index.js.map +7 -1
  75. package/build/components/editor-notices/index.js +74 -58
  76. package/build/components/editor-notices/index.js.map +7 -1
  77. package/build/components/editor-snackbars/index.js +40 -32
  78. package/build/components/editor-snackbars/index.js.map +7 -1
  79. package/build/components/entities-saved-states/entity-record-item.js +70 -70
  80. package/build/components/entities-saved-states/entity-record-item.js.map +7 -1
  81. package/build/components/entities-saved-states/entity-type-list.js +108 -78
  82. package/build/components/entities-saved-states/entity-type-list.js.map +7 -1
  83. package/build/components/entities-saved-states/hooks/use-is-dirty.js +62 -61
  84. package/build/components/entities-saved-states/hooks/use-is-dirty.js.map +7 -1
  85. package/build/components/entities-saved-states/index.js +177 -161
  86. package/build/components/entities-saved-states/index.js.map +7 -1
  87. package/build/components/error-boundary/index.js +59 -85
  88. package/build/components/error-boundary/index.js.map +7 -1
  89. package/build/components/global-keyboard-shortcuts/index.js +58 -71
  90. package/build/components/global-keyboard-shortcuts/index.js.map +7 -1
  91. package/build/components/global-keyboard-shortcuts/register-shortcuts.js +106 -93
  92. package/build/components/global-keyboard-shortcuts/register-shortcuts.js.map +7 -1
  93. package/build/components/global-styles-provider/index.js +173 -146
  94. package/build/components/global-styles-provider/index.js.map +7 -1
  95. package/build/components/header/back-button.js +40 -26
  96. package/build/components/header/back-button.js.map +7 -1
  97. package/build/components/header/index.js +175 -162
  98. package/build/components/header/index.js.map +7 -1
  99. package/build/components/index.js +311 -780
  100. package/build/components/index.js.map +7 -1
  101. package/build/components/inserter-sidebar/index.js +62 -71
  102. package/build/components/inserter-sidebar/index.js.map +7 -1
  103. package/build/components/keyboard-shortcut-help-modal/config.js +74 -70
  104. package/build/components/keyboard-shortcut-help-modal/config.js.map +7 -1
  105. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +61 -43
  106. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +7 -1
  107. package/build/components/keyboard-shortcut-help-modal/index.js +165 -111
  108. package/build/components/keyboard-shortcut-help-modal/index.js.map +7 -1
  109. package/build/components/keyboard-shortcut-help-modal/shortcut.js +76 -55
  110. package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +7 -1
  111. package/build/components/list-view-sidebar/index.js +117 -121
  112. package/build/components/list-view-sidebar/index.js.map +7 -1
  113. package/build/components/list-view-sidebar/list-view-outline.js +56 -41
  114. package/build/components/list-view-sidebar/list-view-outline.js.map +7 -1
  115. package/build/components/local-autosave-monitor/index.js +118 -148
  116. package/build/components/local-autosave-monitor/index.js.map +7 -1
  117. package/build/components/media-categories/index.js +160 -144
  118. package/build/components/media-categories/index.js.map +7 -1
  119. package/build/components/mode-switcher/index.js +68 -63
  120. package/build/components/mode-switcher/index.js.map +7 -1
  121. package/build/components/more-menu/copy-content-menu-item.js +46 -43
  122. package/build/components/more-menu/copy-content-menu-item.js.map +7 -1
  123. package/build/components/more-menu/index.js +174 -119
  124. package/build/components/more-menu/index.js.map +7 -1
  125. package/build/components/more-menu/tools-more-menu-group.js +27 -21
  126. package/build/components/more-menu/tools-more-menu-group.js.map +7 -1
  127. package/build/components/more-menu/view-more-menu-group.js +30 -22
  128. package/build/components/more-menu/view-more-menu-group.js.map +7 -1
  129. package/build/components/page-attributes/check.js +37 -40
  130. package/build/components/page-attributes/check.js.map +7 -1
  131. package/build/components/page-attributes/order.js +66 -64
  132. package/build/components/page-attributes/order.js.map +7 -1
  133. package/build/components/page-attributes/panel.js +45 -43
  134. package/build/components/page-attributes/panel.js.map +7 -1
  135. package/build/components/page-attributes/parent.js +224 -207
  136. package/build/components/page-attributes/parent.js.map +7 -1
  137. package/build/components/pattern-duplicate-modal/index.js +58 -48
  138. package/build/components/pattern-duplicate-modal/index.js.map +7 -1
  139. package/build/components/pattern-overrides-panel/index.js +33 -23
  140. package/build/components/pattern-overrides-panel/index.js.map +7 -1
  141. package/build/components/pattern-rename-modal/index.js +51 -47
  142. package/build/components/pattern-rename-modal/index.js.map +7 -1
  143. package/build/components/plugin-document-setting-panel/index.js +74 -114
  144. package/build/components/plugin-document-setting-panel/index.js.map +7 -1
  145. package/build/components/plugin-more-menu-item/index.js +37 -78
  146. package/build/components/plugin-more-menu-item/index.js.map +7 -1
  147. package/build/components/plugin-post-publish-panel/index.js +37 -59
  148. package/build/components/plugin-post-publish-panel/index.js.map +7 -1
  149. package/build/components/plugin-post-status-info/index.js +27 -73
  150. package/build/components/plugin-post-status-info/index.js.map +7 -1
  151. package/build/components/plugin-pre-publish-panel/index.js +37 -62
  152. package/build/components/plugin-pre-publish-panel/index.js.map +7 -1
  153. package/build/components/plugin-preview-menu-item/index.js +37 -57
  154. package/build/components/plugin-preview-menu-item/index.js.map +7 -1
  155. package/build/components/plugin-sidebar/index.js +34 -86
  156. package/build/components/plugin-sidebar/index.js.map +7 -1
  157. package/build/components/plugin-sidebar-more-menu-item/index.js +33 -67
  158. package/build/components/plugin-sidebar-more-menu-item/index.js.map +7 -1
  159. package/build/components/post-actions/actions.js +111 -103
  160. package/build/components/post-actions/actions.js.map +7 -1
  161. package/build/components/post-actions/index.js +126 -131
  162. package/build/components/post-actions/index.js.map +7 -1
  163. package/build/components/post-actions/set-as-homepage.js +123 -123
  164. package/build/components/post-actions/set-as-homepage.js.map +7 -1
  165. package/build/components/post-actions/set-as-posts-page.js +118 -120
  166. package/build/components/post-actions/set-as-posts-page.js.map +7 -1
  167. package/build/components/post-author/check.js +41 -38
  168. package/build/components/post-author/check.js.map +7 -1
  169. package/build/components/post-author/combobox.js +50 -52
  170. package/build/components/post-author/combobox.js.map +7 -1
  171. package/build/components/post-author/constants.js +34 -10
  172. package/build/components/post-author/constants.js.map +7 -1
  173. package/build/components/post-author/hook.js +71 -71
  174. package/build/components/post-author/hook.js.map +7 -1
  175. package/build/components/post-author/index.js +43 -31
  176. package/build/components/post-author/index.js.map +7 -1
  177. package/build/components/post-author/panel.js +106 -95
  178. package/build/components/post-author/panel.js.map +7 -1
  179. package/build/components/post-author/select.js +45 -40
  180. package/build/components/post-author/select.js.map +7 -1
  181. package/build/components/post-card-panel/index.js +128 -113
  182. package/build/components/post-card-panel/index.js.map +7 -1
  183. package/build/components/post-comments/index.js +60 -55
  184. package/build/components/post-comments/index.js.map +7 -1
  185. package/build/components/post-content-information/index.js +64 -65
  186. package/build/components/post-content-information/index.js.map +7 -1
  187. package/build/components/post-discussion/panel.js +114 -128
  188. package/build/components/post-discussion/panel.js.map +7 -1
  189. package/build/components/post-excerpt/check.js +37 -27
  190. package/build/components/post-excerpt/check.js.map +7 -1
  191. package/build/components/post-excerpt/index.js +75 -71
  192. package/build/components/post-excerpt/index.js.map +7 -1
  193. package/build/components/post-excerpt/panel.js +152 -141
  194. package/build/components/post-excerpt/panel.js.map +7 -1
  195. package/build/components/post-excerpt/plugin.js +28 -70
  196. package/build/components/post-excerpt/plugin.js.map +7 -1
  197. package/build/components/post-featured-image/check.js +38 -32
  198. package/build/components/post-featured-image/check.js.map +7 -1
  199. package/build/components/post-featured-image/index.js +224 -211
  200. package/build/components/post-featured-image/index.js.map +7 -1
  201. package/build/components/post-featured-image/panel.js +55 -59
  202. package/build/components/post-featured-image/panel.js.map +7 -1
  203. package/build/components/post-fields/index.js +55 -56
  204. package/build/components/post-fields/index.js.map +7 -1
  205. package/build/components/post-format/check.js +42 -33
  206. package/build/components/post-format/check.js.map +7 -1
  207. package/build/components/post-format/index.js +100 -113
  208. package/build/components/post-format/index.js.map +7 -1
  209. package/build/components/post-format/panel.js +91 -82
  210. package/build/components/post-format/panel.js.map +7 -1
  211. package/build/components/post-last-edited-panel/index.js +38 -29
  212. package/build/components/post-last-edited-panel/index.js.map +7 -1
  213. package/build/components/post-last-revision/check.js +41 -41
  214. package/build/components/post-last-revision/check.js.map +7 -1
  215. package/build/components/post-last-revision/index.js +75 -66
  216. package/build/components/post-last-revision/index.js.map +7 -1
  217. package/build/components/post-last-revision/panel.js +39 -30
  218. package/build/components/post-last-revision/panel.js.map +7 -1
  219. package/build/components/post-locked-modal/index.js +148 -145
  220. package/build/components/post-locked-modal/index.js.map +7 -1
  221. package/build/components/post-panel-row/index.js +49 -35
  222. package/build/components/post-panel-row/index.js.map +7 -1
  223. package/build/components/post-panel-section/index.js +38 -26
  224. package/build/components/post-panel-section/index.js.map +7 -1
  225. package/build/components/post-pending-status/check.js +34 -40
  226. package/build/components/post-pending-status/check.js.map +7 -1
  227. package/build/components/post-pending-status/index.js +58 -41
  228. package/build/components/post-pending-status/index.js.map +7 -1
  229. package/build/components/post-pingbacks/index.js +52 -44
  230. package/build/components/post-pingbacks/index.js.map +7 -1
  231. package/build/components/post-preview-button/index.js +90 -120
  232. package/build/components/post-preview-button/index.js.map +7 -1
  233. package/build/components/post-publish-button/index.js +125 -137
  234. package/build/components/post-publish-button/index.js.map +7 -1
  235. package/build/components/post-publish-button/label.js +39 -40
  236. package/build/components/post-publish-button/label.js.map +7 -1
  237. package/build/components/post-publish-button/post-publish-button-or-toggle.js +62 -68
  238. package/build/components/post-publish-button/post-publish-button-or-toggle.js.map +7 -1
  239. package/build/components/post-publish-panel/index.js +136 -135
  240. package/build/components/post-publish-panel/index.js.map +7 -1
  241. package/build/components/post-publish-panel/maybe-category-panel.js +71 -67
  242. package/build/components/post-publish-panel/maybe-category-panel.js.map +7 -1
  243. package/build/components/post-publish-panel/maybe-post-format-panel.js +72 -63
  244. package/build/components/post-publish-panel/maybe-post-format-panel.js.map +7 -1
  245. package/build/components/post-publish-panel/maybe-tags-panel.js +86 -80
  246. package/build/components/post-publish-panel/maybe-tags-panel.js.map +7 -1
  247. package/build/components/post-publish-panel/maybe-upload-media.js +172 -214
  248. package/build/components/post-publish-panel/maybe-upload-media.js.map +7 -1
  249. package/build/components/post-publish-panel/media-util.js +63 -72
  250. package/build/components/post-publish-panel/media-util.js.map +7 -1
  251. package/build/components/post-publish-panel/postpublish.js +135 -130
  252. package/build/components/post-publish-panel/postpublish.js.map +7 -1
  253. package/build/components/post-publish-panel/prepublish.js +137 -103
  254. package/build/components/post-publish-panel/prepublish.js.map +7 -1
  255. package/build/components/post-saved-state/index.js +115 -131
  256. package/build/components/post-saved-state/index.js.map +7 -1
  257. package/build/components/post-schedule/check.js +27 -29
  258. package/build/components/post-schedule/check.js.map +7 -1
  259. package/build/components/post-schedule/index.js +96 -93
  260. package/build/components/post-schedule/index.js.map +7 -1
  261. package/build/components/post-schedule/label.js +79 -86
  262. package/build/components/post-schedule/label.js.map +7 -1
  263. package/build/components/post-schedule/panel.js +88 -73
  264. package/build/components/post-schedule/panel.js.map +7 -1
  265. package/build/components/post-status/index.js +238 -202
  266. package/build/components/post-status/index.js.map +7 -1
  267. package/build/components/post-sticky/check.js +30 -35
  268. package/build/components/post-sticky/check.js.map +7 -1
  269. package/build/components/post-sticky/index.js +50 -40
  270. package/build/components/post-sticky/index.js.map +7 -1
  271. package/build/components/post-sticky/panel.js +43 -21
  272. package/build/components/post-sticky/panel.js.map +7 -1
  273. package/build/components/post-switch-to-draft-button/index.js +80 -75
  274. package/build/components/post-switch-to-draft-button/index.js.map +7 -1
  275. package/build/components/post-sync-status/index.js +45 -44
  276. package/build/components/post-sync-status/index.js.map +7 -1
  277. package/build/components/post-taxonomies/check.js +36 -33
  278. package/build/components/post-taxonomies/check.js.map +7 -1
  279. package/build/components/post-taxonomies/flat-term-selector.js +189 -189
  280. package/build/components/post-taxonomies/flat-term-selector.js.map +7 -1
  281. package/build/components/post-taxonomies/hierarchical-term-selector.js +244 -280
  282. package/build/components/post-taxonomies/hierarchical-term-selector.js.map +7 -1
  283. package/build/components/post-taxonomies/index.js +68 -58
  284. package/build/components/post-taxonomies/index.js.map +7 -1
  285. package/build/components/post-taxonomies/most-used-terms.js +73 -56
  286. package/build/components/post-taxonomies/most-used-terms.js.map +7 -1
  287. package/build/components/post-taxonomies/panel.js +66 -69
  288. package/build/components/post-taxonomies/panel.js.map +7 -1
  289. package/build/components/post-template/block-theme.js +165 -123
  290. package/build/components/post-template/block-theme.js.map +7 -1
  291. package/build/components/post-template/classic-theme.js +193 -187
  292. package/build/components/post-template/classic-theme.js.map +7 -1
  293. package/build/components/post-template/create-new-template-modal.js +139 -110
  294. package/build/components/post-template/create-new-template-modal.js.map +7 -1
  295. package/build/components/post-template/create-new-template.js +65 -46
  296. package/build/components/post-template/create-new-template.js.map +7 -1
  297. package/build/components/post-template/hooks.js +116 -84
  298. package/build/components/post-template/hooks.js.map +7 -1
  299. package/build/components/post-template/panel.js +56 -52
  300. package/build/components/post-template/panel.js.map +7 -1
  301. package/build/components/post-template/reset-default-template.js +49 -43
  302. package/build/components/post-template/reset-default-template.js.map +7 -1
  303. package/build/components/post-template/swap-template-button.js +109 -91
  304. package/build/components/post-template/swap-template-button.js.map +7 -1
  305. package/build/components/post-text-editor/index.js +80 -81
  306. package/build/components/post-text-editor/index.js.map +7 -1
  307. package/build/components/post-title/constants.js +30 -7
  308. package/build/components/post-title/constants.js.map +7 -1
  309. package/build/components/post-title/index.js +99 -126
  310. package/build/components/post-title/index.js.map +7 -1
  311. package/build/components/post-title/post-title-raw.js +74 -78
  312. package/build/components/post-title/post-title-raw.js.map +7 -1
  313. package/build/components/post-title/use-post-title-focus.js +35 -52
  314. package/build/components/post-title/use-post-title-focus.js.map +7 -1
  315. package/build/components/post-title/use-post-title.js +30 -37
  316. package/build/components/post-title/use-post-title.js.map +7 -1
  317. package/build/components/post-transform-panel/hooks.js +70 -67
  318. package/build/components/post-transform-panel/hooks.js.map +7 -1
  319. package/build/components/post-transform-panel/index.js +69 -75
  320. package/build/components/post-transform-panel/index.js.map +7 -1
  321. package/build/components/post-trash/check.js +33 -42
  322. package/build/components/post-trash/check.js.map +7 -1
  323. package/build/components/post-trash/index.js +78 -67
  324. package/build/components/post-trash/index.js.map +7 -1
  325. package/build/components/post-type-support-check/index.js +34 -47
  326. package/build/components/post-type-support-check/index.js.map +7 -1
  327. package/build/components/post-url/check.js +31 -32
  328. package/build/components/post-url/check.js.map +7 -1
  329. package/build/components/post-url/index.js +155 -156
  330. package/build/components/post-url/index.js.map +7 -1
  331. package/build/components/post-url/label.js +35 -30
  332. package/build/components/post-url/label.js.map +7 -1
  333. package/build/components/post-url/panel.js +111 -112
  334. package/build/components/post-url/panel.js.map +7 -1
  335. package/build/components/post-view-link/index.js +48 -47
  336. package/build/components/post-view-link/index.js.map +7 -1
  337. package/build/components/post-visibility/check.js +28 -33
  338. package/build/components/post-visibility/check.js.map +7 -1
  339. package/build/components/post-visibility/index.js +83 -84
  340. package/build/components/post-visibility/index.js.map +7 -1
  341. package/build/components/post-visibility/label.js +35 -30
  342. package/build/components/post-visibility/label.js.map +7 -1
  343. package/build/components/post-visibility/utils.js +44 -23
  344. package/build/components/post-visibility/utils.js.map +7 -1
  345. package/build/components/posts-per-page/index.js +110 -98
  346. package/build/components/posts-per-page/index.js.map +7 -1
  347. package/build/components/preferences-modal/enable-panel.js +47 -42
  348. package/build/components/preferences-modal/enable-panel.js.map +7 -1
  349. package/build/components/preferences-modal/enable-plugin-document-setting-panel.js +40 -31
  350. package/build/components/preferences-modal/enable-plugin-document-setting-panel.js.map +7 -1
  351. package/build/components/preferences-modal/enable-publish-sidebar.js +39 -32
  352. package/build/components/preferences-modal/enable-publish-sidebar.js.map +7 -1
  353. package/build/components/preferences-modal/index.js +391 -231
  354. package/build/components/preferences-modal/index.js.map +7 -1
  355. package/build/components/preview-dropdown/index.js +165 -151
  356. package/build/components/preview-dropdown/index.js.map +7 -1
  357. package/build/components/provider/disable-non-page-content-blocks.js +67 -82
  358. package/build/components/provider/disable-non-page-content-blocks.js.map +7 -1
  359. package/build/components/provider/index.js +283 -325
  360. package/build/components/provider/index.js.map +7 -1
  361. package/build/components/provider/navigation-block-editing-mode.js +32 -29
  362. package/build/components/provider/navigation-block-editing-mode.js.map +7 -1
  363. package/build/components/provider/use-auto-switch-editor-sidebars.js +48 -39
  364. package/build/components/provider/use-auto-switch-editor-sidebars.js.map +7 -1
  365. package/build/components/provider/use-block-editor-settings.js +249 -178
  366. package/build/components/provider/use-block-editor-settings.js.map +7 -1
  367. package/build/components/provider/use-hide-blocks-from-inserter.js +87 -46
  368. package/build/components/provider/use-hide-blocks-from-inserter.js.map +7 -1
  369. package/build/components/provider/use-post-content-blocks.js +48 -29
  370. package/build/components/provider/use-post-content-blocks.js.map +7 -1
  371. package/build/components/provider/with-registry-provider.js +52 -46
  372. package/build/components/provider/with-registry-provider.js.map +7 -1
  373. package/build/components/resizable-editor/index.js +99 -86
  374. package/build/components/resizable-editor/index.js.map +7 -1
  375. package/build/components/resizable-editor/resize-handle.js +42 -36
  376. package/build/components/resizable-editor/resize-handle.js.map +7 -1
  377. package/build/components/save-publish-panels/index.js +88 -69
  378. package/build/components/save-publish-panels/index.js.map +7 -1
  379. package/build/components/sidebar/constants.js +29 -8
  380. package/build/components/sidebar/constants.js.map +7 -1
  381. package/build/components/sidebar/header.js +56 -50
  382. package/build/components/sidebar/header.js.map +7 -1
  383. package/build/components/sidebar/index.js +156 -136
  384. package/build/components/sidebar/index.js.map +7 -1
  385. package/build/components/sidebar/post-summary.js +114 -91
  386. package/build/components/sidebar/post-summary.js.map +7 -1
  387. package/build/components/site-discussion/index.js +132 -113
  388. package/build/components/site-discussion/index.js.map +7 -1
  389. package/build/components/start-page-options/index.js +136 -146
  390. package/build/components/start-page-options/index.js.map +7 -1
  391. package/build/components/start-template-options/index.js +168 -157
  392. package/build/components/start-template-options/index.js.map +7 -1
  393. package/build/components/table-of-contents/index.js +78 -69
  394. package/build/components/table-of-contents/index.js.map +7 -1
  395. package/build/components/table-of-contents/panel.js +101 -94
  396. package/build/components/table-of-contents/panel.js.map +7 -1
  397. package/build/components/template-content-panel/index.js +74 -58
  398. package/build/components/template-content-panel/index.js.map +7 -1
  399. package/build/components/template-part-content-panel/index.js +51 -54
  400. package/build/components/template-part-content-panel/index.js.map +7 -1
  401. package/build/components/template-part-menu-items/convert-to-regular.js +44 -32
  402. package/build/components/template-part-menu-items/convert-to-regular.js.map +7 -1
  403. package/build/components/template-part-menu-items/convert-to-template-part.js +76 -68
  404. package/build/components/template-part-menu-items/convert-to-template-part.js.map +7 -1
  405. package/build/components/template-part-menu-items/index.js +62 -52
  406. package/build/components/template-part-menu-items/index.js.map +7 -1
  407. package/build/components/template-validation-notice/index.js +71 -47
  408. package/build/components/template-validation-notice/index.js.map +7 -1
  409. package/build/components/text-editor/index.js +68 -62
  410. package/build/components/text-editor/index.js.map +7 -1
  411. package/build/components/theme-support-check/index.js +32 -43
  412. package/build/components/theme-support-check/index.js.map +7 -1
  413. package/build/components/time-to-read/index.js +54 -51
  414. package/build/components/time-to-read/index.js.map +7 -1
  415. package/build/components/unsaved-changes-warning/index.js +34 -38
  416. package/build/components/unsaved-changes-warning/index.js.map +7 -1
  417. package/build/components/visual-editor/edit-template-blocks-notification.js +64 -68
  418. package/build/components/visual-editor/edit-template-blocks-notification.js.map +7 -1
  419. package/build/components/visual-editor/index.js +286 -247
  420. package/build/components/visual-editor/index.js.map +7 -1
  421. package/build/components/visual-editor/use-select-nearest-editable-block.js +75 -68
  422. package/build/components/visual-editor/use-select-nearest-editable-block.js.map +7 -1
  423. package/build/components/visual-editor/use-zoom-out-mode-exit.js +52 -46
  424. package/build/components/visual-editor/use-zoom-out-mode-exit.js.map +7 -1
  425. package/build/components/word-count/index.js +34 -35
  426. package/build/components/word-count/index.js.map +7 -1
  427. package/build/components/zoom-out-toggle/index.js +88 -72
  428. package/build/components/zoom-out-toggle/index.js.map +7 -1
  429. package/build/dataviews/api.js +47 -80
  430. package/build/dataviews/api.js.map +7 -1
  431. package/build/dataviews/fields/content-preview/content-preview-view.js +81 -89
  432. package/build/dataviews/fields/content-preview/content-preview-view.js.map +7 -1
  433. package/build/dataviews/fields/content-preview/index.js +39 -21
  434. package/build/dataviews/fields/content-preview/index.js.map +7 -1
  435. package/build/dataviews/store/private-actions.js +122 -56
  436. package/build/dataviews/store/private-actions.js.map +7 -1
  437. package/build/dataviews/store/private-selectors.js +32 -15
  438. package/build/dataviews/store/private-selectors.js.map +7 -1
  439. package/build/dataviews/store/reducer.js +50 -31
  440. package/build/dataviews/store/reducer.js.map +7 -1
  441. package/build/hooks/custom-sources-backwards-compatibility.js +70 -83
  442. package/build/hooks/custom-sources-backwards-compatibility.js.map +7 -1
  443. package/build/hooks/default-autocompleters.js +9 -17
  444. package/build/hooks/default-autocompleters.js.map +7 -1
  445. package/build/hooks/index.js +7 -7
  446. package/build/hooks/index.js.map +7 -1
  447. package/build/hooks/media-upload.js +8 -9
  448. package/build/hooks/media-upload.js.map +7 -1
  449. package/build/hooks/navigation-link-view-button.js +44 -66
  450. package/build/hooks/navigation-link-view-button.js.map +7 -1
  451. package/build/hooks/pattern-overrides.js +51 -70
  452. package/build/hooks/pattern-overrides.js.map +7 -1
  453. package/build/hooks/template-part-navigation-edit-button.js +91 -0
  454. package/build/hooks/template-part-navigation-edit-button.js.map +7 -0
  455. package/build/index.js +41 -77
  456. package/build/index.js.map +7 -1
  457. package/build/lock-unlock.js +31 -14
  458. package/build/lock-unlock.js.map +7 -1
  459. package/build/private-apis.js +76 -59
  460. package/build/private-apis.js.map +7 -1
  461. package/build/store/actions.js +516 -931
  462. package/build/store/actions.js.map +7 -1
  463. package/build/store/constants.js +70 -31
  464. package/build/store/constants.js.map +7 -1
  465. package/build/store/defaults.js +31 -33
  466. package/build/store/defaults.js.map +7 -1
  467. package/build/store/index.js +52 -41
  468. package/build/store/index.js.map +7 -1
  469. package/build/store/local-autosave.js +39 -27
  470. package/build/store/local-autosave.js.map +7 -1
  471. package/build/store/private-actions.js +290 -299
  472. package/build/store/private-actions.js.map +7 -1
  473. package/build/store/private-selectors.js +189 -188
  474. package/build/store/private-selectors.js.map +7 -1
  475. package/build/store/reducer.js +128 -280
  476. package/build/store/reducer.js.map +7 -1
  477. package/build/store/selectors.js +819 -1470
  478. package/build/store/selectors.js.map +7 -1
  479. package/build/store/utils/is-template-revertable.js +24 -19
  480. package/build/store/utils/is-template-revertable.js.map +7 -1
  481. package/build/store/utils/notice-builder.js +73 -94
  482. package/build/store/utils/notice-builder.js.map +7 -1
  483. package/build/utils/get-item-title.js +34 -25
  484. package/build/utils/get-item-title.js.map +7 -1
  485. package/build/utils/get-template-info.js +37 -46
  486. package/build/utils/get-template-info.js.map +7 -1
  487. package/build/utils/get-template-part-icon.js +34 -24
  488. package/build/utils/get-template-part-icon.js.map +7 -1
  489. package/build/utils/index.js +41 -24
  490. package/build/utils/index.js.map +7 -1
  491. package/build/utils/media-sideload/index.js +26 -19
  492. package/build/utils/media-sideload/index.js.map +7 -1
  493. package/build/utils/media-upload/index.js +46 -63
  494. package/build/utils/media-upload/index.js.map +7 -1
  495. package/build/utils/pageTypeBadge.js +33 -31
  496. package/build/utils/pageTypeBadge.js.map +7 -1
  497. package/build/utils/search-templates.js +45 -47
  498. package/build/utils/search-templates.js.map +7 -1
  499. package/build/utils/terms.js +57 -63
  500. package/build/utils/terms.js.map +7 -1
  501. package/build/utils/url.js +43 -33
  502. package/build/utils/url.js.map +7 -1
  503. package/build-module/bindings/api.js +11 -26
  504. package/build-module/bindings/api.js.map +7 -1
  505. package/build-module/bindings/entity.js +58 -0
  506. package/build-module/bindings/entity.js.map +7 -0
  507. package/build-module/bindings/pattern-overrides.js +39 -59
  508. package/build-module/bindings/pattern-overrides.js.map +7 -1
  509. package/build-module/bindings/post-data.js +53 -87
  510. package/build-module/bindings/post-data.js.map +7 -1
  511. package/build-module/bindings/post-meta.js +55 -101
  512. package/build-module/bindings/post-meta.js.map +7 -1
  513. package/build-module/components/autocompleters/index.js +5 -2
  514. package/build-module/components/autocompleters/index.js.map +7 -1
  515. package/build-module/components/autocompleters/user.js +45 -49
  516. package/build-module/components/autocompleters/user.js.map +7 -1
  517. package/build-module/components/autosave-monitor/index.js +37 -67
  518. package/build-module/components/autosave-monitor/index.js.map +7 -1
  519. package/build-module/components/block-removal-warnings/index.js +64 -54
  520. package/build-module/components/block-removal-warnings/index.js.map +7 -1
  521. package/build-module/components/block-settings-menu/content-only-settings-menu.js +136 -113
  522. package/build-module/components/block-settings-menu/content-only-settings-menu.js.map +7 -1
  523. package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js +23 -93
  524. package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js.map +7 -1
  525. package/build-module/components/block-visibility/index.js +103 -0
  526. package/build-module/components/block-visibility/index.js.map +7 -0
  527. package/build-module/components/blog-title/index.js +102 -101
  528. package/build-module/components/blog-title/index.js.map +7 -1
  529. package/build-module/components/character-count/index.js +13 -20
  530. package/build-module/components/character-count/index.js.map +7 -1
  531. package/build-module/components/collab-sidebar/add-comment.js +64 -66
  532. package/build-module/components/collab-sidebar/add-comment.js.map +7 -1
  533. package/build-module/components/collab-sidebar/comment-author-info.js +55 -77
  534. package/build-module/components/collab-sidebar/comment-author-info.js.map +7 -1
  535. package/build-module/components/collab-sidebar/comment-form.js +68 -75
  536. package/build-module/components/collab-sidebar/comment-form.js.map +7 -1
  537. package/build-module/components/collab-sidebar/comment-indicator-toolbar.js +67 -76
  538. package/build-module/components/collab-sidebar/comment-indicator-toolbar.js.map +7 -1
  539. package/build-module/components/collab-sidebar/comment-menu-item.js +26 -0
  540. package/build-module/components/collab-sidebar/comment-menu-item.js.map +7 -0
  541. package/build-module/components/collab-sidebar/comments.js +521 -309
  542. package/build-module/components/collab-sidebar/comments.js.map +7 -1
  543. package/build-module/components/collab-sidebar/constants.js +7 -3
  544. package/build-module/components/collab-sidebar/constants.js.map +7 -1
  545. package/build-module/components/collab-sidebar/hooks.js +301 -54
  546. package/build-module/components/collab-sidebar/hooks.js.map +7 -1
  547. package/build-module/components/collab-sidebar/index.js +158 -245
  548. package/build-module/components/collab-sidebar/index.js.map +7 -1
  549. package/build-module/components/collab-sidebar/utils.js +71 -76
  550. package/build-module/components/collab-sidebar/utils.js.map +7 -1
  551. package/build-module/components/collapsible-block-toolbar/index.js +44 -52
  552. package/build-module/components/collapsible-block-toolbar/index.js.map +7 -1
  553. package/build-module/components/commands/index.js +188 -241
  554. package/build-module/components/commands/index.js.map +7 -1
  555. package/build-module/components/deprecated.js +297 -237
  556. package/build-module/components/deprecated.js.map +7 -1
  557. package/build-module/components/document-bar/index.js +114 -141
  558. package/build-module/components/document-bar/index.js.map +7 -1
  559. package/build-module/components/document-outline/check.js +10 -23
  560. package/build-module/components/document-outline/check.js.map +7 -1
  561. package/build-module/components/document-outline/index.js +141 -203
  562. package/build-module/components/document-outline/index.js.map +7 -1
  563. package/build-module/components/document-outline/item.js +40 -29
  564. package/build-module/components/document-outline/item.js.map +7 -1
  565. package/build-module/components/document-tools/index.js +115 -125
  566. package/build-module/components/document-tools/index.js.map +7 -1
  567. package/build-module/components/editor/index.js +71 -57
  568. package/build-module/components/editor/index.js.map +7 -1
  569. package/build-module/components/editor-history/redo.js +33 -49
  570. package/build-module/components/editor-history/redo.js.map +7 -1
  571. package/build-module/components/editor-history/undo.js +32 -48
  572. package/build-module/components/editor-history/undo.js.map +7 -1
  573. package/build-module/components/editor-interface/content-slot-fill.js +9 -7
  574. package/build-module/components/editor-interface/content-slot-fill.js.map +7 -1
  575. package/build-module/components/editor-interface/index.js +111 -118
  576. package/build-module/components/editor-interface/index.js.map +7 -1
  577. package/build-module/components/editor-notices/index.js +43 -53
  578. package/build-module/components/editor-notices/index.js.map +7 -1
  579. package/build-module/components/editor-snackbars/index.js +23 -29
  580. package/build-module/components/editor-snackbars/index.js.map +7 -1
  581. package/build-module/components/entities-saved-states/entity-record-item.js +52 -65
  582. package/build-module/components/entities-saved-states/entity-record-item.js.map +7 -1
  583. package/build-module/components/entities-saved-states/entity-type-list.js +81 -73
  584. package/build-module/components/entities-saved-states/entity-type-list.js.map +7 -1
  585. package/build-module/components/entities-saved-states/hooks/use-is-dirty.js +39 -55
  586. package/build-module/components/entities-saved-states/hooks/use-is-dirty.js.map +7 -1
  587. package/build-module/components/entities-saved-states/index.js +150 -152
  588. package/build-module/components/entities-saved-states/index.js.map +7 -1
  589. package/build-module/components/error-boundary/index.js +42 -77
  590. package/build-module/components/error-boundary/index.js.map +7 -1
  591. package/build-module/components/global-keyboard-shortcuts/index.js +39 -66
  592. package/build-module/components/global-keyboard-shortcuts/index.js.map +7 -1
  593. package/build-module/components/global-keyboard-shortcuts/register-shortcuts.js +86 -88
  594. package/build-module/components/global-keyboard-shortcuts/register-shortcuts.js.map +7 -1
  595. package/build-module/components/global-styles-provider/index.js +135 -134
  596. package/build-module/components/global-styles-provider/index.js.map +7 -1
  597. package/build-module/components/header/back-button.js +20 -20
  598. package/build-module/components/header/back-button.js.map +7 -1
  599. package/build-module/components/header/index.js +148 -151
  600. package/build-module/components/header/index.js.map +7 -1
  601. package/build-module/components/index.js +192 -118
  602. package/build-module/components/index.js.map +7 -1
  603. package/build-module/components/inserter-sidebar/index.js +45 -64
  604. package/build-module/components/inserter-sidebar/index.js.map +7 -1
  605. package/build-module/components/keyboard-shortcut-help-modal/config.js +62 -75
  606. package/build-module/components/keyboard-shortcut-help-modal/config.js.map +7 -1
  607. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +33 -37
  608. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +7 -1
  609. package/build-module/components/keyboard-shortcut-help-modal/index.js +140 -105
  610. package/build-module/components/keyboard-shortcut-help-modal/index.js.map +7 -1
  611. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +58 -50
  612. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +7 -1
  613. package/build-module/components/list-view-sidebar/index.js +86 -109
  614. package/build-module/components/list-view-sidebar/index.js.map +7 -1
  615. package/build-module/components/list-view-sidebar/list-view-outline.js +29 -36
  616. package/build-module/components/list-view-sidebar/list-view-outline.js.map +7 -1
  617. package/build-module/components/local-autosave-monitor/index.js +81 -130
  618. package/build-module/components/local-autosave-monitor/index.js.map +7 -1
  619. package/build-module/components/media-categories/index.js +139 -137
  620. package/build-module/components/media-categories/index.js.map +7 -1
  621. package/build-module/components/mode-switcher/index.js +50 -60
  622. package/build-module/components/mode-switcher/index.js.map +7 -1
  623. package/build-module/components/more-menu/copy-content-menu-item.js +27 -37
  624. package/build-module/components/more-menu/copy-content-menu-item.js.map +7 -1
  625. package/build-module/components/more-menu/index.js +154 -113
  626. package/build-module/components/more-menu/index.js.map +7 -1
  627. package/build-module/components/more-menu/tools-more-menu-group.js +9 -16
  628. package/build-module/components/more-menu/tools-more-menu-group.js.map +7 -1
  629. package/build-module/components/more-menu/view-more-menu-group.js +12 -17
  630. package/build-module/components/more-menu/view-more-menu-group.js.map +7 -1
  631. package/build-module/components/page-attributes/check.js +15 -35
  632. package/build-module/components/page-attributes/check.js.map +7 -1
  633. package/build-module/components/page-attributes/order.js +42 -58
  634. package/build-module/components/page-attributes/order.js.map +7 -1
  635. package/build-module/components/page-attributes/panel.js +18 -37
  636. package/build-module/components/page-attributes/panel.js.map +7 -1
  637. package/build-module/components/page-attributes/parent.js +198 -197
  638. package/build-module/components/page-attributes/parent.js.map +7 -1
  639. package/build-module/components/pattern-duplicate-modal/index.js +36 -42
  640. package/build-module/components/pattern-duplicate-modal/index.js.map +7 -1
  641. package/build-module/components/pattern-overrides-panel/index.js +16 -19
  642. package/build-module/components/pattern-overrides-panel/index.js.map +7 -1
  643. package/build-module/components/pattern-rename-modal/index.js +29 -41
  644. package/build-module/components/pattern-rename-modal/index.js.map +7 -1
  645. package/build-module/components/plugin-document-setting-panel/index.js +46 -108
  646. package/build-module/components/plugin-document-setting-panel/index.js.map +7 -1
  647. package/build-module/components/plugin-more-menu-item/index.js +18 -74
  648. package/build-module/components/plugin-more-menu-item/index.js.map +7 -1
  649. package/build-module/components/plugin-post-publish-panel/index.js +19 -54
  650. package/build-module/components/plugin-post-publish-panel/index.js.map +7 -1
  651. package/build-module/components/plugin-post-status-info/index.js +9 -68
  652. package/build-module/components/plugin-post-status-info/index.js.map +7 -1
  653. package/build-module/components/plugin-pre-publish-panel/index.js +19 -57
  654. package/build-module/components/plugin-pre-publish-panel/index.js.map +7 -1
  655. package/build-module/components/plugin-preview-menu-item/index.js +18 -53
  656. package/build-module/components/plugin-preview-menu-item/index.js.map +7 -1
  657. package/build-module/components/plugin-sidebar/index.js +16 -83
  658. package/build-module/components/plugin-sidebar/index.js.map +7 -1
  659. package/build-module/components/plugin-sidebar-more-menu-item/index.js +15 -64
  660. package/build-module/components/plugin-sidebar-more-menu-item/index.js.map +7 -1
  661. package/build-module/components/post-actions/actions.js +85 -94
  662. package/build-module/components/post-actions/actions.js.map +7 -1
  663. package/build-module/components/post-actions/index.js +104 -121
  664. package/build-module/components/post-actions/index.js.map +7 -1
  665. package/build-module/components/post-actions/set-as-homepage.js +104 -115
  666. package/build-module/components/post-actions/set-as-homepage.js.map +7 -1
  667. package/build-module/components/post-actions/set-as-posts-page.js +99 -112
  668. package/build-module/components/post-actions/set-as-posts-page.js.map +7 -1
  669. package/build-module/components/post-author/check.js +12 -33
  670. package/build-module/components/post-author/check.js.map +7 -1
  671. package/build-module/components/post-author/combobox.js +32 -47
  672. package/build-module/components/post-author/combobox.js.map +7 -1
  673. package/build-module/components/post-author/constants.js +11 -6
  674. package/build-module/components/post-author/constants.js.map +7 -1
  675. package/build-module/components/post-author/hook.js +48 -65
  676. package/build-module/components/post-author/hook.js.map +7 -1
  677. package/build-module/components/post-author/index.js +14 -24
  678. package/build-module/components/post-author/index.js.map +7 -1
  679. package/build-module/components/post-author/panel.js +73 -87
  680. package/build-module/components/post-author/panel.js.map +7 -1
  681. package/build-module/components/post-author/select.js +28 -36
  682. package/build-module/components/post-author/select.js.map +7 -1
  683. package/build-module/components/post-card-panel/index.js +107 -105
  684. package/build-module/components/post-card-panel/index.js.map +7 -1
  685. package/build-module/components/post-comments/index.js +45 -50
  686. package/build-module/components/post-comments/index.js.map +7 -1
  687. package/build-module/components/post-content-information/index.js +49 -61
  688. package/build-module/components/post-content-information/index.js.map +7 -1
  689. package/build-module/components/post-discussion/panel.js +90 -122
  690. package/build-module/components/post-discussion/panel.js.map +7 -1
  691. package/build-module/components/post-excerpt/check.js +9 -23
  692. package/build-module/components/post-excerpt/check.js.map +7 -1
  693. package/build-module/components/post-excerpt/index.js +57 -68
  694. package/build-module/components/post-excerpt/index.js.map +7 -1
  695. package/build-module/components/post-excerpt/panel.js +124 -134
  696. package/build-module/components/post-excerpt/panel.js.map +7 -1
  697. package/build-module/components/post-excerpt/plugin.js +10 -65
  698. package/build-module/components/post-excerpt/plugin.js.map +7 -1
  699. package/build-module/components/post-featured-image/check.js +10 -28
  700. package/build-module/components/post-featured-image/check.js.map +7 -1
  701. package/build-module/components/post-featured-image/index.js +203 -200
  702. package/build-module/components/post-featured-image/index.js.map +7 -1
  703. package/build-module/components/post-featured-image/panel.js +26 -52
  704. package/build-module/components/post-featured-image/panel.js.map +7 -1
  705. package/build-module/components/post-fields/index.js +36 -49
  706. package/build-module/components/post-fields/index.js.map +7 -1
  707. package/build-module/components/post-format/check.js +14 -29
  708. package/build-module/components/post-format/check.js.map +7 -1
  709. package/build-module/components/post-format/index.js +68 -107
  710. package/build-module/components/post-format/index.js.map +7 -1
  711. package/build-module/components/post-format/panel.js +60 -73
  712. package/build-module/components/post-format/panel.js.map +7 -1
  713. package/build-module/components/post-last-edited-panel/index.js +20 -24
  714. package/build-module/components/post-last-edited-panel/index.js.map +7 -1
  715. package/build-module/components/post-last-revision/check.js +13 -37
  716. package/build-module/components/post-last-revision/check.js.map +7 -1
  717. package/build-module/components/post-last-revision/index.js +43 -59
  718. package/build-module/components/post-last-revision/index.js.map +7 -1
  719. package/build-module/components/post-last-revision/panel.js +10 -25
  720. package/build-module/components/post-last-revision/panel.js.map +7 -1
  721. package/build-module/components/post-locked-modal/index.js +133 -137
  722. package/build-module/components/post-locked-modal/index.js.map +7 -1
  723. package/build-module/components/post-panel-row/index.js +21 -29
  724. package/build-module/components/post-panel-row/index.js.map +7 -1
  725. package/build-module/components/post-panel-section/index.js +10 -20
  726. package/build-module/components/post-panel-section/index.js.map +7 -1
  727. package/build-module/components/post-pending-status/check.js +12 -35
  728. package/build-module/components/post-pending-status/check.js.map +7 -1
  729. package/build-module/components/post-pending-status/index.js +27 -36
  730. package/build-module/components/post-pending-status/index.js.map +7 -1
  731. package/build-module/components/post-pingbacks/index.js +34 -39
  732. package/build-module/components/post-pingbacks/index.js.map +7 -1
  733. package/build-module/components/post-preview-button/index.js +71 -114
  734. package/build-module/components/post-preview-button/index.js.map +7 -1
  735. package/build-module/components/post-publish-button/index.js +93 -130
  736. package/build-module/components/post-publish-button/index.js.map +7 -1
  737. package/build-module/components/post-publish-button/label.js +20 -35
  738. package/build-module/components/post-publish-button/label.js.map +7 -1
  739. package/build-module/components/post-publish-button/post-publish-button-or-toggle.js +28 -56
  740. package/build-module/components/post-publish-button/post-publish-button-or-toggle.js.map +7 -1
  741. package/build-module/components/post-publish-panel/index.js +108 -126
  742. package/build-module/components/post-publish-panel/index.js.map +7 -1
  743. package/build-module/components/post-publish-panel/maybe-category-panel.js +40 -58
  744. package/build-module/components/post-publish-panel/maybe-category-panel.js.map +7 -1
  745. package/build-module/components/post-publish-panel/maybe-post-format-panel.js +55 -59
  746. package/build-module/components/post-publish-panel/maybe-post-format-panel.js.map +7 -1
  747. package/build-module/components/post-publish-panel/maybe-tags-panel.js +57 -73
  748. package/build-module/components/post-publish-panel/maybe-tags-panel.js.map +7 -1
  749. package/build-module/components/post-publish-panel/maybe-upload-media.js +158 -207
  750. package/build-module/components/post-publish-panel/maybe-upload-media.js.map +7 -1
  751. package/build-module/components/post-publish-panel/media-util.js +42 -69
  752. package/build-module/components/post-publish-panel/media-util.js.map +7 -1
  753. package/build-module/components/post-publish-panel/postpublish.js +109 -120
  754. package/build-module/components/post-publish-panel/postpublish.js.map +7 -1
  755. package/build-module/components/post-publish-panel/prepublish.js +108 -96
  756. package/build-module/components/post-publish-panel/prepublish.js.map +7 -1
  757. package/build-module/components/post-saved-state/index.js +87 -124
  758. package/build-module/components/post-saved-state/index.js.map +7 -1
  759. package/build-module/components/post-schedule/check.js +9 -25
  760. package/build-module/components/post-schedule/check.js.map +7 -1
  761. package/build-module/components/post-schedule/index.js +75 -88
  762. package/build-module/components/post-schedule/index.js.map +7 -1
  763. package/build-module/components/post-schedule/label.js +49 -73
  764. package/build-module/components/post-schedule/label.js.map +7 -1
  765. package/build-module/components/post-schedule/panel.js +63 -65
  766. package/build-module/components/post-schedule/panel.js.map +7 -1
  767. package/build-module/components/post-status/index.js +223 -194
  768. package/build-module/components/post-status/index.js.map +7 -1
  769. package/build-module/components/post-sticky/check.js +10 -29
  770. package/build-module/components/post-sticky/check.js.map +7 -1
  771. package/build-module/components/post-sticky/index.js +22 -36
  772. package/build-module/components/post-sticky/index.js.map +7 -1
  773. package/build-module/components/post-sticky/panel.js +12 -15
  774. package/build-module/components/post-sticky/panel.js.map +7 -1
  775. package/build-module/components/post-switch-to-draft-button/index.js +54 -70
  776. package/build-module/components/post-switch-to-draft-button/index.js.map +7 -1
  777. package/build-module/components/post-sync-status/index.js +17 -40
  778. package/build-module/components/post-sync-status/index.js.map +7 -1
  779. package/build-module/components/post-taxonomies/check.js +17 -28
  780. package/build-module/components/post-taxonomies/check.js.map +7 -1
  781. package/build-module/components/post-taxonomies/flat-term-selector.js +154 -177
  782. package/build-module/components/post-taxonomies/flat-term-selector.js.map +7 -1
  783. package/build-module/components/post-taxonomies/hierarchical-term-selector.js +232 -270
  784. package/build-module/components/post-taxonomies/hierarchical-term-selector.js.map +7 -1
  785. package/build-module/components/post-taxonomies/index.js +34 -49
  786. package/build-module/components/post-taxonomies/index.js.map +7 -1
  787. package/build-module/components/post-taxonomies/most-used-terms.js +54 -50
  788. package/build-module/components/post-taxonomies/most-used-terms.js.map +7 -1
  789. package/build-module/components/post-taxonomies/panel.js +39 -66
  790. package/build-module/components/post-taxonomies/panel.js.map +7 -1
  791. package/build-module/components/post-template/block-theme.js +134 -114
  792. package/build-module/components/post-template/block-theme.js.map +7 -1
  793. package/build-module/components/post-template/classic-theme.js +161 -177
  794. package/build-module/components/post-template/classic-theme.js.map +7 -1
  795. package/build-module/components/post-template/create-new-template-modal.js +126 -104
  796. package/build-module/components/post-template/create-new-template-modal.js.map +7 -1
  797. package/build-module/components/post-template/create-new-template.js +36 -39
  798. package/build-module/components/post-template/create-new-template.js.map +7 -1
  799. package/build-module/components/post-template/hooks.js +95 -80
  800. package/build-module/components/post-template/hooks.js.map +7 -1
  801. package/build-module/components/post-template/panel.js +25 -45
  802. package/build-module/components/post-template/panel.js.map +7 -1
  803. package/build-module/components/post-template/reset-default-template.js +33 -36
  804. package/build-module/components/post-template/reset-default-template.js.map +7 -1
  805. package/build-module/components/post-template/swap-template-button.js +86 -81
  806. package/build-module/components/post-template/swap-template-button.js.map +7 -1
  807. package/build-module/components/post-text-editor/index.js +49 -74
  808. package/build-module/components/post-text-editor/index.js.map +7 -1
  809. package/build-module/components/post-title/constants.js +7 -3
  810. package/build-module/components/post-title/constants.js.map +7 -1
  811. package/build-module/components/post-title/index.js +67 -111
  812. package/build-module/components/post-title/index.js.map +7 -1
  813. package/build-module/components/post-title/post-title-raw.js +43 -71
  814. package/build-module/components/post-title/post-title-raw.js.map +7 -1
  815. package/build-module/components/post-title/use-post-title-focus.js +15 -46
  816. package/build-module/components/post-title/use-post-title-focus.js.map +7 -1
  817. package/build-module/components/post-title/use-post-title.js +13 -33
  818. package/build-module/components/post-title/use-post-title.js.map +7 -1
  819. package/build-module/components/post-transform-panel/hooks.js +44 -58
  820. package/build-module/components/post-transform-panel/hooks.js.map +7 -1
  821. package/build-module/components/post-transform-panel/index.js +53 -69
  822. package/build-module/components/post-transform-panel/index.js.map +7 -1
  823. package/build-module/components/post-trash/check.js +14 -37
  824. package/build-module/components/post-trash/check.js.map +7 -1
  825. package/build-module/components/post-trash/index.js +49 -59
  826. package/build-module/components/post-trash/index.js.map +7 -1
  827. package/build-module/components/post-type-support-check/index.js +16 -42
  828. package/build-module/components/post-type-support-check/index.js.map +7 -1
  829. package/build-module/components/post-url/check.js +9 -24
  830. package/build-module/components/post-url/check.js.map +7 -1
  831. package/build-module/components/post-url/index.js +137 -146
  832. package/build-module/components/post-url/index.js.map +7 -1
  833. package/build-module/components/post-url/label.js +14 -26
  834. package/build-module/components/post-url/label.js.map +7 -1
  835. package/build-module/components/post-url/panel.js +80 -105
  836. package/build-module/components/post-url/panel.js.map +7 -1
  837. package/build-module/components/post-view-link/index.js +27 -39
  838. package/build-module/components/post-view-link/index.js.map +7 -1
  839. package/build-module/components/post-visibility/check.js +10 -29
  840. package/build-module/components/post-visibility/check.js.map +7 -1
  841. package/build-module/components/post-visibility/index.js +66 -78
  842. package/build-module/components/post-visibility/index.js.map +7 -1
  843. package/build-module/components/post-visibility/label.js +15 -27
  844. package/build-module/components/post-visibility/label.js.map +7 -1
  845. package/build-module/components/post-visibility/utils.js +22 -18
  846. package/build-module/components/post-visibility/utils.js.map +7 -1
  847. package/build-module/components/posts-per-page/index.js +85 -91
  848. package/build-module/components/posts-per-page/index.js.map +7 -1
  849. package/build-module/components/preferences-modal/enable-panel.js +30 -38
  850. package/build-module/components/preferences-modal/enable-panel.js.map +7 -1
  851. package/build-module/components/preferences-modal/enable-plugin-document-setting-panel.js +12 -25
  852. package/build-module/components/preferences-modal/enable-plugin-document-setting-panel.js.map +7 -1
  853. package/build-module/components/preferences-modal/enable-publish-sidebar.js +21 -27
  854. package/build-module/components/preferences-modal/enable-publish-sidebar.js.map +7 -1
  855. package/build-module/components/preferences-modal/index.js +365 -225
  856. package/build-module/components/preferences-modal/index.js.map +7 -1
  857. package/build-module/components/preview-dropdown/index.js +140 -141
  858. package/build-module/components/preview-dropdown/index.js.map +7 -1
  859. package/build-module/components/provider/disable-non-page-content-blocks.js +34 -72
  860. package/build-module/components/provider/disable-non-page-content-blocks.js.map +7 -1
  861. package/build-module/components/provider/index.js +257 -317
  862. package/build-module/components/provider/index.js.map +7 -1
  863. package/build-module/components/provider/navigation-block-editing-mode.js +14 -25
  864. package/build-module/components/provider/navigation-block-editing-mode.js.map +7 -1
  865. package/build-module/components/provider/use-auto-switch-editor-sidebars.js +28 -33
  866. package/build-module/components/provider/use-auto-switch-editor-sidebars.js.map +7 -1
  867. package/build-module/components/provider/use-block-editor-settings.js +223 -166
  868. package/build-module/components/provider/use-block-editor-settings.js.map +7 -1
  869. package/build-module/components/provider/use-hide-blocks-from-inserter.js +65 -42
  870. package/build-module/components/provider/use-hide-blocks-from-inserter.js.map +7 -1
  871. package/build-module/components/provider/use-post-content-blocks.js +31 -25
  872. package/build-module/components/provider/use-post-content-blocks.js.map +7 -1
  873. package/build-module/components/provider/with-registry-provider.js +34 -41
  874. package/build-module/components/provider/with-registry-provider.js.map +7 -1
  875. package/build-module/components/resizable-editor/index.js +70 -80
  876. package/build-module/components/resizable-editor/index.js.map +7 -1
  877. package/build-module/components/resizable-editor/resize-handle.js +27 -30
  878. package/build-module/components/resizable-editor/resize-handle.js.map +7 -1
  879. package/build-module/components/save-publish-panels/index.js +56 -62
  880. package/build-module/components/save-publish-panels/index.js.map +7 -1
  881. package/build-module/components/sidebar/constants.js +7 -4
  882. package/build-module/components/sidebar/constants.js.map +7 -1
  883. package/build-module/components/sidebar/header.js +38 -45
  884. package/build-module/components/sidebar/header.js.map +7 -1
  885. package/build-module/components/sidebar/index.js +136 -125
  886. package/build-module/components/sidebar/index.js.map +7 -1
  887. package/build-module/components/sidebar/post-summary.js +86 -87
  888. package/build-module/components/sidebar/post-summary.js.map +7 -1
  889. package/build-module/components/site-discussion/index.js +110 -107
  890. package/build-module/components/site-discussion/index.js.map +7 -1
  891. package/build-module/components/start-page-options/index.js +114 -137
  892. package/build-module/components/start-page-options/index.js.map +7 -1
  893. package/build-module/components/start-template-options/index.js +148 -150
  894. package/build-module/components/start-template-options/index.js.map +7 -1
  895. package/build-module/components/table-of-contents/index.js +50 -63
  896. package/build-module/components/table-of-contents/index.js.map +7 -1
  897. package/build-module/components/table-of-contents/panel.js +73 -88
  898. package/build-module/components/table-of-contents/panel.js.map +7 -1
  899. package/build-module/components/template-content-panel/index.js +57 -54
  900. package/build-module/components/template-content-panel/index.js.map +7 -1
  901. package/build-module/components/template-part-content-panel/index.js +35 -48
  902. package/build-module/components/template-part-content-panel/index.js.map +7 -1
  903. package/build-module/components/template-part-menu-items/convert-to-regular.js +26 -27
  904. package/build-module/components/template-part-menu-items/convert-to-regular.js.map +7 -1
  905. package/build-module/components/template-part-menu-items/convert-to-template-part.js +56 -61
  906. package/build-module/components/template-part-menu-items/convert-to-template-part.js.map +7 -1
  907. package/build-module/components/template-part-menu-items/index.js +38 -47
  908. package/build-module/components/template-part-menu-items/index.js.map +7 -1
  909. package/build-module/components/template-validation-notice/index.js +55 -41
  910. package/build-module/components/template-validation-notice/index.js.map +7 -1
  911. package/build-module/components/text-editor/index.js +38 -54
  912. package/build-module/components/text-editor/index.js.map +7 -1
  913. package/build-module/components/theme-support-check/index.js +13 -38
  914. package/build-module/components/theme-support-check/index.js.map +7 -1
  915. package/build-module/components/time-to-read/index.js +36 -48
  916. package/build-module/components/time-to-read/index.js.map +7 -1
  917. package/build-module/components/unsaved-changes-warning/index.js +16 -34
  918. package/build-module/components/unsaved-changes-warning/index.js.map +7 -1
  919. package/build-module/components/visual-editor/edit-template-blocks-notification.js +44 -63
  920. package/build-module/components/visual-editor/edit-template-blocks-notification.js.map +7 -1
  921. package/build-module/components/visual-editor/index.js +256 -225
  922. package/build-module/components/visual-editor/index.js.map +7 -1
  923. package/build-module/components/visual-editor/use-select-nearest-editable-block.js +58 -64
  924. package/build-module/components/visual-editor/use-select-nearest-editable-block.js.map +7 -1
  925. package/build-module/components/visual-editor/use-zoom-out-mode-exit.js +31 -43
  926. package/build-module/components/visual-editor/use-zoom-out-mode-exit.js.map +7 -1
  927. package/build-module/components/word-count/index.js +16 -32
  928. package/build-module/components/word-count/index.js.map +7 -1
  929. package/build-module/components/zoom-out-toggle/index.js +72 -66
  930. package/build-module/components/zoom-out-toggle/index.js.map +7 -1
  931. package/build-module/dataviews/api.js +26 -77
  932. package/build-module/dataviews/api.js.map +7 -1
  933. package/build-module/dataviews/fields/content-preview/content-preview-view.js +66 -85
  934. package/build-module/dataviews/fields/content-preview/content-preview-view.js.map +7 -1
  935. package/build-module/dataviews/fields/content-preview/index.js +10 -15
  936. package/build-module/dataviews/fields/content-preview/index.js.map +7 -1
  937. package/build-module/dataviews/store/private-actions.js +113 -43
  938. package/build-module/dataviews/store/private-actions.js.map +7 -1
  939. package/build-module/dataviews/store/private-selectors.js +11 -12
  940. package/build-module/dataviews/store/private-selectors.js.map +7 -1
  941. package/build-module/dataviews/store/reducer.js +32 -26
  942. package/build-module/dataviews/store/reducer.js.map +7 -1
  943. package/build-module/hooks/custom-sources-backwards-compatibility.js +70 -83
  944. package/build-module/hooks/custom-sources-backwards-compatibility.js.map +7 -1
  945. package/build-module/hooks/default-autocompleters.js +9 -15
  946. package/build-module/hooks/default-autocompleters.js.map +7 -1
  947. package/build-module/hooks/index.js +7 -9
  948. package/build-module/hooks/index.js.map +7 -1
  949. package/build-module/hooks/media-upload.js +8 -7
  950. package/build-module/hooks/media-upload.js.map +7 -1
  951. package/build-module/hooks/navigation-link-view-button.js +46 -63
  952. package/build-module/hooks/navigation-link-view-button.js.map +7 -1
  953. package/build-module/hooks/pattern-overrides.js +48 -67
  954. package/build-module/hooks/pattern-overrides.js.map +7 -1
  955. package/build-module/hooks/template-part-navigation-edit-button.js +97 -0
  956. package/build-module/hooks/template-part-navigation-edit-button.js.map +7 -0
  957. package/build-module/index.js +13 -15
  958. package/build-module/index.js.map +7 -1
  959. package/build-module/lock-unlock.js +8 -7
  960. package/build-module/lock-unlock.js.map +7 -1
  961. package/build-module/private-apis.js +31 -31
  962. package/build-module/private-apis.js.map +7 -1
  963. package/build-module/store/actions.js +424 -872
  964. package/build-module/store/actions.js.map +7 -1
  965. package/build-module/store/constants.js +36 -27
  966. package/build-module/store/constants.js.map +7 -1
  967. package/build-module/store/defaults.js +8 -28
  968. package/build-module/store/defaults.js.map +7 -1
  969. package/build-module/store/index.js +15 -30
  970. package/build-module/store/index.js.map +7 -1
  971. package/build-module/store/local-autosave.js +18 -24
  972. package/build-module/store/local-autosave.js.map +7 -1
  973. package/build-module/store/private-actions.js +242 -257
  974. package/build-module/store/private-actions.js.map +7 -1
  975. package/build-module/store/private-selectors.js +157 -174
  976. package/build-module/store/private-selectors.js.map +7 -1
  977. package/build-module/store/reducer.js +89 -267
  978. package/build-module/store/reducer.js.map +7 -1
  979. package/build-module/store/selectors.js +712 -1433
  980. package/build-module/store/selectors.js.map +7 -1
  981. package/build-module/store/utils/is-template-revertable.js +6 -15
  982. package/build-module/store/utils/is-template-revertable.js.map +7 -1
  983. package/build-module/store/utils/notice-builder.js +52 -91
  984. package/build-module/store/utils/notice-builder.js.map +7 -1
  985. package/build-module/utils/get-item-title.js +10 -19
  986. package/build-module/utils/get-item-title.js.map +7 -1
  987. package/build-module/utils/get-template-info.js +14 -38
  988. package/build-module/utils/get-template-info.js.map +7 -1
  989. package/build-module/utils/get-template-part-icon.js +14 -16
  990. package/build-module/utils/get-template-part-icon.js.map +7 -1
  991. package/build-module/utils/index.js +9 -8
  992. package/build-module/utils/index.js.map +7 -1
  993. package/build-module/utils/media-sideload/index.js +8 -14
  994. package/build-module/utils/media-sideload/index.js.map +7 -1
  995. package/build-module/utils/media-upload/index.js +26 -56
  996. package/build-module/utils/media-upload/index.js.map +7 -1
  997. package/build-module/utils/pageTypeBadge.js +16 -28
  998. package/build-module/utils/pageTypeBadge.js.map +7 -1
  999. package/build-module/utils/search-templates.js +12 -41
  1000. package/build-module/utils/search-templates.js.map +7 -1
  1001. package/build-module/utils/terms.js +32 -55
  1002. package/build-module/utils/terms.js.map +7 -1
  1003. package/build-module/utils/url.js +11 -28
  1004. package/build-module/utils/url.js.map +7 -1
  1005. package/build-style/style-rtl.css +327 -136
  1006. package/build-style/style.css +327 -136
  1007. package/build-types/bindings/entity.d.ts +16 -0
  1008. package/build-types/bindings/entity.d.ts.map +1 -0
  1009. package/build-types/bindings/post-data.d.ts +16 -0
  1010. package/build-types/bindings/post-meta.d.ts +13 -0
  1011. package/build-types/components/{preferences-modal/block-visibility.d.ts → block-visibility/index.d.ts} +1 -1
  1012. package/build-types/components/block-visibility/index.d.ts.map +1 -0
  1013. package/build-types/components/collab-sidebar/add-comment.d.ts +6 -14
  1014. package/build-types/components/collab-sidebar/add-comment.d.ts.map +1 -1
  1015. package/build-types/components/collab-sidebar/comment-form.d.ts +9 -18
  1016. package/build-types/components/collab-sidebar/comment-form.d.ts.map +1 -1
  1017. package/build-types/components/collab-sidebar/comment-menu-item.d.ts +5 -0
  1018. package/build-types/components/collab-sidebar/comment-menu-item.d.ts.map +1 -0
  1019. package/build-types/components/collab-sidebar/comments.d.ts +10 -1
  1020. package/build-types/components/collab-sidebar/comments.d.ts.map +1 -1
  1021. package/build-types/components/collab-sidebar/hooks.d.ts +33 -0
  1022. package/build-types/components/collab-sidebar/hooks.d.ts.map +1 -1
  1023. package/build-types/components/collab-sidebar/index.d.ts.map +1 -1
  1024. package/build-types/components/collab-sidebar/utils.d.ts +20 -0
  1025. package/build-types/components/collab-sidebar/utils.d.ts.map +1 -1
  1026. package/build-types/components/document-tools/index.d.ts.map +1 -1
  1027. package/build-types/components/header/index.d.ts.map +1 -1
  1028. package/build-types/components/post-excerpt/panel.d.ts.map +1 -1
  1029. package/build-types/components/post-template/block-theme.d.ts.map +1 -1
  1030. package/build-types/components/post-template/hooks.d.ts.map +1 -1
  1031. package/build-types/components/provider/disable-non-page-content-blocks.d.ts.map +1 -1
  1032. package/build-types/components/provider/use-hide-blocks-from-inserter.d.ts.map +1 -1
  1033. package/build-types/components/visual-editor/index.d.ts.map +1 -1
  1034. package/build-types/hooks/template-part-navigation-edit-button.d.ts +2 -0
  1035. package/build-types/hooks/template-part-navigation-edit-button.d.ts.map +1 -0
  1036. package/build-types/store/actions.d.ts.map +1 -1
  1037. package/package.json +59 -39
  1038. package/src/bindings/api.js +2 -2
  1039. package/src/bindings/entity.js +89 -0
  1040. package/src/bindings/post-data.js +23 -0
  1041. package/src/bindings/post-meta.js +19 -0
  1042. package/src/components/autocompleters/style.scss +2 -0
  1043. package/src/components/block-settings-menu/style.scss +2 -0
  1044. package/src/components/{preferences-modal/block-visibility.js → block-visibility/index.js} +37 -5
  1045. package/src/components/block-visibility/style.scss +25 -0
  1046. package/src/components/blog-title/style.scss +2 -0
  1047. package/src/components/collab-sidebar/add-comment.js +18 -17
  1048. package/src/components/collab-sidebar/comment-author-info.js +2 -2
  1049. package/src/components/collab-sidebar/comment-form.js +15 -17
  1050. package/src/components/collab-sidebar/comment-indicator-toolbar.js +2 -2
  1051. package/src/components/collab-sidebar/{comment-button.js → comment-menu-item.js} +4 -4
  1052. package/src/components/collab-sidebar/comments.js +413 -183
  1053. package/src/components/collab-sidebar/hooks.js +343 -22
  1054. package/src/components/collab-sidebar/index.js +94 -190
  1055. package/src/components/collab-sidebar/style.scss +44 -26
  1056. package/src/components/collab-sidebar/utils.js +55 -0
  1057. package/src/components/collapsible-block-toolbar/style.scss +5 -1
  1058. package/src/components/commands/index.js +2 -2
  1059. package/src/components/document-bar/style.scss +5 -0
  1060. package/src/components/document-outline/style.scss +3 -0
  1061. package/src/components/document-tools/index.js +1 -20
  1062. package/src/components/document-tools/style.scss +4 -0
  1063. package/src/components/editor-help/style.scss +3 -0
  1064. package/src/components/editor-interface/style.scss +2 -0
  1065. package/src/components/editor-notices/style.scss +3 -0
  1066. package/src/components/entities-saved-states/style.scss +3 -0
  1067. package/src/components/error-boundary/style.scss +3 -0
  1068. package/src/components/header/index.js +3 -8
  1069. package/src/components/header/style.scss +6 -0
  1070. package/src/components/inserter-sidebar/style.scss +2 -0
  1071. package/src/components/keyboard-shortcut-help-modal/style.scss +2 -0
  1072. package/src/components/list-view-sidebar/style.scss +4 -1
  1073. package/src/components/page-attributes/style.scss +2 -0
  1074. package/src/components/post-actions/style.scss +2 -0
  1075. package/src/components/post-author/style.scss +2 -0
  1076. package/src/components/post-card-panel/style.scss +4 -0
  1077. package/src/components/post-content-information/style.scss +2 -0
  1078. package/src/components/post-discussion/style.scss +2 -0
  1079. package/src/components/post-excerpt/panel.js +12 -6
  1080. package/src/components/post-excerpt/style.scss +2 -0
  1081. package/src/components/post-featured-image/style.scss +7 -0
  1082. package/src/components/post-format/style.scss +2 -0
  1083. package/src/components/post-last-edited-panel/style.scss +2 -0
  1084. package/src/components/post-last-revision/style.scss +3 -0
  1085. package/src/components/post-locked-modal/style.scss +2 -0
  1086. package/src/components/post-panel-row/style.scss +2 -0
  1087. package/src/components/post-panel-section/style.scss +2 -0
  1088. package/src/components/post-publish-button/post-publish-button-or-toggle.js +1 -1
  1089. package/src/components/post-publish-panel/style.scss +5 -0
  1090. package/src/components/post-saved-state/style.scss +4 -0
  1091. package/src/components/post-schedule/style.scss +2 -0
  1092. package/src/components/post-status/style.scss +3 -0
  1093. package/src/components/post-sticky/style.scss +3 -0
  1094. package/src/components/post-sync-status/style.scss +2 -0
  1095. package/src/components/post-taxonomies/style.scss +2 -0
  1096. package/src/components/post-template/block-theme.js +45 -3
  1097. package/src/components/post-template/hooks.js +48 -21
  1098. package/src/components/post-template/style.scss +5 -0
  1099. package/src/components/post-text-editor/style.scss +4 -0
  1100. package/src/components/post-title/style.scss +2 -0
  1101. package/src/components/post-url/style.scss +2 -0
  1102. package/src/components/posts-per-page/style.scss +2 -0
  1103. package/src/components/preferences-modal/index.js +1 -1
  1104. package/src/components/provider/disable-non-page-content-blocks.js +7 -13
  1105. package/src/components/provider/use-hide-blocks-from-inserter.js +37 -6
  1106. package/src/components/resizable-editor/style.scss +4 -0
  1107. package/src/components/save-publish-panels/style.scss +4 -0
  1108. package/src/components/sidebar/style.scss +3 -0
  1109. package/src/components/site-discussion/style.scss +2 -1
  1110. package/src/components/start-page-options/style.scss +5 -0
  1111. package/src/components/start-template-options/style.scss +5 -0
  1112. package/src/components/table-of-contents/style.scss +5 -0
  1113. package/src/components/text-editor/style.scss +6 -0
  1114. package/src/components/visual-editor/index.js +11 -21
  1115. package/src/components/visual-editor/style.scss +3 -1
  1116. package/src/dataviews/fields/content-preview/style.scss +2 -0
  1117. package/src/hooks/index.js +1 -0
  1118. package/src/hooks/template-part-navigation-edit-button.js +145 -0
  1119. package/src/store/actions.js +6 -1
  1120. package/src/style.scss +57 -56
  1121. package/tsconfig.tsbuildinfo +1 -1
  1122. package/build/bindings/term-data.js +0 -171
  1123. package/build/bindings/term-data.js.map +0 -1
  1124. package/build/components/block-settings-menu/content-only-settings-menu.native.js +0 -11
  1125. package/build/components/block-settings-menu/content-only-settings-menu.native.js.map +0 -1
  1126. package/build/components/collab-sidebar/comment-button.js +0 -42
  1127. package/build/components/collab-sidebar/comment-button.js.map +0 -1
  1128. package/build/components/commands/index.native.js +0 -9
  1129. package/build/components/commands/index.native.js.map +0 -1
  1130. package/build/components/deprecated.native.js +0 -121
  1131. package/build/components/deprecated.native.js.map +0 -1
  1132. package/build/components/editor-help/add-blocks.native.js +0 -41
  1133. package/build/components/editor-help/add-blocks.native.js.map +0 -1
  1134. package/build/components/editor-help/customize-blocks.native.js +0 -41
  1135. package/build/components/editor-help/customize-blocks.native.js.map +0 -1
  1136. package/build/components/editor-help/help-detail-navigation-screen.native.js +0 -69
  1137. package/build/components/editor-help/help-detail-navigation-screen.native.js.map +0 -1
  1138. package/build/components/editor-help/help-get-support-button.native.js +0 -41
  1139. package/build/components/editor-help/help-get-support-button.native.js.map +0 -1
  1140. package/build/components/editor-help/help-section-title.native.js +0 -37
  1141. package/build/components/editor-help/help-section-title.native.js.map +0 -1
  1142. package/build/components/editor-help/help-topic-row.native.js +0 -42
  1143. package/build/components/editor-help/help-topic-row.native.js.map +0 -1
  1144. package/build/components/editor-help/icon-move-blocks.native.js +0 -19
  1145. package/build/components/editor-help/icon-move-blocks.native.js.map +0 -1
  1146. package/build/components/editor-help/index.native.js +0 -173
  1147. package/build/components/editor-help/index.native.js.map +0 -1
  1148. package/build/components/editor-help/intro-to-blocks.native.js +0 -70
  1149. package/build/components/editor-help/intro-to-blocks.native.js.map +0 -1
  1150. package/build/components/editor-help/move-blocks.native.js +0 -52
  1151. package/build/components/editor-help/move-blocks.native.js.map +0 -1
  1152. package/build/components/editor-help/remove-blocks.native.js +0 -39
  1153. package/build/components/editor-help/remove-blocks.native.js.map +0 -1
  1154. package/build/components/editor-help/view-sections.native.js +0 -80
  1155. package/build/components/editor-help/view-sections.native.js.map +0 -1
  1156. package/build/components/error-boundary/index.native.js +0 -143
  1157. package/build/components/error-boundary/index.native.js.map +0 -1
  1158. package/build/components/index.native.js +0 -85
  1159. package/build/components/index.native.js.map +0 -1
  1160. package/build/components/offline-status/index.native.js +0 -83
  1161. package/build/components/offline-status/index.native.js.map +0 -1
  1162. package/build/components/post-title/index.native.js +0 -251
  1163. package/build/components/post-title/index.native.js.map +0 -1
  1164. package/build/components/preferences-modal/block-visibility.js +0 -88
  1165. package/build/components/preferences-modal/block-visibility.js.map +0 -1
  1166. package/build/components/provider/index.native.js +0 -426
  1167. package/build/components/provider/index.native.js.map +0 -1
  1168. package/build/components/provider/use-block-editor-settings.native.js +0 -46
  1169. package/build/components/provider/use-block-editor-settings.native.js.map +0 -1
  1170. package/build/components/template-part-menu-items/index.native.js +0 -10
  1171. package/build/components/template-part-menu-items/index.native.js.map +0 -1
  1172. package/build/hooks/index.native.js +0 -2
  1173. package/build/hooks/index.native.js.map +0 -1
  1174. package/build/index.native.js +0 -56
  1175. package/build/index.native.js.map +0 -1
  1176. package/build/private-apis.native.js +0 -44
  1177. package/build/private-apis.native.js.map +0 -1
  1178. package/build/store/actions.native.js +0 -51
  1179. package/build/store/actions.native.js.map +0 -1
  1180. package/build/store/reducer.native.js +0 -105
  1181. package/build/store/reducer.native.js.map +0 -1
  1182. package/build/store/selectors.native.js +0 -70
  1183. package/build/store/selectors.native.js.map +0 -1
  1184. package/build/utils/index.native.js +0 -14
  1185. package/build/utils/index.native.js.map +0 -1
  1186. package/build/utils/media-sideload/index.native.js +0 -8
  1187. package/build/utils/media-sideload/index.native.js.map +0 -1
  1188. package/build/utils/media-upload/index.native.js +0 -8
  1189. package/build/utils/media-upload/index.native.js.map +0 -1
  1190. package/build-module/bindings/term-data.js +0 -165
  1191. package/build-module/bindings/term-data.js.map +0 -1
  1192. package/build-module/components/block-settings-menu/content-only-settings-menu.native.js +0 -5
  1193. package/build-module/components/block-settings-menu/content-only-settings-menu.native.js.map +0 -1
  1194. package/build-module/components/collab-sidebar/comment-button.js +0 -35
  1195. package/build-module/components/collab-sidebar/comment-button.js.map +0 -1
  1196. package/build-module/components/commands/index.native.js +0 -3
  1197. package/build-module/components/commands/index.native.js.map +0 -1
  1198. package/build-module/components/deprecated.native.js +0 -7
  1199. package/build-module/components/deprecated.native.js.map +0 -1
  1200. package/build-module/components/editor-help/add-blocks.native.js +0 -33
  1201. package/build-module/components/editor-help/add-blocks.native.js.map +0 -1
  1202. package/build-module/components/editor-help/customize-blocks.native.js +0 -33
  1203. package/build-module/components/editor-help/customize-blocks.native.js.map +0 -1
  1204. package/build-module/components/editor-help/help-detail-navigation-screen.native.js +0 -61
  1205. package/build-module/components/editor-help/help-detail-navigation-screen.native.js.map +0 -1
  1206. package/build-module/components/editor-help/help-get-support-button.native.js +0 -33
  1207. package/build-module/components/editor-help/help-get-support-button.native.js.map +0 -1
  1208. package/build-module/components/editor-help/help-section-title.native.js +0 -29
  1209. package/build-module/components/editor-help/help-section-title.native.js.map +0 -1
  1210. package/build-module/components/editor-help/help-topic-row.native.js +0 -35
  1211. package/build-module/components/editor-help/help-topic-row.native.js.map +0 -1
  1212. package/build-module/components/editor-help/icon-move-blocks.native.js +0 -13
  1213. package/build-module/components/editor-help/icon-move-blocks.native.js.map +0 -1
  1214. package/build-module/components/editor-help/index.native.js +0 -165
  1215. package/build-module/components/editor-help/index.native.js.map +0 -1
  1216. package/build-module/components/editor-help/intro-to-blocks.native.js +0 -62
  1217. package/build-module/components/editor-help/intro-to-blocks.native.js.map +0 -1
  1218. package/build-module/components/editor-help/move-blocks.native.js +0 -44
  1219. package/build-module/components/editor-help/move-blocks.native.js.map +0 -1
  1220. package/build-module/components/editor-help/remove-blocks.native.js +0 -31
  1221. package/build-module/components/editor-help/remove-blocks.native.js.map +0 -1
  1222. package/build-module/components/editor-help/view-sections.native.js +0 -69
  1223. package/build-module/components/editor-help/view-sections.native.js.map +0 -1
  1224. package/build-module/components/error-boundary/index.native.js +0 -135
  1225. package/build-module/components/error-boundary/index.native.js.map +0 -1
  1226. package/build-module/components/index.native.js +0 -15
  1227. package/build-module/components/index.native.js.map +0 -1
  1228. package/build-module/components/offline-status/index.native.js +0 -77
  1229. package/build-module/components/offline-status/index.native.js.map +0 -1
  1230. package/build-module/components/post-title/index.native.js +0 -243
  1231. package/build-module/components/post-title/index.native.js.map +0 -1
  1232. package/build-module/components/preferences-modal/block-visibility.js +0 -81
  1233. package/build-module/components/preferences-modal/block-visibility.js.map +0 -1
  1234. package/build-module/components/provider/index.native.js +0 -416
  1235. package/build-module/components/provider/index.native.js.map +0 -1
  1236. package/build-module/components/provider/use-block-editor-settings.native.js +0 -38
  1237. package/build-module/components/provider/use-block-editor-settings.native.js.map +0 -1
  1238. package/build-module/components/template-part-menu-items/index.native.js +0 -4
  1239. package/build-module/components/template-part-menu-items/index.native.js.map +0 -1
  1240. package/build-module/hooks/index.native.js +0 -2
  1241. package/build-module/hooks/index.native.js.map +0 -1
  1242. package/build-module/index.native.js +0 -16
  1243. package/build-module/index.native.js.map +0 -1
  1244. package/build-module/private-apis.native.js +0 -34
  1245. package/build-module/private-apis.native.js.map +0 -1
  1246. package/build-module/store/actions.native.js +0 -27
  1247. package/build-module/store/actions.native.js.map +0 -1
  1248. package/build-module/store/reducer.native.js +0 -81
  1249. package/build-module/store/reducer.native.js.map +0 -1
  1250. package/build-module/store/selectors.native.js +0 -49
  1251. package/build-module/store/selectors.native.js.map +0 -1
  1252. package/build-module/utils/index.native.js +0 -6
  1253. package/build-module/utils/index.native.js.map +0 -1
  1254. package/build-module/utils/media-sideload/index.native.js +0 -2
  1255. package/build-module/utils/media-sideload/index.native.js.map +0 -1
  1256. package/build-module/utils/media-upload/index.native.js +0 -2
  1257. package/build-module/utils/media-upload/index.native.js.map +0 -1
  1258. package/build-types/bindings/term-data.d.ts +0 -25
  1259. package/build-types/bindings/term-data.d.ts.map +0 -1
  1260. package/build-types/components/collab-sidebar/comment-button.d.ts +0 -5
  1261. package/build-types/components/collab-sidebar/comment-button.d.ts.map +0 -1
  1262. package/build-types/components/preferences-modal/block-visibility.d.ts.map +0 -1
  1263. package/src/bindings/term-data.js +0 -159
@@ -1,241 +1,108 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
- import { getFreeformContentHandlerName, getDefaultBlockName, __unstableSerializeAndClean, parse } from '@wordpress/blocks';
5
- import { isInTheFuture, getDate } from '@wordpress/date';
6
- import { addQueryArgs, cleanForSlug } from '@wordpress/url';
7
- import { createSelector, createRegistrySelector } from '@wordpress/data';
8
- import deprecated from '@wordpress/deprecated';
9
- import { Platform } from '@wordpress/element';
10
- import { store as blockEditorStore } from '@wordpress/block-editor';
11
- import { store as coreStore } from '@wordpress/core-data';
12
- import { store as preferencesStore } from '@wordpress/preferences';
13
-
14
- /**
15
- * Internal dependencies
16
- */
17
- import { EDIT_MERGE_PROPERTIES, PERMALINK_POSTNAME_REGEX, ONE_MINUTE_IN_MS, AUTOSAVE_PROPERTIES } from './constants';
18
- import { getPostRawValue } from './reducer';
19
- import { getTemplatePartIcon } from '../utils/get-template-part-icon';
20
- import { unlock } from '../lock-unlock';
21
- import { getTemplateInfo } from '../utils/get-template-info';
22
-
23
- /**
24
- * Shared reference to an empty object for cases where it is important to avoid
25
- * returning a new object reference on every invocation, as in a connected or
26
- * other pure component which performs `shouldComponentUpdate` check on props.
27
- * This should be used as a last resort, since the normalized data should be
28
- * maintained by the reducer result in state.
29
- */
1
+ import {
2
+ getFreeformContentHandlerName,
3
+ getDefaultBlockName,
4
+ __unstableSerializeAndClean,
5
+ parse
6
+ } from "@wordpress/blocks";
7
+ import { isInTheFuture, getDate } from "@wordpress/date";
8
+ import { addQueryArgs, cleanForSlug } from "@wordpress/url";
9
+ import { createSelector, createRegistrySelector } from "@wordpress/data";
10
+ import deprecated from "@wordpress/deprecated";
11
+ import { Platform } from "@wordpress/element";
12
+ import { store as blockEditorStore } from "@wordpress/block-editor";
13
+ import { store as coreStore } from "@wordpress/core-data";
14
+ import { store as preferencesStore } from "@wordpress/preferences";
15
+ import {
16
+ EDIT_MERGE_PROPERTIES,
17
+ PERMALINK_POSTNAME_REGEX,
18
+ ONE_MINUTE_IN_MS,
19
+ AUTOSAVE_PROPERTIES
20
+ } from "./constants";
21
+ import { getPostRawValue } from "./reducer";
22
+ import { getTemplatePartIcon } from "../utils/get-template-part-icon";
23
+ import { unlock } from "../lock-unlock";
24
+ import { getTemplateInfo } from "../utils/get-template-info";
30
25
  const EMPTY_OBJECT = {};
31
-
32
- /**
33
- * Returns true if any past editor history snapshots exist, or false otherwise.
34
- *
35
- * @param {Object} state Global application state.
36
- *
37
- * @return {boolean} Whether undo history exists.
38
- */
39
- export const hasEditorUndo = createRegistrySelector(select => () => {
26
+ const hasEditorUndo = createRegistrySelector((select) => () => {
40
27
  return select(coreStore).hasUndo();
41
28
  });
42
-
43
- /**
44
- * Returns true if any future editor history snapshots exist, or false
45
- * otherwise.
46
- *
47
- * @param {Object} state Global application state.
48
- *
49
- * @return {boolean} Whether redo history exists.
50
- */
51
- export const hasEditorRedo = createRegistrySelector(select => () => {
29
+ const hasEditorRedo = createRegistrySelector((select) => () => {
52
30
  return select(coreStore).hasRedo();
53
31
  });
54
-
55
- /**
56
- * Returns true if the currently edited post is yet to be saved, or false if
57
- * the post has been saved.
58
- *
59
- * @param {Object} state Global application state.
60
- *
61
- * @return {boolean} Whether the post is new.
62
- */
63
- export function isEditedPostNew(state) {
64
- return getCurrentPost(state).status === 'auto-draft';
32
+ function isEditedPostNew(state) {
33
+ return getCurrentPost(state).status === "auto-draft";
65
34
  }
66
-
67
- /**
68
- * Returns true if content includes unsaved changes, or false otherwise.
69
- *
70
- * @param {Object} state Editor state.
71
- *
72
- * @return {boolean} Whether content includes unsaved changes.
73
- */
74
- export function hasChangedContent(state) {
35
+ function hasChangedContent(state) {
75
36
  const edits = getPostEdits(state);
76
- return 'content' in edits;
77
- }
78
-
79
- /**
80
- * Returns true if there are unsaved values for the current edit session, or
81
- * false if the editing state matches the saved or new post.
82
- *
83
- * @param {Object} state Global application state.
84
- *
85
- * @return {boolean} Whether unsaved values exist.
86
- */
87
- export const isEditedPostDirty = createRegistrySelector(select => state => {
88
- // Edits should contain only fields which differ from the saved post (reset
89
- // at initial load and save complete). Thus, a non-empty edits state can be
90
- // inferred to contain unsaved values.
91
- const postType = getCurrentPostType(state);
92
- const postId = getCurrentPostId(state);
93
- return select(coreStore).hasEditsForEntityRecord('postType', postType, postId);
94
- });
95
-
96
- /**
97
- * Returns true if there are unsaved edits for entities other than
98
- * the editor's post, and false otherwise.
99
- *
100
- * @param {Object} state Global application state.
101
- *
102
- * @return {boolean} Whether there are edits or not.
103
- */
104
- export const hasNonPostEntityChanges = createRegistrySelector(select => state => {
105
- const dirtyEntityRecords = select(coreStore).__experimentalGetDirtyEntityRecords();
106
- const {
107
- type,
108
- id
109
- } = getCurrentPost(state);
110
- return dirtyEntityRecords.some(entityRecord => entityRecord.kind !== 'postType' || entityRecord.name !== type || entityRecord.key !== id);
111
- });
112
-
113
- /**
114
- * Returns true if there are no unsaved values for the current edit session and
115
- * if the currently edited post is new (has never been saved before).
116
- *
117
- * @param {Object} state Global application state.
118
- *
119
- * @return {boolean} Whether new post and unsaved values exist.
120
- */
121
- export function isCleanNewPost(state) {
37
+ return "content" in edits;
38
+ }
39
+ const isEditedPostDirty = createRegistrySelector(
40
+ (select) => (state) => {
41
+ const postType = getCurrentPostType(state);
42
+ const postId = getCurrentPostId(state);
43
+ return select(coreStore).hasEditsForEntityRecord(
44
+ "postType",
45
+ postType,
46
+ postId
47
+ );
48
+ }
49
+ );
50
+ const hasNonPostEntityChanges = createRegistrySelector(
51
+ (select) => (state) => {
52
+ const dirtyEntityRecords = select(coreStore).__experimentalGetDirtyEntityRecords();
53
+ const { type, id } = getCurrentPost(state);
54
+ return dirtyEntityRecords.some(
55
+ (entityRecord) => entityRecord.kind !== "postType" || entityRecord.name !== type || entityRecord.key !== id
56
+ );
57
+ }
58
+ );
59
+ function isCleanNewPost(state) {
122
60
  return !isEditedPostDirty(state) && isEditedPostNew(state);
123
61
  }
124
-
125
- /**
126
- * Returns the post currently being edited in its last known saved state, not
127
- * including unsaved edits. Returns an object containing relevant default post
128
- * values if the post has not yet been saved.
129
- *
130
- * @param {Object} state Global application state.
131
- *
132
- * @return {Object} Post object.
133
- */
134
- export const getCurrentPost = createRegistrySelector(select => state => {
135
- const postId = getCurrentPostId(state);
136
- const postType = getCurrentPostType(state);
137
- const post = select(coreStore).getRawEntityRecord('postType', postType, postId);
138
- if (post) {
139
- return post;
62
+ const getCurrentPost = createRegistrySelector(
63
+ (select) => (state) => {
64
+ const postId = getCurrentPostId(state);
65
+ const postType = getCurrentPostType(state);
66
+ const post = select(coreStore).getRawEntityRecord(
67
+ "postType",
68
+ postType,
69
+ postId
70
+ );
71
+ if (post) {
72
+ return post;
73
+ }
74
+ return EMPTY_OBJECT;
140
75
  }
141
-
142
- // This exists for compatibility with the previous selector behavior
143
- // which would guarantee an object return based on the editor reducer's
144
- // default empty object state.
145
- return EMPTY_OBJECT;
146
- });
147
-
148
- /**
149
- * Returns the post type of the post currently being edited.
150
- *
151
- * @param {Object} state Global application state.
152
- *
153
- * @example
154
- *
155
- *```js
156
- * const currentPostType = wp.data.select( 'core/editor' ).getCurrentPostType();
157
- *```
158
- * @return {string} Post type.
159
- */
160
- export function getCurrentPostType(state) {
76
+ );
77
+ function getCurrentPostType(state) {
161
78
  return state.postType;
162
79
  }
163
-
164
- /**
165
- * Returns the ID of the post currently being edited, or null if the post has
166
- * not yet been saved.
167
- *
168
- * @param {Object} state Global application state.
169
- *
170
- * @return {?(number|string)} The current post ID (number) or template slug (string).
171
- */
172
- export function getCurrentPostId(state) {
80
+ function getCurrentPostId(state) {
173
81
  return state.postId;
174
82
  }
175
-
176
- /**
177
- * Returns the template ID currently being rendered/edited
178
- *
179
- * @param {Object} state Global application state.
180
- *
181
- * @return {?string} Template ID.
182
- */
183
- export function getCurrentTemplateId(state) {
83
+ function getCurrentTemplateId(state) {
184
84
  return state.templateId;
185
85
  }
186
-
187
- /**
188
- * Returns the number of revisions of the post currently being edited.
189
- *
190
- * @param {Object} state Global application state.
191
- *
192
- * @return {number} Number of revisions.
193
- */
194
- export function getCurrentPostRevisionsCount(state) {
195
- var _getCurrentPost$_link;
196
- return (_getCurrentPost$_link = getCurrentPost(state)._links?.['version-history']?.[0]?.count) !== null && _getCurrentPost$_link !== void 0 ? _getCurrentPost$_link : 0;
86
+ function getCurrentPostRevisionsCount(state) {
87
+ return getCurrentPost(state)._links?.["version-history"]?.[0]?.count ?? 0;
197
88
  }
198
-
199
- /**
200
- * Returns the last revision ID of the post currently being edited,
201
- * or null if the post has no revisions.
202
- *
203
- * @param {Object} state Global application state.
204
- *
205
- * @return {?number} ID of the last revision.
206
- */
207
- export function getCurrentPostLastRevisionId(state) {
208
- var _getCurrentPost$_link2;
209
- return (_getCurrentPost$_link2 = getCurrentPost(state)._links?.['predecessor-version']?.[0]?.id) !== null && _getCurrentPost$_link2 !== void 0 ? _getCurrentPost$_link2 : null;
89
+ function getCurrentPostLastRevisionId(state) {
90
+ return getCurrentPost(state)._links?.["predecessor-version"]?.[0]?.id ?? null;
210
91
  }
211
-
212
- /**
213
- * Returns any post values which have been changed in the editor but not yet
214
- * been saved.
215
- *
216
- * @param {Object} state Global application state.
217
- *
218
- * @return {Object} Object of key value pairs comprising unsaved edits.
219
- */
220
- export const getPostEdits = createRegistrySelector(select => state => {
92
+ const getPostEdits = createRegistrySelector((select) => (state) => {
221
93
  const postType = getCurrentPostType(state);
222
94
  const postId = getCurrentPostId(state);
223
- return select(coreStore).getEntityRecordEdits('postType', postType, postId) || EMPTY_OBJECT;
95
+ return select(coreStore).getEntityRecordEdits(
96
+ "postType",
97
+ postType,
98
+ postId
99
+ ) || EMPTY_OBJECT;
224
100
  });
225
-
226
- /**
227
- * Returns an attribute value of the saved post.
228
- *
229
- * @param {Object} state Global application state.
230
- * @param {string} attributeName Post attribute name.
231
- *
232
- * @return {*} Post attribute value.
233
- */
234
- export function getCurrentPostAttribute(state, attributeName) {
101
+ function getCurrentPostAttribute(state, attributeName) {
235
102
  switch (attributeName) {
236
- case 'type':
103
+ case "type":
237
104
  return getCurrentPostType(state);
238
- case 'id':
105
+ case "id":
239
106
  return getCurrentPostId(state);
240
107
  default:
241
108
  const post = getCurrentPost(state);
@@ -245,1349 +112,761 @@ export function getCurrentPostAttribute(state, attributeName) {
245
112
  return getPostRawValue(post[attributeName]);
246
113
  }
247
114
  }
248
-
249
- /**
250
- * Returns a single attribute of the post being edited, preferring the unsaved
251
- * edit if one exists, but merging with the attribute value for the last known
252
- * saved state of the post (this is needed for some nested attributes like meta).
253
- *
254
- * @param {Object} state Global application state.
255
- * @param {string} attributeName Post attribute name.
256
- *
257
- * @return {*} Post attribute value.
258
- */
259
- const getNestedEditedPostProperty = createSelector((state, attributeName) => {
260
- const edits = getPostEdits(state);
261
- if (!edits.hasOwnProperty(attributeName)) {
262
- return getCurrentPostAttribute(state, attributeName);
263
- }
264
- return {
265
- ...getCurrentPostAttribute(state, attributeName),
266
- ...edits[attributeName]
267
- };
268
- }, (state, attributeName) => [getCurrentPostAttribute(state, attributeName), getPostEdits(state)[attributeName]]);
269
-
270
- /**
271
- * Returns a single attribute of the post being edited, preferring the unsaved
272
- * edit if one exists, but falling back to the attribute for the last known
273
- * saved state of the post.
274
- *
275
- * @param {Object} state Global application state.
276
- * @param {string} attributeName Post attribute name.
277
- *
278
- * @example
279
- *
280
- *```js
281
- * // Get specific media size based on the featured media ID
282
- * // Note: change sizes?.large for any registered size
283
- * const getFeaturedMediaUrl = useSelect( ( select ) => {
284
- * const getFeaturedMediaId =
285
- * select( 'core/editor' ).getEditedPostAttribute( 'featured_media' );
286
- * const media = select( 'core' ).getEntityRecord(
287
- * 'postType',
288
- * 'attachment',
289
- * getFeaturedMediaId
290
- * );
291
- *
292
- * return (
293
- * media?.media_details?.sizes?.large?.source_url || media?.source_url || ''
294
- * );
295
- * }, [] );
296
- *```
297
- *
298
- * @return {*} Post attribute value.
299
- */
300
- export function getEditedPostAttribute(state, attributeName) {
301
- // Special cases.
115
+ const getNestedEditedPostProperty = createSelector(
116
+ (state, attributeName) => {
117
+ const edits = getPostEdits(state);
118
+ if (!edits.hasOwnProperty(attributeName)) {
119
+ return getCurrentPostAttribute(state, attributeName);
120
+ }
121
+ return {
122
+ ...getCurrentPostAttribute(state, attributeName),
123
+ ...edits[attributeName]
124
+ };
125
+ },
126
+ (state, attributeName) => [
127
+ getCurrentPostAttribute(state, attributeName),
128
+ getPostEdits(state)[attributeName]
129
+ ]
130
+ );
131
+ function getEditedPostAttribute(state, attributeName) {
302
132
  switch (attributeName) {
303
- case 'content':
133
+ case "content":
304
134
  return getEditedPostContent(state);
305
135
  }
306
-
307
- // Fall back to saved post value if not edited.
308
136
  const edits = getPostEdits(state);
309
137
  if (!edits.hasOwnProperty(attributeName)) {
310
138
  return getCurrentPostAttribute(state, attributeName);
311
139
  }
312
-
313
- // Merge properties are objects which contain only the patch edit in state,
314
- // and thus must be merged with the current post attribute.
315
140
  if (EDIT_MERGE_PROPERTIES.has(attributeName)) {
316
141
  return getNestedEditedPostProperty(state, attributeName);
317
142
  }
318
143
  return edits[attributeName];
319
144
  }
320
-
321
- /**
322
- * Returns an attribute value of the current autosave revision for a post, or
323
- * null if there is no autosave for the post.
324
- *
325
- * @deprecated since 5.6. Callers should use the `getAutosave( postType, postId, userId )` selector
326
- * from the '@wordpress/core-data' package and access properties on the returned
327
- * autosave object using getPostRawValue.
328
- *
329
- * @param {Object} state Global application state.
330
- * @param {string} attributeName Autosave attribute name.
331
- *
332
- * @return {*} Autosave attribute value.
333
- */
334
- export const getAutosaveAttribute = createRegistrySelector(select => (state, attributeName) => {
335
- if (!AUTOSAVE_PROPERTIES.includes(attributeName) && attributeName !== 'preview_link') {
336
- return;
337
- }
338
- const postType = getCurrentPostType(state);
339
-
340
- // Currently template autosaving is not supported.
341
- if (postType === 'wp_template') {
342
- return false;
343
- }
344
- const postId = getCurrentPostId(state);
345
- const currentUserId = select(coreStore).getCurrentUser()?.id;
346
- const autosave = select(coreStore).getAutosave(postType, postId, currentUserId);
347
- if (autosave) {
348
- return getPostRawValue(autosave[attributeName]);
145
+ const getAutosaveAttribute = createRegistrySelector(
146
+ (select) => (state, attributeName) => {
147
+ if (!AUTOSAVE_PROPERTIES.includes(attributeName) && attributeName !== "preview_link") {
148
+ return;
149
+ }
150
+ const postType = getCurrentPostType(state);
151
+ if (postType === "wp_template") {
152
+ return false;
153
+ }
154
+ const postId = getCurrentPostId(state);
155
+ const currentUserId = select(coreStore).getCurrentUser()?.id;
156
+ const autosave = select(coreStore).getAutosave(
157
+ postType,
158
+ postId,
159
+ currentUserId
160
+ );
161
+ if (autosave) {
162
+ return getPostRawValue(autosave[attributeName]);
163
+ }
349
164
  }
350
- });
351
-
352
- /**
353
- * Returns the current visibility of the post being edited, preferring the
354
- * unsaved value if different than the saved post. The return value is one of
355
- * "private", "password", or "public".
356
- *
357
- * @param {Object} state Global application state.
358
- *
359
- * @return {string} Post visibility.
360
- */
361
- export function getEditedPostVisibility(state) {
362
- const status = getEditedPostAttribute(state, 'status');
363
- if (status === 'private') {
364
- return 'private';
165
+ );
166
+ function getEditedPostVisibility(state) {
167
+ const status = getEditedPostAttribute(state, "status");
168
+ if (status === "private") {
169
+ return "private";
365
170
  }
366
- const password = getEditedPostAttribute(state, 'password');
171
+ const password = getEditedPostAttribute(state, "password");
367
172
  if (password) {
368
- return 'password';
173
+ return "password";
369
174
  }
370
- return 'public';
175
+ return "public";
371
176
  }
372
-
373
- /**
374
- * Returns true if post is pending review.
375
- *
376
- * @param {Object} state Global application state.
377
- *
378
- * @return {boolean} Whether current post is pending review.
379
- */
380
- export function isCurrentPostPending(state) {
381
- return getCurrentPost(state).status === 'pending';
177
+ function isCurrentPostPending(state) {
178
+ return getCurrentPost(state).status === "pending";
382
179
  }
383
-
384
- /**
385
- * Return true if the current post has already been published.
386
- *
387
- * @param {Object} state Global application state.
388
- * @param {Object} [currentPost] Explicit current post for bypassing registry selector.
389
- *
390
- * @return {boolean} Whether the post has been published.
391
- */
392
- export function isCurrentPostPublished(state, currentPost) {
180
+ function isCurrentPostPublished(state, currentPost) {
393
181
  const post = currentPost || getCurrentPost(state);
394
- return ['publish', 'private'].indexOf(post.status) !== -1 || post.status === 'future' && !isInTheFuture(new Date(Number(getDate(post.date)) - ONE_MINUTE_IN_MS));
182
+ return ["publish", "private"].indexOf(post.status) !== -1 || post.status === "future" && !isInTheFuture(
183
+ new Date(Number(getDate(post.date)) - ONE_MINUTE_IN_MS)
184
+ );
395
185
  }
396
-
397
- /**
398
- * Returns true if post is already scheduled.
399
- *
400
- * @param {Object} state Global application state.
401
- *
402
- * @return {boolean} Whether current post is scheduled to be posted.
403
- */
404
- export function isCurrentPostScheduled(state) {
405
- return getCurrentPost(state).status === 'future' && !isCurrentPostPublished(state);
186
+ function isCurrentPostScheduled(state) {
187
+ return getCurrentPost(state).status === "future" && !isCurrentPostPublished(state);
406
188
  }
407
-
408
- /**
409
- * Return true if the post being edited can be published.
410
- *
411
- * @param {Object} state Global application state.
412
- *
413
- * @return {boolean} Whether the post can been published.
414
- */
415
- export function isEditedPostPublishable(state) {
189
+ function isEditedPostPublishable(state) {
416
190
  const post = getCurrentPost(state);
417
-
418
- // TODO: Post being publishable should be superset of condition of post
419
- // being saveable. Currently this restriction is imposed at UI.
420
- //
421
- // See: <PostPublishButton /> (`isButtonEnabled` assigned by `isSaveable`).
422
-
423
- return isEditedPostDirty(state) || ['publish', 'private', 'future'].indexOf(post.status) === -1;
191
+ return isEditedPostDirty(state) || ["publish", "private", "future"].indexOf(post.status) === -1;
424
192
  }
425
-
426
- /**
427
- * Returns true if the post can be saved, or false otherwise. A post must
428
- * contain a title, an excerpt, or non-empty content to be valid for save.
429
- *
430
- * @param {Object} state Global application state.
431
- *
432
- * @return {boolean} Whether the post can be saved.
433
- */
434
- export function isEditedPostSaveable(state) {
193
+ function isEditedPostSaveable(state) {
435
194
  if (isSavingPost(state)) {
436
195
  return false;
437
196
  }
438
-
439
- // TODO: Post should not be saveable if not dirty. Cannot be added here at
440
- // this time since posts where meta boxes are present can be saved even if
441
- // the post is not dirty. Currently this restriction is imposed at UI, but
442
- // should be moved here.
443
- //
444
- // See: `isEditedPostPublishable` (includes `isEditedPostDirty` condition)
445
- // See: <PostSavedState /> (`forceIsDirty` prop)
446
- // See: <PostPublishButton /> (`forceIsDirty` prop)
447
- // See: https://github.com/WordPress/gutenberg/pull/4184.
448
-
449
- return !!getEditedPostAttribute(state, 'title') || !!getEditedPostAttribute(state, 'excerpt') || !isEditedPostEmpty(state) || Platform.OS === 'native';
450
- }
451
-
452
- /**
453
- * Returns true if the edited post has content. A post has content if it has at
454
- * least one saveable block or otherwise has a non-empty content property
455
- * assigned.
456
- *
457
- * @param {Object} state Global application state.
458
- *
459
- * @return {boolean} Whether post has content.
460
- */
461
- export const isEditedPostEmpty = createRegistrySelector(select => state => {
462
- // While the condition of truthy content string is sufficient to determine
463
- // emptiness, testing saveable blocks length is a trivial operation. Since
464
- // this function can be called frequently, optimize for the fast case as a
465
- // condition of the mere existence of blocks. Note that the value of edited
466
- // content takes precedent over block content, and must fall through to the
467
- // default logic.
468
- const postId = getCurrentPostId(state);
469
- const postType = getCurrentPostType(state);
470
- const record = select(coreStore).getEditedEntityRecord('postType', postType, postId);
471
- if (typeof record.content !== 'function') {
472
- return !record.content;
473
- }
474
- const blocks = getEditedPostAttribute(state, 'blocks');
475
- if (blocks.length === 0) {
476
- return true;
477
- }
478
-
479
- // Pierce the abstraction of the serializer in knowing that blocks are
480
- // joined with newlines such that even if every individual block
481
- // produces an empty save result, the serialized content is non-empty.
482
- if (blocks.length > 1) {
483
- return false;
484
- }
485
-
486
- // There are two conditions under which the optimization cannot be
487
- // assumed, and a fallthrough to getEditedPostContent must occur:
488
- //
489
- // 1. getBlocksForSerialization has special treatment in omitting a
490
- // single unmodified default block.
491
- // 2. Comment delimiters are omitted for a freeform or unregistered
492
- // block in its serialization. The freeform block specifically may
493
- // produce an empty string in its saved output.
494
- //
495
- // For all other content, the single block is assumed to make a post
496
- // non-empty, if only by virtue of its own comment delimiters.
497
- const blockName = blocks[0].name;
498
- if (blockName !== getDefaultBlockName() && blockName !== getFreeformContentHandlerName()) {
499
- return false;
500
- }
501
- return !getEditedPostContent(state);
502
- });
503
-
504
- /**
505
- * Returns true if the post can be autosaved, or false otherwise.
506
- *
507
- * @param {Object} state Global application state.
508
- * @param {Object} autosave A raw autosave object from the REST API.
509
- *
510
- * @return {boolean} Whether the post can be autosaved.
511
- */
512
- export const isEditedPostAutosaveable = createRegistrySelector(select => state => {
513
- // A post must contain a title, an excerpt, or non-empty content to be valid for autosaving.
514
- if (!isEditedPostSaveable(state)) {
515
- return false;
516
- }
517
-
518
- // A post is not autosavable when there is a post autosave lock.
519
- if (isPostAutosavingLocked(state)) {
520
- return false;
521
- }
522
- const postType = getCurrentPostType(state);
523
- const postTypeObject = select(coreStore).getPostType(postType);
524
-
525
- // Currently template autosaving is not supported.
526
- // @todo: Remove hardcode check for template after bumping required WP version to 6.8.
527
- if (postType === 'wp_template' || !postTypeObject?.supports?.autosave) {
528
- return false;
529
- }
530
- const postId = getCurrentPostId(state);
531
- const hasFetchedAutosave = select(coreStore).hasFetchedAutosaves(postType, postId);
532
- const currentUserId = select(coreStore).getCurrentUser()?.id;
533
-
534
- // Disable reason - this line causes the side-effect of fetching the autosave
535
- // via a resolver, moving below the return would result in the autosave never
536
- // being fetched.
537
- // eslint-disable-next-line @wordpress/no-unused-vars-before-return
538
- const autosave = select(coreStore).getAutosave(postType, postId, currentUserId);
539
-
540
- // If any existing autosaves have not yet been fetched, this function is
541
- // unable to determine if the post is autosaveable, so return false.
542
- if (!hasFetchedAutosave) {
543
- return false;
544
- }
545
-
546
- // If we don't already have an autosave, the post is autosaveable.
547
- if (!autosave) {
548
- return true;
549
- }
550
-
551
- // To avoid an expensive content serialization, use the content dirtiness
552
- // flag in place of content field comparison against the known autosave.
553
- // This is not strictly accurate, and relies on a tolerance toward autosave
554
- // request failures for unnecessary saves.
555
- if (hasChangedContent(state)) {
556
- return true;
197
+ return !!getEditedPostAttribute(state, "title") || !!getEditedPostAttribute(state, "excerpt") || !isEditedPostEmpty(state) || Platform.OS === "native";
198
+ }
199
+ const isEditedPostEmpty = createRegistrySelector(
200
+ (select) => (state) => {
201
+ const postId = getCurrentPostId(state);
202
+ const postType = getCurrentPostType(state);
203
+ const record = select(coreStore).getEditedEntityRecord(
204
+ "postType",
205
+ postType,
206
+ postId
207
+ );
208
+ if (typeof record.content !== "function") {
209
+ return !record.content;
210
+ }
211
+ const blocks = getEditedPostAttribute(state, "blocks");
212
+ if (blocks.length === 0) {
213
+ return true;
214
+ }
215
+ if (blocks.length > 1) {
216
+ return false;
217
+ }
218
+ const blockName = blocks[0].name;
219
+ if (blockName !== getDefaultBlockName() && blockName !== getFreeformContentHandlerName()) {
220
+ return false;
221
+ }
222
+ return !getEditedPostContent(state);
557
223
  }
558
-
559
- // If title, excerpt, or meta have changed, the post is autosaveable.
560
- return ['title', 'excerpt', 'meta'].some(field => getPostRawValue(autosave[field]) !== getEditedPostAttribute(state, field));
561
- });
562
-
563
- /**
564
- * Return true if the post being edited is being scheduled. Preferring the
565
- * unsaved status values.
566
- *
567
- * @param {Object} state Global application state.
568
- *
569
- * @return {boolean} Whether the post has been published.
570
- */
571
- export function isEditedPostBeingScheduled(state) {
572
- const date = getEditedPostAttribute(state, 'date');
573
- // Offset the date by one minute (network latency).
574
- const checkedDate = new Date(Number(getDate(date)) - ONE_MINUTE_IN_MS);
224
+ );
225
+ const isEditedPostAutosaveable = createRegistrySelector(
226
+ (select) => (state) => {
227
+ if (!isEditedPostSaveable(state)) {
228
+ return false;
229
+ }
230
+ if (isPostAutosavingLocked(state)) {
231
+ return false;
232
+ }
233
+ const postType = getCurrentPostType(state);
234
+ const postTypeObject = select(coreStore).getPostType(postType);
235
+ if (postType === "wp_template" || !postTypeObject?.supports?.autosave) {
236
+ return false;
237
+ }
238
+ const postId = getCurrentPostId(state);
239
+ const hasFetchedAutosave = select(coreStore).hasFetchedAutosaves(
240
+ postType,
241
+ postId
242
+ );
243
+ const currentUserId = select(coreStore).getCurrentUser()?.id;
244
+ const autosave = select(coreStore).getAutosave(
245
+ postType,
246
+ postId,
247
+ currentUserId
248
+ );
249
+ if (!hasFetchedAutosave) {
250
+ return false;
251
+ }
252
+ if (!autosave) {
253
+ return true;
254
+ }
255
+ if (hasChangedContent(state)) {
256
+ return true;
257
+ }
258
+ return ["title", "excerpt", "meta"].some(
259
+ (field) => getPostRawValue(autosave[field]) !== getEditedPostAttribute(state, field)
260
+ );
261
+ }
262
+ );
263
+ function isEditedPostBeingScheduled(state) {
264
+ const date = getEditedPostAttribute(state, "date");
265
+ const checkedDate = new Date(
266
+ Number(getDate(date)) - ONE_MINUTE_IN_MS
267
+ );
575
268
  return isInTheFuture(checkedDate);
576
269
  }
577
-
578
- /**
579
- * Returns whether the current post should be considered to have a "floating"
580
- * date (i.e. that it would publish "Immediately" rather than at a set time).
581
- *
582
- * Unlike in the PHP backend, the REST API returns a full date string for posts
583
- * where the 0000-00-00T00:00:00 placeholder is present in the database. To
584
- * infer that a post is set to publish "Immediately" we check whether the date
585
- * and modified date are the same.
586
- *
587
- * @param {Object} state Editor state.
588
- *
589
- * @return {boolean} Whether the edited post has a floating date value.
590
- */
591
- export function isEditedPostDateFloating(state) {
592
- const date = getEditedPostAttribute(state, 'date');
593
- const modified = getEditedPostAttribute(state, 'modified');
594
-
595
- // This should be the status of the persisted post
596
- // It shouldn't use the "edited" status otherwise it breaks the
597
- // inferred post data floating status
598
- // See https://github.com/WordPress/gutenberg/issues/28083.
270
+ function isEditedPostDateFloating(state) {
271
+ const date = getEditedPostAttribute(state, "date");
272
+ const modified = getEditedPostAttribute(state, "modified");
599
273
  const status = getCurrentPost(state).status;
600
- if (status === 'draft' || status === 'auto-draft' || status === 'pending') {
274
+ if (status === "draft" || status === "auto-draft" || status === "pending") {
601
275
  return date === modified || date === null;
602
276
  }
603
277
  return false;
604
278
  }
605
-
606
- /**
607
- * Returns true if the post is currently being deleted, or false otherwise.
608
- *
609
- * @param {Object} state Editor state.
610
- *
611
- * @return {boolean} Whether post is being deleted.
612
- */
613
- export function isDeletingPost(state) {
279
+ function isDeletingPost(state) {
614
280
  return !!state.deleting.pending;
615
281
  }
616
-
617
- /**
618
- * Returns true if the post is currently being saved, or false otherwise.
619
- *
620
- * @param {Object} state Global application state.
621
- *
622
- * @return {boolean} Whether post is being saved.
623
- */
624
- export function isSavingPost(state) {
282
+ function isSavingPost(state) {
625
283
  return !!state.saving.pending;
626
284
  }
627
-
628
- /**
629
- * Returns true if non-post entities are currently being saved, or false otherwise.
630
- *
631
- * @param {Object} state Global application state.
632
- *
633
- * @return {boolean} Whether non-post entities are being saved.
634
- */
635
- export const isSavingNonPostEntityChanges = createRegistrySelector(select => state => {
636
- const entitiesBeingSaved = select(coreStore).__experimentalGetEntitiesBeingSaved();
637
- const {
638
- type,
639
- id
640
- } = getCurrentPost(state);
641
- return entitiesBeingSaved.some(entityRecord => entityRecord.kind !== 'postType' || entityRecord.name !== type || entityRecord.key !== id);
642
- });
643
-
644
- /**
645
- * Returns true if a previous post save was attempted successfully, or false
646
- * otherwise.
647
- *
648
- * @param {Object} state Global application state.
649
- *
650
- * @return {boolean} Whether the post was saved successfully.
651
- */
652
- export const didPostSaveRequestSucceed = createRegistrySelector(select => state => {
653
- const postType = getCurrentPostType(state);
654
- const postId = getCurrentPostId(state);
655
- return !select(coreStore).getLastEntitySaveError('postType', postType, postId);
656
- });
657
-
658
- /**
659
- * Returns true if a previous post save was attempted but failed, or false
660
- * otherwise.
661
- *
662
- * @param {Object} state Global application state.
663
- *
664
- * @return {boolean} Whether the post save failed.
665
- */
666
- export const didPostSaveRequestFail = createRegistrySelector(select => state => {
667
- const postType = getCurrentPostType(state);
668
- const postId = getCurrentPostId(state);
669
- return !!select(coreStore).getLastEntitySaveError('postType', postType, postId);
670
- });
671
-
672
- /**
673
- * Returns true if the post is autosaving, or false otherwise.
674
- *
675
- * @param {Object} state Global application state.
676
- *
677
- * @return {boolean} Whether the post is autosaving.
678
- */
679
- export function isAutosavingPost(state) {
285
+ const isSavingNonPostEntityChanges = createRegistrySelector(
286
+ (select) => (state) => {
287
+ const entitiesBeingSaved = select(coreStore).__experimentalGetEntitiesBeingSaved();
288
+ const { type, id } = getCurrentPost(state);
289
+ return entitiesBeingSaved.some(
290
+ (entityRecord) => entityRecord.kind !== "postType" || entityRecord.name !== type || entityRecord.key !== id
291
+ );
292
+ }
293
+ );
294
+ const didPostSaveRequestSucceed = createRegistrySelector(
295
+ (select) => (state) => {
296
+ const postType = getCurrentPostType(state);
297
+ const postId = getCurrentPostId(state);
298
+ return !select(coreStore).getLastEntitySaveError(
299
+ "postType",
300
+ postType,
301
+ postId
302
+ );
303
+ }
304
+ );
305
+ const didPostSaveRequestFail = createRegistrySelector(
306
+ (select) => (state) => {
307
+ const postType = getCurrentPostType(state);
308
+ const postId = getCurrentPostId(state);
309
+ return !!select(coreStore).getLastEntitySaveError(
310
+ "postType",
311
+ postType,
312
+ postId
313
+ );
314
+ }
315
+ );
316
+ function isAutosavingPost(state) {
680
317
  return isSavingPost(state) && Boolean(state.saving.options?.isAutosave);
681
318
  }
682
-
683
- /**
684
- * Returns true if the post is being previewed, or false otherwise.
685
- *
686
- * @param {Object} state Global application state.
687
- *
688
- * @return {boolean} Whether the post is being previewed.
689
- */
690
- export function isPreviewingPost(state) {
319
+ function isPreviewingPost(state) {
691
320
  return isSavingPost(state) && Boolean(state.saving.options?.isPreview);
692
321
  }
693
-
694
- /**
695
- * Returns the post preview link
696
- *
697
- * @param {Object} state Global application state.
698
- *
699
- * @return {string | undefined} Preview Link.
700
- */
701
- export function getEditedPostPreviewLink(state) {
322
+ function getEditedPostPreviewLink(state) {
702
323
  if (state.saving.pending || isSavingPost(state)) {
703
324
  return;
704
325
  }
705
- let previewLink = getAutosaveAttribute(state, 'preview_link');
706
- // Fix for issue: https://github.com/WordPress/gutenberg/issues/33616
707
- // If the post is draft, ignore the preview link from the autosave record,
708
- // because the preview could be a stale autosave if the post was switched from
709
- // published to draft.
710
- // See: https://github.com/WordPress/gutenberg/pull/37952.
711
- if (!previewLink || 'draft' === getCurrentPost(state).status) {
712
- previewLink = getEditedPostAttribute(state, 'link');
326
+ let previewLink = getAutosaveAttribute(state, "preview_link");
327
+ if (!previewLink || "draft" === getCurrentPost(state).status) {
328
+ previewLink = getEditedPostAttribute(state, "link");
713
329
  if (previewLink) {
714
- previewLink = addQueryArgs(previewLink, {
715
- preview: true
716
- });
330
+ previewLink = addQueryArgs(previewLink, { preview: true });
717
331
  }
718
332
  }
719
- const featuredImageId = getEditedPostAttribute(state, 'featured_media');
333
+ const featuredImageId = getEditedPostAttribute(state, "featured_media");
720
334
  if (previewLink && featuredImageId) {
721
- return addQueryArgs(previewLink, {
722
- _thumbnail_id: featuredImageId
723
- });
335
+ return addQueryArgs(previewLink, { _thumbnail_id: featuredImageId });
724
336
  }
725
337
  return previewLink;
726
338
  }
727
-
728
- /**
729
- * Returns a suggested post format for the current post, inferred only if there
730
- * is a single block within the post and it is of a type known to match a
731
- * default post format. Returns null if the format cannot be determined.
732
- *
733
- * @return {?string} Suggested post format.
734
- */
735
- export const getSuggestedPostFormat = createRegistrySelector(select => () => {
736
- const blocks = select(blockEditorStore).getBlocks();
737
- if (blocks.length > 2) {
738
- return null;
739
- }
740
- let name;
741
- // If there is only one block in the content of the post grab its name
742
- // so we can derive a suitable post format from it.
743
- if (blocks.length === 1) {
744
- name = blocks[0].name;
745
- // Check for core/embed `video` and `audio` eligible suggestions.
746
- if (name === 'core/embed') {
747
- const provider = blocks[0].attributes?.providerNameSlug;
748
- if (['youtube', 'vimeo'].includes(provider)) {
749
- name = 'core/video';
750
- } else if (['spotify', 'soundcloud'].includes(provider)) {
751
- name = 'core/audio';
339
+ const getSuggestedPostFormat = createRegistrySelector(
340
+ (select) => () => {
341
+ const blocks = select(blockEditorStore).getBlocks();
342
+ if (blocks.length > 2) {
343
+ return null;
344
+ }
345
+ let name;
346
+ if (blocks.length === 1) {
347
+ name = blocks[0].name;
348
+ if (name === "core/embed") {
349
+ const provider = blocks[0].attributes?.providerNameSlug;
350
+ if (["youtube", "vimeo"].includes(provider)) {
351
+ name = "core/video";
352
+ } else if (["spotify", "soundcloud"].includes(provider)) {
353
+ name = "core/audio";
354
+ }
752
355
  }
753
356
  }
357
+ if (blocks.length === 2 && blocks[1].name === "core/paragraph") {
358
+ name = blocks[0].name;
359
+ }
360
+ switch (name) {
361
+ case "core/image":
362
+ return "image";
363
+ case "core/quote":
364
+ case "core/pullquote":
365
+ return "quote";
366
+ case "core/gallery":
367
+ return "gallery";
368
+ case "core/video":
369
+ return "video";
370
+ case "core/audio":
371
+ return "audio";
372
+ default:
373
+ return null;
374
+ }
754
375
  }
755
-
756
- // If there are two blocks in the content and the last one is a text blocks
757
- // grab the name of the first one to also suggest a post format from it.
758
- if (blocks.length === 2 && blocks[1].name === 'core/paragraph') {
759
- name = blocks[0].name;
760
- }
761
-
762
- // We only convert to default post formats in core.
763
- switch (name) {
764
- case 'core/image':
765
- return 'image';
766
- case 'core/quote':
767
- case 'core/pullquote':
768
- return 'quote';
769
- case 'core/gallery':
770
- return 'gallery';
771
- case 'core/video':
772
- return 'video';
773
- case 'core/audio':
774
- return 'audio';
775
- default:
776
- return null;
777
- }
778
- });
779
-
780
- /**
781
- * Returns the content of the post being edited.
782
- *
783
- * @param {Object} state Global application state.
784
- *
785
- * @return {string} Post content.
786
- */
787
- export const getEditedPostContent = createRegistrySelector(select => state => {
788
- const postId = getCurrentPostId(state);
789
- const postType = getCurrentPostType(state);
790
- const record = select(coreStore).getEditedEntityRecord('postType', postType, postId);
791
- if (record) {
792
- if (typeof record.content === 'function') {
793
- return record.content(record);
794
- } else if (record.blocks) {
795
- return __unstableSerializeAndClean(record.blocks);
796
- } else if (record.content) {
797
- return record.content;
376
+ );
377
+ const getEditedPostContent = createRegistrySelector(
378
+ (select) => (state) => {
379
+ const postId = getCurrentPostId(state);
380
+ const postType = getCurrentPostType(state);
381
+ const record = select(coreStore).getEditedEntityRecord(
382
+ "postType",
383
+ postType,
384
+ postId
385
+ );
386
+ if (record) {
387
+ if (typeof record.content === "function") {
388
+ return record.content(record);
389
+ } else if (record.blocks) {
390
+ return __unstableSerializeAndClean(record.blocks);
391
+ } else if (record.content) {
392
+ return record.content;
393
+ }
798
394
  }
395
+ return "";
799
396
  }
800
- return '';
801
- });
802
-
803
- /**
804
- * Returns true if the post is being published, or false otherwise.
805
- *
806
- * @param {Object} state Global application state.
807
- *
808
- * @return {boolean} Whether post is being published.
809
- */
810
- export function isPublishingPost(state) {
811
- return isSavingPost(state) && !isCurrentPostPublished(state) && getEditedPostAttribute(state, 'status') === 'publish';
397
+ );
398
+ function isPublishingPost(state) {
399
+ return isSavingPost(state) && !isCurrentPostPublished(state) && getEditedPostAttribute(state, "status") === "publish";
812
400
  }
813
-
814
- /**
815
- * Returns whether the permalink is editable or not.
816
- *
817
- * @param {Object} state Editor state.
818
- *
819
- * @return {boolean} Whether or not the permalink is editable.
820
- */
821
- export function isPermalinkEditable(state) {
822
- const permalinkTemplate = getEditedPostAttribute(state, 'permalink_template');
401
+ function isPermalinkEditable(state) {
402
+ const permalinkTemplate = getEditedPostAttribute(
403
+ state,
404
+ "permalink_template"
405
+ );
823
406
  return PERMALINK_POSTNAME_REGEX.test(permalinkTemplate);
824
407
  }
825
-
826
- /**
827
- * Returns the permalink for the post.
828
- *
829
- * @param {Object} state Editor state.
830
- *
831
- * @return {?string} The permalink, or null if the post is not viewable.
832
- */
833
- export function getPermalink(state) {
408
+ function getPermalink(state) {
834
409
  const permalinkParts = getPermalinkParts(state);
835
410
  if (!permalinkParts) {
836
411
  return null;
837
412
  }
838
- const {
839
- prefix,
840
- postName,
841
- suffix
842
- } = permalinkParts;
413
+ const { prefix, postName, suffix } = permalinkParts;
843
414
  if (isPermalinkEditable(state)) {
844
415
  return prefix + postName + suffix;
845
416
  }
846
417
  return prefix;
847
418
  }
848
-
849
- /**
850
- * Returns the slug for the post being edited, preferring a manually edited
851
- * value if one exists, then a sanitized version of the current post title, and
852
- * finally the post ID.
853
- *
854
- * @param {Object} state Editor state.
855
- *
856
- * @return {string} The current slug to be displayed in the editor
857
- */
858
- export function getEditedPostSlug(state) {
859
- return getEditedPostAttribute(state, 'slug') || cleanForSlug(getEditedPostAttribute(state, 'title')) || getCurrentPostId(state);
419
+ function getEditedPostSlug(state) {
420
+ return getEditedPostAttribute(state, "slug") || cleanForSlug(getEditedPostAttribute(state, "title")) || getCurrentPostId(state);
860
421
  }
861
-
862
- /**
863
- * Returns the permalink for a post, split into its three parts: the prefix,
864
- * the postName, and the suffix.
865
- *
866
- * @param {Object} state Editor state.
867
- *
868
- * @return {Object} An object containing the prefix, postName, and suffix for
869
- * the permalink, or null if the post is not viewable.
870
- */
871
- export function getPermalinkParts(state) {
872
- const permalinkTemplate = getEditedPostAttribute(state, 'permalink_template');
422
+ function getPermalinkParts(state) {
423
+ const permalinkTemplate = getEditedPostAttribute(
424
+ state,
425
+ "permalink_template"
426
+ );
873
427
  if (!permalinkTemplate) {
874
428
  return null;
875
429
  }
876
- const postName = getEditedPostAttribute(state, 'slug') || getEditedPostAttribute(state, 'generated_slug');
877
- const [prefix, suffix] = permalinkTemplate.split(PERMALINK_POSTNAME_REGEX);
430
+ const postName = getEditedPostAttribute(state, "slug") || getEditedPostAttribute(state, "generated_slug");
431
+ const [prefix, suffix] = permalinkTemplate.split(
432
+ PERMALINK_POSTNAME_REGEX
433
+ );
878
434
  return {
879
435
  prefix,
880
436
  postName,
881
437
  suffix
882
438
  };
883
439
  }
884
-
885
- /**
886
- * Returns whether the post is locked.
887
- *
888
- * @param {Object} state Global application state.
889
- *
890
- * @return {boolean} Is locked.
891
- */
892
- export function isPostLocked(state) {
440
+ function isPostLocked(state) {
893
441
  return state.postLock.isLocked;
894
442
  }
895
-
896
- /**
897
- * Returns whether post saving is locked.
898
- *
899
- * @param {Object} state Global application state.
900
- *
901
- * @example
902
- * ```jsx
903
- * import { __ } from '@wordpress/i18n';
904
- * import { store as editorStore } from '@wordpress/editor';
905
- * import { useSelect } from '@wordpress/data';
906
- *
907
- * const ExampleComponent = () => {
908
- * const isSavingLocked = useSelect(
909
- * ( select ) => select( editorStore ).isPostSavingLocked(),
910
- * []
911
- * );
912
- *
913
- * return isSavingLocked ? (
914
- * <p>{ __( 'Post saving is locked' ) }</p>
915
- * ) : (
916
- * <p>{ __( 'Post saving is not locked' ) }</p>
917
- * );
918
- * };
919
- * ```
920
- *
921
- * @return {boolean} Is locked.
922
- */
923
- export function isPostSavingLocked(state) {
443
+ function isPostSavingLocked(state) {
924
444
  return Object.keys(state.postSavingLock).length > 0;
925
445
  }
926
-
927
- /**
928
- * Returns whether post autosaving is locked.
929
- *
930
- * @param {Object} state Global application state.
931
- *
932
- * @example
933
- * ```jsx
934
- * import { __ } from '@wordpress/i18n';
935
- * import { store as editorStore } from '@wordpress/editor';
936
- * import { useSelect } from '@wordpress/data';
937
- *
938
- * const ExampleComponent = () => {
939
- * const isAutoSavingLocked = useSelect(
940
- * ( select ) => select( editorStore ).isPostAutosavingLocked(),
941
- * []
942
- * );
943
- *
944
- * return isAutoSavingLocked ? (
945
- * <p>{ __( 'Post auto saving is locked' ) }</p>
946
- * ) : (
947
- * <p>{ __( 'Post auto saving is not locked' ) }</p>
948
- * );
949
- * };
950
- * ```
951
- *
952
- * @return {boolean} Is locked.
953
- */
954
- export function isPostAutosavingLocked(state) {
446
+ function isPostAutosavingLocked(state) {
955
447
  return Object.keys(state.postAutosavingLock).length > 0;
956
448
  }
957
-
958
- /**
959
- * Returns whether the edition of the post has been taken over.
960
- *
961
- * @param {Object} state Global application state.
962
- *
963
- * @return {boolean} Is post lock takeover.
964
- */
965
- export function isPostLockTakeover(state) {
449
+ function isPostLockTakeover(state) {
966
450
  return state.postLock.isTakeover;
967
451
  }
968
-
969
- /**
970
- * Returns details about the post lock user.
971
- *
972
- * @param {Object} state Global application state.
973
- *
974
- * @return {Object} A user object.
975
- */
976
- export function getPostLockUser(state) {
452
+ function getPostLockUser(state) {
977
453
  return state.postLock.user;
978
454
  }
979
-
980
- /**
981
- * Returns the active post lock.
982
- *
983
- * @param {Object} state Global application state.
984
- *
985
- * @return {Object} The lock object.
986
- */
987
- export function getActivePostLock(state) {
455
+ function getActivePostLock(state) {
988
456
  return state.postLock.activePostLock;
989
457
  }
990
-
991
- /**
992
- * Returns whether or not the user has the unfiltered_html capability.
993
- *
994
- * @param {Object} state Editor state.
995
- *
996
- * @return {boolean} Whether the user can or can't post unfiltered HTML.
997
- */
998
- export function canUserUseUnfilteredHTML(state) {
999
- return Boolean(getCurrentPost(state)._links?.hasOwnProperty('wp:action-unfiltered-html'));
1000
- }
1001
-
1002
- /**
1003
- * Returns whether the pre-publish panel should be shown
1004
- * or skipped when the user clicks the "publish" button.
1005
- *
1006
- * @return {boolean} Whether the pre-publish panel should be shown or not.
1007
- */
1008
- export const isPublishSidebarEnabled = createRegistrySelector(select => () => !!select(preferencesStore).get('core', 'isPublishSidebarEnabled'));
1009
-
1010
- /**
1011
- * Return the current block list.
1012
- *
1013
- * @param {Object} state
1014
- * @return {Array} Block list.
1015
- */
1016
- export const getEditorBlocks = createSelector(state => {
1017
- return getEditedPostAttribute(state, 'blocks') || parse(getEditedPostContent(state));
1018
- }, state => [getEditedPostAttribute(state, 'blocks'), getEditedPostContent(state)]);
1019
-
1020
- /**
1021
- * Returns true if the given panel was programmatically removed, or false otherwise.
1022
- * All panels are not removed by default.
1023
- *
1024
- * @param {Object} state Global application state.
1025
- * @param {string} panelName A string that identifies the panel.
1026
- *
1027
- * @return {boolean} Whether or not the panel is removed.
1028
- */
1029
- export function isEditorPanelRemoved(state, panelName) {
458
+ function canUserUseUnfilteredHTML(state) {
459
+ return Boolean(
460
+ getCurrentPost(state)._links?.hasOwnProperty(
461
+ "wp:action-unfiltered-html"
462
+ )
463
+ );
464
+ }
465
+ const isPublishSidebarEnabled = createRegistrySelector(
466
+ (select) => () => !!select(preferencesStore).get("core", "isPublishSidebarEnabled")
467
+ );
468
+ const getEditorBlocks = createSelector(
469
+ (state) => {
470
+ return getEditedPostAttribute(state, "blocks") || parse(getEditedPostContent(state));
471
+ },
472
+ (state) => [
473
+ getEditedPostAttribute(state, "blocks"),
474
+ getEditedPostContent(state)
475
+ ]
476
+ );
477
+ function isEditorPanelRemoved(state, panelName) {
1030
478
  return state.removedPanels.includes(panelName);
1031
479
  }
1032
-
1033
- /**
1034
- * Returns true if the given panel is enabled, or false otherwise. Panels are
1035
- * enabled by default.
1036
- *
1037
- * @param {Object} state Global application state.
1038
- * @param {string} panelName A string that identifies the panel.
1039
- *
1040
- * @return {boolean} Whether or not the panel is enabled.
1041
- */
1042
- export const isEditorPanelEnabled = createRegistrySelector(select => (state, panelName) => {
1043
- // For backward compatibility, we check edit-post
1044
- // even though now this is in "editor" package.
1045
- const inactivePanels = select(preferencesStore).get('core', 'inactivePanels');
1046
- return !isEditorPanelRemoved(state, panelName) && !inactivePanels?.includes(panelName);
1047
- });
1048
-
1049
- /**
1050
- * Returns true if the given panel is open, or false otherwise. Panels are
1051
- * closed by default.
1052
- *
1053
- * @param {Object} state Global application state.
1054
- * @param {string} panelName A string that identifies the panel.
1055
- *
1056
- * @return {boolean} Whether or not the panel is open.
1057
- */
1058
- export const isEditorPanelOpened = createRegistrySelector(select => (state, panelName) => {
1059
- // For backward compatibility, we check edit-post
1060
- // even though now this is in "editor" package.
1061
- const openPanels = select(preferencesStore).get('core', 'openPanels');
1062
- return !!openPanels?.includes(panelName);
1063
- });
1064
-
1065
- /**
1066
- * A block selection object.
1067
- *
1068
- * @typedef {Object} WPBlockSelection
1069
- *
1070
- * @property {string} clientId A block client ID.
1071
- * @property {string} attributeKey A block attribute key.
1072
- * @property {number} offset An attribute value offset, based on the rich
1073
- * text value. See `wp.richText.create`.
1074
- */
1075
-
1076
- /**
1077
- * Returns the current selection start.
1078
- *
1079
- * @deprecated since Gutenberg 10.0.0.
1080
- *
1081
- * @param {Object} state
1082
- * @return {WPBlockSelection} The selection start.
1083
- */
1084
- export function getEditorSelectionStart(state) {
480
+ const isEditorPanelEnabled = createRegistrySelector(
481
+ (select) => (state, panelName) => {
482
+ const inactivePanels = select(preferencesStore).get(
483
+ "core",
484
+ "inactivePanels"
485
+ );
486
+ return !isEditorPanelRemoved(state, panelName) && !inactivePanels?.includes(panelName);
487
+ }
488
+ );
489
+ const isEditorPanelOpened = createRegistrySelector(
490
+ (select) => (state, panelName) => {
491
+ const openPanels = select(preferencesStore).get(
492
+ "core",
493
+ "openPanels"
494
+ );
495
+ return !!openPanels?.includes(panelName);
496
+ }
497
+ );
498
+ function getEditorSelectionStart(state) {
1085
499
  deprecated("select('core/editor').getEditorSelectionStart", {
1086
- since: '5.8',
500
+ since: "5.8",
1087
501
  alternative: "select('core/editor').getEditorSelection"
1088
502
  });
1089
- return getEditedPostAttribute(state, 'selection')?.selectionStart;
503
+ return getEditedPostAttribute(state, "selection")?.selectionStart;
1090
504
  }
1091
-
1092
- /**
1093
- * Returns the current selection end.
1094
- *
1095
- * @deprecated since Gutenberg 10.0.0.
1096
- *
1097
- * @param {Object} state
1098
- * @return {WPBlockSelection} The selection end.
1099
- */
1100
- export function getEditorSelectionEnd(state) {
505
+ function getEditorSelectionEnd(state) {
1101
506
  deprecated("select('core/editor').getEditorSelectionStart", {
1102
- since: '5.8',
507
+ since: "5.8",
1103
508
  alternative: "select('core/editor').getEditorSelection"
1104
509
  });
1105
- return getEditedPostAttribute(state, 'selection')?.selectionEnd;
510
+ return getEditedPostAttribute(state, "selection")?.selectionEnd;
1106
511
  }
1107
-
1108
- /**
1109
- * Returns the current selection.
1110
- *
1111
- * @param {Object} state
1112
- * @return {WPBlockSelection} The selection end.
1113
- */
1114
- export function getEditorSelection(state) {
1115
- return getEditedPostAttribute(state, 'selection');
512
+ function getEditorSelection(state) {
513
+ return getEditedPostAttribute(state, "selection");
1116
514
  }
1117
-
1118
- /**
1119
- * Is the editor ready
1120
- *
1121
- * @param {Object} state
1122
- * @return {boolean} is Ready.
1123
- */
1124
- export function __unstableIsEditorReady(state) {
515
+ function __unstableIsEditorReady(state) {
1125
516
  return !!state.postId;
1126
517
  }
1127
-
1128
- /**
1129
- * Returns the post editor settings.
1130
- *
1131
- * @param {Object} state Editor state.
1132
- *
1133
- * @return {Object} The editor settings object.
1134
- */
1135
- export function getEditorSettings(state) {
518
+ function getEditorSettings(state) {
1136
519
  return state.editorSettings;
1137
520
  }
1138
-
1139
- /**
1140
- * Returns the post editor's rendering mode.
1141
- *
1142
- * @param {Object} state Editor state.
1143
- *
1144
- * @return {string} Rendering mode.
1145
- */
1146
- export function getRenderingMode(state) {
521
+ function getRenderingMode(state) {
1147
522
  return state.renderingMode;
1148
523
  }
1149
-
1150
- /**
1151
- * Returns the current editing canvas device type.
1152
- *
1153
- * @param {Object} state Global application state.
1154
- *
1155
- * @return {string} Device type.
1156
- */
1157
- export const getDeviceType = createRegistrySelector(select => state => {
1158
- const isZoomOut = unlock(select(blockEditorStore)).isZoomOut();
1159
- if (isZoomOut) {
1160
- return 'Desktop';
524
+ const getDeviceType = createRegistrySelector(
525
+ (select) => (state) => {
526
+ const isZoomOut = unlock(select(blockEditorStore)).isZoomOut();
527
+ if (isZoomOut) {
528
+ return "Desktop";
529
+ }
530
+ return state.deviceType;
1161
531
  }
1162
- return state.deviceType;
1163
- });
1164
-
1165
- /**
1166
- * Returns true if the list view is opened.
1167
- *
1168
- * @param {Object} state Global application state.
1169
- *
1170
- * @return {boolean} Whether the list view is opened.
1171
- */
1172
- export function isListViewOpened(state) {
532
+ );
533
+ function isListViewOpened(state) {
1173
534
  return state.listViewPanel;
1174
535
  }
1175
-
1176
- /**
1177
- * Returns true if the inserter is opened.
1178
- *
1179
- * @param {Object} state Global application state.
1180
- *
1181
- * @return {boolean} Whether the inserter is opened.
1182
- */
1183
- export function isInserterOpened(state) {
536
+ function isInserterOpened(state) {
1184
537
  return !!state.blockInserterPanel;
1185
538
  }
1186
-
1187
- /**
1188
- * Returns the current editing mode.
1189
- *
1190
- * @param {Object} state Global application state.
1191
- *
1192
- * @return {string} Editing mode.
1193
- */
1194
- export const getEditorMode = createRegistrySelector(select => () => {
1195
- var _select$get;
1196
- return (_select$get = select(preferencesStore).get('core', 'editorMode')) !== null && _select$get !== void 0 ? _select$get : 'visual';
1197
- });
1198
-
1199
- /*
1200
- * Backward compatibility
1201
- */
1202
-
1203
- /**
1204
- * Returns state object prior to a specified optimist transaction ID, or `null`
1205
- * if the transaction corresponding to the given ID cannot be found.
1206
- *
1207
- * @deprecated since Gutenberg 9.7.0.
1208
- */
1209
- export function getStateBeforeOptimisticTransaction() {
539
+ const getEditorMode = createRegistrySelector(
540
+ (select) => () => select(preferencesStore).get("core", "editorMode") ?? "visual"
541
+ );
542
+ function getStateBeforeOptimisticTransaction() {
1210
543
  deprecated("select('core/editor').getStateBeforeOptimisticTransaction", {
1211
- since: '5.7',
1212
- hint: 'No state history is kept on this store anymore'
544
+ since: "5.7",
545
+ hint: "No state history is kept on this store anymore"
1213
546
  });
1214
547
  return null;
1215
548
  }
1216
- /**
1217
- * Returns true if an optimistic transaction is pending commit, for which the
1218
- * before state satisfies the given predicate function.
1219
- *
1220
- * @deprecated since Gutenberg 9.7.0.
1221
- */
1222
- export function inSomeHistory() {
549
+ function inSomeHistory() {
1223
550
  deprecated("select('core/editor').inSomeHistory", {
1224
- since: '5.7',
1225
- hint: 'No state history is kept on this store anymore'
551
+ since: "5.7",
552
+ hint: "No state history is kept on this store anymore"
1226
553
  });
1227
554
  return false;
1228
555
  }
1229
556
  function getBlockEditorSelector(name) {
1230
- return createRegistrySelector(select => (state, ...args) => {
1231
- deprecated("`wp.data.select( 'core/editor' )." + name + '`', {
1232
- since: '5.3',
1233
- alternative: "`wp.data.select( 'core/block-editor' )." + name + '`',
1234
- version: '6.2'
557
+ return createRegistrySelector((select) => (state, ...args) => {
558
+ deprecated("`wp.data.select( 'core/editor' )." + name + "`", {
559
+ since: "5.3",
560
+ alternative: "`wp.data.select( 'core/block-editor' )." + name + "`",
561
+ version: "6.2"
1235
562
  });
1236
563
  return select(blockEditorStore)[name](...args);
1237
564
  });
1238
565
  }
1239
-
1240
- /**
1241
- * @see getBlockName in core/block-editor store.
1242
- */
1243
- export const getBlockName = getBlockEditorSelector('getBlockName');
1244
-
1245
- /**
1246
- * @see isBlockValid in core/block-editor store.
1247
- */
1248
- export const isBlockValid = getBlockEditorSelector('isBlockValid');
1249
-
1250
- /**
1251
- * @see getBlockAttributes in core/block-editor store.
1252
- */
1253
- export const getBlockAttributes = getBlockEditorSelector('getBlockAttributes');
1254
-
1255
- /**
1256
- * @see getBlock in core/block-editor store.
1257
- */
1258
- export const getBlock = getBlockEditorSelector('getBlock');
1259
-
1260
- /**
1261
- * @see getBlocks in core/block-editor store.
1262
- */
1263
- export const getBlocks = getBlockEditorSelector('getBlocks');
1264
-
1265
- /**
1266
- * @see getClientIdsOfDescendants in core/block-editor store.
1267
- */
1268
- export const getClientIdsOfDescendants = getBlockEditorSelector('getClientIdsOfDescendants');
1269
-
1270
- /**
1271
- * @see getClientIdsWithDescendants in core/block-editor store.
1272
- */
1273
- export const getClientIdsWithDescendants = getBlockEditorSelector('getClientIdsWithDescendants');
1274
-
1275
- /**
1276
- * @see getGlobalBlockCount in core/block-editor store.
1277
- */
1278
- export const getGlobalBlockCount = getBlockEditorSelector('getGlobalBlockCount');
1279
-
1280
- /**
1281
- * @see getBlocksByClientId in core/block-editor store.
1282
- */
1283
- export const getBlocksByClientId = getBlockEditorSelector('getBlocksByClientId');
1284
-
1285
- /**
1286
- * @see getBlockCount in core/block-editor store.
1287
- */
1288
- export const getBlockCount = getBlockEditorSelector('getBlockCount');
1289
-
1290
- /**
1291
- * @see getBlockSelectionStart in core/block-editor store.
1292
- */
1293
- export const getBlockSelectionStart = getBlockEditorSelector('getBlockSelectionStart');
1294
-
1295
- /**
1296
- * @see getBlockSelectionEnd in core/block-editor store.
1297
- */
1298
- export const getBlockSelectionEnd = getBlockEditorSelector('getBlockSelectionEnd');
1299
-
1300
- /**
1301
- * @see getSelectedBlockCount in core/block-editor store.
1302
- */
1303
- export const getSelectedBlockCount = getBlockEditorSelector('getSelectedBlockCount');
1304
-
1305
- /**
1306
- * @see hasSelectedBlock in core/block-editor store.
1307
- */
1308
- export const hasSelectedBlock = getBlockEditorSelector('hasSelectedBlock');
1309
-
1310
- /**
1311
- * @see getSelectedBlockClientId in core/block-editor store.
1312
- */
1313
- export const getSelectedBlockClientId = getBlockEditorSelector('getSelectedBlockClientId');
1314
-
1315
- /**
1316
- * @see getSelectedBlock in core/block-editor store.
1317
- */
1318
- export const getSelectedBlock = getBlockEditorSelector('getSelectedBlock');
1319
-
1320
- /**
1321
- * @see getBlockRootClientId in core/block-editor store.
1322
- */
1323
- export const getBlockRootClientId = getBlockEditorSelector('getBlockRootClientId');
1324
-
1325
- /**
1326
- * @see getBlockHierarchyRootClientId in core/block-editor store.
1327
- */
1328
- export const getBlockHierarchyRootClientId = getBlockEditorSelector('getBlockHierarchyRootClientId');
1329
-
1330
- /**
1331
- * @see getAdjacentBlockClientId in core/block-editor store.
1332
- */
1333
- export const getAdjacentBlockClientId = getBlockEditorSelector('getAdjacentBlockClientId');
1334
-
1335
- /**
1336
- * @see getPreviousBlockClientId in core/block-editor store.
1337
- */
1338
- export const getPreviousBlockClientId = getBlockEditorSelector('getPreviousBlockClientId');
1339
-
1340
- /**
1341
- * @see getNextBlockClientId in core/block-editor store.
1342
- */
1343
- export const getNextBlockClientId = getBlockEditorSelector('getNextBlockClientId');
1344
-
1345
- /**
1346
- * @see getSelectedBlocksInitialCaretPosition in core/block-editor store.
1347
- */
1348
- export const getSelectedBlocksInitialCaretPosition = getBlockEditorSelector('getSelectedBlocksInitialCaretPosition');
1349
-
1350
- /**
1351
- * @see getMultiSelectedBlockClientIds in core/block-editor store.
1352
- */
1353
- export const getMultiSelectedBlockClientIds = getBlockEditorSelector('getMultiSelectedBlockClientIds');
1354
-
1355
- /**
1356
- * @see getMultiSelectedBlocks in core/block-editor store.
1357
- */
1358
- export const getMultiSelectedBlocks = getBlockEditorSelector('getMultiSelectedBlocks');
1359
-
1360
- /**
1361
- * @see getFirstMultiSelectedBlockClientId in core/block-editor store.
1362
- */
1363
- export const getFirstMultiSelectedBlockClientId = getBlockEditorSelector('getFirstMultiSelectedBlockClientId');
1364
-
1365
- /**
1366
- * @see getLastMultiSelectedBlockClientId in core/block-editor store.
1367
- */
1368
- export const getLastMultiSelectedBlockClientId = getBlockEditorSelector('getLastMultiSelectedBlockClientId');
1369
-
1370
- /**
1371
- * @see isFirstMultiSelectedBlock in core/block-editor store.
1372
- */
1373
- export const isFirstMultiSelectedBlock = getBlockEditorSelector('isFirstMultiSelectedBlock');
1374
-
1375
- /**
1376
- * @see isBlockMultiSelected in core/block-editor store.
1377
- */
1378
- export const isBlockMultiSelected = getBlockEditorSelector('isBlockMultiSelected');
1379
-
1380
- /**
1381
- * @see isAncestorMultiSelected in core/block-editor store.
1382
- */
1383
- export const isAncestorMultiSelected = getBlockEditorSelector('isAncestorMultiSelected');
1384
-
1385
- /**
1386
- * @see getMultiSelectedBlocksStartClientId in core/block-editor store.
1387
- */
1388
- export const getMultiSelectedBlocksStartClientId = getBlockEditorSelector('getMultiSelectedBlocksStartClientId');
1389
-
1390
- /**
1391
- * @see getMultiSelectedBlocksEndClientId in core/block-editor store.
1392
- */
1393
- export const getMultiSelectedBlocksEndClientId = getBlockEditorSelector('getMultiSelectedBlocksEndClientId');
1394
-
1395
- /**
1396
- * @see getBlockOrder in core/block-editor store.
1397
- */
1398
- export const getBlockOrder = getBlockEditorSelector('getBlockOrder');
1399
-
1400
- /**
1401
- * @see getBlockIndex in core/block-editor store.
1402
- */
1403
- export const getBlockIndex = getBlockEditorSelector('getBlockIndex');
1404
-
1405
- /**
1406
- * @see isBlockSelected in core/block-editor store.
1407
- */
1408
- export const isBlockSelected = getBlockEditorSelector('isBlockSelected');
1409
-
1410
- /**
1411
- * @see hasSelectedInnerBlock in core/block-editor store.
1412
- */
1413
- export const hasSelectedInnerBlock = getBlockEditorSelector('hasSelectedInnerBlock');
1414
-
1415
- /**
1416
- * @see isBlockWithinSelection in core/block-editor store.
1417
- */
1418
- export const isBlockWithinSelection = getBlockEditorSelector('isBlockWithinSelection');
1419
-
1420
- /**
1421
- * @see hasMultiSelection in core/block-editor store.
1422
- */
1423
- export const hasMultiSelection = getBlockEditorSelector('hasMultiSelection');
1424
-
1425
- /**
1426
- * @see isMultiSelecting in core/block-editor store.
1427
- */
1428
- export const isMultiSelecting = getBlockEditorSelector('isMultiSelecting');
1429
-
1430
- /**
1431
- * @see isSelectionEnabled in core/block-editor store.
1432
- */
1433
- export const isSelectionEnabled = getBlockEditorSelector('isSelectionEnabled');
1434
-
1435
- /**
1436
- * @see getBlockMode in core/block-editor store.
1437
- */
1438
- export const getBlockMode = getBlockEditorSelector('getBlockMode');
1439
-
1440
- /**
1441
- * @see isTyping in core/block-editor store.
1442
- */
1443
- export const isTyping = getBlockEditorSelector('isTyping');
1444
-
1445
- /**
1446
- * @see isCaretWithinFormattedText in core/block-editor store.
1447
- */
1448
- export const isCaretWithinFormattedText = getBlockEditorSelector('isCaretWithinFormattedText');
1449
-
1450
- /**
1451
- * @see getBlockInsertionPoint in core/block-editor store.
1452
- */
1453
- export const getBlockInsertionPoint = getBlockEditorSelector('getBlockInsertionPoint');
1454
-
1455
- /**
1456
- * @see isBlockInsertionPointVisible in core/block-editor store.
1457
- */
1458
- export const isBlockInsertionPointVisible = getBlockEditorSelector('isBlockInsertionPointVisible');
1459
-
1460
- /**
1461
- * @see isValidTemplate in core/block-editor store.
1462
- */
1463
- export const isValidTemplate = getBlockEditorSelector('isValidTemplate');
1464
-
1465
- /**
1466
- * @see getTemplate in core/block-editor store.
1467
- */
1468
- export const getTemplate = getBlockEditorSelector('getTemplate');
1469
-
1470
- /**
1471
- * @see getTemplateLock in core/block-editor store.
1472
- */
1473
- export const getTemplateLock = getBlockEditorSelector('getTemplateLock');
1474
-
1475
- /**
1476
- * @see canInsertBlockType in core/block-editor store.
1477
- */
1478
- export const canInsertBlockType = getBlockEditorSelector('canInsertBlockType');
1479
-
1480
- /**
1481
- * @see getInserterItems in core/block-editor store.
1482
- */
1483
- export const getInserterItems = getBlockEditorSelector('getInserterItems');
1484
-
1485
- /**
1486
- * @see hasInserterItems in core/block-editor store.
1487
- */
1488
- export const hasInserterItems = getBlockEditorSelector('hasInserterItems');
1489
-
1490
- /**
1491
- * @see getBlockListSettings in core/block-editor store.
1492
- */
1493
- export const getBlockListSettings = getBlockEditorSelector('getBlockListSettings');
1494
- export const __experimentalGetDefaultTemplateTypes = createRegistrySelector(select => () => {
1495
- deprecated("select('core/editor').__experimentalGetDefaultTemplateTypes", {
1496
- since: '6.8',
1497
- alternative: "select('core/core-data').getCurrentTheme()?.default_template_types"
1498
- });
1499
- return select(coreStore).getCurrentTheme()?.default_template_types;
1500
- });
1501
-
1502
- /**
1503
- * Returns the default template part areas.
1504
- *
1505
- * @param {Object} state Global application state.
1506
- *
1507
- * @return {Array} The template part areas.
1508
- */
1509
- export const __experimentalGetDefaultTemplatePartAreas = createRegistrySelector(select => createSelector(() => {
1510
- deprecated("select('core/editor').__experimentalGetDefaultTemplatePartAreas", {
1511
- since: '6.8',
1512
- alternative: "select('core/core-data').getCurrentTheme()?.default_template_part_areas"
1513
- });
1514
- const areas = select(coreStore).getCurrentTheme()?.default_template_part_areas || [];
1515
- return areas.map(item => {
1516
- return {
1517
- ...item,
1518
- icon: getTemplatePartIcon(item.icon)
1519
- };
1520
- });
1521
- }));
1522
-
1523
- /**
1524
- * Returns a default template type searched by slug.
1525
- *
1526
- * @param {Object} state Global application state.
1527
- * @param {string} slug The template type slug.
1528
- *
1529
- * @return {Object} The template type.
1530
- */
1531
- export const __experimentalGetDefaultTemplateType = createRegistrySelector(select => createSelector((state, slug) => {
1532
- var _Object$values$find;
1533
- deprecated("select('core/editor').__experimentalGetDefaultTemplateType", {
1534
- since: '6.8'
1535
- });
1536
- const templateTypes = select(coreStore).getCurrentTheme()?.default_template_types;
1537
- if (!templateTypes) {
1538
- return EMPTY_OBJECT;
1539
- }
1540
- return (_Object$values$find = Object.values(templateTypes).find(type => type.slug === slug)) !== null && _Object$values$find !== void 0 ? _Object$values$find : EMPTY_OBJECT;
1541
- }));
1542
-
1543
- /**
1544
- * Given a template entity, return information about it which is ready to be
1545
- * rendered, such as the title, description, and icon.
1546
- *
1547
- * @param {Object} state Global application state.
1548
- * @param {Object} template The template for which we need information.
1549
- * @return {Object} Information about the template, including title, description, and icon.
1550
- */
1551
- export const __experimentalGetTemplateInfo = createRegistrySelector(select => createSelector((state, template) => {
1552
- deprecated("select('core/editor').__experimentalGetTemplateInfo", {
1553
- since: '6.8'
1554
- });
1555
- if (!template) {
1556
- return EMPTY_OBJECT;
1557
- }
1558
- const currentTheme = select(coreStore).getCurrentTheme();
1559
- const templateTypes = currentTheme?.default_template_types || [];
1560
- const templateAreas = currentTheme?.default_template_part_areas || [];
1561
- return getTemplateInfo({
1562
- template,
1563
- templateAreas,
1564
- templateTypes
1565
- });
1566
- }));
1567
-
1568
- /**
1569
- * Returns a post type label depending on the current post.
1570
- *
1571
- * @param {Object} state Global application state.
1572
- *
1573
- * @return {string|undefined} The post type label if available, otherwise undefined.
1574
- */
1575
- export const getPostTypeLabel = createRegistrySelector(select => state => {
1576
- const currentPostType = getCurrentPostType(state);
1577
- const postType = select(coreStore).getPostType(currentPostType);
1578
- // Disable reason: Post type labels object is shaped like this.
1579
- // eslint-disable-next-line camelcase
1580
- return postType?.labels?.singular_name;
1581
- });
1582
-
1583
- /**
1584
- * Returns true if the publish sidebar is opened.
1585
- *
1586
- * @param {Object} state Global application state
1587
- *
1588
- * @return {boolean} Whether the publish sidebar is open.
1589
- */
1590
- export function isPublishSidebarOpened(state) {
566
+ const getBlockName = getBlockEditorSelector("getBlockName");
567
+ const isBlockValid = getBlockEditorSelector("isBlockValid");
568
+ const getBlockAttributes = getBlockEditorSelector("getBlockAttributes");
569
+ const getBlock = getBlockEditorSelector("getBlock");
570
+ const getBlocks = getBlockEditorSelector("getBlocks");
571
+ const getClientIdsOfDescendants = getBlockEditorSelector(
572
+ "getClientIdsOfDescendants"
573
+ );
574
+ const getClientIdsWithDescendants = getBlockEditorSelector(
575
+ "getClientIdsWithDescendants"
576
+ );
577
+ const getGlobalBlockCount = getBlockEditorSelector(
578
+ "getGlobalBlockCount"
579
+ );
580
+ const getBlocksByClientId = getBlockEditorSelector(
581
+ "getBlocksByClientId"
582
+ );
583
+ const getBlockCount = getBlockEditorSelector("getBlockCount");
584
+ const getBlockSelectionStart = getBlockEditorSelector(
585
+ "getBlockSelectionStart"
586
+ );
587
+ const getBlockSelectionEnd = getBlockEditorSelector(
588
+ "getBlockSelectionEnd"
589
+ );
590
+ const getSelectedBlockCount = getBlockEditorSelector(
591
+ "getSelectedBlockCount"
592
+ );
593
+ const hasSelectedBlock = getBlockEditorSelector("hasSelectedBlock");
594
+ const getSelectedBlockClientId = getBlockEditorSelector(
595
+ "getSelectedBlockClientId"
596
+ );
597
+ const getSelectedBlock = getBlockEditorSelector("getSelectedBlock");
598
+ const getBlockRootClientId = getBlockEditorSelector(
599
+ "getBlockRootClientId"
600
+ );
601
+ const getBlockHierarchyRootClientId = getBlockEditorSelector(
602
+ "getBlockHierarchyRootClientId"
603
+ );
604
+ const getAdjacentBlockClientId = getBlockEditorSelector(
605
+ "getAdjacentBlockClientId"
606
+ );
607
+ const getPreviousBlockClientId = getBlockEditorSelector(
608
+ "getPreviousBlockClientId"
609
+ );
610
+ const getNextBlockClientId = getBlockEditorSelector(
611
+ "getNextBlockClientId"
612
+ );
613
+ const getSelectedBlocksInitialCaretPosition = getBlockEditorSelector(
614
+ "getSelectedBlocksInitialCaretPosition"
615
+ );
616
+ const getMultiSelectedBlockClientIds = getBlockEditorSelector(
617
+ "getMultiSelectedBlockClientIds"
618
+ );
619
+ const getMultiSelectedBlocks = getBlockEditorSelector(
620
+ "getMultiSelectedBlocks"
621
+ );
622
+ const getFirstMultiSelectedBlockClientId = getBlockEditorSelector(
623
+ "getFirstMultiSelectedBlockClientId"
624
+ );
625
+ const getLastMultiSelectedBlockClientId = getBlockEditorSelector(
626
+ "getLastMultiSelectedBlockClientId"
627
+ );
628
+ const isFirstMultiSelectedBlock = getBlockEditorSelector(
629
+ "isFirstMultiSelectedBlock"
630
+ );
631
+ const isBlockMultiSelected = getBlockEditorSelector(
632
+ "isBlockMultiSelected"
633
+ );
634
+ const isAncestorMultiSelected = getBlockEditorSelector(
635
+ "isAncestorMultiSelected"
636
+ );
637
+ const getMultiSelectedBlocksStartClientId = getBlockEditorSelector(
638
+ "getMultiSelectedBlocksStartClientId"
639
+ );
640
+ const getMultiSelectedBlocksEndClientId = getBlockEditorSelector(
641
+ "getMultiSelectedBlocksEndClientId"
642
+ );
643
+ const getBlockOrder = getBlockEditorSelector("getBlockOrder");
644
+ const getBlockIndex = getBlockEditorSelector("getBlockIndex");
645
+ const isBlockSelected = getBlockEditorSelector("isBlockSelected");
646
+ const hasSelectedInnerBlock = getBlockEditorSelector(
647
+ "hasSelectedInnerBlock"
648
+ );
649
+ const isBlockWithinSelection = getBlockEditorSelector(
650
+ "isBlockWithinSelection"
651
+ );
652
+ const hasMultiSelection = getBlockEditorSelector("hasMultiSelection");
653
+ const isMultiSelecting = getBlockEditorSelector("isMultiSelecting");
654
+ const isSelectionEnabled = getBlockEditorSelector("isSelectionEnabled");
655
+ const getBlockMode = getBlockEditorSelector("getBlockMode");
656
+ const isTyping = getBlockEditorSelector("isTyping");
657
+ const isCaretWithinFormattedText = getBlockEditorSelector(
658
+ "isCaretWithinFormattedText"
659
+ );
660
+ const getBlockInsertionPoint = getBlockEditorSelector(
661
+ "getBlockInsertionPoint"
662
+ );
663
+ const isBlockInsertionPointVisible = getBlockEditorSelector(
664
+ "isBlockInsertionPointVisible"
665
+ );
666
+ const isValidTemplate = getBlockEditorSelector("isValidTemplate");
667
+ const getTemplate = getBlockEditorSelector("getTemplate");
668
+ const getTemplateLock = getBlockEditorSelector("getTemplateLock");
669
+ const canInsertBlockType = getBlockEditorSelector("canInsertBlockType");
670
+ const getInserterItems = getBlockEditorSelector("getInserterItems");
671
+ const hasInserterItems = getBlockEditorSelector("hasInserterItems");
672
+ const getBlockListSettings = getBlockEditorSelector(
673
+ "getBlockListSettings"
674
+ );
675
+ const __experimentalGetDefaultTemplateTypes = createRegistrySelector(
676
+ (select) => () => {
677
+ deprecated(
678
+ "select('core/editor').__experimentalGetDefaultTemplateTypes",
679
+ {
680
+ since: "6.8",
681
+ alternative: "select('core/core-data').getCurrentTheme()?.default_template_types"
682
+ }
683
+ );
684
+ return select(coreStore).getCurrentTheme()?.default_template_types;
685
+ }
686
+ );
687
+ const __experimentalGetDefaultTemplatePartAreas = createRegistrySelector(
688
+ (select) => createSelector(() => {
689
+ deprecated(
690
+ "select('core/editor').__experimentalGetDefaultTemplatePartAreas",
691
+ {
692
+ since: "6.8",
693
+ alternative: "select('core/core-data').getCurrentTheme()?.default_template_part_areas"
694
+ }
695
+ );
696
+ const areas = select(coreStore).getCurrentTheme()?.default_template_part_areas || [];
697
+ return areas.map((item) => {
698
+ return { ...item, icon: getTemplatePartIcon(item.icon) };
699
+ });
700
+ })
701
+ );
702
+ const __experimentalGetDefaultTemplateType = createRegistrySelector(
703
+ (select) => createSelector((state, slug) => {
704
+ deprecated(
705
+ "select('core/editor').__experimentalGetDefaultTemplateType",
706
+ {
707
+ since: "6.8"
708
+ }
709
+ );
710
+ const templateTypes = select(coreStore).getCurrentTheme()?.default_template_types;
711
+ if (!templateTypes) {
712
+ return EMPTY_OBJECT;
713
+ }
714
+ return Object.values(templateTypes).find(
715
+ (type) => type.slug === slug
716
+ ) ?? EMPTY_OBJECT;
717
+ })
718
+ );
719
+ const __experimentalGetTemplateInfo = createRegistrySelector(
720
+ (select) => createSelector((state, template) => {
721
+ deprecated("select('core/editor').__experimentalGetTemplateInfo", {
722
+ since: "6.8"
723
+ });
724
+ if (!template) {
725
+ return EMPTY_OBJECT;
726
+ }
727
+ const currentTheme = select(coreStore).getCurrentTheme();
728
+ const templateTypes = currentTheme?.default_template_types || [];
729
+ const templateAreas = currentTheme?.default_template_part_areas || [];
730
+ return getTemplateInfo({
731
+ template,
732
+ templateAreas,
733
+ templateTypes
734
+ });
735
+ })
736
+ );
737
+ const getPostTypeLabel = createRegistrySelector(
738
+ (select) => (state) => {
739
+ const currentPostType = getCurrentPostType(state);
740
+ const postType = select(coreStore).getPostType(currentPostType);
741
+ return postType?.labels?.singular_name;
742
+ }
743
+ );
744
+ function isPublishSidebarOpened(state) {
1591
745
  return state.publishSidebarActive;
1592
746
  }
1593
- //# sourceMappingURL=selectors.js.map
747
+ export {
748
+ __experimentalGetDefaultTemplatePartAreas,
749
+ __experimentalGetDefaultTemplateType,
750
+ __experimentalGetDefaultTemplateTypes,
751
+ __experimentalGetTemplateInfo,
752
+ __unstableIsEditorReady,
753
+ canInsertBlockType,
754
+ canUserUseUnfilteredHTML,
755
+ didPostSaveRequestFail,
756
+ didPostSaveRequestSucceed,
757
+ getActivePostLock,
758
+ getAdjacentBlockClientId,
759
+ getAutosaveAttribute,
760
+ getBlock,
761
+ getBlockAttributes,
762
+ getBlockCount,
763
+ getBlockHierarchyRootClientId,
764
+ getBlockIndex,
765
+ getBlockInsertionPoint,
766
+ getBlockListSettings,
767
+ getBlockMode,
768
+ getBlockName,
769
+ getBlockOrder,
770
+ getBlockRootClientId,
771
+ getBlockSelectionEnd,
772
+ getBlockSelectionStart,
773
+ getBlocks,
774
+ getBlocksByClientId,
775
+ getClientIdsOfDescendants,
776
+ getClientIdsWithDescendants,
777
+ getCurrentPost,
778
+ getCurrentPostAttribute,
779
+ getCurrentPostId,
780
+ getCurrentPostLastRevisionId,
781
+ getCurrentPostRevisionsCount,
782
+ getCurrentPostType,
783
+ getCurrentTemplateId,
784
+ getDeviceType,
785
+ getEditedPostAttribute,
786
+ getEditedPostContent,
787
+ getEditedPostPreviewLink,
788
+ getEditedPostSlug,
789
+ getEditedPostVisibility,
790
+ getEditorBlocks,
791
+ getEditorMode,
792
+ getEditorSelection,
793
+ getEditorSelectionEnd,
794
+ getEditorSelectionStart,
795
+ getEditorSettings,
796
+ getFirstMultiSelectedBlockClientId,
797
+ getGlobalBlockCount,
798
+ getInserterItems,
799
+ getLastMultiSelectedBlockClientId,
800
+ getMultiSelectedBlockClientIds,
801
+ getMultiSelectedBlocks,
802
+ getMultiSelectedBlocksEndClientId,
803
+ getMultiSelectedBlocksStartClientId,
804
+ getNextBlockClientId,
805
+ getPermalink,
806
+ getPermalinkParts,
807
+ getPostEdits,
808
+ getPostLockUser,
809
+ getPostTypeLabel,
810
+ getPreviousBlockClientId,
811
+ getRenderingMode,
812
+ getSelectedBlock,
813
+ getSelectedBlockClientId,
814
+ getSelectedBlockCount,
815
+ getSelectedBlocksInitialCaretPosition,
816
+ getStateBeforeOptimisticTransaction,
817
+ getSuggestedPostFormat,
818
+ getTemplate,
819
+ getTemplateLock,
820
+ hasChangedContent,
821
+ hasEditorRedo,
822
+ hasEditorUndo,
823
+ hasInserterItems,
824
+ hasMultiSelection,
825
+ hasNonPostEntityChanges,
826
+ hasSelectedBlock,
827
+ hasSelectedInnerBlock,
828
+ inSomeHistory,
829
+ isAncestorMultiSelected,
830
+ isAutosavingPost,
831
+ isBlockInsertionPointVisible,
832
+ isBlockMultiSelected,
833
+ isBlockSelected,
834
+ isBlockValid,
835
+ isBlockWithinSelection,
836
+ isCaretWithinFormattedText,
837
+ isCleanNewPost,
838
+ isCurrentPostPending,
839
+ isCurrentPostPublished,
840
+ isCurrentPostScheduled,
841
+ isDeletingPost,
842
+ isEditedPostAutosaveable,
843
+ isEditedPostBeingScheduled,
844
+ isEditedPostDateFloating,
845
+ isEditedPostDirty,
846
+ isEditedPostEmpty,
847
+ isEditedPostNew,
848
+ isEditedPostPublishable,
849
+ isEditedPostSaveable,
850
+ isEditorPanelEnabled,
851
+ isEditorPanelOpened,
852
+ isEditorPanelRemoved,
853
+ isFirstMultiSelectedBlock,
854
+ isInserterOpened,
855
+ isListViewOpened,
856
+ isMultiSelecting,
857
+ isPermalinkEditable,
858
+ isPostAutosavingLocked,
859
+ isPostLockTakeover,
860
+ isPostLocked,
861
+ isPostSavingLocked,
862
+ isPreviewingPost,
863
+ isPublishSidebarEnabled,
864
+ isPublishSidebarOpened,
865
+ isPublishingPost,
866
+ isSavingNonPostEntityChanges,
867
+ isSavingPost,
868
+ isSelectionEnabled,
869
+ isTyping,
870
+ isValidTemplate
871
+ };
872
+ //# sourceMappingURL=selectors.js.map