@wordpress/edit-post 7.24.0 → 7.25.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 +8 -4
- package/build/components/header/header-toolbar/index.js.map +1 -1
- package/build/components/header/index.js +13 -11
- package/build/components/header/index.js.map +1 -1
- package/build/components/header/mode-switcher/index.js +1 -1
- package/build/components/header/mode-switcher/index.js.map +1 -1
- package/build/components/header/more-menu/index.js +2 -1
- package/build/components/header/more-menu/index.js.map +1 -1
- package/build/components/header/writing-menu/index.js +13 -12
- package/build/components/header/writing-menu/index.js.map +1 -1
- package/build/components/layout/index.js +12 -12
- package/build/components/layout/index.js.map +1 -1
- package/build/components/preferences-modal/index.js +65 -49
- package/build/components/preferences-modal/index.js.map +1 -1
- package/build/components/sidebar/post-status/index.js +1 -2
- package/build/components/sidebar/post-status/index.js.map +1 -1
- package/build/components/sidebar/settings-header/index.js +17 -43
- package/build/components/sidebar/settings-header/index.js.map +1 -1
- package/build/components/sidebar/settings-sidebar/index.js +80 -20
- package/build/components/sidebar/settings-sidebar/index.js.map +1 -1
- package/build/components/start-page-options/index.js +3 -3
- package/build/components/start-page-options/index.js.map +1 -1
- package/build/components/visual-editor/index.js +20 -257
- package/build/components/visual-editor/index.js.map +1 -1
- package/build/components/welcome-guide/index.js +6 -3
- package/build/components/welcome-guide/index.js.map +1 -1
- package/build/editor.js +5 -6
- package/build/editor.js.map +1 -1
- package/build/editor.native.js +1 -2
- package/build/editor.native.js.map +1 -1
- package/build/index.js +5 -4
- package/build/index.js.map +1 -1
- package/build/plugins/welcome-guide-menu-item/index.js +2 -6
- package/build/plugins/welcome-guide-menu-item/index.js.map +1 -1
- package/build/store/actions.js +35 -39
- package/build/store/actions.js.map +1 -1
- package/build/store/reducer.js +1 -34
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +22 -12
- package/build/store/selectors.js.map +1 -1
- package/build-module/components/header/header-toolbar/index.js +8 -4
- package/build-module/components/header/header-toolbar/index.js.map +1 -1
- package/build-module/components/header/index.js +15 -13
- package/build-module/components/header/index.js.map +1 -1
- package/build-module/components/header/mode-switcher/index.js +1 -1
- package/build-module/components/header/mode-switcher/index.js.map +1 -1
- package/build-module/components/header/more-menu/index.js +2 -1
- package/build-module/components/header/more-menu/index.js.map +1 -1
- package/build-module/components/header/writing-menu/index.js +14 -13
- package/build-module/components/header/writing-menu/index.js.map +1 -1
- package/build-module/components/layout/index.js +13 -13
- package/build-module/components/layout/index.js.map +1 -1
- package/build-module/components/preferences-modal/index.js +65 -49
- package/build-module/components/preferences-modal/index.js.map +1 -1
- package/build-module/components/sidebar/post-status/index.js +2 -3
- package/build-module/components/sidebar/post-status/index.js.map +1 -1
- package/build-module/components/sidebar/settings-header/index.js +20 -46
- package/build-module/components/sidebar/settings-header/index.js.map +1 -1
- package/build-module/components/sidebar/settings-sidebar/index.js +80 -21
- package/build-module/components/sidebar/settings-sidebar/index.js.map +1 -1
- package/build-module/components/start-page-options/index.js +3 -3
- package/build-module/components/start-page-options/index.js.map +1 -1
- package/build-module/components/visual-editor/index.js +24 -261
- package/build-module/components/visual-editor/index.js.map +1 -1
- package/build-module/components/welcome-guide/index.js +6 -3
- package/build-module/components/welcome-guide/index.js.map +1 -1
- package/build-module/editor.js +5 -6
- package/build-module/editor.js.map +1 -1
- package/build-module/editor.native.js +1 -2
- package/build-module/editor.native.js.map +1 -1
- package/build-module/index.js +3 -2
- package/build-module/index.js.map +1 -1
- package/build-module/plugins/welcome-guide-menu-item/index.js +2 -6
- package/build-module/plugins/welcome-guide-menu-item/index.js.map +1 -1
- package/build-module/store/actions.js +31 -36
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/reducer.js +1 -33
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +18 -9
- package/build-module/store/selectors.js.map +1 -1
- package/build-style/style-rtl.css +63 -200
- package/build-style/style.css +63 -200
- package/package.json +32 -32
- package/src/components/header/header-toolbar/index.js +4 -0
- package/src/components/header/header-toolbar/style.scss +15 -13
- package/src/components/header/index.js +28 -13
- package/src/components/header/mode-switcher/index.js +2 -1
- package/src/components/header/more-menu/index.js +1 -0
- package/src/components/header/style.scss +60 -34
- package/src/components/header/writing-menu/index.js +16 -18
- package/src/components/keyboard-shortcut-help-modal/test/__snapshots__/index.js.snap +1 -1
- package/src/components/layout/index.js +13 -12
- package/src/components/preferences-modal/index.js +109 -96
- package/src/components/preferences-modal/test/index.js +1 -52
- package/src/components/sidebar/post-status/index.js +2 -2
- package/src/components/sidebar/settings-header/index.js +19 -71
- package/src/components/sidebar/settings-sidebar/index.js +117 -54
- package/src/components/sidebar/style.scss +4 -12
- package/src/components/start-page-options/index.js +3 -3
- package/src/components/visual-editor/index.js +26 -359
- package/src/components/visual-editor/style.scss +0 -15
- package/src/components/welcome-guide/index.js +4 -2
- package/src/editor.js +7 -7
- package/src/editor.native.js +3 -9
- package/src/index.js +3 -2
- package/src/plugins/welcome-guide-menu-item/index.js +3 -6
- package/src/store/actions.js +32 -46
- package/src/store/reducer.js +0 -33
- package/src/store/selectors.js +23 -9
- package/src/store/test/actions.js +0 -28
- package/src/style.scss +0 -3
- package/src/test/__snapshots__/editor.native.js.snap +21 -0
- package/src/test/editor.native.js +90 -56
- package/build/components/device-preview/index.js +0 -72
- package/build/components/device-preview/index.js.map +0 -1
- package/build/components/header/document-actions/index.js +0 -82
- package/build/components/header/document-actions/index.js.map +0 -1
- package/build/components/sidebar/post-template/create-modal.js +0 -99
- package/build/components/sidebar/post-template/create-modal.js.map +0 -1
- package/build/components/sidebar/post-template/form.js +0 -110
- package/build/components/sidebar/post-template/form.js.map +0 -1
- package/build/components/sidebar/post-template/index.js +0 -106
- package/build/components/sidebar/post-template/index.js.map +0 -1
- package/build-module/components/device-preview/index.js +0 -65
- package/build-module/components/device-preview/index.js.map +0 -1
- package/build-module/components/header/document-actions/index.js +0 -74
- package/build-module/components/header/document-actions/index.js.map +0 -1
- package/build-module/components/sidebar/post-template/create-modal.js +0 -92
- package/build-module/components/sidebar/post-template/create-modal.js.map +0 -1
- package/build-module/components/sidebar/post-template/form.js +0 -102
- package/build-module/components/sidebar/post-template/form.js.map +0 -1
- package/build-module/components/sidebar/post-template/index.js +0 -98
- package/build-module/components/sidebar/post-template/index.js.map +0 -1
- package/src/components/device-preview/index.js +0 -73
- package/src/components/header/document-actions/index.js +0 -82
- package/src/components/header/document-actions/style.scss +0 -64
- package/src/components/sidebar/post-template/create-modal.js +0 -140
- package/src/components/sidebar/post-template/form.js +0 -141
- package/src/components/sidebar/post-template/index.js +0 -120
- package/src/components/sidebar/post-template/style.scss +0 -22
- package/src/components/sidebar/settings-header/style.scss +0 -74
- package/src/components/sidebar/template/style.scss +0 -35
|
@@ -7,8 +7,8 @@ import classnames from 'classnames';
|
|
|
7
7
|
/**
|
|
8
8
|
* WordPress dependencies
|
|
9
9
|
*/
|
|
10
|
-
import {
|
|
11
|
-
import { PostSavedState, PostPreviewButton } from '@wordpress/editor';
|
|
10
|
+
import { BlockToolbar, store as blockEditorStore } from '@wordpress/block-editor';
|
|
11
|
+
import { PostSavedState, PostPreviewButton, store as editorStore, DocumentBar, privateApis as editorPrivateApis } from '@wordpress/editor';
|
|
12
12
|
import { useEffect, useRef, useState } from '@wordpress/element';
|
|
13
13
|
import { useSelect } from '@wordpress/data';
|
|
14
14
|
import { __ } from '@wordpress/i18n';
|
|
@@ -25,15 +25,13 @@ import FullscreenModeClose from './fullscreen-mode-close';
|
|
|
25
25
|
import HeaderToolbar from './header-toolbar';
|
|
26
26
|
import MoreMenu from './more-menu';
|
|
27
27
|
import PostPublishButtonOrToggle from './post-publish-button-or-toggle';
|
|
28
|
-
import { default as DevicePreview } from '../device-preview';
|
|
29
28
|
import ViewLink from '../view-link';
|
|
30
29
|
import MainDashboardButton from './main-dashboard-button';
|
|
31
30
|
import { store as editPostStore } from '../../store';
|
|
32
|
-
import DocumentActions from './document-actions';
|
|
33
31
|
import { unlock } from '../../lock-unlock';
|
|
34
32
|
const {
|
|
35
|
-
|
|
36
|
-
} = unlock(
|
|
33
|
+
PreviewDropdown
|
|
34
|
+
} = unlock(editorPrivateApis);
|
|
37
35
|
const slideY = {
|
|
38
36
|
hidden: {
|
|
39
37
|
y: '-50px'
|
|
@@ -85,7 +83,7 @@ function Header({
|
|
|
85
83
|
return {
|
|
86
84
|
blockSelectionStart: select(blockEditorStore).getBlockSelectionStart(),
|
|
87
85
|
hasActiveMetaboxes: select(editPostStore).hasMetaBoxes(),
|
|
88
|
-
isEditingTemplate: select(
|
|
86
|
+
isEditingTemplate: select(editorStore).getRenderingMode() === 'template-only',
|
|
89
87
|
isPublishSidebarOpened: select(editPostStore).isPublishSidebarOpened(),
|
|
90
88
|
hasFixedToolbar: getPreference('core/edit-post', 'fixedToolbar'),
|
|
91
89
|
showIconLabels: select(editPostStore).isFeatureActive('showIconLabels')
|
|
@@ -121,10 +119,10 @@ function Header({
|
|
|
121
119
|
setListViewToggleElement: setListViewToggleElement
|
|
122
120
|
}), hasFixedToolbar && isLargeViewport && createElement(Fragment, null, createElement("div", {
|
|
123
121
|
className: classnames('selected-block-tools-wrapper', {
|
|
124
|
-
'is-collapsed': isBlockToolsCollapsed
|
|
122
|
+
'is-collapsed': isEditingTemplate && isBlockToolsCollapsed
|
|
125
123
|
})
|
|
126
|
-
}, createElement(
|
|
127
|
-
|
|
124
|
+
}, createElement(BlockToolbar, {
|
|
125
|
+
hideDragHandle: true
|
|
128
126
|
})), createElement(Popover.Slot, {
|
|
129
127
|
ref: blockToolbarRef,
|
|
130
128
|
name: "block-toolbar"
|
|
@@ -137,9 +135,9 @@ function Header({
|
|
|
137
135
|
label: isBlockToolsCollapsed ? __('Show block tools') : __('Hide block tools')
|
|
138
136
|
})), createElement("div", {
|
|
139
137
|
className: classnames('edit-post-header__center', {
|
|
140
|
-
'is-collapsed': !isBlockToolsCollapsed &&
|
|
138
|
+
'is-collapsed': isEditingTemplate && hasBlockSelected && !isBlockToolsCollapsed && hasFixedToolbar && isLargeViewport
|
|
141
139
|
})
|
|
142
|
-
}, isEditingTemplate && createElement(
|
|
140
|
+
}, isEditingTemplate && createElement(DocumentBar, null))), createElement(motion.div, {
|
|
143
141
|
variants: slideY,
|
|
144
142
|
transition: {
|
|
145
143
|
type: 'tween',
|
|
@@ -155,7 +153,11 @@ function Header({
|
|
|
155
153
|
createElement(PostSavedState, {
|
|
156
154
|
forceIsDirty: hasActiveMetaboxes,
|
|
157
155
|
showIconLabels: showIconLabels
|
|
158
|
-
}), createElement(
|
|
156
|
+
}), createElement(PreviewDropdown, {
|
|
157
|
+
showIconLabels: showIconLabels,
|
|
158
|
+
forceIsAutosaveable: hasActiveMetaboxes
|
|
159
|
+
}), createElement(PostPreviewButton, {
|
|
160
|
+
className: "edit-post-header__post-preview-button",
|
|
159
161
|
forceIsAutosaveable: hasActiveMetaboxes
|
|
160
162
|
}), createElement(ViewLink, null), createElement(PostPublishButtonOrToggle, {
|
|
161
163
|
forceIsDirty: hasActiveMetaboxes,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["classnames","privateApis","blockEditorPrivateApis","store","blockEditorStore","PostSavedState","PostPreviewButton","useEffect","useRef","useState","useSelect","__","next","previous","PinnedItems","useViewportMatch","Button","__unstableMotion","motion","Popover","preferencesStore","FullscreenModeClose","HeaderToolbar","MoreMenu","PostPublishButtonOrToggle","default","DevicePreview","ViewLink","MainDashboardButton","editPostStore","DocumentActions","unlock","BlockContextualToolbar","slideY","hidden","y","distractionFreeInactive","hover","transition","type","delay","slideX","x","Header","setEntitiesSavedStatesCallback","setListViewToggleElement","isWideViewport","isLargeViewport","blockToolbarRef","blockSelectionStart","hasActiveMetaboxes","hasFixedToolbar","isEditingTemplate","isPublishSidebarOpened","showIconLabels","select","get","getPreference","getBlockSelectionStart","hasMetaBoxes","isFeatureActive","isBlockToolsCollapsed","setIsBlockToolsCollapsed","hasBlockSelected","createElement","className","Slot","div","variants","showTooltip","Fragment","isFixed","ref","name","icon","onClick","collapsed","label","forceIsDirty","forceIsAutosaveable","scope"],"sources":["@wordpress/edit-post/src/components/header/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { PostSavedState, PostPreviewButton } from '@wordpress/editor';\nimport { useEffect, useRef, useState } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { next, previous } from '@wordpress/icons';\nimport { PinnedItems } from '@wordpress/interface';\nimport { useViewportMatch } from '@wordpress/compose';\nimport {\n\tButton,\n\t__unstableMotion as motion,\n\tPopover,\n} from '@wordpress/components';\nimport { store as preferencesStore } from '@wordpress/preferences';\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';\nimport { unlock } from '../../lock-unlock';\n\nconst { BlockContextualToolbar } = unlock( blockEditorPrivateApis );\n\nconst slideY = {\n\thidden: { y: '-50px' },\n\tdistractionFreeInactive: { y: 0 },\n\thover: { y: 0, transition: { type: 'tween', delay: 0.2 } },\n};\n\nconst slideX = {\n\thidden: { x: '-100%' },\n\tdistractionFreeInactive: { x: 0 },\n\thover: { x: 0, transition: { type: 'tween', delay: 0.2 } },\n};\n\nfunction Header( {\n\tsetEntitiesSavedStatesCallback,\n\tsetListViewToggleElement,\n} ) {\n\tconst isWideViewport = useViewportMatch( 'large' );\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tconst blockToolbarRef = useRef();\n\tconst {\n\t\tblockSelectionStart,\n\t\thasActiveMetaboxes,\n\t\thasFixedToolbar,\n\t\tisEditingTemplate,\n\t\tisPublishSidebarOpened,\n\t\tshowIconLabels,\n\t} = useSelect( ( select ) => {\n\t\tconst { get: getPreference } = select( preferencesStore );\n\n\t\treturn {\n\t\t\tblockSelectionStart:\n\t\t\t\tselect( blockEditorStore ).getBlockSelectionStart(),\n\t\t\thasActiveMetaboxes: select( editPostStore ).hasMetaBoxes(),\n\t\t\tisEditingTemplate: select( editPostStore ).isEditingTemplate(),\n\t\t\tisPublishSidebarOpened:\n\t\t\t\tselect( editPostStore ).isPublishSidebarOpened(),\n\t\t\thasFixedToolbar: getPreference( 'core/edit-post', 'fixedToolbar' ),\n\t\t\tshowIconLabels:\n\t\t\t\tselect( editPostStore ).isFeatureActive( 'showIconLabels' ),\n\t\t};\n\t}, [] );\n\n\tconst [ isBlockToolsCollapsed, setIsBlockToolsCollapsed ] =\n\t\tuseState( true );\n\n\tconst hasBlockSelected = !! blockSelectionStart;\n\n\tuseEffect( () => {\n\t\t// If we have a new block selection, show the block tools\n\t\tif ( blockSelectionStart ) {\n\t\t\tsetIsBlockToolsCollapsed( false );\n\t\t}\n\t}, [ blockSelectionStart ] );\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\thasFixedToolbar={ hasFixedToolbar }\n\t\t\t\t\tsetListViewToggleElement={ setListViewToggleElement }\n\t\t\t\t/>\n\t\t\t\t{ hasFixedToolbar && isLargeViewport && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t\t'selected-block-tools-wrapper',\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t'is-collapsed': isBlockToolsCollapsed,\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\t\t<BlockContextualToolbar isFixed />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<Popover.Slot\n\t\t\t\t\t\t\tref={ blockToolbarRef }\n\t\t\t\t\t\t\tname=\"block-toolbar\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{ isEditingTemplate && hasBlockSelected && (\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tclassName=\"edit-post-header__block-tools-toggle\"\n\t\t\t\t\t\t\t\ticon={ isBlockToolsCollapsed ? next : previous }\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\tsetIsBlockToolsCollapsed(\n\t\t\t\t\t\t\t\t\t\t( collapsed ) => ! collapsed\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\tlabel={\n\t\t\t\t\t\t\t\t\tisBlockToolsCollapsed\n\t\t\t\t\t\t\t\t\t\t? __( 'Show block tools' )\n\t\t\t\t\t\t\t\t\t\t: __( 'Hide block tools' )\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) }\n\t\t\t\t<div\n\t\t\t\t\tclassName={ classnames( 'edit-post-header__center', {\n\t\t\t\t\t\t'is-collapsed':\n\t\t\t\t\t\t\t! isBlockToolsCollapsed &&\n\t\t\t\t\t\t\tisLargeViewport &&\n\t\t\t\t\t\t\tisEditingTemplate,\n\t\t\t\t\t} ) }\n\t\t\t\t>\n\t\t\t\t\t{ isEditingTemplate && <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{ ( isWideViewport || ! 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 && ! isWideViewport && (\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;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SACCC,WAAW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F,EACCA,cAAc,IAAI,CAAER,cAAc,IACnCkB,aAAA,CAACzC,QAAQ;IAAC+B,cAAc,EAAGA;EAAgB,CAAE,CAEnC,CACR,CAAC;AAER;AAEA,eAAeX,MAAM"}
|
|
1
|
+
{"version":3,"names":["classnames","BlockToolbar","store","blockEditorStore","PostSavedState","PostPreviewButton","editorStore","DocumentBar","privateApis","editorPrivateApis","useEffect","useRef","useState","useSelect","__","next","previous","PinnedItems","useViewportMatch","Button","__unstableMotion","motion","Popover","preferencesStore","FullscreenModeClose","HeaderToolbar","MoreMenu","PostPublishButtonOrToggle","ViewLink","MainDashboardButton","editPostStore","unlock","PreviewDropdown","slideY","hidden","y","distractionFreeInactive","hover","transition","type","delay","slideX","x","Header","setEntitiesSavedStatesCallback","setListViewToggleElement","isWideViewport","isLargeViewport","blockToolbarRef","blockSelectionStart","hasActiveMetaboxes","hasFixedToolbar","isEditingTemplate","isPublishSidebarOpened","showIconLabels","select","get","getPreference","getBlockSelectionStart","hasMetaBoxes","getRenderingMode","isFeatureActive","isBlockToolsCollapsed","setIsBlockToolsCollapsed","hasBlockSelected","createElement","className","Slot","div","variants","showTooltip","Fragment","hideDragHandle","ref","name","icon","onClick","collapsed","label","forceIsDirty","forceIsAutosaveable","scope"],"sources":["@wordpress/edit-post/src/components/header/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tBlockToolbar,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport {\n\tPostSavedState,\n\tPostPreviewButton,\n\tstore as editorStore,\n\tDocumentBar,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\nimport { useEffect, useRef, useState } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { next, previous } from '@wordpress/icons';\nimport { PinnedItems } from '@wordpress/interface';\nimport { useViewportMatch } from '@wordpress/compose';\nimport {\n\tButton,\n\t__unstableMotion as motion,\n\tPopover,\n} from '@wordpress/components';\nimport { store as preferencesStore } from '@wordpress/preferences';\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 ViewLink from '../view-link';\nimport MainDashboardButton from './main-dashboard-button';\nimport { store as editPostStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst { PreviewDropdown } = unlock( editorPrivateApis );\n\nconst slideY = {\n\thidden: { y: '-50px' },\n\tdistractionFreeInactive: { y: 0 },\n\thover: { y: 0, transition: { type: 'tween', delay: 0.2 } },\n};\n\nconst slideX = {\n\thidden: { x: '-100%' },\n\tdistractionFreeInactive: { x: 0 },\n\thover: { x: 0, transition: { type: 'tween', delay: 0.2 } },\n};\n\nfunction Header( {\n\tsetEntitiesSavedStatesCallback,\n\tsetListViewToggleElement,\n} ) {\n\tconst isWideViewport = useViewportMatch( 'large' );\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tconst blockToolbarRef = useRef();\n\tconst {\n\t\tblockSelectionStart,\n\t\thasActiveMetaboxes,\n\t\thasFixedToolbar,\n\t\tisEditingTemplate,\n\t\tisPublishSidebarOpened,\n\t\tshowIconLabels,\n\t} = useSelect( ( select ) => {\n\t\tconst { get: getPreference } = select( preferencesStore );\n\n\t\treturn {\n\t\t\tblockSelectionStart:\n\t\t\t\tselect( blockEditorStore ).getBlockSelectionStart(),\n\t\t\thasActiveMetaboxes: select( editPostStore ).hasMetaBoxes(),\n\t\t\tisEditingTemplate:\n\t\t\t\tselect( editorStore ).getRenderingMode() === 'template-only',\n\t\t\tisPublishSidebarOpened:\n\t\t\t\tselect( editPostStore ).isPublishSidebarOpened(),\n\t\t\thasFixedToolbar: getPreference( 'core/edit-post', 'fixedToolbar' ),\n\t\t\tshowIconLabels:\n\t\t\t\tselect( editPostStore ).isFeatureActive( 'showIconLabels' ),\n\t\t};\n\t}, [] );\n\n\tconst [ isBlockToolsCollapsed, setIsBlockToolsCollapsed ] =\n\t\tuseState( true );\n\n\tconst hasBlockSelected = !! blockSelectionStart;\n\n\tuseEffect( () => {\n\t\t// If we have a new block selection, show the block tools\n\t\tif ( blockSelectionStart ) {\n\t\t\tsetIsBlockToolsCollapsed( false );\n\t\t}\n\t}, [ blockSelectionStart ] );\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\thasFixedToolbar={ hasFixedToolbar }\n\t\t\t\t\tsetListViewToggleElement={ setListViewToggleElement }\n\t\t\t\t/>\n\t\t\t\t{ hasFixedToolbar && isLargeViewport && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t\t'selected-block-tools-wrapper',\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t'is-collapsed':\n\t\t\t\t\t\t\t\t\t\tisEditingTemplate &&\n\t\t\t\t\t\t\t\t\t\tisBlockToolsCollapsed,\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\t\t<BlockToolbar hideDragHandle />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<Popover.Slot\n\t\t\t\t\t\t\tref={ blockToolbarRef }\n\t\t\t\t\t\t\tname=\"block-toolbar\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{ isEditingTemplate && hasBlockSelected && (\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tclassName=\"edit-post-header__block-tools-toggle\"\n\t\t\t\t\t\t\t\ticon={ isBlockToolsCollapsed ? next : previous }\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\tsetIsBlockToolsCollapsed(\n\t\t\t\t\t\t\t\t\t\t( collapsed ) => ! collapsed\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\tlabel={\n\t\t\t\t\t\t\t\t\tisBlockToolsCollapsed\n\t\t\t\t\t\t\t\t\t\t? __( 'Show block tools' )\n\t\t\t\t\t\t\t\t\t\t: __( 'Hide block tools' )\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) }\n\t\t\t\t<div\n\t\t\t\t\tclassName={ classnames( 'edit-post-header__center', {\n\t\t\t\t\t\t'is-collapsed':\n\t\t\t\t\t\t\tisEditingTemplate &&\n\t\t\t\t\t\t\thasBlockSelected &&\n\t\t\t\t\t\t\t! isBlockToolsCollapsed &&\n\t\t\t\t\t\t\thasFixedToolbar &&\n\t\t\t\t\t\t\tisLargeViewport,\n\t\t\t\t\t} ) }\n\t\t\t\t>\n\t\t\t\t\t{ isEditingTemplate && <DocumentBar /> }\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<PreviewDropdown\n\t\t\t\t\tshowIconLabels={ showIconLabels }\n\t\t\t\t\tforceIsAutosaveable={ hasActiveMetaboxes }\n\t\t\t\t/>\n\t\t\t\t<PostPreviewButton\n\t\t\t\t\tclassName=\"edit-post-header__post-preview-button\"\n\t\t\t\t\tforceIsAutosaveable={ hasActiveMetaboxes }\n\t\t\t\t/>\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{ ( isWideViewport || ! 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 && ! isWideViewport && (\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;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SACCC,YAAY,EACZC,KAAK,IAAIC,gBAAgB,QACnB,yBAAyB;AAChC,SACCC,cAAc,EACdC,iBAAiB,EACjBH,KAAK,IAAII,WAAW,EACpBC,WAAW,EACXC,WAAW,IAAIC,iBAAiB,QAC1B,mBAAmB;AAC1B,SAASC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,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,CAEnC,CACR,CAAC;AAER;AAEA,eAAeX,MAAM"}
|
|
@@ -36,7 +36,7 @@ function ModeSwitcher() {
|
|
|
36
36
|
shortcut: select(keyboardShortcutsStore).getShortcutRepresentation('core/edit-post/toggle-mode'),
|
|
37
37
|
isRichEditingEnabled: select(editorStore).getEditorSettings().richEditingEnabled,
|
|
38
38
|
isCodeEditingEnabled: select(editorStore).getEditorSettings().codeEditingEnabled,
|
|
39
|
-
isEditingTemplate: select(
|
|
39
|
+
isEditingTemplate: select(editorStore).getRenderingMode() === 'template-only',
|
|
40
40
|
mode: select(editPostStore).getEditorMode()
|
|
41
41
|
}), []);
|
|
42
42
|
const {
|
|
@@ -1 +1 @@
|
|
|
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
|
|
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","getRenderingMode","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:\n\t\t\t\tselect( editorStore ).getRenderingMode() === 'template-only',\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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G;IAClDS,YAAY,GAAG,MAAM;EACtB;EACA,IAAK,CAAEX,oBAAoB,IAAIE,IAAI,KAAK,MAAM,EAAG;IAChDS,YAAY,GAAG,QAAQ;EACxB;EAEA,MAAMC,OAAO,GAAGlB,KAAK,CAACmB,GAAG,CAAIC,MAAM,IAAM;IACxC,IAAK,CAAEd,oBAAoB,IAAIc,MAAM,CAACnB,KAAK,KAAK,MAAM,EAAG;MACxDmB,MAAM,GAAG;QACR,GAAGA,MAAM;QACTC,QAAQ,EAAE;MACX,CAAC;IACF;IACA,IAAK,CAAEhB,oBAAoB,IAAIe,MAAM,CAACnB,KAAK,KAAK,QAAQ,EAAG;MAC1DmB,MAAM,GAAG;QACR,GAAGA,MAAM;QACTC,QAAQ,EAAE,IAAI;QACdC,IAAI,EAAE/B,EAAE,CACP,4DACD;MACD,CAAC;IACF;IACA,IAAK6B,MAAM,CAACnB,KAAK,KAAKgB,YAAY,IAAI,CAAEG,MAAM,CAACC,QAAQ,EAAG;MACzD,OAAO;QAAE,GAAGD,MAAM;QAAEhB;MAAS,CAAC;IAC/B;IACA,OAAOgB,MAAM;EACd,CAAE,CAAC;EAEH,OACCG,aAAA,CAAC9B,SAAS;IAACS,KAAK,EAAGX,EAAE,CAAE,QAAS;EAAG,GAClCgC,aAAA,CAAC/B,eAAe;IACf0B,OAAO,EAAGA,OAAS;IACnBjB,KAAK,EAAGgB,YAAc;IACtBO,QAAQ,EAAGR;EAAkB,CAC7B,CACS,CAAC;AAEd;AAEA,eAAeb,YAAY"}
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
1
|
+
{"version":3,"names":["__","MenuGroup","ActionItem","MoreMenuDropdown","PinnedItems","useViewportMatch","ModeSwitcher","PreferencesMenuItem","ToolsMoreMenuGroup","WritingMenu","MoreMenu","showIconLabels","isLargeViewport","createElement","toggleProps","showTooltip","variant","size","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\tsize: 'compact',\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,CAAE;MAChDC,IAAI,EAAE;IACP;EAAG,GAED,CAAE;IAAEC;EAAQ,CAAC,KACdL,aAAA,CAAAM,QAAA,QACGR,cAAc,IAAI,CAAEC,eAAe,IACpCC,aAAA,CAACT,WAAW,CAACgB,IAAI;IAChBC,SAAS,EAAGV,cAAc,IAAI,kBAAoB;IAClDW,KAAK,EAAC;EAAgB,CACtB,CACD,EACDT,aAAA,CAACJ,WAAW,MAAE,CAAC,EACfI,aAAA,CAACP,YAAY,MAAE,CAAC,EAChBO,aAAA,CAACX,UAAU,CAACkB,IAAI;IACfG,IAAI,EAAC,iCAAiC;IACtCC,KAAK,EAAGxB,EAAE,CAAE,SAAU,CAAG;IACzByB,EAAE,EAAGxB,SAAW;IAChByB,SAAS,EAAG;MAAEC,OAAO,EAAET;IAAQ;EAAG,CAClC,CAAC,EACFL,aAAA,CAACL,kBAAkB,CAACY,IAAI;IAACM,SAAS,EAAG;MAAER;IAAQ;EAAG,CAAE,CAAC,EACrDL,aAAA,CAACZ,SAAS,QACTY,aAAA,CAACN,mBAAmB,MAAE,CACZ,CACV,CAEc,CAAC;AAErB,CAAC;AAED,eAAeG,QAAQ"}
|
|
@@ -2,13 +2,12 @@ import { createElement } from "react";
|
|
|
2
2
|
/**
|
|
3
3
|
* WordPress dependencies
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
5
|
+
import { useDispatch, useRegistry } from '@wordpress/data';
|
|
6
6
|
import { MenuGroup } from '@wordpress/components';
|
|
7
7
|
import { __, _x } from '@wordpress/i18n';
|
|
8
8
|
import { useViewportMatch } from '@wordpress/compose';
|
|
9
9
|
import { displayShortcut } from '@wordpress/keycodes';
|
|
10
10
|
import { PreferenceToggleMenuItem, store as preferencesStore } from '@wordpress/preferences';
|
|
11
|
-
import { store as blockEditorStore } from '@wordpress/block-editor';
|
|
12
11
|
|
|
13
12
|
/**
|
|
14
13
|
* Internal dependencies
|
|
@@ -16,7 +15,6 @@ import { store as blockEditorStore } from '@wordpress/block-editor';
|
|
|
16
15
|
import { store as postEditorStore } from '../../../store';
|
|
17
16
|
function WritingMenu() {
|
|
18
17
|
const registry = useRegistry();
|
|
19
|
-
const isDistractionFree = useSelect(select => select(blockEditorStore).getSettings().isDistractionFree, []);
|
|
20
18
|
const {
|
|
21
19
|
setIsInserterOpened,
|
|
22
20
|
setIsListViewOpened,
|
|
@@ -33,6 +31,9 @@ function WritingMenu() {
|
|
|
33
31
|
closeGeneralSidebar();
|
|
34
32
|
});
|
|
35
33
|
};
|
|
34
|
+
const turnOffDistractionFree = () => {
|
|
35
|
+
setPreference('core/edit-post', 'distractionFree', false);
|
|
36
|
+
};
|
|
36
37
|
const isLargeViewport = useViewportMatch('medium');
|
|
37
38
|
if (!isLargeViewport) {
|
|
38
39
|
return null;
|
|
@@ -41,12 +42,21 @@ function WritingMenu() {
|
|
|
41
42
|
label: _x('View', 'noun')
|
|
42
43
|
}, createElement(PreferenceToggleMenuItem, {
|
|
43
44
|
scope: "core/edit-post",
|
|
44
|
-
disabled: isDistractionFree,
|
|
45
45
|
name: "fixedToolbar",
|
|
46
|
+
onToggle: turnOffDistractionFree,
|
|
46
47
|
label: __('Top toolbar'),
|
|
47
48
|
info: __('Access all block and document tools in a single place'),
|
|
48
49
|
messageActivated: __('Top toolbar activated'),
|
|
49
50
|
messageDeactivated: __('Top toolbar deactivated')
|
|
51
|
+
}), createElement(PreferenceToggleMenuItem, {
|
|
52
|
+
scope: "core/edit-post",
|
|
53
|
+
name: "distractionFree",
|
|
54
|
+
onToggle: toggleDistractionFree,
|
|
55
|
+
label: __('Distraction free'),
|
|
56
|
+
info: __('Write with calmness'),
|
|
57
|
+
messageActivated: __('Distraction free mode activated'),
|
|
58
|
+
messageDeactivated: __('Distraction free mode deactivated'),
|
|
59
|
+
shortcut: displayShortcut.primaryShift('\\')
|
|
50
60
|
}), createElement(PreferenceToggleMenuItem, {
|
|
51
61
|
scope: "core/edit-post",
|
|
52
62
|
name: "focusMode",
|
|
@@ -62,15 +72,6 @@ function WritingMenu() {
|
|
|
62
72
|
messageActivated: __('Fullscreen mode activated'),
|
|
63
73
|
messageDeactivated: __('Fullscreen mode deactivated'),
|
|
64
74
|
shortcut: displayShortcut.secondary('f')
|
|
65
|
-
}), createElement(PreferenceToggleMenuItem, {
|
|
66
|
-
scope: "core/edit-post",
|
|
67
|
-
name: "distractionFree",
|
|
68
|
-
onToggle: toggleDistractionFree,
|
|
69
|
-
label: __('Distraction free'),
|
|
70
|
-
info: __('Write with calmness'),
|
|
71
|
-
messageActivated: __('Distraction free mode activated'),
|
|
72
|
-
messageDeactivated: __('Distraction free mode deactivated'),
|
|
73
|
-
shortcut: displayShortcut.primaryShift('\\')
|
|
74
75
|
}));
|
|
75
76
|
}
|
|
76
77
|
export default WritingMenu;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["useDispatch","useRegistry","MenuGroup","__","_x","useViewportMatch","displayShortcut","PreferenceToggleMenuItem","store","preferencesStore","postEditorStore","WritingMenu","registry","setIsInserterOpened","setIsListViewOpened","closeGeneralSidebar","set","setPreference","toggleDistractionFree","batch","turnOffDistractionFree","isLargeViewport","createElement","label","scope","name","onToggle","info","messageActivated","messageDeactivated","shortcut","primaryShift","secondary"],"sources":["@wordpress/edit-post/src/components/header/writing-menu/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { 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';\n\n/**\n * Internal dependencies\n */\nimport { store as postEditorStore } from '../../../store';\n\nfunction WritingMenu() {\n\tconst registry = useRegistry();\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', true );\n\t\t\tsetIsInserterOpened( false );\n\t\t\tsetIsListViewOpened( false );\n\t\t\tcloseGeneralSidebar();\n\t\t} );\n\t};\n\n\tconst turnOffDistractionFree = () => {\n\t\tsetPreference( 'core/edit-post', 'distractionFree', false );\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\tname=\"fixedToolbar\"\n\t\t\t\tonToggle={ turnOffDistractionFree }\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=\"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\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</MenuGroup>\n\t);\n}\n\nexport default WritingMenu;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,WAAW,EAAEC,WAAW,QAAQ,iBAAiB;AAC1D,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;;AAE/B;AACA;AACA;AACA,SAASD,KAAK,IAAIE,eAAe,QAAQ,gBAAgB;AAEzD,SAASC,WAAWA,CAAA,EAAG;EACtB,MAAMC,QAAQ,GAAGX,WAAW,CAAC,CAAC;EAE9B,MAAM;IAAEY,mBAAmB;IAAEC,mBAAmB;IAAEC;EAAoB,CAAC,GACtEf,WAAW,CAAEU,eAAgB,CAAC;EAC/B,MAAM;IAAEM,GAAG,EAAEC;EAAc,CAAC,GAAGjB,WAAW,CAAES,gBAAiB,CAAC;EAE9D,MAAMS,qBAAqB,GAAGA,CAAA,KAAM;IACnCN,QAAQ,CAACO,K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AAA,CAACf,wBAAwB;IACxBiB,KAAK,EAAC,gBAAgB;IACtBC,IAAI,EAAC,WAAW;IAChBF,KAAK,EAAGpB,EAAE,CAAE,gBAAiB,CAAG;IAChCwB,IAAI,EAAGxB,EAAE,CAAE,8BAA+B,CAAG;IAC7CyB,gBAAgB,EAAGzB,EAAE,CAAE,0BAA2B,CAAG;IACrD0B,kBAAkB,EAAG1B,EAAE,CAAE,4BAA6B;EAAG,CACzD,CAAC,EACFmB,aAAA,CAACf,wBAAwB;IACxBiB,KAAK,EAAC,gBAAgB;IACtBC,IAAI,EAAC,gBAAgB;IACrBF,KAAK,EAAGpB,EAAE,CAAE,iBAAkB,CAAG;IACjCwB,IAAI,EAAGxB,EAAE,CAAE,wBAAyB,CAAG;IACvCyB,gBAAgB,EAAGzB,EAAE,CAAE,2BAA4B,CAAG;IACtD0B,kBAAkB,EAAG1B,EAAE,CAAE,6BAA8B,CAAG;IAC1D2B,QAAQ,EAAGxB,eAAe,CAAC0B,SAAS,CAAE,GAAI;EAAG,CAC7C,CACS,CAAC;AAEd;AAEA,eAAerB,WAAW"}
|
|
@@ -9,7 +9,7 @@ import classnames from 'classnames';
|
|
|
9
9
|
*/
|
|
10
10
|
import { AutosaveMonitor, LocalAutosaveMonitor, UnsavedChangesWarning, EditorNotices, EditorKeyboardShortcutsRegister, EditorKeyboardShortcuts, EditorSnackbars, PostSyncStatusModal, store as editorStore } from '@wordpress/editor';
|
|
11
11
|
import { useSelect, useDispatch } from '@wordpress/data';
|
|
12
|
-
import { useBlockCommands, BlockBreadcrumb, privateApis as blockEditorPrivateApis, store as blockEditorStore } from '@wordpress/block-editor';
|
|
12
|
+
import { useBlockCommands, BlockBreadcrumb, BlockToolbar, privateApis as blockEditorPrivateApis, store as blockEditorStore } from '@wordpress/block-editor';
|
|
13
13
|
import { Button, ScrollLock } from '@wordpress/components';
|
|
14
14
|
import { useViewportMatch } from '@wordpress/compose';
|
|
15
15
|
import { PluginArea } from '@wordpress/plugins';
|
|
@@ -102,7 +102,8 @@ function Layout() {
|
|
|
102
102
|
useBlockCommands();
|
|
103
103
|
const isMobileViewport = useViewportMatch('medium', '<');
|
|
104
104
|
const isHugeViewport = useViewportMatch('huge', '>=');
|
|
105
|
-
const
|
|
105
|
+
const isWideViewport = useViewportMatch('large');
|
|
106
|
+
const isLargeViewport = useViewportMatch('medium');
|
|
106
107
|
const {
|
|
107
108
|
openGeneralSidebar,
|
|
108
109
|
closeGeneralSidebar,
|
|
@@ -117,7 +118,6 @@ function Layout() {
|
|
|
117
118
|
isRichEditingEnabled,
|
|
118
119
|
sidebarIsOpened,
|
|
119
120
|
hasActiveMetaboxes,
|
|
120
|
-
hasFixedToolbar,
|
|
121
121
|
previousShortcut,
|
|
122
122
|
nextShortcut,
|
|
123
123
|
hasBlockSelected,
|
|
@@ -126,7 +126,7 @@ function Layout() {
|
|
|
126
126
|
showIconLabels,
|
|
127
127
|
isDistractionFree,
|
|
128
128
|
showBlockBreadcrumbs,
|
|
129
|
-
|
|
129
|
+
showMetaBoxes,
|
|
130
130
|
documentLabel
|
|
131
131
|
} = useSelect(select => {
|
|
132
132
|
const {
|
|
@@ -136,8 +136,7 @@ function Layout() {
|
|
|
136
136
|
const editorSettings = getEditorSettings();
|
|
137
137
|
const postTypeLabel = getPostTypeLabel();
|
|
138
138
|
return {
|
|
139
|
-
|
|
140
|
-
hasFixedToolbar: select(editPostStore).isFeatureActive('fixedToolbar'),
|
|
139
|
+
showMetaBoxes: select(editorStore).getRenderingMode() === 'post-only',
|
|
141
140
|
sidebarIsOpened: !!(select(interfaceStore).getActiveComplementaryArea(editPostStore.name) || select(editPostStore).isPublishSidebarOpened()),
|
|
142
141
|
isFullscreenActive: select(editPostStore).isFeatureActive('fullscreenMode'),
|
|
143
142
|
isInserterOpened: select(editPostStore).isInserterOpened(),
|
|
@@ -167,12 +166,12 @@ function Layout() {
|
|
|
167
166
|
if (sidebarIsOpened && !isHugeViewport) {
|
|
168
167
|
setIsInserterOpened(false);
|
|
169
168
|
}
|
|
170
|
-
}, [
|
|
169
|
+
}, [isHugeViewport, setIsInserterOpened, sidebarIsOpened]);
|
|
171
170
|
useEffect(() => {
|
|
172
171
|
if (isInserterOpened && !isHugeViewport) {
|
|
173
172
|
closeGeneralSidebar();
|
|
174
173
|
}
|
|
175
|
-
}, [isInserterOpened, isHugeViewport]);
|
|
174
|
+
}, [closeGeneralSidebar, isInserterOpened, isHugeViewport]);
|
|
176
175
|
|
|
177
176
|
// Local state for save panel.
|
|
178
177
|
// Note 'truthy' callback implies an open panel.
|
|
@@ -193,9 +192,8 @@ function Layout() {
|
|
|
193
192
|
}
|
|
194
193
|
const className = classnames('edit-post-layout', 'is-mode-' + mode, {
|
|
195
194
|
'is-sidebar-opened': sidebarIsOpened,
|
|
196
|
-
'has-fixed-toolbar': hasFixedToolbar,
|
|
197
195
|
'has-metaboxes': hasActiveMetaboxes,
|
|
198
|
-
'is-distraction-free': isDistractionFree &&
|
|
196
|
+
'is-distraction-free': isDistractionFree && isWideViewport,
|
|
199
197
|
'is-entity-save-view-open': !!entitiesSavedStatesCallback
|
|
200
198
|
});
|
|
201
199
|
const secondarySidebarLabel = isListViewOpened ? __('Document Overview') : __('Block Library');
|
|
@@ -217,7 +215,7 @@ function Layout() {
|
|
|
217
215
|
return createElement(Fragment, null, createElement(FullscreenMode, {
|
|
218
216
|
isActive: isFullscreenActive
|
|
219
217
|
}), createElement(BrowserURL, null), createElement(UnsavedChangesWarning, null), createElement(AutosaveMonitor, null), createElement(LocalAutosaveMonitor, null), createElement(EditPostKeyboardShortcuts, null), createElement(EditorKeyboardShortcutsRegister, null), createElement(EditorKeyboardShortcuts, null), createElement(InterfaceSkeleton, {
|
|
220
|
-
isDistractionFree: isDistractionFree &&
|
|
218
|
+
isDistractionFree: isDistractionFree && isWideViewport,
|
|
221
219
|
className: className,
|
|
222
220
|
labels: {
|
|
223
221
|
...interfaceLabels,
|
|
@@ -240,9 +238,11 @@ function Layout() {
|
|
|
240
238
|
scope: "core/edit-post"
|
|
241
239
|
})),
|
|
242
240
|
notices: createElement(EditorSnackbars, null),
|
|
243
|
-
content: createElement(Fragment, null, !isDistractionFree && createElement(EditorNotices, null), (mode === 'text' || !isRichEditingEnabled) && createElement(TextEditor, null),
|
|
241
|
+
content: createElement(Fragment, null, !isDistractionFree && createElement(EditorNotices, null), (mode === 'text' || !isRichEditingEnabled) && createElement(TextEditor, null), !isLargeViewport && createElement(BlockToolbar, {
|
|
242
|
+
hideDragHandle: true
|
|
243
|
+
}), isRichEditingEnabled && mode === 'visual' && createElement(VisualEditor, {
|
|
244
244
|
styles: styles
|
|
245
|
-
}), !isDistractionFree &&
|
|
245
|
+
}), !isDistractionFree && showMetaBoxes && createElement("div", {
|
|
246
246
|
className: "edit-post-layout__metaboxes"
|
|
247
247
|
}, createElement(MetaBoxes, {
|
|
248
248
|
location: "normal"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["classnames","AutosaveMonitor","LocalAutosaveMonitor","UnsavedChangesWarning","EditorNotices","EditorKeyboardShortcutsRegister","EditorKeyboardShortcuts","EditorSnackbars","PostSyncStatusModal","store","editorStore","useSelect","useDispatch","useBlockCommands","BlockBreadcrumb","privateApis","blockEditorPrivateApis","blockEditorStore","Button","ScrollLock","useViewportMatch","PluginArea","__","_x","sprintf","ComplementaryArea","FullscreenMode","InterfaceSkeleton","interfaceStore","useState","useEffect","useCallback","useMemo","keyboardShortcutsStore","noticesStore","commandsPrivateApis","coreCommandsPrivateApis","useCommands","unlock","useCommandContext","TextEditor","VisualEditor","EditPostKeyboardShortcuts","KeyboardShortcutHelpModal","EditPostPreferencesModal","BrowserURL","Header","InserterSidebar","ListViewSidebar","SettingsSidebar","MetaBoxes","WelcomeGuide","ActionsPanel","StartPageOptions","editPostStore","useCommonCommands","getLayoutStyles","interfaceLabels","header","body","sidebar","actions","footer","useEditorStyles","hasThemeStyleSupport","editorSettings","select","isFeatureActive","getEditorSettings","_editorSettings$style","_editorSettings$style2","presetStyles","styles","filter","style","__unstableType","defaultEditorStyles","hasThemeStyles","length","disableLayoutStyles","push","css","selector","hasBlockGapSupport","hasFallbackGapSupport","fallbackGapValue","Layout","isMobileViewport","isHugeViewport","isLargeViewport","openGeneralSidebar","closeGeneralSidebar","setIsInserterOpened","createErrorNotice","mode","isFullscreenActive","isRichEditingEnabled","sidebarIsOpened","hasActiveMetaboxes","hasFixedToolbar","previousShortcut","nextShortcut","hasBlockSelected","isInserterOpened","isListViewOpened","showIconLabels","isDistractionFree","showBlockBreadcrumbs","isTemplateMode","documentLabel","getPostTypeLabel","postTypeLabel","isEditingTemplate","getActiveComplementaryArea","name","isPublishSidebarOpened","getEditorMode","richEditingEnabled","hasMetaBoxes","getAllShortcutKeyCombinations","getBlockSelectionStart","commandContext","openSidebarPanel","entitiesSavedStatesCallback","setEntitiesSavedStatesCallback","listViewToggleElement","setListViewToggleElement","closeEntitiesSavedStates","arg","document","classList","add","remove","className","secondarySidebarLabel","secondarySidebar","createElement","onPluginAreaError","Fragment","isActive","labels","editorNotices","variant","onClick","Slot","scope","notices","content","location","rootLabelText","isEntitiesSavedStatesOpen","shortcuts","previous","next","onError"],"sources":["@wordpress/edit-post/src/components/layout/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tAutosaveMonitor,\n\tLocalAutosaveMonitor,\n\tUnsavedChangesWarning,\n\tEditorNotices,\n\tEditorKeyboardShortcutsRegister,\n\tEditorKeyboardShortcuts,\n\tEditorSnackbars,\n\tPostSyncStatusModal,\n\tstore as editorStore,\n} from '@wordpress/editor';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tuseBlockCommands,\n\tBlockBreadcrumb,\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { Button, ScrollLock } from '@wordpress/components';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { PluginArea } from '@wordpress/plugins';\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport {\n\tComplementaryArea,\n\tFullscreenMode,\n\tInterfaceSkeleton,\n\tstore as interfaceStore,\n} from '@wordpress/interface';\nimport { useState, useEffect, useCallback, useMemo } from '@wordpress/element';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport { store as noticesStore } from '@wordpress/notices';\n\nimport { privateApis as commandsPrivateApis } from '@wordpress/commands';\nimport { privateApis as coreCommandsPrivateApis } from '@wordpress/core-commands';\n\nconst { useCommands } = unlock( coreCommandsPrivateApis );\nconst { useCommandContext } = unlock( commandsPrivateApis );\n\n/**\n * Internal dependencies\n */\nimport TextEditor from '../text-editor';\nimport VisualEditor from '../visual-editor';\nimport EditPostKeyboardShortcuts from '../keyboard-shortcuts';\nimport KeyboardShortcutHelpModal from '../keyboard-shortcut-help-modal';\nimport EditPostPreferencesModal from '../preferences-modal';\nimport BrowserURL from '../browser-url';\nimport Header from '../header';\nimport InserterSidebar from '../secondary-sidebar/inserter-sidebar';\nimport ListViewSidebar from '../secondary-sidebar/list-view-sidebar';\nimport SettingsSidebar from '../sidebar/settings-sidebar';\nimport MetaBoxes from '../meta-boxes';\nimport WelcomeGuide from '../welcome-guide';\nimport ActionsPanel from './actions-panel';\nimport StartPageOptions from '../start-page-options';\nimport { store as editPostStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport useCommonCommands from '../../hooks/commands/use-common-commands';\n\nconst { getLayoutStyles } = unlock( blockEditorPrivateApis );\n\nconst interfaceLabels = {\n\t/* translators: accessibility text for the editor top bar landmark region. */\n\theader: __( 'Editor top bar' ),\n\t/* translators: accessibility text for the editor content landmark region. */\n\tbody: __( 'Editor content' ),\n\t/* translators: accessibility text for the editor settings landmark region. */\n\tsidebar: __( 'Editor settings' ),\n\t/* translators: accessibility text for the editor publish landmark region. */\n\tactions: __( 'Editor publish' ),\n\t/* translators: accessibility text for the editor footer landmark region. */\n\tfooter: __( 'Editor footer' ),\n};\n\nfunction useEditorStyles() {\n\tconst { hasThemeStyleSupport, editorSettings } = useSelect(\n\t\t( select ) => ( {\n\t\t\thasThemeStyleSupport:\n\t\t\t\tselect( editPostStore ).isFeatureActive( 'themeStyles' ),\n\t\t\teditorSettings: select( editorStore ).getEditorSettings(),\n\t\t} ),\n\t\t[]\n\t);\n\n\t// Compute the default styles.\n\treturn useMemo( () => {\n\t\tconst presetStyles =\n\t\t\teditorSettings.styles?.filter(\n\t\t\t\t( style ) =>\n\t\t\t\t\tstyle.__unstableType && style.__unstableType !== 'theme'\n\t\t\t) ?? [];\n\n\t\tconst defaultEditorStyles = [\n\t\t\t...editorSettings.defaultEditorStyles,\n\t\t\t...presetStyles,\n\t\t];\n\n\t\t// Has theme styles if the theme supports them and if some styles were not preset styles (in which case they're theme styles).\n\t\tconst hasThemeStyles =\n\t\t\thasThemeStyleSupport &&\n\t\t\tpresetStyles.length !== ( editorSettings.styles?.length ?? 0 );\n\n\t\t// If theme styles are not present or displayed, ensure that\n\t\t// base layout styles are still present in the editor.\n\t\tif ( ! editorSettings.disableLayoutStyles && ! hasThemeStyles ) {\n\t\t\tdefaultEditorStyles.push( {\n\t\t\t\tcss: getLayoutStyles( {\n\t\t\t\t\tstyle: {},\n\t\t\t\t\tselector: 'body',\n\t\t\t\t\thasBlockGapSupport: false,\n\t\t\t\t\thasFallbackGapSupport: true,\n\t\t\t\t\tfallbackGapValue: '0.5em',\n\t\t\t\t} ),\n\t\t\t} );\n\t\t}\n\n\t\treturn hasThemeStyles ? editorSettings.styles : defaultEditorStyles;\n\t}, [\n\t\teditorSettings.defaultEditorStyles,\n\t\teditorSettings.disableLayoutStyles,\n\t\teditorSettings.styles,\n\t\thasThemeStyleSupport,\n\t] );\n}\n\nfunction Layout() {\n\tuseCommands();\n\tuseCommonCommands();\n\tuseBlockCommands();\n\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst isHugeViewport = useViewportMatch( 'huge', '>=' );\n\tconst isLargeViewport = useViewportMatch( 'large' );\n\tconst { openGeneralSidebar, closeGeneralSidebar, setIsInserterOpened } =\n\t\tuseDispatch( editPostStore );\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\tconst {\n\t\tmode,\n\t\tisFullscreenActive,\n\t\tisRichEditingEnabled,\n\t\tsidebarIsOpened,\n\t\thasActiveMetaboxes,\n\t\thasFixedToolbar,\n\t\tpreviousShortcut,\n\t\tnextShortcut,\n\t\thasBlockSelected,\n\t\tisInserterOpened,\n\t\tisListViewOpened,\n\t\tshowIconLabels,\n\t\tisDistractionFree,\n\t\tshowBlockBreadcrumbs,\n\t\tisTemplateMode,\n\t\tdocumentLabel,\n\t} = useSelect( ( select ) => {\n\t\tconst { getEditorSettings, getPostTypeLabel } = select( editorStore );\n\t\tconst editorSettings = getEditorSettings();\n\t\tconst postTypeLabel = getPostTypeLabel();\n\n\t\treturn {\n\t\t\tisTemplateMode: select( editPostStore ).isEditingTemplate(),\n\t\t\thasFixedToolbar:\n\t\t\t\tselect( editPostStore ).isFeatureActive( 'fixedToolbar' ),\n\t\t\tsidebarIsOpened: !! (\n\t\t\t\tselect( interfaceStore ).getActiveComplementaryArea(\n\t\t\t\t\teditPostStore.name\n\t\t\t\t) || select( editPostStore ).isPublishSidebarOpened()\n\t\t\t),\n\t\t\tisFullscreenActive:\n\t\t\t\tselect( editPostStore ).isFeatureActive( 'fullscreenMode' ),\n\t\t\tisInserterOpened: select( editPostStore ).isInserterOpened(),\n\t\t\tisListViewOpened: select( editPostStore ).isListViewOpened(),\n\t\t\tmode: select( editPostStore ).getEditorMode(),\n\t\t\tisRichEditingEnabled: editorSettings.richEditingEnabled,\n\t\t\thasActiveMetaboxes: select( editPostStore ).hasMetaBoxes(),\n\t\t\tpreviousShortcut: select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getAllShortcutKeyCombinations( 'core/edit-post/previous-region' ),\n\t\t\tnextShortcut: select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getAllShortcutKeyCombinations( 'core/edit-post/next-region' ),\n\t\t\tshowIconLabels:\n\t\t\t\tselect( editPostStore ).isFeatureActive( 'showIconLabels' ),\n\t\t\tisDistractionFree:\n\t\t\t\tselect( editPostStore ).isFeatureActive( 'distractionFree' ),\n\t\t\tshowBlockBreadcrumbs: select( editPostStore ).isFeatureActive(\n\t\t\t\t'showBlockBreadcrumbs'\n\t\t\t),\n\t\t\t// translators: Default label for the Document in the Block Breadcrumb.\n\t\t\tdocumentLabel: postTypeLabel || _x( 'Document', 'noun' ),\n\t\t\thasBlockSelected:\n\t\t\t\tselect( blockEditorStore ).getBlockSelectionStart(),\n\t\t};\n\t}, [] );\n\n\t// Set the right context for the command palette\n\tconst commandContext = hasBlockSelected\n\t\t? 'block-selection-edit'\n\t\t: 'post-editor-edit';\n\tuseCommandContext( commandContext );\n\n\tconst styles = useEditorStyles();\n\n\tconst openSidebarPanel = () =>\n\t\topenGeneralSidebar(\n\t\t\thasBlockSelected ? 'edit-post/block' : 'edit-post/document'\n\t\t);\n\n\t// Inserter and Sidebars are mutually exclusive\n\tuseEffect( () => {\n\t\tif ( sidebarIsOpened && ! isHugeViewport ) {\n\t\t\tsetIsInserterOpened( false );\n\t\t}\n\t}, [ sidebarIsOpened, isHugeViewport ] );\n\tuseEffect( () => {\n\t\tif ( isInserterOpened && ! isHugeViewport ) {\n\t\t\tcloseGeneralSidebar();\n\t\t}\n\t}, [ isInserterOpened, isHugeViewport ] );\n\n\t// Local state for save panel.\n\t// Note 'truthy' callback implies an open panel.\n\tconst [ entitiesSavedStatesCallback, setEntitiesSavedStatesCallback ] =\n\t\tuseState( false );\n\n\tconst [ listViewToggleElement, setListViewToggleElement ] =\n\t\tuseState( null );\n\n\tconst closeEntitiesSavedStates = useCallback(\n\t\t( arg ) => {\n\t\t\tif ( typeof entitiesSavedStatesCallback === 'function' ) {\n\t\t\t\tentitiesSavedStatesCallback( arg );\n\t\t\t}\n\t\t\tsetEntitiesSavedStatesCallback( false );\n\t\t},\n\t\t[ entitiesSavedStatesCallback ]\n\t);\n\n\t// We need to add the show-icon-labels class to the body element so it is applied to modals.\n\tif ( showIconLabels ) {\n\t\tdocument.body.classList.add( 'show-icon-labels' );\n\t} else {\n\t\tdocument.body.classList.remove( 'show-icon-labels' );\n\t}\n\n\tconst className = classnames( 'edit-post-layout', 'is-mode-' + mode, {\n\t\t'is-sidebar-opened': sidebarIsOpened,\n\t\t'has-fixed-toolbar': hasFixedToolbar,\n\t\t'has-metaboxes': hasActiveMetaboxes,\n\t\t'is-distraction-free': isDistractionFree && isLargeViewport,\n\t\t'is-entity-save-view-open': !! entitiesSavedStatesCallback,\n\t} );\n\n\tconst secondarySidebarLabel = isListViewOpened\n\t\t? __( 'Document Overview' )\n\t\t: __( 'Block Library' );\n\n\tconst secondarySidebar = () => {\n\t\tif ( mode === 'visual' && isInserterOpened ) {\n\t\t\treturn <InserterSidebar />;\n\t\t}\n\t\tif ( mode === 'visual' && isListViewOpened ) {\n\t\t\treturn (\n\t\t\t\t<ListViewSidebar\n\t\t\t\t\tlistViewToggleElement={ listViewToggleElement }\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\n\t\treturn null;\n\t};\n\n\tfunction onPluginAreaError( name ) {\n\t\tcreateErrorNotice(\n\t\t\tsprintf(\n\t\t\t\t/* translators: %s: plugin name */\n\t\t\t\t__(\n\t\t\t\t\t'The \"%s\" plugin has encountered an error and cannot be rendered.'\n\t\t\t\t),\n\t\t\t\tname\n\t\t\t)\n\t\t);\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<FullscreenMode isActive={ isFullscreenActive } />\n\t\t\t<BrowserURL />\n\t\t\t<UnsavedChangesWarning />\n\t\t\t<AutosaveMonitor />\n\t\t\t<LocalAutosaveMonitor />\n\t\t\t<EditPostKeyboardShortcuts />\n\t\t\t<EditorKeyboardShortcutsRegister />\n\t\t\t<EditorKeyboardShortcuts />\n\n\t\t\t<InterfaceSkeleton\n\t\t\t\tisDistractionFree={ isDistractionFree && isLargeViewport }\n\t\t\t\tclassName={ className }\n\t\t\t\tlabels={ {\n\t\t\t\t\t...interfaceLabels,\n\t\t\t\t\tsecondarySidebar: secondarySidebarLabel,\n\t\t\t\t} }\n\t\t\t\theader={\n\t\t\t\t\t<Header\n\t\t\t\t\t\tsetEntitiesSavedStatesCallback={\n\t\t\t\t\t\t\tsetEntitiesSavedStatesCallback\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsetListViewToggleElement={ setListViewToggleElement }\n\t\t\t\t\t/>\n\t\t\t\t}\n\t\t\t\teditorNotices={ <EditorNotices /> }\n\t\t\t\tsecondarySidebar={ secondarySidebar() }\n\t\t\t\tsidebar={\n\t\t\t\t\t( ! isMobileViewport || sidebarIsOpened ) && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{ ! isMobileViewport && ! sidebarIsOpened && (\n\t\t\t\t\t\t\t\t<div className=\"edit-post-layout__toggle-sidebar-panel\">\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t\tclassName=\"edit-post-layout__toggle-sidebar-panel-button\"\n\t\t\t\t\t\t\t\t\t\tonClick={ openSidebarPanel }\n\t\t\t\t\t\t\t\t\t\taria-expanded={ false }\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ hasBlockSelected\n\t\t\t\t\t\t\t\t\t\t\t? __( 'Open block settings' )\n\t\t\t\t\t\t\t\t\t\t\t: __( 'Open document settings' ) }\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t<ComplementaryArea.Slot scope=\"core/edit-post\" />\n\t\t\t\t\t\t</>\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\tnotices={ <EditorSnackbars /> }\n\t\t\t\tcontent={\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ ! isDistractionFree && <EditorNotices /> }\n\t\t\t\t\t\t{ ( mode === 'text' || ! isRichEditingEnabled ) && (\n\t\t\t\t\t\t\t<TextEditor />\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ isRichEditingEnabled && mode === 'visual' && (\n\t\t\t\t\t\t\t<VisualEditor styles={ styles } />\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ ! isDistractionFree && ! isTemplateMode && (\n\t\t\t\t\t\t\t<div className=\"edit-post-layout__metaboxes\">\n\t\t\t\t\t\t\t\t<MetaBoxes location=\"normal\" />\n\t\t\t\t\t\t\t\t<MetaBoxes location=\"advanced\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ isMobileViewport && sidebarIsOpened && (\n\t\t\t\t\t\t\t<ScrollLock />\n\t\t\t\t\t\t) }\n\t\t\t\t\t</>\n\t\t\t\t}\n\t\t\t\tfooter={\n\t\t\t\t\t! isDistractionFree &&\n\t\t\t\t\t! isMobileViewport &&\n\t\t\t\t\tshowBlockBreadcrumbs &&\n\t\t\t\t\tisRichEditingEnabled &&\n\t\t\t\t\tmode === 'visual' && (\n\t\t\t\t\t\t<div className=\"edit-post-layout__footer\">\n\t\t\t\t\t\t\t<BlockBreadcrumb rootLabelText={ documentLabel } />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\tactions={\n\t\t\t\t\t<ActionsPanel\n\t\t\t\t\t\tcloseEntitiesSavedStates={ closeEntitiesSavedStates }\n\t\t\t\t\t\tisEntitiesSavedStatesOpen={\n\t\t\t\t\t\t\tentitiesSavedStatesCallback\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsetEntitiesSavedStatesCallback={\n\t\t\t\t\t\t\tsetEntitiesSavedStatesCallback\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t}\n\t\t\t\tshortcuts={ {\n\t\t\t\t\tprevious: previousShortcut,\n\t\t\t\t\tnext: nextShortcut,\n\t\t\t\t} }\n\t\t\t/>\n\t\t\t<EditPostPreferencesModal />\n\t\t\t<KeyboardShortcutHelpModal />\n\t\t\t<WelcomeGuide />\n\t\t\t<PostSyncStatusModal />\n\t\t\t<StartPageOptions />\n\t\t\t<PluginArea onError={ onPluginAreaError } />\n\t\t\t<SettingsSidebar />\n\t\t</>\n\t);\n}\n\nexport default Layout;\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SACCC,eAAe,EACfC,oBAAoB,EACpBC,qBAAqB,EACrBC,aAAa,EACbC,+BAA+B,EAC/BC,uBAAuB,EACvBC,eAAe,EACfC,mBAAmB,EACnBC,KAAK,IAAIC,WAAW,QACd,mBAAmB;AAC1B,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SACCC,gBAAgB,EAChBC,eAAe,EACfC,WAAW,IAAIC,sBAAsB,EACrCP,KAAK,IAAIQ,gBAAgB,QACnB,yBAAyB;AAChC,SAASC,MAAM,EAAEC,UAAU,QAAQ,uBAAuB;AAC1D,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SAASC,UAAU,QAAQ,oBAAoB;AAC/C,SAASC,EAAE,EAAEC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AACjD,SACCC,iBAAiB,EACjBC,cAAc,EACdC,iBAAiB,EACjBlB,KAAK,IAAImB,cAAc,QACjB,sBAAsB;AAC7B,SAASC,QAAQ,EAAEC,SAAS,EAAEC,WAAW,EAAEC,OAAO,QAAQ,oBAAoB;AAC9E,SAASvB,KAAK,IAAIwB,sBAAsB,QAAQ,+BAA+B;AAC/E,SAASxB,KAAK,IAAIyB,YAAY,QAAQ,oBAAoB;AAE1D,SAASnB,WAAW,IAAIoB,mBAAmB,QAAQ,qBAAqB;AACxE,SAASpB,WAAW,IAAIqB,uBAAuB,QAAQ,0BAA0B;AAEjF,MAAM;EAAEC;AAAY,CAAC,GAAGC,MAAM,CAAEF,uBAAwB,CAAC;AACzD,MAAM;EAAEG;AAAkB,CAAC,GAAGD,MAAM,CA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Eb,CACF;IACD2C,MAAM,EACL,CAAE4C,iBAAiB,IACnB,CAAEnB,gBAAgB,IAClBoB,oBAAoB,IACpBX,oBAAoB,IACpBF,IAAI,KAAK,QAAQ,IAChB0C,aAAA;MAAKH,SAAS,EAAC;IAA0B,GACxCG,aAAA,CAAC1H,eAAe;MAACuI,aAAa,EAAGxC;IAAe,CAAE,CAC9C,CAEN;IACDhD,OAAO,EACN2E,aAAA,CAACpF,YAAY;MACZ2E,wBAAwB,EAAGA,wBAA0B;MACrDuB,yBAAyB,EACxB3B,2BACA;MACDC,8BAA8B,EAC7BA;IACA,CACD,CACD;IACD2B,SAAS,EAAG;MACXC,QAAQ,EAAEpD,gBAAgB;MAC1BqD,IAAI,EAAEpD;IACP;EAAG,CACH,CAAC,EACFmC,aAAA,CAAC5F,wBAAwB,MAAE,CAAC,EAC5B4F,aAAA,CAAC7F,yBAAyB,MAAE,CAAC,EAC7B6F,aAAA,CAACrF,YAAY,MAAE,CAAC,EAChBqF,aAAA,CAAChI,mBAAmB,MAAE,CAAC,EACvBgI,aAAA,CAACnF,gBAAgB,MAAE,CAAC,EACpBmF,aAAA,CAACnH,UAAU;IAACqI,OAAO,EAAGjB;EAAmB,CAAE,CAAC,EAC5CD,aAAA,CAACvF,eAAe,MAAE,CACjB,CAAC;AAEL;AAEA,eAAeqC,MAAM"}
|
|
1
|
+
{"version":3,"names":["classnames","AutosaveMonitor","LocalAutosaveMonitor","UnsavedChangesWarning","EditorNotices","EditorKeyboardShortcutsRegister","EditorKeyboardShortcuts","EditorSnackbars","PostSyncStatusModal","store","editorStore","useSelect","useDispatch","useBlockCommands","BlockBreadcrumb","BlockToolbar","privateApis","blockEditorPrivateApis","blockEditorStore","Button","ScrollLock","useViewportMatch","PluginArea","__","_x","sprintf","ComplementaryArea","FullscreenMode","InterfaceSkeleton","interfaceStore","useState","useEffect","useCallback","useMemo","keyboardShortcutsStore","noticesStore","commandsPrivateApis","coreCommandsPrivateApis","useCommands","unlock","useCommandContext","TextEditor","VisualEditor","EditPostKeyboardShortcuts","KeyboardShortcutHelpModal","EditPostPreferencesModal","BrowserURL","Header","InserterSidebar","ListViewSidebar","SettingsSidebar","MetaBoxes","WelcomeGuide","ActionsPanel","StartPageOptions","editPostStore","useCommonCommands","getLayoutStyles","interfaceLabels","header","body","sidebar","actions","footer","useEditorStyles","hasThemeStyleSupport","editorSettings","select","isFeatureActive","getEditorSettings","_editorSettings$style","_editorSettings$style2","presetStyles","styles","filter","style","__unstableType","defaultEditorStyles","hasThemeStyles","length","disableLayoutStyles","push","css","selector","hasBlockGapSupport","hasFallbackGapSupport","fallbackGapValue","Layout","isMobileViewport","isHugeViewport","isWideViewport","isLargeViewport","openGeneralSidebar","closeGeneralSidebar","setIsInserterOpened","createErrorNotice","mode","isFullscreenActive","isRichEditingEnabled","sidebarIsOpened","hasActiveMetaboxes","previousShortcut","nextShortcut","hasBlockSelected","isInserterOpened","isListViewOpened","showIconLabels","isDistractionFree","showBlockBreadcrumbs","showMetaBoxes","documentLabel","getPostTypeLabel","postTypeLabel","getRenderingMode","getActiveComplementaryArea","name","isPublishSidebarOpened","getEditorMode","richEditingEnabled","hasMetaBoxes","getAllShortcutKeyCombinations","getBlockSelectionStart","commandContext","openSidebarPanel","entitiesSavedStatesCallback","setEntitiesSavedStatesCallback","listViewToggleElement","setListViewToggleElement","closeEntitiesSavedStates","arg","document","classList","add","remove","className","secondarySidebarLabel","secondarySidebar","createElement","onPluginAreaError","Fragment","isActive","labels","editorNotices","variant","onClick","Slot","scope","notices","content","hideDragHandle","location","rootLabelText","isEntitiesSavedStatesOpen","shortcuts","previous","next","onError"],"sources":["@wordpress/edit-post/src/components/layout/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tAutosaveMonitor,\n\tLocalAutosaveMonitor,\n\tUnsavedChangesWarning,\n\tEditorNotices,\n\tEditorKeyboardShortcutsRegister,\n\tEditorKeyboardShortcuts,\n\tEditorSnackbars,\n\tPostSyncStatusModal,\n\tstore as editorStore,\n} from '@wordpress/editor';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tuseBlockCommands,\n\tBlockBreadcrumb,\n\tBlockToolbar,\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { Button, ScrollLock } from '@wordpress/components';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { PluginArea } from '@wordpress/plugins';\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport {\n\tComplementaryArea,\n\tFullscreenMode,\n\tInterfaceSkeleton,\n\tstore as interfaceStore,\n} from '@wordpress/interface';\nimport { useState, useEffect, useCallback, useMemo } from '@wordpress/element';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport { store as noticesStore } from '@wordpress/notices';\n\nimport { privateApis as commandsPrivateApis } from '@wordpress/commands';\nimport { privateApis as coreCommandsPrivateApis } from '@wordpress/core-commands';\n\nconst { useCommands } = unlock( coreCommandsPrivateApis );\nconst { useCommandContext } = unlock( commandsPrivateApis );\n\n/**\n * Internal dependencies\n */\nimport TextEditor from '../text-editor';\nimport VisualEditor from '../visual-editor';\nimport EditPostKeyboardShortcuts from '../keyboard-shortcuts';\nimport KeyboardShortcutHelpModal from '../keyboard-shortcut-help-modal';\nimport EditPostPreferencesModal from '../preferences-modal';\nimport BrowserURL from '../browser-url';\nimport Header from '../header';\nimport InserterSidebar from '../secondary-sidebar/inserter-sidebar';\nimport ListViewSidebar from '../secondary-sidebar/list-view-sidebar';\nimport SettingsSidebar from '../sidebar/settings-sidebar';\nimport MetaBoxes from '../meta-boxes';\nimport WelcomeGuide from '../welcome-guide';\nimport ActionsPanel from './actions-panel';\nimport StartPageOptions from '../start-page-options';\nimport { store as editPostStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport useCommonCommands from '../../hooks/commands/use-common-commands';\n\nconst { getLayoutStyles } = unlock( blockEditorPrivateApis );\n\nconst interfaceLabels = {\n\t/* translators: accessibility text for the editor top bar landmark region. */\n\theader: __( 'Editor top bar' ),\n\t/* translators: accessibility text for the editor content landmark region. */\n\tbody: __( 'Editor content' ),\n\t/* translators: accessibility text for the editor settings landmark region. */\n\tsidebar: __( 'Editor settings' ),\n\t/* translators: accessibility text for the editor publish landmark region. */\n\tactions: __( 'Editor publish' ),\n\t/* translators: accessibility text for the editor footer landmark region. */\n\tfooter: __( 'Editor footer' ),\n};\n\nfunction useEditorStyles() {\n\tconst { hasThemeStyleSupport, editorSettings } = useSelect(\n\t\t( select ) => ( {\n\t\t\thasThemeStyleSupport:\n\t\t\t\tselect( editPostStore ).isFeatureActive( 'themeStyles' ),\n\t\t\teditorSettings: select( editorStore ).getEditorSettings(),\n\t\t} ),\n\t\t[]\n\t);\n\n\t// Compute the default styles.\n\treturn useMemo( () => {\n\t\tconst presetStyles =\n\t\t\teditorSettings.styles?.filter(\n\t\t\t\t( style ) =>\n\t\t\t\t\tstyle.__unstableType && style.__unstableType !== 'theme'\n\t\t\t) ?? [];\n\n\t\tconst defaultEditorStyles = [\n\t\t\t...editorSettings.defaultEditorStyles,\n\t\t\t...presetStyles,\n\t\t];\n\n\t\t// Has theme styles if the theme supports them and if some styles were not preset styles (in which case they're theme styles).\n\t\tconst hasThemeStyles =\n\t\t\thasThemeStyleSupport &&\n\t\t\tpresetStyles.length !== ( editorSettings.styles?.length ?? 0 );\n\n\t\t// If theme styles are not present or displayed, ensure that\n\t\t// base layout styles are still present in the editor.\n\t\tif ( ! editorSettings.disableLayoutStyles && ! hasThemeStyles ) {\n\t\t\tdefaultEditorStyles.push( {\n\t\t\t\tcss: getLayoutStyles( {\n\t\t\t\t\tstyle: {},\n\t\t\t\t\tselector: 'body',\n\t\t\t\t\thasBlockGapSupport: false,\n\t\t\t\t\thasFallbackGapSupport: true,\n\t\t\t\t\tfallbackGapValue: '0.5em',\n\t\t\t\t} ),\n\t\t\t} );\n\t\t}\n\n\t\treturn hasThemeStyles ? editorSettings.styles : defaultEditorStyles;\n\t}, [\n\t\teditorSettings.defaultEditorStyles,\n\t\teditorSettings.disableLayoutStyles,\n\t\teditorSettings.styles,\n\t\thasThemeStyleSupport,\n\t] );\n}\n\nfunction Layout() {\n\tuseCommands();\n\tuseCommonCommands();\n\tuseBlockCommands();\n\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst isHugeViewport = useViewportMatch( 'huge', '>=' );\n\tconst isWideViewport = useViewportMatch( 'large' );\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\n\tconst { openGeneralSidebar, closeGeneralSidebar, setIsInserterOpened } =\n\t\tuseDispatch( editPostStore );\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\tconst {\n\t\tmode,\n\t\tisFullscreenActive,\n\t\tisRichEditingEnabled,\n\t\tsidebarIsOpened,\n\t\thasActiveMetaboxes,\n\t\tpreviousShortcut,\n\t\tnextShortcut,\n\t\thasBlockSelected,\n\t\tisInserterOpened,\n\t\tisListViewOpened,\n\t\tshowIconLabels,\n\t\tisDistractionFree,\n\t\tshowBlockBreadcrumbs,\n\t\tshowMetaBoxes,\n\t\tdocumentLabel,\n\t} = useSelect( ( select ) => {\n\t\tconst { getEditorSettings, getPostTypeLabel } = select( editorStore );\n\t\tconst editorSettings = getEditorSettings();\n\t\tconst postTypeLabel = getPostTypeLabel();\n\n\t\treturn {\n\t\t\tshowMetaBoxes:\n\t\t\t\tselect( editorStore ).getRenderingMode() === 'post-only',\n\t\t\tsidebarIsOpened: !! (\n\t\t\t\tselect( interfaceStore ).getActiveComplementaryArea(\n\t\t\t\t\teditPostStore.name\n\t\t\t\t) || select( editPostStore ).isPublishSidebarOpened()\n\t\t\t),\n\t\t\tisFullscreenActive:\n\t\t\t\tselect( editPostStore ).isFeatureActive( 'fullscreenMode' ),\n\t\t\tisInserterOpened: select( editPostStore ).isInserterOpened(),\n\t\t\tisListViewOpened: select( editPostStore ).isListViewOpened(),\n\t\t\tmode: select( editPostStore ).getEditorMode(),\n\t\t\tisRichEditingEnabled: editorSettings.richEditingEnabled,\n\t\t\thasActiveMetaboxes: select( editPostStore ).hasMetaBoxes(),\n\t\t\tpreviousShortcut: select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getAllShortcutKeyCombinations( 'core/edit-post/previous-region' ),\n\t\t\tnextShortcut: select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getAllShortcutKeyCombinations( 'core/edit-post/next-region' ),\n\t\t\tshowIconLabels:\n\t\t\t\tselect( editPostStore ).isFeatureActive( 'showIconLabels' ),\n\t\t\tisDistractionFree:\n\t\t\t\tselect( editPostStore ).isFeatureActive( 'distractionFree' ),\n\t\t\tshowBlockBreadcrumbs: select( editPostStore ).isFeatureActive(\n\t\t\t\t'showBlockBreadcrumbs'\n\t\t\t),\n\t\t\t// translators: Default label for the Document in the Block Breadcrumb.\n\t\t\tdocumentLabel: postTypeLabel || _x( 'Document', 'noun' ),\n\t\t\thasBlockSelected:\n\t\t\t\tselect( blockEditorStore ).getBlockSelectionStart(),\n\t\t};\n\t}, [] );\n\n\t// Set the right context for the command palette\n\tconst commandContext = hasBlockSelected\n\t\t? 'block-selection-edit'\n\t\t: 'post-editor-edit';\n\tuseCommandContext( commandContext );\n\n\tconst styles = useEditorStyles();\n\n\tconst openSidebarPanel = () =>\n\t\topenGeneralSidebar(\n\t\t\thasBlockSelected ? 'edit-post/block' : 'edit-post/document'\n\t\t);\n\n\t// Inserter and Sidebars are mutually exclusive\n\tuseEffect( () => {\n\t\tif ( sidebarIsOpened && ! isHugeViewport ) {\n\t\t\tsetIsInserterOpened( false );\n\t\t}\n\t}, [ isHugeViewport, setIsInserterOpened, sidebarIsOpened ] );\n\tuseEffect( () => {\n\t\tif ( isInserterOpened && ! isHugeViewport ) {\n\t\t\tcloseGeneralSidebar();\n\t\t}\n\t}, [ closeGeneralSidebar, isInserterOpened, isHugeViewport ] );\n\n\t// Local state for save panel.\n\t// Note 'truthy' callback implies an open panel.\n\tconst [ entitiesSavedStatesCallback, setEntitiesSavedStatesCallback ] =\n\t\tuseState( false );\n\n\tconst [ listViewToggleElement, setListViewToggleElement ] =\n\t\tuseState( null );\n\n\tconst closeEntitiesSavedStates = useCallback(\n\t\t( arg ) => {\n\t\t\tif ( typeof entitiesSavedStatesCallback === 'function' ) {\n\t\t\t\tentitiesSavedStatesCallback( arg );\n\t\t\t}\n\t\t\tsetEntitiesSavedStatesCallback( false );\n\t\t},\n\t\t[ entitiesSavedStatesCallback ]\n\t);\n\n\t// We need to add the show-icon-labels class to the body element so it is applied to modals.\n\tif ( showIconLabels ) {\n\t\tdocument.body.classList.add( 'show-icon-labels' );\n\t} else {\n\t\tdocument.body.classList.remove( 'show-icon-labels' );\n\t}\n\n\tconst className = classnames( 'edit-post-layout', 'is-mode-' + mode, {\n\t\t'is-sidebar-opened': sidebarIsOpened,\n\t\t'has-metaboxes': hasActiveMetaboxes,\n\t\t'is-distraction-free': isDistractionFree && isWideViewport,\n\t\t'is-entity-save-view-open': !! entitiesSavedStatesCallback,\n\t} );\n\n\tconst secondarySidebarLabel = isListViewOpened\n\t\t? __( 'Document Overview' )\n\t\t: __( 'Block Library' );\n\n\tconst secondarySidebar = () => {\n\t\tif ( mode === 'visual' && isInserterOpened ) {\n\t\t\treturn <InserterSidebar />;\n\t\t}\n\t\tif ( mode === 'visual' && isListViewOpened ) {\n\t\t\treturn (\n\t\t\t\t<ListViewSidebar\n\t\t\t\t\tlistViewToggleElement={ listViewToggleElement }\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\n\t\treturn null;\n\t};\n\n\tfunction onPluginAreaError( name ) {\n\t\tcreateErrorNotice(\n\t\t\tsprintf(\n\t\t\t\t/* translators: %s: plugin name */\n\t\t\t\t__(\n\t\t\t\t\t'The \"%s\" plugin has encountered an error and cannot be rendered.'\n\t\t\t\t),\n\t\t\t\tname\n\t\t\t)\n\t\t);\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<FullscreenMode isActive={ isFullscreenActive } />\n\t\t\t<BrowserURL />\n\t\t\t<UnsavedChangesWarning />\n\t\t\t<AutosaveMonitor />\n\t\t\t<LocalAutosaveMonitor />\n\t\t\t<EditPostKeyboardShortcuts />\n\t\t\t<EditorKeyboardShortcutsRegister />\n\t\t\t<EditorKeyboardShortcuts />\n\n\t\t\t<InterfaceSkeleton\n\t\t\t\tisDistractionFree={ isDistractionFree && isWideViewport }\n\t\t\t\tclassName={ className }\n\t\t\t\tlabels={ {\n\t\t\t\t\t...interfaceLabels,\n\t\t\t\t\tsecondarySidebar: secondarySidebarLabel,\n\t\t\t\t} }\n\t\t\t\theader={\n\t\t\t\t\t<Header\n\t\t\t\t\t\tsetEntitiesSavedStatesCallback={\n\t\t\t\t\t\t\tsetEntitiesSavedStatesCallback\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsetListViewToggleElement={ setListViewToggleElement }\n\t\t\t\t\t/>\n\t\t\t\t}\n\t\t\t\teditorNotices={ <EditorNotices /> }\n\t\t\t\tsecondarySidebar={ secondarySidebar() }\n\t\t\t\tsidebar={\n\t\t\t\t\t( ! isMobileViewport || sidebarIsOpened ) && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{ ! isMobileViewport && ! sidebarIsOpened && (\n\t\t\t\t\t\t\t\t<div className=\"edit-post-layout__toggle-sidebar-panel\">\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t\tclassName=\"edit-post-layout__toggle-sidebar-panel-button\"\n\t\t\t\t\t\t\t\t\t\tonClick={ openSidebarPanel }\n\t\t\t\t\t\t\t\t\t\taria-expanded={ false }\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ hasBlockSelected\n\t\t\t\t\t\t\t\t\t\t\t? __( 'Open block settings' )\n\t\t\t\t\t\t\t\t\t\t\t: __( 'Open document settings' ) }\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t<ComplementaryArea.Slot scope=\"core/edit-post\" />\n\t\t\t\t\t\t</>\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\tnotices={ <EditorSnackbars /> }\n\t\t\t\tcontent={\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ ! isDistractionFree && <EditorNotices /> }\n\t\t\t\t\t\t{ ( mode === 'text' || ! isRichEditingEnabled ) && (\n\t\t\t\t\t\t\t<TextEditor />\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ ! isLargeViewport && <BlockToolbar hideDragHandle /> }\n\t\t\t\t\t\t{ isRichEditingEnabled && mode === 'visual' && (\n\t\t\t\t\t\t\t<VisualEditor styles={ styles } />\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ ! isDistractionFree && showMetaBoxes && (\n\t\t\t\t\t\t\t<div className=\"edit-post-layout__metaboxes\">\n\t\t\t\t\t\t\t\t<MetaBoxes location=\"normal\" />\n\t\t\t\t\t\t\t\t<MetaBoxes location=\"advanced\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ isMobileViewport && sidebarIsOpened && (\n\t\t\t\t\t\t\t<ScrollLock />\n\t\t\t\t\t\t) }\n\t\t\t\t\t</>\n\t\t\t\t}\n\t\t\t\tfooter={\n\t\t\t\t\t! isDistractionFree &&\n\t\t\t\t\t! isMobileViewport &&\n\t\t\t\t\tshowBlockBreadcrumbs &&\n\t\t\t\t\tisRichEditingEnabled &&\n\t\t\t\t\tmode === 'visual' && (\n\t\t\t\t\t\t<div className=\"edit-post-layout__footer\">\n\t\t\t\t\t\t\t<BlockBreadcrumb rootLabelText={ documentLabel } />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\tactions={\n\t\t\t\t\t<ActionsPanel\n\t\t\t\t\t\tcloseEntitiesSavedStates={ closeEntitiesSavedStates }\n\t\t\t\t\t\tisEntitiesSavedStatesOpen={\n\t\t\t\t\t\t\tentitiesSavedStatesCallback\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsetEntitiesSavedStatesCallback={\n\t\t\t\t\t\t\tsetEntitiesSavedStatesCallback\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t}\n\t\t\t\tshortcuts={ {\n\t\t\t\t\tprevious: previousShortcut,\n\t\t\t\t\tnext: nextShortcut,\n\t\t\t\t} }\n\t\t\t/>\n\t\t\t<EditPostPreferencesModal />\n\t\t\t<KeyboardShortcutHelpModal />\n\t\t\t<WelcomeGuide />\n\t\t\t<PostSyncStatusModal />\n\t\t\t<StartPageOptions />\n\t\t\t<PluginArea onError={ onPluginAreaError } />\n\t\t\t<SettingsSidebar />\n\t\t</>\n\t);\n}\n\nexport default Layout;\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SACCC,eAAe,EACfC,oBAAoB,EACpBC,qBAAqB,EACrBC,aAAa,EACbC,+BAA+B,EAC/BC,uBAAuB,EACvBC,eAAe,EACfC,mBAAmB,EACnBC,KAAK,IAAIC,WAAW,QACd,mBAAmB;AAC1B,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SACCC,gBAAgB,EAChBC,eAAe,EACfC,YAAY,EACZC,WAAW,IAAIC,sBAAsB,EACrCR,KAAK,IAAIS,gBAAgB,QACnB,yBAAyB;AAChC,SAASC,MAAM,EAAEC,UAAU,QAAQ,uBAAuB;AAC1D,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SAASC,UAAU,QAAQ,oBAAoB;AAC/C,SAASC,EAAE,EAAEC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AACjD,SACCC,iBAAiB,EACjBC,cAAc,EACdC,iBAAiB,EACjBnB,KAAK,IAAIoB,cAAc,QACjB,sBAAsB;AAC7B,SAASC,QAAQ,EAAEC,SAAS,EAAEC,WAAW,EAAEC,OAAO,QAAQ,o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