@wordpress/edit-post 7.11.0 → 7.12.1

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 (328) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/components/block-manager/category.js +14 -22
  3. package/build/components/block-manager/category.js.map +1 -1
  4. package/build/components/block-manager/checklist.js +6 -13
  5. package/build/components/block-manager/checklist.js.map +1 -1
  6. package/build/components/block-manager/index.js +29 -17
  7. package/build/components/block-manager/index.js.map +1 -1
  8. package/build/components/block-settings-menu/plugin-block-settings-menu-item.js +21 -26
  9. package/build/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -1
  10. package/build/components/device-preview/index.js +3 -5
  11. package/build/components/device-preview/index.js.map +1 -1
  12. package/build/components/editor-initialization/index.js +3 -4
  13. package/build/components/editor-initialization/index.js.map +1 -1
  14. package/build/components/header/document-title/index.js +103 -0
  15. package/build/components/header/document-title/index.js.map +1 -0
  16. package/build/components/header/fullscreen-mode-close/index.js +8 -9
  17. package/build/components/header/fullscreen-mode-close/index.js.map +1 -1
  18. package/build/components/header/header-toolbar/index.js +2 -2
  19. package/build/components/header/header-toolbar/index.js.map +1 -1
  20. package/build/components/header/header-toolbar/index.native.js +12 -13
  21. package/build/components/header/header-toolbar/index.native.js.map +1 -1
  22. package/build/components/header/index.js +14 -20
  23. package/build/components/header/index.js.map +1 -1
  24. package/build/components/header/main-dashboard-button/index.js +3 -4
  25. package/build/components/header/main-dashboard-button/index.js.map +1 -1
  26. package/build/components/header/more-menu/index.js +19 -23
  27. package/build/components/header/more-menu/index.js.map +1 -1
  28. package/build/components/header/plugin-sidebar-more-menu-item/index.js +4 -7
  29. package/build/components/header/plugin-sidebar-more-menu-item/index.js.map +1 -1
  30. package/build/components/header/post-publish-button-or-toggle.js +15 -16
  31. package/build/components/header/post-publish-button-or-toggle.js.map +1 -1
  32. package/build/components/header/tools-more-menu-group/index.js +7 -10
  33. package/build/components/header/tools-more-menu-group/index.js.map +1 -1
  34. package/build/components/header/writing-menu/index.js +0 -8
  35. package/build/components/header/writing-menu/index.js.map +1 -1
  36. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +3 -4
  37. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
  38. package/build/components/keyboard-shortcut-help-modal/index.js +45 -54
  39. package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  40. package/build/components/keyboard-shortcut-help-modal/shortcut.js +10 -12
  41. package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
  42. package/build/components/keyboard-shortcuts/index.js +1 -1
  43. package/build/components/keyboard-shortcuts/index.js.map +1 -1
  44. package/build/components/layout/actions-panel.js +5 -6
  45. package/build/components/layout/actions-panel.js.map +1 -1
  46. package/build/components/layout/index.js +3 -4
  47. package/build/components/layout/index.js.map +1 -1
  48. package/build/components/layout/index.native.js +3 -7
  49. package/build/components/layout/index.native.js.map +1 -1
  50. package/build/components/meta-boxes/index.js +9 -13
  51. package/build/components/meta-boxes/index.js.map +1 -1
  52. package/build/components/meta-boxes/meta-box-visibility.js +5 -8
  53. package/build/components/meta-boxes/meta-box-visibility.js.map +1 -1
  54. package/build/components/meta-boxes/meta-boxes-area/index.js +3 -4
  55. package/build/components/meta-boxes/meta-boxes-area/index.js.map +1 -1
  56. package/build/components/preferences-modal/meta-boxes-section.js +18 -24
  57. package/build/components/preferences-modal/meta-boxes-section.js.map +1 -1
  58. package/build/components/preferences-modal/options/enable-custom-fields.js +8 -10
  59. package/build/components/preferences-modal/options/enable-custom-fields.js.map +1 -1
  60. package/build/components/preferences-modal/options/enable-feature.js +12 -16
  61. package/build/components/preferences-modal/options/enable-feature.js.map +1 -1
  62. package/build/components/preferences-modal/options/enable-panel.js +10 -17
  63. package/build/components/preferences-modal/options/enable-panel.js.map +1 -1
  64. package/build/components/preferences-modal/options/enable-plugin-document-setting-panel.js +7 -10
  65. package/build/components/preferences-modal/options/enable-plugin-document-setting-panel.js.map +1 -1
  66. package/build/components/secondary-sidebar/inserter-sidebar.js +4 -8
  67. package/build/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
  68. package/build/components/secondary-sidebar/list-view-sidebar.js +58 -44
  69. package/build/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
  70. package/build/components/sidebar/discussion-panel/index.js +5 -7
  71. package/build/components/sidebar/discussion-panel/index.js.map +1 -1
  72. package/build/components/sidebar/featured-image/index.js +9 -17
  73. package/build/components/sidebar/featured-image/index.js.map +1 -1
  74. package/build/components/sidebar/page-attributes/index.js +3 -9
  75. package/build/components/sidebar/page-attributes/index.js.map +1 -1
  76. package/build/components/sidebar/plugin-document-setting-panel/index.js +20 -25
  77. package/build/components/sidebar/plugin-document-setting-panel/index.js.map +1 -1
  78. package/build/components/sidebar/plugin-post-publish-panel/index.js +12 -15
  79. package/build/components/sidebar/plugin-post-publish-panel/index.js.map +1 -1
  80. package/build/components/sidebar/plugin-post-status-info/index.js +6 -9
  81. package/build/components/sidebar/plugin-post-status-info/index.js.map +1 -1
  82. package/build/components/sidebar/plugin-pre-publish-panel/index.js +12 -15
  83. package/build/components/sidebar/plugin-pre-publish-panel/index.js.map +1 -1
  84. package/build/components/sidebar/plugin-sidebar/index.js +8 -12
  85. package/build/components/sidebar/plugin-sidebar/index.js.map +1 -1
  86. package/build/components/sidebar/post-excerpt/index.js +5 -7
  87. package/build/components/sidebar/post-excerpt/index.js.map +1 -1
  88. package/build/components/sidebar/post-schedule/index.js +16 -23
  89. package/build/components/sidebar/post-schedule/index.js.map +1 -1
  90. package/build/components/sidebar/post-status/index.js +8 -12
  91. package/build/components/sidebar/post-status/index.js.map +1 -1
  92. package/build/components/sidebar/post-taxonomies/taxonomy-panel.js +9 -15
  93. package/build/components/sidebar/post-taxonomies/taxonomy-panel.js.map +1 -1
  94. package/build/components/sidebar/post-template/create-modal.js +3 -4
  95. package/build/components/sidebar/post-template/create-modal.js.map +1 -1
  96. package/build/components/sidebar/post-template/form.js +13 -20
  97. package/build/components/sidebar/post-template/form.js.map +1 -1
  98. package/build/components/sidebar/post-template/index.js +18 -25
  99. package/build/components/sidebar/post-template/index.js.map +1 -1
  100. package/build/components/sidebar/post-url/index.js +16 -23
  101. package/build/components/sidebar/post-url/index.js.map +1 -1
  102. package/build/components/sidebar/post-visibility/index.js +26 -36
  103. package/build/components/sidebar/post-visibility/index.js.map +1 -1
  104. package/build/components/sidebar/settings-header/index.js +3 -4
  105. package/build/components/sidebar/settings-header/index.js.map +1 -1
  106. package/build/components/sidebar/template-summary/index.js +1 -1
  107. package/build/components/sidebar/template-summary/index.js.map +1 -1
  108. package/build/components/start-page-options/index.js +3 -4
  109. package/build/components/start-page-options/index.js.map +1 -1
  110. package/build/components/view-link/index.js +1 -1
  111. package/build/components/view-link/index.js.map +1 -1
  112. package/build/components/visual-editor/block-inspector-button.js +4 -5
  113. package/build/components/visual-editor/block-inspector-button.js.map +1 -1
  114. package/build/components/visual-editor/header.native.js +6 -7
  115. package/build/components/visual-editor/header.native.js.map +1 -1
  116. package/build/components/visual-editor/index.js +49 -57
  117. package/build/components/visual-editor/index.js.map +1 -1
  118. package/build/components/welcome-guide/image.js +4 -5
  119. package/build/components/welcome-guide/image.js.map +1 -1
  120. package/build/editor.js +42 -30
  121. package/build/editor.js.map +1 -1
  122. package/build/editor.native.js +7 -11
  123. package/build/editor.native.js.map +1 -1
  124. package/build/hooks/validate-multiple-use/index.js +24 -37
  125. package/build/hooks/validate-multiple-use/index.js.map +1 -1
  126. package/build/index.js +18 -2
  127. package/build/index.js.map +1 -1
  128. package/build/{private-apis.js → lock-unlock.js} +1 -1
  129. package/build/lock-unlock.js.map +1 -0
  130. package/build/plugins/index.js +20 -23
  131. package/build/plugins/index.js.map +1 -1
  132. package/build/plugins/keyboard-shortcuts-help-menu-item/index.js +3 -4
  133. package/build/plugins/keyboard-shortcuts-help-menu-item/index.js.map +1 -1
  134. package/build/store/actions.js +60 -88
  135. package/build/store/actions.js.map +1 -1
  136. package/build/store/reducer.js +11 -43
  137. package/build/store/reducer.js.map +1 -1
  138. package/build/store/selectors.js +11 -16
  139. package/build/store/selectors.js.map +1 -1
  140. package/build-module/components/block-manager/category.js +14 -22
  141. package/build-module/components/block-manager/category.js.map +1 -1
  142. package/build-module/components/block-manager/checklist.js +6 -13
  143. package/build-module/components/block-manager/checklist.js.map +1 -1
  144. package/build-module/components/block-manager/index.js +32 -20
  145. package/build-module/components/block-manager/index.js.map +1 -1
  146. package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js +21 -26
  147. package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -1
  148. package/build-module/components/device-preview/index.js +3 -5
  149. package/build-module/components/device-preview/index.js.map +1 -1
  150. package/build-module/components/editor-initialization/index.js +3 -4
  151. package/build-module/components/editor-initialization/index.js.map +1 -1
  152. package/build-module/components/header/document-title/index.js +88 -0
  153. package/build-module/components/header/document-title/index.js.map +1 -0
  154. package/build-module/components/header/fullscreen-mode-close/index.js +7 -8
  155. package/build-module/components/header/fullscreen-mode-close/index.js.map +1 -1
  156. package/build-module/components/header/header-toolbar/index.js +1 -1
  157. package/build-module/components/header/header-toolbar/index.js.map +1 -1
  158. package/build-module/components/header/header-toolbar/index.native.js +12 -13
  159. package/build-module/components/header/header-toolbar/index.native.js.map +1 -1
  160. package/build-module/components/header/index.js +14 -20
  161. package/build-module/components/header/index.js.map +1 -1
  162. package/build-module/components/header/main-dashboard-button/index.js +3 -4
  163. package/build-module/components/header/main-dashboard-button/index.js.map +1 -1
  164. package/build-module/components/header/more-menu/index.js +19 -23
  165. package/build-module/components/header/more-menu/index.js.map +1 -1
  166. package/build-module/components/header/plugin-sidebar-more-menu-item/index.js +4 -4
  167. package/build-module/components/header/plugin-sidebar-more-menu-item/index.js.map +1 -1
  168. package/build-module/components/header/post-publish-button-or-toggle.js +15 -16
  169. package/build-module/components/header/post-publish-button-or-toggle.js.map +1 -1
  170. package/build-module/components/header/tools-more-menu-group/index.js +7 -10
  171. package/build-module/components/header/tools-more-menu-group/index.js.map +1 -1
  172. package/build-module/components/header/writing-menu/index.js +0 -8
  173. package/build-module/components/header/writing-menu/index.js.map +1 -1
  174. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +3 -4
  175. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
  176. package/build-module/components/keyboard-shortcut-help-modal/index.js +43 -52
  177. package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  178. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +10 -12
  179. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
  180. package/build-module/components/keyboard-shortcuts/index.js +1 -1
  181. package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
  182. package/build-module/components/layout/actions-panel.js +5 -6
  183. package/build-module/components/layout/actions-panel.js.map +1 -1
  184. package/build-module/components/layout/index.js +3 -4
  185. package/build-module/components/layout/index.js.map +1 -1
  186. package/build-module/components/layout/index.native.js +3 -7
  187. package/build-module/components/layout/index.native.js.map +1 -1
  188. package/build-module/components/meta-boxes/index.js +9 -13
  189. package/build-module/components/meta-boxes/index.js.map +1 -1
  190. package/build-module/components/meta-boxes/meta-box-visibility.js +5 -8
  191. package/build-module/components/meta-boxes/meta-box-visibility.js.map +1 -1
  192. package/build-module/components/meta-boxes/meta-boxes-area/index.js +3 -4
  193. package/build-module/components/meta-boxes/meta-boxes-area/index.js.map +1 -1
  194. package/build-module/components/preferences-modal/meta-boxes-section.js +18 -24
  195. package/build-module/components/preferences-modal/meta-boxes-section.js.map +1 -1
  196. package/build-module/components/preferences-modal/options/enable-custom-fields.js +8 -10
  197. package/build-module/components/preferences-modal/options/enable-custom-fields.js.map +1 -1
  198. package/build-module/components/preferences-modal/options/enable-feature.js +12 -16
  199. package/build-module/components/preferences-modal/options/enable-feature.js.map +1 -1
  200. package/build-module/components/preferences-modal/options/enable-panel.js +10 -17
  201. package/build-module/components/preferences-modal/options/enable-panel.js.map +1 -1
  202. package/build-module/components/preferences-modal/options/enable-plugin-document-setting-panel.js +7 -10
  203. package/build-module/components/preferences-modal/options/enable-plugin-document-setting-panel.js.map +1 -1
  204. package/build-module/components/secondary-sidebar/inserter-sidebar.js +4 -5
  205. package/build-module/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
  206. package/build-module/components/secondary-sidebar/list-view-sidebar.js +58 -44
  207. package/build-module/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
  208. package/build-module/components/sidebar/discussion-panel/index.js +5 -7
  209. package/build-module/components/sidebar/discussion-panel/index.js.map +1 -1
  210. package/build-module/components/sidebar/featured-image/index.js +9 -17
  211. package/build-module/components/sidebar/featured-image/index.js.map +1 -1
  212. package/build-module/components/sidebar/page-attributes/index.js +3 -9
  213. package/build-module/components/sidebar/page-attributes/index.js.map +1 -1
  214. package/build-module/components/sidebar/plugin-document-setting-panel/index.js +20 -25
  215. package/build-module/components/sidebar/plugin-document-setting-panel/index.js.map +1 -1
  216. package/build-module/components/sidebar/plugin-post-publish-panel/index.js +12 -15
  217. package/build-module/components/sidebar/plugin-post-publish-panel/index.js.map +1 -1
  218. package/build-module/components/sidebar/plugin-post-status-info/index.js +6 -9
  219. package/build-module/components/sidebar/plugin-post-status-info/index.js.map +1 -1
  220. package/build-module/components/sidebar/plugin-pre-publish-panel/index.js +12 -15
  221. package/build-module/components/sidebar/plugin-pre-publish-panel/index.js.map +1 -1
  222. package/build-module/components/sidebar/plugin-sidebar/index.js +8 -9
  223. package/build-module/components/sidebar/plugin-sidebar/index.js.map +1 -1
  224. package/build-module/components/sidebar/post-excerpt/index.js +5 -7
  225. package/build-module/components/sidebar/post-excerpt/index.js.map +1 -1
  226. package/build-module/components/sidebar/post-schedule/index.js +16 -23
  227. package/build-module/components/sidebar/post-schedule/index.js.map +1 -1
  228. package/build-module/components/sidebar/post-status/index.js +9 -13
  229. package/build-module/components/sidebar/post-status/index.js.map +1 -1
  230. package/build-module/components/sidebar/post-taxonomies/taxonomy-panel.js +9 -15
  231. package/build-module/components/sidebar/post-taxonomies/taxonomy-panel.js.map +1 -1
  232. package/build-module/components/sidebar/post-template/create-modal.js +3 -4
  233. package/build-module/components/sidebar/post-template/create-modal.js.map +1 -1
  234. package/build-module/components/sidebar/post-template/form.js +13 -20
  235. package/build-module/components/sidebar/post-template/form.js.map +1 -1
  236. package/build-module/components/sidebar/post-template/index.js +18 -25
  237. package/build-module/components/sidebar/post-template/index.js.map +1 -1
  238. package/build-module/components/sidebar/post-url/index.js +16 -23
  239. package/build-module/components/sidebar/post-url/index.js.map +1 -1
  240. package/build-module/components/sidebar/post-visibility/index.js +26 -36
  241. package/build-module/components/sidebar/post-visibility/index.js.map +1 -1
  242. package/build-module/components/sidebar/settings-header/index.js +3 -4
  243. package/build-module/components/sidebar/settings-header/index.js.map +1 -1
  244. package/build-module/components/sidebar/template-summary/index.js +1 -1
  245. package/build-module/components/sidebar/template-summary/index.js.map +1 -1
  246. package/build-module/components/start-page-options/index.js +3 -4
  247. package/build-module/components/start-page-options/index.js.map +1 -1
  248. package/build-module/components/view-link/index.js +1 -1
  249. package/build-module/components/view-link/index.js.map +1 -1
  250. package/build-module/components/visual-editor/block-inspector-button.js +4 -5
  251. package/build-module/components/visual-editor/block-inspector-button.js.map +1 -1
  252. package/build-module/components/visual-editor/header.native.js +6 -7
  253. package/build-module/components/visual-editor/header.native.js.map +1 -1
  254. package/build-module/components/visual-editor/index.js +47 -54
  255. package/build-module/components/visual-editor/index.js.map +1 -1
  256. package/build-module/components/welcome-guide/image.js +4 -5
  257. package/build-module/components/welcome-guide/image.js.map +1 -1
  258. package/build-module/editor.js +38 -26
  259. package/build-module/editor.js.map +1 -1
  260. package/build-module/editor.native.js +7 -10
  261. package/build-module/editor.native.js.map +1 -1
  262. package/build-module/hooks/validate-multiple-use/index.js +24 -34
  263. package/build-module/hooks/validate-multiple-use/index.js.map +1 -1
  264. package/build-module/index.js +18 -2
  265. package/build-module/index.js.map +1 -1
  266. package/build-module/{private-apis.js → lock-unlock.js} +1 -1
  267. package/build-module/lock-unlock.js.map +1 -0
  268. package/build-module/plugins/index.js +20 -23
  269. package/build-module/plugins/index.js.map +1 -1
  270. package/build-module/plugins/keyboard-shortcuts-help-menu-item/index.js +3 -4
  271. package/build-module/plugins/keyboard-shortcuts-help-menu-item/index.js.map +1 -1
  272. package/build-module/store/actions.js +60 -88
  273. package/build-module/store/actions.js.map +1 -1
  274. package/build-module/store/reducer.js +11 -43
  275. package/build-module/store/reducer.js.map +1 -1
  276. package/build-module/store/selectors.js +11 -16
  277. package/build-module/store/selectors.js.map +1 -1
  278. package/build-style/style-rtl.css +66 -102
  279. package/build-style/style.css +66 -102
  280. package/package.json +32 -32
  281. package/src/components/block-manager/index.js +51 -31
  282. package/src/components/block-manager/style.scss +3 -1
  283. package/src/components/device-preview/index.js +1 -2
  284. package/src/components/header/document-title/index.js +86 -0
  285. package/src/components/header/document-title/style.scss +61 -0
  286. package/src/components/header/header-toolbar/index.js +1 -1
  287. package/src/components/header/header-toolbar/style.scss +0 -1
  288. package/src/components/header/index.js +7 -10
  289. package/src/components/header/style.scss +6 -0
  290. package/src/components/header/writing-menu/index.js +0 -10
  291. package/src/components/keyboard-shortcuts/index.js +1 -1
  292. package/src/components/preferences-modal/options/enable-custom-fields.js +2 -2
  293. package/src/components/preferences-modal/options/test/__snapshots__/enable-custom-fields.js.snap +2 -2
  294. package/src/components/preferences-modal/test/__snapshots__/index.js.snap +10 -4
  295. package/src/components/secondary-sidebar/list-view-sidebar.js +68 -66
  296. package/src/components/secondary-sidebar/style.scss +28 -31
  297. package/src/components/sidebar/post-status/index.js +2 -1
  298. package/src/components/visual-editor/index.js +22 -32
  299. package/src/components/visual-editor/style.scss +0 -13
  300. package/src/editor.js +22 -1
  301. package/src/index.js +30 -3
  302. package/src/plugins/index.js +1 -1
  303. package/src/style.scss +1 -1
  304. package/src/test/editor.native.js +34 -9
  305. package/build/components/header/template-title/delete-template.js +0 -117
  306. package/build/components/header/template-title/delete-template.js.map +0 -1
  307. package/build/components/header/template-title/edit-template-title.js +0 -95
  308. package/build/components/header/template-title/edit-template-title.js.map +0 -1
  309. package/build/components/header/template-title/index.js +0 -124
  310. package/build/components/header/template-title/index.js.map +0 -1
  311. package/build/components/header/template-title/template-description.js +0 -55
  312. package/build/components/header/template-title/template-description.js.map +0 -1
  313. package/build/private-apis.js.map +0 -1
  314. package/build-module/components/header/template-title/delete-template.js +0 -104
  315. package/build-module/components/header/template-title/delete-template.js.map +0 -1
  316. package/build-module/components/header/template-title/edit-template-title.js +0 -83
  317. package/build-module/components/header/template-title/edit-template-title.js.map +0 -1
  318. package/build-module/components/header/template-title/index.js +0 -105
  319. package/build-module/components/header/template-title/index.js.map +0 -1
  320. package/build-module/components/header/template-title/template-description.js +0 -45
  321. package/build-module/components/header/template-title/template-description.js.map +0 -1
  322. package/build-module/private-apis.js.map +0 -1
  323. package/src/components/header/template-title/delete-template.js +0 -106
  324. package/src/components/header/template-title/edit-template-title.js +0 -78
  325. package/src/components/header/template-title/index.js +0 -115
  326. package/src/components/header/template-title/style.scss +0 -94
  327. package/src/components/header/template-title/template-description.js +0 -42
  328. /package/src/{private-apis.js → lock-unlock.js} +0 -0
@@ -16,10 +16,9 @@ import PreferencesMenuItem from '../preferences-menu-item';
16
16
  import ToolsMoreMenuGroup from '../tools-more-menu-group';
17
17
  import WritingMenu from '../writing-menu';
18
18
 
19
- const MoreMenu = _ref => {
20
- let {
21
- showIconLabels
22
- } = _ref;
19
+ const MoreMenu = ({
20
+ showIconLabels
21
+ }) => {
23
22
  const isLargeViewport = useViewportMatch('large');
24
23
  return createElement(MoreMenuDropdown, {
25
24
  toggleProps: {
@@ -28,26 +27,23 @@ const MoreMenu = _ref => {
28
27
  variant: 'tertiary'
29
28
  })
30
29
  }
31
- }, _ref2 => {
32
- let {
30
+ }, ({
31
+ onClose
32
+ }) => createElement(Fragment, null, showIconLabels && !isLargeViewport && createElement(PinnedItems.Slot, {
33
+ className: showIconLabels && 'show-icon-labels',
34
+ scope: "core/edit-post"
35
+ }), createElement(WritingMenu, null), createElement(ModeSwitcher, null), createElement(ActionItem.Slot, {
36
+ name: "core/edit-post/plugin-more-menu",
37
+ label: __('Plugins'),
38
+ as: MenuGroup,
39
+ fillProps: {
40
+ onClick: onClose
41
+ }
42
+ }), createElement(ToolsMoreMenuGroup.Slot, {
43
+ fillProps: {
33
44
  onClose
34
- } = _ref2;
35
- return createElement(Fragment, null, showIconLabels && !isLargeViewport && createElement(PinnedItems.Slot, {
36
- className: showIconLabels && 'show-icon-labels',
37
- scope: "core/edit-post"
38
- }), createElement(WritingMenu, null), createElement(ModeSwitcher, null), createElement(ActionItem.Slot, {
39
- name: "core/edit-post/plugin-more-menu",
40
- label: __('Plugins'),
41
- as: MenuGroup,
42
- fillProps: {
43
- onClick: onClose
44
- }
45
- }), createElement(ToolsMoreMenuGroup.Slot, {
46
- fillProps: {
47
- onClose
48
- }
49
- }), createElement(MenuGroup, null, createElement(PreferencesMenuItem, null)));
50
- });
45
+ }
46
+ }), createElement(MenuGroup, null, createElement(PreferencesMenuItem, null))));
51
47
  };
52
48
 
53
49
  export default MoreMenu;
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-post/src/components/header/more-menu/index.js"],"names":["__","MenuGroup","ActionItem","MoreMenuDropdown","PinnedItems","useViewportMatch","ModeSwitcher","PreferencesMenuItem","ToolsMoreMenuGroup","WritingMenu","MoreMenu","showIconLabels","isLargeViewport","showTooltip","variant","onClose","onClick"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,EAAT,QAAmB,iBAAnB;AACA,SAASC,SAAT,QAA0B,uBAA1B;AACA,SACCC,UADD,EAECC,gBAFD,EAGCC,WAHD,QAIO,sBAJP;AAKA,SAASC,gBAAT,QAAiC,oBAAjC;AAEA;AACA;AACA;;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AACA,OAAOC,mBAAP,MAAgC,0BAAhC;AACA,OAAOC,kBAAP,MAA+B,0BAA/B;AACA,OAAOC,WAAP,MAAwB,iBAAxB;;AAEA,MAAMC,QAAQ,GAAG,QAA0B;AAAA,MAAxB;AAAEC,IAAAA;AAAF,GAAwB;AAC1C,QAAMC,eAAe,GAAGP,gBAAgB,CAAE,OAAF,CAAxC;AAEA,SACC,cAAC,gBAAD;AACC,IAAA,WAAW,EAAG;AACbQ,MAAAA,WAAW,EAAE,CAAEF,cADF;AAEb,UAAKA,cAAc,IAAI;AAAEG,QAAAA,OAAO,EAAE;AAAX,OAAvB;AAFa;AADf,KAMG;AAAA,QAAE;AAAEC,MAAAA;AAAF,KAAF;AAAA,WACD,8BACGJ,cAAc,IAAI,CAAEC,eAApB,IACD,cAAC,WAAD,CAAa,IAAb;AACC,MAAA,SAAS,EAAGD,cAAc,IAAI,kBAD/B;AAEC,MAAA,KAAK,EAAC;AAFP,MAFF,EAOC,cAAC,WAAD,OAPD,EAQC,cAAC,YAAD,OARD,EASC,cAAC,UAAD,CAAY,IAAZ;AACC,MAAA,IAAI,EAAC,iCADN;AAEC,MAAA,KAAK,EAAGX,EAAE,CAAE,SAAF,CAFX;AAGC,MAAA,EAAE,EAAGC,SAHN;AAIC,MAAA,SAAS,EAAG;AAAEe,QAAAA,OAAO,EAAED;AAAX;AAJb,MATD,EAeC,cAAC,kBAAD,CAAoB,IAApB;AAAyB,MAAA,SAAS,EAAG;AAAEA,QAAAA;AAAF;AAArC,MAfD,EAgBC,cAAC,SAAD,QACC,cAAC,mBAAD,OADD,CAhBD,CADC;AAAA,GANH,CADD;AA+BA,CAlCD;;AAoCA,eAAeL,QAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { MenuGroup } from '@wordpress/components';\nimport {\n\tActionItem,\n\tMoreMenuDropdown,\n\tPinnedItems,\n} from '@wordpress/interface';\nimport { useViewportMatch } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport ModeSwitcher from '../mode-switcher';\nimport PreferencesMenuItem from '../preferences-menu-item';\nimport ToolsMoreMenuGroup from '../tools-more-menu-group';\nimport WritingMenu from '../writing-menu';\n\nconst MoreMenu = ( { showIconLabels } ) => {\n\tconst isLargeViewport = useViewportMatch( 'large' );\n\n\treturn (\n\t\t<MoreMenuDropdown\n\t\t\ttoggleProps={ {\n\t\t\t\tshowTooltip: ! showIconLabels,\n\t\t\t\t...( showIconLabels && { variant: 'tertiary' } ),\n\t\t\t} }\n\t\t>\n\t\t\t{ ( { onClose } ) => (\n\t\t\t\t<>\n\t\t\t\t\t{ showIconLabels && ! isLargeViewport && (\n\t\t\t\t\t\t<PinnedItems.Slot\n\t\t\t\t\t\t\tclassName={ showIconLabels && 'show-icon-labels' }\n\t\t\t\t\t\t\tscope=\"core/edit-post\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t<WritingMenu />\n\t\t\t\t\t<ModeSwitcher />\n\t\t\t\t\t<ActionItem.Slot\n\t\t\t\t\t\tname=\"core/edit-post/plugin-more-menu\"\n\t\t\t\t\t\tlabel={ __( 'Plugins' ) }\n\t\t\t\t\t\tas={ MenuGroup }\n\t\t\t\t\t\tfillProps={ { onClick: onClose } }\n\t\t\t\t\t/>\n\t\t\t\t\t<ToolsMoreMenuGroup.Slot fillProps={ { onClose } } />\n\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t<PreferencesMenuItem />\n\t\t\t\t\t</MenuGroup>\n\t\t\t\t</>\n\t\t\t) }\n\t\t</MoreMenuDropdown>\n\t);\n};\n\nexport default MoreMenu;\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-post/src/components/header/more-menu/index.js"],"names":["__","MenuGroup","ActionItem","MoreMenuDropdown","PinnedItems","useViewportMatch","ModeSwitcher","PreferencesMenuItem","ToolsMoreMenuGroup","WritingMenu","MoreMenu","showIconLabels","isLargeViewport","showTooltip","variant","onClose","onClick"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,EAAT,QAAmB,iBAAnB;AACA,SAASC,SAAT,QAA0B,uBAA1B;AACA,SACCC,UADD,EAECC,gBAFD,EAGCC,WAHD,QAIO,sBAJP;AAKA,SAASC,gBAAT,QAAiC,oBAAjC;AAEA;AACA;AACA;;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AACA,OAAOC,mBAAP,MAAgC,0BAAhC;AACA,OAAOC,kBAAP,MAA+B,0BAA/B;AACA,OAAOC,WAAP,MAAwB,iBAAxB;;AAEA,MAAMC,QAAQ,GAAG,CAAE;AAAEC,EAAAA;AAAF,CAAF,KAA0B;AAC1C,QAAMC,eAAe,GAAGP,gBAAgB,CAAE,OAAF,CAAxC;AAEA,SACC,cAAC,gBAAD;AACC,IAAA,WAAW,EAAG;AACbQ,MAAAA,WAAW,EAAE,CAAEF,cADF;AAEb,UAAKA,cAAc,IAAI;AAAEG,QAAAA,OAAO,EAAE;AAAX,OAAvB;AAFa;AADf,KAMG,CAAE;AAAEC,IAAAA;AAAF,GAAF,KACD,8BACGJ,cAAc,IAAI,CAAEC,eAApB,IACD,cAAC,WAAD,CAAa,IAAb;AACC,IAAA,SAAS,EAAGD,cAAc,IAAI,kBAD/B;AAEC,IAAA,KAAK,EAAC;AAFP,IAFF,EAOC,cAAC,WAAD,OAPD,EAQC,cAAC,YAAD,OARD,EASC,cAAC,UAAD,CAAY,IAAZ;AACC,IAAA,IAAI,EAAC,iCADN;AAEC,IAAA,KAAK,EAAGX,EAAE,CAAE,SAAF,CAFX;AAGC,IAAA,EAAE,EAAGC,SAHN;AAIC,IAAA,SAAS,EAAG;AAAEe,MAAAA,OAAO,EAAED;AAAX;AAJb,IATD,EAeC,cAAC,kBAAD,CAAoB,IAApB;AAAyB,IAAA,SAAS,EAAG;AAAEA,MAAAA;AAAF;AAArC,IAfD,EAgBC,cAAC,SAAD,QACC,cAAC,mBAAD,OADD,CAhBD,CAPF,CADD;AA+BA,CAlCD;;AAoCA,eAAeL,QAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { MenuGroup } from '@wordpress/components';\nimport {\n\tActionItem,\n\tMoreMenuDropdown,\n\tPinnedItems,\n} from '@wordpress/interface';\nimport { useViewportMatch } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport ModeSwitcher from '../mode-switcher';\nimport PreferencesMenuItem from '../preferences-menu-item';\nimport ToolsMoreMenuGroup from '../tools-more-menu-group';\nimport WritingMenu from '../writing-menu';\n\nconst MoreMenu = ( { showIconLabels } ) => {\n\tconst isLargeViewport = useViewportMatch( 'large' );\n\n\treturn (\n\t\t<MoreMenuDropdown\n\t\t\ttoggleProps={ {\n\t\t\t\tshowTooltip: ! showIconLabels,\n\t\t\t\t...( showIconLabels && { variant: 'tertiary' } ),\n\t\t\t} }\n\t\t>\n\t\t\t{ ( { onClose } ) => (\n\t\t\t\t<>\n\t\t\t\t\t{ showIconLabels && ! isLargeViewport && (\n\t\t\t\t\t\t<PinnedItems.Slot\n\t\t\t\t\t\t\tclassName={ showIconLabels && 'show-icon-labels' }\n\t\t\t\t\t\t\tscope=\"core/edit-post\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t<WritingMenu />\n\t\t\t\t\t<ModeSwitcher />\n\t\t\t\t\t<ActionItem.Slot\n\t\t\t\t\t\tname=\"core/edit-post/plugin-more-menu\"\n\t\t\t\t\t\tlabel={ __( 'Plugins' ) }\n\t\t\t\t\t\tas={ MenuGroup }\n\t\t\t\t\t\tfillProps={ { onClick: onClose } }\n\t\t\t\t\t/>\n\t\t\t\t\t<ToolsMoreMenuGroup.Slot fillProps={ { onClose } } />\n\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t<PreferencesMenuItem />\n\t\t\t\t\t</MenuGroup>\n\t\t\t\t</>\n\t\t\t) }\n\t\t</MoreMenuDropdown>\n\t);\n};\n\nexport default MoreMenu;\n"]}
@@ -1,4 +1,3 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
2
1
  import { createElement } from "@wordpress/element";
3
2
 
4
3
  /**
@@ -56,9 +55,10 @@ import { ComplementaryAreaMoreMenuItem } from '@wordpress/interface';
56
55
  export default function PluginSidebarMoreMenuItem(props) {
57
56
  return createElement(ComplementaryAreaMoreMenuItem // Menu item is marked with unstable prop for backward compatibility.
58
57
  // @see https://github.com/WordPress/gutenberg/issues/14457
59
- , _extends({
58
+ , {
60
59
  __unstableExplicitMenuItem: true,
61
- scope: "core/edit-post"
62
- }, props));
60
+ scope: "core/edit-post",
61
+ ...props
62
+ });
63
63
  }
64
64
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-post/src/components/header/plugin-sidebar-more-menu-item/index.js"],"names":["ComplementaryAreaMoreMenuItem","PluginSidebarMoreMenuItem","props"],"mappings":";;;AAAA;AACA;AACA;AACA,SAASA,6BAAT,QAA8C,sBAA9C;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,eAAe,SAASC,yBAAT,CAAoCC,KAApC,EAA4C;AAC1D,SACC,cAAC,6BAAD,CACC;AACA;AAFD;AAGC,IAAA,0BAA0B,MAH3B;AAIC,IAAA,KAAK,EAAC;AAJP,KAKMA,KALN,EADD;AASA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { ComplementaryAreaMoreMenuItem } from '@wordpress/interface';\n\n/**\n * Renders a menu item in `Plugins` group in `More Menu` drop down,\n * and can be used to activate the corresponding `PluginSidebar` component.\n * The text within the component appears as the menu item label.\n *\n * @param {Object} props Component props.\n * @param {string} props.target A string identifying the target sidebar you wish to be activated by this menu item. Must be the same as the `name` prop you have given to that sidebar.\n * @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered to the left of the menu item label.\n *\n * @example\n * ```js\n * // Using ES5 syntax\n * var __ = wp.i18n.__;\n * var PluginSidebarMoreMenuItem = wp.editPost.PluginSidebarMoreMenuItem;\n * var moreIcon = wp.element.createElement( 'svg' ); //... svg element.\n *\n * function MySidebarMoreMenuItem() {\n * \treturn wp.element.createElement(\n * \t\tPluginSidebarMoreMenuItem,\n * \t\t{\n * \t\t\ttarget: 'my-sidebar',\n * \t\t\ticon: moreIcon,\n * \t\t},\n * \t\t__( 'My sidebar title' )\n * \t)\n * }\n * ```\n *\n * @example\n * ```jsx\n * // Using ESNext syntax\n * import { __ } from '@wordpress/i18n';\n * import { PluginSidebarMoreMenuItem } from '@wordpress/edit-post';\n * import { more } from '@wordpress/icons';\n *\n * const MySidebarMoreMenuItem = () => (\n * \t<PluginSidebarMoreMenuItem\n * \t\ttarget=\"my-sidebar\"\n * \t\ticon={ more }\n * \t>\n * \t\t{ __( 'My sidebar title' ) }\n * \t</PluginSidebarMoreMenuItem>\n * );\n * ```\n *\n * @return {WPComponent} The component to be rendered.\n */\n\nexport default function PluginSidebarMoreMenuItem( props ) {\n\treturn (\n\t\t<ComplementaryAreaMoreMenuItem\n\t\t\t// Menu item is marked with unstable prop for backward compatibility.\n\t\t\t// @see https://github.com/WordPress/gutenberg/issues/14457\n\t\t\t__unstableExplicitMenuItem\n\t\t\tscope=\"core/edit-post\"\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-post/src/components/header/plugin-sidebar-more-menu-item/index.js"],"names":["ComplementaryAreaMoreMenuItem","PluginSidebarMoreMenuItem","props"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,6BAAT,QAA8C,sBAA9C;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,eAAe,SAASC,yBAAT,CAAoCC,KAApC,EAA4C;AAC1D,SACC,cAAC,6BAAD,CACC;AACA;AAFD;AAGC,IAAA,0BAA0B,MAH3B;AAIC,IAAA,KAAK,EAAC,gBAJP;AAAA,OAKMA;AALN,IADD;AASA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { ComplementaryAreaMoreMenuItem } from '@wordpress/interface';\n\n/**\n * Renders a menu item in `Plugins` group in `More Menu` drop down,\n * and can be used to activate the corresponding `PluginSidebar` component.\n * The text within the component appears as the menu item label.\n *\n * @param {Object} props Component props.\n * @param {string} props.target A string identifying the target sidebar you wish to be activated by this menu item. Must be the same as the `name` prop you have given to that sidebar.\n * @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered to the left of the menu item label.\n *\n * @example\n * ```js\n * // Using ES5 syntax\n * var __ = wp.i18n.__;\n * var PluginSidebarMoreMenuItem = wp.editPost.PluginSidebarMoreMenuItem;\n * var moreIcon = wp.element.createElement( 'svg' ); //... svg element.\n *\n * function MySidebarMoreMenuItem() {\n * \treturn wp.element.createElement(\n * \t\tPluginSidebarMoreMenuItem,\n * \t\t{\n * \t\t\ttarget: 'my-sidebar',\n * \t\t\ticon: moreIcon,\n * \t\t},\n * \t\t__( 'My sidebar title' )\n * \t)\n * }\n * ```\n *\n * @example\n * ```jsx\n * // Using ESNext syntax\n * import { __ } from '@wordpress/i18n';\n * import { PluginSidebarMoreMenuItem } from '@wordpress/edit-post';\n * import { more } from '@wordpress/icons';\n *\n * const MySidebarMoreMenuItem = () => (\n * \t<PluginSidebarMoreMenuItem\n * \t\ttarget=\"my-sidebar\"\n * \t\ticon={ more }\n * \t>\n * \t\t{ __( 'My sidebar title' ) }\n * \t</PluginSidebarMoreMenuItem>\n * );\n * ```\n *\n * @return {WPComponent} The component to be rendered.\n */\n\nexport default function PluginSidebarMoreMenuItem( props ) {\n\treturn (\n\t\t<ComplementaryAreaMoreMenuItem\n\t\t\t// Menu item is marked with unstable prop for backward compatibility.\n\t\t\t// @see https://github.com/WordPress/gutenberg/issues/14457\n\t\t\t__unstableExplicitMenuItem\n\t\t\tscope=\"core/edit-post\"\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n"]}
@@ -11,20 +11,19 @@ import { PostPublishButton, store as editorStore } from '@wordpress/editor';
11
11
  */
12
12
 
13
13
  import { store as editPostStore } from '../../store';
14
- export function PostPublishButtonOrToggle(_ref) {
15
- let {
16
- forceIsDirty,
17
- forceIsSaving,
18
- hasPublishAction,
19
- isBeingScheduled,
20
- isPending,
21
- isPublished,
22
- isPublishSidebarEnabled,
23
- isPublishSidebarOpened,
24
- isScheduled,
25
- togglePublishSidebar,
26
- setEntitiesSavedStatesCallback
27
- } = _ref;
14
+ export function PostPublishButtonOrToggle({
15
+ forceIsDirty,
16
+ forceIsSaving,
17
+ hasPublishAction,
18
+ isBeingScheduled,
19
+ isPending,
20
+ isPublished,
21
+ isPublishSidebarEnabled,
22
+ isPublishSidebarOpened,
23
+ isScheduled,
24
+ togglePublishSidebar,
25
+ setEntitiesSavedStatesCallback
26
+ }) {
28
27
  const IS_TOGGLE = 'toggle';
29
28
  const IS_BUTTON = 'button';
30
29
  const isSmallerThanMediumViewport = useViewportMatch('medium', '<');
@@ -72,10 +71,10 @@ export function PostPublishButtonOrToggle(_ref) {
72
71
  });
73
72
  }
74
73
  export default compose(withSelect(select => {
75
- var _select$getCurrentPos, _select$getCurrentPos2, _select$getCurrentPos3;
74
+ var _select$getCurrentPos;
76
75
 
77
76
  return {
78
- hasPublishAction: (_select$getCurrentPos = (_select$getCurrentPos2 = select(editorStore).getCurrentPost()) === null || _select$getCurrentPos2 === void 0 ? void 0 : (_select$getCurrentPos3 = _select$getCurrentPos2._links) === null || _select$getCurrentPos3 === void 0 ? void 0 : _select$getCurrentPos3['wp:action-publish']) !== null && _select$getCurrentPos !== void 0 ? _select$getCurrentPos : false,
77
+ hasPublishAction: (_select$getCurrentPos = select(editorStore).getCurrentPost()?._links?.['wp:action-publish']) !== null && _select$getCurrentPos !== void 0 ? _select$getCurrentPos : false,
79
78
  isBeingScheduled: select(editorStore).isEditedPostBeingScheduled(),
80
79
  isPending: select(editorStore).isCurrentPostPending(),
81
80
  isPublished: select(editorStore).isCurrentPostPublished(),
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-post/src/components/header/post-publish-button-or-toggle.js"],"names":["useViewportMatch","compose","withDispatch","withSelect","PostPublishButton","store","editorStore","editPostStore","PostPublishButtonOrToggle","forceIsDirty","forceIsSaving","hasPublishAction","isBeingScheduled","isPending","isPublished","isPublishSidebarEnabled","isPublishSidebarOpened","isScheduled","togglePublishSidebar","setEntitiesSavedStatesCallback","IS_TOGGLE","IS_BUTTON","isSmallerThanMediumViewport","component","select","getCurrentPost","_links","isEditedPostBeingScheduled","isCurrentPostPending","isCurrentPostPublished","isCurrentPostScheduled","dispatch"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,gBAAT,EAA2BC,OAA3B,QAA0C,oBAA1C;AACA,SAASC,YAAT,EAAuBC,UAAvB,QAAyC,iBAAzC;AACA,SAASC,iBAAT,EAA4BC,KAAK,IAAIC,WAArC,QAAwD,mBAAxD;AAEA;AACA;AACA;;AACA,SAASD,KAAK,IAAIE,aAAlB,QAAuC,aAAvC;AAEA,OAAO,SAASC,yBAAT,OAYH;AAAA,MAZuC;AAC1CC,IAAAA,YAD0C;AAE1CC,IAAAA,aAF0C;AAG1CC,IAAAA,gBAH0C;AAI1CC,IAAAA,gBAJ0C;AAK1CC,IAAAA,SAL0C;AAM1CC,IAAAA,WAN0C;AAO1CC,IAAAA,uBAP0C;AAQ1CC,IAAAA,sBAR0C;AAS1CC,IAAAA,WAT0C;AAU1CC,IAAAA,oBAV0C;AAW1CC,IAAAA;AAX0C,GAYvC;AACH,QAAMC,SAAS,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AAElB,WAAF,CAAN,CAAsBuB,sBAAtB,EAPc;AAQ3Bd,IAAAA,uBAAuB,EACtBS,MAAM,CAAElB,WAAF,CAAN,CAAsBS,uBAAtB,EAT0B;AAU3BC,IAAAA,sBAAsB,EACrBQ,MAAM,CAAEjB,aAAF,CAAN,CAAwBS,sBAAxB,EAX0B;AAY3BC,IAAAA,WAAW,EAAEO,MAAM,CAAElB,WAAF,CAAN,CAAsBwB,sBAAtB;AAZc,GAAhB;AAAA,CAAF,CADW,EAerB5B,YAAY,CAAI6B,QAAF,IAAgB;AAC7B,QAAM;AAAEb,IAAAA;AAAF,MAA2Ba,QAAQ,CAAExB,aAAF,CAAzC;AACA,SAAO;AACNW,IAAAA;AADM,GAAP;AAGA,CALW,CAfS,CAAP,CAqBZV,yBArBY,CAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useViewportMatch, compose } from '@wordpress/compose';\nimport { withDispatch, withSelect } from '@wordpress/data';\nimport { PostPublishButton, store as editorStore } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { store as editPostStore } from '../../store';\n\nexport function PostPublishButtonOrToggle( {\n\tforceIsDirty,\n\tforceIsSaving,\n\thasPublishAction,\n\tisBeingScheduled,\n\tisPending,\n\tisPublished,\n\tisPublishSidebarEnabled,\n\tisPublishSidebarOpened,\n\tisScheduled,\n\ttogglePublishSidebar,\n\tsetEntitiesSavedStatesCallback,\n} ) {\n\tconst IS_TOGGLE = 'toggle';\n\tconst IS_BUTTON = 'button';\n\tconst isSmallerThanMediumViewport = useViewportMatch( 'medium', '<' );\n\tlet component;\n\n\t/**\n\t * Conditions to show a BUTTON (publish directly) or a TOGGLE (open publish sidebar):\n\t *\n\t * 1) We want to show a BUTTON when the post status is at the _final stage_\n\t * for a particular role (see https://wordpress.org/documentation/article/post-status/):\n\t *\n\t * - is published\n\t * - is scheduled to be published\n\t * - is pending and can't be published (but only for viewports >= medium).\n\t * \t Originally, we considered showing a button for pending posts that couldn't be published\n\t * \t (for example, for an author with the contributor role). Some languages can have\n\t * \t long translations for \"Submit for review\", so given the lack of UI real estate available\n\t * \t we decided to take into account the viewport in that case.\n\t * \t See: https://github.com/WordPress/gutenberg/issues/10475\n\t *\n\t * 2) Then, in small viewports, we'll show a TOGGLE.\n\t *\n\t * 3) Finally, we'll use the publish sidebar status to decide:\n\t *\n\t * - if it is enabled, we show a TOGGLE\n\t * - if it is disabled, we show a BUTTON\n\t */\n\tif (\n\t\tisPublished ||\n\t\t( isScheduled && isBeingScheduled ) ||\n\t\t( isPending && ! hasPublishAction && ! isSmallerThanMediumViewport )\n\t) {\n\t\tcomponent = IS_BUTTON;\n\t} else if ( isSmallerThanMediumViewport ) {\n\t\tcomponent = IS_TOGGLE;\n\t} else if ( isPublishSidebarEnabled ) {\n\t\tcomponent = IS_TOGGLE;\n\t} else {\n\t\tcomponent = IS_BUTTON;\n\t}\n\n\treturn (\n\t\t<PostPublishButton\n\t\t\tforceIsDirty={ forceIsDirty }\n\t\t\tforceIsSaving={ forceIsSaving }\n\t\t\tisOpen={ isPublishSidebarOpened }\n\t\t\tisToggle={ component === IS_TOGGLE }\n\t\t\tonToggle={ togglePublishSidebar }\n\t\t\tsetEntitiesSavedStatesCallback={ setEntitiesSavedStatesCallback }\n\t\t/>\n\t);\n}\n\nexport default compose(\n\twithSelect( ( select ) => ( {\n\t\thasPublishAction:\n\t\t\tselect( editorStore ).getCurrentPost()?._links?.[\n\t\t\t\t'wp:action-publish'\n\t\t\t] ?? false,\n\t\tisBeingScheduled: select( editorStore ).isEditedPostBeingScheduled(),\n\t\tisPending: select( editorStore ).isCurrentPostPending(),\n\t\tisPublished: select( editorStore ).isCurrentPostPublished(),\n\t\tisPublishSidebarEnabled:\n\t\t\tselect( editorStore ).isPublishSidebarEnabled(),\n\t\tisPublishSidebarOpened:\n\t\t\tselect( editPostStore ).isPublishSidebarOpened(),\n\t\tisScheduled: select( editorStore ).isCurrentPostScheduled(),\n\t} ) ),\n\twithDispatch( ( dispatch ) => {\n\t\tconst { togglePublishSidebar } = dispatch( editPostStore );\n\t\treturn {\n\t\t\ttogglePublishSidebar,\n\t\t};\n\t} )\n)( PostPublishButtonOrToggle );\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-post/src/components/header/post-publish-button-or-toggle.js"],"names":["useViewportMatch","compose","withDispatch","withSelect","PostPublishButton","store","editorStore","editPostStore","PostPublishButtonOrToggle","forceIsDirty","forceIsSaving","hasPublishAction","isBeingScheduled","isPending","isPublished","isPublishSidebarEnabled","isPublishSidebarOpened","isScheduled","togglePublishSidebar","setEntitiesSavedStatesCallback","IS_TOGGLE","IS_BUTTON","isSmallerThanMediumViewport","component","select","getCurrentPost","_links","isEditedPostBeingScheduled","isCurrentPostPending","isCurrentPostPublished","isCurrentPostScheduled","dispatch"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,gBAAT,EAA2BC,OAA3B,QAA0C,oBAA1C;AACA,SAASC,YAAT,EAAuBC,UAAvB,QAAyC,iBAAzC;AACA,SAASC,iBAAT,EAA4BC,KAAK,IAAIC,WAArC,QAAwD,mBAAxD;AAEA;AACA;AACA;;AACA,SAASD,KAAK,IAAIE,aAAlB,QAAuC,aAAvC;AAEA,OAAO,SAASC,yBAAT,CAAoC;AAC1CC,EAAAA,YAD0C;AAE1CC,EAAAA,aAF0C;AAG1CC,EAAAA,gBAH0C;AAI1CC,EAAAA,gBAJ0C;AAK1CC,EAAAA,SAL0C;AAM1CC,EAAAA,WAN0C;AAO1CC,EAAAA,uBAP0C;AAQ1CC,EAAAA,sBAR0C;AAS1CC,EAAAA,WAT0C;AAU1CC,EAAAA,oBAV0C;AAW1CC,EAAAA;AAX0C,CAApC,EAYH;AACH,QAAMC,SAAS,GAAG,QAAlB;AACA,QAAMC,SAAS,GAAG,QAAlB;AACA,QAAMC,2BAA2B,GAAGtB,gBAAgB,CAAE,QAAF,EAAY,GAAZ,CAApD;AACA,MAAIuB,SAAJ;AAEA;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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AxB,EAX0B;AAY3BC,IAAAA,WAAW,EAAEO,MAAM,CAAElB,WAAF,CAAN,CAAsBwB,sBAAtB;AAZc,GAAhB;AAAA,CAAF,CADW,EAerB5B,YAAY,CAAI6B,QAAF,IAAgB;AAC7B,QAAM;AAAEb,IAAAA;AAAF,MAA2Ba,QAAQ,CAAExB,aAAF,CAAzC;AACA,SAAO;AACNW,IAAAA;AADM,GAAP;AAGA,CALW,CAfS,CAAP,CAqBZV,yBArBY,CAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useViewportMatch, compose } from '@wordpress/compose';\nimport { withDispatch, withSelect } from '@wordpress/data';\nimport { PostPublishButton, store as editorStore } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { store as editPostStore } from '../../store';\n\nexport function PostPublishButtonOrToggle( {\n\tforceIsDirty,\n\tforceIsSaving,\n\thasPublishAction,\n\tisBeingScheduled,\n\tisPending,\n\tisPublished,\n\tisPublishSidebarEnabled,\n\tisPublishSidebarOpened,\n\tisScheduled,\n\ttogglePublishSidebar,\n\tsetEntitiesSavedStatesCallback,\n} ) {\n\tconst IS_TOGGLE = 'toggle';\n\tconst IS_BUTTON = 'button';\n\tconst isSmallerThanMediumViewport = useViewportMatch( 'medium', '<' );\n\tlet component;\n\n\t/**\n\t * Conditions to show a BUTTON (publish directly) or a TOGGLE (open publish sidebar):\n\t *\n\t * 1) We want to show a BUTTON when the post status is at the _final stage_\n\t * for a particular role (see https://wordpress.org/documentation/article/post-status/):\n\t *\n\t * - is published\n\t * - is scheduled to be published\n\t * - is pending and can't be published (but only for viewports >= medium).\n\t * \t Originally, we considered showing a button for pending posts that couldn't be published\n\t * \t (for example, for an author with the contributor role). Some languages can have\n\t * \t long translations for \"Submit for review\", so given the lack of UI real estate available\n\t * \t we decided to take into account the viewport in that case.\n\t * \t See: https://github.com/WordPress/gutenberg/issues/10475\n\t *\n\t * 2) Then, in small viewports, we'll show a TOGGLE.\n\t *\n\t * 3) Finally, we'll use the publish sidebar status to decide:\n\t *\n\t * - if it is enabled, we show a TOGGLE\n\t * - if it is disabled, we show a BUTTON\n\t */\n\tif (\n\t\tisPublished ||\n\t\t( isScheduled && isBeingScheduled ) ||\n\t\t( isPending && ! hasPublishAction && ! isSmallerThanMediumViewport )\n\t) {\n\t\tcomponent = IS_BUTTON;\n\t} else if ( isSmallerThanMediumViewport ) {\n\t\tcomponent = IS_TOGGLE;\n\t} else if ( isPublishSidebarEnabled ) {\n\t\tcomponent = IS_TOGGLE;\n\t} else {\n\t\tcomponent = IS_BUTTON;\n\t}\n\n\treturn (\n\t\t<PostPublishButton\n\t\t\tforceIsDirty={ forceIsDirty }\n\t\t\tforceIsSaving={ forceIsSaving }\n\t\t\tisOpen={ isPublishSidebarOpened }\n\t\t\tisToggle={ component === IS_TOGGLE }\n\t\t\tonToggle={ togglePublishSidebar }\n\t\t\tsetEntitiesSavedStatesCallback={ setEntitiesSavedStatesCallback }\n\t\t/>\n\t);\n}\n\nexport default compose(\n\twithSelect( ( select ) => ( {\n\t\thasPublishAction:\n\t\t\tselect( editorStore ).getCurrentPost()?._links?.[\n\t\t\t\t'wp:action-publish'\n\t\t\t] ?? false,\n\t\tisBeingScheduled: select( editorStore ).isEditedPostBeingScheduled(),\n\t\tisPending: select( editorStore ).isCurrentPostPending(),\n\t\tisPublished: select( editorStore ).isCurrentPostPublished(),\n\t\tisPublishSidebarEnabled:\n\t\t\tselect( editorStore ).isPublishSidebarEnabled(),\n\t\tisPublishSidebarOpened:\n\t\t\tselect( editPostStore ).isPublishSidebarOpened(),\n\t\tisScheduled: select( editorStore ).isCurrentPostScheduled(),\n\t} ) ),\n\twithDispatch( ( dispatch ) => {\n\t\tconst { togglePublishSidebar } = dispatch( editPostStore );\n\t\treturn {\n\t\t\ttogglePublishSidebar,\n\t\t};\n\t} )\n)( PostPublishButtonOrToggle );\n"]}
@@ -10,16 +10,13 @@ const {
10
10
  Slot
11
11
  } = createSlotFill('ToolsMoreMenuGroup');
12
12
 
13
- ToolsMoreMenuGroup.Slot = _ref => {
14
- let {
15
- fillProps
16
- } = _ref;
17
- return createElement(Slot, {
18
- fillProps: fillProps
19
- }, fills => fills.length > 0 && createElement(MenuGroup, {
20
- label: __('Tools')
21
- }, fills));
22
- };
13
+ ToolsMoreMenuGroup.Slot = ({
14
+ fillProps
15
+ }) => createElement(Slot, {
16
+ fillProps: fillProps
17
+ }, fills => fills.length > 0 && createElement(MenuGroup, {
18
+ label: __('Tools')
19
+ }, fills));
23
20
 
24
21
  export default ToolsMoreMenuGroup;
25
22
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-post/src/components/header/tools-more-menu-group/index.js"],"names":["createSlotFill","MenuGroup","__","Fill","ToolsMoreMenuGroup","Slot","fillProps","fills","length"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,cAAT,EAAyBC,SAAzB,QAA0C,uBAA1C;AACA,SAASC,EAAT,QAAmB,iBAAnB;AAEA,MAAM;AAAEC,EAAAA,IAAI,EAAEC,kBAAR;AAA4BC,EAAAA;AAA5B,IACLL,cAAc,CAAE,oBAAF,CADf;;AAGAI,kBAAkB,CAACC,IAAnB,GAA0B;AAAA,MAAE;AAAEC,IAAAA;AAAF,GAAF;AAAA,SACzB,cAAC,IAAD;AAAM,IAAA,SAAS,EAAGA;AAAlB,KACKC,KAAF,IACDA,KAAK,CAACC,MAAN,GAAe,CAAf,IACC,cAAC,SAAD;AAAW,IAAA,KAAK,EAAGN,EAAE,CAAE,OAAF;AAArB,KAAqCK,KAArC,CAHH,CADyB;AAAA,CAA1B;;AAUA,eAAeH,kBAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createSlotFill, MenuGroup } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\nconst { Fill: ToolsMoreMenuGroup, Slot } =\n\tcreateSlotFill( 'ToolsMoreMenuGroup' );\n\nToolsMoreMenuGroup.Slot = ( { fillProps } ) => (\n\t<Slot fillProps={ fillProps }>\n\t\t{ ( fills ) =>\n\t\t\tfills.length > 0 && (\n\t\t\t\t<MenuGroup label={ __( 'Tools' ) }>{ fills }</MenuGroup>\n\t\t\t)\n\t\t}\n\t</Slot>\n);\n\nexport default ToolsMoreMenuGroup;\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-post/src/components/header/tools-more-menu-group/index.js"],"names":["createSlotFill","MenuGroup","__","Fill","ToolsMoreMenuGroup","Slot","fillProps","fills","length"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,cAAT,EAAyBC,SAAzB,QAA0C,uBAA1C;AACA,SAASC,EAAT,QAAmB,iBAAnB;AAEA,MAAM;AAAEC,EAAAA,IAAI,EAAEC,kBAAR;AAA4BC,EAAAA;AAA5B,IACLL,cAAc,CAAE,oBAAF,CADf;;AAGAI,kBAAkB,CAACC,IAAnB,GAA0B,CAAE;AAAEC,EAAAA;AAAF,CAAF,KACzB,cAAC,IAAD;AAAM,EAAA,SAAS,EAAGA;AAAlB,GACKC,KAAF,IACDA,KAAK,CAACC,MAAN,GAAe,CAAf,IACC,cAAC,SAAD;AAAW,EAAA,KAAK,EAAGN,EAAE,CAAE,OAAF;AAArB,GAAqCK,KAArC,CAHH,CADD;;AAUA,eAAeH,kBAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createSlotFill, MenuGroup } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\nconst { Fill: ToolsMoreMenuGroup, Slot } =\n\tcreateSlotFill( 'ToolsMoreMenuGroup' );\n\nToolsMoreMenuGroup.Slot = ( { fillProps } ) => (\n\t<Slot fillProps={ fillProps }>\n\t\t{ ( fills ) =>\n\t\t\tfills.length > 0 && (\n\t\t\t\t<MenuGroup label={ __( 'Tools' ) }>{ fills }</MenuGroup>\n\t\t\t)\n\t\t}\n\t</Slot>\n);\n\nexport default ToolsMoreMenuGroup;\n"]}
@@ -19,7 +19,6 @@ import { store as postEditorStore } from '../../../store';
19
19
  function WritingMenu() {
20
20
  const registry = useRegistry();
21
21
  const isDistractionFree = useSelect(select => select(blockEditorStore).getSettings().isDistractionFree, []);
22
- const blocks = useSelect(select => select(blockEditorStore).getBlocks(), []);
23
22
  const {
24
23
  setIsInserterOpened,
25
24
  setIsListViewOpened,
@@ -28,9 +27,6 @@ function WritingMenu() {
28
27
  const {
29
28
  set: setPreference
30
29
  } = useDispatch(preferencesStore);
31
- const {
32
- selectBlock
33
- } = useDispatch(blockEditorStore);
34
30
 
35
31
  const toggleDistractionFree = () => {
36
32
  registry.batch(() => {
@@ -38,10 +34,6 @@ function WritingMenu() {
38
34
  setIsInserterOpened(false);
39
35
  setIsListViewOpened(false);
40
36
  closeGeneralSidebar();
41
-
42
- if (!isDistractionFree && !!blocks.length) {
43
- selectBlock(blocks[0].clientId);
44
- }
45
37
  });
46
38
  };
47
39
 
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-post/src/components/header/writing-menu/index.js"],"names":["useSelect","useDispatch","useRegistry","MenuGroup","__","_x","useViewportMatch","displayShortcut","PreferenceToggleMenuItem","store","preferencesStore","blockEditorStore","postEditorStore","WritingMenu","registry","isDistractionFree","select","getSettings","blocks","getBlocks","setIsInserterOpened","setIsListViewOpened","closeGeneralSidebar","set","setPreference","selectBlock","toggleDistractionFree","batch","length","clientId","isLargeViewport","secondary","primaryShift"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,SAAT,EAAoBC,WAApB,EAAiCC,WAAjC,QAAoD,iBAApD;AACA,SAASC,SAAT,QAA0B,uBAA1B;AACA,SAASC,EAAT,EAAaC,EAAb,QAAuB,iBAAvB;AACA,SAASC,gBAAT,QAAiC,oBAAjC;AACA,SAASC,eAAT,QAAgC,qBAAhC;AACA,SACCC,wBADD,EAECC,KAAK,IAAIC,gBAFV,QAGO,wBAHP;AAIA,SAASD,KAAK,IAAIE,gBAAlB,QAA0C,yBAA1C;AAEA;AACA;AACA;;AACA,SAASF,KAAK,IAAIG,eAAlB,QAAyC,gBAAzC;;AAEA,SAASC,WAAT,GAAuB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E,CAAE,mCAAF,CAPxB;AAQC,IAAA,QAAQ,EAAGG,eAAe,CAACyB,YAAhB,CAA8B,IAA9B;AARZ,IA7BD,CADD;AA0CA;;AAED,eAAenB,WAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch, useRegistry } from '@wordpress/data';\nimport { MenuGroup } from '@wordpress/components';\nimport { __, _x } from '@wordpress/i18n';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { displayShortcut } from '@wordpress/keycodes';\nimport {\n\tPreferenceToggleMenuItem,\n\tstore as preferencesStore,\n} from '@wordpress/preferences';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { store as postEditorStore } from '../../../store';\n\nfunction WritingMenu() {\n\tconst registry = useRegistry();\n\tconst isDistractionFree = useSelect(\n\t\t( select ) =>\n\t\t\tselect( blockEditorStore ).getSettings().isDistractionFree,\n\t\t[]\n\t);\n\n\tconst blocks = useSelect(\n\t\t( select ) => select( blockEditorStore ).getBlocks(),\n\t\t[]\n\t);\n\n\tconst { setIsInserterOpened, setIsListViewOpened, closeGeneralSidebar } =\n\t\tuseDispatch( postEditorStore );\n\tconst { set: setPreference } = useDispatch( preferencesStore );\n\n\tconst { selectBlock } = useDispatch( blockEditorStore );\n\n\tconst toggleDistractionFree = () => {\n\t\tregistry.batch( () => {\n\t\t\tsetPreference( 'core/edit-post', 'fixedToolbar', false );\n\t\t\tsetIsInserterOpened( false );\n\t\t\tsetIsListViewOpened( false );\n\t\t\tcloseGeneralSidebar();\n\t\t\tif ( ! isDistractionFree && !! blocks.length ) {\n\t\t\t\tselectBlock( blocks[ 0 ].clientId );\n\t\t\t}\n\t\t} );\n\t};\n\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tif ( ! isLargeViewport ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<MenuGroup label={ _x( 'View', 'noun' ) }>\n\t\t\t<PreferenceToggleMenuItem\n\t\t\t\tscope=\"core/edit-post\"\n\t\t\t\tdisabled={ isDistractionFree }\n\t\t\t\tname=\"fixedToolbar\"\n\t\t\t\tlabel={ __( 'Top toolbar' ) }\n\t\t\t\tinfo={ __(\n\t\t\t\t\t'Access all block and document tools in a single place'\n\t\t\t\t) }\n\t\t\t\tmessageActivated={ __( 'Top toolbar activated' ) }\n\t\t\t\tmessageDeactivated={ __( 'Top toolbar deactivated' ) }\n\t\t\t/>\n\t\t\t<PreferenceToggleMenuItem\n\t\t\t\tscope=\"core/edit-post\"\n\t\t\t\tname=\"focusMode\"\n\t\t\t\tlabel={ __( 'Spotlight mode' ) }\n\t\t\t\tinfo={ __( 'Focus on one block at a time' ) }\n\t\t\t\tmessageActivated={ __( 'Spotlight mode activated' ) }\n\t\t\t\tmessageDeactivated={ __( 'Spotlight mode deactivated' ) }\n\t\t\t/>\n\t\t\t<PreferenceToggleMenuItem\n\t\t\t\tscope=\"core/edit-post\"\n\t\t\t\tname=\"fullscreenMode\"\n\t\t\t\tlabel={ __( 'Fullscreen mode' ) }\n\t\t\t\tinfo={ __( 'Show and hide admin UI' ) }\n\t\t\t\tmessageActivated={ __( 'Fullscreen mode activated' ) }\n\t\t\t\tmessageDeactivated={ __( 'Fullscreen mode deactivated' ) }\n\t\t\t\tshortcut={ displayShortcut.secondary( 'f' ) }\n\t\t\t/>\n\t\t\t<PreferenceToggleMenuItem\n\t\t\t\tscope=\"core/edit-post\"\n\t\t\t\tname=\"distractionFree\"\n\t\t\t\tonToggle={ toggleDistractionFree }\n\t\t\t\tlabel={ __( 'Distraction free' ) }\n\t\t\t\tinfo={ __( 'Write with calmness' ) }\n\t\t\t\tmessageActivated={ __( 'Distraction free mode activated' ) }\n\t\t\t\tmessageDeactivated={ __( 'Distraction free mode deactivated' ) }\n\t\t\t\tshortcut={ displayShortcut.primaryShift( '\\\\' ) }\n\t\t\t/>\n\t\t</MenuGroup>\n\t);\n}\n\nexport default WritingMenu;\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-post/src/components/header/writing-menu/index.js"],"names":["useSelect","useDispatch","useRegistry","MenuGroup","__","_x","useViewportMatch","displayShortcut","PreferenceToggleMenuItem","store","preferencesStore","blockEditorStore","postEditorStore","WritingMenu","registry","isDistractionFree","select","getSettings","setIsInserterOpened","setIsListViewOpened","closeGeneralSidebar","set","setPreference","toggleDistractionFree","batch","isLargeViewport","secondary","primaryShift"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,SAAT,EAAoBC,WAApB,EAAiCC,WAAjC,QAAoD,iBAApD;AACA,SAASC,SAAT,QAA0B,uBAA1B;AACA,SAASC,EAAT,EAAaC,EAAb,QAAuB,iBAAvB;AACA,SAASC,gBAAT,QAAiC,oBAAjC;AACA,SAASC,eAAT,QAAgC,qBAAhC;AACA,SACCC,wBADD,EAECC,KAAK,IAAIC,gBAFV,QAGO,wBAHP;AAIA,SAASD,KAAK,IAAIE,gBAAlB,QAA0C,yBAA1C;AAEA;AACA;AACA;;AACA,SAASF,KAAK,IAAIG,eAAlB,QAAyC,gBAAzC;;AAEA,SAASC,WAAT,GAAuB;AACtB,QAAMC,QAAQ,GAAGZ,WAAW,EAA5B;AACA,QAAMa,iBAAiB,GAAGf,SAAS,CAChCgB,MAAF,IACCA,MAAM,CAAEL,gBAAF,CAAN,CAA2BM,WAA3B,GAAyCF,iBAFR,EAGlC,EAHkC,CAAnC;AAMA,QAAM;AAAEG,IAAAA,mBAAF;AAAuBC,IAAAA,mBAAvB;AAA4CC,IAAAA;AAA5C,MACLnB,WAAW,CAAEW,eAAF,CADZ;AAEA,QAAM;AAAES,IAAAA,GAAG,EAAEC;AAAP,MAAyBrB,WAAW,CAAES,gBAAF,CAA1C;;AAEA,QAAMa,qBAAqB,GAAG,MAAM;AACnCT,IAAAA,QAAQ,CAACU,KAAT,CAAgB,MAAM;AACrBF,MAAAA,aAAa,CAAE,gBAAF,EAAoB,cAApB,EAAoC,KAApC,CAAb;AACAJ,MAAAA,mBAAmB,CAAE,KAAF,CAAnB;AACAC,MAAAA,mB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,IApBD,EA6BC,cAAC,wBAAD;AACC,IAAA,KAAK,EAAC,gBADP;AAEC,IAAA,IAAI,EAAC,iBAFN;AAGC,IAAA,QAAQ,EAAGH,qBAHZ;AAIC,IAAA,KAAK,EAAGnB,EAAE,CAAE,kBAAF,CAJX;AAKC,IAAA,IAAI,EAAGA,EAAE,CAAE,qBAAF,CALV;AAMC,IAAA,gBAAgB,EAAGA,EAAE,CAAE,iCAAF,CANtB;AAOC,IAAA,kBAAkB,EAAGA,EAAE,CAAE,mCAAF,CAPxB;AAQC,IAAA,QAAQ,EAAGG,eAAe,CAACoB,YAAhB,CAA8B,IAA9B;AARZ,IA7BD,CADD;AA0CA;;AAED,eAAed,WAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch, useRegistry } from '@wordpress/data';\nimport { MenuGroup } from '@wordpress/components';\nimport { __, _x } from '@wordpress/i18n';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { displayShortcut } from '@wordpress/keycodes';\nimport {\n\tPreferenceToggleMenuItem,\n\tstore as preferencesStore,\n} from '@wordpress/preferences';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { store as postEditorStore } from '../../../store';\n\nfunction WritingMenu() {\n\tconst registry = useRegistry();\n\tconst isDistractionFree = useSelect(\n\t\t( select ) =>\n\t\t\tselect( blockEditorStore ).getSettings().isDistractionFree,\n\t\t[]\n\t);\n\n\tconst { setIsInserterOpened, setIsListViewOpened, closeGeneralSidebar } =\n\t\tuseDispatch( postEditorStore );\n\tconst { set: setPreference } = useDispatch( preferencesStore );\n\n\tconst toggleDistractionFree = () => {\n\t\tregistry.batch( () => {\n\t\t\tsetPreference( 'core/edit-post', 'fixedToolbar', false );\n\t\t\tsetIsInserterOpened( false );\n\t\t\tsetIsListViewOpened( false );\n\t\t\tcloseGeneralSidebar();\n\t\t} );\n\t};\n\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tif ( ! isLargeViewport ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<MenuGroup label={ _x( 'View', 'noun' ) }>\n\t\t\t<PreferenceToggleMenuItem\n\t\t\t\tscope=\"core/edit-post\"\n\t\t\t\tdisabled={ isDistractionFree }\n\t\t\t\tname=\"fixedToolbar\"\n\t\t\t\tlabel={ __( 'Top toolbar' ) }\n\t\t\t\tinfo={ __(\n\t\t\t\t\t'Access all block and document tools in a single place'\n\t\t\t\t) }\n\t\t\t\tmessageActivated={ __( 'Top toolbar activated' ) }\n\t\t\t\tmessageDeactivated={ __( 'Top toolbar deactivated' ) }\n\t\t\t/>\n\t\t\t<PreferenceToggleMenuItem\n\t\t\t\tscope=\"core/edit-post\"\n\t\t\t\tname=\"focusMode\"\n\t\t\t\tlabel={ __( 'Spotlight mode' ) }\n\t\t\t\tinfo={ __( 'Focus on one block at a time' ) }\n\t\t\t\tmessageActivated={ __( 'Spotlight mode activated' ) }\n\t\t\t\tmessageDeactivated={ __( 'Spotlight mode deactivated' ) }\n\t\t\t/>\n\t\t\t<PreferenceToggleMenuItem\n\t\t\t\tscope=\"core/edit-post\"\n\t\t\t\tname=\"fullscreenMode\"\n\t\t\t\tlabel={ __( 'Fullscreen mode' ) }\n\t\t\t\tinfo={ __( 'Show and hide admin UI' ) }\n\t\t\t\tmessageActivated={ __( 'Fullscreen mode activated' ) }\n\t\t\t\tmessageDeactivated={ __( 'Fullscreen mode deactivated' ) }\n\t\t\t\tshortcut={ displayShortcut.secondary( 'f' ) }\n\t\t\t/>\n\t\t\t<PreferenceToggleMenuItem\n\t\t\t\tscope=\"core/edit-post\"\n\t\t\t\tname=\"distractionFree\"\n\t\t\t\tonToggle={ toggleDistractionFree }\n\t\t\t\tlabel={ __( 'Distraction free' ) }\n\t\t\t\tinfo={ __( 'Write with calmness' ) }\n\t\t\t\tmessageActivated={ __( 'Distraction free mode activated' ) }\n\t\t\t\tmessageDeactivated={ __( 'Distraction free mode deactivated' ) }\n\t\t\t\tshortcut={ displayShortcut.primaryShift( '\\\\' ) }\n\t\t\t/>\n\t\t</MenuGroup>\n\t);\n}\n\nexport default WritingMenu;\n"]}
@@ -11,10 +11,9 @@ import { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';
11
11
 
12
12
  import Shortcut from './shortcut';
13
13
 
14
- function DynamicShortcut(_ref) {
15
- let {
16
- name
17
- } = _ref;
14
+ function DynamicShortcut({
15
+ name
16
+ }) {
18
17
  const {
19
18
  keyCombination,
20
19
  description,
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-post/src/components/keyboard-shortcut-help-modal/dynamic-shortcut.js"],"names":["useSelect","store","keyboardShortcutsStore","Shortcut","DynamicShortcut","name","keyCombination","description","aliases","select","getShortcutKeyCombination","getShortcutDescription","getShortcutAliases"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,SAAT,QAA0B,iBAA1B;AACA,SAASC,KAAK,IAAIC,sBAAlB,QAAgD,+BAAhD;AAEA;AACA;AACA;;AACA,OAAOC,QAAP,MAAqB,YAArB;;AAEA,SAASC,eAAT,OAAqC;AAAA,MAAX;AAAEC,IAAAA;AAAF,GAAW;AACpC,QAAM;AAAEC,IAAAA,cAAF;AAAkBC,IAAAA,WAAlB;AAA+BC,IAAAA;AAA/B,MAA2CR,SAAS,CACvDS,MAAF,IAAc;AACb,UAAM;AACLC,MAAAA,yBADK;AAELC,MAAAA,sBAFK;AAGLC,MAAAA;AAHK,QAIFH,MAAM,CAAEP,sBAAF,CAJV;AAMA,WAAO;AACNI,MAAAA,cAAc,EAAEI,yBAAyB,CAAEL,IAAF,CADnC;AAENG,MAAAA,OAAO,EAAEI,kBAAkB,CAAEP,IAAF,CAFrB;AAGNE,MAAAA,WAAW,EAAEI,sBAAsB,CAAEN,IAAF;AAH7B,KAAP;AAKA,GAbwD,EAczD,CAAEA,IAAF,CAdyD,CAA1D;;AAiBA,MAAK,CAAEC,cAAP,EAAwB;AACvB,WAAO,IAAP;AACA;;AAED,SACC,cAAC,QAAD;AACC,IAAA,cAAc,EAAGA,cADlB;AAEC,IAAA,WAAW,EAAGC,WAFf;AAGC,IAAA,OAAO,EAAGC;AAHX,IADD;AAOA;;AAED,eAAeJ,eAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\n\n/**\n * Internal dependencies\n */\nimport Shortcut from './shortcut';\n\nfunction DynamicShortcut( { name } ) {\n\tconst { keyCombination, description, aliases } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetShortcutKeyCombination,\n\t\t\t\tgetShortcutDescription,\n\t\t\t\tgetShortcutAliases,\n\t\t\t} = select( keyboardShortcutsStore );\n\n\t\t\treturn {\n\t\t\t\tkeyCombination: getShortcutKeyCombination( name ),\n\t\t\t\taliases: getShortcutAliases( name ),\n\t\t\t\tdescription: getShortcutDescription( name ),\n\t\t\t};\n\t\t},\n\t\t[ name ]\n\t);\n\n\tif ( ! keyCombination ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Shortcut\n\t\t\tkeyCombination={ keyCombination }\n\t\t\tdescription={ description }\n\t\t\taliases={ aliases }\n\t\t/>\n\t);\n}\n\nexport default DynamicShortcut;\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-post/src/components/keyboard-shortcut-help-modal/dynamic-shortcut.js"],"names":["useSelect","store","keyboardShortcutsStore","Shortcut","DynamicShortcut","name","keyCombination","description","aliases","select","getShortcutKeyCombination","getShortcutDescription","getShortcutAliases"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,SAAT,QAA0B,iBAA1B;AACA,SAASC,KAAK,IAAIC,sBAAlB,QAAgD,+BAAhD;AAEA;AACA;AACA;;AACA,OAAOC,QAAP,MAAqB,YAArB;;AAEA,SAASC,eAAT,CAA0B;AAAEC,EAAAA;AAAF,CAA1B,EAAqC;AACpC,QAAM;AAAEC,IAAAA,cAAF;AAAkBC,IAAAA,WAAlB;AAA+BC,IAAAA;AAA/B,MAA2CR,SAAS,CACvDS,MAAF,IAAc;AACb,UAAM;AACLC,MAAAA,yBADK;AAELC,MAAAA,sBAFK;AAGLC,MAAAA;AAHK,QAIFH,MAAM,CAAEP,sBAAF,CAJV;AAMA,WAAO;AACNI,MAAAA,cAAc,EAAEI,yBAAyB,CAAEL,IAAF,CADnC;AAENG,MAAAA,OAAO,EAAEI,kBAAkB,CAAEP,IAAF,CAFrB;AAGNE,MAAAA,WAAW,EAAEI,sBAAsB,CAAEN,IAAF;AAH7B,KAAP;AAKA,GAbwD,EAczD,CAAEA,IAAF,CAdyD,CAA1D;;AAiBA,MAAK,CAAEC,cAAP,EAAwB;AACvB,WAAO,IAAP;AACA;;AAED,SACC,cAAC,QAAD;AACC,IAAA,cAAc,EAAGA,cADlB;AAEC,IAAA,WAAW,EAAGC,WAFf;AAGC,IAAA,OAAO,EAAGC;AAHX,IADD;AAOA;;AAED,eAAeJ,eAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\n\n/**\n * Internal dependencies\n */\nimport Shortcut from './shortcut';\n\nfunction DynamicShortcut( { name } ) {\n\tconst { keyCombination, description, aliases } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetShortcutKeyCombination,\n\t\t\t\tgetShortcutDescription,\n\t\t\t\tgetShortcutAliases,\n\t\t\t} = select( keyboardShortcutsStore );\n\n\t\t\treturn {\n\t\t\t\tkeyCombination: getShortcutKeyCombination( name ),\n\t\t\t\taliases: getShortcutAliases( name ),\n\t\t\t\tdescription: getShortcutDescription( name ),\n\t\t\t};\n\t\t},\n\t\t[ name ]\n\t);\n\n\tif ( ! keyCombination ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Shortcut\n\t\t\tkeyCombination={ keyCombination }\n\t\t\tdescription={ description }\n\t\t\taliases={ aliases }\n\t\t/>\n\t);\n}\n\nexport default DynamicShortcut;\n"]}
@@ -23,52 +23,45 @@ import DynamicShortcut from './dynamic-shortcut';
23
23
  import { store as editPostStore } from '../../store';
24
24
  const MODAL_NAME = 'edit-post/keyboard-shortcut-help';
25
25
 
26
- const ShortcutList = _ref => {
27
- let {
28
- shortcuts
29
- } = _ref;
30
- return (
31
- /*
32
- * Disable reason: The `list` ARIA role is redundant but
33
- * Safari+VoiceOver won't announce the list otherwise.
34
- */
35
-
36
- /* eslint-disable jsx-a11y/no-redundant-roles */
37
- createElement("ul", {
38
- className: "edit-post-keyboard-shortcut-help-modal__shortcut-list",
39
- role: "list"
40
- }, shortcuts.map((shortcut, index) => createElement("li", {
41
- className: "edit-post-keyboard-shortcut-help-modal__shortcut",
42
- key: index
43
- }, typeof shortcut === 'string' ? createElement(DynamicShortcut, {
44
- name: shortcut
45
- }) : createElement(Shortcut, shortcut))))
46
- /* eslint-enable jsx-a11y/no-redundant-roles */
26
+ const ShortcutList = ({
27
+ shortcuts
28
+ }) =>
29
+ /*
30
+ * Disable reason: The `list` ARIA role is redundant but
31
+ * Safari+VoiceOver won't announce the list otherwise.
32
+ */
47
33
 
48
- );
49
- };
34
+ /* eslint-disable jsx-a11y/no-redundant-roles */
35
+ createElement("ul", {
36
+ className: "edit-post-keyboard-shortcut-help-modal__shortcut-list",
37
+ role: "list"
38
+ }, shortcuts.map((shortcut, index) => createElement("li", {
39
+ className: "edit-post-keyboard-shortcut-help-modal__shortcut",
40
+ key: index
41
+ }, typeof shortcut === 'string' ? createElement(DynamicShortcut, {
42
+ name: shortcut
43
+ }) : createElement(Shortcut, { ...shortcut
44
+ }))))
45
+ /* eslint-enable jsx-a11y/no-redundant-roles */
46
+ ;
50
47
 
51
- const ShortcutSection = _ref2 => {
52
- let {
53
- title,
54
- shortcuts,
55
- className
56
- } = _ref2;
57
- return createElement("section", {
58
- className: classnames('edit-post-keyboard-shortcut-help-modal__section', className)
59
- }, !!title && createElement("h2", {
60
- className: "edit-post-keyboard-shortcut-help-modal__section-title"
61
- }, title), createElement(ShortcutList, {
62
- shortcuts: shortcuts
63
- }));
64
- };
48
+ const ShortcutSection = ({
49
+ title,
50
+ shortcuts,
51
+ className
52
+ }) => createElement("section", {
53
+ className: classnames('edit-post-keyboard-shortcut-help-modal__section', className)
54
+ }, !!title && createElement("h2", {
55
+ className: "edit-post-keyboard-shortcut-help-modal__section-title"
56
+ }, title), createElement(ShortcutList, {
57
+ shortcuts: shortcuts
58
+ }));
65
59
 
66
- const ShortcutCategorySection = _ref3 => {
67
- let {
68
- title,
69
- categoryName,
70
- additionalShortcuts = []
71
- } = _ref3;
60
+ const ShortcutCategorySection = ({
61
+ title,
62
+ categoryName,
63
+ additionalShortcuts = []
64
+ }) => {
72
65
  const categoryShortcuts = useSelect(select => {
73
66
  return select(keyboardShortcutsStore).getCategoryShortcuts(categoryName);
74
67
  }, [categoryName]);
@@ -78,11 +71,10 @@ const ShortcutCategorySection = _ref3 => {
78
71
  });
79
72
  };
80
73
 
81
- export function KeyboardShortcutHelpModal(_ref4) {
82
- let {
83
- isModalActive,
84
- toggleModal
85
- } = _ref4;
74
+ export function KeyboardShortcutHelpModal({
75
+ isModalActive,
76
+ toggleModal
77
+ }) {
86
78
  useShortcut('core/edit-post/keyboard-shortcuts', toggleModal);
87
79
 
88
80
  if (!isModalActive) {
@@ -122,10 +114,9 @@ export function KeyboardShortcutHelpModal(_ref4) {
122
114
  }
123
115
  export default compose([withSelect(select => ({
124
116
  isModalActive: select(editPostStore).isModalActive(MODAL_NAME)
125
- })), withDispatch((dispatch, _ref5) => {
126
- let {
127
- isModalActive
128
- } = _ref5;
117
+ })), withDispatch((dispatch, {
118
+ isModalActive
119
+ }) => {
129
120
  const {
130
121
  openModal,
131
122
  closeModal
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-post/src/components/keyboard-shortcut-help-modal/index.js"],"names":["classnames","Modal","__","useShortcut","store","keyboardShortcutsStore","withSelect","withDispatch","useSelect","compose","textFormattingShortcuts","Shortcut","DynamicShortcut","editPostStore","MODAL_NAME","ShortcutList","shortcuts","map","shortcut","index","ShortcutSection","title","className","ShortcutCategorySection","categoryName","additionalShortcuts","categoryShortcuts","select","getCategoryShortcuts","concat","KeyboardShortcutHelpModal","isModalActive","toggleModal","keyCombination","character","description","ariaLabel","dispatch","openModal","closeModal"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SAASC,KAAT,QAAsB,uBAAtB;AACA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SACCC,WADD,EAECC,KAAK,IAAIC,sBAFV,QAGO,+BAHP;AAIA,SAASC,UAAT,EAAqBC,YAArB,EAAmCC,SAAnC,QAAoD,iBAApD;AACA,SAASC,OAAT,QAAwB,oBAAxB;AAEA;AACA;AACA;;AACA,SAASC,uBAAT,QAAwC,UAAxC;AACA,OAAOC,QAAP,MAAqB,YAArB;AACA,OAAOC,eAAP,MAA4B,oBAA5B;AACA,SAASR,KAAK,IAAIS,aAAlB,QAAuC,aAAvC;AAEA,MAAMC,UAAU,GAAG,kCAAnB;;AAEA,MAAMC,YAAY,GAAG;AAAA,MAAE;AAAEC,IAAAA;AAAF,GAAF;AAAA;AACpB;AACD;AACA;AACA;;AACC;AACA;AACC,MAAA,SAAS,EAAC,uDADX;AAEC,MAAA,IAAI,EAAC;AAFN,OAIGA,SAAS,CAACC,GAAV,CAAe,CAAEC,QAAF,EAAYC,KAAZ,KAChB;AACC,MAAA,SAAS,EAAC,kDADX;AAEC,MAAA,GAAG,EAAGA;AAFP,OAIG,OAAOD,QAAP,KAAoB,QAApB,GACD,cAAC,eAAD;AAAiB,MAAA,IAAI,EAAGA;AAAxB,MADC,GAGD,cAAC,QAAD,EAAeA,QAAf,CAPF,CADC,CAJH;AAiBA;;AAvBoB;AAAA,CAArB;;AA0BA,MAAME,eAAe,GAAG;AAAA,MAAE;AAAEC,IAAAA,KAAF;AAASL,IAAAA,SAAT;AAAoBM,IAAAA;AAApB,GAAF;A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AAE,kBAAF,CADX;AAEC,IAAA,YAAY,EAAC;AAFd,IAVD,EAeC,cAAC,uBAAD;AACC,IAAA,KAAK,EAAGA,EAAE,CAAE,qBAAF,CADX;AAEC,IAAA,YAAY,EAAC;AAFd,IAfD,EAoBC,cAAC,uBAAD;AACC,IAAA,KAAK,EAAGA,EAAE,CAAE,iBAAF,CADX;AAEC,IAAA,YAAY,EAAC,OAFd;AAGC,IAAA,mBAAmB,EAAG,CACrB;AACC+B,MAAAA,cAAc,EAAE;AAAEC,QAAAA,SAAS,EAAE;AAAb,OADjB;AAECC,MAAAA,WAAW,EAAEjC,EAAE,CACd,qDADc,CAFhB;;AAKC;AACAkC,MAAAA,SAAS,EAAElC,EAAE,CAAE,eAAF;AANd,KADqB;AAHvB,IApBD,EAkCC,cAAC,eAAD;AACC,IAAA,KAAK,EAAGA,EAAE,CAAE,iBAAF,CADX;AAEC,IAAA,SAAS,EAAGQ;AAFb,IAlCD,CADD;AAyCA;AAED,eAAeD,OAAO,CAAE,CACvBH,UAAU,CAAIqB,MAAF,KAAgB;AAC3BI,EAAAA,aAAa,EAAEJ,MAAM,CAAEd,aAAF,CAAN,CAAwBkB,aAAxB,CAAuCjB,UAAvC;AADY,CAAhB,CAAF,CADa,EAIvBP,YAAY,CAAE,CAAE8B,QAAF,YAAmC;AAAA,MAAvB;AAAEN,IAAAA;AAAF,GAAuB;AAChD,QAAM;AAAEO,IAAAA,SAAF;AAAaC,IAAAA;AAAb,MAA4BF,QAAQ,CAAExB,aAAF,CAA1C;AAEA,SAAO;AACNmB,IAAAA,WAAW,EAAE,MACZD,aAAa,GAAGQ,UAAU,EAAb,GAAkBD,SAAS,CAAExB,UAAF;AAFnC,GAAP;AAIA,CAPW,CAJW,CAAF,CAAP,CAYVgB,yBAZU,CAAf","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { Modal } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tuseShortcut,\n\tstore as keyboardShortcutsStore,\n} from '@wordpress/keyboard-shortcuts';\nimport { withSelect, withDispatch, useSelect } from '@wordpress/data';\nimport { compose } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { textFormattingShortcuts } from './config';\nimport Shortcut from './shortcut';\nimport DynamicShortcut from './dynamic-shortcut';\nimport { store as editPostStore } from '../../store';\n\nconst MODAL_NAME = 'edit-post/keyboard-shortcut-help';\n\nconst ShortcutList = ( { shortcuts } ) => (\n\t/*\n\t * Disable reason: The `list` ARIA role is redundant but\n\t * Safari+VoiceOver won't announce the list otherwise.\n\t */\n\t/* eslint-disable jsx-a11y/no-redundant-roles */\n\t<ul\n\t\tclassName=\"edit-post-keyboard-shortcut-help-modal__shortcut-list\"\n\t\trole=\"list\"\n\t>\n\t\t{ shortcuts.map( ( shortcut, index ) => (\n\t\t\t<li\n\t\t\t\tclassName=\"edit-post-keyboard-shortcut-help-modal__shortcut\"\n\t\t\t\tkey={ index }\n\t\t\t>\n\t\t\t\t{ typeof shortcut === 'string' ? (\n\t\t\t\t\t<DynamicShortcut name={ shortcut } />\n\t\t\t\t) : (\n\t\t\t\t\t<Shortcut { ...shortcut } />\n\t\t\t\t) }\n\t\t\t</li>\n\t\t) ) }\n\t</ul>\n\t/* eslint-enable jsx-a11y/no-redundant-roles */\n);\n\nconst ShortcutSection = ( { title, shortcuts, className } ) => (\n\t<section\n\t\tclassName={ classnames(\n\t\t\t'edit-post-keyboard-shortcut-help-modal__section',\n\t\t\tclassName\n\t\t) }\n\t>\n\t\t{ !! title && (\n\t\t\t<h2 className=\"edit-post-keyboard-shortcut-help-modal__section-title\">\n\t\t\t\t{ title }\n\t\t\t</h2>\n\t\t) }\n\t\t<ShortcutList shortcuts={ shortcuts } />\n\t</section>\n);\n\nconst ShortcutCategorySection = ( {\n\ttitle,\n\tcategoryName,\n\tadditionalShortcuts = [],\n} ) => {\n\tconst categoryShortcuts = useSelect(\n\t\t( select ) => {\n\t\t\treturn select( keyboardShortcutsStore ).getCategoryShortcuts(\n\t\t\t\tcategoryName\n\t\t\t);\n\t\t},\n\t\t[ categoryName ]\n\t);\n\n\treturn (\n\t\t<ShortcutSection\n\t\t\ttitle={ title }\n\t\t\tshortcuts={ categoryShortcuts.concat( additionalShortcuts ) }\n\t\t/>\n\t);\n};\n\nexport function KeyboardShortcutHelpModal( { isModalActive, toggleModal } ) {\n\tuseShortcut( 'core/edit-post/keyboard-shortcuts', toggleModal );\n\n\tif ( ! isModalActive ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Modal\n\t\t\tclassName=\"edit-post-keyboard-shortcut-help-modal\"\n\t\t\ttitle={ __( 'Keyboard shortcuts' ) }\n\t\t\tcloseButtonLabel={ __( 'Close' ) }\n\t\t\tonRequestClose={ toggleModal }\n\t\t>\n\t\t\t<ShortcutSection\n\t\t\t\tclassName=\"edit-post-keyboard-shortcut-help-modal__main-shortcuts\"\n\t\t\t\tshortcuts={ [ 'core/edit-post/keyboard-shortcuts' ] }\n\t\t\t/>\n\t\t\t<ShortcutCategorySection\n\t\t\t\ttitle={ __( 'Global shortcuts' ) }\n\t\t\t\tcategoryName=\"global\"\n\t\t\t/>\n\n\t\t\t<ShortcutCategorySection\n\t\t\t\ttitle={ __( 'Selection shortcuts' ) }\n\t\t\t\tcategoryName=\"selection\"\n\t\t\t/>\n\n\t\t\t<ShortcutCategorySection\n\t\t\t\ttitle={ __( 'Block shortcuts' ) }\n\t\t\t\tcategoryName=\"block\"\n\t\t\t\tadditionalShortcuts={ [\n\t\t\t\t\t{\n\t\t\t\t\t\tkeyCombination: { character: '/' },\n\t\t\t\t\t\tdescription: __(\n\t\t\t\t\t\t\t'Change the block type after adding a new paragraph.'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t/* translators: The forward-slash character. e.g. '/'. */\n\t\t\t\t\t\tariaLabel: __( 'Forward-slash' ),\n\t\t\t\t\t},\n\t\t\t\t] }\n\t\t\t/>\n\t\t\t<ShortcutSection\n\t\t\t\ttitle={ __( 'Text formatting' ) }\n\t\t\t\tshortcuts={ textFormattingShortcuts }\n\t\t\t/>\n\t\t</Modal>\n\t);\n}\n\nexport default compose( [\n\twithSelect( ( select ) => ( {\n\t\tisModalActive: select( editPostStore ).isModalActive( MODAL_NAME ),\n\t} ) ),\n\twithDispatch( ( dispatch, { isModalActive } ) => {\n\t\tconst { openModal, closeModal } = dispatch( editPostStore );\n\n\t\treturn {\n\t\t\ttoggleModal: () =>\n\t\t\t\tisModalActive ? closeModal() : openModal( MODAL_NAME ),\n\t\t};\n\t} ),\n] )( KeyboardShortcutHelpModal );\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-post/src/components/keyboard-shortcut-help-modal/index.js"],"names":["classnames","Modal","__","useShortcut","store","keyboardShortcutsStore","withSelect","withDispatch","useSelect","compose","textFormattingShortcuts","Shortcut","DynamicShortcut","editPostStore","MODAL_NAME","ShortcutList","shortcuts","map","shortcut","index","ShortcutSection","title","className","ShortcutCategorySection","categoryName","additionalShortcuts","categoryShortcuts","select","getCategoryShortcuts","concat","KeyboardShortcutHelpModal","isModalActive","toggleModal","keyCombination","character","description","ariaLabel","dispatch","openModal","closeModal"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SAASC,KAAT,QAAsB,uBAAtB;AACA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SACCC,WADD,EAECC,KAAK,IAAIC,sBAFV,QAGO,+BAHP;AAIA,SAASC,UAAT,EAAqBC,YAArB,EAAmCC,SAAnC,QAAoD,iBAApD;AACA,SAASC,OAAT,QAAwB,oBAAxB;AAEA;AACA;AACA;;AACA,SAASC,uBAAT,QAAwC,UAAxC;AACA,OAAOC,QAAP,MAAqB,YAArB;AACA,OAAOC,eAAP,MAA4B,oBAA5B;AACA,SAASR,KAAK,IAAIS,aAAlB,QAAuC,aAAvC;AAEA,MAAMC,UAAU,GAAG,kCAAnB;;AAEA,MAAMC,YAAY,GA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CADa,EAIvBP,YAAY,CAAE,CAAE8B,QAAF,EAAY;AAAEN,EAAAA;AAAF,CAAZ,KAAmC;AAChD,QAAM;AAAEO,IAAAA,SAAF;AAAaC,IAAAA;AAAb,MAA4BF,QAAQ,CAAExB,aAAF,CAA1C;AAEA,SAAO;AACNmB,IAAAA,WAAW,EAAE,MACZD,aAAa,GAAGQ,UAAU,EAAb,GAAkBD,SAAS,CAAExB,UAAF;AAFnC,GAAP;AAIA,CAPW,CAJW,CAAF,CAAP,CAYVgB,yBAZU,CAAf","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { Modal } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tuseShortcut,\n\tstore as keyboardShortcutsStore,\n} from '@wordpress/keyboard-shortcuts';\nimport { withSelect, withDispatch, useSelect } from '@wordpress/data';\nimport { compose } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { textFormattingShortcuts } from './config';\nimport Shortcut from './shortcut';\nimport DynamicShortcut from './dynamic-shortcut';\nimport { store as editPostStore } from '../../store';\n\nconst MODAL_NAME = 'edit-post/keyboard-shortcut-help';\n\nconst ShortcutList = ( { shortcuts } ) => (\n\t/*\n\t * Disable reason: The `list` ARIA role is redundant but\n\t * Safari+VoiceOver won't announce the list otherwise.\n\t */\n\t/* eslint-disable jsx-a11y/no-redundant-roles */\n\t<ul\n\t\tclassName=\"edit-post-keyboard-shortcut-help-modal__shortcut-list\"\n\t\trole=\"list\"\n\t>\n\t\t{ shortcuts.map( ( shortcut, index ) => (\n\t\t\t<li\n\t\t\t\tclassName=\"edit-post-keyboard-shortcut-help-modal__shortcut\"\n\t\t\t\tkey={ index }\n\t\t\t>\n\t\t\t\t{ typeof shortcut === 'string' ? (\n\t\t\t\t\t<DynamicShortcut name={ shortcut } />\n\t\t\t\t) : (\n\t\t\t\t\t<Shortcut { ...shortcut } />\n\t\t\t\t) }\n\t\t\t</li>\n\t\t) ) }\n\t</ul>\n\t/* eslint-enable jsx-a11y/no-redundant-roles */\n);\n\nconst ShortcutSection = ( { title, shortcuts, className } ) => (\n\t<section\n\t\tclassName={ classnames(\n\t\t\t'edit-post-keyboard-shortcut-help-modal__section',\n\t\t\tclassName\n\t\t) }\n\t>\n\t\t{ !! title && (\n\t\t\t<h2 className=\"edit-post-keyboard-shortcut-help-modal__section-title\">\n\t\t\t\t{ title }\n\t\t\t</h2>\n\t\t) }\n\t\t<ShortcutList shortcuts={ shortcuts } />\n\t</section>\n);\n\nconst ShortcutCategorySection = ( {\n\ttitle,\n\tcategoryName,\n\tadditionalShortcuts = [],\n} ) => {\n\tconst categoryShortcuts = useSelect(\n\t\t( select ) => {\n\t\t\treturn select( keyboardShortcutsStore ).getCategoryShortcuts(\n\t\t\t\tcategoryName\n\t\t\t);\n\t\t},\n\t\t[ categoryName ]\n\t);\n\n\treturn (\n\t\t<ShortcutSection\n\t\t\ttitle={ title }\n\t\t\tshortcuts={ categoryShortcuts.concat( additionalShortcuts ) }\n\t\t/>\n\t);\n};\n\nexport function KeyboardShortcutHelpModal( { isModalActive, toggleModal } ) {\n\tuseShortcut( 'core/edit-post/keyboard-shortcuts', toggleModal );\n\n\tif ( ! isModalActive ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Modal\n\t\t\tclassName=\"edit-post-keyboard-shortcut-help-modal\"\n\t\t\ttitle={ __( 'Keyboard shortcuts' ) }\n\t\t\tcloseButtonLabel={ __( 'Close' ) }\n\t\t\tonRequestClose={ toggleModal }\n\t\t>\n\t\t\t<ShortcutSection\n\t\t\t\tclassName=\"edit-post-keyboard-shortcut-help-modal__main-shortcuts\"\n\t\t\t\tshortcuts={ [ 'core/edit-post/keyboard-shortcuts' ] }\n\t\t\t/>\n\t\t\t<ShortcutCategorySection\n\t\t\t\ttitle={ __( 'Global shortcuts' ) }\n\t\t\t\tcategoryName=\"global\"\n\t\t\t/>\n\n\t\t\t<ShortcutCategorySection\n\t\t\t\ttitle={ __( 'Selection shortcuts' ) }\n\t\t\t\tcategoryName=\"selection\"\n\t\t\t/>\n\n\t\t\t<ShortcutCategorySection\n\t\t\t\ttitle={ __( 'Block shortcuts' ) }\n\t\t\t\tcategoryName=\"block\"\n\t\t\t\tadditionalShortcuts={ [\n\t\t\t\t\t{\n\t\t\t\t\t\tkeyCombination: { character: '/' },\n\t\t\t\t\t\tdescription: __(\n\t\t\t\t\t\t\t'Change the block type after adding a new paragraph.'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t/* translators: The forward-slash character. e.g. '/'. */\n\t\t\t\t\t\tariaLabel: __( 'Forward-slash' ),\n\t\t\t\t\t},\n\t\t\t\t] }\n\t\t\t/>\n\t\t\t<ShortcutSection\n\t\t\t\ttitle={ __( 'Text formatting' ) }\n\t\t\t\tshortcuts={ textFormattingShortcuts }\n\t\t\t/>\n\t\t</Modal>\n\t);\n}\n\nexport default compose( [\n\twithSelect( ( select ) => ( {\n\t\tisModalActive: select( editPostStore ).isModalActive( MODAL_NAME ),\n\t} ) ),\n\twithDispatch( ( dispatch, { isModalActive } ) => {\n\t\tconst { openModal, closeModal } = dispatch( editPostStore );\n\n\t\treturn {\n\t\t\ttoggleModal: () =>\n\t\t\t\tisModalActive ? closeModal() : openModal( MODAL_NAME ),\n\t\t};\n\t} ),\n] )( KeyboardShortcutHelpModal );\n"]}
@@ -6,11 +6,10 @@ import { createElement } from "@wordpress/element";
6
6
  import { Fragment } from '@wordpress/element';
7
7
  import { displayShortcutList, shortcutAriaLabel } from '@wordpress/keycodes';
8
8
 
9
- function KeyCombination(_ref) {
10
- let {
11
- keyCombination,
12
- forceAriaLabel
13
- } = _ref;
9
+ function KeyCombination({
10
+ keyCombination,
11
+ forceAriaLabel
12
+ }) {
14
13
  const shortcut = keyCombination.modifier ? displayShortcutList[keyCombination.modifier](keyCombination.character) : keyCombination.character;
15
14
  const ariaLabel = keyCombination.modifier ? shortcutAriaLabel[keyCombination.modifier](keyCombination.character) : keyCombination.character;
16
15
  return createElement("kbd", {
@@ -30,13 +29,12 @@ function KeyCombination(_ref) {
30
29
  }));
31
30
  }
32
31
 
33
- function Shortcut(_ref2) {
34
- let {
35
- description,
36
- keyCombination,
37
- aliases = [],
38
- ariaLabel
39
- } = _ref2;
32
+ function Shortcut({
33
+ description,
34
+ keyCombination,
35
+ aliases = [],
36
+ ariaLabel
37
+ }) {
40
38
  return createElement(Fragment, null, createElement("div", {
41
39
  className: "edit-post-keyboard-shortcut-help-modal__shortcut-description"
42
40
  }, description), createElement("div", {
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-post/src/components/keyboard-shortcut-help-modal/shortcut.js"],"names":["Fragment","displayShortcutList","shortcutAriaLabel","KeyCombination","keyCombination","forceAriaLabel","shortcut","modifier","character","ariaLabel","Array","isArray","map","index","Shortcut","description","aliases","alias"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,QAAT,QAAyB,oBAAzB;AACA,SAASC,mBAAT,EAA8BC,iBAA9B,QAAuD,qBAAvD;;AAEA,SAASC,cAAT,OAA8D;AAAA,MAArC;AAAEC,IAAAA,cAAF;AAAkBC,IAAAA;AAAlB,GAAqC;AAC7D,QAAMC,QAAQ,GAAGF,cAAc,CAACG,QAAf,GACdN,mBAAmB,CAAEG,cAAc,CAACG,QAAjB,CAAnB,CACAH,cAAc,CAACI,SADf,CADc,GAIdJ,cAAc,CAACI,SAJlB;AAKA,QAAMC,SAAS,GAAGL,cAAc,CAACG,QAAf,GACfL,iBAAiB,CAAEE,cAAc,CAACG,QAAjB,CAAjB,CACAH,cAAc,CAACI,SADf,CADe,GAIfJ,cAAc,CAACI,SAJlB;AAMA,SACC;AACC,IAAA,SAAS,EAAC,kEADX;AAEC,kBAAaH,cAAc,IAAII;AAFhC,KAIG,CAAEC,KAAK,CAACC,OAAN,CAAeL,QAAf,IAA4BA,QAA5B,GAAuC,CAAEA,QAAF,CAAzC,EAAwDM,GAAxD,CACD,CAAEJ,SAAF,EAAaK,KAAb,KAAwB;AACvB,QAAKL,SAAS,KAAK,GAAnB,EAAyB;AACxB,aAAO,cAAC,QAAD;AAAU,QAAA,GAAG,EAAGK;AAAhB,SAA0BL,SAA1B,CAAP;AACA;;AAED,WACC;AACC,MAAA,GAAG,EAAGK,KADP;AAEC,MAAA,SAAS,EAAC;AAFX,OAIGL,SAJH,CADD;AAQA,GAdA,CAJH,CADD;AAuBA;;AAED,SAASM,QAAT,QAA8E;AAAA,MAA3D;AAAEC,IAAAA,WAAF;AAAeX,IAAAA,cAAf;AAA+BY,IAAAA,OAAO,GAAG,EAAzC;AAA6CP,IAAAA;AAA7C,GAA2D;AAC7E,SACC,8BACC;AAAK,IAAA,SAAS,EAAC;AAAf,KACGM,WADH,CADD,EAIC;AAAK,IAAA,SAAS,EAAC;AAAf,KACC,cAAC,cAAD;AACC,IAAA,cAAc,EAAGX,cADlB;AAEC,IAAA,cAAc,EAAGK;AAFlB,IADD,EAKGO,OAAO,CAACJ,GAAR,CAAa,CAAEK,KAAF,EAASJ,KAAT,KACd,cAAC,cAAD;AACC,IAAA,cAAc,EAAGI,KADlB;AAEC,IAAA,cAAc,EAAGR,SAFlB;AAGC,IAAA,GAAG,EAAGI;AAHP,IADC,CALH,CAJD,CADD;AAoBA;;AAED,eAAeC,QAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Fragment } from '@wordpress/element';\nimport { displayShortcutList, shortcutAriaLabel } from '@wordpress/keycodes';\n\nfunction KeyCombination( { keyCombination, forceAriaLabel } ) {\n\tconst shortcut = keyCombination.modifier\n\t\t? displayShortcutList[ keyCombination.modifier ](\n\t\t\t\tkeyCombination.character\n\t\t )\n\t\t: keyCombination.character;\n\tconst ariaLabel = keyCombination.modifier\n\t\t? shortcutAriaLabel[ keyCombination.modifier ](\n\t\t\t\tkeyCombination.character\n\t\t )\n\t\t: keyCombination.character;\n\n\treturn (\n\t\t<kbd\n\t\t\tclassName=\"edit-post-keyboard-shortcut-help-modal__shortcut-key-combination\"\n\t\t\taria-label={ forceAriaLabel || ariaLabel }\n\t\t>\n\t\t\t{ ( Array.isArray( shortcut ) ? shortcut : [ shortcut ] ).map(\n\t\t\t\t( character, index ) => {\n\t\t\t\t\tif ( character === '+' ) {\n\t\t\t\t\t\treturn <Fragment key={ index }>{ character }</Fragment>;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<kbd\n\t\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\t\tclassName=\"edit-post-keyboard-shortcut-help-modal__shortcut-key\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ character }\n\t\t\t\t\t\t</kbd>\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t) }\n\t\t</kbd>\n\t);\n}\n\nfunction Shortcut( { description, keyCombination, aliases = [], ariaLabel } ) {\n\treturn (\n\t\t<>\n\t\t\t<div className=\"edit-post-keyboard-shortcut-help-modal__shortcut-description\">\n\t\t\t\t{ description }\n\t\t\t</div>\n\t\t\t<div className=\"edit-post-keyboard-shortcut-help-modal__shortcut-term\">\n\t\t\t\t<KeyCombination\n\t\t\t\t\tkeyCombination={ keyCombination }\n\t\t\t\t\tforceAriaLabel={ ariaLabel }\n\t\t\t\t/>\n\t\t\t\t{ aliases.map( ( alias, index ) => (\n\t\t\t\t\t<KeyCombination\n\t\t\t\t\t\tkeyCombination={ alias }\n\t\t\t\t\t\tforceAriaLabel={ ariaLabel }\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default Shortcut;\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-post/src/components/keyboard-shortcut-help-modal/shortcut.js"],"names":["Fragment","displayShortcutList","shortcutAriaLabel","KeyCombination","keyCombination","forceAriaLabel","shortcut","modifier","character","ariaLabel","Array","isArray","map","index","Shortcut","description","aliases","alias"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,QAAT,QAAyB,oBAAzB;AACA,SAASC,mBAAT,E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,KAAF,EAASJ,KAAT,KACd,cAAC,cAAD;AACC,IAAA,cAAc,EAAGI,KADlB;AAEC,IAAA,cAAc,EAAGR,SAFlB;AAGC,IAAA,GAAG,EAAGI;AAHP,IADC,CALH,CAJD,CADD;AAoBA;;AAED,eAAeC,QAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Fragment } from '@wordpress/element';\nimport { displayShortcutList, shortcutAriaLabel } from '@wordpress/keycodes';\n\nfunction KeyCombination( { keyCombination, forceAriaLabel } ) {\n\tconst shortcut = keyCombination.modifier\n\t\t? displayShortcutList[ keyCombination.modifier ](\n\t\t\t\tkeyCombination.character\n\t\t )\n\t\t: keyCombination.character;\n\tconst ariaLabel = keyCombination.modifier\n\t\t? shortcutAriaLabel[ keyCombination.modifier ](\n\t\t\t\tkeyCombination.character\n\t\t )\n\t\t: keyCombination.character;\n\n\treturn (\n\t\t<kbd\n\t\t\tclassName=\"edit-post-keyboard-shortcut-help-modal__shortcut-key-combination\"\n\t\t\taria-label={ forceAriaLabel || ariaLabel }\n\t\t>\n\t\t\t{ ( Array.isArray( shortcut ) ? shortcut : [ shortcut ] ).map(\n\t\t\t\t( character, index ) => {\n\t\t\t\t\tif ( character === '+' ) {\n\t\t\t\t\t\treturn <Fragment key={ index }>{ character }</Fragment>;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<kbd\n\t\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\t\tclassName=\"edit-post-keyboard-shortcut-help-modal__shortcut-key\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ character }\n\t\t\t\t\t\t</kbd>\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t) }\n\t\t</kbd>\n\t);\n}\n\nfunction Shortcut( { description, keyCombination, aliases = [], ariaLabel } ) {\n\treturn (\n\t\t<>\n\t\t\t<div className=\"edit-post-keyboard-shortcut-help-modal__shortcut-description\">\n\t\t\t\t{ description }\n\t\t\t</div>\n\t\t\t<div className=\"edit-post-keyboard-shortcut-help-modal__shortcut-term\">\n\t\t\t\t<KeyCombination\n\t\t\t\t\tkeyCombination={ keyCombination }\n\t\t\t\t\tforceAriaLabel={ ariaLabel }\n\t\t\t\t/>\n\t\t\t\t{ aliases.map( ( alias, index ) => (\n\t\t\t\t\t<KeyCombination\n\t\t\t\t\t\tkeyCombination={ alias }\n\t\t\t\t\t\tforceAriaLabel={ ariaLabel }\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default Shortcut;\n"]}
@@ -179,7 +179,7 @@ function KeyboardShortcuts() {
179
179
  }
180
180
  });
181
181
  registerShortcut({
182
- name: `core/edit-post/transform-heading-to-paragraph`,
182
+ name: 'core/edit-post/transform-heading-to-paragraph',
183
183
  category: 'block-library',
184
184
  description: __('Transform heading to paragraph.'),
185
185
  keyCombination: {