@wordpress/edit-post 8.9.0 → 8.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.
Files changed (62) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/components/init-pattern-modal/index.js +1 -1
  3. package/build/components/init-pattern-modal/index.js.map +1 -1
  4. package/build/components/layout/index.js +175 -170
  5. package/build/components/layout/index.js.map +1 -1
  6. package/build/components/layout/use-padding-appender.js +19 -16
  7. package/build/components/layout/use-padding-appender.js.map +1 -1
  8. package/build/components/meta-boxes/meta-box-visibility.js.map +1 -1
  9. package/build/components/meta-boxes/meta-boxes-area/index.js.map +1 -1
  10. package/build/components/preferences-modal/meta-boxes-section.js.map +1 -1
  11. package/build/deprecated.js.map +1 -1
  12. package/build/index.js +2 -4
  13. package/build/index.js.map +1 -1
  14. package/build/store/actions.js +1 -1
  15. package/build/store/actions.js.map +1 -1
  16. package/build/store/private-selectors.js.map +1 -1
  17. package/build/store/selectors.js.map +1 -1
  18. package/build/utils/meta-boxes.js.map +1 -1
  19. package/build-module/components/header/header-toolbar/index.native.js +1 -2
  20. package/build-module/components/header/header-toolbar/index.native.js.map +1 -1
  21. package/build-module/components/init-pattern-modal/index.js +2 -4
  22. package/build-module/components/init-pattern-modal/index.js.map +1 -1
  23. package/build-module/components/layout/index.js +177 -174
  24. package/build-module/components/layout/index.js.map +1 -1
  25. package/build-module/components/layout/index.native.js +1 -3
  26. package/build-module/components/layout/index.native.js.map +1 -1
  27. package/build-module/components/layout/use-padding-appender.js +20 -16
  28. package/build-module/components/layout/use-padding-appender.js.map +1 -1
  29. package/build-module/components/meta-boxes/index.js +1 -3
  30. package/build-module/components/meta-boxes/index.js.map +1 -1
  31. package/build-module/components/meta-boxes/meta-box-visibility.js.map +1 -1
  32. package/build-module/components/meta-boxes/meta-boxes-area/index.js +1 -2
  33. package/build-module/components/meta-boxes/meta-boxes-area/index.js.map +1 -1
  34. package/build-module/components/more-menu/index.js +1 -3
  35. package/build-module/components/more-menu/index.js.map +1 -1
  36. package/build-module/components/preferences-modal/enable-custom-fields.js +1 -3
  37. package/build-module/components/preferences-modal/enable-custom-fields.js.map +1 -1
  38. package/build-module/components/preferences-modal/meta-boxes-section.js +1 -2
  39. package/build-module/components/preferences-modal/meta-boxes-section.js.map +1 -1
  40. package/build-module/components/welcome-guide/default.js +1 -3
  41. package/build-module/components/welcome-guide/default.js.map +1 -1
  42. package/build-module/components/welcome-guide/image.js +1 -2
  43. package/build-module/components/welcome-guide/image.js.map +1 -1
  44. package/build-module/components/welcome-guide/template.js +1 -3
  45. package/build-module/components/welcome-guide/template.js.map +1 -1
  46. package/build-module/deprecated.js.map +1 -1
  47. package/build-module/index.js +2 -4
  48. package/build-module/index.js.map +1 -1
  49. package/build-module/store/actions.js +1 -1
  50. package/build-module/store/actions.js.map +1 -1
  51. package/build-module/store/private-selectors.js.map +1 -1
  52. package/build-module/store/selectors.js.map +1 -1
  53. package/build-module/utils/meta-boxes.js.map +1 -1
  54. package/build-style/style-rtl.css +65 -29
  55. package/build-style/style.css +65 -29
  56. package/package.json +32 -32
  57. package/src/components/init-pattern-modal/index.js +2 -2
  58. package/src/components/layout/index.js +169 -173
  59. package/src/components/layout/style.scss +83 -43
  60. package/src/components/layout/use-padding-appender.js +21 -18
  61. package/src/index.js +0 -2
  62. package/src/store/actions.js +1 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 8.10.0 (2024-10-16)
6
+
5
7
  ## 8.9.0 (2024-10-03)
6
8
 
7
9
  ## 8.8.0 (2024-09-19)
@@ -33,7 +33,7 @@ function InitPatternModal() {
33
33
  isNewPost: isCleanNewPost()
34
34
  };
35
35
  }, []);
36
- const [isModalOpen, setIsModalOpen] = (0, _element.useState)(() => isNewPost && postType === 'wp_block' ? true : false);
36
+ const [isModalOpen, setIsModalOpen] = (0, _element.useState)(() => isNewPost && postType === 'wp_block');
37
37
  if (postType !== 'wp_block' || !isNewPost) {
38
38
  return null;
39
39
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_data","require","_i18n","_components","_element","_editor","_jsxRuntime","InitPatternModal","editPost","useDispatch","editorStore","syncType","setSyncType","useState","undefined","title","setTitle","postType","isNewPost","useSelect","select","getEditedPostAttribute","isCleanNewPost","isModalOpen","setIsModalOpen","jsx","Fragment","children","Modal","__","onRequestClose","overlayClassName","onSubmit","event","preventDefault","meta","wp_pattern_sync_status","jsxs","__experimentalVStack","spacing","TextControl","label","value","onChange","placeholder","className","__nextHasNoMarginBottom","__next40pxDefaultSize","ToggleControl","_x","help","checked","__experimentalHStack","justify","Button","variant","type","disabled","accessibleWhenDisabled"],"sources":["@wordpress/edit-post/src/components/init-pattern-modal/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __, _x } from '@wordpress/i18n';\nimport {\n\tModal,\n\tButton,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\tToggleControl,\n\tTextControl,\n} from '@wordpress/components';\nimport { useState } from '@wordpress/element';\nimport { store as editorStore } from '@wordpress/editor';\n\nexport default function InitPatternModal() {\n\tconst { editPost } = useDispatch( editorStore );\n\tconst [ syncType, setSyncType ] = useState( undefined );\n\tconst [ title, setTitle ] = useState( '' );\n\n\tconst { postType, isNewPost } = useSelect( ( select ) => {\n\t\tconst { getEditedPostAttribute, isCleanNewPost } =\n\t\t\tselect( editorStore );\n\t\treturn {\n\t\t\tpostType: getEditedPostAttribute( 'type' ),\n\t\t\tisNewPost: isCleanNewPost(),\n\t\t};\n\t}, [] );\n\tconst [ isModalOpen, setIsModalOpen ] = useState( () =>\n\t\tisNewPost && postType === 'wp_block' ? true : false\n\t);\n\n\tif ( postType !== 'wp_block' || ! isNewPost ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t{ isModalOpen && (\n\t\t\t\t<Modal\n\t\t\t\t\ttitle={ __( 'Create pattern' ) }\n\t\t\t\t\tonRequestClose={ () => {\n\t\t\t\t\t\tsetIsModalOpen( false );\n\t\t\t\t\t} }\n\t\t\t\t\toverlayClassName=\"reusable-blocks-menu-items__convert-modal\"\n\t\t\t\t>\n\t\t\t\t\t<form\n\t\t\t\t\t\tonSubmit={ ( event ) => {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tsetIsModalOpen( false );\n\t\t\t\t\t\t\teditPost( {\n\t\t\t\t\t\t\t\ttitle,\n\t\t\t\t\t\t\t\tmeta: {\n\t\t\t\t\t\t\t\t\twp_pattern_sync_status: syncType,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t<VStack spacing=\"5\">\n\t\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\t\tlabel={ __( 'Name' ) }\n\t\t\t\t\t\t\t\tvalue={ title }\n\t\t\t\t\t\t\t\tonChange={ setTitle }\n\t\t\t\t\t\t\t\tplaceholder={ __( 'My pattern' ) }\n\t\t\t\t\t\t\t\tclassName=\"patterns-create-modal__name-input\"\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\tlabel={ _x( 'Synced', 'pattern (singular)' ) }\n\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t'Sync this pattern across multiple locations.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tchecked={ ! syncType }\n\t\t\t\t\t\t\t\tonChange={ () => {\n\t\t\t\t\t\t\t\t\tsetSyncType(\n\t\t\t\t\t\t\t\t\t\t! syncType ? 'unsynced' : undefined\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<HStack justify=\"right\">\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\t\t\tdisabled={ ! title }\n\t\t\t\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ __( 'Create' ) }\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</HStack>\n\t\t\t\t\t\t</VStack>\n\t\t\t\t\t</form>\n\t\t\t\t</Modal>\n\t\t\t) }\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAQA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AAAyD,IAAAK,WAAA,GAAAL,OAAA;AAdzD;AACA;AACA;;AAce,SAASM,gBAAgBA,CAAA,EAAG;EAC1C,MAAM;IAAEC;EAAS,CAAC,GAAG,IAAAC,iBAAW,EAAEC,aAAY,CAAC;EAC/C,MAAM,CAAEC,QAAQ,EAAEC,WAAW,CAAE,GAAG,IAAAC,iBAAQ,EAAEC,SAAU,CAAC;EACvD,MAAM,CAAEC,KAAK,EAAEC,QAAQ,CAAE,GAAG,IAAAH,iBAAQ,EAAE,EAAG,CAAC;EAE1C,MAAM;IAAEI,QAAQ;IAAEC;EAAU,CAAC,GAAG,IAAAC,eAAS,EAAIC,MAAM,IAAM;IACxD,MAAM;MAAEC,sBAAsB;MAAEC;IAAe,CAAC,GAC/CF,MAAM,CAAEV,aAAY,CAAC;IACtB,OAAO;MACNO,QAAQ,EAAEI,sBAAsB,CAAE,MAAO,CAAC;MAC1CH,SAAS,EAAEI,cAAc,CAAC;IAC3B,CAAC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A,CACrB,CAAC,eACF,IAAAzC,WAAA,CAAAmB,GAAA,EAACtB,WAAA,CAAA6C,aAAa;YACbF,uBAAuB;YACvBL,KAAK,EAAG,IAAAQ,QAAE,EAAE,QAAQ,EAAE,oBAAqB,CAAG;YAC9CC,IAAI,EAAG,IAAArB,QAAE,EACR,8CACD,CAAG;YACHsB,OAAO,EAAG,CAAExC,QAAU;YACtBgC,QAAQ,EAAGA,CAAA,KAAM;cAChB/B,WAAW,CACV,CAAED,QAAQ,GAAG,UAAU,GAAGG,SAC3B,CAAC;YACF;UAAG,CACH,CAAC,eACF,IAAAR,WAAA,CAAAmB,GAAA,EAACtB,WAAA,CAAAiD,oBAAM;YAACC,OAAO,EAAC,OAAO;YAAA1B,QAAA,eACtB,IAAArB,WAAA,CAAAmB,GAAA,EAACtB,WAAA,CAAAmD,MAAM;cACNP,qBAAqB;cACrBQ,OAAO,EAAC,SAAS;cACjBC,IAAI,EAAC,QAAQ;cACbC,QAAQ,EAAG,CAAE1C,KAAO;cACpB2C,sBAAsB;cAAA/B,QAAA,EAEpB,IAAAE,QAAE,EAAE,QAAS;YAAC,CACT;UAAC,CACF,CAAC;QAAA,CACF;MAAC,CACJ;IAAC,CACD;EACP,CACA,CAAC;AAEL","ignoreList":[]}
1
+ {"version":3,"names":["_data","require","_i18n","_components","_element","_editor","_jsxRuntime","InitPatternModal","editPost","useDispatch","editorStore","syncType","setSyncType","useState","undefined","title","setTitle","postType","isNewPost","useSelect","select","getEditedPostAttribute","isCleanNewPost","isModalOpen","setIsModalOpen","jsx","Fragment","children","Modal","__","onRequestClose","overlayClassName","onSubmit","event","preventDefault","meta","wp_pattern_sync_status","jsxs","__experimentalVStack","spacing","TextControl","label","value","onChange","placeholder","className","__nextHasNoMarginBottom","__next40pxDefaultSize","ToggleControl","_x","help","checked","__experimentalHStack","justify","Button","variant","type","disabled","accessibleWhenDisabled"],"sources":["@wordpress/edit-post/src/components/init-pattern-modal/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __, _x } from '@wordpress/i18n';\nimport {\n\tModal,\n\tButton,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\tToggleControl,\n\tTextControl,\n} from '@wordpress/components';\nimport { useState } from '@wordpress/element';\nimport { store as editorStore } from '@wordpress/editor';\n\nexport default function InitPatternModal() {\n\tconst { editPost } = useDispatch( editorStore );\n\tconst [ syncType, setSyncType ] = useState( undefined );\n\tconst [ title, setTitle ] = useState( '' );\n\n\tconst { postType, isNewPost } = useSelect( ( select ) => {\n\t\tconst { getEditedPostAttribute, isCleanNewPost } =\n\t\t\tselect( editorStore );\n\t\treturn {\n\t\t\tpostType: getEditedPostAttribute( 'type' ),\n\t\t\tisNewPost: isCleanNewPost(),\n\t\t};\n\t}, [] );\n\tconst [ isModalOpen, setIsModalOpen ] = useState(\n\t\t() => isNewPost && postType === 'wp_block'\n\t);\n\n\tif ( postType !== 'wp_block' || ! isNewPost ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t{ isModalOpen && (\n\t\t\t\t<Modal\n\t\t\t\t\ttitle={ __( 'Create pattern' ) }\n\t\t\t\t\tonRequestClose={ () => {\n\t\t\t\t\t\tsetIsModalOpen( false );\n\t\t\t\t\t} }\n\t\t\t\t\toverlayClassName=\"reusable-blocks-menu-items__convert-modal\"\n\t\t\t\t>\n\t\t\t\t\t<form\n\t\t\t\t\t\tonSubmit={ ( event ) => {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tsetIsModalOpen( false );\n\t\t\t\t\t\t\teditPost( {\n\t\t\t\t\t\t\t\ttitle,\n\t\t\t\t\t\t\t\tmeta: {\n\t\t\t\t\t\t\t\t\twp_pattern_sync_status: syncType,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t<VStack spacing=\"5\">\n\t\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\t\tlabel={ __( 'Name' ) }\n\t\t\t\t\t\t\t\tvalue={ title }\n\t\t\t\t\t\t\t\tonChange={ setTitle }\n\t\t\t\t\t\t\t\tplaceholder={ __( 'My pattern' ) }\n\t\t\t\t\t\t\t\tclassName=\"patterns-create-modal__name-input\"\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\tlabel={ _x( 'Synced', 'pattern (singular)' ) }\n\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t'Sync this pattern across multiple locations.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tchecked={ ! syncType }\n\t\t\t\t\t\t\t\tonChange={ () => {\n\t\t\t\t\t\t\t\t\tsetSyncType(\n\t\t\t\t\t\t\t\t\t\t! syncType ? 'unsynced' : undefined\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<HStack justify=\"right\">\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\t\t\tdisabled={ ! title }\n\t\t\t\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ __( 'Create' ) }\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</HStack>\n\t\t\t\t\t\t</VStack>\n\t\t\t\t\t</form>\n\t\t\t\t</Modal>\n\t\t\t) }\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAA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cACrBQ,OAAO,EAAC,SAAS;cACjBC,IAAI,EAAC,QAAQ;cACbC,QAAQ,EAAG,CAAE1C,KAAO;cACpB2C,sBAAsB;cAAA/B,QAAA,EAEpB,IAAAE,QAAE,EAAE,QAAS;YAAC,CACT;UAAC,CACF,CAAC;QAAA,CACF;MAAC,CACJ;IAAC,CACD;EACP,CACA,CAAC;AAEL","ignoreList":[]}
@@ -12,6 +12,7 @@ var _blockEditor = require("@wordpress/block-editor");
12
12
  var _plugins = require("@wordpress/plugins");
13
13
  var _i18n = require("@wordpress/i18n");
14
14
  var _element = require("@wordpress/element");
15
+ var _icons = require("@wordpress/icons");
15
16
  var _notices = require("@wordpress/notices");
16
17
  var _preferences = require("@wordpress/preferences");
17
18
  var _commands = require("@wordpress/commands");
@@ -60,36 +61,24 @@ const {
60
61
  } = (0, _lockUnlock.unlock)(_commands.privateApis);
61
62
  const {
62
63
  Editor,
63
- FullscreenMode
64
+ FullscreenMode,
65
+ NavigableRegion
64
66
  } = (0, _lockUnlock.unlock)(_editor.privateApis);
65
67
  const {
66
68
  BlockKeyboardShortcuts
67
69
  } = (0, _lockUnlock.unlock)(_blockLibrary.privateApis);
68
70
  const DESIGN_POST_TYPES = ['wp_template', 'wp_template_part', 'wp_block', 'wp_navigation'];
69
- function useEditorStyles() {
71
+ function useEditorStyles(...additionalStyles) {
70
72
  const {
71
73
  hasThemeStyleSupport,
72
- editorSettings,
73
- isZoomedOutView,
74
- renderingMode,
75
- postType
74
+ editorSettings
76
75
  } = (0, _data.useSelect)(select => {
77
- const {
78
- __unstableGetEditorMode
79
- } = select(_blockEditor.store);
80
- const {
81
- getCurrentPostType,
82
- getRenderingMode
83
- } = select(_editor.store);
84
- const _postType = getCurrentPostType();
85
76
  return {
86
77
  hasThemeStyleSupport: select(_store.store).isFeatureActive('themeStyles'),
87
- editorSettings: select(_editor.store).getEditorSettings(),
88
- isZoomedOutView: __unstableGetEditorMode() === 'zoom-out',
89
- renderingMode: getRenderingMode(),
90
- postType: _postType
78
+ editorSettings: select(_editor.store).getEditorSettings()
91
79
  };
92
80
  }, []);
81
+ const addedStyles = additionalStyles.join('\n');
93
82
 
94
83
  // Compute the default styles.
95
84
  return (0, _element.useMemo)(() => {
@@ -114,16 +103,13 @@ function useEditorStyles() {
114
103
  });
115
104
  }
116
105
  const baseStyles = hasThemeStyles ? (_editorSettings$style3 = editorSettings.styles) !== null && _editorSettings$style3 !== void 0 ? _editorSettings$style3 : [] : defaultEditorStyles;
117
-
118
- // Add a space for the typewriter effect. When typing in the last block,
119
- // there needs to be room to scroll up.
120
- if (!isZoomedOutView && renderingMode === 'post-only' && !DESIGN_POST_TYPES.includes(postType)) {
106
+ if (addedStyles) {
121
107
  return [...baseStyles, {
122
- css: ':root :where(.editor-styles-wrapper)::after {content: ""; display: block; height: 40vh;}'
108
+ css: addedStyles
123
109
  }];
124
110
  }
125
111
  return baseStyles;
126
- }, [editorSettings.defaultEditorStyles, editorSettings.disableLayoutStyles, editorSettings.styles, hasThemeStyleSupport, postType]);
112
+ }, [editorSettings.defaultEditorStyles, editorSettings.disableLayoutStyles, editorSettings.styles, hasThemeStyleSupport, addedStyles]);
127
113
  }
128
114
 
129
115
  /**
@@ -145,7 +131,7 @@ function MetaBoxesMain({
145
131
  const {
146
132
  set: setPreference
147
133
  } = (0, _data.useDispatch)(_preferences.store);
148
- const resizableBoxRef = (0, _element.useRef)();
134
+ const metaBoxesMainRef = (0, _element.useRef)();
149
135
  const isShort = (0, _compose.useMediaQuery)('(max-height: 549px)');
150
136
  const [{
151
137
  min,
@@ -157,8 +143,8 @@ function MetaBoxesMain({
157
143
  const effectSizeConstraints = (0, _compose.useRefEffect)(node => {
158
144
  const container = node.closest('.interface-interface-skeleton__content');
159
145
  const noticeLists = container.querySelectorAll(':scope > .components-notice-list');
160
- const resizeHandle = container.querySelector('.edit-post-meta-boxes-main__resize-handle');
161
- const actualize = () => {
146
+ const resizeHandle = container.querySelector('.edit-post-meta-boxes-main__presenter');
147
+ const deriveConstraints = () => {
162
148
  const fullHeight = container.offsetHeight;
163
149
  let nextMax = fullHeight;
164
150
  for (const element of noticeLists) {
@@ -170,7 +156,7 @@ function MetaBoxesMain({
170
156
  max: nextMax
171
157
  });
172
158
  };
173
- const observer = new window.ResizeObserver(actualize);
159
+ const observer = new window.ResizeObserver(deriveConstraints);
174
160
  observer.observe(container);
175
161
  for (const element of noticeLists) {
176
162
  observer.observe(element);
@@ -180,14 +166,32 @@ function MetaBoxesMain({
180
166
  const separatorRef = (0, _element.useRef)();
181
167
  const separatorHelpId = (0, _element.useId)();
182
168
  const [isUntouched, setIsUntouched] = (0, _element.useState)(true);
169
+ const applyHeight = (candidateHeight, isPersistent, isInstant) => {
170
+ const nextHeight = Math.min(max, Math.max(min, candidateHeight));
171
+ if (isPersistent) {
172
+ setPreference('core/edit-post', 'metaBoxesMainOpenHeight', nextHeight);
173
+ } else {
174
+ separatorRef.current.ariaValueNow = getAriaValueNow(nextHeight);
175
+ }
176
+ if (isInstant) {
177
+ metaBoxesMainRef.current.updateSize({
178
+ height: nextHeight,
179
+ // Oddly, when the event that triggered this was not from the mouse (e.g. keydown),
180
+ // if `width` is left unspecified a subsequent drag gesture applies a fixed
181
+ // width and the pane fails to widen/narrow with parent width changes from
182
+ // sidebars opening/closing or window resizes.
183
+ width: 'auto'
184
+ });
185
+ }
186
+ };
183
187
  if (!hasAnyVisible) {
184
188
  return;
185
189
  }
186
- const className = 'edit-post-meta-boxes-main';
187
190
  const contents = /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
188
191
  className: (0, _clsx.default)(
189
192
  // The class name 'edit-post-layout__metaboxes' is retained because some plugins use it.
190
193
  'edit-post-layout__metaboxes', !isLegacy && 'edit-post-meta-boxes-main__liner'),
194
+ hidden: !isLegacy && isShort && !isOpen,
191
195
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_metaBoxes.default, {
192
196
  location: "normal"
193
197
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_metaBoxes.default, {
@@ -205,20 +209,7 @@ function MetaBoxesMain({
205
209
  }
206
210
  const getAriaValueNow = height => Math.round((height - min) / (max - min) * 100);
207
211
  const usedAriaValueNow = max === undefined || isAutoHeight ? 50 : getAriaValueNow(openHeight);
208
- if (isShort) {
209
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)("details", {
210
- className: className,
211
- open: isOpen,
212
- onToggle: ({
213
- target
214
- }) => {
215
- setPreference('core/edit-post', 'metaBoxesMainIsOpen', target.open);
216
- },
217
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("summary", {
218
- children: (0, _i18n.__)('Meta Boxes')
219
- }), contents]
220
- });
221
- }
212
+ const toggle = () => setPreference('core/edit-post', 'metaBoxesMainIsOpen', !isOpen);
222
213
 
223
214
  // TODO: Support more/all keyboard interactions from the window splitter pattern:
224
215
  // https://www.w3.org/WAI/ARIA/apg/patterns/windowsplitter/
@@ -228,99 +219,97 @@ function MetaBoxesMain({
228
219
  ArrowDown: -20
229
220
  }[event.key];
230
221
  if (delta) {
231
- const {
232
- resizable
233
- } = resizableBoxRef.current;
234
- const fromHeight = isAutoHeight ? resizable.offsetHeight : openHeight;
235
- const nextHeight = Math.min(max, Math.max(min, delta + fromHeight));
236
- resizableBoxRef.current.updateSize({
237
- height: nextHeight,
238
- // Oddly, if left unspecified a subsequent drag gesture applies a fixed
239
- // width and the pane fails to shrink/grow with parent width changes from
240
- // sidebars opening/closing or window resizes.
241
- width: 'auto'
242
- });
243
- setPreference('core/edit-post', 'metaBoxesMainOpenHeight', nextHeight);
222
+ const pane = metaBoxesMainRef.current.resizable;
223
+ const fromHeight = isAutoHeight ? pane.offsetHeight : openHeight;
224
+ const nextHeight = delta + fromHeight;
225
+ applyHeight(nextHeight, true, true);
226
+ event.preventDefault();
244
227
  }
245
228
  };
246
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.ResizableBox, {
247
- className: className,
248
- defaultSize: {
249
- height: openHeight
250
- },
251
- ref: resizableBoxRef,
252
- enable: {
253
- top: true,
254
- right: false,
255
- bottom: false,
256
- left: false,
257
- topLeft: false,
258
- topRight: false,
259
- bottomRight: false,
260
- bottomLeft: false
261
- },
262
- minHeight: min,
263
- maxHeight: usedMax,
264
- bounds: "parent",
265
- boundsByDirection: true
266
- // Avoids hiccups while dragging over objects like iframes and ensures that
267
- // the event to end the drag is captured by the target (resize handle)
268
- // whether or not it’s under the pointer.
269
- ,
270
- onPointerDown: ({
271
- pointerId,
272
- target
273
- }) => {
274
- target.setPointerCapture(pointerId);
275
- },
276
- onResizeStart: (event, direction, elementRef) => {
277
- if (isAutoHeight) {
278
- const heightNow = elementRef.offsetHeight;
279
- // Sets the starting height to avoid visual jumps in height and
280
- // aria-valuenow being `NaN` for the first (few) resize events.
281
- resizableBoxRef.current.updateSize({
282
- height: heightNow
283
- });
284
- // Causes `maxHeight` to update to full `max` value instead of half.
285
- setIsUntouched(false);
286
- }
287
- },
288
- onResize: () => {
289
- const {
290
- height
291
- } = resizableBoxRef.current.state;
292
- const separator = separatorRef.current;
293
- separator.ariaValueNow = getAriaValueNow(height);
294
- },
295
- onResizeStop: () => {
296
- const nextHeight = resizableBoxRef.current.state.height;
297
- setPreference('core/edit-post', 'metaBoxesMainOpenHeight', nextHeight);
298
- },
299
- handleClasses: {
300
- top: 'edit-post-meta-boxes-main__resize-handle'
301
- },
302
- handleComponent: {
303
- top: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
304
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Tooltip, {
305
- text: (0, _i18n.__)('Drag to resize'),
306
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
307
- ref: separatorRef,
308
- "aria-label": (0, _i18n.__)('Drag to resize'),
309
- "aria-describedby": separatorHelpId,
310
- onKeyDown: onSeparatorKeyDown
311
- // Disable reason: buttons are allowed to be separator role.
312
- // eslint-disable-next-line jsx-a11y/no-interactive-element-to-noninteractive-role
313
- ,
314
- role: "separator",
315
- "aria-valuenow": usedAriaValueNow
316
- })
317
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.VisuallyHidden, {
318
- id: separatorHelpId,
319
- children: (0, _i18n.__)('Use up and down arrow keys to resize the metabox panel.')
320
- })]
321
- })
322
- },
323
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("meta", {
229
+ const className = 'edit-post-meta-boxes-main';
230
+ const paneLabel = (0, _i18n.__)('Meta Boxes');
231
+ let Pane, paneProps;
232
+ if (isShort) {
233
+ Pane = NavigableRegion;
234
+ paneProps = {
235
+ className: (0, _clsx.default)(className, 'is-toggle-only')
236
+ };
237
+ } else {
238
+ Pane = _components.ResizableBox;
239
+ paneProps = /** @type {Parameters<typeof ResizableBox>[0]} */{
240
+ as: NavigableRegion,
241
+ ref: metaBoxesMainRef,
242
+ className: (0, _clsx.default)(className, 'is-resizable'),
243
+ defaultSize: {
244
+ height: openHeight
245
+ },
246
+ minHeight: min,
247
+ maxHeight: usedMax,
248
+ enable: {
249
+ top: true,
250
+ right: false,
251
+ bottom: false,
252
+ left: false,
253
+ topLeft: false,
254
+ topRight: false,
255
+ bottomRight: false,
256
+ bottomLeft: false
257
+ },
258
+ handleClasses: {
259
+ top: 'edit-post-meta-boxes-main__presenter'
260
+ },
261
+ handleComponent: {
262
+ top: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
263
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Tooltip, {
264
+ text: (0, _i18n.__)('Drag to resize'),
265
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
266
+ // eslint-disable-line jsx-a11y/role-supports-aria-props
267
+ ref: separatorRef,
268
+ role: "separator" // eslint-disable-line jsx-a11y/no-interactive-element-to-noninteractive-role
269
+ ,
270
+ "aria-valuenow": usedAriaValueNow,
271
+ "aria-label": (0, _i18n.__)('Drag to resize'),
272
+ "aria-describedby": separatorHelpId,
273
+ onKeyDown: onSeparatorKeyDown
274
+ })
275
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.VisuallyHidden, {
276
+ id: separatorHelpId,
277
+ children: (0, _i18n.__)('Use up and down arrow keys to resize the metabox pane.')
278
+ })]
279
+ })
280
+ },
281
+ // Avoids hiccups while dragging over objects like iframes and ensures that
282
+ // the event to end the drag is captured by the target (resize handle)
283
+ // whether or not it’s under the pointer.
284
+ onPointerDown: ({
285
+ pointerId,
286
+ target
287
+ }) => {
288
+ target.setPointerCapture(pointerId);
289
+ },
290
+ onResizeStart: (event, direction, elementRef) => {
291
+ if (isAutoHeight) {
292
+ // Sets the starting height to avoid visual jumps in height and
293
+ // aria-valuenow being `NaN` for the first (few) resize events.
294
+ applyHeight(elementRef.offsetHeight, false, true);
295
+ setIsUntouched(false);
296
+ }
297
+ },
298
+ onResize: () => applyHeight(metaBoxesMainRef.current.state.height),
299
+ onResizeStop: () => applyHeight(metaBoxesMainRef.current.state.height, true)
300
+ };
301
+ }
302
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Pane, {
303
+ "aria-label": paneLabel,
304
+ ...paneProps,
305
+ children: [isShort ? /*#__PURE__*/(0, _jsxRuntime.jsxs)("button", {
306
+ "aria-expanded": isOpen,
307
+ className: "edit-post-meta-boxes-main__presenter",
308
+ onClick: toggle,
309
+ children: [paneLabel, /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Icon, {
310
+ icon: isOpen ? _icons.chevronUp : _icons.chevronDown
311
+ })]
312
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsx)("meta", {
324
313
  ref: effectSizeConstraints
325
314
  }), contents]
326
315
  });
@@ -333,7 +322,6 @@ function Layout({
333
322
  }) {
334
323
  useCommands();
335
324
  (0, _useCommands.default)();
336
- const paddingAppenderRef = (0, _usePaddingAppender.usePaddingAppender)();
337
325
  const shouldIframe = (0, _useShouldIframe.useShouldIframe)();
338
326
  const {
339
327
  createErrorNotice
@@ -357,7 +345,8 @@ function Layout({
357
345
  showMetaBoxes,
358
346
  hasHistory,
359
347
  isWelcomeGuideVisible,
360
- templateId
348
+ templateId,
349
+ enablePaddingAppender
361
350
  } = (0, _data.useSelect)(select => {
362
351
  var _getPostType$viewable;
363
352
  const {
@@ -377,18 +366,28 @@ function Layout({
377
366
  kind: 'postType',
378
367
  name: 'wp_template'
379
368
  });
369
+ const {
370
+ __unstableGetEditorMode
371
+ } = select(_blockEditor.store);
372
+ const {
373
+ getEditorMode,
374
+ getRenderingMode
375
+ } = select(_editor.store);
376
+ const isRenderingPostOnly = getRenderingMode() === 'post-only';
380
377
  return {
381
- mode: select(_editor.store).getEditorMode(),
378
+ mode: getEditorMode(),
382
379
  isFullscreenActive: select(_store.store).isFeatureActive('fullscreenMode'),
383
380
  hasActiveMetaboxes: select(_store.store).hasMetaBoxes(),
384
381
  hasBlockSelected: !!select(_blockEditor.store).getBlockSelectionStart(),
385
382
  showIconLabels: get('core', 'showIconLabels'),
386
383
  isDistractionFree: get('core', 'distractionFree'),
387
- showMetaBoxes: !DESIGN_POST_TYPES.includes(currentPostType) && select(_editor.store).getRenderingMode() === 'post-only',
384
+ showMetaBoxes: !DESIGN_POST_TYPES.includes(currentPostType) && isRenderingPostOnly,
388
385
  isWelcomeGuideVisible: isFeatureActive('welcomeGuide'),
389
- templateId: supportsTemplateMode && isViewable && canViewTemplate && !isEditingTemplate ? getEditedPostTemplateId() : null
386
+ templateId: supportsTemplateMode && isViewable && canViewTemplate && !isEditingTemplate ? getEditedPostTemplateId() : null,
387
+ enablePaddingAppender: __unstableGetEditorMode() !== 'zoom-out' && isRenderingPostOnly && !DESIGN_POST_TYPES.includes(currentPostType)
390
388
  };
391
389
  }, [currentPostType, isEditingTemplate, settings.supportsTemplateMode]);
390
+ const [paddingAppenderRef, paddingStyle] = (0, _usePaddingAppender.usePaddingAppender)(enablePaddingAppender);
392
391
 
393
392
  // Set the right context for the command palette
394
393
  const commandContext = hasBlockSelected ? 'block-selection-edit' : 'entity-edit';
@@ -399,7 +398,7 @@ function Layout({
399
398
  onNavigateToPreviousEntityRecord,
400
399
  defaultRenderingMode: 'post-only'
401
400
  }), [settings, onNavigateToEntityRecord, onNavigateToPreviousEntityRecord]);
402
- const styles = useEditorStyles();
401
+ const styles = useEditorStyles(paddingStyle);
403
402
 
404
403
  // We need to add the show-icon-labels class to the body element so it is applied to modals.
405
404
  if (showIconLabels) {
@@ -407,11 +406,12 @@ function Layout({
407
406
  } else {
408
407
  document.body.classList.remove('show-icon-labels');
409
408
  }
409
+ const navigateRegionsProps = (0, _components.__unstableUseNavigateRegions)();
410
410
  const className = (0, _clsx.default)('edit-post-layout', 'is-mode-' + mode, {
411
411
  'has-metaboxes': hasActiveMetaboxes
412
412
  });
413
413
  function onPluginAreaError(name) {
414
- createErrorNotice((0, _i18n.sprintf)( /* translators: %s: plugin name */
414
+ createErrorNotice((0, _i18n.sprintf)(/* translators: %s: plugin name */
415
415
  (0, _i18n.__)('The "%s" plugin has encountered an error and cannot be rendered.'), name));
416
416
  }
417
417
  const {
@@ -465,35 +465,40 @@ function Layout({
465
465
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_editor.ErrorBoundary, {
466
466
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_commands.CommandMenu, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_welcomeGuide.default, {
467
467
  postType: currentPostType
468
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(Editor, {
469
- settings: editorSettings,
470
- initialEdits: initialEdits,
471
- postType: currentPostType,
472
- postId: currentPostId,
473
- templateId: templateId,
474
- className: className,
475
- styles: styles,
476
- forceIsDirty: hasActiveMetaboxes,
477
- contentRef: paddingAppenderRef,
478
- disableIframe: !shouldIframe
479
- // We should auto-focus the canvas (title) on load.
480
- // eslint-disable-next-line jsx-a11y/no-autofocus
481
- ,
482
- autoFocus: !isWelcomeGuideVisible,
483
- onActionPerformed: onActionPerformed,
484
- extraSidebarPanels: showMetaBoxes && /*#__PURE__*/(0, _jsxRuntime.jsx)(_metaBoxes.default, {
485
- location: "side"
486
- }),
487
- extraContent: !isDistractionFree && showMetaBoxes && /*#__PURE__*/(0, _jsxRuntime.jsx)(MetaBoxesMain, {
488
- isLegacy: !shouldIframe
489
- }),
490
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_editor.PostLockedModal, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_editorInitialization.default, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(FullscreenMode, {
491
- isActive: isFullscreenActive
492
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_browserUrl.default, {
493
- hasHistory: hasHistory
494
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_editor.UnsavedChangesWarning, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_editor.AutosaveMonitor, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_editor.LocalAutosaveMonitor, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_keyboardShortcuts.default, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_editor.EditorKeyboardShortcutsRegister, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(BlockKeyboardShortcuts, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_initPatternModal.default, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_plugins.PluginArea, {
495
- onError: onPluginAreaError
496
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_moreMenu.default, {}), backButton, /*#__PURE__*/(0, _jsxRuntime.jsx)(_editor.EditorSnackbars, {})]
468
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
469
+ className: navigateRegionsProps.className,
470
+ ...navigateRegionsProps,
471
+ ref: navigateRegionsProps.ref,
472
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(Editor, {
473
+ settings: editorSettings,
474
+ initialEdits: initialEdits,
475
+ postType: currentPostType,
476
+ postId: currentPostId,
477
+ templateId: templateId,
478
+ className: className,
479
+ styles: styles,
480
+ forceIsDirty: hasActiveMetaboxes,
481
+ contentRef: paddingAppenderRef,
482
+ disableIframe: !shouldIframe
483
+ // We should auto-focus the canvas (title) on load.
484
+ // eslint-disable-next-line jsx-a11y/no-autofocus
485
+ ,
486
+ autoFocus: !isWelcomeGuideVisible,
487
+ onActionPerformed: onActionPerformed,
488
+ extraSidebarPanels: showMetaBoxes && /*#__PURE__*/(0, _jsxRuntime.jsx)(_metaBoxes.default, {
489
+ location: "side"
490
+ }),
491
+ extraContent: !isDistractionFree && showMetaBoxes && /*#__PURE__*/(0, _jsxRuntime.jsx)(MetaBoxesMain, {
492
+ isLegacy: !shouldIframe
493
+ }),
494
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_editor.PostLockedModal, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_editorInitialization.default, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(FullscreenMode, {
495
+ isActive: isFullscreenActive
496
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_browserUrl.default, {
497
+ hasHistory: hasHistory
498
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_editor.UnsavedChangesWarning, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_editor.AutosaveMonitor, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_editor.LocalAutosaveMonitor, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_keyboardShortcuts.default, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_editor.EditorKeyboardShortcutsRegister, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(BlockKeyboardShortcuts, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_initPatternModal.default, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_plugins.PluginArea, {
499
+ onError: onPluginAreaError
500
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_moreMenu.default, {}), backButton, /*#__PURE__*/(0, _jsxRuntime.jsx)(_editor.EditorSnackbars, {})]
501
+ })
497
502
  })]
498
503
  })
499
504
  });