@wordpress/edit-post 7.15.0 → 7.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (442) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/README.md +6 -1
  3. package/build/components/block-manager/category.js +1 -14
  4. package/build/components/block-manager/category.js.map +1 -1
  5. package/build/components/block-manager/checklist.js +1 -5
  6. package/build/components/block-manager/checklist.js.map +1 -1
  7. package/build/components/block-manager/index.js +11 -23
  8. package/build/components/block-manager/index.js.map +1 -1
  9. package/build/components/block-settings-menu/plugin-block-settings-menu-item.js +3 -11
  10. package/build/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -1
  11. package/build/components/browser-url/index.js +6 -23
  12. package/build/components/browser-url/index.js.map +1 -1
  13. package/build/components/device-preview/index.js +1 -11
  14. package/build/components/device-preview/index.js.map +1 -1
  15. package/build/components/editor-initialization/index.js +0 -2
  16. package/build/components/editor-initialization/index.js.map +1 -1
  17. package/build/components/editor-initialization/listener-hooks.js +1 -12
  18. package/build/components/editor-initialization/listener-hooks.js.map +1 -1
  19. package/build/components/header/{document-title → document-actions}/index.js +11 -28
  20. package/build/components/header/document-actions/index.js.map +1 -0
  21. package/build/components/header/fullscreen-mode-close/index.js +3 -22
  22. package/build/components/header/fullscreen-mode-close/index.js.map +1 -1
  23. package/build/components/header/header-toolbar/index.js +5 -22
  24. package/build/components/header/header-toolbar/index.js.map +1 -1
  25. package/build/components/header/header-toolbar/index.native.js +4 -25
  26. package/build/components/header/header-toolbar/index.native.js.map +1 -1
  27. package/build/components/header/index.js +6 -23
  28. package/build/components/header/index.js.map +1 -1
  29. package/build/components/header/index.native.js +1 -13
  30. package/build/components/header/index.native.js.map +1 -1
  31. package/build/components/header/main-dashboard-button/index.js +1 -7
  32. package/build/components/header/main-dashboard-button/index.js.map +1 -1
  33. package/build/components/header/mode-switcher/index.js +23 -19
  34. package/build/components/header/mode-switcher/index.js.map +1 -1
  35. package/build/components/header/more-menu/index.js +1 -12
  36. package/build/components/header/more-menu/index.js.map +1 -1
  37. package/build/components/header/plugin-more-menu-item/index.js +0 -8
  38. package/build/components/header/plugin-more-menu-item/index.js.map +1 -1
  39. package/build/components/header/plugin-sidebar-more-menu-item/index.js +3 -4
  40. package/build/components/header/plugin-sidebar-more-menu-item/index.js.map +1 -1
  41. package/build/components/header/post-publish-button-or-toggle.js +2 -11
  42. package/build/components/header/post-publish-button-or-toggle.js.map +1 -1
  43. package/build/components/header/preferences-menu-item/index.js +1 -7
  44. package/build/components/header/preferences-menu-item/index.js.map +1 -1
  45. package/build/components/header/tools-more-menu-group/index.js +1 -6
  46. package/build/components/header/tools-more-menu-group/index.js.map +1 -1
  47. package/build/components/header/writing-menu/index.js +1 -15
  48. package/build/components/header/writing-menu/index.js.map +1 -1
  49. package/build/components/keyboard-shortcut-help-modal/config.js +1 -2
  50. package/build/components/keyboard-shortcut-help-modal/config.js.map +1 -1
  51. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +1 -9
  52. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
  53. package/build/components/keyboard-shortcut-help-modal/index.js +4 -25
  54. package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  55. package/build/components/keyboard-shortcut-help-modal/shortcut.js +1 -6
  56. package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
  57. package/build/components/keyboard-shortcuts/index.js +4 -23
  58. package/build/components/keyboard-shortcuts/index.js.map +1 -1
  59. package/build/components/layout/actions-panel.js +7 -17
  60. package/build/components/layout/actions-panel.js.map +1 -1
  61. package/build/components/layout/index.js +50 -52
  62. package/build/components/layout/index.js.map +1 -1
  63. package/build/components/layout/index.native.js +5 -34
  64. package/build/components/layout/index.native.js.map +1 -1
  65. package/build/components/meta-boxes/index.js +4 -12
  66. package/build/components/meta-boxes/index.js.map +1 -1
  67. package/build/components/meta-boxes/meta-box-visibility.js +1 -12
  68. package/build/components/meta-boxes/meta-box-visibility.js.map +1 -1
  69. package/build/components/meta-boxes/meta-boxes-area/index.js +0 -10
  70. package/build/components/meta-boxes/meta-boxes-area/index.js.map +1 -1
  71. package/build/components/preferences-modal/index.js +1 -18
  72. package/build/components/preferences-modal/index.js.map +1 -1
  73. package/build/components/preferences-modal/meta-boxes-section.js +3 -13
  74. package/build/components/preferences-modal/meta-boxes-section.js.map +1 -1
  75. package/build/components/preferences-modal/options/enable-custom-fields.js +10 -11
  76. package/build/components/preferences-modal/options/enable-custom-fields.js.map +1 -1
  77. package/build/components/preferences-modal/options/enable-feature.js +0 -7
  78. package/build/components/preferences-modal/options/enable-feature.js.map +1 -1
  79. package/build/components/preferences-modal/options/enable-panel.js +0 -7
  80. package/build/components/preferences-modal/options/enable-panel.js.map +1 -1
  81. package/build/components/preferences-modal/options/enable-plugin-document-setting-panel.js +1 -6
  82. package/build/components/preferences-modal/options/enable-plugin-document-setting-panel.js.map +1 -1
  83. package/build/components/preferences-modal/options/enable-publish-sidebar.js +2 -8
  84. package/build/components/preferences-modal/options/enable-publish-sidebar.js.map +1 -1
  85. package/build/components/preferences-modal/options/index.js +0 -6
  86. package/build/components/preferences-modal/options/index.js.map +1 -1
  87. package/build/components/secondary-sidebar/inserter-sidebar.js +1 -9
  88. package/build/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
  89. package/build/components/secondary-sidebar/list-view-outline.js +1 -8
  90. package/build/components/secondary-sidebar/list-view-outline.js.map +1 -1
  91. package/build/components/secondary-sidebar/list-view-sidebar.js +34 -46
  92. package/build/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
  93. package/build/components/sidebar/discussion-panel/index.js +19 -30
  94. package/build/components/sidebar/discussion-panel/index.js.map +1 -1
  95. package/build/components/sidebar/featured-image/index.js +0 -15
  96. package/build/components/sidebar/featured-image/index.js.map +1 -1
  97. package/build/components/sidebar/last-revision/index.js +1 -5
  98. package/build/components/sidebar/last-revision/index.js.map +1 -1
  99. package/build/components/sidebar/page-attributes/index.js +0 -14
  100. package/build/components/sidebar/page-attributes/index.js.map +1 -1
  101. package/build/components/sidebar/plugin-document-setting-panel/index.js +44 -61
  102. package/build/components/sidebar/plugin-document-setting-panel/index.js.map +1 -1
  103. package/build/components/sidebar/plugin-post-publish-panel/index.js +19 -25
  104. package/build/components/sidebar/plugin-post-publish-panel/index.js.map +1 -1
  105. package/build/components/sidebar/plugin-post-status-info/index.js +2 -5
  106. package/build/components/sidebar/plugin-post-status-info/index.js.map +1 -1
  107. package/build/components/sidebar/plugin-pre-publish-panel/index.js +19 -25
  108. package/build/components/sidebar/plugin-pre-publish-panel/index.js.map +1 -1
  109. package/build/components/sidebar/plugin-sidebar/index.js +0 -8
  110. package/build/components/sidebar/plugin-sidebar/index.js.map +1 -1
  111. package/build/components/sidebar/post-author/index.js +1 -5
  112. package/build/components/sidebar/post-author/index.js.map +1 -1
  113. package/build/components/sidebar/post-excerpt/index.js +0 -13
  114. package/build/components/sidebar/post-excerpt/index.js.map +1 -1
  115. package/build/components/sidebar/post-format/index.js +1 -5
  116. package/build/components/sidebar/post-format/index.js.map +1 -1
  117. package/build/components/sidebar/post-pending-status/index.js +1 -5
  118. package/build/components/sidebar/post-pending-status/index.js.map +1 -1
  119. package/build/components/sidebar/post-schedule/index.js +5 -9
  120. package/build/components/sidebar/post-schedule/index.js.map +1 -1
  121. package/build/components/sidebar/post-slug/index.js +1 -5
  122. package/build/components/sidebar/post-slug/index.js.map +1 -1
  123. package/build/components/sidebar/post-status/index.js +0 -24
  124. package/build/components/sidebar/post-status/index.js.map +1 -1
  125. package/build/components/sidebar/post-sticky/index.js +1 -5
  126. package/build/components/sidebar/post-sticky/index.js.map +1 -1
  127. package/build/components/sidebar/post-taxonomies/index.js +1 -6
  128. package/build/components/sidebar/post-taxonomies/index.js.map +1 -1
  129. package/build/components/sidebar/post-taxonomies/taxonomy-panel.js +1 -11
  130. package/build/components/sidebar/post-taxonomies/taxonomy-panel.js.map +1 -1
  131. package/build/components/sidebar/post-template/create-modal.js +1 -16
  132. package/build/components/sidebar/post-template/create-modal.js.map +1 -1
  133. package/build/components/sidebar/post-template/form.js +3 -16
  134. package/build/components/sidebar/post-template/form.js.map +1 -1
  135. package/build/components/sidebar/post-template/index.js +5 -24
  136. package/build/components/sidebar/post-template/index.js.map +1 -1
  137. package/build/components/sidebar/post-trash/index.js +1 -3
  138. package/build/components/sidebar/post-trash/index.js.map +1 -1
  139. package/build/components/sidebar/post-url/index.js +5 -9
  140. package/build/components/sidebar/post-url/index.js.map +1 -1
  141. package/build/components/sidebar/post-visibility/index.js +5 -10
  142. package/build/components/sidebar/post-visibility/index.js.map +1 -1
  143. package/build/components/sidebar/settings-header/index.js +12 -17
  144. package/build/components/sidebar/settings-header/index.js.map +1 -1
  145. package/build/components/sidebar/settings-sidebar/index.js +2 -29
  146. package/build/components/sidebar/settings-sidebar/index.js.map +1 -1
  147. package/build/components/sidebar/template-summary/index.js +1 -9
  148. package/build/components/sidebar/template-summary/index.js.map +1 -1
  149. package/build/components/start-page-options/index.js +1 -15
  150. package/build/components/start-page-options/index.js.map +1 -1
  151. package/build/components/text-editor/index.js +1 -8
  152. package/build/components/text-editor/index.js.map +1 -1
  153. package/build/components/view-link/index.js +3 -10
  154. package/build/components/view-link/index.js.map +1 -1
  155. package/build/components/visual-editor/block-inspector-button.js +1 -11
  156. package/build/components/visual-editor/block-inspector-button.js.map +1 -1
  157. package/build/components/visual-editor/header.native.js +1 -12
  158. package/build/components/visual-editor/header.native.js.map +1 -1
  159. package/build/components/visual-editor/index.js +33 -53
  160. package/build/components/visual-editor/index.js.map +1 -1
  161. package/build/components/visual-editor/index.native.js +1 -9
  162. package/build/components/visual-editor/index.native.js.map +1 -1
  163. package/build/components/welcome-guide/default.js +1 -8
  164. package/build/components/welcome-guide/default.js.map +1 -1
  165. package/build/components/welcome-guide/image.js +0 -2
  166. package/build/components/welcome-guide/image.js.map +1 -1
  167. package/build/components/welcome-guide/index.js +1 -11
  168. package/build/components/welcome-guide/index.js.map +1 -1
  169. package/build/components/welcome-guide/template.js +1 -8
  170. package/build/components/welcome-guide/template.js.map +1 -1
  171. package/build/editor.js +9 -68
  172. package/build/editor.js.map +1 -1
  173. package/build/editor.native.js +10 -35
  174. package/build/editor.native.js.map +1 -1
  175. package/build/hooks/commands/use-common-commands.js +65 -22
  176. package/build/hooks/commands/use-common-commands.js.map +1 -1
  177. package/build/hooks/components/index.js +1 -3
  178. package/build/hooks/components/index.js.map +1 -1
  179. package/build/hooks/index.js +0 -1
  180. package/build/hooks/index.js.map +1 -1
  181. package/build/hooks/validate-multiple-use/index.js +10 -18
  182. package/build/hooks/validate-multiple-use/index.js.map +1 -1
  183. package/build/index.js +16 -48
  184. package/build/index.js.map +1 -1
  185. package/build/index.native.js +0 -9
  186. package/build/index.native.js.map +1 -1
  187. package/build/lock-unlock.js +1 -2
  188. package/build/lock-unlock.js.map +1 -1
  189. package/build/plugins/copy-content-menu-item/index.js +1 -10
  190. package/build/plugins/copy-content-menu-item/index.js.map +1 -1
  191. package/build/plugins/index.js +5 -22
  192. package/build/plugins/index.js.map +1 -1
  193. package/build/plugins/keyboard-shortcuts-help-menu-item/index.js +1 -10
  194. package/build/plugins/keyboard-shortcuts-help-menu-item/index.js.map +1 -1
  195. package/build/plugins/welcome-guide-menu-item/index.js +1 -6
  196. package/build/plugins/welcome-guide-menu-item/index.js.map +1 -1
  197. package/build/store/actions.js +53 -120
  198. package/build/store/actions.js.map +1 -1
  199. package/build/store/constants.js +2 -3
  200. package/build/store/constants.js.map +1 -1
  201. package/build/store/index.js +0 -9
  202. package/build/store/index.js.map +1 -1
  203. package/build/store/reducer.js +9 -42
  204. package/build/store/reducer.js.map +1 -1
  205. package/build/store/selectors.js +63 -91
  206. package/build/store/selectors.js.map +1 -1
  207. package/build/utils/meta-boxes.js +0 -4
  208. package/build/utils/meta-boxes.js.map +1 -1
  209. package/build-module/components/block-manager/category.js +1 -8
  210. package/build-module/components/block-manager/category.js.map +1 -1
  211. package/build-module/components/block-manager/checklist.js +0 -3
  212. package/build-module/components/block-manager/checklist.js.map +1 -1
  213. package/build-module/components/block-manager/index.js +11 -14
  214. package/build-module/components/block-manager/index.js.map +1 -1
  215. package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js +2 -8
  216. package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -1
  217. package/build-module/components/browser-url/index.js +7 -14
  218. package/build-module/components/browser-url/index.js.map +1 -1
  219. package/build-module/components/device-preview/index.js +1 -3
  220. package/build-module/components/device-preview/index.js.map +1 -1
  221. package/build-module/components/editor-initialization/index.js +1 -1
  222. package/build-module/components/editor-initialization/index.js.map +1 -1
  223. package/build-module/components/editor-initialization/listener-hooks.js +3 -5
  224. package/build-module/components/editor-initialization/listener-hooks.js.map +1 -1
  225. package/build-module/components/header/{document-title → document-actions}/index.js +11 -21
  226. package/build-module/components/header/document-actions/index.js.map +1 -0
  227. package/build-module/components/header/fullscreen-mode-close/index.js +4 -13
  228. package/build-module/components/header/fullscreen-mode-close/index.js.map +1 -1
  229. package/build-module/components/header/header-toolbar/index.js +5 -13
  230. package/build-module/components/header/header-toolbar/index.js.map +1 -1
  231. package/build-module/components/header/header-toolbar/index.native.js +5 -12
  232. package/build-module/components/header/header-toolbar/index.native.js.map +1 -1
  233. package/build-module/components/header/index.js +6 -8
  234. package/build-module/components/header/index.js.map +1 -1
  235. package/build-module/components/header/index.native.js +2 -9
  236. package/build-module/components/header/index.native.js.map +1 -1
  237. package/build-module/components/header/main-dashboard-button/index.js +0 -5
  238. package/build-module/components/header/main-dashboard-button/index.js.map +1 -1
  239. package/build-module/components/header/mode-switcher/index.js +25 -14
  240. package/build-module/components/header/mode-switcher/index.js.map +1 -1
  241. package/build-module/components/header/more-menu/index.js +1 -4
  242. package/build-module/components/header/more-menu/index.js.map +1 -1
  243. package/build-module/components/header/plugin-more-menu-item/index.js +1 -2
  244. package/build-module/components/header/plugin-more-menu-item/index.js.map +1 -1
  245. package/build-module/components/header/plugin-sidebar-more-menu-item/index.js +3 -2
  246. package/build-module/components/header/plugin-sidebar-more-menu-item/index.js.map +1 -1
  247. package/build-module/components/header/post-publish-button-or-toggle.js +2 -5
  248. package/build-module/components/header/post-publish-button-or-toggle.js.map +1 -1
  249. package/build-module/components/header/preferences-menu-item/index.js +1 -2
  250. package/build-module/components/header/preferences-menu-item/index.js.map +1 -1
  251. package/build-module/components/header/tools-more-menu-group/index.js +0 -3
  252. package/build-module/components/header/tools-more-menu-group/index.js.map +1 -1
  253. package/build-module/components/header/writing-menu/index.js +1 -8
  254. package/build-module/components/header/writing-menu/index.js.map +1 -1
  255. package/build-module/components/keyboard-shortcut-help-modal/config.js.map +1 -1
  256. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +1 -6
  257. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
  258. package/build-module/components/keyboard-shortcut-help-modal/index.js +5 -13
  259. package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  260. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +0 -5
  261. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
  262. package/build-module/components/keyboard-shortcuts/index.js +4 -14
  263. package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
  264. package/build-module/components/layout/actions-panel.js +6 -8
  265. package/build-module/components/layout/actions-panel.js.map +1 -1
  266. package/build-module/components/layout/index.js +53 -28
  267. package/build-module/components/layout/index.js.map +1 -1
  268. package/build-module/components/layout/index.native.js +6 -20
  269. package/build-module/components/layout/index.native.js.map +1 -1
  270. package/build-module/components/meta-boxes/index.js +4 -6
  271. package/build-module/components/meta-boxes/index.js.map +1 -1
  272. package/build-module/components/meta-boxes/meta-box-visibility.js +1 -9
  273. package/build-module/components/meta-boxes/meta-box-visibility.js.map +1 -1
  274. package/build-module/components/meta-boxes/meta-boxes-area/index.js +3 -7
  275. package/build-module/components/meta-boxes/meta-boxes-area/index.js.map +1 -1
  276. package/build-module/components/preferences-modal/index.js +2 -5
  277. package/build-module/components/preferences-modal/index.js.map +1 -1
  278. package/build-module/components/preferences-modal/meta-boxes-section.js +3 -5
  279. package/build-module/components/preferences-modal/meta-boxes-section.js.map +1 -1
  280. package/build-module/components/preferences-modal/options/enable-custom-fields.js +9 -2
  281. package/build-module/components/preferences-modal/options/enable-custom-fields.js.map +1 -1
  282. package/build-module/components/preferences-modal/options/enable-feature.js +1 -1
  283. package/build-module/components/preferences-modal/options/enable-feature.js.map +1 -1
  284. package/build-module/components/preferences-modal/options/enable-panel.js +1 -1
  285. package/build-module/components/preferences-modal/options/enable-panel.js.map +1 -1
  286. package/build-module/components/preferences-modal/options/enable-plugin-document-setting-panel.js +1 -4
  287. package/build-module/components/preferences-modal/options/enable-plugin-document-setting-panel.js.map +1 -1
  288. package/build-module/components/preferences-modal/options/enable-publish-sidebar.js +2 -1
  289. package/build-module/components/preferences-modal/options/enable-publish-sidebar.js.map +1 -1
  290. package/build-module/components/preferences-modal/options/index.js.map +1 -1
  291. package/build-module/components/secondary-sidebar/inserter-sidebar.js +1 -2
  292. package/build-module/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
  293. package/build-module/components/secondary-sidebar/list-view-outline.js +0 -3
  294. package/build-module/components/secondary-sidebar/list-view-outline.js.map +1 -1
  295. package/build-module/components/secondary-sidebar/list-view-sidebar.js +35 -33
  296. package/build-module/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
  297. package/build-module/components/sidebar/discussion-panel/index.js +22 -25
  298. package/build-module/components/sidebar/discussion-panel/index.js.map +1 -1
  299. package/build-module/components/sidebar/featured-image/index.js +2 -7
  300. package/build-module/components/sidebar/featured-image/index.js.map +1 -1
  301. package/build-module/components/sidebar/last-revision/index.js +0 -3
  302. package/build-module/components/sidebar/last-revision/index.js.map +1 -1
  303. package/build-module/components/sidebar/page-attributes/index.js +2 -7
  304. package/build-module/components/sidebar/page-attributes/index.js.map +1 -1
  305. package/build-module/components/sidebar/plugin-document-setting-panel/index.js +46 -55
  306. package/build-module/components/sidebar/plugin-document-setting-panel/index.js.map +1 -1
  307. package/build-module/components/sidebar/plugin-post-publish-panel/index.js +19 -22
  308. package/build-module/components/sidebar/plugin-post-publish-panel/index.js.map +1 -1
  309. package/build-module/components/sidebar/plugin-post-status-info/index.js +1 -3
  310. package/build-module/components/sidebar/plugin-post-status-info/index.js.map +1 -1
  311. package/build-module/components/sidebar/plugin-pre-publish-panel/index.js +19 -22
  312. package/build-module/components/sidebar/plugin-pre-publish-panel/index.js.map +1 -1
  313. package/build-module/components/sidebar/plugin-sidebar/index.js +2 -3
  314. package/build-module/components/sidebar/plugin-sidebar/index.js.map +1 -1
  315. package/build-module/components/sidebar/post-author/index.js +0 -1
  316. package/build-module/components/sidebar/post-author/index.js.map +1 -1
  317. package/build-module/components/sidebar/post-excerpt/index.js +2 -7
  318. package/build-module/components/sidebar/post-excerpt/index.js.map +1 -1
  319. package/build-module/components/sidebar/post-format/index.js +0 -1
  320. package/build-module/components/sidebar/post-format/index.js.map +1 -1
  321. package/build-module/components/sidebar/post-pending-status/index.js +0 -1
  322. package/build-module/components/sidebar/post-pending-status/index.js.map +1 -1
  323. package/build-module/components/sidebar/post-schedule/index.js +4 -5
  324. package/build-module/components/sidebar/post-schedule/index.js.map +1 -1
  325. package/build-module/components/sidebar/post-slug/index.js +0 -1
  326. package/build-module/components/sidebar/post-slug/index.js.map +1 -1
  327. package/build-module/components/sidebar/post-status/index.js +2 -6
  328. package/build-module/components/sidebar/post-status/index.js.map +1 -1
  329. package/build-module/components/sidebar/post-sticky/index.js +0 -1
  330. package/build-module/components/sidebar/post-sticky/index.js.map +1 -1
  331. package/build-module/components/sidebar/post-taxonomies/index.js +1 -4
  332. package/build-module/components/sidebar/post-taxonomies/index.js.map +1 -1
  333. package/build-module/components/sidebar/post-taxonomies/taxonomy-panel.js +1 -7
  334. package/build-module/components/sidebar/post-taxonomies/taxonomy-panel.js.map +1 -1
  335. package/build-module/components/sidebar/post-template/create-modal.js +1 -10
  336. package/build-module/components/sidebar/post-template/create-modal.js.map +1 -1
  337. package/build-module/components/sidebar/post-template/form.js +3 -6
  338. package/build-module/components/sidebar/post-template/form.js.map +1 -1
  339. package/build-module/components/sidebar/post-template/index.js +5 -16
  340. package/build-module/components/sidebar/post-template/index.js.map +1 -1
  341. package/build-module/components/sidebar/post-trash/index.js +0 -1
  342. package/build-module/components/sidebar/post-trash/index.js.map +1 -1
  343. package/build-module/components/sidebar/post-url/index.js +4 -5
  344. package/build-module/components/sidebar/post-url/index.js.map +1 -1
  345. package/build-module/components/sidebar/post-visibility/index.js +4 -6
  346. package/build-module/components/sidebar/post-visibility/index.js.map +1 -1
  347. package/build-module/components/sidebar/settings-header/index.js +12 -13
  348. package/build-module/components/sidebar/settings-header/index.js.map +1 -1
  349. package/build-module/components/sidebar/settings-sidebar/index.js +2 -9
  350. package/build-module/components/sidebar/settings-sidebar/index.js.map +1 -1
  351. package/build-module/components/sidebar/template-summary/index.js +1 -6
  352. package/build-module/components/sidebar/template-summary/index.js.map +1 -1
  353. package/build-module/components/start-page-options/index.js +1 -8
  354. package/build-module/components/start-page-options/index.js.map +1 -1
  355. package/build-module/components/text-editor/index.js +1 -2
  356. package/build-module/components/text-editor/index.js.map +1 -1
  357. package/build-module/components/view-link/index.js +2 -3
  358. package/build-module/components/view-link/index.js.map +1 -1
  359. package/build-module/components/visual-editor/block-inspector-button.js +1 -5
  360. package/build-module/components/visual-editor/block-inspector-button.js.map +1 -1
  361. package/build-module/components/visual-editor/header.native.js +1 -4
  362. package/build-module/components/visual-editor/header.native.js.map +1 -1
  363. package/build-module/components/visual-editor/index.js +34 -43
  364. package/build-module/components/visual-editor/index.js.map +1 -1
  365. package/build-module/components/visual-editor/index.native.js +1 -5
  366. package/build-module/components/visual-editor/index.native.js.map +1 -1
  367. package/build-module/components/welcome-guide/default.js +1 -2
  368. package/build-module/components/welcome-guide/default.js.map +1 -1
  369. package/build-module/components/welcome-guide/image.js.map +1 -1
  370. package/build-module/components/welcome-guide/index.js +1 -6
  371. package/build-module/components/welcome-guide/index.js.map +1 -1
  372. package/build-module/components/welcome-guide/template.js +1 -2
  373. package/build-module/components/welcome-guide/template.js.map +1 -1
  374. package/build-module/editor.js +9 -52
  375. package/build-module/editor.js.map +1 -1
  376. package/build-module/editor.native.js +11 -23
  377. package/build-module/editor.native.js.map +1 -1
  378. package/build-module/hooks/commands/use-common-commands.js +66 -14
  379. package/build-module/hooks/commands/use-common-commands.js.map +1 -1
  380. package/build-module/hooks/components/index.js +0 -2
  381. package/build-module/hooks/components/index.js.map +1 -1
  382. package/build-module/hooks/index.js.map +1 -1
  383. package/build-module/hooks/validate-multiple-use/index.js +9 -11
  384. package/build-module/hooks/validate-multiple-use/index.js.map +1 -1
  385. package/build-module/index.js +18 -26
  386. package/build-module/index.js.map +1 -1
  387. package/build-module/index.native.js +2 -3
  388. package/build-module/index.native.js.map +1 -1
  389. package/build-module/lock-unlock.js.map +1 -1
  390. package/build-module/plugins/copy-content-menu-item/index.js +0 -3
  391. package/build-module/plugins/copy-content-menu-item/index.js.map +1 -1
  392. package/build-module/plugins/index.js +5 -11
  393. package/build-module/plugins/index.js.map +1 -1
  394. package/build-module/plugins/keyboard-shortcuts-help-menu-item/index.js +1 -2
  395. package/build-module/plugins/keyboard-shortcuts-help-menu-item/index.js.map +1 -1
  396. package/build-module/plugins/welcome-guide-menu-item/index.js +1 -2
  397. package/build-module/plugins/welcome-guide-menu-item/index.js.map +1 -1
  398. package/build-module/store/actions.js +55 -66
  399. package/build-module/store/actions.js.map +1 -1
  400. package/build-module/store/constants.js +2 -2
  401. package/build-module/store/constants.js.map +1 -1
  402. package/build-module/store/index.js +2 -2
  403. package/build-module/store/index.js.map +1 -1
  404. package/build-module/store/reducer.js +10 -33
  405. package/build-module/store/reducer.js.map +1 -1
  406. package/build-module/store/selectors.js +63 -64
  407. package/build-module/store/selectors.js.map +1 -1
  408. package/build-module/utils/meta-boxes.js +0 -2
  409. package/build-module/utils/meta-boxes.js.map +1 -1
  410. package/build-style/style-rtl.css +40 -27
  411. package/build-style/style.css +40 -27
  412. package/package.json +32 -32
  413. package/src/components/header/{document-title → document-actions}/index.js +22 -23
  414. package/src/components/header/{document-title → document-actions}/style.scss +25 -22
  415. package/src/components/header/header-toolbar/index.native.js +1 -0
  416. package/src/components/header/header-toolbar/style.scss +4 -0
  417. package/src/components/header/index.js +3 -3
  418. package/src/components/header/mode-switcher/index.js +23 -4
  419. package/src/components/header/style.scss +1 -1
  420. package/src/components/keyboard-shortcut-help-modal/test/__snapshots__/index.js.snap +29 -0
  421. package/src/components/keyboard-shortcuts/index.js +2 -2
  422. package/src/components/layout/index.js +64 -3
  423. package/src/components/preferences-modal/options/enable-custom-fields.js +15 -4
  424. package/src/components/preferences-modal/options/test/enable-custom-fields.js +6 -1
  425. package/src/components/preferences-modal/test/__snapshots__/index.js.snap +5 -2
  426. package/src/components/preferences-modal/test/index.js +4 -4
  427. package/src/components/secondary-sidebar/list-view-sidebar.js +3 -3
  428. package/src/components/sidebar/discussion-panel/index.js +15 -20
  429. package/src/components/sidebar/plugin-document-setting-panel/index.js +54 -65
  430. package/src/components/sidebar/plugin-post-publish-panel/index.js +23 -27
  431. package/src/components/sidebar/plugin-pre-publish-panel/index.js +25 -28
  432. package/src/components/sidebar/post-schedule/style.scss +2 -0
  433. package/src/components/visual-editor/index.js +9 -8
  434. package/src/components/visual-editor/style.scss +5 -1
  435. package/src/editor.js +2 -47
  436. package/src/hooks/commands/use-common-commands.js +84 -22
  437. package/src/index.js +5 -1
  438. package/src/store/selectors.js +10 -3
  439. package/src/style.scss +1 -1
  440. package/src/test/editor.native.js +4 -3
  441. package/build/components/header/document-title/index.js.map +0 -1
  442. package/build-module/components/header/document-title/index.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-post/src/components/header/index.js"],"names":["PostSavedState","PostPreviewButton","useSelect","PinnedItems","useViewportMatch","__unstableMotion","motion","FullscreenModeClose","HeaderToolbar","MoreMenu","PostPublishButtonOrToggle","default","DevicePreview","ViewLink","MainDashboardButton","store","editPostStore","DocumentTitle","slideY","hidden","y","hover","transition","type","delay","slideX","x","Header","setEntitiesSavedStatesCallback","isLargeViewport","hasActiveMetaboxes","isPublishSidebarOpened","showIconLabels","select","hasMetaBoxes","isFeatureActive"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,cAAT,EAAyBC,iBAAzB,QAAkD,mBAAlD;AACA,SAASC,SAAT,QAA0B,iBAA1B;AACA,SAASC,WAAT,QAA4B,sBAA5B;AACA,SAASC,gBAAT,QAAiC,oBAAjC;AACA,SAASC,gBAAgB,IAAIC,MAA7B,QAA2C,uBAA3C;AAEA;AACA;AACA;;AACA,OAAOC,mBAAP,MAAgC,yBAAhC;AACA,OAAOC,aAAP,MAA0B,kBAA1B;AACA,OAAOC,QAAP,MAAqB,aAArB;AACA,OAAOC,yBAAP,MAAsC,iCAAtC;AACA,SAASC,OAAO,IAAIC,aAApB,QAAyC,mBAAzC;AACA,OAAOC,QAAP,MAAqB,cAArB;AACA,OAAOC,mBAAP,MAAgC,yBAAhC;AACA,SAASC,KAAK,IAAIC,aAAlB,QAAuC,aAAvC;AACA,OAAOC,aAAP,MAA0B,kBAA1B;AAEA,MAAMC,MAAM,GAAG;AACdC,EAAAA,MAAM,EAAE;AAAEC,IAAAA,CAAC,EAAE;AAAL,GADM;AAEdC,EAAAA,KAAK,EAAE;AAAED,IAAAA,CAAC,EAAE,CAAL;AAAQE,IAAAA,UAAU,EAAE;AAAEC,MAAAA,IAAI,EAAE,OAAR;AAAiBC,MAAAA,KAAK,EAAE;AAAxB;AAApB;AAFO,CAAf;AAKA,MAAMC,MAAM,GAAG;AACdN,EAAAA,MAAM,EAAE;AAAEO,IAAAA,CAAC,EAAE;AAAL,GADM;AAEdL,EAAAA,KAAK,EAAE;AAAEK,IAAAA,CAAC,EAAE,CAAL;AAAQJ,IAAAA,UAAU,EAAE;AAAEC,MAAAA,IAAI,EAAE,OAAR;AAAiBC,MAAAA,KAAK,EAAE;AAAxB;AAAp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AK,EAAE;AAAxB,KAFd;AAGC,IAAA,SAAS,EAAC;AAHX,KAKG,CAAEO,sBAAF,IACD;AACA;AACA;AACA;AACA;AACA,gBAAC,cAAD;AACC,IAAA,YAAY,EAAGD,kBADhB;AAEC,IAAA,cAAc,EAAGE;AAFlB,IAXF,EAgBC,cAAC,aAAD,OAhBD,EAiBC,cAAC,iBAAD;AAAmB,IAAA,mBAAmB,EAAGF;AAAzC,IAjBD,EAkBC,cAAC,QAAD,OAlBD,EAmBC,cAAC,yBAAD;AACC,IAAA,YAAY,EAAGA,kBADhB;AAEC,IAAA,8BAA8B,EAC7BF;AAHF,IAnBD,EAyBG,CAAEC,eAAe,IAAI,CAAEG,cAAvB,KACD,8BACC,cAAC,WAAD,CAAa,IAAb;AAAkB,IAAA,KAAK,EAAC;AAAxB,IADD,EAEC,cAAC,QAAD;AAAU,IAAA,cAAc,EAAGA;AAA3B,IAFD,CA1BF,EA+BGA,cAAc,IAAI,CAAEH,eAApB,IACD,cAAC,QAAD;AAAU,IAAA,cAAc,EAAGG;AAA3B,IAhCF,CAnBD,CADD;AAyDA;;AAED,eAAeL,MAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { PostSavedState, PostPreviewButton } from '@wordpress/editor';\nimport { useSelect } from '@wordpress/data';\nimport { PinnedItems } from '@wordpress/interface';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { __unstableMotion as motion } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport FullscreenModeClose from './fullscreen-mode-close';\nimport HeaderToolbar from './header-toolbar';\nimport MoreMenu from './more-menu';\nimport PostPublishButtonOrToggle from './post-publish-button-or-toggle';\nimport { default as DevicePreview } from '../device-preview';\nimport ViewLink from '../view-link';\nimport MainDashboardButton from './main-dashboard-button';\nimport { store as editPostStore } from '../../store';\nimport DocumentTitle from './document-title';\n\nconst slideY = {\n\thidden: { y: '-50px' },\n\thover: { y: 0, transition: { type: 'tween', delay: 0.2 } },\n};\n\nconst slideX = {\n\thidden: { x: '-100%' },\n\thover: { x: 0, transition: { type: 'tween', delay: 0.2 } },\n};\n\nfunction Header( { setEntitiesSavedStatesCallback } ) {\n\tconst isLargeViewport = useViewportMatch( 'large' );\n\tconst { hasActiveMetaboxes, isPublishSidebarOpened, showIconLabels } =\n\t\tuseSelect(\n\t\t\t( select ) => ( {\n\t\t\t\thasActiveMetaboxes: select( editPostStore ).hasMetaBoxes(),\n\t\t\t\tisPublishSidebarOpened:\n\t\t\t\t\tselect( editPostStore ).isPublishSidebarOpened(),\n\t\t\t\tshowIconLabels:\n\t\t\t\t\tselect( editPostStore ).isFeatureActive( 'showIconLabels' ),\n\t\t\t} ),\n\t\t\t[]\n\t\t);\n\n\treturn (\n\t\t<div className=\"edit-post-header\">\n\t\t\t<MainDashboardButton.Slot>\n\t\t\t\t<motion.div\n\t\t\t\t\tvariants={ slideX }\n\t\t\t\t\ttransition={ { type: 'tween', delay: 0.8 } }\n\t\t\t\t>\n\t\t\t\t\t<FullscreenModeClose showTooltip />\n\t\t\t\t</motion.div>\n\t\t\t</MainDashboardButton.Slot>\n\t\t\t<motion.div\n\t\t\t\tvariants={ slideY }\n\t\t\t\ttransition={ { type: 'tween', delay: 0.8 } }\n\t\t\t\tclassName=\"edit-post-header__toolbar\"\n\t\t\t>\n\t\t\t\t<HeaderToolbar />\n\t\t\t\t<div className=\"edit-post-header__document-title\">\n\t\t\t\t\t<DocumentTitle />\n\t\t\t\t</div>\n\t\t\t</motion.div>\n\t\t\t<motion.div\n\t\t\t\tvariants={ slideY }\n\t\t\t\ttransition={ { type: 'tween', delay: 0.8 } }\n\t\t\t\tclassName=\"edit-post-header__settings\"\n\t\t\t>\n\t\t\t\t{ ! isPublishSidebarOpened && (\n\t\t\t\t\t// This button isn't completely hidden by the publish sidebar.\n\t\t\t\t\t// We can't hide the whole toolbar when the publish sidebar is open because\n\t\t\t\t\t// we want to prevent mounting/unmounting the PostPublishButtonOrToggle DOM node.\n\t\t\t\t\t// We track that DOM node to return focus to the PostPublishButtonOrToggle\n\t\t\t\t\t// when the publish sidebar has been closed.\n\t\t\t\t\t<PostSavedState\n\t\t\t\t\t\tforceIsDirty={ hasActiveMetaboxes }\n\t\t\t\t\t\tshowIconLabels={ showIconLabels }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t<DevicePreview />\n\t\t\t\t<PostPreviewButton forceIsAutosaveable={ hasActiveMetaboxes } />\n\t\t\t\t<ViewLink />\n\t\t\t\t<PostPublishButtonOrToggle\n\t\t\t\t\tforceIsDirty={ hasActiveMetaboxes }\n\t\t\t\t\tsetEntitiesSavedStatesCallback={\n\t\t\t\t\t\tsetEntitiesSavedStatesCallback\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t\t{ ( isLargeViewport || ! showIconLabels ) && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<PinnedItems.Slot scope=\"core/edit-post\" />\n\t\t\t\t\t\t<MoreMenu showIconLabels={ showIconLabels } />\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t\t{ showIconLabels && ! isLargeViewport && (\n\t\t\t\t\t<MoreMenu showIconLabels={ showIconLabels } />\n\t\t\t\t) }\n\t\t\t</motion.div>\n\t\t</div>\n\t);\n}\n\nexport default Header;\n"]}
1
+ {"version":3,"names":["PostSavedState","PostPreviewButton","useSelect","PinnedItems","useViewportMatch","__unstableMotion","motion","FullscreenModeClose","HeaderToolbar","MoreMenu","PostPublishButtonOrToggle","default","DevicePreview","ViewLink","MainDashboardButton","store","editPostStore","DocumentActions","slideY","hidden","y","hover","transition","type","delay","slideX","x","Header","setEntitiesSavedStatesCallback","isLargeViewport","hasActiveMetaboxes","isPublishSidebarOpened","showIconLabels","select","hasMetaBoxes","isFeatureActive","createElement","className","Slot","div","variants","showTooltip","forceIsDirty","forceIsAutosaveable","Fragment","scope"],"sources":["@wordpress/edit-post/src/components/header/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { PostSavedState, PostPreviewButton } from '@wordpress/editor';\nimport { useSelect } from '@wordpress/data';\nimport { PinnedItems } from '@wordpress/interface';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { __unstableMotion as motion } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport FullscreenModeClose from './fullscreen-mode-close';\nimport HeaderToolbar from './header-toolbar';\nimport MoreMenu from './more-menu';\nimport PostPublishButtonOrToggle from './post-publish-button-or-toggle';\nimport { default as DevicePreview } from '../device-preview';\nimport ViewLink from '../view-link';\nimport MainDashboardButton from './main-dashboard-button';\nimport { store as editPostStore } from '../../store';\nimport DocumentActions from './document-actions';\n\nconst slideY = {\n\thidden: { y: '-50px' },\n\thover: { y: 0, transition: { type: 'tween', delay: 0.2 } },\n};\n\nconst slideX = {\n\thidden: { x: '-100%' },\n\thover: { x: 0, transition: { type: 'tween', delay: 0.2 } },\n};\n\nfunction Header( { setEntitiesSavedStatesCallback } ) {\n\tconst isLargeViewport = useViewportMatch( 'large' );\n\tconst { hasActiveMetaboxes, isPublishSidebarOpened, showIconLabels } =\n\t\tuseSelect(\n\t\t\t( select ) => ( {\n\t\t\t\thasActiveMetaboxes: select( editPostStore ).hasMetaBoxes(),\n\t\t\t\tisPublishSidebarOpened:\n\t\t\t\t\tselect( editPostStore ).isPublishSidebarOpened(),\n\t\t\t\tshowIconLabels:\n\t\t\t\t\tselect( editPostStore ).isFeatureActive( 'showIconLabels' ),\n\t\t\t} ),\n\t\t\t[]\n\t\t);\n\n\treturn (\n\t\t<div className=\"edit-post-header\">\n\t\t\t<MainDashboardButton.Slot>\n\t\t\t\t<motion.div\n\t\t\t\t\tvariants={ slideX }\n\t\t\t\t\ttransition={ { type: 'tween', delay: 0.8 } }\n\t\t\t\t>\n\t\t\t\t\t<FullscreenModeClose showTooltip />\n\t\t\t\t</motion.div>\n\t\t\t</MainDashboardButton.Slot>\n\t\t\t<motion.div\n\t\t\t\tvariants={ slideY }\n\t\t\t\ttransition={ { type: 'tween', delay: 0.8 } }\n\t\t\t\tclassName=\"edit-post-header__toolbar\"\n\t\t\t>\n\t\t\t\t<HeaderToolbar />\n\t\t\t\t<div className=\"edit-post-header__center\">\n\t\t\t\t\t<DocumentActions />\n\t\t\t\t</div>\n\t\t\t</motion.div>\n\t\t\t<motion.div\n\t\t\t\tvariants={ slideY }\n\t\t\t\ttransition={ { type: 'tween', delay: 0.8 } }\n\t\t\t\tclassName=\"edit-post-header__settings\"\n\t\t\t>\n\t\t\t\t{ ! isPublishSidebarOpened && (\n\t\t\t\t\t// This button isn't completely hidden by the publish sidebar.\n\t\t\t\t\t// We can't hide the whole toolbar when the publish sidebar is open because\n\t\t\t\t\t// we want to prevent mounting/unmounting the PostPublishButtonOrToggle DOM node.\n\t\t\t\t\t// We track that DOM node to return focus to the PostPublishButtonOrToggle\n\t\t\t\t\t// when the publish sidebar has been closed.\n\t\t\t\t\t<PostSavedState\n\t\t\t\t\t\tforceIsDirty={ hasActiveMetaboxes }\n\t\t\t\t\t\tshowIconLabels={ showIconLabels }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t<DevicePreview />\n\t\t\t\t<PostPreviewButton forceIsAutosaveable={ hasActiveMetaboxes } />\n\t\t\t\t<ViewLink />\n\t\t\t\t<PostPublishButtonOrToggle\n\t\t\t\t\tforceIsDirty={ hasActiveMetaboxes }\n\t\t\t\t\tsetEntitiesSavedStatesCallback={\n\t\t\t\t\t\tsetEntitiesSavedStatesCallback\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t\t{ ( isLargeViewport || ! showIconLabels ) && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<PinnedItems.Slot scope=\"core/edit-post\" />\n\t\t\t\t\t\t<MoreMenu showIconLabels={ showIconLabels } />\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t\t{ showIconLabels && ! isLargeViewport && (\n\t\t\t\t\t<MoreMenu showIconLabels={ showIconLabels } />\n\t\t\t\t) }\n\t\t\t</motion.div>\n\t\t</div>\n\t);\n}\n\nexport default Header;\n"],"mappings":";AAAA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AoB,CAAE,CAAC,EAChEM,aAAA,CAACvB,QAAQ,MAAE,CAAC,EACZuB,aAAA,CAAC1B,yBAAyB;IACzBgC,YAAY,EAAGZ,kBAAoB;IACnCF,8BAA8B,EAC7BA;EACA,CACD,CAAC,EACA,CAAEC,eAAe,IAAI,CAAEG,cAAc,KACtCI,aAAA,CAAAQ,QAAA,QACCR,aAAA,CAACjC,WAAW,CAACmC,IAAI;IAACO,KAAK,EAAC;EAAgB,CAAE,CAAC,EAC3CT,aAAA,CAAC3B,QAAQ;IAACuB,cAAc,EAAGA;EAAgB,CAAE,CAC5C,CACF,EACCA,cAAc,IAAI,CAAEH,eAAe,IACpCO,aAAA,CAAC3B,QAAQ;IAACuB,cAAc,EAAGA;EAAgB,CAAE,CAEnC,CACR,CAAC;AAER;AAEA,eAAeL,MAAM"}
@@ -1,19 +1,18 @@
1
1
  import { createElement } from "@wordpress/element";
2
-
3
2
  /**
4
3
  * External dependencies
5
4
  */
6
5
  import { Keyboard } from 'react-native';
6
+
7
7
  /**
8
8
  * WordPress dependencies
9
9
  */
10
-
11
10
  import { Component } from '@wordpress/element';
12
11
  import '@wordpress/interface';
12
+
13
13
  /**
14
14
  * Internal dependencies
15
15
  */
16
-
17
16
  import HeaderToolbar from './header-toolbar';
18
17
  export default class Header extends Component {
19
18
  constructor() {
@@ -24,34 +23,28 @@ export default class Header extends Component {
24
23
  isKeyboardVisible: false
25
24
  };
26
25
  }
27
-
28
26
  componentDidMount() {
29
27
  this.keyboardShowSubscription = Keyboard.addListener('keyboardDidShow', this.keyboardDidShow);
30
28
  this.keyboardHideSubscription = Keyboard.addListener('keyboardDidHide', this.keyboardDidHide);
31
29
  }
32
-
33
30
  componentWillUnmount() {
34
31
  this.keyboardShowSubscription.remove();
35
32
  this.keyboardHideSubscription.remove();
36
33
  }
37
-
38
34
  keyboardDidShow() {
39
35
  this.setState({
40
36
  isKeyboardVisible: true
41
37
  });
42
38
  }
43
-
44
39
  keyboardDidHide() {
45
40
  this.setState({
46
41
  isKeyboardVisible: false
47
42
  });
48
43
  }
49
-
50
44
  render() {
51
45
  return createElement(HeaderToolbar, {
52
46
  showKeyboardHideButton: this.state.isKeyboardVisible
53
47
  });
54
48
  }
55
-
56
49
  }
57
50
  //# sourceMappingURL=index.native.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-post/src/components/header/index.native.js"],"names":["Keyboard","Component","HeaderToolbar","Header","constructor","arguments","keyboardDidShow","bind","keyboardDidHide","state","isKeyboardVisible","componentDidMount","keyboardShowSubscription","addListener","keyboardHideSubscription","componentWillUnmount","remove","setState","render"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,QAAT,QAAyB,cAAzB;AAEA;AACA;AACA;;AACA,SAASC,SAAT,QAA0B,oBAA1B;AACA,OAAO,sBAAP;AAEA;AACA;AACA;;AACA,OAAOC,aAAP,MAA0B,kBAA1B;AAEA,eAAe,MAAMC,MAAN,SAAqBF,SAArB,CAA+B;AAC7CG,EAAAA,WAAW,GAAG;AACb,UAAO,GAAGC,SAAV;AAEA,SAAKC,eAAL,GAAuB,KAAKA,eAAL,CAAqBC,IAArB,CAA2B,IAA3B,CAAvB;AACA,SAAKC,eAAL,GAAuB,KAAKA,eAAL,CAAqBD,IAArB,CAA2B,IAA3B,CAAvB;AAEA,SAAKE,KAAL,GAAa;AACZC,MAAAA,iBAAiB,EAAE;AADP,KAAb;AAGA;;AAEDC,EAAAA,iBAAiB,GAAG;AACnB,SAAKC,wBAAL,GAAgCZ,QAAQ,CAACa,WAAT,CAC/B,iBAD+B,EAE/B,KAAKP,eAF0B,CAAhC;AAIA,SAAKQ,wBAAL,GAAgCd,QAAQ,CAACa,WAAT,CAC/B,iBAD+B,EAE/B,KAAKL,eAF0B,CAAhC;AAIA;;AAEDO,EAAAA,oBAAoB,GAAG;AACtB,SAAKH,wBAAL,CAA8BI,MAA9B;AACA,SAAKF,wBAAL,CAA8BE,MAA9B;AACA;;AAEDV,EAAAA,eAAe,GAAG;AACjB,SAAKW,QAAL,CAAe;AAAEP,MAAAA,iBAAiB,EAAE;AAArB,KAAf;AACA;;AAEDF,EAAAA,eAAe,GAAG;AACjB,SAAKS,QAAL,CAAe;AAAEP,MAAAA,iBAAiB,EAAE;AAArB,KAAf;AACA;;AAEDQ,EAAAA,MAAM,GAAG;AACR,WACC,cAAC,aAAD;AACC,MAAA,sBAAsB,EAAG,KAAKT,KAAL,CAAWC;AADrC,MADD;AAKA;;AA1C4C","sourcesContent":["/**\n * External dependencies\n */\nimport { Keyboard } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport HeaderToolbar from './header-toolbar';\n\nexport default class Header extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.keyboardDidShow = this.keyboardDidShow.bind( this );\n\t\tthis.keyboardDidHide = this.keyboardDidHide.bind( this );\n\n\t\tthis.state = {\n\t\t\tisKeyboardVisible: false,\n\t\t};\n\t}\n\n\tcomponentDidMount() {\n\t\tthis.keyboardShowSubscription = Keyboard.addListener(\n\t\t\t'keyboardDidShow',\n\t\t\tthis.keyboardDidShow\n\t\t);\n\t\tthis.keyboardHideSubscription = Keyboard.addListener(\n\t\t\t'keyboardDidHide',\n\t\t\tthis.keyboardDidHide\n\t\t);\n\t}\n\n\tcomponentWillUnmount() {\n\t\tthis.keyboardShowSubscription.remove();\n\t\tthis.keyboardHideSubscription.remove();\n\t}\n\n\tkeyboardDidShow() {\n\t\tthis.setState( { isKeyboardVisible: true } );\n\t}\n\n\tkeyboardDidHide() {\n\t\tthis.setState( { isKeyboardVisible: false } );\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<HeaderToolbar\n\t\t\t\tshowKeyboardHideButton={ this.state.isKeyboardVisible }\n\t\t\t/>\n\t\t);\n\t}\n}\n"]}
1
+ {"version":3,"names":["Keyboard","Component","HeaderToolbar","Header","constructor","arguments","keyboardDidShow","bind","keyboardDidHide","state","isKeyboardVisible","componentDidMount","keyboardShowSubscription","addListener","keyboardHideSubscription","componentWillUnmount","remove","setState","render","createElement","showKeyboardHideButton"],"sources":["@wordpress/edit-post/src/components/header/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { Keyboard } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport HeaderToolbar from './header-toolbar';\n\nexport default class Header extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.keyboardDidShow = this.keyboardDidShow.bind( this );\n\t\tthis.keyboardDidHide = this.keyboardDidHide.bind( this );\n\n\t\tthis.state = {\n\t\t\tisKeyboardVisible: false,\n\t\t};\n\t}\n\n\tcomponentDidMount() {\n\t\tthis.keyboardShowSubscription = Keyboard.addListener(\n\t\t\t'keyboardDidShow',\n\t\t\tthis.keyboardDidShow\n\t\t);\n\t\tthis.keyboardHideSubscription = Keyboard.addListener(\n\t\t\t'keyboardDidHide',\n\t\t\tthis.keyboardDidHide\n\t\t);\n\t}\n\n\tcomponentWillUnmount() {\n\t\tthis.keyboardShowSubscription.remove();\n\t\tthis.keyboardHideSubscription.remove();\n\t}\n\n\tkeyboardDidShow() {\n\t\tthis.setState( { isKeyboardVisible: true } );\n\t}\n\n\tkeyboardDidHide() {\n\t\tthis.setState( { isKeyboardVisible: false } );\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<HeaderToolbar\n\t\t\t\tshowKeyboardHideButton={ this.state.isKeyboardVisible }\n\t\t\t/>\n\t\t);\n\t}\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,QAAQ,QAAQ,cAAc;;AAEvC;AACA;AACA;AACA,SAASC,SAAS,QAAQ,oBAAoB;AAC9C,OAAO,sBAAsB;;AAE7B;AACA;AACA;AACA,OAAOC,aAAa,MAAM,kBAAkB;AAE5C,eAAe,MAAMC,MAAM,SAASF,SAAS,CAAC;EAC7CG,WAAWA,CAAA,EAAG;IACb,KAAK,CAAE,GAAGC,SAAU,CAAC;IAErB,IAAI,CAACC,eAAe,GAAG,IAAI,CAACA,eAAe,CAACC,IAAI,CAAE,IAAK,CAAC;IACxD,IAAI,CAACC,eAAe,GAAG,IAAI,CAACA,eAAe,CAACD,IAAI,CAAE,IAAK,CAAC;IAExD,IAAI,CAACE,KAAK,GAAG;MACZC,iBAAiB,EAAE;IACpB,CAAC;EACF;EAEAC,iBAAiBA,CAAA,EAAG;IACnB,IAAI,CAACC,wBAAwB,GAAGZ,QAAQ,CAACa,WAAW,CACnD,iBAAiB,EACjB,IAAI,CAACP,eACN,CAAC;IACD,IAAI,CAACQ,wBAAwB,GAAGd,QAAQ,CAACa,WAAW,CACnD,iBAAiB,EACjB,IAAI,CAACL,eACN,CAAC;EACF;EAEAO,oBAAoBA,CAAA,EAAG;IACtB,IAAI,CAACH,wBAAwB,CAACI,MAAM,CAAC,CAAC;IACtC,IAAI,CAACF,wBAAwB,CAACE,MAAM,CAAC,CAAC;EACvC;EAEAV,eAAeA,CAAA,EAAG;IACjB,IAAI,CAACW,QAAQ,CAAE;MAAEP,iBAAiB,EAAE;IAAK,CAAE,CAAC;EAC7C;EAEAF,eAAeA,CAAA,EAAG;IACjB,IAAI,CAACS,QAAQ,CAAE;MAAEP,iBAAiB,EAAE;IAAM,CAAE,CAAC;EAC9C;EAEAQ,MAAMA,CAAA,EAAG;IACR,OACCC,aAAA,CAACjB,aAAa;MACbkB,sBAAsB,EAAG,IAAI,CAACX,KAAK,CAACC;IAAmB,CACvD,CAAC;EAEJ;AACD"}
@@ -1,5 +1,4 @@
1
1
  import { createElement } from "@wordpress/element";
2
-
3
2
  /**
4
3
  * WordPress dependencies
5
4
  */
@@ -10,22 +9,18 @@ const {
10
9
  Slot: MainDashboardButtonSlot
11
10
  } = createSlotFill(slotName);
12
11
  const MainDashboardButton = Fill;
13
-
14
12
  const Slot = ({
15
13
  children
16
14
  }) => {
17
15
  const fills = useSlotFills(slotName);
18
16
  const hasFills = Boolean(fills && fills.length);
19
-
20
17
  if (!hasFills) {
21
18
  return children;
22
19
  }
23
-
24
20
  return createElement(MainDashboardButtonSlot, {
25
21
  bubblesVirtually: true
26
22
  });
27
23
  };
28
-
29
24
  MainDashboardButton.Slot = Slot;
30
25
  export default MainDashboardButton;
31
26
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-post/src/components/header/main-dashboard-button/index.js"],"names":["__experimentalUseSlotFills","useSlotFills","createSlotFill","slotName","Fill","Slot","MainDashboardButtonSlot","MainDashboardButton","children","fills","hasFills","Boolean","length"],"mappings":";;AAAA;AACA;AACA;AACA,SACCA,0BAA0B,IAAIC,YAD/B,EAECC,cAFD,QAGO,uBAHP;AAKA,MAAMC,QAAQ,GAAG,mCAAjB;AAEA,MAAM;AAAEC,EAAAA,IAAF;AAAQC,EAAAA,IAAI,EAAEC;AAAd,IAA0CJ,cAAc,CAAEC,QAAF,CAA9D;AAEA,MAAMI,mBAAmB,GAAGH,IAA5B;;AAEA,MAAMC,IAAI,GAAG,CAAE;AAAEG,EAAAA;AAAF,CAAF,KAAoB;AAChC,QAAMC,KAAK,GAAGR,YAAY,CAAEE,QAAF,CAA1B;AACA,QAAMO,QAAQ,GAAGC,OAAO,CAAEF,KAAK,IAAIA,KAAK,CAACG,MAAjB,CAAxB;;AAEA,MAAK,CAAEF,QAAP,EAAkB;AACjB,WAAOF,QAAP;AACA;;AAED,SAAO,cAAC,uBAAD;AAAyB,IAAA,gBAAgB;AAAzC,IAAP;AACA,CATD;;AAWAD,mBAAmB,CAACF,IAApB,GAA2BA,IAA3B;AAEA,eAAeE,mBAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalUseSlotFills as useSlotFills,\n\tcreateSlotFill,\n} from '@wordpress/components';\n\nconst slotName = '__experimentalMainDashboardButton';\n\nconst { Fill, Slot: MainDashboardButtonSlot } = createSlotFill( slotName );\n\nconst MainDashboardButton = Fill;\n\nconst Slot = ( { children } ) => {\n\tconst fills = useSlotFills( slotName );\n\tconst hasFills = Boolean( fills && fills.length );\n\n\tif ( ! hasFills ) {\n\t\treturn children;\n\t}\n\n\treturn <MainDashboardButtonSlot bubblesVirtually />;\n};\n\nMainDashboardButton.Slot = Slot;\n\nexport default MainDashboardButton;\n"]}
1
+ {"version":3,"names":["__experimentalUseSlotFills","useSlotFills","createSlotFill","slotName","Fill","Slot","MainDashboardButtonSlot","MainDashboardButton","children","fills","hasFills","Boolean","length","createElement","bubblesVirtually"],"sources":["@wordpress/edit-post/src/components/header/main-dashboard-button/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalUseSlotFills as useSlotFills,\n\tcreateSlotFill,\n} from '@wordpress/components';\n\nconst slotName = '__experimentalMainDashboardButton';\n\nconst { Fill, Slot: MainDashboardButtonSlot } = createSlotFill( slotName );\n\nconst MainDashboardButton = Fill;\n\nconst Slot = ( { children } ) => {\n\tconst fills = useSlotFills( slotName );\n\tconst hasFills = Boolean( fills && fills.length );\n\n\tif ( ! hasFills ) {\n\t\treturn children;\n\t}\n\n\treturn <MainDashboardButtonSlot bubblesVirtually />;\n};\n\nMainDashboardButton.Slot = Slot;\n\nexport default MainDashboardButton;\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,0BAA0B,IAAIC,YAAY,EAC1CC,cAAc,QACR,uBAAuB;AAE9B,MAAMC,QAAQ,GAAG,mCAAmC;AAEpD,MAAM;EAAEC,IAAI;EAAEC,IAAI,EAAEC;AAAwB,CAAC,GAAGJ,cAAc,CAAEC,QAAS,CAAC;AAE1E,MAAMI,mBAAmB,GAAGH,IAAI;AAEhC,MAAMC,IAAI,GAAGA,CAAE;EAAEG;AAAS,CAAC,KAAM;EAChC,MAAMC,KAAK,GAAGR,YAAY,CAAEE,QAAS,CAAC;EACtC,MAAMO,QAAQ,GAAGC,OAAO,CAAEF,KAAK,IAAIA,KAAK,CAACG,MAAO,CAAC;EAEjD,IAAK,CAAEF,QAAQ,EAAG;IACjB,OAAOF,QAAQ;EAChB;EAEA,OAAOK,aAAA,CAACP,uBAAuB;IAACQ,gBAAgB;EAAA,CAAE,CAAC;AACpD,CAAC;AAEDP,mBAAmB,CAACF,IAAI,GAAGA,IAAI;AAE/B,eAAeE,mBAAmB"}
@@ -1,5 +1,4 @@
1
1
  import { createElement } from "@wordpress/element";
2
-
3
2
  /**
4
3
  * WordPress dependencies
5
4
  */
@@ -8,17 +7,17 @@ import { MenuItemsChoice, MenuGroup } from '@wordpress/components';
8
7
  import { useSelect, useDispatch } from '@wordpress/data';
9
8
  import { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';
10
9
  import { store as editorStore } from '@wordpress/editor';
10
+
11
11
  /**
12
12
  * Internal dependencies
13
13
  */
14
-
15
14
  import { store as editPostStore } from '../../../store';
15
+
16
16
  /**
17
17
  * Set of available mode options.
18
18
  *
19
19
  * @type {Array}
20
20
  */
21
-
22
21
  const MODES = [{
23
22
  value: 'visual',
24
23
  label: __('Visual editor')
@@ -26,7 +25,6 @@ const MODES = [{
26
25
  value: 'text',
27
26
  label: __('Code editor')
28
27
  }];
29
-
30
28
  function ModeSwitcher() {
31
29
  const {
32
30
  shortcut,
@@ -44,32 +42,45 @@ function ModeSwitcher() {
44
42
  const {
45
43
  switchEditorMode
46
44
  } = useDispatch(editPostStore);
47
-
48
45
  if (isEditingTemplate) {
49
46
  return null;
50
47
  }
51
-
52
- if (!isRichEditingEnabled || !isCodeEditingEnabled) {
53
- return null;
48
+ let selectedMode = mode;
49
+ if (!isRichEditingEnabled && mode === 'visual') {
50
+ selectedMode = 'text';
51
+ }
52
+ if (!isCodeEditingEnabled && mode === 'text') {
53
+ selectedMode = 'visual';
54
54
  }
55
-
56
55
  const choices = MODES.map(choice => {
57
- if (choice.value !== mode) {
58
- return { ...choice,
56
+ if (!isCodeEditingEnabled && choice.value === 'text') {
57
+ choice = {
58
+ ...choice,
59
+ disabled: true
60
+ };
61
+ }
62
+ if (!isRichEditingEnabled && choice.value === 'visual') {
63
+ choice = {
64
+ ...choice,
65
+ disabled: true,
66
+ info: __('You can enable the visual editor in your profile settings.')
67
+ };
68
+ }
69
+ if (choice.value !== selectedMode && !choice.disabled) {
70
+ return {
71
+ ...choice,
59
72
  shortcut
60
73
  };
61
74
  }
62
-
63
75
  return choice;
64
76
  });
65
77
  return createElement(MenuGroup, {
66
78
  label: __('Editor')
67
79
  }, createElement(MenuItemsChoice, {
68
80
  choices: choices,
69
- value: mode,
81
+ value: selectedMode,
70
82
  onSelect: switchEditorMode
71
83
  }));
72
84
  }
73
-
74
85
  export default ModeSwitcher;
75
86
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-post/src/components/header/mode-switcher/index.js"],"names":["__","MenuItemsChoice","MenuGroup","useSelect","useDispatch","store","keyboardShortcutsStore","editorStore","editPostStore","MODES","value","label","ModeSwitcher","shortcut","isRichEditingEnabled","isCodeEditingEnabled","isEditingTemplate","mode","select","getShortcutRepresentation","getEditorSettings","richEditingEnabled","codeEditingEnabled","getEditorMode","switchEditorMode","choices","map","choice"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,EAAT,QAAmB,iBAAnB;AACA,SAASC,eAAT,EAA0BC,SAA1B,QAA2C,uBAA3C;AACA,SAASC,SAAT,EAAoBC,WAApB,QAAuC,iBAAvC;AACA,SAASC,KAAK,IAAIC,sBAAlB,QAAgD,+BAAhD;AACA,SAASD,KAAK,IAAIE,WAAlB,QAAqC,mBAArC;AAEA;AACA;AACA;;AACA,SAASF,KAAK,IAAIG,aAAlB,QAAuC,gBAAvC;AAEA;AACA;AACA;AACA;AACA;;AACA,MAAMC,KAAK,GAAG,CACb;AACCC,EAAAA,KAAK,EAAE,QADR;AAECC,EAAAA,KAAK,EAAEX,EAAE,CAAE,eAAF;AAFV,CADa,EAKb;AACCU,EAAAA,KAAK,EAAE,MADR;AAECC,EAAAA,KAAK,EAAEX,EAAE,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,QAAQ,EAAGO;AAHZ,IADD,CADD;AASA;;AAED,eAAeZ,YAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { MenuItemsChoice, MenuGroup } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport { store as editorStore } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { store as editPostStore } from '../../../store';\n\n/**\n * Set of available mode options.\n *\n * @type {Array}\n */\nconst MODES = [\n\t{\n\t\tvalue: 'visual',\n\t\tlabel: __( 'Visual editor' ),\n\t},\n\t{\n\t\tvalue: 'text',\n\t\tlabel: __( 'Code editor' ),\n\t},\n];\n\nfunction ModeSwitcher() {\n\tconst {\n\t\tshortcut,\n\t\tisRichEditingEnabled,\n\t\tisCodeEditingEnabled,\n\t\tisEditingTemplate,\n\t\tmode,\n\t} = useSelect(\n\t\t( select ) => ( {\n\t\t\tshortcut: select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getShortcutRepresentation( 'core/edit-post/toggle-mode' ),\n\t\t\tisRichEditingEnabled:\n\t\t\t\tselect( editorStore ).getEditorSettings().richEditingEnabled,\n\t\t\tisCodeEditingEnabled:\n\t\t\t\tselect( editorStore ).getEditorSettings().codeEditingEnabled,\n\t\t\tisEditingTemplate: select( editPostStore ).isEditingTemplate(),\n\t\t\tmode: select( editPostStore ).getEditorMode(),\n\t\t} ),\n\t\t[]\n\t);\n\tconst { switchEditorMode } = useDispatch( editPostStore );\n\n\tif ( isEditingTemplate ) {\n\t\treturn null;\n\t}\n\n\tif ( ! isRichEditingEnabled || ! isCodeEditingEnabled ) {\n\t\treturn null;\n\t}\n\n\tconst choices = MODES.map( ( choice ) => {\n\t\tif ( choice.value !== mode ) {\n\t\t\treturn { ...choice, shortcut };\n\t\t}\n\t\treturn choice;\n\t} );\n\n\treturn (\n\t\t<MenuGroup label={ __( 'Editor' ) }>\n\t\t\t<MenuItemsChoice\n\t\t\t\tchoices={ choices }\n\t\t\t\tvalue={ mode }\n\t\t\t\tonSelect={ switchEditorMode }\n\t\t\t/>\n\t\t</MenuGroup>\n\t);\n}\n\nexport default ModeSwitcher;\n"]}
1
+ {"version":3,"names":["__","MenuItemsChoice","MenuGroup","useSelect","useDispatch","store","keyboardShortcutsStore","editorStore","editPostStore","MODES","value","label","ModeSwitcher","shortcut","isRichEditingEnabled","isCodeEditingEnabled","isEditingTemplate","mode","select","getShortcutRepresentation","getEditorSettings","richEditingEnabled","codeEditingEnabled","getEditorMode","switchEditorMode","selectedMode","choices","map","choice","disabled","info","createElement","onSelect"],"sources":["@wordpress/edit-post/src/components/header/mode-switcher/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { MenuItemsChoice, MenuGroup } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport { store as editorStore } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { store as editPostStore } from '../../../store';\n\n/**\n * Set of available mode options.\n *\n * @type {Array}\n */\nconst MODES = [\n\t{\n\t\tvalue: 'visual',\n\t\tlabel: __( 'Visual editor' ),\n\t},\n\t{\n\t\tvalue: 'text',\n\t\tlabel: __( 'Code editor' ),\n\t},\n];\n\nfunction ModeSwitcher() {\n\tconst {\n\t\tshortcut,\n\t\tisRichEditingEnabled,\n\t\tisCodeEditingEnabled,\n\t\tisEditingTemplate,\n\t\tmode,\n\t} = useSelect(\n\t\t( select ) => ( {\n\t\t\tshortcut: select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getShortcutRepresentation( 'core/edit-post/toggle-mode' ),\n\t\t\tisRichEditingEnabled:\n\t\t\t\tselect( editorStore ).getEditorSettings().richEditingEnabled,\n\t\t\tisCodeEditingEnabled:\n\t\t\t\tselect( editorStore ).getEditorSettings().codeEditingEnabled,\n\t\t\tisEditingTemplate: select( editPostStore ).isEditingTemplate(),\n\t\t\tmode: select( editPostStore ).getEditorMode(),\n\t\t} ),\n\t\t[]\n\t);\n\tconst { switchEditorMode } = useDispatch( editPostStore );\n\n\tif ( isEditingTemplate ) {\n\t\treturn null;\n\t}\n\n\tlet selectedMode = mode;\n\tif ( ! isRichEditingEnabled && mode === 'visual' ) {\n\t\tselectedMode = 'text';\n\t}\n\tif ( ! isCodeEditingEnabled && mode === 'text' ) {\n\t\tselectedMode = 'visual';\n\t}\n\n\tconst choices = MODES.map( ( choice ) => {\n\t\tif ( ! isCodeEditingEnabled && choice.value === 'text' ) {\n\t\t\tchoice = {\n\t\t\t\t...choice,\n\t\t\t\tdisabled: true,\n\t\t\t};\n\t\t}\n\t\tif ( ! isRichEditingEnabled && choice.value === 'visual' ) {\n\t\t\tchoice = {\n\t\t\t\t...choice,\n\t\t\t\tdisabled: true,\n\t\t\t\tinfo: __(\n\t\t\t\t\t'You can enable the visual editor in your profile settings.'\n\t\t\t\t),\n\t\t\t};\n\t\t}\n\t\tif ( choice.value !== selectedMode && ! choice.disabled ) {\n\t\t\treturn { ...choice, shortcut };\n\t\t}\n\t\treturn choice;\n\t} );\n\n\treturn (\n\t\t<MenuGroup label={ __( 'Editor' ) }>\n\t\t\t<MenuItemsChoice\n\t\t\t\tchoices={ choices }\n\t\t\t\tvalue={ selectedMode }\n\t\t\t\tonSelect={ switchEditorMode }\n\t\t\t/>\n\t\t</MenuGroup>\n\t);\n}\n\nexport default ModeSwitcher;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,eAAe,EAAEC,SAAS,QAAQ,uBAAuB;AAClE,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,KAAK,IAAIC,sBAAsB,QAAQ,+BAA+B;AAC/E,SAASD,KAAK,IAAIE,WAAW,QAAQ,mBAAmB;;AAExD;AACA;AACA;AACA,SAASF,KAAK,IAAIG,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ACxC,IAAK,CAAEb,oBAAoB,IAAIa,MAAM,CAAClB,KAAK,KAAK,MAAM,EAAG;MACxDkB,MAAM,GAAG;QACR,GAAGA,MAAM;QACTC,QAAQ,EAAE;MACX,CAAC;IACF;IACA,IAAK,CAAEf,oBAAoB,IAAIc,MAAM,CAAClB,KAAK,KAAK,QAAQ,EAAG;MAC1DkB,MAAM,GAAG;QACR,GAAGA,MAAM;QACTC,QAAQ,EAAE,IAAI;QACdC,IAAI,EAAE9B,EAAE,CACP,4DACD;MACD,CAAC;IACF;IACA,IAAK4B,MAAM,CAAClB,KAAK,KAAKe,YAAY,IAAI,CAAEG,MAAM,CAACC,QAAQ,EAAG;MACzD,OAAO;QAAE,GAAGD,MAAM;QAAEf;MAAS,CAAC;IAC/B;IACA,OAAOe,MAAM;EACd,CAAE,CAAC;EAEH,OACCG,aAAA,CAAC7B,SAAS;IAACS,KAAK,EAAGX,EAAE,CAAE,QAAS;EAAG,GAClC+B,aAAA,CAAC9B,eAAe;IACfyB,OAAO,EAAGA,OAAS;IACnBhB,KAAK,EAAGe,YAAc;IACtBO,QAAQ,EAAGR;EAAkB,CAC7B,CACS,CAAC;AAEd;AAEA,eAAeZ,YAAY"}
@@ -1,5 +1,4 @@
1
1
  import { createElement, Fragment } from "@wordpress/element";
2
-
3
2
  /**
4
3
  * WordPress dependencies
5
4
  */
@@ -7,15 +6,14 @@ import { __ } from '@wordpress/i18n';
7
6
  import { MenuGroup } from '@wordpress/components';
8
7
  import { ActionItem, MoreMenuDropdown, PinnedItems } from '@wordpress/interface';
9
8
  import { useViewportMatch } from '@wordpress/compose';
9
+
10
10
  /**
11
11
  * Internal dependencies
12
12
  */
13
-
14
13
  import ModeSwitcher from '../mode-switcher';
15
14
  import PreferencesMenuItem from '../preferences-menu-item';
16
15
  import ToolsMoreMenuGroup from '../tools-more-menu-group';
17
16
  import WritingMenu from '../writing-menu';
18
-
19
17
  const MoreMenu = ({
20
18
  showIconLabels
21
19
  }) => {
@@ -45,6 +43,5 @@ const MoreMenu = ({
45
43
  }
46
44
  }), createElement(MenuGroup, null, createElement(PreferencesMenuItem, null))));
47
45
  };
48
-
49
46
  export default MoreMenu;
50
47
  //# sourceMappingURL=index.js.map
@@ -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,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
+ {"version":3,"names":["__","MenuGroup","ActionItem","MoreMenuDropdown","PinnedItems","useViewportMatch","ModeSwitcher","PreferencesMenuItem","ToolsMoreMenuGroup","WritingMenu","MoreMenu","showIconLabels","isLargeViewport","createElement","toggleProps","showTooltip","variant","onClose","Fragment","Slot","className","scope","name","label","as","fillProps","onClick"],"sources":["@wordpress/edit-post/src/components/header/more-menu/index.js"],"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"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,SAAS,QAAQ,uBAAuB;AACjD,SACCC,UAAU,EACVC,gBAAgB,EAChBC,WAAW,QACL,sBAAsB;AAC7B,SAASC,gBAAgB,QAAQ,oBAAoB;;AAErD;AACA;AACA;AACA,OAAOC,YAAY,MAAM,kBAAkB;AAC3C,OAAOC,mBAAmB,MAAM,0BAA0B;AAC1D,OAAOC,kBAAkB,MAAM,0BAA0B;AACzD,OAAOC,WAAW,MAAM,iBAAiB;AAEzC,MAAMC,QAAQ,GAAGA,CAAE;EAAEC;AAAe,CAAC,KAAM;EAC1C,MAAMC,eAAe,GAAGP,gBAAgB,CAAE,OAAQ,CAAC;EAEnD,OACCQ,aAAA,CAACV,gBAAgB;IAChBW,WAAW,EAAG;MACbC,WAAW,EAAE,CAAEJ,cAAc;MAC7B,IAAKA,cAAc,IAAI;QAAEK,OAAO,EAAE;MAAW,CAAC;IAC/C;EAAG,GAED,CAAE;IAAEC;EAAQ,CAAC,KACdJ,aAAA,CAAAK,QAAA,QACGP,cAAc,IAAI,CAAEC,eAAe,IACpCC,aAAA,CAACT,WAAW,CAACe,IAAI;IAChBC,SAAS,EAAGT,cAAc,IAAI,kBAAoB;IAClDU,KAAK,EAAC;EAAgB,CACtB,CACD,EACDR,aAAA,CAACJ,WAAW,MAAE,CAAC,EACfI,aAAA,CAACP,YAAY,MAAE,CAAC,EAChBO,aAAA,CAACX,UAAU,CAACiB,IAAI;IACfG,IAAI,EAAC,iCAAiC;IACtCC,KAAK,EAAGvB,EAAE,CAAE,SAAU,CAAG;IACzBwB,EAAE,EAAGvB,SAAW;IAChBwB,SAAS,EAAG;MAAEC,OAAO,EAAET;IAAQ;EAAG,CAClC,CAAC,EACFJ,aAAA,CAACL,kBAAkB,CAACW,IAAI;IAACM,SAAS,EAAG;MAAER;IAAQ;EAAG,CAAE,CAAC,EACrDJ,aAAA,CAACZ,SAAS,QACTY,aAAA,CAACN,mBAAmB,MAAE,CACZ,CACV,CAEc,CAAC;AAErB,CAAC;AAED,eAAeG,QAAQ"}
@@ -5,6 +5,7 @@ import { ActionItem } from '@wordpress/interface';
5
5
  import { compose } from '@wordpress/compose';
6
6
  import { MenuItem } from '@wordpress/components';
7
7
  import { withPluginContext } from '@wordpress/plugins';
8
+
8
9
  /**
9
10
  * Renders a menu item in `Plugins` group in `More Menu` drop down, and can be used to as a button or link depending on the props provided.
10
11
  * The text within the component appears as the menu item label.
@@ -61,10 +62,8 @@ import { withPluginContext } from '@wordpress/plugins';
61
62
  *
62
63
  * @return {WPComponent} The component to be rendered.
63
64
  */
64
-
65
65
  export default compose(withPluginContext((context, ownProps) => {
66
66
  var _ownProps$as;
67
-
68
67
  return {
69
68
  as: (_ownProps$as = ownProps.as) !== null && _ownProps$as !== void 0 ? _ownProps$as : MenuItem,
70
69
  icon: ownProps.icon || context.icon,
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-post/src/components/header/plugin-more-menu-item/index.js"],"names":["ActionItem","compose","MenuItem","withPluginContext","context","ownProps","as","icon","name"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,UAAT,QAA2B,sBAA3B;AACA,SAASC,OAAT,QAAwB,oBAAxB;AACA,SAASC,QAAT,QAAyB,uBAAzB;AACA,SAASC,iBAAT,QAAkC,oBAAlC;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,eAAeF,OAAO,CACrBE,iBAAiB,CAAE,CAAEC,OAAF,EAAWC,QAAX,KAAyB;AAAA;;AAC3C,SAAO;AACNC,IAAAA,EAAE,kBAAED,QAAQ,CAACC,EAAX,uDAAiBJ,QADb;AAENK,IAAAA,IAAI,EAAEF,QAAQ,CAACE,IAAT,IAAiBH,OAAO,CAACG,IAFzB;AAGNC,IAAAA,IAAI,EAAE;AAHA,GAAP;AAKA,CANgB,CADI,CAAP,CAQZR,UARY,CAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { ActionItem } from '@wordpress/interface';\nimport { compose } from '@wordpress/compose';\nimport { MenuItem } from '@wordpress/components';\nimport { withPluginContext } from '@wordpress/plugins';\n\n/**\n * Renders a menu item in `Plugins` group in `More Menu` drop down, and can be used to as a button or link depending on the props provided.\n * The text within the component appears as the menu item label.\n *\n * @param {Object} props Component properties.\n * @param {string} [props.href] When `href` is provided then the menu item is represented as an anchor rather than button. It corresponds to the `href` attribute of the anchor.\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 * @param {Function} [props.onClick=noop] The callback function to be executed when the user clicks the menu item.\n * @param {...*} [props.other] Any additional props are passed through to the underlying [MenuItem](https://github.com/WordPress/gutenberg/tree/HEAD/packages/components/src/menu-item/README.md) component.\n *\n * @example\n * ```js\n * // Using ES5 syntax\n * var __ = wp.i18n.__;\n * var PluginMoreMenuItem = wp.editPost.PluginMoreMenuItem;\n * var moreIcon = wp.element.createElement( 'svg' ); //... svg element.\n *\n * function onButtonClick() {\n * \talert( 'Button clicked.' );\n * }\n *\n * function MyButtonMoreMenuItem() {\n * \treturn wp.element.createElement(\n * \t\tPluginMoreMenuItem,\n * \t\t{\n * \t\t\ticon: moreIcon,\n * \t\t\tonClick: onButtonClick,\n * \t\t},\n * \t\t__( 'My button title' )\n * \t);\n * }\n * ```\n *\n * @example\n * ```jsx\n * // Using ESNext syntax\n * import { __ } from '@wordpress/i18n';\n * import { PluginMoreMenuItem } from '@wordpress/edit-post';\n * import { more } from '@wordpress/icons';\n *\n * function onButtonClick() {\n * \talert( 'Button clicked.' );\n * }\n *\n * const MyButtonMoreMenuItem = () => (\n * \t<PluginMoreMenuItem\n * \t\ticon={ more }\n * \t\tonClick={ onButtonClick }\n * \t>\n * \t\t{ __( 'My button title' ) }\n * \t</PluginMoreMenuItem>\n * );\n * ```\n *\n * @return {WPComponent} The component to be rendered.\n */\nexport default compose(\n\twithPluginContext( ( context, ownProps ) => {\n\t\treturn {\n\t\t\tas: ownProps.as ?? MenuItem,\n\t\t\ticon: ownProps.icon || context.icon,\n\t\t\tname: 'core/edit-post/plugin-more-menu',\n\t\t};\n\t} )\n)( ActionItem );\n"]}
1
+ {"version":3,"names":["ActionItem","compose","MenuItem","withPluginContext","context","ownProps","_ownProps$as","as","icon","name"],"sources":["@wordpress/edit-post/src/components/header/plugin-more-menu-item/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { ActionItem } from '@wordpress/interface';\nimport { compose } from '@wordpress/compose';\nimport { MenuItem } from '@wordpress/components';\nimport { withPluginContext } from '@wordpress/plugins';\n\n/**\n * Renders a menu item in `Plugins` group in `More Menu` drop down, and can be used to as a button or link depending on the props provided.\n * The text within the component appears as the menu item label.\n *\n * @param {Object} props Component properties.\n * @param {string} [props.href] When `href` is provided then the menu item is represented as an anchor rather than button. It corresponds to the `href` attribute of the anchor.\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 * @param {Function} [props.onClick=noop] The callback function to be executed when the user clicks the menu item.\n * @param {...*} [props.other] Any additional props are passed through to the underlying [MenuItem](https://github.com/WordPress/gutenberg/tree/HEAD/packages/components/src/menu-item/README.md) component.\n *\n * @example\n * ```js\n * // Using ES5 syntax\n * var __ = wp.i18n.__;\n * var PluginMoreMenuItem = wp.editPost.PluginMoreMenuItem;\n * var moreIcon = wp.element.createElement( 'svg' ); //... svg element.\n *\n * function onButtonClick() {\n * \talert( 'Button clicked.' );\n * }\n *\n * function MyButtonMoreMenuItem() {\n * \treturn wp.element.createElement(\n * \t\tPluginMoreMenuItem,\n * \t\t{\n * \t\t\ticon: moreIcon,\n * \t\t\tonClick: onButtonClick,\n * \t\t},\n * \t\t__( 'My button title' )\n * \t);\n * }\n * ```\n *\n * @example\n * ```jsx\n * // Using ESNext syntax\n * import { __ } from '@wordpress/i18n';\n * import { PluginMoreMenuItem } from '@wordpress/edit-post';\n * import { more } from '@wordpress/icons';\n *\n * function onButtonClick() {\n * \talert( 'Button clicked.' );\n * }\n *\n * const MyButtonMoreMenuItem = () => (\n * \t<PluginMoreMenuItem\n * \t\ticon={ more }\n * \t\tonClick={ onButtonClick }\n * \t>\n * \t\t{ __( 'My button title' ) }\n * \t</PluginMoreMenuItem>\n * );\n * ```\n *\n * @return {WPComponent} The component to be rendered.\n */\nexport default compose(\n\twithPluginContext( ( context, ownProps ) => {\n\t\treturn {\n\t\t\tas: ownProps.as ?? MenuItem,\n\t\t\ticon: ownProps.icon || context.icon,\n\t\t\tname: 'core/edit-post/plugin-more-menu',\n\t\t};\n\t} )\n)( ActionItem );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,UAAU,QAAQ,sBAAsB;AACjD,SAASC,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,QAAQ,QAAQ,uBAAuB;AAChD,SAASC,iBAAiB,QAAQ,oBAAoB;;AAEtD;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAeF,OAAO,CACrBE,iBAAiB,CAAE,CAAEC,OAAO,EAAEC,QAAQ,KAAM;EAAA,IAAAC,YAAA;EAC3C,OAAO;IACNC,EAAE,GAAAD,YAAA,GAAED,QAAQ,CAACE,EAAE,cAAAD,YAAA,cAAAA,YAAA,GAAIJ,QAAQ;IAC3BM,IAAI,EAAEH,QAAQ,CAACG,IAAI,IAAIJ,OAAO,CAACI,IAAI;IACnCC,IAAI,EAAE;EACP,CAAC;AACF,CAAE,CACH,CAAC,CAAET,UAAW,CAAC"}
@@ -1,9 +1,9 @@
1
1
  import { createElement } from "@wordpress/element";
2
-
3
2
  /**
4
3
  * WordPress dependencies
5
4
  */
6
5
  import { ComplementaryAreaMoreMenuItem } from '@wordpress/interface';
6
+
7
7
  /**
8
8
  * Renders a menu item in `Plugins` group in `More Menu` drop down,
9
9
  * and can be used to activate the corresponding `PluginSidebar` component.
@@ -53,7 +53,8 @@ import { ComplementaryAreaMoreMenuItem } from '@wordpress/interface';
53
53
  */
54
54
 
55
55
  export default function PluginSidebarMoreMenuItem(props) {
56
- return createElement(ComplementaryAreaMoreMenuItem // Menu item is marked with unstable prop for backward compatibility.
56
+ return createElement(ComplementaryAreaMoreMenuItem
57
+ // Menu item is marked with unstable prop for backward compatibility.
57
58
  // @see https://github.com/WordPress/gutenberg/issues/14457
58
59
  , {
59
60
  __unstableExplicitMenuItem: true,
@@ -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,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"]}
1
+ {"version":3,"names":["ComplementaryAreaMoreMenuItem","PluginSidebarMoreMenuItem","props","createElement","__unstableExplicitMenuItem","scope"],"sources":["@wordpress/edit-post/src/components/header/plugin-sidebar-more-menu-item/index.js"],"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"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,6BAA6B,QAAQ,sBAAsB;;AAEpE;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,yBAAyBA,CAAEC,KAAK,EAAG;EAC1D,OACCC,aAAA,CAACH;EACA;EACA;EAAA;IACAI,0BAA0B;IAC1BC,KAAK,EAAC,gBAAgB;IAAA,GACjBH;EAAK,CACV,CAAC;AAEJ"}
@@ -1,15 +1,14 @@
1
1
  import { createElement } from "@wordpress/element";
2
-
3
2
  /**
4
3
  * WordPress dependencies
5
4
  */
6
5
  import { useViewportMatch, compose } from '@wordpress/compose';
7
6
  import { withDispatch, withSelect } from '@wordpress/data';
8
7
  import { PostPublishButton, store as editorStore } from '@wordpress/editor';
8
+
9
9
  /**
10
10
  * Internal dependencies
11
11
  */
12
-
13
12
  import { store as editPostStore } from '../../store';
14
13
  export function PostPublishButtonOrToggle({
15
14
  forceIsDirty,
@@ -27,6 +26,7 @@ export function PostPublishButtonOrToggle({
27
26
  const IS_BUTTON = 'button';
28
27
  const isSmallerThanMediumViewport = useViewportMatch('medium', '<');
29
28
  let component;
29
+
30
30
  /**
31
31
  * Conditions to show a BUTTON (publish directly) or a TOGGLE (open publish sidebar):
32
32
  *
@@ -49,7 +49,6 @@ export function PostPublishButtonOrToggle({
49
49
  * - if it is enabled, we show a TOGGLE
50
50
  * - if it is disabled, we show a BUTTON
51
51
  */
52
-
53
52
  if (isPublished || isScheduled && isBeingScheduled || isPending && !hasPublishAction && !isSmallerThanMediumViewport) {
54
53
  component = IS_BUTTON;
55
54
  } else if (isSmallerThanMediumViewport) {
@@ -59,7 +58,6 @@ export function PostPublishButtonOrToggle({
59
58
  } else {
60
59
  component = IS_BUTTON;
61
60
  }
62
-
63
61
  return createElement(PostPublishButton, {
64
62
  forceIsDirty: forceIsDirty,
65
63
  isOpen: isPublishSidebarOpened,
@@ -70,7 +68,6 @@ export function PostPublishButtonOrToggle({
70
68
  }
71
69
  export default compose(withSelect(select => {
72
70
  var _select$getCurrentPos;
73
-
74
71
  return {
75
72
  hasPublishAction: (_select$getCurrentPos = select(editorStore).getCurrentPost()?._links?.['wp:action-publish']) !== null && _select$getCurrentPos !== void 0 ? _select$getCurrentPos : false,
76
73
  isBeingScheduled: select(editorStore).isEditedPostBeingScheduled(),
@@ -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","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,gBAF0C;AAG1CC,EAAAA,gBAH0C;AAI1CC,EAAAA,SAJ0C;AAK1CC,EAAAA,WAL0C;AAM1CC,EAAAA,uBAN0C;AAO1CC,EAAAA,sBAP0C;AAQ1CC,EAAAA,WAR0C;AAS1CC,EAAAA,oBAT0C;AAU1CC,EAAAA;AAV0C,CAApC,EAWH;AACH,QAAMC,SAAS,GAAG,QAAlB;AACA,QAAMC,SAAS,GAAG,QAAlB;AACA,QAAMC,2BAA2B,GAAGrB,gBAAgB,CAAE,QAAF,EAAY,GAAZ,CAApD;AACA,MAAIsB,SAAJ;AAEA;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACC,MACCT,WAAW,IACTG,WAAW,IAAIL,gBADjB,IAEEC,SAAS,IAAI,CAAEF,gBAAf,IAAmC,CAAEW,2BAHxC,EAIE;AACDC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,CAAEvB,aAAF,CAAzC;AACA,SAAO;AACNU,IAAAA;AADM,GAAP;AAGA,CALW,CAfS,CAAP,CAqBZT,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\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\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,"names":["useViewportMatch","compose","withDispatch","withSelect","PostPublishButton","store","editorStore","editPostStore","PostPublishButtonOrToggle","forceIsDirty","hasPublishAction","isBeingScheduled","isPending","isPublished","isPublishSidebarEnabled","isPublishSidebarOpened","isScheduled","togglePublishSidebar","setEntitiesSavedStatesCallback","IS_TOGGLE","IS_BUTTON","isSmallerThanMediumViewport","component","createElement","isOpen","isToggle","onToggle","select","_select$getCurrentPos","getCurrentPost","_links","isEditedPostBeingScheduled","isCurrentPostPending","isCurrentPostPublished","isCurrentPostScheduled","dispatch"],"sources":["@wordpress/edit-post/src/components/header/post-publish-button-or-toggle.js"],"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\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\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"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,gBAAgB,EAAEC,OAAO,QAAQ,oBAAoB;AAC9D,SAASC,YAAY,EAAEC,UAAU,QAAQ,iBAAiB;AAC1D,SAASC,iBAAiB,EAAEC,KAAK,IAAIC,WAAW,QAAQ,mBAAmB;;AAE3E;AACA;AACA;AACA,SAASD,KAAK,IAAIE,aAAa,QAAQ,aAAa;AAEpD,OAAO,SAASC,yBAAyBA,CAAE;EAC1CC,YAAY;EACZC,gBAAgB;EAChBC,gBAAgB;EAChBC,SAAS;EACTC,WAAW;EACXC,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AAC,CAAC0B,oBAAoB,CAAC,CAAC;IACvDnB,WAAW,EAAEc,MAAM,CAAErB,WAAY,CAAC,CAAC2B,sBAAsB,CAAC,CAAC;IAC3DnB,uBAAuB,EACtBa,MAAM,CAAErB,WAAY,CAAC,CAACQ,uBAAuB,CAAC,CAAC;IAChDC,sBAAsB,EACrBY,MAAM,CAAEpB,aAAc,CAAC,CAACQ,sBAAsB,CAAC,CAAC;IACjDC,WAAW,EAAEW,MAAM,CAAErB,WAAY,CAAC,CAAC4B,sBAAsB,CAAC;EAC3D,CAAC;AAAA,CAAG,CAAC,EACLhC,YAAY,CAAIiC,QAAQ,IAAM;EAC7B,MAAM;IAAElB;EAAqB,CAAC,GAAGkB,QAAQ,CAAE5B,aAAc,CAAC;EAC1D,OAAO;IACNU;EACD,CAAC;AACF,CAAE,CACH,CAAC,CAAET,yBAA0B,CAAC"}
@@ -1,5 +1,4 @@
1
1
  import { createElement } from "@wordpress/element";
2
-
3
2
  /**
4
3
  * WordPress dependencies
5
4
  */
@@ -7,10 +6,10 @@ import { useDispatch } from '@wordpress/data';
7
6
  import { __ } from '@wordpress/i18n';
8
7
  import { MenuItem } from '@wordpress/components';
9
8
  import { store as interfaceStore } from '@wordpress/interface';
9
+
10
10
  /**
11
11
  * Internal dependencies
12
12
  */
13
-
14
13
  import { PREFERENCES_MODAL_NAME } from '../../../components/preferences-modal';
15
14
  export default function PreferencesMenuItem() {
16
15
  const {
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-post/src/components/header/preferences-menu-item/index.js"],"names":["useDispatch","__","MenuItem","store","interfaceStore","PREFERENCES_MODAL_NAME","PreferencesMenuItem","openModal"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,WAAT,QAA4B,iBAA5B;AACA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SAASC,QAAT,QAAyB,uBAAzB;AACA,SAASC,KAAK,IAAIC,cAAlB,QAAwC,sBAAxC;AAEA;AACA;AACA;;AACA,SAASC,sBAAT,QAAuC,uCAAvC;AAEA,eAAe,SAASC,mBAAT,GAA+B;AAC7C,QAAM;AAAEC,IAAAA;AAAF,MAAgBP,WAAW,CAAEI,cAAF,CAAjC;AACA,SACC,cAAC,QAAD;AACC,IAAA,OAAO,EAAG,MAAM;AACfG,MAAAA,SAAS,CAAEF,sBAAF,CAAT;AACA;AAHF,KAKGJ,EAAE,CAAE,aAAF,CALL,CADD;AASA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { MenuItem } from '@wordpress/components';\nimport { store as interfaceStore } from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport { PREFERENCES_MODAL_NAME } from '../../../components/preferences-modal';\n\nexport default function PreferencesMenuItem() {\n\tconst { openModal } = useDispatch( interfaceStore );\n\treturn (\n\t\t<MenuItem\n\t\t\tonClick={ () => {\n\t\t\t\topenModal( PREFERENCES_MODAL_NAME );\n\t\t\t} }\n\t\t>\n\t\t\t{ __( 'Preferences' ) }\n\t\t</MenuItem>\n\t);\n}\n"]}
1
+ {"version":3,"names":["useDispatch","__","MenuItem","store","interfaceStore","PREFERENCES_MODAL_NAME","PreferencesMenuItem","openModal","createElement","onClick"],"sources":["@wordpress/edit-post/src/components/header/preferences-menu-item/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { MenuItem } from '@wordpress/components';\nimport { store as interfaceStore } from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport { PREFERENCES_MODAL_NAME } from '../../../components/preferences-modal';\n\nexport default function PreferencesMenuItem() {\n\tconst { openModal } = useDispatch( interfaceStore );\n\treturn (\n\t\t<MenuItem\n\t\t\tonClick={ () => {\n\t\t\t\topenModal( PREFERENCES_MODAL_NAME );\n\t\t\t} }\n\t\t>\n\t\t\t{ __( 'Preferences' ) }\n\t\t</MenuItem>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,WAAW,QAAQ,iBAAiB;AAC7C,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,QAAQ,QAAQ,uBAAuB;AAChD,SAASC,KAAK,IAAIC,cAAc,QAAQ,sBAAsB;;AAE9D;AACA;AACA;AACA,SAASC,sBAAsB,QAAQ,uCAAuC;AAE9E,eAAe,SAASC,mBAAmBA,CAAA,EAAG;EAC7C,MAAM;IAAEC;EAAU,CAAC,GAAGP,WAAW,CAAEI,cAAe,CAAC;EACnD,OACCI,aAAA,CAACN,QAAQ;IACRO,OAAO,EAAGA,CAAA,KAAM;MACfF,SAAS,CAAEF,sBAAuB,CAAC;IACpC;EAAG,GAEDJ,EAAE,CAAE,aAAc,CACX,CAAC;AAEb"}
@@ -1,5 +1,4 @@
1
1
  import { createElement } from "@wordpress/element";
2
-
3
2
  /**
4
3
  * WordPress dependencies
5
4
  */
@@ -9,7 +8,6 @@ const {
9
8
  Fill: ToolsMoreMenuGroup,
10
9
  Slot
11
10
  } = createSlotFill('ToolsMoreMenuGroup');
12
-
13
11
  ToolsMoreMenuGroup.Slot = ({
14
12
  fillProps
15
13
  }) => createElement(Slot, {
@@ -17,6 +15,5 @@ ToolsMoreMenuGroup.Slot = ({
17
15
  }, fills => fills.length > 0 && createElement(MenuGroup, {
18
16
  label: __('Tools')
19
17
  }, fills));
20
-
21
18
  export default ToolsMoreMenuGroup;
22
19
  //# 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,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"]}
1
+ {"version":3,"names":["createSlotFill","MenuGroup","__","Fill","ToolsMoreMenuGroup","Slot","fillProps","createElement","fills","length","label"],"sources":["@wordpress/edit-post/src/components/header/tools-more-menu-group/index.js"],"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"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,cAAc,EAAEC,SAAS,QAAQ,uBAAuB;AACjE,SAASC,EAAE,QAAQ,iBAAiB;AAEpC,MAAM;EAAEC,IAAI,EAAEC,kBAAkB;EAAEC;AAAK,CAAC,GACvCL,cAAc,CAAE,oBAAqB,CAAC;AAEvCI,kBAAkB,CAACC,IAAI,GAAG,CAAE;EAAEC;AAAU,CAAC,KACxCC,aAAA,CAACF,IAAI;EAACC,SAAS,EAAGA;AAAW,GACxBE,KAAK,IACRA,KAAK,CAACC,MAAM,GAAG,CAAC,IACfF,aAAA,CAACN,SAAS;EAACS,KAAK,EAAGR,EAAE,CAAE,OAAQ;AAAG,GAAGM,KAAkB,CAGpD,CACN;AAED,eAAeJ,kBAAkB"}
@@ -1,5 +1,4 @@
1
1
  import { createElement } from "@wordpress/element";
2
-
3
2
  /**
4
3
  * WordPress dependencies
5
4
  */
@@ -10,12 +9,11 @@ import { useViewportMatch } from '@wordpress/compose';
10
9
  import { displayShortcut } from '@wordpress/keycodes';
11
10
  import { PreferenceToggleMenuItem, store as preferencesStore } from '@wordpress/preferences';
12
11
  import { store as blockEditorStore } from '@wordpress/block-editor';
12
+
13
13
  /**
14
14
  * Internal dependencies
15
15
  */
16
-
17
16
  import { store as postEditorStore } from '../../../store';
18
-
19
17
  function WritingMenu() {
20
18
  const registry = useRegistry();
21
19
  const isDistractionFree = useSelect(select => select(blockEditorStore).getSettings().isDistractionFree, []);
@@ -27,7 +25,6 @@ function WritingMenu() {
27
25
  const {
28
26
  set: setPreference
29
27
  } = useDispatch(preferencesStore);
30
-
31
28
  const toggleDistractionFree = () => {
32
29
  registry.batch(() => {
33
30
  setPreference('core/edit-post', 'fixedToolbar', false);
@@ -36,13 +33,10 @@ function WritingMenu() {
36
33
  closeGeneralSidebar();
37
34
  });
38
35
  };
39
-
40
36
  const isLargeViewport = useViewportMatch('medium');
41
-
42
37
  if (!isLargeViewport) {
43
38
  return null;
44
39
  }
45
-
46
40
  return createElement(MenuGroup, {
47
41
  label: _x('View', 'noun')
48
42
  }, createElement(PreferenceToggleMenuItem, {
@@ -79,6 +73,5 @@ function WritingMenu() {
79
73
  shortcut: displayShortcut.primaryShift('\\')
80
74
  }));
81
75
  }
82
-
83
76
  export default WritingMenu;
84
77
  //# sourceMappingURL=index.js.map
@@ -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","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;;AAE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A,EAAE,CAAE,wBAAF,CAJV;AAKC,IAAA,gBAAgB,EAAGA,EAAE,CAAE,2BAAF,CALtB;AAMC,IAAA,kBAAkB,EAAGA,EAAE,CAAE,6BAAF,CANxB;AAOC,IAAA,QAAQ,EAAGG,eAAe,CAACmB,SAAhB,CAA2B,GAA3B;AAPZ,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"]}
1
+ {"version":3,"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","createElement","label","scope","disabled","name","info","messageActivated","messageDeactivated","shortcut","secondary","onToggle","primaryShift"],"sources":["@wordpress/edit-post/src/components/header/writing-menu/index.js"],"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"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,SAAS,EAAEC,WAAW,EAAEC,WAAW,QAAQ,iBAAiB;AACrE,SAASC,SAAS,QAAQ,uBAAuB;AACjD,SAASC,EAAE,EAAEC,EAAE,QAAQ,iBAAiB;AACxC,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SAASC,eAAe,QAAQ,qBAAqB;AACrD,SACCC,wBAAwB,EACxBC,KAAK,IAAIC,gBAAgB,QACnB,wBAAwB;AAC/B,SAASD,KAAK,IAAIE,gBAAgB,QAAQ,yBAAyB;;AAEnE;AACA;AACA;AACA,SAASF,KAAK,IAAIG,eAAe,QAAQ,gBAAgB;AAEzD,SAASC,WAAWA,CAAA,EAAG;EACtB,MAAMC,QAAQ,GAAGZ,WAAW,CAAC,CAAC;EAC9B,MAAMa,iBAAiB,GAAGf,SAAS,CAChCgB,MAAM,IACPA,MAAM,CAAEL,gBAAiB,CAAC,CAACM,WAAW,CAAC,CAAC,CAACF,iBAAiB,EAC3D,EACD,CAAC;EAED,MAAM;IAAEG,mBAAmB;IAAEC,mBAAmB;IAAEC;EAAoB,CAAC,GACtEnB,WAAW,CAAEW,eAAgB,CAAC;EAC/B,MAAM;IAAES,GAAG,EAAEC;EAAc,CAAC,GAAGrB,WAAW,CAAES,gBAAiB,CAAC;EAE9D,MAAMa,qBAAqB,GAAGA,CAAA,KAAM;IACnCT,QAAQ,CAACU,KAAK,CAAE,MAAM;MACrBF,aAAa,CAAE,gBAAgB,EAAE,cAAc,EAAE,KAAM,CAAC;MACxDJ,mBAAmB,CAAE,KAAM,CAAC;MAC5BC,mBAAm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