@wordpress/edit-site 6.41.0 → 6.41.1-next.v.202603161435.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 (75) hide show
  1. package/build/components/layout/index.cjs +1 -1
  2. package/build/components/layout/index.cjs.map +2 -2
  3. package/build/components/page-patterns/fields.cjs +3 -3
  4. package/build/components/page-patterns/fields.cjs.map +2 -2
  5. package/build/components/page-patterns/use-pattern-settings.cjs +10 -1
  6. package/build/components/page-patterns/use-pattern-settings.cjs.map +3 -3
  7. package/build/components/page-templates/fields.cjs +3 -3
  8. package/build/components/page-templates/fields.cjs.map +2 -2
  9. package/build/components/post-list/quick-edit-modal.cjs +5 -0
  10. package/build/components/post-list/quick-edit-modal.cjs.map +2 -2
  11. package/build/components/sidebar-global-styles/index.cjs +8 -1
  12. package/build/components/sidebar-global-styles/index.cjs.map +3 -3
  13. package/build/components/sidebar-identity/index.cjs +87 -0
  14. package/build/components/sidebar-identity/index.cjs.map +7 -0
  15. package/build/components/sidebar-navigation-screen-identity/index.cjs +72 -0
  16. package/build/components/sidebar-navigation-screen-identity/index.cjs.map +7 -0
  17. package/build/components/sidebar-navigation-screen-main/index.cjs +10 -0
  18. package/build/components/sidebar-navigation-screen-main/index.cjs.map +2 -2
  19. package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.cjs +8 -1
  20. package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.cjs.map +3 -3
  21. package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.cjs +4 -1
  22. package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.cjs.map +3 -3
  23. package/build/components/site-editor-routes/identity.cjs +68 -0
  24. package/build/components/site-editor-routes/identity.cjs.map +7 -0
  25. package/build/components/site-editor-routes/index.cjs +2 -0
  26. package/build/components/site-editor-routes/index.cjs.map +2 -2
  27. package/build/index.cjs +3 -1
  28. package/build/index.cjs.map +2 -2
  29. package/build-module/components/layout/index.mjs +1 -1
  30. package/build-module/components/layout/index.mjs.map +2 -2
  31. package/build-module/components/page-patterns/fields.mjs +3 -3
  32. package/build-module/components/page-patterns/fields.mjs.map +2 -2
  33. package/build-module/components/page-patterns/use-pattern-settings.mjs +10 -1
  34. package/build-module/components/page-patterns/use-pattern-settings.mjs.map +2 -2
  35. package/build-module/components/page-templates/fields.mjs +3 -3
  36. package/build-module/components/page-templates/fields.mjs.map +2 -2
  37. package/build-module/components/post-list/quick-edit-modal.mjs +5 -0
  38. package/build-module/components/post-list/quick-edit-modal.mjs.map +2 -2
  39. package/build-module/components/sidebar-global-styles/index.mjs +8 -1
  40. package/build-module/components/sidebar-global-styles/index.mjs.map +2 -2
  41. package/build-module/components/sidebar-identity/index.mjs +66 -0
  42. package/build-module/components/sidebar-identity/index.mjs.map +7 -0
  43. package/build-module/components/sidebar-navigation-screen-identity/index.mjs +37 -0
  44. package/build-module/components/sidebar-navigation-screen-identity/index.mjs.map +7 -0
  45. package/build-module/components/sidebar-navigation-screen-main/index.mjs +18 -1
  46. package/build-module/components/sidebar-navigation-screen-main/index.mjs.map +2 -2
  47. package/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.mjs +8 -1
  48. package/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.mjs.map +2 -2
  49. package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.mjs +4 -1
  50. package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.mjs.map +2 -2
  51. package/build-module/components/site-editor-routes/identity.mjs +33 -0
  52. package/build-module/components/site-editor-routes/identity.mjs.map +7 -0
  53. package/build-module/components/site-editor-routes/index.mjs +2 -0
  54. package/build-module/components/site-editor-routes/index.mjs.map +2 -2
  55. package/build-module/index.mjs +3 -1
  56. package/build-module/index.mjs.map +2 -2
  57. package/build-style/style-rtl.css +178 -158
  58. package/build-style/style.css +178 -158
  59. package/package.json +46 -46
  60. package/src/components/layout/index.js +2 -1
  61. package/src/components/page-patterns/fields.js +3 -3
  62. package/src/components/page-patterns/use-pattern-settings.js +10 -1
  63. package/src/components/page-templates/fields.js +3 -3
  64. package/src/components/page-templates/style.scss +0 -45
  65. package/src/components/post-list/quick-edit-modal.js +5 -0
  66. package/src/components/post-list/style.scss +0 -9
  67. package/src/components/sidebar-global-styles/index.js +7 -0
  68. package/src/components/sidebar-identity/index.js +70 -0
  69. package/src/components/sidebar-navigation-screen-identity/index.js +38 -0
  70. package/src/components/sidebar-navigation-screen-main/index.js +16 -1
  71. package/src/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js +10 -1
  72. package/src/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +4 -1
  73. package/src/components/site-editor-routes/identity.js +39 -0
  74. package/src/components/site-editor-routes/index.js +2 -0
  75. package/src/index.js +2 -0
@@ -38,51 +38,6 @@
38
38
  }
39
39
  }
40
40
 
41
- .page-templates-author-field__avatar {
42
- flex-shrink: 0;
43
- overflow: hidden;
44
- width: $grid-unit-30;
45
- height: $grid-unit-30;
46
- align-items: center;
47
- justify-content: left;
48
- display: flex;
49
-
50
- img {
51
- width: $grid-unit-20;
52
- height: $grid-unit-20;
53
- object-fit: cover;
54
- opacity: 0;
55
- border-radius: 100%;
56
-
57
- @media not (prefers-reduced-motion) {
58
- transition: opacity 0.1s linear;
59
- }
60
- }
61
-
62
- &.is-loaded {
63
- img {
64
- opacity: 1;
65
- }
66
- }
67
- }
68
-
69
- .page-templates-author-field__icon {
70
- display: flex;
71
- flex-shrink: 0;
72
- width: $grid-unit-30;
73
- height: $grid-unit-30;
74
-
75
- svg {
76
- margin-left: -$grid-unit-05;
77
- fill: currentColor;
78
- }
79
- }
80
-
81
- .page-templates-author-field__name {
82
- text-overflow: ellipsis;
83
- overflow: hidden;
84
- }
85
-
86
41
  .edit-site-list__rename-modal {
87
42
  // The rename dropdown popover is open at the same time as the rename modal. The latter has to be higher.
88
43
  z-index: z-index(".edit-site-list__rename-modal");
@@ -101,6 +101,10 @@ export function QuickEditModal( { postType, postId, closeModal } ) {
101
101
  labelPosition: 'none',
102
102
  },
103
103
  },
104
+ {
105
+ id: 'post-content-info',
106
+ layout: { type: 'regular', labelPosition: 'none' },
107
+ },
104
108
  {
105
109
  id: 'status',
106
110
  label: __( 'Status' ),
@@ -109,6 +113,7 @@ export function QuickEditModal( { postType, postId, closeModal } ) {
109
113
  id: 'status',
110
114
  layout: { type: 'regular', labelPosition: 'none' },
111
115
  },
116
+ 'scheduled_date',
112
117
  'password',
113
118
  ],
114
119
  },
@@ -68,15 +68,6 @@
68
68
  }
69
69
  }
70
70
 
71
- .edit-site-post-list__status-icon {
72
- height: $grid-unit-30;
73
- width: $grid-unit-30;
74
- svg {
75
- fill: currentColor;
76
- margin-left: -$grid-unit-05;
77
- }
78
- }
79
-
80
71
  .fields-controls__password {
81
72
  border-top: $border-width solid $gray-200;
82
73
  padding-top: $grid-unit-20;
@@ -7,6 +7,7 @@ import { useMemo, useState } from '@wordpress/element';
7
7
  import { privateApis as routerPrivateApis } from '@wordpress/router';
8
8
  import { privateApis as editorPrivateApis } from '@wordpress/editor';
9
9
  import { useViewportMatch } from '@wordpress/compose';
10
+ import { useSelect } from '@wordpress/data';
10
11
  import { Button, __experimentalHStack as HStack } from '@wordpress/components';
11
12
  import { addQueryArgs, removeQueryArgs } from '@wordpress/url';
12
13
  import { seen } from '@wordpress/icons';
@@ -14,6 +15,7 @@ import { seen } from '@wordpress/icons';
14
15
  /**
15
16
  * Internal dependencies
16
17
  */
18
+ import { store as editSiteStore } from '../../store';
17
19
  import { unlock } from '../../lock-unlock';
18
20
 
19
21
  const { GlobalStylesUIWrapper, GlobalStylesActionMenu } =
@@ -82,6 +84,10 @@ export default function SidebarGlobalStyles() {
82
84
  );
83
85
  const isMobileViewport = useViewportMatch( 'medium', '<' );
84
86
  const [ section, onChangeSection ] = useSection();
87
+ const settings = useSelect(
88
+ ( select ) => select( editSiteStore ).getSettings(),
89
+ []
90
+ );
85
91
 
86
92
  return (
87
93
  <Page
@@ -101,6 +107,7 @@ export default function SidebarGlobalStyles() {
101
107
  <GlobalStylesUIWrapper
102
108
  path={ section }
103
109
  onPathChange={ onChangeSection }
110
+ settings={ settings }
104
111
  />
105
112
  </Page>
106
113
  );
@@ -0,0 +1,70 @@
1
+ /**
2
+ * WordPress dependencies
3
+ */
4
+ import { Page } from '@wordpress/admin-ui';
5
+ import { __ } from '@wordpress/i18n';
6
+ import { useSelect, useDispatch } from '@wordpress/data';
7
+ import { store as coreStore } from '@wordpress/core-data';
8
+ import { DataForm } from '@wordpress/dataviews';
9
+ import { MediaEdit } from '@wordpress/fields';
10
+
11
+ const fields = [
12
+ {
13
+ id: 'site_logo',
14
+ type: 'media',
15
+ label: __( 'Site Logo' ),
16
+ description: __(
17
+ "Displays in your site's layout via the Site Logo block."
18
+ ),
19
+ placeholder: __( 'Choose logo' ),
20
+ Edit: MediaEdit,
21
+ setValue: ( { value } ) => ( {
22
+ site_logo: value ?? 0,
23
+ } ),
24
+ },
25
+ {
26
+ id: 'site_icon',
27
+ type: 'media',
28
+ label: __( 'Site Icon' ),
29
+ description: __(
30
+ 'Shown in browser tabs, bookmarks, and mobile apps. It should be square and at least 512 by 512 pixels.'
31
+ ),
32
+ placeholder: __( 'Choose icon' ),
33
+ Edit: MediaEdit,
34
+ setValue: ( { value } ) => ( {
35
+ site_icon: value ?? 0,
36
+ } ),
37
+ },
38
+ ];
39
+
40
+ const form = {
41
+ layout: {
42
+ type: 'regular',
43
+ labelPosition: 'top',
44
+ },
45
+ fields: [ 'site_logo', 'site_icon' ],
46
+ };
47
+
48
+ export default function SidebarIdentity() {
49
+ const data = useSelect(
50
+ ( select ) =>
51
+ select( coreStore ).getEditedEntityRecord( 'root', 'site' ),
52
+ []
53
+ );
54
+ const { editEntityRecord } = useDispatch( coreStore );
55
+
56
+ const onChange = ( edits ) => {
57
+ editEntityRecord( 'root', 'site', undefined, edits );
58
+ };
59
+
60
+ return (
61
+ <Page title={ __( 'Identity' ) } hasPadding>
62
+ <DataForm
63
+ data={ data }
64
+ fields={ fields }
65
+ form={ form }
66
+ onChange={ onChange }
67
+ />
68
+ </Page>
69
+ );
70
+ }
@@ -0,0 +1,38 @@
1
+ /**
2
+ * WordPress dependencies
3
+ */
4
+ import { __ } from '@wordpress/i18n';
5
+ import { privateApis as routerPrivateApis } from '@wordpress/router';
6
+
7
+ /**
8
+ * Internal dependencies
9
+ */
10
+ import SidebarNavigationScreen from '../sidebar-navigation-screen';
11
+ import { unlock } from '../../lock-unlock';
12
+ import SidebarNavigationItem from '../sidebar-navigation-item';
13
+ import { MainSidebarNavigationContent } from '../sidebar-navigation-screen-main';
14
+
15
+ const { useLocation } = unlock( routerPrivateApis );
16
+
17
+ export function SidebarNavigationItemIdentity( props ) {
18
+ const { name } = useLocation();
19
+ return (
20
+ <SidebarNavigationItem
21
+ { ...props }
22
+ aria-current={ name === 'identity' }
23
+ />
24
+ );
25
+ }
26
+
27
+ export default function SidebarNavigationScreenIdentity() {
28
+ return (
29
+ <SidebarNavigationScreen
30
+ isRoot
31
+ title={ __( 'Design' ) }
32
+ description={ __(
33
+ 'Customize the appearance of your website using the block editor.'
34
+ ) }
35
+ content={ <MainSidebarNavigationContent /> }
36
+ />
37
+ );
38
+ }
@@ -3,7 +3,14 @@
3
3
  */
4
4
  import { __experimentalItemGroup as ItemGroup } from '@wordpress/components';
5
5
  import { __ } from '@wordpress/i18n';
6
- import { layout, symbol, navigation, styles, page } from '@wordpress/icons';
6
+ import {
7
+ layout,
8
+ symbol,
9
+ navigation,
10
+ styles,
11
+ page,
12
+ siteLogo,
13
+ } from '@wordpress/icons';
7
14
  import { useSelect } from '@wordpress/data';
8
15
  import { store as coreStore } from '@wordpress/core-data';
9
16
 
@@ -13,6 +20,7 @@ import { store as coreStore } from '@wordpress/core-data';
13
20
  import SidebarNavigationScreen from '../sidebar-navigation-screen';
14
21
  import SidebarNavigationItem from '../sidebar-navigation-item';
15
22
  import { SidebarNavigationItemGlobalStyles } from '../sidebar-navigation-screen-global-styles';
23
+ import { SidebarNavigationItemIdentity } from '../sidebar-navigation-screen-identity';
16
24
 
17
25
  export function MainSidebarNavigationContent( { isBlockBasedTheme = true } ) {
18
26
  return (
@@ -34,6 +42,13 @@ export function MainSidebarNavigationContent( { isBlockBasedTheme = true } ) {
34
42
  >
35
43
  { __( 'Navigation' ) }
36
44
  </SidebarNavigationItem>
45
+ <SidebarNavigationItemIdentity
46
+ to="/identity"
47
+ uid="identity-navigation-item"
48
+ icon={ siteLogo }
49
+ >
50
+ { __( 'Identity' ) }
51
+ </SidebarNavigationItemIdentity>
37
52
  <SidebarNavigationItem
38
53
  uid="page-navigation-item"
39
54
  to="/page"
@@ -5,6 +5,7 @@ import { useMemo } from '@wordpress/element';
5
5
  import { useSelect } from '@wordpress/data';
6
6
  import { BlockEditorProvider } from '@wordpress/block-editor';
7
7
  import { createBlock } from '@wordpress/blocks';
8
+ import { __experimentalFetchLinkSuggestions as fetchLinkSuggestions } from '@wordpress/core-data';
8
9
 
9
10
  /**
10
11
  * Internal dependencies
@@ -24,6 +25,14 @@ export default function NavigationMenuEditor( { navigationMenuId } ) {
24
25
  };
25
26
  }, [] );
26
27
 
28
+ const settings = useMemo( () => {
29
+ return {
30
+ ...storedSettings,
31
+ __experimentalFetchLinkSuggestions: ( search, searchOptions ) =>
32
+ fetchLinkSuggestions( search, searchOptions, storedSettings ),
33
+ };
34
+ }, [ storedSettings ] );
35
+
27
36
  const blocks = useMemo( () => {
28
37
  if ( ! navigationMenuId ) {
29
38
  return [];
@@ -38,7 +47,7 @@ export default function NavigationMenuEditor( { navigationMenuId } ) {
38
47
 
39
48
  return (
40
49
  <BlockEditorProvider
41
- settings={ storedSettings }
50
+ settings={ settings }
42
51
  value={ blocks }
43
52
  onChange={ noop }
44
53
  onInput={ noop }
@@ -10,6 +10,7 @@ import { useDispatch, useSelect } from '@wordpress/data';
10
10
  import { createBlock } from '@wordpress/blocks';
11
11
  import { useCallback } from '@wordpress/element';
12
12
  import { store as coreStore } from '@wordpress/core-data';
13
+ import { privateApis as blockLibraryPrivateApis } from '@wordpress/block-library';
13
14
 
14
15
  /**
15
16
  * Internal dependencies
@@ -18,6 +19,7 @@ import { unlock } from '../../lock-unlock';
18
19
  import LeafMoreMenu from './leaf-more-menu';
19
20
 
20
21
  const { PrivateListView } = unlock( blockEditorPrivateApis );
22
+ const { NavigationLinkUI } = unlock( blockLibraryPrivateApis );
21
23
 
22
24
  // Needs to be kept in sync with the query used at packages/block-library/src/page-list/edit.js.
23
25
  const MAX_PAGE_COUNT = 100;
@@ -101,7 +103,8 @@ export default function NavigationMenuContent( { rootClientId } ) {
101
103
  rootClientId={ listViewRootClientId }
102
104
  onSelect={ offCanvasOnselect }
103
105
  blockSettingsMenu={ LeafMoreMenu }
104
- showAppender={ false }
106
+ showAppender
107
+ additionalBlockContent={ NavigationLinkUI }
105
108
  isExpanded
106
109
  />
107
110
  ) }
@@ -0,0 +1,39 @@
1
+ /**
2
+ * WordPress dependencies
3
+ */
4
+ import { privateApis as routerPrivateApis } from '@wordpress/router';
5
+
6
+ /**
7
+ * Internal dependencies
8
+ */
9
+ import Editor from '../editor';
10
+ import { unlock } from '../../lock-unlock';
11
+ import SidebarNavigationScreenIdentity from '../sidebar-navigation-screen-identity';
12
+ import SidebarIdentity from '../sidebar-identity';
13
+
14
+ const { useLocation } = unlock( routerPrivateApis );
15
+
16
+ function MobileIdentityView() {
17
+ const { query = {} } = useLocation();
18
+ const { canvas } = query;
19
+
20
+ if ( canvas === 'edit' ) {
21
+ return <Editor />;
22
+ }
23
+
24
+ return <SidebarIdentity />;
25
+ }
26
+
27
+ export const identityRoute = {
28
+ name: 'identity',
29
+ path: '/identity',
30
+ areas: {
31
+ sidebar: <SidebarNavigationScreenIdentity />,
32
+ content: <SidebarIdentity />,
33
+ preview: <Editor />,
34
+ mobile: <MobileIdentityView />,
35
+ },
36
+ widths: {
37
+ content: 380,
38
+ },
39
+ };
@@ -10,6 +10,7 @@ import { useEffect } from '@wordpress/element';
10
10
  import { unlock } from '../../lock-unlock';
11
11
  import { store as siteEditorStore } from '../../store';
12
12
  import { homeRoute } from './home';
13
+ import { identityRoute } from './identity';
13
14
  import { stylesRoute } from './styles';
14
15
  import { navigationRoute } from './navigation';
15
16
  import { navigationItemRoute } from './navigation-item';
@@ -35,6 +36,7 @@ const routes = [
35
36
  patternsRoute,
36
37
  navigationItemRoute,
37
38
  navigationRoute,
39
+ identityRoute,
38
40
  stylesRoute,
39
41
  homeRoute,
40
42
  stylebookRoute,
package/src/index.js CHANGED
@@ -73,6 +73,8 @@ export function initializeEditor( id, settings ) {
73
73
  showBlockBreadcrumbs: true,
74
74
  showListViewByDefault: false,
75
75
  enableChoosePatternModal: true,
76
+ showCollaborationCursor: false,
77
+ showCollaborationNotifications: true,
76
78
  } );
77
79
 
78
80
  if ( window.__clientSideMediaProcessing ) {