@wordpress/edit-site 6.45.1-next.v.202605131032.0 → 6.47.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/build/components/add-new-template/index.cjs.map +3 -3
  3. package/build/components/add-new-template-legacy/index.cjs.map +3 -3
  4. package/build/components/editor/index.cjs +16 -5
  5. package/build/components/editor/index.cjs.map +2 -2
  6. package/build/components/editor/use-resolve-edited-entity.cjs +0 -2
  7. package/build/components/editor/use-resolve-edited-entity.cjs.map +2 -2
  8. package/build/components/layout/index.cjs +8 -4
  9. package/build/components/layout/index.cjs.map +2 -2
  10. package/build/components/page-templates/fields.cjs.map +3 -3
  11. package/build/components/resizable-frame/index.cjs +34 -25
  12. package/build/components/resizable-frame/index.cjs.map +2 -2
  13. package/build/components/site-editor-routes/index.cjs +0 -2
  14. package/build/components/site-editor-routes/index.cjs.map +2 -2
  15. package/build/components/site-hub/index.cjs +8 -1
  16. package/build/components/site-hub/index.cjs.map +2 -2
  17. package/build/components/site-icon/index.cjs.map +3 -3
  18. package/build-module/components/add-new-template/index.mjs +2 -2
  19. package/build-module/components/add-new-template/index.mjs.map +2 -2
  20. package/build-module/components/add-new-template-legacy/index.mjs +2 -2
  21. package/build-module/components/add-new-template-legacy/index.mjs.map +2 -2
  22. package/build-module/components/editor/index.mjs +18 -7
  23. package/build-module/components/editor/index.mjs.map +2 -2
  24. package/build-module/components/editor/use-resolve-edited-entity.mjs +0 -2
  25. package/build-module/components/editor/use-resolve-edited-entity.mjs.map +2 -2
  26. package/build-module/components/layout/index.mjs +8 -4
  27. package/build-module/components/layout/index.mjs.map +2 -2
  28. package/build-module/components/page-templates/fields.mjs +2 -2
  29. package/build-module/components/page-templates/fields.mjs.map +2 -2
  30. package/build-module/components/resizable-frame/index.mjs +34 -26
  31. package/build-module/components/resizable-frame/index.mjs.map +2 -2
  32. package/build-module/components/site-editor-routes/index.mjs +0 -2
  33. package/build-module/components/site-editor-routes/index.mjs.map +2 -2
  34. package/build-module/components/site-hub/index.mjs +10 -3
  35. package/build-module/components/site-hub/index.mjs.map +2 -2
  36. package/build-module/components/site-icon/index.mjs +2 -2
  37. package/build-module/components/site-icon/index.mjs.map +2 -2
  38. package/build-style/experimental-admin-bar-in-editor-rtl.css +56 -0
  39. package/build-style/experimental-admin-bar-in-editor.css +56 -0
  40. package/build-style/style-rtl.css +457 -381
  41. package/build-style/style.css +457 -381
  42. package/package.json +49 -49
  43. package/src/components/add-new-template/index.js +2 -2
  44. package/src/components/add-new-template-legacy/index.js +2 -2
  45. package/src/components/editor/index.js +45 -17
  46. package/src/components/editor/use-resolve-edited-entity.js +0 -2
  47. package/src/components/layout/index.js +26 -15
  48. package/src/components/page-templates/fields.js +2 -2
  49. package/src/components/resizable-frame/index.js +38 -28
  50. package/src/components/site-editor-routes/index.js +0 -2
  51. package/src/components/site-hub/index.js +13 -3
  52. package/src/components/site-icon/index.js +2 -2
  53. package/src/experimental-admin-bar-in-editor.scss +71 -0
  54. package/src/style.scss +2 -0
  55. package/build/components/site-editor-routes/attachment-item.cjs +0 -60
  56. package/build/components/site-editor-routes/attachment-item.cjs.map +0 -7
  57. package/build-module/components/site-editor-routes/attachment-item.mjs +0 -25
  58. package/build-module/components/site-editor-routes/attachment-item.mjs.map +0 -7
  59. package/src/components/site-editor-routes/attachment-item.js +0 -27
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/edit-site",
3
- "version": "6.45.1-next.v.202605131032.0+f6d6e7149",
3
+ "version": "6.47.0",
4
4
  "description": "Edit Site Page module for WordPress.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -48,51 +48,51 @@
48
48
  ],
49
49
  "dependencies": {
50
50
  "@react-spring/web": "^9.4.5",
51
- "@wordpress/a11y": "^4.45.1-next.v.202605131032.0+f6d6e7149",
52
- "@wordpress/admin-ui": "^2.0.2-next.v.202605131032.0+f6d6e7149",
53
- "@wordpress/api-fetch": "^7.45.1-next.v.202605131032.0+f6d6e7149",
54
- "@wordpress/base-styles": "^8.0.1-next.v.202605131032.0+f6d6e7149",
55
- "@wordpress/blob": "^4.45.1-next.v.202605131032.0+f6d6e7149",
56
- "@wordpress/block-editor": "^15.19.1-next.v.202605131032.0+f6d6e7149",
57
- "@wordpress/block-library": "^9.45.1-next.v.202605131032.0+f6d6e7149",
58
- "@wordpress/blocks": "^15.18.1-next.v.202605131032.0+f6d6e7149",
59
- "@wordpress/commands": "^1.45.1-next.v.202605131032.0+f6d6e7149",
60
- "@wordpress/components": "^33.1.1-next.v.202605131032.0+f6d6e7149",
61
- "@wordpress/compose": "^7.45.1-next.v.202605131032.0+f6d6e7149",
62
- "@wordpress/core-data": "^7.45.1-next.v.202605131032.0+f6d6e7149",
63
- "@wordpress/data": "^10.45.1-next.v.202605131032.0+f6d6e7149",
64
- "@wordpress/dataviews": "^14.2.1-next.v.202605131032.0+f6d6e7149",
65
- "@wordpress/date": "^5.45.1-next.v.202605131032.0+f6d6e7149",
66
- "@wordpress/deprecated": "^4.45.1-next.v.202605131032.0+f6d6e7149",
67
- "@wordpress/dom": "^4.45.1-next.v.202605131032.0+f6d6e7149",
68
- "@wordpress/editor": "^14.45.2-next.v.202605131032.0+f6d6e7149",
69
- "@wordpress/element": "^6.45.1-next.v.202605131032.0+f6d6e7149",
70
- "@wordpress/escape-html": "^3.45.1-next.v.202605131032.0+f6d6e7149",
71
- "@wordpress/fields": "^0.37.1-next.v.202605131032.0+f6d6e7149",
72
- "@wordpress/global-styles-engine": "^1.12.1-next.v.202605131032.0+f6d6e7149",
73
- "@wordpress/global-styles-ui": "^1.12.1-next.v.202605131032.0+f6d6e7149",
74
- "@wordpress/hooks": "^4.45.1-next.v.202605131032.0+f6d6e7149",
75
- "@wordpress/html-entities": "^4.45.1-next.v.202605131032.0+f6d6e7149",
76
- "@wordpress/i18n": "^6.18.1-next.v.202605131032.0+f6d6e7149",
77
- "@wordpress/icons": "^13.0.1-next.v.202605131032.0+f6d6e7149",
78
- "@wordpress/keyboard-shortcuts": "^5.45.1-next.v.202605131032.0+f6d6e7149",
79
- "@wordpress/keycodes": "^4.45.1-next.v.202605131032.0+f6d6e7149",
80
- "@wordpress/media-utils": "^5.45.1-next.v.202605131032.0+f6d6e7149",
81
- "@wordpress/notices": "^5.45.1-next.v.202605131032.0+f6d6e7149",
82
- "@wordpress/patterns": "^2.45.1-next.v.202605131032.0+f6d6e7149",
83
- "@wordpress/plugins": "^7.45.1-next.v.202605131032.0+f6d6e7149",
84
- "@wordpress/preferences": "^4.45.1-next.v.202605131032.0+f6d6e7149",
85
- "@wordpress/primitives": "^4.45.1-next.v.202605131032.0+f6d6e7149",
86
- "@wordpress/private-apis": "^1.45.1-next.v.202605131032.0+f6d6e7149",
87
- "@wordpress/reusable-blocks": "^5.45.1-next.v.202605131032.0+f6d6e7149",
88
- "@wordpress/router": "^1.45.1-next.v.202605131032.0+f6d6e7149",
89
- "@wordpress/style-engine": "^2.45.1-next.v.202605131032.0+f6d6e7149",
90
- "@wordpress/ui": "^0.13.1-next.v.202605131032.0+f6d6e7149",
91
- "@wordpress/url": "^4.45.1-next.v.202605131032.0+f6d6e7149",
92
- "@wordpress/viewport": "^6.45.1-next.v.202605131032.0+f6d6e7149",
93
- "@wordpress/views": "^1.12.1-next.v.202605131032.0+f6d6e7149",
94
- "@wordpress/widgets": "^4.45.1-next.v.202605131032.0+f6d6e7149",
95
- "@wordpress/wordcount": "^4.45.1-next.v.202605131032.0+f6d6e7149",
51
+ "@wordpress/a11y": "^4.47.0",
52
+ "@wordpress/admin-ui": "^2.2.0",
53
+ "@wordpress/api-fetch": "^7.47.0",
54
+ "@wordpress/base-styles": "^9.0.0",
55
+ "@wordpress/blob": "^4.47.0",
56
+ "@wordpress/block-editor": "^15.20.0",
57
+ "@wordpress/block-library": "^9.47.0",
58
+ "@wordpress/blocks": "^15.20.0",
59
+ "@wordpress/commands": "^1.47.0",
60
+ "@wordpress/components": "^34.0.0",
61
+ "@wordpress/compose": "^8.0.0",
62
+ "@wordpress/core-data": "^7.47.0",
63
+ "@wordpress/data": "^10.47.0",
64
+ "@wordpress/dataviews": "^15.0.0",
65
+ "@wordpress/date": "^5.47.0",
66
+ "@wordpress/deprecated": "^4.47.0",
67
+ "@wordpress/dom": "^4.47.0",
68
+ "@wordpress/editor": "^14.47.0",
69
+ "@wordpress/element": "^7.0.0",
70
+ "@wordpress/escape-html": "^3.47.0",
71
+ "@wordpress/fields": "^0.39.0",
72
+ "@wordpress/global-styles-engine": "^1.14.0",
73
+ "@wordpress/global-styles-ui": "^1.14.0",
74
+ "@wordpress/hooks": "^4.47.0",
75
+ "@wordpress/html-entities": "^4.47.0",
76
+ "@wordpress/i18n": "^6.20.0",
77
+ "@wordpress/icons": "^13.2.0",
78
+ "@wordpress/keyboard-shortcuts": "^5.47.0",
79
+ "@wordpress/keycodes": "^4.47.0",
80
+ "@wordpress/media-utils": "^5.47.0",
81
+ "@wordpress/notices": "^5.47.0",
82
+ "@wordpress/patterns": "^2.47.0",
83
+ "@wordpress/plugins": "^7.47.0",
84
+ "@wordpress/preferences": "^4.47.0",
85
+ "@wordpress/primitives": "^4.47.0",
86
+ "@wordpress/private-apis": "^1.47.0",
87
+ "@wordpress/reusable-blocks": "^5.47.0",
88
+ "@wordpress/router": "^1.47.0",
89
+ "@wordpress/style-engine": "^2.47.0",
90
+ "@wordpress/ui": "^0.14.0",
91
+ "@wordpress/url": "^4.47.0",
92
+ "@wordpress/viewport": "^6.47.0",
93
+ "@wordpress/views": "^1.14.0",
94
+ "@wordpress/widgets": "^4.47.0",
95
+ "@wordpress/wordcount": "^4.47.0",
96
96
  "change-case": "^4.1.2",
97
97
  "clsx": "^2.1.1",
98
98
  "colord": "^2.9.2",
@@ -101,11 +101,11 @@
101
101
  "react-autosize-textarea": "^7.1.0"
102
102
  },
103
103
  "peerDependencies": {
104
- "react": "^18.0.0",
105
- "react-dom": "^18.0.0"
104
+ "react": "^19.2.4",
105
+ "react-dom": "^19.2.4"
106
106
  },
107
107
  "publishConfig": {
108
108
  "access": "public"
109
109
  },
110
- "gitHead": "0e198c7ac7ca634e73ded9220ce048c0302174dd"
110
+ "gitHead": "d653c5fd6161571a0c2ebde28553d6e25624eacc"
111
111
  }
@@ -13,7 +13,7 @@ import {
13
13
  __experimentalText as WCText,
14
14
  __experimentalVStack as VStack,
15
15
  Flex,
16
- Icon,
16
+ Icon as WCIcon,
17
17
  } from '@wordpress/components';
18
18
  import { decodeEntities } from '@wordpress/html-entities';
19
19
  import { useState, memo, useRef, useEffect } from '@wordpress/element';
@@ -122,7 +122,7 @@ function TemplateListItem( {
122
122
  direction={ direction }
123
123
  >
124
124
  <div className="edit-site-add-new-template__template-icon">
125
- <Icon icon={ icon } />
125
+ <WCIcon icon={ icon } />
126
126
  </div>
127
127
  <VStack
128
128
  className="edit-site-add-new-template__template-name"
@@ -13,7 +13,7 @@ import {
13
13
  __experimentalText as WCText,
14
14
  __experimentalVStack as VStack,
15
15
  Flex,
16
- Icon,
16
+ Icon as WCIcon,
17
17
  } from '@wordpress/components';
18
18
  import { decodeEntities } from '@wordpress/html-entities';
19
19
  import { useState, memo, useRef, useEffect } from '@wordpress/element';
@@ -123,7 +123,7 @@ function TemplateListItem( {
123
123
  direction={ direction }
124
124
  >
125
125
  <div className="edit-site-add-new-template__template-icon">
126
- <Icon icon={ icon } />
126
+ <WCIcon icon={ icon } />
127
127
  </div>
128
128
  <VStack
129
129
  className="edit-site-add-new-template__template-name"
@@ -14,14 +14,14 @@ import {
14
14
  privateApis as editorPrivateApis,
15
15
  store as editorStore,
16
16
  } from '@wordpress/editor';
17
- import { __, sprintf } from '@wordpress/i18n';
17
+ import { __, isRTL, sprintf } from '@wordpress/i18n';
18
18
  import { store as coreDataStore } from '@wordpress/core-data';
19
19
  import { privateApis as blockLibraryPrivateApis } from '@wordpress/block-library';
20
20
  import { useCallback } from '@wordpress/element';
21
21
  import { store as noticesStore } from '@wordpress/notices';
22
22
  import { privateApis as routerPrivateApis } from '@wordpress/router';
23
23
  import { decodeEntities } from '@wordpress/html-entities';
24
- import { Icon, arrowUpLeft } from '@wordpress/icons';
24
+ import { Icon, arrowUpLeft, arrowUpRight } from '@wordpress/icons';
25
25
  import { store as blockEditorStore } from '@wordpress/block-editor';
26
26
  import { addQueryArgs } from '@wordpress/url';
27
27
 
@@ -208,6 +208,8 @@ export default function EditSiteEditor( { isHomeRoute = false } ) {
208
208
  duration: disableMotion ? 0 : 0.2,
209
209
  };
210
210
 
211
+ const hasAdminBarInEditor = window.__experimentalAdminBarInEditor;
212
+
211
213
  return ! isBlockBasedTheme && isHomeRoute ? (
212
214
  <SitePreview />
213
215
  ) : (
@@ -274,24 +276,50 @@ export default function EditSiteEditor( { isHomeRoute = false } ) {
274
276
  );
275
277
  } }
276
278
  >
279
+ { ! hasAdminBarInEditor && (
280
+ <motion.div
281
+ variants={
282
+ ! disableMotion &&
283
+ siteIconVariants
284
+ }
285
+ >
286
+ <SiteIcon className="edit-site-editor__view-mode-toggle-icon" />
287
+ </motion.div>
288
+ ) }
289
+ </Button>
290
+ { hasAdminBarInEditor ? (
291
+ <div className="edit-site-editor__back-icon">
292
+ <Icon
293
+ icon={
294
+ isRTL()
295
+ ? arrowUpRight
296
+ : arrowUpLeft
297
+ }
298
+ />
299
+ </div>
300
+ ) : (
277
301
  <motion.div
278
- variants={ siteIconVariants }
302
+ className={ clsx(
303
+ 'edit-site-editor__back-icon',
304
+ {
305
+ 'has-site-icon':
306
+ hasSiteIcon,
307
+ }
308
+ ) }
309
+ variants={
310
+ ! disableMotion &&
311
+ toggleHomeIconVariants
312
+ }
279
313
  >
280
- <SiteIcon className="edit-site-editor__view-mode-toggle-icon" />
314
+ <Icon
315
+ icon={
316
+ isRTL()
317
+ ? arrowUpRight
318
+ : arrowUpLeft
319
+ }
320
+ />
281
321
  </motion.div>
282
- </Button>
283
- <motion.div
284
- className={ clsx(
285
- 'edit-site-editor__back-icon',
286
- {
287
- 'has-site-icon':
288
- hasSiteIcon,
289
- }
290
- ) }
291
- variants={ toggleHomeIconVariants }
292
- >
293
- <Icon icon={ arrowUpLeft } />
294
- </motion.div>
322
+ ) }
295
323
  </motion.div>
296
324
  )
297
325
  }
@@ -47,8 +47,6 @@ function getPostType( name ) {
47
47
  postType = 'page';
48
48
  } else if ( name === 'post-item' || name === 'posts' ) {
49
49
  postType = 'post';
50
- } else if ( name === 'attachment-item' ) {
51
- postType = ATTACHMENT_POST_TYPE;
52
50
  }
53
51
 
54
52
  return postType;
@@ -31,6 +31,8 @@ import { PluginArea } from '@wordpress/plugins';
31
31
  import { SnackbarNotices, store as noticesStore } from '@wordpress/notices';
32
32
  import { useDispatch, useSelect } from '@wordpress/data';
33
33
  import { store as preferencesStore } from '@wordpress/preferences';
34
+ // eslint-disable-next-line @wordpress/use-recommended-components -- `Tooltip` is not yet on the recommended `@wordpress/ui` allow-list; landing as a migration step ahead of the wider rollout.
35
+ import { Tooltip } from '@wordpress/ui';
34
36
 
35
37
  /**
36
38
  * Internal dependencies
@@ -54,6 +56,9 @@ function Layout() {
54
56
  const { query, name: routeKey, areas, widths } = useLocation();
55
57
  // Force canvas to 'view' on notfound route to show the error message and allow navigation.
56
58
  const canvas = routeKey === 'notfound' ? 'view' : query?.canvas ?? 'view';
59
+ const hasAdminBarInEditor = window.__experimentalAdminBarInEditor;
60
+ const showDesktopSiteHub = ! hasAdminBarInEditor;
61
+ const showMobileSiteHub = ! hasAdminBarInEditor || routeKey !== 'home';
57
62
  const isMobileViewport = useViewportMatch( 'medium', '<' );
58
63
  const toggleRef = useRef();
59
64
  const navigateRegionsProps = useNavigateRegions();
@@ -129,12 +134,14 @@ function Layout() {
129
134
  } }
130
135
  className="edit-site-layout__sidebar"
131
136
  >
132
- <SiteHub
133
- ref={ toggleRef }
134
- isTransparent={
135
- isResizableFrameOversized
136
- }
137
- />
137
+ { showDesktopSiteHub && (
138
+ <SiteHub
139
+ ref={ toggleRef }
140
+ isTransparent={
141
+ isResizableFrameOversized
142
+ }
143
+ />
144
+ ) }
138
145
  <SidebarNavigationProvider>
139
146
  <SidebarContent
140
147
  shouldAnimate={
@@ -163,12 +170,14 @@ function Layout() {
163
170
  <SidebarNavigationProvider>
164
171
  { canvas !== 'edit' ? (
165
172
  <>
166
- <SiteHubMobile
167
- ref={ toggleRef }
168
- isTransparent={
169
- isResizableFrameOversized
170
- }
171
- />
173
+ { showMobileSiteHub && (
174
+ <SiteHubMobile
175
+ ref={ toggleRef }
176
+ isTransparent={
177
+ isResizableFrameOversized
178
+ }
179
+ />
180
+ ) }
172
181
  <SidebarContent routeKey={ routeKey }>
173
182
  <ErrorBoundary>
174
183
  { areas.mobile }
@@ -275,9 +284,11 @@ export default function LayoutWithGlobalStylesProvider( props ) {
275
284
 
276
285
  return (
277
286
  <SlotFillProvider>
278
- { /** This needs to be within the SlotFillProvider */ }
279
- <PluginArea onError={ onPluginAreaError } />
280
- <Layout { ...props } />
287
+ <Tooltip.Provider>
288
+ { /** This needs to be within the SlotFillProvider */ }
289
+ <PluginArea onError={ onPluginAreaError } />
290
+ <Layout { ...props } />
291
+ </Tooltip.Provider>
281
292
  </SlotFillProvider>
282
293
  );
283
294
  }
@@ -7,7 +7,7 @@ import clsx from 'clsx';
7
7
  * WordPress dependencies
8
8
  */
9
9
  import {
10
- Icon,
10
+ Icon as WCIcon,
11
11
  __experimentalHStack as HStack,
12
12
  privateApis as componentsPrivateApis,
13
13
  } from '@wordpress/components';
@@ -138,7 +138,7 @@ function AuthorField( { item } ) {
138
138
  ) }
139
139
  { ! imageUrl && (
140
140
  <div className="fields-controls__author-icon">
141
- <Icon icon={ icon } />
141
+ <WCIcon icon={ icon } />
142
142
  </div>
143
143
  ) }
144
144
  <span className="fields-controls__author-name">{ text }</span>
@@ -9,7 +9,6 @@ import clsx from 'clsx';
9
9
  import { useState, useRef } from '@wordpress/element';
10
10
  import {
11
11
  ResizableBox,
12
- Tooltip,
13
12
  __unstableMotion as motion,
14
13
  } from '@wordpress/components';
15
14
  import { useInstanceId, useReducedMotion } from '@wordpress/compose';
@@ -17,12 +16,14 @@ import { __, isRTL } from '@wordpress/i18n';
17
16
  import { privateApis as routerPrivateApis } from '@wordpress/router';
18
17
  import { useSelect } from '@wordpress/data';
19
18
  import { store as coreStore } from '@wordpress/core-data';
19
+ import { addQueryArgs } from '@wordpress/url';
20
+ // eslint-disable-next-line @wordpress/use-recommended-components -- `Tooltip` is not yet on the recommended `@wordpress/ui` allow-list; landing as a migration step ahead of the wider rollout.
21
+ import { Tooltip } from '@wordpress/ui';
20
22
 
21
23
  /**
22
24
  * Internal dependencies
23
25
  */
24
26
  import { unlock } from '../../lock-unlock';
25
- import { addQueryArgs } from '@wordpress/url';
26
27
 
27
28
  const { useLocation, useHistory } = unlock( routerPrivateApis );
28
29
 
@@ -294,34 +295,43 @@ function ResizableFrame( {
294
295
  handleComponent={ {
295
296
  [ isRTL() ? 'right' : 'left' ]: canvas === 'view' && (
296
297
  <>
297
- <Tooltip text={ __( 'Drag to resize' ) }>
298
- { /* Disable reason: role="separator" does in fact support aria-valuenow */ }
299
- { /* eslint-disable-next-line jsx-a11y/role-supports-aria-props */ }
300
- <motion.button
301
- key="handle"
302
- role="separator"
303
- aria-orientation="vertical"
304
- className={ clsx(
305
- 'edit-site-resizable-frame__handle',
306
- { 'is-resizing': isResizing }
307
- ) }
308
- variants={ resizeHandleVariants }
309
- animate={ currentResizeHandleVariant }
310
- aria-label={ __( 'Drag to resize' ) }
311
- aria-describedby={ resizableHandleHelpId }
312
- aria-valuenow={
313
- frameRef.current?.resizable?.offsetWidth ||
314
- undefined
298
+ <Tooltip.Root>
299
+ <Tooltip.Trigger
300
+ render={
301
+ <motion.button
302
+ key="handle"
303
+ role="separator"
304
+ aria-orientation="vertical"
305
+ className={ clsx(
306
+ 'edit-site-resizable-frame__handle',
307
+ { 'is-resizing': isResizing }
308
+ ) }
309
+ variants={ resizeHandleVariants }
310
+ animate={ currentResizeHandleVariant }
311
+ aria-label={ __( 'Drag to resize' ) }
312
+ aria-describedby={
313
+ resizableHandleHelpId
314
+ }
315
+ aria-valuenow={
316
+ frameRef.current?.resizable
317
+ ?.offsetWidth || undefined
318
+ }
319
+ aria-valuemin={ FRAME_MIN_WIDTH }
320
+ aria-valuemax={ defaultSize.width }
321
+ onKeyDown={
322
+ handleResizableHandleKeyDown
323
+ }
324
+ initial="hidden"
325
+ exit="hidden"
326
+ whileFocus="active"
327
+ whileHover="active"
328
+ />
315
329
  }
316
- aria-valuemin={ FRAME_MIN_WIDTH }
317
- aria-valuemax={ defaultSize.width }
318
- onKeyDown={ handleResizableHandleKeyDown }
319
- initial="hidden"
320
- exit="hidden"
321
- whileFocus="active"
322
- whileHover="active"
323
330
  />
324
- </Tooltip>
331
+ <Tooltip.Popup>
332
+ { __( 'Drag to resize' ) }
333
+ </Tooltip.Popup>
334
+ </Tooltip.Root>
325
335
  <div hidden id={ resizableHandleHelpId }>
326
336
  { __(
327
337
  'Use left and right arrow keys to resize the canvas. Hold shift to resize in larger increments.'
@@ -21,12 +21,10 @@ import { templatesRoute } from './templates';
21
21
  import { templateItemRoute } from './template-item';
22
22
  import { pagesRoute } from './pages';
23
23
  import { pageItemRoute } from './page-item';
24
- import { attachmentItemRoute } from './attachment-item';
25
24
  import { stylebookRoute } from './stylebook';
26
25
  import { notFoundRoute } from './notfound';
27
26
 
28
27
  const routes = [
29
- ...( window?.__experimentalMediaEditor ? [ attachmentItemRoute ] : [] ),
30
28
  pageItemRoute,
31
29
  pagesRoute,
32
30
  templateItemRoute,
@@ -8,11 +8,11 @@ import clsx from 'clsx';
8
8
  */
9
9
  import { useSelect, useDispatch } from '@wordpress/data';
10
10
  import { Button, __experimentalHStack as HStack } from '@wordpress/components';
11
- import { __ } from '@wordpress/i18n';
11
+ import { __, isRTL } from '@wordpress/i18n';
12
12
  import { store as coreStore } from '@wordpress/core-data';
13
13
  import { decodeEntities } from '@wordpress/html-entities';
14
14
  import { memo, forwardRef, useContext } from '@wordpress/element';
15
- import { search } from '@wordpress/icons';
15
+ import { Icon, arrowUpLeft, arrowUpRight, search } from '@wordpress/icons';
16
16
  import { store as commandsStore } from '@wordpress/commands';
17
17
  import { displayShortcut } from '@wordpress/keycodes';
18
18
  import { VisuallyHidden } from '@wordpress/ui';
@@ -117,6 +117,7 @@ export const SiteHubMobile = memo(
117
117
  const { path } = useLocation();
118
118
  const history = useHistory();
119
119
  const { navigate } = useContext( SidebarNavigationContext );
120
+ const hasAdminBarInEditor = window.__experimentalAdminBarInEditor;
120
121
 
121
122
  const {
122
123
  dashboardLink,
@@ -199,7 +200,16 @@ export const SiteHubMobile = memo(
199
200
  } }
200
201
  { ...backButtonProps }
201
202
  >
202
- <SiteIcon className="edit-site-layout__view-mode-toggle-icon" />
203
+ { hasAdminBarInEditor ? (
204
+ <Icon
205
+ icon={
206
+ isRTL() ? arrowUpRight : arrowUpLeft
207
+ }
208
+ size={ 48 }
209
+ />
210
+ ) : (
211
+ <SiteIcon className="edit-site-layout__view-mode-toggle-icon" />
212
+ ) }
203
213
  </Button>
204
214
  </div>
205
215
 
@@ -7,7 +7,7 @@ import clsx from 'clsx';
7
7
  * WordPress dependencies
8
8
  */
9
9
  import { useSelect } from '@wordpress/data';
10
- import { Icon } from '@wordpress/components';
10
+ import { Icon as WCIcon } from '@wordpress/components';
11
11
  import { __ } from '@wordpress/i18n';
12
12
  import { wordpress } from '@wordpress/icons';
13
13
  import { store as coreDataStore } from '@wordpress/core-data';
@@ -34,7 +34,7 @@ function SiteIcon( { className } ) {
34
34
  src={ siteIconUrl }
35
35
  />
36
36
  ) : (
37
- <Icon
37
+ <WCIcon
38
38
  className="edit-site-site-icon__icon"
39
39
  icon={ wordpress }
40
40
  size={ 48 }
@@ -0,0 +1,71 @@
1
+ // Styles for the experimental admin bar in editor.
2
+
3
+ body.has-admin-bar-in-editor {
4
+ margin-top: 0;
5
+ height: 100%;
6
+
7
+ &:has(.editor-editor-interface.is-distraction-free) {
8
+ --wp-admin--admin-bar--height: 0;
9
+ }
10
+
11
+ .edit-site-site-hub__title,
12
+ .edit-site-site-hub__actions {
13
+ display: none;
14
+ }
15
+
16
+ .edit-site-editor__view-mode-toggle .edit-site-editor__back-icon {
17
+ background: transparent;
18
+ }
19
+
20
+ .edit-site-editor__view-mode-toggle:hover .edit-site-editor__back-icon {
21
+ color: var(--wp-admin-theme-color);
22
+ }
23
+
24
+ .edit-site-sidebar-navigation-screen__title-icon {
25
+ padding-top: 16px;
26
+ }
27
+
28
+ .edit-site-layout__content,
29
+ .edit-site-layout__sidebar {
30
+ min-height: 0;
31
+ }
32
+
33
+ .edit-site-sidebar__content {
34
+ flex-basis: 0;
35
+ min-height: 0;
36
+ }
37
+
38
+ .edit-site {
39
+ box-sizing: border-box;
40
+ padding-top: var(--wp-admin--admin-bar--height, 0);
41
+ height: 100vh;
42
+ min-height: 100vh;
43
+
44
+ @media (min-width: 600px) {
45
+ padding-top: 0;
46
+ top: var(--wp-admin--admin-bar--height, 0);
47
+ height: calc(100vh - var(--wp-admin--admin-bar--height, 0));
48
+ min-height: calc(100vh - var(--wp-admin--admin-bar--height, 0));
49
+ }
50
+ }
51
+
52
+ .edit-site-layout.is-full-canvas .edit-site-layout__sidebar-region {
53
+ top: var(--wp-admin--admin-bar--height, 0);
54
+ height: calc(100vh - var(--wp-admin--admin-bar--height, 0));
55
+ }
56
+
57
+ &.is-fullscreen-mode {
58
+ .is-entity-save-view-open .interface-interface-skeleton__actions:focus,
59
+ .is-entity-save-view-open .interface-interface-skeleton__actions:focus-within {
60
+ top: var(--wp-admin--admin-bar--height, 0);
61
+ }
62
+
63
+ #wpadminbar {
64
+ display: block;
65
+ }
66
+
67
+ &:has(.editor-editor-interface.is-distraction-free) #wpadminbar {
68
+ display: none;
69
+ }
70
+ }
71
+ }
package/src/style.scss CHANGED
@@ -1,5 +1,6 @@
1
1
  @use "@wordpress/base-styles/colors" as *;
2
2
  @use "@wordpress/base-styles/mixins" as *;
3
+ @use "@wordpress/base-styles/variables" as *;
3
4
  @use "@wordpress/base-styles/default-custom-properties";
4
5
  @use "@wordpress/dataviews/build-style/style.css" as dataviews;
5
6
  @use "@wordpress/fields/build-style/style.css" as fields;
@@ -31,6 +32,7 @@
31
32
  @use "./components/resizable-frame/style.scss" as *;
32
33
  @use "./components/pagination/style.scss" as *;
33
34
  @use "./components/sidebar-global-styles/style.scss" as *;
35
+ @use "./experimental-admin-bar-in-editor.scss" as *;
34
36
 
35
37
  /* stylelint-disable -- Disable reason: View Transitions not supported properly by stylelint. */
36
38
  ::view-transition-image-pair(root) {