@wordpress/edit-site 6.19.0 → 6.19.2

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 (128) hide show
  1. package/build/components/add-new-template/utils.js +1 -1
  2. package/build/components/add-new-template/utils.js.map +1 -1
  3. package/build/components/app/index.js +19 -2
  4. package/build/components/app/index.js.map +1 -1
  5. package/build/components/editor/site-preview.js +9 -8
  6. package/build/components/editor/site-preview.js.map +1 -1
  7. package/build/components/editor/use-editor-title.js +3 -2
  8. package/build/components/editor/use-editor-title.js.map +1 -1
  9. package/build/components/layout/index.js +23 -15
  10. package/build/components/layout/index.js.map +1 -1
  11. package/build/components/page-patterns/header.js +1 -1
  12. package/build/components/page-patterns/header.js.map +1 -1
  13. package/build/components/page-patterns/use-patterns.js +3 -2
  14. package/build/components/page-patterns/use-patterns.js.map +1 -1
  15. package/build/components/sidebar/index.js +17 -11
  16. package/build/components/sidebar/index.js.map +1 -1
  17. package/build/components/sidebar-navigation-screen-main/index.js +1 -1
  18. package/build/components/sidebar-navigation-screen-main/index.js.map +1 -1
  19. package/build/components/sidebar-navigation-screen-patterns/index.js +1 -0
  20. package/build/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
  21. package/build/components/sidebar-navigation-screen-patterns/use-template-part-areas.js +1 -1
  22. package/build/components/sidebar-navigation-screen-patterns/use-template-part-areas.js.map +1 -1
  23. package/build/components/sidebar-navigation-screen-unsupported/index.js +24 -0
  24. package/build/components/sidebar-navigation-screen-unsupported/index.js.map +1 -0
  25. package/build/components/site-editor-routes/home.js +22 -5
  26. package/build/components/site-editor-routes/home.js.map +1 -1
  27. package/build/components/site-editor-routes/navigation-item.js +21 -5
  28. package/build/components/site-editor-routes/navigation-item.js.map +1 -1
  29. package/build/components/site-editor-routes/navigation.js +21 -5
  30. package/build/components/site-editor-routes/navigation.js.map +1 -1
  31. package/build/components/site-editor-routes/page-item.js +25 -9
  32. package/build/components/site-editor-routes/page-item.js.map +1 -1
  33. package/build/components/site-editor-routes/pages.js +32 -11
  34. package/build/components/site-editor-routes/pages.js.map +1 -1
  35. package/build/components/site-editor-routes/pattern-item.js +10 -3
  36. package/build/components/site-editor-routes/pattern-item.js.map +1 -1
  37. package/build/components/site-editor-routes/patterns.js +23 -24
  38. package/build/components/site-editor-routes/patterns.js.map +1 -1
  39. package/build/components/site-editor-routes/stylebook.js +25 -11
  40. package/build/components/site-editor-routes/stylebook.js.map +1 -1
  41. package/build/components/site-editor-routes/template-item.js +21 -5
  42. package/build/components/site-editor-routes/template-item.js.map +1 -1
  43. package/build/components/site-editor-routes/templates.js +27 -6
  44. package/build/components/site-editor-routes/templates.js.map +1 -1
  45. package/build/components/site-editor-routes/utils.js +20 -0
  46. package/build/components/site-editor-routes/utils.js.map +1 -0
  47. package/build/components/site-hub/index.js +37 -15
  48. package/build/components/site-hub/index.js.map +1 -1
  49. package/build-module/components/add-new-template/utils.js +1 -1
  50. package/build-module/components/add-new-template/utils.js.map +1 -1
  51. package/build-module/components/app/index.js +20 -3
  52. package/build-module/components/app/index.js.map +1 -1
  53. package/build-module/components/editor/site-preview.js +9 -8
  54. package/build-module/components/editor/site-preview.js.map +1 -1
  55. package/build-module/components/editor/use-editor-title.js +3 -2
  56. package/build-module/components/editor/use-editor-title.js.map +1 -1
  57. package/build-module/components/layout/index.js +22 -14
  58. package/build-module/components/layout/index.js.map +1 -1
  59. package/build-module/components/page-patterns/header.js +1 -1
  60. package/build-module/components/page-patterns/header.js.map +1 -1
  61. package/build-module/components/page-patterns/use-patterns.js +3 -2
  62. package/build-module/components/page-patterns/use-patterns.js.map +1 -1
  63. package/build-module/components/sidebar/index.js +15 -10
  64. package/build-module/components/sidebar/index.js.map +1 -1
  65. package/build-module/components/sidebar-navigation-screen-main/index.js +1 -1
  66. package/build-module/components/sidebar-navigation-screen-main/index.js.map +1 -1
  67. package/build-module/components/sidebar-navigation-screen-patterns/index.js +1 -0
  68. package/build-module/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
  69. package/build-module/components/sidebar-navigation-screen-patterns/use-template-part-areas.js +1 -1
  70. package/build-module/components/sidebar-navigation-screen-patterns/use-template-part-areas.js.map +1 -1
  71. package/build-module/components/sidebar-navigation-screen-unsupported/index.js +17 -0
  72. package/build-module/components/sidebar-navigation-screen-unsupported/index.js.map +1 -0
  73. package/build-module/components/site-editor-routes/home.js +22 -5
  74. package/build-module/components/site-editor-routes/home.js.map +1 -1
  75. package/build-module/components/site-editor-routes/navigation-item.js +21 -5
  76. package/build-module/components/site-editor-routes/navigation-item.js.map +1 -1
  77. package/build-module/components/site-editor-routes/navigation.js +21 -5
  78. package/build-module/components/site-editor-routes/navigation.js.map +1 -1
  79. package/build-module/components/site-editor-routes/page-item.js +25 -9
  80. package/build-module/components/site-editor-routes/page-item.js.map +1 -1
  81. package/build-module/components/site-editor-routes/pages.js +32 -11
  82. package/build-module/components/site-editor-routes/pages.js.map +1 -1
  83. package/build-module/components/site-editor-routes/pattern-item.js +10 -3
  84. package/build-module/components/site-editor-routes/pattern-item.js.map +1 -1
  85. package/build-module/components/site-editor-routes/patterns.js +23 -24
  86. package/build-module/components/site-editor-routes/patterns.js.map +1 -1
  87. package/build-module/components/site-editor-routes/stylebook.js +25 -11
  88. package/build-module/components/site-editor-routes/stylebook.js.map +1 -1
  89. package/build-module/components/site-editor-routes/template-item.js +21 -5
  90. package/build-module/components/site-editor-routes/template-item.js.map +1 -1
  91. package/build-module/components/site-editor-routes/templates.js +27 -6
  92. package/build-module/components/site-editor-routes/templates.js.map +1 -1
  93. package/build-module/components/site-editor-routes/utils.js +14 -0
  94. package/build-module/components/site-editor-routes/utils.js.map +1 -0
  95. package/build-module/components/site-hub/index.js +37 -15
  96. package/build-module/components/site-hub/index.js.map +1 -1
  97. package/build-style/posts-rtl.css +7 -10
  98. package/build-style/posts.css +7 -10
  99. package/build-style/style-rtl.css +7 -10
  100. package/build-style/style.css +7 -10
  101. package/package.json +42 -42
  102. package/src/components/add-new-template/utils.js +1 -2
  103. package/src/components/app/index.js +18 -3
  104. package/src/components/editor/site-preview.js +9 -14
  105. package/src/components/editor/use-editor-title.js +6 -6
  106. package/src/components/layout/index.js +36 -22
  107. package/src/components/layout/style.scss +2 -0
  108. package/src/components/page/style.scss +1 -5
  109. package/src/components/page-patterns/header.js +1 -1
  110. package/src/components/page-patterns/use-patterns.js +7 -7
  111. package/src/components/sidebar/index.js +15 -13
  112. package/src/components/sidebar-navigation-screen-main/index.js +1 -1
  113. package/src/components/sidebar-navigation-screen-patterns/index.js +1 -0
  114. package/src/components/sidebar-navigation-screen-patterns/use-template-part-areas.js +1 -1
  115. package/src/components/sidebar-navigation-screen-unsupported/index.js +17 -0
  116. package/src/components/site-editor-routes/home.js +27 -3
  117. package/src/components/site-editor-routes/navigation-item.js +25 -5
  118. package/src/components/site-editor-routes/navigation.js +21 -3
  119. package/src/components/site-editor-routes/page-item.js +29 -9
  120. package/src/components/site-editor-routes/pages.js +30 -10
  121. package/src/components/site-editor-routes/pattern-item.js +9 -1
  122. package/src/components/site-editor-routes/patterns.js +22 -21
  123. package/src/components/site-editor-routes/stylebook.js +25 -11
  124. package/src/components/site-editor-routes/template-item.js +25 -3
  125. package/src/components/site-editor-routes/templates.js +26 -4
  126. package/src/components/site-editor-routes/utils.js +14 -0
  127. package/src/components/site-hub/index.js +49 -16
  128. package/tsconfig.tsbuildinfo +1 -1
@@ -123,25 +123,56 @@ export const SiteHubMobile = memo(forwardRef(({
123
123
  const {
124
124
  dashboardLink,
125
125
  homeUrl,
126
- siteTitle
126
+ siteTitle,
127
+ isBlockTheme,
128
+ isClassicThemeWithStyleBookSupport
127
129
  } = useSelect(select => {
128
130
  const {
129
131
  getSettings
130
132
  } = unlock(select(editSiteStore));
131
133
  const {
132
- getEntityRecord
134
+ getEntityRecord,
135
+ getCurrentTheme
133
136
  } = select(coreStore);
134
137
  const _site = getEntityRecord('root', 'site');
138
+ const currentTheme = getCurrentTheme();
139
+ const settings = getSettings();
140
+ const supportsEditorStyles = currentTheme.theme_supports['editor-styles'];
141
+ // This is a temp solution until the has_theme_json value is available for the current theme.
142
+ const hasThemeJson = settings.supportsLayout;
135
143
  return {
136
- dashboardLink: getSettings().__experimentalDashboardLink,
144
+ dashboardLink: settings.__experimentalDashboardLink,
137
145
  homeUrl: getEntityRecord('root', '__unstableBase')?.home,
138
- siteTitle: !_site?.title && !!_site?.url ? filterURLForDisplay(_site?.url) : _site?.title
146
+ siteTitle: !_site?.title && !!_site?.url ? filterURLForDisplay(_site?.url) : _site?.title,
147
+ isBlockTheme: currentTheme?.is_block_theme,
148
+ isClassicThemeWithStyleBookSupport: !currentTheme?.is_block_theme && (supportsEditorStyles || hasThemeJson)
139
149
  };
140
150
  }, []);
141
151
  const {
142
152
  open: openCommandCenter
143
153
  } = useDispatch(commandsStore);
144
- const isRoot = path === '/';
154
+ let backPath;
155
+
156
+ // If the current path is not the root page, find a page to back to.
157
+ if (path !== '/') {
158
+ if (isBlockTheme || isClassicThemeWithStyleBookSupport) {
159
+ // If the current theme is a block theme or a classic theme that supports StyleBook,
160
+ // back to the Design screen.
161
+ backPath = '/';
162
+ } else if (path !== '/pattern') {
163
+ // If the current theme is a classic theme that does not support StyleBook,
164
+ // back to the Patterns page.
165
+ backPath = '/pattern';
166
+ }
167
+ }
168
+ const backButtonProps = {
169
+ href: !!backPath ? undefined : dashboardLink,
170
+ label: !!backPath ? __('Go to Site Editor') : __('Go to the Dashboard'),
171
+ onClick: !!backPath ? () => {
172
+ history.navigate(backPath);
173
+ navigate('back');
174
+ } : undefined
175
+ };
145
176
  return /*#__PURE__*/_jsx("div", {
146
177
  className: "edit-site-site-hub",
147
178
  children: /*#__PURE__*/_jsxs(HStack, {
@@ -159,16 +190,7 @@ export const SiteHubMobile = memo(forwardRef(({
159
190
  transform: 'scale(0.5)',
160
191
  borderRadius: 4
161
192
  },
162
- ...(isRoot ? {
163
- href: dashboardLink,
164
- label: __('Go to the Dashboard')
165
- } : {
166
- onClick: () => {
167
- history.navigate('/');
168
- navigate('back');
169
- },
170
- label: __('Go to Site Editor')
171
- }),
193
+ ...backButtonProps,
172
194
  children: /*#__PURE__*/_jsx(SiteIcon, {
173
195
  className: "edit-site-layout__view-mode-toggle-icon"
174
196
  })
@@ -1 +1 @@
1
- {"version":3,"names":["clsx","useSelect","useDispatch","Button","__experimentalHStack","HStack","VisuallyHidden","__","store","coreStore","decodeEntities","memo","forwardRef","useContext","search","commandsStore","displayShortcut","filterURLForDisplay","privateApis","routerPrivateApis","editSiteStore","SiteIcon","unlock","SidebarNavigationContext","jsx","_jsx","jsxs","_jsxs","useLocation","useHistory","SiteHub","isTransparent","ref","dashboardLink","homeUrl","siteTitle","select","getSettings","getEntityRecord","_site","__experimentalDashboardLink","home","title","url","open","openCommandCenter","className","children","justify","spacing","__next40pxDefaultSize","href","label","style","transform","borderRadius","variant","target","as","expanded","size","icon","onClick","shortcut","primary","SiteHubMobile","path","history","navigate","isRoot"],"sources":["@wordpress/edit-site/src/components/site-hub/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tButton,\n\t__experimentalHStack as HStack,\n\tVisuallyHidden,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { memo, forwardRef, useContext } from '@wordpress/element';\nimport { search } from '@wordpress/icons';\nimport { store as commandsStore } from '@wordpress/commands';\nimport { displayShortcut } from '@wordpress/keycodes';\nimport { filterURLForDisplay } from '@wordpress/url';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\nimport SiteIcon from '../site-icon';\nimport { unlock } from '../../lock-unlock';\nimport { SidebarNavigationContext } from '../sidebar';\nconst { useLocation, useHistory } = unlock( routerPrivateApis );\n\nconst SiteHub = memo(\n\tforwardRef( ( { isTransparent }, ref ) => {\n\t\tconst { dashboardLink, homeUrl, siteTitle } = useSelect( ( select ) => {\n\t\t\tconst { getSettings } = unlock( select( editSiteStore ) );\n\n\t\t\tconst { getEntityRecord } = select( coreStore );\n\t\t\tconst _site = getEntityRecord( 'root', 'site' );\n\t\t\treturn {\n\t\t\t\tdashboardLink: getSettings().__experimentalDashboardLink,\n\t\t\t\thomeUrl: getEntityRecord( 'root', '__unstableBase' )?.home,\n\t\t\t\tsiteTitle:\n\t\t\t\t\t! _site?.title && !! _site?.url\n\t\t\t\t\t\t? filterURLForDisplay( _site?.url )\n\t\t\t\t\t\t: _site?.title,\n\t\t\t};\n\t\t}, [] );\n\t\tconst { open: openCommandCenter } = useDispatch( commandsStore );\n\n\t\treturn (\n\t\t\t<div className=\"edit-site-site-hub\">\n\t\t\t\t<HStack justify=\"flex-start\" spacing=\"0\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t'edit-site-site-hub__view-mode-toggle-container',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'has-transparent-background': isTransparent,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t) }\n\t\t\t\t\t>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tref={ ref }\n\t\t\t\t\t\t\thref={ dashboardLink }\n\t\t\t\t\t\t\tlabel={ __( 'Go to the Dashboard' ) }\n\t\t\t\t\t\t\tclassName=\"edit-site-layout__view-mode-toggle\"\n\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\ttransform: 'scale(0.5333) translateX(-4px)', // Offset to position the icon 12px from viewport edge\n\t\t\t\t\t\t\t\tborderRadius: 4,\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<SiteIcon className=\"edit-site-layout__view-mode-toggle-icon\" />\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<HStack>\n\t\t\t\t\t\t<div className=\"edit-site-site-hub__title\">\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\tvariant=\"link\"\n\t\t\t\t\t\t\t\thref={ homeUrl }\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ decodeEntities( siteTitle ) }\n\t\t\t\t\t\t\t\t<VisuallyHidden as=\"span\">\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t/* translators: accessibility text */\n\t\t\t\t\t\t\t\t\t\t__( '(opens in a new tab)' )\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<HStack\n\t\t\t\t\t\t\tspacing={ 0 }\n\t\t\t\t\t\t\texpanded={ false }\n\t\t\t\t\t\t\tclassName=\"edit-site-site-hub__actions\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\t\tclassName=\"edit-site-site-hub_toggle-command-center\"\n\t\t\t\t\t\t\t\ticon={ search }\n\t\t\t\t\t\t\t\tonClick={ () => openCommandCenter() }\n\t\t\t\t\t\t\t\tlabel={ __( 'Open command palette' ) }\n\t\t\t\t\t\t\t\tshortcut={ displayShortcut.primary( 'k' ) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</HStack>\n\t\t\t\t\t</HStack>\n\t\t\t\t</HStack>\n\t\t\t</div>\n\t\t);\n\t} )\n);\n\nexport default SiteHub;\n\nexport const SiteHubMobile = memo(\n\tforwardRef( ( { isTransparent }, ref ) => {\n\t\tconst { path } = useLocation();\n\t\tconst history = useHistory();\n\t\tconst { navigate } = useContext( SidebarNavigationContext );\n\n\t\tconst { dashboardLink, homeUrl, siteTitle } = useSelect( ( select ) => {\n\t\t\tconst { getSettings } = unlock( select( editSiteStore ) );\n\t\t\tconst { getEntityRecord } = select( coreStore );\n\t\t\tconst _site = getEntityRecord( 'root', 'site' );\n\t\t\treturn {\n\t\t\t\tdashboardLink: getSettings().__experimentalDashboardLink,\n\t\t\t\thomeUrl: getEntityRecord( 'root', '__unstableBase' )?.home,\n\t\t\t\tsiteTitle:\n\t\t\t\t\t! _site?.title && !! _site?.url\n\t\t\t\t\t\t? filterURLForDisplay( _site?.url )\n\t\t\t\t\t\t: _site?.title,\n\t\t\t};\n\t\t}, [] );\n\t\tconst { open: openCommandCenter } = useDispatch( commandsStore );\n\t\tconst isRoot = path === '/';\n\n\t\treturn (\n\t\t\t<div className=\"edit-site-site-hub\">\n\t\t\t\t<HStack justify=\"flex-start\" spacing=\"0\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t'edit-site-site-hub__view-mode-toggle-container',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'has-transparent-background': isTransparent,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t) }\n\t\t\t\t\t>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tref={ ref }\n\t\t\t\t\t\t\tclassName=\"edit-site-layout__view-mode-toggle\"\n\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\ttransform: 'scale(0.5)',\n\t\t\t\t\t\t\t\tborderRadius: 4,\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t{ ...( isRoot\n\t\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\t\thref: dashboardLink,\n\t\t\t\t\t\t\t\t\t\tlabel: __( 'Go to the Dashboard' ),\n\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\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\t\t\t\thistory.navigate( '/' );\n\t\t\t\t\t\t\t\t\t\t\tnavigate( 'back' );\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\tlabel: __( 'Go to Site Editor' ),\n\t\t\t\t\t\t\t\t } ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<SiteIcon className=\"edit-site-layout__view-mode-toggle-icon\" />\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<HStack>\n\t\t\t\t\t\t<div className=\"edit-site-site-hub__title\">\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\tvariant=\"link\"\n\t\t\t\t\t\t\t\thref={ homeUrl }\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\tlabel={ __( 'View site (opens in a new tab)' ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ decodeEntities( siteTitle ) }\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<HStack\n\t\t\t\t\t\t\tspacing={ 0 }\n\t\t\t\t\t\t\texpanded={ false }\n\t\t\t\t\t\t\tclassName=\"edit-site-site-hub__actions\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\tclassName=\"edit-site-site-hub_toggle-command-center\"\n\t\t\t\t\t\t\t\ticon={ search }\n\t\t\t\t\t\t\t\tonClick={ () => openCommandCenter() }\n\t\t\t\t\t\t\t\tlabel={ __( 'Open command palette' ) }\n\t\t\t\t\t\t\t\tshortcut={ displayShortcut.primary( 'k' ) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</HStack>\n\t\t\t\t\t</HStack>\n\t\t\t\t</HStack>\n\t\t\t</div>\n\t\t);\n\t} )\n);\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AAC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mBAAoB;UAC/B,CAAC;UAAAwC,QAAA,eAEJtB,IAAA,CAACJ,QAAQ;YAACyB,SAAS,EAAC;UAAyC,CAAE;QAAC,CACzD;MAAC,CACL,CAAC,eAENnB,KAAA,CAACtB,MAAM;QAAA0C,QAAA,gBACNtB,IAAA;UAAKqB,SAAS,EAAC,2BAA2B;UAAAC,QAAA,eACzCtB,IAAA,CAACtB,MAAM;YACN+C,qBAAqB;YACrBM,OAAO,EAAC,MAAM;YACdL,IAAI,EAAGjB,OAAS;YAChBuB,MAAM,EAAC,QAAQ;YACfL,KAAK,EAAG7C,EAAE,CAAE,gCAAiC,CAAG;YAAAwC,QAAA,EAE9CrC,cAAc,CAAEyB,SAAU;UAAC,CACtB;QAAC,CACL,CAAC,eACNV,IAAA,CAACpB,MAAM;UACN4C,OAAO,EAAG,CAAG;UACbU,QAAQ,EAAG,KAAO;UAClBb,SAAS,EAAC,6BAA6B;UAAAC,QAAA,eAEvCtB,IAAA,CAACtB,MAAM;YACN+C,qBAAqB;YACrBJ,SAAS,EAAC,0CAA0C;YACpDe,IAAI,EAAG/C,MAAQ;YACfgD,OAAO,EAAGA,CAAA,KAAMjB,iBAAiB,CAAC,CAAG;YACrCO,KAAK,EAAG7C,EAAE,CAAE,sBAAuB,CAAG;YACtCwD,QAAQ,EAAG/C,eAAe,CAACgD,OAAO,CAAE,GAAI;UAAG,CAC3C;QAAC,CACK,CAAC;MAAA,CACF,CAAC;IAAA,CACF;EAAC,CACL,CAAC;AAER,CAAE,CACH,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["clsx","useSelect","useDispatch","Button","__experimentalHStack","HStack","VisuallyHidden","__","store","coreStore","decodeEntities","memo","forwardRef","useContext","search","commandsStore","displayShortcut","filterURLForDisplay","privateApis","routerPrivateApis","editSiteStore","SiteIcon","unlock","SidebarNavigationContext","jsx","_jsx","jsxs","_jsxs","useLocation","useHistory","SiteHub","isTransparent","ref","dashboardLink","homeUrl","siteTitle","select","getSettings","getEntityRecord","_site","__experimentalDashboardLink","home","title","url","open","openCommandCenter","className","children","justify","spacing","__next40pxDefaultSize","href","label","style","transform","borderRadius","variant","target","as","expanded","size","icon","onClick","shortcut","primary","SiteHubMobile","path","history","navigate","isBlockTheme","isClassicThemeWithStyleBookSupport","getCurrentTheme","currentTheme","settings","supportsEditorStyles","theme_supports","hasThemeJson","supportsLayout","is_block_theme","backPath","backButtonProps","undefined"],"sources":["@wordpress/edit-site/src/components/site-hub/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tButton,\n\t__experimentalHStack as HStack,\n\tVisuallyHidden,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { memo, forwardRef, useContext } from '@wordpress/element';\nimport { search } from '@wordpress/icons';\nimport { store as commandsStore } from '@wordpress/commands';\nimport { displayShortcut } from '@wordpress/keycodes';\nimport { filterURLForDisplay } from '@wordpress/url';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\nimport SiteIcon from '../site-icon';\nimport { unlock } from '../../lock-unlock';\nimport { SidebarNavigationContext } from '../sidebar';\nconst { useLocation, useHistory } = unlock( routerPrivateApis );\n\nconst SiteHub = memo(\n\tforwardRef( ( { isTransparent }, ref ) => {\n\t\tconst { dashboardLink, homeUrl, siteTitle } = useSelect( ( select ) => {\n\t\t\tconst { getSettings } = unlock( select( editSiteStore ) );\n\n\t\t\tconst { getEntityRecord } = select( coreStore );\n\t\t\tconst _site = getEntityRecord( 'root', 'site' );\n\t\t\treturn {\n\t\t\t\tdashboardLink: getSettings().__experimentalDashboardLink,\n\t\t\t\thomeUrl: getEntityRecord( 'root', '__unstableBase' )?.home,\n\t\t\t\tsiteTitle:\n\t\t\t\t\t! _site?.title && !! _site?.url\n\t\t\t\t\t\t? filterURLForDisplay( _site?.url )\n\t\t\t\t\t\t: _site?.title,\n\t\t\t};\n\t\t}, [] );\n\t\tconst { open: openCommandCenter } = useDispatch( commandsStore );\n\n\t\treturn (\n\t\t\t<div className=\"edit-site-site-hub\">\n\t\t\t\t<HStack justify=\"flex-start\" spacing=\"0\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t'edit-site-site-hub__view-mode-toggle-container',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'has-transparent-background': isTransparent,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t) }\n\t\t\t\t\t>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tref={ ref }\n\t\t\t\t\t\t\thref={ dashboardLink }\n\t\t\t\t\t\t\tlabel={ __( 'Go to the Dashboard' ) }\n\t\t\t\t\t\t\tclassName=\"edit-site-layout__view-mode-toggle\"\n\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\ttransform: 'scale(0.5333) translateX(-4px)', // Offset to position the icon 12px from viewport edge\n\t\t\t\t\t\t\t\tborderRadius: 4,\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<SiteIcon className=\"edit-site-layout__view-mode-toggle-icon\" />\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<HStack>\n\t\t\t\t\t\t<div className=\"edit-site-site-hub__title\">\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\tvariant=\"link\"\n\t\t\t\t\t\t\t\thref={ homeUrl }\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ decodeEntities( siteTitle ) }\n\t\t\t\t\t\t\t\t<VisuallyHidden as=\"span\">\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t/* translators: accessibility text */\n\t\t\t\t\t\t\t\t\t\t__( '(opens in a new tab)' )\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<HStack\n\t\t\t\t\t\t\tspacing={ 0 }\n\t\t\t\t\t\t\texpanded={ false }\n\t\t\t\t\t\t\tclassName=\"edit-site-site-hub__actions\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\t\tclassName=\"edit-site-site-hub_toggle-command-center\"\n\t\t\t\t\t\t\t\ticon={ search }\n\t\t\t\t\t\t\t\tonClick={ () => openCommandCenter() }\n\t\t\t\t\t\t\t\tlabel={ __( 'Open command palette' ) }\n\t\t\t\t\t\t\t\tshortcut={ displayShortcut.primary( 'k' ) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</HStack>\n\t\t\t\t\t</HStack>\n\t\t\t\t</HStack>\n\t\t\t</div>\n\t\t);\n\t} )\n);\n\nexport default SiteHub;\n\nexport const SiteHubMobile = memo(\n\tforwardRef( ( { isTransparent }, ref ) => {\n\t\tconst { path } = useLocation();\n\t\tconst history = useHistory();\n\t\tconst { navigate } = useContext( SidebarNavigationContext );\n\n\t\tconst {\n\t\t\tdashboardLink,\n\t\t\thomeUrl,\n\t\t\tsiteTitle,\n\t\t\tisBlockTheme,\n\t\t\tisClassicThemeWithStyleBookSupport,\n\t\t} = useSelect( ( select ) => {\n\t\t\tconst { getSettings } = unlock( select( editSiteStore ) );\n\t\t\tconst { getEntityRecord, getCurrentTheme } = select( coreStore );\n\t\t\tconst _site = getEntityRecord( 'root', 'site' );\n\t\t\tconst currentTheme = getCurrentTheme();\n\t\t\tconst settings = getSettings();\n\t\t\tconst supportsEditorStyles =\n\t\t\t\tcurrentTheme.theme_supports[ 'editor-styles' ];\n\t\t\t// This is a temp solution until the has_theme_json value is available for the current theme.\n\t\t\tconst hasThemeJson = settings.supportsLayout;\n\n\t\t\treturn {\n\t\t\t\tdashboardLink: settings.__experimentalDashboardLink,\n\t\t\t\thomeUrl: getEntityRecord( 'root', '__unstableBase' )?.home,\n\t\t\t\tsiteTitle:\n\t\t\t\t\t! _site?.title && !! _site?.url\n\t\t\t\t\t\t? filterURLForDisplay( _site?.url )\n\t\t\t\t\t\t: _site?.title,\n\t\t\t\tisBlockTheme: currentTheme?.is_block_theme,\n\t\t\t\tisClassicThemeWithStyleBookSupport:\n\t\t\t\t\t! currentTheme?.is_block_theme &&\n\t\t\t\t\t( supportsEditorStyles || hasThemeJson ),\n\t\t\t};\n\t\t}, [] );\n\t\tconst { open: openCommandCenter } = useDispatch( commandsStore );\n\n\t\tlet backPath;\n\n\t\t// If the current path is not the root page, find a page to back to.\n\t\tif ( path !== '/' ) {\n\t\t\tif ( isBlockTheme || isClassicThemeWithStyleBookSupport ) {\n\t\t\t\t// If the current theme is a block theme or a classic theme that supports StyleBook,\n\t\t\t\t// back to the Design screen.\n\t\t\t\tbackPath = '/';\n\t\t\t} else if ( path !== '/pattern' ) {\n\t\t\t\t// If the current theme is a classic theme that does not support StyleBook,\n\t\t\t\t// back to the Patterns page.\n\t\t\t\tbackPath = '/pattern';\n\t\t\t}\n\t\t}\n\n\t\tconst backButtonProps = {\n\t\t\thref: !! backPath ? undefined : dashboardLink,\n\t\t\tlabel: !! backPath\n\t\t\t\t? __( 'Go to Site Editor' )\n\t\t\t\t: __( 'Go to the Dashboard' ),\n\t\t\tonClick: !! backPath\n\t\t\t\t? () => {\n\t\t\t\t\t\thistory.navigate( backPath );\n\t\t\t\t\t\tnavigate( 'back' );\n\t\t\t\t }\n\t\t\t\t: undefined,\n\t\t};\n\n\t\treturn (\n\t\t\t<div className=\"edit-site-site-hub\">\n\t\t\t\t<HStack justify=\"flex-start\" spacing=\"0\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t'edit-site-site-hub__view-mode-toggle-container',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'has-transparent-background': isTransparent,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t) }\n\t\t\t\t\t>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tref={ ref }\n\t\t\t\t\t\t\tclassName=\"edit-site-layout__view-mode-toggle\"\n\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\ttransform: 'scale(0.5)',\n\t\t\t\t\t\t\t\tborderRadius: 4,\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t{ ...backButtonProps }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<SiteIcon className=\"edit-site-layout__view-mode-toggle-icon\" />\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<HStack>\n\t\t\t\t\t\t<div className=\"edit-site-site-hub__title\">\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\tvariant=\"link\"\n\t\t\t\t\t\t\t\thref={ homeUrl }\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\tlabel={ __( 'View site (opens in a new tab)' ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ decodeEntities( siteTitle ) }\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<HStack\n\t\t\t\t\t\t\tspacing={ 0 }\n\t\t\t\t\t\t\texpanded={ false }\n\t\t\t\t\t\t\tclassName=\"edit-site-site-hub__actions\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\tclassName=\"edit-site-site-hub_toggle-command-center\"\n\t\t\t\t\t\t\t\ticon={ search }\n\t\t\t\t\t\t\t\tonClick={ () => openCommandCenter() }\n\t\t\t\t\t\t\t\tlabel={ __( 'Open command palette' ) }\n\t\t\t\t\t\t\t\tshortcut={ displayShortcut.primary( 'k' ) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</HStack>\n\t\t\t\t\t</HStack>\n\t\t\t\t</HStack>\n\t\t\t</div>\n\t\t);\n\t} )\n);\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SACCC,MAAM,EACNC,oBAAoB,IAAIC,MAAM,EAC9BC,cAAc,QACR,uBAAuB;AAC9B,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;AACzD,SAASC,cAAc,QAAQ,0BAA0B;AACzD,SAASC,IAAI,EAAEC,UAAU,EAAEC,UAAU,QAAQ,oBAAoB;AACjE,SAASC,MAAM,QAAQ,kBAAkB;AACzC,SAASN,KAAK,IAAIO,aAAa,QAAQ,qBAAqB;AAC5D,SAASC,eAAe,QAAQ,qBAAqB;AACrD,SAASC,mBAAmB,QAAQ,gBAAgB;AACpD,SAASC,WAAW,IAAIC,iBAAiB,QAAQ,mBAAmB;;AAEpE;AACA;AACA;AACA,SAASX,KAAK,IAAIY,aAAa,QAAQ,aAAa;AACpD,OAAOC,QAAQ,MAAM,cAAc;AACnC,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,SAASC,wBAAwB,QAAQ,YAAY;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AACtD,MAAM;EAAEC,WAAW;EAAEC;AAAW,CAAC,GAAGP,MAAM,CAAEH,iBAAkB,CAAC;AAE/D,MAAMW,OAAO,GAAGnB,IAAI,CACnBC,UAAU,CAAE,CAAE;EAAEmB;AAAc,CAAC,EAAEC,GAAG,KAAM;EACzC,MAA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,CAACtB,MAAM;YACN+C,qBAAqB;YACrBM,OAAO,EAAC,MAAM;YACdL,IAAI,EAAGjB,OAAS;YAChBuB,MAAM,EAAC,QAAQ;YACfL,KAAK,EAAG7C,EAAE,CAAE,gCAAiC,CAAG;YAAAwC,QAAA,EAE9CrC,cAAc,CAAEyB,SAAU;UAAC,CACtB;QAAC,CACL,CAAC,eACNV,IAAA,CAACpB,MAAM;UACN4C,OAAO,EAAG,CAAG;UACbU,QAAQ,EAAG,KAAO;UAClBb,SAAS,EAAC,6BAA6B;UAAAC,QAAA,eAEvCtB,IAAA,CAACtB,MAAM;YACN+C,qBAAqB;YACrBJ,SAAS,EAAC,0CAA0C;YACpDe,IAAI,EAAG/C,MAAQ;YACfgD,OAAO,EAAGA,CAAA,KAAMjB,iBAAiB,CAAC,CAAG;YACrCO,KAAK,EAAG7C,EAAE,CAAE,sBAAuB,CAAG;YACtCwD,QAAQ,EAAG/C,eAAe,CAACgD,OAAO,CAAE,GAAI;UAAG,CAC3C;QAAC,CACK,CAAC;MAAA,CACF,CAAC;IAAA,CACF;EAAC,CACL,CAAC;AAER,CAAE,CACH,CAAC","ignoreList":[]}
@@ -1289,6 +1289,8 @@ div.dataviews-view-list {
1289
1289
  position: relative;
1290
1290
  width: 100%;
1291
1291
  z-index: 2;
1292
+ display: flex;
1293
+ flex-direction: column;
1292
1294
  /*
1293
1295
  * The SiteHubMobile component is displayed
1294
1296
  * for pages that do not have a sidebar,
@@ -1493,7 +1495,7 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
1493
1495
  .edit-site-page {
1494
1496
  color: #2f2f2f;
1495
1497
  background: #fff;
1496
- height: calc(100% - 60px);
1498
+ height: 100%;
1497
1499
  /* stylelint-disable-next-line property-no-unknown -- '@container' not globally permitted */
1498
1500
  container: edit-site-page/inline-size;
1499
1501
  }
@@ -1502,11 +1504,6 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
1502
1504
  transition: width ease-out 0.2s;
1503
1505
  }
1504
1506
  }
1505
- @media (min-width: 782px) {
1506
- .edit-site-page {
1507
- height: 100%;
1508
- }
1509
- }
1510
1507
 
1511
1508
  .edit-site-page-header {
1512
1509
  padding: 16px 48px;
@@ -1585,7 +1582,7 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
1585
1582
  contain: content;
1586
1583
  }
1587
1584
 
1588
- @keyframes _gddau_slide-from-right {
1585
+ @keyframes _fwjws_slide-from-right {
1589
1586
  from {
1590
1587
  transform: translateX(-50px);
1591
1588
  opacity: 0;
@@ -1595,7 +1592,7 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
1595
1592
  opacity: 1;
1596
1593
  }
1597
1594
  }
1598
- @keyframes _gddau_slide-from-left {
1595
+ @keyframes _fwjws_slide-from-left {
1599
1596
  from {
1600
1597
  transform: translateX(50px);
1601
1598
  opacity: 0;
@@ -1651,10 +1648,10 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
1651
1648
  }
1652
1649
  }
1653
1650
  .edit-site-sidebar__screen-wrapper.slide-from-left {
1654
- animation-name: _gddau_slide-from-left;
1651
+ animation-name: _fwjws_slide-from-left;
1655
1652
  }
1656
1653
  .edit-site-sidebar__screen-wrapper.slide-from-right {
1657
- animation-name: _gddau_slide-from-right;
1654
+ animation-name: _fwjws_slide-from-right;
1658
1655
  }
1659
1656
 
1660
1657
  .edit-site-site-hub {
@@ -1289,6 +1289,8 @@ div.dataviews-view-list {
1289
1289
  position: relative;
1290
1290
  width: 100%;
1291
1291
  z-index: 2;
1292
+ display: flex;
1293
+ flex-direction: column;
1292
1294
  /*
1293
1295
  * The SiteHubMobile component is displayed
1294
1296
  * for pages that do not have a sidebar,
@@ -1493,7 +1495,7 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
1493
1495
  .edit-site-page {
1494
1496
  color: #2f2f2f;
1495
1497
  background: #fff;
1496
- height: calc(100% - 60px);
1498
+ height: 100%;
1497
1499
  /* stylelint-disable-next-line property-no-unknown -- '@container' not globally permitted */
1498
1500
  container: edit-site-page/inline-size;
1499
1501
  }
@@ -1502,11 +1504,6 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
1502
1504
  transition: width ease-out 0.2s;
1503
1505
  }
1504
1506
  }
1505
- @media (min-width: 782px) {
1506
- .edit-site-page {
1507
- height: 100%;
1508
- }
1509
- }
1510
1507
 
1511
1508
  .edit-site-page-header {
1512
1509
  padding: 16px 48px;
@@ -1585,7 +1582,7 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
1585
1582
  contain: content;
1586
1583
  }
1587
1584
 
1588
- @keyframes _gddau_slide-from-right {
1585
+ @keyframes _fwjws_slide-from-right {
1589
1586
  from {
1590
1587
  transform: translateX(50px);
1591
1588
  opacity: 0;
@@ -1595,7 +1592,7 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
1595
1592
  opacity: 1;
1596
1593
  }
1597
1594
  }
1598
- @keyframes _gddau_slide-from-left {
1595
+ @keyframes _fwjws_slide-from-left {
1599
1596
  from {
1600
1597
  transform: translateX(-50px);
1601
1598
  opacity: 0;
@@ -1651,10 +1648,10 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
1651
1648
  }
1652
1649
  }
1653
1650
  .edit-site-sidebar__screen-wrapper.slide-from-left {
1654
- animation-name: _gddau_slide-from-left;
1651
+ animation-name: _fwjws_slide-from-left;
1655
1652
  }
1656
1653
  .edit-site-sidebar__screen-wrapper.slide-from-right {
1657
- animation-name: _gddau_slide-from-right;
1654
+ animation-name: _fwjws_slide-from-right;
1658
1655
  }
1659
1656
 
1660
1657
  .edit-site-site-hub {
@@ -2114,7 +2114,7 @@ fieldset.fields-controls__featured-image .fields-controls__featured-image-remove
2114
2114
  .edit-site-page {
2115
2115
  color: #2f2f2f;
2116
2116
  background: #fff;
2117
- height: calc(100% - 60px);
2117
+ height: 100%;
2118
2118
  /* stylelint-disable-next-line property-no-unknown -- '@container' not globally permitted */
2119
2119
  container: edit-site-page/inline-size;
2120
2120
  }
@@ -2123,11 +2123,6 @@ fieldset.fields-controls__featured-image .fields-controls__featured-image-remove
2123
2123
  transition: width ease-out 0.2s;
2124
2124
  }
2125
2125
  }
2126
- @media (min-width: 782px) {
2127
- .edit-site-page {
2128
- height: 100%;
2129
- }
2130
- }
2131
2126
 
2132
2127
  .edit-site-page-header {
2133
2128
  padding: 16px 48px;
@@ -2533,6 +2528,8 @@ fieldset.fields-controls__featured-image .fields-controls__featured-image-remove
2533
2528
  position: relative;
2534
2529
  width: 100%;
2535
2530
  z-index: 2;
2531
+ display: flex;
2532
+ flex-direction: column;
2536
2533
  /*
2537
2534
  * The SiteHubMobile component is displayed
2538
2535
  * for pages that do not have a sidebar,
@@ -2770,7 +2767,7 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
2770
2767
  contain: content;
2771
2768
  }
2772
2769
 
2773
- @keyframes _xk1qy_slide-from-right {
2770
+ @keyframes _x51ri_slide-from-right {
2774
2771
  from {
2775
2772
  transform: translateX(-50px);
2776
2773
  opacity: 0;
@@ -2780,7 +2777,7 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
2780
2777
  opacity: 1;
2781
2778
  }
2782
2779
  }
2783
- @keyframes _xk1qy_slide-from-left {
2780
+ @keyframes _x51ri_slide-from-left {
2784
2781
  from {
2785
2782
  transform: translateX(50px);
2786
2783
  opacity: 0;
@@ -2836,10 +2833,10 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
2836
2833
  }
2837
2834
  }
2838
2835
  .edit-site-sidebar__screen-wrapper.slide-from-left {
2839
- animation-name: _xk1qy_slide-from-left;
2836
+ animation-name: _x51ri_slide-from-left;
2840
2837
  }
2841
2838
  .edit-site-sidebar__screen-wrapper.slide-from-right {
2842
- animation-name: _xk1qy_slide-from-right;
2839
+ animation-name: _x51ri_slide-from-right;
2843
2840
  }
2844
2841
 
2845
2842
  .edit-site-sidebar-button {
@@ -2115,7 +2115,7 @@ fieldset.fields-controls__featured-image .fields-controls__featured-image-remove
2115
2115
  .edit-site-page {
2116
2116
  color: #2f2f2f;
2117
2117
  background: #fff;
2118
- height: calc(100% - 60px);
2118
+ height: 100%;
2119
2119
  /* stylelint-disable-next-line property-no-unknown -- '@container' not globally permitted */
2120
2120
  container: edit-site-page/inline-size;
2121
2121
  }
@@ -2124,11 +2124,6 @@ fieldset.fields-controls__featured-image .fields-controls__featured-image-remove
2124
2124
  transition: width ease-out 0.2s;
2125
2125
  }
2126
2126
  }
2127
- @media (min-width: 782px) {
2128
- .edit-site-page {
2129
- height: 100%;
2130
- }
2131
- }
2132
2127
 
2133
2128
  .edit-site-page-header {
2134
2129
  padding: 16px 48px;
@@ -2534,6 +2529,8 @@ fieldset.fields-controls__featured-image .fields-controls__featured-image-remove
2534
2529
  position: relative;
2535
2530
  width: 100%;
2536
2531
  z-index: 2;
2532
+ display: flex;
2533
+ flex-direction: column;
2537
2534
  /*
2538
2535
  * The SiteHubMobile component is displayed
2539
2536
  * for pages that do not have a sidebar,
@@ -2771,7 +2768,7 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
2771
2768
  contain: content;
2772
2769
  }
2773
2770
 
2774
- @keyframes _xk1qy_slide-from-right {
2771
+ @keyframes _x51ri_slide-from-right {
2775
2772
  from {
2776
2773
  transform: translateX(50px);
2777
2774
  opacity: 0;
@@ -2781,7 +2778,7 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
2781
2778
  opacity: 1;
2782
2779
  }
2783
2780
  }
2784
- @keyframes _xk1qy_slide-from-left {
2781
+ @keyframes _x51ri_slide-from-left {
2785
2782
  from {
2786
2783
  transform: translateX(-50px);
2787
2784
  opacity: 0;
@@ -2837,10 +2834,10 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
2837
2834
  }
2838
2835
  }
2839
2836
  .edit-site-sidebar__screen-wrapper.slide-from-left {
2840
- animation-name: _xk1qy_slide-from-left;
2837
+ animation-name: _x51ri_slide-from-left;
2841
2838
  }
2842
2839
  .edit-site-sidebar__screen-wrapper.slide-from-right {
2843
- animation-name: _xk1qy_slide-from-right;
2840
+ animation-name: _x51ri_slide-from-right;
2844
2841
  }
2845
2842
 
2846
2843
  .edit-site-sidebar-button {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/edit-site",
3
- "version": "6.19.0",
3
+ "version": "6.19.2",
4
4
  "description": "Edit Site Page module for WordPress.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -30,46 +30,46 @@
30
30
  "dependencies": {
31
31
  "@babel/runtime": "7.25.7",
32
32
  "@react-spring/web": "^9.4.5",
33
- "@wordpress/a11y": "^4.19.0",
34
- "@wordpress/api-fetch": "^7.19.0",
35
- "@wordpress/blob": "^4.19.0",
36
- "@wordpress/block-editor": "^14.14.0",
37
- "@wordpress/block-library": "^9.19.0",
38
- "@wordpress/blocks": "^14.8.0",
39
- "@wordpress/commands": "^1.19.0",
40
- "@wordpress/components": "^29.5.0",
41
- "@wordpress/compose": "^7.19.0",
42
- "@wordpress/core-commands": "^1.19.0",
43
- "@wordpress/core-data": "^7.19.0",
44
- "@wordpress/data": "^10.19.0",
45
- "@wordpress/dataviews": "^4.15.0",
46
- "@wordpress/date": "^5.19.0",
47
- "@wordpress/deprecated": "^4.19.0",
48
- "@wordpress/dom": "^4.19.0",
49
- "@wordpress/editor": "^14.19.0",
50
- "@wordpress/element": "^6.19.0",
51
- "@wordpress/escape-html": "^3.19.0",
52
- "@wordpress/fields": "^0.11.0",
53
- "@wordpress/hooks": "^4.19.0",
54
- "@wordpress/html-entities": "^4.19.0",
55
- "@wordpress/i18n": "^5.19.0",
56
- "@wordpress/icons": "^10.19.0",
57
- "@wordpress/keyboard-shortcuts": "^5.19.0",
58
- "@wordpress/keycodes": "^4.19.0",
59
- "@wordpress/media-utils": "^5.19.0",
60
- "@wordpress/notices": "^5.19.0",
61
- "@wordpress/patterns": "^2.19.0",
62
- "@wordpress/plugins": "^7.19.0",
63
- "@wordpress/preferences": "^4.19.0",
64
- "@wordpress/primitives": "^4.19.0",
65
- "@wordpress/private-apis": "^1.19.0",
66
- "@wordpress/reusable-blocks": "^5.19.0",
67
- "@wordpress/router": "^1.19.0",
68
- "@wordpress/style-engine": "^2.19.0",
69
- "@wordpress/url": "^4.19.0",
70
- "@wordpress/viewport": "^6.19.0",
71
- "@wordpress/widgets": "^4.19.0",
72
- "@wordpress/wordcount": "^4.19.0",
33
+ "@wordpress/a11y": "^4.19.1",
34
+ "@wordpress/api-fetch": "^7.19.1",
35
+ "@wordpress/blob": "^4.19.1",
36
+ "@wordpress/block-editor": "^14.14.1",
37
+ "@wordpress/block-library": "^9.19.1",
38
+ "@wordpress/blocks": "^14.8.1",
39
+ "@wordpress/commands": "^1.19.1",
40
+ "@wordpress/components": "^29.5.1",
41
+ "@wordpress/compose": "^7.19.1",
42
+ "@wordpress/core-commands": "^1.19.1",
43
+ "@wordpress/core-data": "^7.19.1",
44
+ "@wordpress/data": "^10.19.1",
45
+ "@wordpress/dataviews": "^4.15.1",
46
+ "@wordpress/date": "^5.19.1",
47
+ "@wordpress/deprecated": "^4.19.1",
48
+ "@wordpress/dom": "^4.19.1",
49
+ "@wordpress/editor": "^14.19.2",
50
+ "@wordpress/element": "^6.19.1",
51
+ "@wordpress/escape-html": "^3.19.1",
52
+ "@wordpress/fields": "^0.11.1",
53
+ "@wordpress/hooks": "^4.19.1",
54
+ "@wordpress/html-entities": "^4.19.1",
55
+ "@wordpress/i18n": "^5.19.1",
56
+ "@wordpress/icons": "^10.19.1",
57
+ "@wordpress/keyboard-shortcuts": "^5.19.1",
58
+ "@wordpress/keycodes": "^4.19.1",
59
+ "@wordpress/media-utils": "^5.19.1",
60
+ "@wordpress/notices": "^5.19.1",
61
+ "@wordpress/patterns": "^2.19.1",
62
+ "@wordpress/plugins": "^7.19.1",
63
+ "@wordpress/preferences": "^4.19.1",
64
+ "@wordpress/primitives": "^4.19.1",
65
+ "@wordpress/private-apis": "^1.19.1",
66
+ "@wordpress/reusable-blocks": "^5.19.1",
67
+ "@wordpress/router": "^1.19.1",
68
+ "@wordpress/style-engine": "^2.19.1",
69
+ "@wordpress/url": "^4.19.1",
70
+ "@wordpress/viewport": "^6.19.1",
71
+ "@wordpress/widgets": "^4.19.1",
72
+ "@wordpress/wordcount": "^4.19.1",
73
73
  "change-case": "^4.1.2",
74
74
  "clsx": "^2.1.1",
75
75
  "colord": "^2.9.2",
@@ -84,5 +84,5 @@
84
84
  "publishConfig": {
85
85
  "access": "public"
86
86
  },
87
- "gitHead": "d6b0b20fa927b110140dc7fdd906a7e0bf662004"
87
+ "gitHead": "3fbb8643c9b90c73434804e2f7b49c94325f459f"
88
88
  }
@@ -68,8 +68,7 @@ export const useExistingTemplates = () => {
68
68
  export const useDefaultTemplateTypes = () => {
69
69
  return useSelect(
70
70
  ( select ) =>
71
- select( coreStore ).getEntityRecord( 'root', '__unstableBase' )
72
- ?.default_template_types || [],
71
+ select( coreStore ).getCurrentTheme()?.default_template_types || [],
73
72
  []
74
73
  );
75
74
  };
@@ -3,7 +3,8 @@
3
3
  */
4
4
  import { useSelect } from '@wordpress/data';
5
5
  import { privateApis as routerPrivateApis } from '@wordpress/router';
6
- import { useCallback } from '@wordpress/element';
6
+ import { useCallback, useMemo } from '@wordpress/element';
7
+ import { store as coreStore } from '@wordpress/core-data';
7
8
 
8
9
  /**
9
10
  * Internal dependencies
@@ -30,9 +31,15 @@ function AppLayout() {
30
31
 
31
32
  export default function App() {
32
33
  useRegisterSiteEditorRoutes();
33
- const routes = useSelect( ( select ) => {
34
- return unlock( select( editSiteStore ) ).getRoutes();
34
+ const { routes, currentTheme, editorSettings } = useSelect( ( select ) => {
35
+ return {
36
+ routes: unlock( select( editSiteStore ) ).getRoutes(),
37
+ currentTheme: select( coreStore ).getCurrentTheme(),
38
+ // This is a temp solution until the has_theme_json value is available for the current theme.
39
+ editorSettings: select( editSiteStore ).getSettings(),
40
+ };
35
41
  }, [] );
42
+
36
43
  const beforeNavigate = useCallback( ( { path, query } ) => {
37
44
  if ( ! isPreviewingTheme() ) {
38
45
  return { path, query };
@@ -50,11 +57,19 @@ export default function App() {
50
57
  };
51
58
  }, [] );
52
59
 
60
+ const matchResolverArgsValue = useMemo(
61
+ () => ( {
62
+ siteData: { currentTheme, editorSettings },
63
+ } ),
64
+ [ currentTheme, editorSettings ]
65
+ );
66
+
53
67
  return (
54
68
  <RouterProvider
55
69
  routes={ routes }
56
70
  pathArg="p"
57
71
  beforeNavigate={ beforeNavigate }
72
+ matchResolverArgs={ matchResolverArgsValue }
58
73
  >
59
74
  <AppLayout />
60
75
  </RouterProvider>
@@ -4,6 +4,8 @@
4
4
  import { __ } from '@wordpress/i18n';
5
5
  import { useSelect } from '@wordpress/data';
6
6
  import { store as coreStore } from '@wordpress/core-data';
7
+ import { focus } from '@wordpress/dom';
8
+ import { addQueryArgs } from '@wordpress/url';
7
9
 
8
10
  export default function SitePreview() {
9
11
  const siteUrl = useSelect( ( select ) => {
@@ -15,7 +17,10 @@ export default function SitePreview() {
15
17
  // If theme is block based, return the Editor, otherwise return the site preview.
16
18
  return (
17
19
  <iframe
18
- src={ siteUrl }
20
+ src={ addQueryArgs( siteUrl, {
21
+ // Parameter for hiding the admin bar.
22
+ wp_site_preview: 1,
23
+ } ) }
19
24
  title={ __( 'Site Preview' ) }
20
25
  style={ {
21
26
  display: 'block',
@@ -24,20 +29,10 @@ export default function SitePreview() {
24
29
  backgroundColor: '#fff',
25
30
  } }
26
31
  onLoad={ ( event ) => {
27
- // Hide the admin bar in the front-end preview.
28
- const document = event.target.contentDocument;
29
- document.getElementById( 'wpadminbar' ).remove();
30
- document
31
- .getElementsByTagName( 'html' )[ 0 ]
32
- .setAttribute( 'style', 'margin-top: 0 !important;' );
33
- document
34
- .getElementsByTagName( 'body' )[ 0 ]
35
- .classList.remove( 'admin-bar' );
36
32
  // Make interactive elements unclickable.
37
- const interactiveElements = document.querySelectorAll(
38
- 'a, button, input, details, audio'
39
- );
40
- interactiveElements.forEach( ( element ) => {
33
+ const document = event.target.contentDocument;
34
+ const focusableElements = focus.focusable.find( document );
35
+ focusableElements.forEach( ( element ) => {
41
36
  element.style.pointerEvents = 'none';
42
37
  element.tabIndex = -1;
43
38
  element.setAttribute( 'aria-hidden', 'true' );
@@ -19,8 +19,11 @@ const { getTemplateInfo } = unlock( editorPrivateApis );
19
19
  function useEditorTitle( postType, postId ) {
20
20
  const { title, isLoaded } = useSelect(
21
21
  ( select ) => {
22
- const { getEditedEntityRecord, hasFinishedResolution } =
23
- select( coreStore );
22
+ const {
23
+ getEditedEntityRecord,
24
+ getCurrentTheme,
25
+ hasFinishedResolution,
26
+ } = select( coreStore );
24
27
 
25
28
  if ( ! postId ) {
26
29
  return { isLoaded: false };
@@ -33,10 +36,7 @@ function useEditorTitle( postType, postId ) {
33
36
  );
34
37
 
35
38
  const { default_template_types: templateTypes = [] } =
36
- select( coreStore ).getEntityRecord(
37
- 'root',
38
- '__unstableBase'
39
- ) ?? {};
39
+ getCurrentTheme() ?? {};
40
40
 
41
41
  const templateInfo = getTemplateInfo( {
42
42
  template: _record,