@wordpress/edit-site 6.47.0 → 6.48.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/build/components/layout/index.cjs +27 -9
  3. package/build/components/layout/index.cjs.map +3 -3
  4. package/build/components/post-list/quick-edit-modal.cjs +0 -1
  5. package/build/components/post-list/quick-edit-modal.cjs.map +2 -2
  6. package/build/components/sidebar-navigation-screen/index.cjs +0 -1
  7. package/build/components/sidebar-navigation-screen/index.cjs.map +2 -2
  8. package/build/components/site-editor-routes/home.cjs +1 -1
  9. package/build/components/site-editor-routes/home.cjs.map +2 -2
  10. package/build/components/site-editor-routes/identity.cjs +1 -12
  11. package/build/components/site-editor-routes/identity.cjs.map +3 -3
  12. package/build/components/site-editor-routes/navigation-item.cjs +2 -10
  13. package/build/components/site-editor-routes/navigation-item.cjs.map +3 -3
  14. package/build/components/site-editor-routes/navigation.cjs +2 -10
  15. package/build/components/site-editor-routes/navigation.cjs.map +3 -3
  16. package/build/components/site-editor-routes/notfound.cjs +1 -1
  17. package/build/components/site-editor-routes/notfound.cjs.map +2 -2
  18. package/build/components/site-editor-routes/page-item.cjs +1 -6
  19. package/build/components/site-editor-routes/page-item.cjs.map +2 -2
  20. package/build/components/site-editor-routes/pages.cjs +6 -9
  21. package/build/components/site-editor-routes/pages.cjs.map +3 -3
  22. package/build/components/site-editor-routes/pattern-item.cjs +1 -1
  23. package/build/components/site-editor-routes/pattern-item.cjs.map +2 -2
  24. package/build/components/site-editor-routes/patterns.cjs +8 -3
  25. package/build/components/site-editor-routes/patterns.cjs.map +2 -2
  26. package/build/components/site-editor-routes/stylebook.cjs +1 -1
  27. package/build/components/site-editor-routes/stylebook.cjs.map +2 -2
  28. package/build/components/site-editor-routes/styles.cjs +1 -9
  29. package/build/components/site-editor-routes/styles.cjs.map +2 -2
  30. package/build/components/site-editor-routes/template-item.cjs +1 -6
  31. package/build/components/site-editor-routes/template-item.cjs.map +2 -2
  32. package/build/components/site-editor-routes/template-part-item.cjs +1 -1
  33. package/build/components/site-editor-routes/template-part-item.cjs.map +2 -2
  34. package/build/components/site-editor-routes/templates.cjs +8 -1
  35. package/build/components/site-editor-routes/templates.cjs.map +2 -2
  36. package/build/store/selectors.cjs +2 -4
  37. package/build/store/selectors.cjs.map +2 -2
  38. package/build-module/components/layout/index.mjs +29 -11
  39. package/build-module/components/layout/index.mjs.map +2 -2
  40. package/build-module/components/post-list/quick-edit-modal.mjs +0 -1
  41. package/build-module/components/post-list/quick-edit-modal.mjs.map +2 -2
  42. package/build-module/components/sidebar-navigation-screen/index.mjs +0 -1
  43. package/build-module/components/sidebar-navigation-screen/index.mjs.map +2 -2
  44. package/build-module/components/site-editor-routes/home.mjs +1 -1
  45. package/build-module/components/site-editor-routes/home.mjs.map +2 -2
  46. package/build-module/components/site-editor-routes/identity.mjs +1 -12
  47. package/build-module/components/site-editor-routes/identity.mjs.map +2 -2
  48. package/build-module/components/site-editor-routes/navigation-item.mjs +2 -10
  49. package/build-module/components/site-editor-routes/navigation-item.mjs.map +2 -2
  50. package/build-module/components/site-editor-routes/navigation.mjs +2 -10
  51. package/build-module/components/site-editor-routes/navigation.mjs.map +2 -2
  52. package/build-module/components/site-editor-routes/notfound.mjs +1 -1
  53. package/build-module/components/site-editor-routes/notfound.mjs.map +2 -2
  54. package/build-module/components/site-editor-routes/page-item.mjs +2 -7
  55. package/build-module/components/site-editor-routes/page-item.mjs.map +2 -2
  56. package/build-module/components/site-editor-routes/pages.mjs +6 -9
  57. package/build-module/components/site-editor-routes/pages.mjs.map +2 -2
  58. package/build-module/components/site-editor-routes/pattern-item.mjs +1 -1
  59. package/build-module/components/site-editor-routes/pattern-item.mjs.map +2 -2
  60. package/build-module/components/site-editor-routes/patterns.mjs +8 -3
  61. package/build-module/components/site-editor-routes/patterns.mjs.map +2 -2
  62. package/build-module/components/site-editor-routes/stylebook.mjs +1 -1
  63. package/build-module/components/site-editor-routes/stylebook.mjs.map +2 -2
  64. package/build-module/components/site-editor-routes/styles.mjs +1 -9
  65. package/build-module/components/site-editor-routes/styles.mjs.map +2 -2
  66. package/build-module/components/site-editor-routes/template-item.mjs +2 -7
  67. package/build-module/components/site-editor-routes/template-item.mjs.map +2 -2
  68. package/build-module/components/site-editor-routes/template-part-item.mjs +1 -1
  69. package/build-module/components/site-editor-routes/template-part-item.mjs.map +2 -2
  70. package/build-module/components/site-editor-routes/templates.mjs +8 -1
  71. package/build-module/components/site-editor-routes/templates.mjs.map +2 -2
  72. package/build-module/store/selectors.mjs +2 -4
  73. package/build-module/store/selectors.mjs.map +2 -2
  74. package/build-style/experimental-admin-bar-in-editor-rtl.css +3 -1
  75. package/build-style/experimental-admin-bar-in-editor.css +3 -1
  76. package/build-style/style-rtl.css +312 -65
  77. package/build-style/style.css +312 -66
  78. package/package.json +51 -51
  79. package/src/components/layout/index.js +50 -15
  80. package/src/components/layout/style.scss +19 -11
  81. package/src/components/page-patterns/style.scss +1 -2
  82. package/src/components/post-list/quick-edit-modal.js +0 -1
  83. package/src/components/save-hub/style.scss +4 -4
  84. package/src/components/sidebar-button/style.scss +2 -4
  85. package/src/components/sidebar-dataviews/style.scss +0 -1
  86. package/src/components/sidebar-global-styles/style.scss +1 -2
  87. package/src/components/sidebar-navigation-item/style.scss +6 -7
  88. package/src/components/sidebar-navigation-screen/index.js +0 -1
  89. package/src/components/sidebar-navigation-screen/style.scss +9 -9
  90. package/src/components/sidebar-navigation-screen-navigation-menu/style.scss +2 -4
  91. package/src/components/sidebar-navigation-screen-navigation-menus/style.scss +15 -5
  92. package/src/components/sidebar-navigation-screen-patterns/style.scss +2 -3
  93. package/src/components/site-editor-routes/README.md +4 -4
  94. package/src/components/site-editor-routes/home.js +1 -1
  95. package/src/components/site-editor-routes/identity.js +1 -20
  96. package/src/components/site-editor-routes/navigation-item.js +2 -21
  97. package/src/components/site-editor-routes/navigation.js +2 -21
  98. package/src/components/site-editor-routes/notfound.js +1 -1
  99. package/src/components/site-editor-routes/page-item.js +1 -10
  100. package/src/components/site-editor-routes/pages.js +6 -14
  101. package/src/components/site-editor-routes/pattern-item.js +1 -1
  102. package/src/components/site-editor-routes/patterns.js +8 -7
  103. package/src/components/site-editor-routes/stylebook.js +1 -1
  104. package/src/components/site-editor-routes/styles.js +1 -12
  105. package/src/components/site-editor-routes/template-item.js +1 -10
  106. package/src/components/site-editor-routes/template-part-item.js +1 -1
  107. package/src/components/site-editor-routes/templates.js +8 -1
  108. package/src/components/site-hub/style.scss +5 -6
  109. package/src/experimental-admin-bar-in-editor.scss +3 -1
  110. package/src/store/selectors.js +3 -7
  111. package/src/style.scss +1 -2
@@ -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
- mobile({ siteData }) {
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 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MobilePagesView, {}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_sidebar_navigation_screen_unsupported.default, {});
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 { privateApis as routerPrivateApis } from '@wordpress/router';\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\nconst { useLocation } = unlock( routerPrivateApis );\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\nfunction MobilePagesView() {\n\tconst { query = {} } = useLocation();\n\tconst { canvas = 'view' } = query;\n\n\treturn canvas === 'edit' ? <Editor /> : <PostList postType=\"page\" />;\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\tmobile( { 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<MobilePagesView />\n\t\t\t) : (\n\t\t\t\t<SidebarNavigationScreenUnsupported />\n\t\t\t);\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,oBAAiD;AACjD,kBAAmB;AACnB,kBAA8B;AAC9B,uBAAmC;AACnC,mBAAyB;AAKzB,oBAAmB;AACnB,uCAAoC;AACpC,mDAA+C;AAC/C,+BAAoC;AACpC,uBAAqB;AACrB,yBAAuB;AACvB,mBAAkC;AA4BN;AA1B5B,IAAM,EAAE,YAAY,QAAI,2BAAQ,cAAAA,WAAkB;AAElD,eAAe,WAAY,OAAQ;AAClC,QAAM,EAAE,aAAa,MAAM,IAAI;AAC/B,QAAM,SAAS,UAAM,+BAAQ,2BAAe,iBAAAC,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;AAEA,SAAS,kBAAkB;AAC1B,QAAM,EAAE,QAAQ,CAAC,EAAE,IAAI,YAAY;AACnC,QAAM,EAAE,SAAS,OAAO,IAAI;AAE5B,SAAO,WAAW,SAAS,4CAAC,cAAAC,SAAA,EAAO,IAAK,4CAAC,iBAAAC,SAAA,EAAS,UAAS,QAAO;AACnE;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,iBAAAH,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,cAAAD,SAAA,EAAO,IAAK;AAAA,IAC9B;AAAA,IACA,OAAQ,EAAE,SAAS,GAAI;AACtB,UAAK,KAAE,gCAAmB,QAAS,GAAI;AACtC,eAAO,2EAAE;AAAA,MACV;AACA,aAAO,SAAS,aAAa,iBAC5B,4CAAC,mBAAgB,IAEjB,4CAAC,6CAAAI,SAAA,EAAmC;AAAA,IAEtC;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": ["routerPrivateApis", "coreStore", "Editor", "PostList", "SidebarNavigationScreen", "DataViewsSidebarContent", "SidebarNavigationScreenUnsupported"]
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,IAC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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
- mobile: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_editor.default, {}),
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\tmobile: <Editor />,\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,IACA,QAAQ,4CAAC,cAAAC,SAAA,EAAO;AAAA,IAChB,SAAS,4CAAC,cAAAA,SAAA,EAAO;AAAA,EAClB;AACD;",
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
- mobile({ siteData, query }) {
51
- const { categoryId } = query;
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 !!categoryId ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_page_patterns.default, {}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_sidebar_navigation_screen_patterns.default, { backPath });
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\tmobile( { siteData, query } ) {\n\t\t\tconst { categoryId } = query;\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 !! categoryId ? (\n\t\t\t\t<PagePatterns />\n\t\t\t) : (\n\t\t\t\t<SidebarNavigationScreenPatterns backPath={ backPath } />\n\t\t\t);\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,OAAQ,EAAE,UAAU,MAAM,GAAI;AAC7B,YAAM,EAAE,WAAW,IAAI;AACvB,YAAM,eAAe,SAAS,cAAc;AAC5C,YAAM,WACL,oBAAgB,iDAAoC,QAAS,IAC1D,MACA;AACJ,aAAO,CAAC,CAAE,aACT,4CAAC,qBAAAA,SAAA,EAAa,IAEd,4CAAC,0CAAAD,SAAA,EAAgC,UAAsB;AAAA,IAEzD;AAAA,EACD;AACD;",
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
  }
@@ -69,7 +69,7 @@ var stylebookRoute = {
69
69
  }
70
70
  ) : void 0;
71
71
  },
72
- mobile({ siteData }) {
72
+ mobileContent({ siteData }) {
73
73
  return (0, import_utils.isClassicThemeWithStyleBookSupport)(siteData) ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
74
74
  StyleBookPreview,
75
75
  {
@@ -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\tmobile( { 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,OAAQ,EAAE,SAAS,GAAI;AACtB,iBAAO,iDAAoC,QAAS,IACnD;AAAA,QAAC;AAAA;AAAA,UACA,UAAQ;AAAA,UACR,UAAW,SAAS;AAAA;AAAA,MACrB,IACG;AAAA,IACL;AAAA,EACD;AACD;",
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
- mobile: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MobileGlobalStylesUI, {})
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 MobileGlobalStylesUI() {\n\tconst { query = {} } = useLocation();\n\tconst { canvas } = query;\n\n\tif ( canvas === 'edit' ) {\n\t\treturn <Editor />;\n\t}\n\n\treturn <SidebarGlobalStyles />;\n}\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\tmobile: <MobileGlobalStylesUI />,\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;AAUvB;AART,IAAM,EAAE,aAAa,WAAW,QAAI,2BAAQ,cAAAC,WAAkB;AAC9D,IAAM,EAAE,iBAAiB,QAAI,2BAAQ,cAAAC,WAAkB;AAEvD,SAAS,uBAAuB;AAC/B,QAAM,EAAE,QAAQ,CAAC,EAAE,IAAI,YAAY;AACnC,QAAM,EAAE,OAAO,IAAI;AAEnB,MAAK,WAAW,QAAS;AACxB,WAAO,4CAAC,eAAAC,SAAA,EAAO;AAAA,EAChB;AAEA,SAAO,4CAAC,6BAAAC,SAAA,EAAoB;AAC7B;AAEA,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,eAAAD,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,QAAQ,4CAAC,wBAAqB;AAAA,EAC/B;AAAA,EACA,QAAQ;AAAA,IACP,SAAS;AAAA,EACV;AACD;",
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({ siteData }) {
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\tmobile( { siteData } ) {\n\t\tif ( ! isThemeDataLoaded( siteData ) ) {\n\t\t\treturn <></>;\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\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,EACA,OAAQ,EAAE,SAAS,GAAI;AACtB,QAAK,KAAE,gCAAmB,QAAS,GAAI;AACtC,aAAO,2EAAE;AAAA,IACV;AACA,WAAO,SAAS,aAAa,iBAC5B,4CAAC,cAAAC,SAAA,EAAO,IAER,4CAAC,6CAAAD,SAAA,EAAmC;AAAA,EAEtC;AAAA,EACA,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;",
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
- mobile: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_editor.default, {}),
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\tmobile: <Editor />,\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,IACvD,QAAQ,4CAAC,cAAAC,SAAA,EAAO;AAAA,IAChB,SAAS,4CAAC,cAAAA,SAAA,EAAO;AAAA,EAClB;AACD;",
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
- mobile({ siteData }) {
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\tmobile( { 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\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,OAAQ,EAAE,SAAS,GAAI;AACtB,UAAK,KAAE,gCAAmB,QAAS,GAAI;AACtC,eAAO,2EAAE;AAAA,MACV;AACA,UAAK,CAAE,SAAS,aAAa,gBAAiB;AAC7C,eAAO,4CAAC,6CAAAH,SAAA,EAAmC;AAAA,MAC5C;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;",
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,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C,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
  }
@@ -56,7 +56,6 @@ module.exports = __toCommonJS(selectors_exports);
56
56
  var import_core_data = require("@wordpress/core-data");
57
57
  var import_data = require("@wordpress/data");
58
58
  var import_deprecated = __toESM(require("@wordpress/deprecated"));
59
- var import_element = require("@wordpress/element");
60
59
  var import_preferences = require("@wordpress/preferences");
61
60
  var import_editor = require("@wordpress/editor");
62
61
  var import_block_editor = require("@wordpress/block-editor");
@@ -106,10 +105,9 @@ var getReusableBlocks = (0, import_data.createRegistrySelector)((select) => () =
106
105
  version: "6.8",
107
106
  alternative: `select( 'core/core' ).getEntityRecords( 'postType', 'wp_block' )`
108
107
  });
109
- const isWeb = import_element.Platform.OS === "web";
110
- return isWeb ? select(import_core_data.store).getEntityRecords("postType", "wp_block", {
108
+ return select(import_core_data.store).getEntityRecords("postType", "wp_block", {
111
109
  per_page: -1
112
- }) : [];
110
+ });
113
111
  });
114
112
  function getSettings(state) {
115
113
  return state.settings;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/store/selectors.js"],
4
- "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { store as coreDataStore } from '@wordpress/core-data';\nimport { createRegistrySelector, createSelector } from '@wordpress/data';\nimport deprecated from '@wordpress/deprecated';\nimport { Platform } from '@wordpress/element';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { store as editorStore } from '@wordpress/editor';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../lock-unlock';\nimport { TEMPLATE_PART_POST_TYPE } from '../utils/constants';\nimport getFilteredTemplatePartBlocks from '../utils/get-filtered-template-parts';\n\n/**\n * @typedef {'template'|'template_type'} TemplateType Template type.\n */\n\n/**\n * Returns whether the given feature is enabled or not.\n *\n * @deprecated\n * @param {Object} state Global application state.\n * @param {string} featureName Feature slug.\n *\n * @return {boolean} Is active.\n */\nexport const isFeatureActive = createRegistrySelector(\n\t( select ) => ( _, featureName ) => {\n\t\tdeprecated( `select( 'core/edit-site' ).isFeatureActive`, {\n\t\t\tsince: '6.0',\n\t\t\talternative: `select( 'core/preferences' ).get`,\n\t\t} );\n\n\t\treturn !! select( preferencesStore ).get(\n\t\t\t'core/edit-site',\n\t\t\tfeatureName\n\t\t);\n\t}\n);\n\n/**\n * Returns the current editing canvas device type.\n *\n * @deprecated\n *\n * @param {Object} state Global application state.\n *\n * @return {string} Device type.\n */\nexport const __experimentalGetPreviewDeviceType = createRegistrySelector(\n\t( select ) => () => {\n\t\tdeprecated(\n\t\t\t`select( 'core/edit-site' ).__experimentalGetPreviewDeviceType`,\n\t\t\t{\n\t\t\t\tsince: '6.5',\n\t\t\t\tversion: '6.7',\n\t\t\t\talternative: `select( 'core/editor' ).getDeviceType`,\n\t\t\t}\n\t\t);\n\t\treturn select( editorStore ).getDeviceType();\n\t}\n);\n\n/**\n * Returns whether the current user can create media or not.\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} Whether the current user can create media or not.\n */\nexport const getCanUserCreateMedia = createRegistrySelector(\n\t( select ) => () => {\n\t\tdeprecated(\n\t\t\t`wp.data.select( 'core/edit-site' ).getCanUserCreateMedia()`,\n\t\t\t{\n\t\t\t\tsince: '6.7',\n\t\t\t\talternative: `wp.data.select( 'core' ).canUser( 'create', { kind: 'postType', type: 'attachment' } )`,\n\t\t\t}\n\t\t);\n\n\t\treturn select( coreDataStore ).canUser( 'create', 'media' );\n\t}\n);\n\n/**\n * Returns any available Reusable blocks.\n *\n * @param {Object} state Global application state.\n *\n * @return {Array} The available reusable blocks.\n */\nexport const getReusableBlocks = createRegistrySelector( ( select ) => () => {\n\tdeprecated( `select( 'core/edit-site' ).getReusableBlocks()`, {\n\t\tsince: '6.5',\n\t\tversion: '6.8',\n\t\talternative: `select( 'core/core' ).getEntityRecords( 'postType', 'wp_block' )`,\n\t} );\n\tconst isWeb = Platform.OS === 'web';\n\treturn isWeb\n\t\t? select( coreDataStore ).getEntityRecords( 'postType', 'wp_block', {\n\t\t\t\tper_page: -1,\n\t\t } )\n\t\t: [];\n} );\n\n/**\n * Returns the site editor settings.\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} Settings.\n */\nexport function getSettings( state ) {\n\t// It is important that we don't inject anything into these settings locally.\n\t// The reason for this is that we have an effect in place that calls setSettings based on the previous value of getSettings.\n\t// If we add computed settings here, we'll be adding these computed settings to the state which is very unexpected.\n\treturn state.settings;\n}\n\n/**\n * @deprecated\n */\nexport function getHomeTemplateId() {\n\tdeprecated( \"select( 'core/edit-site' ).getHomeTemplateId\", {\n\t\tsince: '6.2',\n\t\tversion: '6.4',\n\t} );\n}\n\n/**\n * Returns the current edited post type (wp_template or wp_template_part).\n *\n * @deprecated\n * @param {Object} state Global application state.\n *\n * @return {?TemplateType} Template type.\n */\nexport function getEditedPostType( state ) {\n\tdeprecated( \"select( 'core/edit-site' ).getEditedPostType\", {\n\t\tsince: '6.8',\n\t\talternative: \"select( 'core/editor' ).getCurrentPostType\",\n\t} );\n\treturn state.editedPost.postType;\n}\n\n/**\n * Returns the ID of the currently edited template or template part.\n *\n * @deprecated\n * @param {Object} state Global application state.\n *\n * @return {?string} Post ID.\n */\nexport function getEditedPostId( state ) {\n\tdeprecated( \"select( 'core/edit-site' ).getEditedPostId\", {\n\t\tsince: '6.8',\n\t\talternative: \"select( 'core/editor' ).getCurrentPostId\",\n\t} );\n\treturn state.editedPost.id;\n}\n\n/**\n * Returns the edited post's context object.\n *\n * @deprecated\n * @param {Object} state Global application state.\n *\n * @return {Object} Page.\n */\nexport function getEditedPostContext( state ) {\n\tdeprecated( \"select( 'core/edit-site' ).getEditedPostContext\", {\n\t\tsince: '6.8',\n\t} );\n\n\treturn state.editedPost.context;\n}\n\n/**\n * Returns the current page object.\n *\n * @deprecated\n * @param {Object} state Global application state.\n *\n * @return {Object} Page.\n */\nexport function getPage( state ) {\n\tdeprecated( \"select( 'core/edit-site' ).getPage\", {\n\t\tsince: '6.8',\n\t} );\n\n\treturn { context: state.editedPost.context };\n}\n\n/**\n * Returns true if the inserter is opened.\n *\n * @deprecated\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the inserter is opened.\n */\nexport const isInserterOpened = createRegistrySelector( ( select ) => () => {\n\tdeprecated( `select( 'core/edit-site' ).isInserterOpened`, {\n\t\tsince: '6.5',\n\t\talternative: `select( 'core/editor' ).isInserterOpened`,\n\t} );\n\treturn select( editorStore ).isInserterOpened();\n} );\n\n/**\n * Get the insertion point for the inserter.\n *\n * @deprecated\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} The root client ID, index to insert at and starting filter value.\n */\nexport const __experimentalGetInsertionPoint = createRegistrySelector(\n\t( select ) => () => {\n\t\tdeprecated(\n\t\t\t`select( 'core/edit-site' ).__experimentalGetInsertionPoint`,\n\t\t\t{\n\t\t\t\tsince: '6.5',\n\t\t\t\tversion: '6.7',\n\t\t\t}\n\t\t);\n\t\treturn unlock( select( editorStore ) ).getInserter();\n\t}\n);\n\n/**\n * Returns true if the list view is opened.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the list view is opened.\n */\nexport const isListViewOpened = createRegistrySelector( ( select ) => () => {\n\tdeprecated( `select( 'core/edit-site' ).isListViewOpened`, {\n\t\tsince: '6.5',\n\t\talternative: `select( 'core/editor' ).isListViewOpened`,\n\t} );\n\treturn select( editorStore ).isListViewOpened();\n} );\n\n/**\n * Returns the current opened/closed state of the save panel.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} True if the save panel should be open; false if closed.\n */\nexport function isSaveViewOpened( state ) {\n\treturn state.saveViewPanel;\n}\n\nfunction getBlocksAndTemplateParts( select ) {\n\tconst templateParts = select( coreDataStore ).getEntityRecords(\n\t\t'postType',\n\t\tTEMPLATE_PART_POST_TYPE,\n\t\t{ per_page: -1 }\n\t);\n\n\tconst { getBlocksByName, getBlocksByClientId } = select( blockEditorStore );\n\n\tconst clientIds = getBlocksByName( 'core/template-part' );\n\tconst blocks = getBlocksByClientId( clientIds );\n\treturn [ blocks, templateParts ];\n}\n\n/**\n * Returns the template parts and their blocks for the current edited template.\n *\n * @deprecated\n * @param {Object} state Global application state.\n * @return {Array} Template parts and their blocks in an array.\n */\nexport const getCurrentTemplateTemplateParts = createRegistrySelector(\n\t( select ) =>\n\t\tcreateSelector(\n\t\t\t() => {\n\t\t\t\tdeprecated(\n\t\t\t\t\t`select( 'core/edit-site' ).getCurrentTemplateTemplateParts()`,\n\t\t\t\t\t{\n\t\t\t\t\t\tsince: '6.7',\n\t\t\t\t\t\tversion: '6.9',\n\t\t\t\t\t\talternative: `select( 'core/block-editor' ).getBlocksByName( 'core/template-part' )`,\n\t\t\t\t\t}\n\t\t\t\t);\n\n\t\t\t\treturn getFilteredTemplatePartBlocks(\n\t\t\t\t\t...getBlocksAndTemplateParts( select )\n\t\t\t\t);\n\t\t\t},\n\t\t\t() => getBlocksAndTemplateParts( select )\n\t\t)\n);\n\n/**\n * Returns the current editing mode.\n *\n * @param {Object} state Global application state.\n *\n * @return {string} Editing mode.\n */\nexport const getEditorMode = createRegistrySelector( ( select ) => () => {\n\treturn select( preferencesStore ).get( 'core', 'editorMode' );\n} );\n\n/**\n * @deprecated\n */\nexport function getCurrentTemplateNavigationPanelSubMenu() {\n\tdeprecated(\n\t\t\"dispatch( 'core/edit-site' ).getCurrentTemplateNavigationPanelSubMenu\",\n\t\t{\n\t\t\tsince: '6.2',\n\t\t\tversion: '6.4',\n\t\t}\n\t);\n}\n\n/**\n * @deprecated\n */\nexport function getNavigationPanelActiveMenu() {\n\tdeprecated( \"dispatch( 'core/edit-site' ).getNavigationPanelActiveMenu\", {\n\t\tsince: '6.2',\n\t\tversion: '6.4',\n\t} );\n}\n\n/**\n * @deprecated\n */\nexport function isNavigationOpened() {\n\tdeprecated( \"dispatch( 'core/edit-site' ).isNavigationOpened\", {\n\t\tsince: '6.2',\n\t\tversion: '6.4',\n\t} );\n}\n\n/**\n * Whether or not the editor has a page loaded into it.\n *\n * @see setPage\n * @deprecated\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether or not the editor has a page loaded into it.\n */\nexport function isPage( state ) {\n\tdeprecated( \"select( 'core/edit-site' ).isPage\", {\n\t\tsince: '6.8',\n\t\talternative: \"select( 'core/editor' ).getCurrentPostType\",\n\t} );\n\n\treturn !! state.editedPost.context?.postId;\n}\n\n/**\n * Whether or not the editor allows only page content to be edited.\n *\n * @deprecated\n *\n * @return {boolean} Whether or not focus is on editing page content.\n */\nexport function hasPageContentFocus() {\n\tdeprecated( `select( 'core/edit-site' ).hasPageContentFocus`, {\n\t\tsince: '6.5',\n\t} );\n\n\treturn false;\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,uBAAuC;AACvC,kBAAuD;AACvD,wBAAuB;AACvB,qBAAyB;AACzB,yBAA0C;AAC1C,oBAAqC;AACrC,0BAA0C;AAK1C,yBAAuB;AACvB,uBAAwC;AACxC,yCAA0C;AAenC,IAAM,sBAAkB;AAAA,EAC9B,CAAE,WAAY,CAAE,GAAG,gBAAiB;AAC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AE1E,QAAM,YAAY,gBAAiB,oBAAqB;AACxD,QAAM,SAAS,oBAAqB,SAAU;AAC9C,SAAO,CAAE,QAAQ,aAAc;AAChC;AASO,IAAM,sCAAkC;AAAA,EAC9C,CAAE,eACD;AAAA,IACC,MAAM;AACL,4BAAAJ;AAAA,QACC;AAAA,QACA;AAAA,UACC,OAAO;AAAA,UACP,SAAS;AAAA,UACT,aAAa;AAAA,QACd;AAAA,MACD;AAEA,iBAAO,mCAAAK;AAAA,QACN,GAAG,0BAA2B,MAAO;AAAA,MACtC;AAAA,IACD;AAAA,IACA,MAAM,0BAA2B,MAAO;AAAA,EACzC;AACF;AASO,IAAM,oBAAgB,oCAAwB,CAAE,WAAY,MAAM;AACxE,SAAO,OAAQ,mBAAAJ,KAAiB,EAAE,IAAK,QAAQ,YAAa;AAC7D,CAAE;AAKK,SAAS,2CAA2C;AAC1D,wBAAAD;AAAA,IACC;AAAA,IACA;AAAA,MACC,OAAO;AAAA,MACP,SAAS;AAAA,IACV;AAAA,EACD;AACD;AAKO,SAAS,+BAA+B;AAC9C,wBAAAA,SAAY,6DAA6D;AAAA,IACxE,OAAO;AAAA,IACP,SAAS;AAAA,EACV,CAAE;AACH;AAKO,SAAS,qBAAqB;AACpC,wBAAAA,SAAY,mDAAmD;AAAA,IAC9D,OAAO;AAAA,IACP,SAAS;AAAA,EACV,CAAE;AACH;AAWO,SAAS,OAAQ,OAAQ;AAC/B,wBAAAA,SAAY,qCAAqC;AAAA,IAChD,OAAO;AAAA,IACP,aAAa;AAAA,EACd,CAAE;AAEF,SAAO,CAAC,CAAE,MAAM,WAAW,SAAS;AACrC;AASO,SAAS,sBAAsB;AACrC,wBAAAA,SAAY,kDAAkD;AAAA,IAC7D,OAAO;AAAA,EACR,CAAE;AAEF,SAAO;AACR;",
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { store as coreDataStore } from '@wordpress/core-data';\nimport { createRegistrySelector, createSelector } from '@wordpress/data';\nimport deprecated from '@wordpress/deprecated';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { store as editorStore } from '@wordpress/editor';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../lock-unlock';\nimport { TEMPLATE_PART_POST_TYPE } from '../utils/constants';\nimport getFilteredTemplatePartBlocks from '../utils/get-filtered-template-parts';\n\n/**\n * @typedef {'template'|'template_type'} TemplateType Template type.\n */\n\n/**\n * Returns whether the given feature is enabled or not.\n *\n * @deprecated\n * @param {Object} state Global application state.\n * @param {string} featureName Feature slug.\n *\n * @return {boolean} Is active.\n */\nexport const isFeatureActive = createRegistrySelector(\n\t( select ) => ( _, featureName ) => {\n\t\tdeprecated( `select( 'core/edit-site' ).isFeatureActive`, {\n\t\t\tsince: '6.0',\n\t\t\talternative: `select( 'core/preferences' ).get`,\n\t\t} );\n\n\t\treturn !! select( preferencesStore ).get(\n\t\t\t'core/edit-site',\n\t\t\tfeatureName\n\t\t);\n\t}\n);\n\n/**\n * Returns the current editing canvas device type.\n *\n * @deprecated\n *\n * @param {Object} state Global application state.\n *\n * @return {string} Device type.\n */\nexport const __experimentalGetPreviewDeviceType = createRegistrySelector(\n\t( select ) => () => {\n\t\tdeprecated(\n\t\t\t`select( 'core/edit-site' ).__experimentalGetPreviewDeviceType`,\n\t\t\t{\n\t\t\t\tsince: '6.5',\n\t\t\t\tversion: '6.7',\n\t\t\t\talternative: `select( 'core/editor' ).getDeviceType`,\n\t\t\t}\n\t\t);\n\t\treturn select( editorStore ).getDeviceType();\n\t}\n);\n\n/**\n * Returns whether the current user can create media or not.\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} Whether the current user can create media or not.\n */\nexport const getCanUserCreateMedia = createRegistrySelector(\n\t( select ) => () => {\n\t\tdeprecated(\n\t\t\t`wp.data.select( 'core/edit-site' ).getCanUserCreateMedia()`,\n\t\t\t{\n\t\t\t\tsince: '6.7',\n\t\t\t\talternative: `wp.data.select( 'core' ).canUser( 'create', { kind: 'postType', type: 'attachment' } )`,\n\t\t\t}\n\t\t);\n\n\t\treturn select( coreDataStore ).canUser( 'create', 'media' );\n\t}\n);\n\n/**\n * Returns any available Reusable blocks.\n *\n * @param {Object} state Global application state.\n *\n * @return {Array} The available reusable blocks.\n */\nexport const getReusableBlocks = createRegistrySelector( ( select ) => () => {\n\tdeprecated( `select( 'core/edit-site' ).getReusableBlocks()`, {\n\t\tsince: '6.5',\n\t\tversion: '6.8',\n\t\talternative: `select( 'core/core' ).getEntityRecords( 'postType', 'wp_block' )`,\n\t} );\n\treturn select( coreDataStore ).getEntityRecords( 'postType', 'wp_block', {\n\t\tper_page: -1,\n\t} );\n} );\n\n/**\n * Returns the site editor settings.\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} Settings.\n */\nexport function getSettings( state ) {\n\t// It is important that we don't inject anything into these settings locally.\n\t// The reason for this is that we have an effect in place that calls setSettings based on the previous value of getSettings.\n\t// If we add computed settings here, we'll be adding these computed settings to the state which is very unexpected.\n\treturn state.settings;\n}\n\n/**\n * @deprecated\n */\nexport function getHomeTemplateId() {\n\tdeprecated( \"select( 'core/edit-site' ).getHomeTemplateId\", {\n\t\tsince: '6.2',\n\t\tversion: '6.4',\n\t} );\n}\n\n/**\n * Returns the current edited post type (wp_template or wp_template_part).\n *\n * @deprecated\n * @param {Object} state Global application state.\n *\n * @return {?TemplateType} Template type.\n */\nexport function getEditedPostType( state ) {\n\tdeprecated( \"select( 'core/edit-site' ).getEditedPostType\", {\n\t\tsince: '6.8',\n\t\talternative: \"select( 'core/editor' ).getCurrentPostType\",\n\t} );\n\treturn state.editedPost.postType;\n}\n\n/**\n * Returns the ID of the currently edited template or template part.\n *\n * @deprecated\n * @param {Object} state Global application state.\n *\n * @return {?string} Post ID.\n */\nexport function getEditedPostId( state ) {\n\tdeprecated( \"select( 'core/edit-site' ).getEditedPostId\", {\n\t\tsince: '6.8',\n\t\talternative: \"select( 'core/editor' ).getCurrentPostId\",\n\t} );\n\treturn state.editedPost.id;\n}\n\n/**\n * Returns the edited post's context object.\n *\n * @deprecated\n * @param {Object} state Global application state.\n *\n * @return {Object} Page.\n */\nexport function getEditedPostContext( state ) {\n\tdeprecated( \"select( 'core/edit-site' ).getEditedPostContext\", {\n\t\tsince: '6.8',\n\t} );\n\n\treturn state.editedPost.context;\n}\n\n/**\n * Returns the current page object.\n *\n * @deprecated\n * @param {Object} state Global application state.\n *\n * @return {Object} Page.\n */\nexport function getPage( state ) {\n\tdeprecated( \"select( 'core/edit-site' ).getPage\", {\n\t\tsince: '6.8',\n\t} );\n\n\treturn { context: state.editedPost.context };\n}\n\n/**\n * Returns true if the inserter is opened.\n *\n * @deprecated\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the inserter is opened.\n */\nexport const isInserterOpened = createRegistrySelector( ( select ) => () => {\n\tdeprecated( `select( 'core/edit-site' ).isInserterOpened`, {\n\t\tsince: '6.5',\n\t\talternative: `select( 'core/editor' ).isInserterOpened`,\n\t} );\n\treturn select( editorStore ).isInserterOpened();\n} );\n\n/**\n * Get the insertion point for the inserter.\n *\n * @deprecated\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} The root client ID, index to insert at and starting filter value.\n */\nexport const __experimentalGetInsertionPoint = createRegistrySelector(\n\t( select ) => () => {\n\t\tdeprecated(\n\t\t\t`select( 'core/edit-site' ).__experimentalGetInsertionPoint`,\n\t\t\t{\n\t\t\t\tsince: '6.5',\n\t\t\t\tversion: '6.7',\n\t\t\t}\n\t\t);\n\t\treturn unlock( select( editorStore ) ).getInserter();\n\t}\n);\n\n/**\n * Returns true if the list view is opened.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the list view is opened.\n */\nexport const isListViewOpened = createRegistrySelector( ( select ) => () => {\n\tdeprecated( `select( 'core/edit-site' ).isListViewOpened`, {\n\t\tsince: '6.5',\n\t\talternative: `select( 'core/editor' ).isListViewOpened`,\n\t} );\n\treturn select( editorStore ).isListViewOpened();\n} );\n\n/**\n * Returns the current opened/closed state of the save panel.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} True if the save panel should be open; false if closed.\n */\nexport function isSaveViewOpened( state ) {\n\treturn state.saveViewPanel;\n}\n\nfunction getBlocksAndTemplateParts( select ) {\n\tconst templateParts = select( coreDataStore ).getEntityRecords(\n\t\t'postType',\n\t\tTEMPLATE_PART_POST_TYPE,\n\t\t{ per_page: -1 }\n\t);\n\n\tconst { getBlocksByName, getBlocksByClientId } = select( blockEditorStore );\n\n\tconst clientIds = getBlocksByName( 'core/template-part' );\n\tconst blocks = getBlocksByClientId( clientIds );\n\treturn [ blocks, templateParts ];\n}\n\n/**\n * Returns the template parts and their blocks for the current edited template.\n *\n * @deprecated\n * @param {Object} state Global application state.\n * @return {Array} Template parts and their blocks in an array.\n */\nexport const getCurrentTemplateTemplateParts = createRegistrySelector(\n\t( select ) =>\n\t\tcreateSelector(\n\t\t\t() => {\n\t\t\t\tdeprecated(\n\t\t\t\t\t`select( 'core/edit-site' ).getCurrentTemplateTemplateParts()`,\n\t\t\t\t\t{\n\t\t\t\t\t\tsince: '6.7',\n\t\t\t\t\t\tversion: '6.9',\n\t\t\t\t\t\talternative: `select( 'core/block-editor' ).getBlocksByName( 'core/template-part' )`,\n\t\t\t\t\t}\n\t\t\t\t);\n\n\t\t\t\treturn getFilteredTemplatePartBlocks(\n\t\t\t\t\t...getBlocksAndTemplateParts( select )\n\t\t\t\t);\n\t\t\t},\n\t\t\t() => getBlocksAndTemplateParts( select )\n\t\t)\n);\n\n/**\n * Returns the current editing mode.\n *\n * @param {Object} state Global application state.\n *\n * @return {string} Editing mode.\n */\nexport const getEditorMode = createRegistrySelector( ( select ) => () => {\n\treturn select( preferencesStore ).get( 'core', 'editorMode' );\n} );\n\n/**\n * @deprecated\n */\nexport function getCurrentTemplateNavigationPanelSubMenu() {\n\tdeprecated(\n\t\t\"dispatch( 'core/edit-site' ).getCurrentTemplateNavigationPanelSubMenu\",\n\t\t{\n\t\t\tsince: '6.2',\n\t\t\tversion: '6.4',\n\t\t}\n\t);\n}\n\n/**\n * @deprecated\n */\nexport function getNavigationPanelActiveMenu() {\n\tdeprecated( \"dispatch( 'core/edit-site' ).getNavigationPanelActiveMenu\", {\n\t\tsince: '6.2',\n\t\tversion: '6.4',\n\t} );\n}\n\n/**\n * @deprecated\n */\nexport function isNavigationOpened() {\n\tdeprecated( \"dispatch( 'core/edit-site' ).isNavigationOpened\", {\n\t\tsince: '6.2',\n\t\tversion: '6.4',\n\t} );\n}\n\n/**\n * Whether or not the editor has a page loaded into it.\n *\n * @see setPage\n * @deprecated\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether or not the editor has a page loaded into it.\n */\nexport function isPage( state ) {\n\tdeprecated( \"select( 'core/edit-site' ).isPage\", {\n\t\tsince: '6.8',\n\t\talternative: \"select( 'core/editor' ).getCurrentPostType\",\n\t} );\n\n\treturn !! state.editedPost.context?.postId;\n}\n\n/**\n * Whether or not the editor allows only page content to be edited.\n *\n * @deprecated\n *\n * @return {boolean} Whether or not focus is on editing page content.\n */\nexport function hasPageContentFocus() {\n\tdeprecated( `select( 'core/edit-site' ).hasPageContentFocus`, {\n\t\tsince: '6.5',\n\t} );\n\n\treturn false;\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,uBAAuC;AACvC,kBAAuD;AACvD,wBAAuB;AACvB,yBAA0C;AAC1C,oBAAqC;AACrC,0BAA0C;AAK1C,yBAAuB;AACvB,uBAAwC;AACxC,yCAA0C;AAenC,IAAM,sBAAkB;AAAA,EAC9B,CAAE,WAAY,CAAE,GAAG,gBAAiB;AACnC,0BAAAA,SAAY,8CAA8C;AAAA,MACzD,OAAO;AAAA,MACP,aAAa;AAAA,IACd,CAAE;AAEF,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9C,CAAE,eACD;AAAA,IACC,MAAM;AACL,4BAAAJ;AAAA,QACC;AAAA,QACA;AAAA,UACC,OAAO;AAAA,UACP,SAAS;AAAA,UACT,aAAa;AAAA,QACd;AAAA,MACD;AAEA,iBAAO,mCAAAK;AAAA,QACN,GAAG,0BAA2B,MAAO;AAAA,MACtC;AAAA,IACD;AAAA,IACA,MAAM,0BAA2B,MAAO;AAAA,EACzC;AACF;AASO,IAAM,oBAAgB,oCAAwB,CAAE,WAAY,MAAM;AACxE,SAAO,OAAQ,mBAAAJ,KAAiB,EAAE,IAAK,QAAQ,YAAa;AAC7D,CAAE;AAKK,SAAS,2CAA2C;AAC1D,wBAAAD;AAAA,IACC;AAAA,IACA;AAAA,MACC,OAAO;AAAA,MACP,SAAS;AAAA,IACV;AAAA,EACD;AACD;AAKO,SAAS,+BAA+B;AAC9C,wBAAAA,SAAY,6DAA6D;AAAA,IACxE,OAAO;AAAA,IACP,SAAS;AAAA,EACV,CAAE;AACH;AAKO,SAAS,qBAAqB;AACpC,wBAAAA,SAAY,mDAAmD;AAAA,IAC9D,OAAO;AAAA,IACP,SAAS;AAAA,EACV,CAAE;AACH;AAWO,SAAS,OAAQ,OAAQ;AAC/B,wBAAAA,SAAY,qCAAqC;AAAA,IAChD,OAAO;AAAA,IACP,aAAa;AAAA,EACd,CAAE;AAEF,SAAO,CAAC,CAAE,MAAM,WAAW,SAAS;AACrC;AASO,SAAS,sBAAsB;AACrC,wBAAAA,SAAY,kDAAkD;AAAA,IAC7D,OAAO;AAAA,EACR,CAAE;AAEF,SAAO;AACR;",
6
6
  "names": ["deprecated", "preferencesStore", "editorStore", "coreDataStore", "blockEditorStore", "getFilteredTemplatePartBlocks"]
7
7
  }
@@ -1,6 +1,6 @@
1
1
  // packages/edit-site/src/components/layout/index.js
2
2
  import clsx from "clsx";
3
- import { NavigableRegion } from "@wordpress/admin-ui";
3
+ import { NavigableRegion, getAdminThemeColors } from "@wordpress/admin-ui";
4
4
  import {
5
5
  __unstableMotion as motion,
6
6
  __unstableAnimatePresence as AnimatePresence,
@@ -14,13 +14,14 @@ import {
14
14
  usePrevious
15
15
  } from "@wordpress/compose";
16
16
  import { __, sprintf } from "@wordpress/i18n";
17
- import { useState, useRef, useEffect } from "@wordpress/element";
17
+ import { useState, useRef, useEffect, useMemo } from "@wordpress/element";
18
18
  import {
19
19
  UnsavedChangesWarning,
20
20
  ErrorBoundary,
21
21
  privateApis as editorPrivateApis
22
22
  } from "@wordpress/editor";
23
23
  import { privateApis as routerPrivateApis } from "@wordpress/router";
24
+ import { privateApis as themePrivateApis } from "@wordpress/theme";
24
25
  import { PluginArea } from "@wordpress/plugins";
25
26
  import { SnackbarNotices, store as noticesStore } from "@wordpress/notices";
26
27
  import { useDispatch, useSelect } from "@wordpress/data";
@@ -37,14 +38,17 @@ import SaveHub from "../save-hub/index.mjs";
37
38
  import SavePanel from "../save-panel/index.mjs";
38
39
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
39
40
  var { useLocation } = unlock(routerPrivateApis);
40
- var { useStyle } = unlock(editorPrivateApis);
41
+ var { useStyle, UploadProgressSnackbar } = unlock(editorPrivateApis);
42
+ var { ThemeProvider } = unlock(themePrivateApis);
41
43
  var ANIMATION_DURATION = 0.3;
44
+ var CONTENT_COLOR = { background: "#ffffff" };
42
45
  function Layout() {
43
46
  const { query, name: routeKey, areas, widths } = useLocation();
44
47
  const canvas = routeKey === "notfound" ? "view" : query?.canvas ?? "view";
45
48
  const hasAdminBarInEditor = window.__experimentalAdminBarInEditor;
46
49
  const showDesktopSiteHub = !hasAdminBarInEditor;
47
50
  const showMobileSiteHub = !hasAdminBarInEditor || routeKey !== "home";
51
+ const hasMobileAreas = areas.mobileSidebar || areas.mobileContent || areas.preview;
48
52
  const isMobileViewport = useViewportMatch("medium", "<");
49
53
  const toggleRef = useRef();
50
54
  const navigateRegionsProps = useNavigateRegions();
@@ -88,7 +92,7 @@ function Layout() {
88
92
  }
89
93
  ),
90
94
  children: /* @__PURE__ */ jsxs("div", { className: "edit-site-layout__content", children: [
91
- (!isMobileViewport || !areas.mobile) && /* @__PURE__ */ jsx(
95
+ (!isMobileViewport || !hasMobileAreas) && /* @__PURE__ */ jsx(
92
96
  NavigableRegion,
93
97
  {
94
98
  ariaLabel: __("Navigation"),
@@ -132,7 +136,8 @@ function Layout() {
132
136
  }
133
137
  ),
134
138
  /* @__PURE__ */ jsx(SnackbarNotices, { className: "edit-site-layout__snackbar" }),
135
- isMobileViewport && areas.mobile && /* @__PURE__ */ jsx("div", { className: "edit-site-layout__mobile", children: /* @__PURE__ */ jsx(SidebarNavigationProvider, { children: canvas !== "edit" ? /* @__PURE__ */ jsxs(Fragment, { children: [
139
+ /* @__PURE__ */ jsx(UploadProgressSnackbar, {}),
140
+ isMobileViewport && hasMobileAreas && /* @__PURE__ */ jsx("div", { className: "edit-site-layout__mobile", children: /* @__PURE__ */ jsx(SidebarNavigationProvider, { children: canvas !== "edit" ? /* @__PURE__ */ jsxs(Fragment, { children: [
136
141
  showMobileSiteHub && /* @__PURE__ */ jsx(
137
142
  SiteHubMobile,
138
143
  {
@@ -140,10 +145,16 @@ function Layout() {
140
145
  isTransparent: isResizableFrameOversized
141
146
  }
142
147
  ),
143
- /* @__PURE__ */ jsx(SidebarContent, { routeKey, children: /* @__PURE__ */ jsx(ErrorBoundary, { children: areas.mobile }) }),
148
+ /* @__PURE__ */ jsx(SidebarContent, { routeKey, children: areas.mobileContent ? /* @__PURE__ */ jsx(
149
+ ThemeProvider,
150
+ {
151
+ color: CONTENT_COLOR,
152
+ children: /* @__PURE__ */ jsx("div", { className: "edit-site-layout__mobile-content", children: /* @__PURE__ */ jsx(ErrorBoundary, { children: areas.mobileContent }) })
153
+ }
154
+ ) : /* @__PURE__ */ jsx(ErrorBoundary, { children: areas.mobileSidebar }) }),
144
155
  /* @__PURE__ */ jsx(SaveHub, {}),
145
156
  /* @__PURE__ */ jsx(SavePanel, {})
146
- ] }) : /* @__PURE__ */ jsx(ErrorBoundary, { children: areas.mobile }) }) }),
157
+ ] }) : /* @__PURE__ */ jsx(ThemeProvider, { color: CONTENT_COLOR, children: /* @__PURE__ */ jsx(ErrorBoundary, { children: areas.preview }) }) }) }),
147
158
  !isMobileViewport && areas.content && canvas !== "edit" && /* @__PURE__ */ jsx(
148
159
  "div",
149
160
  {
@@ -151,7 +162,7 @@ function Layout() {
151
162
  style: {
152
163
  maxWidth: widths?.content
153
164
  },
154
- children: /* @__PURE__ */ jsx(ErrorBoundary, { children: areas.content })
165
+ children: /* @__PURE__ */ jsx(ThemeProvider, { color: CONTENT_COLOR, children: /* @__PURE__ */ jsx(ErrorBoundary, { children: areas.content }) })
155
166
  }
156
167
  ),
157
168
  !isMobileViewport && areas.edit && canvas !== "edit" && /* @__PURE__ */ jsx(
@@ -161,7 +172,7 @@ function Layout() {
161
172
  style: {
162
173
  maxWidth: widths?.edit
163
174
  },
164
- children: /* @__PURE__ */ jsx(ErrorBoundary, { children: areas.edit })
175
+ children: /* @__PURE__ */ jsx(ThemeProvider, { color: CONTENT_COLOR, children: /* @__PURE__ */ jsx(ErrorBoundary, { children: areas.edit }) })
165
176
  }
166
177
  ),
167
178
  !isMobileViewport && areas.preview && /* @__PURE__ */ jsxs("div", { className: "edit-site-layout__canvas-container", children: [
@@ -190,7 +201,13 @@ function Layout() {
190
201
  innerContentStyle: {
191
202
  background: gradientValue ?? backgroundColor
192
203
  },
193
- children: areas.preview
204
+ children: /* @__PURE__ */ jsx(
205
+ ThemeProvider,
206
+ {
207
+ color: CONTENT_COLOR,
208
+ children: areas.preview
209
+ }
210
+ )
194
211
  }
195
212
  ) })
196
213
  }
@@ -202,6 +219,7 @@ function Layout() {
202
219
  ] });
203
220
  }
204
221
  function LayoutWithGlobalStylesProvider(props) {
222
+ const themeColors = useMemo(getAdminThemeColors, []);
205
223
  const { createErrorNotice } = useDispatch(noticesStore);
206
224
  function onPluginAreaError(name) {
207
225
  createErrorNotice(
@@ -216,7 +234,7 @@ function LayoutWithGlobalStylesProvider(props) {
216
234
  }
217
235
  return /* @__PURE__ */ jsx(SlotFillProvider, { children: /* @__PURE__ */ jsxs(Tooltip.Provider, { children: [
218
236
  /* @__PURE__ */ jsx(PluginArea, { onError: onPluginAreaError }),
219
- /* @__PURE__ */ jsx(Layout, { ...props })
237
+ /* @__PURE__ */ jsx(ThemeProvider, { color: themeColors, children: /* @__PURE__ */ jsx(Layout, { ...props }) })
220
238
  ] }) });
221
239
  }
222
240
  export {