@wordpress/edit-post 7.9.0 → 7.10.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.
- package/CHANGELOG.md +2 -0
- package/build/components/header/header-toolbar/index.js +6 -12
- package/build/components/header/header-toolbar/index.js.map +1 -1
- package/build/components/header/index.js +3 -1
- package/build/components/header/index.js.map +1 -1
- package/build/components/keyboard-shortcuts/index.js +1 -1
- package/build/components/keyboard-shortcuts/index.js.map +1 -1
- package/build/components/sidebar/plugin-document-setting-panel/index.js +1 -3
- package/build/components/sidebar/plugin-document-setting-panel/index.js.map +1 -1
- package/build/components/sidebar/plugin-post-status-info/index.js +1 -4
- package/build/components/sidebar/plugin-post-status-info/index.js.map +1 -1
- package/build/components/sidebar/post-status/index.js +8 -1
- package/build/components/sidebar/post-status/index.js.map +1 -1
- package/build/components/sidebar/post-trash/index.js +5 -3
- package/build/components/sidebar/post-trash/index.js.map +1 -1
- package/build/components/sidebar/settings-sidebar/index.js +1 -1
- package/build/components/sidebar/settings-sidebar/index.js.map +1 -1
- package/build/components/view-link/index.js +52 -0
- package/build/components/view-link/index.js.map +1 -0
- package/build/components/visual-editor/header.native.js +10 -3
- package/build/components/visual-editor/header.native.js.map +1 -1
- package/build/editor.js +11 -1
- package/build/editor.js.map +1 -1
- package/build-module/components/header/header-toolbar/index.js +6 -12
- package/build-module/components/header/header-toolbar/index.js.map +1 -1
- package/build-module/components/header/index.js +2 -1
- package/build-module/components/header/index.js.map +1 -1
- package/build-module/components/keyboard-shortcuts/index.js +1 -1
- package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
- package/build-module/components/sidebar/plugin-document-setting-panel/index.js +1 -1
- package/build-module/components/sidebar/plugin-document-setting-panel/index.js.map +1 -1
- package/build-module/components/sidebar/plugin-post-status-info/index.js +1 -1
- package/build-module/components/sidebar/plugin-post-status-info/index.js.map +1 -1
- package/build-module/components/sidebar/post-status/index.js +8 -2
- package/build-module/components/sidebar/post-status/index.js.map +1 -1
- package/build-module/components/sidebar/post-trash/index.js +4 -2
- package/build-module/components/sidebar/post-trash/index.js.map +1 -1
- package/build-module/components/sidebar/settings-sidebar/index.js +1 -1
- package/build-module/components/sidebar/settings-sidebar/index.js.map +1 -1
- package/build-module/components/view-link/index.js +39 -0
- package/build-module/components/view-link/index.js.map +1 -0
- package/build-module/components/visual-editor/header.native.js +10 -3
- package/build-module/components/visual-editor/header.native.js.map +1 -1
- package/build-module/editor.js +9 -1
- package/build-module/editor.js.map +1 -1
- package/build-style/style-rtl.css +1 -1
- package/build-style/style.css +1 -1
- package/package.json +32 -30
- package/src/components/header/header-toolbar/index.js +8 -17
- package/src/components/header/index.js +2 -0
- package/src/components/keyboard-shortcut-help-modal/test/__snapshots__/index.js.snap +3 -1
- package/src/components/keyboard-shortcuts/index.js +1 -1
- package/src/components/layout/style.scss +0 -1
- package/src/components/preferences-modal/test/__snapshots__/index.js.snap +9 -5
- package/src/components/sidebar/plugin-document-setting-panel/index.js +1 -1
- package/src/components/sidebar/plugin-post-status-info/index.js +1 -1
- package/src/components/sidebar/post-status/index.js +14 -2
- package/src/components/sidebar/post-trash/index.js +3 -3
- package/src/components/sidebar/settings-sidebar/index.js +1 -1
- package/src/components/start-page-options/style.scss +1 -1
- package/src/components/view-link/index.js +37 -0
- package/src/components/visual-editor/header.native.js +12 -4
- package/src/components/visual-editor/style.scss +1 -1
- package/src/editor.js +7 -0
package/src/editor.js
CHANGED
|
@@ -14,6 +14,8 @@ import { SlotFillProvider } from '@wordpress/components';
|
|
|
14
14
|
import { store as coreStore } from '@wordpress/core-data';
|
|
15
15
|
import { ShortcutProvider } from '@wordpress/keyboard-shortcuts';
|
|
16
16
|
import { store as preferencesStore } from '@wordpress/preferences';
|
|
17
|
+
import { CommandMenu } from '@wordpress/commands';
|
|
18
|
+
import { privateApis as coreCommandsPrivateApis } from '@wordpress/core-commands';
|
|
17
19
|
|
|
18
20
|
/**
|
|
19
21
|
* Internal dependencies
|
|
@@ -24,8 +26,10 @@ import { store as editPostStore } from './store';
|
|
|
24
26
|
import { unlock } from './private-apis';
|
|
25
27
|
|
|
26
28
|
const { ExperimentalEditorProvider } = unlock( editorPrivateApis );
|
|
29
|
+
const { useCommands } = unlock( coreCommandsPrivateApis );
|
|
27
30
|
|
|
28
31
|
function Editor( { postId, postType, settings, initialEdits, ...props } ) {
|
|
32
|
+
useCommands();
|
|
29
33
|
const {
|
|
30
34
|
hasFixedToolbar,
|
|
31
35
|
focusMode,
|
|
@@ -185,6 +189,9 @@ function Editor( { postId, postType, settings, initialEdits, ...props } ) {
|
|
|
185
189
|
{ ...props }
|
|
186
190
|
>
|
|
187
191
|
<ErrorBoundary>
|
|
192
|
+
{ window?.__experimentalEnableCommandCenter && (
|
|
193
|
+
<CommandMenu />
|
|
194
|
+
) }
|
|
188
195
|
<EditorInitialization postId={ postId } />
|
|
189
196
|
<Layout styles={ styles } />
|
|
190
197
|
</ErrorBoundary>
|