@wordpress/edit-post 8.9.0 → 8.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/build/components/init-pattern-modal/index.js +1 -1
  3. package/build/components/init-pattern-modal/index.js.map +1 -1
  4. package/build/components/keyboard-shortcuts/index.js +1 -1
  5. package/build/components/keyboard-shortcuts/index.js.map +1 -1
  6. package/build/components/layout/index.js +176 -171
  7. package/build/components/layout/index.js.map +1 -1
  8. package/build/components/layout/use-padding-appender.js +19 -16
  9. package/build/components/layout/use-padding-appender.js.map +1 -1
  10. package/build/components/layout/use-should-iframe.js +16 -8
  11. package/build/components/layout/use-should-iframe.js.map +1 -1
  12. package/build/components/meta-boxes/meta-box-visibility.js.map +1 -1
  13. package/build/components/meta-boxes/meta-boxes-area/index.js.map +1 -1
  14. package/build/components/preferences-modal/meta-boxes-section.js.map +1 -1
  15. package/build/deprecated.js.map +1 -1
  16. package/build/index.js +2 -4
  17. package/build/index.js.map +1 -1
  18. package/build/store/actions.js +1 -1
  19. package/build/store/actions.js.map +1 -1
  20. package/build/store/private-selectors.js.map +1 -1
  21. package/build/store/selectors.js.map +1 -1
  22. package/build/utils/meta-boxes.js.map +1 -1
  23. package/build-module/components/header/header-toolbar/index.native.js +1 -2
  24. package/build-module/components/header/header-toolbar/index.native.js.map +1 -1
  25. package/build-module/components/init-pattern-modal/index.js +2 -4
  26. package/build-module/components/init-pattern-modal/index.js.map +1 -1
  27. package/build-module/components/keyboard-shortcuts/index.js +1 -1
  28. package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
  29. package/build-module/components/layout/index.js +178 -175
  30. package/build-module/components/layout/index.js.map +1 -1
  31. package/build-module/components/layout/index.native.js +1 -3
  32. package/build-module/components/layout/index.native.js.map +1 -1
  33. package/build-module/components/layout/use-padding-appender.js +20 -16
  34. package/build-module/components/layout/use-padding-appender.js.map +1 -1
  35. package/build-module/components/layout/use-should-iframe.js +16 -8
  36. package/build-module/components/layout/use-should-iframe.js.map +1 -1
  37. package/build-module/components/meta-boxes/index.js +1 -3
  38. package/build-module/components/meta-boxes/index.js.map +1 -1
  39. package/build-module/components/meta-boxes/meta-box-visibility.js.map +1 -1
  40. package/build-module/components/meta-boxes/meta-boxes-area/index.js +1 -2
  41. package/build-module/components/meta-boxes/meta-boxes-area/index.js.map +1 -1
  42. package/build-module/components/more-menu/index.js +1 -3
  43. package/build-module/components/more-menu/index.js.map +1 -1
  44. package/build-module/components/preferences-modal/enable-custom-fields.js +1 -3
  45. package/build-module/components/preferences-modal/enable-custom-fields.js.map +1 -1
  46. package/build-module/components/preferences-modal/meta-boxes-section.js +1 -2
  47. package/build-module/components/preferences-modal/meta-boxes-section.js.map +1 -1
  48. package/build-module/components/welcome-guide/default.js +1 -3
  49. package/build-module/components/welcome-guide/default.js.map +1 -1
  50. package/build-module/components/welcome-guide/image.js +1 -2
  51. package/build-module/components/welcome-guide/image.js.map +1 -1
  52. package/build-module/components/welcome-guide/template.js +1 -3
  53. package/build-module/components/welcome-guide/template.js.map +1 -1
  54. package/build-module/deprecated.js.map +1 -1
  55. package/build-module/index.js +2 -4
  56. package/build-module/index.js.map +1 -1
  57. package/build-module/store/actions.js +1 -1
  58. package/build-module/store/actions.js.map +1 -1
  59. package/build-module/store/private-selectors.js.map +1 -1
  60. package/build-module/store/selectors.js.map +1 -1
  61. package/build-module/utils/meta-boxes.js.map +1 -1
  62. package/build-style/style-rtl.css +65 -29
  63. package/build-style/style.css +65 -29
  64. package/package.json +33 -32
  65. package/src/components/init-pattern-modal/index.js +2 -2
  66. package/src/components/keyboard-shortcuts/index.js +1 -1
  67. package/src/components/layout/index.js +170 -174
  68. package/src/components/layout/style.scss +83 -43
  69. package/src/components/layout/use-padding-appender.js +21 -18
  70. package/src/components/layout/use-should-iframe.js +18 -7
  71. package/src/index.js +0 -2
  72. package/src/store/actions.js +1 -1
@@ -1 +1 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_editor","_data","_blockEditor","_plugins","_i18n","_element","_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","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","resizableBoxRef","useRef","isShort","useMediaQuery","min","max","setHeightConstraints","useState","effectSizeConstraints","useRefEffect","node","container","closest","noticeLists","querySelectorAll","resizeHandle","querySelector","actualize","fullHeight","offsetHeight","nextMax","element","nextMin","observer","window","ResizeObserver","observe","disconnect","separatorRef","separatorHelpId","useId","isUntouched","setIsUntouched","className","contents","jsxs","clsx","children","jsx","default","location","isAutoHeight","undefined","usedMax","getAriaValueNow","height","Math","round","usedAriaValueNow","open","onToggle","target","__","onSeparatorKeyDown","event","delta","ArrowUp","ArrowDown","key","resizable","current","fromHeight","nextHeight","updateSize","width","ResizableBox","defaultSize","ref","enable","top","right","bottom","left","topLeft","topRight","bottomRight","bottomLeft","minHeight","maxHeight","bounds","boundsByDirection","onPointerDown","pointerId","setPointerCapture","onResizeStart","direction","elementRef","heightNow","onResize","state","separator","ariaValueNow","onResizeStop","handleClasses","handleComponent","Fragment","Tooltip","text","onKeyDown","role","VisuallyHidden","id","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","onPluginAreaError","sprintf","createSuccessNotice","onActionPerformed","useCallback","actionId","items","href","addQueryArgs","trashed","post_type","type","ids","newItem","title","rendered","decodeEntities","actions","label","onClick","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 { 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\tResizableBox,\n\tSlotFillProvider,\n\tTooltip,\n\tVisuallyHidden,\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 } = 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 resizableBoxRef = 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__resize-handle'\n\t\t);\n\t\tconst actualize = () => {\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( actualize );\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\n\tif ( ! hasAnyVisible ) {\n\t\treturn;\n\t}\n\n\tconst className = 'edit-post-meta-boxes-main';\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>\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\tif ( isShort ) {\n\t\treturn (\n\t\t\t<details\n\t\t\t\tclassName={ className }\n\t\t\t\topen={ isOpen }\n\t\t\t\tonToggle={ ( { target } ) => {\n\t\t\t\t\tsetPreference(\n\t\t\t\t\t\t'core/edit-post',\n\t\t\t\t\t\t'metaBoxesMainIsOpen',\n\t\t\t\t\t\ttarget.open\n\t\t\t\t\t);\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t<summary>{ __( 'Meta Boxes' ) }</summary>\n\t\t\t\t{ contents }\n\t\t\t</details>\n\t\t);\n\t}\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 { resizable } = resizableBoxRef.current;\n\t\t\tconst fromHeight = isAutoHeight\n\t\t\t\t? resizable.offsetHeight\n\t\t\t\t: openHeight;\n\t\t\tconst nextHeight = Math.min(\n\t\t\t\tmax,\n\t\t\t\tMath.max( min, delta + fromHeight )\n\t\t\t);\n\t\t\tresizableBoxRef.current.updateSize( {\n\t\t\t\theight: nextHeight,\n\t\t\t\t// Oddly, if left unspecified a subsequent drag gesture applies a fixed\n\t\t\t\t// width and the pane fails to shrink/grow 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\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}\n\t};\n\n\treturn (\n\t\t<ResizableBox\n\t\t\tclassName={ className }\n\t\t\tdefaultSize={ { height: openHeight } }\n\t\t\tref={ resizableBoxRef }\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\tminHeight={ min }\n\t\t\tmaxHeight={ usedMax }\n\t\t\tbounds=\"parent\"\n\t\t\tboundsByDirection\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\tconst heightNow = elementRef.offsetHeight;\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\tresizableBoxRef.current.updateSize( { height: heightNow } );\n\t\t\t\t\t// Causes `maxHeight` to update to full `max` value instead of half.\n\t\t\t\t\tsetIsUntouched( false );\n\t\t\t\t}\n\t\t\t} }\n\t\t\tonResize={ () => {\n\t\t\t\tconst { height } = resizableBoxRef.current.state;\n\t\t\t\tconst separator = separatorRef.current;\n\t\t\t\tseparator.ariaValueNow = getAriaValueNow( height );\n\t\t\t} }\n\t\t\tonResizeStop={ () => {\n\t\t\t\tconst nextHeight = resizableBoxRef.current.state.height;\n\t\t\t\tsetPreference(\n\t\t\t\t\t'core/edit-post',\n\t\t\t\t\t'metaBoxesMainOpenHeight',\n\t\t\t\t\tnextHeight\n\t\t\t\t);\n\t\t\t} }\n\t\t\thandleClasses={ {\n\t\t\t\ttop: 'edit-post-meta-boxes-main__resize-handle',\n\t\t\t} }\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{ /* Disable reason: aria-valuenow is supported by separator role. */ }\n\t\t\t\t\t\t\t{ /* eslint-disable-next-line jsx-a11y/role-supports-aria-props */ }\n\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\tref={ separatorRef }\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\t// Disable reason: buttons are allowed to be separator role.\n\t\t\t\t\t\t\t\t// eslint-disable-next-line jsx-a11y/no-interactive-element-to-noninteractive-role\n\t\t\t\t\t\t\t\trole=\"separator\"\n\t\t\t\t\t\t\t\taria-valuenow={ usedAriaValueNow }\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 metabox 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>\n\t\t\t<meta ref={ effectSizeConstraints } />\n\t\t\t{ contents }\n\t\t</ResizableBox>\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 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 e.g: \"Post 1\".\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<Editor\n\t\t\t\t\tsettings={ editorSettings }\n\t\t\t\t\tinitialEdits={ initialEdits }\n\t\t\t\t\tpostType={ currentPostType }\n\t\t\t\t\tpostId={ currentPostId }\n\t\t\t\t\ttemplateId={ templateId }\n\t\t\t\t\tclassName={ className }\n\t\t\t\t\tstyles={ styles }\n\t\t\t\t\tforceIsDirty={ hasActiveMetaboxes }\n\t\t\t\t\tcontentRef={ paddingAppenderRef }\n\t\t\t\t\tdisableIframe={ ! shouldIframe }\n\t\t\t\t\t// We should auto-focus the canvas (title) on load.\n\t\t\t\t\t// eslint-disable-next-line jsx-a11y/no-autofocus\n\t\t\t\t\tautoFocus={ ! isWelcomeGuideVisible }\n\t\t\t\t\tonActionPerformed={ onActionPerformed }\n\t\t\t\t\textraSidebarPanels={\n\t\t\t\t\t\tshowMetaBoxes && <MetaBoxes location=\"side\" />\n\t\t\t\t\t}\n\t\t\t\t\textraContent={\n\t\t\t\t\t\t! isDistractionFree &&\n\t\t\t\t\t\tshowMetaBoxes && (\n\t\t\t\t\t\t\t<MetaBoxesMain isLegacy={ ! shouldIframe } />\n\t\t\t\t\t\t)\n\t\t\t\t\t}\n\t\t\t\t>\n\t\t\t\t\t<PostLockedModal />\n\t\t\t\t\t<EditorInitialization />\n\t\t\t\t\t<FullscreenMode isActive={ isFullscreenActive } />\n\t\t\t\t\t<BrowserURL hasHistory={ hasHistory } />\n\t\t\t\t\t<UnsavedChangesWarning />\n\t\t\t\t\t<AutosaveMonitor />\n\t\t\t\t\t<LocalAutosaveMonitor />\n\t\t\t\t\t<EditPostKeyboardShortcuts />\n\t\t\t\t\t<EditorKeyboardShortcutsRegister />\n\t\t\t\t\t<BlockKeyboardShortcuts />\n\t\t\t\t\t<InitPatternModal />\n\t\t\t\t\t<PluginArea onError={ onPluginAreaError } />\n\t\t\t\t\t<PostEditorMoreMenu />\n\t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GAEc+D,MAAM","ignoreList":[]}
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","additionalStyles","hasThemeStyleSupport","editorSettings","useSelect","select","editPostStore","isFeatureActive","editorStore","getEditorSettings","addedStyles","join","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","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","postType","initialPostType","settings","initialEdits","useEditPostCommands","shouldIframe","useShouldIframe","createErrorNotice","noticesStore","currentPost","currentPostId","currentPostType","onNavigateToEntityRecord","onNavigateToPreviousEntityRecord","useNavigateToEntityRecord","isEditingTemplate","mode","isFullscreenActive","hasActiveMetaboxes","hasBlockSelected","showIconLabels","isDistractionFree","showMetaBoxes","hasHistory","isWelcomeGuideVisible","templateId","enablePaddingAppender","_getPostType$viewable","getEditedPostTemplateId","canUser","getPostType","coreStore","supportsTemplateMode","isViewable","viewable","canViewTemplate","kind","name","isZoomOut","blockEditorStore","getEditorMode","getRenderingMode","isRenderingPostOnly","hasMetaBoxes","getBlockSelectionStart","includes","paddingAppenderRef","paddingStyle","usePaddingAppender","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( ...additionalStyles ) {\n\tconst { hasThemeStyleSupport, editorSettings } = useSelect( ( select ) => {\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};\n\t}, [] );\n\n\tconst addedStyles = additionalStyles.join( '\\n' );\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\tif ( addedStyles ) {\n\t\t\treturn [ ...baseStyles, { css: addedStyles } ];\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\taddedStyles,\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 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\tenablePaddingAppender,\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\t\t\tconst { isZoomOut } = unlock( select( blockEditorStore ) );\n\t\t\tconst { getEditorMode, getRenderingMode } = select( editorStore );\n\t\t\tconst isRenderingPostOnly = getRenderingMode() === 'post-only';\n\n\t\t\treturn {\n\t\t\t\tmode: 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\tisRenderingPostOnly,\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\tenablePaddingAppender:\n\t\t\t\t\t! isZoomOut() &&\n\t\t\t\t\tisRenderingPostOnly &&\n\t\t\t\t\t! DESIGN_POST_TYPES.includes( currentPostType ),\n\t\t\t};\n\t\t},\n\t\t[ currentPostType, isEditingTemplate, settings.supportsTemplateMode ]\n\t);\n\tconst [ paddingAppenderRef, paddingStyle ] = usePaddingAppender(\n\t\tenablePaddingAppender\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( paddingStyle );\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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AAM","ignoreList":[]}
@@ -12,21 +12,18 @@ var _blocks = require("@wordpress/blocks");
12
12
  * WordPress dependencies
13
13
  */
14
14
 
15
- function usePaddingAppender() {
15
+ // Ruleset to add space for the typewriter effect. When typing in the last
16
+ // block, there needs to be room to scroll up.
17
+ const CSS = ':root :where(.editor-styles-wrapper)::after {content: ""; display: block; height: 40vh;}';
18
+ function usePaddingAppender(enabled) {
16
19
  const registry = (0, _data.useRegistry)();
17
- return (0, _compose.useRefEffect)(node => {
20
+ const effect = (0, _compose.useRefEffect)(node => {
18
21
  function onMouseDown(event) {
19
- if (event.target !== node) {
20
- return;
21
- }
22
- const {
23
- ownerDocument
24
- } = node;
25
- const {
26
- defaultView
27
- } = ownerDocument;
28
- const pseudoHeight = defaultView.parseInt(defaultView.getComputedStyle(node, ':after').height, 10);
29
- if (!pseudoHeight) {
22
+ if (event.target !== node &&
23
+ // Tests for the parent element because in the iframed editor if the click is
24
+ // below the padding the target will be the parent element (html) and should
25
+ // still be treated as intent to append.
26
+ event.target !== node.parentElement) {
30
27
  return;
31
28
  }
32
29
 
@@ -39,7 +36,7 @@ function usePaddingAppender() {
39
36
  if (event.clientY < lastChildRect.bottom) {
40
37
  return;
41
38
  }
42
- event.stopPropagation();
39
+ event.preventDefault();
43
40
  const blockOrder = registry.select(_blockEditor.store).getBlockOrder('');
44
41
  const lastBlockClientId = blockOrder[blockOrder.length - 1];
45
42
  const lastBlock = registry.select(_blockEditor.store).getBlock(lastBlockClientId);
@@ -53,10 +50,16 @@ function usePaddingAppender() {
53
50
  insertDefaultBlock();
54
51
  }
55
52
  }
56
- node.addEventListener('mousedown', onMouseDown);
53
+ const {
54
+ ownerDocument
55
+ } = node;
56
+ // Adds the listener on the document so that in the iframed editor clicks below the
57
+ // padding can be handled as they too should be treated as intent to append.
58
+ ownerDocument.addEventListener('mousedown', onMouseDown);
57
59
  return () => {
58
- node.removeEventListener('mousedown', onMouseDown);
60
+ ownerDocument.removeEventListener('mousedown', onMouseDown);
59
61
  };
60
62
  }, [registry]);
63
+ return enabled ? [effect, CSS] : [];
61
64
  }
62
65
  //# sourceMappingURL=use-padding-appender.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_data","require","_compose","_blockEditor","_blocks","usePaddingAppender","registry","useRegistry","useRefEffect","node","onMouseDown","event","target","ownerDocument","defaultView","pseudoHeight","parseInt","getComputedStyle","height","lastChild","lastElementChild","lastChildRect","getBoundingClientRect","clientY","bottom","stopPropagation","blockOrder","select","blockEditorStore","getBlockOrder","lastBlockClientId","length","lastBlock","getBlock","selectBlock","insertDefaultBlock","dispatch","isUnmodifiedDefaultBlock","addEventListener","removeEventListener"],"sources":["@wordpress/edit-post/src/components/layout/use-padding-appender.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useRegistry } from '@wordpress/data';\nimport { useRefEffect } from '@wordpress/compose';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { isUnmodifiedDefaultBlock } from '@wordpress/blocks';\n\nexport function usePaddingAppender() {\n\tconst registry = useRegistry();\n\treturn useRefEffect(\n\t\t( node ) => {\n\t\t\tfunction onMouseDown( event ) {\n\t\t\t\tif ( event.target !== node ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst { ownerDocument } = node;\n\t\t\t\tconst { defaultView } = ownerDocument;\n\n\t\t\t\tconst pseudoHeight = defaultView.parseInt(\n\t\t\t\t\tdefaultView.getComputedStyle( node, ':after' ).height,\n\t\t\t\t\t10\n\t\t\t\t);\n\n\t\t\t\tif ( ! pseudoHeight ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Only handle clicks under the last child.\n\t\t\t\tconst lastChild = node.lastElementChild;\n\t\t\t\tif ( ! lastChild ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst lastChildRect = lastChild.getBoundingClientRect();\n\t\t\t\tif ( event.clientY < lastChildRect.bottom ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tevent.stopPropagation();\n\n\t\t\t\tconst blockOrder = registry\n\t\t\t\t\t.select( blockEditorStore )\n\t\t\t\t\t.getBlockOrder( '' );\n\t\t\t\tconst lastBlockClientId = blockOrder[ blockOrder.length - 1 ];\n\n\t\t\t\tconst lastBlock = registry\n\t\t\t\t\t.select( blockEditorStore )\n\t\t\t\t\t.getBlock( lastBlockClientId );\n\t\t\t\tconst { selectBlock, insertDefaultBlock } =\n\t\t\t\t\tregistry.dispatch( blockEditorStore );\n\n\t\t\t\tif ( lastBlock && isUnmodifiedDefaultBlock( lastBlock ) ) {\n\t\t\t\t\tselectBlock( lastBlockClientId );\n\t\t\t\t} else {\n\t\t\t\t\tinsertDefaultBlock();\n\t\t\t\t}\n\t\t\t}\n\t\t\tnode.addEventListener( 'mousedown', onMouseDown );\n\t\t\treturn () => {\n\t\t\t\tnode.removeEventListener( 'mousedown', onMouseDown );\n\t\t\t};\n\t\t},\n\t\t[ registry ]\n\t);\n}\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AANA;AACA;AACA;;AAMO,SAASI,kBAAkBA,CAAA,EAAG;EACpC,MAAMC,QAAQ,GAAG,IAAAC,iBAAW,EAAC,CAAC;EAC9B,OAAO,IAAAC,qBAAY,EAChBC,IAAI,IAAM;IACX,SAASC,WAAWA,CAAEC,KAAK,EAAG;MAC7B,IAAKA,KAAK,CAACC,MAAM,KAAKH,IAAI,EAAG;QAC5B;MACD;MAEA,MAAM;QAAEI;MAAc,CAAC,GAAGJ,IAAI;MAC9B,MAAM;QAAEK;MAAY,CAAC,GAAGD,aAAa;MAErC,MAAME,YAAY,GAAGD,WAAW,CAACE,QAAQ,CACxCF,WAAW,CAACG,gBAAgB,CAAER,IAAI,EAAE,QAAS,CAAC,CAACS,MAAM,EACrD,EACD,CAAC;MAED,IAAK,CAAEH,YAAY,EAAG;QACrB;MACD;;MAEA;MACA,MAAMI,SAAS,GAAGV,IAAI,CAACW,gBAAgB;MACvC,IAAK,CAAED,SAAS,EAAG;QAClB;MACD;MAEA,MAAME,aAAa,GAAGF,SAAS,CAACG,qBAAqB,CAAC,CAAC;MACvD,IAAKX,KAAK,CAACY,OAAO,GAAGF,aAAa,CAACG,MAAM,EAAG;QAC3C;MACD;MAEAb,KAAK,CAACc,eAAe,CAAC,CAAC;MAEvB,MAAMC,UAAU,GAAGpB,QAAQ,CACzBqB,MAAM,CAAEC,kBAAiB,CAAC,CAC1BC,aAAa,CAAE,EAAG,CAAC;MACrB,MAAMC,iBAAiB,GAAGJ,UAAU,CAAEA,UAAU,CAACK,MAAM,GAAG,CAAC,CAAE;MAE7D,MAAMC,SAAS,GAAG1B,QAAQ,CACxBqB,MAAM,CAAEC,kBAAiB,CAAC,CAC1BK,QAAQ,CAAEH,iBAAkB,CAAC;MAC/B,MAAM;QAAEI,WAAW;QAAEC;MAAmB,CAAC,GACxC7B,QAAQ,CAAC8B,QAAQ,CAAER,kBAAiB,CAAC;MAEtC,IAAKI,SAAS,IAAI,IAAAK,gCAAwB,EAAEL,SAAU,CAAC,EAAG;QACzDE,WAAW,CAAEJ,iBAAkB,CAAC;MACjC,CAAC,MAAM;QACNK,kBAAkB,CAAC,CAAC;MACrB;IACD;IACA1B,IAAI,CAAC6B,gBAAgB,CAAE,WAAW,EAAE5B,WAAY,CAAC;IACjD,OAAO,MAAM;MACZD,IAAI,CAAC8B,mBAAmB,CAAE,WAAW,EAAE7B,WAAY,CAAC;IACrD,CAAC;EACF,CAAC,EACD,CAAEJ,QAAQ,CACX,CAAC;AACF","ignoreList":[]}
1
+ {"version":3,"names":["_data","require","_compose","_blockEditor","_blocks","CSS","usePaddingAppender","enabled","registry","useRegistry","effect","useRefEffect","node","onMouseDown","event","target","parentElement","lastChild","lastElementChild","lastChildRect","getBoundingClientRect","clientY","bottom","preventDefault","blockOrder","select","blockEditorStore","getBlockOrder","lastBlockClientId","length","lastBlock","getBlock","selectBlock","insertDefaultBlock","dispatch","isUnmodifiedDefaultBlock","ownerDocument","addEventListener","removeEventListener"],"sources":["@wordpress/edit-post/src/components/layout/use-padding-appender.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useRegistry } from '@wordpress/data';\nimport { useRefEffect } from '@wordpress/compose';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { isUnmodifiedDefaultBlock } from '@wordpress/blocks';\n\n// Ruleset to add space for the typewriter effect. When typing in the last\n// block, there needs to be room to scroll up.\nconst CSS =\n\t':root :where(.editor-styles-wrapper)::after {content: \"\"; display: block; height: 40vh;}';\n\nexport function usePaddingAppender( enabled ) {\n\tconst registry = useRegistry();\n\tconst effect = useRefEffect(\n\t\t( node ) => {\n\t\t\tfunction onMouseDown( event ) {\n\t\t\t\tif (\n\t\t\t\t\tevent.target !== node &&\n\t\t\t\t\t// Tests for the parent element because in the iframed editor if the click is\n\t\t\t\t\t// below the padding the target will be the parent element (html) and should\n\t\t\t\t\t// still be treated as intent to append.\n\t\t\t\t\tevent.target !== node.parentElement\n\t\t\t\t) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Only handle clicks under the last child.\n\t\t\t\tconst lastChild = node.lastElementChild;\n\t\t\t\tif ( ! lastChild ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst lastChildRect = lastChild.getBoundingClientRect();\n\t\t\t\tif ( event.clientY < lastChildRect.bottom ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tevent.preventDefault();\n\n\t\t\t\tconst blockOrder = registry\n\t\t\t\t\t.select( blockEditorStore )\n\t\t\t\t\t.getBlockOrder( '' );\n\t\t\t\tconst lastBlockClientId = blockOrder[ blockOrder.length - 1 ];\n\n\t\t\t\tconst lastBlock = registry\n\t\t\t\t\t.select( blockEditorStore )\n\t\t\t\t\t.getBlock( lastBlockClientId );\n\t\t\t\tconst { selectBlock, insertDefaultBlock } =\n\t\t\t\t\tregistry.dispatch( blockEditorStore );\n\n\t\t\t\tif ( lastBlock && isUnmodifiedDefaultBlock( lastBlock ) ) {\n\t\t\t\t\tselectBlock( lastBlockClientId );\n\t\t\t\t} else {\n\t\t\t\t\tinsertDefaultBlock();\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst { ownerDocument } = node;\n\t\t\t// Adds the listener on the document so that in the iframed editor clicks below the\n\t\t\t// padding can be handled as they too should be treated as intent to append.\n\t\t\townerDocument.addEventListener( 'mousedown', onMouseDown );\n\t\t\treturn () => {\n\t\t\t\townerDocument.removeEventListener( 'mousedown', onMouseDown );\n\t\t\t};\n\t\t},\n\t\t[ registry ]\n\t);\n\treturn enabled ? [ effect, CSS ] : [];\n}\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AANA;AACA;AACA;;AAMA;AACA;AACA,MAAMI,GAAG,GACR,0FAA0F;AAEpF,SAASC,kBAAkBA,CAAEC,OAAO,EAAG;EAC7C,MAAMC,QAAQ,GAAG,IAAAC,iBAAW,EAAC,CAAC;EAC9B,MAAMC,MAAM,GAAG,IAAAC,qBAAY,EACxBC,IAAI,IAAM;IACX,SAASC,WAAWA,CAAEC,KAAK,EAAG;MAC7B,IACCA,KAAK,CAACC,MAAM,KAAKH,IAAI;MACrB;MACA;MACA;MACAE,KAAK,CAACC,MAAM,KAAKH,IAAI,CAACI,aAAa,EAClC;QACD;MACD;;MAEA;MACA,MAAMC,SAAS,GAAGL,IAAI,CAACM,gBAAgB;MACvC,IAAK,CAAED,SAAS,EAAG;QAClB;MACD;MAEA,MAAME,aAAa,GAAGF,SAAS,CAACG,qBAAqB,CAAC,CAAC;MACvD,IAAKN,KAAK,CAACO,OAAO,GAAGF,aAAa,CAACG,MAAM,EAAG;QAC3C;MACD;MAEAR,KAAK,CAACS,cAAc,CAAC,CAAC;MAEtB,MAAMC,UAAU,GAAGhB,QAAQ,CACzBiB,MAAM,CAAEC,kBAAiB,CAAC,CAC1BC,aAAa,CAAE,EAAG,CAAC;MACrB,MAAMC,iBAAiB,GAAGJ,UAAU,CAAEA,UAAU,CAACK,MAAM,GAAG,CAAC,CAAE;MAE7D,MAAMC,SAAS,GAAGtB,QAAQ,CACxBiB,MAAM,CAAEC,kBAAiB,CAAC,CAC1BK,QAAQ,CAAEH,iBAAkB,CAAC;MAC/B,MAAM;QAAEI,WAAW;QAAEC;MAAmB,CAAC,GACxCzB,QAAQ,CAAC0B,QAAQ,CAAER,kBAAiB,CAAC;MAEtC,IAAKI,SAAS,IAAI,IAAAK,gCAAwB,EAAEL,SAAU,CAAC,EAAG;QACzDE,WAAW,CAAEJ,iBAAkB,CAAC;MACjC,CAAC,MAAM;QACNK,kBAAkB,CAAC,CAAC;MACrB;IACD;IACA,MAAM;MAAEG;IAAc,CAAC,GAAGxB,IAAI;IAC9B;IACA;IACAwB,aAAa,CAACC,gBAAgB,CAAE,WAAW,EAAExB,WAAY,CAAC;IAC1D,OAAO,MAAM;MACZuB,aAAa,CAACE,mBAAmB,CAAE,WAAW,EAAEzB,WAAY,CAAC;IAC9D,CAAC;EACF,CAAC,EACD,CAAEL,QAAQ,CACX,CAAC;EACD,OAAOD,OAAO,GAAG,CAAEG,MAAM,EAAEL,GAAG,CAAE,GAAG,EAAE;AACtC","ignoreList":[]}
@@ -8,25 +8,32 @@ var _editor = require("@wordpress/editor");
8
8
  var _data = require("@wordpress/data");
9
9
  var _blocks = require("@wordpress/blocks");
10
10
  var _blockEditor = require("@wordpress/block-editor");
11
+ var _lockUnlock = require("../../lock-unlock");
11
12
  /**
12
13
  * WordPress dependencies
13
14
  */
14
15
 
16
+ /**
17
+ * Internal dependencies
18
+ */
19
+
15
20
  const isGutenbergPlugin = globalThis.IS_GUTENBERG_PLUGIN ? true : false;
16
21
  function useShouldIframe() {
17
22
  const {
18
23
  isBlockBasedTheme,
19
24
  hasV3BlocksOnly,
20
- isEditingTemplate,
21
- isZoomOutMode
25
+ isEditingTemplateOrPattern,
26
+ isZoomOutMode,
27
+ deviceType
22
28
  } = (0, _data.useSelect)(select => {
23
29
  const {
24
30
  getEditorSettings,
25
- getCurrentPostType
31
+ getCurrentPostType,
32
+ getDeviceType
26
33
  } = select(_editor.store);
27
34
  const {
28
- __unstableGetEditorMode
29
- } = select(_blockEditor.store);
35
+ isZoomOut
36
+ } = (0, _lockUnlock.unlock)(select(_blockEditor.store));
30
37
  const {
31
38
  getBlockTypes
32
39
  } = select(_blocks.store);
@@ -36,10 +43,11 @@ function useShouldIframe() {
36
43
  hasV3BlocksOnly: getBlockTypes().every(type => {
37
44
  return type.apiVersion >= 3;
38
45
  }),
39
- isEditingTemplate: getCurrentPostType() === 'wp_template',
40
- isZoomOutMode: __unstableGetEditorMode() === 'zoom-out'
46
+ isEditingTemplateOrPattern: ['wp_template', 'wp_block'].includes(getCurrentPostType()),
47
+ isZoomOutMode: isZoomOut(),
48
+ deviceType: getDeviceType()
41
49
  };
42
50
  }, []);
43
- return hasV3BlocksOnly || isGutenbergPlugin && isBlockBasedTheme || isEditingTemplate || isZoomOutMode;
51
+ return hasV3BlocksOnly || isGutenbergPlugin && isBlockBasedTheme || isEditingTemplateOrPattern || isZoomOutMode || ['Tablet', 'Mobile'].includes(deviceType);
44
52
  }
45
53
  //# sourceMappingURL=use-should-iframe.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_editor","require","_data","_blocks","_blockEditor","isGutenbergPlugin","globalThis","IS_GUTENBERG_PLUGIN","useShouldIframe","isBlockBasedTheme","hasV3BlocksOnly","isEditingTemplate","isZoomOutMode","useSelect","select","getEditorSettings","getCurrentPostType","editorStore","__unstableGetEditorMode","blockEditorStore","getBlockTypes","blocksStore","editorSettings","__unstableIsBlockBasedTheme","every","type","apiVersion"],"sources":["@wordpress/edit-post/src/components/layout/use-should-iframe.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as editorStore } from '@wordpress/editor';\nimport { useSelect } from '@wordpress/data';\nimport { store as blocksStore } from '@wordpress/blocks';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\nconst isGutenbergPlugin = globalThis.IS_GUTENBERG_PLUGIN ? true : false;\n\nexport function useShouldIframe() {\n\tconst {\n\t\tisBlockBasedTheme,\n\t\thasV3BlocksOnly,\n\t\tisEditingTemplate,\n\t\tisZoomOutMode,\n\t} = useSelect( ( select ) => {\n\t\tconst { getEditorSettings, getCurrentPostType } = select( editorStore );\n\t\tconst { __unstableGetEditorMode } = select( blockEditorStore );\n\t\tconst { getBlockTypes } = select( blocksStore );\n\t\tconst editorSettings = getEditorSettings();\n\t\treturn {\n\t\t\tisBlockBasedTheme: editorSettings.__unstableIsBlockBasedTheme,\n\t\t\thasV3BlocksOnly: getBlockTypes().every( ( type ) => {\n\t\t\t\treturn type.apiVersion >= 3;\n\t\t\t} ),\n\t\t\tisEditingTemplate: getCurrentPostType() === 'wp_template',\n\t\t\tisZoomOutMode: __unstableGetEditorMode() === 'zoom-out',\n\t\t};\n\t}, [] );\n\n\treturn (\n\t\thasV3BlocksOnly ||\n\t\t( isGutenbergPlugin && isBlockBasedTheme ) ||\n\t\tisEditingTemplate ||\n\t\tisZoomOutMode\n\t);\n}\n"],"mappings":";;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AANA;AACA;AACA;;AAMA,MAAMI,iBAAiB,GAAGC,UAAU,CAACC,mBAAmB,GAAG,IAAI,GAAG,KAAK;AAEhE,SAASC,eAAeA,CAAA,EAAG;EACjC,MAAM;IACLC,iBAAiB;IACjBC,eAAe;IACfC,iBAAiB;IACjBC;EACD,CAAC,GAAG,IAAAC,eAAS,EAAIC,MAAM,IAAM;IAC5B,MAAM;MAAEC,iBAAiB;MAAEC;IAAmB,CAAC,GAAGF,MAAM,CAAEG,aAAY,CAAC;IACvE,MAAM;MAAEC;IAAwB,CAAC,GAAGJ,MAAM,CAAEK,kBAAiB,CAAC;IAC9D,MAAM;MAAEC;IAAc,CAAC,GAAGN,MAAM,CAAEO,aAAY,CAAC;IAC/C,MAAMC,cAAc,GAAGP,iBAAiB,CAAC,CAAC;IAC1C,OAAO;MACNN,iBAAiB,EAAEa,cAAc,CAACC,2BAA2B;MAC7Db,eAAe,EAAEU,aAAa,CAAC,CAAC,CAACI,KAAK,CAAIC,IAAI,IAAM;QACnD,OAAOA,IAAI,CAACC,UAAU,IAAI,CAAC;MAC5B,CAAE,CAAC;MACHf,iBAAiB,EAAEK,kBAAkB,CAAC,CAAC,KAAK,aAAa;MACzDJ,aAAa,EAAEM,uBAAuB,CAAC,CAAC,KAAK;IAC9C,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EAEP,OACCR,eAAe,IACbL,iBAAiB,IAAII,iBAAmB,IAC1CE,iBAAiB,IACjBC,aAAa;AAEf","ignoreList":[]}
1
+ {"version":3,"names":["_editor","require","_data","_blocks","_blockEditor","_lockUnlock","isGutenbergPlugin","globalThis","IS_GUTENBERG_PLUGIN","useShouldIframe","isBlockBasedTheme","hasV3BlocksOnly","isEditingTemplateOrPattern","isZoomOutMode","deviceType","useSelect","select","getEditorSettings","getCurrentPostType","getDeviceType","editorStore","isZoomOut","unlock","blockEditorStore","getBlockTypes","blocksStore","editorSettings","__unstableIsBlockBasedTheme","every","type","apiVersion","includes"],"sources":["@wordpress/edit-post/src/components/layout/use-should-iframe.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as editorStore } from '@wordpress/editor';\nimport { useSelect } from '@wordpress/data';\nimport { store as blocksStore } from '@wordpress/blocks';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst isGutenbergPlugin = globalThis.IS_GUTENBERG_PLUGIN ? true : false;\n\nexport function useShouldIframe() {\n\tconst {\n\t\tisBlockBasedTheme,\n\t\thasV3BlocksOnly,\n\t\tisEditingTemplateOrPattern,\n\t\tisZoomOutMode,\n\t\tdeviceType,\n\t} = useSelect( ( select ) => {\n\t\tconst { getEditorSettings, getCurrentPostType, getDeviceType } =\n\t\t\tselect( editorStore );\n\t\tconst { isZoomOut } = unlock( select( blockEditorStore ) );\n\t\tconst { getBlockTypes } = select( blocksStore );\n\t\tconst editorSettings = getEditorSettings();\n\t\treturn {\n\t\t\tisBlockBasedTheme: editorSettings.__unstableIsBlockBasedTheme,\n\t\t\thasV3BlocksOnly: getBlockTypes().every( ( type ) => {\n\t\t\t\treturn type.apiVersion >= 3;\n\t\t\t} ),\n\t\t\tisEditingTemplateOrPattern: [ 'wp_template', 'wp_block' ].includes(\n\t\t\t\tgetCurrentPostType()\n\t\t\t),\n\t\t\tisZoomOutMode: isZoomOut(),\n\t\t\tdeviceType: getDeviceType(),\n\t\t};\n\t}, [] );\n\n\treturn (\n\t\thasV3BlocksOnly ||\n\t\t( isGutenbergPlugin && isBlockBasedTheme ) ||\n\t\tisEditingTemplateOrPattern ||\n\t\tisZoomOutMode ||\n\t\t[ 'Tablet', 'Mobile' ].includes( deviceType )\n\t);\n}\n"],"mappings":";;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAKA,IAAAI,WAAA,GAAAJ,OAAA;AAXA;AACA;AACA;;AAMA;AACA;AACA;;AAGA,MAAMK,iBAAiB,GAAGC,UAAU,CAACC,mBAAmB,GAAG,IAAI,GAAG,KAAK;AAEhE,SAASC,eAAeA,CAAA,EAAG;EACjC,MAAM;IACLC,iBAAiB;IACjBC,eAAe;IACfC,0BAA0B;IAC1BC,aAAa;IACbC;EACD,CAAC,GAAG,IAAAC,eAAS,EAAIC,MAAM,IAAM;IAC5B,MAAM;MAAEC,iBAAiB;MAAEC,kBAAkB;MAAEC;IAAc,CAAC,GAC7DH,MAAM,CAAEI,aAAY,CAAC;IACtB,MAAM;MAAEC;IAAU,CAAC,GAAG,IAAAC,kBAAM,EAAEN,MAAM,CAAEO,kBAAiB,CAAE,CAAC;IAC1D,MAAM;MAAEC;IAAc,CAAC,GAAGR,MAAM,CAAES,aAAY,CAAC;IAC/C,MAAMC,cAAc,GAAGT,iBAAiB,CAAC,CAAC;IAC1C,OAAO;MACNP,iBAAiB,EAAEgB,cAAc,CAACC,2BAA2B;MAC7DhB,eAAe,EAAEa,aAAa,CAAC,CAAC,CAACI,KAAK,CAAIC,IAAI,IAAM;QACnD,OAAOA,IAAI,CAACC,UAAU,IAAI,CAAC;MAC5B,CAAE,CAAC;MACHlB,0BAA0B,EAAE,CAAE,aAAa,EAAE,UAAU,CAAE,CAACmB,QAAQ,CACjEb,kBAAkB,CAAC,CACpB,CAAC;MACDL,aAAa,EAAEQ,SAAS,CAAC,CAAC;MAC1BP,UAAU,EAAEK,aAAa,CAAC;IAC3B,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EAEP,OACCR,eAAe,IACbL,iBAAiB,IAAII,iBAAmB,IAC1CE,0BAA0B,IAC1BC,aAAa,IACb,CAAE,QAAQ,EAAE,QAAQ,CAAE,CAACkB,QAAQ,CAAEjB,UAAW,CAAC;AAE/C","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_data","_editor","MetaBoxVisibility","Component","componentDidMount","updateDOM","componentDidUpdate","prevProps","props","isVisible","id","element","document","getElementById","classList","remove","add","render","_default","exports","default","withSelect","select","editorStore","isEditorPanelEnabled"],"sources":["@wordpress/edit-post/src/components/meta-boxes/meta-box-visibility.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { withSelect } from '@wordpress/data';\nimport { store as editorStore } from '@wordpress/editor';\n\nclass MetaBoxVisibility extends Component {\n\tcomponentDidMount() {\n\t\tthis.updateDOM();\n\t}\n\n\tcomponentDidUpdate( prevProps ) {\n\t\tif ( this.props.isVisible !== prevProps.isVisible ) {\n\t\t\tthis.updateDOM();\n\t\t}\n\t}\n\n\tupdateDOM() {\n\t\tconst { id, isVisible } = this.props;\n\n\t\tconst element = document.getElementById( id );\n\t\tif ( ! element ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( isVisible ) {\n\t\t\telement.classList.remove( 'is-hidden' );\n\t\t} else {\n\t\t\telement.classList.add( 'is-hidden' );\n\t\t}\n\t}\n\n\trender() {\n\t\treturn null;\n\t}\n}\n\nexport default withSelect( ( select, { id } ) => ( {\n\tisVisible: select( editorStore ).isEditorPanelEnabled( `meta-box-${ id }` ),\n} ) )( MetaBoxVisibility );\n"],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AALA;AACA;AACA;;AAKA,MAAMG,iBAAiB,SAASC,kBAAS,CAAC;EACzCC,iBAAiBA,CAAA,EAAG;IACnB,IAAI,CAACC,SAAS,CAAC,CAAC;EACjB;EAEAC,kBAAkBA,CAAEC,SAAS,EAAG;IAC/B,IAAK,IAAI,CAACC,KAAK,CAACC,SAAS,KAAKF,SAAS,CAACE,SAAS,EAAG;MACnD,IAAI,CAACJ,SAAS,CAAC,CAAC;IACjB;EACD;EAEAA,SAASA,CAAA,EAAG;IACX,MAAM;MAAEK,EAAE;MAAED;IAAU,CAAC,GAAG,IAAI,CAACD,KAAK;IAEpC,MAAMG,OAAO,GAAGC,QAAQ,CAACC,cAAc,CAAEH,EAAG,CAAC;IAC7C,IAAK,CAAEC,OAAO,EAAG;MAChB;IACD;IAEA,IAAKF,SAAS,EAAG;MAChBE,OAAO,CAACG,SAAS,CAACC,MAAM,CAAE,WAAY,CAAC;IACxC,CAAC,MAAM;MACNJ,OAAO,CAACG,SAAS,CAACE,GAAG,CAAE,WAAY,CAAC;IACrC;EACD;EAEAC,MAAMA,CAAA,EAAG;IACR,OAAO,IAAI;EACZ;AACD;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEc,IAAAC,gBAAU,EAAE,CAAEC,MAAM,EAAE;EAAEZ;AAAG,CAAC,MAAQ;EAClDD,SAAS,EAAEa,MAAM,CAAEC,aAAY,CAAC,CAACC,oBAAoB,CAAG,YAAYd,EAAI,EAAE;AAC3E,CAAC,CAAG,CAAC,CAAER,iBAAkB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_element","require","_data","_editor","MetaBoxVisibility","Component","componentDidMount","updateDOM","componentDidUpdate","prevProps","props","isVisible","id","element","document","getElementById","classList","remove","add","render","_default","exports","default","withSelect","select","editorStore","isEditorPanelEnabled"],"sources":["@wordpress/edit-post/src/components/meta-boxes/meta-box-visibility.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { withSelect } from '@wordpress/data';\nimport { store as editorStore } from '@wordpress/editor';\n\nclass MetaBoxVisibility extends Component {\n\tcomponentDidMount() {\n\t\tthis.updateDOM();\n\t}\n\n\tcomponentDidUpdate( prevProps ) {\n\t\tif ( this.props.isVisible !== prevProps.isVisible ) {\n\t\t\tthis.updateDOM();\n\t\t}\n\t}\n\n\tupdateDOM() {\n\t\tconst { id, isVisible } = this.props;\n\n\t\tconst element = document.getElementById( id );\n\t\tif ( ! element ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( isVisible ) {\n\t\t\telement.classList.remove( 'is-hidden' );\n\t\t} else {\n\t\t\telement.classList.add( 'is-hidden' );\n\t\t}\n\t}\n\n\trender() {\n\t\treturn null;\n\t}\n}\n\nexport default withSelect( ( select, { id } ) => ( {\n\tisVisible: select( editorStore ).isEditorPanelEnabled( `meta-box-${ id }` ),\n} ) )( MetaBoxVisibility );\n"],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AALA;AACA;AACA;;AAKA,MAAMG,iBAAiB,SAASC,kBAAS,CAAC;EACzCC,iBAAiBA,CAAA,EAAG;IACnB,IAAI,CAACC,SAAS,CAAC,CAAC;EACjB;EAEAC,kBAAkBA,CAAEC,SAAS,EAAG;IAC/B,IAAK,IAAI,CAACC,KAAK,CAACC,SAAS,KAAKF,SAAS,CAACE,SAAS,EAAG;MACnD,IAAI,CAACJ,SAAS,CAAC,CAAC;IACjB;EACD;EAEAA,SAASA,CAAA,EAAG;IACX,MAAM;MAAEK,EAAE;MAAED;IAAU,CAAC,GAAG,IAAI,CAACD,KAAK;IAEpC,MAAMG,OAAO,GAAGC,QAAQ,CAACC,cAAc,CAAEH,EAAG,CAAC;IAC7C,IAAK,CAAEC,OAAO,EAAG;MAChB;IACD;IAEA,IAAKF,SAAS,EAAG;MAChBE,OAAO,CAACG,SAAS,CAACC,MAAM,CAAE,WAAY,CAAC;IACxC,CAAC,MAAM;MACNJ,OAAO,CAACG,SAAS,CAACE,GAAG,CAAE,WAAY,CAAC;IACrC;EACD;EAEAC,MAAMA,CAAA,EAAG;IACR,OAAO,IAAI;EACZ;AACD;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEc,IAAAC,gBAAU,EAAE,CAAEC,MAAM,EAAE;EAAEZ;AAAG,CAAC,MAAQ;EAClDD,SAAS,EAAEa,MAAM,CAAEC,aAAY,CAAC,CAACC,oBAAoB,CAAE,YAAad,EAAE,EAAI;AAC3E,CAAC,CAAG,CAAC,CAAER,iBAAkB,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_element","_components","_data","_store","_jsxRuntime","MetaBoxesArea","location","container","useRef","formRef","useEffect","current","document","querySelector","appendChild","isSaving","useSelect","select","editPostStore","isSavingMetaBoxes","classes","clsx","jsxs","className","children","jsx","Spinner","ref","_default","exports","default"],"sources":["@wordpress/edit-post/src/components/meta-boxes/meta-boxes-area/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useRef, useEffect } from '@wordpress/element';\nimport { Spinner } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editPostStore } from '../../../store';\n\n/**\n * Render metabox area.\n *\n * @param {Object} props Component props.\n * @param {string} props.location metabox location.\n * @return {Component} The component to be rendered.\n */\nfunction MetaBoxesArea( { location } ) {\n\tconst container = useRef( null );\n\tconst formRef = useRef( null );\n\n\tuseEffect( () => {\n\t\tformRef.current = document.querySelector(\n\t\t\t'.metabox-location-' + location\n\t\t);\n\n\t\tif ( formRef.current ) {\n\t\t\tcontainer.current.appendChild( formRef.current );\n\t\t}\n\n\t\treturn () => {\n\t\t\tif ( formRef.current ) {\n\t\t\t\tdocument\n\t\t\t\t\t.querySelector( '#metaboxes' )\n\t\t\t\t\t.appendChild( formRef.current );\n\t\t\t}\n\t\t};\n\t}, [ location ] );\n\n\tconst isSaving = useSelect( ( select ) => {\n\t\treturn select( editPostStore ).isSavingMetaBoxes();\n\t}, [] );\n\n\tconst classes = clsx( 'edit-post-meta-boxes-area', `is-${ location }`, {\n\t\t'is-loading': isSaving,\n\t} );\n\n\treturn (\n\t\t<div className={ classes }>\n\t\t\t{ isSaving && <Spinner /> }\n\t\t\t<div\n\t\t\t\tclassName=\"edit-post-meta-boxes-area__container\"\n\t\t\t\tref={ container }\n\t\t\t/>\n\t\t\t<div className=\"edit-post-meta-boxes-area__clear\" />\n\t\t</div>\n\t);\n}\n\nexport default MetaBoxesArea;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AAKA,IAAAI,MAAA,GAAAJ,OAAA;AAAwD,IAAAK,WAAA,GAAAL,OAAA;AA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F,IAAAH,WAAA,CAAAqB,GAAA;MAAKF,SAAS,EAAC;IAAkC,CAAE,CAAC;EAAA,CAChD,CAAC;AAER;AAAC,IAAAK,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEczB,aAAa","ignoreList":[]}
1
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_element","_components","_data","_store","_jsxRuntime","MetaBoxesArea","location","container","useRef","formRef","useEffect","current","document","querySelector","appendChild","isSaving","useSelect","select","editPostStore","isSavingMetaBoxes","classes","clsx","jsxs","className","children","jsx","Spinner","ref","_default","exports","default"],"sources":["@wordpress/edit-post/src/components/meta-boxes/meta-boxes-area/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useRef, useEffect } from '@wordpress/element';\nimport { Spinner } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editPostStore } from '../../../store';\n\n/**\n * Render metabox area.\n *\n * @param {Object} props Component props.\n * @param {string} props.location metabox location.\n * @return {Component} The component to be rendered.\n */\nfunction MetaBoxesArea( { location } ) {\n\tconst container = useRef( null );\n\tconst formRef = useRef( null );\n\n\tuseEffect( () => {\n\t\tformRef.current = document.querySelector(\n\t\t\t'.metabox-location-' + location\n\t\t);\n\n\t\tif ( formRef.current ) {\n\t\t\tcontainer.current.appendChild( formRef.current );\n\t\t}\n\n\t\treturn () => {\n\t\t\tif ( formRef.current ) {\n\t\t\t\tdocument\n\t\t\t\t\t.querySelector( '#metaboxes' )\n\t\t\t\t\t.appendChild( formRef.current );\n\t\t\t}\n\t\t};\n\t}, [ location ] );\n\n\tconst isSaving = useSelect( ( select ) => {\n\t\treturn select( editPostStore ).isSavingMetaBoxes();\n\t}, [] );\n\n\tconst classes = clsx( 'edit-post-meta-boxes-area', `is-${ location }`, {\n\t\t'is-loading': isSaving,\n\t} );\n\n\treturn (\n\t\t<div className={ classes }>\n\t\t\t{ isSaving && <Spinner /> }\n\t\t\t<div\n\t\t\t\tclassName=\"edit-post-meta-boxes-area__container\"\n\t\t\t\tref={ container }\n\t\t\t/>\n\t\t\t<div className=\"edit-post-meta-boxes-area__clear\" />\n\t\t</div>\n\t);\n}\n\nexport default MetaBoxesArea;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AAKA,IAAAI,MAAA,GAAAJ,OAAA;AAAwD,IAAAK,WAAA,GAAAL,OAAA;AAfxD;AACA;AACA;;AAGA;AACA;AACA;;AAKA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,GACA,SAASM,aAAaA,CAAE;EAAEC;AAAS,CAAC,EAAG;EACtC,MAAMC,SAAS,GAAG,IAAAC,eAAM,EAAE,IAAK,CAAC;EAChC,MAAMC,OAAO,GAAG,IAAAD,eAAM,EAAE,IAAK,CAAC;EAE9B,IAAAE,kBAAS,EAAE,MAAM;IAChBD,OAAO,CAACE,OAAO,GAAGC,QAAQ,CAACC,aAAa,CACvC,oBAAoB,GAAGP,QACxB,CAAC;IAED,IAAKG,OAAO,CAACE,OAAO,EAAG;MACtBJ,SAAS,CAACI,OAAO,CAACG,WAAW,CAAEL,OAAO,CAACE,OAAQ,CAAC;IACjD;IAEA,OAAO,MAAM;MACZ,IAAKF,OAAO,CAACE,OAAO,EAAG;QACtBC,QAAQ,CACNC,aAAa,CAAE,YAAa,CAAC,CAC7BC,WAAW,CAAEL,OAAO,CAACE,OAAQ,CAAC;MACjC;IACD,CAAC;EACF,CAAC,EAAE,CAAEL,QAAQ,CAAG,CAAC;EAEjB,MAAMS,QAAQ,GAAG,IAAAC,eAAS,EAAIC,MAAM,IAAM;IACzC,OAAOA,MAAM,CAAEC,YAAc,CAAC,CAACC,iBAAiB,CAAC,CAAC;EACnD,CAAC,EAAE,EAAG,CAAC;EAEP,MAAMC,OAAO,GAAG,IAAAC,aAAI,EAAE,2BAA2B,EAAE,MAAOf,QAAQ,EAAG,EAAE;IACtE,YAAY,EAAES;EACf,CAAE,CAAC;EAEH,oBACC,IAAAX,WAAA,CAAAkB,IAAA;IAAKC,SAAS,EAAGH,OAAS;IAAAI,QAAA,GACvBT,QAAQ,iBAAI,IAAAX,WAAA,CAAAqB,GAAA,EAACxB,WAAA,CAAAyB,OAAO,IAAE,CAAC,eACzB,IAAAtB,WAAA,CAAAqB,GAAA;MACCF,SAAS,EAAC,sCAAsC;MAChDI,GAAG,EAAGpB;IAAW,CACjB,CAAC,eACF,IAAAH,WAAA,CAAAqB,GAAA;MAAKF,SAAS,EAAC;IAAkC,CAAE,CAAC;EAAA,CAChD,CAAC;AAER;AAAC,IAAAK,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEczB,aAAa","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_i18n","require","_data","_editor","_preferences","_enableCustomFields","_interopRequireDefault","_enablePanel","_store","_lockUnlock","_jsxRuntime","PreferencesModalSection","unlock","preferencesPrivateApis","MetaBoxesSection","areCustomFieldsRegistered","metaBoxes","sectionProps","thirdPartyMetaBoxes","filter","id","length","jsxs","children","jsx","default","label","__","map","title","panelName","_default","exports","withSelect","select","getEditorSettings","editorStore","getAllMetaBoxes","editPostStore","enableCustomFields","undefined"],"sources":["@wordpress/edit-post/src/components/preferences-modal/meta-boxes-section.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { withSelect } from '@wordpress/data';\nimport { store as editorStore } from '@wordpress/editor';\nimport { privateApis as preferencesPrivateApis } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport EnableCustomFieldsOption from './enable-custom-fields';\nimport EnablePanelOption from './enable-panel';\nimport { store as editPostStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst { PreferencesModalSection } = unlock( preferencesPrivateApis );\n\nexport function MetaBoxesSection( {\n\tareCustomFieldsRegistered,\n\tmetaBoxes,\n\t...sectionProps\n} ) {\n\t// The 'Custom Fields' meta box is a special case that we handle separately.\n\tconst thirdPartyMetaBoxes = metaBoxes.filter(\n\t\t( { id } ) => id !== 'postcustom'\n\t);\n\n\tif ( ! areCustomFieldsRegistered && thirdPartyMetaBoxes.length === 0 ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PreferencesModalSection { ...sectionProps }>\n\t\t\t{ areCustomFieldsRegistered && (\n\t\t\t\t<EnableCustomFieldsOption label={ __( 'Custom fields' ) } />\n\t\t\t) }\n\t\t\t{ thirdPartyMetaBoxes.map( ( { id, title } ) => (\n\t\t\t\t<EnablePanelOption\n\t\t\t\t\tkey={ id }\n\t\t\t\t\tlabel={ title }\n\t\t\t\t\tpanelName={ `meta-box-${ id }` }\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t</PreferencesModalSection>\n\t);\n}\n\nexport default withSelect( ( select ) => {\n\tconst { getEditorSettings } = select( editorStore );\n\tconst { getAllMetaBoxes } = select( editPostStore );\n\n\treturn {\n\t\t// This setting should not live in the block editor's store.\n\t\tareCustomFieldsRegistered:\n\t\t\tgetEditorSettings().enableCustomFields !== undefined,\n\t\tmetaBoxes: getAllMetaBoxes(),\n\t};\n} )( MetaBoxesSection );\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAKA,IAAAI,mBAAA,GAAAC,sBAAA,CAAAL,OAAA;AACA,IAAAM,YAAA,GAAAD,sBAAA,CAAAL,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,WAAA,GAAAR,OAAA;AAA2C,IAAAS,WAAA,GAAAT,OAAA;AAd3C;AACA;AACA;;AAMA;AACA;AACA;;AAMA,MAAM;EAAEU;AAAwB,CAAC,GAAG,IAAAC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18n","require","_data","_editor","_preferences","_enableCustomFields","_interopRequireDefault","_enablePanel","_store","_lockUnlock","_jsxRuntime","PreferencesModalSection","unlock","preferencesPrivateApis","MetaBoxesSection","areCustomFieldsRegistered","metaBoxes","sectionProps","thirdPartyMetaBoxes","filter","id","length","jsxs","children","jsx","default","label","__","map","title","panelName","_default","exports","withSelect","select","getEditorSettings","editorStore","getAllMetaBoxes","editPostStore","enableCustomFields","undefined"],"sources":["@wordpress/edit-post/src/components/preferences-modal/meta-boxes-section.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { withSelect } from '@wordpress/data';\nimport { store as editorStore } from '@wordpress/editor';\nimport { privateApis as preferencesPrivateApis } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport EnableCustomFieldsOption from './enable-custom-fields';\nimport EnablePanelOption from './enable-panel';\nimport { store as editPostStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst { PreferencesModalSection } = unlock( preferencesPrivateApis );\n\nexport function MetaBoxesSection( {\n\tareCustomFieldsRegistered,\n\tmetaBoxes,\n\t...sectionProps\n} ) {\n\t// The 'Custom Fields' meta box is a special case that we handle separately.\n\tconst thirdPartyMetaBoxes = metaBoxes.filter(\n\t\t( { id } ) => id !== 'postcustom'\n\t);\n\n\tif ( ! areCustomFieldsRegistered && thirdPartyMetaBoxes.length === 0 ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PreferencesModalSection { ...sectionProps }>\n\t\t\t{ areCustomFieldsRegistered && (\n\t\t\t\t<EnableCustomFieldsOption label={ __( 'Custom fields' ) } />\n\t\t\t) }\n\t\t\t{ thirdPartyMetaBoxes.map( ( { id, title } ) => (\n\t\t\t\t<EnablePanelOption\n\t\t\t\t\tkey={ id }\n\t\t\t\t\tlabel={ title }\n\t\t\t\t\tpanelName={ `meta-box-${ id }` }\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t</PreferencesModalSection>\n\t);\n}\n\nexport default withSelect( ( select ) => {\n\tconst { getEditorSettings } = select( editorStore );\n\tconst { getAllMetaBoxes } = select( editPostStore );\n\n\treturn {\n\t\t// This setting should not live in the block editor's store.\n\t\tareCustomFieldsRegistered:\n\t\t\tgetEditorSettings().enableCustomFields !== undefined,\n\t\tmetaBoxes: getAllMetaBoxes(),\n\t};\n} )( MetaBoxesSection );\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAKA,IAAAI,mBAAA,GAAAC,sBAAA,CAAAL,OAAA;AACA,IAAAM,YAAA,GAAAD,sBAAA,CAAAL,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,WAAA,GAAAR,OAAA;AAA2C,IAAAS,WAAA,GAAAT,OAAA;AAd3C;AACA;AACA;;AAMA;AACA;AACA;;AAMA,MAAM;EAAEU;AAAwB,CAAC,GAAG,IAAAC,kBAAM,EAAEC,wBAAuB,CAAC;AAE7D,SAASC,gBAAgBA,CAAE;EACjCC,yBAAyB;EACzBC,SAAS;EACT,GAAGC;AACJ,CAAC,EAAG;EACH;EACA,MAAMC,mBAAmB,GAAGF,SAAS,CAACG,MAAM,CAC3C,CAAE;IAAEC;EAAG,CAAC,KAAMA,EAAE,KAAK,YACtB,CAAC;EAED,IAAK,CAAEL,yBAAyB,IAAIG,mBAAmB,CAACG,MAAM,KAAK,CAAC,EAAG;IACtE,OAAO,IAAI;EACZ;EAEA,oBACC,IAAAX,WAAA,CAAAY,IAAA,EAACX,uBAAuB;IAAA,GAAMM,YAAY;IAAAM,QAAA,GACvCR,yBAAyB,iBAC1B,IAAAL,WAAA,CAAAc,GAAA,EAACnB,mBAAA,CAAAoB,OAAwB;MAACC,KAAK,EAAG,IAAAC,QAAE,EAAE,eAAgB;IAAG,CAAE,CAC3D,EACCT,mBAAmB,CAACU,GAAG,CAAE,CAAE;MAAER,EAAE;MAAES;IAAM,CAAC,kBACzC,IAAAnB,WAAA,CAAAc,GAAA,EAACjB,YAAA,CAAAkB,OAAiB;MAEjBC,KAAK,EAAGG,KAAO;MACfC,SAAS,EAAG,YAAaV,EAAE;IAAK,GAF1BA,EAGN,CACA,CAAC;EAAA,CACqB,CAAC;AAE5B;AAAC,IAAAW,QAAA,GAAAC,OAAA,CAAAP,OAAA,GAEc,IAAAQ,gBAAU,EAAIC,MAAM,IAAM;EACxC,MAAM;IAAEC;EAAkB,CAAC,GAAGD,MAAM,CAAEE,aAAY,CAAC;EACnD,MAAM;IAAEC;EAAgB,CAAC,GAAGH,MAAM,CAAEI,YAAc,CAAC;EAEnD,OAAO;IACN;IACAvB,yBAAyB,EACxBoB,iBAAiB,CAAC,CAAC,CAACI,kBAAkB,KAAKC,SAAS;IACrDxB,SAAS,EAAEqB,eAAe,CAAC;EAC5B,CAAC;AACF,CAAE,CAAC,CAAEvB,gBAAiB,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_editor","require","_url","_deprecated","_interopRequireDefault","_lockUnlock","_jsxRuntime","PluginPostExcerpt","unlock","editorPrivateApis","isSiteEditor","getPath","window","location","href","includes","deprecateSlot","name","deprecated","since","alternative","PluginBlockSettingsMenuItem","props","jsx","PluginDocumentSettingPanel","PluginMoreMenuItem","PluginPrePublishPanel","PluginPostPublishPanel","PluginPostStatusInfo","PluginSidebar","PluginSidebarMoreMenuItem","__experimentalPluginPostExcerpt","hint","link"],"sources":["@wordpress/edit-post/src/deprecated.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tprivateApis as editorPrivateApis,\n\tPluginBlockSettingsMenuItem as EditorPluginBlockSettingsMenuItem,\n\tPluginDocumentSettingPanel as EditorPluginDocumentSettingPanel,\n\tPluginMoreMenuItem as EditorPluginMoreMenuItem,\n\tPluginPrePublishPanel as EditorPluginPrePublishPanel,\n\tPluginPostPublishPanel as EditorPluginPostPublishPanel,\n\tPluginPostStatusInfo as EditorPluginPostStatusInfo,\n\tPluginSidebar as EditorPluginSidebar,\n\tPluginSidebarMoreMenuItem as EditorPluginSidebarMoreMenuItem,\n} from '@wordpress/editor';\nimport { getPath } from '@wordpress/url';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from './lock-unlock';\nconst { PluginPostExcerpt } = unlock( editorPrivateApis );\n\nconst isSiteEditor = getPath( window.location.href )?.includes(\n\t'site-editor.php'\n);\n\nconst deprecateSlot = ( name ) => {\n\tdeprecated( `wp.editPost.${ name }`, {\n\t\tsince: '6.6',\n\t\talternative: `wp.editor.${ name }`,\n\t} );\n};\n\n/* eslint-disable jsdoc/require-param */\n/**\n * @see PluginBlockSettingsMenuItem in @wordpress/editor package.\n */\nexport function PluginBlockSettingsMenuItem( props ) {\n\tif ( isSiteEditor ) {\n\t\treturn null;\n\t}\n\tdeprecateSlot( 'PluginBlockSettingsMenuItem' );\n\treturn <EditorPluginBlockSettingsMenuItem { ...props } />;\n}\n\n/**\n * @see PluginDocumentSettingPanel in @wordpress/editor package.\n */\nexport function PluginDocumentSettingPanel( props ) {\n\tif ( isSiteEditor ) {\n\t\treturn null;\n\t}\n\tdeprecateSlot( 'PluginDocumentSettingPanel' );\n\treturn <EditorPluginDocumentSettingPanel { ...props } />;\n}\n\n/**\n * @see PluginMoreMenuItem in @wordpress/editor package.\n */\nexport function PluginMoreMenuItem( props ) {\n\tif ( isSiteEditor ) {\n\t\treturn null;\n\t}\n\tdeprecateSlot( 'PluginMoreMenuItem' );\n\treturn <EditorPluginMoreMenuItem { ...props } />;\n}\n\n/**\n * @see PluginPrePublishPanel in @wordpress/editor package.\n */\nexport function PluginPrePublishPanel( props ) {\n\tif ( isSiteEditor ) {\n\t\treturn null;\n\t}\n\tdeprecateSlot( 'PluginPrePublishPanel' );\n\treturn <EditorPluginPrePublishPanel { ...props } />;\n}\n\n/**\n * @see PluginPostPublishPanel in @wordpress/editor package.\n */\nexport function PluginPostPublishPanel( props ) {\n\tif ( isSiteEditor ) {\n\t\treturn null;\n\t}\n\tdeprecateSlot( 'PluginPostPublishPanel' );\n\treturn <EditorPluginPostPublishPanel { ...props } />;\n}\n\n/**\n * @see PluginPostStatusInfo in @wordpress/editor package.\n */\nexport function PluginPostStatusInfo( props ) {\n\tif ( isSiteEditor ) {\n\t\treturn null;\n\t}\n\tdeprecateSlot( 'PluginPostStatusInfo' );\n\treturn <EditorPluginPostStatusInfo { ...props } />;\n}\n\n/**\n * @see PluginSidebar in @wordpress/editor package.\n */\nexport function PluginSidebar( props ) {\n\tif ( isSiteEditor ) {\n\t\treturn null;\n\t}\n\tdeprecateSlot( 'PluginSidebar' );\n\treturn <EditorPluginSidebar { ...props } />;\n}\n\n/**\n * @see PluginSidebarMoreMenuItem in @wordpress/editor package.\n */\nexport function PluginSidebarMoreMenuItem( props ) {\n\tif ( isSiteEditor ) {\n\t\treturn null;\n\t}\n\tdeprecateSlot( 'PluginSidebarMoreMenuItem' );\n\treturn <EditorPluginSidebarMoreMenuItem { ...props } />;\n}\n\n/**\n * @see PluginPostExcerpt in @wordpress/editor package.\n */\nexport function __experimentalPluginPostExcerpt() {\n\tif ( isSiteEditor ) {\n\t\treturn null;\n\t}\n\tdeprecated( 'wp.editPost.__experimentalPluginPostExcerpt', {\n\t\tsince: '6.6',\n\t\thint: 'Core and custom panels can be access programmatically using their panel name.',\n\t\tlink: 'https://developer.wordpress.org/block-editor/reference-guides/slotfills/plugin-document-setting-panel/#accessing-a-panel-programmatically',\n\t} );\n\treturn PluginPostExcerpt;\n}\n\n/* eslint-enable jsdoc/require-param */\n"],"mappings":";;;;;;;;;;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AAWA,IAAAC,IAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAC,sBAAA,CAAAH,OAAA;AAKA,IAAAI,WAAA,GAAAJ,OAAA;AAAuC,IAAAK,WAAA,GAAAL,OAAA;AApBvC;AACA;AACA;;AA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IAAI;EACZ;EACA,IAAAQ,mBAAU,EAAE,6CAA6C,EAAE;IAC1DC,KAAK,EAAE,KAAK;IACZa,IAAI,EAAE,+EAA+E;IACrFC,IAAI,EAAE;EACP,CAAE,CAAC;EACH,OAAO1B,iBAAiB;AACzB;;AAEA","ignoreList":[]}
1
+ {"version":3,"names":["_editor","require","_url","_deprecated","_interopRequireDefault","_lockUnlock","_jsxRuntime","PluginPostExcerpt","unlock","editorPrivateApis","isSiteEditor","getPath","window","location","href","includes","deprecateSlot","name","deprecated","since","alternative","PluginBlockSettingsMenuItem","props","jsx","PluginDocumentSettingPanel","PluginMoreMenuItem","PluginPrePublishPanel","PluginPostPublishPanel","PluginPostStatusInfo","PluginSidebar","PluginSidebarMoreMenuItem","__experimentalPluginPostExcerpt","hint","link"],"sources":["@wordpress/edit-post/src/deprecated.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tprivateApis as editorPrivateApis,\n\tPluginBlockSettingsMenuItem as EditorPluginBlockSettingsMenuItem,\n\tPluginDocumentSettingPanel as EditorPluginDocumentSettingPanel,\n\tPluginMoreMenuItem as EditorPluginMoreMenuItem,\n\tPluginPrePublishPanel as EditorPluginPrePublishPanel,\n\tPluginPostPublishPanel as EditorPluginPostPublishPanel,\n\tPluginPostStatusInfo as EditorPluginPostStatusInfo,\n\tPluginSidebar as EditorPluginSidebar,\n\tPluginSidebarMoreMenuItem as EditorPluginSidebarMoreMenuItem,\n} from '@wordpress/editor';\nimport { getPath } from '@wordpress/url';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from './lock-unlock';\nconst { PluginPostExcerpt } = unlock( editorPrivateApis );\n\nconst isSiteEditor = getPath( window.location.href )?.includes(\n\t'site-editor.php'\n);\n\nconst deprecateSlot = ( name ) => {\n\tdeprecated( `wp.editPost.${ name }`, {\n\t\tsince: '6.6',\n\t\talternative: `wp.editor.${ name }`,\n\t} );\n};\n\n/* eslint-disable jsdoc/require-param */\n/**\n * @see PluginBlockSettingsMenuItem in @wordpress/editor package.\n */\nexport function PluginBlockSettingsMenuItem( props ) {\n\tif ( isSiteEditor ) {\n\t\treturn null;\n\t}\n\tdeprecateSlot( 'PluginBlockSettingsMenuItem' );\n\treturn <EditorPluginBlockSettingsMenuItem { ...props } />;\n}\n\n/**\n * @see PluginDocumentSettingPanel in @wordpress/editor package.\n */\nexport function PluginDocumentSettingPanel( props ) {\n\tif ( isSiteEditor ) {\n\t\treturn null;\n\t}\n\tdeprecateSlot( 'PluginDocumentSettingPanel' );\n\treturn <EditorPluginDocumentSettingPanel { ...props } />;\n}\n\n/**\n * @see PluginMoreMenuItem in @wordpress/editor package.\n */\nexport function PluginMoreMenuItem( props ) {\n\tif ( isSiteEditor ) {\n\t\treturn null;\n\t}\n\tdeprecateSlot( 'PluginMoreMenuItem' );\n\treturn <EditorPluginMoreMenuItem { ...props } />;\n}\n\n/**\n * @see PluginPrePublishPanel in @wordpress/editor package.\n */\nexport function PluginPrePublishPanel( props ) {\n\tif ( isSiteEditor ) {\n\t\treturn null;\n\t}\n\tdeprecateSlot( 'PluginPrePublishPanel' );\n\treturn <EditorPluginPrePublishPanel { ...props } />;\n}\n\n/**\n * @see PluginPostPublishPanel in @wordpress/editor package.\n */\nexport function PluginPostPublishPanel( props ) {\n\tif ( isSiteEditor ) {\n\t\treturn null;\n\t}\n\tdeprecateSlot( 'PluginPostPublishPanel' );\n\treturn <EditorPluginPostPublishPanel { ...props } />;\n}\n\n/**\n * @see PluginPostStatusInfo in @wordpress/editor package.\n */\nexport function PluginPostStatusInfo( props ) {\n\tif ( isSiteEditor ) {\n\t\treturn null;\n\t}\n\tdeprecateSlot( 'PluginPostStatusInfo' );\n\treturn <EditorPluginPostStatusInfo { ...props } />;\n}\n\n/**\n * @see PluginSidebar in @wordpress/editor package.\n */\nexport function PluginSidebar( props ) {\n\tif ( isSiteEditor ) {\n\t\treturn null;\n\t}\n\tdeprecateSlot( 'PluginSidebar' );\n\treturn <EditorPluginSidebar { ...props } />;\n}\n\n/**\n * @see PluginSidebarMoreMenuItem in @wordpress/editor package.\n */\nexport function PluginSidebarMoreMenuItem( props ) {\n\tif ( isSiteEditor ) {\n\t\treturn null;\n\t}\n\tdeprecateSlot( 'PluginSidebarMoreMenuItem' );\n\treturn <EditorPluginSidebarMoreMenuItem { ...props } />;\n}\n\n/**\n * @see PluginPostExcerpt in @wordpress/editor package.\n */\nexport function __experimentalPluginPostExcerpt() {\n\tif ( isSiteEditor ) {\n\t\treturn null;\n\t}\n\tdeprecated( 'wp.editPost.__experimentalPluginPostExcerpt', {\n\t\tsince: '6.6',\n\t\thint: 'Core and custom panels can be access programmatically using their panel name.',\n\t\tlink: 'https://developer.wordpress.org/block-editor/reference-guides/slotfills/plugin-document-setting-panel/#accessing-a-panel-programmatically',\n\t} );\n\treturn PluginPostExcerpt;\n}\n\n/* eslint-enable jsdoc/require-param */\n"],"mappings":";;;;;;;;;;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AAWA,IAAAC,IAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAC,sBAAA,CAAAH,OAAA;AAKA,IAAAI,WAAA,GAAAJ,OAAA;AAAuC,IAAAK,WAAA,GAAAL,OAAA;AApBvC;AACA;AACA;;AAeA;AACA;AACA;;AAEA,MAAM;EAAEM;AAAkB,CAAC,GAAG,IAAAC,kBAAM,EAAEC,mBAAkB,CAAC;AAEzD,MAAMC,YAAY,GAAG,IAAAC,YAAO,EAAEC,MAAM,CAACC,QAAQ,CAACC,IAAK,CAAC,EAAEC,QAAQ,CAC7D,iBACD,CAAC;AAED,MAAMC,aAAa,GAAKC,IAAI,IAAM;EACjC,IAAAC,mBAAU,EAAE,eAAgBD,IAAI,EAAG,EAAE;IACpCE,KAAK,EAAE,KAAK;IACZC,WAAW,EAAE,aAAcH,IAAI;EAChC,CAAE,CAAC;AACJ,CAAC;;AAED;AACA;AACA;AACA;AACO,SAASI,2BAA2BA,CAAEC,KAAK,EAAG;EAC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,KAAK,EAAG;EAC7C,IAAKZ,YAAY,EAAG;IACnB,OAAO,IAAI;EACZ;EACAM,aAAa,CAAE,sBAAuB,CAAC;EACvC,oBAAO,IAAAV,WAAA,CAAAiB,GAAA,EAACvB,OAAA,CAAA4B,oBAA0B;IAAA,GAAMN;EAAK,CAAI,CAAC;AACnD;;AAEA;AACA;AACA;AACO,SAASO,aAAaA,CAAEP,KAAK,EAAG;EACtC,IAAKZ,YAAY,EAAG;IACnB,OAAO,IAAI;EACZ;EACAM,aAAa,CAAE,eAAgB,CAAC;EAChC,oBAAO,IAAAV,WAAA,CAAAiB,GAAA,EAACvB,OAAA,CAAA6B,aAAmB;IAAA,GAAMP;EAAK,CAAI,CAAC;AAC5C;;AAEA;AACA;AACA;AACO,SAASQ,yBAAyBA,CAAER,KAAK,EAAG;EAClD,IAAKZ,YAAY,EAAG;IACnB,OAAO,IAAI;EACZ;EACAM,aAAa,CAAE,2BAA4B,CAAC;EAC5C,oBAAO,IAAAV,WAAA,CAAAiB,GAAA,EAACvB,OAAA,CAAA8B,yBAA+B;IAAA,GAAMR;EAAK,CAAI,CAAC;AACxD;;AAEA;AACA;AACA;AACO,SAASS,+BAA+BA,CAAA,EAAG;EACjD,IAAKrB,YAAY,EAAG;IACnB,OAAO,IAAI;EACZ;EACA,IAAAQ,mBAAU,EAAE,6CAA6C,EAAE;IAC1DC,KAAK,EAAE,KAAK;IACZa,IAAI,EAAE,+EAA+E;IACrFC,IAAI,EAAE;EACP,CAAE,CAAC;EACH,OAAO1B,iBAAiB;AACzB;;AAEA","ignoreList":[]}
package/build/index.js CHANGED
@@ -61,8 +61,7 @@ Object.keys(_deprecated2).forEach(function (key) {
61
61
 
62
62
  const {
63
63
  BackButton: __experimentalMainDashboardButton,
64
- registerCoreBlockBindingsSources,
65
- bootstrapBlockBindingsSourcesFromServer
64
+ registerCoreBlockBindingsSources
66
65
  } = (0, _lockUnlock.unlock)(_editor.privateApis);
67
66
 
68
67
  /**
@@ -115,7 +114,6 @@ function initializeEditor(id, postType, postId, settings, initialEdits) {
115
114
  (0, _data.dispatch)(_editor.store).setIsListViewOpened(true);
116
115
  }
117
116
  (0, _blockLibrary.registerCoreBlocks)();
118
- bootstrapBlockBindingsSourcesFromServer(settings?.blockBindingsSources);
119
117
  registerCoreBlockBindingsSources();
120
118
  (0, _widgets.registerLegacyWidgetBlock)({
121
119
  inserter: false
@@ -164,7 +162,7 @@ function initializeEditor(id, postType, postId, settings, initialEdits) {
164
162
  // Prevent the default browser action for files dropped outside of dropzones.
165
163
  window.addEventListener('dragover', e => e.preventDefault(), false);
166
164
  window.addEventListener('drop', e => e.preventDefault(), false);
167
- root.render( /*#__PURE__*/(0, _jsxRuntime.jsx)(_element.StrictMode, {
165
+ root.render(/*#__PURE__*/(0, _jsxRuntime.jsx)(_element.StrictMode, {
168
166
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_layout.default, {
169
167
  settings: settings,
170
168
  postId: postId,
@@ -1 +1 @@
1
- {"version":3,"names":["_blocks","require","_blockLibrary","_deprecated","_interopRequireDefault","_element","_data","_preferences","_widgets","_editor","_layout","_lockUnlock","_jsxRuntime","_fullscreenModeClose","_store","_deprecated2","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","BackButton","__experimentalMainDashboardButton","registerCoreBlockBindingsSources","bootstrapBlockBindingsSourcesFromServer","unlock","editorPrivateApis","initializeEditor","id","postType","postId","settings","initialEdits","isMediumOrBigger","window","matchMedia","matches","target","document","getElementById","root","createRoot","dispatch","preferencesStore","setDefaults","fullscreenMode","themeStyles","welcomeGuide","welcomeGuideTemplate","allowRightClickOverrides","editorMode","fixedToolbar","hiddenBlockTypes","inactivePanels","openPanels","showBlockBreadcrumbs","showIconLabels","showListViewByDefault","enableChoosePatternModal","isPublishSidebarEnabled","__experimentalMediaProcessing","requireApproval","optimizeOnUpload","blocksStore","reapplyBlockTypeFilters","select","editorStore","setIsListViewOpened","registerCoreBlocks","blockBindingsSources","registerLegacyWidgetBlock","inserter","registerWidgetGroupBlock","globalThis","IS_GUTENBERG_PLUGIN","__experimentalRegisterExperimentalCoreBlocks","enableFSEBlocks","__unstableEnableFullSiteEditingBlocks","documentMode","compatMode","console","warn","isIphone","navigator","userAgent","indexOf","addEventListener","event","editorScrollContainer","getElementsByClassName","scrollY","scrollTop","scrollTo","e","preventDefault","render","jsx","StrictMode","children","default","reinitializeEditor","deprecated","since","version"],"sources":["@wordpress/edit-post/src/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport {\n\tregisterCoreBlocks,\n\t__experimentalRegisterExperimentalCoreBlocks,\n} from '@wordpress/block-library';\nimport deprecated from '@wordpress/deprecated';\nimport { createRoot, StrictMode } from '@wordpress/element';\nimport { dispatch, select } from '@wordpress/data';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport {\n\tregisterLegacyWidgetBlock,\n\tregisterWidgetGroupBlock,\n} from '@wordpress/widgets';\nimport {\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport Layout from './components/layout';\nimport { unlock } from './lock-unlock';\n\nconst {\n\tBackButton: __experimentalMainDashboardButton,\n\tregisterCoreBlockBindingsSources,\n\tbootstrapBlockBindingsSourcesFromServer,\n} = unlock( editorPrivateApis );\n\n/**\n * Initializes and returns an instance of Editor.\n *\n * @param {string} id Unique identifier for editor instance.\n * @param {string} postType Post type of the post to edit.\n * @param {Object} postId ID of the post to edit.\n * @param {?Object} settings Editor settings object.\n * @param {Object} initialEdits Programmatic edits to apply initially, to be\n * considered as non-user-initiated (bypass for\n * unsaved changes prompt).\n */\nexport function initializeEditor(\n\tid,\n\tpostType,\n\tpostId,\n\tsettings,\n\tinitialEdits\n) {\n\tconst isMediumOrBigger = window.matchMedia( '(min-width: 782px)' ).matches;\n\tconst target = document.getElementById( id );\n\tconst root = createRoot( target );\n\n\tdispatch( preferencesStore ).setDefaults( 'core/edit-post', {\n\t\tfullscreenMode: true,\n\t\tthemeStyles: true,\n\t\twelcomeGuide: true,\n\t\twelcomeGuideTemplate: true,\n\t} );\n\n\tdispatch( preferencesStore ).setDefaults( 'core', {\n\t\tallowRightClickOverrides: true,\n\t\teditorMode: 'visual',\n\t\tfixedToolbar: false,\n\t\thiddenBlockTypes: [],\n\t\tinactivePanels: [],\n\t\topenPanels: [ 'post-status' ],\n\t\tshowBlockBreadcrumbs: true,\n\t\tshowIconLabels: false,\n\t\tshowListViewByDefault: false,\n\t\tenableChoosePatternModal: true,\n\t\tisPublishSidebarEnabled: true,\n\t} );\n\n\tif ( window.__experimentalMediaProcessing ) {\n\t\tdispatch( preferencesStore ).setDefaults( 'core/media', {\n\t\t\trequireApproval: true,\n\t\t\toptimizeOnUpload: true,\n\t\t} );\n\t}\n\n\tdispatch( blocksStore ).reapplyBlockTypeFilters();\n\n\t// Check if the block list view should be open by default.\n\t// If `distractionFree` mode is enabled, the block list view should not be open.\n\t// This behavior is disabled for small viewports.\n\tif (\n\t\tisMediumOrBigger &&\n\t\tselect( preferencesStore ).get( 'core', 'showListViewByDefault' ) &&\n\t\t! select( preferencesStore ).get( 'core', 'distractionFree' )\n\t) {\n\t\tdispatch( editorStore ).setIsListViewOpened( true );\n\t}\n\n\tregisterCoreBlocks();\n\tbootstrapBlockBindingsSourcesFromServer( settings?.blockBindingsSources );\n\tregisterCoreBlockBindingsSources();\n\tregisterLegacyWidgetBlock( { inserter: false } );\n\tregisterWidgetGroupBlock( { inserter: false } );\n\tif ( globalThis.IS_GUTENBERG_PLUGIN ) {\n\t\t__experimentalRegisterExperimentalCoreBlocks( {\n\t\t\tenableFSEBlocks: settings.__unstableEnableFullSiteEditingBlocks,\n\t\t} );\n\t}\n\n\t// Show a console log warning if the browser is not in Standards rendering mode.\n\tconst documentMode =\n\t\tdocument.compatMode === 'CSS1Compat' ? 'Standards' : 'Quirks';\n\tif ( documentMode !== 'Standards' ) {\n\t\t// eslint-disable-next-line no-console\n\t\tconsole.warn(\n\t\t\t\"Your browser is using Quirks Mode. \\nThis can cause rendering issues such as blocks overlaying meta boxes in the editor. Quirks Mode can be triggered by PHP errors or HTML code appearing before the opening <!DOCTYPE html>. Try checking the raw page source or your site's PHP error log and resolving errors there, removing any HTML before the doctype, or disabling plugins.\"\n\t\t);\n\t}\n\n\t// This is a temporary fix for a couple of issues specific to Webkit on iOS.\n\t// Without this hack the browser scrolls the mobile toolbar off-screen.\n\t// Once supported in Safari we can replace this in favor of preventScroll.\n\t// For details see issue #18632 and PR #18686\n\t// Specifically, we scroll `interface-interface-skeleton__body` to enable a fixed top toolbar.\n\t// But Mobile Safari forces the `html` element to scroll upwards, hiding the toolbar.\n\n\tconst isIphone = window.navigator.userAgent.indexOf( 'iPhone' ) !== -1;\n\tif ( isIphone ) {\n\t\twindow.addEventListener( 'scroll', ( event ) => {\n\t\t\tconst editorScrollContainer = document.getElementsByClassName(\n\t\t\t\t'interface-interface-skeleton__body'\n\t\t\t)[ 0 ];\n\t\t\tif ( event.target === document ) {\n\t\t\t\t// Scroll element into view by scrolling the editor container by the same amount\n\t\t\t\t// that Mobile Safari tried to scroll the html element upwards.\n\t\t\t\tif ( window.scrollY > 100 ) {\n\t\t\t\t\teditorScrollContainer.scrollTop =\n\t\t\t\t\t\teditorScrollContainer.scrollTop + window.scrollY;\n\t\t\t\t}\n\t\t\t\t// Undo unwanted scroll on html element, but only in the visual editor.\n\t\t\t\tif (\n\t\t\t\t\tdocument.getElementsByClassName( 'is-mode-visual' )[ 0 ]\n\t\t\t\t) {\n\t\t\t\t\twindow.scrollTo( 0, 0 );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n\n\t// Prevent the default browser action for files dropped outside of dropzones.\n\twindow.addEventListener( 'dragover', ( e ) => e.preventDefault(), false );\n\twindow.addEventListener( 'drop', ( e ) => e.preventDefault(), false );\n\n\troot.render(\n\t\t<StrictMode>\n\t\t\t<Layout\n\t\t\t\tsettings={ settings }\n\t\t\t\tpostId={ postId }\n\t\t\t\tpostType={ postType }\n\t\t\t\tinitialEdits={ initialEdits }\n\t\t\t/>\n\t\t</StrictMode>\n\t);\n\n\treturn root;\n}\n\n/**\n * Used to reinitialize the editor after an error. Now it's a deprecated noop function.\n */\nexport function reinitializeEditor() {\n\tdeprecated( 'wp.editPost.reinitializeEditor', {\n\t\tsince: '6.2',\n\t\tversion: '6.3',\n\t} );\n}\n\nexport { default as __experimentalFullscreenModeClose } from './components/back-button/fullscreen-mode-close';\nexport { __experimentalMainDashboardButton };\nexport { store } from './store';\nexport * from './deprecated';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AAIA,IAAAE,WAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AACA,IAAAO,QAAA,GAAAP,OAAA;AAIA,IAAAQ,OAAA,GAAAR,OAAA;AAQA,IAAAS,OAAA,GAAAN,sBAAA,CAAAH,OAAA;AACA,IAAAU,WAAA,GAAAV,OAAA;AAAuC,IAAAW,WAAA,GAAAX,OAAA;AAsJvC,IAAAY,oBAAA,GAAAT,sBAAA,CAAAH,OAAA;AAEA,IAAAa,MAAA,GAAAb,OAAA;AACA,IAAAc,YAAA,GAAAd,OAAA;AAAAe,MAAA,CAAAC,IAAA,CAAAF,YAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,YAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;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CAAgC,EAAE;IAC7CC,KAAK,EAAE,KAAK;IACZC,OAAO,EAAE;EACV,CAAE,CAAC;AACJ","ignoreList":[]}
1
+ {"version":3,"names":["_blocks","require","_blockLibrary","_deprecated","_interopRequireDefault","_element","_data","_preferences","_widgets","_editor","_layout","_lockUnlock","_jsxRuntime","_fullscreenModeClose","_store","_deprecated2","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","BackButton","__experimentalMainDashboardButton","registerCoreBlockBindingsSources","unlock","editorPrivateApis","initializeEditor","id","postType","postId","settings","initialEdits","isMediumOrBigger","window","matchMedia","matches","target","document","getElementById","root","createRoot","dispatch","preferencesStore","setDefaults","fullscreenMode","themeStyles","welcomeGuide","welcomeGuideTemplate","allowRightClickOverrides","editorMode","fixedToolbar","hiddenBlockTypes","inactivePanels","openPanels","showBlockBreadcrumbs","showIconLabels","showListViewByDefault","enableChoosePatternModal","isPublishSidebarEnabled","__experimentalMediaProcessing","requireApproval","optimizeOnUpload","blocksStore","reapplyBlockTypeFilters","select","editorStore","setIsListViewOpened","registerCoreBlocks","registerLegacyWidgetBlock","inserter","registerWidgetGroupBlock","globalThis","IS_GUTENBERG_PLUGIN","__experimentalRegisterExperimentalCoreBlocks","enableFSEBlocks","__unstableEnableFullSiteEditingBlocks","documentMode","compatMode","console","warn","isIphone","navigator","userAgent","indexOf","addEventListener","event","editorScrollContainer","getElementsByClassName","scrollY","scrollTop","scrollTo","e","preventDefault","render","jsx","StrictMode","children","default","reinitializeEditor","deprecated","since","version"],"sources":["@wordpress/edit-post/src/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport {\n\tregisterCoreBlocks,\n\t__experimentalRegisterExperimentalCoreBlocks,\n} from '@wordpress/block-library';\nimport deprecated from '@wordpress/deprecated';\nimport { createRoot, StrictMode } from '@wordpress/element';\nimport { dispatch, select } from '@wordpress/data';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport {\n\tregisterLegacyWidgetBlock,\n\tregisterWidgetGroupBlock,\n} from '@wordpress/widgets';\nimport {\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport Layout from './components/layout';\nimport { unlock } from './lock-unlock';\n\nconst {\n\tBackButton: __experimentalMainDashboardButton,\n\tregisterCoreBlockBindingsSources,\n} = unlock( editorPrivateApis );\n\n/**\n * Initializes and returns an instance of Editor.\n *\n * @param {string} id Unique identifier for editor instance.\n * @param {string} postType Post type of the post to edit.\n * @param {Object} postId ID of the post to edit.\n * @param {?Object} settings Editor settings object.\n * @param {Object} initialEdits Programmatic edits to apply initially, to be\n * considered as non-user-initiated (bypass for\n * unsaved changes prompt).\n */\nexport function initializeEditor(\n\tid,\n\tpostType,\n\tpostId,\n\tsettings,\n\tinitialEdits\n) {\n\tconst isMediumOrBigger = window.matchMedia( '(min-width: 782px)' ).matches;\n\tconst target = document.getElementById( id );\n\tconst root = createRoot( target );\n\n\tdispatch( preferencesStore ).setDefaults( 'core/edit-post', {\n\t\tfullscreenMode: true,\n\t\tthemeStyles: true,\n\t\twelcomeGuide: true,\n\t\twelcomeGuideTemplate: true,\n\t} );\n\n\tdispatch( preferencesStore ).setDefaults( 'core', {\n\t\tallowRightClickOverrides: true,\n\t\teditorMode: 'visual',\n\t\tfixedToolbar: false,\n\t\thiddenBlockTypes: [],\n\t\tinactivePanels: [],\n\t\topenPanels: [ 'post-status' ],\n\t\tshowBlockBreadcrumbs: true,\n\t\tshowIconLabels: false,\n\t\tshowListViewByDefault: false,\n\t\tenableChoosePatternModal: true,\n\t\tisPublishSidebarEnabled: true,\n\t} );\n\n\tif ( window.__experimentalMediaProcessing ) {\n\t\tdispatch( preferencesStore ).setDefaults( 'core/media', {\n\t\t\trequireApproval: true,\n\t\t\toptimizeOnUpload: true,\n\t\t} );\n\t}\n\n\tdispatch( blocksStore ).reapplyBlockTypeFilters();\n\n\t// Check if the block list view should be open by default.\n\t// If `distractionFree` mode is enabled, the block list view should not be open.\n\t// This behavior is disabled for small viewports.\n\tif (\n\t\tisMediumOrBigger &&\n\t\tselect( preferencesStore ).get( 'core', 'showListViewByDefault' ) &&\n\t\t! select( preferencesStore ).get( 'core', 'distractionFree' )\n\t) {\n\t\tdispatch( editorStore ).setIsListViewOpened( true );\n\t}\n\n\tregisterCoreBlocks();\n\tregisterCoreBlockBindingsSources();\n\tregisterLegacyWidgetBlock( { inserter: false } );\n\tregisterWidgetGroupBlock( { inserter: false } );\n\tif ( globalThis.IS_GUTENBERG_PLUGIN ) {\n\t\t__experimentalRegisterExperimentalCoreBlocks( {\n\t\t\tenableFSEBlocks: settings.__unstableEnableFullSiteEditingBlocks,\n\t\t} );\n\t}\n\n\t// Show a console log warning if the browser is not in Standards rendering mode.\n\tconst documentMode =\n\t\tdocument.compatMode === 'CSS1Compat' ? 'Standards' : 'Quirks';\n\tif ( documentMode !== 'Standards' ) {\n\t\t// eslint-disable-next-line no-console\n\t\tconsole.warn(\n\t\t\t\"Your browser is using Quirks Mode. \\nThis can cause rendering issues such as blocks overlaying meta boxes in the editor. Quirks Mode can be triggered by PHP errors or HTML code appearing before the opening <!DOCTYPE html>. Try checking the raw page source or your site's PHP error log and resolving errors there, removing any HTML before the doctype, or disabling plugins.\"\n\t\t);\n\t}\n\n\t// This is a temporary fix for a couple of issues specific to Webkit on iOS.\n\t// Without this hack the browser scrolls the mobile toolbar off-screen.\n\t// Once supported in Safari we can replace this in favor of preventScroll.\n\t// For details see issue #18632 and PR #18686\n\t// Specifically, we scroll `interface-interface-skeleton__body` to enable a fixed top toolbar.\n\t// But Mobile Safari forces the `html` element to scroll upwards, hiding the toolbar.\n\n\tconst isIphone = window.navigator.userAgent.indexOf( 'iPhone' ) !== -1;\n\tif ( isIphone ) {\n\t\twindow.addEventListener( 'scroll', ( event ) => {\n\t\t\tconst editorScrollContainer = document.getElementsByClassName(\n\t\t\t\t'interface-interface-skeleton__body'\n\t\t\t)[ 0 ];\n\t\t\tif ( event.target === document ) {\n\t\t\t\t// Scroll element into view by scrolling the editor container by the same amount\n\t\t\t\t// that Mobile Safari tried to scroll the html element upwards.\n\t\t\t\tif ( window.scrollY > 100 ) {\n\t\t\t\t\teditorScrollContainer.scrollTop =\n\t\t\t\t\t\teditorScrollContainer.scrollTop + window.scrollY;\n\t\t\t\t}\n\t\t\t\t// Undo unwanted scroll on html element, but only in the visual editor.\n\t\t\t\tif (\n\t\t\t\t\tdocument.getElementsByClassName( 'is-mode-visual' )[ 0 ]\n\t\t\t\t) {\n\t\t\t\t\twindow.scrollTo( 0, 0 );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n\n\t// Prevent the default browser action for files dropped outside of dropzones.\n\twindow.addEventListener( 'dragover', ( e ) => e.preventDefault(), false );\n\twindow.addEventListener( 'drop', ( e ) => e.preventDefault(), false );\n\n\troot.render(\n\t\t<StrictMode>\n\t\t\t<Layout\n\t\t\t\tsettings={ settings }\n\t\t\t\tpostId={ postId }\n\t\t\t\tpostType={ postType }\n\t\t\t\tinitialEdits={ initialEdits }\n\t\t\t/>\n\t\t</StrictMode>\n\t);\n\n\treturn root;\n}\n\n/**\n * Used to reinitialize the editor after an error. Now it's a deprecated noop function.\n */\nexport function reinitializeEditor() {\n\tdeprecated( 'wp.editPost.reinitializeEditor', {\n\t\tsince: '6.2',\n\t\tversion: '6.3',\n\t} );\n}\n\nexport { default as __experimentalFullscreenModeClose } from './components/back-button/fullscreen-mode-close';\nexport { __experimentalMainDashboardButton };\nexport { store } from './store';\nexport * from './deprecated';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AAIA,IAAAE,WAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AACA,IA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C,EAAE,KAAM,CAAC;EACzE3D,MAAM,CAACmD,gBAAgB,CAAE,MAAM,EAAIO,CAAC,IAAMA,CAAC,CAACC,cAAc,CAAC,CAAC,EAAE,KAAM,CAAC;EAErErD,IAAI,CAACsD,MAAM,cACV,IAAAxF,WAAA,CAAAyF,GAAA,EAAChG,QAAA,CAAAiG,UAAU;IAAAC,QAAA,eACV,IAAA3F,WAAA,CAAAyF,GAAA,EAAC3F,OAAA,CAAA8F,OAAM;MACNnE,QAAQ,EAAGA,QAAU;MACrBD,MAAM,EAAGA,MAAQ;MACjBD,QAAQ,EAAGA,QAAU;MACrBG,YAAY,EAAGA;IAAc,CAC7B;EAAC,CACS,CACb,CAAC;EAED,OAAOQ,IAAI;AACZ;;AAEA;AACA;AACA;AACO,SAAS2D,kBAAkBA,CAAA,EAAG;EACpC,IAAAC,mBAAU,EAAE,gCAAgC,EAAE;IAC7CC,KAAK,EAAE,KAAK;IACZC,OAAO,EAAE;EACV,CAAE,CAAC;AACJ","ignoreList":[]}
@@ -482,7 +482,7 @@ const initializeMetaBoxes = () => ({
482
482
  metaBoxesInitialized = true;
483
483
 
484
484
  // Save metaboxes on save completion, except for autosaves.
485
- (0, _hooks.addAction)('editor.savePost', 'core/edit-post/save-metaboxes', async options => {
485
+ (0, _hooks.addAction)('editor.savePost', 'core/edit-post/save-metaboxes', async (post, options) => {
486
486
  if (!options.isAutosave && select.hasMetaBoxes()) {
487
487
  await dispatch.requestMetaBoxUpdates();
488
488
  }