@wordpress/edit-post 8.0.1 → 8.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ### Bug Fixes
6
+
7
+ - Add ´@wordpress/html-entities´ package to the list of dependencies in package.json. ([#62313](https://github.com/WordPress/gutenberg/pull/62313))
8
+
5
9
  ## 8.0.0 (2024-05-31)
6
10
 
7
11
  ### Breaking Changes
@@ -18,6 +18,7 @@ var _commands = require("@wordpress/commands");
18
18
  var _coreCommands = require("@wordpress/core-commands");
19
19
  var _blockLibrary = require("@wordpress/block-library");
20
20
  var _url = require("@wordpress/url");
21
+ var _htmlEntities = require("@wordpress/html-entities");
21
22
  var _backButton = _interopRequireDefault(require("../back-button"));
22
23
  var _keyboardShortcuts = _interopRequireDefault(require("../keyboard-shortcuts"));
23
24
  var _initPatternModal = _interopRequireDefault(require("../init-pattern-modal"));
@@ -205,7 +206,7 @@ function Layout({
205
206
  const title = typeof newItem.title === 'string' ? newItem.title : newItem.title?.rendered;
206
207
  createSuccessNotice((0, _i18n.sprintf)(
207
208
  // translators: %s: Title of the created post e.g: "Post 1".
208
- (0, _i18n.__)('"%s" successfully created.'), title), {
209
+ (0, _i18n.__)('"%s" successfully created.'), (0, _htmlEntities.decodeEntities)(title)), {
209
210
  type: 'snackbar',
210
211
  id: 'duplicate-post-action',
211
212
  actions: [{
@@ -1 +1 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_editor","_data","_blockEditor","_plugins","_i18n","_element","_notices","_preferences","_commands","_coreCommands","_blockLibrary","_url","_backButton","_keyboardShortcuts","_initPatternModal","_browserUrl","_metaBoxes","_moreMenu","_welcomeGuide","_store","_lockUnlock","_useCommands","_usePaddingAppender","_useShouldIframe","_jsxRuntime","getLayoutStyles","unlock","blockEditorPrivateApis","useCommands","coreCommandsPrivateApis","useCommandContext","commandsPrivateApis","EditorInterface","FullscreenMode","Sidebar","editorPrivateApis","BlockKeyboardShortcuts","blockLibraryPrivateApis","DESIGN_POST_TYPES","useEditorStyles","hasThemeStyleSupport","editorSettings","isZoomedOutView","hasMetaBoxes","renderingMode","postType","useSelect","select","__unstableGetEditorMode","blockEditorStore","getCurrentPostType","getRenderingMode","editorStore","_postType","editPostStore","isFeatureActive","getEditorSettings","useMemo","_editorSettings$style","_editorSettings$style2","_editorSettings$style3","presetStyles","styles","filter","style","__unstableType","defaultEditorStyles","hasThemeStyles","length","disableLayoutStyles","push","css","selector","hasBlockGapSupport","hasFallbackGapSupport","fallbackGapValue","baseStyles","includes","Layout","initialPost","useEditPostCommands","paddingAppenderRef","usePaddingAppender","shouldIframe","useShouldIframe","createErrorNotice","useDispatch","noticesStore","mode","isFullscreenActive","hasActiveMetaboxes","hasBlockSelected","showIconLabels","isDistractionFree","showMetaBoxes","hasHistory","isEditingTemplate","isWelcomeGuideVisible","get","preferencesStore","getEditorMode","getBlockSelectionStart","onNavigateToPreviousEntityRecord","commandContext","document","body","classList","add","remove","className","clsx","onPluginAreaError","name","sprintf","__","createSuccessNotice","onActionPerformed","useCallback","actionId","items","location","href","addQueryArgs","trashed","post_type","type","ids","id","newItem","title","rendered","actions","label","onClick","postId","post","action","jsxs","Fragment","children","jsx","isActive","default","UnsavedChangesWarning","AutosaveMonitor","LocalAutosaveMonitor","EditorKeyboardShortcutsRegister","PluginArea","onError","extraPanels","EditorSnackbars","forceIsDirty","contentRef","disableIframe","autoFocus","_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\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 { useCallback, useMemo } from '@wordpress/element';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { privateApis as commandsPrivateApis } from '@wordpress/commands';\nimport { privateApis as coreCommandsPrivateApis } from '@wordpress/core-commands';\nimport { privateApis as blockLibraryPrivateApis } from '@wordpress/block-library';\nimport { addQueryArgs } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport BackButton from '../back-button';\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';\n\nconst { getLayoutStyles } = unlock( blockEditorPrivateApis );\nconst { useCommands } = unlock( coreCommandsPrivateApis );\nconst { useCommandContext } = unlock( commandsPrivateApis );\nconst { EditorInterface, FullscreenMode, Sidebar } =\n\tunlock( 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\thasMetaBoxes,\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\thasMetaBoxes: select( editPostStore ).hasMetaBoxes(),\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 constant padding for the typewriter effect. When typing at the\n\t\t// bottom, there needs to be room to scroll up.\n\t\tif (\n\t\t\t! isZoomedOutView &&\n\t\t\t! hasMetaBoxes &&\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: 'body{padding-bottom: 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\nfunction Layout( { initialPost } ) {\n\tuseCommands();\n\tuseEditPostCommands();\n\tconst paddingAppenderRef = usePaddingAppender();\n\tconst shouldIframe = useShouldIframe();\n\tconst { createErrorNotice } = useDispatch( noticesStore );\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\tisEditingTemplate,\n\t\tisWelcomeGuideVisible,\n\t} = useSelect( ( select ) => {\n\t\tconst { get } = select( preferencesStore );\n\t\tconst { getEditorSettings } = select( editorStore );\n\t\tconst { isFeatureActive } = select( editPostStore );\n\n\t\treturn {\n\t\t\tmode: select( editorStore ).getEditorMode(),\n\t\t\tisFullscreenActive:\n\t\t\t\tselect( editPostStore ).isFeatureActive( 'fullscreenMode' ),\n\t\t\thasActiveMetaboxes: select( editPostStore ).hasMetaBoxes(),\n\t\t\thasBlockSelected:\n\t\t\t\t!! select( blockEditorStore ).getBlockSelectionStart(),\n\t\t\tshowIconLabels: get( 'core', 'showIconLabels' ),\n\t\t\tisDistractionFree: get( 'core', 'distractionFree' ),\n\t\t\tshowMetaBoxes:\n\t\t\t\tselect( editorStore ).getRenderingMode() === 'post-only',\n\t\t\thasHistory: !! getEditorSettings().onNavigateToPreviousEntityRecord,\n\t\t\tisEditingTemplate:\n\t\t\t\tselect( editorStore ).getCurrentPostType() === 'wp_template',\n\t\t\tisWelcomeGuideVisible: isFeatureActive( 'welcomeGuide' ),\n\t\t};\n\t}, [] );\n\n\t// Set the right context for the command palette\n\tconst commandContext = hasBlockSelected\n\t\t? 'block-selection-edit'\n\t\t: 'entity-edit';\n\tuseCommandContext( commandContext );\n\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\ttitle\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t\t\t\tid: 'duplicate-post-action',\n\t\t\t\t\t\t\t\tactions: [\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tlabel: __( 'Edit' ),\n\t\t\t\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\t\t\t\tconst postId = newItem.id;\n\t\t\t\t\t\t\t\t\t\t\tdocument.location.href =\n\t\t\t\t\t\t\t\t\t\t\t\taddQueryArgs( 'post.php', {\n\t\t\t\t\t\t\t\t\t\t\t\t\tpost: postId,\n\t\t\t\t\t\t\t\t\t\t\t\t\taction: 'edit',\n\t\t\t\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t},\n\t\t[ createSuccessNotice ]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<FullscreenMode isActive={ isFullscreenActive } />\n\t\t\t<BrowserURL hasHistory={ hasHistory } />\n\t\t\t<UnsavedChangesWarning />\n\t\t\t<AutosaveMonitor />\n\t\t\t<LocalAutosaveMonitor />\n\t\t\t<EditPostKeyboardShortcuts />\n\t\t\t<EditorKeyboardShortcutsRegister />\n\t\t\t<BlockKeyboardShortcuts />\n\t\t\t<WelcomeGuide />\n\t\t\t<InitPatternModal />\n\t\t\t<PluginArea onError={ onPluginAreaError } />\n\t\t\t{ ! isDistractionFree && (\n\t\t\t\t<Sidebar\n\t\t\t\t\tonActionPerformed={ onActionPerformed }\n\t\t\t\t\textraPanels={\n\t\t\t\t\t\t! isEditingTemplate && <MetaBoxes location=\"side\" />\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t<PostEditorMoreMenu />\n\t\t\t<BackButton initialPost={ initialPost } />\n\t\t\t<EditorSnackbars />\n\t\t\t<EditorInterface\n\t\t\t\tclassName={ className }\n\t\t\t\tstyles={ styles }\n\t\t\t\tforceIsDirty={ hasActiveMetaboxes }\n\t\t\t\tcontentRef={ paddingAppenderRef }\n\t\t\t\tdisableIframe={ ! shouldIframe }\n\t\t\t\t// We should auto-focus the canvas (title) on load.\n\t\t\t\t// eslint-disable-next-line jsx-a11y/no-autofocus\n\t\t\t\tautoFocus={ ! isWelcomeGuideVisible }\n\t\t\t>\n\t\t\t\t{ ! isDistractionFree && showMetaBoxes && (\n\t\t\t\t\t<div className=\"edit-post-layout__metaboxes\">\n\t\t\t\t\t\t<MetaBoxes location=\"normal\" />\n\t\t\t\t\t\t<MetaBoxes location=\"advanced\" />\n\t\t\t\t\t</div>\n\t\t\t\t) }\n\t\t\t</EditorInterface>\n\t\t</>\n\t);\n}\n\nexport default Layout;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,OAAA,GAAAD,OAAA;AASA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAIA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AACA,IAAAO,QAAA,GAAAP,OAAA;AACA,IAAAQ,YAAA,GAAAR,OAAA;AACA,IAAAS,SAAA,GAAAT,OAAA;AACA,IAAAU,aAAA,GAAAV,OAAA;AACA,IAAAW,aAAA,GAAAX,OAAA;AACA,IAAAY,IAAA,GAAAZ,OAAA;AAKA,IAAAa,WAAA,GAAAd,sBAAA,CAAAC,OAAA;AACA,IAAAc,kBAAA,GAAAf,sBAAA,CAAAC,OAAA;AACA,IAAAe,iBAAA,GAAAhB,s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version":3,"names":["_clsx","_interopRequireDefault","require","_editor","_data","_blockEditor","_plugins","_i18n","_element","_notices","_preferences","_commands","_coreCommands","_blockLibrary","_url","_htmlEntities","_backButton","_keyboardShortcuts","_initPatternModal","_browserUrl","_metaBoxes","_moreMenu","_welcomeGuide","_store","_lockUnlock","_useCommands","_usePaddingAppender","_useShouldIframe","_jsxRuntime","getLayoutStyles","unlock","blockEditorPrivateApis","useCommands","coreCommandsPrivateApis","useCommandContext","commandsPrivateApis","EditorInterface","FullscreenMode","Sidebar","editorPrivateApis","BlockKeyboardShortcuts","blockLibraryPrivateApis","DESIGN_POST_TYPES","useEditorStyles","hasThemeStyleSupport","editorSettings","isZoomedOutView","hasMetaBoxes","renderingMode","postType","useSelect","select","__unstableGetEditorMode","blockEditorStore","getCurrentPostType","getRenderingMode","editorStore","_postType","editPostStore","isFeatureActive","getEditorSettings","useMemo","_editorSettings$style","_editorSettings$style2","_editorSettings$style3","presetStyles","styles","filter","style","__unstableType","defaultEditorStyles","hasThemeStyles","length","disableLayoutStyles","push","css","selector","hasBlockGapSupport","hasFallbackGapSupport","fallbackGapValue","baseStyles","includes","Layout","initialPost","useEditPostCommands","paddingAppenderRef","usePaddingAppender","shouldIframe","useShouldIframe","createErrorNotice","useDispatch","noticesStore","mode","isFullscreenActive","hasActiveMetaboxes","hasBlockSelected","showIconLabels","isDistractionFree","showMetaBoxes","hasHistory","isEditingTemplate","isWelcomeGuideVisible","get","preferencesStore","getEditorMode","getBlockSelectionStart","onNavigateToPreviousEntityRecord","commandContext","document","body","classList","add","remove","className","clsx","onPluginAreaError","name","sprintf","__","createSuccessNotice","onActionPerformed","useCallback","actionId","items","location","href","addQueryArgs","trashed","post_type","type","ids","id","newItem","title","rendered","decodeEntities","actions","label","onClick","postId","post","action","jsxs","Fragment","children","jsx","isActive","default","UnsavedChangesWarning","AutosaveMonitor","LocalAutosaveMonitor","EditorKeyboardShortcutsRegister","PluginArea","onError","extraPanels","EditorSnackbars","forceIsDirty","contentRef","disableIframe","autoFocus","_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\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 { useCallback, useMemo } from '@wordpress/element';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { privateApis as commandsPrivateApis } from '@wordpress/commands';\nimport { privateApis as coreCommandsPrivateApis } from '@wordpress/core-commands';\nimport { privateApis as blockLibraryPrivateApis } from '@wordpress/block-library';\nimport { addQueryArgs } from '@wordpress/url';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport BackButton from '../back-button';\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';\n\nconst { getLayoutStyles } = unlock( blockEditorPrivateApis );\nconst { useCommands } = unlock( coreCommandsPrivateApis );\nconst { useCommandContext } = unlock( commandsPrivateApis );\nconst { EditorInterface, FullscreenMode, Sidebar } =\n\tunlock( 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\thasMetaBoxes,\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\thasMetaBoxes: select( editPostStore ).hasMetaBoxes(),\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 constant padding for the typewriter effect. When typing at the\n\t\t// bottom, there needs to be room to scroll up.\n\t\tif (\n\t\t\t! isZoomedOutView &&\n\t\t\t! hasMetaBoxes &&\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: 'body{padding-bottom: 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\nfunction Layout( { initialPost } ) {\n\tuseCommands();\n\tuseEditPostCommands();\n\tconst paddingAppenderRef = usePaddingAppender();\n\tconst shouldIframe = useShouldIframe();\n\tconst { createErrorNotice } = useDispatch( noticesStore );\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\tisEditingTemplate,\n\t\tisWelcomeGuideVisible,\n\t} = useSelect( ( select ) => {\n\t\tconst { get } = select( preferencesStore );\n\t\tconst { getEditorSettings } = select( editorStore );\n\t\tconst { isFeatureActive } = select( editPostStore );\n\n\t\treturn {\n\t\t\tmode: select( editorStore ).getEditorMode(),\n\t\t\tisFullscreenActive:\n\t\t\t\tselect( editPostStore ).isFeatureActive( 'fullscreenMode' ),\n\t\t\thasActiveMetaboxes: select( editPostStore ).hasMetaBoxes(),\n\t\t\thasBlockSelected:\n\t\t\t\t!! select( blockEditorStore ).getBlockSelectionStart(),\n\t\t\tshowIconLabels: get( 'core', 'showIconLabels' ),\n\t\t\tisDistractionFree: get( 'core', 'distractionFree' ),\n\t\t\tshowMetaBoxes:\n\t\t\t\tselect( editorStore ).getRenderingMode() === 'post-only',\n\t\t\thasHistory: !! getEditorSettings().onNavigateToPreviousEntityRecord,\n\t\t\tisEditingTemplate:\n\t\t\t\tselect( editorStore ).getCurrentPostType() === 'wp_template',\n\t\t\tisWelcomeGuideVisible: isFeatureActive( 'welcomeGuide' ),\n\t\t};\n\t}, [] );\n\n\t// Set the right context for the command palette\n\tconst commandContext = hasBlockSelected\n\t\t? 'block-selection-edit'\n\t\t: 'entity-edit';\n\tuseCommandContext( commandContext );\n\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\treturn (\n\t\t<>\n\t\t\t<FullscreenMode isActive={ isFullscreenActive } />\n\t\t\t<BrowserURL hasHistory={ hasHistory } />\n\t\t\t<UnsavedChangesWarning />\n\t\t\t<AutosaveMonitor />\n\t\t\t<LocalAutosaveMonitor />\n\t\t\t<EditPostKeyboardShortcuts />\n\t\t\t<EditorKeyboardShortcutsRegister />\n\t\t\t<BlockKeyboardShortcuts />\n\t\t\t<WelcomeGuide />\n\t\t\t<InitPatternModal />\n\t\t\t<PluginArea onError={ onPluginAreaError } />\n\t\t\t{ ! isDistractionFree && (\n\t\t\t\t<Sidebar\n\t\t\t\t\tonActionPerformed={ onActionPerformed }\n\t\t\t\t\textraPanels={\n\t\t\t\t\t\t! isEditingTemplate && <MetaBoxes location=\"side\" />\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t<PostEditorMoreMenu />\n\t\t\t<BackButton initialPost={ initialPost } />\n\t\t\t<EditorSnackbars />\n\t\t\t<EditorInterface\n\t\t\t\tclassName={ className }\n\t\t\t\tstyles={ styles }\n\t\t\t\tforceIsDirty={ hasActiveMetaboxes }\n\t\t\t\tcontentRef={ paddingAppenderRef }\n\t\t\t\tdisableIframe={ ! shouldIframe }\n\t\t\t\t// We should auto-focus the canvas (title) on load.\n\t\t\t\t// eslint-disable-next-line jsx-a11y/no-autofocus\n\t\t\t\tautoFocus={ ! isWelcomeGuideVisible }\n\t\t\t>\n\t\t\t\t{ ! isDistractionFree && showMetaBoxes && (\n\t\t\t\t\t<div className=\"edit-post-layout__metaboxes\">\n\t\t\t\t\t\t<MetaBoxes location=\"normal\" />\n\t\t\t\t\t\t<MetaBoxes location=\"advanced\" />\n\t\t\t\t\t</div>\n\t\t\t\t) }\n\t\t\t</EditorInterface>\n\t\t</>\n\t);\n}\n\nexport default Layout;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,OAAA,GAAAD,OAAA;AASA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAIA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,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AA,CAAAkH,IAAA;QAAK7B,SAAS,EAAC,6BAA6B;QAAA+B,QAAA,gBAC3C,IAAApH,WAAA,CAAAqH,GAAA,EAAC7H,UAAA,CAAA+H,OAAS;UAACvB,QAAQ,EAAC;QAAQ,CAAE,CAAC,eAC/B,IAAAhG,WAAA,CAAAqH,GAAA,EAAC7H,UAAA,CAAA+H,OAAS;UAACvB,QAAQ,EAAC;QAAU,CAAE,CAAC;MAAA,CAC7B;IACL,CACe,CAAC;EAAA,CACjB,CAAC;AAEL;AAAC,IAAAoC,QAAA,GAAAC,OAAA,CAAAd,OAAA,GAEcjE,MAAM","ignoreList":[]}
@@ -14,6 +14,7 @@ exports.PluginSidebar = PluginSidebar;
14
14
  exports.PluginSidebarMoreMenuItem = PluginSidebarMoreMenuItem;
15
15
  exports.__experimentalPluginPostExcerpt = __experimentalPluginPostExcerpt;
16
16
  var _editor = require("@wordpress/editor");
17
+ var _url = require("@wordpress/url");
17
18
  var _deprecated = _interopRequireDefault(require("@wordpress/deprecated"));
18
19
  var _lockUnlock = require("./lock-unlock");
19
20
  var _jsxRuntime = require("react/jsx-runtime");
@@ -28,6 +29,7 @@ var _jsxRuntime = require("react/jsx-runtime");
28
29
  const {
29
30
  PluginPostExcerpt
30
31
  } = (0, _lockUnlock.unlock)(_editor.privateApis);
32
+ const isSiteEditor = (0, _url.getPath)(window.location.href)?.includes('site-editor.php');
31
33
  const deprecateSlot = name => {
32
34
  (0, _deprecated.default)(`wp.editPost.${name}`, {
33
35
  since: '6.6',
@@ -40,6 +42,9 @@ const deprecateSlot = name => {
40
42
  * @see PluginBlockSettingsMenuItem in @wordpress/editor package.
41
43
  */
42
44
  function PluginBlockSettingsMenuItem(props) {
45
+ if (isSiteEditor) {
46
+ return null;
47
+ }
43
48
  deprecateSlot('PluginBlockSettingsMenuItem');
44
49
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_editor.PluginBlockSettingsMenuItem, {
45
50
  ...props
@@ -50,6 +55,9 @@ function PluginBlockSettingsMenuItem(props) {
50
55
  * @see PluginDocumentSettingPanel in @wordpress/editor package.
51
56
  */
52
57
  function PluginDocumentSettingPanel(props) {
58
+ if (isSiteEditor) {
59
+ return null;
60
+ }
53
61
  deprecateSlot('PluginDocumentSettingPanel');
54
62
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_editor.PluginDocumentSettingPanel, {
55
63
  ...props
@@ -60,6 +68,9 @@ function PluginDocumentSettingPanel(props) {
60
68
  * @see PluginMoreMenuItem in @wordpress/editor package.
61
69
  */
62
70
  function PluginMoreMenuItem(props) {
71
+ if (isSiteEditor) {
72
+ return null;
73
+ }
63
74
  deprecateSlot('PluginMoreMenuItem');
64
75
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_editor.PluginMoreMenuItem, {
65
76
  ...props
@@ -70,6 +81,9 @@ function PluginMoreMenuItem(props) {
70
81
  * @see PluginPrePublishPanel in @wordpress/editor package.
71
82
  */
72
83
  function PluginPrePublishPanel(props) {
84
+ if (isSiteEditor) {
85
+ return null;
86
+ }
73
87
  deprecateSlot('PluginPrePublishPanel');
74
88
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_editor.PluginPrePublishPanel, {
75
89
  ...props
@@ -80,6 +94,9 @@ function PluginPrePublishPanel(props) {
80
94
  * @see PluginPostPublishPanel in @wordpress/editor package.
81
95
  */
82
96
  function PluginPostPublishPanel(props) {
97
+ if (isSiteEditor) {
98
+ return null;
99
+ }
83
100
  deprecateSlot('PluginPostPublishPanel');
84
101
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_editor.PluginPostPublishPanel, {
85
102
  ...props
@@ -90,6 +107,9 @@ function PluginPostPublishPanel(props) {
90
107
  * @see PluginPostStatusInfo in @wordpress/editor package.
91
108
  */
92
109
  function PluginPostStatusInfo(props) {
110
+ if (isSiteEditor) {
111
+ return null;
112
+ }
93
113
  deprecateSlot('PluginPostStatusInfo');
94
114
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_editor.PluginPostStatusInfo, {
95
115
  ...props
@@ -100,6 +120,9 @@ function PluginPostStatusInfo(props) {
100
120
  * @see PluginSidebar in @wordpress/editor package.
101
121
  */
102
122
  function PluginSidebar(props) {
123
+ if (isSiteEditor) {
124
+ return null;
125
+ }
103
126
  deprecateSlot('PluginSidebar');
104
127
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_editor.PluginSidebar, {
105
128
  ...props
@@ -110,6 +133,9 @@ function PluginSidebar(props) {
110
133
  * @see PluginSidebarMoreMenuItem in @wordpress/editor package.
111
134
  */
112
135
  function PluginSidebarMoreMenuItem(props) {
136
+ if (isSiteEditor) {
137
+ return null;
138
+ }
113
139
  deprecateSlot('PluginSidebarMoreMenuItem');
114
140
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_editor.PluginSidebarMoreMenuItem, {
115
141
  ...props
@@ -120,6 +146,9 @@ function PluginSidebarMoreMenuItem(props) {
120
146
  * @see PluginPostExcerpt in @wordpress/editor package.
121
147
  */
122
148
  function __experimentalPluginPostExcerpt() {
149
+ if (isSiteEditor) {
150
+ return null;
151
+ }
123
152
  (0, _deprecated.default)('wp.editPost.__experimentalPluginPostExcerpt', {
124
153
  since: '6.6',
125
154
  hint: 'Core and custom panels can be access programmatically using their panel name.',
@@ -1 +1 @@
1
- {"version":3,"names":["_editor","require","_deprecated","_interopRequireDefault","_lockUnlock","_jsxRuntime","PluginPostExcerpt","unlock","editorPrivateApis","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 deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from './lock-unlock';\nconst { PluginPostExcerpt } = unlock( editorPrivateApis );\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\tdeprecateSlot( 'PluginBlockSettingsMenuItem' );\n\treturn <EditorPluginBlockSettingsMenuItem { ...props } />;\n}\n\n/**\n * @see PluginDocumentSettingPanel in @wordpress/editor package.\n */\nexport function PluginDocumentSettingPanel( props ) {\n\tdeprecateSlot( 'PluginDocumentSettingPanel' );\n\treturn <EditorPluginDocumentSettingPanel { ...props } />;\n}\n\n/**\n * @see PluginMoreMenuItem in @wordpress/editor package.\n */\nexport function PluginMoreMenuItem( props ) {\n\tdeprecateSlot( 'PluginMoreMenuItem' );\n\treturn <EditorPluginMoreMenuItem { ...props } />;\n}\n\n/**\n * @see PluginPrePublishPanel in @wordpress/editor package.\n */\nexport function PluginPrePublishPanel( props ) {\n\tdeprecateSlot( 'PluginPrePublishPanel' );\n\treturn <EditorPluginPrePublishPanel { ...props } />;\n}\n\n/**\n * @see PluginPostPublishPanel in @wordpress/editor package.\n */\nexport function PluginPostPublishPanel( props ) {\n\tdeprecateSlot( 'PluginPostPublishPanel' );\n\treturn <EditorPluginPostPublishPanel { ...props } />;\n}\n\n/**\n * @see PluginPostStatusInfo in @wordpress/editor package.\n */\nexport function PluginPostStatusInfo( props ) {\n\tdeprecateSlot( 'PluginPostStatusInfo' );\n\treturn <EditorPluginPostStatusInfo { ...props } />;\n}\n\n/**\n * @see PluginSidebar in @wordpress/editor package.\n */\nexport function PluginSidebar( props ) {\n\tdeprecateSlot( 'PluginSidebar' );\n\treturn <EditorPluginSidebar { ...props } />;\n}\n\n/**\n * @see PluginSidebarMoreMenuItem in @wordpress/editor package.\n */\nexport function PluginSidebarMoreMenuItem( props ) {\n\tdeprecateSlot( 'PluginSidebarMoreMenuItem' );\n\treturn <EditorPluginSidebarMoreMenuItem { ...props } />;\n}\n\n/**\n * @see PluginPostExcerpt in @wordpress/editor package.\n */\nexport function __experimentalPluginPostExcerpt() {\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,WAAA,GAAAC,sBAAA,CAAAF,OAAA;AAKA,IAAAG,WAAA,GAAAH,OAAA;AAAuC,IAAAI,WAAA,GAAAJ,OAAA;AAnBvC;AACA;AACA;;AAcA;AACA;AACA;;AAEA,MAAM;EAAEK;AAAkB,CAAC,GAAG,IAAAC,kBAAM,EAAEC,mBAAkB,CAAC;AAEzD,MAAMC,aAAa,GAAKC,IAAI,IAAM;EACjC,IAAAC,mBAAU,EAAG,eAAeD,IAAM,EAAC,EAAE;IACpCE,KAAK,EAAE,KAAK;IACZC,WAAW,EAAG,aAAaH,IAAM;EAClC,CAAE,CAAC;AACJ,CAAC;;AAED;AACA;AACA;AACA;AACO,SAASI,2BAA2BA,CAAEC,KAAK,EAAG;EACpD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BAAO,IAAAJ,WAAA,CAAAW,GAAA,EAAChB,OAAA,CAAAsB,aAAmB;IAAA,GAAMP;EAAK,CAAI,CAAC;AAC5C;;AAEA;AACA;AACA;AACO,SAASQ,yBAAyBA,CAAER,KAAK,EAAG;EAClDN,aAAa,CAAE,2BAA4B,CAAC;EAC5C,oBAAO,IAAAJ,WAAA,CAAAW,GAAA,EAAChB,OAAA,CAAAuB,yBAA+B;IAAA,GAAMR;EAAK,CAAI,CAAC;AACxD;;AAEA;AACA;AACA;AACO,SAASS,+BAA+BA,CAAA,EAAG;EACjD,IAAAb,mBAAU,EAAE,6CAA6C,EAAE;IAC1DC,KAAK,EAAE,KAAK;IACZa,IAAI,EAAE,+EAA+E;IACrFC,IAAI,EAAE;EACP,CAAE,CAAC;EACH,OAAOpB,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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rFC,IAAI,EAAE;EACP,CAAE,CAAC;EACH,OAAO1B,iBAAiB;AACzB;;AAEA","ignoreList":[]}
@@ -12,7 +12,7 @@ var _privateApis = require("@wordpress/private-apis");
12
12
  const {
13
13
  lock,
14
14
  unlock
15
- } = (0, _privateApis.__dangerousOptInToUnstableAPIsOnlyForCoreModules)('I know using unstable features means my theme or plugin will inevitably break in the next version of WordPress.', '@wordpress/edit-post');
15
+ } = (0, _privateApis.__dangerousOptInToUnstableAPIsOnlyForCoreModules)('I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.', '@wordpress/edit-post');
16
16
  exports.unlock = unlock;
17
17
  exports.lock = lock;
18
18
  //# sourceMappingURL=lock-unlock.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_privateApis","require","lock","unlock","__dangerousOptInToUnstableAPIsOnlyForCoreModules","exports"],"sources":["@wordpress/edit-post/src/lock-unlock.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/private-apis';\n\nexport const { lock, unlock } =\n\t__dangerousOptInToUnstableAPIsOnlyForCoreModules(\n\t\t'I know using unstable features means my theme or plugin will inevitably break in the next version of WordPress.',\n\t\t'@wordpress/edit-post'\n\t);\n"],"mappings":";;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGO,MAAM;EAAEC,IAAI;EAAEC;AAAO,CAAC,GAC5B,IAAAC,6DAAgD,EAC/C,iHAAiH,EACjH,sBACD,CAAC;AAACC,OAAA,CAAAF,MAAA,GAAAA,MAAA;AAAAE,OAAA,CAAAH,IAAA,GAAAA,IAAA","ignoreList":[]}
1
+ {"version":3,"names":["_privateApis","require","lock","unlock","__dangerousOptInToUnstableAPIsOnlyForCoreModules","exports"],"sources":["@wordpress/edit-post/src/lock-unlock.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/private-apis';\n\nexport const { lock, unlock } =\n\t__dangerousOptInToUnstableAPIsOnlyForCoreModules(\n\t\t'I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.',\n\t\t'@wordpress/edit-post'\n\t);\n"],"mappings":";;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGO,MAAM;EAAEC,IAAI;EAAEC;AAAO,CAAC,GAC5B,IAAAC,6DAAgD,EAC/C,+HAA+H,EAC/H,sBACD,CAAC;AAACC,OAAA,CAAAF,MAAA,GAAAA,MAAA;AAAAE,OAAA,CAAAH,IAAA,GAAAA,IAAA","ignoreList":[]}
@@ -18,6 +18,7 @@ import { privateApis as commandsPrivateApis } from '@wordpress/commands';
18
18
  import { privateApis as coreCommandsPrivateApis } from '@wordpress/core-commands';
19
19
  import { privateApis as blockLibraryPrivateApis } from '@wordpress/block-library';
20
20
  import { addQueryArgs } from '@wordpress/url';
21
+ import { decodeEntities } from '@wordpress/html-entities';
21
22
 
22
23
  /**
23
24
  * Internal dependencies
@@ -199,7 +200,7 @@ function Layout({
199
200
  const title = typeof newItem.title === 'string' ? newItem.title : newItem.title?.rendered;
200
201
  createSuccessNotice(sprintf(
201
202
  // translators: %s: Title of the created post e.g: "Post 1".
202
- __('"%s" successfully created.'), title), {
203
+ __('"%s" successfully created.'), decodeEntities(title)), {
203
204
  type: 'snackbar',
204
205
  id: 'duplicate-post-action',
205
206
  actions: [{
@@ -1 +1 @@
1
- {"version":3,"names":["clsx","AutosaveMonitor","LocalAutosaveMonitor","UnsavedChangesWarning","EditorKeyboardShortcutsRegister","EditorSnackbars","store","editorStore","privateApis","editorPrivateApis","useSelect","useDispatch","blockEditorPrivateApis","blockEditorStore","PluginArea","__","sprintf","useCallback","useMemo","noticesStore","preferencesStore","commandsPrivateApis","coreCommandsPrivateApis","blockLibraryPrivateApis","addQueryArgs","BackButton","EditPostKeyboardShortcuts","InitPatternModal","BrowserURL","MetaBoxes","PostEditorMoreMenu","WelcomeGuide","editPostStore","unlock","useEditPostCommands","usePaddingAppender","useShouldIframe","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","getLayoutStyles","useCommands","useCommandContext","EditorInterface","FullscreenMode","Sidebar","BlockKeyboardShortcuts","DESIGN_POST_TYPES","useEditorStyles","hasThemeStyleSupport","editorSettings","isZoomedOutView","hasMetaBoxes","renderingMode","postType","select","__unstableGetEditorMode","getCurrentPostType","getRenderingMode","_postType","isFeatureActive","getEditorSettings","_editorSettings$style","_editorSettings$style2","_editorSettings$style3","presetStyles","styles","filter","style","__unstableType","defaultEditorStyles","hasThemeStyles","length","disableLayoutStyles","push","css","selector","hasBlockGapSupport","hasFallbackGapSupport","fallbackGapValue","baseStyles","includes","Layout","initialPost","paddingAppenderRef","shouldIframe","createErrorNotice","mode","isFullscreenActive","hasActiveMetaboxes","hasBlockSelected","showIconLabels","isDistractionFree","showMetaBoxes","hasHistory","isEditingTemplate","isWelcomeGuideVisible","get","getEditorMode","getBlockSelectionStart","onNavigateToPreviousEntityRecord","commandContext","document","body","classList","add","remove","className","onPluginAreaError","name","createSuccessNotice","onActionPerformed","actionId","items","location","href","trashed","post_type","type","ids","id","newItem","title","rendered","actions","label","onClick","postId","post","action","children","isActive","onError","extraPanels","forceIsDirty","contentRef","disableIframe","autoFocus"],"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\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 { useCallback, useMemo } from '@wordpress/element';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { privateApis as commandsPrivateApis } from '@wordpress/commands';\nimport { privateApis as coreCommandsPrivateApis } from '@wordpress/core-commands';\nimport { privateApis as blockLibraryPrivateApis } from '@wordpress/block-library';\nimport { addQueryArgs } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport BackButton from '../back-button';\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';\n\nconst { getLayoutStyles } = unlock( blockEditorPrivateApis );\nconst { useCommands } = unlock( coreCommandsPrivateApis );\nconst { useCommandContext } = unlock( commandsPrivateApis );\nconst { EditorInterface, FullscreenMode, Sidebar } =\n\tunlock( 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\thasMetaBoxes,\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\thasMetaBoxes: select( editPostStore ).hasMetaBoxes(),\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 constant padding for the typewriter effect. When typing at the\n\t\t// bottom, there needs to be room to scroll up.\n\t\tif (\n\t\t\t! isZoomedOutView &&\n\t\t\t! hasMetaBoxes &&\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: 'body{padding-bottom: 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\nfunction Layout( { initialPost } ) {\n\tuseCommands();\n\tuseEditPostCommands();\n\tconst paddingAppenderRef = usePaddingAppender();\n\tconst shouldIframe = useShouldIframe();\n\tconst { createErrorNotice } = useDispatch( noticesStore );\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\tisEditingTemplate,\n\t\tisWelcomeGuideVisible,\n\t} = useSelect( ( select ) => {\n\t\tconst { get } = select( preferencesStore );\n\t\tconst { getEditorSettings } = select( editorStore );\n\t\tconst { isFeatureActive } = select( editPostStore );\n\n\t\treturn {\n\t\t\tmode: select( editorStore ).getEditorMode(),\n\t\t\tisFullscreenActive:\n\t\t\t\tselect( editPostStore ).isFeatureActive( 'fullscreenMode' ),\n\t\t\thasActiveMetaboxes: select( editPostStore ).hasMetaBoxes(),\n\t\t\thasBlockSelected:\n\t\t\t\t!! select( blockEditorStore ).getBlockSelectionStart(),\n\t\t\tshowIconLabels: get( 'core', 'showIconLabels' ),\n\t\t\tisDistractionFree: get( 'core', 'distractionFree' ),\n\t\t\tshowMetaBoxes:\n\t\t\t\tselect( editorStore ).getRenderingMode() === 'post-only',\n\t\t\thasHistory: !! getEditorSettings().onNavigateToPreviousEntityRecord,\n\t\t\tisEditingTemplate:\n\t\t\t\tselect( editorStore ).getCurrentPostType() === 'wp_template',\n\t\t\tisWelcomeGuideVisible: isFeatureActive( 'welcomeGuide' ),\n\t\t};\n\t}, [] );\n\n\t// Set the right context for the command palette\n\tconst commandContext = hasBlockSelected\n\t\t? 'block-selection-edit'\n\t\t: 'entity-edit';\n\tuseCommandContext( commandContext );\n\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\ttitle\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t\t\t\tid: 'duplicate-post-action',\n\t\t\t\t\t\t\t\tactions: [\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tlabel: __( 'Edit' ),\n\t\t\t\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\t\t\t\tconst postId = newItem.id;\n\t\t\t\t\t\t\t\t\t\t\tdocument.location.href =\n\t\t\t\t\t\t\t\t\t\t\t\taddQueryArgs( 'post.php', {\n\t\t\t\t\t\t\t\t\t\t\t\t\tpost: postId,\n\t\t\t\t\t\t\t\t\t\t\t\t\taction: 'edit',\n\t\t\t\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t},\n\t\t[ createSuccessNotice ]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<FullscreenMode isActive={ isFullscreenActive } />\n\t\t\t<BrowserURL hasHistory={ hasHistory } />\n\t\t\t<UnsavedChangesWarning />\n\t\t\t<AutosaveMonitor />\n\t\t\t<LocalAutosaveMonitor />\n\t\t\t<EditPostKeyboardShortcuts />\n\t\t\t<EditorKeyboardShortcutsRegister />\n\t\t\t<BlockKeyboardShortcuts />\n\t\t\t<WelcomeGuide />\n\t\t\t<InitPatternModal />\n\t\t\t<PluginArea onError={ onPluginAreaError } />\n\t\t\t{ ! isDistractionFree && (\n\t\t\t\t<Sidebar\n\t\t\t\t\tonActionPerformed={ onActionPerformed }\n\t\t\t\t\textraPanels={\n\t\t\t\t\t\t! isEditingTemplate && <MetaBoxes location=\"side\" />\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t<PostEditorMoreMenu />\n\t\t\t<BackButton initialPost={ initialPost } />\n\t\t\t<EditorSnackbars />\n\t\t\t<EditorInterface\n\t\t\t\tclassName={ className }\n\t\t\t\tstyles={ styles }\n\t\t\t\tforceIsDirty={ hasActiveMetaboxes }\n\t\t\t\tcontentRef={ paddingAppenderRef }\n\t\t\t\tdisableIframe={ ! shouldIframe }\n\t\t\t\t// We should auto-focus the canvas (title) on load.\n\t\t\t\t// eslint-disable-next-line jsx-a11y/no-autofocus\n\t\t\t\tautoFocus={ ! isWelcomeGuideVisible }\n\t\t\t>\n\t\t\t\t{ ! isDistractionFree && showMetaBoxes && (\n\t\t\t\t\t<div className=\"edit-post-layout__metaboxes\">\n\t\t\t\t\t\t<MetaBoxes location=\"normal\" />\n\t\t\t\t\t\t<MetaBoxes location=\"advanced\" />\n\t\t\t\t\t</div>\n\t\t\t\t) }\n\t\t\t</EditorInterface>\n\t\t</>\n\t);\n}\n\nexport default Layout;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SACCC,eAAe,EACfC,oBAAoB,EACpBC,qBAAqB,EACrBC,+BAA+B,EAC/BC,eAAe,EACfC,KAAK,IAAIC,WAAW,EACpBC,WAAW,IAAIC,iBAAiB,QAC1B,mBAAmB;AAC1B,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SACCH,WAAW,IAAII,sBAAsB,EACrCN,KAAK,IAAIO,gBAAgB,QACnB,yBAAyB;AAChC,SAASC,UAAU,QAAQ,oBAAoB;AAC/C,SAASC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAC7C,SAASC,WAAW,EAAEC,OAAO,QAAQ,oBAAoB;AACzD,SAASZ,KAAK,IAAIa,YAAY,QAAQ,oBAAoB;AAC1D,SAASb,KAAK,IAAIc,gBAAgB,QAAQ,wBAAwB;AAClE,SAASZ,WAAW,IAAIa,mBAAmB,QAAQ,qBAAqB;AACxE,SAASb,WAAW,IAAIc,uBAAuB,QAAQ,0BAA0B;AACjF,SAASd,WAAW,IAAIe,uBAAuB,QAAQ,0BAA0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zC,MAAM,EAAGA,MAAQ;MACjBoE,YAAY,EAAG7C,kBAAoB;MACnC8C,UAAU,EAAGnD,kBAAoB;MACjCoD,aAAa,EAAG,CAAEnD;MAClB;MACA;MAAA;MACAoD,SAAS,EAAG,CAAEzC,qBAAuB;MAAAkC,QAAA,EAEnC,CAAEtC,iBAAiB,IAAIC,aAAa,iBACrCxD,KAAA;QAAKsE,SAAS,EAAC,6BAA6B;QAAAuB,QAAA,gBAC3C/F,IAAA,CAACT,SAAS;UAACwF,QAAQ,EAAC;QAAQ,CAAE,CAAC,eAC/B/E,IAAA,CAACT,SAAS;UAACwF,QAAQ,EAAC;QAAU,CAAE,CAAC;MAAA,CAC7B;IACL,CACe,CAAC;EAAA,CACjB,CAAC;AAEL;AAEA,eAAehC,MAAM","ignoreList":[]}
1
+ {"version":3,"names":["clsx","AutosaveMonitor","LocalAutosaveMonitor","UnsavedChangesWarning","EditorKeyboardShortcutsRegister","EditorSnackbars","store","editorStore","privateApis","editorPrivateApis","useSelect","useDispatch","blockEditorPrivateApis","blockEditorStore","PluginArea","__","sprintf","useCallback","useMemo","noticesStore","preferencesStore","commandsPrivateApis","coreCommandsPrivateApis","blockLibraryPrivateApis","addQueryArgs","decodeEntities","BackButton","EditPostKeyboardShortcuts","InitPatternModal","BrowserURL","MetaBoxes","PostEditorMoreMenu","WelcomeGuide","editPostStore","unlock","useEditPostCommands","usePaddingAppender","useShouldIframe","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","getLayoutStyles","useCommands","useCommandContext","EditorInterface","FullscreenMode","Sidebar","BlockKeyboardShortcuts","DESIGN_POST_TYPES","useEditorStyles","hasThemeStyleSupport","editorSettings","isZoomedOutView","hasMetaBoxes","renderingMode","postType","select","__unstableGetEditorMode","getCurrentPostType","getRenderingMode","_postType","isFeatureActive","getEditorSettings","_editorSettings$style","_editorSettings$style2","_editorSettings$style3","presetStyles","styles","filter","style","__unstableType","defaultEditorStyles","hasThemeStyles","length","disableLayoutStyles","push","css","selector","hasBlockGapSupport","hasFallbackGapSupport","fallbackGapValue","baseStyles","includes","Layout","initialPost","paddingAppenderRef","shouldIframe","createErrorNotice","mode","isFullscreenActive","hasActiveMetaboxes","hasBlockSelected","showIconLabels","isDistractionFree","showMetaBoxes","hasHistory","isEditingTemplate","isWelcomeGuideVisible","get","getEditorMode","getBlockSelectionStart","onNavigateToPreviousEntityRecord","commandContext","document","body","classList","add","remove","className","onPluginAreaError","name","createSuccessNotice","onActionPerformed","actionId","items","location","href","trashed","post_type","type","ids","id","newItem","title","rendered","actions","label","onClick","postId","post","action","children","isActive","onError","extraPanels","forceIsDirty","contentRef","disableIframe","autoFocus"],"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\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 { useCallback, useMemo } from '@wordpress/element';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { privateApis as commandsPrivateApis } from '@wordpress/commands';\nimport { privateApis as coreCommandsPrivateApis } from '@wordpress/core-commands';\nimport { privateApis as blockLibraryPrivateApis } from '@wordpress/block-library';\nimport { addQueryArgs } from '@wordpress/url';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport BackButton from '../back-button';\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';\n\nconst { getLayoutStyles } = unlock( blockEditorPrivateApis );\nconst { useCommands } = unlock( coreCommandsPrivateApis );\nconst { useCommandContext } = unlock( commandsPrivateApis );\nconst { EditorInterface, FullscreenMode, Sidebar } =\n\tunlock( 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\thasMetaBoxes,\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\thasMetaBoxes: select( editPostStore ).hasMetaBoxes(),\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 constant padding for the typewriter effect. When typing at the\n\t\t// bottom, there needs to be room to scroll up.\n\t\tif (\n\t\t\t! isZoomedOutView &&\n\t\t\t! hasMetaBoxes &&\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: 'body{padding-bottom: 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\nfunction Layout( { initialPost } ) {\n\tuseCommands();\n\tuseEditPostCommands();\n\tconst paddingAppenderRef = usePaddingAppender();\n\tconst shouldIframe = useShouldIframe();\n\tconst { createErrorNotice } = useDispatch( noticesStore );\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\tisEditingTemplate,\n\t\tisWelcomeGuideVisible,\n\t} = useSelect( ( select ) => {\n\t\tconst { get } = select( preferencesStore );\n\t\tconst { getEditorSettings } = select( editorStore );\n\t\tconst { isFeatureActive } = select( editPostStore );\n\n\t\treturn {\n\t\t\tmode: select( editorStore ).getEditorMode(),\n\t\t\tisFullscreenActive:\n\t\t\t\tselect( editPostStore ).isFeatureActive( 'fullscreenMode' ),\n\t\t\thasActiveMetaboxes: select( editPostStore ).hasMetaBoxes(),\n\t\t\thasBlockSelected:\n\t\t\t\t!! select( blockEditorStore ).getBlockSelectionStart(),\n\t\t\tshowIconLabels: get( 'core', 'showIconLabels' ),\n\t\t\tisDistractionFree: get( 'core', 'distractionFree' ),\n\t\t\tshowMetaBoxes:\n\t\t\t\tselect( editorStore ).getRenderingMode() === 'post-only',\n\t\t\thasHistory: !! getEditorSettings().onNavigateToPreviousEntityRecord,\n\t\t\tisEditingTemplate:\n\t\t\t\tselect( editorStore ).getCurrentPostType() === 'wp_template',\n\t\t\tisWelcomeGuideVisible: isFeatureActive( 'welcomeGuide' ),\n\t\t};\n\t}, [] );\n\n\t// Set the right context for the command palette\n\tconst commandContext = hasBlockSelected\n\t\t? 'block-selection-edit'\n\t\t: 'entity-edit';\n\tuseCommandContext( commandContext );\n\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\treturn (\n\t\t<>\n\t\t\t<FullscreenMode isActive={ isFullscreenActive } />\n\t\t\t<BrowserURL hasHistory={ hasHistory } />\n\t\t\t<UnsavedChangesWarning />\n\t\t\t<AutosaveMonitor />\n\t\t\t<LocalAutosaveMonitor />\n\t\t\t<EditPostKeyboardShortcuts />\n\t\t\t<EditorKeyboardShortcutsRegister />\n\t\t\t<BlockKeyboardShortcuts />\n\t\t\t<WelcomeGuide />\n\t\t\t<InitPatternModal />\n\t\t\t<PluginArea onError={ onPluginAreaError } />\n\t\t\t{ ! isDistractionFree && (\n\t\t\t\t<Sidebar\n\t\t\t\t\tonActionPerformed={ onActionPerformed }\n\t\t\t\t\textraPanels={\n\t\t\t\t\t\t! isEditingTemplate && <MetaBoxes location=\"side\" />\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t<PostEditorMoreMenu />\n\t\t\t<BackButton initialPost={ initialPost } />\n\t\t\t<EditorSnackbars />\n\t\t\t<EditorInterface\n\t\t\t\tclassName={ className }\n\t\t\t\tstyles={ styles }\n\t\t\t\tforceIsDirty={ hasActiveMetaboxes }\n\t\t\t\tcontentRef={ paddingAppenderRef }\n\t\t\t\tdisableIframe={ ! shouldIframe }\n\t\t\t\t// We should auto-focus the canvas (title) on load.\n\t\t\t\t// eslint-disable-next-line jsx-a11y/no-autofocus\n\t\t\t\tautoFocus={ ! isWelcomeGuideVisible }\n\t\t\t>\n\t\t\t\t{ ! isDistractionFree && showMetaBoxes && (\n\t\t\t\t\t<div className=\"edit-post-layout__metaboxes\">\n\t\t\t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ACT,SAAS;UAACwF,QAAQ,EAAC;QAAQ,CAAE,CAAC,eAC/B/E,IAAA,CAACT,SAAS;UAACwF,QAAQ,EAAC;QAAU,CAAE,CAAC;MAAA,CAC7B;IACL,CACe,CAAC;EAAA,CACjB,CAAC;AAEL;AAEA,eAAehC,MAAM","ignoreList":[]}
@@ -2,6 +2,7 @@
2
2
  * WordPress dependencies
3
3
  */
4
4
  import { privateApis as editorPrivateApis, PluginBlockSettingsMenuItem as EditorPluginBlockSettingsMenuItem, PluginDocumentSettingPanel as EditorPluginDocumentSettingPanel, PluginMoreMenuItem as EditorPluginMoreMenuItem, PluginPrePublishPanel as EditorPluginPrePublishPanel, PluginPostPublishPanel as EditorPluginPostPublishPanel, PluginPostStatusInfo as EditorPluginPostStatusInfo, PluginSidebar as EditorPluginSidebar, PluginSidebarMoreMenuItem as EditorPluginSidebarMoreMenuItem } from '@wordpress/editor';
5
+ import { getPath } from '@wordpress/url';
5
6
  import deprecated from '@wordpress/deprecated';
6
7
 
7
8
  /**
@@ -12,6 +13,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
12
13
  const {
13
14
  PluginPostExcerpt
14
15
  } = unlock(editorPrivateApis);
16
+ const isSiteEditor = getPath(window.location.href)?.includes('site-editor.php');
15
17
  const deprecateSlot = name => {
16
18
  deprecated(`wp.editPost.${name}`, {
17
19
  since: '6.6',
@@ -24,6 +26,9 @@ const deprecateSlot = name => {
24
26
  * @see PluginBlockSettingsMenuItem in @wordpress/editor package.
25
27
  */
26
28
  export function PluginBlockSettingsMenuItem(props) {
29
+ if (isSiteEditor) {
30
+ return null;
31
+ }
27
32
  deprecateSlot('PluginBlockSettingsMenuItem');
28
33
  return /*#__PURE__*/_jsx(EditorPluginBlockSettingsMenuItem, {
29
34
  ...props
@@ -34,6 +39,9 @@ export function PluginBlockSettingsMenuItem(props) {
34
39
  * @see PluginDocumentSettingPanel in @wordpress/editor package.
35
40
  */
36
41
  export function PluginDocumentSettingPanel(props) {
42
+ if (isSiteEditor) {
43
+ return null;
44
+ }
37
45
  deprecateSlot('PluginDocumentSettingPanel');
38
46
  return /*#__PURE__*/_jsx(EditorPluginDocumentSettingPanel, {
39
47
  ...props
@@ -44,6 +52,9 @@ export function PluginDocumentSettingPanel(props) {
44
52
  * @see PluginMoreMenuItem in @wordpress/editor package.
45
53
  */
46
54
  export function PluginMoreMenuItem(props) {
55
+ if (isSiteEditor) {
56
+ return null;
57
+ }
47
58
  deprecateSlot('PluginMoreMenuItem');
48
59
  return /*#__PURE__*/_jsx(EditorPluginMoreMenuItem, {
49
60
  ...props
@@ -54,6 +65,9 @@ export function PluginMoreMenuItem(props) {
54
65
  * @see PluginPrePublishPanel in @wordpress/editor package.
55
66
  */
56
67
  export function PluginPrePublishPanel(props) {
68
+ if (isSiteEditor) {
69
+ return null;
70
+ }
57
71
  deprecateSlot('PluginPrePublishPanel');
58
72
  return /*#__PURE__*/_jsx(EditorPluginPrePublishPanel, {
59
73
  ...props
@@ -64,6 +78,9 @@ export function PluginPrePublishPanel(props) {
64
78
  * @see PluginPostPublishPanel in @wordpress/editor package.
65
79
  */
66
80
  export function PluginPostPublishPanel(props) {
81
+ if (isSiteEditor) {
82
+ return null;
83
+ }
67
84
  deprecateSlot('PluginPostPublishPanel');
68
85
  return /*#__PURE__*/_jsx(EditorPluginPostPublishPanel, {
69
86
  ...props
@@ -74,6 +91,9 @@ export function PluginPostPublishPanel(props) {
74
91
  * @see PluginPostStatusInfo in @wordpress/editor package.
75
92
  */
76
93
  export function PluginPostStatusInfo(props) {
94
+ if (isSiteEditor) {
95
+ return null;
96
+ }
77
97
  deprecateSlot('PluginPostStatusInfo');
78
98
  return /*#__PURE__*/_jsx(EditorPluginPostStatusInfo, {
79
99
  ...props
@@ -84,6 +104,9 @@ export function PluginPostStatusInfo(props) {
84
104
  * @see PluginSidebar in @wordpress/editor package.
85
105
  */
86
106
  export function PluginSidebar(props) {
107
+ if (isSiteEditor) {
108
+ return null;
109
+ }
87
110
  deprecateSlot('PluginSidebar');
88
111
  return /*#__PURE__*/_jsx(EditorPluginSidebar, {
89
112
  ...props
@@ -94,6 +117,9 @@ export function PluginSidebar(props) {
94
117
  * @see PluginSidebarMoreMenuItem in @wordpress/editor package.
95
118
  */
96
119
  export function PluginSidebarMoreMenuItem(props) {
120
+ if (isSiteEditor) {
121
+ return null;
122
+ }
97
123
  deprecateSlot('PluginSidebarMoreMenuItem');
98
124
  return /*#__PURE__*/_jsx(EditorPluginSidebarMoreMenuItem, {
99
125
  ...props
@@ -104,6 +130,9 @@ export function PluginSidebarMoreMenuItem(props) {
104
130
  * @see PluginPostExcerpt in @wordpress/editor package.
105
131
  */
106
132
  export function __experimentalPluginPostExcerpt() {
133
+ if (isSiteEditor) {
134
+ return null;
135
+ }
107
136
  deprecated('wp.editPost.__experimentalPluginPostExcerpt', {
108
137
  since: '6.6',
109
138
  hint: 'Core and custom panels can be access programmatically using their panel name.',
@@ -1 +1 @@
1
- {"version":3,"names":["privateApis","editorPrivateApis","PluginBlockSettingsMenuItem","EditorPluginBlockSettingsMenuItem","PluginDocumentSettingPanel","EditorPluginDocumentSettingPanel","PluginMoreMenuItem","EditorPluginMoreMenuItem","PluginPrePublishPanel","EditorPluginPrePublishPanel","PluginPostPublishPanel","EditorPluginPostPublishPanel","PluginPostStatusInfo","EditorPluginPostStatusInfo","PluginSidebar","EditorPluginSidebar","PluginSidebarMoreMenuItem","EditorPluginSidebarMoreMenuItem","deprecated","unlock","jsx","_jsx","PluginPostExcerpt","deprecateSlot","name","since","alternative","props","__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 deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from './lock-unlock';\nconst { PluginPostExcerpt } = unlock( editorPrivateApis );\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\tdeprecateSlot( 'PluginBlockSettingsMenuItem' );\n\treturn <EditorPluginBlockSettingsMenuItem { ...props } />;\n}\n\n/**\n * @see PluginDocumentSettingPanel in @wordpress/editor package.\n */\nexport function PluginDocumentSettingPanel( props ) {\n\tdeprecateSlot( 'PluginDocumentSettingPanel' );\n\treturn <EditorPluginDocumentSettingPanel { ...props } />;\n}\n\n/**\n * @see PluginMoreMenuItem in @wordpress/editor package.\n */\nexport function PluginMoreMenuItem( props ) {\n\tdeprecateSlot( 'PluginMoreMenuItem' );\n\treturn <EditorPluginMoreMenuItem { ...props } />;\n}\n\n/**\n * @see PluginPrePublishPanel in @wordpress/editor package.\n */\nexport function PluginPrePublishPanel( props ) {\n\tdeprecateSlot( 'PluginPrePublishPanel' );\n\treturn <EditorPluginPrePublishPanel { ...props } />;\n}\n\n/**\n * @see PluginPostPublishPanel in @wordpress/editor package.\n */\nexport function PluginPostPublishPanel( props ) {\n\tdeprecateSlot( 'PluginPostPublishPanel' );\n\treturn <EditorPluginPostPublishPanel { ...props } />;\n}\n\n/**\n * @see PluginPostStatusInfo in @wordpress/editor package.\n */\nexport function PluginPostStatusInfo( props ) {\n\tdeprecateSlot( 'PluginPostStatusInfo' );\n\treturn <EditorPluginPostStatusInfo { ...props } />;\n}\n\n/**\n * @see PluginSidebar in @wordpress/editor package.\n */\nexport function PluginSidebar( props ) {\n\tdeprecateSlot( 'PluginSidebar' );\n\treturn <EditorPluginSidebar { ...props } />;\n}\n\n/**\n * @see PluginSidebarMoreMenuItem in @wordpress/editor package.\n */\nexport function PluginSidebarMoreMenuItem( props ) {\n\tdeprecateSlot( 'PluginSidebarMoreMenuItem' );\n\treturn <EditorPluginSidebarMoreMenuItem { ...props } />;\n}\n\n/**\n * @see PluginPostExcerpt in @wordpress/editor package.\n */\nexport function __experimentalPluginPostExcerpt() {\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":"AAAA;AACA;AACA;AACA,SACCA,WAAW,IAAIC,iBAAiB,EAChCC,2BAA2B,IAAIC,iCAAiC,EAChEC,0BAA0B,IAAIC,gCAAgC,EAC9DC,kBAAkB,IAAIC,wBAAwB,EAC9CC,qBAAqB,IAAIC,2BAA2B,EACpDC,sBAAsB,IAAIC,4BAA4B,EACtDC,oBAAoB,IAAIC,0BAA0B,EAClDC,aAAa,IAAIC,mBAAmB,EACpCC,yBAAyB,IAAIC,+BAA+B,QACtD,mBAAmB;AAC1B,OAAOC,UAAU,MAAM,uBAAuB;;AAE9C;AACA;AACA;AACA,SAASC,MAAM,QAAQ,eAAe;AAAC,SAAAC,GAAA,IAAAC,IAAA;AACvC,MAAM;EAAEC;AAAkB,CAAC,GAAGH,MAAM,CAAElB,iBAAkB,CAAC;AAEzD,MAAMsB,aAAa,GAAKC,IAAI,IAAM;EACjCN,UAAU,CAAG,eAAeM,IAAM,EAAC,EAAE;IACpCC,KAAK,EAAE,KAAK;IAC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BAAmB;IAAA,GAAMY;EAAK,CAAI,CAAC;AAC5C;;AAEA;AACA;AACA;AACA,OAAO,SAASX,yBAAyBA,CAAEW,KAAK,EAAG;EAClDJ,aAAa,CAAE,2BAA4B,CAAC;EAC5C,oBAAOF,IAAA,CAACJ,+BAA+B;IAAA,GAAMU;EAAK,CAAI,CAAC;AACxD;;AAEA;AACA;AACA;AACA,OAAO,SAASC,+BAA+BA,CAAA,EAAG;EACjDV,UAAU,CAAE,6CAA6C,EAAE;IAC1DO,KAAK,EAAE,KAAK;IACZI,IAAI,EAAE,+EAA+E;IACrFC,IAAI,EAAE;EACP,CAAE,CAAC;EACH,OAAOR,iBAAiB;AACzB;;AAEA","ignoreList":[]}
1
+ {"version":3,"names":["privateApis","editorPrivateApis","PluginBlockSettingsMenuItem","EditorPluginBlockSettingsMenuItem","PluginDocumentSettingPanel","EditorPluginDocumentSettingPanel","PluginMoreMenuItem","EditorPluginMoreMenuItem","PluginPrePublishPanel","EditorPluginPrePublishPanel","PluginPostPublishPanel","EditorPluginPostPublishPanel","PluginPostStatusInfo","EditorPluginPostStatusInfo","PluginSidebar","EditorPluginSidebar","PluginSidebarMoreMenuItem","EditorPluginSidebarMoreMenuItem","getPath","deprecated","unlock","jsx","_jsx","PluginPostExcerpt","isSiteEditor","window","location","href","includes","deprecateSlot","name","since","alternative","props","__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":"AAAA;AACA;AACA;AACA,SACCA,WAAW,IAAIC,iBAAiB,EAChCC,2BAA2B,IAAIC,iCAAiC,EAChEC,0BAA0B,IAAIC,gCAAgC,EAC9DC,kBAAkB,IAAIC,wBAAwB,EAC9CC,qBAAqB,IAAIC,2BAA2B,EACpDC,sBAAsB,IAAIC,4BAA4B,EACtDC,oBAAoB,IAAIC,0BAA0B,EAClDC,aAAa,IAAIC,mBAAmB,EACpCC,yBAAyB,IAAIC,+BAA+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IAAI,EAAE,+EAA+E;IACrFC,IAAI,EAAE;EACP,CAAE,CAAC;EACH,OAAOb,iBAAiB;AACzB;;AAEA","ignoreList":[]}
@@ -5,5 +5,5 @@ import { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/pri
5
5
  export const {
6
6
  lock,
7
7
  unlock
8
- } = __dangerousOptInToUnstableAPIsOnlyForCoreModules('I know using unstable features means my theme or plugin will inevitably break in the next version of WordPress.', '@wordpress/edit-post');
8
+ } = __dangerousOptInToUnstableAPIsOnlyForCoreModules('I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.', '@wordpress/edit-post');
9
9
  //# sourceMappingURL=lock-unlock.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["__dangerousOptInToUnstableAPIsOnlyForCoreModules","lock","unlock"],"sources":["@wordpress/edit-post/src/lock-unlock.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/private-apis';\n\nexport const { lock, unlock } =\n\t__dangerousOptInToUnstableAPIsOnlyForCoreModules(\n\t\t'I know using unstable features means my theme or plugin will inevitably break in the next version of WordPress.',\n\t\t'@wordpress/edit-post'\n\t);\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,gDAAgD,QAAQ,yBAAyB;AAE1F,OAAO,MAAM;EAAEC,IAAI;EAAEC;AAAO,CAAC,GAC5BF,gDAAgD,CAC/C,iHAAiH,EACjH,sBACD,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["__dangerousOptInToUnstableAPIsOnlyForCoreModules","lock","unlock"],"sources":["@wordpress/edit-post/src/lock-unlock.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/private-apis';\n\nexport const { lock, unlock } =\n\t__dangerousOptInToUnstableAPIsOnlyForCoreModules(\n\t\t'I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.',\n\t\t'@wordpress/edit-post'\n\t);\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,gDAAgD,QAAQ,yBAAyB;AAE1F,OAAO,MAAM;EAAEC,IAAI;EAAEC;AAAO,CAAC,GAC5BF,gDAAgD,CAC/C,+HAA+H,EAC/H,sBACD,CAAC","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/edit-post",
3
- "version": "8.0.1",
3
+ "version": "8.0.3",
4
4
  "description": "Edit Post module for WordPress.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -30,32 +30,33 @@
30
30
  "@babel/runtime": "^7.16.0",
31
31
  "@wordpress/a11y": "^4.0.1",
32
32
  "@wordpress/api-fetch": "^7.0.1",
33
- "@wordpress/block-editor": "^13.0.1",
34
- "@wordpress/block-library": "^9.0.1",
35
- "@wordpress/blocks": "^13.0.1",
36
- "@wordpress/commands": "^1.0.1",
37
- "@wordpress/components": "^28.0.1",
33
+ "@wordpress/block-editor": "^13.0.2",
34
+ "@wordpress/block-library": "^9.0.3",
35
+ "@wordpress/blocks": "^13.0.2",
36
+ "@wordpress/commands": "^1.0.2",
37
+ "@wordpress/components": "^28.0.2",
38
38
  "@wordpress/compose": "^7.0.1",
39
- "@wordpress/core-commands": "^1.0.1",
40
- "@wordpress/core-data": "^7.0.1",
41
- "@wordpress/data": "^10.0.1",
39
+ "@wordpress/core-commands": "^1.0.2",
40
+ "@wordpress/core-data": "^7.0.2",
41
+ "@wordpress/data": "^10.0.2",
42
42
  "@wordpress/deprecated": "^4.0.1",
43
43
  "@wordpress/dom": "^4.0.1",
44
- "@wordpress/editor": "^14.0.1",
44
+ "@wordpress/editor": "^14.0.2",
45
45
  "@wordpress/element": "^6.0.1",
46
46
  "@wordpress/hooks": "^4.0.1",
47
+ "@wordpress/html-entities": "^4.0.1",
47
48
  "@wordpress/i18n": "^5.0.1",
48
49
  "@wordpress/icons": "^10.0.1",
49
- "@wordpress/keyboard-shortcuts": "^5.0.1",
50
+ "@wordpress/keyboard-shortcuts": "^5.0.2",
50
51
  "@wordpress/keycodes": "^4.0.1",
51
- "@wordpress/notices": "^5.0.1",
52
- "@wordpress/plugins": "^7.0.1",
53
- "@wordpress/preferences": "^4.0.1",
54
- "@wordpress/private-apis": "^1.0.1",
52
+ "@wordpress/notices": "^5.0.2",
53
+ "@wordpress/plugins": "^7.0.2",
54
+ "@wordpress/preferences": "^4.0.2",
55
+ "@wordpress/private-apis": "^1.0.2",
55
56
  "@wordpress/url": "^4.0.1",
56
- "@wordpress/viewport": "^6.0.1",
57
+ "@wordpress/viewport": "^6.0.2",
57
58
  "@wordpress/warning": "^3.0.1",
58
- "@wordpress/widgets": "^4.0.1",
59
+ "@wordpress/widgets": "^4.0.2",
59
60
  "clsx": "^2.1.1",
60
61
  "memize": "^2.1.0"
61
62
  },
@@ -66,5 +67,5 @@
66
67
  "publishConfig": {
67
68
  "access": "public"
68
69
  },
69
- "gitHead": "0e973525f7787401b5a544e0727774d52a78639f"
70
+ "gitHead": "d0d80eabf45745725edbb19ce6667157fc68a6aa"
70
71
  }
@@ -29,6 +29,7 @@ import { privateApis as commandsPrivateApis } from '@wordpress/commands';
29
29
  import { privateApis as coreCommandsPrivateApis } from '@wordpress/core-commands';
30
30
  import { privateApis as blockLibraryPrivateApis } from '@wordpress/block-library';
31
31
  import { addQueryArgs } from '@wordpress/url';
32
+ import { decodeEntities } from '@wordpress/html-entities';
32
33
 
33
34
  /**
34
35
  * Internal dependencies
@@ -240,7 +241,7 @@ function Layout( { initialPost } ) {
240
241
  sprintf(
241
242
  // translators: %s: Title of the created post e.g: "Post 1".
242
243
  __( '"%s" successfully created.' ),
243
- title
244
+ decodeEntities( title )
244
245
  ),
245
246
  {
246
247
  type: 'snackbar',
package/src/deprecated.js CHANGED
@@ -12,6 +12,7 @@ import {
12
12
  PluginSidebar as EditorPluginSidebar,
13
13
  PluginSidebarMoreMenuItem as EditorPluginSidebarMoreMenuItem,
14
14
  } from '@wordpress/editor';
15
+ import { getPath } from '@wordpress/url';
15
16
  import deprecated from '@wordpress/deprecated';
16
17
 
17
18
  /**
@@ -20,6 +21,10 @@ import deprecated from '@wordpress/deprecated';
20
21
  import { unlock } from './lock-unlock';
21
22
  const { PluginPostExcerpt } = unlock( editorPrivateApis );
22
23
 
24
+ const isSiteEditor = getPath( window.location.href )?.includes(
25
+ 'site-editor.php'
26
+ );
27
+
23
28
  const deprecateSlot = ( name ) => {
24
29
  deprecated( `wp.editPost.${ name }`, {
25
30
  since: '6.6',
@@ -32,6 +37,9 @@ const deprecateSlot = ( name ) => {
32
37
  * @see PluginBlockSettingsMenuItem in @wordpress/editor package.
33
38
  */
34
39
  export function PluginBlockSettingsMenuItem( props ) {
40
+ if ( isSiteEditor ) {
41
+ return null;
42
+ }
35
43
  deprecateSlot( 'PluginBlockSettingsMenuItem' );
36
44
  return <EditorPluginBlockSettingsMenuItem { ...props } />;
37
45
  }
@@ -40,6 +48,9 @@ export function PluginBlockSettingsMenuItem( props ) {
40
48
  * @see PluginDocumentSettingPanel in @wordpress/editor package.
41
49
  */
42
50
  export function PluginDocumentSettingPanel( props ) {
51
+ if ( isSiteEditor ) {
52
+ return null;
53
+ }
43
54
  deprecateSlot( 'PluginDocumentSettingPanel' );
44
55
  return <EditorPluginDocumentSettingPanel { ...props } />;
45
56
  }
@@ -48,6 +59,9 @@ export function PluginDocumentSettingPanel( props ) {
48
59
  * @see PluginMoreMenuItem in @wordpress/editor package.
49
60
  */
50
61
  export function PluginMoreMenuItem( props ) {
62
+ if ( isSiteEditor ) {
63
+ return null;
64
+ }
51
65
  deprecateSlot( 'PluginMoreMenuItem' );
52
66
  return <EditorPluginMoreMenuItem { ...props } />;
53
67
  }
@@ -56,6 +70,9 @@ export function PluginMoreMenuItem( props ) {
56
70
  * @see PluginPrePublishPanel in @wordpress/editor package.
57
71
  */
58
72
  export function PluginPrePublishPanel( props ) {
73
+ if ( isSiteEditor ) {
74
+ return null;
75
+ }
59
76
  deprecateSlot( 'PluginPrePublishPanel' );
60
77
  return <EditorPluginPrePublishPanel { ...props } />;
61
78
  }
@@ -64,6 +81,9 @@ export function PluginPrePublishPanel( props ) {
64
81
  * @see PluginPostPublishPanel in @wordpress/editor package.
65
82
  */
66
83
  export function PluginPostPublishPanel( props ) {
84
+ if ( isSiteEditor ) {
85
+ return null;
86
+ }
67
87
  deprecateSlot( 'PluginPostPublishPanel' );
68
88
  return <EditorPluginPostPublishPanel { ...props } />;
69
89
  }
@@ -72,6 +92,9 @@ export function PluginPostPublishPanel( props ) {
72
92
  * @see PluginPostStatusInfo in @wordpress/editor package.
73
93
  */
74
94
  export function PluginPostStatusInfo( props ) {
95
+ if ( isSiteEditor ) {
96
+ return null;
97
+ }
75
98
  deprecateSlot( 'PluginPostStatusInfo' );
76
99
  return <EditorPluginPostStatusInfo { ...props } />;
77
100
  }
@@ -80,6 +103,9 @@ export function PluginPostStatusInfo( props ) {
80
103
  * @see PluginSidebar in @wordpress/editor package.
81
104
  */
82
105
  export function PluginSidebar( props ) {
106
+ if ( isSiteEditor ) {
107
+ return null;
108
+ }
83
109
  deprecateSlot( 'PluginSidebar' );
84
110
  return <EditorPluginSidebar { ...props } />;
85
111
  }
@@ -88,6 +114,9 @@ export function PluginSidebar( props ) {
88
114
  * @see PluginSidebarMoreMenuItem in @wordpress/editor package.
89
115
  */
90
116
  export function PluginSidebarMoreMenuItem( props ) {
117
+ if ( isSiteEditor ) {
118
+ return null;
119
+ }
91
120
  deprecateSlot( 'PluginSidebarMoreMenuItem' );
92
121
  return <EditorPluginSidebarMoreMenuItem { ...props } />;
93
122
  }
@@ -96,6 +125,9 @@ export function PluginSidebarMoreMenuItem( props ) {
96
125
  * @see PluginPostExcerpt in @wordpress/editor package.
97
126
  */
98
127
  export function __experimentalPluginPostExcerpt() {
128
+ if ( isSiteEditor ) {
129
+ return null;
130
+ }
99
131
  deprecated( 'wp.editPost.__experimentalPluginPostExcerpt', {
100
132
  since: '6.6',
101
133
  hint: 'Core and custom panels can be access programmatically using their panel name.',
@@ -5,6 +5,6 @@ import { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/pri
5
5
 
6
6
  export const { lock, unlock } =
7
7
  __dangerousOptInToUnstableAPIsOnlyForCoreModules(
8
- 'I know using unstable features means my theme or plugin will inevitably break in the next version of WordPress.',
8
+ 'I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.',
9
9
  '@wordpress/edit-post'
10
10
  );