@wordpress/edit-post 7.34.0 → 7.35.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 +8 -2
- package/build/components/header/fullscreen-mode-close/index.js +2 -2
- package/build/components/header/fullscreen-mode-close/index.js.map +1 -1
- package/build/components/header/index.js +7 -96
- package/build/components/header/index.js.map +1 -1
- package/build/components/header/more-menu/manage-patterns-menu-item.js +1 -1
- package/build/components/header/more-menu/manage-patterns-menu-item.js.map +1 -1
- package/build/components/layout/index.js +56 -24
- package/build/components/layout/index.js.map +1 -1
- package/build/components/meta-boxes/meta-boxes-area/index.js +2 -2
- package/build/components/meta-boxes/meta-boxes-area/index.js.map +1 -1
- package/build/components/visual-editor/index.js +11 -5
- package/build/components/visual-editor/index.js.map +1 -1
- package/build/components/visual-editor/use-padding-appender.js +6 -1
- package/build/components/visual-editor/use-padding-appender.js.map +1 -1
- package/build-module/components/header/fullscreen-mode-close/index.js +2 -2
- package/build-module/components/header/fullscreen-mode-close/index.js.map +1 -1
- package/build-module/components/header/index.js +8 -97
- package/build-module/components/header/index.js.map +1 -1
- package/build-module/components/header/more-menu/manage-patterns-menu-item.js +1 -1
- package/build-module/components/header/more-menu/manage-patterns-menu-item.js.map +1 -1
- package/build-module/components/layout/index.js +57 -25
- package/build-module/components/layout/index.js.map +1 -1
- package/build-module/components/meta-boxes/meta-boxes-area/index.js +2 -2
- package/build-module/components/meta-boxes/meta-boxes-area/index.js.map +1 -1
- package/build-module/components/visual-editor/index.js +11 -5
- package/build-module/components/visual-editor/index.js.map +1 -1
- package/build-module/components/visual-editor/use-padding-appender.js +6 -1
- package/build-module/components/visual-editor/use-padding-appender.js.map +1 -1
- package/build-style/style-rtl.css +8 -268
- package/build-style/style.css +8 -268
- package/package.json +32 -32
- package/src/components/header/fullscreen-mode-close/index.js +2 -2
- package/src/components/header/index.js +9 -112
- package/src/components/header/more-menu/manage-patterns-menu-item.js +1 -1
- package/src/components/header/style.scss +4 -241
- package/src/components/layout/index.js +72 -19
- package/src/components/meta-boxes/meta-boxes-area/index.js +4 -8
- package/src/components/visual-editor/index.js +11 -4
- package/src/components/visual-editor/use-padding-appender.js +7 -1
- package/src/style.scss +1 -5
- package/build/components/sidebar/post-format/index.js +0 -21
- package/build/components/sidebar/post-format/index.js.map +0 -1
- package/build/components/sidebar/post-pending-status/index.js +0 -26
- package/build/components/sidebar/post-pending-status/index.js.map +0 -1
- package/build/components/sidebar/post-slug/index.js +0 -21
- package/build/components/sidebar/post-slug/index.js.map +0 -1
- package/build/components/sidebar/post-status/index.js +0 -92
- package/build/components/sidebar/post-status/index.js.map +0 -1
- package/build/components/sidebar/post-sticky/index.js +0 -26
- package/build/components/sidebar/post-sticky/index.js.map +0 -1
- package/build/components/sidebar/post-trash/index.js +0 -16
- package/build/components/sidebar/post-trash/index.js.map +0 -1
- package/build/components/sidebar/post-visibility/index.js +0 -78
- package/build/components/sidebar/post-visibility/index.js.map +0 -1
- package/build/components/sidebar/settings-header/index.js +0 -53
- package/build/components/sidebar/settings-header/index.js.map +0 -1
- package/build/components/sidebar/settings-sidebar/index.js +0 -193
- package/build/components/sidebar/settings-sidebar/index.js.map +0 -1
- package/build-module/components/sidebar/post-format/index.js +0 -13
- package/build-module/components/sidebar/post-format/index.js.map +0 -1
- package/build-module/components/sidebar/post-pending-status/index.js +0 -18
- package/build-module/components/sidebar/post-pending-status/index.js.map +0 -1
- package/build-module/components/sidebar/post-slug/index.js +0 -13
- package/build-module/components/sidebar/post-slug/index.js.map +0 -1
- package/build-module/components/sidebar/post-status/index.js +0 -84
- package/build-module/components/sidebar/post-status/index.js.map +0 -1
- package/build-module/components/sidebar/post-sticky/index.js +0 -18
- package/build-module/components/sidebar/post-sticky/index.js.map +0 -1
- package/build-module/components/sidebar/post-trash/index.js +0 -9
- package/build-module/components/sidebar/post-trash/index.js.map +0 -1
- package/build-module/components/sidebar/post-visibility/index.js +0 -70
- package/build-module/components/sidebar/post-visibility/index.js.map +0 -1
- package/build-module/components/sidebar/settings-header/index.js +0 -46
- package/build-module/components/sidebar/settings-header/index.js.map +0 -1
- package/build-module/components/sidebar/settings-sidebar/index.js +0 -185
- package/build-module/components/sidebar/settings-sidebar/index.js.map +0 -1
- package/src/components/sidebar/post-format/index.js +0 -20
- package/src/components/sidebar/post-format/style.scss +0 -5
- package/src/components/sidebar/post-pending-status/index.js +0 -27
- package/src/components/sidebar/post-slug/index.js +0 -17
- package/src/components/sidebar/post-slug/style.scss +0 -5
- package/src/components/sidebar/post-status/index.js +0 -128
- package/src/components/sidebar/post-sticky/index.js +0 -27
- package/src/components/sidebar/post-trash/index.js +0 -12
- package/src/components/sidebar/post-visibility/index.js +0 -88
- package/src/components/sidebar/post-visibility/style.scss +0 -5
- package/src/components/sidebar/settings-header/index.js +0 -49
- package/src/components/sidebar/settings-sidebar/index.js +0 -247
- package/src/components/sidebar/style.scss +0 -18
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["classnames","AutosaveMonitor","LocalAutosaveMonitor","UnsavedChangesWarning","EditorNotices","EditorKeyboardShortcutsRegister","EditorKeyboardShortcuts","EditorSnackbars","store","editorStore","privateApis","editorPrivateApis","useSelect","useDispatch","BlockBreadcrumb","BlockToolbar","blockEditorPrivateApis","blockEditorStore","ScrollLock","useViewportMatch","PluginArea","__","_x","sprintf","useState","useEffect","useCallback","useMemo","keyboardShortcutsStore","noticesStore","preferencesStore","commandsPrivateApis","coreCommandsPrivateApis","blockLibraryPrivateApis","TextEditor","VisualEditor","EditPostKeyboardShortcuts","InitPatternModal","BrowserURL","Header","SettingsSidebar","MetaBoxes","WelcomeGuide","editPostStore","unlock","useCommonCommands","getLayoutStyles","useCommands","useCommandContext","InserterSidebar","ListViewSidebar","ComplementaryArea","FullscreenMode","SavePublishPanels","InterfaceSkeleton","interfaceStore","BlockKeyboardShortcuts","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","initialPost","isMobileViewport","isHugeViewport","isWideViewport","isLargeViewport","closeGeneralSidebar","createErrorNotice","setIsInserterOpened","mode","isFullscreenActive","isRichEditingEnabled","sidebarIsOpened","hasActiveMetaboxes","previousShortcut","nextShortcut","hasBlockSelected","isInserterOpened","isListViewOpened","showIconLabels","isDistractionFree","showBlockBreadcrumbs","showMetaBoxes","documentLabel","hasHistory","hasBlockBreadcrumbs","get","getPostTypeLabel","postTypeLabel","getRenderingMode","getActiveComplementaryArea","isPublishSidebarOpened","getEditorMode","richEditingEnabled","hasMetaBoxes","getAllShortcutKeyCombinations","getBlockSelectionStart","onNavigateToPreviousEntityRecord","commandContext","entitiesSavedStatesCallback","setEntitiesSavedStatesCallback","closeEntitiesSavedStates","arg","document","classList","add","remove","className","secondarySidebarLabel","secondarySidebar","createElement","isRightSidebarOpen","onPluginAreaError","name","Fragment","isActive","labels","editorNotices","Slot","scope","notices","content","hideDragHandle","location","rootLabelText","isEntitiesSavedStatesOpen","forceIsDirtyPublishPanel","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\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tBlockBreadcrumb,\n\tBlockToolbar,\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { ScrollLock } from '@wordpress/components';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { PluginArea } from '@wordpress/plugins';\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport { useState, useEffect, useCallback, useMemo } from '@wordpress/element';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { privateApis as commandsPrivateApis } from '@wordpress/commands';\nimport { privateApis as coreCommandsPrivateApis } from '@wordpress/core-commands';\nimport { privateApis as blockLibraryPrivateApis } from '@wordpress/block-library';\n\n/**\n * Internal dependencies\n */\nimport TextEditor from '../text-editor';\nimport VisualEditor from '../visual-editor';\nimport EditPostKeyboardShortcuts from '../keyboard-shortcuts';\nimport InitPatternModal from '../init-pattern-modal';\nimport BrowserURL from '../browser-url';\nimport Header from '../header';\nimport SettingsSidebar from '../sidebar/settings-sidebar';\nimport MetaBoxes from '../meta-boxes';\nimport WelcomeGuide from '../welcome-guide';\nimport { store as editPostStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport useCommonCommands from '../../hooks/commands/use-common-commands';\n\nconst { getLayoutStyles } = unlock( blockEditorPrivateApis );\nconst { useCommands } = unlock( coreCommandsPrivateApis );\nconst { useCommandContext } = unlock( commandsPrivateApis );\nconst {\n\tInserterSidebar,\n\tListViewSidebar,\n\tComplementaryArea,\n\tFullscreenMode,\n\tSavePublishPanels,\n\tInterfaceSkeleton,\n\tinterfaceStore,\n} = unlock( editorPrivateApis );\nconst { BlockKeyboardShortcuts } = unlock( blockLibraryPrivateApis );\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( { initialPost } ) {\n\tuseCommands();\n\tuseCommonCommands();\n\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst isHugeViewport = useViewportMatch( 'huge', '>=' );\n\tconst isWideViewport = useViewportMatch( 'large' );\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\n\tconst { closeGeneralSidebar } = useDispatch( editPostStore );\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\tconst { setIsInserterOpened } = useDispatch( editorStore );\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\thasHistory,\n\t\thasBlockBreadcrumbs,\n\t} = useSelect( ( select ) => {\n\t\tconst { get } = select( preferencesStore );\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( 'core' ) ||\n\t\t\t\tselect( editorStore ).isPublishSidebarOpened()\n\t\t\t),\n\t\t\tisFullscreenActive:\n\t\t\t\tselect( editPostStore ).isFeatureActive( 'fullscreenMode' ),\n\t\t\tisInserterOpened: select( editorStore ).isInserterOpened(),\n\t\t\tisListViewOpened: select( editorStore ).isListViewOpened(),\n\t\t\tmode: select( editorStore ).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/editor/previous-region' ),\n\t\t\tnextShortcut: select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getAllShortcutKeyCombinations( 'core/editor/next-region' ),\n\t\t\tshowIconLabels: get( 'core', 'showIconLabels' ),\n\t\t\tisDistractionFree: get( 'core', 'distractionFree' ),\n\t\t\tshowBlockBreadcrumbs: get( 'core', 'showBlockBreadcrumbs' ),\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\t!! select( blockEditorStore ).getBlockSelectionStart(),\n\t\t\thasHistory: !! getEditorSettings().onNavigateToPreviousEntityRecord,\n\t\t\thasBlockBreadcrumbs: get( 'core', 'showBlockBreadcrumbs' ),\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\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 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\t'has-block-breadcrumbs':\n\t\t\thasBlockBreadcrumbs && ! isDistractionFree && isWideViewport,\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 (\n\t\t\t\t<InserterSidebar\n\t\t\t\t\tcloseGeneralSidebar={ closeGeneralSidebar }\n\t\t\t\t\tisRightSidebarOpen={ sidebarIsOpened }\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\t\tif ( mode === 'visual' && isListViewOpened ) {\n\t\t\treturn <ListViewSidebar />;\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 hasHistory={ hasHistory } />\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\t\t\t<BlockKeyboardShortcuts />\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\tinitialPost={ initialPost }\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! isDistractionFree && (\n\t\t\t\t\t\t<ComplementaryArea.Slot scope=\"core\" />\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<SavePublishPanels\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\tforceIsDirtyPublishPanel={ hasActiveMetaboxes }\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<WelcomeGuide />\n\t\t\t<InitPatternModal />\n\t\t\t<PluginArea onError={ onPluginAreaError } />\n\t\t\t{ ! isDistractionFree && <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,KAAK,IAAIC,WAAW,EACpBC,WAAW,IAAIC,iBAAiB,QAC1B,mBAAmB;AAC1B,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SACCC,eA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AChB8F,aAAA,CAACnG,gBAAgB,MAAE,CAAC,EACpBmG,aAAA,CAACpH,UAAU;IAACwI,OAAO,EAAGlB;EAAmB,CAAE,CAAC,EAC1C,CAAEhC,iBAAiB,IAAI8B,aAAA,CAAChG,eAAe,MAAE,CAC1C,CAAC;AAEL;AAEA,eAAe8C,MAAM","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["clsx","AutosaveMonitor","LocalAutosaveMonitor","UnsavedChangesWarning","EditorNotices","EditorKeyboardShortcutsRegister","EditorKeyboardShortcuts","EditorSnackbars","store","editorStore","privateApis","editorPrivateApis","useSelect","useDispatch","BlockBreadcrumb","BlockToolbar","blockEditorPrivateApis","blockEditorStore","ScrollLock","useViewportMatch","PluginArea","__","_x","sprintf","useState","useCallback","useMemo","keyboardShortcutsStore","noticesStore","preferencesStore","commandsPrivateApis","coreCommandsPrivateApis","blockLibraryPrivateApis","addQueryArgs","TextEditor","VisualEditor","EditPostKeyboardShortcuts","InitPatternModal","BrowserURL","Header","MetaBoxes","WelcomeGuide","editPostStore","unlock","useCommonCommands","getLayoutStyles","useCommands","useCommandContext","InserterSidebar","ListViewSidebar","ComplementaryArea","FullscreenMode","SavePublishPanels","InterfaceSkeleton","interfaceStore","Sidebar","BlockKeyboardShortcuts","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","initialPost","isMobileViewport","isWideViewport","isLargeViewport","closeGeneralSidebar","createErrorNotice","mode","isFullscreenActive","isRichEditingEnabled","sidebarIsOpened","hasActiveMetaboxes","previousShortcut","nextShortcut","hasBlockSelected","isInserterOpened","isListViewOpened","showIconLabels","isDistractionFree","showBlockBreadcrumbs","showMetaBoxes","documentLabel","hasHistory","hasBlockBreadcrumbs","blockEditorMode","isEditingTemplate","get","getPostTypeLabel","postTypeLabel","getRenderingMode","getActiveComplementaryArea","isPublishSidebarOpened","getEditorMode","richEditingEnabled","hasMetaBoxes","getAllShortcutKeyCombinations","getBlockSelectionStart","onNavigateToPreviousEntityRecord","__unstableGetEditorMode","getCurrentPostType","commandContext","entitiesSavedStatesCallback","setEntitiesSavedStatesCallback","closeEntitiesSavedStates","arg","document","classList","add","remove","className","secondarySidebarLabel","secondarySidebar","createElement","isRightSidebarOpen","onPluginAreaError","name","createSuccessNotice","onActionPerformed","actionId","items","location","href","trashed","post_type","type","ids","id","newItem","title","rendered","label","onClick","postId","post","action","Fragment","isActive","labels","editorNotices","Slot","scope","notices","content","hideDragHandle","rootLabelText","isEntitiesSavedStatesOpen","forceIsDirtyPublishPanel","shortcuts","previous","next","onError","extraPanels"],"sources":["@wordpress/edit-post/src/components/layout/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tAutosaveMonitor,\n\tLocalAutosaveMonitor,\n\tUnsavedChangesWarning,\n\tEditorNotices,\n\tEditorKeyboardShortcutsRegister,\n\tEditorKeyboardShortcuts,\n\tEditorSnackbars,\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tBlockBreadcrumb,\n\tBlockToolbar,\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { ScrollLock } from '@wordpress/components';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { PluginArea } from '@wordpress/plugins';\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport { useState, useCallback, useMemo } from '@wordpress/element';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { privateApis as commandsPrivateApis } from '@wordpress/commands';\nimport { privateApis as coreCommandsPrivateApis } from '@wordpress/core-commands';\nimport { privateApis as blockLibraryPrivateApis } from '@wordpress/block-library';\nimport { addQueryArgs } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport TextEditor from '../text-editor';\nimport VisualEditor from '../visual-editor';\nimport EditPostKeyboardShortcuts from '../keyboard-shortcuts';\nimport InitPatternModal from '../init-pattern-modal';\nimport BrowserURL from '../browser-url';\nimport Header from '../header';\nimport MetaBoxes from '../meta-boxes';\nimport WelcomeGuide from '../welcome-guide';\nimport { store as editPostStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport useCommonCommands from '../../hooks/commands/use-common-commands';\n\nconst { getLayoutStyles } = unlock( blockEditorPrivateApis );\nconst { useCommands } = unlock( coreCommandsPrivateApis );\nconst { useCommandContext } = unlock( commandsPrivateApis );\nconst {\n\tInserterSidebar,\n\tListViewSidebar,\n\tComplementaryArea,\n\tFullscreenMode,\n\tSavePublishPanels,\n\tInterfaceSkeleton,\n\tinterfaceStore,\n\tSidebar,\n} = unlock( editorPrivateApis );\nconst { BlockKeyboardShortcuts } = unlock( blockLibraryPrivateApis );\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( { initialPost } ) {\n\tuseCommands();\n\tuseCommonCommands();\n\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst isWideViewport = useViewportMatch( 'large' );\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\n\tconst { closeGeneralSidebar } = useDispatch( 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\thasHistory,\n\t\thasBlockBreadcrumbs,\n\t\tblockEditorMode,\n\t\tisEditingTemplate,\n\t} = useSelect( ( select ) => {\n\t\tconst { get } = select( preferencesStore );\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( 'core' ) ||\n\t\t\t\tselect( editorStore ).isPublishSidebarOpened()\n\t\t\t),\n\t\t\tisFullscreenActive:\n\t\t\t\tselect( editPostStore ).isFeatureActive( 'fullscreenMode' ),\n\t\t\tisInserterOpened: select( editorStore ).isInserterOpened(),\n\t\t\tisListViewOpened: select( editorStore ).isListViewOpened(),\n\t\t\tmode: select( editorStore ).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/editor/previous-region' ),\n\t\t\tnextShortcut: select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getAllShortcutKeyCombinations( 'core/editor/next-region' ),\n\t\t\tshowIconLabels: get( 'core', 'showIconLabels' ),\n\t\t\tisDistractionFree: get( 'core', 'distractionFree' ),\n\t\t\tshowBlockBreadcrumbs: get( 'core', 'showBlockBreadcrumbs' ),\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\t!! select( blockEditorStore ).getBlockSelectionStart(),\n\t\t\thasHistory: !! getEditorSettings().onNavigateToPreviousEntityRecord,\n\t\t\thasBlockBreadcrumbs: get( 'core', 'showBlockBreadcrumbs' ),\n\t\t\tblockEditorMode:\n\t\t\t\tselect( blockEditorStore ).__unstableGetEditorMode(),\n\t\t\tisEditingTemplate:\n\t\t\t\tselect( editorStore ).getCurrentPostType() === 'wp_template',\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\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 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 = clsx( '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\t'has-block-breadcrumbs':\n\t\t\thasBlockBreadcrumbs && ! isDistractionFree && isWideViewport,\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 (\n\t\t\t\t<InserterSidebar\n\t\t\t\t\tcloseGeneralSidebar={ closeGeneralSidebar }\n\t\t\t\t\tisRightSidebarOpen={ sidebarIsOpened }\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\t\tif ( mode === 'visual' && isListViewOpened ) {\n\t\t\treturn <ListViewSidebar />;\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\tconst { createSuccessNotice } = useDispatch( noticesStore );\n\n\tconst onActionPerformed = useCallback(\n\t\t( actionId, items ) => {\n\t\t\tswitch ( actionId ) {\n\t\t\t\tcase 'move-to-trash':\n\t\t\t\t\t{\n\t\t\t\t\t\tdocument.location.href = addQueryArgs( 'edit.php', {\n\t\t\t\t\t\t\ttrashed: 1,\n\t\t\t\t\t\t\tpost_type: items[ 0 ].type,\n\t\t\t\t\t\t\tids: items[ 0 ].id,\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'duplicate-post':\n\t\t\t\t\t{\n\t\t\t\t\t\tconst newItem = items[ 0 ];\n\t\t\t\t\t\tconst title =\n\t\t\t\t\t\t\ttypeof newItem.title === 'string'\n\t\t\t\t\t\t\t\t? newItem.title\n\t\t\t\t\t\t\t\t: newItem.title?.rendered;\n\t\t\t\t\t\tcreateSuccessNotice(\n\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t// translators: %s: Title of the created post e.g: \"Post 1\".\n\t\t\t\t\t\t\t\t__( '\"%s\" successfully created.' ),\n\t\t\t\t\t\t\t\ttitle\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t\t\t\tid: 'duplicate-post-action',\n\t\t\t\t\t\t\t\tactions: [\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tlabel: __( 'Edit' ),\n\t\t\t\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\t\t\t\tconst postId = newItem.id;\n\t\t\t\t\t\t\t\t\t\t\tdocument.location.href =\n\t\t\t\t\t\t\t\t\t\t\t\taddQueryArgs( 'post.php', {\n\t\t\t\t\t\t\t\t\t\t\t\t\tpost: postId,\n\t\t\t\t\t\t\t\t\t\t\t\t\taction: 'edit',\n\t\t\t\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\t\t\t},\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);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t},\n\t\t[ createSuccessNotice ]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<FullscreenMode isActive={ isFullscreenActive } />\n\t\t\t<BrowserURL hasHistory={ hasHistory } />\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\t\t\t<BlockKeyboardShortcuts />\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\tinitialPost={ initialPost }\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! isDistractionFree && (\n\t\t\t\t\t\t<ComplementaryArea.Slot scope=\"core\" />\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\tblockEditorMode !== 'zoom-out' &&\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<SavePublishPanels\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\tforceIsDirtyPublishPanel={ hasActiveMetaboxes }\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<WelcomeGuide />\n\t\t\t<InitPatternModal />\n\t\t\t<PluginArea onError={ onPluginAreaError } />\n\t\t\t{ ! isDistractionFree && (\n\t\t\t\t<Sidebar\n\t\t\t\t\tonActionPerformed={ onActionPerformed }\n\t\t\t\t\textraPanels={\n\t\t\t\t\t\t! isEditingTemplate && <MetaBoxes location=\"side\" />\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default Layout;\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SACCC,eAAe,EACfC,oBAAoB,EACpBC,qBAAqB,EACrBC,aAAa,EACbC,+BAA+B,EAC/BC,uBAAuB,EACvBC,eAAe,EACfC,KAAK,IAAIC,WAAW,EACpBC,WAAW,IAAIC,iBAAiB,QAC1B,mBAAmB;AAC1B,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SACCC,eAAe,EACfC,YAAY,EACZL,WAAW,IAAIM,sBAAsB,EACrCR,KAAK,IAAIS,gBAAgB,QACnB,yBAAyB;AAChC,SAASC,UAAU,QAAQ,u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Q,EAAC;IAAQ,CAAE,CAAC,EAC/BR,aAAA,CAAClG,SAAS;MAAC0G,QAAQ,EAAC;IAAU,CAAE,CAC5B,CACL,EACC1D,gBAAgB,IAAIQ,eAAe,IACpC0C,aAAA,CAACxH,UAAU,MAAE,CAEb,CACF;IACD4C,MAAM,EACL,CAAE0C,iBAAiB,IACnB,CAAEhB,gBAAgB,IAClBiB,oBAAoB,IACpBV,oBAAoB,IACpBe,eAAe,KAAK,UAAU,IAC9BjB,IAAI,KAAK,QAAQ,IAChB6C,aAAA;MAAKH,SAAS,EAAC;IAA0B,GACxCG,aAAA,CAAC5H,eAAe;MAAC4J,aAAa,EAAG/D;IAAe,CAAE,CAC9C,CAEN;IACD9C,OAAO,EACN6E,aAAA,CAACtF,iBAAiB;MACjB6E,wBAAwB,EAAGA,wBAA0B;MACrD0C,yBAAyB,EACxB5C,2BACA;MACDC,8BAA8B,EAC7BA,8BACA;MACD4C,wBAAwB,EAAG3E;IAAoB,CAC/C,CACD;IACD4E,SAAS,EAAG;MACXC,QAAQ,EAAE5E,gBAAgB;MAC1B6E,IAAI,EAAE5E;IACP;EAAG,CACH,CAAC,EACFuC,aAAA,CAACjG,YAAY,MAAE,CAAC,EAChBiG,aAAA,CAACrG,gBAAgB,MAAE,CAAC,EACpBqG,aAAA,CAACtH,UAAU;IAAC4J,OAAO,EAAGpC;EAAmB,CAAE,CAAC,EAC1C,CAAEpC,iBAAiB,IACpBkC,aAAA,CAACnF,OAAO;IACPwF,iBAAiB,EAAGA,iBAAmB;IACvCkC,WAAW,EACV,CAAElE,iBAAiB,IAAI2B,aAAA,CAAClG,SAAS;MAAC0G,QAAQ,EAAC;IAAM,CAAE;EACnD,CACD,CAED,CAAC;AAEL;AAEA,eAAe5D,MAAM","ignoreList":[]}
|
|
@@ -2,7 +2,7 @@ import { createElement } from "react";
|
|
|
2
2
|
/**
|
|
3
3
|
* External dependencies
|
|
4
4
|
*/
|
|
5
|
-
import
|
|
5
|
+
import clsx from 'clsx';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* WordPress dependencies
|
|
@@ -42,7 +42,7 @@ function MetaBoxesArea({
|
|
|
42
42
|
const isSaving = useSelect(select => {
|
|
43
43
|
return select(editPostStore).isSavingMetaBoxes();
|
|
44
44
|
}, []);
|
|
45
|
-
const classes =
|
|
45
|
+
const classes = clsx('edit-post-meta-boxes-area', `is-${location}`, {
|
|
46
46
|
'is-loading': isSaving
|
|
47
47
|
});
|
|
48
48
|
return createElement("div", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["clsx","useRef","useEffect","Spinner","useSelect","store","editPostStore","MetaBoxesArea","location","container","formRef","current","document","querySelector","appendChild","isSaving","select","isSavingMetaBoxes","classes","createElement","className","ref"],"sources":["@wordpress/edit-post/src/components/meta-boxes/meta-boxes-area/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useRef, useEffect } from '@wordpress/element';\nimport { Spinner } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editPostStore } from '../../../store';\n\n/**\n * Render metabox area.\n *\n * @param {Object} props Component props.\n * @param {string} props.location metabox location.\n * @return {Component} The component to be rendered.\n */\nfunction MetaBoxesArea( { location } ) {\n\tconst container = useRef( null );\n\tconst formRef = useRef( null );\n\n\tuseEffect( () => {\n\t\tformRef.current = document.querySelector(\n\t\t\t'.metabox-location-' + location\n\t\t);\n\n\t\tif ( formRef.current ) {\n\t\t\tcontainer.current.appendChild( formRef.current );\n\t\t}\n\n\t\treturn () => {\n\t\t\tif ( formRef.current ) {\n\t\t\t\tdocument\n\t\t\t\t\t.querySelector( '#metaboxes' )\n\t\t\t\t\t.appendChild( formRef.current );\n\t\t\t}\n\t\t};\n\t}, [ location ] );\n\n\tconst isSaving = useSelect( ( select ) => {\n\t\treturn select( editPostStore ).isSavingMetaBoxes();\n\t}, [] );\n\n\tconst classes = clsx( 'edit-post-meta-boxes-area', `is-${ location }`, {\n\t\t'is-loading': isSaving,\n\t} );\n\n\treturn (\n\t\t<div className={ classes }>\n\t\t\t{ isSaving && <Spinner /> }\n\t\t\t<div\n\t\t\t\tclassName=\"edit-post-meta-boxes-area__container\"\n\t\t\t\tref={ container }\n\t\t\t/>\n\t\t\t<div className=\"edit-post-meta-boxes-area__clear\" />\n\t\t</div>\n\t);\n}\n\nexport default MetaBoxesArea;\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,MAAM,EAAEC,SAAS,QAAQ,oBAAoB;AACtD,SAASC,OAAO,QAAQ,uBAAuB;AAC/C,SAASC,SAAS,QAAQ,iBAAiB;;AAE3C;AACA;AACA;AACA,SAASC,KAAK,IAAIC,aAAa,QAAQ,gBAAgB;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,aAAaA,CAAE;EAAEC;AAAS,CAAC,EAAG;EACtC,MAAMC,SAAS,GAAGR,MAAM,CAAE,IAAK,CAAC;EAChC,MAAMS,OAAO,GAAGT,MAAM,CAAE,IAAK,CAAC;EAE9BC,SAAS,CAAE,MAAM;IAChBQ,OAAO,CAACC,OAAO,GAAGC,QAAQ,CAACC,aAAa,CACvC,oBAAoB,GAAGL,QACxB,CAAC;IAED,IAAKE,OAAO,CAACC,OAAO,EAAG;MACtBF,SAAS,CAACE,OAAO,CAACG,WAAW,CAAEJ,OAAO,CAACC,OAAQ,CAAC;IACjD;IAEA,OAAO,MAAM;MACZ,IAAKD,OAAO,CAACC,OAAO,EAAG;QACtBC,QAAQ,CACNC,aAAa,CAAE,YAAa,CAAC,CAC7BC,WAAW,CAAEJ,OAAO,CAACC,OAAQ,CAAC;MACjC;IACD,CAAC;EACF,CAAC,EAAE,CAAEH,QAAQ,CAAG,CAAC;EAEjB,MAAMO,QAAQ,GAAGX,SAAS,CAAIY,MAAM,IAAM;IACzC,OAAOA,MAAM,CAAEV,aAAc,CAAC,CAACW,iBAAiB,CAAC,CAAC;EACnD,CAAC,EAAE,EAAG,CAAC;EAEP,MAAMC,OAAO,GAAGlB,IAAI,CAAE,2BAA2B,EAAG,MAAMQ,QAAU,EAAC,EAAE;IACtE,YAAY,EAAEO;EACf,CAAE,CAAC;EAEH,OACCI,aAAA;IAAKC,SAAS,EAAGF;EAAS,GACvBH,QAAQ,IAAII,aAAA,CAAChB,OAAO,MAAE,CAAC,EACzBgB,aAAA;IACCC,SAAS,EAAC,sCAAsC;IAChDC,GAAG,EAAGZ;EAAW,CACjB,CAAC,EACFU,aAAA;IAAKC,SAAS,EAAC;EAAkC,CAAE,CAC/C,CAAC;AAER;AAEA,eAAeb,aAAa","ignoreList":[]}
|
|
@@ -2,7 +2,7 @@ import { createElement } from "react";
|
|
|
2
2
|
/**
|
|
3
3
|
* External dependencies
|
|
4
4
|
*/
|
|
5
|
-
import
|
|
5
|
+
import clsx from 'clsx';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* WordPress dependencies
|
|
@@ -11,6 +11,7 @@ import { store as editorStore, privateApis as editorPrivateApis } from '@wordpre
|
|
|
11
11
|
import { useMemo } from '@wordpress/element';
|
|
12
12
|
import { useSelect } from '@wordpress/data';
|
|
13
13
|
import { store as blocksStore } from '@wordpress/blocks';
|
|
14
|
+
import { store as blockEditorStore } from '@wordpress/block-editor';
|
|
14
15
|
|
|
15
16
|
/**
|
|
16
17
|
* Internal dependencies
|
|
@@ -30,7 +31,8 @@ export default function VisualEditor({
|
|
|
30
31
|
renderingMode,
|
|
31
32
|
isBlockBasedTheme,
|
|
32
33
|
hasV3BlocksOnly,
|
|
33
|
-
isEditingTemplate
|
|
34
|
+
isEditingTemplate,
|
|
35
|
+
isZoomedOutView
|
|
34
36
|
} = useSelect(select => {
|
|
35
37
|
const {
|
|
36
38
|
isFeatureActive
|
|
@@ -42,6 +44,9 @@ export default function VisualEditor({
|
|
|
42
44
|
const {
|
|
43
45
|
getBlockTypes
|
|
44
46
|
} = select(blocksStore);
|
|
47
|
+
const {
|
|
48
|
+
__unstableGetEditorMode
|
|
49
|
+
} = select(blockEditorStore);
|
|
45
50
|
const editorSettings = getEditorSettings();
|
|
46
51
|
return {
|
|
47
52
|
isWelcomeGuideVisible: isFeatureActive('welcomeGuide'),
|
|
@@ -50,7 +55,8 @@ export default function VisualEditor({
|
|
|
50
55
|
hasV3BlocksOnly: getBlockTypes().every(type => {
|
|
51
56
|
return type.apiVersion >= 3;
|
|
52
57
|
}),
|
|
53
|
-
isEditingTemplate: select(editorStore).getCurrentPostType() === 'wp_template'
|
|
58
|
+
isEditingTemplate: select(editorStore).getCurrentPostType() === 'wp_template',
|
|
59
|
+
isZoomedOutView: __unstableGetEditorMode() === 'zoom-out'
|
|
54
60
|
};
|
|
55
61
|
}, []);
|
|
56
62
|
const hasMetaBoxes = useSelect(select => select(editPostStore).hasMetaBoxes(), []);
|
|
@@ -59,7 +65,7 @@ export default function VisualEditor({
|
|
|
59
65
|
|
|
60
66
|
// Add a constant padding for the typewritter effect. When typing at the
|
|
61
67
|
// bottom, there needs to be room to scroll up.
|
|
62
|
-
if (!hasMetaBoxes && renderingMode === 'post-only') {
|
|
68
|
+
if (!isZoomedOutView && !hasMetaBoxes && renderingMode === 'post-only') {
|
|
63
69
|
paddingBottom = '40vh';
|
|
64
70
|
}
|
|
65
71
|
styles = useMemo(() => [...styles, {
|
|
@@ -68,7 +74,7 @@ export default function VisualEditor({
|
|
|
68
74
|
}], [styles, paddingBottom]);
|
|
69
75
|
const isToBeIframed = (hasV3BlocksOnly || isGutenbergPlugin && isBlockBasedTheme) && !hasMetaBoxes || isEditingTemplate;
|
|
70
76
|
return createElement("div", {
|
|
71
|
-
className:
|
|
77
|
+
className: clsx('edit-post-visual-editor', {
|
|
72
78
|
'has-inline-canvas': !isToBeIframed
|
|
73
79
|
})
|
|
74
80
|
}, createElement(EditorCanvas, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["clsx","store","editorStore","privateApis","editorPrivateApis","useMemo","useSelect","blocksStore","blockEditorStore","editPostStore","unlock","usePaddingAppender","EditorCanvas","isGutenbergPlugin","process","env","IS_GUTENBERG_PLUGIN","VisualEditor","styles","isWelcomeGuideVisible","renderingMode","isBlockBasedTheme","hasV3BlocksOnly","isEditingTemplate","isZoomedOutView","select","isFeatureActive","getEditorSettings","getRenderingMode","getBlockTypes","__unstableGetEditorMode","editorSettings","__unstableIsBlockBasedTheme","every","type","apiVersion","getCurrentPostType","hasMetaBoxes","paddingAppenderRef","paddingBottom","css","isToBeIframed","createElement","className","disableIframe","autoFocus","contentRef"],"sources":["@wordpress/edit-post/src/components/visual-editor/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\nimport { useMemo } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { store as blocksStore } from '@wordpress/blocks';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { store as editPostStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport { usePaddingAppender } from './use-padding-appender';\n\nconst { EditorCanvas } = unlock( editorPrivateApis );\n\nconst isGutenbergPlugin = process.env.IS_GUTENBERG_PLUGIN ? true : false;\n\nexport default function VisualEditor( { styles } ) {\n\tconst {\n\t\tisWelcomeGuideVisible,\n\t\trenderingMode,\n\t\tisBlockBasedTheme,\n\t\thasV3BlocksOnly,\n\t\tisEditingTemplate,\n\t\tisZoomedOutView,\n\t} = useSelect( ( select ) => {\n\t\tconst { isFeatureActive } = select( editPostStore );\n\t\tconst { getEditorSettings, getRenderingMode } = select( editorStore );\n\t\tconst { getBlockTypes } = select( blocksStore );\n\t\tconst { __unstableGetEditorMode } = select( blockEditorStore );\n\t\tconst editorSettings = getEditorSettings();\n\t\treturn {\n\t\t\tisWelcomeGuideVisible: isFeatureActive( 'welcomeGuide' ),\n\t\t\trenderingMode: getRenderingMode(),\n\t\t\tisBlockBasedTheme: editorSettings.__unstableIsBlockBasedTheme,\n\t\t\thasV3BlocksOnly: getBlockTypes().every( ( type ) => {\n\t\t\t\treturn type.apiVersion >= 3;\n\t\t\t} ),\n\t\t\tisEditingTemplate:\n\t\t\t\tselect( editorStore ).getCurrentPostType() === 'wp_template',\n\t\t\tisZoomedOutView: __unstableGetEditorMode() === 'zoom-out',\n\t\t};\n\t}, [] );\n\tconst hasMetaBoxes = useSelect(\n\t\t( select ) => select( editPostStore ).hasMetaBoxes(),\n\t\t[]\n\t);\n\n\tconst paddingAppenderRef = usePaddingAppender();\n\n\tlet paddingBottom;\n\n\t// Add a constant padding for the typewritter effect. When typing at the\n\t// bottom, there needs to be room to scroll up.\n\tif (\n\t\t! isZoomedOutView &&\n\t\t! hasMetaBoxes &&\n\t\trenderingMode === 'post-only'\n\t) {\n\t\tpaddingBottom = '40vh';\n\t}\n\n\tstyles = useMemo(\n\t\t() => [\n\t\t\t...styles,\n\t\t\t{\n\t\t\t\t// We should move this in to future to the body.\n\t\t\t\tcss: paddingBottom\n\t\t\t\t\t? `body{padding-bottom:${ paddingBottom }}`\n\t\t\t\t\t: '',\n\t\t\t},\n\t\t],\n\t\t[ styles, paddingBottom ]\n\t);\n\n\tconst isToBeIframed =\n\t\t( ( hasV3BlocksOnly || ( isGutenbergPlugin && isBlockBasedTheme ) ) &&\n\t\t\t! hasMetaBoxes ) ||\n\t\tisEditingTemplate;\n\n\treturn (\n\t\t<div\n\t\t\tclassName={ clsx( 'edit-post-visual-editor', {\n\t\t\t\t'has-inline-canvas': ! isToBeIframed,\n\t\t\t} ) }\n\t\t>\n\t\t\t<EditorCanvas\n\t\t\t\tdisableIframe={ ! isToBeIframed }\n\t\t\t\tstyles={ styles }\n\t\t\t\t// We should auto-focus the canvas (title) on load.\n\t\t\t\t// esl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;IACZgC,aAAa,EAAG,CAAEH,aAAe;IACjCvB,MAAM,EAAGA;IACT;IACA;IAAA;IACA2B,SAAS,EAAG,CAAE1B,qBAAuB;IACrC2B,UAAU,EAAGR;EAAoB,CACjC,CACG,CAAC;AAER","ignoreList":[]}
|
|
@@ -23,7 +23,7 @@ export function usePaddingAppender() {
|
|
|
23
23
|
return;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
//
|
|
26
|
+
// Only handle clicks under the last child.
|
|
27
27
|
const lastChild = node.lastElementChild;
|
|
28
28
|
if (!lastChild) {
|
|
29
29
|
return;
|
|
@@ -35,6 +35,11 @@ export function usePaddingAppender() {
|
|
|
35
35
|
event.preventDefault();
|
|
36
36
|
const blockOrder = registry.select(blockEditorStore).getBlockOrder('');
|
|
37
37
|
const lastBlockClientId = blockOrder[blockOrder.length - 1];
|
|
38
|
+
|
|
39
|
+
// Do nothing when only default block appender is present.
|
|
40
|
+
if (!lastBlockClientId) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
38
43
|
const lastBlock = registry.select(blockEditorStore).getBlock(lastBlockClientId);
|
|
39
44
|
const {
|
|
40
45
|
selectBlock,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useRegistry","useRefEffect","store","blockEditorStore","isUnmodifiedDefaultBlock","usePaddingAppender","registry","node","onMouseDown","event","target","ownerDocument","defaultView","paddingBottom","parseInt","getComputedStyle","lastChild","lastElementChild","lastChildRect","getBoundingClientRect","clientY","bottom","preventDefault","blockOrder","select","getBlockOrder","lastBlockClientId","length","lastBlock","getBlock","selectBlock","insertDefaultBlock","dispatch","addEventListener","removeEventListener"],"sources":["@wordpress/edit-post/src/components/visual-editor/use-padding-appender.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useRegistry } from '@wordpress/data';\nimport { useRefEffect } from '@wordpress/compose';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { isUnmodifiedDefaultBlock } from '@wordpress/blocks';\n\nexport function usePaddingAppender() {\n\tconst registry = useRegistry();\n\treturn useRefEffect(\n\t\t( node ) => {\n\t\t\tfunction onMouseDown( event ) {\n\t\t\t\tif ( event.target !== node ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst { ownerDocument } = node;\n\t\t\t\tconst { defaultView } = ownerDocument;\n\n\t\t\t\tconst paddingBottom = defaultView.parseInt(\n\t\t\t\t\tdefaultView.getComputedStyle( node ).paddingBottom,\n\t\t\t\t\t10\n\t\t\t\t);\n\n\t\t\t\tif ( ! paddingBottom ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t//
|
|
1
|
+
{"version":3,"names":["useRegistry","useRefEffect","store","blockEditorStore","isUnmodifiedDefaultBlock","usePaddingAppender","registry","node","onMouseDown","event","target","ownerDocument","defaultView","paddingBottom","parseInt","getComputedStyle","lastChild","lastElementChild","lastChildRect","getBoundingClientRect","clientY","bottom","preventDefault","blockOrder","select","getBlockOrder","lastBlockClientId","length","lastBlock","getBlock","selectBlock","insertDefaultBlock","dispatch","addEventListener","removeEventListener"],"sources":["@wordpress/edit-post/src/components/visual-editor/use-padding-appender.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useRegistry } from '@wordpress/data';\nimport { useRefEffect } from '@wordpress/compose';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { isUnmodifiedDefaultBlock } from '@wordpress/blocks';\n\nexport function usePaddingAppender() {\n\tconst registry = useRegistry();\n\treturn useRefEffect(\n\t\t( node ) => {\n\t\t\tfunction onMouseDown( event ) {\n\t\t\t\tif ( event.target !== node ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst { ownerDocument } = node;\n\t\t\t\tconst { defaultView } = ownerDocument;\n\n\t\t\t\tconst paddingBottom = defaultView.parseInt(\n\t\t\t\t\tdefaultView.getComputedStyle( node ).paddingBottom,\n\t\t\t\t\t10\n\t\t\t\t);\n\n\t\t\t\tif ( ! paddingBottom ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Only handle clicks under the last child.\n\t\t\t\tconst lastChild = node.lastElementChild;\n\t\t\t\tif ( ! lastChild ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst lastChildRect = lastChild.getBoundingClientRect();\n\t\t\t\tif ( event.clientY < lastChildRect.bottom ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tevent.preventDefault();\n\n\t\t\t\tconst blockOrder = registry\n\t\t\t\t\t.select( blockEditorStore )\n\t\t\t\t\t.getBlockOrder( '' );\n\t\t\t\tconst lastBlockClientId = blockOrder[ blockOrder.length - 1 ];\n\n\t\t\t\t// Do nothing when only default block appender is present.\n\t\t\t\tif ( ! lastBlockClientId ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst lastBlock = registry\n\t\t\t\t\t.select( blockEditorStore )\n\t\t\t\t\t.getBlock( lastBlockClientId );\n\t\t\t\tconst { selectBlock, insertDefaultBlock } =\n\t\t\t\t\tregistry.dispatch( blockEditorStore );\n\n\t\t\t\tif ( isUnmodifiedDefaultBlock( lastBlock ) ) {\n\t\t\t\t\tselectBlock( lastBlockClientId );\n\t\t\t\t} else {\n\t\t\t\t\tinsertDefaultBlock();\n\t\t\t\t}\n\t\t\t}\n\t\t\tnode.addEventListener( 'mousedown', onMouseDown );\n\t\t\treturn () => {\n\t\t\t\tnode.removeEventListener( 'mousedown', onMouseDown );\n\t\t\t};\n\t\t},\n\t\t[ registry ]\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,WAAW,QAAQ,iBAAiB;AAC7C,SAASC,YAAY,QAAQ,oBAAoB;AACjD,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,yBAAyB;AACnE,SAASC,wBAAwB,QAAQ,mBAAmB;AAE5D,OAAO,SAASC,kBAAkBA,CAAA,EAAG;EACpC,MAAMC,QAAQ,GAAGN,WAAW,CAAC,CAAC;EAC9B,OA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D;IACAxB,IAAI,CAAC0B,gBAAgB,CAAE,WAAW,EAAEzB,WAAY,CAAC;IACjD,OAAO,MAAM;MACZD,IAAI,CAAC2B,mBAAmB,CAAE,WAAW,EAAE1B,WAAY,CAAC;IACrD,CAAC;EACF,CAAC,EACD,CAAEF,QAAQ,CACX,CAAC;AACF","ignoreList":[]}
|
|
@@ -104,243 +104,19 @@
|
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
.edit-post-header {
|
|
108
|
-
height: 60px;
|
|
109
|
-
background: #fff;
|
|
110
|
-
display: flex;
|
|
111
|
-
flex-wrap: wrap;
|
|
112
|
-
align-items: center;
|
|
113
|
-
max-width: 100vw;
|
|
114
|
-
justify-content: space-between;
|
|
115
|
-
}
|
|
116
|
-
@media (min-width: 280px) {
|
|
117
|
-
.edit-post-header {
|
|
118
|
-
flex-wrap: nowrap;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
.edit-post-header__toolbar {
|
|
123
|
-
display: flex;
|
|
124
|
-
flex-shrink: 8;
|
|
125
|
-
flex-grow: 3;
|
|
126
|
-
overflow: hidden;
|
|
127
|
-
padding: 2px 0;
|
|
128
|
-
align-items: center;
|
|
129
|
-
}
|
|
130
|
-
@media (min-width: 782px) {
|
|
131
|
-
.edit-post-header__toolbar {
|
|
132
|
-
padding-left: var(--wp-admin-border-width-focus);
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
.edit-post-header__toolbar .table-of-contents {
|
|
136
|
-
display: none;
|
|
137
|
-
}
|
|
138
|
-
@media (min-width: 600px) {
|
|
139
|
-
.edit-post-header__toolbar .table-of-contents {
|
|
140
|
-
display: block;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
.edit-post-header__center {
|
|
145
|
-
flex-grow: 1;
|
|
146
|
-
display: flex;
|
|
147
|
-
justify-content: center;
|
|
148
|
-
}
|
|
149
|
-
.edit-post-header__center.is-collapsed {
|
|
150
|
-
display: none;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
107
|
/**
|
|
154
|
-
*
|
|
108
|
+
* Show icon label overrides.
|
|
155
109
|
*/
|
|
156
|
-
.edit-post-
|
|
157
|
-
display: inline-flex;
|
|
158
|
-
align-items: center;
|
|
159
|
-
flex-wrap: nowrap;
|
|
160
|
-
padding-left: 4px;
|
|
161
|
-
gap: 8px;
|
|
162
|
-
}
|
|
163
|
-
@media (min-width: 600px) {
|
|
164
|
-
.edit-post-header__settings {
|
|
165
|
-
padding-left: 8px;
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
/**
|
|
170
|
-
* Show icon labels.
|
|
171
|
-
*/
|
|
172
|
-
.show-icon-labels.interface-pinned-items .components-button.has-icon,
|
|
173
|
-
.show-icon-labels .edit-post-header .components-button.has-icon,
|
|
174
|
-
.edit-post-header__dropdown .components-button.has-icon {
|
|
175
|
-
width: auto;
|
|
176
|
-
}
|
|
177
|
-
.show-icon-labels.interface-pinned-items .components-button.has-icon svg,
|
|
178
|
-
.show-icon-labels .edit-post-header .components-button.has-icon svg,
|
|
179
|
-
.edit-post-header__dropdown .components-button.has-icon svg {
|
|
180
|
-
display: none;
|
|
181
|
-
}
|
|
182
|
-
.show-icon-labels.interface-pinned-items .components-button.has-icon::after,
|
|
183
|
-
.show-icon-labels .edit-post-header .components-button.has-icon::after,
|
|
184
|
-
.edit-post-header__dropdown .components-button.has-icon::after {
|
|
185
|
-
content: attr(aria-label);
|
|
186
|
-
}
|
|
187
|
-
.show-icon-labels.interface-pinned-items .components-button.has-icon[aria-disabled=true],
|
|
188
|
-
.show-icon-labels .edit-post-header .components-button.has-icon[aria-disabled=true],
|
|
189
|
-
.edit-post-header__dropdown .components-button.has-icon[aria-disabled=true] {
|
|
190
|
-
background-color: transparent;
|
|
191
|
-
}
|
|
192
|
-
.show-icon-labels.interface-pinned-items .is-tertiary:active,
|
|
193
|
-
.show-icon-labels .edit-post-header .is-tertiary:active,
|
|
194
|
-
.edit-post-header__dropdown .is-tertiary:active {
|
|
195
|
-
box-shadow: 0 0 0 1.5px var(--wp-admin-theme-color);
|
|
196
|
-
background-color: transparent;
|
|
197
|
-
}
|
|
198
|
-
.show-icon-labels.interface-pinned-items .edit-post-fullscreen-mode-close.has-icon svg,
|
|
199
|
-
.show-icon-labels.interface-pinned-items .components-button.has-icon.button-toggle svg,
|
|
200
|
-
.show-icon-labels .edit-post-header .edit-post-fullscreen-mode-close.has-icon svg,
|
|
201
|
-
.show-icon-labels .edit-post-header .components-button.has-icon.button-toggle svg,
|
|
202
|
-
.edit-post-header__dropdown .edit-post-fullscreen-mode-close.has-icon svg,
|
|
203
|
-
.edit-post-header__dropdown .components-button.has-icon.button-toggle svg {
|
|
204
|
-
display: block;
|
|
205
|
-
}
|
|
206
|
-
.show-icon-labels.interface-pinned-items .edit-post-fullscreen-mode-close.has-icon::after,
|
|
207
|
-
.show-icon-labels.interface-pinned-items .components-button.has-icon.button-toggle::after,
|
|
208
|
-
.show-icon-labels .edit-post-header .edit-post-fullscreen-mode-close.has-icon::after,
|
|
209
|
-
.show-icon-labels .edit-post-header .components-button.has-icon.button-toggle::after,
|
|
210
|
-
.edit-post-header__dropdown .edit-post-fullscreen-mode-close.has-icon::after,
|
|
211
|
-
.edit-post-header__dropdown .components-button.has-icon.button-toggle::after {
|
|
212
|
-
content: none;
|
|
213
|
-
}
|
|
214
|
-
.show-icon-labels.interface-pinned-items .edit-post-fullscreen-mode-close.has-icon,
|
|
215
|
-
.show-icon-labels .edit-post-header .edit-post-fullscreen-mode-close.has-icon,
|
|
216
|
-
.edit-post-header__dropdown .edit-post-fullscreen-mode-close.has-icon {
|
|
110
|
+
.show-icon-labels .editor-header .edit-post-fullscreen-mode-close.has-icon {
|
|
217
111
|
width: 60px;
|
|
218
112
|
}
|
|
219
|
-
.show-icon-labels.
|
|
220
|
-
.show-icon-labels .edit-post-header .components-menu-items-choice .components-menu-items__item-icon.components-menu-items__item-icon,
|
|
221
|
-
.edit-post-header__dropdown .components-menu-items-choice .components-menu-items__item-icon.components-menu-items__item-icon {
|
|
113
|
+
.show-icon-labels .editor-header .edit-post-fullscreen-mode-close.has-icon svg {
|
|
222
114
|
display: block;
|
|
223
115
|
}
|
|
224
|
-
.show-icon-labels.
|
|
225
|
-
.show-icon-labels.interface-pinned-items .interface-pinned-items .components-button,
|
|
226
|
-
.show-icon-labels .edit-post-header .editor-document-tools__inserter-toggle.editor-document-tools__inserter-toggle,
|
|
227
|
-
.show-icon-labels .edit-post-header .interface-pinned-items .components-button,
|
|
228
|
-
.edit-post-header__dropdown .editor-document-tools__inserter-toggle.editor-document-tools__inserter-toggle,
|
|
229
|
-
.edit-post-header__dropdown .interface-pinned-items .components-button {
|
|
230
|
-
padding-right: 8px;
|
|
231
|
-
padding-left: 8px;
|
|
232
|
-
}
|
|
233
|
-
@media (min-width: 600px) {
|
|
234
|
-
.show-icon-labels.interface-pinned-items .editor-document-tools__inserter-toggle.editor-document-tools__inserter-toggle,
|
|
235
|
-
.show-icon-labels.interface-pinned-items .interface-pinned-items .components-button,
|
|
236
|
-
.show-icon-labels .edit-post-header .editor-document-tools__inserter-toggle.editor-document-tools__inserter-toggle,
|
|
237
|
-
.show-icon-labels .edit-post-header .interface-pinned-items .components-button,
|
|
238
|
-
.edit-post-header__dropdown .editor-document-tools__inserter-toggle.editor-document-tools__inserter-toggle,
|
|
239
|
-
.edit-post-header__dropdown .interface-pinned-items .components-button {
|
|
240
|
-
padding-right: 12px;
|
|
241
|
-
padding-left: 12px;
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
.show-icon-labels.interface-pinned-items .editor-post-save-draft.editor-post-save-draft::after,
|
|
245
|
-
.show-icon-labels.interface-pinned-items .editor-post-saved-state.editor-post-saved-state::after,
|
|
246
|
-
.show-icon-labels .edit-post-header .editor-post-save-draft.editor-post-save-draft::after,
|
|
247
|
-
.show-icon-labels .edit-post-header .editor-post-saved-state.editor-post-saved-state::after,
|
|
248
|
-
.edit-post-header__dropdown .editor-post-save-draft.editor-post-save-draft::after,
|
|
249
|
-
.edit-post-header__dropdown .editor-post-saved-state.editor-post-saved-state::after {
|
|
116
|
+
.show-icon-labels .editor-header .edit-post-fullscreen-mode-close.has-icon::after {
|
|
250
117
|
content: none;
|
|
251
118
|
}
|
|
252
119
|
|
|
253
|
-
.show-icon-labels .edit-post-header__toolbar .block-editor-block-mover {
|
|
254
|
-
border-right: none;
|
|
255
|
-
}
|
|
256
|
-
.show-icon-labels .edit-post-header__toolbar .block-editor-block-mover::before {
|
|
257
|
-
content: "";
|
|
258
|
-
width: 1px;
|
|
259
|
-
height: 24px;
|
|
260
|
-
background-color: #ddd;
|
|
261
|
-
margin-top: 4px;
|
|
262
|
-
margin-right: 8px;
|
|
263
|
-
}
|
|
264
|
-
.show-icon-labels .edit-post-header__toolbar .block-editor-block-mover .block-editor-block-mover__move-button-container::before {
|
|
265
|
-
width: calc(100% - 24px);
|
|
266
|
-
background: #ddd;
|
|
267
|
-
right: calc(50% + 1px);
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
.edit-post-header__dropdown .components-menu-item__button.components-menu-item__button,
|
|
271
|
-
.edit-post-header__dropdown .components-button.editor-history__undo,
|
|
272
|
-
.edit-post-header__dropdown .components-button.editor-history__redo,
|
|
273
|
-
.edit-post-header__dropdown .table-of-contents .components-button,
|
|
274
|
-
.edit-post-header__dropdown .components-button.block-editor-list-view {
|
|
275
|
-
margin: 0;
|
|
276
|
-
padding: 6px 40px 6px 6px;
|
|
277
|
-
width: 14.625rem;
|
|
278
|
-
text-align: right;
|
|
279
|
-
justify-content: flex-start;
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
.show-icon-labels.interface-pinned-items {
|
|
283
|
-
padding: 6px 12px 12px;
|
|
284
|
-
margin-top: 0;
|
|
285
|
-
margin-bottom: 0;
|
|
286
|
-
margin-right: -12px;
|
|
287
|
-
margin-left: -12px;
|
|
288
|
-
border-bottom: 1px solid #ccc;
|
|
289
|
-
display: block;
|
|
290
|
-
}
|
|
291
|
-
.show-icon-labels.interface-pinned-items > .components-button.has-icon {
|
|
292
|
-
margin: 0;
|
|
293
|
-
padding: 6px 8px 6px 6px;
|
|
294
|
-
width: 14.625rem;
|
|
295
|
-
justify-content: flex-start;
|
|
296
|
-
}
|
|
297
|
-
.show-icon-labels.interface-pinned-items > .components-button.has-icon[aria-expanded=true] svg {
|
|
298
|
-
display: block;
|
|
299
|
-
max-width: 24px;
|
|
300
|
-
}
|
|
301
|
-
.show-icon-labels.interface-pinned-items > .components-button.has-icon[aria-expanded=false] {
|
|
302
|
-
padding-right: 40px;
|
|
303
|
-
}
|
|
304
|
-
.show-icon-labels.interface-pinned-items > .components-button.has-icon svg {
|
|
305
|
-
margin-left: 8px;
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
@media (min-width: 600px) {
|
|
309
|
-
.edit-post-header__post-preview-button {
|
|
310
|
-
display: none;
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
.is-distraction-free .interface-interface-skeleton__header {
|
|
315
|
-
border-bottom: none;
|
|
316
|
-
}
|
|
317
|
-
.is-distraction-free .edit-post-header {
|
|
318
|
-
background-color: #fff;
|
|
319
|
-
border-bottom: 1px solid #e0e0e0;
|
|
320
|
-
position: absolute;
|
|
321
|
-
width: 100%;
|
|
322
|
-
}
|
|
323
|
-
.is-distraction-free .edit-post-header > .edit-post-header__settings > .edit-post-header__post-preview-button {
|
|
324
|
-
visibility: hidden;
|
|
325
|
-
}
|
|
326
|
-
.is-distraction-free .edit-post-header > .edit-post-header__toolbar .editor-document-tools__document-overview-toggle, .is-distraction-free .edit-post-header > .edit-post-header__settings > .editor-preview-dropdown, .is-distraction-free .edit-post-header > .edit-post-header__settings > .interface-pinned-items {
|
|
327
|
-
display: none;
|
|
328
|
-
}
|
|
329
|
-
.is-distraction-free .interface-interface-skeleton__header:focus-within {
|
|
330
|
-
opacity: 1 !important;
|
|
331
|
-
}
|
|
332
|
-
.is-distraction-free .interface-interface-skeleton__header:focus-within div {
|
|
333
|
-
transform: translateX(0) translateZ(0) !important;
|
|
334
|
-
}
|
|
335
|
-
.is-distraction-free .components-editor-notices__dismissible {
|
|
336
|
-
position: absolute;
|
|
337
|
-
z-index: 35;
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
.components-popover.more-menu-dropdown__content {
|
|
341
|
-
z-index: 99998;
|
|
342
|
-
}
|
|
343
|
-
|
|
344
120
|
.edit-post-fullscreen-mode-close.components-button {
|
|
345
121
|
display: none;
|
|
346
122
|
}
|
|
@@ -554,42 +330,6 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
|
|
|
554
330
|
clear: both;
|
|
555
331
|
}
|
|
556
332
|
|
|
557
|
-
.components-panel__header.edit-post-sidebar__panel-tabs {
|
|
558
|
-
padding-right: 0;
|
|
559
|
-
padding-left: 16px;
|
|
560
|
-
}
|
|
561
|
-
.components-panel__header.edit-post-sidebar__panel-tabs .components-button.has-icon {
|
|
562
|
-
padding: 0;
|
|
563
|
-
min-width: 24px;
|
|
564
|
-
height: 24px;
|
|
565
|
-
}
|
|
566
|
-
@media (min-width: 782px) {
|
|
567
|
-
.components-panel__header.edit-post-sidebar__panel-tabs .components-button.has-icon {
|
|
568
|
-
display: flex;
|
|
569
|
-
}
|
|
570
|
-
}
|
|
571
|
-
|
|
572
|
-
.edit-post-sidebar__panel {
|
|
573
|
-
margin-top: -1px;
|
|
574
|
-
}
|
|
575
|
-
|
|
576
|
-
.edit-post-post-format {
|
|
577
|
-
display: flex;
|
|
578
|
-
flex-direction: column;
|
|
579
|
-
align-items: stretch;
|
|
580
|
-
}
|
|
581
|
-
|
|
582
|
-
.edit-post-post-slug {
|
|
583
|
-
display: flex;
|
|
584
|
-
flex-direction: column;
|
|
585
|
-
align-items: stretch;
|
|
586
|
-
}
|
|
587
|
-
|
|
588
|
-
.edit-post-post-visibility__dialog .editor-post-visibility {
|
|
589
|
-
min-width: 248px;
|
|
590
|
-
margin: 8px;
|
|
591
|
-
}
|
|
592
|
-
|
|
593
333
|
.edit-post-text-editor {
|
|
594
334
|
position: relative;
|
|
595
335
|
width: 100%;
|
|
@@ -777,15 +517,15 @@ body.js.block-editor-page .media-frame select.attachment-filters:last-of-type {
|
|
|
777
517
|
}
|
|
778
518
|
}
|
|
779
519
|
|
|
780
|
-
.
|
|
520
|
+
.editor-header,
|
|
781
521
|
.edit-post-text-editor,
|
|
782
522
|
.editor-sidebar,
|
|
783
523
|
.editor-post-publish-panel {
|
|
784
524
|
box-sizing: border-box;
|
|
785
525
|
}
|
|
786
|
-
.
|
|
787
|
-
.
|
|
788
|
-
.
|
|
526
|
+
.editor-header *,
|
|
527
|
+
.editor-header *::before,
|
|
528
|
+
.editor-header *::after,
|
|
789
529
|
.edit-post-text-editor *,
|
|
790
530
|
.edit-post-text-editor *::before,
|
|
791
531
|
.edit-post-text-editor *::after,
|