@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,37 +1,20 @@
1
- /**
2
- * External dependencies
3
- */
4
- import clsx from 'clsx';
5
-
6
- /**
7
- * WordPress dependencies
8
- */
9
- import { useViewportMatch } from '@wordpress/compose';
10
- import { useSelect, useDispatch } from '@wordpress/data';
11
- import { __, _x } from '@wordpress/i18n';
12
- import { NavigableToolbar, ToolSelector } from '@wordpress/block-editor';
13
- import { ToolbarButton, ToolbarItem } from '@wordpress/components';
14
- import { listView, plus } from '@wordpress/icons';
15
- import { useCallback } from '@wordpress/element';
16
- import { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';
17
- import { store as preferencesStore } from '@wordpress/preferences';
18
-
19
- /**
20
- * Internal dependencies
21
- */
22
- import { unlock } from '../../lock-unlock';
23
- import { store as editorStore } from '../../store';
24
- import EditorHistoryRedo from '../editor-history/redo';
25
- import EditorHistoryUndo from '../editor-history/undo';
26
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
27
- function DocumentTools({
28
- className,
29
- disableBlockTools = false
30
- }) {
31
- const {
32
- setIsInserterOpened,
33
- setIsListViewOpened
34
- } = useDispatch(editorStore);
1
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
+ import clsx from "clsx";
3
+ import { useViewportMatch } from "@wordpress/compose";
4
+ import { useSelect, useDispatch } from "@wordpress/data";
5
+ import { __, _x } from "@wordpress/i18n";
6
+ import { NavigableToolbar } from "@wordpress/block-editor";
7
+ import { ToolbarButton, ToolbarItem } from "@wordpress/components";
8
+ import { listView, plus } from "@wordpress/icons";
9
+ import { useCallback } from "@wordpress/element";
10
+ import { store as keyboardShortcutsStore } from "@wordpress/keyboard-shortcuts";
11
+ import { store as preferencesStore } from "@wordpress/preferences";
12
+ import { unlock } from "../../lock-unlock";
13
+ import { store as editorStore } from "../../store";
14
+ import EditorHistoryRedo from "../editor-history/redo";
15
+ import EditorHistoryUndo from "../editor-history/undo";
16
+ function DocumentTools({ className, disableBlockTools = false }) {
17
+ const { setIsInserterOpened, setIsListViewOpened } = useDispatch(editorStore);
35
18
  const {
36
19
  isDistractionFree,
37
20
  isInserterOpened,
@@ -39,117 +22,124 @@ function DocumentTools({
39
22
  listViewShortcut,
40
23
  inserterSidebarToggleRef,
41
24
  listViewToggleRef,
42
- showIconLabels,
43
- showTools
44
- } = useSelect(select => {
45
- const {
46
- get
47
- } = select(preferencesStore);
25
+ showIconLabels
26
+ } = useSelect((select) => {
27
+ const { get } = select(preferencesStore);
48
28
  const {
49
29
  isListViewOpened,
50
30
  getEditorMode,
51
31
  getInserterSidebarToggleRef,
52
- getListViewToggleRef,
53
- getRenderingMode,
54
- getCurrentPostType
32
+ getListViewToggleRef
55
33
  } = unlock(select(editorStore));
56
- const {
57
- getShortcutRepresentation
58
- } = select(keyboardShortcutsStore);
34
+ const { getShortcutRepresentation } = select(keyboardShortcutsStore);
59
35
  return {
60
36
  isInserterOpened: select(editorStore).isInserterOpened(),
61
37
  isListViewOpen: isListViewOpened(),
62
- listViewShortcut: getShortcutRepresentation('core/editor/toggle-list-view'),
38
+ listViewShortcut: getShortcutRepresentation(
39
+ "core/editor/toggle-list-view"
40
+ ),
63
41
  inserterSidebarToggleRef: getInserterSidebarToggleRef(),
64
42
  listViewToggleRef: getListViewToggleRef(),
65
- showIconLabels: get('core', 'showIconLabels'),
66
- isDistractionFree: get('core', 'distractionFree'),
67
- isVisualMode: getEditorMode() === 'visual',
68
- showTools: !!window?.__experimentalEditorWriteMode && (getRenderingMode() !== 'post-only' || getCurrentPostType() === 'wp_template')
43
+ showIconLabels: get("core", "showIconLabels"),
44
+ isDistractionFree: get("core", "distractionFree"),
45
+ isVisualMode: getEditorMode() === "visual"
69
46
  };
70
47
  }, []);
71
- const preventDefault = event => {
72
- // Because the inserter behaves like a dialog,
73
- // if the inserter is opened already then when we click on the toggle button
74
- // then the initial click event will close the inserter and then be propagated
75
- // to the inserter toggle and it will open it again.
76
- // To prevent this we need to stop the propagation of the event.
77
- // This won't be necessary when the inserter no longer behaves like a dialog.
78
-
48
+ const preventDefault = (event) => {
79
49
  if (isInserterOpened) {
80
50
  event.preventDefault();
81
51
  }
82
52
  };
83
- const isLargeViewport = useViewportMatch('medium');
84
- const isWideViewport = useViewportMatch('wide');
85
-
86
- /* translators: accessibility text for the editor toolbar */
87
- const toolbarAriaLabel = __('Document tools');
88
- const toggleListView = useCallback(() => setIsListViewOpened(!isListViewOpen), [setIsListViewOpened, isListViewOpen]);
89
- const toggleInserter = useCallback(() => setIsInserterOpened(!isInserterOpened), [isInserterOpened, setIsInserterOpened]);
90
-
91
- /* translators: button label text should, if possible, be under 16 characters. */
92
- const longLabel = _x('Block Inserter', 'Generic label for block inserter button');
93
- const shortLabel = !isInserterOpened ? __('Add') : __('Close');
53
+ const isWideViewport = useViewportMatch("wide");
54
+ const toolbarAriaLabel = __("Document tools");
55
+ const toggleListView = useCallback(
56
+ () => setIsListViewOpened(!isListViewOpen),
57
+ [setIsListViewOpened, isListViewOpen]
58
+ );
59
+ const toggleInserter = useCallback(
60
+ () => setIsInserterOpened(!isInserterOpened),
61
+ [isInserterOpened, setIsInserterOpened]
62
+ );
63
+ const longLabel = _x(
64
+ "Block Inserter",
65
+ "Generic label for block inserter button"
66
+ );
67
+ const shortLabel = !isInserterOpened ? __("Add") : __("Close");
94
68
  return (
95
- /*#__PURE__*/
96
69
  // Some plugins expect and use the `edit-post-header-toolbar` CSS class to
97
70
  // find the toolbar and inject UI elements into it. This is not officially
98
71
  // supported, but we're keeping it in the list of class names for backwards
99
72
  // compatibility.
100
- _jsx(NavigableToolbar, {
101
- className: clsx('editor-document-tools', 'edit-post-header-toolbar', className),
102
- "aria-label": toolbarAriaLabel,
103
- variant: "unstyled",
104
- children: /*#__PURE__*/_jsxs("div", {
105
- className: "editor-document-tools__left",
106
- children: [!isDistractionFree && /*#__PURE__*/_jsx(ToolbarButton, {
107
- ref: inserterSidebarToggleRef,
108
- className: "editor-document-tools__inserter-toggle",
109
- variant: "primary",
110
- isPressed: isInserterOpened,
111
- onMouseDown: preventDefault,
112
- onClick: toggleInserter,
113
- disabled: disableBlockTools,
114
- icon: plus,
115
- label: showIconLabels ? shortLabel : longLabel,
116
- showTooltip: !showIconLabels,
117
- "aria-expanded": isInserterOpened
118
- }), (isWideViewport || !showIconLabels) && /*#__PURE__*/_jsxs(_Fragment, {
119
- children: [showTools && isLargeViewport && /*#__PURE__*/_jsx(ToolbarItem, {
120
- as: ToolSelector,
121
- showTooltip: !showIconLabels,
122
- variant: showIconLabels ? 'tertiary' : undefined,
123
- disabled: disableBlockTools,
124
- size: "compact"
125
- }), /*#__PURE__*/_jsx(ToolbarItem, {
126
- as: EditorHistoryUndo,
127
- showTooltip: !showIconLabels,
128
- variant: showIconLabels ? 'tertiary' : undefined,
129
- size: "compact"
130
- }), /*#__PURE__*/_jsx(ToolbarItem, {
131
- as: EditorHistoryRedo,
132
- showTooltip: !showIconLabels,
133
- variant: showIconLabels ? 'tertiary' : undefined,
134
- size: "compact"
135
- }), !isDistractionFree && /*#__PURE__*/_jsx(ToolbarButton, {
136
- className: "editor-document-tools__document-overview-toggle",
137
- icon: listView,
138
- disabled: disableBlockTools,
139
- isPressed: isListViewOpen
140
- /* translators: button label text should, if possible, be under 16 characters. */,
141
- label: __('Document Overview'),
142
- onClick: toggleListView,
143
- shortcut: listViewShortcut,
144
- showTooltip: !showIconLabels,
145
- variant: showIconLabels ? 'tertiary' : undefined,
146
- "aria-expanded": isListViewOpen,
147
- ref: listViewToggleRef
148
- })]
149
- })]
150
- })
151
- })
73
+ /* @__PURE__ */ jsx(
74
+ NavigableToolbar,
75
+ {
76
+ className: clsx(
77
+ "editor-document-tools",
78
+ "edit-post-header-toolbar",
79
+ className
80
+ ),
81
+ "aria-label": toolbarAriaLabel,
82
+ variant: "unstyled",
83
+ children: /* @__PURE__ */ jsxs("div", { className: "editor-document-tools__left", children: [
84
+ !isDistractionFree && /* @__PURE__ */ jsx(
85
+ ToolbarButton,
86
+ {
87
+ ref: inserterSidebarToggleRef,
88
+ className: "editor-document-tools__inserter-toggle",
89
+ variant: "primary",
90
+ isPressed: isInserterOpened,
91
+ onMouseDown: preventDefault,
92
+ onClick: toggleInserter,
93
+ disabled: disableBlockTools,
94
+ icon: plus,
95
+ label: showIconLabels ? shortLabel : longLabel,
96
+ showTooltip: !showIconLabels,
97
+ "aria-expanded": isInserterOpened
98
+ }
99
+ ),
100
+ (isWideViewport || !showIconLabels) && /* @__PURE__ */ jsxs(Fragment, { children: [
101
+ /* @__PURE__ */ jsx(
102
+ ToolbarItem,
103
+ {
104
+ as: EditorHistoryUndo,
105
+ showTooltip: !showIconLabels,
106
+ variant: showIconLabels ? "tertiary" : void 0,
107
+ size: "compact"
108
+ }
109
+ ),
110
+ /* @__PURE__ */ jsx(
111
+ ToolbarItem,
112
+ {
113
+ as: EditorHistoryRedo,
114
+ showTooltip: !showIconLabels,
115
+ variant: showIconLabels ? "tertiary" : void 0,
116
+ size: "compact"
117
+ }
118
+ ),
119
+ !isDistractionFree && /* @__PURE__ */ jsx(
120
+ ToolbarButton,
121
+ {
122
+ className: "editor-document-tools__document-overview-toggle",
123
+ icon: listView,
124
+ disabled: disableBlockTools,
125
+ isPressed: isListViewOpen,
126
+ label: __("Document Overview"),
127
+ onClick: toggleListView,
128
+ shortcut: listViewShortcut,
129
+ showTooltip: !showIconLabels,
130
+ variant: showIconLabels ? "tertiary" : void 0,
131
+ "aria-expanded": isListViewOpen,
132
+ ref: listViewToggleRef
133
+ }
134
+ )
135
+ ] })
136
+ ] })
137
+ }
138
+ )
152
139
  );
153
140
  }
154
- export default DocumentTools;
155
- //# sourceMappingURL=index.js.map
141
+ var document_tools_default = DocumentTools;
142
+ export {
143
+ document_tools_default as default
144
+ };
145
+ //# sourceMappingURL=index.js.map
@@ -1 +1,7 @@
1
- {"version":3,"names":["clsx","useViewportMatch","useSelect","useDispatch","__","_x","NavigableToolbar","ToolSelector","ToolbarButton","ToolbarItem","listView","plus","useCallback","store","keyboardShortcutsStore","preferencesStore","unlock","editorStore","EditorHistoryRedo","EditorHistoryUndo","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","DocumentTools","className","disableBlockTools","setIsInserterOpened","setIsListViewOpened","isDistractionFree","isInserterOpened","isListViewOpen","listViewShortcut","inserterSidebarToggleRef","listViewToggleRef","showIconLabels","showTools","select","get","isListViewOpened","getEditorMode","getInserterSidebarToggleRef","getListViewToggleRef","getRenderingMode","getCurrentPostType","getShortcutRepresentation","isVisualMode","window","__experimentalEditorWriteMode","preventDefault","event","isLargeViewport","isWideViewport","toolbarAriaLabel","toggleListView","toggleInserter","longLabel","shortLabel","variant","children","ref","isPressed","onMouseDown","onClick","disabled","icon","label","showTooltip","as","undefined","size","shortcut"],"sources":["@wordpress/editor/src/components/document-tools/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useViewportMatch } from '@wordpress/compose';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __, _x } from '@wordpress/i18n';\nimport { NavigableToolbar, ToolSelector } from '@wordpress/block-editor';\nimport { ToolbarButton, ToolbarItem } from '@wordpress/components';\nimport { listView, plus } from '@wordpress/icons';\nimport { useCallback } from '@wordpress/element';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as editorStore } from '../../store';\nimport EditorHistoryRedo from '../editor-history/redo';\nimport EditorHistoryUndo from '../editor-history/undo';\n\nfunction DocumentTools( { className, disableBlockTools = false } ) {\n\tconst { setIsInserterOpened, setIsListViewOpened } =\n\t\tuseDispatch( editorStore );\n\tconst {\n\t\tisDistractionFree,\n\t\tisInserterOpened,\n\t\tisListViewOpen,\n\t\tlistViewShortcut,\n\t\tinserterSidebarToggleRef,\n\t\tlistViewToggleRef,\n\t\tshowIconLabels,\n\t\tshowTools,\n\t} = useSelect( ( select ) => {\n\t\tconst { get } = select( preferencesStore );\n\t\tconst {\n\t\t\tisListViewOpened,\n\t\t\tgetEditorMode,\n\t\t\tgetInserterSidebarToggleRef,\n\t\t\tgetListViewToggleRef,\n\t\t\tgetRenderingMode,\n\t\t\tgetCurrentPostType,\n\t\t} = unlock( select( editorStore ) );\n\t\tconst { getShortcutRepresentation } = select( keyboardShortcutsStore );\n\n\t\treturn {\n\t\t\tisInserterOpened: select( editorStore ).isInserterOpened(),\n\t\t\tisListViewOpen: isListViewOpened(),\n\t\t\tlistViewShortcut: getShortcutRepresentation(\n\t\t\t\t'core/editor/toggle-list-view'\n\t\t\t),\n\t\t\tinserterSidebarToggleRef: getInserterSidebarToggleRef(),\n\t\t\tlistViewToggleRef: getListViewToggleRef(),\n\t\t\tshowIconLabels: get( 'core', 'showIconLabels' ),\n\t\t\tisDistractionFree: get( 'core', 'distractionFree' ),\n\t\t\tisVisualMode: getEditorMode() === 'visual',\n\t\t\tshowTools:\n\t\t\t\t!! window?.__experimentalEditorWriteMode &&\n\t\t\t\t( getRenderingMode() !== 'post-only' ||\n\t\t\t\t\tgetCurrentPostType() === 'wp_template' ),\n\t\t};\n\t}, [] );\n\n\tconst preventDefault = ( event ) => {\n\t\t// Because the inserter behaves like a dialog,\n\t\t// if the inserter is opened already then when we click on the toggle button\n\t\t// then the initial click event will close the inserter and then be propagated\n\t\t// to the inserter toggle and it will open it again.\n\t\t// To prevent this we need to stop the propagation of the event.\n\t\t// This won't be necessary when the inserter no longer behaves like a dialog.\n\n\t\tif ( isInserterOpened ) {\n\t\t\tevent.preventDefault();\n\t\t}\n\t};\n\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tconst isWideViewport = useViewportMatch( 'wide' );\n\n\t/* translators: accessibility text for the editor toolbar */\n\tconst toolbarAriaLabel = __( 'Document tools' );\n\n\tconst toggleListView = useCallback(\n\t\t() => setIsListViewOpened( ! isListViewOpen ),\n\t\t[ setIsListViewOpened, isListViewOpen ]\n\t);\n\n\tconst toggleInserter = useCallback(\n\t\t() => setIsInserterOpened( ! isInserterOpened ),\n\t\t[ isInserterOpened, setIsInserterOpened ]\n\t);\n\n\t/* translators: button label text should, if possible, be under 16 characters. */\n\tconst longLabel = _x(\n\t\t'Block Inserter',\n\t\t'Generic label for block inserter button'\n\t);\n\tconst shortLabel = ! isInserterOpened ? __( 'Add' ) : __( 'Close' );\n\n\treturn (\n\t\t// Some plugins expect and use the `edit-post-header-toolbar` CSS class to\n\t\t// find the toolbar and inject UI elements into it. This is not officially\n\t\t// supported, but we're keeping it in the list of class names for backwards\n\t\t// compatibility.\n\t\t<NavigableToolbar\n\t\t\tclassName={ clsx(\n\t\t\t\t'editor-document-tools',\n\t\t\t\t'edit-post-header-toolbar',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\taria-label={ toolbarAriaLabel }\n\t\t\tvariant=\"unstyled\"\n\t\t>\n\t\t\t<div className=\"editor-document-tools__left\">\n\t\t\t\t{ ! isDistractionFree && (\n\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\tref={ inserterSidebarToggleRef }\n\t\t\t\t\t\tclassName=\"editor-document-tools__inserter-toggle\"\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\tisPressed={ isInserterOpened }\n\t\t\t\t\t\tonMouseDown={ preventDefault }\n\t\t\t\t\t\tonClick={ toggleInserter }\n\t\t\t\t\t\tdisabled={ disableBlockTools }\n\t\t\t\t\t\ticon={ plus }\n\t\t\t\t\t\tlabel={ showIconLabels ? shortLabel : longLabel }\n\t\t\t\t\t\tshowTooltip={ ! showIconLabels }\n\t\t\t\t\t\taria-expanded={ isInserterOpened }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ ( isWideViewport || ! showIconLabels ) && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ showTools && isLargeViewport && (\n\t\t\t\t\t\t\t<ToolbarItem\n\t\t\t\t\t\t\t\tas={ ToolSelector }\n\t\t\t\t\t\t\t\tshowTooltip={ ! showIconLabels }\n\t\t\t\t\t\t\t\tvariant={\n\t\t\t\t\t\t\t\t\tshowIconLabels ? 'tertiary' : undefined\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdisabled={ disableBlockTools }\n\t\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<ToolbarItem\n\t\t\t\t\t\t\tas={ EditorHistoryUndo }\n\t\t\t\t\t\t\tshowTooltip={ ! showIconLabels }\n\t\t\t\t\t\t\tvariant={ showIconLabels ? 'tertiary' : undefined }\n\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<ToolbarItem\n\t\t\t\t\t\t\tas={ EditorHistoryRedo }\n\t\t\t\t\t\t\tshowTooltip={ ! showIconLabels }\n\t\t\t\t\t\t\tvariant={ showIconLabels ? 'tertiary' : undefined }\n\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{ ! isDistractionFree && (\n\t\t\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\t\t\tclassName=\"editor-document-tools__document-overview-toggle\"\n\t\t\t\t\t\t\t\ticon={ listView }\n\t\t\t\t\t\t\t\tdisabled={ disableBlockTools }\n\t\t\t\t\t\t\t\tisPressed={ isListViewOpen }\n\t\t\t\t\t\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\t\t\t\t\t\tlabel={ __( 'Document Overview' ) }\n\t\t\t\t\t\t\t\tonClick={ toggleListView }\n\t\t\t\t\t\t\t\tshortcut={ listViewShortcut }\n\t\t\t\t\t\t\t\tshowTooltip={ ! showIconLabels }\n\t\t\t\t\t\t\t\tvariant={\n\t\t\t\t\t\t\t\t\tshowIconLabels ? 'tertiary' : undefined\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\taria-expanded={ isListViewOpen }\n\t\t\t\t\t\t\t\tref={ listViewToggleRef }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t</NavigableToolbar>\n\t);\n}\n\nexport default DocumentTools;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,EAAE,EAAEC,EAAE,QAAQ,iBAAiB;AACxC,SAASC,gBAAgB,EAAEC,YAAY,QAAQ,yBAAyB;AACxE,SAASC,aAAa,EAAEC,WAAW,QAAQ,uBAAuB;AAClE,SAASC,QAAQ,EAAEC,IAAI,QAAQ,kBAAkB;AACjD,SAASC,WAAW,QAAQ,oBAAoB;AAChD,SAASC,KAAK,IAAIC,sBAAsB,QAAQ,+BAA+B;AAC/E,SAASD,KAAK,IAAIE,gBAAgB,QAAQ,wBAAwB;;AAElE;AACA;AACA;AACA,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,SAASH,KAAK,IAAII,WAAW,QAAQ,aAAa;AAClD,OAAOC,iBAAiB,MAAM,wBAAwB;AACtD,OAAOC,iBAAiB,MAAM,wBAAwB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA,EAAAC,IAAA,IAAAC,KAAA;AAEvD,SAASC,aAAaA,CAAE;EAAEC,SAAS;EAAEC,iBAAiB,GAAG;AAAM,CAAC,EAAG;EAClE,MAAM;IAAEC,mBAAmB;IAAEC;EAAoB,CAAC,GACjD3B,WAAW,CAAEc,WAAY,CAAC;EAC3B,MAAM;IACLc,iBAAiB;IACjBC,gBAAgB;IAChBC,cAAc;IACdC,gBAAgB;IAChBC,wBAAwB;IACxBC,iBAAiB;IACjBC,cAAc;IACdC;EACD,CAAC,GAAGpC,SAAS,CAAIqC,MAAM,IAAM;IAC5B,MAAM;MAAEC;IAAI,CAAC,GAAGD,MAAM,CAAExB,gBAAiB,CAAC;IAC1C,MAAM;MACL0B,gBAAgB;MAChBC,aAAa;MACbC,2BAA2B;MAC3BC,oBAAoB;MACpBC,gBAAgB;MAChBC;IACD,CAAC,GAAG9B,MAAM,CAAEuB,MAAM,CAAEtB,WAAY,CAAE,CAAC;IACnC,MAAM;MAAE8B;IAA0B,CAAC,GAAGR,MAAM,CAAEzB,sBAAuB,CAAC;IAEtE,OAAO;MACNkB,gBAAgB,EAAEO,MAAM,CAAEtB,WAAY,CAAC,CAACe,gBAAgB,CAAC,CAAC;MAC1DC,cAAc,EAAEQ,gBAAgB,CAAC,CAAC;MAClCP,gBAAgB,EAAEa,yBAAyB,CAC1C,8BACD,CAAC;MACDZ,wBAAwB,EAAEQ,2BAA2B,CAAC,CAAC;MACvDP,iBAAiB,EAAEQ,oBAAoB,CAAC,CAAC;MACzCP,cAAc,EAAEG,GAAG,CAAE,MAAM,EAAE,gBAAiB,CAAC;MAC/CT,iBAAiB,EAAES,GAAG,CAAE,MAAM,EAAE,iBAAkB,CAAC;MACnDQ,YAAY,EAAEN,aAAa,CAAC,CAAC,KAAK,QAAQ;MAC1CJ,SAAS,EACR,CAAC,CAAEW,MAAM,EAAEC,6BAA6B,KACtCL,gBAAgB,CAAC,CAAC,KAAK,WAAW,IACnCC,kBAAkB,CAAC,CAAC,KAAK,aAAa;IACzC,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EAEP,MAAMK,cAAc,GAAKC,KAAK,IAAM;IACnC;IACA;IACA;IACA;IACA;IACA;;IAEA,IAAKpB,gBAAgB,EAAG;MACvBoB,KAAK,CAACD,cAAc,CAAC,CAAC;IACvB;EACD,CAAC;EAED,MAAME,eAAe,GAAGpD,gBAAgB,CAAE,QAAS,CAAC;EACpD,MAAMqD,cAAc,GAAGrD,gBAAgB,CAAE,MAAO,CAAC;;EAEjD;EACA,MAAMsD,gBAAgB,GAAGnD,EAAE,CAAE,gBAAiB,CAAC;EAE/C,MAAMoD,cAAc,GAAG5C,WAAW,CACjC,MAAMkB,mBAAmB,CAAE,CAAEG,cAAe,CAAC,EAC7C,CAAEH,mBAAmB,EAAEG,cAAc,CACtC,CAAC;EAED,MAAMwB,cAAc,GAAG7C,WAAW,CACjC,MAAMiB,mBAAmB,CAAE,CAAEG,gBAAiB,CAAC,EAC/C,CAAEA,gBAAgB,EAAEH,mBAAmB,CACxC,CAAC;;EAED;EACA,MAAM6B,SAAS,GAAGrD,EAAE,CACnB,gBAAgB,EAChB,yCACD,CAAC;EACD,MAAMsD,UAAU,GAAG,CAAE3B,gBAAgB,GAAG5B,EAAE,CAAE,KAAM,CAAC,GAAGA,EAAE,CAAE,OAAQ,CAAC;EAEnE;IAAA;IACC;IACA;IACA;IACA;IACAiB,IAAA,CAACf,gBAAgB;MAChBqB,SAAS,EAAG3B,IAAI,CACf,uBAAuB,EACvB,0BAA0B,EAC1B2B,SACD,CAAG;MACH,cAAa4B,gBAAkB;MAC/BK,OAAO,EAAC,UAAU;MAAAC,QAAA,eAElBpC,KAAA;QAAKE,SAAS,EAAC,6BAA6B;QAAAkC,QAAA,GACzC,CAAE9B,iBAAiB,iBACpBV,IAAA,CAACb,aAAa;UACbsD,GAAG,EAAG3B,wBAA0B;UAChCR,SAAS,EAAC,wCAAwC;UAClDiC,OAAO,EAAC,SAAS;UACjBG,SAAS,EAAG/B,gBAAkB;UAC9BgC,WAAW,EAAGb,cAAgB;UAC9Bc,OAAO,EAAGR,cAAgB;UAC1BS,QAAQ,EAAGtC,iBAAmB;UAC9BuC,IAAI,EAAGxD,IAAM;UACbyD,KAAK,EAAG/B,cAAc,GAAGsB,UAAU,GAAGD,SAAW;UACjDW,WAAW,EAAG,CAAEhC,cAAgB;UAChC,iBAAgBL;QAAkB,CAClC,CACD,EACC,CAAEsB,cAAc,IAAI,CAAEjB,cAAc,kBACrCZ,KAAA,CAAAF,SAAA;UAAAsC,QAAA,GACGvB,SAAS,IAAIe,eAAe,iBAC7BhC,IAAA,CAACZ,WAAW;YACX6D,EAAE,EAAG/D,YAAc;YACnB8D,WAAW,EAAG,CAAEhC,cAAgB;YAChCuB,OAAO,EACNvB,cAAc,GAAG,UAAU,GAAGkC,SAC9B;YACDL,QAAQ,EAAGtC,iBAAmB;YAC9B4C,IAAI,EAAC;UAAS,CACd,CACD,eACDnD,IAAA,CAACZ,WAAW;YACX6D,EAAE,EAAGnD,iBAAmB;YACxBkD,WAAW,EAAG,CAAEhC,cAAgB;YAChCuB,OAAO,EAAGvB,cAAc,GAAG,UAAU,GAAGkC,SAAW;YACnDC,IAAI,EAAC;UAAS,CACd,CAAC,eACFnD,IAAA,CAACZ,WAAW;YACX6D,EAAE,EAAGpD,iBAAmB;YACxBmD,WAAW,EAAG,CAAEhC,cAAgB;YAChCuB,OAAO,EAAGvB,cAAc,GAAG,UAAU,GAAGkC,SAAW;YACnDC,IAAI,EAAC;UAAS,CACd,CAAC,EACA,CAAEzC,iBAAiB,iBACpBV,IAAA,CAACb,aAAa;YACbmB,SAAS,EAAC,iDAAiD;YAC3DwC,IAAI,EAAGzD,QAAU;YACjBwD,QAAQ,EAAGtC,iBAAmB;YAC9BmC,SAAS,EAAG9B;YACZ;YACAmC,KAAK,EAAGhE,EAAE,CAAE,mBAAoB,CAAG;YACnC6D,OAAO,EAAGT,cAAgB;YAC1BiB,QAAQ,EAAGvC,gBAAkB;YAC7BmC,WAAW,EAAG,CAAEhC,cAAgB;YAChCuB,OAAO,EACNvB,cAAc,GAAG,UAAU,GAAGkC,SAC9B;YACD,iBAAgBtC,cAAgB;YAChC6B,GAAG,EAAG1B;UAAmB,CACzB,CACD;QAAA,CACA,CACF;MAAA,CACG;IAAC,CACW;EAAC;AAErB;AAEA,eAAeV,aAAa","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/document-tools/index.js"],
4
+ "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useViewportMatch } from '@wordpress/compose';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __, _x } from '@wordpress/i18n';\nimport { NavigableToolbar } from '@wordpress/block-editor';\nimport { ToolbarButton, ToolbarItem } from '@wordpress/components';\nimport { listView, plus } from '@wordpress/icons';\nimport { useCallback } from '@wordpress/element';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as editorStore } from '../../store';\nimport EditorHistoryRedo from '../editor-history/redo';\nimport EditorHistoryUndo from '../editor-history/undo';\n\nfunction DocumentTools( { className, disableBlockTools = false } ) {\n\tconst { setIsInserterOpened, setIsListViewOpened } =\n\t\tuseDispatch( editorStore );\n\tconst {\n\t\tisDistractionFree,\n\t\tisInserterOpened,\n\t\tisListViewOpen,\n\t\tlistViewShortcut,\n\t\tinserterSidebarToggleRef,\n\t\tlistViewToggleRef,\n\t\tshowIconLabels,\n\t} = useSelect( ( select ) => {\n\t\tconst { get } = select( preferencesStore );\n\t\tconst {\n\t\t\tisListViewOpened,\n\t\t\tgetEditorMode,\n\t\t\tgetInserterSidebarToggleRef,\n\t\t\tgetListViewToggleRef,\n\t\t} = unlock( select( editorStore ) );\n\t\tconst { getShortcutRepresentation } = select( keyboardShortcutsStore );\n\n\t\treturn {\n\t\t\tisInserterOpened: select( editorStore ).isInserterOpened(),\n\t\t\tisListViewOpen: isListViewOpened(),\n\t\t\tlistViewShortcut: getShortcutRepresentation(\n\t\t\t\t'core/editor/toggle-list-view'\n\t\t\t),\n\t\t\tinserterSidebarToggleRef: getInserterSidebarToggleRef(),\n\t\t\tlistViewToggleRef: getListViewToggleRef(),\n\t\t\tshowIconLabels: get( 'core', 'showIconLabels' ),\n\t\t\tisDistractionFree: get( 'core', 'distractionFree' ),\n\t\t\tisVisualMode: getEditorMode() === 'visual',\n\t\t};\n\t}, [] );\n\n\tconst preventDefault = ( event ) => {\n\t\t// Because the inserter behaves like a dialog,\n\t\t// if the inserter is opened already then when we click on the toggle button\n\t\t// then the initial click event will close the inserter and then be propagated\n\t\t// to the inserter toggle and it will open it again.\n\t\t// To prevent this we need to stop the propagation of the event.\n\t\t// This won't be necessary when the inserter no longer behaves like a dialog.\n\n\t\tif ( isInserterOpened ) {\n\t\t\tevent.preventDefault();\n\t\t}\n\t};\n\n\tconst isWideViewport = useViewportMatch( 'wide' );\n\n\t/* translators: accessibility text for the editor toolbar */\n\tconst toolbarAriaLabel = __( 'Document tools' );\n\n\tconst toggleListView = useCallback(\n\t\t() => setIsListViewOpened( ! isListViewOpen ),\n\t\t[ setIsListViewOpened, isListViewOpen ]\n\t);\n\n\tconst toggleInserter = useCallback(\n\t\t() => setIsInserterOpened( ! isInserterOpened ),\n\t\t[ isInserterOpened, setIsInserterOpened ]\n\t);\n\n\t/* translators: button label text should, if possible, be under 16 characters. */\n\tconst longLabel = _x(\n\t\t'Block Inserter',\n\t\t'Generic label for block inserter button'\n\t);\n\tconst shortLabel = ! isInserterOpened ? __( 'Add' ) : __( 'Close' );\n\n\treturn (\n\t\t// Some plugins expect and use the `edit-post-header-toolbar` CSS class to\n\t\t// find the toolbar and inject UI elements into it. This is not officially\n\t\t// supported, but we're keeping it in the list of class names for backwards\n\t\t// compatibility.\n\t\t<NavigableToolbar\n\t\t\tclassName={ clsx(\n\t\t\t\t'editor-document-tools',\n\t\t\t\t'edit-post-header-toolbar',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\taria-label={ toolbarAriaLabel }\n\t\t\tvariant=\"unstyled\"\n\t\t>\n\t\t\t<div className=\"editor-document-tools__left\">\n\t\t\t\t{ ! isDistractionFree && (\n\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\tref={ inserterSidebarToggleRef }\n\t\t\t\t\t\tclassName=\"editor-document-tools__inserter-toggle\"\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\tisPressed={ isInserterOpened }\n\t\t\t\t\t\tonMouseDown={ preventDefault }\n\t\t\t\t\t\tonClick={ toggleInserter }\n\t\t\t\t\t\tdisabled={ disableBlockTools }\n\t\t\t\t\t\ticon={ plus }\n\t\t\t\t\t\tlabel={ showIconLabels ? shortLabel : longLabel }\n\t\t\t\t\t\tshowTooltip={ ! showIconLabels }\n\t\t\t\t\t\taria-expanded={ isInserterOpened }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ ( isWideViewport || ! showIconLabels ) && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<ToolbarItem\n\t\t\t\t\t\t\tas={ EditorHistoryUndo }\n\t\t\t\t\t\t\tshowTooltip={ ! showIconLabels }\n\t\t\t\t\t\t\tvariant={ showIconLabels ? 'tertiary' : undefined }\n\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<ToolbarItem\n\t\t\t\t\t\t\tas={ EditorHistoryRedo }\n\t\t\t\t\t\t\tshowTooltip={ ! showIconLabels }\n\t\t\t\t\t\t\tvariant={ showIconLabels ? 'tertiary' : undefined }\n\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{ ! isDistractionFree && (\n\t\t\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\t\t\tclassName=\"editor-document-tools__document-overview-toggle\"\n\t\t\t\t\t\t\t\ticon={ listView }\n\t\t\t\t\t\t\t\tdisabled={ disableBlockTools }\n\t\t\t\t\t\t\t\tisPressed={ isListViewOpen }\n\t\t\t\t\t\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\t\t\t\t\t\tlabel={ __( 'Document Overview' ) }\n\t\t\t\t\t\t\t\tonClick={ toggleListView }\n\t\t\t\t\t\t\t\tshortcut={ listViewShortcut }\n\t\t\t\t\t\t\t\tshowTooltip={ ! showIconLabels }\n\t\t\t\t\t\t\t\tvariant={\n\t\t\t\t\t\t\t\t\tshowIconLabels ? 'tertiary' : undefined\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\taria-expanded={ isListViewOpen }\n\t\t\t\t\t\t\t\tref={ listViewToggleRef }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t</NavigableToolbar>\n\t);\n}\n\nexport default DocumentTools;\n"],
5
+ "mappings": "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",
6
+ "names": []
7
+ }
@@ -1,19 +1,12 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
- import { useSelect } from '@wordpress/data';
5
- import { store as coreStore } from '@wordpress/core-data';
6
- import { Notice } from '@wordpress/components';
7
- import { __ } from '@wordpress/i18n';
8
-
9
- /**
10
- * Internal dependencies
11
- */
12
- import { TEMPLATE_POST_TYPE } from '../../store/constants';
13
- import EditorInterface from '../editor-interface';
14
- import { ExperimentalEditorProvider } from '../provider';
15
- import Sidebar from '../sidebar';
16
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
1
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
+ import { useSelect } from "@wordpress/data";
3
+ import { store as coreStore } from "@wordpress/core-data";
4
+ import { Notice } from "@wordpress/components";
5
+ import { __ } from "@wordpress/i18n";
6
+ import { TEMPLATE_POST_TYPE } from "../../store/constants";
7
+ import EditorInterface from "../editor-interface";
8
+ import { ExperimentalEditorProvider } from "../provider";
9
+ import Sidebar from "../sidebar";
17
10
  function Editor({
18
11
  postType,
19
12
  postId,
@@ -29,45 +22,66 @@ function Editor({
29
22
  extraSidebarPanels,
30
23
  ...props
31
24
  }) {
32
- const {
33
- post,
34
- template,
35
- hasLoadedPost,
36
- error
37
- } = useSelect(select => {
38
- const {
39
- getEntityRecord,
40
- getResolutionError,
41
- hasFinishedResolution
42
- } = select(coreStore);
43
- const postArgs = ['postType', postType, postId];
44
- return {
45
- post: getEntityRecord(...postArgs),
46
- template: templateId ? getEntityRecord('postType', TEMPLATE_POST_TYPE, templateId) : undefined,
47
- hasLoadedPost: hasFinishedResolution('getEntityRecord', postArgs),
48
- error: getResolutionError('getEntityRecord', postArgs)?.message
49
- };
50
- }, [postType, postId, templateId]);
51
- return /*#__PURE__*/_jsxs(_Fragment, {
52
- children: [hasLoadedPost && !post && /*#__PURE__*/_jsx(Notice, {
53
- status: !!error ? 'error' : 'warning',
54
- isDismissible: false,
55
- children: !error ? __("You attempted to edit an item that doesn't exist. Perhaps it was deleted?") : error
56
- }), !!post && /*#__PURE__*/_jsxs(ExperimentalEditorProvider, {
57
- post: post,
58
- __unstableTemplate: template,
59
- settings: settings,
60
- initialEdits: initialEdits,
61
- useSubRegistry: false,
62
- children: [/*#__PURE__*/_jsx(EditorInterface, {
63
- ...props,
64
- children: extraContent
65
- }), children, /*#__PURE__*/_jsx(Sidebar, {
66
- onActionPerformed: onActionPerformed,
67
- extraPanels: extraSidebarPanels
68
- })]
69
- })]
70
- });
25
+ const { post, template, hasLoadedPost, error } = useSelect(
26
+ (select) => {
27
+ const {
28
+ getEntityRecord,
29
+ getResolutionError,
30
+ hasFinishedResolution
31
+ } = select(coreStore);
32
+ const postArgs = ["postType", postType, postId];
33
+ return {
34
+ post: getEntityRecord(...postArgs),
35
+ template: templateId ? getEntityRecord(
36
+ "postType",
37
+ TEMPLATE_POST_TYPE,
38
+ templateId
39
+ ) : void 0,
40
+ hasLoadedPost: hasFinishedResolution(
41
+ "getEntityRecord",
42
+ postArgs
43
+ ),
44
+ error: getResolutionError("getEntityRecord", postArgs)?.message
45
+ };
46
+ },
47
+ [postType, postId, templateId]
48
+ );
49
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
50
+ hasLoadedPost && !post && /* @__PURE__ */ jsx(
51
+ Notice,
52
+ {
53
+ status: !!error ? "error" : "warning",
54
+ isDismissible: false,
55
+ children: !error ? __(
56
+ "You attempted to edit an item that doesn't exist. Perhaps it was deleted?"
57
+ ) : error
58
+ }
59
+ ),
60
+ !!post && /* @__PURE__ */ jsxs(
61
+ ExperimentalEditorProvider,
62
+ {
63
+ post,
64
+ __unstableTemplate: template,
65
+ settings,
66
+ initialEdits,
67
+ useSubRegistry: false,
68
+ children: [
69
+ /* @__PURE__ */ jsx(EditorInterface, { ...props, children: extraContent }),
70
+ children,
71
+ /* @__PURE__ */ jsx(
72
+ Sidebar,
73
+ {
74
+ onActionPerformed,
75
+ extraPanels: extraSidebarPanels
76
+ }
77
+ )
78
+ ]
79
+ }
80
+ )
81
+ ] });
71
82
  }
72
- export default Editor;
73
- //# sourceMappingURL=index.js.map
83
+ var editor_default = Editor;
84
+ export {
85
+ editor_default as default
86
+ };
87
+ //# sourceMappingURL=index.js.map
@@ -1 +1,7 @@
1
- {"version":3,"names":["useSelect","store","coreStore","Notice","__","TEMPLATE_POST_TYPE","EditorInterface","ExperimentalEditorProvider","Sidebar","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","Editor","postType","postId","templateId","settings","children","initialEdits","onActionPerformed","extraContent","extraSidebarPanels","props","post","template","hasLoadedPost","error","select","getEntityRecord","getResolutionError","hasFinishedResolution","postArgs","undefined","message","status","isDismissible","__unstableTemplate","useSubRegistry","extraPanels"],"sources":["@wordpress/editor/src/components/editor/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { Notice } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { TEMPLATE_POST_TYPE } from '../../store/constants';\nimport EditorInterface from '../editor-interface';\nimport { ExperimentalEditorProvider } from '../provider';\nimport Sidebar from '../sidebar';\n\nfunction Editor( {\n\tpostType,\n\tpostId,\n\ttemplateId,\n\tsettings,\n\tchildren,\n\tinitialEdits,\n\n\t// This could be part of the settings.\n\tonActionPerformed,\n\n\t// The following abstractions are not ideal but necessary\n\t// to account for site editor and post editor differences for now.\n\textraContent,\n\textraSidebarPanels,\n\t...props\n} ) {\n\tconst { post, template, hasLoadedPost, error } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetEntityRecord,\n\t\t\t\tgetResolutionError,\n\t\t\t\thasFinishedResolution,\n\t\t\t} = select( coreStore );\n\n\t\t\tconst postArgs = [ 'postType', postType, postId ];\n\t\t\treturn {\n\t\t\t\tpost: getEntityRecord( ...postArgs ),\n\t\t\t\ttemplate: templateId\n\t\t\t\t\t? getEntityRecord(\n\t\t\t\t\t\t\t'postType',\n\t\t\t\t\t\t\tTEMPLATE_POST_TYPE,\n\t\t\t\t\t\t\ttemplateId\n\t\t\t\t\t )\n\t\t\t\t\t: undefined,\n\t\t\t\thasLoadedPost: hasFinishedResolution(\n\t\t\t\t\t'getEntityRecord',\n\t\t\t\t\tpostArgs\n\t\t\t\t),\n\t\t\t\terror: getResolutionError( 'getEntityRecord', postArgs )\n\t\t\t\t\t?.message,\n\t\t\t};\n\t\t},\n\t\t[ postType, postId, templateId ]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t{ hasLoadedPost && ! post && (\n\t\t\t\t<Notice\n\t\t\t\t\tstatus={ !! error ? 'error' : 'warning' }\n\t\t\t\t\tisDismissible={ false }\n\t\t\t\t>\n\t\t\t\t\t{ ! error\n\t\t\t\t\t\t? __(\n\t\t\t\t\t\t\t\t\"You attempted to edit an item that doesn't exist. Perhaps it was deleted?\"\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: error }\n\t\t\t\t</Notice>\n\t\t\t) }\n\t\t\t{ !! post && (\n\t\t\t\t<ExperimentalEditorProvider\n\t\t\t\t\tpost={ post }\n\t\t\t\t\t__unstableTemplate={ template }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tinitialEdits={ initialEdits }\n\t\t\t\t\tuseSubRegistry={ false }\n\t\t\t\t>\n\t\t\t\t\t<EditorInterface { ...props }>\n\t\t\t\t\t\t{ extraContent }\n\t\t\t\t\t</EditorInterface>\n\t\t\t\t\t{ children }\n\t\t\t\t\t<Sidebar\n\t\t\t\t\t\tonActionPerformed={ onActionPerformed }\n\t\t\t\t\t\textraPanels={ extraSidebarPanels }\n\t\t\t\t\t/>\n\t\t\t\t</ExperimentalEditorProvider>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default Editor;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;AACzD,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,EAAE,QAAQ,iBAAiB;;AAEpC;AACA;AACA;AACA,SAASC,kBAAkB,QAAQ,uBAAuB;AAC1D,OAAOC,eAAe,MAAM,qBAAqB;AACjD,SAASC,0BAA0B,QAAQ,aAAa;AACxD,OAAOC,OAAO,MAAM,YAAY;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA,EAAAC,QAAA,IAAAC,SAAA;AAEjC,SAASC,MAAMA,CAAE;EAChBC,QAAQ;EACRC,MAAM;EACNC,UAAU;EACVC,QAAQ;EACRC,QAAQ;EACRC,YAAY;EAEZ;EACAC,iBAAiB;EAEjB;EACA;EACAC,YAAY;EACZC,kBAAkB;EAClB,GAAGC;AACJ,CAAC,EAAG;EACH,MAAM;IAAEC,IAAI;IAAEC,QAAQ;IAAEC,aAAa;IAAEC;EAAM,CAAC,GAAG7B,SAAS,CACvD8B,MAAM,IAAM;IACb,MAAM;MACLC,eAAe;MACfC,kBAAkB;MAClBC;IACD,CAAC,GAAGH,MAAM,CAAE5B,SAAU,CAAC;IAEvB,MAAMgC,QAAQ,GAAG,CAAE,UAAU,EAAElB,QAAQ,EAAEC,MAAM,CAAE;IACjD,OAAO;MACNS,IAAI,EAAEK,eAAe,CAAE,GAAGG,QAAS,CAAC;MACpCP,QAAQ,EAAET,UAAU,GACjBa,eAAe,CACf,UAAU,EACV1B,kBAAkB,EAClBa,UACA,CAAC,GACDiB,SAAS;MACZP,aAAa,EAAEK,qBAAqB,CACnC,iBAAiB,EACjBC,QACD,CAAC;MACDL,KAAK,EAAEG,kBAAkB,CAAE,iBAAiB,EAAEE,QAAS,CAAC,EACrDE;IACJ,CAAC;EACF,CAAC,EACD,CAAEpB,QAAQ,EAAEC,MAAM,EAAEC,UAAU,CAC/B,CAAC;EAED,oBACCN,KAAA,CAAAE,SAAA;IAAAM,QAAA,GACGQ,aAAa,IAAI,CAAEF,IAAI,iBACxBhB,IAAA,CAACP,MAAM;MACNkC,MAAM,EAAG,CAAC,CAAER,KAAK,GAAG,OAAO,GAAG,SAAW;MACzCS,aAAa,EAAG,KAAO;MAAAlB,QAAA,EAErB,CAAES,KAAK,GACNzB,EAAE,CACF,2EACA,CAAC,GACDyB;IAAK,CACD,CACR,EACC,CAAC,CAAEH,IAAI,iBACRd,KAAA,CAACL,0BAA0B;MAC1BmB,IAAI,EAAGA,IAAM;MACba,kBAAkB,EAAGZ,QAAU;MAC/BR,QAAQ,EAAGA,QAAU;MACrBE,YAAY,EAAGA,YAAc;MAC7BmB,cAAc,EAAG,KAAO;MAAApB,QAAA,gBAExBV,IAAA,CAACJ,eAAe;QAAA,GAAMmB,KAAK;QAAAL,QAAA,EACxBG;MAAY,CACE,CAAC,EAChBH,QAAQ,eACVV,IAAA,CAACF,OAAO;QACPc,iBAAiB,EAAGA,iBAAmB;QACvCmB,WAAW,EAAGjB;MAAoB,CAClC,CAAC;IAAA,CACyB,CAC5B;EAAA,CACA,CAAC;AAEL;AAEA,eAAeT,MAAM","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/editor/index.js"],
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { Notice } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { TEMPLATE_POST_TYPE } from '../../store/constants';\nimport EditorInterface from '../editor-interface';\nimport { ExperimentalEditorProvider } from '../provider';\nimport Sidebar from '../sidebar';\n\nfunction Editor( {\n\tpostType,\n\tpostId,\n\ttemplateId,\n\tsettings,\n\tchildren,\n\tinitialEdits,\n\n\t// This could be part of the settings.\n\tonActionPerformed,\n\n\t// The following abstractions are not ideal but necessary\n\t// to account for site editor and post editor differences for now.\n\textraContent,\n\textraSidebarPanels,\n\t...props\n} ) {\n\tconst { post, template, hasLoadedPost, error } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetEntityRecord,\n\t\t\t\tgetResolutionError,\n\t\t\t\thasFinishedResolution,\n\t\t\t} = select( coreStore );\n\n\t\t\tconst postArgs = [ 'postType', postType, postId ];\n\t\t\treturn {\n\t\t\t\tpost: getEntityRecord( ...postArgs ),\n\t\t\t\ttemplate: templateId\n\t\t\t\t\t? getEntityRecord(\n\t\t\t\t\t\t\t'postType',\n\t\t\t\t\t\t\tTEMPLATE_POST_TYPE,\n\t\t\t\t\t\t\ttemplateId\n\t\t\t\t\t )\n\t\t\t\t\t: undefined,\n\t\t\t\thasLoadedPost: hasFinishedResolution(\n\t\t\t\t\t'getEntityRecord',\n\t\t\t\t\tpostArgs\n\t\t\t\t),\n\t\t\t\terror: getResolutionError( 'getEntityRecord', postArgs )\n\t\t\t\t\t?.message,\n\t\t\t};\n\t\t},\n\t\t[ postType, postId, templateId ]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t{ hasLoadedPost && ! post && (\n\t\t\t\t<Notice\n\t\t\t\t\tstatus={ !! error ? 'error' : 'warning' }\n\t\t\t\t\tisDismissible={ false }\n\t\t\t\t>\n\t\t\t\t\t{ ! error\n\t\t\t\t\t\t? __(\n\t\t\t\t\t\t\t\t\"You attempted to edit an item that doesn't exist. Perhaps it was deleted?\"\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: error }\n\t\t\t\t</Notice>\n\t\t\t) }\n\t\t\t{ !! post && (\n\t\t\t\t<ExperimentalEditorProvider\n\t\t\t\t\tpost={ post }\n\t\t\t\t\t__unstableTemplate={ template }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tinitialEdits={ initialEdits }\n\t\t\t\t\tuseSubRegistry={ false }\n\t\t\t\t>\n\t\t\t\t\t<EditorInterface { ...props }>\n\t\t\t\t\t\t{ extraContent }\n\t\t\t\t\t</EditorInterface>\n\t\t\t\t\t{ children }\n\t\t\t\t\t<Sidebar\n\t\t\t\t\t\tonActionPerformed={ onActionPerformed }\n\t\t\t\t\t\textraPanels={ extraSidebarPanels }\n\t\t\t\t\t/>\n\t\t\t\t</ExperimentalEditorProvider>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default Editor;\n"],
5
+ "mappings": "AA+DE,mBAEE,KAYA,YAdF;AA5DF,SAAS,iBAAiB;AAC1B,SAAS,SAAS,iBAAiB;AACnC,SAAS,cAAc;AACvB,SAAS,UAAU;AAKnB,SAAS,0BAA0B;AACnC,OAAO,qBAAqB;AAC5B,SAAS,kCAAkC;AAC3C,OAAO,aAAa;AAEpB,SAAS,OAAQ;AAAA,EAChB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAGA;AAAA;AAAA;AAAA,EAIA;AAAA,EACA;AAAA,EACA,GAAG;AACJ,GAAI;AACH,QAAM,EAAE,MAAM,UAAU,eAAe,MAAM,IAAI;AAAA,IAChD,CAAE,WAAY;AACb,YAAM;AAAA,QACL;AAAA,QACA;AAAA,QACA;AAAA,MACD,IAAI,OAAQ,SAAU;AAEtB,YAAM,WAAW,CAAE,YAAY,UAAU,MAAO;AAChD,aAAO;AAAA,QACN,MAAM,gBAAiB,GAAG,QAAS;AAAA,QACnC,UAAU,aACP;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QACA,IACA;AAAA,QACH,eAAe;AAAA,UACd;AAAA,UACA;AAAA,QACD;AAAA,QACA,OAAO,mBAAoB,mBAAmB,QAAS,GACpD;AAAA,MACJ;AAAA,IACD;AAAA,IACA,CAAE,UAAU,QAAQ,UAAW;AAAA,EAChC;AAEA,SACC,iCACG;AAAA,qBAAiB,CAAE,QACpB;AAAA,MAAC;AAAA;AAAA,QACA,QAAS,CAAC,CAAE,QAAQ,UAAU;AAAA,QAC9B,eAAgB;AAAA,QAEd,WAAE,QACD;AAAA,UACA;AAAA,QACA,IACA;AAAA;AAAA,IACJ;AAAA,IAEC,CAAC,CAAE,QACJ;AAAA,MAAC;AAAA;AAAA,QACA;AAAA,QACA,oBAAqB;AAAA,QACrB;AAAA,QACA;AAAA,QACA,gBAAiB;AAAA,QAEjB;AAAA,8BAAC,mBAAkB,GAAG,OACnB,wBACH;AAAA,UACE;AAAA,UACF;AAAA,YAAC;AAAA;AAAA,cACA;AAAA,cACA,aAAc;AAAA;AAAA,UACf;AAAA;AAAA;AAAA,IACD;AAAA,KAEF;AAEF;AAEA,IAAO,iBAAQ;",
6
+ "names": []
7
+ }
@@ -1,51 +1,35 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
- import { __, isRTL } from '@wordpress/i18n';
5
- import { Button } from '@wordpress/components';
6
- import { useSelect, useDispatch } from '@wordpress/data';
7
- import { displayShortcut, isAppleOS } from '@wordpress/keycodes';
8
- import { redo as redoIcon, undo as undoIcon } from '@wordpress/icons';
9
- import { forwardRef } from '@wordpress/element';
10
-
11
- /**
12
- * Internal dependencies
13
- */
14
- import { store as editorStore } from '../../store';
15
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { __, isRTL } from "@wordpress/i18n";
3
+ import { Button } from "@wordpress/components";
4
+ import { useSelect, useDispatch } from "@wordpress/data";
5
+ import { displayShortcut, isAppleOS } from "@wordpress/keycodes";
6
+ import { redo as redoIcon, undo as undoIcon } from "@wordpress/icons";
7
+ import { forwardRef } from "@wordpress/element";
8
+ import { store as editorStore } from "../../store";
16
9
  function EditorHistoryRedo(props, ref) {
17
- const shortcut = isAppleOS() ? displayShortcut.primaryShift('z') : displayShortcut.primary('y');
18
- const hasRedo = useSelect(select => select(editorStore).hasEditorRedo(), []);
19
- const {
20
- redo
21
- } = useDispatch(editorStore);
22
- return /*#__PURE__*/_jsx(Button, {
23
- __next40pxDefaultSize: true,
24
- ...props,
25
- ref: ref,
26
- icon: !isRTL() ? redoIcon : undoIcon
27
- /* translators: button label text should, if possible, be under 16 characters. */,
28
- label: __('Redo'),
29
- shortcut: shortcut
30
- // If there are no redo levels we don't want to actually disable this
31
- // button, because it will remove focus for keyboard users.
32
- // See: https://github.com/WordPress/gutenberg/issues/3486
33
- ,
34
- "aria-disabled": !hasRedo,
35
- onClick: hasRedo ? redo : undefined,
36
- className: "editor-history__redo"
37
- });
10
+ const shortcut = isAppleOS() ? displayShortcut.primaryShift("z") : displayShortcut.primary("y");
11
+ const hasRedo = useSelect(
12
+ (select) => select(editorStore).hasEditorRedo(),
13
+ []
14
+ );
15
+ const { redo } = useDispatch(editorStore);
16
+ return /* @__PURE__ */ jsx(
17
+ Button,
18
+ {
19
+ __next40pxDefaultSize: true,
20
+ ...props,
21
+ ref,
22
+ icon: !isRTL() ? redoIcon : undoIcon,
23
+ label: __("Redo"),
24
+ shortcut,
25
+ "aria-disabled": !hasRedo,
26
+ onClick: hasRedo ? redo : void 0,
27
+ className: "editor-history__redo"
28
+ }
29
+ );
38
30
  }
39
-
40
- /** @typedef {import('react').Ref<HTMLElement>} Ref */
41
-
42
- /**
43
- * Renders the redo button for the editor history.
44
- *
45
- * @param {Object} props - Props.
46
- * @param {Ref} ref - Forwarded ref.
47
- *
48
- * @return {React.ReactNode} The rendered component.
49
- */
50
- export default forwardRef(EditorHistoryRedo);
51
- //# sourceMappingURL=redo.js.map
31
+ var redo_default = forwardRef(EditorHistoryRedo);
32
+ export {
33
+ redo_default as default
34
+ };
35
+ //# sourceMappingURL=redo.js.map
@@ -1 +1,7 @@
1
- {"version":3,"names":["__","isRTL","Button","useSelect","useDispatch","displayShortcut","isAppleOS","redo","redoIcon","undo","undoIcon","forwardRef","store","editorStore","jsx","_jsx","EditorHistoryRedo","props","ref","shortcut","primaryShift","primary","hasRedo","select","hasEditorRedo","__next40pxDefaultSize","icon","label","onClick","undefined","className"],"sources":["@wordpress/editor/src/components/editor-history/redo.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, isRTL } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { displayShortcut, isAppleOS } from '@wordpress/keycodes';\nimport { redo as redoIcon, undo as undoIcon } from '@wordpress/icons';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nfunction EditorHistoryRedo( props, ref ) {\n\tconst shortcut = isAppleOS()\n\t\t? displayShortcut.primaryShift( 'z' )\n\t\t: displayShortcut.primary( 'y' );\n\n\tconst hasRedo = useSelect(\n\t\t( select ) => select( editorStore ).hasEditorRedo(),\n\t\t[]\n\t);\n\tconst { redo } = useDispatch( editorStore );\n\treturn (\n\t\t<Button\n\t\t\t__next40pxDefaultSize\n\t\t\t{ ...props }\n\t\t\tref={ ref }\n\t\t\ticon={ ! isRTL() ? redoIcon : undoIcon }\n\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\tlabel={ __( 'Redo' ) }\n\t\t\tshortcut={ shortcut }\n\t\t\t// If there are no redo levels we don't want to actually disable this\n\t\t\t// button, because it will remove focus for keyboard users.\n\t\t\t// See: https://github.com/WordPress/gutenberg/issues/3486\n\t\t\taria-disabled={ ! hasRedo }\n\t\t\tonClick={ hasRedo ? redo : undefined }\n\t\t\tclassName=\"editor-history__redo\"\n\t\t/>\n\t);\n}\n\n/** @typedef {import('react').Ref<HTMLElement>} Ref */\n\n/**\n * Renders the redo button for the editor history.\n *\n * @param {Object} props - Props.\n * @param {Ref} ref - Forwarded ref.\n *\n * @return {React.ReactNode} The rendered component.\n */\nexport default forwardRef( EditorHistoryRedo );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,EAAEC,KAAK,QAAQ,iBAAiB;AAC3C,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,eAAe,EAAEC,SAAS,QAAQ,qBAAqB;AAChE,SAASC,IAAI,IAAIC,QAAQ,EAAEC,IAAI,IAAIC,QAAQ,QAAQ,kBAAkB;AACrE,SAASC,UAAU,QAAQ,oBAAoB;;AAE/C;AACA;AACA;AACA,SAASC,KAAK,IAAIC,WAAW,QAAQ,aAAa;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEnD,SAASC,iBAAiBA,CAAEC,KAAK,EAAEC,GAAG,EAAG;EACxC,MAAMC,QAAQ,GAAGb,SAAS,CAAC,CAAC,GACzBD,eAAe,CAACe,YAAY,CAAE,GAAI,CAAC,GACnCf,eAAe,CAACgB,OAAO,CAAE,GAAI,CAAC;EAEjC,MAAMC,OAAO,GAAGnB,SAAS,CACtBoB,MAAM,IAAMA,MAAM,CAAEV,WAAY,CAAC,CAACW,aAAa,CAAC,CAAC,EACnD,EACD,CAAC;EACD,MAAM;IAAEjB;EAAK,CAAC,GAAGH,WAAW,CAAES,WAAY,CAAC;EAC3C,oBACCE,IAAA,CAACb,MAAM;IACNuB,qBAAqB;IAAA,GAChBR,KAAK;IACVC,GAAG,EAAGA,GAAK;IACXQ,IAAI,EAAG,CAAEzB,KAAK,CAAC,CAAC,GAAGO,QAAQ,GAAGE;IAC9B;IACAiB,KAAK,EAAG3B,EAAE,CAAE,MAAO,CAAG;IACtBmB,QAAQ,EAAGA;IACX;IACA;IACA;IAAA;IACA,iBAAgB,CAAEG,OAAS;IAC3BM,OAAO,EAAGN,OAAO,GAAGf,IAAI,GAAGsB,SAAW;IACtCC,SAAS,EAAC;EAAsB,CAChC,CAAC;AAEJ;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAenB,UAAU,CAAEK,iBAAkB,CAAC","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/editor-history/redo.js"],
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __, isRTL } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { displayShortcut, isAppleOS } from '@wordpress/keycodes';\nimport { redo as redoIcon, undo as undoIcon } from '@wordpress/icons';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nfunction EditorHistoryRedo( props, ref ) {\n\tconst shortcut = isAppleOS()\n\t\t? displayShortcut.primaryShift( 'z' )\n\t\t: displayShortcut.primary( 'y' );\n\n\tconst hasRedo = useSelect(\n\t\t( select ) => select( editorStore ).hasEditorRedo(),\n\t\t[]\n\t);\n\tconst { redo } = useDispatch( editorStore );\n\treturn (\n\t\t<Button\n\t\t\t__next40pxDefaultSize\n\t\t\t{ ...props }\n\t\t\tref={ ref }\n\t\t\ticon={ ! isRTL() ? redoIcon : undoIcon }\n\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\tlabel={ __( 'Redo' ) }\n\t\t\tshortcut={ shortcut }\n\t\t\t// If there are no redo levels we don't want to actually disable this\n\t\t\t// button, because it will remove focus for keyboard users.\n\t\t\t// See: https://github.com/WordPress/gutenberg/issues/3486\n\t\t\taria-disabled={ ! hasRedo }\n\t\t\tonClick={ hasRedo ? redo : undefined }\n\t\t\tclassName=\"editor-history__redo\"\n\t\t/>\n\t);\n}\n\n/** @typedef {import('react').Ref<HTMLElement>} Ref */\n\n/**\n * Renders the redo button for the editor history.\n *\n * @param {Object} props - Props.\n * @param {Ref} ref - Forwarded ref.\n *\n * @return {React.ReactNode} The rendered component.\n */\nexport default forwardRef( EditorHistoryRedo );\n"],
5
+ "mappings": "AA0BE;AAvBF,SAAS,IAAI,aAAa;AAC1B,SAAS,cAAc;AACvB,SAAS,WAAW,mBAAmB;AACvC,SAAS,iBAAiB,iBAAiB;AAC3C,SAAS,QAAQ,UAAU,QAAQ,gBAAgB;AACnD,SAAS,kBAAkB;AAK3B,SAAS,SAAS,mBAAmB;AAErC,SAAS,kBAAmB,OAAO,KAAM;AACxC,QAAM,WAAW,UAAU,IACxB,gBAAgB,aAAc,GAAI,IAClC,gBAAgB,QAAS,GAAI;AAEhC,QAAM,UAAU;AAAA,IACf,CAAE,WAAY,OAAQ,WAAY,EAAE,cAAc;AAAA,IAClD,CAAC;AAAA,EACF;AACA,QAAM,EAAE,KAAK,IAAI,YAAa,WAAY;AAC1C,SACC;AAAA,IAAC;AAAA;AAAA,MACA,uBAAqB;AAAA,MACnB,GAAG;AAAA,MACL;AAAA,MACA,MAAO,CAAE,MAAM,IAAI,WAAW;AAAA,MAE9B,OAAQ,GAAI,MAAO;AAAA,MACnB;AAAA,MAIA,iBAAgB,CAAE;AAAA,MAClB,SAAU,UAAU,OAAO;AAAA,MAC3B,WAAU;AAAA;AAAA,EACX;AAEF;AAYA,IAAO,eAAQ,WAAY,iBAAkB;",
6
+ "names": []
7
+ }