@wordpress/edit-site 6.33.3-next.36001005c.0 → 6.33.4

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 (58) hide show
  1. package/build/components/dataviews-actions/index.js +8 -6
  2. package/build/components/dataviews-actions/index.js.map +2 -2
  3. package/build/components/global-styles-renderer/index.js +4 -2
  4. package/build/components/global-styles-renderer/index.js.map +3 -3
  5. package/build/components/page-templates/fields.js +19 -26
  6. package/build/components/page-templates/fields.js.map +2 -2
  7. package/build/components/page-templates/index.js +52 -39
  8. package/build/components/page-templates/index.js.map +2 -2
  9. package/build/components/page-templates/view-utils.js +4 -0
  10. package/build/components/page-templates/view-utils.js.map +2 -2
  11. package/build/components/revisions/index.js +2 -2
  12. package/build/components/revisions/index.js.map +2 -2
  13. package/build/components/sidebar-navigation-screen-templates-browse/content.js +8 -9
  14. package/build/components/sidebar-navigation-screen-templates-browse/content.js.map +2 -2
  15. package/build/components/style-book/index.js +8 -4
  16. package/build/components/style-book/index.js.map +2 -2
  17. package/build-module/components/dataviews-actions/index.js +8 -6
  18. package/build-module/components/dataviews-actions/index.js.map +2 -2
  19. package/build-module/components/global-styles-renderer/index.js +3 -1
  20. package/build-module/components/global-styles-renderer/index.js.map +2 -2
  21. package/build-module/components/page-templates/fields.js +19 -26
  22. package/build-module/components/page-templates/fields.js.map +2 -2
  23. package/build-module/components/page-templates/index.js +52 -39
  24. package/build-module/components/page-templates/index.js.map +2 -2
  25. package/build-module/components/page-templates/view-utils.js +4 -0
  26. package/build-module/components/page-templates/view-utils.js.map +2 -2
  27. package/build-module/components/revisions/index.js +1 -1
  28. package/build-module/components/revisions/index.js.map +2 -2
  29. package/build-module/components/sidebar-navigation-screen-templates-browse/content.js +9 -10
  30. package/build-module/components/sidebar-navigation-screen-templates-browse/content.js.map +2 -2
  31. package/build-module/components/style-book/index.js +6 -2
  32. package/build-module/components/style-book/index.js.map +2 -2
  33. package/build-style/posts-rtl.css +13 -13
  34. package/build-style/posts.css +13 -13
  35. package/build-style/style-rtl.css +23 -23
  36. package/build-style/style.css +23 -23
  37. package/package.json +44 -45
  38. package/src/components/dataviews-actions/index.js +12 -10
  39. package/src/components/global-styles/font-library-modal/style.scss +3 -3
  40. package/src/components/global-styles/style.scss +1 -1
  41. package/src/components/global-styles-renderer/index.js +4 -1
  42. package/src/components/global-styles-sidebar/style.scss +2 -2
  43. package/src/components/page-templates/fields.js +23 -29
  44. package/src/components/page-templates/index.js +62 -45
  45. package/src/components/page-templates/view-utils.js +7 -0
  46. package/src/components/revisions/index.js +1 -1
  47. package/src/components/sidebar-navigation-screen/style.scss +1 -1
  48. package/src/components/sidebar-navigation-screen-patterns/style.scss +1 -1
  49. package/src/components/sidebar-navigation-screen-templates-browse/content.js +9 -10
  50. package/src/components/site-hub/style.scss +1 -1
  51. package/src/components/style-book/index.js +6 -3
  52. package/tsconfig.json +0 -1
  53. package/tsconfig.tsbuildinfo +1 -1
  54. package/build/hooks/use-global-styles-output.js +0 -77
  55. package/build/hooks/use-global-styles-output.js.map +0 -7
  56. package/build-module/hooks/use-global-styles-output.js +0 -52
  57. package/build-module/hooks/use-global-styles-output.js.map +0 -7
  58. package/src/hooks/use-global-styles-output.js +0 -80
@@ -28,6 +28,13 @@ const DEFAULT_VIEW = {
28
28
  export function getDefaultView( activeView ) {
29
29
  return {
30
30
  ...DEFAULT_VIEW,
31
+ sort:
32
+ activeView === 'user'
33
+ ? {
34
+ field: 'date',
35
+ direction: 'desc',
36
+ }
37
+ : DEFAULT_VIEW.sort,
31
38
  filters: ! [ 'active', 'user' ].includes( activeView )
32
39
  ? [
33
40
  {
@@ -20,11 +20,11 @@ import { useContext, useMemo } from '@wordpress/element';
20
20
 
21
21
  import { unlock } from '../../lock-unlock';
22
22
  import EditorCanvasContainer from '../editor-canvas-container';
23
- import { useGlobalStylesOutputWithConfig } from '../../hooks/use-global-styles-output';
24
23
 
25
24
  const {
26
25
  ExperimentalBlockEditorProvider,
27
26
  GlobalStylesContext,
27
+ useGlobalStylesOutputWithConfig,
28
28
  __unstableBlockStyleVariationOverridesWithConfig,
29
29
  } = unlock( blockEditorPrivateApis );
30
30
  const { mergeBaseAndUserConfigs } = unlock( editorPrivateApis );
@@ -76,7 +76,7 @@
76
76
  color: $gray-300;
77
77
  font-size: 11px;
78
78
  text-transform: uppercase;
79
- font-weight: $font-weight-medium;
79
+ font-weight: 500;
80
80
  }
81
81
 
82
82
  .edit-site-sidebar-navigation-screen__content .edit-site-global-styles-variations_item {
@@ -22,7 +22,7 @@
22
22
 
23
23
  h2 {
24
24
  font-size: 11px;
25
- font-weight: $font-weight-medium;
25
+ font-weight: 500;
26
26
  text-transform: uppercase;
27
27
  }
28
28
  }
@@ -13,7 +13,7 @@ import { addQueryArgs } from '@wordpress/url';
13
13
  */
14
14
  import SidebarNavigationItem from '../sidebar-navigation-item';
15
15
  import { useAddedBy } from '../page-templates/hooks';
16
- import { layout } from '@wordpress/icons';
16
+ import { commentAuthorAvatar, published } from '@wordpress/icons';
17
17
  import { unlock } from '../../lock-unlock';
18
18
 
19
19
  const { useLocation } = unlock( routerPrivateApis );
@@ -38,13 +38,12 @@ export default function DataviewsTemplatesSidebarContent() {
38
38
  const {
39
39
  query: { activeView = 'active' },
40
40
  } = useLocation();
41
- const { records } = useEntityRecords(
42
- 'postType',
43
- 'wp_registered_template',
44
- {
45
- per_page: -1,
46
- }
47
- );
41
+ const { records } = useEntityRecords( 'root', 'registeredTemplate', {
42
+ // This should not be needed, the endpoint returns all registered
43
+ // templates, but it's not possible right now to turn off pagination for
44
+ // entity configs.
45
+ per_page: -1,
46
+ } );
48
47
  const firstItemPerAuthorText = useMemo( () => {
49
48
  const firstItemPerAuthor = records?.reduce( ( acc, template ) => {
50
49
  const author = template.author_text;
@@ -63,14 +62,14 @@ export default function DataviewsTemplatesSidebarContent() {
63
62
  <ItemGroup className="edit-site-sidebar-navigation-screen-templates-browse">
64
63
  <SidebarNavigationItem
65
64
  to="/template"
66
- icon={ layout }
65
+ icon={ published }
67
66
  aria-current={ activeView === 'active' }
68
67
  >
69
68
  { __( 'Active templates' ) }
70
69
  </SidebarNavigationItem>
71
70
  <SidebarNavigationItem
72
71
  to={ addQueryArgs( '/template', { activeView: 'user' } ) }
73
- icon={ layout }
72
+ icon={ commentAuthorAvatar }
74
73
  aria-current={ activeView === 'user' }
75
74
  >
76
75
  {
@@ -29,7 +29,7 @@
29
29
  display: block;
30
30
  flex-grow: 1;
31
31
  font-size: 15px;
32
- font-weight: $font-weight-medium;
32
+ font-weight: 500;
33
33
  overflow: hidden;
34
34
  // Add space for the ↗ to render.
35
35
  padding-right: $grid-unit-20;
@@ -56,10 +56,13 @@ import {
56
56
  STYLE_BOOK_COLOR_GROUPS,
57
57
  STYLE_BOOK_PREVIEW_CATEGORIES,
58
58
  } from '../style-book/constants';
59
- import { useGlobalStylesOutputWithConfig } from '../../hooks/use-global-styles-output';
60
59
 
61
- const { ExperimentalBlockEditorProvider, useGlobalStyle, GlobalStylesContext } =
62
- unlock( blockEditorPrivateApis );
60
+ const {
61
+ ExperimentalBlockEditorProvider,
62
+ useGlobalStyle,
63
+ GlobalStylesContext,
64
+ useGlobalStylesOutputWithConfig,
65
+ } = unlock( blockEditorPrivateApis );
63
66
  const { mergeBaseAndUserConfigs } = unlock( editorPrivateApis );
64
67
 
65
68
  const { Tabs } = unlock( componentsPrivateApis );
package/tsconfig.json CHANGED
@@ -21,7 +21,6 @@
21
21
  { "path": "../element" },
22
22
  { "path": "../escape-html" },
23
23
  { "path": "../fields" },
24
- { "path": "../global-styles-engine" },
25
24
  { "path": "../hooks" },
26
25
  { "path": "../html-entities" },
27
26
  { "path": "../i18n" },