@wordpress/edit-site 6.50.0 → 7.0.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.
- package/CHANGELOG.md +11 -0
- package/build/components/add-new-template/add-custom-template-modal-content.cjs +3 -3
- package/build/components/add-new-template/add-custom-template-modal-content.cjs.map +2 -2
- package/build/components/add-new-template/index.cjs +1 -1
- package/build/components/add-new-template/index.cjs.map +2 -2
- package/build/components/add-new-template-legacy/add-custom-template-modal-content.cjs +3 -3
- package/build/components/add-new-template-legacy/add-custom-template-modal-content.cjs.map +2 -2
- package/build/components/add-new-template-legacy/index.cjs +1 -1
- package/build/components/add-new-template-legacy/index.cjs.map +2 -2
- package/build/components/editor/index.cjs +22 -97
- package/build/components/editor/index.cjs.map +3 -3
- package/build/components/layout/index.cjs +12 -15
- package/build/components/layout/index.cjs.map +3 -3
- package/build/components/page-patterns/fields.cjs +0 -36
- package/build/components/page-patterns/fields.cjs.map +2 -2
- package/build/components/page-patterns/index.cjs +4 -15
- package/build/components/page-patterns/index.cjs.map +2 -2
- package/build/components/save-panel/index.cjs +1 -2
- package/build/components/save-panel/index.cjs.map +2 -2
- package/build/components/site-editor-routes/styles.cjs +4 -3
- package/build/components/site-editor-routes/styles.cjs.map +2 -2
- package/build/components/site-hub/index.cjs +13 -176
- package/build/components/site-hub/index.cjs.map +3 -3
- package/build/index.cjs +3 -1
- package/build/index.cjs.map +2 -2
- package/build-module/components/add-new-template/add-custom-template-modal-content.mjs +3 -3
- package/build-module/components/add-new-template/add-custom-template-modal-content.mjs.map +2 -2
- package/build-module/components/add-new-template/index.mjs +1 -1
- package/build-module/components/add-new-template/index.mjs.map +2 -2
- package/build-module/components/add-new-template-legacy/add-custom-template-modal-content.mjs +3 -3
- package/build-module/components/add-new-template-legacy/add-custom-template-modal-content.mjs.map +2 -2
- package/build-module/components/add-new-template-legacy/index.mjs +1 -1
- package/build-module/components/add-new-template-legacy/index.mjs.map +2 -2
- package/build-module/components/editor/index.mjs +25 -100
- package/build-module/components/editor/index.mjs.map +2 -2
- package/build-module/components/layout/index.mjs +12 -15
- package/build-module/components/layout/index.mjs.map +2 -2
- package/build-module/components/page-patterns/fields.mjs +2 -41
- package/build-module/components/page-patterns/fields.mjs.map +2 -2
- package/build-module/components/page-patterns/index.mjs +5 -16
- package/build-module/components/page-patterns/index.mjs.map +2 -2
- package/build-module/components/save-panel/index.mjs +1 -2
- package/build-module/components/save-panel/index.mjs.map +2 -2
- package/build-module/components/site-editor-routes/styles.mjs +4 -3
- package/build-module/components/site-editor-routes/styles.mjs.map +2 -2
- package/build-module/components/site-hub/index.mjs +17 -170
- package/build-module/components/site-hub/index.mjs.map +2 -2
- package/build-module/index.mjs +3 -1
- package/build-module/index.mjs.map +2 -2
- package/build-style/style-rtl.css +110 -330
- package/build-style/style.css +110 -330
- package/package.json +52 -52
- package/src/components/add-new-template/add-custom-template-modal-content.js +3 -3
- package/src/components/add-new-template/index.js +1 -1
- package/src/components/add-new-template-legacy/add-custom-template-modal-content.js +3 -3
- package/src/components/add-new-template-legacy/index.js +1 -1
- package/src/components/editor/index.js +31 -122
- package/src/components/editor/style.scss +0 -62
- package/src/components/layout/index.js +13 -18
- package/src/components/layout/style.scss +5 -62
- package/src/components/page-patterns/fields.js +2 -50
- package/src/components/page-patterns/index.js +5 -23
- package/src/components/page-patterns/style.scss +1 -1
- package/src/components/save-panel/index.js +1 -2
- package/src/components/sidebar/style.scss +2 -0
- package/src/components/sidebar-button/style.scss +1 -9
- package/src/components/sidebar-global-styles/style.scss +7 -4
- package/src/components/sidebar-navigation-item/style.scss +8 -4
- package/src/components/sidebar-navigation-screen/style.scss +1 -1
- package/src/components/sidebar-navigation-screen-navigation-menus/style.scss +2 -2
- package/src/components/sidebar-navigation-screen-patterns/style.scss +1 -1
- package/src/components/site-editor-routes/styles.js +5 -2
- package/src/components/site-hub/index.js +12 -170
- package/src/components/site-hub/style.scss +5 -82
- package/src/index.js +3 -1
- package/src/style.scss +16 -11
- package/build/components/site-icon/index.cjs +0 -73
- package/build/components/site-icon/index.cjs.map +0 -7
- package/build-module/components/site-icon/index.mjs +0 -42
- package/build-module/components/site-icon/index.mjs.map +0 -7
- package/build-style/experimental-omnibar-rtl.css +0 -103
- package/build-style/experimental-omnibar.css +0 -103
- package/src/components/site-icon/index.js +0 -51
- package/src/components/site-icon/style.scss +0 -41
- package/src/experimental-omnibar.scss +0 -75
|
@@ -1,135 +1,38 @@
|
|
|
1
1
|
// packages/edit-site/src/components/site-hub/index.js
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import { Button, __experimentalHStack as HStack } from "@wordpress/components";
|
|
2
|
+
import { useSelect } from "@wordpress/data";
|
|
3
|
+
import { Button } from "@wordpress/components";
|
|
5
4
|
import { __, isRTL } from "@wordpress/i18n";
|
|
6
5
|
import { store as coreStore } from "@wordpress/core-data";
|
|
7
|
-
import { decodeEntities } from "@wordpress/html-entities";
|
|
8
6
|
import { memo, forwardRef, useContext } from "@wordpress/element";
|
|
9
|
-
import {
|
|
10
|
-
import { store as commandsStore } from "@wordpress/commands";
|
|
11
|
-
import { displayShortcut } from "@wordpress/keycodes";
|
|
12
|
-
import { VisuallyHidden } from "@wordpress/ui";
|
|
13
|
-
import { filterURLForDisplay } from "@wordpress/url";
|
|
7
|
+
import { chevronLeft, chevronRight } from "@wordpress/icons";
|
|
14
8
|
import { privateApis as routerPrivateApis } from "@wordpress/router";
|
|
15
9
|
import { store as editSiteStore } from "../../store/index.mjs";
|
|
16
|
-
import SiteIcon from "../site-icon/index.mjs";
|
|
17
10
|
import { unlock } from "../../lock-unlock.mjs";
|
|
18
11
|
import { SidebarNavigationContext } from "../sidebar/index.mjs";
|
|
19
|
-
import { jsx
|
|
12
|
+
import { jsx } from "react/jsx-runtime";
|
|
20
13
|
var { useLocation, useHistory } = unlock(routerPrivateApis);
|
|
21
|
-
var SiteHub = memo(
|
|
22
|
-
forwardRef(({ isTransparent }, ref) => {
|
|
23
|
-
const { dashboardLink, homeUrl, siteTitle } = useSelect((select) => {
|
|
24
|
-
const { getSettings } = unlock(select(editSiteStore));
|
|
25
|
-
const { getEntityRecord } = select(coreStore);
|
|
26
|
-
const _site = getEntityRecord("root", "site");
|
|
27
|
-
return {
|
|
28
|
-
dashboardLink: getSettings().__experimentalDashboardLink,
|
|
29
|
-
homeUrl: getEntityRecord("root", "__unstableBase")?.home,
|
|
30
|
-
siteTitle: !_site?.title && !!_site?.url ? filterURLForDisplay(_site?.url) : _site?.title
|
|
31
|
-
};
|
|
32
|
-
}, []);
|
|
33
|
-
const { open: openCommandCenter } = useDispatch(commandsStore);
|
|
34
|
-
return /* @__PURE__ */ jsx("div", { className: "edit-site-site-hub", children: /* @__PURE__ */ jsxs(HStack, { justify: "flex-start", spacing: "0", children: [
|
|
35
|
-
/* @__PURE__ */ jsx(
|
|
36
|
-
"div",
|
|
37
|
-
{
|
|
38
|
-
className: clsx(
|
|
39
|
-
"edit-site-site-hub__view-mode-toggle-container",
|
|
40
|
-
{
|
|
41
|
-
"has-transparent-background": isTransparent
|
|
42
|
-
}
|
|
43
|
-
),
|
|
44
|
-
children: /* @__PURE__ */ jsx(
|
|
45
|
-
Button,
|
|
46
|
-
{
|
|
47
|
-
__next40pxDefaultSize: true,
|
|
48
|
-
ref,
|
|
49
|
-
href: dashboardLink,
|
|
50
|
-
label: __("Go to the Dashboard"),
|
|
51
|
-
className: "edit-site-layout__view-mode-toggle",
|
|
52
|
-
style: {
|
|
53
|
-
transform: "scale(0.5333) translateX(-4px)",
|
|
54
|
-
// Offset to position the icon 12px from viewport edge
|
|
55
|
-
borderRadius: 4
|
|
56
|
-
},
|
|
57
|
-
children: /* @__PURE__ */ jsx(SiteIcon, { className: "edit-site-layout__view-mode-toggle-icon" })
|
|
58
|
-
}
|
|
59
|
-
)
|
|
60
|
-
}
|
|
61
|
-
),
|
|
62
|
-
/* @__PURE__ */ jsxs(HStack, { children: [
|
|
63
|
-
/* @__PURE__ */ jsx("div", { className: "edit-site-site-hub__title", children: /* @__PURE__ */ jsxs(
|
|
64
|
-
Button,
|
|
65
|
-
{
|
|
66
|
-
__next40pxDefaultSize: true,
|
|
67
|
-
variant: "link",
|
|
68
|
-
href: homeUrl,
|
|
69
|
-
target: "_blank",
|
|
70
|
-
children: [
|
|
71
|
-
decodeEntities(siteTitle),
|
|
72
|
-
/* @__PURE__ */ jsx(VisuallyHidden, {
|
|
73
|
-
render: /* @__PURE__ */ jsx("span", {}),
|
|
74
|
-
/* translators: accessibility text */
|
|
75
|
-
children: __("(opens in a new tab)")
|
|
76
|
-
})
|
|
77
|
-
]
|
|
78
|
-
}
|
|
79
|
-
) }),
|
|
80
|
-
/* @__PURE__ */ jsx(
|
|
81
|
-
HStack,
|
|
82
|
-
{
|
|
83
|
-
spacing: 0,
|
|
84
|
-
expanded: false,
|
|
85
|
-
className: "edit-site-site-hub__actions",
|
|
86
|
-
children: /* @__PURE__ */ jsx(
|
|
87
|
-
Button,
|
|
88
|
-
{
|
|
89
|
-
size: "compact",
|
|
90
|
-
className: "edit-site-site-hub_toggle-command-center",
|
|
91
|
-
icon: search,
|
|
92
|
-
onClick: () => openCommandCenter(),
|
|
93
|
-
label: __("Open command palette"),
|
|
94
|
-
shortcut: displayShortcut.primary("k")
|
|
95
|
-
}
|
|
96
|
-
)
|
|
97
|
-
}
|
|
98
|
-
)
|
|
99
|
-
] })
|
|
100
|
-
] }) });
|
|
101
|
-
})
|
|
102
|
-
);
|
|
103
|
-
var site_hub_default = SiteHub;
|
|
104
14
|
var SiteHubMobile = memo(
|
|
105
|
-
forwardRef((
|
|
15
|
+
forwardRef((props, ref) => {
|
|
106
16
|
const { path } = useLocation();
|
|
107
17
|
const history = useHistory();
|
|
108
18
|
const { navigate } = useContext(SidebarNavigationContext);
|
|
109
|
-
const hasAdminBarInEditor = window.__experimentalAdminBarInEditor;
|
|
110
19
|
const {
|
|
111
20
|
dashboardLink,
|
|
112
|
-
homeUrl,
|
|
113
|
-
siteTitle,
|
|
114
21
|
isBlockTheme,
|
|
115
22
|
isClassicThemeWithStyleBookSupport
|
|
116
23
|
} = useSelect((select) => {
|
|
117
24
|
const { getSettings } = unlock(select(editSiteStore));
|
|
118
|
-
const {
|
|
119
|
-
const _site = getEntityRecord("root", "site");
|
|
25
|
+
const { getCurrentTheme } = select(coreStore);
|
|
120
26
|
const currentTheme = getCurrentTheme();
|
|
121
27
|
const settings = getSettings();
|
|
122
28
|
const supportsEditorStyles = currentTheme?.theme_supports["editor-styles"];
|
|
123
29
|
const hasThemeJson = settings.supportsLayout;
|
|
124
30
|
return {
|
|
125
31
|
dashboardLink: settings.__experimentalDashboardLink,
|
|
126
|
-
homeUrl: getEntityRecord("root", "__unstableBase")?.home,
|
|
127
|
-
siteTitle: !_site?.title && !!_site?.url ? filterURLForDisplay(_site?.url) : _site?.title,
|
|
128
32
|
isBlockTheme: currentTheme?.is_block_theme,
|
|
129
33
|
isClassicThemeWithStyleBookSupport: !currentTheme?.is_block_theme && (supportsEditorStyles || hasThemeJson)
|
|
130
34
|
};
|
|
131
35
|
}, []);
|
|
132
|
-
const { open: openCommandCenter } = useDispatch(commandsStore);
|
|
133
36
|
let backPath;
|
|
134
37
|
if (path !== "/") {
|
|
135
38
|
if (isBlockTheme || isClassicThemeWithStyleBookSupport) {
|
|
@@ -146,75 +49,19 @@ var SiteHubMobile = memo(
|
|
|
146
49
|
navigate("back");
|
|
147
50
|
} : void 0
|
|
148
51
|
};
|
|
149
|
-
return /* @__PURE__ */ jsx("div", { className: "edit-site-site-hub", children: /* @__PURE__ */
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
children: /* @__PURE__ */ jsx(
|
|
160
|
-
Button,
|
|
161
|
-
{
|
|
162
|
-
__next40pxDefaultSize: true,
|
|
163
|
-
ref,
|
|
164
|
-
className: "edit-site-layout__view-mode-toggle",
|
|
165
|
-
style: {
|
|
166
|
-
transform: "scale(0.5)",
|
|
167
|
-
borderRadius: 4
|
|
168
|
-
},
|
|
169
|
-
...backButtonProps,
|
|
170
|
-
children: hasAdminBarInEditor ? /* @__PURE__ */ jsx(
|
|
171
|
-
Icon,
|
|
172
|
-
{
|
|
173
|
-
icon: isRTL() ? arrowUpRight : arrowUpLeft,
|
|
174
|
-
size: 48
|
|
175
|
-
}
|
|
176
|
-
) : /* @__PURE__ */ jsx(SiteIcon, { className: "edit-site-layout__view-mode-toggle-icon" })
|
|
177
|
-
}
|
|
178
|
-
)
|
|
179
|
-
}
|
|
180
|
-
),
|
|
181
|
-
/* @__PURE__ */ jsxs(HStack, { children: [
|
|
182
|
-
/* @__PURE__ */ jsx("div", { className: "edit-site-site-hub__title", children: /* @__PURE__ */ jsx(
|
|
183
|
-
Button,
|
|
184
|
-
{
|
|
185
|
-
__next40pxDefaultSize: true,
|
|
186
|
-
variant: "link",
|
|
187
|
-
href: homeUrl,
|
|
188
|
-
target: "_blank",
|
|
189
|
-
label: __("View site (opens in a new tab)"),
|
|
190
|
-
children: decodeEntities(siteTitle)
|
|
191
|
-
}
|
|
192
|
-
) }),
|
|
193
|
-
/* @__PURE__ */ jsx(
|
|
194
|
-
HStack,
|
|
195
|
-
{
|
|
196
|
-
spacing: 0,
|
|
197
|
-
expanded: false,
|
|
198
|
-
className: "edit-site-site-hub__actions",
|
|
199
|
-
children: /* @__PURE__ */ jsx(
|
|
200
|
-
Button,
|
|
201
|
-
{
|
|
202
|
-
__next40pxDefaultSize: true,
|
|
203
|
-
className: "edit-site-site-hub_toggle-command-center",
|
|
204
|
-
icon: search,
|
|
205
|
-
onClick: () => openCommandCenter(),
|
|
206
|
-
label: __("Open command palette"),
|
|
207
|
-
shortcut: displayShortcut.primary("k")
|
|
208
|
-
}
|
|
209
|
-
)
|
|
210
|
-
}
|
|
211
|
-
)
|
|
212
|
-
] })
|
|
213
|
-
] }) });
|
|
52
|
+
return /* @__PURE__ */ jsx("div", { className: "edit-site-site-hub", children: /* @__PURE__ */ jsx(
|
|
53
|
+
Button,
|
|
54
|
+
{
|
|
55
|
+
size: "compact",
|
|
56
|
+
ref,
|
|
57
|
+
className: "edit-site-site-hub__back-button",
|
|
58
|
+
icon: isRTL() ? chevronRight : chevronLeft,
|
|
59
|
+
...backButtonProps
|
|
60
|
+
}
|
|
61
|
+
) });
|
|
214
62
|
})
|
|
215
63
|
);
|
|
216
64
|
export {
|
|
217
|
-
SiteHubMobile
|
|
218
|
-
site_hub_default as default
|
|
65
|
+
SiteHubMobile
|
|
219
66
|
};
|
|
220
67
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/site-hub/index.js"],
|
|
4
|
-
"sourcesContent": ["/**\n *
|
|
5
|
-
"mappings": ";AAGA,
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { Button } from '@wordpress/components';\nimport { __, isRTL } from '@wordpress/i18n';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { memo, forwardRef, useContext } from '@wordpress/element';\nimport { chevronLeft, chevronRight } from '@wordpress/icons';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport { SidebarNavigationContext } from '../sidebar';\nconst { useLocation, useHistory } = unlock( routerPrivateApis );\n\nexport const SiteHubMobile = memo(\n\tforwardRef( ( props, ref ) => {\n\t\tconst { path } = useLocation();\n\t\tconst history = useHistory();\n\t\tconst { navigate } = useContext( SidebarNavigationContext );\n\n\t\tconst {\n\t\t\tdashboardLink,\n\t\t\tisBlockTheme,\n\t\t\tisClassicThemeWithStyleBookSupport,\n\t\t} = useSelect( ( select ) => {\n\t\t\tconst { getSettings } = unlock( select( editSiteStore ) );\n\t\t\tconst { getCurrentTheme } = select( coreStore );\n\t\t\tconst currentTheme = getCurrentTheme();\n\t\t\tconst settings = getSettings();\n\t\t\tconst supportsEditorStyles =\n\t\t\t\tcurrentTheme?.theme_supports[ 'editor-styles' ];\n\t\t\t// This is a temp solution until the has_theme_json value is available for the current theme.\n\t\t\tconst hasThemeJson = settings.supportsLayout;\n\n\t\t\treturn {\n\t\t\t\tdashboardLink: settings.__experimentalDashboardLink,\n\t\t\t\tisBlockTheme: currentTheme?.is_block_theme,\n\t\t\t\tisClassicThemeWithStyleBookSupport:\n\t\t\t\t\t! currentTheme?.is_block_theme &&\n\t\t\t\t\t( supportsEditorStyles || hasThemeJson ),\n\t\t\t};\n\t\t}, [] );\n\n\t\tlet backPath;\n\n\t\t// If the current path is not the root page, find a page to back to.\n\t\tif ( path !== '/' ) {\n\t\t\tif ( isBlockTheme || isClassicThemeWithStyleBookSupport ) {\n\t\t\t\t// If the current theme is a block theme or a classic theme that supports StyleBook,\n\t\t\t\t// back to the Design screen.\n\t\t\t\tbackPath = '/';\n\t\t\t} else if ( path !== '/pattern' ) {\n\t\t\t\t// If the current theme is a classic theme that does not support StyleBook,\n\t\t\t\t// back to the Patterns page.\n\t\t\t\tbackPath = '/pattern';\n\t\t\t}\n\t\t}\n\n\t\tconst backButtonProps = {\n\t\t\thref: !! backPath ? undefined : dashboardLink,\n\t\t\tlabel: !! backPath\n\t\t\t\t? __( 'Go to Site Editor' )\n\t\t\t\t: __( 'Go to the Dashboard' ),\n\t\t\tonClick: !! backPath\n\t\t\t\t? () => {\n\t\t\t\t\t\thistory.navigate( backPath );\n\t\t\t\t\t\tnavigate( 'back' );\n\t\t\t\t }\n\t\t\t\t: undefined,\n\t\t};\n\n\t\treturn (\n\t\t\t<div className=\"edit-site-site-hub\">\n\t\t\t\t<Button\n\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\tref={ ref }\n\t\t\t\t\tclassName=\"edit-site-site-hub__back-button\"\n\t\t\t\t\ticon={ isRTL() ? chevronRight : chevronLeft }\n\t\t\t\t\t{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OAAO,CAAC,CAAE,WACP,GAAI,mBAAoB,IACxB,GAAI,qBAAsB;AAAA,MAC7B,SAAS,CAAC,CAAE,WACT,MAAM;AACN,gBAAQ,SAAU,QAAS;AAC3B,iBAAU,MAAO;AAAA,MACjB,IACA;AAAA,IACJ;AAEA,WACC,oBAAC,SAAI,WAAU,sBACd;AAAA,MAAC;AAAA;AAAA,QACA,MAAK;AAAA,QACL;AAAA,QACA,WAAU;AAAA,QACV,MAAO,MAAM,IAAI,eAAe;AAAA,QAC9B,GAAG;AAAA;AAAA,IACN,GACD;AAAA,EAEF,CAAE;AACH;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/build-module/index.mjs
CHANGED
|
@@ -59,7 +59,9 @@ function initializeEditor(id, settings) {
|
|
|
59
59
|
showListViewByDefault: false,
|
|
60
60
|
enableChoosePatternModal: true,
|
|
61
61
|
showCollaborationCursor: false,
|
|
62
|
-
|
|
62
|
+
showCollaborationJoinNotifications: true,
|
|
63
|
+
showCollaborationLeaveNotifications: true,
|
|
64
|
+
showCollaborationPostSaveNotifications: true
|
|
63
65
|
});
|
|
64
66
|
if (window.__clientSideMediaProcessing) {
|
|
65
67
|
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__experimentalGetCoreBlocks,\n\t__experimentalRegisterExperimentalCoreBlocks,\n} from '@wordpress/block-library';\nimport { dispatch } from '@wordpress/data';\nimport deprecated from '@wordpress/deprecated';\nimport { createRoot, StrictMode } from '@wordpress/element';\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport {\n\tregisterLegacyWidgetBlock,\n\tregisterWidgetGroupBlock,\n} from '@wordpress/widgets';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from './store';\nimport { unlock } from './lock-unlock';\nimport App from './components/app';\n\nconst { registerCoreBlockBindingsSources } = unlock( editorPrivateApis );\n\n/**\n * Initializes the site editor screen.\n *\n * @param {string} id ID of the root element to render the screen in.\n * @param {Object} settings Editor settings.\n */\nexport function initializeEditor( id, settings ) {\n\tconst target = document.getElementById( id );\n\tconst root = createRoot( target );\n\n\tdispatch( blocksStore ).reapplyBlockTypeFilters();\n\tconst coreBlocks = __experimentalGetCoreBlocks().filter(\n\t\t( { name } ) => name !== 'core/freeform'\n\t);\n\tregisterCoreBlocks( coreBlocks );\n\tregisterCoreBlockBindingsSources();\n\tdispatch( blocksStore ).setFreeformFallbackBlockName( 'core/html' );\n\tregisterLegacyWidgetBlock( { inserter: false } );\n\tregisterWidgetGroupBlock( { inserter: false } );\n\tif ( globalThis.IS_GUTENBERG_PLUGIN ) {\n\t\t__experimentalRegisterExperimentalCoreBlocks( {\n\t\t\tenableFSEBlocks: true,\n\t\t} );\n\t}\n\n\t// We dispatch actions and update the store synchronously before rendering\n\t// so that we won't trigger unnecessary re-renders with useEffect.\n\tdispatch( preferencesStore ).setDefaults( 'core/edit-site', {\n\t\twelcomeGuide: true,\n\t\twelcomeGuideStyles: true,\n\t\twelcomeGuidePage: true,\n\t\twelcomeGuideTemplate: true,\n\t} );\n\n\tdispatch( preferencesStore ).setDefaults( 'core', {\n\t\tallowRightClickOverrides: true,\n\t\tdistractionFree: false,\n\t\teditorMode: 'visual',\n\t\teditorTool: 'edit',\n\t\tfixedToolbar: false,\n\t\tfocusMode: false,\n\t\tinactivePanels: [],\n\t\tkeepCaretInsideBlock: false,\n\t\topenPanels: [ 'post-status' ],\n\t\tshowBlockBreadcrumbs: true,\n\t\tshowListViewByDefault: false,\n\t\tenableChoosePatternModal: true,\n\t\tshowCollaborationCursor: false,\n\t\
|
|
5
|
-
"mappings": ";AAGA,SAAS,SAAS,mBAAmB;AACrC;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,OACM;AACP,SAAS,gBAAgB;AACzB,OAAO,gBAAgB;AACvB,SAAS,YAAY,kBAAkB;AACvC,SAAS,eAAe,yBAAyB;AACjD,SAAS,SAAS,wBAAwB;AAC1C;AAAA,EACC;AAAA,EACA;AAAA,OACM;AAKP,SAAS,SAAS,qBAAqB;AACvC,SAAS,cAAc;AACvB,OAAO,SAAS;
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport {\n\tregisterCoreBlocks,\n\t__experimentalGetCoreBlocks,\n\t__experimentalRegisterExperimentalCoreBlocks,\n} from '@wordpress/block-library';\nimport { dispatch } from '@wordpress/data';\nimport deprecated from '@wordpress/deprecated';\nimport { createRoot, StrictMode } from '@wordpress/element';\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport {\n\tregisterLegacyWidgetBlock,\n\tregisterWidgetGroupBlock,\n} from '@wordpress/widgets';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from './store';\nimport { unlock } from './lock-unlock';\nimport App from './components/app';\n\nconst { registerCoreBlockBindingsSources } = unlock( editorPrivateApis );\n\n/**\n * Initializes the site editor screen.\n *\n * @param {string} id ID of the root element to render the screen in.\n * @param {Object} settings Editor settings.\n */\nexport function initializeEditor( id, settings ) {\n\tconst target = document.getElementById( id );\n\tconst root = createRoot( target );\n\n\tdispatch( blocksStore ).reapplyBlockTypeFilters();\n\tconst coreBlocks = __experimentalGetCoreBlocks().filter(\n\t\t( { name } ) => name !== 'core/freeform'\n\t);\n\tregisterCoreBlocks( coreBlocks );\n\tregisterCoreBlockBindingsSources();\n\tdispatch( blocksStore ).setFreeformFallbackBlockName( 'core/html' );\n\tregisterLegacyWidgetBlock( { inserter: false } );\n\tregisterWidgetGroupBlock( { inserter: false } );\n\tif ( globalThis.IS_GUTENBERG_PLUGIN ) {\n\t\t__experimentalRegisterExperimentalCoreBlocks( {\n\t\t\tenableFSEBlocks: true,\n\t\t} );\n\t}\n\n\t// We dispatch actions and update the store synchronously before rendering\n\t// so that we won't trigger unnecessary re-renders with useEffect.\n\tdispatch( preferencesStore ).setDefaults( 'core/edit-site', {\n\t\twelcomeGuide: true,\n\t\twelcomeGuideStyles: true,\n\t\twelcomeGuidePage: true,\n\t\twelcomeGuideTemplate: true,\n\t} );\n\n\tdispatch( preferencesStore ).setDefaults( 'core', {\n\t\tallowRightClickOverrides: true,\n\t\tdistractionFree: false,\n\t\teditorMode: 'visual',\n\t\teditorTool: 'edit',\n\t\tfixedToolbar: false,\n\t\tfocusMode: false,\n\t\tinactivePanels: [],\n\t\tkeepCaretInsideBlock: false,\n\t\topenPanels: [ 'post-status' ],\n\t\tshowBlockBreadcrumbs: true,\n\t\tshowListViewByDefault: false,\n\t\tenableChoosePatternModal: 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( editSiteStore ).updateSettings( settings );\n\n\t// Prevent the default browser action for files dropped outside of dropzones.\n\twindow.addEventListener( 'dragover', ( e ) => e.preventDefault(), false );\n\twindow.addEventListener( 'drop', ( e ) => e.preventDefault(), false );\n\n\troot.render(\n\t\t<StrictMode>\n\t\t\t<App />\n\t\t</StrictMode>\n\t);\n\n\treturn root;\n}\n\nexport function reinitializeEditor() {\n\tdeprecated( 'wp.editSite.reinitializeEditor', {\n\t\tsince: '6.2',\n\t\tversion: '6.3',\n\t} );\n}\n\nexport { default as PluginTemplateSettingPanel } from './components/plugin-template-setting-panel';\nexport { store } from './store';\nexport * from './deprecated';\n"],
|
|
5
|
+
"mappings": ";AAGA,S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