@wordpress/editor 14.27.0 → 14.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/bindings/api.js +2 -0
  3. package/build/bindings/api.js.map +1 -1
  4. package/build/bindings/pattern-overrides.js +4 -0
  5. package/build/bindings/pattern-overrides.js.map +1 -1
  6. package/build/bindings/post-data.js +141 -0
  7. package/build/bindings/post-data.js.map +1 -0
  8. package/build/bindings/post-meta.js +4 -0
  9. package/build/bindings/post-meta.js.map +1 -1
  10. package/build/components/media-categories/index.js +1 -1
  11. package/build/components/media-categories/index.js.map +1 -1
  12. package/build/components/post-card-panel/index.js +2 -2
  13. package/build/components/post-card-panel/index.js.map +1 -1
  14. package/build/components/post-featured-image/index.js +3 -3
  15. package/build/components/post-featured-image/index.js.map +1 -1
  16. package/build/components/post-taxonomies/flat-term-selector.js +1 -1
  17. package/build/components/post-taxonomies/flat-term-selector.js.map +1 -1
  18. package/build/components/post-taxonomies/hierarchical-term-selector.js +2 -2
  19. package/build/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
  20. package/build/components/provider/index.native.js +4 -1
  21. package/build/components/provider/index.native.js.map +1 -1
  22. package/build/components/provider/use-block-editor-settings.js +9 -4
  23. package/build/components/provider/use-block-editor-settings.js.map +1 -1
  24. package/build/store/actions.js +0 -15
  25. package/build/store/actions.js.map +1 -1
  26. package/build/store/selectors.js +9 -3
  27. package/build/store/selectors.js.map +1 -1
  28. package/build/utils/media-upload/index.js +1 -1
  29. package/build/utils/media-upload/index.js.map +1 -1
  30. package/build-module/bindings/api.js +2 -0
  31. package/build-module/bindings/api.js.map +1 -1
  32. package/build-module/bindings/pattern-overrides.js +4 -0
  33. package/build-module/bindings/pattern-overrides.js.map +1 -1
  34. package/build-module/bindings/post-data.js +135 -0
  35. package/build-module/bindings/post-data.js.map +1 -0
  36. package/build-module/bindings/post-meta.js +4 -0
  37. package/build-module/bindings/post-meta.js.map +1 -1
  38. package/build-module/components/media-categories/index.js +1 -1
  39. package/build-module/components/media-categories/index.js.map +1 -1
  40. package/build-module/components/post-card-panel/index.js +2 -2
  41. package/build-module/components/post-card-panel/index.js.map +1 -1
  42. package/build-module/components/post-featured-image/index.js +3 -3
  43. package/build-module/components/post-featured-image/index.js.map +1 -1
  44. package/build-module/components/post-taxonomies/flat-term-selector.js +1 -1
  45. package/build-module/components/post-taxonomies/flat-term-selector.js.map +1 -1
  46. package/build-module/components/post-taxonomies/hierarchical-term-selector.js +2 -2
  47. package/build-module/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
  48. package/build-module/components/provider/index.native.js +4 -1
  49. package/build-module/components/provider/index.native.js.map +1 -1
  50. package/build-module/components/provider/use-block-editor-settings.js +9 -4
  51. package/build-module/components/provider/use-block-editor-settings.js.map +1 -1
  52. package/build-module/store/actions.js +0 -15
  53. package/build-module/store/actions.js.map +1 -1
  54. package/build-module/store/selectors.js +9 -3
  55. package/build-module/store/selectors.js.map +1 -1
  56. package/build-module/utils/media-upload/index.js +1 -1
  57. package/build-module/utils/media-upload/index.js.map +1 -1
  58. package/build-style/style-rtl.css +41 -15
  59. package/build-style/style.css +41 -15
  60. package/build-types/bindings/api.d.ts.map +1 -1
  61. package/build-types/bindings/pattern-overrides.d.ts +6 -6
  62. package/build-types/bindings/pattern-overrides.d.ts.map +1 -1
  63. package/build-types/bindings/post-data.d.ts +24 -0
  64. package/build-types/bindings/post-data.d.ts.map +1 -0
  65. package/build-types/bindings/post-meta.d.ts +7 -7
  66. package/build-types/bindings/post-meta.d.ts.map +1 -1
  67. package/build-types/components/keyboard-shortcut-help-modal/config.d.ts +11 -11
  68. package/build-types/components/media-categories/index.d.ts.map +1 -1
  69. package/build-types/components/post-actions/set-as-homepage.d.ts +1 -1
  70. package/build-types/components/post-actions/set-as-posts-page.d.ts +1 -1
  71. package/build-types/components/post-format/index.d.ts +10 -10
  72. package/build-types/components/post-status/index.d.ts +10 -10
  73. package/build-types/components/post-visibility/utils.d.ts +6 -6
  74. package/build-types/components/provider/use-block-editor-settings.d.ts.map +1 -1
  75. package/build-types/store/actions.d.ts.map +1 -1
  76. package/build-types/store/selectors.d.ts +6 -2
  77. package/build-types/store/selectors.d.ts.map +1 -1
  78. package/build-types/utils/pageTypeBadge.d.ts +1 -1
  79. package/build-types/utils/pageTypeBadge.d.ts.map +1 -1
  80. package/package.json +37 -37
  81. package/src/bindings/api.js +2 -0
  82. package/src/bindings/pattern-overrides.js +3 -0
  83. package/src/bindings/post-data.js +128 -0
  84. package/src/bindings/post-meta.js +3 -0
  85. package/src/components/collapsible-block-toolbar/style.scss +4 -3
  86. package/src/components/error-boundary/style.scss +1 -1
  87. package/src/components/header/style.scss +1 -0
  88. package/src/components/media-categories/index.js +8 -4
  89. package/src/components/post-card-panel/index.js +3 -3
  90. package/src/components/post-featured-image/index.js +7 -3
  91. package/src/components/post-publish-panel/style.scss +1 -0
  92. package/src/components/post-taxonomies/flat-term-selector.js +1 -1
  93. package/src/components/post-taxonomies/hierarchical-term-selector.js +4 -4
  94. package/src/components/post-taxonomies/test/index.js +6 -6
  95. package/src/components/provider/index.native.js +5 -1
  96. package/src/components/provider/use-block-editor-settings.js +8 -3
  97. package/src/components/sidebar/style.scss +4 -0
  98. package/src/components/text-editor/style.scss +1 -0
  99. package/src/store/actions.js +0 -15
  100. package/src/store/selectors.js +12 -3
  101. package/src/store/test/selectors.js +30 -0
  102. package/src/utils/media-upload/index.js +2 -2
  103. package/tsconfig.tsbuildinfo +1 -1
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_data","_coreData","_i18n","_preferences","_compose","_blocks","_blockEditor","_mediaCategories","_interopRequireDefault","_utils","_mediaSideload","_store","_lockUnlock","_globalStylesProvider","EMPTY_OBJECT","__experimentalReusableBlocksSelect","select","RECEIVE_INTERMEDIATE_RESULTS","unlock","coreDataPrivateApis","getEntityRecords","coreStore","per_page","BLOCK_EDITOR_SETTINGS","globalStylesDataKey","globalStylesLinksDataKey","selectBlockPatternsKey","reusableBlocksSelectKey","sectionRootClientIdKey","privateApis","useBlockEditorSettings","settings","postType","postId","renderingMode","_mergedGlobalStyles$s","_mergedGlobalStyles$_","_settings$__experimen","_settings$__experimen2","isLargeViewport","useViewportMatch","allowRightClickOverrides","blockTypes","focusMode","hasFixedToolbar","isDistractionFree","keepCaretInsideBlock","hasUploadPermissions","hiddenBlockTypes","canUseUnfilteredHTML","userCanCreatePages","pageOnFront","pageForPosts","userPatternCategories","restBlockPatternCategories","sectionRootClientId","useSelect","_canUser","canUser","getRawEntityRecord","getEntityRecord","getUserPatternCategories","getBlockPatternCategories","get","preferencesStore","getBlockTypes","blocksStore","getBlocksByName","getBlockAttributes","blockEditorStore","siteSettings","kind","name","undefined","getSectionRootBlock","_getBlocksByName$find","_getBlocksByName$","find","clientId","tagName","_links","hasOwnProperty","page_on_front","page_for_posts","merged","mergedGlobalStyles","useGlobalStylesContext","globalStylesData","styles","globalStylesLinksData","settingsBlockPatterns","__experimentalAdditionalBlockPatterns","__experimentalBlockPatterns","settingsBlockPatternCategories","__experimentalAdditionalBlockPatternCategories","__experimentalBlockPatternCategories","blockPatterns","useMemo","filter","postTypes","Array","isArray","includes","blockPatternCategories","x","index","arr","findIndex","y","undo","setIsInserterOpened","useDispatch","editorStore","saveEntityRecord","createPageEntity","useCallback","options","Promise","reject","message","__","allowedBlockTypes","length","defaultAllowedBlockTypes","map","type","forceDisableFocusMode","blockEditorSettings","Object","fromEntries","entries","key","mediaUpload","mediaSideload","hasFinishedResolution","getBlockPatternsForPostType","patterns","__experimentalUserPatternCategories","__experimentalFetchLinkSuggestions","search","searchOptions","fetchLinkSuggestions","inserterMediaCategories","__experimentalFetchRichUrlData","fetchUrlData","__experimentalCanUserUseUnfilteredHTML","__experimentalUndo","outlineMode","__experimentalCreatePageEntity","__experimentalUserCanCreatePages","__experimentalPreferPatternsOnRoot","templateLock","template","__experimentalSetIsInserterOpened","editorTool","_default","exports","default"],"sources":["@wordpress/editor/src/components/provider/use-block-editor-settings.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo, useCallback } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport {\n\tstore as coreStore,\n\t__experimentalFetchLinkSuggestions as fetchLinkSuggestions,\n\t__experimentalFetchUrlData as fetchUrlData,\n\tprivateApis as coreDataPrivateApis,\n} from '@wordpress/core-data';\nimport { __ } from '@wordpress/i18n';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { store as blocksStore } from '@wordpress/blocks';\nimport {\n\tprivateApis,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport inserterMediaCategories from '../media-categories';\nimport { mediaUpload } from '../../utils';\nimport { default as mediaSideload } from '../../utils/media-sideload';\nimport { store as editorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport { useGlobalStylesContext } from '../global-styles-provider';\n\nconst EMPTY_OBJECT = {};\n\nfunction __experimentalReusableBlocksSelect( select ) {\n\tconst { RECEIVE_INTERMEDIATE_RESULTS } = unlock( coreDataPrivateApis );\n\tconst { getEntityRecords } = select( coreStore );\n\treturn getEntityRecords( 'postType', 'wp_block', {\n\t\tper_page: -1,\n\t\t[ RECEIVE_INTERMEDIATE_RESULTS ]: true,\n\t} );\n}\n\nconst BLOCK_EDITOR_SETTINGS = [\n\t'__experimentalBlockDirectory',\n\t'__experimentalDiscussionSettings',\n\t'__experimentalFeatures',\n\t'__experimentalGlobalStylesBaseStyles',\n\t'alignWide',\n\t'blockInspectorTabs',\n\t'maxUploadFileSize',\n\t'allowedMimeTypes',\n\t'bodyPlaceholder',\n\t'canLockBlocks',\n\t'canUpdateBlockBindings',\n\t'capabilities',\n\t'clearBlockSelection',\n\t'codeEditingEnabled',\n\t'colors',\n\t'disableCustomColors',\n\t'disableCustomFontSizes',\n\t'disableCustomSpacingSizes',\n\t'disableCustomGradients',\n\t'disableLayoutStyles',\n\t'enableCustomLineHeight',\n\t'enableCustomSpacing',\n\t'enableCustomUnits',\n\t'enableOpenverseMediaCategory',\n\t'fontSizes',\n\t'gradients',\n\t'generateAnchors',\n\t'onNavigateToEntityRecord',\n\t'imageDefaultSize',\n\t'imageDimensions',\n\t'imageEditing',\n\t'imageSizes',\n\t'isPreviewMode',\n\t'isRTL',\n\t'locale',\n\t'maxWidth',\n\t'postContentAttributes',\n\t'postsPerPage',\n\t'readOnly',\n\t'styles',\n\t'titlePlaceholder',\n\t'supportsLayout',\n\t'widgetTypesToHideFromLegacyWidgetBlock',\n\t'__unstableHasCustomAppender',\n\t'__unstableResolvedAssets',\n\t'__unstableIsBlockBasedTheme',\n];\n\nconst {\n\tglobalStylesDataKey,\n\tglobalStylesLinksDataKey,\n\tselectBlockPatternsKey,\n\treusableBlocksSelectKey,\n\tsectionRootClientIdKey,\n} = unlock( privateApis );\n\n/**\n * React hook used to compute the block editor settings to use for the post editor.\n *\n * @param {Object} settings EditorProvider settings prop.\n * @param {string} postType Editor root level post type.\n * @param {string} postId Editor root level post ID.\n * @param {string} renderingMode Editor rendering mode.\n *\n * @return {Object} Block Editor Settings.\n */\nfunction useBlockEditorSettings( settings, postType, postId, renderingMode ) {\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tconst {\n\t\tallowRightClickOverrides,\n\t\tblockTypes,\n\t\tfocusMode,\n\t\thasFixedToolbar,\n\t\tisDistractionFree,\n\t\tkeepCaretInsideBlock,\n\t\thasUploadPermissions,\n\t\thiddenBlockTypes,\n\t\tcanUseUnfilteredHTML,\n\t\tuserCanCreatePages,\n\t\tpageOnFront,\n\t\tpageForPosts,\n\t\tuserPatternCategories,\n\t\trestBlockPatternCategories,\n\t\tsectionRootClientId,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tcanUser,\n\t\t\t\tgetRawEntityRecord,\n\t\t\t\tgetEntityRecord,\n\t\t\t\tgetUserPatternCategories,\n\t\t\t\tgetBlockPatternCategories,\n\t\t\t} = select( coreStore );\n\t\t\tconst { get } = select( preferencesStore );\n\t\t\tconst { getBlockTypes } = select( blocksStore );\n\t\t\tconst { getBlocksByName, getBlockAttributes } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst siteSettings = canUser( 'read', {\n\t\t\t\tkind: 'root',\n\t\t\t\tname: 'site',\n\t\t\t} )\n\t\t\t\t? getEntityRecord( 'root', 'site' )\n\t\t\t\t: undefined;\n\n\t\t\tfunction getSectionRootBlock() {\n\t\t\t\tif ( renderingMode === 'template-locked' ) {\n\t\t\t\t\treturn getBlocksByName( 'core/post-content' )?.[ 0 ] ?? '';\n\t\t\t\t}\n\n\t\t\t\treturn (\n\t\t\t\t\tgetBlocksByName( 'core/group' ).find(\n\t\t\t\t\t\t( clientId ) =>\n\t\t\t\t\t\t\tgetBlockAttributes( clientId )?.tagName === 'main'\n\t\t\t\t\t) ?? ''\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tallowRightClickOverrides: get(\n\t\t\t\t\t'core',\n\t\t\t\t\t'allowRightClickOverrides'\n\t\t\t\t),\n\t\t\t\tblockTypes: getBlockTypes(),\n\t\t\t\tcanUseUnfilteredHTML: getRawEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\tpostType,\n\t\t\t\t\tpostId\n\t\t\t\t)?._links?.hasOwnProperty( 'wp:action-unfiltered-html' ),\n\t\t\t\tfocusMode: get( 'core', 'focusMode' ),\n\t\t\t\thasFixedToolbar:\n\t\t\t\t\tget( 'core', 'fixedToolbar' ) || ! isLargeViewport,\n\t\t\t\thiddenBlockTypes: get( 'core', 'hiddenBlockTypes' ),\n\t\t\t\tisDistractionFree: get( 'core', 'distractionFree' ),\n\t\t\t\tkeepCaretInsideBlock: get( 'core', 'keepCaretInsideBlock' ),\n\t\t\t\thasUploadPermissions:\n\t\t\t\t\tcanUser( 'create', {\n\t\t\t\t\t\tkind: 'root',\n\t\t\t\t\t\tname: 'media',\n\t\t\t\t\t} ) ?? true,\n\t\t\t\tuserCanCreatePages: canUser( 'create', {\n\t\t\t\t\tkind: 'postType',\n\t\t\t\t\tname: 'page',\n\t\t\t\t} ),\n\t\t\t\tpageOnFront: siteSettings?.page_on_front,\n\t\t\t\tpageForPosts: siteSettings?.page_for_posts,\n\t\t\t\tuserPatternCategories: getUserPatternCategories(),\n\t\t\t\trestBlockPatternCategories: getBlockPatternCategories(),\n\t\t\t\tsectionRootClientId: getSectionRootBlock(),\n\t\t\t};\n\t\t},\n\t\t[ postType, postId, isLargeViewport, renderingMode ]\n\t);\n\n\tconst { merged: mergedGlobalStyles } = useGlobalStylesContext();\n\tconst globalStylesData = mergedGlobalStyles.styles ?? EMPTY_OBJECT;\n\tconst globalStylesLinksData = mergedGlobalStyles._links ?? EMPTY_OBJECT;\n\n\tconst settingsBlockPatterns =\n\t\tsettings.__experimentalAdditionalBlockPatterns ?? // WP 6.0\n\t\tsettings.__experimentalBlockPatterns; // WP 5.9\n\tconst settingsBlockPatternCategories =\n\t\tsettings.__experimentalAdditionalBlockPatternCategories ?? // WP 6.0\n\t\tsettings.__experimentalBlockPatternCategories; // WP 5.9\n\n\tconst blockPatterns = useMemo(\n\t\t() =>\n\t\t\t[ ...( settingsBlockPatterns || [] ) ].filter(\n\t\t\t\t( { postTypes } ) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t! postTypes ||\n\t\t\t\t\t\t( Array.isArray( postTypes ) &&\n\t\t\t\t\t\t\tpostTypes.includes( postType ) )\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t),\n\t\t[ settingsBlockPatterns, postType ]\n\t);\n\n\tconst blockPatternCategories = useMemo(\n\t\t() =>\n\t\t\t[\n\t\t\t\t...( settingsBlockPatternCategories || [] ),\n\t\t\t\t...( restBlockPatternCategories || [] ),\n\t\t\t].filter(\n\t\t\t\t( x, index, arr ) =>\n\t\t\t\t\tindex === arr.findIndex( ( y ) => x.name === y.name )\n\t\t\t),\n\t\t[ settingsBlockPatternCategories, restBlockPatternCategories ]\n\t);\n\n\tconst { undo, setIsInserterOpened } = useDispatch( editorStore );\n\n\tconst { saveEntityRecord } = useDispatch( coreStore );\n\n\t/**\n\t * Creates a Post entity.\n\t * This is utilised by the Link UI to allow for on-the-fly creation of Posts/Pages.\n\t *\n\t * @param {Object} options parameters for the post being created. These mirror those used on 3rd param of saveEntityRecord.\n\t * @return {Object} the post type object that was created.\n\t */\n\tconst createPageEntity = useCallback(\n\t\t( options ) => {\n\t\t\tif ( ! userCanCreatePages ) {\n\t\t\t\treturn Promise.reject( {\n\t\t\t\t\tmessage: __(\n\t\t\t\t\t\t'You do not have permission to create Pages.'\n\t\t\t\t\t),\n\t\t\t\t} );\n\t\t\t}\n\t\t\treturn saveEntityRecord( 'postType', 'page', options );\n\t\t},\n\t\t[ saveEntityRecord, userCanCreatePages ]\n\t);\n\n\tconst allowedBlockTypes = useMemo( () => {\n\t\t// Omit hidden block types if exists and non-empty.\n\t\tif ( hiddenBlockTypes && hiddenBlockTypes.length > 0 ) {\n\t\t\t// Defer to passed setting for `allowedBlockTypes` if provided as\n\t\t\t// anything other than `true` (where `true` is equivalent to allow\n\t\t\t// all block types).\n\t\t\tconst defaultAllowedBlockTypes =\n\t\t\t\ttrue === settings.allowedBlockTypes\n\t\t\t\t\t? blockTypes.map( ( { name } ) => name )\n\t\t\t\t\t: settings.allowedBlockTypes || [];\n\n\t\t\treturn defaultAllowedBlockTypes.filter(\n\t\t\t\t( type ) => ! hiddenBlockTypes.includes( type )\n\t\t\t);\n\t\t}\n\n\t\treturn settings.allowedBlockTypes;\n\t}, [ settings.allowedBlockTypes, hiddenBlockTypes, blockTypes ] );\n\n\tconst forceDisableFocusMode = settings.focusMode === false;\n\n\treturn useMemo( () => {\n\t\tconst blockEditorSettings = {\n\t\t\t...Object.fromEntries(\n\t\t\t\tObject.entries( settings ).filter( ( [ key ] ) =>\n\t\t\t\t\tBLOCK_EDITOR_SETTINGS.includes( key )\n\t\t\t\t)\n\t\t\t),\n\t\t\t[ globalStylesDataKey ]: globalStylesData,\n\t\t\t[ globalStylesLinksDataKey ]: globalStylesLinksData,\n\t\t\tallowedBlockTypes,\n\t\t\tallowRightClickOverrides,\n\t\t\tfocusMode: focusMode && ! forceDisableFocusMode,\n\t\t\thasFixedToolbar,\n\t\t\tisDistractionFree,\n\t\t\tkeepCaretInsideBlock,\n\t\t\tmediaUpload: hasUploadPermissions ? mediaUpload : undefined,\n\t\t\tmediaSideload: hasUploadPermissions ? mediaSideload : undefined,\n\t\t\t__experimentalBlockPatterns: blockPatterns,\n\t\t\t[ selectBlockPatternsKey ]: ( select ) => {\n\t\t\t\tconst { hasFinishedResolution, getBlockPatternsForPostType } =\n\t\t\t\t\tunlock( select( coreStore ) );\n\t\t\t\tconst patterns = getBlockPatternsForPostType( postType );\n\t\t\t\treturn hasFinishedResolution( 'getBlockPatterns' )\n\t\t\t\t\t? patterns\n\t\t\t\t\t: undefined;\n\t\t\t},\n\t\t\t[ reusableBlocksSelectKey ]: __experimentalReusableBlocksSelect,\n\t\t\t__experimentalBlockPatternCategories: blockPatternCategories,\n\t\t\t__experimentalUserPatternCategories: userPatternCategories,\n\t\t\t__experimentalFetchLinkSuggestions: ( search, searchOptions ) =>\n\t\t\t\tfetchLinkSuggestions( search, searchOptions, settings ),\n\t\t\tinserterMediaCategories,\n\t\t\t__experimentalFetchRichUrlData: fetchUrlData,\n\t\t\t// Todo: This only checks the top level post, not the post within a template or any other entity that can be edited.\n\t\t\t// This might be better as a generic \"canUser\" selector.\n\t\t\t__experimentalCanUserUseUnfilteredHTML: canUseUnfilteredHTML,\n\t\t\t//Todo: this is only needed for native and should probably be removed.\n\t\t\t__experimentalUndo: undo,\n\t\t\t// Check whether we want all site editor frames to have outlines\n\t\t\t// including the navigation / pattern / parts editors.\n\t\t\toutlineMode: ! isDistractionFree && postType === 'wp_template',\n\t\t\t// Check these two properties: they were not present in the site editor.\n\t\t\t__experimentalCreatePageEntity: createPageEntity,\n\t\t\t__experimentalUserCanCreatePages: userCanCreatePages,\n\t\t\tpageOnFront,\n\t\t\tpageForPosts,\n\t\t\t__experimentalPreferPatternsOnRoot: postType === 'wp_template',\n\t\t\ttemplateLock:\n\t\t\t\tpostType === 'wp_navigation' ? 'insert' : settings.templateLock,\n\t\t\ttemplate:\n\t\t\t\tpostType === 'wp_navigation'\n\t\t\t\t\t? [ [ 'core/navigation', {}, [] ] ]\n\t\t\t\t\t: settings.template,\n\t\t\t__experimentalSetIsInserterOpened: setIsInserterOpened,\n\t\t\t[ sectionRootClientIdKey ]: sectionRootClientId,\n\t\t\teditorTool:\n\t\t\t\trenderingMode === 'post-only' && postType !== 'wp_template'\n\t\t\t\t\t? 'edit'\n\t\t\t\t\t: undefined,\n\t\t};\n\n\t\treturn blockEditorSettings;\n\t}, [\n\t\tallowedBlockTypes,\n\t\tallowRightClickOverrides,\n\t\tfocusMode,\n\t\tforceDisableFocusMode,\n\t\thasFixedToolbar,\n\t\tisDistractionFree,\n\t\tkeepCaretInsideBlock,\n\t\tsettings,\n\t\thasUploadPermissions,\n\t\tuserPatternCategories,\n\t\tblockPatterns,\n\t\tblockPatternCategories,\n\t\tcanUseUnfilteredHTML,\n\t\tundo,\n\t\tcreatePageEntity,\n\t\tuserCanCreatePages,\n\t\tpageOnFront,\n\t\tpageForPosts,\n\t\tpostType,\n\t\tsetIsInserterOpened,\n\t\tsectionRootClientId,\n\t\tglobalStylesData,\n\t\tglobalStylesLinksData,\n\t\trenderingMode,\n\t] );\n}\n\nexport default useBlockEditorSettings;\n"],"mappings":";;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AAMA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AACA,IAAAO,YAAA,GAAAP,OAAA;A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tD,oBAAoB,EACpB4D,IAAI,EACJK,gBAAgB,EAChBhE,kBAAkB,EAClBC,WAAW,EACXC,YAAY,EACZpB,QAAQ,EACR8E,mBAAmB,EACnBvD,mBAAmB,EACnBgC,gBAAgB,EAChBE,qBAAqB,EACrBvD,aAAa,CACZ,CAAC;AACJ;AAAC,IAAAyH,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEc/H,sBAAsB","ignoreList":[]}
1
+ {"version":3,"names":["_element","require","_data","_coreData","_i18n","_preferences","_compose","_blocks","_blockEditor","_mediaCategories","_interopRequireDefault","_utils","_mediaSideload","_store","_lockUnlock","_globalStylesProvider","EMPTY_OBJECT","__experimentalReusableBlocksSelect","select","RECEIVE_INTERMEDIATE_RESULTS","unlock","coreDataPrivateApis","getEntityRecords","coreStore","per_page","BLOCK_EDITOR_SETTINGS","globalStylesDataKey","globalStylesLinksDataKey","selectBlockPatternsKey","reusableBlocksSelectKey","sectionRootClientIdKey","mediaEditKey","privateApis","useBlockEditorSettings","settings","postType","postId","renderingMode","_mergedGlobalStyles$s","_mergedGlobalStyles$_","_settings$__experimen","_settings$__experimen2","isLargeViewport","useViewportMatch","allowRightClickOverrides","blockTypes","focusMode","hasFixedToolbar","isDistractionFree","keepCaretInsideBlock","hasUploadPermissions","hiddenBlockTypes","canUseUnfilteredHTML","userCanCreatePages","pageOnFront","pageForPosts","userPatternCategories","restBlockPatternCategories","sectionRootClientId","useSelect","_canUser","canUser","getRawEntityRecord","getEntityRecord","getUserPatternCategories","getBlockPatternCategories","get","preferencesStore","getBlockTypes","blocksStore","getBlocksByName","getBlockAttributes","blockEditorStore","siteSettings","kind","name","undefined","getSectionRootBlock","_getBlocksByName$find","_getBlocksByName$","find","clientId","tagName","_links","hasOwnProperty","page_on_front","page_for_posts","merged","mergedGlobalStyles","useGlobalStylesContext","globalStylesData","styles","globalStylesLinksData","settingsBlockPatterns","__experimentalAdditionalBlockPatterns","__experimentalBlockPatterns","settingsBlockPatternCategories","__experimentalAdditionalBlockPatternCategories","__experimentalBlockPatternCategories","blockPatterns","useMemo","filter","postTypes","Array","isArray","includes","blockPatternCategories","x","index","arr","findIndex","y","undo","setIsInserterOpened","useDispatch","editorStore","editMediaEntity","saveEntityRecord","createPageEntity","useCallback","options","Promise","reject","message","__","allowedBlockTypes","length","defaultAllowedBlockTypes","map","type","forceDisableFocusMode","blockEditorSettings","Object","fromEntries","entries","key","mediaUpload","mediaSideload","hasFinishedResolution","getBlockPatternsForPostType","patterns","__experimentalUserPatternCategories","__experimentalFetchLinkSuggestions","search","searchOptions","fetchLinkSuggestions","inserterMediaCategories","__experimentalFetchRichUrlData","fetchUrlData","__experimentalCanUserUseUnfilteredHTML","__experimentalUndo","outlineMode","__experimentalCreatePageEntity","__experimentalUserCanCreatePages","__experimentalPreferPatternsOnRoot","templateLock","template","__experimentalSetIsInserterOpened","editorTool","_default","exports","default"],"sources":["@wordpress/editor/src/components/provider/use-block-editor-settings.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo, useCallback } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport {\n\tstore as coreStore,\n\t__experimentalFetchLinkSuggestions as fetchLinkSuggestions,\n\t__experimentalFetchUrlData as fetchUrlData,\n\tprivateApis as coreDataPrivateApis,\n} from '@wordpress/core-data';\nimport { __ } from '@wordpress/i18n';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { store as blocksStore } from '@wordpress/blocks';\nimport {\n\tprivateApis,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport inserterMediaCategories from '../media-categories';\nimport { mediaUpload } from '../../utils';\nimport { default as mediaSideload } from '../../utils/media-sideload';\nimport { store as editorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport { useGlobalStylesContext } from '../global-styles-provider';\n\nconst EMPTY_OBJECT = {};\n\nfunction __experimentalReusableBlocksSelect( select ) {\n\tconst { RECEIVE_INTERMEDIATE_RESULTS } = unlock( coreDataPrivateApis );\n\tconst { getEntityRecords } = select( coreStore );\n\treturn getEntityRecords( 'postType', 'wp_block', {\n\t\tper_page: -1,\n\t\t[ RECEIVE_INTERMEDIATE_RESULTS ]: true,\n\t} );\n}\n\nconst BLOCK_EDITOR_SETTINGS = [\n\t'__experimentalBlockDirectory',\n\t'__experimentalDiscussionSettings',\n\t'__experimentalFeatures',\n\t'__experimentalGlobalStylesBaseStyles',\n\t'alignWide',\n\t'blockInspectorTabs',\n\t'maxUploadFileSize',\n\t'allowedMimeTypes',\n\t'bodyPlaceholder',\n\t'canLockBlocks',\n\t'canUpdateBlockBindings',\n\t'capabilities',\n\t'clearBlockSelection',\n\t'codeEditingEnabled',\n\t'colors',\n\t'disableCustomColors',\n\t'disableCustomFontSizes',\n\t'disableCustomSpacingSizes',\n\t'disableCustomGradients',\n\t'disableLayoutStyles',\n\t'enableCustomLineHeight',\n\t'enableCustomSpacing',\n\t'enableCustomUnits',\n\t'enableOpenverseMediaCategory',\n\t'fontSizes',\n\t'gradients',\n\t'generateAnchors',\n\t'onNavigateToEntityRecord',\n\t'imageDefaultSize',\n\t'imageDimensions',\n\t'imageEditing',\n\t'imageSizes',\n\t'isPreviewMode',\n\t'isRTL',\n\t'locale',\n\t'maxWidth',\n\t'postContentAttributes',\n\t'postsPerPage',\n\t'readOnly',\n\t'styles',\n\t'titlePlaceholder',\n\t'supportsLayout',\n\t'widgetTypesToHideFromLegacyWidgetBlock',\n\t'__unstableHasCustomAppender',\n\t'__unstableResolvedAssets',\n\t'__unstableIsBlockBasedTheme',\n];\n\nconst {\n\tglobalStylesDataKey,\n\tglobalStylesLinksDataKey,\n\tselectBlockPatternsKey,\n\treusableBlocksSelectKey,\n\tsectionRootClientIdKey,\n\tmediaEditKey,\n} = unlock( privateApis );\n\n/**\n * React hook used to compute the block editor settings to use for the post editor.\n *\n * @param {Object} settings EditorProvider settings prop.\n * @param {string} postType Editor root level post type.\n * @param {string} postId Editor root level post ID.\n * @param {string} renderingMode Editor rendering mode.\n *\n * @return {Object} Block Editor Settings.\n */\nfunction useBlockEditorSettings( settings, postType, postId, renderingMode ) {\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tconst {\n\t\tallowRightClickOverrides,\n\t\tblockTypes,\n\t\tfocusMode,\n\t\thasFixedToolbar,\n\t\tisDistractionFree,\n\t\tkeepCaretInsideBlock,\n\t\thasUploadPermissions,\n\t\thiddenBlockTypes,\n\t\tcanUseUnfilteredHTML,\n\t\tuserCanCreatePages,\n\t\tpageOnFront,\n\t\tpageForPosts,\n\t\tuserPatternCategories,\n\t\trestBlockPatternCategories,\n\t\tsectionRootClientId,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tcanUser,\n\t\t\t\tgetRawEntityRecord,\n\t\t\t\tgetEntityRecord,\n\t\t\t\tgetUserPatternCategories,\n\t\t\t\tgetBlockPatternCategories,\n\t\t\t} = select( coreStore );\n\t\t\tconst { get } = select( preferencesStore );\n\t\t\tconst { getBlockTypes } = select( blocksStore );\n\t\t\tconst { getBlocksByName, getBlockAttributes } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst siteSettings = canUser( 'read', {\n\t\t\t\tkind: 'root',\n\t\t\t\tname: 'site',\n\t\t\t} )\n\t\t\t\t? getEntityRecord( 'root', 'site' )\n\t\t\t\t: undefined;\n\n\t\t\tfunction getSectionRootBlock() {\n\t\t\t\tif ( renderingMode === 'template-locked' ) {\n\t\t\t\t\treturn getBlocksByName( 'core/post-content' )?.[ 0 ] ?? '';\n\t\t\t\t}\n\n\t\t\t\treturn (\n\t\t\t\t\tgetBlocksByName( 'core/group' ).find(\n\t\t\t\t\t\t( clientId ) =>\n\t\t\t\t\t\t\tgetBlockAttributes( clientId )?.tagName === 'main'\n\t\t\t\t\t) ?? ''\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tallowRightClickOverrides: get(\n\t\t\t\t\t'core',\n\t\t\t\t\t'allowRightClickOverrides'\n\t\t\t\t),\n\t\t\t\tblockTypes: getBlockTypes(),\n\t\t\t\tcanUseUnfilteredHTML: getRawEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\tpostType,\n\t\t\t\t\tpostId\n\t\t\t\t)?._links?.hasOwnProperty( 'wp:action-unfiltered-html' ),\n\t\t\t\tfocusMode: get( 'core', 'focusMode' ),\n\t\t\t\thasFixedToolbar:\n\t\t\t\t\tget( 'core', 'fixedToolbar' ) || ! isLargeViewport,\n\t\t\t\thiddenBlockTypes: get( 'core', 'hiddenBlockTypes' ),\n\t\t\t\tisDistractionFree: get( 'core', 'distractionFree' ),\n\t\t\t\tkeepCaretInsideBlock: get( 'core', 'keepCaretInsideBlock' ),\n\t\t\t\thasUploadPermissions:\n\t\t\t\t\tcanUser( 'create', {\n\t\t\t\t\t\tkind: 'postType',\n\t\t\t\t\t\tname: 'attachment',\n\t\t\t\t\t} ) ?? true,\n\t\t\t\tuserCanCreatePages: canUser( 'create', {\n\t\t\t\t\tkind: 'postType',\n\t\t\t\t\tname: 'page',\n\t\t\t\t} ),\n\t\t\t\tpageOnFront: siteSettings?.page_on_front,\n\t\t\t\tpageForPosts: siteSettings?.page_for_posts,\n\t\t\t\tuserPatternCategories: getUserPatternCategories(),\n\t\t\t\trestBlockPatternCategories: getBlockPatternCategories(),\n\t\t\t\tsectionRootClientId: getSectionRootBlock(),\n\t\t\t};\n\t\t},\n\t\t[ postType, postId, isLargeViewport, renderingMode ]\n\t);\n\n\tconst { merged: mergedGlobalStyles } = useGlobalStylesContext();\n\tconst globalStylesData = mergedGlobalStyles.styles ?? EMPTY_OBJECT;\n\tconst globalStylesLinksData = mergedGlobalStyles._links ?? EMPTY_OBJECT;\n\n\tconst settingsBlockPatterns =\n\t\tsettings.__experimentalAdditionalBlockPatterns ?? // WP 6.0\n\t\tsettings.__experimentalBlockPatterns; // WP 5.9\n\tconst settingsBlockPatternCategories =\n\t\tsettings.__experimentalAdditionalBlockPatternCategories ?? // WP 6.0\n\t\tsettings.__experimentalBlockPatternCategories; // WP 5.9\n\n\tconst blockPatterns = useMemo(\n\t\t() =>\n\t\t\t[ ...( settingsBlockPatterns || [] ) ].filter(\n\t\t\t\t( { postTypes } ) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t! postTypes ||\n\t\t\t\t\t\t( Array.isArray( postTypes ) &&\n\t\t\t\t\t\t\tpostTypes.includes( postType ) )\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t),\n\t\t[ settingsBlockPatterns, postType ]\n\t);\n\n\tconst blockPatternCategories = useMemo(\n\t\t() =>\n\t\t\t[\n\t\t\t\t...( settingsBlockPatternCategories || [] ),\n\t\t\t\t...( restBlockPatternCategories || [] ),\n\t\t\t].filter(\n\t\t\t\t( x, index, arr ) =>\n\t\t\t\t\tindex === arr.findIndex( ( y ) => x.name === y.name )\n\t\t\t),\n\t\t[ settingsBlockPatternCategories, restBlockPatternCategories ]\n\t);\n\n\tconst { undo, setIsInserterOpened } = useDispatch( editorStore );\n\tconst { editMediaEntity } = unlock( useDispatch( coreStore ) );\n\tconst { saveEntityRecord } = useDispatch( coreStore );\n\n\t/**\n\t * Creates a Post entity.\n\t * This is utilised by the Link UI to allow for on-the-fly creation of Posts/Pages.\n\t *\n\t * @param {Object} options parameters for the post being created. These mirror those used on 3rd param of saveEntityRecord.\n\t * @return {Object} the post type object that was created.\n\t */\n\tconst createPageEntity = useCallback(\n\t\t( options ) => {\n\t\t\tif ( ! userCanCreatePages ) {\n\t\t\t\treturn Promise.reject( {\n\t\t\t\t\tmessage: __(\n\t\t\t\t\t\t'You do not have permission to create Pages.'\n\t\t\t\t\t),\n\t\t\t\t} );\n\t\t\t}\n\t\t\treturn saveEntityRecord( 'postType', 'page', options );\n\t\t},\n\t\t[ saveEntityRecord, userCanCreatePages ]\n\t);\n\n\tconst allowedBlockTypes = useMemo( () => {\n\t\t// Omit hidden block types if exists and non-empty.\n\t\tif ( hiddenBlockTypes && hiddenBlockTypes.length > 0 ) {\n\t\t\t// Defer to passed setting for `allowedBlockTypes` if provided as\n\t\t\t// anything other than `true` (where `true` is equivalent to allow\n\t\t\t// all block types).\n\t\t\tconst defaultAllowedBlockTypes =\n\t\t\t\ttrue === settings.allowedBlockTypes\n\t\t\t\t\t? blockTypes.map( ( { name } ) => name )\n\t\t\t\t\t: settings.allowedBlockTypes || [];\n\n\t\t\treturn defaultAllowedBlockTypes.filter(\n\t\t\t\t( type ) => ! hiddenBlockTypes.includes( type )\n\t\t\t);\n\t\t}\n\n\t\treturn settings.allowedBlockTypes;\n\t}, [ settings.allowedBlockTypes, hiddenBlockTypes, blockTypes ] );\n\n\tconst forceDisableFocusMode = settings.focusMode === false;\n\n\treturn useMemo( () => {\n\t\tconst blockEditorSettings = {\n\t\t\t...Object.fromEntries(\n\t\t\t\tObject.entries( settings ).filter( ( [ key ] ) =>\n\t\t\t\t\tBLOCK_EDITOR_SETTINGS.includes( key )\n\t\t\t\t)\n\t\t\t),\n\t\t\t[ globalStylesDataKey ]: globalStylesData,\n\t\t\t[ globalStylesLinksDataKey ]: globalStylesLinksData,\n\t\t\tallowedBlockTypes,\n\t\t\tallowRightClickOverrides,\n\t\t\tfocusMode: focusMode && ! forceDisableFocusMode,\n\t\t\thasFixedToolbar,\n\t\t\tisDistractionFree,\n\t\t\tkeepCaretInsideBlock,\n\t\t\t[ mediaEditKey ]: hasUploadPermissions\n\t\t\t\t? editMediaEntity\n\t\t\t\t: undefined,\n\t\t\tmediaUpload: hasUploadPermissions ? mediaUpload : undefined,\n\t\t\tmediaSideload: hasUploadPermissions ? mediaSideload : undefined,\n\t\t\t__experimentalBlockPatterns: blockPatterns,\n\t\t\t[ selectBlockPatternsKey ]: ( select ) => {\n\t\t\t\tconst { hasFinishedResolution, getBlockPatternsForPostType } =\n\t\t\t\t\tunlock( select( coreStore ) );\n\t\t\t\tconst patterns = getBlockPatternsForPostType( postType );\n\t\t\t\treturn hasFinishedResolution( 'getBlockPatterns' )\n\t\t\t\t\t? patterns\n\t\t\t\t\t: undefined;\n\t\t\t},\n\t\t\t[ reusableBlocksSelectKey ]: __experimentalReusableBlocksSelect,\n\t\t\t__experimentalBlockPatternCategories: blockPatternCategories,\n\t\t\t__experimentalUserPatternCategories: userPatternCategories,\n\t\t\t__experimentalFetchLinkSuggestions: ( search, searchOptions ) =>\n\t\t\t\tfetchLinkSuggestions( search, searchOptions, settings ),\n\t\t\tinserterMediaCategories,\n\t\t\t__experimentalFetchRichUrlData: fetchUrlData,\n\t\t\t// Todo: This only checks the top level post, not the post within a template or any other entity that can be edited.\n\t\t\t// This might be better as a generic \"canUser\" selector.\n\t\t\t__experimentalCanUserUseUnfilteredHTML: canUseUnfilteredHTML,\n\t\t\t//Todo: this is only needed for native and should probably be removed.\n\t\t\t__experimentalUndo: undo,\n\t\t\t// Check whether we want all site editor frames to have outlines\n\t\t\t// including the navigation / pattern / parts editors.\n\t\t\toutlineMode: ! isDistractionFree && postType === 'wp_template',\n\t\t\t// Check these two properties: they were not present in the site editor.\n\t\t\t__experimentalCreatePageEntity: createPageEntity,\n\t\t\t__experimentalUserCanCreatePages: userCanCreatePages,\n\t\t\tpageOnFront,\n\t\t\tpageForPosts,\n\t\t\t__experimentalPreferPatternsOnRoot: postType === 'wp_template',\n\t\t\ttemplateLock:\n\t\t\t\tpostType === 'wp_navigation' ? 'insert' : settings.templateLock,\n\t\t\ttemplate:\n\t\t\t\tpostType === 'wp_navigation'\n\t\t\t\t\t? [ [ 'core/navigation', {}, [] ] ]\n\t\t\t\t\t: settings.template,\n\t\t\t__experimentalSetIsInserterOpened: setIsInserterOpened,\n\t\t\t[ sectionRootClientIdKey ]: sectionRootClientId,\n\t\t\teditorTool:\n\t\t\t\trenderingMode === 'post-only' && postType !== 'wp_template'\n\t\t\t\t\t? 'edit'\n\t\t\t\t\t: undefined,\n\t\t};\n\n\t\treturn blockEditorSettings;\n\t}, [\n\t\tallowedBlockTypes,\n\t\tallowRightClickOverrides,\n\t\tfocusMode,\n\t\tforceDisableFocusMode,\n\t\thasFixedToolbar,\n\t\tisDistractionFree,\n\t\tkeepCaretInsideBlock,\n\t\tsettings,\n\t\thasUploadPermissions,\n\t\tuserPatternCategories,\n\t\tblockPatterns,\n\t\tblockPatternCategories,\n\t\tcanUseUnfilteredHTML,\n\t\tundo,\n\t\tcreatePageEntity,\n\t\tuserCanCreatePages,\n\t\tpageOnFront,\n\t\tpageForPosts,\n\t\tpostType,\n\t\tsetIsInserterOpened,\n\t\tsectionRootClientId,\n\t\tglobalStylesData,\n\t\tglobalStylesLinksData,\n\t\trenderingMode,\n\t\teditMediaEntity,\n\t] );\n}\n\nexport default useBlockEditorSettings;\n"],"mappings":";;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AAMA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AACA,IAAAO,YAAA,GAAAP,OAAA;AAQA,IAAAQ,gBAAA,GAAAC,sBAAA,CAAAT,OAAA;AACA,IAAAU,MAAA,GAAAV,OAAA;AACA,IAAAW,cAAA,GAAAF,sBAAA,CAAAT,OAAA;AACA,IAAAY,MAAA,GAAAZ,OAAA;AACA,IAAAa,WAAA,GAAAb,OAAA;AACA,IAAAc,qBAAA,GAAAd,OAAA;AA5BA;AACA;AACA;;AAkBA;AACA;AACA;;AAQA,MAAMe,YAAY,GAAG,CAAC,CAAC;AAEvB,SAASC,kCAAkCA,CAAEC,MAAM,EAAG;EACrD,MAAM;IAAEC;EAA6B,CAAC,GAAG,IAAAC,kBAAM,EAAEC,qBAAoB,CAAC;EACtE,MAAM;IAAEC;EAAiB,CAAC,GAAGJ,MAAM,CAAEK,eAAU,CAAC;EAChD,OAAOD,gBAAgB,CAAE,UAAU,EAAE,UAAU,EAAE;IAChDE,QAAQ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BAAoB;MAC5D;MACAkG,kBAAkB,EAAEtC,IAAI;MACxB;MACA;MACAuC,WAAW,EAAE,CAAEvG,iBAAiB,IAAIb,QAAQ,KAAK,aAAa;MAC9D;MACAqH,8BAA8B,EAAElC,gBAAgB;MAChDmC,gCAAgC,EAAEpG,kBAAkB;MACpDC,WAAW;MACXC,YAAY;MACZmG,kCAAkC,EAAEvH,QAAQ,KAAK,aAAa;MAC9DwH,YAAY,EACXxH,QAAQ,KAAK,eAAe,GAAG,QAAQ,GAAGD,QAAQ,CAACyH,YAAY;MAChEC,QAAQ,EACPzH,QAAQ,KAAK,eAAe,GACzB,CAAE,CAAE,iBAAiB,EAAE,CAAC,CAAC,EAAE,EAAE,CAAE,CAAE,GACjCD,QAAQ,CAAC0H,QAAQ;MACrBC,iCAAiC,EAAE5C,mBAAmB;MACtD,CAAEnF,sBAAsB,GAAI4B,mBAAmB;MAC/CoG,UAAU,EACTzH,aAAa,KAAK,WAAW,IAAIF,QAAQ,KAAK,aAAa,GACxD,MAAM,GACNyC;IACL,CAAC;IAED,OAAOuD,mBAAmB;EAC3B,CAAC,EAAE,CACFN,iBAAiB,EACjBjF,wBAAwB,EACxBE,SAAS,EACToF,qBAAqB,EACrBnF,eAAe,EACfC,iBAAiB,EACjBC,oBAAoB,EACpBf,QAAQ,EACRgB,oBAAoB,EACpBM,qBAAqB,EACrB2C,aAAa,EACbO,sBAAsB,EACtBtD,oBAAoB,EACpB4D,IAAI,EACJM,gBAAgB,EAChBjE,kBAAkB,EAClBC,WAAW,EACXC,YAAY,EACZpB,QAAQ,EACR8E,mBAAmB,EACnBvD,mBAAmB,EACnBgC,gBAAgB,EAChBE,qBAAqB,EACrBvD,aAAa,EACb+E,eAAe,CACd,CAAC;AACJ;AAAC,IAAA2C,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEchI,sBAAsB","ignoreList":[]}
@@ -190,21 +190,6 @@ function setEditedPost(postType, postId) {
190
190
  * wp.data.dispatch( 'core/editor' ).editPost( { title: `${ newTitle }` } );
191
191
  * ```
192
192
  *
193
- * @example
194
- *```js
195
- * // Get specific media size based on the featured media ID
196
- * // Note: change sizes?.large for any registered size
197
- * const getFeaturedMediaUrl = useSelect( ( select ) => {
198
- * const getFeaturedMediaId =
199
- * select( 'core/editor' ).getEditedPostAttribute( 'featured_media' );
200
- * const getMedia = select( 'core' ).getMedia( getFeaturedMediaId );
201
- *
202
- * return (
203
- * getMedia?.media_details?.sizes?.large?.source_url || getMedia?.source_url || ''
204
- * );
205
- * }, [] );
206
- * ```
207
- *
208
193
  * @return {Object} Action object
209
194
  */
210
195
  const editPost = (edits, options) => ({
@@ -1 +1 @@
1
- {"version":3,"names":["_a11y","require","_apiFetch","_interopRequireDefault","_deprecated","_blocks","_notices","_coreData","_blockEditor","_hooks","_preferences","_i18n","_localAutosave","_noticeBuilder","_lockUnlock","setupEditor","post","edits","template","dispatch","setEditedPost","type","id","isNewPost","status","content","raw","blocks","parse","synchronizeBlocksWithTemplate","resetEditorBlocks","__unstableShouldCreateUndoLevel","Object","values","some","key","edit","_post$key$raw","editPost","exports","__experimentalTearDownEditor","deprecated","since","resetPost","version","alternative","updatePost","setupEditorState","postType","postId","options","select","registry","getCurrentPost","coreStore","editEntityRecord","savePost","isEditedPostSaveable","getEditedPostContent","isAutosave","undoIgnore","previousRecord","getEntityRecordNonTransientEdits","error","applyFiltersAsync","err","saveEntityRecord","message","code","__","getLastEntitySaveError","applyFilters","Promise","resolve","doActionAsync","args","getNotificationArgumentsForSaveFail","length","noticesStore","createErrorNotice","updatedRecord","getNotificationArgumentsForSaveSuccess","previousPost","resolveSelect","getPostType","createSuccessNotice","blockEditorStore","__unstableMarkLastChangeAsPersistent","refreshPost","trashPost","postTypeSlug","getCurrentPostType","rest_base","restBase","rest_namespace","restNamespace","apiFetch","path","method","getNotificationArgumentsForTrashFail","autosave","local","isPostNew","isEditedPostNew","title","getEditedPostAttribute","excerpt","localAutosaveSet","__unstableSaveForPreview","forceIsAutosaveable","isEditedPostAutosaveable","isPostLocked","isDraft","includes","isPreview","getEditedPostPreviewLink","redo","undo","createUndoLevel","updatePostLock","lock","enablePublishSidebar","preferencesStore","set","disablePublishSidebar","lockPostSaving","lockName","unlockPostSaving","lockPostAutosaving","unlockPostAutosaving","selection","noChange","getEditedEntityRecord","__unstableCreateUndoLevel","blocksForSerialization","__unstableSerializeAndClean","updateEditorSettings","settings","setRenderingMode","mode","__unstableIsEditorReady","clearSelectedBlock","undefined","setDeviceType","deviceType","toggleEditorPanelEnabled","panelName","_registry$select$get","inactivePanels","get","isPanelInactive","updatedInactivePanels","filter","invactivePanelName","toggleEditorPanelOpened","_registry$select$get2","openPanels","isPanelOpen","updatedOpenPanels","openPanelName","removeEditorPanel","setIsInserterOpened","value","hasOwnProperty","unlock","setInsertionPoint","rootClientId","index","insertionIndex","setIsListViewOpened","isOpen","toggleDistractionFree","createNotice","isDistractionFree","batch","resetZoomLevel","createInfoNotice","actions","label","onClick","toggle","toggleSpotlightMode","isFocusMode","toggleTopToolbar","isTopToolbar","switchEditorMode","speak","openPublishSidebar","closePublishSidebar","togglePublishSidebar","getBlockEditorAction","name","resetBlocks","receiveBlocks","updateBlock","updateBlockAttributes","selectBlock","startMultiSelect","stopMultiSelect","multiSelect","toggleSelection","replaceBlocks","replaceBlock","moveBlocksDown","moveBlocksUp","moveBlockToPosition","insertBlock","insertBlocks","showInsertionPoint","hideInsertionPoint","setTemplateValidity","synchronizeTemplate","mergeBlocks","removeBlocks","removeBlock","toggleBlockMode","startTyping","stopTyping","enterFormattedText","exitFormattedText","insertDefaultBlock","updateBlockListSettings"],"sources":["@wordpress/editor/src/store/actions.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { speak } from '@wordpress/a11y';\nimport apiFetch from '@wordpress/api-fetch';\nimport deprecated from '@wordpress/deprecated';\nimport {\n\tparse,\n\tsynchronizeBlocksWithTemplate,\n\t__unstableSerializeAndClean,\n} from '@wordpress/blocks';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport {\n\tapplyFilters,\n\tapplyFiltersAsync,\n\tdoActionAsync,\n} from '@wordpress/hooks';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { localAutosaveSet } from './local-autosave';\nimport {\n\tgetNotificationArgumentsForSaveSuccess,\n\tgetNotificationArgumentsForSaveFail,\n\tgetNotificationArgumentsForTrashFail,\n} from './utils/notice-builder';\nimport { unlock } from '../lock-unlock';\n/**\n * Returns an action generator used in signalling that editor has initialized with\n * the specified post object and editor settings.\n *\n * @param {Object} post Post object.\n * @param {Object} edits Initial edited attributes object.\n * @param {Array} [template] Block Template.\n */\nexport const setupEditor =\n\t( post, edits, template ) =>\n\t( { dispatch } ) => {\n\t\tdispatch.setEditedPost( post.type, post.id );\n\t\t// Apply a template for new posts only, if exists.\n\t\tconst isNewPost = post.status === 'auto-draft';\n\t\tif ( isNewPost && template ) {\n\t\t\t// In order to ensure maximum of a single parse during setup, edits are\n\t\t\t// included as part of editor setup action. Assume edited content as\n\t\t\t// canonical if provided, falling back to post.\n\t\t\tlet content;\n\t\t\tif ( 'content' in edits ) {\n\t\t\t\tcontent = edits.content;\n\t\t\t} else {\n\t\t\t\tcontent = post.content.raw;\n\t\t\t}\n\t\t\tlet blocks = parse( content );\n\t\t\tblocks = synchronizeBlocksWithTemplate( blocks, template );\n\t\t\tdispatch.resetEditorBlocks( blocks, {\n\t\t\t\t__unstableShouldCreateUndoLevel: false,\n\t\t\t} );\n\t\t}\n\t\tif (\n\t\t\tedits &&\n\t\t\tObject.values( edits ).some(\n\t\t\t\t( [ key, edit ] ) =>\n\t\t\t\t\tedit !== ( post[ key ]?.raw ?? post[ key ] )\n\t\t\t)\n\t\t) {\n\t\t\tdispatch.editPost( edits );\n\t\t}\n\t};\n\n/**\n * Returns an action object signalling that the editor is being destroyed and\n * that any necessary state or side-effect cleanup should occur.\n *\n * @deprecated\n *\n * @return {Object} Action object.\n */\nexport function __experimentalTearDownEditor() {\n\tdeprecated(\n\t\t\"wp.data.dispatch( 'core/editor' ).__experimentalTearDownEditor\",\n\t\t{\n\t\t\tsince: '6.5',\n\t\t}\n\t);\n\treturn { type: 'DO_NOTHING' };\n}\n\n/**\n * Returns an action object used in signalling that the latest version of the\n * post has been received, either by initialization or save.\n *\n * @deprecated Since WordPress 6.0.\n */\nexport function resetPost() {\n\tdeprecated( \"wp.data.dispatch( 'core/editor' ).resetPost\", {\n\t\tsince: '6.0',\n\t\tversion: '6.3',\n\t\talternative: 'Initialize the editor with the setupEditorState action',\n\t} );\n\treturn { type: 'DO_NOTHING' };\n}\n\n/**\n * Returns an action object used in signalling that a patch of updates for the\n * latest version of the post have been received.\n *\n * @return {Object} Action object.\n * @deprecated since Gutenberg 9.7.0.\n */\nexport function updatePost() {\n\tdeprecated( \"wp.data.dispatch( 'core/editor' ).updatePost\", {\n\t\tsince: '5.7',\n\t\talternative: 'Use the core entities store instead',\n\t} );\n\treturn {\n\t\ttype: 'DO_NOTHING',\n\t};\n}\n\n/**\n * Setup the editor state.\n *\n * @deprecated\n *\n * @param {Object} post Post object.\n */\nexport function setupEditorState( post ) {\n\tdeprecated( \"wp.data.dispatch( 'core/editor' ).setupEditorState\", {\n\t\tsince: '6.5',\n\t\talternative: \"wp.data.dispatch( 'core/editor' ).setEditedPost\",\n\t} );\n\treturn setEditedPost( post.type, post.id );\n}\n\n/**\n * Returns an action that sets the current post Type and post ID.\n *\n * @param {string} postType Post Type.\n * @param {string} postId Post ID.\n *\n * @return {Object} Action object.\n */\nexport function setEditedPost( postType, postId ) {\n\treturn {\n\t\ttype: 'SET_EDITED_POST',\n\t\tpostType,\n\t\tpostId,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that attributes of the post have\n * been edited.\n *\n * @param {Object} edits Post attributes to edit.\n * @param {Object} [options] Options for the edit.\n *\n * @example\n * ```js\n * // Update the post title\n * wp.data.dispatch( 'core/editor' ).editPost( { title: `${ newTitle }` } );\n * ```\n *\n * @example\n *```js\n * \t// Get specific media size based on the featured media ID\n * \t// Note: change sizes?.large for any registered size\n * \tconst getFeaturedMediaUrl = useSelect( ( select ) => {\n * \t\tconst getFeaturedMediaId =\n * \t\t\tselect( 'core/editor' ).getEditedPostAttribute( 'featured_media' );\n * \t\tconst getMedia = select( 'core' ).getMedia( getFeaturedMediaId );\n *\n * \t\treturn (\n * \t\t\tgetMedia?.media_details?.sizes?.large?.source_url || getMedia?.source_url || ''\n * \t\t);\n * }, [] );\n * ```\n *\n * @return {Object} Action object\n */\nexport const editPost =\n\t( edits, options ) =>\n\t( { select, registry } ) => {\n\t\tconst { id, type } = select.getCurrentPost();\n\t\tregistry\n\t\t\t.dispatch( coreStore )\n\t\t\t.editEntityRecord( 'postType', type, id, edits, options );\n\t};\n\n/**\n * Action for saving the current post in the editor.\n *\n * @param {Object} [options]\n */\nexport const savePost =\n\t( options = {} ) =>\n\tasync ( { select, dispatch, registry } ) => {\n\t\tif ( ! select.isEditedPostSaveable() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst content = select.getEditedPostContent();\n\n\t\tif ( ! options.isAutosave ) {\n\t\t\tdispatch.editPost( { content }, { undoIgnore: true } );\n\t\t}\n\n\t\tconst previousRecord = select.getCurrentPost();\n\t\tlet edits = {\n\t\t\tid: previousRecord.id,\n\t\t\t...registry\n\t\t\t\t.select( coreStore )\n\t\t\t\t.getEntityRecordNonTransientEdits(\n\t\t\t\t\t'postType',\n\t\t\t\t\tpreviousRecord.type,\n\t\t\t\t\tpreviousRecord.id\n\t\t\t\t),\n\t\t\tcontent,\n\t\t};\n\t\tdispatch( { type: 'REQUEST_POST_UPDATE_START', options } );\n\n\t\tlet error = false;\n\t\ttry {\n\t\t\tedits = await applyFiltersAsync(\n\t\t\t\t'editor.preSavePost',\n\t\t\t\tedits,\n\t\t\t\toptions\n\t\t\t);\n\t\t} catch ( err ) {\n\t\t\terror = err;\n\t\t}\n\n\t\tif ( ! error ) {\n\t\t\ttry {\n\t\t\t\tawait registry\n\t\t\t\t\t.dispatch( coreStore )\n\t\t\t\t\t.saveEntityRecord(\n\t\t\t\t\t\t'postType',\n\t\t\t\t\t\tpreviousRecord.type,\n\t\t\t\t\t\tedits,\n\t\t\t\t\t\toptions\n\t\t\t\t\t);\n\t\t\t} catch ( err ) {\n\t\t\t\terror =\n\t\t\t\t\terr.message && err.code !== 'unknown_error'\n\t\t\t\t\t\t? err.message\n\t\t\t\t\t\t: __( 'An error occurred while updating.' );\n\t\t\t}\n\t\t}\n\n\t\tif ( ! error ) {\n\t\t\terror = registry\n\t\t\t\t.select( coreStore )\n\t\t\t\t.getLastEntitySaveError(\n\t\t\t\t\t'postType',\n\t\t\t\t\tpreviousRecord.type,\n\t\t\t\t\tpreviousRecord.id\n\t\t\t\t);\n\t\t}\n\n\t\t// Run the hook with legacy unstable name for backward compatibility\n\t\tif ( ! error ) {\n\t\t\ttry {\n\t\t\t\tawait applyFilters(\n\t\t\t\t\t'editor.__unstableSavePost',\n\t\t\t\t\tPromise.resolve(),\n\t\t\t\t\toptions\n\t\t\t\t);\n\t\t\t} catch ( err ) {\n\t\t\t\terror = err;\n\t\t\t}\n\t\t}\n\n\t\tif ( ! error ) {\n\t\t\ttry {\n\t\t\t\tawait doActionAsync(\n\t\t\t\t\t'editor.savePost',\n\t\t\t\t\t{ id: previousRecord.id },\n\t\t\t\t\toptions\n\t\t\t\t);\n\t\t\t} catch ( err ) {\n\t\t\t\terror = err;\n\t\t\t}\n\t\t}\n\t\tdispatch( { type: 'REQUEST_POST_UPDATE_FINISH', options } );\n\n\t\tif ( error ) {\n\t\t\tconst args = getNotificationArgumentsForSaveFail( {\n\t\t\t\tpost: previousRecord,\n\t\t\t\tedits,\n\t\t\t\terror,\n\t\t\t} );\n\t\t\tif ( args.length ) {\n\t\t\t\tregistry.dispatch( noticesStore ).createErrorNotice( ...args );\n\t\t\t}\n\t\t} else {\n\t\t\tconst updatedRecord = select.getCurrentPost();\n\t\t\tconst args = getNotificationArgumentsForSaveSuccess( {\n\t\t\t\tpreviousPost: previousRecord,\n\t\t\t\tpost: updatedRecord,\n\t\t\t\tpostType: await registry\n\t\t\t\t\t.resolveSelect( coreStore )\n\t\t\t\t\t.getPostType( updatedRecord.type ),\n\t\t\t\toptions,\n\t\t\t} );\n\t\t\tif ( args.length ) {\n\t\t\t\tregistry\n\t\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t\t.createSuccessNotice( ...args );\n\t\t\t}\n\t\t\t// Make sure that any edits after saving create an undo level and are\n\t\t\t// considered for change detection.\n\t\t\tif ( ! options.isAutosave ) {\n\t\t\t\tregistry\n\t\t\t\t\t.dispatch( blockEditorStore )\n\t\t\t\t\t.__unstableMarkLastChangeAsPersistent();\n\t\t\t}\n\t\t}\n\t};\n\n/**\n * Action for refreshing the current post.\n *\n * @deprecated Since WordPress 6.0.\n */\nexport function refreshPost() {\n\tdeprecated( \"wp.data.dispatch( 'core/editor' ).refreshPost\", {\n\t\tsince: '6.0',\n\t\tversion: '6.3',\n\t\talternative: 'Use the core entities store instead',\n\t} );\n\treturn { type: 'DO_NOTHING' };\n}\n\n/**\n * Action for trashing the current post in the editor.\n */\nexport const trashPost =\n\t() =>\n\tasync ( { select, dispatch, registry } ) => {\n\t\tconst postTypeSlug = select.getCurrentPostType();\n\t\tconst postType = await registry\n\t\t\t.resolveSelect( coreStore )\n\t\t\t.getPostType( postTypeSlug );\n\t\tconst { rest_base: restBase, rest_namespace: restNamespace = 'wp/v2' } =\n\t\t\tpostType;\n\t\tdispatch( { type: 'REQUEST_POST_DELETE_START' } );\n\t\ttry {\n\t\t\tconst post = select.getCurrentPost();\n\t\t\tawait apiFetch( {\n\t\t\t\tpath: `/${ restNamespace }/${ restBase }/${ post.id }`,\n\t\t\t\tmethod: 'DELETE',\n\t\t\t} );\n\n\t\t\tawait dispatch.savePost();\n\t\t} catch ( error ) {\n\t\t\tregistry\n\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t.createErrorNotice(\n\t\t\t\t\t...getNotificationArgumentsForTrashFail( { error } )\n\t\t\t\t);\n\t\t}\n\t\tdispatch( { type: 'REQUEST_POST_DELETE_FINISH' } );\n\t};\n\n/**\n * Action that autosaves the current post. This\n * includes server-side autosaving (default) and client-side (a.k.a. local)\n * autosaving (e.g. on the Web, the post might be committed to Session\n * Storage).\n *\n * @param {Object} [options] Extra flags to identify the autosave.\n * @param {boolean} [options.local] Whether to perform a local autosave.\n */\nexport const autosave =\n\t( { local = false, ...options } = {} ) =>\n\tasync ( { select, dispatch } ) => {\n\t\tconst post = select.getCurrentPost();\n\n\t\t// Currently template autosaving is not supported.\n\t\tif ( post.type === 'wp_template' ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( local ) {\n\t\t\tconst isPostNew = select.isEditedPostNew();\n\t\t\tconst title = select.getEditedPostAttribute( 'title' );\n\t\t\tconst content = select.getEditedPostAttribute( 'content' );\n\t\t\tconst excerpt = select.getEditedPostAttribute( 'excerpt' );\n\t\t\tlocalAutosaveSet( post.id, isPostNew, title, content, excerpt );\n\t\t} else {\n\t\t\tawait dispatch.savePost( { isAutosave: true, ...options } );\n\t\t}\n\t};\n\nexport const __unstableSaveForPreview =\n\t( { forceIsAutosaveable } = {} ) =>\n\tasync ( { select, dispatch } ) => {\n\t\tif (\n\t\t\t( forceIsAutosaveable || select.isEditedPostAutosaveable() ) &&\n\t\t\t! select.isPostLocked()\n\t\t) {\n\t\t\tconst isDraft = [ 'draft', 'auto-draft' ].includes(\n\t\t\t\tselect.getEditedPostAttribute( 'status' )\n\t\t\t);\n\t\t\tif ( isDraft ) {\n\t\t\t\tawait dispatch.savePost( { isPreview: true } );\n\t\t\t} else {\n\t\t\t\tawait dispatch.autosave( { isPreview: true } );\n\t\t\t}\n\t\t}\n\n\t\treturn select.getEditedPostPreviewLink();\n\t};\n\n/**\n * Action that restores last popped state in undo history.\n */\nexport const redo =\n\t() =>\n\t( { registry } ) => {\n\t\tregistry.dispatch( coreStore ).redo();\n\t};\n\n/**\n * Action that pops a record from undo history and undoes the edit.\n */\nexport const undo =\n\t() =>\n\t( { registry } ) => {\n\t\tregistry.dispatch( coreStore ).undo();\n\t};\n\n/**\n * Action that creates an undo history record.\n *\n * @deprecated Since WordPress 6.0\n */\nexport function createUndoLevel() {\n\tdeprecated( \"wp.data.dispatch( 'core/editor' ).createUndoLevel\", {\n\t\tsince: '6.0',\n\t\tversion: '6.3',\n\t\talternative: 'Use the core entities store instead',\n\t} );\n\treturn { type: 'DO_NOTHING' };\n}\n\n/**\n * Action that locks the editor.\n *\n * @param {Object} lock Details about the post lock status, user, and nonce.\n * @return {Object} Action object.\n */\nexport function updatePostLock( lock ) {\n\treturn {\n\t\ttype: 'UPDATE_POST_LOCK',\n\t\tlock,\n\t};\n}\n\n/**\n * Enable the publish sidebar.\n */\nexport const enablePublishSidebar =\n\t() =>\n\t( { registry } ) => {\n\t\tregistry\n\t\t\t.dispatch( preferencesStore )\n\t\t\t.set( 'core', 'isPublishSidebarEnabled', true );\n\t};\n\n/**\n * Disables the publish sidebar.\n */\nexport const disablePublishSidebar =\n\t() =>\n\t( { registry } ) => {\n\t\tregistry\n\t\t\t.dispatch( preferencesStore )\n\t\t\t.set( 'core', 'isPublishSidebarEnabled', false );\n\t};\n\n/**\n * Action that locks post saving.\n *\n * @param {string} lockName The lock name.\n *\n * @example\n * ```\n * const { subscribe } = wp.data;\n *\n * const initialPostStatus = wp.data.select( 'core/editor' ).getEditedPostAttribute( 'status' );\n *\n * // Only allow publishing posts that are set to a future date.\n * if ( 'publish' !== initialPostStatus ) {\n *\n * \t// Track locking.\n * \tlet locked = false;\n *\n * \t// Watch for the publish event.\n * \tlet unssubscribe = subscribe( () => {\n * \t\tconst currentPostStatus = wp.data.select( 'core/editor' ).getEditedPostAttribute( 'status' );\n * \t\tif ( 'publish' !== currentPostStatus ) {\n *\n * \t\t\t// Compare the post date to the current date, lock the post if the date isn't in the future.\n * \t\t\tconst postDate = new Date( wp.data.select( 'core/editor' ).getEditedPostAttribute( 'date' ) );\n * \t\t\tconst currentDate = new Date();\n * \t\t\tif ( postDate.getTime() <= currentDate.getTime() ) {\n * \t\t\t\tif ( ! locked ) {\n * \t\t\t\t\tlocked = true;\n * \t\t\t\t\twp.data.dispatch( 'core/editor' ).lockPostSaving( 'futurelock' );\n * \t\t\t\t}\n * \t\t\t} else {\n * \t\t\t\tif ( locked ) {\n * \t\t\t\t\tlocked = false;\n * \t\t\t\t\twp.data.dispatch( 'core/editor' ).unlockPostSaving( 'futurelock' );\n * \t\t\t\t}\n * \t\t\t}\n * \t\t}\n * \t} );\n * }\n * ```\n *\n * @return {Object} Action object\n */\nexport function lockPostSaving( lockName ) {\n\treturn {\n\t\ttype: 'LOCK_POST_SAVING',\n\t\tlockName,\n\t};\n}\n\n/**\n * Action that unlocks post saving.\n *\n * @param {string} lockName The lock name.\n *\n * @example\n * ```\n * // Unlock post saving with the lock key `mylock`:\n * wp.data.dispatch( 'core/editor' ).unlockPostSaving( 'mylock' );\n * ```\n *\n * @return {Object} Action object\n */\nexport function unlockPostSaving( lockName ) {\n\treturn {\n\t\ttype: 'UNLOCK_POST_SAVING',\n\t\tlockName,\n\t};\n}\n\n/**\n * Action that locks post autosaving.\n *\n * @param {string} lockName The lock name.\n *\n * @example\n * ```\n * // Lock post autosaving with the lock key `mylock`:\n * wp.data.dispatch( 'core/editor' ).lockPostAutosaving( 'mylock' );\n * ```\n *\n * @return {Object} Action object\n */\nexport function lockPostAutosaving( lockName ) {\n\treturn {\n\t\ttype: 'LOCK_POST_AUTOSAVING',\n\t\tlockName,\n\t};\n}\n\n/**\n * Action that unlocks post autosaving.\n *\n * @param {string} lockName The lock name.\n *\n * @example\n * ```\n * // Unlock post saving with the lock key `mylock`:\n * wp.data.dispatch( 'core/editor' ).unlockPostAutosaving( 'mylock' );\n * ```\n *\n * @return {Object} Action object\n */\nexport function unlockPostAutosaving( lockName ) {\n\treturn {\n\t\ttype: 'UNLOCK_POST_AUTOSAVING',\n\t\tlockName,\n\t};\n}\n\n/**\n * Returns an action object used to signal that the blocks have been updated.\n *\n * @param {Array} blocks Block Array.\n * @param {Object} [options] Optional options.\n */\nexport const resetEditorBlocks =\n\t( blocks, options = {} ) =>\n\t( { select, dispatch, registry } ) => {\n\t\tconst { __unstableShouldCreateUndoLevel, selection } = options;\n\t\tconst edits = { blocks, selection };\n\n\t\tif ( __unstableShouldCreateUndoLevel !== false ) {\n\t\t\tconst { id, type } = select.getCurrentPost();\n\t\t\tconst noChange =\n\t\t\t\tregistry\n\t\t\t\t\t.select( coreStore )\n\t\t\t\t\t.getEditedEntityRecord( 'postType', type, id ).blocks ===\n\t\t\t\tedits.blocks;\n\t\t\tif ( noChange ) {\n\t\t\t\tregistry\n\t\t\t\t\t.dispatch( coreStore )\n\t\t\t\t\t.__unstableCreateUndoLevel( 'postType', type, id );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// We create a new function here on every persistent edit\n\t\t\t// to make sure the edit makes the post dirty and creates\n\t\t\t// a new undo level.\n\t\t\tedits.content = ( { blocks: blocksForSerialization = [] } ) =>\n\t\t\t\t__unstableSerializeAndClean( blocksForSerialization );\n\t\t}\n\n\t\tdispatch.editPost( edits );\n\t};\n\n/*\n * Returns an action object used in signalling that the post editor settings have been updated.\n *\n * @param {Object} settings Updated settings\n *\n * @return {Object} Action object\n */\nexport function updateEditorSettings( settings ) {\n\treturn {\n\t\ttype: 'UPDATE_EDITOR_SETTINGS',\n\t\tsettings,\n\t};\n}\n\n/**\n * Returns an action used to set the rendering mode of the post editor. We support multiple rendering modes:\n *\n * - `post-only`: This mode extracts the post blocks from the template and renders only those. The idea is to allow the user to edit the post/page in isolation without the wrapping template.\n * - `template-locked`: This mode renders both the template and the post blocks but the template blocks are locked and can't be edited. The post blocks are editable.\n *\n * @param {string} mode Mode (one of 'post-only' or 'template-locked').\n */\nexport const setRenderingMode =\n\t( mode ) =>\n\t( { dispatch, registry, select } ) => {\n\t\tif ( select.__unstableIsEditorReady() ) {\n\t\t\t// We clear the block selection but we also need to clear the selection from the core store.\n\t\t\tregistry.dispatch( blockEditorStore ).clearSelectedBlock();\n\t\t\tdispatch.editPost( { selection: undefined }, { undoIgnore: true } );\n\t\t}\n\n\t\tdispatch( {\n\t\t\ttype: 'SET_RENDERING_MODE',\n\t\t\tmode,\n\t\t} );\n\t};\n\n/**\n * Action that changes the width of the editing canvas.\n *\n * @param {string} deviceType\n *\n * @return {Object} Action object.\n */\nexport function setDeviceType( deviceType ) {\n\treturn {\n\t\ttype: 'SET_DEVICE_TYPE',\n\t\tdeviceType,\n\t};\n}\n\n/**\n * Returns an action object used to enable or disable a panel in the editor.\n *\n * @param {string} panelName A string that identifies the panel to enable or disable.\n *\n * @return {Object} Action object.\n */\nexport const toggleEditorPanelEnabled =\n\t( panelName ) =>\n\t( { registry } ) => {\n\t\tconst inactivePanels =\n\t\t\tregistry\n\t\t\t\t.select( preferencesStore )\n\t\t\t\t.get( 'core', 'inactivePanels' ) ?? [];\n\n\t\tconst isPanelInactive = !! inactivePanels?.includes( panelName );\n\n\t\t// If the panel is inactive, remove it to enable it, else add it to\n\t\t// make it inactive.\n\t\tlet updatedInactivePanels;\n\t\tif ( isPanelInactive ) {\n\t\t\tupdatedInactivePanels = inactivePanels.filter(\n\t\t\t\t( invactivePanelName ) => invactivePanelName !== panelName\n\t\t\t);\n\t\t} else {\n\t\t\tupdatedInactivePanels = [ ...inactivePanels, panelName ];\n\t\t}\n\n\t\tregistry\n\t\t\t.dispatch( preferencesStore )\n\t\t\t.set( 'core', 'inactivePanels', updatedInactivePanels );\n\t};\n\n/**\n * Opens a closed panel and closes an open panel.\n *\n * @param {string} panelName A string that identifies the panel to open or close.\n */\nexport const toggleEditorPanelOpened =\n\t( panelName ) =>\n\t( { registry } ) => {\n\t\tconst openPanels =\n\t\t\tregistry.select( preferencesStore ).get( 'core', 'openPanels' ) ??\n\t\t\t[];\n\n\t\tconst isPanelOpen = !! openPanels?.includes( panelName );\n\n\t\t// If the panel is open, remove it to close it, else add it to\n\t\t// make it open.\n\t\tlet updatedOpenPanels;\n\t\tif ( isPanelOpen ) {\n\t\t\tupdatedOpenPanels = openPanels.filter(\n\t\t\t\t( openPanelName ) => openPanelName !== panelName\n\t\t\t);\n\t\t} else {\n\t\t\tupdatedOpenPanels = [ ...openPanels, panelName ];\n\t\t}\n\n\t\tregistry\n\t\t\t.dispatch( preferencesStore )\n\t\t\t.set( 'core', 'openPanels', updatedOpenPanels );\n\t};\n\n/**\n * Returns an action object used to remove a panel from the editor.\n *\n * @param {string} panelName A string that identifies the panel to remove.\n *\n * @return {Object} Action object.\n */\nexport function removeEditorPanel( panelName ) {\n\treturn {\n\t\ttype: 'REMOVE_PANEL',\n\t\tpanelName,\n\t};\n}\n\n/**\n * Returns an action object used to open/close the inserter.\n *\n * @param {boolean|Object} value Whether the inserter should be\n * opened (true) or closed (false).\n * To specify an insertion point,\n * use an object.\n * @param {string} value.rootClientId The root client ID to insert at.\n * @param {number} value.insertionIndex The index to insert at.\n * @param {string} value.filterValue A query to filter the inserter results.\n * @param {Function} value.onSelect A callback when an item is selected.\n * @param {string} value.tab The tab to open in the inserter.\n * @param {string} value.category The category to initialize in the inserter.\n *\n * @return {Object} Action object.\n */\nexport const setIsInserterOpened =\n\t( value ) =>\n\t( { dispatch, registry } ) => {\n\t\tif (\n\t\t\ttypeof value === 'object' &&\n\t\t\tvalue.hasOwnProperty( 'rootClientId' ) &&\n\t\t\tvalue.hasOwnProperty( 'insertionIndex' )\n\t\t) {\n\t\t\tunlock( registry.dispatch( blockEditorStore ) ).setInsertionPoint( {\n\t\t\t\trootClientId: value.rootClientId,\n\t\t\t\tindex: value.insertionIndex,\n\t\t\t} );\n\t\t}\n\n\t\tdispatch( {\n\t\t\ttype: 'SET_IS_INSERTER_OPENED',\n\t\t\tvalue,\n\t\t} );\n\t};\n\n/**\n * Returns an action object used to open/close the list view.\n *\n * @param {boolean} isOpen A boolean representing whether the list view should be opened or closed.\n * @return {Object} Action object.\n */\nexport function setIsListViewOpened( isOpen ) {\n\treturn {\n\t\ttype: 'SET_IS_LIST_VIEW_OPENED',\n\t\tisOpen,\n\t};\n}\n\n/**\n * Action that toggles Distraction free mode.\n * Distraction free mode expects there are no sidebars, as due to the\n * z-index values set, you can't close sidebars.\n *\n * @param {Object} [options={}] Optional configuration object\n * @param {boolean} [options.createNotice=true] Whether to create a notice\n */\nexport const toggleDistractionFree =\n\t( { createNotice = true } = {} ) =>\n\t( { dispatch, registry } ) => {\n\t\tconst isDistractionFree = registry\n\t\t\t.select( preferencesStore )\n\t\t\t.get( 'core', 'distractionFree' );\n\t\tif ( isDistractionFree ) {\n\t\t\tregistry\n\t\t\t\t.dispatch( preferencesStore )\n\t\t\t\t.set( 'core', 'fixedToolbar', false );\n\t\t}\n\t\tif ( ! isDistractionFree ) {\n\t\t\tregistry.batch( () => {\n\t\t\t\tregistry\n\t\t\t\t\t.dispatch( preferencesStore )\n\t\t\t\t\t.set( 'core', 'fixedToolbar', true );\n\t\t\t\tdispatch.setIsInserterOpened( false );\n\t\t\t\tdispatch.setIsListViewOpened( false );\n\t\t\t\tunlock(\n\t\t\t\t\tregistry.dispatch( blockEditorStore )\n\t\t\t\t).resetZoomLevel();\n\t\t\t} );\n\t\t}\n\t\tregistry.batch( () => {\n\t\t\tregistry\n\t\t\t\t.dispatch( preferencesStore )\n\t\t\t\t.set( 'core', 'distractionFree', ! isDistractionFree );\n\n\t\t\tif ( createNotice ) {\n\t\t\t\tregistry\n\t\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t\t.createInfoNotice(\n\t\t\t\t\t\tisDistractionFree\n\t\t\t\t\t\t\t? __( 'Distraction free mode deactivated.' )\n\t\t\t\t\t\t\t: __( 'Distraction free mode activated.' ),\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tid: 'core/editor/distraction-free-mode/notice',\n\t\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t\t\tactions: [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tlabel: __( 'Undo' ),\n\t\t\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\t\t\tregistry.batch( () => {\n\t\t\t\t\t\t\t\t\t\t\tregistry\n\t\t\t\t\t\t\t\t\t\t\t\t.dispatch( preferencesStore )\n\t\t\t\t\t\t\t\t\t\t\t\t.set(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'core',\n\t\t\t\t\t\t\t\t\t\t\t\t\t'fixedToolbar',\n\t\t\t\t\t\t\t\t\t\t\t\t\tisDistractionFree\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\tregistry\n\t\t\t\t\t\t\t\t\t\t\t\t.dispatch( preferencesStore )\n\t\t\t\t\t\t\t\t\t\t\t\t.toggle(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'core',\n\t\t\t\t\t\t\t\t\t\t\t\t\t'distractionFree'\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}\n\t\t} );\n\t};\n\n/**\n * Action that toggles the Spotlight Mode view option.\n */\nexport const toggleSpotlightMode =\n\t() =>\n\t( { registry } ) => {\n\t\tregistry.dispatch( preferencesStore ).toggle( 'core', 'focusMode' );\n\n\t\tconst isFocusMode = registry\n\t\t\t.select( preferencesStore )\n\t\t\t.get( 'core', 'focusMode' );\n\n\t\tregistry\n\t\t\t.dispatch( noticesStore )\n\t\t\t.createInfoNotice(\n\t\t\t\tisFocusMode\n\t\t\t\t\t? __( 'Spotlight mode activated.' )\n\t\t\t\t\t: __( 'Spotlight mode deactivated.' ),\n\t\t\t\t{\n\t\t\t\t\tid: 'core/editor/toggle-spotlight-mode/notice',\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\tactions: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlabel: __( 'Undo' ),\n\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\tregistry\n\t\t\t\t\t\t\t\t\t.dispatch( preferencesStore )\n\t\t\t\t\t\t\t\t\t.toggle( 'core', 'focusMode' );\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t}\n\t\t\t);\n\t};\n\n/**\n * Action that toggles the Top Toolbar view option.\n */\nexport const toggleTopToolbar =\n\t() =>\n\t( { registry } ) => {\n\t\tregistry.dispatch( preferencesStore ).toggle( 'core', 'fixedToolbar' );\n\n\t\tconst isTopToolbar = registry\n\t\t\t.select( preferencesStore )\n\t\t\t.get( 'core', 'fixedToolbar' );\n\n\t\tregistry\n\t\t\t.dispatch( noticesStore )\n\t\t\t.createInfoNotice(\n\t\t\t\tisTopToolbar\n\t\t\t\t\t? __( 'Top toolbar activated.' )\n\t\t\t\t\t: __( 'Top toolbar deactivated.' ),\n\t\t\t\t{\n\t\t\t\t\tid: 'core/editor/toggle-top-toolbar/notice',\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\tactions: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlabel: __( 'Undo' ),\n\n\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\tregistry\n\t\t\t\t\t\t\t\t\t.dispatch( preferencesStore )\n\t\t\t\t\t\t\t\t\t.toggle( 'core', 'fixedToolbar' );\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t}\n\t\t\t);\n\t};\n\n/**\n * Triggers an action used to switch editor mode.\n *\n * @param {string} mode The editor mode.\n */\nexport const switchEditorMode =\n\t( mode ) =>\n\t( { dispatch, registry } ) => {\n\t\tregistry.dispatch( preferencesStore ).set( 'core', 'editorMode', mode );\n\n\t\tif ( mode !== 'visual' ) {\n\t\t\t// Unselect blocks when we switch to a non visual mode.\n\t\t\tregistry.dispatch( blockEditorStore ).clearSelectedBlock();\n\t\t\t// Exit zoom out state when switching to a non visual mode.\n\t\t\tunlock( registry.dispatch( blockEditorStore ) ).resetZoomLevel();\n\t\t}\n\n\t\tif ( mode === 'visual' ) {\n\t\t\tspeak( __( 'Visual editor selected' ), 'assertive' );\n\t\t} else if ( mode === 'text' ) {\n\t\t\tconst isDistractionFree = registry\n\t\t\t\t.select( preferencesStore )\n\t\t\t\t.get( 'core', 'distractionFree' );\n\t\t\tif ( isDistractionFree ) {\n\t\t\t\tdispatch.toggleDistractionFree();\n\t\t\t}\n\t\t\tspeak( __( 'Code editor selected' ), 'assertive' );\n\t\t}\n\t};\n\n/**\n * Returns an action object used in signalling that the user opened the publish\n * sidebar.\n *\n * @return {Object} Action object\n */\nexport function openPublishSidebar() {\n\treturn {\n\t\ttype: 'OPEN_PUBLISH_SIDEBAR',\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the user closed the\n * publish sidebar.\n *\n * @return {Object} Action object.\n */\nexport function closePublishSidebar() {\n\treturn {\n\t\ttype: 'CLOSE_PUBLISH_SIDEBAR',\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the user toggles the publish sidebar.\n *\n * @return {Object} Action object\n */\nexport function togglePublishSidebar() {\n\treturn {\n\t\ttype: 'TOGGLE_PUBLISH_SIDEBAR',\n\t};\n}\n\n/**\n * Backward compatibility\n */\n\nconst getBlockEditorAction =\n\t( name ) =>\n\t( ...args ) =>\n\t( { registry } ) => {\n\t\tdeprecated( \"`wp.data.dispatch( 'core/editor' ).\" + name + '`', {\n\t\t\tsince: '5.3',\n\t\t\talternative:\n\t\t\t\t\"`wp.data.dispatch( 'core/block-editor' ).\" + name + '`',\n\t\t\tversion: '6.2',\n\t\t} );\n\t\tregistry.dispatch( blockEditorStore )[ name ]( ...args );\n\t};\n\n/**\n * @see resetBlocks in core/block-editor store.\n */\nexport const resetBlocks = getBlockEditorAction( 'resetBlocks' );\n\n/**\n * @see receiveBlocks in core/block-editor store.\n */\nexport const receiveBlocks = getBlockEditorAction( 'receiveBlocks' );\n\n/**\n * @see updateBlock in core/block-editor store.\n */\nexport const updateBlock = getBlockEditorAction( 'updateBlock' );\n\n/**\n * @see updateBlockAttributes in core/block-editor store.\n */\nexport const updateBlockAttributes = getBlockEditorAction(\n\t'updateBlockAttributes'\n);\n\n/**\n * @see selectBlock in core/block-editor store.\n */\nexport const selectBlock = getBlockEditorAction( 'selectBlock' );\n\n/**\n * @see startMultiSelect in core/block-editor store.\n */\nexport const startMultiSelect = getBlockEditorAction( 'startMultiSelect' );\n\n/**\n * @see stopMultiSelect in core/block-editor store.\n */\nexport const stopMultiSelect = getBlockEditorAction( 'stopMultiSelect' );\n\n/**\n * @see multiSelect in core/block-editor store.\n */\nexport const multiSelect = getBlockEditorAction( 'multiSelect' );\n\n/**\n * @see clearSelectedBlock in core/block-editor store.\n */\nexport const clearSelectedBlock = getBlockEditorAction( 'clearSelectedBlock' );\n\n/**\n * @see toggleSelection in core/block-editor store.\n */\nexport const toggleSelection = getBlockEditorAction( 'toggleSelection' );\n\n/**\n * @see replaceBlocks in core/block-editor store.\n */\nexport const replaceBlocks = getBlockEditorAction( 'replaceBlocks' );\n\n/**\n * @see replaceBlock in core/block-editor store.\n */\nexport const replaceBlock = getBlockEditorAction( 'replaceBlock' );\n\n/**\n * @see moveBlocksDown in core/block-editor store.\n */\nexport const moveBlocksDown = getBlockEditorAction( 'moveBlocksDown' );\n\n/**\n * @see moveBlocksUp in core/block-editor store.\n */\nexport const moveBlocksUp = getBlockEditorAction( 'moveBlocksUp' );\n\n/**\n * @see moveBlockToPosition in core/block-editor store.\n */\nexport const moveBlockToPosition = getBlockEditorAction(\n\t'moveBlockToPosition'\n);\n\n/**\n * @see insertBlock in core/block-editor store.\n */\nexport const insertBlock = getBlockEditorAction( 'insertBlock' );\n\n/**\n * @see insertBlocks in core/block-editor store.\n */\nexport const insertBlocks = getBlockEditorAction( 'insertBlocks' );\n\n/**\n * @see showInsertionPoint in core/block-editor store.\n */\nexport const showInsertionPoint = getBlockEditorAction( 'showInsertionPoint' );\n\n/**\n * @see hideInsertionPoint in core/block-editor store.\n */\nexport const hideInsertionPoint = getBlockEditorAction( 'hideInsertionPoint' );\n\n/**\n * @see setTemplateValidity in core/block-editor store.\n */\nexport const setTemplateValidity = getBlockEditorAction(\n\t'setTemplateValidity'\n);\n\n/**\n * @see synchronizeTemplate in core/block-editor store.\n */\nexport const synchronizeTemplate = getBlockEditorAction(\n\t'synchronizeTemplate'\n);\n\n/**\n * @see mergeBlocks in core/block-editor store.\n */\nexport const mergeBlocks = getBlockEditorAction( 'mergeBlocks' );\n\n/**\n * @see removeBlocks in core/block-editor store.\n */\nexport const removeBlocks = getBlockEditorAction( 'removeBlocks' );\n\n/**\n * @see removeBlock in core/block-editor store.\n */\nexport const removeBlock = getBlockEditorAction( 'removeBlock' );\n\n/**\n * @see toggleBlockMode in core/block-editor store.\n */\nexport const toggleBlockMode = getBlockEditorAction( 'toggleBlockMode' );\n\n/**\n * @see startTyping in core/block-editor store.\n */\nexport const startTyping = getBlockEditorAction( 'startTyping' );\n\n/**\n * @see stopTyping in core/block-editor store.\n */\nexport const stopTyping = getBlockEditorAction( 'stopTyping' );\n\n/**\n * @see enterFormattedText in core/block-editor store.\n */\nexport const enterFormattedText = getBlockEditorAction( 'enterFormattedText' );\n\n/**\n * @see exitFormattedText in core/block-editor store.\n */\nexport const exitFormattedText = getBlockEditorAction( 'exitFormattedText' );\n\n/**\n * @see insertDefaultBlock in core/block-editor store.\n */\nexport const insertDefaultBlock = getBlockEditorAction( 'insertDefaultBlock' );\n\n/**\n * @see updateBlockListSettings in core/block-editor store.\n */\nexport const updateBlockListSettings = getBlockEditorAction(\n\t'updateBlockListSettings'\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,WAAA,G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AAA,KACA,CAAE;EAAErE;AAAS,CAAC,KAAM;EACnBA,QAAQ,CACNjC,QAAQ,CAAEuG,kBAAiB,CAAC,CAC5BC,GAAG,CAAE,MAAM,EAAE,yBAAyB,EAAE,IAAK,CAAC;AACjD,CAAC;;AAEF;AACA;AACA;AAFApF,OAAA,CAAAkF,oBAAA,GAAAA,oBAAA;AAGO,MAAMG,qBAAqB,GACjCA,CAAA,KACA,CAAE;EAAExE;AAAS,CAAC,KAAM;EACnBA,QAAQ,CACNjC,QAAQ,CAAEuG,kBAAiB,CAAC,CAC5BC,GAAG,CAAE,MAAM,EAAE,yBAAyB,EAAE,KAAM,CAAC;AAClD,CAAC;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA1CApF,OAAA,CAAAqF,qBAAA,GAAAA,qBAAA;AA2CO,SAASC,cAAcA,CAAEC,QAAQ,EAAG;EAC1C,OAAO;IACNzG,IAAI,EAAE,kBAAkB;IACxByG;EACD,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,gBAAgBA,CAAED,QAAQ,EAAG;EAC5C,OAAO;IACNzG,IAAI,EAAE,oBAAoB;IAC1ByG;EACD,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASE,kBAAkBA,CAAEF,QAAQ,EAAG;EAC9C,OAAO;IACNzG,IAAI,EAAE,sBAAsB;IAC5ByG;EACD,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASG,oBAAoBA,CAAEH,QAAQ,EAAG;EAChD,O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MAAM6B,iBAAiB,GAAApL,OAAA,CAAAoL,iBAAA,GAAG7B,oBAAoB,CAAE,mBAAoB,CAAC;;AAE5E;AACA;AACA;AACO,MAAM8B,kBAAkB,GAAArL,OAAA,CAAAqL,kBAAA,GAAG9B,oBAAoB,CAAE,oBAAqB,CAAC;;AAE9E;AACA;AACA;AACO,MAAM+B,uBAAuB,GAAAtL,OAAA,CAAAsL,uBAAA,GAAG/B,oBAAoB,CAC1D,yBACD,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_a11y","require","_apiFetch","_interopRequireDefault","_deprecated","_blocks","_notices","_coreData","_blockEditor","_hooks","_preferences","_i18n","_localAutosave","_noticeBuilder","_lockUnlock","setupEditor","post","edits","template","dispatch","setEditedPost","type","id","isNewPost","status","content","raw","blocks","parse","synchronizeBlocksWithTemplate","resetEditorBlocks","__unstableShouldCreateUndoLevel","Object","values","some","key","edit","_post$key$raw","editPost","exports","__experimentalTearDownEditor","deprecated","since","resetPost","version","alternative","updatePost","setupEditorState","postType","postId","options","select","registry","getCurrentPost","coreStore","editEntityRecord","savePost","isEditedPostSaveable","getEditedPostContent","isAutosave","undoIgnore","previousRecord","getEntityRecordNonTransientEdits","error","applyFiltersAsync","err","saveEntityRecord","message","code","__","getLastEntitySaveError","applyFilters","Promise","resolve","doActionAsync","args","getNotificationArgumentsForSaveFail","length","noticesStore","createErrorNotice","updatedRecord","getNotificationArgumentsForSaveSuccess","previousPost","resolveSelect","getPostType","createSuccessNotice","blockEditorStore","__unstableMarkLastChangeAsPersistent","refreshPost","trashPost","postTypeSlug","getCurrentPostType","rest_base","restBase","rest_namespace","restNamespace","apiFetch","path","method","getNotificationArgumentsForTrashFail","autosave","local","isPostNew","isEditedPostNew","title","getEditedPostAttribute","excerpt","localAutosaveSet","__unstableSaveForPreview","forceIsAutosaveable","isEditedPostAutosaveable","isPostLocked","isDraft","includes","isPreview","getEditedPostPreviewLink","redo","undo","createUndoLevel","updatePostLock","lock","enablePublishSidebar","preferencesStore","set","disablePublishSidebar","lockPostSaving","lockName","unlockPostSaving","lockPostAutosaving","unlockPostAutosaving","selection","noChange","getEditedEntityRecord","__unstableCreateUndoLevel","blocksForSerialization","__unstableSerializeAndClean","updateEditorSettings","settings","setRenderingMode","mode","__unstableIsEditorReady","clearSelectedBlock","undefined","setDeviceType","deviceType","toggleEditorPanelEnabled","panelName","_registry$select$get","inactivePanels","get","isPanelInactive","updatedInactivePanels","filter","invactivePanelName","toggleEditorPanelOpened","_registry$select$get2","openPanels","isPanelOpen","updatedOpenPanels","openPanelName","removeEditorPanel","setIsInserterOpened","value","hasOwnProperty","unlock","setInsertionPoint","rootClientId","index","insertionIndex","setIsListViewOpened","isOpen","toggleDistractionFree","createNotice","isDistractionFree","batch","resetZoomLevel","createInfoNotice","actions","label","onClick","toggle","toggleSpotlightMode","isFocusMode","toggleTopToolbar","isTopToolbar","switchEditorMode","speak","openPublishSidebar","closePublishSidebar","togglePublishSidebar","getBlockEditorAction","name","resetBlocks","receiveBlocks","updateBlock","updateBlockAttributes","selectBlock","startMultiSelect","stopMultiSelect","multiSelect","toggleSelection","replaceBlocks","replaceBlock","moveBlocksDown","moveBlocksUp","moveBlockToPosition","insertBlock","insertBlocks","showInsertionPoint","hideInsertionPoint","setTemplateValidity","synchronizeTemplate","mergeBlocks","removeBlocks","removeBlock","toggleBlockMode","startTyping","stopTyping","enterFormattedText","exitFormattedText","insertDefaultBlock","updateBlockListSettings"],"sources":["@wordpress/editor/src/store/actions.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { speak } from '@wordpress/a11y';\nimport apiFetch from '@wordpress/api-fetch';\nimport deprecated from '@wordpress/deprecated';\nimport {\n\tparse,\n\tsynchronizeBlocksWithTemplate,\n\t__unstableSerializeAndClean,\n} from '@wordpress/blocks';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport {\n\tapplyFilters,\n\tapplyFiltersAsync,\n\tdoActionAsync,\n} from '@wordpress/hooks';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { localAutosaveSet } from './local-autosave';\nimport {\n\tgetNotificationArgumentsForSaveSuccess,\n\tgetNotificationArgumentsForSaveFail,\n\tgetNotificationArgumentsForTrashFail,\n} from './utils/notice-builder';\nimport { unlock } from '../lock-unlock';\n/**\n * Returns an action generator used in signalling that editor has initialized with\n * the specified post object and editor settings.\n *\n * @param {Object} post Post object.\n * @param {Object} edits Initial edited attributes object.\n * @param {Array} [template] Block Template.\n */\nexport const setupEditor =\n\t( post, edits, template ) =>\n\t( { dispatch } ) => {\n\t\tdispatch.setEditedPost( post.type, post.id );\n\t\t// Apply a template for new posts only, if exists.\n\t\tconst isNewPost = post.status === 'auto-draft';\n\t\tif ( isNewPost && template ) {\n\t\t\t// In order to ensure maximum of a single parse during setup, edits are\n\t\t\t// included as part of editor setup action. Assume edited content as\n\t\t\t// canonical if provided, falling back to post.\n\t\t\tlet content;\n\t\t\tif ( 'content' in edits ) {\n\t\t\t\tcontent = edits.content;\n\t\t\t} else {\n\t\t\t\tcontent = post.content.raw;\n\t\t\t}\n\t\t\tlet blocks = parse( content );\n\t\t\tblocks = synchronizeBlocksWithTemplate( blocks, template );\n\t\t\tdispatch.resetEditorBlocks( blocks, {\n\t\t\t\t__unstableShouldCreateUndoLevel: false,\n\t\t\t} );\n\t\t}\n\t\tif (\n\t\t\tedits &&\n\t\t\tObject.values( edits ).some(\n\t\t\t\t( [ key, edit ] ) =>\n\t\t\t\t\tedit !== ( post[ key ]?.raw ?? post[ key ] )\n\t\t\t)\n\t\t) {\n\t\t\tdispatch.editPost( edits );\n\t\t}\n\t};\n\n/**\n * Returns an action object signalling that the editor is being destroyed and\n * that any necessary state or side-effect cleanup should occur.\n *\n * @deprecated\n *\n * @return {Object} Action object.\n */\nexport function __experimentalTearDownEditor() {\n\tdeprecated(\n\t\t\"wp.data.dispatch( 'core/editor' ).__experimentalTearDownEditor\",\n\t\t{\n\t\t\tsince: '6.5',\n\t\t}\n\t);\n\treturn { type: 'DO_NOTHING' };\n}\n\n/**\n * Returns an action object used in signalling that the latest version of the\n * post has been received, either by initialization or save.\n *\n * @deprecated Since WordPress 6.0.\n */\nexport function resetPost() {\n\tdeprecated( \"wp.data.dispatch( 'core/editor' ).resetPost\", {\n\t\tsince: '6.0',\n\t\tversion: '6.3',\n\t\talternative: 'Initialize the editor with the setupEditorState action',\n\t} );\n\treturn { type: 'DO_NOTHING' };\n}\n\n/**\n * Returns an action object used in signalling that a patch of updates for the\n * latest version of the post have been received.\n *\n * @return {Object} Action object.\n * @deprecated since Gutenberg 9.7.0.\n */\nexport function updatePost() {\n\tdeprecated( \"wp.data.dispatch( 'core/editor' ).updatePost\", {\n\t\tsince: '5.7',\n\t\talternative: 'Use the core entities store instead',\n\t} );\n\treturn {\n\t\ttype: 'DO_NOTHING',\n\t};\n}\n\n/**\n * Setup the editor state.\n *\n * @deprecated\n *\n * @param {Object} post Post object.\n */\nexport function setupEditorState( post ) {\n\tdeprecated( \"wp.data.dispatch( 'core/editor' ).setupEditorState\", {\n\t\tsince: '6.5',\n\t\talternative: \"wp.data.dispatch( 'core/editor' ).setEditedPost\",\n\t} );\n\treturn setEditedPost( post.type, post.id );\n}\n\n/**\n * Returns an action that sets the current post Type and post ID.\n *\n * @param {string} postType Post Type.\n * @param {string} postId Post ID.\n *\n * @return {Object} Action object.\n */\nexport function setEditedPost( postType, postId ) {\n\treturn {\n\t\ttype: 'SET_EDITED_POST',\n\t\tpostType,\n\t\tpostId,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that attributes of the post have\n * been edited.\n *\n * @param {Object} edits Post attributes to edit.\n * @param {Object} [options] Options for the edit.\n *\n * @example\n * ```js\n * // Update the post title\n * wp.data.dispatch( 'core/editor' ).editPost( { title: `${ newTitle }` } );\n * ```\n *\n * @return {Object} Action object\n */\nexport const editPost =\n\t( edits, options ) =>\n\t( { select, registry } ) => {\n\t\tconst { id, type } = select.getCurrentPost();\n\t\tregistry\n\t\t\t.dispatch( coreStore )\n\t\t\t.editEntityRecord( 'postType', type, id, edits, options );\n\t};\n\n/**\n * Action for saving the current post in the editor.\n *\n * @param {Object} [options]\n */\nexport const savePost =\n\t( options = {} ) =>\n\tasync ( { select, dispatch, registry } ) => {\n\t\tif ( ! select.isEditedPostSaveable() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst content = select.getEditedPostContent();\n\n\t\tif ( ! options.isAutosave ) {\n\t\t\tdispatch.editPost( { content }, { undoIgnore: true } );\n\t\t}\n\n\t\tconst previousRecord = select.getCurrentPost();\n\t\tlet edits = {\n\t\t\tid: previousRecord.id,\n\t\t\t...registry\n\t\t\t\t.select( coreStore )\n\t\t\t\t.getEntityRecordNonTransientEdits(\n\t\t\t\t\t'postType',\n\t\t\t\t\tpreviousRecord.type,\n\t\t\t\t\tpreviousRecord.id\n\t\t\t\t),\n\t\t\tcontent,\n\t\t};\n\t\tdispatch( { type: 'REQUEST_POST_UPDATE_START', options } );\n\n\t\tlet error = false;\n\t\ttry {\n\t\t\tedits = await applyFiltersAsync(\n\t\t\t\t'editor.preSavePost',\n\t\t\t\tedits,\n\t\t\t\toptions\n\t\t\t);\n\t\t} catch ( err ) {\n\t\t\terror = err;\n\t\t}\n\n\t\tif ( ! error ) {\n\t\t\ttry {\n\t\t\t\tawait registry\n\t\t\t\t\t.dispatch( coreStore )\n\t\t\t\t\t.saveEntityRecord(\n\t\t\t\t\t\t'postType',\n\t\t\t\t\t\tpreviousRecord.type,\n\t\t\t\t\t\tedits,\n\t\t\t\t\t\toptions\n\t\t\t\t\t);\n\t\t\t} catch ( err ) {\n\t\t\t\terror =\n\t\t\t\t\terr.message && err.code !== 'unknown_error'\n\t\t\t\t\t\t? err.message\n\t\t\t\t\t\t: __( 'An error occurred while updating.' );\n\t\t\t}\n\t\t}\n\n\t\tif ( ! error ) {\n\t\t\terror = registry\n\t\t\t\t.select( coreStore )\n\t\t\t\t.getLastEntitySaveError(\n\t\t\t\t\t'postType',\n\t\t\t\t\tpreviousRecord.type,\n\t\t\t\t\tpreviousRecord.id\n\t\t\t\t);\n\t\t}\n\n\t\t// Run the hook with legacy unstable name for backward compatibility\n\t\tif ( ! error ) {\n\t\t\ttry {\n\t\t\t\tawait applyFilters(\n\t\t\t\t\t'editor.__unstableSavePost',\n\t\t\t\t\tPromise.resolve(),\n\t\t\t\t\toptions\n\t\t\t\t);\n\t\t\t} catch ( err ) {\n\t\t\t\terror = err;\n\t\t\t}\n\t\t}\n\n\t\tif ( ! error ) {\n\t\t\ttry {\n\t\t\t\tawait doActionAsync(\n\t\t\t\t\t'editor.savePost',\n\t\t\t\t\t{ id: previousRecord.id },\n\t\t\t\t\toptions\n\t\t\t\t);\n\t\t\t} catch ( err ) {\n\t\t\t\terror = err;\n\t\t\t}\n\t\t}\n\t\tdispatch( { type: 'REQUEST_POST_UPDATE_FINISH', options } );\n\n\t\tif ( error ) {\n\t\t\tconst args = getNotificationArgumentsForSaveFail( {\n\t\t\t\tpost: previousRecord,\n\t\t\t\tedits,\n\t\t\t\terror,\n\t\t\t} );\n\t\t\tif ( args.length ) {\n\t\t\t\tregistry.dispatch( noticesStore ).createErrorNotice( ...args );\n\t\t\t}\n\t\t} else {\n\t\t\tconst updatedRecord = select.getCurrentPost();\n\t\t\tconst args = getNotificationArgumentsForSaveSuccess( {\n\t\t\t\tpreviousPost: previousRecord,\n\t\t\t\tpost: updatedRecord,\n\t\t\t\tpostType: await registry\n\t\t\t\t\t.resolveSelect( coreStore )\n\t\t\t\t\t.getPostType( updatedRecord.type ),\n\t\t\t\toptions,\n\t\t\t} );\n\t\t\tif ( args.length ) {\n\t\t\t\tregistry\n\t\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t\t.createSuccessNotice( ...args );\n\t\t\t}\n\t\t\t// Make sure that any edits after saving create an undo level and are\n\t\t\t// considered for change detection.\n\t\t\tif ( ! options.isAutosave ) {\n\t\t\t\tregistry\n\t\t\t\t\t.dispatch( blockEditorStore )\n\t\t\t\t\t.__unstableMarkLastChangeAsPersistent();\n\t\t\t}\n\t\t}\n\t};\n\n/**\n * Action for refreshing the current post.\n *\n * @deprecated Since WordPress 6.0.\n */\nexport function refreshPost() {\n\tdeprecated( \"wp.data.dispatch( 'core/editor' ).refreshPost\", {\n\t\tsince: '6.0',\n\t\tversion: '6.3',\n\t\talternative: 'Use the core entities store instead',\n\t} );\n\treturn { type: 'DO_NOTHING' };\n}\n\n/**\n * Action for trashing the current post in the editor.\n */\nexport const trashPost =\n\t() =>\n\tasync ( { select, dispatch, registry } ) => {\n\t\tconst postTypeSlug = select.getCurrentPostType();\n\t\tconst postType = await registry\n\t\t\t.resolveSelect( coreStore )\n\t\t\t.getPostType( postTypeSlug );\n\t\tconst { rest_base: restBase, rest_namespace: restNamespace = 'wp/v2' } =\n\t\t\tpostType;\n\t\tdispatch( { type: 'REQUEST_POST_DELETE_START' } );\n\t\ttry {\n\t\t\tconst post = select.getCurrentPost();\n\t\t\tawait apiFetch( {\n\t\t\t\tpath: `/${ restNamespace }/${ restBase }/${ post.id }`,\n\t\t\t\tmethod: 'DELETE',\n\t\t\t} );\n\n\t\t\tawait dispatch.savePost();\n\t\t} catch ( error ) {\n\t\t\tregistry\n\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t.createErrorNotice(\n\t\t\t\t\t...getNotificationArgumentsForTrashFail( { error } )\n\t\t\t\t);\n\t\t}\n\t\tdispatch( { type: 'REQUEST_POST_DELETE_FINISH' } );\n\t};\n\n/**\n * Action that autosaves the current post. This\n * includes server-side autosaving (default) and client-side (a.k.a. local)\n * autosaving (e.g. on the Web, the post might be committed to Session\n * Storage).\n *\n * @param {Object} [options] Extra flags to identify the autosave.\n * @param {boolean} [options.local] Whether to perform a local autosave.\n */\nexport const autosave =\n\t( { local = false, ...options } = {} ) =>\n\tasync ( { select, dispatch } ) => {\n\t\tconst post = select.getCurrentPost();\n\n\t\t// Currently template autosaving is not supported.\n\t\tif ( post.type === 'wp_template' ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( local ) {\n\t\t\tconst isPostNew = select.isEditedPostNew();\n\t\t\tconst title = select.getEditedPostAttribute( 'title' );\n\t\t\tconst content = select.getEditedPostAttribute( 'content' );\n\t\t\tconst excerpt = select.getEditedPostAttribute( 'excerpt' );\n\t\t\tlocalAutosaveSet( post.id, isPostNew, title, content, excerpt );\n\t\t} else {\n\t\t\tawait dispatch.savePost( { isAutosave: true, ...options } );\n\t\t}\n\t};\n\nexport const __unstableSaveForPreview =\n\t( { forceIsAutosaveable } = {} ) =>\n\tasync ( { select, dispatch } ) => {\n\t\tif (\n\t\t\t( forceIsAutosaveable || select.isEditedPostAutosaveable() ) &&\n\t\t\t! select.isPostLocked()\n\t\t) {\n\t\t\tconst isDraft = [ 'draft', 'auto-draft' ].includes(\n\t\t\t\tselect.getEditedPostAttribute( 'status' )\n\t\t\t);\n\t\t\tif ( isDraft ) {\n\t\t\t\tawait dispatch.savePost( { isPreview: true } );\n\t\t\t} else {\n\t\t\t\tawait dispatch.autosave( { isPreview: true } );\n\t\t\t}\n\t\t}\n\n\t\treturn select.getEditedPostPreviewLink();\n\t};\n\n/**\n * Action that restores last popped state in undo history.\n */\nexport const redo =\n\t() =>\n\t( { registry } ) => {\n\t\tregistry.dispatch( coreStore ).redo();\n\t};\n\n/**\n * Action that pops a record from undo history and undoes the edit.\n */\nexport const undo =\n\t() =>\n\t( { registry } ) => {\n\t\tregistry.dispatch( coreStore ).undo();\n\t};\n\n/**\n * Action that creates an undo history record.\n *\n * @deprecated Since WordPress 6.0\n */\nexport function createUndoLevel() {\n\tdeprecated( \"wp.data.dispatch( 'core/editor' ).createUndoLevel\", {\n\t\tsince: '6.0',\n\t\tversion: '6.3',\n\t\talternative: 'Use the core entities store instead',\n\t} );\n\treturn { type: 'DO_NOTHING' };\n}\n\n/**\n * Action that locks the editor.\n *\n * @param {Object} lock Details about the post lock status, user, and nonce.\n * @return {Object} Action object.\n */\nexport function updatePostLock( lock ) {\n\treturn {\n\t\ttype: 'UPDATE_POST_LOCK',\n\t\tlock,\n\t};\n}\n\n/**\n * Enable the publish sidebar.\n */\nexport const enablePublishSidebar =\n\t() =>\n\t( { registry } ) => {\n\t\tregistry\n\t\t\t.dispatch( preferencesStore )\n\t\t\t.set( 'core', 'isPublishSidebarEnabled', true );\n\t};\n\n/**\n * Disables the publish sidebar.\n */\nexport const disablePublishSidebar =\n\t() =>\n\t( { registry } ) => {\n\t\tregistry\n\t\t\t.dispatch( preferencesStore )\n\t\t\t.set( 'core', 'isPublishSidebarEnabled', false );\n\t};\n\n/**\n * Action that locks post saving.\n *\n * @param {string} lockName The lock name.\n *\n * @example\n * ```\n * const { subscribe } = wp.data;\n *\n * const initialPostStatus = wp.data.select( 'core/editor' ).getEditedPostAttribute( 'status' );\n *\n * // Only allow publishing posts that are set to a future date.\n * if ( 'publish' !== initialPostStatus ) {\n *\n * \t// Track locking.\n * \tlet locked = false;\n *\n * \t// Watch for the publish event.\n * \tlet unssubscribe = subscribe( () => {\n * \t\tconst currentPostStatus = wp.data.select( 'core/editor' ).getEditedPostAttribute( 'status' );\n * \t\tif ( 'publish' !== currentPostStatus ) {\n *\n * \t\t\t// Compare the post date to the current date, lock the post if the date isn't in the future.\n * \t\t\tconst postDate = new Date( wp.data.select( 'core/editor' ).getEditedPostAttribute( 'date' ) );\n * \t\t\tconst currentDate = new Date();\n * \t\t\tif ( postDate.getTime() <= currentDate.getTime() ) {\n * \t\t\t\tif ( ! locked ) {\n * \t\t\t\t\tlocked = true;\n * \t\t\t\t\twp.data.dispatch( 'core/editor' ).lockPostSaving( 'futurelock' );\n * \t\t\t\t}\n * \t\t\t} else {\n * \t\t\t\tif ( locked ) {\n * \t\t\t\t\tlocked = false;\n * \t\t\t\t\twp.data.dispatch( 'core/editor' ).unlockPostSaving( 'futurelock' );\n * \t\t\t\t}\n * \t\t\t}\n * \t\t}\n * \t} );\n * }\n * ```\n *\n * @return {Object} Action object\n */\nexport function lockPostSaving( lockName ) {\n\treturn {\n\t\ttype: 'LOCK_POST_SAVING',\n\t\tlockName,\n\t};\n}\n\n/**\n * Action that unlocks post saving.\n *\n * @param {string} lockName The lock name.\n *\n * @example\n * ```\n * // Unlock post saving with the lock key `mylock`:\n * wp.data.dispatch( 'core/editor' ).unlockPostSaving( 'mylock' );\n * ```\n *\n * @return {Object} Action object\n */\nexport function unlockPostSaving( lockName ) {\n\treturn {\n\t\ttype: 'UNLOCK_POST_SAVING',\n\t\tlockName,\n\t};\n}\n\n/**\n * Action that locks post autosaving.\n *\n * @param {string} lockName The lock name.\n *\n * @example\n * ```\n * // Lock post autosaving with the lock key `mylock`:\n * wp.data.dispatch( 'core/editor' ).lockPostAutosaving( 'mylock' );\n * ```\n *\n * @return {Object} Action object\n */\nexport function lockPostAutosaving( lockName ) {\n\treturn {\n\t\ttype: 'LOCK_POST_AUTOSAVING',\n\t\tlockName,\n\t};\n}\n\n/**\n * Action that unlocks post autosaving.\n *\n * @param {string} lockName The lock name.\n *\n * @example\n * ```\n * // Unlock post saving with the lock key `mylock`:\n * wp.data.dispatch( 'core/editor' ).unlockPostAutosaving( 'mylock' );\n * ```\n *\n * @return {Object} Action object\n */\nexport function unlockPostAutosaving( lockName ) {\n\treturn {\n\t\ttype: 'UNLOCK_POST_AUTOSAVING',\n\t\tlockName,\n\t};\n}\n\n/**\n * Returns an action object used to signal that the blocks have been updated.\n *\n * @param {Array} blocks Block Array.\n * @param {Object} [options] Optional options.\n */\nexport const resetEditorBlocks =\n\t( blocks, options = {} ) =>\n\t( { select, dispatch, registry } ) => {\n\t\tconst { __unstableShouldCreateUndoLevel, selection } = options;\n\t\tconst edits = { blocks, selection };\n\n\t\tif ( __unstableShouldCreateUndoLevel !== false ) {\n\t\t\tconst { id, type } = select.getCurrentPost();\n\t\t\tconst noChange =\n\t\t\t\tregistry\n\t\t\t\t\t.select( coreStore )\n\t\t\t\t\t.getEditedEntityRecord( 'postType', type, id ).blocks ===\n\t\t\t\tedits.blocks;\n\t\t\tif ( noChange ) {\n\t\t\t\tregistry\n\t\t\t\t\t.dispatch( coreStore )\n\t\t\t\t\t.__unstableCreateUndoLevel( 'postType', type, id );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// We create a new function here on every persistent edit\n\t\t\t// to make sure the edit makes the post dirty and creates\n\t\t\t// a new undo level.\n\t\t\tedits.content = ( { blocks: blocksForSerialization = [] } ) =>\n\t\t\t\t__unstableSerializeAndClean( blocksForSerialization );\n\t\t}\n\n\t\tdispatch.editPost( edits );\n\t};\n\n/*\n * Returns an action object used in signalling that the post editor settings have been updated.\n *\n * @param {Object} settings Updated settings\n *\n * @return {Object} Action object\n */\nexport function updateEditorSettings( settings ) {\n\treturn {\n\t\ttype: 'UPDATE_EDITOR_SETTINGS',\n\t\tsettings,\n\t};\n}\n\n/**\n * Returns an action used to set the rendering mode of the post editor. We support multiple rendering modes:\n *\n * - `post-only`: This mode extracts the post blocks from the template and renders only those. The idea is to allow the user to edit the post/page in isolation without the wrapping template.\n * - `template-locked`: This mode renders both the template and the post blocks but the template blocks are locked and can't be edited. The post blocks are editable.\n *\n * @param {string} mode Mode (one of 'post-only' or 'template-locked').\n */\nexport const setRenderingMode =\n\t( mode ) =>\n\t( { dispatch, registry, select } ) => {\n\t\tif ( select.__unstableIsEditorReady() ) {\n\t\t\t// We clear the block selection but we also need to clear the selection from the core store.\n\t\t\tregistry.dispatch( blockEditorStore ).clearSelectedBlock();\n\t\t\tdispatch.editPost( { selection: undefined }, { undoIgnore: true } );\n\t\t}\n\n\t\tdispatch( {\n\t\t\ttype: 'SET_RENDERING_MODE',\n\t\t\tmode,\n\t\t} );\n\t};\n\n/**\n * Action that changes the width of the editing canvas.\n *\n * @param {string} deviceType\n *\n * @return {Object} Action object.\n */\nexport function setDeviceType( deviceType ) {\n\treturn {\n\t\ttype: 'SET_DEVICE_TYPE',\n\t\tdeviceType,\n\t};\n}\n\n/**\n * Returns an action object used to enable or disable a panel in the editor.\n *\n * @param {string} panelName A string that identifies the panel to enable or disable.\n *\n * @return {Object} Action object.\n */\nexport const toggleEditorPanelEnabled =\n\t( panelName ) =>\n\t( { registry } ) => {\n\t\tconst inactivePanels =\n\t\t\tregistry\n\t\t\t\t.select( preferencesStore )\n\t\t\t\t.get( 'core', 'inactivePanels' ) ?? [];\n\n\t\tconst isPanelInactive = !! inactivePanels?.includes( panelName );\n\n\t\t// If the panel is inactive, remove it to enable it, else add it to\n\t\t// make it inactive.\n\t\tlet updatedInactivePanels;\n\t\tif ( isPanelInactive ) {\n\t\t\tupdatedInactivePanels = inactivePanels.filter(\n\t\t\t\t( invactivePanelName ) => invactivePanelName !== panelName\n\t\t\t);\n\t\t} else {\n\t\t\tupdatedInactivePanels = [ ...inactivePanels, panelName ];\n\t\t}\n\n\t\tregistry\n\t\t\t.dispatch( preferencesStore )\n\t\t\t.set( 'core', 'inactivePanels', updatedInactivePanels );\n\t};\n\n/**\n * Opens a closed panel and closes an open panel.\n *\n * @param {string} panelName A string that identifies the panel to open or close.\n */\nexport const toggleEditorPanelOpened =\n\t( panelName ) =>\n\t( { registry } ) => {\n\t\tconst openPanels =\n\t\t\tregistry.select( preferencesStore ).get( 'core', 'openPanels' ) ??\n\t\t\t[];\n\n\t\tconst isPanelOpen = !! openPanels?.includes( panelName );\n\n\t\t// If the panel is open, remove it to close it, else add it to\n\t\t// make it open.\n\t\tlet updatedOpenPanels;\n\t\tif ( isPanelOpen ) {\n\t\t\tupdatedOpenPanels = openPanels.filter(\n\t\t\t\t( openPanelName ) => openPanelName !== panelName\n\t\t\t);\n\t\t} else {\n\t\t\tupdatedOpenPanels = [ ...openPanels, panelName ];\n\t\t}\n\n\t\tregistry\n\t\t\t.dispatch( preferencesStore )\n\t\t\t.set( 'core', 'openPanels', updatedOpenPanels );\n\t};\n\n/**\n * Returns an action object used to remove a panel from the editor.\n *\n * @param {string} panelName A string that identifies the panel to remove.\n *\n * @return {Object} Action object.\n */\nexport function removeEditorPanel( panelName ) {\n\treturn {\n\t\ttype: 'REMOVE_PANEL',\n\t\tpanelName,\n\t};\n}\n\n/**\n * Returns an action object used to open/close the inserter.\n *\n * @param {boolean|Object} value Whether the inserter should be\n * opened (true) or closed (false).\n * To specify an insertion point,\n * use an object.\n * @param {string} value.rootClientId The root client ID to insert at.\n * @param {number} value.insertionIndex The index to insert at.\n * @param {string} value.filterValue A query to filter the inserter results.\n * @param {Function} value.onSelect A callback when an item is selected.\n * @param {string} value.tab The tab to open in the inserter.\n * @param {string} value.category The category to initialize in the inserter.\n *\n * @return {Object} Action object.\n */\nexport const setIsInserterOpened =\n\t( value ) =>\n\t( { dispatch, registry } ) => {\n\t\tif (\n\t\t\ttypeof value === 'object' &&\n\t\t\tvalue.hasOwnProperty( 'rootClientId' ) &&\n\t\t\tvalue.hasOwnProperty( 'insertionIndex' )\n\t\t) {\n\t\t\tunlock( registry.dispatch( blockEditorStore ) ).setInsertionPoint( {\n\t\t\t\trootClientId: value.rootClientId,\n\t\t\t\tindex: value.insertionIndex,\n\t\t\t} );\n\t\t}\n\n\t\tdispatch( {\n\t\t\ttype: 'SET_IS_INSERTER_OPENED',\n\t\t\tvalue,\n\t\t} );\n\t};\n\n/**\n * Returns an action object used to open/close the list view.\n *\n * @param {boolean} isOpen A boolean representing whether the list view should be opened or closed.\n * @return {Object} Action object.\n */\nexport function setIsListViewOpened( isOpen ) {\n\treturn {\n\t\ttype: 'SET_IS_LIST_VIEW_OPENED',\n\t\tisOpen,\n\t};\n}\n\n/**\n * Action that toggles Distraction free mode.\n * Distraction free mode expects there are no sidebars, as due to the\n * z-index values set, you can't close sidebars.\n *\n * @param {Object} [options={}] Optional configuration object\n * @param {boolean} [options.createNotice=true] Whether to create a notice\n */\nexport const toggleDistractionFree =\n\t( { createNotice = true } = {} ) =>\n\t( { dispatch, registry } ) => {\n\t\tconst isDistractionFree = registry\n\t\t\t.select( preferencesStore )\n\t\t\t.get( 'core', 'distractionFree' );\n\t\tif ( isDistractionFree ) {\n\t\t\tregistry\n\t\t\t\t.dispatch( preferencesStore )\n\t\t\t\t.set( 'core', 'fixedToolbar', false );\n\t\t}\n\t\tif ( ! isDistractionFree ) {\n\t\t\tregistry.batch( () => {\n\t\t\t\tregistry\n\t\t\t\t\t.dispatch( preferencesStore )\n\t\t\t\t\t.set( 'core', 'fixedToolbar', true );\n\t\t\t\tdispatch.setIsInserterOpened( false );\n\t\t\t\tdispatch.setIsListViewOpened( false );\n\t\t\t\tunlock(\n\t\t\t\t\tregistry.dispatch( blockEditorStore )\n\t\t\t\t).resetZoomLevel();\n\t\t\t} );\n\t\t}\n\t\tregistry.batch( () => {\n\t\t\tregistry\n\t\t\t\t.dispatch( preferencesStore )\n\t\t\t\t.set( 'core', 'distractionFree', ! isDistractionFree );\n\n\t\t\tif ( createNotice ) {\n\t\t\t\tregistry\n\t\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t\t.createInfoNotice(\n\t\t\t\t\t\tisDistractionFree\n\t\t\t\t\t\t\t? __( 'Distraction free mode deactivated.' )\n\t\t\t\t\t\t\t: __( 'Distraction free mode activated.' ),\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tid: 'core/editor/distraction-free-mode/notice',\n\t\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t\t\tactions: [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tlabel: __( 'Undo' ),\n\t\t\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\t\t\tregistry.batch( () => {\n\t\t\t\t\t\t\t\t\t\t\tregistry\n\t\t\t\t\t\t\t\t\t\t\t\t.dispatch( preferencesStore )\n\t\t\t\t\t\t\t\t\t\t\t\t.set(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'core',\n\t\t\t\t\t\t\t\t\t\t\t\t\t'fixedToolbar',\n\t\t\t\t\t\t\t\t\t\t\t\t\tisDistractionFree\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\tregistry\n\t\t\t\t\t\t\t\t\t\t\t\t.dispatch( preferencesStore )\n\t\t\t\t\t\t\t\t\t\t\t\t.toggle(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'core',\n\t\t\t\t\t\t\t\t\t\t\t\t\t'distractionFree'\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}\n\t\t} );\n\t};\n\n/**\n * Action that toggles the Spotlight Mode view option.\n */\nexport const toggleSpotlightMode =\n\t() =>\n\t( { registry } ) => {\n\t\tregistry.dispatch( preferencesStore ).toggle( 'core', 'focusMode' );\n\n\t\tconst isFocusMode = registry\n\t\t\t.select( preferencesStore )\n\t\t\t.get( 'core', 'focusMode' );\n\n\t\tregistry\n\t\t\t.dispatch( noticesStore )\n\t\t\t.createInfoNotice(\n\t\t\t\tisFocusMode\n\t\t\t\t\t? __( 'Spotlight mode activated.' )\n\t\t\t\t\t: __( 'Spotlight mode deactivated.' ),\n\t\t\t\t{\n\t\t\t\t\tid: 'core/editor/toggle-spotlight-mode/notice',\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\tactions: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlabel: __( 'Undo' ),\n\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\tregistry\n\t\t\t\t\t\t\t\t\t.dispatch( preferencesStore )\n\t\t\t\t\t\t\t\t\t.toggle( 'core', 'focusMode' );\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t}\n\t\t\t);\n\t};\n\n/**\n * Action that toggles the Top Toolbar view option.\n */\nexport const toggleTopToolbar =\n\t() =>\n\t( { registry } ) => {\n\t\tregistry.dispatch( preferencesStore ).toggle( 'core', 'fixedToolbar' );\n\n\t\tconst isTopToolbar = registry\n\t\t\t.select( preferencesStore )\n\t\t\t.get( 'core', 'fixedToolbar' );\n\n\t\tregistry\n\t\t\t.dispatch( noticesStore )\n\t\t\t.createInfoNotice(\n\t\t\t\tisTopToolbar\n\t\t\t\t\t? __( 'Top toolbar activated.' )\n\t\t\t\t\t: __( 'Top toolbar deactivated.' ),\n\t\t\t\t{\n\t\t\t\t\tid: 'core/editor/toggle-top-toolbar/notice',\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\tactions: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlabel: __( 'Undo' ),\n\n\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\tregistry\n\t\t\t\t\t\t\t\t\t.dispatch( preferencesStore )\n\t\t\t\t\t\t\t\t\t.toggle( 'core', 'fixedToolbar' );\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t}\n\t\t\t);\n\t};\n\n/**\n * Triggers an action used to switch editor mode.\n *\n * @param {string} mode The editor mode.\n */\nexport const switchEditorMode =\n\t( mode ) =>\n\t( { dispatch, registry } ) => {\n\t\tregistry.dispatch( preferencesStore ).set( 'core', 'editorMode', mode );\n\n\t\tif ( mode !== 'visual' ) {\n\t\t\t// Unselect blocks when we switch to a non visual mode.\n\t\t\tregistry.dispatch( blockEditorStore ).clearSelectedBlock();\n\t\t\t// Exit zoom out state when switching to a non visual mode.\n\t\t\tunlock( registry.dispatch( blockEditorStore ) ).resetZoomLevel();\n\t\t}\n\n\t\tif ( mode === 'visual' ) {\n\t\t\tspeak( __( 'Visual editor selected' ), 'assertive' );\n\t\t} else if ( mode === 'text' ) {\n\t\t\tconst isDistractionFree = registry\n\t\t\t\t.select( preferencesStore )\n\t\t\t\t.get( 'core', 'distractionFree' );\n\t\t\tif ( isDistractionFree ) {\n\t\t\t\tdispatch.toggleDistractionFree();\n\t\t\t}\n\t\t\tspeak( __( 'Code editor selected' ), 'assertive' );\n\t\t}\n\t};\n\n/**\n * Returns an action object used in signalling that the user opened the publish\n * sidebar.\n *\n * @return {Object} Action object\n */\nexport function openPublishSidebar() {\n\treturn {\n\t\ttype: 'OPEN_PUBLISH_SIDEBAR',\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the user closed the\n * publish sidebar.\n *\n * @return {Object} Action object.\n */\nexport function closePublishSidebar() {\n\treturn {\n\t\ttype: 'CLOSE_PUBLISH_SIDEBAR',\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the user toggles the publish sidebar.\n *\n * @return {Object} Action object\n */\nexport function togglePublishSidebar() {\n\treturn {\n\t\ttype: 'TOGGLE_PUBLISH_SIDEBAR',\n\t};\n}\n\n/**\n * Backward compatibility\n */\n\nconst getBlockEditorAction =\n\t( name ) =>\n\t( ...args ) =>\n\t( { registry } ) => {\n\t\tdeprecated( \"`wp.data.dispatch( 'core/editor' ).\" + name + '`', {\n\t\t\tsince: '5.3',\n\t\t\talternative:\n\t\t\t\t\"`wp.data.dispatch( 'core/block-editor' ).\" + name + '`',\n\t\t\tversion: '6.2',\n\t\t} );\n\t\tregistry.dispatch( blockEditorStore )[ name ]( ...args );\n\t};\n\n/**\n * @see resetBlocks in core/block-editor store.\n */\nexport const resetBlocks = getBlockEditorAction( 'resetBlocks' );\n\n/**\n * @see receiveBlocks in core/block-editor store.\n */\nexport const receiveBlocks = getBlockEditorAction( 'receiveBlocks' );\n\n/**\n * @see updateBlock in core/block-editor store.\n */\nexport const updateBlock = getBlockEditorAction( 'updateBlock' );\n\n/**\n * @see updateBlockAttributes in core/block-editor store.\n */\nexport const updateBlockAttributes = getBlockEditorAction(\n\t'updateBlockAttributes'\n);\n\n/**\n * @see selectBlock in core/block-editor store.\n */\nexport const selectBlock = getBlockEditorAction( 'selectBlock' );\n\n/**\n * @see startMultiSelect in core/block-editor store.\n */\nexport const startMultiSelect = getBlockEditorAction( 'startMultiSelect' );\n\n/**\n * @see stopMultiSelect in core/block-editor store.\n */\nexport const stopMultiSelect = getBlockEditorAction( 'stopMultiSelect' );\n\n/**\n * @see multiSelect in core/block-editor store.\n */\nexport const multiSelect = getBlockEditorAction( 'multiSelect' );\n\n/**\n * @see clearSelectedBlock in core/block-editor store.\n */\nexport const clearSelectedBlock = getBlockEditorAction( 'clearSelectedBlock' );\n\n/**\n * @see toggleSelection in core/block-editor store.\n */\nexport const toggleSelection = getBlockEditorAction( 'toggleSelection' );\n\n/**\n * @see replaceBlocks in core/block-editor store.\n */\nexport const replaceBlocks = getBlockEditorAction( 'replaceBlocks' );\n\n/**\n * @see replaceBlock in core/block-editor store.\n */\nexport const replaceBlock = getBlockEditorAction( 'replaceBlock' );\n\n/**\n * @see moveBlocksDown in core/block-editor store.\n */\nexport const moveBlocksDown = getBlockEditorAction( 'moveBlocksDown' );\n\n/**\n * @see moveBlocksUp in core/block-editor store.\n */\nexport const moveBlocksUp = getBlockEditorAction( 'moveBlocksUp' );\n\n/**\n * @see moveBlockToPosition in core/block-editor store.\n */\nexport const moveBlockToPosition = getBlockEditorAction(\n\t'moveBlockToPosition'\n);\n\n/**\n * @see insertBlock in core/block-editor store.\n */\nexport const insertBlock = getBlockEditorAction( 'insertBlock' );\n\n/**\n * @see insertBlocks in core/block-editor store.\n */\nexport const insertBlocks = getBlockEditorAction( 'insertBlocks' );\n\n/**\n * @see showInsertionPoint in core/block-editor store.\n */\nexport const showInsertionPoint = getBlockEditorAction( 'showInsertionPoint' );\n\n/**\n * @see hideInsertionPoint in core/block-editor store.\n */\nexport const hideInsertionPoint = getBlockEditorAction( 'hideInsertionPoint' );\n\n/**\n * @see setTemplateValidity in core/block-editor store.\n */\nexport const setTemplateValidity = getBlockEditorAction(\n\t'setTemplateValidity'\n);\n\n/**\n * @see synchronizeTemplate in core/block-editor store.\n */\nexport const synchronizeTemplate = getBlockEditorAction(\n\t'synchronizeTemplate'\n);\n\n/**\n * @see mergeBlocks in core/block-editor store.\n */\nexport const mergeBlocks = getBlockEditorAction( 'mergeBlocks' );\n\n/**\n * @see removeBlocks in core/block-editor store.\n */\nexport const removeBlocks = getBlockEditorAction( 'removeBlocks' );\n\n/**\n * @see removeBlock in core/block-editor store.\n */\nexport const removeBlock = getBlockEditorAction( 'removeBlock' );\n\n/**\n * @see toggleBlockMode in core/block-editor store.\n */\nexport const toggleBlockMode = getBlockEditorAction( 'toggleBlockMode' );\n\n/**\n * @see startTyping in core/block-editor store.\n */\nexport const startTyping = getBlockEditorAction( 'startTyping' );\n\n/**\n * @see stopTyping in core/block-editor store.\n */\nexport const stopTyping = getBlockEditorAction( 'stopTyping' );\n\n/**\n * @see enterFormattedText in core/block-editor store.\n */\nexport const enterFormattedText = getBlockEditorAction( 'enterFormattedText' );\n\n/**\n * @see exitFormattedText in core/block-editor store.\n */\nexport const exitFormattedText = getBlockEditorAction( 'exitFormattedText' );\n\n/**\n * @see insertDefaultBlock in core/block-editor store.\n */\nexport const insertDefaultBlock = getBlockEditorAction( 'insertDefaultBlock' );\n\n/**\n * @see updateBlockListSettings in core/block-editor store.\n */\nexport const updateBlockListSettings = getBlockEditorAction(\n\t'updateBlockListSettings'\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,WAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AAKA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,SAAA,GAAAN,OAAA;AACA,IAAAO,YAAA,GAAAP,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AAKA,IAAAS,YAAA,GAAAT,OAAA;AACA,IAAAU,KAAA,GAAAV,OAAA;AAKA,IAAAW,cAAA,GAAAX,OAAA;AACA,IAAAY,cAAA,GAAAZ,OAAA;AAKA,IAAAa,WAAA,GAAAb,OAAA;AA/BA;AACA;AACA;;AAoBA;AACA;AACA;;AAQA;AACA;AACA;AACA;AACA;AACA;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qBACD,CAAC;;AAED;AACA;AACA;AACO,MAAMsB,WAAW,GAAA7K,OAAA,CAAA6K,WAAA,GAAGtB,oBAAoB,CAAE,aAAc,CAAC;;AAEhE;AACA;AACA;AACO,MAAMuB,YAAY,GAAA9K,OAAA,CAAA8K,YAAA,GAAGvB,oBAAoB,CAAE,cAAe,CAAC;;AAElE;AACA;AACA;AACO,MAAMwB,WAAW,GAAA/K,OAAA,CAAA+K,WAAA,GAAGxB,oBAAoB,CAAE,aAAc,CAAC;;AAEhE;AACA;AACA;AACO,MAAMyB,eAAe,GAAAhL,OAAA,CAAAgL,eAAA,GAAGzB,oBAAoB,CAAE,iBAAkB,CAAC;;AAExE;AACA;AACA;AACO,MAAM0B,WAAW,GAAAjL,OAAA,CAAAiL,WAAA,GAAG1B,oBAAoB,CAAE,aAAc,CAAC;;AAEhE;AACA;AACA;AACO,MAAM2B,UAAU,GAAAlL,OAAA,CAAAkL,UAAA,GAAG3B,oBAAoB,CAAE,YAAa,CAAC;;AAE9D;AACA;AACA;AACO,MAAM4B,kBAAkB,GAAAnL,OAAA,CAAAmL,kBAAA,GAAG5B,oBAAoB,CAAE,oBAAqB,CAAC;;AAE9E;AACA;AACA;AACO,MAAM6B,iBAAiB,GAAApL,OAAA,CAAAoL,iBAAA,GAAG7B,oBAAoB,CAAE,mBAAoB,CAAC;;AAE5E;AACA;AACA;AACO,MAAM8B,kBAAkB,GAAArL,OAAA,CAAAqL,kBAAA,GAAG9B,oBAAoB,CAAE,oBAAqB,CAAC;;AAE9E;AACA;AACA;AACO,MAAM+B,uBAAuB,GAAAtL,OAAA,CAAAsL,uBAAA,GAAG/B,oBAAoB,CAC1D,yBACD,CAAC","ignoreList":[]}
@@ -359,10 +359,14 @@ const getNestedEditedPostProperty = (0, _data.createSelector)((state, attributeN
359
359
  * const getFeaturedMediaUrl = useSelect( ( select ) => {
360
360
  * const getFeaturedMediaId =
361
361
  * select( 'core/editor' ).getEditedPostAttribute( 'featured_media' );
362
- * const getMedia = select( 'core' ).getMedia( getFeaturedMediaId );
362
+ * const media = select( 'core' ).getEntityRecord(
363
+ * 'postType',
364
+ * 'attachment',
365
+ * getFeaturedMediaId
366
+ * );
363
367
  *
364
368
  * return (
365
- * getMedia?.media_details?.sizes?.large?.source_url || getMedia?.source_url || ''
369
+ * media?.media_details?.sizes?.large?.source_url || media?.source_url || ''
366
370
  * );
367
371
  * }, [] );
368
372
  *```
@@ -592,9 +596,11 @@ const isEditedPostAutosaveable = exports.isEditedPostAutosaveable = (0, _data.cr
592
596
  return false;
593
597
  }
594
598
  const postType = getCurrentPostType(state);
599
+ const postTypeObject = select(_coreData.store).getPostType(postType);
595
600
 
596
601
  // Currently template autosaving is not supported.
597
- if (postType === 'wp_template') {
602
+ // @todo: Remove hardcode check for template after bumping required WP version to 6.8.
603
+ if (postType === 'wp_template' || !postTypeObject?.supports?.autosave) {
598
604
  return false;
599
605
  }
600
606
  const postId = getCurrentPostId(state);