@wordpress/edit-post 8.8.14 → 8.8.16

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.
@@ -376,12 +376,16 @@ function Layout({
376
376
  canUser,
377
377
  getPostType
378
378
  } = select(_coreData.store);
379
+ const {
380
+ __unstableGetEditorMode
381
+ } = (0, _lockUnlock.unlock)(select(_blockEditor.store));
379
382
  const supportsTemplateMode = settings.supportsTemplateMode;
380
383
  const isViewable = (_getPostType$viewable = getPostType(currentPostType)?.viewable) !== null && _getPostType$viewable !== void 0 ? _getPostType$viewable : false;
381
384
  const canViewTemplate = canUser('read', {
382
385
  kind: 'postType',
383
386
  name: 'wp_template'
384
387
  });
388
+ const isZoomOut = __unstableGetEditorMode() === 'zoom-out';
385
389
  return {
386
390
  mode: select(_editor.store).getEditorMode(),
387
391
  isFullscreenActive: select(_store.store).isFeatureActive('fullscreenMode'),
@@ -389,7 +393,7 @@ function Layout({
389
393
  hasBlockSelected: !!select(_blockEditor.store).getBlockSelectionStart(),
390
394
  showIconLabels: get('core', 'showIconLabels'),
391
395
  isDistractionFree: get('core', 'distractionFree'),
392
- showMetaBoxes: !DESIGN_POST_TYPES.includes(currentPostType) && select(_editor.store).getRenderingMode() === 'post-only',
396
+ showMetaBoxes: !DESIGN_POST_TYPES.includes(currentPostType) && select(_editor.store).getRenderingMode() === 'post-only' && !isZoomOut,
393
397
  isWelcomeGuideVisible: isFeatureActive('welcomeGuide'),
394
398
  templateId: supportsTemplateMode && isViewable && canViewTemplate && !isEditingTemplate ? getEditedPostTemplateId() : null
395
399
  };
@@ -1 +1 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_editor","_data","_blockEditor","_plugins","_i18n","_element","_icons","_notices","_preferences","_commands","_coreCommands","_blockLibrary","_url","_htmlEntities","_coreData","_components","_compose","_backButton","_editorInitialization","_keyboardShortcuts","_initPatternModal","_browserUrl","_metaBoxes","_moreMenu","_welcomeGuide","_store","_lockUnlock","_useCommands","_usePaddingAppender","_useShouldIframe","_useNavigateToEntityRecord","_jsxRuntime","getLayoutStyles","unlock","blockEditorPrivateApis","useCommands","coreCommandsPrivateApis","useCommandContext","commandsPrivateApis","Editor","FullscreenMode","NavigableRegion","editorPrivateApis","BlockKeyboardShortcuts","blockLibraryPrivateApis","DESIGN_POST_TYPES","useEditorStyles","hasThemeStyleSupport","editorSettings","isZoomedOutView","renderingMode","postType","useSelect","select","__unstableGetEditorMode","blockEditorStore","getCurrentPostType","getRenderingMode","editorStore","_postType","editPostStore","isFeatureActive","getEditorSettings","useMemo","_editorSettings$style","_editorSettings$defau","_editorSettings$style2","_editorSettings$style3","presetStyles","styles","filter","style","__unstableType","defaultEditorStyles","hasThemeStyles","length","disableLayoutStyles","push","css","selector","hasBlockGapSupport","hasFallbackGapSupport","fallbackGapValue","baseStyles","includes","MetaBoxesMain","isLegacy","isOpen","openHeight","hasAnyVisible","get","preferencesStore","isMetaBoxLocationVisible","set","setPreference","useDispatch","metaBoxesMainRef","useRef","isShort","useMediaQuery","min","max","setHeightConstraints","useState","effectSizeConstraints","useRefEffect","node","container","closest","noticeLists","querySelectorAll","resizeHandle","querySelector","deriveConstraints","fullHeight","offsetHeight","nextMax","element","nextMin","observer","window","ResizeObserver","observe","disconnect","separatorRef","separatorHelpId","useId","isUntouched","setIsUntouched","applyHeight","candidateHeight","isPersistent","isInstant","nextHeight","Math","current","ariaValueNow","getAriaValueNow","updateSize","height","width","contents","jsxs","className","clsx","hidden","children","jsx","default","location","isAutoHeight","undefined","usedMax","round","usedAriaValueNow","toggle","onSeparatorKeyDown","event","delta","ArrowUp","ArrowDown","key","pane","resizable","fromHeight","preventDefault","paneLabel","__","Pane","paneProps","ResizableBox","as","ref","defaultSize","minHeight","maxHeight","enable","top","right","bottom","left","topLeft","topRight","bottomRight","bottomLeft","handleClasses","handleComponent","Fragment","Tooltip","text","role","onKeyDown","VisuallyHidden","id","onPointerDown","pointerId","target","setPointerCapture","onResizeStart","direction","elementRef","onResize","state","onResizeStop","onClick","Icon","icon","chevronUp","chevronDown","Layout","postId","initialPostId","initialPostType","settings","initialEdits","useEditPostCommands","paddingAppenderRef","usePaddingAppender","shouldIframe","useShouldIframe","createErrorNotice","noticesStore","currentPost","currentPostId","currentPostType","onNavigateToEntityRecord","onNavigateToPreviousEntityRecord","useNavigateToEntityRecord","isEditingTemplate","mode","isFullscreenActive","hasActiveMetaboxes","hasBlockSelected","showIconLabels","isDistractionFree","showMetaBoxes","hasHistory","isWelcomeGuideVisible","templateId","_getPostType$viewable","getEditedPostTemplateId","canUser","getPostType","coreStore","supportsTemplateMode","isViewable","viewable","canViewTemplate","kind","name","getEditorMode","hasMetaBoxes","getBlockSelectionStart","commandContext","defaultRenderingMode","document","body","classList","add","remove","navigateRegionsProps","useNavigateRegions","onPluginAreaError","sprintf","createSuccessNotice","onActionPerformed","useCallback","actionId","items","href","addQueryArgs","trashed","post_type","type","ids","newItem","title","rendered","decodeEntities","actions","label","post","action","initialPost","backButton","useViewportMatch","SlotFillProvider","ErrorBoundary","CommandMenu","forceIsDirty","contentRef","disableIframe","autoFocus","extraSidebarPanels","extraContent","PostLockedModal","isActive","UnsavedChangesWarning","AutosaveMonitor","LocalAutosaveMonitor","EditorKeyboardShortcutsRegister","PluginArea","onError","EditorSnackbars","_default","exports"],"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\tEditorKeyboardShortcutsRegister,\n\tEditorSnackbars,\n\tErrorBoundary,\n\tPostLockedModal,\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { PluginArea } from '@wordpress/plugins';\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\tuseCallback,\n\tuseMemo,\n\tuseId,\n\tuseRef,\n\tuseState,\n} from '@wordpress/element';\nimport { chevronDown, chevronUp } from '@wordpress/icons';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport {\n\tCommandMenu,\n\tprivateApis as commandsPrivateApis,\n} from '@wordpress/commands';\nimport { privateApis as coreCommandsPrivateApis } from '@wordpress/core-commands';\nimport { privateApis as blockLibraryPrivateApis } from '@wordpress/block-library';\nimport { addQueryArgs } from '@wordpress/url';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { store as coreStore } from '@wordpress/core-data';\nimport {\n\tIcon,\n\tResizableBox,\n\tSlotFillProvider,\n\tTooltip,\n\tVisuallyHidden,\n\t__unstableUseNavigateRegions as useNavigateRegions,\n} from '@wordpress/components';\nimport {\n\tuseMediaQuery,\n\tuseRefEffect,\n\tuseViewportMatch,\n} from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BackButton from '../back-button';\nimport EditorInitialization from '../editor-initialization';\nimport EditPostKeyboardShortcuts from '../keyboard-shortcuts';\nimport InitPatternModal from '../init-pattern-modal';\nimport BrowserURL from '../browser-url';\nimport MetaBoxes from '../meta-boxes';\nimport PostEditorMoreMenu from '../more-menu';\nimport WelcomeGuide from '../welcome-guide';\nimport { store as editPostStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport useEditPostCommands from '../../commands/use-commands';\nimport { usePaddingAppender } from './use-padding-appender';\nimport { useShouldIframe } from './use-should-iframe';\nimport useNavigateToEntityRecord from '../../hooks/use-navigate-to-entity-record';\n\nconst { getLayoutStyles } = unlock( blockEditorPrivateApis );\nconst { useCommands } = unlock( coreCommandsPrivateApis );\nconst { useCommandContext } = unlock( commandsPrivateApis );\nconst { Editor, FullscreenMode, NavigableRegion } = unlock( editorPrivateApis );\nconst { BlockKeyboardShortcuts } = unlock( blockLibraryPrivateApis );\nconst DESIGN_POST_TYPES = [\n\t'wp_template',\n\t'wp_template_part',\n\t'wp_block',\n\t'wp_navigation',\n];\n\nfunction useEditorStyles() {\n\tconst {\n\t\thasThemeStyleSupport,\n\t\teditorSettings,\n\t\tisZoomedOutView,\n\t\trenderingMode,\n\t\tpostType,\n\t} = useSelect( ( select ) => {\n\t\tconst { __unstableGetEditorMode } = select( blockEditorStore );\n\t\tconst { getCurrentPostType, getRenderingMode } = select( editorStore );\n\t\tconst _postType = getCurrentPostType();\n\t\treturn {\n\t\t\thasThemeStyleSupport:\n\t\t\t\tselect( editPostStore ).isFeatureActive( 'themeStyles' ),\n\t\t\teditorSettings: select( editorStore ).getEditorSettings(),\n\t\t\tisZoomedOutView: __unstableGetEditorMode() === 'zoom-out',\n\t\t\trenderingMode: getRenderingMode(),\n\t\t\tpostType: _postType,\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\tconst baseStyles = hasThemeStyles\n\t\t\t? editorSettings.styles ?? []\n\t\t\t: defaultEditorStyles;\n\n\t\t// Add a space for the typewriter effect. When typing in the last block,\n\t\t// there needs to be room to scroll up.\n\t\tif (\n\t\t\t! isZoomedOutView &&\n\t\t\trenderingMode === 'post-only' &&\n\t\t\t! DESIGN_POST_TYPES.includes( postType )\n\t\t) {\n\t\t\treturn [\n\t\t\t\t...baseStyles,\n\t\t\t\t{\n\t\t\t\t\tcss: ':root :where(.editor-styles-wrapper)::after {content: \"\"; display: block; height: 40vh;}',\n\t\t\t\t},\n\t\t\t];\n\t\t}\n\n\t\treturn baseStyles;\n\t}, [\n\t\teditorSettings.defaultEditorStyles,\n\t\teditorSettings.disableLayoutStyles,\n\t\teditorSettings.styles,\n\t\thasThemeStyleSupport,\n\t\tpostType,\n\t] );\n}\n\n/**\n * @param {Object} props\n * @param {boolean} props.isLegacy True when the editor canvas is not in an iframe.\n */\nfunction MetaBoxesMain( { isLegacy } ) {\n\tconst [ isOpen, openHeight, hasAnyVisible ] = useSelect( ( select ) => {\n\t\tconst { get } = select( preferencesStore );\n\t\tconst { isMetaBoxLocationVisible } = select( editPostStore );\n\t\treturn [\n\t\t\tget( 'core/edit-post', 'metaBoxesMainIsOpen' ),\n\t\t\tget( 'core/edit-post', 'metaBoxesMainOpenHeight' ),\n\t\t\tisMetaBoxLocationVisible( 'normal' ) ||\n\t\t\t\tisMetaBoxLocationVisible( 'advanced' ) ||\n\t\t\t\tisMetaBoxLocationVisible( 'side' ),\n\t\t];\n\t}, [] );\n\tconst { set: setPreference } = useDispatch( preferencesStore );\n\tconst metaBoxesMainRef = useRef();\n\tconst isShort = useMediaQuery( '(max-height: 549px)' );\n\n\tconst [ { min, max }, setHeightConstraints ] = useState( () => ( {} ) );\n\t// Keeps the resizable area’s size constraints updated taking into account\n\t// editor notices. The constraints are also used to derive the value for the\n\t// aria-valuenow attribute on the seperator.\n\tconst effectSizeConstraints = useRefEffect( ( node ) => {\n\t\tconst container = node.closest(\n\t\t\t'.interface-interface-skeleton__content'\n\t\t);\n\t\tconst noticeLists = container.querySelectorAll(\n\t\t\t':scope > .components-notice-list'\n\t\t);\n\t\tconst resizeHandle = container.querySelector(\n\t\t\t'.edit-post-meta-boxes-main__presenter'\n\t\t);\n\t\tconst deriveConstraints = () => {\n\t\t\tconst fullHeight = container.offsetHeight;\n\t\t\tlet nextMax = fullHeight;\n\t\t\tfor ( const element of noticeLists ) {\n\t\t\t\tnextMax -= element.offsetHeight;\n\t\t\t}\n\t\t\tconst nextMin = resizeHandle.offsetHeight;\n\t\t\tsetHeightConstraints( { min: nextMin, max: nextMax } );\n\t\t};\n\t\tconst observer = new window.ResizeObserver( deriveConstraints );\n\t\tobserver.observe( container );\n\t\tfor ( const element of noticeLists ) {\n\t\t\tobserver.observe( element );\n\t\t}\n\t\treturn () => observer.disconnect();\n\t}, [] );\n\n\tconst separatorRef = useRef();\n\tconst separatorHelpId = useId();\n\n\tconst [ isUntouched, setIsUntouched ] = useState( true );\n\tconst applyHeight = ( candidateHeight, isPersistent, isInstant ) => {\n\t\tconst nextHeight = Math.min( max, Math.max( min, candidateHeight ) );\n\t\tif ( isPersistent ) {\n\t\t\tsetPreference(\n\t\t\t\t'core/edit-post',\n\t\t\t\t'metaBoxesMainOpenHeight',\n\t\t\t\tnextHeight\n\t\t\t);\n\t\t} else {\n\t\t\tseparatorRef.current.ariaValueNow = getAriaValueNow( nextHeight );\n\t\t}\n\t\tif ( isInstant ) {\n\t\t\tmetaBoxesMainRef.current.updateSize( {\n\t\t\t\theight: nextHeight,\n\t\t\t\t// Oddly, when the event that triggered this was not from the mouse (e.g. keydown),\n\t\t\t\t// if `width` is left unspecified a subsequent drag gesture applies a fixed\n\t\t\t\t// width and the pane fails to widen/narrow with parent width changes from\n\t\t\t\t// sidebars opening/closing or window resizes.\n\t\t\t\twidth: 'auto',\n\t\t\t} );\n\t\t}\n\t};\n\n\tif ( ! hasAnyVisible ) {\n\t\treturn;\n\t}\n\n\tconst contents = (\n\t\t<div\n\t\t\tclassName={ clsx(\n\t\t\t\t// The class name 'edit-post-layout__metaboxes' is retained because some plugins use it.\n\t\t\t\t'edit-post-layout__metaboxes',\n\t\t\t\t! isLegacy && 'edit-post-meta-boxes-main__liner'\n\t\t\t) }\n\t\t\thidden={ ! isLegacy && isShort && ! isOpen }\n\t\t>\n\t\t\t<MetaBoxes location=\"normal\" />\n\t\t\t<MetaBoxes location=\"advanced\" />\n\t\t</div>\n\t);\n\n\tif ( isLegacy ) {\n\t\treturn contents;\n\t}\n\n\tconst isAutoHeight = openHeight === undefined;\n\tlet usedMax = '50%'; // Approximation before max has a value.\n\tif ( max !== undefined ) {\n\t\t// Halves the available max height until a user height is set.\n\t\tusedMax = isAutoHeight && isUntouched ? max / 2 : max;\n\t}\n\n\tconst getAriaValueNow = ( height ) =>\n\t\tMath.round( ( ( height - min ) / ( max - min ) ) * 100 );\n\tconst usedAriaValueNow =\n\t\tmax === undefined || isAutoHeight ? 50 : getAriaValueNow( openHeight );\n\n\tconst toggle = () =>\n\t\tsetPreference( 'core/edit-post', 'metaBoxesMainIsOpen', ! isOpen );\n\n\t// TODO: Support more/all keyboard interactions from the window splitter pattern:\n\t// https://www.w3.org/WAI/ARIA/apg/patterns/windowsplitter/\n\tconst onSeparatorKeyDown = ( event ) => {\n\t\tconst delta = { ArrowUp: 20, ArrowDown: -20 }[ event.key ];\n\t\tif ( delta ) {\n\t\t\tconst pane = metaBoxesMainRef.current.resizable;\n\t\t\tconst fromHeight = isAutoHeight ? pane.offsetHeight : openHeight;\n\t\t\tconst nextHeight = delta + fromHeight;\n\t\t\tapplyHeight( nextHeight, true, true );\n\t\t\tevent.preventDefault();\n\t\t}\n\t};\n\tconst className = 'edit-post-meta-boxes-main';\n\tconst paneLabel = __( 'Meta Boxes' );\n\tlet Pane, paneProps;\n\tif ( isShort ) {\n\t\tPane = NavigableRegion;\n\t\tpaneProps = {\n\t\t\tclassName: clsx( className, 'is-toggle-only' ),\n\t\t};\n\t} else {\n\t\tPane = ResizableBox;\n\t\tpaneProps = /** @type {Parameters<typeof ResizableBox>[0]} */ ( {\n\t\t\tas: NavigableRegion,\n\t\t\tref: metaBoxesMainRef,\n\t\t\tclassName: clsx( className, 'is-resizable' ),\n\t\t\tdefaultSize: { height: openHeight },\n\t\t\tminHeight: min,\n\t\t\tmaxHeight: usedMax,\n\t\t\tenable: {\n\t\t\t\ttop: true,\n\t\t\t\tright: false,\n\t\t\t\tbottom: false,\n\t\t\t\tleft: false,\n\t\t\t\ttopLeft: false,\n\t\t\t\ttopRight: false,\n\t\t\t\tbottomRight: false,\n\t\t\t\tbottomLeft: false,\n\t\t\t},\n\t\t\thandleClasses: { top: 'edit-post-meta-boxes-main__presenter' },\n\t\t\thandleComponent: {\n\t\t\t\ttop: (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<Tooltip text={ __( 'Drag to resize' ) }>\n\t\t\t\t\t\t\t<button // eslint-disable-line jsx-a11y/role-supports-aria-props\n\t\t\t\t\t\t\t\tref={ separatorRef }\n\t\t\t\t\t\t\t\trole=\"separator\" // eslint-disable-line jsx-a11y/no-interactive-element-to-noninteractive-role\n\t\t\t\t\t\t\t\taria-valuenow={ usedAriaValueNow }\n\t\t\t\t\t\t\t\taria-label={ __( 'Drag to resize' ) }\n\t\t\t\t\t\t\t\taria-describedby={ separatorHelpId }\n\t\t\t\t\t\t\t\tonKeyDown={ onSeparatorKeyDown }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t<VisuallyHidden id={ separatorHelpId }>\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'Use up and down arrow keys to resize the meta box panel.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t\t</>\n\t\t\t\t),\n\t\t\t},\n\t\t\t// Avoids hiccups while dragging over objects like iframes and ensures that\n\t\t\t// the event to end the drag is captured by the target (resize handle)\n\t\t\t// whether or not it’s under the pointer.\n\t\t\tonPointerDown: ( { pointerId, target } ) => {\n\t\t\t\ttarget.setPointerCapture( pointerId );\n\t\t\t},\n\t\t\tonResizeStart: ( event, direction, elementRef ) => {\n\t\t\t\tif ( isAutoHeight ) {\n\t\t\t\t\t// Sets the starting height to avoid visual jumps in height and\n\t\t\t\t\t// aria-valuenow being `NaN` for the first (few) resize events.\n\t\t\t\t\tapplyHeight( elementRef.offsetHeight, false, true );\n\t\t\t\t\tsetIsUntouched( false );\n\t\t\t\t}\n\t\t\t},\n\t\t\tonResize: () =>\n\t\t\t\tapplyHeight( metaBoxesMainRef.current.state.height ),\n\t\t\tonResizeStop: () =>\n\t\t\t\tapplyHeight( metaBoxesMainRef.current.state.height, true ),\n\t\t} );\n\t}\n\n\treturn (\n\t\t<Pane aria-label={ paneLabel } { ...paneProps }>\n\t\t\t{ isShort ? (\n\t\t\t\t<button\n\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\tclassName=\"edit-post-meta-boxes-main__presenter\"\n\t\t\t\t\tonClick={ toggle }\n\t\t\t\t>\n\t\t\t\t\t{ paneLabel }\n\t\t\t\t\t<Icon icon={ isOpen ? chevronUp : chevronDown } />\n\t\t\t\t</button>\n\t\t\t) : (\n\t\t\t\t<meta ref={ effectSizeConstraints } />\n\t\t\t) }\n\t\t\t{ contents }\n\t\t</Pane>\n\t);\n}\n\nfunction Layout( {\n\tpostId: initialPostId,\n\tpostType: initialPostType,\n\tsettings,\n\tinitialEdits,\n} ) {\n\tuseCommands();\n\tuseEditPostCommands();\n\tconst paddingAppenderRef = usePaddingAppender();\n\tconst shouldIframe = useShouldIframe();\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\tconst {\n\t\tcurrentPost: { postId: currentPostId, postType: currentPostType },\n\t\tonNavigateToEntityRecord,\n\t\tonNavigateToPreviousEntityRecord,\n\t} = useNavigateToEntityRecord(\n\t\tinitialPostId,\n\t\tinitialPostType,\n\t\t'post-only'\n\t);\n\tconst isEditingTemplate = currentPostType === 'wp_template';\n\tconst {\n\t\tmode,\n\t\tisFullscreenActive,\n\t\thasActiveMetaboxes,\n\t\thasBlockSelected,\n\t\tshowIconLabels,\n\t\tisDistractionFree,\n\t\tshowMetaBoxes,\n\t\thasHistory,\n\t\tisWelcomeGuideVisible,\n\t\ttemplateId,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tconst { get } = select( preferencesStore );\n\t\t\tconst { isFeatureActive, getEditedPostTemplateId } = unlock(\n\t\t\t\tselect( editPostStore )\n\t\t\t);\n\t\t\tconst { canUser, getPostType } = select( coreStore );\n\n\t\t\tconst supportsTemplateMode = settings.supportsTemplateMode;\n\t\t\tconst isViewable =\n\t\t\t\tgetPostType( currentPostType )?.viewable ?? false;\n\t\t\tconst canViewTemplate = canUser( 'read', {\n\t\t\t\tkind: 'postType',\n\t\t\t\tname: 'wp_template',\n\t\t\t} );\n\n\t\t\treturn {\n\t\t\t\tmode: select( editorStore ).getEditorMode(),\n\t\t\t\tisFullscreenActive:\n\t\t\t\t\tselect( editPostStore ).isFeatureActive( 'fullscreenMode' ),\n\t\t\t\thasActiveMetaboxes: select( editPostStore ).hasMetaBoxes(),\n\t\t\t\thasBlockSelected:\n\t\t\t\t\t!! select( blockEditorStore ).getBlockSelectionStart(),\n\t\t\t\tshowIconLabels: get( 'core', 'showIconLabels' ),\n\t\t\t\tisDistractionFree: get( 'core', 'distractionFree' ),\n\t\t\t\tshowMetaBoxes:\n\t\t\t\t\t! DESIGN_POST_TYPES.includes( currentPostType ) &&\n\t\t\t\t\tselect( editorStore ).getRenderingMode() === 'post-only',\n\t\t\t\tisWelcomeGuideVisible: isFeatureActive( 'welcomeGuide' ),\n\t\t\t\ttemplateId:\n\t\t\t\t\tsupportsTemplateMode &&\n\t\t\t\t\tisViewable &&\n\t\t\t\t\tcanViewTemplate &&\n\t\t\t\t\t! isEditingTemplate\n\t\t\t\t\t\t? getEditedPostTemplateId()\n\t\t\t\t\t\t: null,\n\t\t\t};\n\t\t},\n\t\t[ currentPostType, isEditingTemplate, settings.supportsTemplateMode ]\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: 'entity-edit';\n\tuseCommandContext( commandContext );\n\tconst editorSettings = useMemo(\n\t\t() => ( {\n\t\t\t...settings,\n\t\t\tonNavigateToEntityRecord,\n\t\t\tonNavigateToPreviousEntityRecord,\n\t\t\tdefaultRenderingMode: 'post-only',\n\t\t} ),\n\t\t[ settings, onNavigateToEntityRecord, onNavigateToPreviousEntityRecord ]\n\t);\n\tconst styles = useEditorStyles();\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 navigateRegionsProps = useNavigateRegions();\n\n\tconst className = clsx( 'edit-post-layout', 'is-mode-' + mode, {\n\t\t'has-metaboxes': hasActiveMetaboxes,\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 or template, e.g: \"Hello world\".\n\t\t\t\t\t\t\t\t__( '\"%s\" successfully created.' ),\n\t\t\t\t\t\t\t\tdecodeEntities( title )\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\tconst initialPost = useMemo( () => {\n\t\treturn {\n\t\t\ttype: initialPostType,\n\t\t\tid: initialPostId,\n\t\t};\n\t}, [ initialPostType, initialPostId ] );\n\n\tconst backButton =\n\t\tuseViewportMatch( 'medium' ) && isFullscreenActive ? (\n\t\t\t<BackButton initialPost={ initialPost } />\n\t\t) : null;\n\n\treturn (\n\t\t<SlotFillProvider>\n\t\t\t<ErrorBoundary>\n\t\t\t\t<CommandMenu />\n\t\t\t\t<WelcomeGuide postType={ currentPostType } />\n\t\t\t\t<div\n\t\t\t\t\tclassName={ navigateRegionsProps.className }\n\t\t\t\t\t{ ...navigateRegionsProps }\n\t\t\t\t\tref={ navigateRegionsProps.ref }\n\t\t\t\t>\n\t\t\t\t\t<Editor\n\t\t\t\t\t\tsettings={ editorSettings }\n\t\t\t\t\t\tinitialEdits={ initialEdits }\n\t\t\t\t\t\tpostType={ currentPostType }\n\t\t\t\t\t\tpostId={ currentPostId }\n\t\t\t\t\t\ttemplateId={ templateId }\n\t\t\t\t\t\tclassName={ className }\n\t\t\t\t\t\tstyles={ styles }\n\t\t\t\t\t\tforceIsDirty={ hasActiveMetaboxes }\n\t\t\t\t\t\tcontentRef={ paddingAppenderRef }\n\t\t\t\t\t\tdisableIframe={ ! shouldIframe }\n\t\t\t\t\t\t// We should auto-focus the canvas (title) on load.\n\t\t\t\t\t\t// eslint-disable-next-line jsx-a11y/no-autofocus\n\t\t\t\t\t\tautoFocus={ ! isWelcomeGuideVisible }\n\t\t\t\t\t\tonActionPerformed={ onActionPerformed }\n\t\t\t\t\t\textraSidebarPanels={\n\t\t\t\t\t\t\tshowMetaBoxes && <MetaBoxes location=\"side\" />\n\t\t\t\t\t\t}\n\t\t\t\t\t\textraContent={\n\t\t\t\t\t\t\t! isDistractionFree &&\n\t\t\t\t\t\t\tshowMetaBoxes && (\n\t\t\t\t\t\t\t\t<MetaBoxesMain isLegacy={ ! shouldIframe } />\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t<PostLockedModal />\n\t\t\t\t\t\t<EditorInitialization />\n\t\t\t\t\t\t<FullscreenMode isActive={ isFullscreenActive } />\n\t\t\t\t\t\t<BrowserURL hasHistory={ hasHistory } />\n\t\t\t\t\t\t<UnsavedChangesWarning />\n\t\t\t\t\t\t<AutosaveMonitor />\n\t\t\t\t\t\t<LocalAutosaveMonitor />\n\t\t\t\t\t\t<EditPostKeyboardShortcuts />\n\t\t\t\t\t\t<EditorKeyboardShortcutsRegister />\n\t\t\t\t\t\t<BlockKeyboardShortcuts />\n\t\t\t\t\t\t<InitPatternModal />\n\t\t\t\t\t\t<PluginArea onError={ onPluginAreaError } />\n\t\t\t\t\t\t<PostEditorMoreMenu />\n\t\t\t\t\t\t{ backButton }\n\t\t\t\t\t\t<EditorSnackbars />\n\t\t\t\t\t</Editor>\n\t\t\t\t</div>\n\t\t\t</ErrorBoundary>\n\t\t</SlotFillProvider>\n\t);\n}\n\nexport default Layout;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,OAAA,GAAAD,OAAA;AAWA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAIA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AAOA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,QAAA,GAAAR,OAAA;AACA,IAAAS,YAAA,GAAAT,OAAA;AACA,IAAAU,SAAA,GAAAV,OAAA;AAIA,IAAAW,aAAA,GAAAX,OAAA;AACA,IAAAY,aAAA,GAAAZ,OAAA;AACA,IAAAa,IAAA,GAAAb,OAAA;AACA,IAAAc,aAAA,GAAAd,OAAA;AACA,IAAAe,SAAA,GAAAf,OAAA;AACA,IAAAgB,WAAA,GAAAhB,OAAA;AAQA,IAAAiB,QAAA,GAAAjB,OAAA;AASA,IAAAkB,WAAA,GAAAnB,sBAAA,CAAAC,OAAA;AACA,IAAAmB,qBAAA,GAAApB,sBAAA,CAAAC,OAAA;AACA,IAAAoB,kBAAA,GAAArB,sBAAA,CAAAC,OAAA;AACA,IAAAqB,iBAAA,GAAAtB,sBAAA,CAAAC,OAAA;AAC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equireDefault","require","_editor","_data","_blockEditor","_plugins","_i18n","_element","_icons","_notices","_preferences","_commands","_coreCommands","_blockLibrary","_url","_htmlEntities","_coreData","_components","_compose","_backButton","_editorInitialization","_keyboardShortcuts","_initPatternModal","_browserUrl","_metaBoxes","_moreMenu","_welcomeGuide","_store","_lockUnlock","_useCommands","_usePaddingAppender","_useShouldIframe","_useNavigateToEntityRecord","_jsxRuntime","getLayoutStyles","unlock","blockEditorPrivateApis","useCommands","coreCommandsPrivateApis","useCommandContext","commandsPrivateApis","Editor","FullscreenMode","NavigableRegion","editorPrivateApis","BlockKeyboardShortcuts","blockLibraryPrivateApis","DESIGN_POST_TYPES","useEditorStyles","hasThemeStyleSupport","editorSettings","isZoomedOutView","renderingMode","postType","useSelect","select","__unstableGetEditorMode","blockEditorStore","getCurrentPostType","getRenderingMode","editorStore","_postType","editPostStore","isFeatureActive","getEditorSettings","useMemo","_editorSettings$style","_editorSettings$defau","_editorSettings$style2","_editorSettings$style3","presetStyles","styles","filter","style","__unstableType","defaultEditorStyles","hasThemeStyles","length","disableLayoutStyles","push","css","selector","hasBlockGapSupport","hasFallbackGapSupport","fallbackGapValue","baseStyles","includes","MetaBoxesMain","isLegacy","isOpen","openHeight","hasAnyVisible","get","preferencesStore","isMetaBoxLocationVisible","set","setPreference","useDispatch","metaBoxesMainRef","useRef","isShort","useMediaQuery","min","max","setHeightConstraints","useState","effectSizeConstraints","useRefEffect","node","container","closest","noticeLists","querySelectorAll","resizeHandle","querySelector","deriveConstraints","fullHeight","offsetHeight","nextMax","element","nextMin","observer","window","ResizeObserver","observe","disconnect","separatorRef","separatorHelpId","useId","isUntouched","setIsUntouched","applyHeight","candidateHeight","isPersistent","isInstant","nextHeight","Math","current","ariaValueNow","getAriaValueNow","updateSize","height","width","contents","jsxs","className","clsx","hidden","children","jsx","default","location","isAutoHeight","undefined","usedMax","round","usedAriaValueNow","toggle","onSeparatorKeyDown","event","delta","ArrowUp","ArrowDown","key","pane","resizable","fromHeight","preventDefault","paneLabel","__","Pane","paneProps","ResizableBox","as","ref","defaultSize","minHeight","maxHeight","enable","top","right","bottom","left","topLeft","topRight","bottomRight","bottomLeft","handleClasses","handleComponent","Fragment","Tooltip","text","role","onKeyDown","VisuallyHidden","id","onPointerDown","pointerId","target","setPointerCapture","onResizeStart","direction","elementRef","onResize","state","onResizeStop","onClick","Icon","icon","chevronUp","chevronDown","Layout","postId","initialPostId","initialPostType","settings","initialEdits","useEditPostCommands","paddingAppenderRef","usePaddingAppender","shouldIframe","useShouldIframe","createErrorNotice","noticesStore","currentPost","currentPostId","currentPostType","onNavigateToEntityRecord","onNavigateToPreviousEntityRecord","useNavigateToEntityRecord","isEditingTemplate","mode","isFullscreenActive","hasActiveMetaboxes","hasBlockSelected","showIconLabels","isDistractionFree","showMetaBoxes","hasHistory","isWelcomeGuideVisible","templateId","_getPostType$viewable","getEditedPostTemplateId","canUser","getPostType","coreStore","supportsTemplateMode","isViewable","viewable","canViewTemplate","kind","name","isZoomOut","getEditorMode","hasMetaBoxes","getBlockSelectionStart","commandContext","defaultRenderingMode","document","body","classList","add","remove","navigateRegionsProps","useNavigateRegions","onPluginAreaError","sprintf","createSuccessNotice","onActionPerformed","useCallback","actionId","items","href","addQueryArgs","trashed","post_type","type","ids","newItem","title","rendered","decodeEntities","actions","label","post","action","initialPost","backButton","useViewportMatch","SlotFillProvider","ErrorBoundary","CommandMenu","forceIsDirty","contentRef","disableIframe","autoFocus","extraSidebarPanels","extraContent","PostLockedModal","isActive","UnsavedChangesWarning","AutosaveMonitor","LocalAutosaveMonitor","EditorKeyboardShortcutsRegister","PluginArea","onError","EditorSnackbars","_default","exports"],"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\tEditorKeyboardShortcutsRegister,\n\tEditorSnackbars,\n\tErrorBoundary,\n\tPostLockedModal,\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { PluginArea } from '@wordpress/plugins';\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\tuseCallback,\n\tuseMemo,\n\tuseId,\n\tuseRef,\n\tuseState,\n} from '@wordpress/element';\nimport { chevronDown, chevronUp } from '@wordpress/icons';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport {\n\tCommandMenu,\n\tprivateApis as commandsPrivateApis,\n} from '@wordpress/commands';\nimport { privateApis as coreCommandsPrivateApis } from '@wordpress/core-commands';\nimport { privateApis as blockLibraryPrivateApis } from '@wordpress/block-library';\nimport { addQueryArgs } from '@wordpress/url';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { store as coreStore } from '@wordpress/core-data';\nimport {\n\tIcon,\n\tResizableBox,\n\tSlotFillProvider,\n\tTooltip,\n\tVisuallyHidden,\n\t__unstableUseNavigateRegions as useNavigateRegions,\n} from '@wordpress/components';\nimport {\n\tuseMediaQuery,\n\tuseRefEffect,\n\tuseViewportMatch,\n} from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BackButton from '../back-button';\nimport EditorInitialization from '../editor-initialization';\nimport EditPostKeyboardShortcuts from '../keyboard-shortcuts';\nimport InitPatternModal from '../init-pattern-modal';\nimport BrowserURL from '../browser-url';\nimport MetaBoxes from '../meta-boxes';\nimport PostEditorMoreMenu from '../more-menu';\nimport WelcomeGuide from '../welcome-guide';\nimport { store as editPostStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport useEditPostCommands from '../../commands/use-commands';\nimport { usePaddingAppender } from './use-padding-appender';\nimport { useShouldIframe } from './use-should-iframe';\nimport useNavigateToEntityRecord from '../../hooks/use-navigate-to-entity-record';\n\nconst { getLayoutStyles } = unlock( blockEditorPrivateApis );\nconst { useCommands } = unlock( coreCommandsPrivateApis );\nconst { useCommandContext } = unlock( commandsPrivateApis );\nconst { Editor, FullscreenMode, NavigableRegion } = unlock( editorPrivateApis );\nconst { BlockKeyboardShortcuts } = unlock( blockLibraryPrivateApis );\nconst DESIGN_POST_TYPES = [\n\t'wp_template',\n\t'wp_template_part',\n\t'wp_block',\n\t'wp_navigation',\n];\n\nfunction useEditorStyles() {\n\tconst {\n\t\thasThemeStyleSupport,\n\t\teditorSettings,\n\t\tisZoomedOutView,\n\t\trenderingMode,\n\t\tpostType,\n\t} = useSelect( ( select ) => {\n\t\tconst { __unstableGetEditorMode } = select( blockEditorStore );\n\t\tconst { getCurrentPostType, getRenderingMode } = select( editorStore );\n\t\tconst _postType = getCurrentPostType();\n\t\treturn {\n\t\t\thasThemeStyleSupport:\n\t\t\t\tselect( editPostStore ).isFeatureActive( 'themeStyles' ),\n\t\t\teditorSettings: select( editorStore ).getEditorSettings(),\n\t\t\tisZoomedOutView: __unstableGetEditorMode() === 'zoom-out',\n\t\t\trenderingMode: getRenderingMode(),\n\t\t\tpostType: _postType,\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\tconst baseStyles = hasThemeStyles\n\t\t\t? editorSettings.styles ?? []\n\t\t\t: defaultEditorStyles;\n\n\t\t// Add a space for the typewriter effect. When typing in the last block,\n\t\t// there needs to be room to scroll up.\n\t\tif (\n\t\t\t! isZoomedOutView &&\n\t\t\trenderingMode === 'post-only' &&\n\t\t\t! DESIGN_POST_TYPES.includes( postType )\n\t\t) {\n\t\t\treturn [\n\t\t\t\t...baseStyles,\n\t\t\t\t{\n\t\t\t\t\tcss: ':root :where(.editor-styles-wrapper)::after {content: \"\"; display: block; height: 40vh;}',\n\t\t\t\t},\n\t\t\t];\n\t\t}\n\n\t\treturn baseStyles;\n\t}, [\n\t\teditorSettings.defaultEditorStyles,\n\t\teditorSettings.disableLayoutStyles,\n\t\teditorSettings.styles,\n\t\thasThemeStyleSupport,\n\t\tpostType,\n\t] );\n}\n\n/**\n * @param {Object} props\n * @param {boolean} props.isLegacy True when the editor canvas is not in an iframe.\n */\nfunction MetaBoxesMain( { isLegacy } ) {\n\tconst [ isOpen, openHeight, hasAnyVisible ] = useSelect( ( select ) => {\n\t\tconst { get } = select( preferencesStore );\n\t\tconst { isMetaBoxLocationVisible } = select( editPostStore );\n\t\treturn [\n\t\t\tget( 'core/edit-post', 'metaBoxesMainIsOpen' ),\n\t\t\tget( 'core/edit-post', 'metaBoxesMainOpenHeight' ),\n\t\t\tisMetaBoxLocationVisible( 'normal' ) ||\n\t\t\t\tisMetaBoxLocationVisible( 'advanced' ) ||\n\t\t\t\tisMetaBoxLocationVisible( 'side' ),\n\t\t];\n\t}, [] );\n\tconst { set: setPreference } = useDispatch( preferencesStore );\n\tconst metaBoxesMainRef = useRef();\n\tconst isShort = useMediaQuery( '(max-height: 549px)' );\n\n\tconst [ { min, max }, setHeightConstraints ] = useState( () => ( {} ) );\n\t// Keeps the resizable area’s size constraints updated taking into account\n\t// editor notices. The constraints are also used to derive the value for the\n\t// aria-valuenow attribute on the seperator.\n\tconst effectSizeConstraints = useRefEffect( ( node ) => {\n\t\tconst container = node.closest(\n\t\t\t'.interface-interface-skeleton__content'\n\t\t);\n\t\tconst noticeLists = container.querySelectorAll(\n\t\t\t':scope > .components-notice-list'\n\t\t);\n\t\tconst resizeHandle = container.querySelector(\n\t\t\t'.edit-post-meta-boxes-main__presenter'\n\t\t);\n\t\tconst deriveConstraints = () => {\n\t\t\tconst fullHeight = container.offsetHeight;\n\t\t\tlet nextMax = fullHeight;\n\t\t\tfor ( const element of noticeLists ) {\n\t\t\t\tnextMax -= element.offsetHeight;\n\t\t\t}\n\t\t\tconst nextMin = resizeHandle.offsetHeight;\n\t\t\tsetHeightConstraints( { min: nextMin, max: nextMax } );\n\t\t};\n\t\tconst observer = new window.ResizeObserver( deriveConstraints );\n\t\tobserver.observe( container );\n\t\tfor ( const element of noticeLists ) {\n\t\t\tobserver.observe( element );\n\t\t}\n\t\treturn () => observer.disconnect();\n\t}, [] );\n\n\tconst separatorRef = useRef();\n\tconst separatorHelpId = useId();\n\n\tconst [ isUntouched, setIsUntouched ] = useState( true );\n\tconst applyHeight = ( candidateHeight, isPersistent, isInstant ) => {\n\t\tconst nextHeight = Math.min( max, Math.max( min, candidateHeight ) );\n\t\tif ( isPersistent ) {\n\t\t\tsetPreference(\n\t\t\t\t'core/edit-post',\n\t\t\t\t'metaBoxesMainOpenHeight',\n\t\t\t\tnextHeight\n\t\t\t);\n\t\t} else {\n\t\t\tseparatorRef.current.ariaValueNow = getAriaValueNow( nextHeight );\n\t\t}\n\t\tif ( isInstant ) {\n\t\t\tmetaBoxesMainRef.current.updateSize( {\n\t\t\t\theight: nextHeight,\n\t\t\t\t// Oddly, when the event that triggered this was not from the mouse (e.g. keydown),\n\t\t\t\t// if `width` is left unspecified a subsequent drag gesture applies a fixed\n\t\t\t\t// width and the pane fails to widen/narrow with parent width changes from\n\t\t\t\t// sidebars opening/closing or window resizes.\n\t\t\t\twidth: 'auto',\n\t\t\t} );\n\t\t}\n\t};\n\n\tif ( ! hasAnyVisible ) {\n\t\treturn;\n\t}\n\n\tconst contents = (\n\t\t<div\n\t\t\tclassName={ clsx(\n\t\t\t\t// The class name 'edit-post-layout__metaboxes' is retained because some plugins use it.\n\t\t\t\t'edit-post-layout__metaboxes',\n\t\t\t\t! isLegacy && 'edit-post-meta-boxes-main__liner'\n\t\t\t) }\n\t\t\thidden={ ! isLegacy && isShort && ! isOpen }\n\t\t>\n\t\t\t<MetaBoxes location=\"normal\" />\n\t\t\t<MetaBoxes location=\"advanced\" />\n\t\t</div>\n\t);\n\n\tif ( isLegacy ) {\n\t\treturn contents;\n\t}\n\n\tconst isAutoHeight = openHeight === undefined;\n\tlet usedMax = '50%'; // Approximation before max has a value.\n\tif ( max !== undefined ) {\n\t\t// Halves the available max height until a user height is set.\n\t\tusedMax = isAutoHeight && isUntouched ? max / 2 : max;\n\t}\n\n\tconst getAriaValueNow = ( height ) =>\n\t\tMath.round( ( ( height - min ) / ( max - min ) ) * 100 );\n\tconst usedAriaValueNow =\n\t\tmax === undefined || isAutoHeight ? 50 : getAriaValueNow( openHeight );\n\n\tconst toggle = () =>\n\t\tsetPreference( 'core/edit-post', 'metaBoxesMainIsOpen', ! isOpen );\n\n\t// TODO: Support more/all keyboard interactions from the window splitter pattern:\n\t// https://www.w3.org/WAI/ARIA/apg/patterns/windowsplitter/\n\tconst onSeparatorKeyDown = ( event ) => {\n\t\tconst delta = { ArrowUp: 20, ArrowDown: -20 }[ event.key ];\n\t\tif ( delta ) {\n\t\t\tconst pane = metaBoxesMainRef.current.resizable;\n\t\t\tconst fromHeight = isAutoHeight ? pane.offsetHeight : openHeight;\n\t\t\tconst nextHeight = delta + fromHeight;\n\t\t\tapplyHeight( nextHeight, true, true );\n\t\t\tevent.preventDefault();\n\t\t}\n\t};\n\tconst className = 'edit-post-meta-boxes-main';\n\tconst paneLabel = __( 'Meta Boxes' );\n\tlet Pane, paneProps;\n\tif ( isShort ) {\n\t\tPane = NavigableRegion;\n\t\tpaneProps = {\n\t\t\tclassName: clsx( className, 'is-toggle-only' ),\n\t\t};\n\t} else {\n\t\tPane = ResizableBox;\n\t\tpaneProps = /** @type {Parameters<typeof ResizableBox>[0]} */ ( {\n\t\t\tas: NavigableRegion,\n\t\t\tref: metaBoxesMainRef,\n\t\t\tclassName: clsx( className, 'is-resizable' ),\n\t\t\tdefaultSize: { height: openHeight },\n\t\t\tminHeight: min,\n\t\t\tmaxHeight: usedMax,\n\t\t\tenable: {\n\t\t\t\ttop: true,\n\t\t\t\tright: false,\n\t\t\t\tbottom: false,\n\t\t\t\tleft: false,\n\t\t\t\ttopLeft: false,\n\t\t\t\ttopRight: false,\n\t\t\t\tbottomRight: false,\n\t\t\t\tbottomLeft: false,\n\t\t\t},\n\t\t\thandleClasses: { top: 'edit-post-meta-boxes-main__presenter' },\n\t\t\thandleComponent: {\n\t\t\t\ttop: (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<Tooltip text={ __( 'Drag to resize' ) }>\n\t\t\t\t\t\t\t<button // eslint-disable-line jsx-a11y/role-supports-aria-props\n\t\t\t\t\t\t\t\tref={ separatorRef }\n\t\t\t\t\t\t\t\trole=\"separator\" // eslint-disable-line jsx-a11y/no-interactive-element-to-noninteractive-role\n\t\t\t\t\t\t\t\taria-valuenow={ usedAriaValueNow }\n\t\t\t\t\t\t\t\taria-label={ __( 'Drag to resize' ) }\n\t\t\t\t\t\t\t\taria-describedby={ separatorHelpId }\n\t\t\t\t\t\t\t\tonKeyDown={ onSeparatorKeyDown }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t<VisuallyHidden id={ separatorHelpId }>\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'Use up and down arrow keys to resize the meta box panel.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t\t</>\n\t\t\t\t),\n\t\t\t},\n\t\t\t// Avoids hiccups while dragging over objects like iframes and ensures that\n\t\t\t// the event to end the drag is captured by the target (resize handle)\n\t\t\t// whether or not it’s under the pointer.\n\t\t\tonPointerDown: ( { pointerId, target } ) => {\n\t\t\t\ttarget.setPointerCapture( pointerId );\n\t\t\t},\n\t\t\tonResizeStart: ( event, direction, elementRef ) => {\n\t\t\t\tif ( isAutoHeight ) {\n\t\t\t\t\t// Sets the starting height to avoid visual jumps in height and\n\t\t\t\t\t// aria-valuenow being `NaN` for the first (few) resize events.\n\t\t\t\t\tapplyHeight( elementRef.offsetHeight, false, true );\n\t\t\t\t\tsetIsUntouched( false );\n\t\t\t\t}\n\t\t\t},\n\t\t\tonResize: () =>\n\t\t\t\tapplyHeight( metaBoxesMainRef.current.state.height ),\n\t\t\tonResizeStop: () =>\n\t\t\t\tapplyHeight( metaBoxesMainRef.current.state.height, true ),\n\t\t} );\n\t}\n\n\treturn (\n\t\t<Pane aria-label={ paneLabel } { ...paneProps }>\n\t\t\t{ isShort ? (\n\t\t\t\t<button\n\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\tclassName=\"edit-post-meta-boxes-main__presenter\"\n\t\t\t\t\tonClick={ toggle }\n\t\t\t\t>\n\t\t\t\t\t{ paneLabel }\n\t\t\t\t\t<Icon icon={ isOpen ? chevronUp : chevronDown } />\n\t\t\t\t</button>\n\t\t\t) : (\n\t\t\t\t<meta ref={ effectSizeConstraints } />\n\t\t\t) }\n\t\t\t{ contents }\n\t\t</Pane>\n\t);\n}\n\nfunction Layout( {\n\tpostId: initialPostId,\n\tpostType: initialPostType,\n\tsettings,\n\tinitialEdits,\n} ) {\n\tuseCommands();\n\tuseEditPostCommands();\n\tconst paddingAppenderRef = usePaddingAppender();\n\tconst shouldIframe = useShouldIframe();\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\tconst {\n\t\tcurrentPost: { postId: currentPostId, postType: currentPostType },\n\t\tonNavigateToEntityRecord,\n\t\tonNavigateToPreviousEntityRecord,\n\t} = useNavigateToEntityRecord(\n\t\tinitialPostId,\n\t\tinitialPostType,\n\t\t'post-only'\n\t);\n\tconst isEditingTemplate = currentPostType === 'wp_template';\n\tconst {\n\t\tmode,\n\t\tisFullscreenActive,\n\t\thasActiveMetaboxes,\n\t\thasBlockSelected,\n\t\tshowIconLabels,\n\t\tisDistractionFree,\n\t\tshowMetaBoxes,\n\t\thasHistory,\n\t\tisWelcomeGuideVisible,\n\t\ttemplateId,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tconst { get } = select( preferencesStore );\n\t\t\tconst { isFeatureActive, getEditedPostTemplateId } = unlock(\n\t\t\t\tselect( editPostStore )\n\t\t\t);\n\t\t\tconst { canUser, getPostType } = select( coreStore );\n\t\t\tconst { __unstableGetEditorMode } = unlock(\n\t\t\t\tselect( blockEditorStore )\n\t\t\t);\n\n\t\t\tconst supportsTemplateMode = settings.supportsTemplateMode;\n\t\t\tconst isViewable =\n\t\t\t\tgetPostType( currentPostType )?.viewable ?? false;\n\t\t\tconst canViewTemplate = canUser( 'read', {\n\t\t\t\tkind: 'postType',\n\t\t\t\tname: 'wp_template',\n\t\t\t} );\n\n\t\t\tconst isZoomOut = __unstableGetEditorMode() === 'zoom-out';\n\n\t\t\treturn {\n\t\t\t\tmode: select( editorStore ).getEditorMode(),\n\t\t\t\tisFullscreenActive:\n\t\t\t\t\tselect( editPostStore ).isFeatureActive( 'fullscreenMode' ),\n\t\t\t\thasActiveMetaboxes: select( editPostStore ).hasMetaBoxes(),\n\t\t\t\thasBlockSelected:\n\t\t\t\t\t!! select( blockEditorStore ).getBlockSelectionStart(),\n\t\t\t\tshowIconLabels: get( 'core', 'showIconLabels' ),\n\t\t\t\tisDistractionFree: get( 'core', 'distractionFree' ),\n\t\t\t\tshowMetaBoxes:\n\t\t\t\t\t! DESIGN_POST_TYPES.includes( currentPostType ) &&\n\t\t\t\t\tselect( editorStore ).getRenderingMode() === 'post-only' &&\n\t\t\t\t\t! isZoomOut,\n\t\t\t\tisWelcomeGuideVisible: isFeatureActive( 'welcomeGuide' ),\n\t\t\t\ttemplateId:\n\t\t\t\t\tsupportsTemplateMode &&\n\t\t\t\t\tisViewable &&\n\t\t\t\t\tcanViewTemplate &&\n\t\t\t\t\t! isEditingTemplate\n\t\t\t\t\t\t? getEditedPostTemplateId()\n\t\t\t\t\t\t: null,\n\t\t\t};\n\t\t},\n\t\t[ currentPostType, isEditingTemplate, settings.supportsTemplateMode ]\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: 'entity-edit';\n\tuseCommandContext( commandContext );\n\tconst editorSettings = useMemo(\n\t\t() => ( {\n\t\t\t...settings,\n\t\t\tonNavigateToEntityRecord,\n\t\t\tonNavigateToPreviousEntityRecord,\n\t\t\tdefaultRenderingMode: 'post-only',\n\t\t} ),\n\t\t[ settings, onNavigateToEntityRecord, onNavigateToPreviousEntityRecord ]\n\t);\n\tconst styles = useEditorStyles();\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 navigateRegionsProps = useNavigateRegions();\n\n\tconst className = clsx( 'edit-post-layout', 'is-mode-' + mode, {\n\t\t'has-metaboxes': hasActiveMetaboxes,\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 or template, e.g: \"Hello world\".\n\t\t\t\t\t\t\t\t__( '\"%s\" successfully created.' ),\n\t\t\t\t\t\t\t\tdecodeEntities( title )\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\tconst initialPost = useMemo( () => {\n\t\treturn {\n\t\t\ttype: initialPostType,\n\t\t\tid: initialPostId,\n\t\t};\n\t}, [ initialPostType, initialPostId ] );\n\n\tconst backButton =\n\t\tuseViewportMatch( 'medium' ) && isFullscreenActive ? (\n\t\t\t<BackButton initialPost={ initialPost } />\n\t\t) : null;\n\n\treturn (\n\t\t<SlotFillProvider>\n\t\t\t<ErrorBoundary>\n\t\t\t\t<CommandMenu />\n\t\t\t\t<WelcomeGuide postType={ currentPostType } />\n\t\t\t\t<div\n\t\t\t\t\tclassName={ navigateRegionsProps.className }\n\t\t\t\t\t{ ...navigateRegionsProps }\n\t\t\t\t\tref={ navigateRegionsProps.ref }\n\t\t\t\t>\n\t\t\t\t\t<Editor\n\t\t\t\t\t\tsettings={ editorSettings }\n\t\t\t\t\t\tinitialEdits={ initialEdits }\n\t\t\t\t\t\tpostType={ currentPostType }\n\t\t\t\t\t\tpostId={ currentPostId }\n\t\t\t\t\t\ttemplateId={ templateId }\n\t\t\t\t\t\tclassName={ className }\n\t\t\t\t\t\tstyles={ styles }\n\t\t\t\t\t\tforceIsDirty={ hasActiveMetaboxes }\n\t\t\t\t\t\tcontentRef={ paddingAppenderRef }\n\t\t\t\t\t\tdisableIframe={ ! shouldIframe }\n\t\t\t\t\t\t// We should auto-focus the canvas (title) on load.\n\t\t\t\t\t\t// eslint-disable-next-line jsx-a11y/no-autofocus\n\t\t\t\t\t\tautoFocus={ ! isWelcomeGuideVisible }\n\t\t\t\t\t\tonActionPerformed={ onActionPerformed }\n\t\t\t\t\t\textraSidebarPanels={\n\t\t\t\t\t\t\tshowMetaBoxes && <MetaBoxes location=\"side\" />\n\t\t\t\t\t\t}\n\t\t\t\t\t\textraContent={\n\t\t\t\t\t\t\t! isDistractionFree &&\n\t\t\t\t\t\t\tshowMetaBoxes && (\n\t\t\t\t\t\t\t\t<MetaBoxesMain isLegacy={ ! shouldIframe } />\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t<PostLockedModal />\n\t\t\t\t\t\t<EditorInitialization />\n\t\t\t\t\t\t<FullscreenMode isActive={ isFullscreenActive } />\n\t\t\t\t\t\t<BrowserURL hasHistory={ hasHistory } />\n\t\t\t\t\t\t<UnsavedChangesWarning />\n\t\t\t\t\t\t<AutosaveMonitor />\n\t\t\t\t\t\t<LocalAutosaveMonitor />\n\t\t\t\t\t\t<EditPostKeyboardShortcuts />\n\t\t\t\t\t\t<EditorKeyboardShortcutsRegister />\n\t\t\t\t\t\t<BlockKeyboardShortcuts />\n\t\t\t\t\t\t<InitPatternModal />\n\t\t\t\t\t\t<PluginArea onError={ onPluginAreaError } />\n\t\t\t\t\t\t<PostEditorMoreMenu />\n\t\t\t\t\t\t{ backButton }\n\t\t\t\t\t\t<EditorSnackbars />\n\t\t\t\t\t</Editor>\n\t\t\t\t</div>\n\t\t\t</ErrorBoundary>\n\t\t</SlotFillProvider>\n\t);\n}\n\nexport default Layout;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,OAAA,GAAAD,OAAA;AAWA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAIA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AAOA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,QAAA,GAAAR,OAAA;AACA,IAAAS,YAAA,GAAAT,OAAA;AACA,IAAAU,SAAA,GAAAV,OAAA;AAIA,IAAAW,aAAA,GAAAX,OAAA;AACA,IAAAY,aAAA,GAAAZ,OAAA;AACA,IAA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CAAC,eAC1B,IAAAZ,WAAA,CAAAoH,GAAA,EAAC/H,iBAAA,CAAAgI,OAAgB,IAAE,CAAC,eACpB,IAAArH,WAAA,CAAAoH,GAAA,EAAChJ,QAAA,CAAA2S,UAAU;YAACC,OAAO,EAAGxC;UAAmB,CAAE,CAAC,eAC5C,IAAAxO,WAAA,CAAAoH,GAAA,EAAC5H,SAAA,CAAA6H,OAAkB,IAAE,CAAC,EACpByI,UAAU,eACZ,IAAA9P,WAAA,CAAAoH,GAAA,EAACnJ,OAAA,CAAAgT,eAAe,IAAE,CAAC;QAAA,CACZ;MAAC,CACL,CAAC;IAAA,CACQ;EAAC,CACC,CAAC;AAErB;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAA9J,OAAA,GAEc6D,MAAM","ignoreList":[]}
@@ -370,12 +370,16 @@ function Layout({
370
370
  canUser,
371
371
  getPostType
372
372
  } = select(coreStore);
373
+ const {
374
+ __unstableGetEditorMode
375
+ } = unlock(select(blockEditorStore));
373
376
  const supportsTemplateMode = settings.supportsTemplateMode;
374
377
  const isViewable = (_getPostType$viewable = getPostType(currentPostType)?.viewable) !== null && _getPostType$viewable !== void 0 ? _getPostType$viewable : false;
375
378
  const canViewTemplate = canUser('read', {
376
379
  kind: 'postType',
377
380
  name: 'wp_template'
378
381
  });
382
+ const isZoomOut = __unstableGetEditorMode() === 'zoom-out';
379
383
  return {
380
384
  mode: select(editorStore).getEditorMode(),
381
385
  isFullscreenActive: select(editPostStore).isFeatureActive('fullscreenMode'),
@@ -383,7 +387,7 @@ function Layout({
383
387
  hasBlockSelected: !!select(blockEditorStore).getBlockSelectionStart(),
384
388
  showIconLabels: get('core', 'showIconLabels'),
385
389
  isDistractionFree: get('core', 'distractionFree'),
386
- showMetaBoxes: !DESIGN_POST_TYPES.includes(currentPostType) && select(editorStore).getRenderingMode() === 'post-only',
390
+ showMetaBoxes: !DESIGN_POST_TYPES.includes(currentPostType) && select(editorStore).getRenderingMode() === 'post-only' && !isZoomOut,
387
391
  isWelcomeGuideVisible: isFeatureActive('welcomeGuide'),
388
392
  templateId: supportsTemplateMode && isViewable && canViewTemplate && !isEditingTemplate ? getEditedPostTemplateId() : null
389
393
  };
@@ -1 +1 @@
1
- {"version":3,"names":["clsx","AutosaveMonitor","LocalAutosaveMonitor","UnsavedChangesWarning","EditorKeyboardShortcutsRegister","EditorSnackbars","ErrorBoundary","PostLockedModal","store","editorStore","privateApis","editorPrivateApis","useSelect","useDispatch","blockEditorPrivateApis","blockEditorStore","PluginArea","__","sprintf","useCallback","useMemo","useId","useRef","useState","chevronDown","chevronUp","noticesStore","preferencesStore","CommandMenu","commandsPrivateApis","coreCommandsPrivateApis","blockLibraryPrivateApis","addQueryArgs","decodeEntities","coreStore","Icon","ResizableBox","SlotFillProvider","Tooltip","VisuallyHidden","__unstableUseNavigateRegions","useNavigateRegions","useMediaQuery","useRefEffect","useViewportMatch","BackButton","EditorInitialization","EditPostKeyboardShortcuts","InitPatternModal","BrowserURL","MetaBoxes","PostEditorMoreMenu","WelcomeGuide","editPostStore","unlock","useEditPostCommands","usePaddingAppender","useShouldIframe","useNavigateToEntityRecord","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","getLayoutStyles","useCommands","useCommandContext","Editor","FullscreenMode","NavigableRegion","BlockKeyboardShortcuts","DESIGN_POST_TYPES","useEditorStyles","hasThemeStyleSupport","editorSettings","isZoomedOutView","renderingMode","postType","select","__unstableGetEditorMode","getCurrentPostType","getRenderingMode","_postType","isFeatureActive","getEditorSettings","_editorSettings$style","_editorSettings$defau","_editorSettings$style2","_editorSettings$style3","presetStyles","styles","filter","style","__unstableType","defaultEditorStyles","hasThemeStyles","length","disableLayoutStyles","push","css","selector","hasBlockGapSupport","hasFallbackGapSupport","fallbackGapValue","baseStyles","includes","MetaBoxesMain","isLegacy","isOpen","openHeight","hasAnyVisible","get","isMetaBoxLocationVisible","set","setPreference","metaBoxesMainRef","isShort","min","max","setHeightConstraints","effectSizeConstraints","node","container","closest","noticeLists","querySelectorAll","resizeHandle","querySelector","deriveConstraints","fullHeight","offsetHeight","nextMax","element","nextMin","observer","window","ResizeObserver","observe","disconnect","separatorRef","separatorHelpId","isUntouched","setIsUntouched","applyHeight","candidateHeight","isPersistent","isInstant","nextHeight","Math","current","ariaValueNow","getAriaValueNow","updateSize","height","width","contents","className","hidden","children","location","isAutoHeight","undefined","usedMax","round","usedAriaValueNow","toggle","onSeparatorKeyDown","event","delta","ArrowUp","ArrowDown","key","pane","resizable","fromHeight","preventDefault","paneLabel","Pane","paneProps","as","ref","defaultSize","minHeight","maxHeight","enable","top","right","bottom","left","topLeft","topRight","bottomRight","bottomLeft","handleClasses","handleComponent","text","role","onKeyDown","id","onPointerDown","pointerId","target","setPointerCapture","onResizeStart","direction","elementRef","onResize","state","onResizeStop","onClick","icon","Layout","postId","initialPostId","initialPostType","settings","initialEdits","paddingAppenderRef","shouldIframe","createErrorNotice","currentPost","currentPostId","currentPostType","onNavigateToEntityRecord","onNavigateToPreviousEntityRecord","isEditingTemplate","mode","isFullscreenActive","hasActiveMetaboxes","hasBlockSelected","showIconLabels","isDistractionFree","showMetaBoxes","hasHistory","isWelcomeGuideVisible","templateId","_getPostType$viewable","getEditedPostTemplateId","canUser","getPostType","supportsTemplateMode","isViewable","viewable","canViewTemplate","kind","name","getEditorMode","hasMetaBoxes","getBlockSelectionStart","commandContext","defaultRenderingMode","document","body","classList","add","remove","navigateRegionsProps","onPluginAreaError","createSuccessNotice","onActionPerformed","actionId","items","href","trashed","post_type","type","ids","newItem","title","rendered","actions","label","post","action","initialPost","backButton","forceIsDirty","contentRef","disableIframe","autoFocus","extraSidebarPanels","extraContent","isActive","onError"],"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\tEditorKeyboardShortcutsRegister,\n\tEditorSnackbars,\n\tErrorBoundary,\n\tPostLockedModal,\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { PluginArea } from '@wordpress/plugins';\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\tuseCallback,\n\tuseMemo,\n\tuseId,\n\tuseRef,\n\tuseState,\n} from '@wordpress/element';\nimport { chevronDown, chevronUp } from '@wordpress/icons';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport {\n\tCommandMenu,\n\tprivateApis as commandsPrivateApis,\n} from '@wordpress/commands';\nimport { privateApis as coreCommandsPrivateApis } from '@wordpress/core-commands';\nimport { privateApis as blockLibraryPrivateApis } from '@wordpress/block-library';\nimport { addQueryArgs } from '@wordpress/url';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { store as coreStore } from '@wordpress/core-data';\nimport {\n\tIcon,\n\tResizableBox,\n\tSlotFillProvider,\n\tTooltip,\n\tVisuallyHidden,\n\t__unstableUseNavigateRegions as useNavigateRegions,\n} from '@wordpress/components';\nimport {\n\tuseMediaQuery,\n\tuseRefEffect,\n\tuseViewportMatch,\n} from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BackButton from '../back-button';\nimport EditorInitialization from '../editor-initialization';\nimport EditPostKeyboardShortcuts from '../keyboard-shortcuts';\nimport InitPatternModal from '../init-pattern-modal';\nimport BrowserURL from '../browser-url';\nimport MetaBoxes from '../meta-boxes';\nimport PostEditorMoreMenu from '../more-menu';\nimport WelcomeGuide from '../welcome-guide';\nimport { store as editPostStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport useEditPostCommands from '../../commands/use-commands';\nimport { usePaddingAppender } from './use-padding-appender';\nimport { useShouldIframe } from './use-should-iframe';\nimport useNavigateToEntityRecord from '../../hooks/use-navigate-to-entity-record';\n\nconst { getLayoutStyles } = unlock( blockEditorPrivateApis );\nconst { useCommands } = unlock( coreCommandsPrivateApis );\nconst { useCommandContext } = unlock( commandsPrivateApis );\nconst { Editor, FullscreenMode, NavigableRegion } = unlock( editorPrivateApis );\nconst { BlockKeyboardShortcuts } = unlock( blockLibraryPrivateApis );\nconst DESIGN_POST_TYPES = [\n\t'wp_template',\n\t'wp_template_part',\n\t'wp_block',\n\t'wp_navigation',\n];\n\nfunction useEditorStyles() {\n\tconst {\n\t\thasThemeStyleSupport,\n\t\teditorSettings,\n\t\tisZoomedOutView,\n\t\trenderingMode,\n\t\tpostType,\n\t} = useSelect( ( select ) => {\n\t\tconst { __unstableGetEditorMode } = select( blockEditorStore );\n\t\tconst { getCurrentPostType, getRenderingMode } = select( editorStore );\n\t\tconst _postType = getCurrentPostType();\n\t\treturn {\n\t\t\thasThemeStyleSupport:\n\t\t\t\tselect( editPostStore ).isFeatureActive( 'themeStyles' ),\n\t\t\teditorSettings: select( editorStore ).getEditorSettings(),\n\t\t\tisZoomedOutView: __unstableGetEditorMode() === 'zoom-out',\n\t\t\trenderingMode: getRenderingMode(),\n\t\t\tpostType: _postType,\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\tconst baseStyles = hasThemeStyles\n\t\t\t? editorSettings.styles ?? []\n\t\t\t: defaultEditorStyles;\n\n\t\t// Add a space for the typewriter effect. When typing in the last block,\n\t\t// there needs to be room to scroll up.\n\t\tif (\n\t\t\t! isZoomedOutView &&\n\t\t\trenderingMode === 'post-only' &&\n\t\t\t! DESIGN_POST_TYPES.includes( postType )\n\t\t) {\n\t\t\treturn [\n\t\t\t\t...baseStyles,\n\t\t\t\t{\n\t\t\t\t\tcss: ':root :where(.editor-styles-wrapper)::after {content: \"\"; display: block; height: 40vh;}',\n\t\t\t\t},\n\t\t\t];\n\t\t}\n\n\t\treturn baseStyles;\n\t}, [\n\t\teditorSettings.defaultEditorStyles,\n\t\teditorSettings.disableLayoutStyles,\n\t\teditorSettings.styles,\n\t\thasThemeStyleSupport,\n\t\tpostType,\n\t] );\n}\n\n/**\n * @param {Object} props\n * @param {boolean} props.isLegacy True when the editor canvas is not in an iframe.\n */\nfunction MetaBoxesMain( { isLegacy } ) {\n\tconst [ isOpen, openHeight, hasAnyVisible ] = useSelect( ( select ) => {\n\t\tconst { get } = select( preferencesStore );\n\t\tconst { isMetaBoxLocationVisible } = select( editPostStore );\n\t\treturn [\n\t\t\tget( 'core/edit-post', 'metaBoxesMainIsOpen' ),\n\t\t\tget( 'core/edit-post', 'metaBoxesMainOpenHeight' ),\n\t\t\tisMetaBoxLocationVisible( 'normal' ) ||\n\t\t\t\tisMetaBoxLocationVisible( 'advanced' ) ||\n\t\t\t\tisMetaBoxLocationVisible( 'side' ),\n\t\t];\n\t}, [] );\n\tconst { set: setPreference } = useDispatch( preferencesStore );\n\tconst metaBoxesMainRef = useRef();\n\tconst isShort = useMediaQuery( '(max-height: 549px)' );\n\n\tconst [ { min, max }, setHeightConstraints ] = useState( () => ( {} ) );\n\t// Keeps the resizable area’s size constraints updated taking into account\n\t// editor notices. The constraints are also used to derive the value for the\n\t// aria-valuenow attribute on the seperator.\n\tconst effectSizeConstraints = useRefEffect( ( node ) => {\n\t\tconst container = node.closest(\n\t\t\t'.interface-interface-skeleton__content'\n\t\t);\n\t\tconst noticeLists = container.querySelectorAll(\n\t\t\t':scope > .components-notice-list'\n\t\t);\n\t\tconst resizeHandle = container.querySelector(\n\t\t\t'.edit-post-meta-boxes-main__presenter'\n\t\t);\n\t\tconst deriveConstraints = () => {\n\t\t\tconst fullHeight = container.offsetHeight;\n\t\t\tlet nextMax = fullHeight;\n\t\t\tfor ( const element of noticeLists ) {\n\t\t\t\tnextMax -= element.offsetHeight;\n\t\t\t}\n\t\t\tconst nextMin = resizeHandle.offsetHeight;\n\t\t\tsetHeightConstraints( { min: nextMin, max: nextMax } );\n\t\t};\n\t\tconst observer = new window.ResizeObserver( deriveConstraints );\n\t\tobserver.observe( container );\n\t\tfor ( const element of noticeLists ) {\n\t\t\tobserver.observe( element );\n\t\t}\n\t\treturn () => observer.disconnect();\n\t}, [] );\n\n\tconst separatorRef = useRef();\n\tconst separatorHelpId = useId();\n\n\tconst [ isUntouched, setIsUntouched ] = useState( true );\n\tconst applyHeight = ( candidateHeight, isPersistent, isInstant ) => {\n\t\tconst nextHeight = Math.min( max, Math.max( min, candidateHeight ) );\n\t\tif ( isPersistent ) {\n\t\t\tsetPreference(\n\t\t\t\t'core/edit-post',\n\t\t\t\t'metaBoxesMainOpenHeight',\n\t\t\t\tnextHeight\n\t\t\t);\n\t\t} else {\n\t\t\tseparatorRef.current.ariaValueNow = getAriaValueNow( nextHeight );\n\t\t}\n\t\tif ( isInstant ) {\n\t\t\tmetaBoxesMainRef.current.updateSize( {\n\t\t\t\theight: nextHeight,\n\t\t\t\t// Oddly, when the event that triggered this was not from the mouse (e.g. keydown),\n\t\t\t\t// if `width` is left unspecified a subsequent drag gesture applies a fixed\n\t\t\t\t// width and the pane fails to widen/narrow with parent width changes from\n\t\t\t\t// sidebars opening/closing or window resizes.\n\t\t\t\twidth: 'auto',\n\t\t\t} );\n\t\t}\n\t};\n\n\tif ( ! hasAnyVisible ) {\n\t\treturn;\n\t}\n\n\tconst contents = (\n\t\t<div\n\t\t\tclassName={ clsx(\n\t\t\t\t// The class name 'edit-post-layout__metaboxes' is retained because some plugins use it.\n\t\t\t\t'edit-post-layout__metaboxes',\n\t\t\t\t! isLegacy && 'edit-post-meta-boxes-main__liner'\n\t\t\t) }\n\t\t\thidden={ ! isLegacy && isShort && ! isOpen }\n\t\t>\n\t\t\t<MetaBoxes location=\"normal\" />\n\t\t\t<MetaBoxes location=\"advanced\" />\n\t\t</div>\n\t);\n\n\tif ( isLegacy ) {\n\t\treturn contents;\n\t}\n\n\tconst isAutoHeight = openHeight === undefined;\n\tlet usedMax = '50%'; // Approximation before max has a value.\n\tif ( max !== undefined ) {\n\t\t// Halves the available max height until a user height is set.\n\t\tusedMax = isAutoHeight && isUntouched ? max / 2 : max;\n\t}\n\n\tconst getAriaValueNow = ( height ) =>\n\t\tMath.round( ( ( height - min ) / ( max - min ) ) * 100 );\n\tconst usedAriaValueNow =\n\t\tmax === undefined || isAutoHeight ? 50 : getAriaValueNow( openHeight );\n\n\tconst toggle = () =>\n\t\tsetPreference( 'core/edit-post', 'metaBoxesMainIsOpen', ! isOpen );\n\n\t// TODO: Support more/all keyboard interactions from the window splitter pattern:\n\t// https://www.w3.org/WAI/ARIA/apg/patterns/windowsplitter/\n\tconst onSeparatorKeyDown = ( event ) => {\n\t\tconst delta = { ArrowUp: 20, ArrowDown: -20 }[ event.key ];\n\t\tif ( delta ) {\n\t\t\tconst pane = metaBoxesMainRef.current.resizable;\n\t\t\tconst fromHeight = isAutoHeight ? pane.offsetHeight : openHeight;\n\t\t\tconst nextHeight = delta + fromHeight;\n\t\t\tapplyHeight( nextHeight, true, true );\n\t\t\tevent.preventDefault();\n\t\t}\n\t};\n\tconst className = 'edit-post-meta-boxes-main';\n\tconst paneLabel = __( 'Meta Boxes' );\n\tlet Pane, paneProps;\n\tif ( isShort ) {\n\t\tPane = NavigableRegion;\n\t\tpaneProps = {\n\t\t\tclassName: clsx( className, 'is-toggle-only' ),\n\t\t};\n\t} else {\n\t\tPane = ResizableBox;\n\t\tpaneProps = /** @type {Parameters<typeof ResizableBox>[0]} */ ( {\n\t\t\tas: NavigableRegion,\n\t\t\tref: metaBoxesMainRef,\n\t\t\tclassName: clsx( className, 'is-resizable' ),\n\t\t\tdefaultSize: { height: openHeight },\n\t\t\tminHeight: min,\n\t\t\tmaxHeight: usedMax,\n\t\t\tenable: {\n\t\t\t\ttop: true,\n\t\t\t\tright: false,\n\t\t\t\tbottom: false,\n\t\t\t\tleft: false,\n\t\t\t\ttopLeft: false,\n\t\t\t\ttopRight: false,\n\t\t\t\tbottomRight: false,\n\t\t\t\tbottomLeft: false,\n\t\t\t},\n\t\t\thandleClasses: { top: 'edit-post-meta-boxes-main__presenter' },\n\t\t\thandleComponent: {\n\t\t\t\ttop: (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<Tooltip text={ __( 'Drag to resize' ) }>\n\t\t\t\t\t\t\t<button // eslint-disable-line jsx-a11y/role-supports-aria-props\n\t\t\t\t\t\t\t\tref={ separatorRef }\n\t\t\t\t\t\t\t\trole=\"separator\" // eslint-disable-line jsx-a11y/no-interactive-element-to-noninteractive-role\n\t\t\t\t\t\t\t\taria-valuenow={ usedAriaValueNow }\n\t\t\t\t\t\t\t\taria-label={ __( 'Drag to resize' ) }\n\t\t\t\t\t\t\t\taria-describedby={ separatorHelpId }\n\t\t\t\t\t\t\t\tonKeyDown={ onSeparatorKeyDown }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t<VisuallyHidden id={ separatorHelpId }>\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'Use up and down arrow keys to resize the meta box panel.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t\t</>\n\t\t\t\t),\n\t\t\t},\n\t\t\t// Avoids hiccups while dragging over objects like iframes and ensures that\n\t\t\t// the event to end the drag is captured by the target (resize handle)\n\t\t\t// whether or not it’s under the pointer.\n\t\t\tonPointerDown: ( { pointerId, target } ) => {\n\t\t\t\ttarget.setPointerCapture( pointerId );\n\t\t\t},\n\t\t\tonResizeStart: ( event, direction, elementRef ) => {\n\t\t\t\tif ( isAutoHeight ) {\n\t\t\t\t\t// Sets the starting height to avoid visual jumps in height and\n\t\t\t\t\t// aria-valuenow being `NaN` for the first (few) resize events.\n\t\t\t\t\tapplyHeight( elementRef.offsetHeight, false, true );\n\t\t\t\t\tsetIsUntouched( false );\n\t\t\t\t}\n\t\t\t},\n\t\t\tonResize: () =>\n\t\t\t\tapplyHeight( metaBoxesMainRef.current.state.height ),\n\t\t\tonResizeStop: () =>\n\t\t\t\tapplyHeight( metaBoxesMainRef.current.state.height, true ),\n\t\t} );\n\t}\n\n\treturn (\n\t\t<Pane aria-label={ paneLabel } { ...paneProps }>\n\t\t\t{ isShort ? (\n\t\t\t\t<button\n\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\tclassName=\"edit-post-meta-boxes-main__presenter\"\n\t\t\t\t\tonClick={ toggle }\n\t\t\t\t>\n\t\t\t\t\t{ paneLabel }\n\t\t\t\t\t<Icon icon={ isOpen ? chevronUp : chevronDown } />\n\t\t\t\t</button>\n\t\t\t) : (\n\t\t\t\t<meta ref={ effectSizeConstraints } />\n\t\t\t) }\n\t\t\t{ contents }\n\t\t</Pane>\n\t);\n}\n\nfunction Layout( {\n\tpostId: initialPostId,\n\tpostType: initialPostType,\n\tsettings,\n\tinitialEdits,\n} ) {\n\tuseCommands();\n\tuseEditPostCommands();\n\tconst paddingAppenderRef = usePaddingAppender();\n\tconst shouldIframe = useShouldIframe();\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\tconst {\n\t\tcurrentPost: { postId: currentPostId, postType: currentPostType },\n\t\tonNavigateToEntityRecord,\n\t\tonNavigateToPreviousEntityRecord,\n\t} = useNavigateToEntityRecord(\n\t\tinitialPostId,\n\t\tinitialPostType,\n\t\t'post-only'\n\t);\n\tconst isEditingTemplate = currentPostType === 'wp_template';\n\tconst {\n\t\tmode,\n\t\tisFullscreenActive,\n\t\thasActiveMetaboxes,\n\t\thasBlockSelected,\n\t\tshowIconLabels,\n\t\tisDistractionFree,\n\t\tshowMetaBoxes,\n\t\thasHistory,\n\t\tisWelcomeGuideVisible,\n\t\ttemplateId,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tconst { get } = select( preferencesStore );\n\t\t\tconst { isFeatureActive, getEditedPostTemplateId } = unlock(\n\t\t\t\tselect( editPostStore )\n\t\t\t);\n\t\t\tconst { canUser, getPostType } = select( coreStore );\n\n\t\t\tconst supportsTemplateMode = settings.supportsTemplateMode;\n\t\t\tconst isViewable =\n\t\t\t\tgetPostType( currentPostType )?.viewable ?? false;\n\t\t\tconst canViewTemplate = canUser( 'read', {\n\t\t\t\tkind: 'postType',\n\t\t\t\tname: 'wp_template',\n\t\t\t} );\n\n\t\t\treturn {\n\t\t\t\tmode: select( editorStore ).getEditorMode(),\n\t\t\t\tisFullscreenActive:\n\t\t\t\t\tselect( editPostStore ).isFeatureActive( 'fullscreenMode' ),\n\t\t\t\thasActiveMetaboxes: select( editPostStore ).hasMetaBoxes(),\n\t\t\t\thasBlockSelected:\n\t\t\t\t\t!! select( blockEditorStore ).getBlockSelectionStart(),\n\t\t\t\tshowIconLabels: get( 'core', 'showIconLabels' ),\n\t\t\t\tisDistractionFree: get( 'core', 'distractionFree' ),\n\t\t\t\tshowMetaBoxes:\n\t\t\t\t\t! DESIGN_POST_TYPES.includes( currentPostType ) &&\n\t\t\t\t\tselect( editorStore ).getRenderingMode() === 'post-only',\n\t\t\t\tisWelcomeGuideVisible: isFeatureActive( 'welcomeGuide' ),\n\t\t\t\ttemplateId:\n\t\t\t\t\tsupportsTemplateMode &&\n\t\t\t\t\tisViewable &&\n\t\t\t\t\tcanViewTemplate &&\n\t\t\t\t\t! isEditingTemplate\n\t\t\t\t\t\t? getEditedPostTemplateId()\n\t\t\t\t\t\t: null,\n\t\t\t};\n\t\t},\n\t\t[ currentPostType, isEditingTemplate, settings.supportsTemplateMode ]\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: 'entity-edit';\n\tuseCommandContext( commandContext );\n\tconst editorSettings = useMemo(\n\t\t() => ( {\n\t\t\t...settings,\n\t\t\tonNavigateToEntityRecord,\n\t\t\tonNavigateToPreviousEntityRecord,\n\t\t\tdefaultRenderingMode: 'post-only',\n\t\t} ),\n\t\t[ settings, onNavigateToEntityRecord, onNavigateToPreviousEntityRecord ]\n\t);\n\tconst styles = useEditorStyles();\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 navigateRegionsProps = useNavigateRegions();\n\n\tconst className = clsx( 'edit-post-layout', 'is-mode-' + mode, {\n\t\t'has-metaboxes': hasActiveMetaboxes,\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 or template, e.g: \"Hello world\".\n\t\t\t\t\t\t\t\t__( '\"%s\" successfully created.' ),\n\t\t\t\t\t\t\t\tdecodeEntities( title )\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\tconst initialPost = useMemo( () => {\n\t\treturn {\n\t\t\ttype: initialPostType,\n\t\t\tid: initialPostId,\n\t\t};\n\t}, [ initialPostType, initialPostId ] );\n\n\tconst backButton =\n\t\tuseViewportMatch( 'medium' ) && isFullscreenActive ? (\n\t\t\t<BackButton initialPost={ initialPost } />\n\t\t) : null;\n\n\treturn (\n\t\t<SlotFillProvider>\n\t\t\t<ErrorBoundary>\n\t\t\t\t<CommandMenu />\n\t\t\t\t<WelcomeGuide postType={ currentPostType } />\n\t\t\t\t<div\n\t\t\t\t\tclassName={ navigateRegionsProps.className }\n\t\t\t\t\t{ ...navigateRegionsProps }\n\t\t\t\t\tref={ navigateRegionsProps.ref }\n\t\t\t\t>\n\t\t\t\t\t<Editor\n\t\t\t\t\t\tsettings={ editorSettings }\n\t\t\t\t\t\tinitialEdits={ initialEdits }\n\t\t\t\t\t\tpostType={ currentPostType }\n\t\t\t\t\t\tpostId={ currentPostId }\n\t\t\t\t\t\ttemplateId={ templateId }\n\t\t\t\t\t\tclassName={ className }\n\t\t\t\t\t\tstyles={ styles }\n\t\t\t\t\t\tforceIsDirty={ hasActiveMetaboxes }\n\t\t\t\t\t\tcontentRef={ paddingAppenderRef }\n\t\t\t\t\t\tdisableIframe={ ! shouldIframe }\n\t\t\t\t\t\t// We should auto-focus the canvas (title) on load.\n\t\t\t\t\t\t// eslint-disable-next-line jsx-a11y/no-autofocus\n\t\t\t\t\t\tautoFocus={ ! isWelcomeGuideVisible }\n\t\t\t\t\t\tonActionPerformed={ onActionPerformed }\n\t\t\t\t\t\textraSidebarPanels={\n\t\t\t\t\t\t\tshowMetaBoxes && <MetaBoxes location=\"side\" />\n\t\t\t\t\t\t}\n\t\t\t\t\t\textraContent={\n\t\t\t\t\t\t\t! isDistractionFree &&\n\t\t\t\t\t\t\tshowMetaBoxes && (\n\t\t\t\t\t\t\t\t<MetaBoxesMain isLegacy={ ! shouldIframe } />\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t<PostLockedModal />\n\t\t\t\t\t\t<EditorInitialization />\n\t\t\t\t\t\t<FullscreenMode isActive={ isFullscreenActive } />\n\t\t\t\t\t\t<BrowserURL hasHistory={ hasHistory } />\n\t\t\t\t\t\t<UnsavedChangesWarning />\n\t\t\t\t\t\t<AutosaveMonitor />\n\t\t\t\t\t\t<LocalAutosaveMonitor />\n\t\t\t\t\t\t<EditPostKeyboardShortcuts />\n\t\t\t\t\t\t<EditorKeyboardShortcutsRegister />\n\t\t\t\t\t\t<BlockKeyboardShortcuts />\n\t\t\t\t\t\t<InitPatternModal />\n\t\t\t\t\t\t<PluginArea onError={ onPluginAreaError } />\n\t\t\t\t\t\t<PostEditorMoreMenu />\n\t\t\t\t\t\t{ backButton }\n\t\t\t\t\t\t<EditorSnackbars />\n\t\t\t\t\t</Editor>\n\t\t\t\t</div>\n\t\t\t</ErrorBoundary>\n\t\t</SlotFillProvider>\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,+BAA+B,EAC/BC,eAAe,EACfC,aAAa,EACbC,eAAe,EACfC,KAAK,IAAIC,WAAW,EACpBC,WAAW,IAAIC,iBAAiB,QAC1B,mBAAmB;AAC1B,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SACCH,WAAW,IAAII,sBAAsB,EACrCN,KAAK,IAAIO,gBAAgB,QACnB,yBAAyB;AAChC,SAASC,UAAU,QAAQ,oBAAoB;AAC/C,SAASC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAC7C,SACCC,WAAW,EACXC,OAAO,EACPC,KAAK,EACLC,MAAM,EACNC,QAAQ,QACF,oBAAoB;AAC3B,SAASC,WAAW,EAAEC,SAAS,QAAQ,kBAAkB;AACzD,SAASjB,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AqB,IAAE,CAAC,eACzByD,IAAA,CAAC3D,eAAe,IAAE,CAAC,eACnB2D,IAAA,CAAC1D,oBAAoB,IAAE,CAAC,eACxB0D,IAAA,CAACb,yBAAyB,IAAE,CAAC,eAC7Ba,IAAA,CAACxD,+BAA+B,IAAE,CAAC,eACnCwD,IAAA,CAACW,sBAAsB,IAAE,CAAC,eAC1BX,IAAA,CAACZ,gBAAgB,IAAE,CAAC,eACpBY,IAAA,CAAC5C,UAAU;YAAC4Q,OAAO,EAAG1B;UAAmB,CAAE,CAAC,eAC5CtM,IAAA,CAACT,kBAAkB,IAAE,CAAC,EACpBiO,UAAU,eACZxN,IAAA,CAACvD,eAAe,IAAE,CAAC;QAAA,CACZ;MAAC,CACL,CAAC;IAAA,CACQ;EAAC,CACC,CAAC;AAErB;AAEA,eAAe+M,MAAM","ignoreList":[]}
1
+ {"version":3,"names":["clsx","AutosaveMonitor","LocalAutosaveMonitor","UnsavedChangesWarning","EditorKeyboardShortcutsRegister","EditorSnackbars","ErrorBoundary","PostLockedModal","store","editorStore","privateApis","editorPrivateApis","useSelect","useDispatch","blockEditorPrivateApis","blockEditorStore","PluginArea","__","sprintf","useCallback","useMemo","useId","useRef","useState","chevronDown","chevronUp","noticesStore","preferencesStore","CommandMenu","commandsPrivateApis","coreCommandsPrivateApis","blockLibraryPrivateApis","addQueryArgs","decodeEntities","coreStore","Icon","ResizableBox","SlotFillProvider","Tooltip","VisuallyHidden","__unstableUseNavigateRegions","useNavigateRegions","useMediaQuery","useRefEffect","useViewportMatch","BackButton","EditorInitialization","EditPostKeyboardShortcuts","InitPatternModal","BrowserURL","MetaBoxes","PostEditorMoreMenu","WelcomeGuide","editPostStore","unlock","useEditPostCommands","usePaddingAppender","useShouldIframe","useNavigateToEntityRecord","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","getLayoutStyles","useCommands","useCommandContext","Editor","FullscreenMode","NavigableRegion","BlockKeyboardShortcuts","DESIGN_POST_TYPES","useEditorStyles","hasThemeStyleSupport","editorSettings","isZoomedOutView","renderingMode","postType","select","__unstableGetEditorMode","getCurrentPostType","getRenderingMode","_postType","isFeatureActive","getEditorSettings","_editorSettings$style","_editorSettings$defau","_editorSettings$style2","_editorSettings$style3","presetStyles","styles","filter","style","__unstableType","defaultEditorStyles","hasThemeStyles","length","disableLayoutStyles","push","css","selector","hasBlockGapSupport","hasFallbackGapSupport","fallbackGapValue","baseStyles","includes","MetaBoxesMain","isLegacy","isOpen","openHeight","hasAnyVisible","get","isMetaBoxLocationVisible","set","setPreference","metaBoxesMainRef","isShort","min","max","setHeightConstraints","effectSizeConstraints","node","container","closest","noticeLists","querySelectorAll","resizeHandle","querySelector","deriveConstraints","fullHeight","offsetHeight","nextMax","element","nextMin","observer","window","ResizeObserver","observe","disconnect","separatorRef","separatorHelpId","isUntouched","setIsUntouched","applyHeight","candidateHeight","isPersistent","isInstant","nextHeight","Math","current","ariaValueNow","getAriaValueNow","updateSize","height","width","contents","className","hidden","children","location","isAutoHeight","undefined","usedMax","round","usedAriaValueNow","toggle","onSeparatorKeyDown","event","delta","ArrowUp","ArrowDown","key","pane","resizable","fromHeight","preventDefault","paneLabel","Pane","paneProps","as","ref","defaultSize","minHeight","maxHeight","enable","top","right","bottom","left","topLeft","topRight","bottomRight","bottomLeft","handleClasses","handleComponent","text","role","onKeyDown","id","onPointerDown","pointerId","target","setPointerCapture","onResizeStart","direction","elementRef","onResize","state","onResizeStop","onClick","icon","Layout","postId","initialPostId","initialPostType","settings","initialEdits","paddingAppenderRef","shouldIframe","createErrorNotice","currentPost","currentPostId","currentPostType","onNavigateToEntityRecord","onNavigateToPreviousEntityRecord","isEditingTemplate","mode","isFullscreenActive","hasActiveMetaboxes","hasBlockSelected","showIconLabels","isDistractionFree","showMetaBoxes","hasHistory","isWelcomeGuideVisible","templateId","_getPostType$viewable","getEditedPostTemplateId","canUser","getPostType","supportsTemplateMode","isViewable","viewable","canViewTemplate","kind","name","isZoomOut","getEditorMode","hasMetaBoxes","getBlockSelectionStart","commandContext","defaultRenderingMode","document","body","classList","add","remove","navigateRegionsProps","onPluginAreaError","createSuccessNotice","onActionPerformed","actionId","items","href","trashed","post_type","type","ids","newItem","title","rendered","actions","label","post","action","initialPost","backButton","forceIsDirty","contentRef","disableIframe","autoFocus","extraSidebarPanels","extraContent","isActive","onError"],"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\tEditorKeyboardShortcutsRegister,\n\tEditorSnackbars,\n\tErrorBoundary,\n\tPostLockedModal,\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { PluginArea } from '@wordpress/plugins';\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\tuseCallback,\n\tuseMemo,\n\tuseId,\n\tuseRef,\n\tuseState,\n} from '@wordpress/element';\nimport { chevronDown, chevronUp } from '@wordpress/icons';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport {\n\tCommandMenu,\n\tprivateApis as commandsPrivateApis,\n} from '@wordpress/commands';\nimport { privateApis as coreCommandsPrivateApis } from '@wordpress/core-commands';\nimport { privateApis as blockLibraryPrivateApis } from '@wordpress/block-library';\nimport { addQueryArgs } from '@wordpress/url';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { store as coreStore } from '@wordpress/core-data';\nimport {\n\tIcon,\n\tResizableBox,\n\tSlotFillProvider,\n\tTooltip,\n\tVisuallyHidden,\n\t__unstableUseNavigateRegions as useNavigateRegions,\n} from '@wordpress/components';\nimport {\n\tuseMediaQuery,\n\tuseRefEffect,\n\tuseViewportMatch,\n} from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BackButton from '../back-button';\nimport EditorInitialization from '../editor-initialization';\nimport EditPostKeyboardShortcuts from '../keyboard-shortcuts';\nimport InitPatternModal from '../init-pattern-modal';\nimport BrowserURL from '../browser-url';\nimport MetaBoxes from '../meta-boxes';\nimport PostEditorMoreMenu from '../more-menu';\nimport WelcomeGuide from '../welcome-guide';\nimport { store as editPostStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport useEditPostCommands from '../../commands/use-commands';\nimport { usePaddingAppender } from './use-padding-appender';\nimport { useShouldIframe } from './use-should-iframe';\nimport useNavigateToEntityRecord from '../../hooks/use-navigate-to-entity-record';\n\nconst { getLayoutStyles } = unlock( blockEditorPrivateApis );\nconst { useCommands } = unlock( coreCommandsPrivateApis );\nconst { useCommandContext } = unlock( commandsPrivateApis );\nconst { Editor, FullscreenMode, NavigableRegion } = unlock( editorPrivateApis );\nconst { BlockKeyboardShortcuts } = unlock( blockLibraryPrivateApis );\nconst DESIGN_POST_TYPES = [\n\t'wp_template',\n\t'wp_template_part',\n\t'wp_block',\n\t'wp_navigation',\n];\n\nfunction useEditorStyles() {\n\tconst {\n\t\thasThemeStyleSupport,\n\t\teditorSettings,\n\t\tisZoomedOutView,\n\t\trenderingMode,\n\t\tpostType,\n\t} = useSelect( ( select ) => {\n\t\tconst { __unstableGetEditorMode } = select( blockEditorStore );\n\t\tconst { getCurrentPostType, getRenderingMode } = select( editorStore );\n\t\tconst _postType = getCurrentPostType();\n\t\treturn {\n\t\t\thasThemeStyleSupport:\n\t\t\t\tselect( editPostStore ).isFeatureActive( 'themeStyles' ),\n\t\t\teditorSettings: select( editorStore ).getEditorSettings(),\n\t\t\tisZoomedOutView: __unstableGetEditorMode() === 'zoom-out',\n\t\t\trenderingMode: getRenderingMode(),\n\t\t\tpostType: _postType,\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\tconst baseStyles = hasThemeStyles\n\t\t\t? editorSettings.styles ?? []\n\t\t\t: defaultEditorStyles;\n\n\t\t// Add a space for the typewriter effect. When typing in the last block,\n\t\t// there needs to be room to scroll up.\n\t\tif (\n\t\t\t! isZoomedOutView &&\n\t\t\trenderingMode === 'post-only' &&\n\t\t\t! DESIGN_POST_TYPES.includes( postType )\n\t\t) {\n\t\t\treturn [\n\t\t\t\t...baseStyles,\n\t\t\t\t{\n\t\t\t\t\tcss: ':root :where(.editor-styles-wrapper)::after {content: \"\"; display: block; height: 40vh;}',\n\t\t\t\t},\n\t\t\t];\n\t\t}\n\n\t\treturn baseStyles;\n\t}, [\n\t\teditorSettings.defaultEditorStyles,\n\t\teditorSettings.disableLayoutStyles,\n\t\teditorSettings.styles,\n\t\thasThemeStyleSupport,\n\t\tpostType,\n\t] );\n}\n\n/**\n * @param {Object} props\n * @param {boolean} props.isLegacy True when the editor canvas is not in an iframe.\n */\nfunction MetaBoxesMain( { isLegacy } ) {\n\tconst [ isOpen, openHeight, hasAnyVisible ] = useSelect( ( select ) => {\n\t\tconst { get } = select( preferencesStore );\n\t\tconst { isMetaBoxLocationVisible } = select( editPostStore );\n\t\treturn [\n\t\t\tget( 'core/edit-post', 'metaBoxesMainIsOpen' ),\n\t\t\tget( 'core/edit-post', 'metaBoxesMainOpenHeight' ),\n\t\t\tisMetaBoxLocationVisible( 'normal' ) ||\n\t\t\t\tisMetaBoxLocationVisible( 'advanced' ) ||\n\t\t\t\tisMetaBoxLocationVisible( 'side' ),\n\t\t];\n\t}, [] );\n\tconst { set: setPreference } = useDispatch( preferencesStore );\n\tconst metaBoxesMainRef = useRef();\n\tconst isShort = useMediaQuery( '(max-height: 549px)' );\n\n\tconst [ { min, max }, setHeightConstraints ] = useState( () => ( {} ) );\n\t// Keeps the resizable area’s size constraints updated taking into account\n\t// editor notices. The constraints are also used to derive the value for the\n\t// aria-valuenow attribute on the seperator.\n\tconst effectSizeConstraints = useRefEffect( ( node ) => {\n\t\tconst container = node.closest(\n\t\t\t'.interface-interface-skeleton__content'\n\t\t);\n\t\tconst noticeLists = container.querySelectorAll(\n\t\t\t':scope > .components-notice-list'\n\t\t);\n\t\tconst resizeHandle = container.querySelector(\n\t\t\t'.edit-post-meta-boxes-main__presenter'\n\t\t);\n\t\tconst deriveConstraints = () => {\n\t\t\tconst fullHeight = container.offsetHeight;\n\t\t\tlet nextMax = fullHeight;\n\t\t\tfor ( const element of noticeLists ) {\n\t\t\t\tnextMax -= element.offsetHeight;\n\t\t\t}\n\t\t\tconst nextMin = resizeHandle.offsetHeight;\n\t\t\tsetHeightConstraints( { min: nextMin, max: nextMax } );\n\t\t};\n\t\tconst observer = new window.ResizeObserver( deriveConstraints );\n\t\tobserver.observe( container );\n\t\tfor ( const element of noticeLists ) {\n\t\t\tobserver.observe( element );\n\t\t}\n\t\treturn () => observer.disconnect();\n\t}, [] );\n\n\tconst separatorRef = useRef();\n\tconst separatorHelpId = useId();\n\n\tconst [ isUntouched, setIsUntouched ] = useState( true );\n\tconst applyHeight = ( candidateHeight, isPersistent, isInstant ) => {\n\t\tconst nextHeight = Math.min( max, Math.max( min, candidateHeight ) );\n\t\tif ( isPersistent ) {\n\t\t\tsetPreference(\n\t\t\t\t'core/edit-post',\n\t\t\t\t'metaBoxesMainOpenHeight',\n\t\t\t\tnextHeight\n\t\t\t);\n\t\t} else {\n\t\t\tseparatorRef.current.ariaValueNow = getAriaValueNow( nextHeight );\n\t\t}\n\t\tif ( isInstant ) {\n\t\t\tmetaBoxesMainRef.current.updateSize( {\n\t\t\t\theight: nextHeight,\n\t\t\t\t// Oddly, when the event that triggered this was not from the mouse (e.g. keydown),\n\t\t\t\t// if `width` is left unspecified a subsequent drag gesture applies a fixed\n\t\t\t\t// width and the pane fails to widen/narrow with parent width changes from\n\t\t\t\t// sidebars opening/closing or window resizes.\n\t\t\t\twidth: 'auto',\n\t\t\t} );\n\t\t}\n\t};\n\n\tif ( ! hasAnyVisible ) {\n\t\treturn;\n\t}\n\n\tconst contents = (\n\t\t<div\n\t\t\tclassName={ clsx(\n\t\t\t\t// The class name 'edit-post-layout__metaboxes' is retained because some plugins use it.\n\t\t\t\t'edit-post-layout__metaboxes',\n\t\t\t\t! isLegacy && 'edit-post-meta-boxes-main__liner'\n\t\t\t) }\n\t\t\thidden={ ! isLegacy && isShort && ! isOpen }\n\t\t>\n\t\t\t<MetaBoxes location=\"normal\" />\n\t\t\t<MetaBoxes location=\"advanced\" />\n\t\t</div>\n\t);\n\n\tif ( isLegacy ) {\n\t\treturn contents;\n\t}\n\n\tconst isAutoHeight = openHeight === undefined;\n\tlet usedMax = '50%'; // Approximation before max has a value.\n\tif ( max !== undefined ) {\n\t\t// Halves the available max height until a user height is set.\n\t\tusedMax = isAutoHeight && isUntouched ? max / 2 : max;\n\t}\n\n\tconst getAriaValueNow = ( height ) =>\n\t\tMath.round( ( ( height - min ) / ( max - min ) ) * 100 );\n\tconst usedAriaValueNow =\n\t\tmax === undefined || isAutoHeight ? 50 : getAriaValueNow( openHeight );\n\n\tconst toggle = () =>\n\t\tsetPreference( 'core/edit-post', 'metaBoxesMainIsOpen', ! isOpen );\n\n\t// TODO: Support more/all keyboard interactions from the window splitter pattern:\n\t// https://www.w3.org/WAI/ARIA/apg/patterns/windowsplitter/\n\tconst onSeparatorKeyDown = ( event ) => {\n\t\tconst delta = { ArrowUp: 20, ArrowDown: -20 }[ event.key ];\n\t\tif ( delta ) {\n\t\t\tconst pane = metaBoxesMainRef.current.resizable;\n\t\t\tconst fromHeight = isAutoHeight ? pane.offsetHeight : openHeight;\n\t\t\tconst nextHeight = delta + fromHeight;\n\t\t\tapplyHeight( nextHeight, true, true );\n\t\t\tevent.preventDefault();\n\t\t}\n\t};\n\tconst className = 'edit-post-meta-boxes-main';\n\tconst paneLabel = __( 'Meta Boxes' );\n\tlet Pane, paneProps;\n\tif ( isShort ) {\n\t\tPane = NavigableRegion;\n\t\tpaneProps = {\n\t\t\tclassName: clsx( className, 'is-toggle-only' ),\n\t\t};\n\t} else {\n\t\tPane = ResizableBox;\n\t\tpaneProps = /** @type {Parameters<typeof ResizableBox>[0]} */ ( {\n\t\t\tas: NavigableRegion,\n\t\t\tref: metaBoxesMainRef,\n\t\t\tclassName: clsx( className, 'is-resizable' ),\n\t\t\tdefaultSize: { height: openHeight },\n\t\t\tminHeight: min,\n\t\t\tmaxHeight: usedMax,\n\t\t\tenable: {\n\t\t\t\ttop: true,\n\t\t\t\tright: false,\n\t\t\t\tbottom: false,\n\t\t\t\tleft: false,\n\t\t\t\ttopLeft: false,\n\t\t\t\ttopRight: false,\n\t\t\t\tbottomRight: false,\n\t\t\t\tbottomLeft: false,\n\t\t\t},\n\t\t\thandleClasses: { top: 'edit-post-meta-boxes-main__presenter' },\n\t\t\thandleComponent: {\n\t\t\t\ttop: (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<Tooltip text={ __( 'Drag to resize' ) }>\n\t\t\t\t\t\t\t<button // eslint-disable-line jsx-a11y/role-supports-aria-props\n\t\t\t\t\t\t\t\tref={ separatorRef }\n\t\t\t\t\t\t\t\trole=\"separator\" // eslint-disable-line jsx-a11y/no-interactive-element-to-noninteractive-role\n\t\t\t\t\t\t\t\taria-valuenow={ usedAriaValueNow }\n\t\t\t\t\t\t\t\taria-label={ __( 'Drag to resize' ) }\n\t\t\t\t\t\t\t\taria-describedby={ separatorHelpId }\n\t\t\t\t\t\t\t\tonKeyDown={ onSeparatorKeyDown }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t<VisuallyHidden id={ separatorHelpId }>\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'Use up and down arrow keys to resize the meta box panel.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t\t</>\n\t\t\t\t),\n\t\t\t},\n\t\t\t// Avoids hiccups while dragging over objects like iframes and ensures that\n\t\t\t// the event to end the drag is captured by the target (resize handle)\n\t\t\t// whether or not it’s under the pointer.\n\t\t\tonPointerDown: ( { pointerId, target } ) => {\n\t\t\t\ttarget.setPointerCapture( pointerId );\n\t\t\t},\n\t\t\tonResizeStart: ( event, direction, elementRef ) => {\n\t\t\t\tif ( isAutoHeight ) {\n\t\t\t\t\t// Sets the starting height to avoid visual jumps in height and\n\t\t\t\t\t// aria-valuenow being `NaN` for the first (few) resize events.\n\t\t\t\t\tapplyHeight( elementRef.offsetHeight, false, true );\n\t\t\t\t\tsetIsUntouched( false );\n\t\t\t\t}\n\t\t\t},\n\t\t\tonResize: () =>\n\t\t\t\tapplyHeight( metaBoxesMainRef.current.state.height ),\n\t\t\tonResizeStop: () =>\n\t\t\t\tapplyHeight( metaBoxesMainRef.current.state.height, true ),\n\t\t} );\n\t}\n\n\treturn (\n\t\t<Pane aria-label={ paneLabel } { ...paneProps }>\n\t\t\t{ isShort ? (\n\t\t\t\t<button\n\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\tclassName=\"edit-post-meta-boxes-main__presenter\"\n\t\t\t\t\tonClick={ toggle }\n\t\t\t\t>\n\t\t\t\t\t{ paneLabel }\n\t\t\t\t\t<Icon icon={ isOpen ? chevronUp : chevronDown } />\n\t\t\t\t</button>\n\t\t\t) : (\n\t\t\t\t<meta ref={ effectSizeConstraints } />\n\t\t\t) }\n\t\t\t{ contents }\n\t\t</Pane>\n\t);\n}\n\nfunction Layout( {\n\tpostId: initialPostId,\n\tpostType: initialPostType,\n\tsettings,\n\tinitialEdits,\n} ) {\n\tuseCommands();\n\tuseEditPostCommands();\n\tconst paddingAppenderRef = usePaddingAppender();\n\tconst shouldIframe = useShouldIframe();\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\tconst {\n\t\tcurrentPost: { postId: currentPostId, postType: currentPostType },\n\t\tonNavigateToEntityRecord,\n\t\tonNavigateToPreviousEntityRecord,\n\t} = useNavigateToEntityRecord(\n\t\tinitialPostId,\n\t\tinitialPostType,\n\t\t'post-only'\n\t);\n\tconst isEditingTemplate = currentPostType === 'wp_template';\n\tconst {\n\t\tmode,\n\t\tisFullscreenActive,\n\t\thasActiveMetaboxes,\n\t\thasBlockSelected,\n\t\tshowIconLabels,\n\t\tisDistractionFree,\n\t\tshowMetaBoxes,\n\t\thasHistory,\n\t\tisWelcomeGuideVisible,\n\t\ttemplateId,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tconst { get } = select( preferencesStore );\n\t\t\tconst { isFeatureActive, getEditedPostTemplateId } = unlock(\n\t\t\t\tselect( editPostStore )\n\t\t\t);\n\t\t\tconst { canUser, getPostType } = select( coreStore );\n\t\t\tconst { __unstableGetEditorMode } = unlock(\n\t\t\t\tselect( blockEditorStore )\n\t\t\t);\n\n\t\t\tconst supportsTemplateMode = settings.supportsTemplateMode;\n\t\t\tconst isViewable =\n\t\t\t\tgetPostType( currentPostType )?.viewable ?? false;\n\t\t\tconst canViewTemplate = canUser( 'read', {\n\t\t\t\tkind: 'postType',\n\t\t\t\tname: 'wp_template',\n\t\t\t} );\n\n\t\t\tconst isZoomOut = __unstableGetEditorMode() === 'zoom-out';\n\n\t\t\treturn {\n\t\t\t\tmode: select( editorStore ).getEditorMode(),\n\t\t\t\tisFullscreenActive:\n\t\t\t\t\tselect( editPostStore ).isFeatureActive( 'fullscreenMode' ),\n\t\t\t\thasActiveMetaboxes: select( editPostStore ).hasMetaBoxes(),\n\t\t\t\thasBlockSelected:\n\t\t\t\t\t!! select( blockEditorStore ).getBlockSelectionStart(),\n\t\t\t\tshowIconLabels: get( 'core', 'showIconLabels' ),\n\t\t\t\tisDistractionFree: get( 'core', 'distractionFree' ),\n\t\t\t\tshowMetaBoxes:\n\t\t\t\t\t! DESIGN_POST_TYPES.includes( currentPostType ) &&\n\t\t\t\t\tselect( editorStore ).getRenderingMode() === 'post-only' &&\n\t\t\t\t\t! isZoomOut,\n\t\t\t\tisWelcomeGuideVisible: isFeatureActive( 'welcomeGuide' ),\n\t\t\t\ttemplateId:\n\t\t\t\t\tsupportsTemplateMode &&\n\t\t\t\t\tisViewable &&\n\t\t\t\t\tcanViewTemplate &&\n\t\t\t\t\t! isEditingTemplate\n\t\t\t\t\t\t? getEditedPostTemplateId()\n\t\t\t\t\t\t: null,\n\t\t\t};\n\t\t},\n\t\t[ currentPostType, isEditingTemplate, settings.supportsTemplateMode ]\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: 'entity-edit';\n\tuseCommandContext( commandContext );\n\tconst editorSettings = useMemo(\n\t\t() => ( {\n\t\t\t...settings,\n\t\t\tonNavigateToEntityRecord,\n\t\t\tonNavigateToPreviousEntityRecord,\n\t\t\tdefaultRenderingMode: 'post-only',\n\t\t} ),\n\t\t[ settings, onNavigateToEntityRecord, onNavigateToPreviousEntityRecord ]\n\t);\n\tconst styles = useEditorStyles();\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 navigateRegionsProps = useNavigateRegions();\n\n\tconst className = clsx( 'edit-post-layout', 'is-mode-' + mode, {\n\t\t'has-metaboxes': hasActiveMetaboxes,\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 or template, e.g: \"Hello world\".\n\t\t\t\t\t\t\t\t__( '\"%s\" successfully created.' ),\n\t\t\t\t\t\t\t\tdecodeEntities( title )\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\tconst initialPost = useMemo( () => {\n\t\treturn {\n\t\t\ttype: initialPostType,\n\t\t\tid: initialPostId,\n\t\t};\n\t}, [ initialPostType, initialPostId ] );\n\n\tconst backButton =\n\t\tuseViewportMatch( 'medium' ) && isFullscreenActive ? (\n\t\t\t<BackButton initialPost={ initialPost } />\n\t\t) : null;\n\n\treturn (\n\t\t<SlotFillProvider>\n\t\t\t<ErrorBoundary>\n\t\t\t\t<CommandMenu />\n\t\t\t\t<WelcomeGuide postType={ currentPostType } />\n\t\t\t\t<div\n\t\t\t\t\tclassName={ navigateRegionsProps.className }\n\t\t\t\t\t{ ...navigateRegionsProps }\n\t\t\t\t\tref={ navigateRegionsProps.ref }\n\t\t\t\t>\n\t\t\t\t\t<Editor\n\t\t\t\t\t\tsettings={ editorSettings }\n\t\t\t\t\t\tinitialEdits={ initialEdits }\n\t\t\t\t\t\tpostType={ currentPostType }\n\t\t\t\t\t\tpostId={ currentPostId }\n\t\t\t\t\t\ttemplateId={ templateId }\n\t\t\t\t\t\tclassName={ className }\n\t\t\t\t\t\tstyles={ styles }\n\t\t\t\t\t\tforceIsDirty={ hasActiveMetaboxes }\n\t\t\t\t\t\tcontentRef={ paddingAppenderRef }\n\t\t\t\t\t\tdisableIframe={ ! shouldIframe }\n\t\t\t\t\t\t// We should auto-focus the canvas (title) on load.\n\t\t\t\t\t\t// eslint-disable-next-line jsx-a11y/no-autofocus\n\t\t\t\t\t\tautoFocus={ ! isWelcomeGuideVisible }\n\t\t\t\t\t\tonActionPerformed={ onActionPerformed }\n\t\t\t\t\t\textraSidebarPanels={\n\t\t\t\t\t\t\tshowMetaBoxes && <MetaBoxes location=\"side\" />\n\t\t\t\t\t\t}\n\t\t\t\t\t\textraContent={\n\t\t\t\t\t\t\t! isDistractionFree &&\n\t\t\t\t\t\t\tshowMetaBoxes && (\n\t\t\t\t\t\t\t\t<MetaBoxesMain isLegacy={ ! shouldIframe } />\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t<PostLockedModal />\n\t\t\t\t\t\t<EditorInitialization />\n\t\t\t\t\t\t<FullscreenMode isActive={ isFullscreenActive } />\n\t\t\t\t\t\t<BrowserURL hasHistory={ hasHistory } />\n\t\t\t\t\t\t<UnsavedChangesWarning />\n\t\t\t\t\t\t<AutosaveMonitor />\n\t\t\t\t\t\t<LocalAutosaveMonitor />\n\t\t\t\t\t\t<EditPostKeyboardShortcuts />\n\t\t\t\t\t\t<EditorKeyboardShortcutsRegister />\n\t\t\t\t\t\t<BlockKeyboardShortcuts />\n\t\t\t\t\t\t<InitPatternModal />\n\t\t\t\t\t\t<PluginArea onError={ onPluginAreaError } />\n\t\t\t\t\t\t<PostEditorMoreMenu />\n\t\t\t\t\t\t{ backButton }\n\t\t\t\t\t\t<EditorSnackbars />\n\t\t\t\t\t</Editor>\n\t\t\t\t</div>\n\t\t\t</ErrorBoundary>\n\t\t</SlotFillProvider>\n\t);\n}\n\nexport default Layout;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,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,MAAM","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/edit-post",
3
- "version": "8.8.14",
3
+ "version": "8.8.16",
4
4
  "description": "Edit Post module for WordPress.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -30,18 +30,18 @@
30
30
  "@babel/runtime": "^7.16.0",
31
31
  "@wordpress/a11y": "^4.8.2",
32
32
  "@wordpress/api-fetch": "^7.8.2",
33
- "@wordpress/block-editor": "^14.3.11",
34
- "@wordpress/block-library": "^9.8.12",
33
+ "@wordpress/block-editor": "^14.3.13",
34
+ "@wordpress/block-library": "^9.8.14",
35
35
  "@wordpress/blocks": "^13.8.5",
36
- "@wordpress/commands": "^1.8.9",
37
- "@wordpress/components": "^28.8.9",
36
+ "@wordpress/commands": "^1.8.10",
37
+ "@wordpress/components": "^28.8.10",
38
38
  "@wordpress/compose": "^7.8.3",
39
- "@wordpress/core-commands": "^1.8.11",
40
- "@wordpress/core-data": "^7.8.11",
39
+ "@wordpress/core-commands": "^1.8.13",
40
+ "@wordpress/core-data": "^7.8.13",
41
41
  "@wordpress/data": "^10.8.3",
42
42
  "@wordpress/deprecated": "^4.8.2",
43
43
  "@wordpress/dom": "^4.8.2",
44
- "@wordpress/editor": "^14.8.14",
44
+ "@wordpress/editor": "^14.8.16",
45
45
  "@wordpress/element": "^6.8.1",
46
46
  "@wordpress/hooks": "^4.8.2",
47
47
  "@wordpress/html-entities": "^4.8.1",
@@ -50,13 +50,13 @@
50
50
  "@wordpress/keyboard-shortcuts": "^5.8.3",
51
51
  "@wordpress/keycodes": "^4.8.2",
52
52
  "@wordpress/notices": "^5.8.3",
53
- "@wordpress/plugins": "^7.8.9",
54
- "@wordpress/preferences": "^4.8.9",
53
+ "@wordpress/plugins": "^7.8.10",
54
+ "@wordpress/preferences": "^4.8.10",
55
55
  "@wordpress/private-apis": "^1.8.1",
56
56
  "@wordpress/url": "^4.8.1",
57
57
  "@wordpress/viewport": "^6.8.3",
58
58
  "@wordpress/warning": "^3.8.1",
59
- "@wordpress/widgets": "^4.8.11",
59
+ "@wordpress/widgets": "^4.8.13",
60
60
  "clsx": "^2.1.1",
61
61
  "memize": "^2.1.0"
62
62
  },
@@ -67,5 +67,5 @@
67
67
  "publishConfig": {
68
68
  "access": "public"
69
69
  },
70
- "gitHead": "152cd9dbb34aec5e7cbe0ba00c3d03d927daa6e3"
70
+ "gitHead": "b7fe267e2fb0c3cb1a37a9dda16f7eebcf5089c9"
71
71
  }
@@ -424,6 +424,9 @@ function Layout( {
424
424
  select( editPostStore )
425
425
  );
426
426
  const { canUser, getPostType } = select( coreStore );
427
+ const { __unstableGetEditorMode } = unlock(
428
+ select( blockEditorStore )
429
+ );
427
430
 
428
431
  const supportsTemplateMode = settings.supportsTemplateMode;
429
432
  const isViewable =
@@ -433,6 +436,8 @@ function Layout( {
433
436
  name: 'wp_template',
434
437
  } );
435
438
 
439
+ const isZoomOut = __unstableGetEditorMode() === 'zoom-out';
440
+
436
441
  return {
437
442
  mode: select( editorStore ).getEditorMode(),
438
443
  isFullscreenActive:
@@ -444,7 +449,8 @@ function Layout( {
444
449
  isDistractionFree: get( 'core', 'distractionFree' ),
445
450
  showMetaBoxes:
446
451
  ! DESIGN_POST_TYPES.includes( currentPostType ) &&
447
- select( editorStore ).getRenderingMode() === 'post-only',
452
+ select( editorStore ).getRenderingMode() === 'post-only' &&
453
+ ! isZoomOut,
448
454
  isWelcomeGuideVisible: isFeatureActive( 'welcomeGuide' ),
449
455
  templateId:
450
456
  supportsTemplateMode &&