@wordpress/edit-site 6.48.0 → 6.48.2-next.v.202606191442.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 +7 -1
- package/build/components/editor/use-editor-title.cjs +1 -1
- package/build/components/editor/use-editor-title.cjs.map +2 -2
- package/build/components/layout/index.cjs +47 -9
- package/build/components/layout/index.cjs.map +3 -3
- package/build/components/page-templates/index-legacy.cjs +12 -8
- package/build/components/page-templates/index-legacy.cjs.map +2 -2
- package/build/components/post-list/quick-edit-modal.cjs +0 -1
- package/build/components/post-list/quick-edit-modal.cjs.map +2 -2
- package/build/components/resizable-frame/index.cjs.map +2 -2
- package/build/components/routes/use-title.cjs +1 -1
- package/build/components/routes/use-title.cjs.map +2 -2
- package/build/components/save-button/index.cjs +2 -2
- package/build/components/save-button/index.cjs.map +1 -1
- package/build/components/save-hub/index.cjs +3 -3
- package/build/components/save-hub/index.cjs.map +3 -3
- package/build/components/sidebar-navigation-item/index.cjs +8 -3
- package/build/components/sidebar-navigation-item/index.cjs.map +3 -3
- package/build/components/sidebar-navigation-screen/index.cjs +0 -1
- package/build/components/sidebar-navigation-screen/index.cjs.map +2 -2
- package/build/components/sidebar-navigation-screen-global-styles/index.cjs +2 -18
- package/build/components/sidebar-navigation-screen-global-styles/index.cjs.map +3 -3
- package/build/components/sidebar-navigation-screen-identity/index.cjs +0 -19
- package/build/components/sidebar-navigation-screen-identity/index.cjs.map +3 -3
- package/build/components/sidebar-navigation-screen-main/index.cjs +25 -25
- package/build/components/sidebar-navigation-screen-main/index.cjs.map +2 -2
- package/build/components/sidebar-navigation-screen-patterns/index.cjs +1 -1
- package/build/components/sidebar-navigation-screen-patterns/index.cjs.map +2 -2
- package/build/components/site-editor-routes/home.cjs +1 -1
- package/build/components/site-editor-routes/home.cjs.map +2 -2
- package/build/components/site-editor-routes/identity.cjs +1 -12
- package/build/components/site-editor-routes/identity.cjs.map +3 -3
- package/build/components/site-editor-routes/navigation-item.cjs +2 -10
- package/build/components/site-editor-routes/navigation-item.cjs.map +3 -3
- package/build/components/site-editor-routes/navigation.cjs +2 -10
- package/build/components/site-editor-routes/navigation.cjs.map +3 -3
- package/build/components/site-editor-routes/notfound.cjs +1 -1
- package/build/components/site-editor-routes/notfound.cjs.map +2 -2
- package/build/components/site-editor-routes/page-item.cjs +1 -6
- package/build/components/site-editor-routes/page-item.cjs.map +2 -2
- package/build/components/site-editor-routes/pages.cjs +6 -9
- package/build/components/site-editor-routes/pages.cjs.map +3 -3
- package/build/components/site-editor-routes/pattern-item.cjs +1 -1
- package/build/components/site-editor-routes/pattern-item.cjs.map +2 -2
- package/build/components/site-editor-routes/patterns.cjs +8 -3
- package/build/components/site-editor-routes/patterns.cjs.map +2 -2
- package/build/components/site-editor-routes/stylebook.cjs +1 -1
- package/build/components/site-editor-routes/stylebook.cjs.map +2 -2
- package/build/components/site-editor-routes/styles.cjs +1 -9
- package/build/components/site-editor-routes/styles.cjs.map +2 -2
- package/build/components/site-editor-routes/template-item.cjs +1 -6
- package/build/components/site-editor-routes/template-item.cjs.map +2 -2
- package/build/components/site-editor-routes/template-part-item.cjs +1 -1
- package/build/components/site-editor-routes/template-part-item.cjs.map +2 -2
- package/build/components/site-editor-routes/templates.cjs +8 -1
- package/build/components/site-editor-routes/templates.cjs.map +2 -2
- package/build/components/welcome-guide/editor.cjs +1 -1
- package/build/components/welcome-guide/editor.cjs.map +1 -1
- package/build/components/welcome-guide/page.cjs +1 -1
- package/build/components/welcome-guide/page.cjs.map +1 -1
- package/build/components/welcome-guide/template.cjs +1 -1
- package/build/components/welcome-guide/template.cjs.map +1 -1
- package/build/store/selectors.cjs +2 -4
- package/build/store/selectors.cjs.map +2 -2
- package/build-module/components/editor/use-editor-title.mjs +1 -1
- package/build-module/components/editor/use-editor-title.mjs.map +2 -2
- package/build-module/components/layout/index.mjs +49 -11
- package/build-module/components/layout/index.mjs.map +2 -2
- package/build-module/components/page-templates/index-legacy.mjs +13 -9
- package/build-module/components/page-templates/index-legacy.mjs.map +2 -2
- package/build-module/components/post-list/quick-edit-modal.mjs +0 -1
- package/build-module/components/post-list/quick-edit-modal.mjs.map +2 -2
- package/build-module/components/resizable-frame/index.mjs.map +2 -2
- package/build-module/components/routes/use-title.mjs +1 -1
- package/build-module/components/routes/use-title.mjs.map +2 -2
- package/build-module/components/save-button/index.mjs +2 -2
- package/build-module/components/save-button/index.mjs.map +1 -1
- package/build-module/components/save-hub/index.mjs +3 -3
- package/build-module/components/save-hub/index.mjs.map +2 -2
- package/build-module/components/sidebar-navigation-item/index.mjs +9 -8
- package/build-module/components/sidebar-navigation-item/index.mjs.map +2 -2
- package/build-module/components/sidebar-navigation-screen/index.mjs +0 -1
- package/build-module/components/sidebar-navigation-screen/index.mjs.map +2 -2
- package/build-module/components/sidebar-navigation-screen-global-styles/index.mjs +2 -14
- package/build-module/components/sidebar-navigation-screen-global-styles/index.mjs.map +2 -2
- package/build-module/components/sidebar-navigation-screen-identity/index.mjs +0 -15
- package/build-module/components/sidebar-navigation-screen-identity/index.mjs.map +2 -2
- package/build-module/components/sidebar-navigation-screen-main/index.mjs +25 -25
- package/build-module/components/sidebar-navigation-screen-main/index.mjs.map +2 -2
- package/build-module/components/sidebar-navigation-screen-patterns/index.mjs +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/index.mjs.map +2 -2
- package/build-module/components/site-editor-routes/home.mjs +1 -1
- package/build-module/components/site-editor-routes/home.mjs.map +2 -2
- package/build-module/components/site-editor-routes/identity.mjs +1 -12
- package/build-module/components/site-editor-routes/identity.mjs.map +2 -2
- package/build-module/components/site-editor-routes/navigation-item.mjs +2 -10
- package/build-module/components/site-editor-routes/navigation-item.mjs.map +2 -2
- package/build-module/components/site-editor-routes/navigation.mjs +2 -10
- package/build-module/components/site-editor-routes/navigation.mjs.map +2 -2
- package/build-module/components/site-editor-routes/notfound.mjs +1 -1
- package/build-module/components/site-editor-routes/notfound.mjs.map +2 -2
- package/build-module/components/site-editor-routes/page-item.mjs +2 -7
- package/build-module/components/site-editor-routes/page-item.mjs.map +2 -2
- package/build-module/components/site-editor-routes/pages.mjs +6 -9
- package/build-module/components/site-editor-routes/pages.mjs.map +2 -2
- package/build-module/components/site-editor-routes/pattern-item.mjs +1 -1
- package/build-module/components/site-editor-routes/pattern-item.mjs.map +2 -2
- package/build-module/components/site-editor-routes/patterns.mjs +8 -3
- package/build-module/components/site-editor-routes/patterns.mjs.map +2 -2
- package/build-module/components/site-editor-routes/stylebook.mjs +1 -1
- package/build-module/components/site-editor-routes/stylebook.mjs.map +2 -2
- package/build-module/components/site-editor-routes/styles.mjs +1 -9
- package/build-module/components/site-editor-routes/styles.mjs.map +2 -2
- package/build-module/components/site-editor-routes/template-item.mjs +2 -7
- package/build-module/components/site-editor-routes/template-item.mjs.map +2 -2
- package/build-module/components/site-editor-routes/template-part-item.mjs +1 -1
- package/build-module/components/site-editor-routes/template-part-item.mjs.map +2 -2
- package/build-module/components/site-editor-routes/templates.mjs +8 -1
- package/build-module/components/site-editor-routes/templates.mjs.map +2 -2
- package/build-module/components/welcome-guide/editor.mjs +1 -1
- package/build-module/components/welcome-guide/editor.mjs.map +1 -1
- package/build-module/components/welcome-guide/page.mjs +1 -1
- package/build-module/components/welcome-guide/page.mjs.map +1 -1
- package/build-module/components/welcome-guide/template.mjs +1 -1
- package/build-module/components/welcome-guide/template.mjs.map +1 -1
- package/build-module/store/selectors.mjs +2 -4
- package/build-module/store/selectors.mjs.map +2 -2
- package/build-style/{experimental-admin-bar-in-editor-rtl.css → experimental-omnibar-rtl.css} +49 -2
- package/build-style/{experimental-admin-bar-in-editor.css → experimental-omnibar.css} +49 -2
- package/build-style/style-rtl.css +476 -248
- package/build-style/style.css +476 -249
- package/package.json +49 -49
- package/src/components/layout/index.js +64 -18
- package/src/components/layout/style.scss +28 -13
- package/src/components/page-patterns/style.scss +1 -2
- package/src/components/page-templates/index-legacy.js +17 -9
- package/src/components/page-templates/style.scss +0 -5
- package/src/components/post-list/quick-edit-modal.js +0 -1
- package/src/components/resizable-frame/index.js +0 -1
- package/src/components/save-hub/index.js +4 -4
- package/src/components/save-hub/style.scss +5 -5
- package/src/components/sidebar-button/style.scss +2 -4
- package/src/components/sidebar-dataviews/style.scss +0 -1
- package/src/components/sidebar-global-styles/style.scss +1 -2
- package/src/components/sidebar-navigation-item/index.js +11 -9
- package/src/components/sidebar-navigation-item/style.scss +6 -7
- package/src/components/sidebar-navigation-screen/index.js +0 -1
- package/src/components/sidebar-navigation-screen/style.scss +9 -9
- package/src/components/sidebar-navigation-screen-global-styles/index.js +2 -15
- package/src/components/sidebar-navigation-screen-identity/index.js +0 -15
- package/src/components/sidebar-navigation-screen-main/index.js +24 -22
- package/src/components/sidebar-navigation-screen-navigation-menu/style.scss +2 -4
- package/src/components/sidebar-navigation-screen-navigation-menus/style.scss +15 -5
- package/src/components/sidebar-navigation-screen-patterns/style.scss +2 -3
- package/src/components/site-editor-routes/README.md +4 -4
- package/src/components/site-editor-routes/home.js +1 -1
- package/src/components/site-editor-routes/identity.js +1 -20
- package/src/components/site-editor-routes/navigation-item.js +2 -21
- package/src/components/site-editor-routes/navigation.js +2 -21
- package/src/components/site-editor-routes/notfound.js +1 -1
- package/src/components/site-editor-routes/page-item.js +1 -10
- package/src/components/site-editor-routes/pages.js +6 -14
- package/src/components/site-editor-routes/pattern-item.js +1 -1
- package/src/components/site-editor-routes/patterns.js +8 -7
- package/src/components/site-editor-routes/stylebook.js +1 -1
- package/src/components/site-editor-routes/styles.js +1 -12
- package/src/components/site-editor-routes/template-item.js +1 -10
- package/src/components/site-editor-routes/template-part-item.js +1 -1
- package/src/components/site-editor-routes/templates.js +8 -1
- package/src/components/site-hub/style.scss +5 -6
- package/src/components/welcome-guide/page.js +1 -1
- package/src/{experimental-admin-bar-in-editor.scss → experimental-omnibar.scss} +6 -2
- package/src/store/selectors.js +3 -7
- package/src/style.scss +2 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/site-editor-routes/navigation-item.js"],
|
|
4
|
-
"sourcesContent": ["/**\n *
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,
|
|
6
|
-
"names": ["
|
|
4
|
+
"sourcesContent": ["/**\n * Internal dependencies\n */\nimport Editor from '../editor';\nimport SidebarNavigationScreenNavigationMenu from '../sidebar-navigation-screen-navigation-menu';\nimport SidebarNavigationScreenUnsupported from '../sidebar-navigation-screen-unsupported';\nimport { isThemeDataLoaded } from './utils';\n\nexport const navigationItemRoute = {\n\tname: 'navigation-item',\n\tpath: '/wp_navigation/:postId',\n\tareas: {\n\t\tsidebar( { siteData } ) {\n\t\t\tif ( ! isThemeDataLoaded( siteData ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn siteData.currentTheme.is_block_theme ? (\n\t\t\t\t<SidebarNavigationScreenNavigationMenu backPath=\"/navigation\" />\n\t\t\t) : (\n\t\t\t\t<SidebarNavigationScreenUnsupported />\n\t\t\t);\n\t\t},\n\t\tpreview( { siteData } ) {\n\t\t\tif ( ! isThemeDataLoaded( siteData ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn siteData.currentTheme.is_block_theme ? (\n\t\t\t\t<Editor />\n\t\t\t) : (\n\t\t\t\t<SidebarNavigationScreenUnsupported />\n\t\t\t);\n\t\t},\n\t\tmobileSidebar( { siteData } ) {\n\t\t\tif ( ! isThemeDataLoaded( siteData ) ) {\n\t\t\t\treturn <></>;\n\t\t\t}\n\t\t\treturn siteData.currentTheme.is_block_theme ? (\n\t\t\t\t<SidebarNavigationScreenNavigationMenu backPath=\"/navigation\" />\n\t\t\t) : (\n\t\t\t\t<SidebarNavigationScreenUnsupported />\n\t\t\t);\n\t\t},\n\t},\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,oBAAmB;AACnB,uDAAkD;AAClD,mDAA+C;AAC/C,mBAAkC;AAW9B;AATG,IAAM,sBAAsB;AAAA,EAClC,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,IACN,QAAS,EAAE,SAAS,GAAI;AACvB,UAAK,KAAE,gCAAmB,QAAS,GAAI;AACtC,eAAO;AAAA,MACR;AACA,aAAO,SAAS,aAAa,iBAC5B,4CAAC,iDAAAA,SAAA,EAAsC,UAAS,eAAc,IAE9D,4CAAC,6CAAAC,SAAA,EAAmC;AAAA,IAEtC;AAAA,IACA,QAAS,EAAE,SAAS,GAAI;AACvB,UAAK,KAAE,gCAAmB,QAAS,GAAI;AACtC,eAAO;AAAA,MACR;AACA,aAAO,SAAS,aAAa,iBAC5B,4CAAC,cAAAC,SAAA,EAAO,IAER,4CAAC,6CAAAD,SAAA,EAAmC;AAAA,IAEtC;AAAA,IACA,cAAe,EAAE,SAAS,GAAI;AAC7B,UAAK,KAAE,gCAAmB,QAAS,GAAI;AACtC,eAAO,2EAAE;AAAA,MACV;AACA,aAAO,SAAS,aAAa,iBAC5B,4CAAC,iDAAAD,SAAA,EAAsC,UAAS,eAAc,IAE9D,4CAAC,6CAAAC,SAAA,EAAmC;AAAA,IAEtC;AAAA,EACD;AACD;",
|
|
6
|
+
"names": ["SidebarNavigationScreenNavigationMenu", "SidebarNavigationScreenUnsupported", "Editor"]
|
|
7
7
|
}
|
|
@@ -33,19 +33,11 @@ __export(navigation_exports, {
|
|
|
33
33
|
navigationRoute: () => navigationRoute
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(navigation_exports);
|
|
36
|
-
var import_router = require("@wordpress/router");
|
|
37
36
|
var import_editor = __toESM(require("../editor/index.cjs"));
|
|
38
37
|
var import_sidebar_navigation_screen_navigation_menus = __toESM(require("../sidebar-navigation-screen-navigation-menus/index.cjs"));
|
|
39
38
|
var import_sidebar_navigation_screen_unsupported = __toESM(require("../sidebar-navigation-screen-unsupported/index.cjs"));
|
|
40
|
-
var import_lock_unlock = require("../../lock-unlock.cjs");
|
|
41
39
|
var import_utils = require("./utils.cjs");
|
|
42
40
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
43
|
-
var { useLocation } = (0, import_lock_unlock.unlock)(import_router.privateApis);
|
|
44
|
-
function MobileNavigationView() {
|
|
45
|
-
const { query = {} } = useLocation();
|
|
46
|
-
const { canvas = "view" } = query;
|
|
47
|
-
return canvas === "edit" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_editor.default, {}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_sidebar_navigation_screen_navigation_menus.default, { backPath: "/" });
|
|
48
|
-
}
|
|
49
41
|
var navigationRoute = {
|
|
50
42
|
name: "navigation",
|
|
51
43
|
path: "/navigation",
|
|
@@ -60,11 +52,11 @@ var navigationRoute = {
|
|
|
60
52
|
const isBlockTheme = siteData.currentTheme?.is_block_theme;
|
|
61
53
|
return isBlockTheme ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_editor.default, {}) : void 0;
|
|
62
54
|
},
|
|
63
|
-
|
|
55
|
+
mobileSidebar({ siteData }) {
|
|
64
56
|
if (!(0, import_utils.isThemeDataLoaded)(siteData)) {
|
|
65
57
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {});
|
|
66
58
|
}
|
|
67
|
-
return siteData.currentTheme.is_block_theme ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
59
|
+
return siteData.currentTheme.is_block_theme ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_sidebar_navigation_screen_navigation_menus.default, { backPath: "/" }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_sidebar_navigation_screen_unsupported.default, {});
|
|
68
60
|
}
|
|
69
61
|
}
|
|
70
62
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/site-editor-routes/navigation.js"],
|
|
4
|
-
"sourcesContent": ["/**\n *
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,
|
|
6
|
-
"names": ["
|
|
4
|
+
"sourcesContent": ["/**\n * Internal dependencies\n */\nimport Editor from '../editor';\nimport SidebarNavigationScreenNavigationMenus from '../sidebar-navigation-screen-navigation-menus';\nimport SidebarNavigationScreenUnsupported from '../sidebar-navigation-screen-unsupported';\nimport { isThemeDataLoaded } from './utils';\n\nexport const navigationRoute = {\n\tname: 'navigation',\n\tpath: '/navigation',\n\tareas: {\n\t\tsidebar( { siteData } ) {\n\t\t\tif ( ! isThemeDataLoaded( siteData ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn siteData.currentTheme.is_block_theme ? (\n\t\t\t\t<SidebarNavigationScreenNavigationMenus backPath=\"/\" />\n\t\t\t) : (\n\t\t\t\t<SidebarNavigationScreenUnsupported />\n\t\t\t);\n\t\t},\n\t\tpreview( { siteData } ) {\n\t\t\tconst isBlockTheme = siteData.currentTheme?.is_block_theme;\n\t\t\treturn isBlockTheme ? <Editor /> : undefined;\n\t\t},\n\t\tmobileSidebar( { siteData } ) {\n\t\t\tif ( ! isThemeDataLoaded( siteData ) ) {\n\t\t\t\treturn <></>;\n\t\t\t}\n\t\t\treturn siteData.currentTheme.is_block_theme ? (\n\t\t\t\t<SidebarNavigationScreenNavigationMenus backPath=\"/\" />\n\t\t\t) : (\n\t\t\t\t<SidebarNavigationScreenUnsupported />\n\t\t\t);\n\t\t},\n\t},\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,oBAAmB;AACnB,wDAAmD;AACnD,mDAA+C;AAC/C,mBAAkC;AAW9B;AATG,IAAM,kBAAkB;AAAA,EAC9B,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,IACN,QAAS,EAAE,SAAS,GAAI;AACvB,UAAK,KAAE,gCAAmB,QAAS,GAAI;AACtC,eAAO;AAAA,MACR;AACA,aAAO,SAAS,aAAa,iBAC5B,4CAAC,kDAAAA,SAAA,EAAuC,UAAS,KAAI,IAErD,4CAAC,6CAAAC,SAAA,EAAmC;AAAA,IAEtC;AAAA,IACA,QAAS,EAAE,SAAS,GAAI;AACvB,YAAM,eAAe,SAAS,cAAc;AAC5C,aAAO,eAAe,4CAAC,cAAAC,SAAA,EAAO,IAAK;AAAA,IACpC;AAAA,IACA,cAAe,EAAE,SAAS,GAAI;AAC7B,UAAK,KAAE,gCAAmB,QAAS,GAAI;AACtC,eAAO,2EAAE;AAAA,MACV;AACA,aAAO,SAAS,aAAa,iBAC5B,4CAAC,kDAAAF,SAAA,EAAuC,UAAS,KAAI,IAErD,4CAAC,6CAAAC,SAAA,EAAmC;AAAA,IAEtC;AAAA,EACD;AACD;",
|
|
6
|
+
"names": ["SidebarNavigationScreenNavigationMenus", "SidebarNavigationScreenUnsupported", "Editor"]
|
|
7
7
|
}
|
|
@@ -47,7 +47,7 @@ var notFoundRoute = {
|
|
|
47
47
|
path: "*",
|
|
48
48
|
areas: {
|
|
49
49
|
sidebar: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_sidebar_navigation_screen_main.default, {}),
|
|
50
|
-
|
|
50
|
+
mobileSidebar: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
51
51
|
import_sidebar_navigation_screen_main.default,
|
|
52
52
|
{
|
|
53
53
|
customDescription: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(NotFoundError, {})
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/site-editor-routes/notfound.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { Notice, __experimentalSpacer as Spacer } from '@wordpress/components';\nimport SidebarNavigationScreenMain from '../sidebar-navigation-screen-main';\n\nfunction NotFoundError() {\n\treturn (\n\t\t<Notice status=\"error\" isDismissible={ false }>\n\t\t\t{ __(\n\t\t\t\t'The requested page could not be found. Please check the URL.'\n\t\t\t) }\n\t\t</Notice>\n\t);\n}\n\nexport const notFoundRoute = {\n\tname: 'notfound',\n\tpath: '*',\n\tareas: {\n\t\tsidebar: <SidebarNavigationScreenMain />,\n\t\
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAmB;AAKnB,wBAAuD;AACvD,4CAAwC;AAItC;AAFF,SAAS,gBAAgB;AACxB,SACC,4CAAC,4BAAO,QAAO,SAAQ,eAAgB,OACpC;AAAA,IACD;AAAA,EACD,GACD;AAEF;AAEO,IAAM,gBAAgB;AAAA,EAC5B,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,IACN,SAAS,4CAAC,sCAAAA,SAAA,EAA4B;AAAA,IACtC,
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { Notice, __experimentalSpacer as Spacer } from '@wordpress/components';\nimport SidebarNavigationScreenMain from '../sidebar-navigation-screen-main';\n\nfunction NotFoundError() {\n\treturn (\n\t\t<Notice status=\"error\" isDismissible={ false }>\n\t\t\t{ __(\n\t\t\t\t'The requested page could not be found. Please check the URL.'\n\t\t\t) }\n\t\t</Notice>\n\t);\n}\n\nexport const notFoundRoute = {\n\tname: 'notfound',\n\tpath: '*',\n\tareas: {\n\t\tsidebar: <SidebarNavigationScreenMain />,\n\t\tmobileSidebar: (\n\t\t\t<SidebarNavigationScreenMain\n\t\t\t\tcustomDescription={ <NotFoundError /> }\n\t\t\t/>\n\t\t),\n\t\tcontent: (\n\t\t\t<Spacer padding={ 2 }>\n\t\t\t\t<NotFoundError />\n\t\t\t</Spacer>\n\t\t),\n\t},\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAmB;AAKnB,wBAAuD;AACvD,4CAAwC;AAItC;AAFF,SAAS,gBAAgB;AACxB,SACC,4CAAC,4BAAO,QAAO,SAAQ,eAAgB,OACpC;AAAA,IACD;AAAA,EACD,GACD;AAEF;AAEO,IAAM,gBAAgB;AAAA,EAC5B,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,IACN,SAAS,4CAAC,sCAAAA,SAAA,EAA4B;AAAA,IACtC,eACC;AAAA,MAAC,sCAAAA;AAAA,MAAA;AAAA,QACA,mBAAoB,4CAAC,iBAAc;AAAA;AAAA,IACpC;AAAA,IAED,SACC,4CAAC,kBAAAC,sBAAA,EAAO,SAAU,GACjB,sDAAC,iBAAc,GAChB;AAAA,EAEF;AACD;",
|
|
6
6
|
"names": ["SidebarNavigationScreenMain", "Spacer"]
|
|
7
7
|
}
|
|
@@ -57,12 +57,7 @@ var pageItemRoute = {
|
|
|
57
57
|
}
|
|
58
58
|
) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_sidebar_navigation_screen_unsupported.default, {});
|
|
59
59
|
},
|
|
60
|
-
mobile
|
|
61
|
-
if (!(0, import_utils.isThemeDataLoaded)(siteData)) {
|
|
62
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {});
|
|
63
|
-
}
|
|
64
|
-
return siteData.currentTheme.is_block_theme ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_editor.default, {}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_sidebar_navigation_screen_unsupported.default, {});
|
|
65
|
-
},
|
|
60
|
+
// Also rendered on mobile, where this route is only reached at canvas=edit.
|
|
66
61
|
preview({ siteData }) {
|
|
67
62
|
if (!(0, import_utils.isThemeDataLoaded)(siteData)) {
|
|
68
63
|
return null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/site-editor-routes/page-item.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport Editor from '../editor';\nimport DataViewsSidebarContent from '../sidebar-dataviews';\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport SidebarNavigationScreenUnsupported from '../sidebar-navigation-screen-unsupported';\nimport { isThemeDataLoaded } from './utils';\n\nexport const pageItemRoute = {\n\tname: 'page-item',\n\tpath: '/page/:postId',\n\tareas: {\n\t\tsidebar( { siteData } ) {\n\t\t\tif ( ! isThemeDataLoaded( siteData ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn siteData.currentTheme.is_block_theme ? (\n\t\t\t\t<SidebarNavigationScreen\n\t\t\t\t\ttitle={ __( 'Pages' ) }\n\t\t\t\t\tbackPath=\"/\"\n\t\t\t\t\tcontent={ <DataViewsSidebarContent postType=\"page\" /> }\n\t\t\t\t/>\n\t\t\t) : (\n\t\t\t\t<SidebarNavigationScreenUnsupported />\n\t\t\t);\n\t\t},\n\t\
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAmB;AAKnB,oBAAmB;AACnB,+BAAoC;AACpC,uCAAoC;AACpC,mDAA+C;AAC/C,mBAAkC;AAcnB;AAZR,IAAM,gBAAgB;AAAA,EAC5B,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,IACN,QAAS,EAAE,SAAS,GAAI;AACvB,UAAK,KAAE,gCAAmB,QAAS,GAAI;AACtC,eAAO;AAAA,MACR;AACA,aAAO,SAAS,aAAa,iBAC5B;AAAA,QAAC,iCAAAA;AAAA,QAAA;AAAA,UACA,WAAQ,gBAAI,OAAQ;AAAA,UACpB,UAAS;AAAA,UACT,SAAU,4CAAC,yBAAAC,SAAA,EAAwB,UAAS,QAAO;AAAA;AAAA,MACpD,IAEA,4CAAC,6CAAAC,SAAA,EAAmC;AAAA,IAEtC;AAAA
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport Editor from '../editor';\nimport DataViewsSidebarContent from '../sidebar-dataviews';\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport SidebarNavigationScreenUnsupported from '../sidebar-navigation-screen-unsupported';\nimport { isThemeDataLoaded } from './utils';\n\nexport const pageItemRoute = {\n\tname: 'page-item',\n\tpath: '/page/:postId',\n\tareas: {\n\t\tsidebar( { siteData } ) {\n\t\t\tif ( ! isThemeDataLoaded( siteData ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn siteData.currentTheme.is_block_theme ? (\n\t\t\t\t<SidebarNavigationScreen\n\t\t\t\t\ttitle={ __( 'Pages' ) }\n\t\t\t\t\tbackPath=\"/\"\n\t\t\t\t\tcontent={ <DataViewsSidebarContent postType=\"page\" /> }\n\t\t\t\t/>\n\t\t\t) : (\n\t\t\t\t<SidebarNavigationScreenUnsupported />\n\t\t\t);\n\t\t},\n\t\t// Also rendered on mobile, where this route is only reached at canvas=edit.\n\t\tpreview( { siteData } ) {\n\t\t\tif ( ! isThemeDataLoaded( siteData ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn siteData.currentTheme.is_block_theme ? (\n\t\t\t\t<Editor />\n\t\t\t) : (\n\t\t\t\t<SidebarNavigationScreenUnsupported />\n\t\t\t);\n\t\t},\n\t},\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAmB;AAKnB,oBAAmB;AACnB,+BAAoC;AACpC,uCAAoC;AACpC,mDAA+C;AAC/C,mBAAkC;AAcnB;AAZR,IAAM,gBAAgB;AAAA,EAC5B,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,IACN,QAAS,EAAE,SAAS,GAAI;AACvB,UAAK,KAAE,gCAAmB,QAAS,GAAI;AACtC,eAAO;AAAA,MACR;AACA,aAAO,SAAS,aAAa,iBAC5B;AAAA,QAAC,iCAAAA;AAAA,QAAA;AAAA,UACA,WAAQ,gBAAI,OAAQ;AAAA,UACpB,UAAS;AAAA,UACT,SAAU,4CAAC,yBAAAC,SAAA,EAAwB,UAAS,QAAO;AAAA;AAAA,MACpD,IAEA,4CAAC,6CAAAC,SAAA,EAAmC;AAAA,IAEtC;AAAA;AAAA,IAEA,QAAS,EAAE,SAAS,GAAI;AACvB,UAAK,KAAE,gCAAmB,QAAS,GAAI;AACtC,eAAO;AAAA,MACR;AACA,aAAO,SAAS,aAAa,iBAC5B,4CAAC,cAAAC,SAAA,EAAO,IAER,4CAAC,6CAAAD,SAAA,EAAmC;AAAA,IAEtC;AAAA,EACD;AACD;",
|
|
6
6
|
"names": ["SidebarNavigationScreen", "DataViewsSidebarContent", "SidebarNavigationScreenUnsupported", "Editor"]
|
|
7
7
|
}
|
|
@@ -33,7 +33,6 @@ __export(pages_exports, {
|
|
|
33
33
|
pagesRoute: () => pagesRoute
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(pages_exports);
|
|
36
|
-
var import_router = require("@wordpress/router");
|
|
37
36
|
var import_i18n = require("@wordpress/i18n");
|
|
38
37
|
var import_data = require("@wordpress/data");
|
|
39
38
|
var import_core_data = require("@wordpress/core-data");
|
|
@@ -46,7 +45,6 @@ var import_post_list = __toESM(require("../post-list/index.cjs"));
|
|
|
46
45
|
var import_lock_unlock = require("../../lock-unlock.cjs");
|
|
47
46
|
var import_utils = require("./utils.cjs");
|
|
48
47
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
49
|
-
var { useLocation } = (0, import_lock_unlock.unlock)(import_router.privateApis);
|
|
50
48
|
async function isListView(query) {
|
|
51
49
|
const { activeView = "all" } = query;
|
|
52
50
|
const config = await (0, import_lock_unlock.unlock)((0, import_data.resolveSelect)(import_core_data.store)).getViewConfig(
|
|
@@ -66,11 +64,6 @@ async function isListView(query) {
|
|
|
66
64
|
});
|
|
67
65
|
return view.type === "list";
|
|
68
66
|
}
|
|
69
|
-
function MobilePagesView() {
|
|
70
|
-
const { query = {} } = useLocation();
|
|
71
|
-
const { canvas = "view" } = query;
|
|
72
|
-
return canvas === "edit" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_editor.default, {}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_post_list.default, { postType: "page" });
|
|
73
|
-
}
|
|
74
67
|
var pagesRoute = {
|
|
75
68
|
name: "pages",
|
|
76
69
|
path: "/page",
|
|
@@ -100,11 +93,15 @@ var pagesRoute = {
|
|
|
100
93
|
const isList = await isListView(query);
|
|
101
94
|
return isList ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_editor.default, {}) : void 0;
|
|
102
95
|
},
|
|
103
|
-
|
|
96
|
+
mobileSidebar({ siteData }) {
|
|
104
97
|
if (!(0, import_utils.isThemeDataLoaded)(siteData)) {
|
|
105
98
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {});
|
|
106
99
|
}
|
|
107
|
-
return siteData.currentTheme.is_block_theme ?
|
|
100
|
+
return siteData.currentTheme.is_block_theme ? void 0 : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_sidebar_navigation_screen_unsupported.default, {});
|
|
101
|
+
},
|
|
102
|
+
mobileContent({ siteData }) {
|
|
103
|
+
const isBlockTheme = siteData.currentTheme?.is_block_theme;
|
|
104
|
+
return isBlockTheme ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_post_list.default, { postType: "page" }) : void 0;
|
|
108
105
|
}
|
|
109
106
|
},
|
|
110
107
|
widths: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/site-editor-routes/pages.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport {
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,
|
|
6
|
-
"names": ["
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { resolveSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { loadView } from '@wordpress/views';\n\n/**\n * Internal dependencies\n */\nimport Editor from '../editor';\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport SidebarNavigationScreenUnsupported from '../sidebar-navigation-screen-unsupported';\nimport DataViewsSidebarContent from '../sidebar-dataviews';\nimport PostList from '../post-list';\nimport { unlock } from '../../lock-unlock';\nimport { isThemeDataLoaded } from './utils';\n\nasync function isListView( query ) {\n\tconst { activeView = 'all' } = query;\n\tconst config = await unlock( resolveSelect( coreStore ) ).getViewConfig(\n\t\t'postType',\n\t\t'page'\n\t);\n\tconst defaultView = config?.default_view;\n\tconst defaultLayouts = config?.default_layouts;\n\tconst viewEntry = config?.view_list?.find( ( v ) => v.slug === activeView );\n\tconst view = await loadView( {\n\t\tkind: 'postType',\n\t\tname: 'page',\n\t\tslug: 'default',\n\t\tdefaultView,\n\t\tdefaultLayouts,\n\t\tactiveViewOverrides: viewEntry?.view ?? {},\n\t} );\n\treturn view.type === 'list';\n}\n\nexport const pagesRoute = {\n\tname: 'pages',\n\tpath: '/page',\n\tareas: {\n\t\tsidebar( { siteData } ) {\n\t\t\tif ( ! isThemeDataLoaded( siteData ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn siteData.currentTheme.is_block_theme ? (\n\t\t\t\t<SidebarNavigationScreen\n\t\t\t\t\ttitle={ __( 'Pages' ) }\n\t\t\t\t\tbackPath=\"/\"\n\t\t\t\t\tcontent={ <DataViewsSidebarContent postType=\"page\" /> }\n\t\t\t\t/>\n\t\t\t) : (\n\t\t\t\t<SidebarNavigationScreenUnsupported />\n\t\t\t);\n\t\t},\n\t\tcontent( { siteData } ) {\n\t\t\tconst isBlockTheme = siteData.currentTheme?.is_block_theme;\n\t\t\treturn isBlockTheme ? <PostList postType=\"page\" /> : undefined;\n\t\t},\n\t\tasync preview( { query, siteData } ) {\n\t\t\tconst isBlockTheme = siteData.currentTheme?.is_block_theme;\n\t\t\tif ( ! isBlockTheme ) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t\tconst isList = await isListView( query );\n\t\t\treturn isList ? <Editor /> : undefined;\n\t\t},\n\t\tmobileSidebar( { siteData } ) {\n\t\t\tif ( ! isThemeDataLoaded( siteData ) ) {\n\t\t\t\treturn <></>;\n\t\t\t}\n\t\t\treturn siteData.currentTheme.is_block_theme ? undefined : (\n\t\t\t\t<SidebarNavigationScreenUnsupported />\n\t\t\t);\n\t\t},\n\t\tmobileContent( { siteData } ) {\n\t\t\tconst isBlockTheme = siteData.currentTheme?.is_block_theme;\n\t\t\treturn isBlockTheme ? <PostList postType=\"page\" /> : undefined;\n\t\t},\n\t},\n\twidths: {\n\t\tasync content( { query } ) {\n\t\t\tconst isList = await isListView( query );\n\t\t\treturn isList ? 380 : undefined;\n\t\t},\n\t},\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAmB;AACnB,kBAA8B;AAC9B,uBAAmC;AACnC,mBAAyB;AAKzB,oBAAmB;AACnB,uCAAoC;AACpC,mDAA+C;AAC/C,+BAAoC;AACpC,uBAAqB;AACrB,yBAAuB;AACvB,mBAAkC;AAkCnB;AAhCf,eAAe,WAAY,OAAQ;AAClC,QAAM,EAAE,aAAa,MAAM,IAAI;AAC/B,QAAM,SAAS,UAAM,+BAAQ,2BAAe,iBAAAA,KAAU,CAAE,EAAE;AAAA,IACzD;AAAA,IACA;AAAA,EACD;AACA,QAAM,cAAc,QAAQ;AAC5B,QAAM,iBAAiB,QAAQ;AAC/B,QAAM,YAAY,QAAQ,WAAW,KAAM,CAAE,MAAO,EAAE,SAAS,UAAW;AAC1E,QAAM,OAAO,UAAM,uBAAU;AAAA,IAC5B,MAAM;AAAA,IACN,MAAM;AAAA,IACN,MAAM;AAAA,IACN;AAAA,IACA;AAAA,IACA,qBAAqB,WAAW,QAAQ,CAAC;AAAA,EAC1C,CAAE;AACF,SAAO,KAAK,SAAS;AACtB;AAEO,IAAM,aAAa;AAAA,EACzB,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,IACN,QAAS,EAAE,SAAS,GAAI;AACvB,UAAK,KAAE,gCAAmB,QAAS,GAAI;AACtC,eAAO;AAAA,MACR;AACA,aAAO,SAAS,aAAa,iBAC5B;AAAA,QAAC,iCAAAC;AAAA,QAAA;AAAA,UACA,WAAQ,gBAAI,OAAQ;AAAA,UACpB,UAAS;AAAA,UACT,SAAU,4CAAC,yBAAAC,SAAA,EAAwB,UAAS,QAAO;AAAA;AAAA,MACpD,IAEA,4CAAC,6CAAAC,SAAA,EAAmC;AAAA,IAEtC;AAAA,IACA,QAAS,EAAE,SAAS,GAAI;AACvB,YAAM,eAAe,SAAS,cAAc;AAC5C,aAAO,eAAe,4CAAC,iBAAAC,SAAA,EAAS,UAAS,QAAO,IAAK;AAAA,IACtD;AAAA,IACA,MAAM,QAAS,EAAE,OAAO,SAAS,GAAI;AACpC,YAAM,eAAe,SAAS,cAAc;AAC5C,UAAK,CAAE,cAAe;AACrB,eAAO;AAAA,MACR;AACA,YAAM,SAAS,MAAM,WAAY,KAAM;AACvC,aAAO,SAAS,4CAAC,cAAAC,SAAA,EAAO,IAAK;AAAA,IAC9B;AAAA,IACA,cAAe,EAAE,SAAS,GAAI;AAC7B,UAAK,KAAE,gCAAmB,QAAS,GAAI;AACtC,eAAO,2EAAE;AAAA,MACV;AACA,aAAO,SAAS,aAAa,iBAAiB,SAC7C,4CAAC,6CAAAF,SAAA,EAAmC;AAAA,IAEtC;AAAA,IACA,cAAe,EAAE,SAAS,GAAI;AAC7B,YAAM,eAAe,SAAS,cAAc;AAC5C,aAAO,eAAe,4CAAC,iBAAAC,SAAA,EAAS,UAAS,QAAO,IAAK;AAAA,IACtD;AAAA,EACD;AAAA,EACA,QAAQ;AAAA,IACP,MAAM,QAAS,EAAE,MAAM,GAAI;AAC1B,YAAM,SAAS,MAAM,WAAY,KAAM;AACvC,aAAO,SAAS,MAAM;AAAA,IACvB;AAAA,EACD;AACD;",
|
|
6
|
+
"names": ["coreStore", "SidebarNavigationScreen", "DataViewsSidebarContent", "SidebarNavigationScreenUnsupported", "PostList", "Editor"]
|
|
7
7
|
}
|
|
@@ -46,7 +46,7 @@ var patternItemRoute = {
|
|
|
46
46
|
const backPath = isBlockTheme || (0, import_utils.isClassicThemeWithStyleBookSupport)(siteData) ? "/" : void 0;
|
|
47
47
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_sidebar_navigation_screen_patterns.default, { backPath });
|
|
48
48
|
},
|
|
49
|
-
|
|
49
|
+
// Also rendered on mobile, where this route is only reached at canvas=edit.
|
|
50
50
|
preview: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_editor.default, {})
|
|
51
51
|
}
|
|
52
52
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/site-editor-routes/pattern-item.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * Internal dependencies\n */\nimport Editor from '../editor';\nimport SidebarNavigationScreenPatterns from '../sidebar-navigation-screen-patterns';\nimport { isClassicThemeWithStyleBookSupport } from './utils';\n\nexport const patternItemRoute = {\n\tname: 'pattern-item',\n\tpath: '/wp_block/:postId',\n\tareas: {\n\t\tsidebar( { siteData } ) {\n\t\t\tconst isBlockTheme = siteData.currentTheme?.is_block_theme;\n\t\t\tconst backPath =\n\t\t\t\tisBlockTheme || isClassicThemeWithStyleBookSupport( siteData )\n\t\t\t\t\t? '/'\n\t\t\t\t\t: undefined;\n\t\t\treturn <SidebarNavigationScreenPatterns backPath={ backPath } />;\n\t\t},\n\t\
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,oBAAmB;AACnB,gDAA4C;AAC5C,mBAAmD;AAYzC;AAVH,IAAM,mBAAmB;AAAA,EAC/B,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,IACN,QAAS,EAAE,SAAS,GAAI;AACvB,YAAM,eAAe,SAAS,cAAc;AAC5C,YAAM,WACL,oBAAgB,iDAAoC,QAAS,IAC1D,MACA;AACJ,aAAO,4CAAC,0CAAAA,SAAA,EAAgC,UAAsB;AAAA,IAC/D;AAAA
|
|
4
|
+
"sourcesContent": ["/**\n * Internal dependencies\n */\nimport Editor from '../editor';\nimport SidebarNavigationScreenPatterns from '../sidebar-navigation-screen-patterns';\nimport { isClassicThemeWithStyleBookSupport } from './utils';\n\nexport const patternItemRoute = {\n\tname: 'pattern-item',\n\tpath: '/wp_block/:postId',\n\tareas: {\n\t\tsidebar( { siteData } ) {\n\t\t\tconst isBlockTheme = siteData.currentTheme?.is_block_theme;\n\t\t\tconst backPath =\n\t\t\t\tisBlockTheme || isClassicThemeWithStyleBookSupport( siteData )\n\t\t\t\t\t? '/'\n\t\t\t\t\t: undefined;\n\t\t\treturn <SidebarNavigationScreenPatterns backPath={ backPath } />;\n\t\t},\n\t\t// Also rendered on mobile, where this route is only reached at canvas=edit.\n\t\tpreview: <Editor />,\n\t},\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,oBAAmB;AACnB,gDAA4C;AAC5C,mBAAmD;AAYzC;AAVH,IAAM,mBAAmB;AAAA,EAC/B,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,IACN,QAAS,EAAE,SAAS,GAAI;AACvB,YAAM,eAAe,SAAS,cAAc;AAC5C,YAAM,WACL,oBAAgB,iDAAoC,QAAS,IAC1D,MACA;AACJ,aAAO,4CAAC,0CAAAA,SAAA,EAAgC,UAAsB;AAAA,IAC/D;AAAA;AAAA,IAEA,SAAS,4CAAC,cAAAC,SAAA,EAAO;AAAA,EAClB;AACD;",
|
|
6
6
|
"names": ["SidebarNavigationScreenPatterns", "Editor"]
|
|
7
7
|
}
|
|
@@ -47,11 +47,16 @@ var patternsRoute = {
|
|
|
47
47
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_sidebar_navigation_screen_patterns.default, { backPath });
|
|
48
48
|
},
|
|
49
49
|
content: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_page_patterns.default, {}),
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
mobileSidebar({ siteData, query }) {
|
|
51
|
+
if (query.categoryId) {
|
|
52
|
+
return void 0;
|
|
53
|
+
}
|
|
52
54
|
const isBlockTheme = siteData.currentTheme?.is_block_theme;
|
|
53
55
|
const backPath = isBlockTheme || (0, import_utils.isClassicThemeWithStyleBookSupport)(siteData) ? "/" : void 0;
|
|
54
|
-
return
|
|
56
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_sidebar_navigation_screen_patterns.default, { backPath });
|
|
57
|
+
},
|
|
58
|
+
mobileContent({ query }) {
|
|
59
|
+
return query.categoryId ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_page_patterns.default, {}) : void 0;
|
|
55
60
|
}
|
|
56
61
|
}
|
|
57
62
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/site-editor-routes/patterns.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * Internal dependencies\n */\nimport SidebarNavigationScreenPatterns from '../sidebar-navigation-screen-patterns';\nimport PagePatterns from '../page-patterns';\nimport { isClassicThemeWithStyleBookSupport } from './utils';\n\nexport const patternsRoute = {\n\tname: 'patterns',\n\tpath: '/pattern',\n\tareas: {\n\t\tsidebar( { siteData } ) {\n\t\t\tconst isBlockTheme = siteData.currentTheme?.is_block_theme;\n\t\t\tconst backPath =\n\t\t\t\tisBlockTheme || isClassicThemeWithStyleBookSupport( siteData )\n\t\t\t\t\t? '/'\n\t\t\t\t\t: undefined;\n\t\t\treturn <SidebarNavigationScreenPatterns backPath={ backPath } />;\n\t\t},\n\t\tcontent: <PagePatterns />,\n\t\
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,gDAA4C;AAC5C,2BAAyB;AACzB,mBAAmD;AAYzC;AAVH,IAAM,gBAAgB;AAAA,EAC5B,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,IACN,QAAS,EAAE,SAAS,GAAI;AACvB,YAAM,eAAe,SAAS,cAAc;AAC5C,YAAM,WACL,oBAAgB,iDAAoC,QAAS,IAC1D,MACA;AACJ,aAAO,4CAAC,0CAAAA,SAAA,EAAgC,UAAsB;AAAA,IAC/D;AAAA,IACA,SAAS,4CAAC,qBAAAC,SAAA,EAAa;AAAA,IACvB,
|
|
4
|
+
"sourcesContent": ["/**\n * Internal dependencies\n */\nimport SidebarNavigationScreenPatterns from '../sidebar-navigation-screen-patterns';\nimport PagePatterns from '../page-patterns';\nimport { isClassicThemeWithStyleBookSupport } from './utils';\n\nexport const patternsRoute = {\n\tname: 'patterns',\n\tpath: '/pattern',\n\tareas: {\n\t\tsidebar( { siteData } ) {\n\t\t\tconst isBlockTheme = siteData.currentTheme?.is_block_theme;\n\t\t\tconst backPath =\n\t\t\t\tisBlockTheme || isClassicThemeWithStyleBookSupport( siteData )\n\t\t\t\t\t? '/'\n\t\t\t\t\t: undefined;\n\t\t\treturn <SidebarNavigationScreenPatterns backPath={ backPath } />;\n\t\t},\n\t\tcontent: <PagePatterns />,\n\t\tmobileSidebar( { siteData, query } ) {\n\t\t\tif ( query.categoryId ) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t\tconst isBlockTheme = siteData.currentTheme?.is_block_theme;\n\t\t\tconst backPath =\n\t\t\t\tisBlockTheme || isClassicThemeWithStyleBookSupport( siteData )\n\t\t\t\t\t? '/'\n\t\t\t\t\t: undefined;\n\t\t\treturn <SidebarNavigationScreenPatterns backPath={ backPath } />;\n\t\t},\n\t\tmobileContent( { query } ) {\n\t\t\treturn query.categoryId ? <PagePatterns /> : undefined;\n\t\t},\n\t},\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,gDAA4C;AAC5C,2BAAyB;AACzB,mBAAmD;AAYzC;AAVH,IAAM,gBAAgB;AAAA,EAC5B,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,IACN,QAAS,EAAE,SAAS,GAAI;AACvB,YAAM,eAAe,SAAS,cAAc;AAC5C,YAAM,WACL,oBAAgB,iDAAoC,QAAS,IAC1D,MACA;AACJ,aAAO,4CAAC,0CAAAA,SAAA,EAAgC,UAAsB;AAAA,IAC/D;AAAA,IACA,SAAS,4CAAC,qBAAAC,SAAA,EAAa;AAAA,IACvB,cAAe,EAAE,UAAU,MAAM,GAAI;AACpC,UAAK,MAAM,YAAa;AACvB,eAAO;AAAA,MACR;AACA,YAAM,eAAe,SAAS,cAAc;AAC5C,YAAM,WACL,oBAAgB,iDAAoC,QAAS,IAC1D,MACA;AACJ,aAAO,4CAAC,0CAAAD,SAAA,EAAgC,UAAsB;AAAA,IAC/D;AAAA,IACA,cAAe,EAAE,MAAM,GAAI;AAC1B,aAAO,MAAM,aAAa,4CAAC,qBAAAC,SAAA,EAAa,IAAK;AAAA,IAC9C;AAAA,EACD;AACD;",
|
|
6
6
|
"names": ["SidebarNavigationScreenPatterns", "PagePatterns"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/site-editor-routes/stylebook.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport SidebarNavigationScreenUnsupported from '../sidebar-navigation-screen-unsupported';\nimport { unlock } from '../../lock-unlock';\nimport { isClassicThemeWithStyleBookSupport, isThemeDataLoaded } from './utils';\n\nconst { StyleBookPreview } = unlock( editorPrivateApis );\n\nexport const stylebookRoute = {\n\tname: 'stylebook',\n\tpath: '/stylebook',\n\tareas: {\n\t\tsidebar( { siteData } ) {\n\t\t\tif ( ! isThemeDataLoaded( siteData ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn isClassicThemeWithStyleBookSupport( siteData ) ? (\n\t\t\t\t<SidebarNavigationScreen\n\t\t\t\t\ttitle={ __( 'Styles' ) }\n\t\t\t\t\tbackPath=\"/\"\n\t\t\t\t\tdescription={ __(\n\t\t\t\t\t\t`Preview your website's visual identity: colors, typography, and blocks.`\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t) : (\n\t\t\t\t<SidebarNavigationScreenUnsupported />\n\t\t\t);\n\t\t},\n\t\tpreview( { siteData } ) {\n\t\t\treturn isClassicThemeWithStyleBookSupport( siteData ) ? (\n\t\t\t\t<StyleBookPreview\n\t\t\t\t\tisStatic\n\t\t\t\t\tsettings={ siteData.editorSettings }\n\t\t\t\t/>\n\t\t\t) : undefined;\n\t\t},\n\t\
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAmB;AACnB,oBAAiD;AAKjD,uCAAoC;AACpC,mDAA+C;AAC/C,yBAAuB;AACvB,mBAAsE;AAalE;AAXJ,IAAM,EAAE,iBAAiB,QAAI,2BAAQ,cAAAA,WAAkB;AAEhD,IAAM,iBAAiB;AAAA,EAC7B,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,IACN,QAAS,EAAE,SAAS,GAAI;AACvB,UAAK,KAAE,gCAAmB,QAAS,GAAI;AACtC,eAAO;AAAA,MACR;AACA,iBAAO,iDAAoC,QAAS,IACnD;AAAA,QAAC,iCAAAC;AAAA,QAAA;AAAA,UACA,WAAQ,gBAAI,QAAS;AAAA,UACrB,UAAS;AAAA,UACT,iBAAc;AAAA,YACb;AAAA,UACD;AAAA;AAAA,MACD,IAEA,4CAAC,6CAAAC,SAAA,EAAmC;AAAA,IAEtC;AAAA,IACA,QAAS,EAAE,SAAS,GAAI;AACvB,iBAAO,iDAAoC,QAAS,IACnD;AAAA,QAAC;AAAA;AAAA,UACA,UAAQ;AAAA,UACR,UAAW,SAAS;AAAA;AAAA,MACrB,IACG;AAAA,IACL;AAAA,IACA,
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport SidebarNavigationScreenUnsupported from '../sidebar-navigation-screen-unsupported';\nimport { unlock } from '../../lock-unlock';\nimport { isClassicThemeWithStyleBookSupport, isThemeDataLoaded } from './utils';\n\nconst { StyleBookPreview } = unlock( editorPrivateApis );\n\nexport const stylebookRoute = {\n\tname: 'stylebook',\n\tpath: '/stylebook',\n\tareas: {\n\t\tsidebar( { siteData } ) {\n\t\t\tif ( ! isThemeDataLoaded( siteData ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn isClassicThemeWithStyleBookSupport( siteData ) ? (\n\t\t\t\t<SidebarNavigationScreen\n\t\t\t\t\ttitle={ __( 'Styles' ) }\n\t\t\t\t\tbackPath=\"/\"\n\t\t\t\t\tdescription={ __(\n\t\t\t\t\t\t`Preview your website's visual identity: colors, typography, and blocks.`\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t) : (\n\t\t\t\t<SidebarNavigationScreenUnsupported />\n\t\t\t);\n\t\t},\n\t\tpreview( { siteData } ) {\n\t\t\treturn isClassicThemeWithStyleBookSupport( siteData ) ? (\n\t\t\t\t<StyleBookPreview\n\t\t\t\t\tisStatic\n\t\t\t\t\tsettings={ siteData.editorSettings }\n\t\t\t\t/>\n\t\t\t) : undefined;\n\t\t},\n\t\tmobileContent( { siteData } ) {\n\t\t\treturn isClassicThemeWithStyleBookSupport( siteData ) ? (\n\t\t\t\t<StyleBookPreview\n\t\t\t\t\tisStatic\n\t\t\t\t\tsettings={ siteData.editorSettings }\n\t\t\t\t/>\n\t\t\t) : undefined;\n\t\t},\n\t},\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAmB;AACnB,oBAAiD;AAKjD,uCAAoC;AACpC,mDAA+C;AAC/C,yBAAuB;AACvB,mBAAsE;AAalE;AAXJ,IAAM,EAAE,iBAAiB,QAAI,2BAAQ,cAAAA,WAAkB;AAEhD,IAAM,iBAAiB;AAAA,EAC7B,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,IACN,QAAS,EAAE,SAAS,GAAI;AACvB,UAAK,KAAE,gCAAmB,QAAS,GAAI;AACtC,eAAO;AAAA,MACR;AACA,iBAAO,iDAAoC,QAAS,IACnD;AAAA,QAAC,iCAAAC;AAAA,QAAA;AAAA,UACA,WAAQ,gBAAI,QAAS;AAAA,UACrB,UAAS;AAAA,UACT,iBAAc;AAAA,YACb;AAAA,UACD;AAAA;AAAA,MACD,IAEA,4CAAC,6CAAAC,SAAA,EAAmC;AAAA,IAEtC;AAAA,IACA,QAAS,EAAE,SAAS,GAAI;AACvB,iBAAO,iDAAoC,QAAS,IACnD;AAAA,QAAC;AAAA;AAAA,UACA,UAAQ;AAAA,UACR,UAAW,SAAS;AAAA;AAAA,MACrB,IACG;AAAA,IACL;AAAA,IACA,cAAe,EAAE,SAAS,GAAI;AAC7B,iBAAO,iDAAoC,QAAS,IACnD;AAAA,QAAC;AAAA;AAAA,UACA,UAAQ;AAAA,UACR,UAAW,SAAS;AAAA;AAAA,MACrB,IACG;AAAA,IACL;AAAA,EACD;AACD;",
|
|
6
6
|
"names": ["editorPrivateApis", "SidebarNavigationScreen", "SidebarNavigationScreenUnsupported"]
|
|
7
7
|
}
|
|
@@ -43,14 +43,6 @@ var import_sidebar_global_styles = __toESM(require("../sidebar-global-styles/ind
|
|
|
43
43
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
44
44
|
var { useLocation, useHistory } = (0, import_lock_unlock.unlock)(import_router.privateApis);
|
|
45
45
|
var { StyleBookPreview } = (0, import_lock_unlock.unlock)(import_editor.privateApis);
|
|
46
|
-
function MobileGlobalStylesUI() {
|
|
47
|
-
const { query = {} } = useLocation();
|
|
48
|
-
const { canvas } = query;
|
|
49
|
-
if (canvas === "edit") {
|
|
50
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_editor2.default, {});
|
|
51
|
-
}
|
|
52
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_sidebar_global_styles.default, {});
|
|
53
|
-
}
|
|
54
46
|
function StylesPreviewArea() {
|
|
55
47
|
const { path, query } = useLocation();
|
|
56
48
|
const history = useHistory();
|
|
@@ -81,7 +73,7 @@ var stylesRoute = {
|
|
|
81
73
|
content: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_sidebar_global_styles.default, {}),
|
|
82
74
|
sidebar: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_sidebar_navigation_screen_global_styles.default, { backPath: "/" }),
|
|
83
75
|
preview: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StylesPreviewArea, {}),
|
|
84
|
-
|
|
76
|
+
mobileContent: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_sidebar_global_styles.default, {})
|
|
85
77
|
},
|
|
86
78
|
widths: {
|
|
87
79
|
content: 380
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/site-editor-routes/styles.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\nimport { addQueryArgs } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport Editor from '../editor';\nimport { unlock } from '../../lock-unlock';\nimport SidebarNavigationScreenGlobalStyles from '../sidebar-navigation-screen-global-styles';\nimport SidebarGlobalStyles from '../sidebar-global-styles';\n\nconst { useLocation, useHistory } = unlock( routerPrivateApis );\nconst { StyleBookPreview } = unlock( editorPrivateApis );\n\nfunction
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,oBAAiD;AACjD,oBAAiD;AACjD,iBAA6B;AAK7B,IAAAA,iBAAmB;AACnB,yBAAuB;AACvB,qDAAgD;AAChD,mCAAgC;
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\nimport { addQueryArgs } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport Editor from '../editor';\nimport { unlock } from '../../lock-unlock';\nimport SidebarNavigationScreenGlobalStyles from '../sidebar-navigation-screen-global-styles';\nimport SidebarGlobalStyles from '../sidebar-global-styles';\n\nconst { useLocation, useHistory } = unlock( routerPrivateApis );\nconst { StyleBookPreview } = unlock( editorPrivateApis );\n\nfunction StylesPreviewArea() {\n\tconst { path, query } = useLocation();\n\tconst history = useHistory();\n\tconst isStylebook = query.preview === 'stylebook';\n\n\t// Get section from URL query params\n\tconst section = query.section ?? '/';\n\tconst onChangeSection = ( updatedSection ) => {\n\t\thistory.navigate(\n\t\t\taddQueryArgs( path, {\n\t\t\t\tsection: updatedSection,\n\t\t\t} )\n\t\t);\n\t};\n\n\tif ( isStylebook ) {\n\t\treturn (\n\t\t\t<StyleBookPreview\n\t\t\t\tpath={ section }\n\t\t\t\tonPathChange={ onChangeSection }\n\t\t\t/>\n\t\t);\n\t}\n\n\treturn <Editor />;\n}\n\nexport const stylesRoute = {\n\tname: 'styles',\n\tpath: '/styles',\n\tareas: {\n\t\tcontent: <SidebarGlobalStyles />,\n\t\tsidebar: <SidebarNavigationScreenGlobalStyles backPath=\"/\" />,\n\t\tpreview: <StylesPreviewArea />,\n\t\tmobileContent: <SidebarGlobalStyles />,\n\t},\n\twidths: {\n\t\tcontent: 380,\n\t},\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,oBAAiD;AACjD,oBAAiD;AACjD,iBAA6B;AAK7B,IAAAA,iBAAmB;AACnB,yBAAuB;AACvB,qDAAgD;AAChD,mCAAgC;AAsB7B;AApBH,IAAM,EAAE,aAAa,WAAW,QAAI,2BAAQ,cAAAC,WAAkB;AAC9D,IAAM,EAAE,iBAAiB,QAAI,2BAAQ,cAAAC,WAAkB;AAEvD,SAAS,oBAAoB;AAC5B,QAAM,EAAE,MAAM,MAAM,IAAI,YAAY;AACpC,QAAM,UAAU,WAAW;AAC3B,QAAM,cAAc,MAAM,YAAY;AAGtC,QAAM,UAAU,MAAM,WAAW;AACjC,QAAM,kBAAkB,CAAE,mBAAoB;AAC7C,YAAQ;AAAA,UACP,yBAAc,MAAM;AAAA,QACnB,SAAS;AAAA,MACV,CAAE;AAAA,IACH;AAAA,EACD;AAEA,MAAK,aAAc;AAClB,WACC;AAAA,MAAC;AAAA;AAAA,QACA,MAAO;AAAA,QACP,cAAe;AAAA;AAAA,IAChB;AAAA,EAEF;AAEA,SAAO,4CAAC,eAAAC,SAAA,EAAO;AAChB;AAEO,IAAM,cAAc;AAAA,EAC1B,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,IACN,SAAS,4CAAC,6BAAAC,SAAA,EAAoB;AAAA,IAC9B,SAAS,4CAAC,+CAAAC,SAAA,EAAoC,UAAS,KAAI;AAAA,IAC3D,SAAS,4CAAC,qBAAkB;AAAA,IAC5B,eAAe,4CAAC,6BAAAD,SAAA,EAAoB;AAAA,EACrC;AAAA,EACA,QAAQ;AAAA,IACP,SAAS;AAAA,EACV;AACD;",
|
|
6
6
|
"names": ["import_editor", "routerPrivateApis", "editorPrivateApis", "Editor", "SidebarGlobalStyles", "SidebarNavigationScreenGlobalStyles"]
|
|
7
7
|
}
|
|
@@ -45,12 +45,7 @@ var areas = {
|
|
|
45
45
|
}
|
|
46
46
|
return siteData.currentTheme.is_block_theme ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_sidebar_navigation_screen_templates_browse.default, { backPath: "/" }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_sidebar_navigation_screen_unsupported.default, {});
|
|
47
47
|
},
|
|
48
|
-
mobile
|
|
49
|
-
if (!(0, import_utils.isThemeDataLoaded)(siteData)) {
|
|
50
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {});
|
|
51
|
-
}
|
|
52
|
-
return siteData.currentTheme.is_block_theme ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_editor.default, {}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_sidebar_navigation_screen_unsupported.default, {});
|
|
53
|
-
},
|
|
48
|
+
// Also rendered on mobile, where this route is only reached at canvas=edit.
|
|
54
49
|
preview({ siteData }) {
|
|
55
50
|
if (!(0, import_utils.isThemeDataLoaded)(siteData)) {
|
|
56
51
|
return null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/site-editor-routes/template-item.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * Internal dependencies\n */\nimport Editor from '../editor';\nimport SidebarNavigationScreenTemplatesBrowse from '../sidebar-navigation-screen-templates-browse';\nimport SidebarNavigationScreenUnsupported from '../sidebar-navigation-screen-unsupported';\nimport { isThemeDataLoaded } from './utils';\n\nconst areas = {\n\tsidebar( { siteData } ) {\n\t\tif ( ! isThemeDataLoaded( siteData ) ) {\n\t\t\treturn null;\n\t\t}\n\t\treturn siteData.currentTheme.is_block_theme ? (\n\t\t\t<SidebarNavigationScreenTemplatesBrowse backPath=\"/\" />\n\t\t) : (\n\t\t\t<SidebarNavigationScreenUnsupported />\n\t\t);\n\t},\n\
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,oBAAmB;AACnB,wDAAmD;AACnD,mDAA+C;AAC/C,mBAAkC;AAQ/B;AANH,IAAM,QAAQ;AAAA,EACb,QAAS,EAAE,SAAS,GAAI;AACvB,QAAK,KAAE,gCAAmB,QAAS,GAAI;AACtC,aAAO;AAAA,IACR;AACA,WAAO,SAAS,aAAa,iBAC5B,4CAAC,kDAAAA,SAAA,EAAuC,UAAS,KAAI,IAErD,4CAAC,6CAAAC,SAAA,EAAmC;AAAA,EAEtC;AAAA
|
|
4
|
+
"sourcesContent": ["/**\n * Internal dependencies\n */\nimport Editor from '../editor';\nimport SidebarNavigationScreenTemplatesBrowse from '../sidebar-navigation-screen-templates-browse';\nimport SidebarNavigationScreenUnsupported from '../sidebar-navigation-screen-unsupported';\nimport { isThemeDataLoaded } from './utils';\n\nconst areas = {\n\tsidebar( { siteData } ) {\n\t\tif ( ! isThemeDataLoaded( siteData ) ) {\n\t\t\treturn null;\n\t\t}\n\t\treturn siteData.currentTheme.is_block_theme ? (\n\t\t\t<SidebarNavigationScreenTemplatesBrowse backPath=\"/\" />\n\t\t) : (\n\t\t\t<SidebarNavigationScreenUnsupported />\n\t\t);\n\t},\n\t// Also rendered on mobile, where this route is only reached at canvas=edit.\n\tpreview( { siteData } ) {\n\t\tif ( ! isThemeDataLoaded( siteData ) ) {\n\t\t\treturn null;\n\t\t}\n\t\treturn siteData.currentTheme.is_block_theme ? (\n\t\t\t<Editor />\n\t\t) : (\n\t\t\t<SidebarNavigationScreenUnsupported />\n\t\t);\n\t},\n};\n\nexport const templateItemRoute = {\n\tname: 'template-item',\n\tpath: '/wp_template/*postId',\n\tareas,\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,oBAAmB;AACnB,wDAAmD;AACnD,mDAA+C;AAC/C,mBAAkC;AAQ/B;AANH,IAAM,QAAQ;AAAA,EACb,QAAS,EAAE,SAAS,GAAI;AACvB,QAAK,KAAE,gCAAmB,QAAS,GAAI;AACtC,aAAO;AAAA,IACR;AACA,WAAO,SAAS,aAAa,iBAC5B,4CAAC,kDAAAA,SAAA,EAAuC,UAAS,KAAI,IAErD,4CAAC,6CAAAC,SAAA,EAAmC;AAAA,EAEtC;AAAA;AAAA,EAEA,QAAS,EAAE,SAAS,GAAI;AACvB,QAAK,KAAE,gCAAmB,QAAS,GAAI;AACtC,aAAO;AAAA,IACR;AACA,WAAO,SAAS,aAAa,iBAC5B,4CAAC,cAAAC,SAAA,EAAO,IAER,4CAAC,6CAAAD,SAAA,EAAmC;AAAA,EAEtC;AACD;AAEO,IAAM,oBAAoB;AAAA,EAChC,MAAM;AAAA,EACN,MAAM;AAAA,EACN;AACD;",
|
|
6
6
|
"names": ["SidebarNavigationScreenTemplatesBrowse", "SidebarNavigationScreenUnsupported", "Editor"]
|
|
7
7
|
}
|
|
@@ -41,7 +41,7 @@ var templatePartItemRoute = {
|
|
|
41
41
|
path: "/wp_template_part/*postId",
|
|
42
42
|
areas: {
|
|
43
43
|
sidebar: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_sidebar_navigation_screen_patterns.default, { backPath: "/" }),
|
|
44
|
-
|
|
44
|
+
// Also rendered on mobile, where this route is only reached at canvas=edit.
|
|
45
45
|
preview: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_editor.default, {})
|
|
46
46
|
}
|
|
47
47
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/site-editor-routes/template-part-item.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * Internal dependencies\n */\nimport Editor from '../editor';\nimport SidebarNavigationScreenPatterns from '../sidebar-navigation-screen-patterns';\n\nexport const templatePartItemRoute = {\n\tname: 'template-part-item',\n\tpath: '/wp_template_part/*postId',\n\tareas: {\n\t\tsidebar: <SidebarNavigationScreenPatterns backPath=\"/\" />,\n\t\
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,oBAAmB;AACnB,gDAA4C;AAMjC;AAJJ,IAAM,wBAAwB;AAAA,EACpC,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,IACN,SAAS,4CAAC,0CAAAA,SAAA,EAAgC,UAAS,KAAI;AAAA
|
|
4
|
+
"sourcesContent": ["/**\n * Internal dependencies\n */\nimport Editor from '../editor';\nimport SidebarNavigationScreenPatterns from '../sidebar-navigation-screen-patterns';\n\nexport const templatePartItemRoute = {\n\tname: 'template-part-item',\n\tpath: '/wp_template_part/*postId',\n\tareas: {\n\t\tsidebar: <SidebarNavigationScreenPatterns backPath=\"/\" />,\n\t\t// Also rendered on mobile, where this route is only reached at canvas=edit.\n\t\tpreview: <Editor />,\n\t},\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,oBAAmB;AACnB,gDAA4C;AAMjC;AAJJ,IAAM,wBAAwB;AAAA,EACpC,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,IACN,SAAS,4CAAC,0CAAAA,SAAA,EAAgC,UAAS,KAAI;AAAA;AAAA,IAEvD,SAAS,4CAAC,cAAAC,SAAA,EAAO;AAAA,EAClB;AACD;",
|
|
6
6
|
"names": ["SidebarNavigationScreenPatterns", "Editor"]
|
|
7
7
|
}
|
|
@@ -86,13 +86,20 @@ var templatesRoute = {
|
|
|
86
86
|
const isListView = await isTemplateListView(query);
|
|
87
87
|
return isListView ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_editor.default, {}) : void 0;
|
|
88
88
|
},
|
|
89
|
-
|
|
89
|
+
mobileSidebar({ siteData }) {
|
|
90
90
|
if (!(0, import_utils.isThemeDataLoaded)(siteData)) {
|
|
91
91
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {});
|
|
92
92
|
}
|
|
93
93
|
if (!siteData.currentTheme.is_block_theme) {
|
|
94
94
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_sidebar_navigation_screen_unsupported.default, {});
|
|
95
95
|
}
|
|
96
|
+
return void 0;
|
|
97
|
+
},
|
|
98
|
+
mobileContent({ siteData }) {
|
|
99
|
+
const isBlockTheme = siteData.currentTheme?.is_block_theme;
|
|
100
|
+
if (!isBlockTheme) {
|
|
101
|
+
return void 0;
|
|
102
|
+
}
|
|
96
103
|
const isTemplateActivateEnabled = typeof window !== "undefined" && window.__experimentalTemplateActivate;
|
|
97
104
|
return isTemplateActivateEnabled ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_page_templates.default, {}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_index_legacy.default, {});
|
|
98
105
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/site-editor-routes/templates.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { resolveSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { loadView } from '@wordpress/views';\n\n/**\n * Internal dependencies\n */\nimport Editor from '../editor';\nimport SidebarNavigationScreenTemplatesBrowse from '../sidebar-navigation-screen-templates-browse';\nimport SidebarNavigationScreenUnsupported from '../sidebar-navigation-screen-unsupported';\nimport PageTemplates from '../page-templates';\nimport PageTemplatesLegacy from '../page-templates/index-legacy';\nimport { unlock } from '../../lock-unlock';\nimport { isThemeDataLoaded } from './utils';\n\nasync function isTemplateListView( query ) {\n\tconst { activeView = 'active' } = query;\n\tconst config = await unlock( resolveSelect( coreStore ) ).getViewConfig(\n\t\t'postType',\n\t\t'wp_template'\n\t);\n\tconst defaultView = config?.default_view;\n\tconst activeViewOverrides =\n\t\tconfig?.view_list?.find( ( v ) => v.slug === activeView )?.view ?? {};\n\tconst view = await loadView( {\n\t\tkind: 'postType',\n\t\tname: 'wp_template',\n\t\tslug: 'default',\n\t\tdefaultView,\n\t\tactiveViewOverrides,\n\t} );\n\treturn view.type === 'list';\n}\n\nexport const templatesRoute = {\n\tname: 'templates',\n\tpath: '/template',\n\tareas: {\n\t\tsidebar( { siteData } ) {\n\t\t\tif ( ! isThemeDataLoaded( siteData ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn siteData.currentTheme.is_block_theme ? (\n\t\t\t\t<SidebarNavigationScreenTemplatesBrowse backPath=\"/\" />\n\t\t\t) : (\n\t\t\t\t<SidebarNavigationScreenUnsupported />\n\t\t\t);\n\t\t},\n\t\tcontent( { siteData } ) {\n\t\t\tconst isBlockTheme = siteData.currentTheme?.is_block_theme;\n\t\t\tif ( ! isBlockTheme ) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t\t// Use the new template activation system if experiment is enabled,\n\t\t\t// otherwise use the legacy simple template list.\n\t\t\treturn window?.__experimentalTemplateActivate ? (\n\t\t\t\t<PageTemplates />\n\t\t\t) : (\n\t\t\t\t<PageTemplatesLegacy />\n\t\t\t);\n\t\t},\n\t\tasync preview( { query, siteData } ) {\n\t\t\tconst isBlockTheme = siteData.currentTheme?.is_block_theme;\n\t\t\tif ( ! isBlockTheme ) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t\tconst isListView = await isTemplateListView( query );\n\t\t\treturn isListView ? <Editor /> : undefined;\n\t\t},\n\t\
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAA8B;AAC9B,uBAAmC;AACnC,mBAAyB;AAKzB,oBAAmB;AACnB,wDAAmD;AACnD,mDAA+C;AAC/C,4BAA0B;AAC1B,0BAAgC;AAChC,yBAAuB;AACvB,mBAAkC;AA8B9B;AA5BJ,eAAe,mBAAoB,OAAQ;AAC1C,QAAM,EAAE,aAAa,SAAS,IAAI;AAClC,QAAM,SAAS,UAAM,+BAAQ,2BAAe,iBAAAA,KAAU,CAAE,EAAE;AAAA,IACzD;AAAA,IACA;AAAA,EACD;AACA,QAAM,cAAc,QAAQ;AAC5B,QAAM,sBACL,QAAQ,WAAW,KAAM,CAAE,MAAO,EAAE,SAAS,UAAW,GAAG,QAAQ,CAAC;AACrE,QAAM,OAAO,UAAM,uBAAU;AAAA,IAC5B,MAAM;AAAA,IACN,MAAM;AAAA,IACN,MAAM;AAAA,IACN;AAAA,IACA;AAAA,EACD,CAAE;AACF,SAAO,KAAK,SAAS;AACtB;AAEO,IAAM,iBAAiB;AAAA,EAC7B,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,IACN,QAAS,EAAE,SAAS,GAAI;AACvB,UAAK,KAAE,gCAAmB,QAAS,GAAI;AACtC,eAAO;AAAA,MACR;AACA,aAAO,SAAS,aAAa,iBAC5B,4CAAC,kDAAAC,SAAA,EAAuC,UAAS,KAAI,IAErD,4CAAC,6CAAAC,SAAA,EAAmC;AAAA,IAEtC;AAAA,IACA,QAAS,EAAE,SAAS,GAAI;AACvB,YAAM,eAAe,SAAS,cAAc;AAC5C,UAAK,CAAE,cAAe;AACrB,eAAO;AAAA,MACR;AAGA,aAAO,QAAQ,iCACd,4CAAC,sBAAAC,SAAA,EAAc,IAEf,4CAAC,oBAAAC,SAAA,EAAoB;AAAA,IAEvB;AAAA,IACA,MAAM,QAAS,EAAE,OAAO,SAAS,GAAI;AACpC,YAAM,eAAe,SAAS,cAAc;AAC5C,UAAK,CAAE,cAAe;AACrB,eAAO;AAAA,MACR;AACA,YAAM,aAAa,MAAM,mBAAoB,KAAM;AACnD,aAAO,aAAa,4CAAC,cAAAC,SAAA,EAAO,IAAK;AAAA,IAClC;AAAA,IACA,
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { resolveSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { loadView } from '@wordpress/views';\n\n/**\n * Internal dependencies\n */\nimport Editor from '../editor';\nimport SidebarNavigationScreenTemplatesBrowse from '../sidebar-navigation-screen-templates-browse';\nimport SidebarNavigationScreenUnsupported from '../sidebar-navigation-screen-unsupported';\nimport PageTemplates from '../page-templates';\nimport PageTemplatesLegacy from '../page-templates/index-legacy';\nimport { unlock } from '../../lock-unlock';\nimport { isThemeDataLoaded } from './utils';\n\nasync function isTemplateListView( query ) {\n\tconst { activeView = 'active' } = query;\n\tconst config = await unlock( resolveSelect( coreStore ) ).getViewConfig(\n\t\t'postType',\n\t\t'wp_template'\n\t);\n\tconst defaultView = config?.default_view;\n\tconst activeViewOverrides =\n\t\tconfig?.view_list?.find( ( v ) => v.slug === activeView )?.view ?? {};\n\tconst view = await loadView( {\n\t\tkind: 'postType',\n\t\tname: 'wp_template',\n\t\tslug: 'default',\n\t\tdefaultView,\n\t\tactiveViewOverrides,\n\t} );\n\treturn view.type === 'list';\n}\n\nexport const templatesRoute = {\n\tname: 'templates',\n\tpath: '/template',\n\tareas: {\n\t\tsidebar( { siteData } ) {\n\t\t\tif ( ! isThemeDataLoaded( siteData ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn siteData.currentTheme.is_block_theme ? (\n\t\t\t\t<SidebarNavigationScreenTemplatesBrowse backPath=\"/\" />\n\t\t\t) : (\n\t\t\t\t<SidebarNavigationScreenUnsupported />\n\t\t\t);\n\t\t},\n\t\tcontent( { siteData } ) {\n\t\t\tconst isBlockTheme = siteData.currentTheme?.is_block_theme;\n\t\t\tif ( ! isBlockTheme ) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t\t// Use the new template activation system if experiment is enabled,\n\t\t\t// otherwise use the legacy simple template list.\n\t\t\treturn window?.__experimentalTemplateActivate ? (\n\t\t\t\t<PageTemplates />\n\t\t\t) : (\n\t\t\t\t<PageTemplatesLegacy />\n\t\t\t);\n\t\t},\n\t\tasync preview( { query, siteData } ) {\n\t\t\tconst isBlockTheme = siteData.currentTheme?.is_block_theme;\n\t\t\tif ( ! isBlockTheme ) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t\tconst isListView = await isTemplateListView( query );\n\t\t\treturn isListView ? <Editor /> : undefined;\n\t\t},\n\t\tmobileSidebar( { siteData } ) {\n\t\t\tif ( ! isThemeDataLoaded( siteData ) ) {\n\t\t\t\treturn <></>;\n\t\t\t}\n\t\t\tif ( ! siteData.currentTheme.is_block_theme ) {\n\t\t\t\treturn <SidebarNavigationScreenUnsupported />;\n\t\t\t}\n\t\t\treturn undefined;\n\t\t},\n\t\tmobileContent( { siteData } ) {\n\t\t\tconst isBlockTheme = siteData.currentTheme?.is_block_theme;\n\t\t\tif ( ! isBlockTheme ) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t\t// Check if the template activation experiment is enabled.\n\t\t\tconst isTemplateActivateEnabled =\n\t\t\t\ttypeof window !== 'undefined' &&\n\t\t\t\twindow.__experimentalTemplateActivate;\n\t\t\t// Use the new template activation system if experiment is enabled,\n\t\t\t// otherwise use the legacy simple template list.\n\t\t\treturn isTemplateActivateEnabled ? (\n\t\t\t\t<PageTemplates />\n\t\t\t) : (\n\t\t\t\t<PageTemplatesLegacy />\n\t\t\t);\n\t\t},\n\t},\n\twidths: {\n\t\tasync content( { query } ) {\n\t\t\tconst isListView = await isTemplateListView( query );\n\t\t\treturn isListView ? 380 : undefined;\n\t\t},\n\t},\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAA8B;AAC9B,uBAAmC;AACnC,mBAAyB;AAKzB,oBAAmB;AACnB,wDAAmD;AACnD,mDAA+C;AAC/C,4BAA0B;AAC1B,0BAAgC;AAChC,yBAAuB;AACvB,mBAAkC;AA8B9B;AA5BJ,eAAe,mBAAoB,OAAQ;AAC1C,QAAM,EAAE,aAAa,SAAS,IAAI;AAClC,QAAM,SAAS,UAAM,+BAAQ,2BAAe,iBAAAA,KAAU,CAAE,EAAE;AAAA,IACzD;AAAA,IACA;AAAA,EACD;AACA,QAAM,cAAc,QAAQ;AAC5B,QAAM,sBACL,QAAQ,WAAW,KAAM,CAAE,MAAO,EAAE,SAAS,UAAW,GAAG,QAAQ,CAAC;AACrE,QAAM,OAAO,UAAM,uBAAU;AAAA,IAC5B,MAAM;AAAA,IACN,MAAM;AAAA,IACN,MAAM;AAAA,IACN;AAAA,IACA;AAAA,EACD,CAAE;AACF,SAAO,KAAK,SAAS;AACtB;AAEO,IAAM,iBAAiB;AAAA,EAC7B,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,IACN,QAAS,EAAE,SAAS,GAAI;AACvB,UAAK,KAAE,gCAAmB,QAAS,GAAI;AACtC,eAAO;AAAA,MACR;AACA,aAAO,SAAS,aAAa,iBAC5B,4CAAC,kDAAAC,SAAA,EAAuC,UAAS,KAAI,IAErD,4CAAC,6CAAAC,SAAA,EAAmC;AAAA,IAEtC;AAAA,IACA,QAAS,EAAE,SAAS,GAAI;AACvB,YAAM,eAAe,SAAS,cAAc;AAC5C,UAAK,CAAE,cAAe;AACrB,eAAO;AAAA,MACR;AAGA,aAAO,QAAQ,iCACd,4CAAC,sBAAAC,SAAA,EAAc,IAEf,4CAAC,oBAAAC,SAAA,EAAoB;AAAA,IAEvB;AAAA,IACA,MAAM,QAAS,EAAE,OAAO,SAAS,GAAI;AACpC,YAAM,eAAe,SAAS,cAAc;AAC5C,UAAK,CAAE,cAAe;AACrB,eAAO;AAAA,MACR;AACA,YAAM,aAAa,MAAM,mBAAoB,KAAM;AACnD,aAAO,aAAa,4CAAC,cAAAC,SAAA,EAAO,IAAK;AAAA,IAClC;AAAA,IACA,cAAe,EAAE,SAAS,GAAI;AAC7B,UAAK,KAAE,gCAAmB,QAAS,GAAI;AACtC,eAAO,2EAAE;AAAA,MACV;AACA,UAAK,CAAE,SAAS,aAAa,gBAAiB;AAC7C,eAAO,4CAAC,6CAAAH,SAAA,EAAmC;AAAA,MAC5C;AACA,aAAO;AAAA,IACR;AAAA,IACA,cAAe,EAAE,SAAS,GAAI;AAC7B,YAAM,eAAe,SAAS,cAAc;AAC5C,UAAK,CAAE,cAAe;AACrB,eAAO;AAAA,MACR;AAEA,YAAM,4BACL,OAAO,WAAW,eAClB,OAAO;AAGR,aAAO,4BACN,4CAAC,sBAAAC,SAAA,EAAc,IAEf,4CAAC,oBAAAC,SAAA,EAAoB;AAAA,IAEvB;AAAA,EACD;AAAA,EACA,QAAQ;AAAA,IACP,MAAM,QAAS,EAAE,MAAM,GAAI;AAC1B,YAAM,aAAa,MAAM,mBAAoB,KAAM;AACnD,aAAO,aAAa,MAAM;AAAA,IAC3B;AAAA,EACD;AACD;",
|
|
6
6
|
"names": ["coreStore", "SidebarNavigationScreenTemplatesBrowse", "SidebarNavigationScreenUnsupported", "PageTemplates", "PageTemplatesLegacy", "Editor"]
|
|
7
7
|
}
|
|
@@ -74,7 +74,7 @@ function WelcomeGuideEditor() {
|
|
|
74
74
|
content: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
75
75
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", { className: "edit-site-welcome-guide__heading", children: (0, import_i18n.__)("Edit your site") }),
|
|
76
76
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "edit-site-welcome-guide__text", children: (0, import_i18n.__)(
|
|
77
|
-
"Design everything on your site
|
|
77
|
+
"Design everything on your site — from the header right down to the footer — using blocks."
|
|
78
78
|
) }),
|
|
79
79
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "edit-site-welcome-guide__text", children: (0, import_element.createInterpolateElement)(
|
|
80
80
|
(0, import_i18n.__)(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/welcome-guide/editor.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { Guide } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { createInterpolateElement } from '@wordpress/element';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport WelcomeGuideImage from './image';\n\nexport default function WelcomeGuideEditor() {\n\tconst { toggle } = useDispatch( preferencesStore );\n\n\tconst { isActive, isBlockBasedTheme } = useSelect( ( select ) => {\n\t\treturn {\n\t\t\tisActive: !! select( preferencesStore ).get(\n\t\t\t\t'core/edit-site',\n\t\t\t\t'welcomeGuide'\n\t\t\t),\n\t\t\tisBlockBasedTheme:\n\t\t\t\tselect( coreStore ).getCurrentTheme()?.is_block_theme,\n\t\t};\n\t}, [] );\n\n\tif ( ! isActive || ! isBlockBasedTheme ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Guide\n\t\t\tclassName=\"edit-site-welcome-guide guide-editor\"\n\t\t\tcontentLabel={ __( 'Welcome to the site editor' ) }\n\t\t\tfinishButtonText={ __( 'Get started' ) }\n\t\t\tonFinish={ () => toggle( 'core/edit-site', 'welcomeGuide' ) }\n\t\t\tpages={ [\n\t\t\t\t{\n\t\t\t\t\timage: (\n\t\t\t\t\t\t<WelcomeGuideImage\n\t\t\t\t\t\t\tnonAnimatedSrc=\"https://s.w.org/images/block-editor/edit-your-site.svg?1\"\n\t\t\t\t\t\t\tanimatedSrc=\"https://s.w.org/images/block-editor/edit-your-site.gif?1\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<h1 className=\"edit-site-welcome-guide__heading\">\n\t\t\t\t\t\t\t\t{ __( 'Edit your site' ) }\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t<p className=\"edit-site-welcome-guide__text\">\n\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t'Design everything on your site
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { Guide } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { createInterpolateElement } from '@wordpress/element';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport WelcomeGuideImage from './image';\n\nexport default function WelcomeGuideEditor() {\n\tconst { toggle } = useDispatch( preferencesStore );\n\n\tconst { isActive, isBlockBasedTheme } = useSelect( ( select ) => {\n\t\treturn {\n\t\t\tisActive: !! select( preferencesStore ).get(\n\t\t\t\t'core/edit-site',\n\t\t\t\t'welcomeGuide'\n\t\t\t),\n\t\t\tisBlockBasedTheme:\n\t\t\t\tselect( coreStore ).getCurrentTheme()?.is_block_theme,\n\t\t};\n\t}, [] );\n\n\tif ( ! isActive || ! isBlockBasedTheme ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Guide\n\t\t\tclassName=\"edit-site-welcome-guide guide-editor\"\n\t\t\tcontentLabel={ __( 'Welcome to the site editor' ) }\n\t\t\tfinishButtonText={ __( 'Get started' ) }\n\t\t\tonFinish={ () => toggle( 'core/edit-site', 'welcomeGuide' ) }\n\t\t\tpages={ [\n\t\t\t\t{\n\t\t\t\t\timage: (\n\t\t\t\t\t\t<WelcomeGuideImage\n\t\t\t\t\t\t\tnonAnimatedSrc=\"https://s.w.org/images/block-editor/edit-your-site.svg?1\"\n\t\t\t\t\t\t\tanimatedSrc=\"https://s.w.org/images/block-editor/edit-your-site.gif?1\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<h1 className=\"edit-site-welcome-guide__heading\">\n\t\t\t\t\t\t\t\t{ __( 'Edit your site' ) }\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t<p className=\"edit-site-welcome-guide__text\">\n\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t'Design everything on your site — from the header right down to the footer — using blocks.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t<p className=\"edit-site-welcome-guide__text\">\n\t\t\t\t\t\t\t\t{ createInterpolateElement(\n\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t'Click <StylesIconImage /> to start designing your blocks, and choose your typography, layout, and colors.'\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tStylesIconImage: (\n\t\t\t\t\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\t\t\t\t\talt={ __( 'styles' ) }\n\t\t\t\t\t\t\t\t\t\t\t\tsrc=\"data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 4c-4.4 0-8 3.6-8 8v.1c0 4.1 3.2 7.5 7.2 7.9h.8c4.4 0 8-3.6 8-8s-3.6-8-8-8zm0 15V5c3.9 0 7 3.1 7 7s-3.1 7-7 7z' fill='%231E1E1E'/%3E%3C/svg%3E%0A\"\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</p>\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\t);\n}\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAuC;AACvC,wBAAsB;AACtB,kBAAmB;AACnB,qBAAyC;AACzC,yBAA0C;AAC1C,uBAAmC;AAKnC,mBAA8B;AA6BxB;AA3BS,SAAR,qBAAsC;AAC5C,QAAM,EAAE,OAAO,QAAI,yBAAa,mBAAAA,KAAiB;AAEjD,QAAM,EAAE,UAAU,kBAAkB,QAAI,uBAAW,CAAE,WAAY;AAChE,WAAO;AAAA,MACN,UAAU,CAAC,CAAE,OAAQ,mBAAAA,KAAiB,EAAE;AAAA,QACvC;AAAA,QACA;AAAA,MACD;AAAA,MACA,mBACC,OAAQ,iBAAAC,KAAU,EAAE,gBAAgB,GAAG;AAAA,IACzC;AAAA,EACD,GAAG,CAAC,CAAE;AAEN,MAAK,CAAE,YAAY,CAAE,mBAAoB;AACxC,WAAO;AAAA,EACR;AAEA,SACC;AAAA,IAAC;AAAA;AAAA,MACA,WAAU;AAAA,MACV,kBAAe,gBAAI,4BAA6B;AAAA,MAChD,sBAAmB,gBAAI,aAAc;AAAA,MACrC,UAAW,MAAM,OAAQ,kBAAkB,cAAe;AAAA,MAC1D,OAAQ;AAAA,QACP;AAAA,UACC,OACC;AAAA,YAAC,aAAAC;AAAA,YAAA;AAAA,cACA,gBAAe;AAAA,cACf,aAAY;AAAA;AAAA,UACb;AAAA,UAED,SACC,4EACC;AAAA,wDAAC,QAAG,WAAU,oCACX,8BAAI,gBAAiB,GACxB;AAAA,YACA,4CAAC,OAAE,WAAU,iCACV;AAAA,cACD;AAAA,YACD,GACD;AAAA,YACA,4CAAC,OAAE,WAAU,iCACV;AAAA,kBACD;AAAA,gBACC;AAAA,cACD;AAAA,cACA;AAAA,gBACC,iBACC;AAAA,kBAAC;AAAA;AAAA,oBACA,SAAM,gBAAI,QAAS;AAAA,oBACnB,KAAI;AAAA;AAAA,gBACL;AAAA,cAEF;AAAA,YACD,GACD;AAAA,aACD;AAAA,QAEF;AAAA,MACD;AAAA;AAAA,EACD;AAEF;",
|
|
6
6
|
"names": ["preferencesStore", "coreStore", "WelcomeGuideImage"]
|
|
7
7
|
}
|
|
@@ -76,7 +76,7 @@ function WelcomeGuidePage() {
|
|
|
76
76
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", { className: "edit-site-welcome-guide__heading", children: heading }),
|
|
77
77
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "edit-site-welcome-guide__text", children: (0, import_i18n.__)(
|
|
78
78
|
// eslint-disable-next-line no-restricted-syntax -- 'sidebar' is a common web design term for layouts
|
|
79
|
-
"It
|
|
79
|
+
"It’s now possible to edit page content in the site editor. To customize other parts of the page like the header and footer switch to editing the template using the settings sidebar."
|
|
80
80
|
) })
|
|
81
81
|
] })
|
|
82
82
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/welcome-guide/page.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { Guide } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\nexport default function WelcomeGuidePage() {\n\tconst { toggle } = useDispatch( preferencesStore );\n\n\tconst isVisible = useSelect( ( select ) => {\n\t\tconst isPageActive = !! select( preferencesStore ).get(\n\t\t\t'core/edit-site',\n\t\t\t'welcomeGuidePage'\n\t\t);\n\t\tconst isEditorActive = !! select( preferencesStore ).get(\n\t\t\t'core/edit-site',\n\t\t\t'welcomeGuide'\n\t\t);\n\t\treturn isPageActive && ! isEditorActive;\n\t}, [] );\n\n\tif ( ! isVisible ) {\n\t\treturn null;\n\t}\n\n\tconst heading = __( 'Editing a page' );\n\n\treturn (\n\t\t<Guide\n\t\t\tclassName=\"edit-site-welcome-guide guide-page\"\n\t\t\tcontentLabel={ heading }\n\t\t\tfinishButtonText={ __( 'Continue' ) }\n\t\t\tonFinish={ () => toggle( 'core/edit-site', 'welcomeGuidePage' ) }\n\t\t\tpages={ [\n\t\t\t\t{\n\t\t\t\t\timage: (\n\t\t\t\t\t\t<video\n\t\t\t\t\t\t\tclassName=\"edit-site-welcome-guide__video\"\n\t\t\t\t\t\t\tautoPlay\n\t\t\t\t\t\t\tloop\n\t\t\t\t\t\t\tmuted\n\t\t\t\t\t\t\twidth=\"312\"\n\t\t\t\t\t\t\theight=\"240\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<source\n\t\t\t\t\t\t\t\tsrc=\"https://s.w.org/images/block-editor/editing-your-page.mp4\"\n\t\t\t\t\t\t\t\ttype=\"video/mp4\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</video>\n\t\t\t\t\t),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<h1 className=\"edit-site-welcome-guide__heading\">\n\t\t\t\t\t\t\t\t{ heading }\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t<p className=\"edit-site-welcome-guide__text\">\n\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t// eslint-disable-next-line no-restricted-syntax -- 'sidebar' is a common web design term for layouts\n\t\t\t\t\t\t\t\t\t'It
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { Guide } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\nexport default function WelcomeGuidePage() {\n\tconst { toggle } = useDispatch( preferencesStore );\n\n\tconst isVisible = useSelect( ( select ) => {\n\t\tconst isPageActive = !! select( preferencesStore ).get(\n\t\t\t'core/edit-site',\n\t\t\t'welcomeGuidePage'\n\t\t);\n\t\tconst isEditorActive = !! select( preferencesStore ).get(\n\t\t\t'core/edit-site',\n\t\t\t'welcomeGuide'\n\t\t);\n\t\treturn isPageActive && ! isEditorActive;\n\t}, [] );\n\n\tif ( ! isVisible ) {\n\t\treturn null;\n\t}\n\n\tconst heading = __( 'Editing a page' );\n\n\treturn (\n\t\t<Guide\n\t\t\tclassName=\"edit-site-welcome-guide guide-page\"\n\t\t\tcontentLabel={ heading }\n\t\t\tfinishButtonText={ __( 'Continue' ) }\n\t\t\tonFinish={ () => toggle( 'core/edit-site', 'welcomeGuidePage' ) }\n\t\t\tpages={ [\n\t\t\t\t{\n\t\t\t\t\timage: (\n\t\t\t\t\t\t<video\n\t\t\t\t\t\t\tclassName=\"edit-site-welcome-guide__video\"\n\t\t\t\t\t\t\tautoPlay\n\t\t\t\t\t\t\tloop\n\t\t\t\t\t\t\tmuted\n\t\t\t\t\t\t\twidth=\"312\"\n\t\t\t\t\t\t\theight=\"240\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<source\n\t\t\t\t\t\t\t\tsrc=\"https://s.w.org/images/block-editor/editing-your-page.mp4\"\n\t\t\t\t\t\t\t\ttype=\"video/mp4\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</video>\n\t\t\t\t\t),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<h1 className=\"edit-site-welcome-guide__heading\">\n\t\t\t\t\t\t\t\t{ heading }\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t<p className=\"edit-site-welcome-guide__text\">\n\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t// eslint-disable-next-line no-restricted-syntax -- 'sidebar' is a common web design term for layouts\n\t\t\t\t\t\t\t\t\t'It’s now possible to edit page content in the site editor. To customize other parts of the page like the header and footer switch to editing the template using the settings sidebar.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</p>\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\t);\n}\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAuC;AACvC,wBAAsB;AACtB,kBAAmB;AACnB,yBAA0C;AAwCnC;AAtCQ,SAAR,mBAAoC;AAC1C,QAAM,EAAE,OAAO,QAAI,yBAAa,mBAAAA,KAAiB;AAEjD,QAAM,gBAAY,uBAAW,CAAE,WAAY;AAC1C,UAAM,eAAe,CAAC,CAAE,OAAQ,mBAAAA,KAAiB,EAAE;AAAA,MAClD;AAAA,MACA;AAAA,IACD;AACA,UAAM,iBAAiB,CAAC,CAAE,OAAQ,mBAAAA,KAAiB,EAAE;AAAA,MACpD;AAAA,MACA;AAAA,IACD;AACA,WAAO,gBAAgB,CAAE;AAAA,EAC1B,GAAG,CAAC,CAAE;AAEN,MAAK,CAAE,WAAY;AAClB,WAAO;AAAA,EACR;AAEA,QAAM,cAAU,gBAAI,gBAAiB;AAErC,SACC;AAAA,IAAC;AAAA;AAAA,MACA,WAAU;AAAA,MACV,cAAe;AAAA,MACf,sBAAmB,gBAAI,UAAW;AAAA,MAClC,UAAW,MAAM,OAAQ,kBAAkB,kBAAmB;AAAA,MAC9D,OAAQ;AAAA,QACP;AAAA,UACC,OACC;AAAA,YAAC;AAAA;AAAA,cACA,WAAU;AAAA,cACV,UAAQ;AAAA,cACR,MAAI;AAAA,cACJ,OAAK;AAAA,cACL,OAAM;AAAA,cACN,QAAO;AAAA,cAEP;AAAA,gBAAC;AAAA;AAAA,kBACA,KAAI;AAAA,kBACJ,MAAK;AAAA;AAAA,cACN;AAAA;AAAA,UACD;AAAA,UAED,SACC,4EACC;AAAA,wDAAC,QAAG,WAAU,oCACX,mBACH;AAAA,YACA,4CAAC,OAAE,WAAU,iCACV;AAAA;AAAA,cAED;AAAA,YACD,GACD;AAAA,aACD;AAAA,QAEF;AAAA,MACD;AAAA;AAAA,EACD;AAEF;",
|
|
6
6
|
"names": ["preferencesStore"]
|
|
7
7
|
}
|
|
@@ -74,7 +74,7 @@ function WelcomeGuideTemplate() {
|
|
|
74
74
|
content: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
75
75
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", { className: "edit-site-welcome-guide__heading", children: heading }),
|
|
76
76
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "edit-site-welcome-guide__text", children: (0, import_i18n.__)(
|
|
77
|
-
"Note that the same template can be used by multiple pages, so any changes made here may affect other pages on the site. To switch back to editing the page content click the
|
|
77
|
+
"Note that the same template can be used by multiple pages, so any changes made here may affect other pages on the site. To switch back to editing the page content click the ‘Back’ button in the toolbar."
|
|
78
78
|
) })
|
|
79
79
|
] })
|
|
80
80
|
}
|