@wordpress/edit-post 8.9.0 → 8.11.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 +4 -0
- package/build/components/init-pattern-modal/index.js +1 -1
- package/build/components/init-pattern-modal/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/layout/index.js +176 -171
- package/build/components/layout/index.js.map +1 -1
- package/build/components/layout/use-padding-appender.js +19 -16
- package/build/components/layout/use-padding-appender.js.map +1 -1
- package/build/components/layout/use-should-iframe.js +16 -8
- package/build/components/layout/use-should-iframe.js.map +1 -1
- package/build/components/meta-boxes/meta-box-visibility.js.map +1 -1
- package/build/components/meta-boxes/meta-boxes-area/index.js.map +1 -1
- package/build/components/preferences-modal/meta-boxes-section.js.map +1 -1
- package/build/deprecated.js.map +1 -1
- package/build/index.js +2 -4
- package/build/index.js.map +1 -1
- package/build/store/actions.js +1 -1
- package/build/store/actions.js.map +1 -1
- package/build/store/private-selectors.js.map +1 -1
- package/build/store/selectors.js.map +1 -1
- package/build/utils/meta-boxes.js.map +1 -1
- package/build-module/components/header/header-toolbar/index.native.js +1 -2
- package/build-module/components/header/header-toolbar/index.native.js.map +1 -1
- package/build-module/components/init-pattern-modal/index.js +2 -4
- package/build-module/components/init-pattern-modal/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/layout/index.js +178 -175
- package/build-module/components/layout/index.js.map +1 -1
- package/build-module/components/layout/index.native.js +1 -3
- package/build-module/components/layout/index.native.js.map +1 -1
- package/build-module/components/layout/use-padding-appender.js +20 -16
- package/build-module/components/layout/use-padding-appender.js.map +1 -1
- package/build-module/components/layout/use-should-iframe.js +16 -8
- package/build-module/components/layout/use-should-iframe.js.map +1 -1
- package/build-module/components/meta-boxes/index.js +1 -3
- package/build-module/components/meta-boxes/index.js.map +1 -1
- package/build-module/components/meta-boxes/meta-box-visibility.js.map +1 -1
- package/build-module/components/meta-boxes/meta-boxes-area/index.js +1 -2
- package/build-module/components/meta-boxes/meta-boxes-area/index.js.map +1 -1
- package/build-module/components/more-menu/index.js +1 -3
- package/build-module/components/more-menu/index.js.map +1 -1
- package/build-module/components/preferences-modal/enable-custom-fields.js +1 -3
- package/build-module/components/preferences-modal/enable-custom-fields.js.map +1 -1
- package/build-module/components/preferences-modal/meta-boxes-section.js +1 -2
- package/build-module/components/preferences-modal/meta-boxes-section.js.map +1 -1
- package/build-module/components/welcome-guide/default.js +1 -3
- package/build-module/components/welcome-guide/default.js.map +1 -1
- package/build-module/components/welcome-guide/image.js +1 -2
- package/build-module/components/welcome-guide/image.js.map +1 -1
- package/build-module/components/welcome-guide/template.js +1 -3
- package/build-module/components/welcome-guide/template.js.map +1 -1
- package/build-module/deprecated.js.map +1 -1
- package/build-module/index.js +2 -4
- package/build-module/index.js.map +1 -1
- package/build-module/store/actions.js +1 -1
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/private-selectors.js.map +1 -1
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/utils/meta-boxes.js.map +1 -1
- package/build-style/style-rtl.css +65 -29
- package/build-style/style.css +65 -29
- package/package.json +33 -32
- package/src/components/init-pattern-modal/index.js +2 -2
- package/src/components/keyboard-shortcuts/index.js +1 -1
- package/src/components/layout/index.js +170 -174
- package/src/components/layout/style.scss +83 -43
- package/src/components/layout/use-padding-appender.js +21 -18
- package/src/components/layout/use-should-iframe.js +18 -7
- package/src/index.js +0 -2
- package/src/store/actions.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -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'
|
|
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(
|
|
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":"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","ignoreList":[]}
|
|
@@ -28,7 +28,7 @@ function KeyboardShortcuts() {
|
|
|
28
28
|
registerShortcut({
|
|
29
29
|
name: 'core/edit-post/toggle-fullscreen',
|
|
30
30
|
category: 'global',
|
|
31
|
-
description: (0, _i18n.__)('
|
|
31
|
+
description: (0, _i18n.__)('Enable or disable fullscreen mode.'),
|
|
32
32
|
keyCombination: {
|
|
33
33
|
modifier: 'secondary',
|
|
34
34
|
character: 'f'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_element","require","_data","_keyboardShortcuts","_i18n","_store","KeyboardShortcuts","toggleFeature","useDispatch","editPostStore","registerShortcut","keyboardShortcutsStore","useEffect","name","category","description","__","keyCombination","modifier","character","useShortcut","_default","exports","default"],"sources":["@wordpress/edit-post/src/components/keyboard-shortcuts/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\nimport { useDispatch } from '@wordpress/data';\nimport {\n\tuseShortcut,\n\tstore as keyboardShortcutsStore,\n} from '@wordpress/keyboard-shortcuts';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { store as editPostStore } from '../../store';\n\nfunction KeyboardShortcuts() {\n\tconst { toggleFeature } = useDispatch( editPostStore );\n\tconst { registerShortcut } = useDispatch( keyboardShortcutsStore );\n\n\tuseEffect( () => {\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-post/toggle-fullscreen',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( '
|
|
1
|
+
{"version":3,"names":["_element","require","_data","_keyboardShortcuts","_i18n","_store","KeyboardShortcuts","toggleFeature","useDispatch","editPostStore","registerShortcut","keyboardShortcutsStore","useEffect","name","category","description","__","keyCombination","modifier","character","useShortcut","_default","exports","default"],"sources":["@wordpress/edit-post/src/components/keyboard-shortcuts/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\nimport { useDispatch } from '@wordpress/data';\nimport {\n\tuseShortcut,\n\tstore as keyboardShortcutsStore,\n} from '@wordpress/keyboard-shortcuts';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { store as editPostStore } from '../../store';\n\nfunction KeyboardShortcuts() {\n\tconst { toggleFeature } = useDispatch( editPostStore );\n\tconst { registerShortcut } = useDispatch( keyboardShortcutsStore );\n\n\tuseEffect( () => {\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-post/toggle-fullscreen',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Enable or disable fullscreen mode.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'secondary',\n\t\t\t\tcharacter: 'f',\n\t\t\t},\n\t\t} );\n\t}, [] );\n\n\tuseShortcut( 'core/edit-post/toggle-fullscreen', () => {\n\t\ttoggleFeature( 'fullscreenMode' );\n\t} );\n\n\treturn null;\n}\n\nexport default KeyboardShortcuts;\n"],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,kBAAA,GAAAF,OAAA;AAIA,IAAAG,KAAA,GAAAH,OAAA;AAKA,IAAAI,MAAA,GAAAJ,OAAA;AAdA;AACA;AACA;;AASA;AACA;AACA;;AAGA,SAASK,iBAAiBA,CAAA,EAAG;EAC5B,MAAM;IAAEC;EAAc,CAAC,GAAG,IAAAC,iBAAW,EAAEC,YAAc,CAAC;EACtD,MAAM;IAAEC;EAAiB,CAAC,GAAG,IAAAF,iBAAW,EAAEG,wBAAuB,CAAC;EAElE,IAAAC,kBAAS,EAAE,MAAM;IAChBF,gBAAgB,CAAE;MACjBG,IAAI,EAAE,kCAAkC;MACxCC,QAAQ,EAAE,QAAQ;MAClBC,WAAW,EAAE,IAAAC,QAAE,EAAE,oCAAqC,CAAC;MACvDC,cAAc,EAAE;QACfC,QAAQ,EAAE,WAAW;QACrBC,SAAS,EAAE;MACZ;IACD,CAAE,CAAC;EACJ,CAAC,EAAE,EAAG,CAAC;EAEP,IAAAC,8BAAW,EAAE,kCAAkC,EAAE,MAAM;IACtDb,aAAa,CAAE,gBAAiB,CAAC;EAClC,CAAE,CAAC;EAEH,OAAO,IAAI;AACZ;AAAC,IAAAc,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEcjB,iBAAiB","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:
|
|
108
|
+
css: addedStyles
|
|
123
109
|
}];
|
|
124
110
|
}
|
|
125
111
|
return baseStyles;
|
|
126
|
-
}, [editorSettings.defaultEditorStyles, editorSettings.disableLayoutStyles, editorSettings.styles, hasThemeStyleSupport,
|
|
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
|
|
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-
|
|
161
|
-
const
|
|
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(
|
|
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
|
-
|
|
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
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
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
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
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 meta box panel.')
|
|
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
|
+
isZoomOut
|
|
371
|
+
} = (0, _lockUnlock.unlock)(select(_blockEditor.store));
|
|
372
|
+
const {
|
|
373
|
+
getEditorMode,
|
|
374
|
+
getRenderingMode
|
|
375
|
+
} = select(_editor.store);
|
|
376
|
+
const isRenderingPostOnly = getRenderingMode() === 'post-only';
|
|
380
377
|
return {
|
|
381
|
-
mode:
|
|
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) &&
|
|
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: !isZoomOut() && 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)(
|
|
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 {
|
|
@@ -433,7 +433,7 @@ function Layout({
|
|
|
433
433
|
const newItem = items[0];
|
|
434
434
|
const title = typeof newItem.title === 'string' ? newItem.title : newItem.title?.rendered;
|
|
435
435
|
createSuccessNotice((0, _i18n.sprintf)(
|
|
436
|
-
// translators: %s: Title of the created post e.g: "
|
|
436
|
+
// translators: %s: Title of the created post or template, e.g: "Hello world".
|
|
437
437
|
(0, _i18n.__)('"%s" successfully created.'), (0, _htmlEntities.decodeEntities)(title)), {
|
|
438
438
|
type: 'snackbar',
|
|
439
439
|
id: 'duplicate-post-action',
|
|
@@ -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.
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
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
|
});
|