@wordpress/edit-post 8.50.0 → 8.50.1-next.v.202607070741.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.
@@ -1,8 +1,6 @@
1
- var __create = Object.create;
2
1
  var __defProp = Object.defineProperty;
3
2
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
5
  var __export = (target, all) => {
8
6
  for (var name in all)
@@ -16,14 +14,6 @@ var __copyProps = (to, from, except, desc) => {
16
14
  }
17
15
  return to;
18
16
  };
19
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
- // If the importer is in node compatibility mode or this is not an ESM
21
- // file that has been converted to a CommonJS file using a Babel-
22
- // compatible transform (i.e. "__esModule" has not been set), then set
23
- // "default" to the CommonJS "module.exports" for node compatibility.
24
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
- mod
26
- ));
27
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
18
 
29
19
  // packages/edit-post/src/components/back-button/fullscreen-mode-close.js
@@ -32,7 +22,6 @@ __export(fullscreen_mode_close_exports, {
32
22
  default: () => fullscreen_mode_close_default
33
23
  });
34
24
  module.exports = __toCommonJS(fullscreen_mode_close_exports);
35
- var import_clsx = __toESM(require("clsx"));
36
25
  var import_data = require("@wordpress/data");
37
26
  var import_components = require("@wordpress/components");
38
27
  var import_i18n = require("@wordpress/i18n");
@@ -40,131 +29,42 @@ var import_url = require("@wordpress/url");
40
29
  var import_icons = require("@wordpress/icons");
41
30
  var import_editor = require("@wordpress/editor");
42
31
  var import_core_data = require("@wordpress/core-data");
43
- var import_compose = require("@wordpress/compose");
44
32
  var import_jsx_runtime = require("react/jsx-runtime");
45
- var siteIconVariants = {
46
- edit: {
47
- clipPath: "inset(0% round 0px)"
48
- },
49
- hover: {
50
- clipPath: "inset( 22% round 2px )"
51
- },
52
- tap: {
53
- clipPath: "inset(0% round 0px)"
54
- }
55
- };
56
- var toggleHomeIconVariants = {
57
- edit: {
58
- opacity: 0,
59
- scale: 0.2
60
- },
61
- hover: {
62
- opacity: 1,
63
- scale: 1,
64
- clipPath: "inset( 22% round 2px )"
65
- }
66
- };
67
33
  function FullscreenModeClose({ showTooltip, icon, href, initialPost }) {
68
- const { isRequestingSiteIcon, postType, siteIconUrl } = (0, import_data.useSelect)(
34
+ const postType = (0, import_data.useSelect)(
69
35
  (select) => {
70
36
  const { getCurrentPostType } = select(import_editor.store);
71
- const { getEntityRecord, getPostType, isResolving } = select(import_core_data.store);
72
- const siteData = getEntityRecord("root", "__unstableBase", void 0) || {};
73
- const _postType = initialPost?.type || getCurrentPostType();
74
- return {
75
- isRequestingSiteIcon: isResolving("getEntityRecord", [
76
- "root",
77
- "__unstableBase",
78
- void 0
79
- ]),
80
- postType: getPostType(_postType),
81
- siteIconUrl: siteData.site_icon_url
82
- };
37
+ const { getPostType } = select(import_core_data.store);
38
+ return getPostType(initialPost?.type || getCurrentPostType());
83
39
  },
84
40
  [initialPost?.type]
85
41
  );
86
- const disableMotion = (0, import_compose.useReducedMotion)();
87
- const transition = {
88
- duration: disableMotion ? 0 : 0.2
89
- };
90
42
  if (!postType) {
91
43
  return null;
92
44
  }
93
- let siteIconContent;
94
- if (isRequestingSiteIcon && !siteIconUrl) {
95
- siteIconContent = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "edit-post-fullscreen-mode-close-site-icon__image" });
96
- } else if (siteIconUrl) {
97
- siteIconContent = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
98
- "img",
45
+ const buttonHref = href ?? (0, import_url.addQueryArgs)("edit.php", {
46
+ post_type: postType.slug
47
+ });
48
+ const buttonLabel = postType?.labels?.view_items ?? (0, import_i18n.__)("Back");
49
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "edit-post-fullscreen-mode-close__view-mode-toggle", children: [
50
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
51
+ import_components.Button,
99
52
  {
100
- className: "edit-post-fullscreen-mode-close-site-icon__image",
101
- alt: (0, import_i18n.__)("Site Icon"),
102
- src: siteIconUrl
53
+ __next40pxDefaultSize: true,
54
+ className: "edit-post-fullscreen-mode-close",
55
+ href: buttonHref,
56
+ label: buttonLabel,
57
+ showTooltip,
58
+ tooltipPosition: "bottom"
103
59
  }
104
- );
105
- } else {
106
- siteIconContent = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
60
+ ),
61
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "edit-post-fullscreen-mode-close__back-icon", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
107
62
  import_components.Icon,
108
63
  {
109
- className: "edit-post-fullscreen-mode-close-site-icon__icon",
110
- icon: import_icons.wordpress,
111
- size: 48
64
+ icon: icon ?? ((0, import_i18n.isRTL)() ? import_icons.chevronRight : import_icons.chevronLeft)
112
65
  }
113
- );
114
- }
115
- const buttonIcon = icon ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components.Icon, { size: "36px", icon }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "edit-post-fullscreen-mode-close-site-icon", children: siteIconContent });
116
- const classes = (0, import_clsx.default)("edit-post-fullscreen-mode-close", {
117
- "has-icon": siteIconUrl
118
- });
119
- const buttonHref = href ?? (0, import_url.addQueryArgs)("edit.php", {
120
- post_type: postType.slug
121
- });
122
- const buttonLabel = postType?.labels?.view_items ?? (0, import_i18n.__)("Back");
123
- const hasAdminBarInEditor = window.__experimentalAdminBarInEditor;
124
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
125
- import_components.__unstableMotion.div,
126
- {
127
- className: "edit-post-fullscreen-mode-close__view-mode-toggle",
128
- animate: "edit",
129
- initial: "edit",
130
- whileHover: "hover",
131
- whileTap: "tap",
132
- transition,
133
- children: [
134
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
135
- import_components.Button,
136
- {
137
- __next40pxDefaultSize: true,
138
- className: classes,
139
- href: buttonHref,
140
- label: buttonLabel,
141
- showTooltip,
142
- tooltipPosition: "bottom",
143
- children: !hasAdminBarInEditor && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
144
- import_components.__unstableMotion.div,
145
- {
146
- variants: !disableMotion && siteIconVariants,
147
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "edit-post-fullscreen-mode-close__view-mode-toggle-icon", children: buttonIcon })
148
- }
149
- )
150
- }
151
- ),
152
- hasAdminBarInEditor ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "edit-post-fullscreen-mode-close__back-icon", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components.Icon, { icon: (0, import_i18n.isRTL)() ? import_icons.chevronRight : import_icons.chevronLeft }) }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
153
- import_components.__unstableMotion.div,
154
- {
155
- className: (0, import_clsx.default)(
156
- "edit-post-fullscreen-mode-close__back-icon",
157
- {
158
- "has-site-icon": siteIconUrl
159
- }
160
- ),
161
- variants: !disableMotion && toggleHomeIconVariants,
162
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components.Icon, { icon: (0, import_i18n.isRTL)() ? import_icons.arrowUpRight : import_icons.arrowUpLeft })
163
- }
164
- )
165
- ]
166
- }
167
- );
66
+ ) })
67
+ ] });
168
68
  }
169
69
  var fullscreen_mode_close_default = FullscreenModeClose;
170
70
  //# sourceMappingURL=fullscreen-mode-close.cjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/back-button/fullscreen-mode-close.js"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport {\n\tButton,\n\tIcon as WCIcon,\n\t__unstableMotion as motion,\n} from '@wordpress/components';\nimport { __, isRTL } from '@wordpress/i18n';\nimport { addQueryArgs } from '@wordpress/url';\nimport {\n\twordpress,\n\tarrowUpLeft,\n\tarrowUpRight,\n\tchevronLeft,\n\tchevronRight,\n} from '@wordpress/icons';\nimport { store as editorStore } from '@wordpress/editor';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useReducedMotion } from '@wordpress/compose';\n\nconst siteIconVariants = {\n\tedit: {\n\t\tclipPath: 'inset(0% round 0px)',\n\t},\n\thover: {\n\t\tclipPath: 'inset( 22% round 2px )',\n\t},\n\ttap: {\n\t\tclipPath: 'inset(0% round 0px)',\n\t},\n};\n\nconst toggleHomeIconVariants = {\n\tedit: {\n\t\topacity: 0,\n\t\tscale: 0.2,\n\t},\n\thover: {\n\t\topacity: 1,\n\t\tscale: 1,\n\t\tclipPath: 'inset( 22% round 2px )',\n\t},\n};\n\nfunction FullscreenModeClose( { showTooltip, icon, href, initialPost } ) {\n\tconst { isRequestingSiteIcon, postType, siteIconUrl } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getCurrentPostType } = select( editorStore );\n\t\t\tconst { getEntityRecord, getPostType, isResolving } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst siteData =\n\t\t\t\tgetEntityRecord( 'root', '__unstableBase', undefined ) || {};\n\t\t\tconst _postType = initialPost?.type || getCurrentPostType();\n\t\t\treturn {\n\t\t\t\tisRequestingSiteIcon: isResolving( 'getEntityRecord', [\n\t\t\t\t\t'root',\n\t\t\t\t\t'__unstableBase',\n\t\t\t\t\tundefined,\n\t\t\t\t] ),\n\t\t\t\tpostType: getPostType( _postType ),\n\t\t\t\tsiteIconUrl: siteData.site_icon_url,\n\t\t\t};\n\t\t},\n\t\t[ initialPost?.type ]\n\t);\n\n\tconst disableMotion = useReducedMotion();\n\tconst transition = {\n\t\tduration: disableMotion ? 0 : 0.2,\n\t};\n\n\tif ( ! postType ) {\n\t\treturn null;\n\t}\n\n\t// Create SiteIcon equivalent structure exactly like edit-site\n\tlet siteIconContent;\n\tif ( isRequestingSiteIcon && ! siteIconUrl ) {\n\t\tsiteIconContent = (\n\t\t\t<div className=\"edit-post-fullscreen-mode-close-site-icon__image\" />\n\t\t);\n\t} else if ( siteIconUrl ) {\n\t\tsiteIconContent = (\n\t\t\t<img\n\t\t\t\tclassName=\"edit-post-fullscreen-mode-close-site-icon__image\"\n\t\t\t\talt={ __( 'Site Icon' ) }\n\t\t\t\tsrc={ siteIconUrl }\n\t\t\t/>\n\t\t);\n\t} else {\n\t\tsiteIconContent = (\n\t\t\t<WCIcon\n\t\t\t\tclassName=\"edit-post-fullscreen-mode-close-site-icon__icon\"\n\t\t\t\ticon={ wordpress }\n\t\t\t\tsize={ 48 }\n\t\t\t/>\n\t\t);\n\t}\n\n\t// Override default icon if custom icon is provided via props.\n\tconst buttonIcon = icon ? (\n\t\t<WCIcon size=\"36px\" icon={ icon } />\n\t) : (\n\t\t<div className=\"edit-post-fullscreen-mode-close-site-icon\">\n\t\t\t{ siteIconContent }\n\t\t</div>\n\t);\n\n\tconst classes = clsx( 'edit-post-fullscreen-mode-close', {\n\t\t'has-icon': siteIconUrl,\n\t} );\n\n\tconst buttonHref =\n\t\thref ??\n\t\taddQueryArgs( 'edit.php', {\n\t\t\tpost_type: postType.slug,\n\t\t} );\n\n\tconst buttonLabel = postType?.labels?.view_items ?? __( 'Back' );\n\n\tconst hasAdminBarInEditor = window.__experimentalAdminBarInEditor;\n\n\treturn (\n\t\t<motion.div\n\t\t\tclassName=\"edit-post-fullscreen-mode-close__view-mode-toggle\"\n\t\t\tanimate=\"edit\"\n\t\t\tinitial=\"edit\"\n\t\t\twhileHover=\"hover\"\n\t\t\twhileTap=\"tap\"\n\t\t\ttransition={ transition }\n\t\t>\n\t\t\t<Button\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\tclassName={ classes }\n\t\t\t\thref={ buttonHref }\n\t\t\t\tlabel={ buttonLabel }\n\t\t\t\tshowTooltip={ showTooltip }\n\t\t\t\ttooltipPosition=\"bottom\"\n\t\t\t>\n\t\t\t\t{ ! hasAdminBarInEditor && (\n\t\t\t\t\t<motion.div\n\t\t\t\t\t\tvariants={ ! disableMotion && siteIconVariants }\n\t\t\t\t\t>\n\t\t\t\t\t\t<div className=\"edit-post-fullscreen-mode-close__view-mode-toggle-icon\">\n\t\t\t\t\t\t\t{ buttonIcon }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</motion.div>\n\t\t\t\t) }\n\t\t\t</Button>\n\t\t\t{ hasAdminBarInEditor ? (\n\t\t\t\t<div className=\"edit-post-fullscreen-mode-close__back-icon\">\n\t\t\t\t\t<WCIcon icon={ isRTL() ? chevronRight : chevronLeft } />\n\t\t\t\t</div>\n\t\t\t) : (\n\t\t\t\t<motion.div\n\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t'edit-post-fullscreen-mode-close__back-icon',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'has-site-icon': siteIconUrl,\n\t\t\t\t\t\t}\n\t\t\t\t\t) }\n\t\t\t\t\tvariants={ ! disableMotion && toggleHomeIconVariants }\n\t\t\t\t>\n\t\t\t\t\t<WCIcon icon={ isRTL() ? arrowUpRight : arrowUpLeft } />\n\t\t\t\t</motion.div>\n\t\t\t) }\n\t\t</motion.div>\n\t);\n}\n\nexport default FullscreenModeClose;\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAKjB,kBAA0B;AAC1B,wBAIO;AACP,kBAA0B;AAC1B,iBAA6B;AAC7B,mBAMO;AACP,oBAAqC;AACrC,uBAAmC;AACnC,qBAAiC;AA6D9B;AA3DH,IAAM,mBAAmB;AAAA,EACxB,MAAM;AAAA,IACL,UAAU;AAAA,EACX;AAAA,EACA,OAAO;AAAA,IACN,UAAU;AAAA,EACX;AAAA,E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AEF;AAEF;AAEA,IAAO,gCAAQ;",
6
- "names": ["editorStore", "coreStore", "WCIcon", "clsx", "motion"]
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { Button, Icon as WCIcon } from '@wordpress/components';\nimport { __, isRTL } from '@wordpress/i18n';\nimport { addQueryArgs } from '@wordpress/url';\nimport { chevronLeft, chevronRight } from '@wordpress/icons';\nimport { store as editorStore } from '@wordpress/editor';\nimport { store as coreStore } from '@wordpress/core-data';\n\nfunction FullscreenModeClose( { showTooltip, icon, href, initialPost } ) {\n\tconst postType = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getCurrentPostType } = select( editorStore );\n\t\t\tconst { getPostType } = select( coreStore );\n\t\t\treturn getPostType( initialPost?.type || getCurrentPostType() );\n\t\t},\n\t\t[ initialPost?.type ]\n\t);\n\n\tif ( ! postType ) {\n\t\treturn null;\n\t}\n\n\tconst buttonHref =\n\t\thref ??\n\t\taddQueryArgs( 'edit.php', {\n\t\t\tpost_type: postType.slug,\n\t\t} );\n\n\tconst buttonLabel = postType?.labels?.view_items ?? __( 'Back' );\n\n\treturn (\n\t\t<div className=\"edit-post-fullscreen-mode-close__view-mode-toggle\">\n\t\t\t<Button\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\tclassName=\"edit-post-fullscreen-mode-close\"\n\t\t\t\thref={ buttonHref }\n\t\t\t\tlabel={ buttonLabel }\n\t\t\t\tshowTooltip={ showTooltip }\n\t\t\t\ttooltipPosition=\"bottom\"\n\t\t\t/>\n\t\t\t<div className=\"edit-post-fullscreen-mode-close__back-icon\">\n\t\t\t\t<WCIcon\n\t\t\t\t\ticon={ icon ?? ( isRTL() ? chevronRight : chevronLeft ) }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n\nexport default FullscreenModeClose;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAA0B;AAC1B,wBAAuC;AACvC,kBAA0B;AAC1B,iBAA6B;AAC7B,mBAA0C;AAC1C,oBAAqC;AACrC,uBAAmC;AAyBjC;AAvBF,SAAS,oBAAqB,EAAE,aAAa,MAAM,MAAM,YAAY,GAAI;AACxE,QAAM,eAAW;AAAA,IAChB,CAAE,WAAY;AACb,YAAM,EAAE,mBAAmB,IAAI,OAAQ,cAAAA,KAAY;AACnD,YAAM,EAAE,YAAY,IAAI,OAAQ,iBAAAC,KAAU;AAC1C,aAAO,YAAa,aAAa,QAAQ,mBAAmB,CAAE;AAAA,IAC/D;AAAA,IACA,CAAE,aAAa,IAAK;AAAA,EACrB;AAEA,MAAK,CAAE,UAAW;AACjB,WAAO;AAAA,EACR;AAEA,QAAM,aACL,YACA,yBAAc,YAAY;AAAA,IACzB,WAAW,SAAS;AAAA,EACrB,CAAE;AAEH,QAAM,cAAc,UAAU,QAAQ,kBAAc,gBAAI,MAAO;AAE/D,SACC,6CAAC,SAAI,WAAU,qDACd;AAAA;AAAA,MAAC;AAAA;AAAA,QACA,uBAAqB;AAAA,QACrB,WAAU;AAAA,QACV,MAAO;AAAA,QACP,OAAQ;AAAA,QACR;AAAA,QACA,iBAAgB;AAAA;AAAA,IACjB;AAAA,IACA,4CAAC,SAAI,WAAU,8CACd;AAAA,MAAC,kBAAAC;AAAA,MAAA;AAAA,QACA,MAAO,aAAU,mBAAM,IAAI,4BAAe;AAAA;AAAA,IAC3C,GACD;AAAA,KACD;AAEF;AAEA,IAAO,gCAAQ;",
6
+ "names": ["editorStore", "coreStore", "WCIcon"]
7
7
  }
package/build/index.cjs CHANGED
@@ -84,7 +84,9 @@ function initializeEditor(id, postType, postId, settings, initialEdits) {
84
84
  enableChoosePatternModal: true,
85
85
  isPublishSidebarEnabled: true,
86
86
  showCollaborationCursor: false,
87
- showCollaborationNotifications: true
87
+ showCollaborationJoinNotifications: true,
88
+ showCollaborationLeaveNotifications: true,
89
+ showCollaborationPostSaveNotifications: true
88
90
  });
89
91
  if (window.__clientSideMediaProcessing) {
90
92
  (0, import_data.dispatch)(import_preferences.store).setDefaults("core/media", {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/index.js"],
4
- "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport {\n\tregisterCoreBlocks,\n\t__experimentalRegisterExperimentalCoreBlocks,\n} from '@wordpress/block-library';\nimport deprecated from '@wordpress/deprecated';\nimport { createRoot, StrictMode } from '@wordpress/element';\nimport { dispatch, resolveSelect, select } from '@wordpress/data';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport {\n\tregisterLegacyWidgetBlock,\n\tregisterWidgetGroupBlock,\n} from '@wordpress/widgets';\nimport {\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\nimport { store as coreDataStore } from '@wordpress/core-data';\nimport apiFetch from '@wordpress/api-fetch';\n\n/**\n * Internal dependencies\n */\nimport Layout from './components/layout';\nimport { unlock } from './lock-unlock';\n\nconst {\n\tBackButton: __experimentalMainDashboardButton,\n\tregisterCoreBlockBindingsSources,\n} = unlock( editorPrivateApis );\n\nconst { enablePreloadMultiUse, clearPreloadedData } = unlock(\n\tapiFetch.privateApis\n);\n\n/**\n * Initializes and returns an instance of Editor.\n *\n * @param {string} id Unique identifier for editor instance.\n * @param {string} postType Post type of the post to edit.\n * @param {Object} postId ID of the post to edit.\n * @param {?Object} settings Editor settings object.\n * @param {Object} initialEdits Programmatic edits to apply initially, to be\n * considered as non-user-initiated (bypass for\n * unsaved changes prompt).\n */\nexport function initializeEditor(\n\tid,\n\tpostType,\n\tpostId,\n\tsettings,\n\tinitialEdits\n) {\n\tconst isMediumOrBigger = window.matchMedia( '(min-width: 782px)' ).matches;\n\tconst target = document.getElementById( id );\n\tconst root = createRoot( target );\n\n\tdispatch( preferencesStore ).setDefaults( 'core/edit-post', {\n\t\tfullscreenMode: true,\n\t\tthemeStyles: true,\n\t\twelcomeGuide: true,\n\t\twelcomeGuideTemplate: true,\n\t} );\n\n\tdispatch( preferencesStore ).setDefaults( 'core', {\n\t\tallowRightClickOverrides: true,\n\t\teditorMode: 'visual',\n\t\teditorTool: 'edit',\n\t\tfixedToolbar: false,\n\t\thiddenBlockTypes: [],\n\t\tinactivePanels: [],\n\t\topenPanels: [ 'post-status' ],\n\t\tshowBlockBreadcrumbs: true,\n\t\tshowIconLabels: false,\n\t\tshowListViewByDefault: false,\n\t\tenableChoosePatternModal: true,\n\t\tisPublishSidebarEnabled: true,\n\t\tshowCollaborationCursor: false,\n\t\tshowCollaborationNotifications: true,\n\t} );\n\n\tif ( window.__clientSideMediaProcessing ) {\n\t\tdispatch( preferencesStore ).setDefaults( 'core/media', {\n\t\t\trequireApproval: true,\n\t\t\toptimizeOnUpload: true,\n\t\t} );\n\t}\n\n\tdispatch( blocksStore ).reapplyBlockTypeFilters();\n\n\t// Check if the block list view should be open by default.\n\t// If `distractionFree` mode is enabled, the block list view should not be open.\n\t// This behavior is disabled for small viewports.\n\tif (\n\t\tisMediumOrBigger &&\n\t\tselect( preferencesStore ).get( 'core', 'showListViewByDefault' ) &&\n\t\t! select( preferencesStore ).get( 'core', 'distractionFree' )\n\t) {\n\t\tdispatch( editorStore ).setIsListViewOpened( true );\n\t}\n\n\tregisterCoreBlocks();\n\tregisterCoreBlockBindingsSources();\n\tregisterLegacyWidgetBlock( { inserter: false } );\n\tregisterWidgetGroupBlock( { inserter: false } );\n\tif ( globalThis.IS_GUTENBERG_PLUGIN ) {\n\t\t__experimentalRegisterExperimentalCoreBlocks( {\n\t\t\tenableFSEBlocks: settings.__unstableEnableFullSiteEditingBlocks,\n\t\t} );\n\t}\n\n\t// Show a console log warning if the browser is not in Standards rendering mode.\n\tconst documentMode =\n\t\tdocument.compatMode === 'CSS1Compat' ? 'Standards' : 'Quirks';\n\tif ( documentMode !== 'Standards' ) {\n\t\t// eslint-disable-next-line no-console\n\t\tconsole.warn(\n\t\t\t\"Your browser is using Quirks Mode. \\nThis can cause rendering issues such as blocks overlaying meta boxes in the editor. Quirks Mode can be triggered by PHP errors or HTML code appearing before the opening <!DOCTYPE html>. Try checking the raw page source or your site's PHP error log and resolving errors there, removing any HTML before the doctype, or disabling plugins.\"\n\t\t);\n\t}\n\n\t// This is a temporary fix for a couple of issues specific to Webkit on iOS.\n\t// Without this hack the browser scrolls the mobile toolbar off-screen.\n\t// Once supported in Safari we can replace this in favor of preventScroll.\n\t// For details see issue #18632 and PR #18686\n\t// Specifically, we scroll `interface-interface-skeleton__body` to enable a fixed top toolbar.\n\t// But Mobile Safari forces the `html` element to scroll upwards, hiding the toolbar.\n\n\tconst isIphone = window.navigator.userAgent.indexOf( 'iPhone' ) !== -1;\n\tif ( isIphone ) {\n\t\twindow.addEventListener( 'scroll', ( event ) => {\n\t\t\tconst editorScrollContainer = document.getElementsByClassName(\n\t\t\t\t'interface-interface-skeleton__body'\n\t\t\t)[ 0 ];\n\t\t\tif ( event.target === document ) {\n\t\t\t\t// Scroll element into view by scrolling the editor container by the same amount\n\t\t\t\t// that Mobile Safari tried to scroll the html element upwards.\n\t\t\t\tif ( window.scrollY > 100 ) {\n\t\t\t\t\teditorScrollContainer.scrollTop =\n\t\t\t\t\t\teditorScrollContainer.scrollTop + window.scrollY;\n\t\t\t\t}\n\t\t\t\t// Undo unwanted scroll on html element, but only in the visual editor.\n\t\t\t\tif (\n\t\t\t\t\tdocument.getElementsByClassName( 'is-mode-visual' )[ 0 ]\n\t\t\t\t) {\n\t\t\t\t\twindow.scrollTo( 0, 0 );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n\n\t// Prevent the default browser action for files dropped outside of dropzones.\n\twindow.addEventListener( 'dragover', ( e ) => e.preventDefault(), false );\n\twindow.addEventListener( 'drop', ( e ) => e.preventDefault(), false );\n\n\t// Drive the resolvers whose data `createPreloadingMiddleware`\n\t// already has cached so every metadata entry they touch is\n\t// `finished` by the time React mounts — no `setTimeout(0)`\n\t// resolution dance on first render. Multi-use lets a single\n\t// preloaded URL back several selectors (e.g. /wp/v2/settings GET +\n\t// OPTIONS serves `getEntitiesConfig`, `canUser`, `getEntityRecord`).\n\tenablePreloadMultiUse();\n\tconst preloadedResolutions = preloadResolutions( postType, postId );\n\n\tpreloadedResolutions.finally( () => {\n\t\t// Anything not consumed by the kickoff falls through to a real\n\t\t// network request from here on. `clearPreloadedData` logs which\n\t\t// preload entries (if any) were never served.\n\t\tclearPreloadedData();\n\t\tif ( postType && postId ) {\n\t\t\tconst post = select( coreDataStore ).getEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tpostType,\n\t\t\t\tpostId\n\t\t\t);\n\t\t\tif ( post ) {\n\t\t\t\tdispatch( editorStore ).setupEditor(\n\t\t\t\t\tpost,\n\t\t\t\t\tinitialEdits,\n\t\t\t\t\tsettings.template\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\troot.render(\n\t\t\t<StrictMode>\n\t\t\t\t<Layout\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tpostId={ postId }\n\t\t\t\t\tpostType={ postType }\n\t\t\t\t\tinitialEdits={ initialEdits }\n\t\t\t\t/>\n\t\t\t</StrictMode>\n\t\t);\n\t} );\n\n\treturn root;\n}\n\n/**\n * Drive resolvers to completion against the preload cache before React\n * mounts. Two phases: known-up-front args (post id + type), then args\n * derived from phase-1 state (post slug → template, current global\n * styles id → record + canUser).\n *\n * @param {string} postType Current post type.\n * @param {number} postId Current post id.\n * @return {Promise<void>} Resolves when the kickoff resolvers settle.\n */\nasync function preloadResolutions( postType, postId ) {\n\tconst core = resolveSelect( coreDataStore );\n\tconst coreSelect = select( coreDataStore );\n\n\ttry {\n\t\tawait Promise.all( [\n\t\t\tcore.getCurrentUser(),\n\t\t\tcore.getEntitiesConfig( 'postType' ),\n\t\t\tcore.getEntitiesConfig( 'taxonomy' ),\n\t\t\tcore.getEntitiesConfig( 'root' ),\n\t\t\tcore.getEntityRecords( 'root', 'taxonomy' ),\n\t\t\tcore.getCurrentTheme(),\n\t\t\t// Forward-resolver alias of `getCurrentTheme` with its own\n\t\t\t// resolution metadata, so it needs a separate kick.\n\t\t\tcore.getThemeSupports(),\n\t\t\tcore.getBlockPatternCategories(),\n\t\t\tcore.__experimentalGetCurrentGlobalStylesId(),\n\t\t\tcore.__experimentalGetCurrentThemeBaseGlobalStyles(),\n\t\t\tcore.__experimentalGetCurrentThemeGlobalStylesVariations(),\n\t\t\tcore.getEntityRecord( 'root', '__unstableBase' ),\n\t\t\tcore.getEntityRecord( 'root', 'site' ),\n\t\t\tcore.canUser( 'read', { kind: 'root', name: 'site' } ),\n\t\t\tcore.canUser( 'create', { kind: 'postType', name: 'attachment' } ),\n\t\t\tcore.canUser( 'create', { kind: 'postType', name: 'page' } ),\n\t\t\tcore.canUser( 'create', { kind: 'postType', name: 'wp_block' } ),\n\t\t\tcore.canUser( 'create', {\n\t\t\t\tkind: 'postType',\n\t\t\t\tname: 'wp_template',\n\t\t\t} ),\n\t\t\t// Per-post resolvers. `getPostType` and `getEditedEntityRecord`\n\t\t\t// are shorthand/forward-resolver aliases with their own\n\t\t\t// resolution metadata, so they need separate kicks.\n\t\t\t...( postType && postId\n\t\t\t\t? [\n\t\t\t\t\t\tcore.getPostType( postType ),\n\t\t\t\t\t\tcore.getEntityRecord( 'postType', postType, postId ),\n\t\t\t\t\t\tcore.getEditedEntityRecord(\n\t\t\t\t\t\t\t'postType',\n\t\t\t\t\t\t\tpostType,\n\t\t\t\t\t\t\tpostId\n\t\t\t\t\t\t),\n\t\t\t\t\t\tcore.getAutosaves( postType, postId ),\n\t\t\t\t\t\tcore.getDefaultTemplateId( { slug: 'front-page' } ),\n\t\t\t\t\t\tcore.canUser( 'create', {\n\t\t\t\t\t\t\tkind: 'postType',\n\t\t\t\t\t\t\tname: postType,\n\t\t\t\t\t\t} ),\n\t\t\t\t ]\n\t\t\t\t: [] ),\n\t\t] );\n\n\t\t// Phase 2: read derived data out of state.\n\t\tconst tasks = [];\n\t\tconst globalStylesId =\n\t\t\tcoreSelect.__experimentalGetCurrentGlobalStylesId();\n\t\tif ( globalStylesId ) {\n\t\t\ttasks.push(\n\t\t\t\tcore.getEntityRecord( 'root', 'globalStyles', globalStylesId ),\n\t\t\t\tcore.canUser( 'read', {\n\t\t\t\t\tkind: 'root',\n\t\t\t\t\tname: 'globalStyles',\n\t\t\t\t\tid: globalStylesId,\n\t\t\t\t} )\n\t\t\t);\n\t\t}\n\n\t\tif ( postType && postId ) {\n\t\t\tconst post = coreSelect.getEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tpostType,\n\t\t\t\tpostId\n\t\t\t);\n\t\t\tif ( post ) {\n\t\t\t\t// Mirrors core-data's `getDefaultTemplate` slug formula.\n\t\t\t\tlet slug = 'page' === postType ? 'page' : 'single-' + postType;\n\t\t\t\tif ( post.slug ) {\n\t\t\t\t\tslug += '-' + post.slug;\n\t\t\t\t}\n\t\t\t\ttasks.push( core.getDefaultTemplateId( { slug } ) );\n\n\t\t\t\tif ( post.author ) {\n\t\t\t\t\ttasks.push(\n\t\t\t\t\t\tcore.getUser( post.author, {\n\t\t\t\t\t\t\tcontext: 'view',\n\t\t\t\t\t\t\t_fields: 'id,name',\n\t\t\t\t\t\t} )\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( tasks.length ) {\n\t\t\tawait Promise.all( tasks );\n\t\t}\n\t} catch {\n\t\t// Resolver failures here would also surface on demand; don't block render.\n\t}\n}\n\n/**\n * Used to reinitialize the editor after an error. Now it's a deprecated noop function.\n */\nexport function reinitializeEditor() {\n\tdeprecated( 'wp.editPost.reinitializeEditor', {\n\t\tsince: '6.2',\n\t\tversion: '6.3',\n\t} );\n}\n\nexport { default as __experimentalFullscreenModeClose } from './components/back-button/fullscreen-mode-close';\nexport { __experimentalMainDashboardButton };\nexport { store } from './store';\nexport * from './deprecated';\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;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EACD,QAAQ;AAAA,EAER;AACD;AAKO,SAAS,qBAAqB;AACpC,wBAAAE,SAAY,kCAAkC;AAAA,IAC7C,OAAO;AAAA,IACP,SAAS;AAAA,EACV,CAAE;AACH;",
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport {\n\tregisterCoreBlocks,\n\t__experimentalRegisterExperimentalCoreBlocks,\n} from '@wordpress/block-library';\nimport deprecated from '@wordpress/deprecated';\nimport { createRoot, StrictMode } from '@wordpress/element';\nimport { dispatch, resolveSelect, select } from '@wordpress/data';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport {\n\tregisterLegacyWidgetBlock,\n\tregisterWidgetGroupBlock,\n} from '@wordpress/widgets';\nimport {\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\nimport { store as coreDataStore } from '@wordpress/core-data';\nimport apiFetch from '@wordpress/api-fetch';\n\n/**\n * Internal dependencies\n */\nimport Layout from './components/layout';\nimport { unlock } from './lock-unlock';\n\nconst {\n\tBackButton: __experimentalMainDashboardButton,\n\tregisterCoreBlockBindingsSources,\n} = unlock( editorPrivateApis );\n\nconst { enablePreloadMultiUse, clearPreloadedData } = unlock(\n\tapiFetch.privateApis\n);\n\n/**\n * Initializes and returns an instance of Editor.\n *\n * @param {string} id Unique identifier for editor instance.\n * @param {string} postType Post type of the post to edit.\n * @param {Object} postId ID of the post to edit.\n * @param {?Object} settings Editor settings object.\n * @param {Object} initialEdits Programmatic edits to apply initially, to be\n * considered as non-user-initiated (bypass for\n * unsaved changes prompt).\n */\nexport function initializeEditor(\n\tid,\n\tpostType,\n\tpostId,\n\tsettings,\n\tinitialEdits\n) {\n\tconst isMediumOrBigger = window.matchMedia( '(min-width: 782px)' ).matches;\n\tconst target = document.getElementById( id );\n\tconst root = createRoot( target );\n\n\tdispatch( preferencesStore ).setDefaults( 'core/edit-post', {\n\t\tfullscreenMode: true,\n\t\tthemeStyles: true,\n\t\twelcomeGuide: true,\n\t\twelcomeGuideTemplate: true,\n\t} );\n\n\tdispatch( preferencesStore ).setDefaults( 'core', {\n\t\tallowRightClickOverrides: true,\n\t\teditorMode: 'visual',\n\t\teditorTool: 'edit',\n\t\tfixedToolbar: false,\n\t\thiddenBlockTypes: [],\n\t\tinactivePanels: [],\n\t\topenPanels: [ 'post-status' ],\n\t\tshowBlockBreadcrumbs: true,\n\t\tshowIconLabels: false,\n\t\tshowListViewByDefault: false,\n\t\tenableChoosePatternModal: true,\n\t\tisPublishSidebarEnabled: true,\n\t\tshowCollaborationCursor: false,\n\t\tshowCollaborationJoinNotifications: true,\n\t\tshowCollaborationLeaveNotifications: true,\n\t\tshowCollaborationPostSaveNotifications: true,\n\t} );\n\n\tif ( window.__clientSideMediaProcessing ) {\n\t\tdispatch( preferencesStore ).setDefaults( 'core/media', {\n\t\t\trequireApproval: true,\n\t\t\toptimizeOnUpload: true,\n\t\t} );\n\t}\n\n\tdispatch( blocksStore ).reapplyBlockTypeFilters();\n\n\t// Check if the block list view should be open by default.\n\t// If `distractionFree` mode is enabled, the block list view should not be open.\n\t// This behavior is disabled for small viewports.\n\tif (\n\t\tisMediumOrBigger &&\n\t\tselect( preferencesStore ).get( 'core', 'showListViewByDefault' ) &&\n\t\t! select( preferencesStore ).get( 'core', 'distractionFree' )\n\t) {\n\t\tdispatch( editorStore ).setIsListViewOpened( true );\n\t}\n\n\tregisterCoreBlocks();\n\tregisterCoreBlockBindingsSources();\n\tregisterLegacyWidgetBlock( { inserter: false } );\n\tregisterWidgetGroupBlock( { inserter: false } );\n\tif ( globalThis.IS_GUTENBERG_PLUGIN ) {\n\t\t__experimentalRegisterExperimentalCoreBlocks( {\n\t\t\tenableFSEBlocks: settings.__unstableEnableFullSiteEditingBlocks,\n\t\t} );\n\t}\n\n\t// Show a console log warning if the browser is not in Standards rendering mode.\n\tconst documentMode =\n\t\tdocument.compatMode === 'CSS1Compat' ? 'Standards' : 'Quirks';\n\tif ( documentMode !== 'Standards' ) {\n\t\t// eslint-disable-next-line no-console\n\t\tconsole.warn(\n\t\t\t\"Your browser is using Quirks Mode. \\nThis can cause rendering issues such as blocks overlaying meta boxes in the editor. Quirks Mode can be triggered by PHP errors or HTML code appearing before the opening <!DOCTYPE html>. Try checking the raw page source or your site's PHP error log and resolving errors there, removing any HTML before the doctype, or disabling plugins.\"\n\t\t);\n\t}\n\n\t// This is a temporary fix for a couple of issues specific to Webkit on iOS.\n\t// Without this hack the browser scrolls the mobile toolbar off-screen.\n\t// Once supported in Safari we can replace this in favor of preventScroll.\n\t// For details see issue #18632 and PR #18686\n\t// Specifically, we scroll `interface-interface-skeleton__body` to enable a fixed top toolbar.\n\t// But Mobile Safari forces the `html` element to scroll upwards, hiding the toolbar.\n\n\tconst isIphone = window.navigator.userAgent.indexOf( 'iPhone' ) !== -1;\n\tif ( isIphone ) {\n\t\twindow.addEventListener( 'scroll', ( event ) => {\n\t\t\tconst editorScrollContainer = document.getElementsByClassName(\n\t\t\t\t'interface-interface-skeleton__body'\n\t\t\t)[ 0 ];\n\t\t\tif ( event.target === document ) {\n\t\t\t\t// Scroll element into view by scrolling the editor container by the same amount\n\t\t\t\t// that Mobile Safari tried to scroll the html element upwards.\n\t\t\t\tif ( window.scrollY > 100 ) {\n\t\t\t\t\teditorScrollContainer.scrollTop =\n\t\t\t\t\t\teditorScrollContainer.scrollTop + window.scrollY;\n\t\t\t\t}\n\t\t\t\t// Undo unwanted scroll on html element, but only in the visual editor.\n\t\t\t\tif (\n\t\t\t\t\tdocument.getElementsByClassName( 'is-mode-visual' )[ 0 ]\n\t\t\t\t) {\n\t\t\t\t\twindow.scrollTo( 0, 0 );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n\n\t// Prevent the default browser action for files dropped outside of dropzones.\n\twindow.addEventListener( 'dragover', ( e ) => e.preventDefault(), false );\n\twindow.addEventListener( 'drop', ( e ) => e.preventDefault(), false );\n\n\t// Drive the resolvers whose data `createPreloadingMiddleware`\n\t// already has cached so every metadata entry they touch is\n\t// `finished` by the time React mounts — no `setTimeout(0)`\n\t// resolution dance on first render. Multi-use lets a single\n\t// preloaded URL back several selectors (e.g. /wp/v2/settings GET +\n\t// OPTIONS serves `getEntitiesConfig`, `canUser`, `getEntityRecord`).\n\tenablePreloadMultiUse();\n\tconst preloadedResolutions = preloadResolutions( postType, postId );\n\n\tpreloadedResolutions.finally( () => {\n\t\t// Anything not consumed by the kickoff falls through to a real\n\t\t// network request from here on. `clearPreloadedData` logs which\n\t\t// preload entries (if any) were never served.\n\t\tclearPreloadedData();\n\t\tif ( postType && postId ) {\n\t\t\tconst post = select( coreDataStore ).getEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tpostType,\n\t\t\t\tpostId\n\t\t\t);\n\t\t\tif ( post ) {\n\t\t\t\tdispatch( editorStore ).setupEditor(\n\t\t\t\t\tpost,\n\t\t\t\t\tinitialEdits,\n\t\t\t\t\tsettings.template\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\troot.render(\n\t\t\t<StrictMode>\n\t\t\t\t<Layout\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tpostId={ postId }\n\t\t\t\t\tpostType={ postType }\n\t\t\t\t\tinitialEdits={ initialEdits }\n\t\t\t\t/>\n\t\t\t</StrictMode>\n\t\t);\n\t} );\n\n\treturn root;\n}\n\n/**\n * Drive resolvers to completion against the preload cache before React\n * mounts. Two phases: known-up-front args (post id + type), then args\n * derived from phase-1 state (post slug → template, current global\n * styles id → record + canUser).\n *\n * @param {string} postType Current post type.\n * @param {number} postId Current post id.\n * @return {Promise<void>} Resolves when the kickoff resolvers settle.\n */\nasync function preloadResolutions( postType, postId ) {\n\tconst core = resolveSelect( coreDataStore );\n\tconst coreSelect = select( coreDataStore );\n\n\ttry {\n\t\tawait Promise.all( [\n\t\t\tcore.getCurrentUser(),\n\t\t\tcore.getEntitiesConfig( 'postType' ),\n\t\t\tcore.getEntitiesConfig( 'taxonomy' ),\n\t\t\tcore.getEntitiesConfig( 'root' ),\n\t\t\tcore.getEntityRecords( 'root', 'taxonomy' ),\n\t\t\tcore.getCurrentTheme(),\n\t\t\t// Forward-resolver alias of `getCurrentTheme` with its own\n\t\t\t// resolution metadata, so it needs a separate kick.\n\t\t\tcore.getThemeSupports(),\n\t\t\tcore.getBlockPatternCategories(),\n\t\t\tcore.__experimentalGetCurrentGlobalStylesId(),\n\t\t\tcore.__experimentalGetCurrentThemeBaseGlobalStyles(),\n\t\t\tcore.__experimentalGetCurrentThemeGlobalStylesVariations(),\n\t\t\tcore.getEntityRecord( 'root', '__unstableBase' ),\n\t\t\tcore.getEntityRecord( 'root', 'site' ),\n\t\t\tcore.canUser( 'read', { kind: 'root', name: 'site' } ),\n\t\t\tcore.canUser( 'create', { kind: 'postType', name: 'attachment' } ),\n\t\t\tcore.canUser( 'create', { kind: 'postType', name: 'page' } ),\n\t\t\tcore.canUser( 'create', { kind: 'postType', name: 'wp_block' } ),\n\t\t\tcore.canUser( 'create', {\n\t\t\t\tkind: 'postType',\n\t\t\t\tname: 'wp_template',\n\t\t\t} ),\n\t\t\t// Per-post resolvers. `getPostType` and `getEditedEntityRecord`\n\t\t\t// are shorthand/forward-resolver aliases with their own\n\t\t\t// resolution metadata, so they need separate kicks.\n\t\t\t...( postType && postId\n\t\t\t\t? [\n\t\t\t\t\t\tcore.getPostType( postType ),\n\t\t\t\t\t\tcore.getEntityRecord( 'postType', postType, postId ),\n\t\t\t\t\t\tcore.getEditedEntityRecord(\n\t\t\t\t\t\t\t'postType',\n\t\t\t\t\t\t\tpostType,\n\t\t\t\t\t\t\tpostId\n\t\t\t\t\t\t),\n\t\t\t\t\t\tcore.getAutosaves( postType, postId ),\n\t\t\t\t\t\tcore.getDefaultTemplateId( { slug: 'front-page' } ),\n\t\t\t\t\t\tcore.canUser( 'create', {\n\t\t\t\t\t\t\tkind: 'postType',\n\t\t\t\t\t\t\tname: postType,\n\t\t\t\t\t\t} ),\n\t\t\t\t ]\n\t\t\t\t: [] ),\n\t\t] );\n\n\t\t// Phase 2: read derived data out of state.\n\t\tconst tasks = [];\n\t\tconst globalStylesId =\n\t\t\tcoreSelect.__experimentalGetCurrentGlobalStylesId();\n\t\tif ( globalStylesId ) {\n\t\t\ttasks.push(\n\t\t\t\tcore.getEntityRecord( 'root', 'globalStyles', globalStylesId ),\n\t\t\t\tcore.canUser( 'read', {\n\t\t\t\t\tkind: 'root',\n\t\t\t\t\tname: 'globalStyles',\n\t\t\t\t\tid: globalStylesId,\n\t\t\t\t} )\n\t\t\t);\n\t\t}\n\n\t\tif ( postType && postId ) {\n\t\t\tconst post = coreSelect.getEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tpostType,\n\t\t\t\tpostId\n\t\t\t);\n\t\t\tif ( post ) {\n\t\t\t\t// Mirrors core-data's `getDefaultTemplate` slug formula.\n\t\t\t\tlet slug = 'page' === postType ? 'page' : 'single-' + postType;\n\t\t\t\tif ( post.slug ) {\n\t\t\t\t\tslug += '-' + post.slug;\n\t\t\t\t}\n\t\t\t\ttasks.push( core.getDefaultTemplateId( { slug } ) );\n\n\t\t\t\tif ( post.author ) {\n\t\t\t\t\ttasks.push(\n\t\t\t\t\t\tcore.getUser( post.author, {\n\t\t\t\t\t\t\tcontext: 'view',\n\t\t\t\t\t\t\t_fields: 'id,name',\n\t\t\t\t\t\t} )\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( tasks.length ) {\n\t\t\tawait Promise.all( tasks );\n\t\t}\n\t} catch {\n\t\t// Resolver failures here would also surface on demand; don't block render.\n\t}\n}\n\n/**\n * Used to reinitialize the editor after an error. Now it's a deprecated noop function.\n */\nexport function reinitializeEditor() {\n\tdeprecated( 'wp.editPost.reinitializeEditor', {\n\t\tsince: '6.2',\n\t\tversion: '6.3',\n\t} );\n}\n\nexport { default as __experimentalFullscreenModeClose } from './components/back-button/fullscreen-mode-close';\nexport { __experimentalMainDashboardButton };\nexport { store } from './store';\nexport * from './deprecated';\n"],
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UACH;AAAA,QACD;AAAA,MACD;AAAA,IACD;AAEA,QAAK,MAAM,QAAS;AACnB,YAAM,QAAQ,IAAK,KAAM;AAAA,IAC1B;AAAA,EACD,QAAQ;AAAA,EAER;AACD;AAKO,SAAS,qBAAqB;AACpC,wBAAAE,SAAY,kCAAkC;AAAA,IAC7C,OAAO;AAAA,IACP,SAAS;AAAA,EACV,CAAE;AACH;",
6
6
  "names": ["editorPrivateApis", "apiFetch", "preferencesStore", "blocksStore", "editorStore", "coreDataStore", "Layout", "deprecated"]
7
7
  }
@@ -1,147 +1,47 @@
1
1
  // packages/edit-post/src/components/back-button/fullscreen-mode-close.js
2
- import clsx from "clsx";
3
2
  import { useSelect } from "@wordpress/data";
4
- import {
5
- Button,
6
- Icon as WCIcon,
7
- __unstableMotion as motion
8
- } from "@wordpress/components";
3
+ import { Button, Icon as WCIcon } from "@wordpress/components";
9
4
  import { __, isRTL } from "@wordpress/i18n";
10
5
  import { addQueryArgs } from "@wordpress/url";
11
- import {
12
- wordpress,
13
- arrowUpLeft,
14
- arrowUpRight,
15
- chevronLeft,
16
- chevronRight
17
- } from "@wordpress/icons";
6
+ import { chevronLeft, chevronRight } from "@wordpress/icons";
18
7
  import { store as editorStore } from "@wordpress/editor";
19
8
  import { store as coreStore } from "@wordpress/core-data";
20
- import { useReducedMotion } from "@wordpress/compose";
21
9
  import { jsx, jsxs } from "react/jsx-runtime";
22
- var siteIconVariants = {
23
- edit: {
24
- clipPath: "inset(0% round 0px)"
25
- },
26
- hover: {
27
- clipPath: "inset( 22% round 2px )"
28
- },
29
- tap: {
30
- clipPath: "inset(0% round 0px)"
31
- }
32
- };
33
- var toggleHomeIconVariants = {
34
- edit: {
35
- opacity: 0,
36
- scale: 0.2
37
- },
38
- hover: {
39
- opacity: 1,
40
- scale: 1,
41
- clipPath: "inset( 22% round 2px )"
42
- }
43
- };
44
10
  function FullscreenModeClose({ showTooltip, icon, href, initialPost }) {
45
- const { isRequestingSiteIcon, postType, siteIconUrl } = useSelect(
11
+ const postType = useSelect(
46
12
  (select) => {
47
13
  const { getCurrentPostType } = select(editorStore);
48
- const { getEntityRecord, getPostType, isResolving } = select(coreStore);
49
- const siteData = getEntityRecord("root", "__unstableBase", void 0) || {};
50
- const _postType = initialPost?.type || getCurrentPostType();
51
- return {
52
- isRequestingSiteIcon: isResolving("getEntityRecord", [
53
- "root",
54
- "__unstableBase",
55
- void 0
56
- ]),
57
- postType: getPostType(_postType),
58
- siteIconUrl: siteData.site_icon_url
59
- };
14
+ const { getPostType } = select(coreStore);
15
+ return getPostType(initialPost?.type || getCurrentPostType());
60
16
  },
61
17
  [initialPost?.type]
62
18
  );
63
- const disableMotion = useReducedMotion();
64
- const transition = {
65
- duration: disableMotion ? 0 : 0.2
66
- };
67
19
  if (!postType) {
68
20
  return null;
69
21
  }
70
- let siteIconContent;
71
- if (isRequestingSiteIcon && !siteIconUrl) {
72
- siteIconContent = /* @__PURE__ */ jsx("div", { className: "edit-post-fullscreen-mode-close-site-icon__image" });
73
- } else if (siteIconUrl) {
74
- siteIconContent = /* @__PURE__ */ jsx(
75
- "img",
22
+ const buttonHref = href ?? addQueryArgs("edit.php", {
23
+ post_type: postType.slug
24
+ });
25
+ const buttonLabel = postType?.labels?.view_items ?? __("Back");
26
+ return /* @__PURE__ */ jsxs("div", { className: "edit-post-fullscreen-mode-close__view-mode-toggle", children: [
27
+ /* @__PURE__ */ jsx(
28
+ Button,
76
29
  {
77
- className: "edit-post-fullscreen-mode-close-site-icon__image",
78
- alt: __("Site Icon"),
79
- src: siteIconUrl
30
+ __next40pxDefaultSize: true,
31
+ className: "edit-post-fullscreen-mode-close",
32
+ href: buttonHref,
33
+ label: buttonLabel,
34
+ showTooltip,
35
+ tooltipPosition: "bottom"
80
36
  }
81
- );
82
- } else {
83
- siteIconContent = /* @__PURE__ */ jsx(
37
+ ),
38
+ /* @__PURE__ */ jsx("div", { className: "edit-post-fullscreen-mode-close__back-icon", children: /* @__PURE__ */ jsx(
84
39
  WCIcon,
85
40
  {
86
- className: "edit-post-fullscreen-mode-close-site-icon__icon",
87
- icon: wordpress,
88
- size: 48
41
+ icon: icon ?? (isRTL() ? chevronRight : chevronLeft)
89
42
  }
90
- );
91
- }
92
- const buttonIcon = icon ? /* @__PURE__ */ jsx(WCIcon, { size: "36px", icon }) : /* @__PURE__ */ jsx("div", { className: "edit-post-fullscreen-mode-close-site-icon", children: siteIconContent });
93
- const classes = clsx("edit-post-fullscreen-mode-close", {
94
- "has-icon": siteIconUrl
95
- });
96
- const buttonHref = href ?? addQueryArgs("edit.php", {
97
- post_type: postType.slug
98
- });
99
- const buttonLabel = postType?.labels?.view_items ?? __("Back");
100
- const hasAdminBarInEditor = window.__experimentalAdminBarInEditor;
101
- return /* @__PURE__ */ jsxs(
102
- motion.div,
103
- {
104
- className: "edit-post-fullscreen-mode-close__view-mode-toggle",
105
- animate: "edit",
106
- initial: "edit",
107
- whileHover: "hover",
108
- whileTap: "tap",
109
- transition,
110
- children: [
111
- /* @__PURE__ */ jsx(
112
- Button,
113
- {
114
- __next40pxDefaultSize: true,
115
- className: classes,
116
- href: buttonHref,
117
- label: buttonLabel,
118
- showTooltip,
119
- tooltipPosition: "bottom",
120
- children: !hasAdminBarInEditor && /* @__PURE__ */ jsx(
121
- motion.div,
122
- {
123
- variants: !disableMotion && siteIconVariants,
124
- children: /* @__PURE__ */ jsx("div", { className: "edit-post-fullscreen-mode-close__view-mode-toggle-icon", children: buttonIcon })
125
- }
126
- )
127
- }
128
- ),
129
- hasAdminBarInEditor ? /* @__PURE__ */ jsx("div", { className: "edit-post-fullscreen-mode-close__back-icon", children: /* @__PURE__ */ jsx(WCIcon, { icon: isRTL() ? chevronRight : chevronLeft }) }) : /* @__PURE__ */ jsx(
130
- motion.div,
131
- {
132
- className: clsx(
133
- "edit-post-fullscreen-mode-close__back-icon",
134
- {
135
- "has-site-icon": siteIconUrl
136
- }
137
- ),
138
- variants: !disableMotion && toggleHomeIconVariants,
139
- children: /* @__PURE__ */ jsx(WCIcon, { icon: isRTL() ? arrowUpRight : arrowUpLeft })
140
- }
141
- )
142
- ]
143
- }
144
- );
43
+ ) })
44
+ ] });
145
45
  }
146
46
  var fullscreen_mode_close_default = FullscreenModeClose;
147
47
  export {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/back-button/fullscreen-mode-close.js"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport {\n\tButton,\n\tIcon as WCIcon,\n\t__unstableMotion as motion,\n} from '@wordpress/components';\nimport { __, isRTL } from '@wordpress/i18n';\nimport { addQueryArgs } from '@wordpress/url';\nimport {\n\twordpress,\n\tarrowUpLeft,\n\tarrowUpRight,\n\tchevronLeft,\n\tchevronRight,\n} from '@wordpress/icons';\nimport { store as editorStore } from '@wordpress/editor';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useReducedMotion } from '@wordpress/compose';\n\nconst siteIconVariants = {\n\tedit: {\n\t\tclipPath: 'inset(0% round 0px)',\n\t},\n\thover: {\n\t\tclipPath: 'inset( 22% round 2px )',\n\t},\n\ttap: {\n\t\tclipPath: 'inset(0% round 0px)',\n\t},\n};\n\nconst toggleHomeIconVariants = {\n\tedit: {\n\t\topacity: 0,\n\t\tscale: 0.2,\n\t},\n\thover: {\n\t\topacity: 1,\n\t\tscale: 1,\n\t\tclipPath: 'inset( 22% round 2px )',\n\t},\n};\n\nfunction FullscreenModeClose( { showTooltip, icon, href, initialPost } ) {\n\tconst { isRequestingSiteIcon, postType, siteIconUrl } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getCurrentPostType } = select( editorStore );\n\t\t\tconst { getEntityRecord, getPostType, isResolving } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst siteData =\n\t\t\t\tgetEntityRecord( 'root', '__unstableBase', undefined ) || {};\n\t\t\tconst _postType = initialPost?.type || getCurrentPostType();\n\t\t\treturn {\n\t\t\t\tisRequestingSiteIcon: isResolving( 'getEntityRecord', [\n\t\t\t\t\t'root',\n\t\t\t\t\t'__unstableBase',\n\t\t\t\t\tundefined,\n\t\t\t\t] ),\n\t\t\t\tpostType: getPostType( _postType ),\n\t\t\t\tsiteIconUrl: siteData.site_icon_url,\n\t\t\t};\n\t\t},\n\t\t[ initialPost?.type ]\n\t);\n\n\tconst disableMotion = useReducedMotion();\n\tconst transition = {\n\t\tduration: disableMotion ? 0 : 0.2,\n\t};\n\n\tif ( ! postType ) {\n\t\treturn null;\n\t}\n\n\t// Create SiteIcon equivalent structure exactly like edit-site\n\tlet siteIconContent;\n\tif ( isRequestingSiteIcon && ! siteIconUrl ) {\n\t\tsiteIconContent = (\n\t\t\t<div className=\"edit-post-fullscreen-mode-close-site-icon__image\" />\n\t\t);\n\t} else if ( siteIconUrl ) {\n\t\tsiteIconContent = (\n\t\t\t<img\n\t\t\t\tclassName=\"edit-post-fullscreen-mode-close-site-icon__image\"\n\t\t\t\talt={ __( 'Site Icon' ) }\n\t\t\t\tsrc={ siteIconUrl }\n\t\t\t/>\n\t\t);\n\t} else {\n\t\tsiteIconContent = (\n\t\t\t<WCIcon\n\t\t\t\tclassName=\"edit-post-fullscreen-mode-close-site-icon__icon\"\n\t\t\t\ticon={ wordpress }\n\t\t\t\tsize={ 48 }\n\t\t\t/>\n\t\t);\n\t}\n\n\t// Override default icon if custom icon is provided via props.\n\tconst buttonIcon = icon ? (\n\t\t<WCIcon size=\"36px\" icon={ icon } />\n\t) : (\n\t\t<div className=\"edit-post-fullscreen-mode-close-site-icon\">\n\t\t\t{ siteIconContent }\n\t\t</div>\n\t);\n\n\tconst classes = clsx( 'edit-post-fullscreen-mode-close', {\n\t\t'has-icon': siteIconUrl,\n\t} );\n\n\tconst buttonHref =\n\t\thref ??\n\t\taddQueryArgs( 'edit.php', {\n\t\t\tpost_type: postType.slug,\n\t\t} );\n\n\tconst buttonLabel = postType?.labels?.view_items ?? __( 'Back' );\n\n\tconst hasAdminBarInEditor = window.__experimentalAdminBarInEditor;\n\n\treturn (\n\t\t<motion.div\n\t\t\tclassName=\"edit-post-fullscreen-mode-close__view-mode-toggle\"\n\t\t\tanimate=\"edit\"\n\t\t\tinitial=\"edit\"\n\t\t\twhileHover=\"hover\"\n\t\t\twhileTap=\"tap\"\n\t\t\ttransition={ transition }\n\t\t>\n\t\t\t<Button\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\tclassName={ classes }\n\t\t\t\thref={ buttonHref }\n\t\t\t\tlabel={ buttonLabel }\n\t\t\t\tshowTooltip={ showTooltip }\n\t\t\t\ttooltipPosition=\"bottom\"\n\t\t\t>\n\t\t\t\t{ ! hasAdminBarInEditor && (\n\t\t\t\t\t<motion.div\n\t\t\t\t\t\tvariants={ ! disableMotion && siteIconVariants }\n\t\t\t\t\t>\n\t\t\t\t\t\t<div className=\"edit-post-fullscreen-mode-close__view-mode-toggle-icon\">\n\t\t\t\t\t\t\t{ buttonIcon }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</motion.div>\n\t\t\t\t) }\n\t\t\t</Button>\n\t\t\t{ hasAdminBarInEditor ? (\n\t\t\t\t<div className=\"edit-post-fullscreen-mode-close__back-icon\">\n\t\t\t\t\t<WCIcon icon={ isRTL() ? chevronRight : chevronLeft } />\n\t\t\t\t</div>\n\t\t\t) : (\n\t\t\t\t<motion.div\n\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t'edit-post-fullscreen-mode-close__back-icon',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'has-site-icon': siteIconUrl,\n\t\t\t\t\t\t}\n\t\t\t\t\t) }\n\t\t\t\t\tvariants={ ! disableMotion && toggleHomeIconVariants }\n\t\t\t\t>\n\t\t\t\t\t<WCIcon icon={ isRTL() ? arrowUpRight : arrowUpLeft } />\n\t\t\t\t</motion.div>\n\t\t\t) }\n\t\t</motion.div>\n\t);\n}\n\nexport default FullscreenModeClose;\n"],
5
- "mappings": ";AAGA,OAAO,U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d,8BAAC,UAAO,MAAO,MAAM,IAAI,eAAe,aAAc,GACvD,IAEA;AAAA,UAAC,OAAO;AAAA,UAAP;AAAA,YACA,WAAY;AAAA,cACX;AAAA,cACA;AAAA,gBACC,iBAAiB;AAAA,cAClB;AAAA,YACD;AAAA,YACA,UAAW,CAAE,iBAAiB;AAAA,YAE9B,8BAAC,UAAO,MAAO,MAAM,IAAI,eAAe,aAAc;AAAA;AAAA,QACvD;AAAA;AAAA;AAAA,EAEF;AAEF;AAEA,IAAO,gCAAQ;",
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { Button, Icon as WCIcon } from '@wordpress/components';\nimport { __, isRTL } from '@wordpress/i18n';\nimport { addQueryArgs } from '@wordpress/url';\nimport { chevronLeft, chevronRight } from '@wordpress/icons';\nimport { store as editorStore } from '@wordpress/editor';\nimport { store as coreStore } from '@wordpress/core-data';\n\nfunction FullscreenModeClose( { showTooltip, icon, href, initialPost } ) {\n\tconst postType = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getCurrentPostType } = select( editorStore );\n\t\t\tconst { getPostType } = select( coreStore );\n\t\t\treturn getPostType( initialPost?.type || getCurrentPostType() );\n\t\t},\n\t\t[ initialPost?.type ]\n\t);\n\n\tif ( ! postType ) {\n\t\treturn null;\n\t}\n\n\tconst buttonHref =\n\t\thref ??\n\t\taddQueryArgs( 'edit.php', {\n\t\t\tpost_type: postType.slug,\n\t\t} );\n\n\tconst buttonLabel = postType?.labels?.view_items ?? __( 'Back' );\n\n\treturn (\n\t\t<div className=\"edit-post-fullscreen-mode-close__view-mode-toggle\">\n\t\t\t<Button\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\tclassName=\"edit-post-fullscreen-mode-close\"\n\t\t\t\thref={ buttonHref }\n\t\t\t\tlabel={ buttonLabel }\n\t\t\t\tshowTooltip={ showTooltip }\n\t\t\t\ttooltipPosition=\"bottom\"\n\t\t\t/>\n\t\t\t<div className=\"edit-post-fullscreen-mode-close__back-icon\">\n\t\t\t\t<WCIcon\n\t\t\t\t\ticon={ icon ?? ( isRTL() ? chevronRight : chevronLeft ) }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n\nexport default FullscreenModeClose;\n"],
5
+ "mappings": ";AAGA,SAAS,iBAAiB;AAC1B,SAAS,QAAQ,QAAQ,cAAc;AACvC,SAAS,IAAI,aAAa;AAC1B,SAAS,oBAAoB;AAC7B,SAAS,aAAa,oBAAoB;AAC1C,SAAS,SAAS,mBAAmB;AACrC,SAAS,SAAS,iBAAiB;AAyBjC,SACC,KADD;AAvBF,SAAS,oBAAqB,EAAE,aAAa,MAAM,MAAM,YAAY,GAAI;AACxE,QAAM,WAAW;AAAA,IAChB,CAAE,WAAY;AACb,YAAM,EAAE,mBAAmB,IAAI,OAAQ,WAAY;AACnD,YAAM,EAAE,YAAY,IAAI,OAAQ,SAAU;AAC1C,aAAO,YAAa,aAAa,QAAQ,mBAAmB,CAAE;AAAA,IAC/D;AAAA,IACA,CAAE,aAAa,IAAK;AAAA,EACrB;AAEA,MAAK,CAAE,UAAW;AACjB,WAAO;AAAA,EACR;AAEA,QAAM,aACL,QACA,aAAc,YAAY;AAAA,IACzB,WAAW,SAAS;AAAA,EACrB,CAAE;AAEH,QAAM,cAAc,UAAU,QAAQ,cAAc,GAAI,MAAO;AAE/D,SACC,qBAAC,SAAI,WAAU,qDACd;AAAA;AAAA,MAAC;AAAA;AAAA,QACA,uBAAqB;AAAA,QACrB,WAAU;AAAA,QACV,MAAO;AAAA,QACP,OAAQ;AAAA,QACR;AAAA,QACA,iBAAgB;AAAA;AAAA,IACjB;AAAA,IACA,oBAAC,SAAI,WAAU,8CACd;AAAA,MAAC;AAAA;AAAA,QACA,MAAO,SAAU,MAAM,IAAI,eAAe;AAAA;AAAA,IAC3C,GACD;AAAA,KACD;AAEF;AAEA,IAAO,gCAAQ;",
6
6
  "names": []
7
7
  }
@@ -55,7 +55,9 @@ function initializeEditor(id, postType, postId, settings, initialEdits) {
55
55
  enableChoosePatternModal: true,
56
56
  isPublishSidebarEnabled: true,
57
57
  showCollaborationCursor: false,
58
- showCollaborationNotifications: true
58
+ showCollaborationJoinNotifications: true,
59
+ showCollaborationLeaveNotifications: true,
60
+ showCollaborationPostSaveNotifications: true
59
61
  });
60
62
  if (window.__clientSideMediaProcessing) {
61
63
  dispatch(preferencesStore).setDefaults("core/media", {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/index.js"],
4
- "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport {\n\tregisterCoreBlocks,\n\t__experimentalRegisterExperimentalCoreBlocks,\n} from '@wordpress/block-library';\nimport deprecated from '@wordpress/deprecated';\nimport { createRoot, StrictMode } from '@wordpress/element';\nimport { dispatch, resolveSelect, select } from '@wordpress/data';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport {\n\tregisterLegacyWidgetBlock,\n\tregisterWidgetGroupBlock,\n} from '@wordpress/widgets';\nimport {\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\nimport { store as coreDataStore } from '@wordpress/core-data';\nimport apiFetch from '@wordpress/api-fetch';\n\n/**\n * Internal dependencies\n */\nimport Layout from './components/layout';\nimport { unlock } from './lock-unlock';\n\nconst {\n\tBackButton: __experimentalMainDashboardButton,\n\tregisterCoreBlockBindingsSources,\n} = unlock( editorPrivateApis );\n\nconst { enablePreloadMultiUse, clearPreloadedData } = unlock(\n\tapiFetch.privateApis\n);\n\n/**\n * Initializes and returns an instance of Editor.\n *\n * @param {string} id Unique identifier for editor instance.\n * @param {string} postType Post type of the post to edit.\n * @param {Object} postId ID of the post to edit.\n * @param {?Object} settings Editor settings object.\n * @param {Object} initialEdits Programmatic edits to apply initially, to be\n * considered as non-user-initiated (bypass for\n * unsaved changes prompt).\n */\nexport function initializeEditor(\n\tid,\n\tpostType,\n\tpostId,\n\tsettings,\n\tinitialEdits\n) {\n\tconst isMediumOrBigger = window.matchMedia( '(min-width: 782px)' ).matches;\n\tconst target = document.getElementById( id );\n\tconst root = createRoot( target );\n\n\tdispatch( preferencesStore ).setDefaults( 'core/edit-post', {\n\t\tfullscreenMode: true,\n\t\tthemeStyles: true,\n\t\twelcomeGuide: true,\n\t\twelcomeGuideTemplate: true,\n\t} );\n\n\tdispatch( preferencesStore ).setDefaults( 'core', {\n\t\tallowRightClickOverrides: true,\n\t\teditorMode: 'visual',\n\t\teditorTool: 'edit',\n\t\tfixedToolbar: false,\n\t\thiddenBlockTypes: [],\n\t\tinactivePanels: [],\n\t\topenPanels: [ 'post-status' ],\n\t\tshowBlockBreadcrumbs: true,\n\t\tshowIconLabels: false,\n\t\tshowListViewByDefault: false,\n\t\tenableChoosePatternModal: true,\n\t\tisPublishSidebarEnabled: true,\n\t\tshowCollaborationCursor: false,\n\t\tshowCollaborationNotifications: true,\n\t} );\n\n\tif ( window.__clientSideMediaProcessing ) {\n\t\tdispatch( preferencesStore ).setDefaults( 'core/media', {\n\t\t\trequireApproval: true,\n\t\t\toptimizeOnUpload: true,\n\t\t} );\n\t}\n\n\tdispatch( blocksStore ).reapplyBlockTypeFilters();\n\n\t// Check if the block list view should be open by default.\n\t// If `distractionFree` mode is enabled, the block list view should not be open.\n\t// This behavior is disabled for small viewports.\n\tif (\n\t\tisMediumOrBigger &&\n\t\tselect( preferencesStore ).get( 'core', 'showListViewByDefault' ) &&\n\t\t! select( preferencesStore ).get( 'core', 'distractionFree' )\n\t) {\n\t\tdispatch( editorStore ).setIsListViewOpened( true );\n\t}\n\n\tregisterCoreBlocks();\n\tregisterCoreBlockBindingsSources();\n\tregisterLegacyWidgetBlock( { inserter: false } );\n\tregisterWidgetGroupBlock( { inserter: false } );\n\tif ( globalThis.IS_GUTENBERG_PLUGIN ) {\n\t\t__experimentalRegisterExperimentalCoreBlocks( {\n\t\t\tenableFSEBlocks: settings.__unstableEnableFullSiteEditingBlocks,\n\t\t} );\n\t}\n\n\t// Show a console log warning if the browser is not in Standards rendering mode.\n\tconst documentMode =\n\t\tdocument.compatMode === 'CSS1Compat' ? 'Standards' : 'Quirks';\n\tif ( documentMode !== 'Standards' ) {\n\t\t// eslint-disable-next-line no-console\n\t\tconsole.warn(\n\t\t\t\"Your browser is using Quirks Mode. \\nThis can cause rendering issues such as blocks overlaying meta boxes in the editor. Quirks Mode can be triggered by PHP errors or HTML code appearing before the opening <!DOCTYPE html>. Try checking the raw page source or your site's PHP error log and resolving errors there, removing any HTML before the doctype, or disabling plugins.\"\n\t\t);\n\t}\n\n\t// This is a temporary fix for a couple of issues specific to Webkit on iOS.\n\t// Without this hack the browser scrolls the mobile toolbar off-screen.\n\t// Once supported in Safari we can replace this in favor of preventScroll.\n\t// For details see issue #18632 and PR #18686\n\t// Specifically, we scroll `interface-interface-skeleton__body` to enable a fixed top toolbar.\n\t// But Mobile Safari forces the `html` element to scroll upwards, hiding the toolbar.\n\n\tconst isIphone = window.navigator.userAgent.indexOf( 'iPhone' ) !== -1;\n\tif ( isIphone ) {\n\t\twindow.addEventListener( 'scroll', ( event ) => {\n\t\t\tconst editorScrollContainer = document.getElementsByClassName(\n\t\t\t\t'interface-interface-skeleton__body'\n\t\t\t)[ 0 ];\n\t\t\tif ( event.target === document ) {\n\t\t\t\t// Scroll element into view by scrolling the editor container by the same amount\n\t\t\t\t// that Mobile Safari tried to scroll the html element upwards.\n\t\t\t\tif ( window.scrollY > 100 ) {\n\t\t\t\t\teditorScrollContainer.scrollTop =\n\t\t\t\t\t\teditorScrollContainer.scrollTop + window.scrollY;\n\t\t\t\t}\n\t\t\t\t// Undo unwanted scroll on html element, but only in the visual editor.\n\t\t\t\tif (\n\t\t\t\t\tdocument.getElementsByClassName( 'is-mode-visual' )[ 0 ]\n\t\t\t\t) {\n\t\t\t\t\twindow.scrollTo( 0, 0 );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n\n\t// Prevent the default browser action for files dropped outside of dropzones.\n\twindow.addEventListener( 'dragover', ( e ) => e.preventDefault(), false );\n\twindow.addEventListener( 'drop', ( e ) => e.preventDefault(), false );\n\n\t// Drive the resolvers whose data `createPreloadingMiddleware`\n\t// already has cached so every metadata entry they touch is\n\t// `finished` by the time React mounts — no `setTimeout(0)`\n\t// resolution dance on first render. Multi-use lets a single\n\t// preloaded URL back several selectors (e.g. /wp/v2/settings GET +\n\t// OPTIONS serves `getEntitiesConfig`, `canUser`, `getEntityRecord`).\n\tenablePreloadMultiUse();\n\tconst preloadedResolutions = preloadResolutions( postType, postId );\n\n\tpreloadedResolutions.finally( () => {\n\t\t// Anything not consumed by the kickoff falls through to a real\n\t\t// network request from here on. `clearPreloadedData` logs which\n\t\t// preload entries (if any) were never served.\n\t\tclearPreloadedData();\n\t\tif ( postType && postId ) {\n\t\t\tconst post = select( coreDataStore ).getEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tpostType,\n\t\t\t\tpostId\n\t\t\t);\n\t\t\tif ( post ) {\n\t\t\t\tdispatch( editorStore ).setupEditor(\n\t\t\t\t\tpost,\n\t\t\t\t\tinitialEdits,\n\t\t\t\t\tsettings.template\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\troot.render(\n\t\t\t<StrictMode>\n\t\t\t\t<Layout\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tpostId={ postId }\n\t\t\t\t\tpostType={ postType }\n\t\t\t\t\tinitialEdits={ initialEdits }\n\t\t\t\t/>\n\t\t\t</StrictMode>\n\t\t);\n\t} );\n\n\treturn root;\n}\n\n/**\n * Drive resolvers to completion against the preload cache before React\n * mounts. Two phases: known-up-front args (post id + type), then args\n * derived from phase-1 state (post slug → template, current global\n * styles id → record + canUser).\n *\n * @param {string} postType Current post type.\n * @param {number} postId Current post id.\n * @return {Promise<void>} Resolves when the kickoff resolvers settle.\n */\nasync function preloadResolutions( postType, postId ) {\n\tconst core = resolveSelect( coreDataStore );\n\tconst coreSelect = select( coreDataStore );\n\n\ttry {\n\t\tawait Promise.all( [\n\t\t\tcore.getCurrentUser(),\n\t\t\tcore.getEntitiesConfig( 'postType' ),\n\t\t\tcore.getEntitiesConfig( 'taxonomy' ),\n\t\t\tcore.getEntitiesConfig( 'root' ),\n\t\t\tcore.getEntityRecords( 'root', 'taxonomy' ),\n\t\t\tcore.getCurrentTheme(),\n\t\t\t// Forward-resolver alias of `getCurrentTheme` with its own\n\t\t\t// resolution metadata, so it needs a separate kick.\n\t\t\tcore.getThemeSupports(),\n\t\t\tcore.getBlockPatternCategories(),\n\t\t\tcore.__experimentalGetCurrentGlobalStylesId(),\n\t\t\tcore.__experimentalGetCurrentThemeBaseGlobalStyles(),\n\t\t\tcore.__experimentalGetCurrentThemeGlobalStylesVariations(),\n\t\t\tcore.getEntityRecord( 'root', '__unstableBase' ),\n\t\t\tcore.getEntityRecord( 'root', 'site' ),\n\t\t\tcore.canUser( 'read', { kind: 'root', name: 'site' } ),\n\t\t\tcore.canUser( 'create', { kind: 'postType', name: 'attachment' } ),\n\t\t\tcore.canUser( 'create', { kind: 'postType', name: 'page' } ),\n\t\t\tcore.canUser( 'create', { kind: 'postType', name: 'wp_block' } ),\n\t\t\tcore.canUser( 'create', {\n\t\t\t\tkind: 'postType',\n\t\t\t\tname: 'wp_template',\n\t\t\t} ),\n\t\t\t// Per-post resolvers. `getPostType` and `getEditedEntityRecord`\n\t\t\t// are shorthand/forward-resolver aliases with their own\n\t\t\t// resolution metadata, so they need separate kicks.\n\t\t\t...( postType && postId\n\t\t\t\t? [\n\t\t\t\t\t\tcore.getPostType( postType ),\n\t\t\t\t\t\tcore.getEntityRecord( 'postType', postType, postId ),\n\t\t\t\t\t\tcore.getEditedEntityRecord(\n\t\t\t\t\t\t\t'postType',\n\t\t\t\t\t\t\tpostType,\n\t\t\t\t\t\t\tpostId\n\t\t\t\t\t\t),\n\t\t\t\t\t\tcore.getAutosaves( postType, postId ),\n\t\t\t\t\t\tcore.getDefaultTemplateId( { slug: 'front-page' } ),\n\t\t\t\t\t\tcore.canUser( 'create', {\n\t\t\t\t\t\t\tkind: 'postType',\n\t\t\t\t\t\t\tname: postType,\n\t\t\t\t\t\t} ),\n\t\t\t\t ]\n\t\t\t\t: [] ),\n\t\t] );\n\n\t\t// Phase 2: read derived data out of state.\n\t\tconst tasks = [];\n\t\tconst globalStylesId =\n\t\t\tcoreSelect.__experimentalGetCurrentGlobalStylesId();\n\t\tif ( globalStylesId ) {\n\t\t\ttasks.push(\n\t\t\t\tcore.getEntityRecord( 'root', 'globalStyles', globalStylesId ),\n\t\t\t\tcore.canUser( 'read', {\n\t\t\t\t\tkind: 'root',\n\t\t\t\t\tname: 'globalStyles',\n\t\t\t\t\tid: globalStylesId,\n\t\t\t\t} )\n\t\t\t);\n\t\t}\n\n\t\tif ( postType && postId ) {\n\t\t\tconst post = coreSelect.getEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tpostType,\n\t\t\t\tpostId\n\t\t\t);\n\t\t\tif ( post ) {\n\t\t\t\t// Mirrors core-data's `getDefaultTemplate` slug formula.\n\t\t\t\tlet slug = 'page' === postType ? 'page' : 'single-' + postType;\n\t\t\t\tif ( post.slug ) {\n\t\t\t\t\tslug += '-' + post.slug;\n\t\t\t\t}\n\t\t\t\ttasks.push( core.getDefaultTemplateId( { slug } ) );\n\n\t\t\t\tif ( post.author ) {\n\t\t\t\t\ttasks.push(\n\t\t\t\t\t\tcore.getUser( post.author, {\n\t\t\t\t\t\t\tcontext: 'view',\n\t\t\t\t\t\t\t_fields: 'id,name',\n\t\t\t\t\t\t} )\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( tasks.length ) {\n\t\t\tawait Promise.all( tasks );\n\t\t}\n\t} catch {\n\t\t// Resolver failures here would also surface on demand; don't block render.\n\t}\n}\n\n/**\n * Used to reinitialize the editor after an error. Now it's a deprecated noop function.\n */\nexport function reinitializeEditor() {\n\tdeprecated( 'wp.editPost.reinitializeEditor', {\n\t\tsince: '6.2',\n\t\tversion: '6.3',\n\t} );\n}\n\nexport { default as __experimentalFullscreenModeClose } from './components/back-button/fullscreen-mode-close';\nexport { __experimentalMainDashboardButton };\nexport { store } from './store';\nexport * from './deprecated';\n"],
5
- "mappings": ";AAGA,SAAS,SAAS,mBAAmB;AACrC;AAAA,EACC;AAAA,EACA;AAAA,OACM;AACP,OAAO,gBAAgB;AACvB,SAAS,YAAY,kBAAkB;AACvC,SAAS,UAAU,eAAe,cAAc;AAChD,SAAS,SAAS,wBAAwB;AAC1C;AAAA,EACC;AAAA,EACA;AAAA,OACM;AACP;AAAA,EACC,SAAS;AAAA,EACT,eAAe;AAAA,OACT;AACP,SAAS,SAAS,qBAAqB;AACvC,OAAO,cAAc;AAKrB,OAAO,YAAY;AACnB,SAAS,cAAc;AAqSvB,SAAoB,WAAXA,gBAAoD;AAE7D,SAAS,aAAa;AACtB,cAAc;AAvIV;AA/JJ,IAAM;AAAA,EACL,YAAY;AAAA,EACZ;AACD,IAAI,OAAQ,iBAAkB;AAE9B,IAAM,EAAE,uBAAuB,mBAAmB,IAAI;AAAA,EACrD,SAAS;AACV;AAaO,SAAS,iBACf,IACA,UACA,QACA,UACA,cACC;AACD,QAAM,mBAAmB,OAAO,WAAY,oBAAqB,EAAE;AACnE,QAAM,SAAS,SAAS,eAAgB,EAAG;AAC3C,QAAM,OAAO,WAAY,MAAO;AAEhC,WAAU,gBAAiB,EAAE,YAAa,kBAAkB;AAAA,IAC3D,gBAAgB;AAAA,IAChB,aAAa;AAAA,IACb,cAAc;AAAA,IACd,sBAAsB;AAAA,EACvB,CAAE;AAEF,WAAU,gBAAiB,EAAE,YAAa,QAAQ;AAAA,IACjD,0BAA0B;AAAA,IAC1B,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,cAAc;AAAA,IACd,kBAAkB,CAAC;AAAA,IACnB,gBAAgB,CAAC;AAAA,IACjB,YAAY,CAAE,aAAc;AAAA,IAC5B,sBAAsB;AAAA,IACtB,gBAAgB;AAAA,IAChB,uBAAuB;A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AAS;AAAA,cACT,SAAS;AAAA,YACV,CAAE;AAAA,UACH;AAAA,QACD;AAAA,MACD;AAAA,IACD;AAEA,QAAK,MAAM,QAAS;AACnB,YAAM,QAAQ,IAAK,KAAM;AAAA,IAC1B;AAAA,EACD,QAAQ;AAAA,EAER;AACD;AAKO,SAAS,qBAAqB;AACpC,aAAY,kCAAkC;AAAA,IAC7C,OAAO;AAAA,IACP,SAAS;AAAA,EACV,CAAE;AACH;",
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport {\n\tregisterCoreBlocks,\n\t__experimentalRegisterExperimentalCoreBlocks,\n} from '@wordpress/block-library';\nimport deprecated from '@wordpress/deprecated';\nimport { createRoot, StrictMode } from '@wordpress/element';\nimport { dispatch, resolveSelect, select } from '@wordpress/data';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport {\n\tregisterLegacyWidgetBlock,\n\tregisterWidgetGroupBlock,\n} from '@wordpress/widgets';\nimport {\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\nimport { store as coreDataStore } from '@wordpress/core-data';\nimport apiFetch from '@wordpress/api-fetch';\n\n/**\n * Internal dependencies\n */\nimport Layout from './components/layout';\nimport { unlock } from './lock-unlock';\n\nconst {\n\tBackButton: __experimentalMainDashboardButton,\n\tregisterCoreBlockBindingsSources,\n} = unlock( editorPrivateApis );\n\nconst { enablePreloadMultiUse, clearPreloadedData } = unlock(\n\tapiFetch.privateApis\n);\n\n/**\n * Initializes and returns an instance of Editor.\n *\n * @param {string} id Unique identifier for editor instance.\n * @param {string} postType Post type of the post to edit.\n * @param {Object} postId ID of the post to edit.\n * @param {?Object} settings Editor settings object.\n * @param {Object} initialEdits Programmatic edits to apply initially, to be\n * considered as non-user-initiated (bypass for\n * unsaved changes prompt).\n */\nexport function initializeEditor(\n\tid,\n\tpostType,\n\tpostId,\n\tsettings,\n\tinitialEdits\n) {\n\tconst isMediumOrBigger = window.matchMedia( '(min-width: 782px)' ).matches;\n\tconst target = document.getElementById( id );\n\tconst root = createRoot( target );\n\n\tdispatch( preferencesStore ).setDefaults( 'core/edit-post', {\n\t\tfullscreenMode: true,\n\t\tthemeStyles: true,\n\t\twelcomeGuide: true,\n\t\twelcomeGuideTemplate: true,\n\t} );\n\n\tdispatch( preferencesStore ).setDefaults( 'core', {\n\t\tallowRightClickOverrides: true,\n\t\teditorMode: 'visual',\n\t\teditorTool: 'edit',\n\t\tfixedToolbar: false,\n\t\thiddenBlockTypes: [],\n\t\tinactivePanels: [],\n\t\topenPanels: [ 'post-status' ],\n\t\tshowBlockBreadcrumbs: true,\n\t\tshowIconLabels: false,\n\t\tshowListViewByDefault: false,\n\t\tenableChoosePatternModal: true,\n\t\tisPublishSidebarEnabled: true,\n\t\tshowCollaborationCursor: false,\n\t\tshowCollaborationJoinNotifications: true,\n\t\tshowCollaborationLeaveNotifications: true,\n\t\tshowCollaborationPostSaveNotifications: true,\n\t} );\n\n\tif ( window.__clientSideMediaProcessing ) {\n\t\tdispatch( preferencesStore ).setDefaults( 'core/media', {\n\t\t\trequireApproval: true,\n\t\t\toptimizeOnUpload: true,\n\t\t} );\n\t}\n\n\tdispatch( blocksStore ).reapplyBlockTypeFilters();\n\n\t// Check if the block list view should be open by default.\n\t// If `distractionFree` mode is enabled, the block list view should not be open.\n\t// This behavior is disabled for small viewports.\n\tif (\n\t\tisMediumOrBigger &&\n\t\tselect( preferencesStore ).get( 'core', 'showListViewByDefault' ) &&\n\t\t! select( preferencesStore ).get( 'core', 'distractionFree' )\n\t) {\n\t\tdispatch( editorStore ).setIsListViewOpened( true );\n\t}\n\n\tregisterCoreBlocks();\n\tregisterCoreBlockBindingsSources();\n\tregisterLegacyWidgetBlock( { inserter: false } );\n\tregisterWidgetGroupBlock( { inserter: false } );\n\tif ( globalThis.IS_GUTENBERG_PLUGIN ) {\n\t\t__experimentalRegisterExperimentalCoreBlocks( {\n\t\t\tenableFSEBlocks: settings.__unstableEnableFullSiteEditingBlocks,\n\t\t} );\n\t}\n\n\t// Show a console log warning if the browser is not in Standards rendering mode.\n\tconst documentMode =\n\t\tdocument.compatMode === 'CSS1Compat' ? 'Standards' : 'Quirks';\n\tif ( documentMode !== 'Standards' ) {\n\t\t// eslint-disable-next-line no-console\n\t\tconsole.warn(\n\t\t\t\"Your browser is using Quirks Mode. \\nThis can cause rendering issues such as blocks overlaying meta boxes in the editor. Quirks Mode can be triggered by PHP errors or HTML code appearing before the opening <!DOCTYPE html>. Try checking the raw page source or your site's PHP error log and resolving errors there, removing any HTML before the doctype, or disabling plugins.\"\n\t\t);\n\t}\n\n\t// This is a temporary fix for a couple of issues specific to Webkit on iOS.\n\t// Without this hack the browser scrolls the mobile toolbar off-screen.\n\t// Once supported in Safari we can replace this in favor of preventScroll.\n\t// For details see issue #18632 and PR #18686\n\t// Specifically, we scroll `interface-interface-skeleton__body` to enable a fixed top toolbar.\n\t// But Mobile Safari forces the `html` element to scroll upwards, hiding the toolbar.\n\n\tconst isIphone = window.navigator.userAgent.indexOf( 'iPhone' ) !== -1;\n\tif ( isIphone ) {\n\t\twindow.addEventListener( 'scroll', ( event ) => {\n\t\t\tconst editorScrollContainer = document.getElementsByClassName(\n\t\t\t\t'interface-interface-skeleton__body'\n\t\t\t)[ 0 ];\n\t\t\tif ( event.target === document ) {\n\t\t\t\t// Scroll element into view by scrolling the editor container by the same amount\n\t\t\t\t// that Mobile Safari tried to scroll the html element upwards.\n\t\t\t\tif ( window.scrollY > 100 ) {\n\t\t\t\t\teditorScrollContainer.scrollTop =\n\t\t\t\t\t\teditorScrollContainer.scrollTop + window.scrollY;\n\t\t\t\t}\n\t\t\t\t// Undo unwanted scroll on html element, but only in the visual editor.\n\t\t\t\tif (\n\t\t\t\t\tdocument.getElementsByClassName( 'is-mode-visual' )[ 0 ]\n\t\t\t\t) {\n\t\t\t\t\twindow.scrollTo( 0, 0 );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n\n\t// Prevent the default browser action for files dropped outside of dropzones.\n\twindow.addEventListener( 'dragover', ( e ) => e.preventDefault(), false );\n\twindow.addEventListener( 'drop', ( e ) => e.preventDefault(), false );\n\n\t// Drive the resolvers whose data `createPreloadingMiddleware`\n\t// already has cached so every metadata entry they touch is\n\t// `finished` by the time React mounts — no `setTimeout(0)`\n\t// resolution dance on first render. Multi-use lets a single\n\t// preloaded URL back several selectors (e.g. /wp/v2/settings GET +\n\t// OPTIONS serves `getEntitiesConfig`, `canUser`, `getEntityRecord`).\n\tenablePreloadMultiUse();\n\tconst preloadedResolutions = preloadResolutions( postType, postId );\n\n\tpreloadedResolutions.finally( () => {\n\t\t// Anything not consumed by the kickoff falls through to a real\n\t\t// network request from here on. `clearPreloadedData` logs which\n\t\t// preload entries (if any) were never served.\n\t\tclearPreloadedData();\n\t\tif ( postType && postId ) {\n\t\t\tconst post = select( coreDataStore ).getEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tpostType,\n\t\t\t\tpostId\n\t\t\t);\n\t\t\tif ( post ) {\n\t\t\t\tdispatch( editorStore ).setupEditor(\n\t\t\t\t\tpost,\n\t\t\t\t\tinitialEdits,\n\t\t\t\t\tsettings.template\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\troot.render(\n\t\t\t<StrictMode>\n\t\t\t\t<Layout\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tpostId={ postId }\n\t\t\t\t\tpostType={ postType }\n\t\t\t\t\tinitialEdits={ initialEdits }\n\t\t\t\t/>\n\t\t\t</StrictMode>\n\t\t);\n\t} );\n\n\treturn root;\n}\n\n/**\n * Drive resolvers to completion against the preload cache before React\n * mounts. Two phases: known-up-front args (post id + type), then args\n * derived from phase-1 state (post slug → template, current global\n * styles id → record + canUser).\n *\n * @param {string} postType Current post type.\n * @param {number} postId Current post id.\n * @return {Promise<void>} Resolves when the kickoff resolvers settle.\n */\nasync function preloadResolutions( postType, postId ) {\n\tconst core = resolveSelect( coreDataStore );\n\tconst coreSelect = select( coreDataStore );\n\n\ttry {\n\t\tawait Promise.all( [\n\t\t\tcore.getCurrentUser(),\n\t\t\tcore.getEntitiesConfig( 'postType' ),\n\t\t\tcore.getEntitiesConfig( 'taxonomy' ),\n\t\t\tcore.getEntitiesConfig( 'root' ),\n\t\t\tcore.getEntityRecords( 'root', 'taxonomy' ),\n\t\t\tcore.getCurrentTheme(),\n\t\t\t// Forward-resolver alias of `getCurrentTheme` with its own\n\t\t\t// resolution metadata, so it needs a separate kick.\n\t\t\tcore.getThemeSupports(),\n\t\t\tcore.getBlockPatternCategories(),\n\t\t\tcore.__experimentalGetCurrentGlobalStylesId(),\n\t\t\tcore.__experimentalGetCurrentThemeBaseGlobalStyles(),\n\t\t\tcore.__experimentalGetCurrentThemeGlobalStylesVariations(),\n\t\t\tcore.getEntityRecord( 'root', '__unstableBase' ),\n\t\t\tcore.getEntityRecord( 'root', 'site' ),\n\t\t\tcore.canUser( 'read', { kind: 'root', name: 'site' } ),\n\t\t\tcore.canUser( 'create', { kind: 'postType', name: 'attachment' } ),\n\t\t\tcore.canUser( 'create', { kind: 'postType', name: 'page' } ),\n\t\t\tcore.canUser( 'create', { kind: 'postType', name: 'wp_block' } ),\n\t\t\tcore.canUser( 'create', {\n\t\t\t\tkind: 'postType',\n\t\t\t\tname: 'wp_template',\n\t\t\t} ),\n\t\t\t// Per-post resolvers. `getPostType` and `getEditedEntityRecord`\n\t\t\t// are shorthand/forward-resolver aliases with their own\n\t\t\t// resolution metadata, so they need separate kicks.\n\t\t\t...( postType && postId\n\t\t\t\t? [\n\t\t\t\t\t\tcore.getPostType( postType ),\n\t\t\t\t\t\tcore.getEntityRecord( 'postType', postType, postId ),\n\t\t\t\t\t\tcore.getEditedEntityRecord(\n\t\t\t\t\t\t\t'postType',\n\t\t\t\t\t\t\tpostType,\n\t\t\t\t\t\t\tpostId\n\t\t\t\t\t\t),\n\t\t\t\t\t\tcore.getAutosaves( postType, postId ),\n\t\t\t\t\t\tcore.getDefaultTemplateId( { slug: 'front-page' } ),\n\t\t\t\t\t\tcore.canUser( 'create', {\n\t\t\t\t\t\t\tkind: 'postType',\n\t\t\t\t\t\t\tname: postType,\n\t\t\t\t\t\t} ),\n\t\t\t\t ]\n\t\t\t\t: [] ),\n\t\t] );\n\n\t\t// Phase 2: read derived data out of state.\n\t\tconst tasks = [];\n\t\tconst globalStylesId =\n\t\t\tcoreSelect.__experimentalGetCurrentGlobalStylesId();\n\t\tif ( globalStylesId ) {\n\t\t\ttasks.push(\n\t\t\t\tcore.getEntityRecord( 'root', 'globalStyles', globalStylesId ),\n\t\t\t\tcore.canUser( 'read', {\n\t\t\t\t\tkind: 'root',\n\t\t\t\t\tname: 'globalStyles',\n\t\t\t\t\tid: globalStylesId,\n\t\t\t\t} )\n\t\t\t);\n\t\t}\n\n\t\tif ( postType && postId ) {\n\t\t\tconst post = coreSelect.getEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tpostType,\n\t\t\t\tpostId\n\t\t\t);\n\t\t\tif ( post ) {\n\t\t\t\t// Mirrors core-data's `getDefaultTemplate` slug formula.\n\t\t\t\tlet slug = 'page' === postType ? 'page' : 'single-' + postType;\n\t\t\t\tif ( post.slug ) {\n\t\t\t\t\tslug += '-' + post.slug;\n\t\t\t\t}\n\t\t\t\ttasks.push( core.getDefaultTemplateId( { slug } ) );\n\n\t\t\t\tif ( post.author ) {\n\t\t\t\t\ttasks.push(\n\t\t\t\t\t\tcore.getUser( post.author, {\n\t\t\t\t\t\t\tcontext: 'view',\n\t\t\t\t\t\t\t_fields: 'id,name',\n\t\t\t\t\t\t} )\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( tasks.length ) {\n\t\t\tawait Promise.all( tasks );\n\t\t}\n\t} catch {\n\t\t// Resolver failures here would also surface on demand; don't block render.\n\t}\n}\n\n/**\n * Used to reinitialize the editor after an error. Now it's a deprecated noop function.\n */\nexport function reinitializeEditor() {\n\tdeprecated( 'wp.editPost.reinitializeEditor', {\n\t\tsince: '6.2',\n\t\tversion: '6.3',\n\t} );\n}\n\nexport { default as __experimentalFullscreenModeClose } from './components/back-button/fullscreen-mode-close';\nexport { __experimentalMainDashboardButton };\nexport { store } from './store';\nexport * from './deprecated';\n"],
5
+ "mappings": ";AAGA,SAAS,SAAS,mBAAmB;AACrC;AAAA,EACC;AAAA,EACA;AAAA,OACM;AACP,OAAO,gBAAgB;AACvB,SAAS,YAAY,kBAAkB;AACvC,SAAS,UAAU,eAAe,cAAc;AAChD,SAAS,SAAS,wBAAwB;AAC1C;AAAA,EACC;AAAA,EACA;AAAA,OACM;AACP;AAAA,EACC,SAAS;AAAA,EACT,eAAe;AAAA,OACT;AACP,SAAS,SAAS,qBAAqB;AACvC,OAAO,cAAc;AAKrB,OAAO,YAAY;AACnB,SAAS,cAAc;AAuSvB,SAAoB,WAAXA,gBAAoD;AAE7D,SAAS,aAAa;AACtB,cAAc;AAvIV;AAjKJ,IAAM;AAAA,EACL,YAAY;AAAA,EACZ;AACD,IAAI,OAAQ,iBAAkB;AAE9B,IAAM,EAAE,uBAAuB,mBAAmB,IAAI;AAAA,EACrD,SAAS;AACV;AAaO,SAAS,iBACf,IACA,UACA,QACA,UACA,cACC;AACD,QAAM,mBAAmB,OAAO,WAAY,oBAAqB,EAAE;AACnE,QAAM,SAAS,SAAS,eAAgB,EAAG;AAC3C,QAAM,OAAO,WAAY,MAAO;AAEhC,WAAU,gBAAiB,EAAE,YAAa,kBAAkB;AAAA,IAC3D,gBAAgB;AAAA,IAChB,aAAa;AAAA,IACb,cAAc;AAAA,IACd,sBAAsB;AAAA,EACvB,CAAE;AAEF,WAAU,gBAAiB,EAAE,YAAa,QAAQ;AAAA,IACjD,0BAA0B;AAAA,IAC1B,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,cAAc;AAAA,IACd,kBAAkB,CAAC;AAAA,IACnB,gBAAgB,CAAC;AAAA,IACjB,YAAY,CAAE,aAAc;AAAA,IAC5B,sBAAsB;AAAA,IACtB,gBAAg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