@wordpress/edit-site 6.50.0 → 6.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.
- package/build/components/editor/index.cjs +33 -101
- package/build/components/editor/index.cjs.map +3 -3
- package/build/components/layout/index.cjs +12 -14
- 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-hub/index.cjs +24 -155
- 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/editor/index.mjs +36 -104
- package/build-module/components/editor/index.mjs.map +2 -2
- package/build-module/components/layout/index.mjs +12 -14
- 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-hub/index.mjs +27 -158
- 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 +71 -189
- package/build-style/style.css +71 -189
- package/package.json +48 -48
- package/src/components/editor/index.js +18 -101
- package/src/components/editor/style.scss +8 -19
- package/src/components/layout/index.js +12 -15
- package/src/components/layout/style.scss +5 -7
- 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-global-styles/style.scss +7 -4
- package/src/components/sidebar-navigation-screen/style.scss +1 -1
- package/src/components/site-hub/index.js +7 -141
- package/src/components/site-hub/style.scss +0 -72
- package/src/index.js +3 -1
- package/src/style.scss +14 -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,39 @@
|
|
|
1
1
|
// packages/edit-site/src/components/site-hub/index.js
|
|
2
2
|
import clsx from "clsx";
|
|
3
|
-
import { useSelect
|
|
3
|
+
import { useSelect } from "@wordpress/data";
|
|
4
4
|
import { Button, __experimentalHStack as HStack } from "@wordpress/components";
|
|
5
5
|
import { __, isRTL } from "@wordpress/i18n";
|
|
6
6
|
import { store as coreStore } from "@wordpress/core-data";
|
|
7
|
-
import { decodeEntities } from "@wordpress/html-entities";
|
|
8
7
|
import { memo, forwardRef, useContext } from "@wordpress/element";
|
|
9
|
-
import { Icon,
|
|
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";
|
|
8
|
+
import { Icon, chevronLeft, chevronRight } from "@wordpress/icons";
|
|
14
9
|
import { privateApis as routerPrivateApis } from "@wordpress/router";
|
|
15
10
|
import { store as editSiteStore } from "../../store/index.mjs";
|
|
16
|
-
import SiteIcon from "../site-icon/index.mjs";
|
|
17
11
|
import { unlock } from "../../lock-unlock.mjs";
|
|
18
12
|
import { SidebarNavigationContext } from "../sidebar/index.mjs";
|
|
19
|
-
import { jsx
|
|
13
|
+
import { jsx } from "react/jsx-runtime";
|
|
20
14
|
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
15
|
var SiteHubMobile = memo(
|
|
105
16
|
forwardRef(({ isTransparent }, ref) => {
|
|
106
17
|
const { path } = useLocation();
|
|
107
18
|
const history = useHistory();
|
|
108
19
|
const { navigate } = useContext(SidebarNavigationContext);
|
|
109
|
-
const hasAdminBarInEditor = window.__experimentalAdminBarInEditor;
|
|
110
20
|
const {
|
|
111
21
|
dashboardLink,
|
|
112
|
-
homeUrl,
|
|
113
|
-
siteTitle,
|
|
114
22
|
isBlockTheme,
|
|
115
23
|
isClassicThemeWithStyleBookSupport
|
|
116
24
|
} = useSelect((select) => {
|
|
117
25
|
const { getSettings } = unlock(select(editSiteStore));
|
|
118
|
-
const {
|
|
119
|
-
const _site = getEntityRecord("root", "site");
|
|
26
|
+
const { getCurrentTheme } = select(coreStore);
|
|
120
27
|
const currentTheme = getCurrentTheme();
|
|
121
28
|
const settings = getSettings();
|
|
122
29
|
const supportsEditorStyles = currentTheme?.theme_supports["editor-styles"];
|
|
123
30
|
const hasThemeJson = settings.supportsLayout;
|
|
124
31
|
return {
|
|
125
32
|
dashboardLink: settings.__experimentalDashboardLink,
|
|
126
|
-
homeUrl: getEntityRecord("root", "__unstableBase")?.home,
|
|
127
|
-
siteTitle: !_site?.title && !!_site?.url ? filterURLForDisplay(_site?.url) : _site?.title,
|
|
128
33
|
isBlockTheme: currentTheme?.is_block_theme,
|
|
129
34
|
isClassicThemeWithStyleBookSupport: !currentTheme?.is_block_theme && (supportsEditorStyles || hasThemeJson)
|
|
130
35
|
};
|
|
131
36
|
}, []);
|
|
132
|
-
const { open: openCommandCenter } = useDispatch(commandsStore);
|
|
133
37
|
let backPath;
|
|
134
38
|
if (path !== "/") {
|
|
135
39
|
if (isBlockTheme || isClassicThemeWithStyleBookSupport) {
|
|
@@ -146,75 +50,40 @@ var SiteHubMobile = memo(
|
|
|
146
50
|
navigate("back");
|
|
147
51
|
} : void 0
|
|
148
52
|
};
|
|
149
|
-
return /* @__PURE__ */ jsx("div", { className: "edit-site-site-hub", children: /* @__PURE__ */
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
"edit-site-site-hub__view-mode-toggle-container",
|
|
155
|
-
{
|
|
156
|
-
"has-transparent-background": isTransparent
|
|
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,
|
|
53
|
+
return /* @__PURE__ */ jsx("div", { className: "edit-site-site-hub", children: /* @__PURE__ */ jsx(HStack, { justify: "flex-start", spacing: "0", children: /* @__PURE__ */ jsx(
|
|
54
|
+
"div",
|
|
55
|
+
{
|
|
56
|
+
className: clsx(
|
|
57
|
+
"edit-site-site-hub__view-mode-toggle-container",
|
|
184
58
|
{
|
|
185
|
-
|
|
186
|
-
variant: "link",
|
|
187
|
-
href: homeUrl,
|
|
188
|
-
target: "_blank",
|
|
189
|
-
label: __("View site (opens in a new tab)"),
|
|
190
|
-
children: decodeEntities(siteTitle)
|
|
59
|
+
"has-transparent-background": isTransparent
|
|
191
60
|
}
|
|
192
|
-
)
|
|
193
|
-
/* @__PURE__ */ jsx(
|
|
194
|
-
|
|
61
|
+
),
|
|
62
|
+
children: /* @__PURE__ */ jsx(
|
|
63
|
+
Button,
|
|
195
64
|
{
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
className: "edit-site-
|
|
65
|
+
__next40pxDefaultSize: true,
|
|
66
|
+
ref,
|
|
67
|
+
className: "edit-site-layout__view-mode-toggle",
|
|
68
|
+
style: {
|
|
69
|
+
transform: "scale(0.5)",
|
|
70
|
+
borderRadius: 4
|
|
71
|
+
},
|
|
72
|
+
...backButtonProps,
|
|
199
73
|
children: /* @__PURE__ */ jsx(
|
|
200
|
-
|
|
74
|
+
Icon,
|
|
201
75
|
{
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
icon: search,
|
|
205
|
-
onClick: () => openCommandCenter(),
|
|
206
|
-
label: __("Open command palette"),
|
|
207
|
-
shortcut: displayShortcut.primary("k")
|
|
76
|
+
icon: isRTL() ? chevronRight : chevronLeft,
|
|
77
|
+
size: 48
|
|
208
78
|
}
|
|
209
79
|
)
|
|
210
80
|
}
|
|
211
81
|
)
|
|
212
|
-
|
|
213
|
-
|
|
82
|
+
}
|
|
83
|
+
) }) });
|
|
214
84
|
})
|
|
215
85
|
);
|
|
216
86
|
export {
|
|
217
|
-
SiteHubMobile
|
|
218
|
-
site_hub_default as default
|
|
87
|
+
SiteHubMobile
|
|
219
88
|
};
|
|
220
89
|
//# 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 * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect
|
|
5
|
-
"mappings": ";AAGA,OAAO,UAAU;AAKjB,SAAS,
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { Button, __experimentalHStack as HStack } from '@wordpress/components';\nimport { __, isRTL } from '@wordpress/i18n';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { memo, forwardRef, useContext } from '@wordpress/element';\nimport { Icon, 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( ( { isTransparent }, 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<HStack justify=\"flex-start\" spacing=\"0\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t'edit-site-site-hub__view-mode-toggle-container',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'has-transparent-background': isTransparent,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t) }\n\t\t\t\t\t>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tref={ ref }\n\t\t\t\t\t\t\tclassName=\"edit-site-layout__view-mode-toggle\"\n\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\ttransform: 'scale(0.5)',\n\t\t\t\t\t\t\t\tborderRadius: 4,\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t{ ...backButtonProps }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\ticon={ isRTL() ? chevronRight : chevronLeft }\n\t\t\t\t\t\t\t\tsize={ 48 }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</div>\n\t\t\t\t</HStack>\n\t\t\t</div>\n\t\t);\n\t} )\n);\n"],
|
|
5
|
+
"mappings": ";AAGA,OAAO,UAAU;AAKjB,SAAS,iBAAiB;AAC1B,SAAS,QAAQ,wB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;AACN,gBAAQ,SAAU,QAAS;AAC3B,iBAAU,MAAO;AAAA,MACjB,IACA;AAAA,IACJ;AAEA,WACC,oBAAC,SAAI,WAAU,sBACd,8BAAC,UAAO,SAAQ,cAAa,SAAQ,KACpC;AAAA,MAAC;AAAA;AAAA,QACA,WAAY;AAAA,UACX;AAAA,UACA;AAAA,YACC,8BAA8B;AAAA,UAC/B;AAAA,QACD;AAAA,QAEA;AAAA,UAAC;AAAA;AAAA,YACA,uBAAqB;AAAA,YACrB;AAAA,YACA,WAAU;AAAA,YACV,OAAQ;AAAA,cACP,WAAW;AAAA,cACX,cAAc;AAAA,YACf;AAAA,YACE,GAAG;AAAA,YAEL;AAAA,cAAC;AAAA;AAAA,gBACA,MAAO,MAAM,IAAI,eAAe;AAAA,gBAChC,MAAO;AAAA;AAAA,YACR;AAAA;AAAA,QACD;AAAA;AAAA,IACD,GACD,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,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;AAsFhB,SAAoB,WAAXA,gBAA6C;AACtD,SAAS,aAAa;AACtB,cAAc;AAhBX;AAtEH,IAAM,EAAE,iCAAiC,IAAI,OAAQ,iBAAkB;AAQhE,SAAS,iBAAkB,IAAI,UAAW;AAChD,QAAM,SAAS,SAAS,eAAgB,EAAG;AAC3C,QAAM,OAAO,WAAY,MAAO;AAEhC,WAAU,WAAY,EAAE,wBAAwB;AAChD,QAAM,aAAa,4BAA4B,EAAE;AAAA,IAChD,CAAE,EAAE,KAAK,MAAO,SAAS;AAAA,EAC1B;AACA,qBAAoB,UAAW;AAC/B,mCAAiC;AACjC,WAAU,WAAY,EAAE,6BAA8B,WAAY;AAClE,4BAA2B,EAAE,UAAU,MAAM,CAAE;AAC/C,2BAA0B,EAAE,UAAU,MAAM,CAAE;AAC9C,MAAK,WAAW,qBAAsB;AACrC,iDAA8C;AAAA,MAC7C,iBAAiB;AAAA,IAClB,CAAE;AAAA,EACH;AAIA,WAAU,gBAAiB,EAAE,YAAa,kBAAkB;AAAA,IAC3D,cAAc;AAAA,IACd,oBAAoB;AAAA,IACpB,kBAAkB;AAAA,IAClB,sBAAsB;AAAA,EACvB,CAAE;AAEF,WAAU,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