@wordpress/edit-post 7.17.0 → 7.18.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 (50) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/components/header/header-toolbar/index.js +4 -2
  3. package/build/components/header/header-toolbar/index.js.map +1 -1
  4. package/build/components/layout/index.js +1 -1
  5. package/build/components/layout/index.js.map +1 -1
  6. package/build/components/sidebar/plugin-document-setting-panel/index.js +1 -1
  7. package/build/components/sidebar/plugin-document-setting-panel/index.js.map +1 -1
  8. package/build/components/sidebar/post-taxonomies/taxonomy-panel.js +20 -18
  9. package/build/components/sidebar/post-taxonomies/taxonomy-panel.js.map +1 -1
  10. package/build/components/start-page-options/index.js +31 -35
  11. package/build/components/start-page-options/index.js.map +1 -1
  12. package/build/components/visual-editor/index.js +6 -3
  13. package/build/components/visual-editor/index.js.map +1 -1
  14. package/build/index.js +1 -1
  15. package/build/index.js.map +1 -1
  16. package/build/plugins/copy-content-menu-item/index.js +6 -1
  17. package/build/plugins/copy-content-menu-item/index.js.map +1 -1
  18. package/build/store/selectors.js +1 -1
  19. package/build/store/selectors.js.map +1 -1
  20. package/build-module/components/header/header-toolbar/index.js +4 -2
  21. package/build-module/components/header/header-toolbar/index.js.map +1 -1
  22. package/build-module/components/layout/index.js +2 -2
  23. package/build-module/components/layout/index.js.map +1 -1
  24. package/build-module/components/sidebar/plugin-document-setting-panel/index.js +1 -1
  25. package/build-module/components/sidebar/plugin-document-setting-panel/index.js.map +1 -1
  26. package/build-module/components/sidebar/post-taxonomies/taxonomy-panel.js +21 -19
  27. package/build-module/components/sidebar/post-taxonomies/taxonomy-panel.js.map +1 -1
  28. package/build-module/components/start-page-options/index.js +31 -35
  29. package/build-module/components/start-page-options/index.js.map +1 -1
  30. package/build-module/components/visual-editor/index.js +6 -3
  31. package/build-module/components/visual-editor/index.js.map +1 -1
  32. package/build-module/index.js +1 -1
  33. package/build-module/index.js.map +1 -1
  34. package/build-module/plugins/copy-content-menu-item/index.js +6 -1
  35. package/build-module/plugins/copy-content-menu-item/index.js.map +1 -1
  36. package/build-module/store/selectors.js +1 -1
  37. package/build-module/store/selectors.js.map +1 -1
  38. package/build-style/style-rtl.css +2 -1
  39. package/build-style/style.css +2 -1
  40. package/package.json +32 -32
  41. package/src/components/header/header-toolbar/index.js +2 -0
  42. package/src/components/layout/index.js +1 -2
  43. package/src/components/preferences-modal/test/index.js +7 -3
  44. package/src/components/secondary-sidebar/style.scss +2 -1
  45. package/src/components/sidebar/post-taxonomies/taxonomy-panel.js +19 -32
  46. package/src/components/start-page-options/index.js +38 -54
  47. package/src/components/visual-editor/index.js +4 -2
  48. package/src/index.js +1 -1
  49. package/src/plugins/copy-content-menu-item/index.js +5 -5
  50. package/src/store/selectors.js +1 -1
@@ -180,7 +180,8 @@ export default function VisualEditor( { styles } ) {
180
180
  const desktopCanvasStyles = {
181
181
  height: '100%',
182
182
  width: '100%',
183
- margin: 0,
183
+ marginLeft: 'auto',
184
+ marginRight: 'auto',
184
185
  display: 'flex',
185
186
  flexFlow: 'column',
186
187
  // Default background color so that grey
@@ -217,7 +218,6 @@ export default function VisualEditor( { styles } ) {
217
218
  ref,
218
219
  useClipboardHandler(),
219
220
  useTypewriter(),
220
- useTypingObserver(),
221
221
  useBlockSelectionClearer(),
222
222
  ] );
223
223
 
@@ -305,6 +305,7 @@ export default function VisualEditor( { styles } ) {
305
305
  ? postContentLayout
306
306
  : fallbackLayout;
307
307
 
308
+ const observeTypingRef = useTypingObserver();
308
309
  const titleRef = useRef();
309
310
  useEffect( () => {
310
311
  if ( isWelcomeGuideVisible || ! isCleanNewPost() ) {
@@ -400,6 +401,7 @@ export default function VisualEditor( { styles } ) {
400
401
  }
401
402
  ) }
402
403
  contentEditable={ false }
404
+ ref={ observeTypingRef }
403
405
  >
404
406
  <PostTitle ref={ titleRef } />
405
407
  </div>
package/src/index.js CHANGED
@@ -62,7 +62,7 @@ export function initializeEditor(
62
62
  welcomeGuideTemplate: true,
63
63
  } );
64
64
 
65
- dispatch( blocksStore ).__experimentalReapplyBlockTypeFilters();
65
+ dispatch( blocksStore ).reapplyBlockTypeFilters();
66
66
 
67
67
  // Check if the block list view should be open by default.
68
68
  // If `distractionFree` mode is enabled, the block list view should not be open.
@@ -10,11 +10,11 @@ import { store as editorStore } from '@wordpress/editor';
10
10
 
11
11
  export default function CopyContentMenuItem() {
12
12
  const { createNotice } = useDispatch( noticesStore );
13
- const getText = useSelect(
14
- ( select ) => () =>
15
- select( editorStore ).getEditedPostAttribute( 'content' ),
16
- []
17
- );
13
+ const { getEditedPostAttribute } = useSelect( editorStore );
14
+
15
+ function getText() {
16
+ return getEditedPostAttribute( 'content' );
17
+ }
18
18
 
19
19
  function onSuccess() {
20
20
  createNotice( 'info', __( 'All content copied.' ), {
@@ -477,7 +477,7 @@ export function isInserterOpened( state ) {
477
477
  * @return {Object} The root client ID, index to insert at and starting filter value.
478
478
  */
479
479
  export function __experimentalGetInsertionPoint( state ) {
480
- if ( typeof state === 'boolean' ) {
480
+ if ( typeof state.blockInserterPanel === 'boolean' ) {
481
481
  return EMPTY_INSERTION_POINT;
482
482
  }
483
483