@wordpress/edit-post 8.50.0 → 8.50.1-next.v.202607070741.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -67,6 +67,12 @@
67
67
  /**
68
68
  * Focus styles.
69
69
  */
70
+ /**
71
+ * Standard focus rings for the WordPress Design System.
72
+ *
73
+ * Apply `outset-ring__focus` inside the relevant pseudo-class at the call site,
74
+ * e.g. `&:focus { @include outset-ring__focus(); }`.
75
+ */
70
76
  /**
71
77
  * Applies editor left position to the selector passed as argument
72
78
  */
@@ -67,6 +67,12 @@
67
67
  /**
68
68
  * Focus styles.
69
69
  */
70
+ /**
71
+ * Standard focus rings for the WordPress Design System.
72
+ *
73
+ * Apply `outset-ring__focus` inside the relevant pseudo-class at the call site,
74
+ * e.g. `&:focus { @include outset-ring__focus(); }`.
75
+ */
70
76
  /**
71
77
  * Applies editor left position to the selector passed as argument
72
78
  */
@@ -67,6 +67,12 @@
67
67
  /**
68
68
  * Focus styles.
69
69
  */
70
+ /**
71
+ * Standard focus rings for the WordPress Design System.
72
+ *
73
+ * Apply `outset-ring__focus` inside the relevant pseudo-class at the call site,
74
+ * e.g. `&:focus { @include outset-ring__focus(); }`.
75
+ */
70
76
  /**
71
77
  * Applies editor left position to the selector passed as argument
72
78
  */
@@ -109,8 +115,11 @@
109
115
  .edit-post-fullscreen-mode-close__view-mode-toggle {
110
116
  top: 0;
111
117
  right: 0;
112
- height: 64px;
113
- width: 64px;
118
+ display: flex;
119
+ align-items: center;
120
+ justify-content: center;
121
+ height: 32px;
122
+ width: 32px;
114
123
  z-index: 100;
115
124
  }
116
125
  .edit-post-fullscreen-mode-close__view-mode-toggle .components-button {
@@ -130,26 +139,8 @@
130
139
  .edit-post-fullscreen-mode-close__view-mode-toggle .components-button:focus {
131
140
  box-shadow: none;
132
141
  }
133
- .edit-post-fullscreen-mode-close__view-mode-toggle .edit-post-fullscreen-mode-close__view-mode-toggle-icon svg,
134
- .edit-post-fullscreen-mode-close__view-mode-toggle .edit-post-fullscreen-mode-close__view-mode-toggle-icon img {
135
- background: #1e1e1e;
136
- display: block;
137
- }
138
-
139
- .edit-post-fullscreen-mode-close-site-icon__icon {
140
- fill: currentColor;
141
- width: 100%;
142
- height: 100%;
143
- padding: 12px;
144
- }
145
-
146
- .edit-post-fullscreen-mode-close-site-icon__image {
147
- width: 100%;
148
- height: 100%;
149
- -o-object-fit: cover;
150
- object-fit: cover;
151
- background: #333;
152
- aspect-ratio: 1/1;
142
+ .edit-post-fullscreen-mode-close__view-mode-toggle:hover .edit-post-fullscreen-mode-close__back-icon {
143
+ color: var(--wp-admin-theme-color);
153
144
  }
154
145
 
155
146
  .edit-post-fullscreen-mode-close.components-button:focus {
@@ -169,36 +160,16 @@
169
160
 
170
161
  .edit-post-fullscreen-mode-close__back-icon {
171
162
  position: absolute;
172
- top: 0;
173
- right: 0;
174
- width: 64px;
175
- height: 64px;
163
+ width: 32px;
164
+ height: 32px;
176
165
  display: flex;
177
166
  align-items: center;
178
167
  justify-content: center;
179
- background-color: hsl(0, 0%, 80%);
180
168
  pointer-events: none;
181
169
  }
182
170
  .edit-post-fullscreen-mode-close__back-icon svg {
183
171
  fill: currentColor;
184
172
  }
185
- .edit-post-fullscreen-mode-close__back-icon.has-site-icon {
186
- background-color: hsla(0, 0%, 100%, 0.6);
187
- backdrop-filter: saturate(180%) blur(15px);
188
- }
189
-
190
- /**
191
- * Show icon label overrides.
192
- */
193
- .show-icon-labels .editor-header .edit-post-fullscreen-mode-close.has-icon {
194
- width: 64px;
195
- }
196
- .show-icon-labels .editor-header .edit-post-fullscreen-mode-close.has-icon svg {
197
- display: block;
198
- }
199
- .show-icon-labels .editor-header .edit-post-fullscreen-mode-close.has-icon::after {
200
- content: none;
201
- }
202
173
 
203
174
  .edit-post-meta-boxes-main {
204
175
  filter: drop-shadow(0 -1px rgba(0, 0, 0, 0.133));
@@ -446,57 +417,6 @@
446
417
  fill: #fff;
447
418
  }
448
419
 
449
- body.has-admin-bar-in-editor .edit-post-fullscreen-mode-close__view-mode-toggle {
450
- display: flex;
451
- align-items: center;
452
- justify-content: center;
453
- width: 32px;
454
- height: 32px;
455
- }
456
- body.has-admin-bar-in-editor .edit-post-fullscreen-mode-close__view-mode-toggle .edit-post-fullscreen-mode-close__back-icon {
457
- top: auto;
458
- right: auto;
459
- width: 32px;
460
- height: 32px;
461
- background: transparent;
462
- }
463
- body.has-admin-bar-in-editor .edit-post-fullscreen-mode-close__view-mode-toggle:hover .edit-post-fullscreen-mode-close__back-icon {
464
- color: var(--wp-admin-theme-color);
465
- }
466
- body.has-admin-bar-in-editor.is-fullscreen-mode .editor-header:has(> .editor-header__back-button) {
467
- grid-template-columns: 32px minmax(0, max-content) minmax(min-content, 1fr) 64px;
468
- }
469
- body.has-admin-bar-in-editor.is-fullscreen-mode .editor-header:has(> .editor-header__back-button):has(> .editor-header__center) {
470
- grid-template-columns: 32px min-content 1fr min-content 64px;
471
- }
472
- body.has-admin-bar-in-editor.is-fullscreen-mode .editor-header__back-button {
473
- padding-right: 8px;
474
- }
475
- @media (min-width: 782px) {
476
- body.has-admin-bar-in-editor.is-fullscreen-mode {
477
- margin-top: 0;
478
- height: 100%;
479
- }
480
- body.has-admin-bar-in-editor.is-fullscreen-mode #wpadminbar {
481
- display: block;
482
- }
483
- body.has-admin-bar-in-editor.is-fullscreen-mode .interface-interface-skeleton,
484
- body.has-admin-bar-in-editor.is-fullscreen-mode .editor-post-publish-panel,
485
- body.has-admin-bar-in-editor.is-fullscreen-mode .is-entity-save-view-open .interface-interface-skeleton__actions:focus,
486
- body.has-admin-bar-in-editor.is-fullscreen-mode .is-entity-save-view-open .interface-interface-skeleton__actions:focus-within {
487
- top: var(--wp-admin--admin-bar--height, 0);
488
- }
489
- body.has-admin-bar-in-editor.is-fullscreen-mode .block-editor__container {
490
- min-height: calc(100vh - var(--wp-admin--admin-bar--height, 0));
491
- }
492
- body.has-admin-bar-in-editor.is-fullscreen-mode:has(.editor-editor-interface.is-distraction-free) {
493
- --wp-admin--admin-bar--height: 0;
494
- }
495
- body.has-admin-bar-in-editor.is-fullscreen-mode:has(.editor-editor-interface.is-distraction-free) #wpadminbar {
496
- display: none;
497
- }
498
- }
499
-
500
420
  body.js.block-editor-page {
501
421
  background: #fff;
502
422
  }
@@ -528,6 +448,14 @@ body.js.block-editor-page .media-frame select.attachment-filters:last-of-type {
528
448
  width: auto;
529
449
  max-width: 100%;
530
450
  }
451
+ @media (min-width: 782px) {
452
+ body.js.block-editor-page.is-fullscreen-mode:has(.editor-editor-interface.is-distraction-free) {
453
+ --wp-admin--admin-bar--height: 0px;
454
+ }
455
+ body.js.block-editor-page.is-fullscreen-mode:has(.editor-editor-interface.is-distraction-free) #wpadminbar {
456
+ display: none;
457
+ }
458
+ }
531
459
 
532
460
  .block-editor-page #wpwrap {
533
461
  overflow-y: auto;
@@ -559,10 +487,7 @@ body.js.block-editor-page .media-frame select.attachment-filters:last-of-type {
559
487
  }
560
488
  @media (min-width: 782px) {
561
489
  .block-editor__container {
562
- min-height: calc(100vh - 32px);
563
- }
564
- body.is-fullscreen-mode .block-editor__container {
565
- min-height: 100vh;
490
+ min-height: calc(100vh - var(--wp-admin--admin-bar--height, 0px));
566
491
  }
567
492
  }
568
493
  .block-editor__container img {
@@ -67,6 +67,12 @@
67
67
  /**
68
68
  * Focus styles.
69
69
  */
70
+ /**
71
+ * Standard focus rings for the WordPress Design System.
72
+ *
73
+ * Apply `outset-ring__focus` inside the relevant pseudo-class at the call site,
74
+ * e.g. `&:focus { @include outset-ring__focus(); }`.
75
+ */
70
76
  /**
71
77
  * Applies editor left position to the selector passed as argument
72
78
  */
@@ -109,8 +115,11 @@
109
115
  .edit-post-fullscreen-mode-close__view-mode-toggle {
110
116
  top: 0;
111
117
  left: 0;
112
- height: 64px;
113
- width: 64px;
118
+ display: flex;
119
+ align-items: center;
120
+ justify-content: center;
121
+ height: 32px;
122
+ width: 32px;
114
123
  z-index: 100;
115
124
  }
116
125
  .edit-post-fullscreen-mode-close__view-mode-toggle .components-button {
@@ -130,26 +139,8 @@
130
139
  .edit-post-fullscreen-mode-close__view-mode-toggle .components-button:focus {
131
140
  box-shadow: none;
132
141
  }
133
- .edit-post-fullscreen-mode-close__view-mode-toggle .edit-post-fullscreen-mode-close__view-mode-toggle-icon svg,
134
- .edit-post-fullscreen-mode-close__view-mode-toggle .edit-post-fullscreen-mode-close__view-mode-toggle-icon img {
135
- background: #1e1e1e;
136
- display: block;
137
- }
138
-
139
- .edit-post-fullscreen-mode-close-site-icon__icon {
140
- fill: currentColor;
141
- width: 100%;
142
- height: 100%;
143
- padding: 12px;
144
- }
145
-
146
- .edit-post-fullscreen-mode-close-site-icon__image {
147
- width: 100%;
148
- height: 100%;
149
- -o-object-fit: cover;
150
- object-fit: cover;
151
- background: #333;
152
- aspect-ratio: 1/1;
142
+ .edit-post-fullscreen-mode-close__view-mode-toggle:hover .edit-post-fullscreen-mode-close__back-icon {
143
+ color: var(--wp-admin-theme-color);
153
144
  }
154
145
 
155
146
  .edit-post-fullscreen-mode-close.components-button:focus {
@@ -169,36 +160,16 @@
169
160
 
170
161
  .edit-post-fullscreen-mode-close__back-icon {
171
162
  position: absolute;
172
- top: 0;
173
- left: 0;
174
- width: 64px;
175
- height: 64px;
163
+ width: 32px;
164
+ height: 32px;
176
165
  display: flex;
177
166
  align-items: center;
178
167
  justify-content: center;
179
- background-color: hsl(0, 0%, 80%);
180
168
  pointer-events: none;
181
169
  }
182
170
  .edit-post-fullscreen-mode-close__back-icon svg {
183
171
  fill: currentColor;
184
172
  }
185
- .edit-post-fullscreen-mode-close__back-icon.has-site-icon {
186
- background-color: hsla(0, 0%, 100%, 0.6);
187
- backdrop-filter: saturate(180%) blur(15px);
188
- }
189
-
190
- /**
191
- * Show icon label overrides.
192
- */
193
- .show-icon-labels .editor-header .edit-post-fullscreen-mode-close.has-icon {
194
- width: 64px;
195
- }
196
- .show-icon-labels .editor-header .edit-post-fullscreen-mode-close.has-icon svg {
197
- display: block;
198
- }
199
- .show-icon-labels .editor-header .edit-post-fullscreen-mode-close.has-icon::after {
200
- content: none;
201
- }
202
173
 
203
174
  .edit-post-meta-boxes-main {
204
175
  filter: drop-shadow(0 -1px rgba(0, 0, 0, 0.133));
@@ -446,57 +417,6 @@
446
417
  fill: #fff;
447
418
  }
448
419
 
449
- body.has-admin-bar-in-editor .edit-post-fullscreen-mode-close__view-mode-toggle {
450
- display: flex;
451
- align-items: center;
452
- justify-content: center;
453
- width: 32px;
454
- height: 32px;
455
- }
456
- body.has-admin-bar-in-editor .edit-post-fullscreen-mode-close__view-mode-toggle .edit-post-fullscreen-mode-close__back-icon {
457
- top: auto;
458
- left: auto;
459
- width: 32px;
460
- height: 32px;
461
- background: transparent;
462
- }
463
- body.has-admin-bar-in-editor .edit-post-fullscreen-mode-close__view-mode-toggle:hover .edit-post-fullscreen-mode-close__back-icon {
464
- color: var(--wp-admin-theme-color);
465
- }
466
- body.has-admin-bar-in-editor.is-fullscreen-mode .editor-header:has(> .editor-header__back-button) {
467
- grid-template-columns: 32px minmax(0, max-content) minmax(min-content, 1fr) 64px;
468
- }
469
- body.has-admin-bar-in-editor.is-fullscreen-mode .editor-header:has(> .editor-header__back-button):has(> .editor-header__center) {
470
- grid-template-columns: 32px min-content 1fr min-content 64px;
471
- }
472
- body.has-admin-bar-in-editor.is-fullscreen-mode .editor-header__back-button {
473
- padding-left: 8px;
474
- }
475
- @media (min-width: 782px) {
476
- body.has-admin-bar-in-editor.is-fullscreen-mode {
477
- margin-top: 0;
478
- height: 100%;
479
- }
480
- body.has-admin-bar-in-editor.is-fullscreen-mode #wpadminbar {
481
- display: block;
482
- }
483
- body.has-admin-bar-in-editor.is-fullscreen-mode .interface-interface-skeleton,
484
- body.has-admin-bar-in-editor.is-fullscreen-mode .editor-post-publish-panel,
485
- body.has-admin-bar-in-editor.is-fullscreen-mode .is-entity-save-view-open .interface-interface-skeleton__actions:focus,
486
- body.has-admin-bar-in-editor.is-fullscreen-mode .is-entity-save-view-open .interface-interface-skeleton__actions:focus-within {
487
- top: var(--wp-admin--admin-bar--height, 0);
488
- }
489
- body.has-admin-bar-in-editor.is-fullscreen-mode .block-editor__container {
490
- min-height: calc(100vh - var(--wp-admin--admin-bar--height, 0));
491
- }
492
- body.has-admin-bar-in-editor.is-fullscreen-mode:has(.editor-editor-interface.is-distraction-free) {
493
- --wp-admin--admin-bar--height: 0;
494
- }
495
- body.has-admin-bar-in-editor.is-fullscreen-mode:has(.editor-editor-interface.is-distraction-free) #wpadminbar {
496
- display: none;
497
- }
498
- }
499
-
500
420
  body.js.block-editor-page {
501
421
  background: #fff;
502
422
  }
@@ -528,6 +448,14 @@ body.js.block-editor-page .media-frame select.attachment-filters:last-of-type {
528
448
  width: auto;
529
449
  max-width: 100%;
530
450
  }
451
+ @media (min-width: 782px) {
452
+ body.js.block-editor-page.is-fullscreen-mode:has(.editor-editor-interface.is-distraction-free) {
453
+ --wp-admin--admin-bar--height: 0px;
454
+ }
455
+ body.js.block-editor-page.is-fullscreen-mode:has(.editor-editor-interface.is-distraction-free) #wpadminbar {
456
+ display: none;
457
+ }
458
+ }
531
459
 
532
460
  .block-editor-page #wpwrap {
533
461
  overflow-y: auto;
@@ -559,10 +487,7 @@ body.js.block-editor-page .media-frame select.attachment-filters:last-of-type {
559
487
  }
560
488
  @media (min-width: 782px) {
561
489
  .block-editor__container {
562
- min-height: calc(100vh - 32px);
563
- }
564
- body.is-fullscreen-mode .block-editor__container {
565
- min-height: 100vh;
490
+ min-height: calc(100vh - var(--wp-admin--admin-bar--height, 0px));
566
491
  }
567
492
  }
568
493
  .block-editor__container img {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/edit-post",
3
- "version": "8.50.0",
3
+ "version": "8.50.1-next.v.202607070741.0+a51d59513",
4
4
  "description": "Edit Post module for WordPress.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -47,38 +47,38 @@
47
47
  "postbox"
48
48
  ],
49
49
  "dependencies": {
50
- "@wordpress/a11y": "^4.50.0",
51
- "@wordpress/admin-ui": "^2.5.0",
52
- "@wordpress/api-fetch": "^7.50.0",
53
- "@wordpress/base-styles": "^10.2.0",
54
- "@wordpress/block-editor": "^15.23.0",
55
- "@wordpress/block-library": "^10.1.0",
56
- "@wordpress/blocks": "^15.23.0",
57
- "@wordpress/commands": "^1.50.0",
58
- "@wordpress/components": "^36.1.0",
59
- "@wordpress/compose": "^8.3.0",
60
- "@wordpress/core-data": "^7.50.0",
61
- "@wordpress/data": "^10.50.0",
62
- "@wordpress/deprecated": "^4.50.0",
63
- "@wordpress/dom": "^4.50.0",
64
- "@wordpress/editor": "^14.50.0",
65
- "@wordpress/element": "^8.2.0",
66
- "@wordpress/global-styles-engine": "^1.17.0",
67
- "@wordpress/hooks": "^4.50.0",
68
- "@wordpress/html-entities": "^4.50.0",
69
- "@wordpress/i18n": "^6.23.0",
70
- "@wordpress/icons": "^15.1.0",
71
- "@wordpress/keyboard-shortcuts": "^5.50.0",
72
- "@wordpress/keycodes": "^4.50.0",
73
- "@wordpress/notices": "^5.50.0",
74
- "@wordpress/plugins": "^7.50.0",
75
- "@wordpress/preferences": "^4.50.0",
76
- "@wordpress/private-apis": "^1.50.0",
77
- "@wordpress/ui": "^0.17.0",
78
- "@wordpress/url": "^4.50.0",
79
- "@wordpress/viewport": "^6.50.0",
80
- "@wordpress/warning": "^3.50.0",
81
- "@wordpress/widgets": "^4.50.0",
50
+ "@wordpress/a11y": "^4.50.1-next.v.202607070741.0+a51d59513",
51
+ "@wordpress/admin-ui": "^2.5.1-next.v.202607070741.0+a51d59513",
52
+ "@wordpress/api-fetch": "^7.50.1-next.v.202607070741.0+a51d59513",
53
+ "@wordpress/base-styles": "^10.3.1-next.v.202607070741.0+a51d59513",
54
+ "@wordpress/block-editor": "^16.0.1-next.v.202607070741.0+a51d59513",
55
+ "@wordpress/block-library": "^10.1.1-next.v.202607070741.0+a51d59513",
56
+ "@wordpress/blocks": "^15.23.1-next.v.202607070741.0+a51d59513",
57
+ "@wordpress/commands": "^1.50.1-next.v.202607070741.0+a51d59513",
58
+ "@wordpress/components": "^37.0.1-next.v.202607070741.0+a51d59513",
59
+ "@wordpress/compose": "^8.3.1-next.v.202607070741.0+a51d59513",
60
+ "@wordpress/core-data": "^7.50.1-next.v.202607070741.0+a51d59513",
61
+ "@wordpress/data": "^10.50.1-next.v.202607070741.0+a51d59513",
62
+ "@wordpress/deprecated": "^4.50.1-next.v.202607070741.0+a51d59513",
63
+ "@wordpress/dom": "^4.50.1-next.v.202607070741.0+a51d59513",
64
+ "@wordpress/editor": "^14.51.1-next.v.202607070741.0+a51d59513",
65
+ "@wordpress/element": "^8.2.1-next.v.202607070741.0+a51d59513",
66
+ "@wordpress/global-styles-engine": "^1.17.1-next.v.202607070741.0+a51d59513",
67
+ "@wordpress/hooks": "^4.50.1-next.v.202607070741.0+a51d59513",
68
+ "@wordpress/html-entities": "^4.50.1-next.v.202607070741.0+a51d59513",
69
+ "@wordpress/i18n": "^6.23.1-next.v.202607070741.0+a51d59513",
70
+ "@wordpress/icons": "^15.1.1-next.v.202607070741.0+a51d59513",
71
+ "@wordpress/keyboard-shortcuts": "^5.50.1-next.v.202607070741.0+a51d59513",
72
+ "@wordpress/keycodes": "^4.50.1-next.v.202607070741.0+a51d59513",
73
+ "@wordpress/notices": "^5.50.1-next.v.202607070741.0+a51d59513",
74
+ "@wordpress/plugins": "^7.50.1-next.v.202607070741.0+a51d59513",
75
+ "@wordpress/preferences": "^4.50.1-next.v.202607070741.0+a51d59513",
76
+ "@wordpress/private-apis": "^1.50.1-next.v.202607070741.0+a51d59513",
77
+ "@wordpress/ui": "^0.18.1-next.v.202607070741.0+a51d59513",
78
+ "@wordpress/url": "^4.50.1-next.v.202607070741.0+a51d59513",
79
+ "@wordpress/viewport": "^6.50.1-next.v.202607070741.0+a51d59513",
80
+ "@wordpress/warning": "^3.50.1-next.v.202607070741.0+a51d59513",
81
+ "@wordpress/widgets": "^4.50.1-next.v.202607070741.0+a51d59513",
82
82
  "clsx": "^2.1.1",
83
83
  "memize": "^2.1.0"
84
84
  },
@@ -94,5 +94,5 @@
94
94
  "publishConfig": {
95
95
  "access": "public"
96
96
  },
97
- "gitHead": "fee6e24e8e63d36f6bbcf487c193461e9bd79753"
97
+ "gitHead": "f637726e370c8b23695ed9af82adbe171ad235d8"
98
98
  }
@@ -1,122 +1,28 @@
1
- /**
2
- * External dependencies
3
- */
4
- import clsx from 'clsx';
5
-
6
1
  /**
7
2
  * WordPress dependencies
8
3
  */
9
4
  import { useSelect } from '@wordpress/data';
10
- import {
11
- Button,
12
- Icon as WCIcon,
13
- __unstableMotion as motion,
14
- } from '@wordpress/components';
5
+ import { Button, Icon as WCIcon } from '@wordpress/components';
15
6
  import { __, isRTL } from '@wordpress/i18n';
16
7
  import { addQueryArgs } from '@wordpress/url';
17
- import {
18
- wordpress,
19
- arrowUpLeft,
20
- arrowUpRight,
21
- chevronLeft,
22
- chevronRight,
23
- } from '@wordpress/icons';
8
+ import { chevronLeft, chevronRight } from '@wordpress/icons';
24
9
  import { store as editorStore } from '@wordpress/editor';
25
10
  import { store as coreStore } from '@wordpress/core-data';
26
- import { useReducedMotion } from '@wordpress/compose';
27
-
28
- const siteIconVariants = {
29
- edit: {
30
- clipPath: 'inset(0% round 0px)',
31
- },
32
- hover: {
33
- clipPath: 'inset( 22% round 2px )',
34
- },
35
- tap: {
36
- clipPath: 'inset(0% round 0px)',
37
- },
38
- };
39
-
40
- const toggleHomeIconVariants = {
41
- edit: {
42
- opacity: 0,
43
- scale: 0.2,
44
- },
45
- hover: {
46
- opacity: 1,
47
- scale: 1,
48
- clipPath: 'inset( 22% round 2px )',
49
- },
50
- };
51
11
 
52
12
  function FullscreenModeClose( { showTooltip, icon, href, initialPost } ) {
53
- const { isRequestingSiteIcon, postType, siteIconUrl } = useSelect(
13
+ const postType = useSelect(
54
14
  ( select ) => {
55
15
  const { getCurrentPostType } = select( editorStore );
56
- const { getEntityRecord, getPostType, isResolving } =
57
- select( coreStore );
58
- const siteData =
59
- getEntityRecord( 'root', '__unstableBase', undefined ) || {};
60
- const _postType = initialPost?.type || getCurrentPostType();
61
- return {
62
- isRequestingSiteIcon: isResolving( 'getEntityRecord', [
63
- 'root',
64
- '__unstableBase',
65
- undefined,
66
- ] ),
67
- postType: getPostType( _postType ),
68
- siteIconUrl: siteData.site_icon_url,
69
- };
16
+ const { getPostType } = select( coreStore );
17
+ return getPostType( initialPost?.type || getCurrentPostType() );
70
18
  },
71
19
  [ initialPost?.type ]
72
20
  );
73
21
 
74
- const disableMotion = useReducedMotion();
75
- const transition = {
76
- duration: disableMotion ? 0 : 0.2,
77
- };
78
-
79
22
  if ( ! postType ) {
80
23
  return null;
81
24
  }
82
25
 
83
- // Create SiteIcon equivalent structure exactly like edit-site
84
- let siteIconContent;
85
- if ( isRequestingSiteIcon && ! siteIconUrl ) {
86
- siteIconContent = (
87
- <div className="edit-post-fullscreen-mode-close-site-icon__image" />
88
- );
89
- } else if ( siteIconUrl ) {
90
- siteIconContent = (
91
- <img
92
- className="edit-post-fullscreen-mode-close-site-icon__image"
93
- alt={ __( 'Site Icon' ) }
94
- src={ siteIconUrl }
95
- />
96
- );
97
- } else {
98
- siteIconContent = (
99
- <WCIcon
100
- className="edit-post-fullscreen-mode-close-site-icon__icon"
101
- icon={ wordpress }
102
- size={ 48 }
103
- />
104
- );
105
- }
106
-
107
- // Override default icon if custom icon is provided via props.
108
- const buttonIcon = icon ? (
109
- <WCIcon size="36px" icon={ icon } />
110
- ) : (
111
- <div className="edit-post-fullscreen-mode-close-site-icon">
112
- { siteIconContent }
113
- </div>
114
- );
115
-
116
- const classes = clsx( 'edit-post-fullscreen-mode-close', {
117
- 'has-icon': siteIconUrl,
118
- } );
119
-
120
26
  const buttonHref =
121
27
  href ??
122
28
  addQueryArgs( 'edit.php', {
@@ -125,53 +31,22 @@ function FullscreenModeClose( { showTooltip, icon, href, initialPost } ) {
125
31
 
126
32
  const buttonLabel = postType?.labels?.view_items ?? __( 'Back' );
127
33
 
128
- const hasAdminBarInEditor = window.__experimentalAdminBarInEditor;
129
-
130
34
  return (
131
- <motion.div
132
- className="edit-post-fullscreen-mode-close__view-mode-toggle"
133
- animate="edit"
134
- initial="edit"
135
- whileHover="hover"
136
- whileTap="tap"
137
- transition={ transition }
138
- >
35
+ <div className="edit-post-fullscreen-mode-close__view-mode-toggle">
139
36
  <Button
140
37
  __next40pxDefaultSize
141
- className={ classes }
38
+ className="edit-post-fullscreen-mode-close"
142
39
  href={ buttonHref }
143
40
  label={ buttonLabel }
144
41
  showTooltip={ showTooltip }
145
42
  tooltipPosition="bottom"
146
- >
147
- { ! hasAdminBarInEditor && (
148
- <motion.div
149
- variants={ ! disableMotion && siteIconVariants }
150
- >
151
- <div className="edit-post-fullscreen-mode-close__view-mode-toggle-icon">
152
- { buttonIcon }
153
- </div>
154
- </motion.div>
155
- ) }
156
- </Button>
157
- { hasAdminBarInEditor ? (
158
- <div className="edit-post-fullscreen-mode-close__back-icon">
159
- <WCIcon icon={ isRTL() ? chevronRight : chevronLeft } />
160
- </div>
161
- ) : (
162
- <motion.div
163
- className={ clsx(
164
- 'edit-post-fullscreen-mode-close__back-icon',
165
- {
166
- 'has-site-icon': siteIconUrl,
167
- }
168
- ) }
169
- variants={ ! disableMotion && toggleHomeIconVariants }
170
- >
171
- <WCIcon icon={ isRTL() ? arrowUpRight : arrowUpLeft } />
172
- </motion.div>
173
- ) }
174
- </motion.div>
43
+ />
44
+ <div className="edit-post-fullscreen-mode-close__back-icon">
45
+ <WCIcon
46
+ icon={ icon ?? ( isRTL() ? chevronRight : chevronLeft ) }
47
+ />
48
+ </div>
49
+ </div>
175
50
  );
176
51
  }
177
52