@wordpress/editor 14.21.0 → 14.22.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 (32) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/components/post-actions/set-as-homepage.js +1 -0
  3. package/build/components/post-actions/set-as-homepage.js.map +1 -1
  4. package/build/components/post-actions/set-as-posts-page.js +1 -0
  5. package/build/components/post-actions/set-as-posts-page.js.map +1 -1
  6. package/build/components/post-template/create-new-template-modal.js +6 -2
  7. package/build/components/post-template/create-new-template-modal.js.map +1 -1
  8. package/build/components/start-page-options/index.js +2 -1
  9. package/build/components/start-page-options/index.js.map +1 -1
  10. package/build-module/components/post-actions/set-as-homepage.js +1 -0
  11. package/build-module/components/post-actions/set-as-homepage.js.map +1 -1
  12. package/build-module/components/post-actions/set-as-posts-page.js +1 -0
  13. package/build-module/components/post-actions/set-as-posts-page.js.map +1 -1
  14. package/build-module/components/post-template/create-new-template-modal.js +6 -2
  15. package/build-module/components/post-template/create-new-template-modal.js.map +1 -1
  16. package/build-module/components/start-page-options/index.js +2 -1
  17. package/build-module/components/start-page-options/index.js.map +1 -1
  18. package/build-style/style-rtl.css +1 -0
  19. package/build-style/style.css +1 -0
  20. package/build-types/components/post-actions/set-as-homepage.d.ts +1 -0
  21. package/build-types/components/post-actions/set-as-homepage.d.ts.map +1 -1
  22. package/build-types/components/post-actions/set-as-posts-page.d.ts +1 -0
  23. package/build-types/components/post-actions/set-as-posts-page.d.ts.map +1 -1
  24. package/build-types/components/post-template/create-new-template-modal.d.ts.map +1 -1
  25. package/build-types/components/start-page-options/index.d.ts.map +1 -1
  26. package/package.json +37 -37
  27. package/src/components/post-actions/set-as-homepage.js +1 -0
  28. package/src/components/post-actions/set-as-posts-page.js +1 -0
  29. package/src/components/post-publish-panel/style.scss +1 -0
  30. package/src/components/post-template/create-new-template-modal.js +6 -2
  31. package/src/components/start-page-options/index.js +3 -1
  32. package/tsconfig.tsbuildinfo +1 -1
@@ -1828,6 +1828,7 @@ body.is-fullscreen-mode .interface-interface-skeleton {
1828
1828
  .post-publish-panel__postpublish .components-panel__body {
1829
1829
  border-bottom: 1px solid #e0e0e0;
1830
1830
  border-top: none;
1831
+ word-break: break-word;
1831
1832
  }
1832
1833
 
1833
1834
  .post-publish-panel__postpublish-buttons {
@@ -2,6 +2,7 @@ export function useSetAsHomepageAction(): {
2
2
  id: string;
3
3
  label: string;
4
4
  isEligible(post: any): boolean;
5
+ modalFocusOnMount: string;
5
6
  RenderModal: ({ items, closeModal }: {
6
7
  items: any;
7
8
  closeModal: any;
@@ -1 +1 @@
1
- {"version":3,"file":"set-as-homepage.d.ts","sourceRoot":"","sources":["../../../src/components/post-actions/set-as-homepage.js"],"names":[],"mappings":"AA0HO;;;;;;;;EA4CN"}
1
+ {"version":3,"file":"set-as-homepage.d.ts","sourceRoot":"","sources":["../../../src/components/post-actions/set-as-homepage.js"],"names":[],"mappings":"AA0HO;;;;;;;;;EA6CN"}
@@ -2,6 +2,7 @@ export function useSetAsPostsPageAction(): {
2
2
  id: string;
3
3
  label: string;
4
4
  isEligible(post: any): boolean;
5
+ modalFocusOnMount: string;
5
6
  RenderModal: ({ items, closeModal }: {
6
7
  items: any;
7
8
  closeModal: any;
@@ -1 +1 @@
1
- {"version":3,"file":"set-as-posts-page.d.ts","sourceRoot":"","sources":["../../../src/components/post-actions/set-as-posts-page.js"],"names":[],"mappings":"AAsHO;;;;;;;;EA6CN"}
1
+ {"version":3,"file":"set-as-posts-page.d.ts","sourceRoot":"","sources":["../../../src/components/post-actions/set-as-posts-page.js"],"names":[],"mappings":"AAsHO;;;;;;;;;EA8CN"}
@@ -1 +1 @@
1
- {"version":3,"file":"create-new-template-modal.d.ts","sourceRoot":"","sources":["../../../src/components/post-template/create-new-template-modal.js"],"names":[],"mappings":"AAwBA;;gCAoIC"}
1
+ {"version":3,"file":"create-new-template-modal.d.ts","sourceRoot":"","sources":["../../../src/components/post-template/create-new-template-modal.js"],"names":[],"mappings":"AA4BA;;gCAoIC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/start-page-options/index.js"],"names":[],"mappings":"AAqBA,wCA0CC;AA8ED,+EA0CC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/start-page-options/index.js"],"names":[],"mappings":"AAsBA,wCA0CC;AA8ED,+EA2CC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/editor",
3
- "version": "14.21.0",
3
+ "version": "14.22.0",
4
4
  "description": "Enhanced block editor for WordPress posts.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -34,41 +34,41 @@
34
34
  ],
35
35
  "dependencies": {
36
36
  "@babel/runtime": "7.25.7",
37
- "@wordpress/a11y": "^4.21.0",
38
- "@wordpress/api-fetch": "^7.21.0",
39
- "@wordpress/blob": "^4.21.0",
40
- "@wordpress/block-editor": "^14.16.0",
41
- "@wordpress/blocks": "^14.10.0",
42
- "@wordpress/commands": "^1.21.0",
43
- "@wordpress/components": "^29.7.0",
44
- "@wordpress/compose": "^7.21.0",
45
- "@wordpress/core-data": "^7.21.0",
46
- "@wordpress/data": "^10.21.0",
47
- "@wordpress/dataviews": "^4.17.0",
48
- "@wordpress/date": "^5.21.0",
49
- "@wordpress/deprecated": "^4.21.0",
50
- "@wordpress/dom": "^4.21.0",
51
- "@wordpress/element": "^6.21.0",
52
- "@wordpress/fields": "^0.13.0",
53
- "@wordpress/hooks": "^4.21.0",
54
- "@wordpress/html-entities": "^4.21.0",
55
- "@wordpress/i18n": "^5.21.0",
56
- "@wordpress/icons": "^10.21.0",
57
- "@wordpress/interface": "^9.6.0",
58
- "@wordpress/keyboard-shortcuts": "^5.21.0",
59
- "@wordpress/keycodes": "^4.21.0",
60
- "@wordpress/media-utils": "^5.21.0",
61
- "@wordpress/notices": "^5.21.0",
62
- "@wordpress/patterns": "^2.21.0",
63
- "@wordpress/plugins": "^7.21.0",
64
- "@wordpress/preferences": "^4.21.0",
65
- "@wordpress/private-apis": "^1.21.0",
66
- "@wordpress/reusable-blocks": "^5.21.0",
67
- "@wordpress/rich-text": "^7.21.0",
68
- "@wordpress/server-side-render": "^5.21.0",
69
- "@wordpress/url": "^4.21.0",
70
- "@wordpress/warning": "^3.21.0",
71
- "@wordpress/wordcount": "^4.21.0",
37
+ "@wordpress/a11y": "^4.22.0",
38
+ "@wordpress/api-fetch": "^7.22.0",
39
+ "@wordpress/blob": "^4.22.0",
40
+ "@wordpress/block-editor": "^14.17.0",
41
+ "@wordpress/blocks": "^14.11.0",
42
+ "@wordpress/commands": "^1.22.0",
43
+ "@wordpress/components": "^29.8.0",
44
+ "@wordpress/compose": "^7.22.0",
45
+ "@wordpress/core-data": "^7.22.0",
46
+ "@wordpress/data": "^10.22.0",
47
+ "@wordpress/dataviews": "^4.18.0",
48
+ "@wordpress/date": "^5.22.0",
49
+ "@wordpress/deprecated": "^4.22.0",
50
+ "@wordpress/dom": "^4.22.0",
51
+ "@wordpress/element": "^6.22.0",
52
+ "@wordpress/fields": "^0.14.0",
53
+ "@wordpress/hooks": "^4.22.0",
54
+ "@wordpress/html-entities": "^4.22.0",
55
+ "@wordpress/i18n": "^5.22.0",
56
+ "@wordpress/icons": "^10.22.0",
57
+ "@wordpress/interface": "^9.7.0",
58
+ "@wordpress/keyboard-shortcuts": "^5.22.0",
59
+ "@wordpress/keycodes": "^4.22.0",
60
+ "@wordpress/media-utils": "^5.22.0",
61
+ "@wordpress/notices": "^5.22.0",
62
+ "@wordpress/patterns": "^2.22.0",
63
+ "@wordpress/plugins": "^7.22.0",
64
+ "@wordpress/preferences": "^4.22.0",
65
+ "@wordpress/private-apis": "^1.22.0",
66
+ "@wordpress/reusable-blocks": "^5.22.0",
67
+ "@wordpress/rich-text": "^7.22.0",
68
+ "@wordpress/server-side-render": "^5.22.0",
69
+ "@wordpress/url": "^4.22.0",
70
+ "@wordpress/warning": "^3.22.0",
71
+ "@wordpress/wordcount": "^4.22.0",
72
72
  "change-case": "^4.1.2",
73
73
  "client-zip": "^2.4.5",
74
74
  "clsx": "^2.1.1",
@@ -88,5 +88,5 @@
88
88
  "publishConfig": {
89
89
  "access": "public"
90
90
  },
91
- "gitHead": "104af00f9abcd7a4d36b87e648f148c72cc4ea5f"
91
+ "gitHead": "01a314d7e46a50101e328fdb11959c441e49372d"
92
92
  }
@@ -160,6 +160,7 @@ export const useSetAsHomepageAction = () => {
160
160
 
161
161
  return true;
162
162
  },
163
+ modalFocusOnMount: 'firstContentElement',
163
164
  RenderModal: SetAsHomepageModal,
164
165
  } ),
165
166
  [ pageForPosts, pageOnFront ]
@@ -157,6 +157,7 @@ export const useSetAsPostsPageAction = () => {
157
157
 
158
158
  return true;
159
159
  },
160
+ modalFocusOnMount: 'firstContentElement',
160
161
  RenderModal: SetAsPostsPageModal,
161
162
  } ),
162
163
  [ pageForPosts, pageOnFront ]
@@ -129,6 +129,7 @@
129
129
  .post-publish-panel__postpublish .components-panel__body {
130
130
  border-bottom: $border-width solid $gray-200;
131
131
  border-top: none;
132
+ word-break: break-word;
132
133
  }
133
134
 
134
135
  .post-publish-panel__postpublish-buttons {
@@ -1,3 +1,8 @@
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import { paramCase as kebabCase } from 'change-case';
5
+
1
6
  /**
2
7
  * WordPress dependencies
3
8
  */
@@ -12,7 +17,6 @@ import {
12
17
  __experimentalVStack as VStack,
13
18
  } from '@wordpress/components';
14
19
  import { __ } from '@wordpress/i18n';
15
- import { cleanForSlug } from '@wordpress/url';
16
20
 
17
21
  /**
18
22
  * Internal dependencies
@@ -92,7 +96,7 @@ export default function CreateNewTemplateModal( { onClose } ) {
92
96
  ] );
93
97
 
94
98
  const newTemplate = await createTemplate( {
95
- slug: cleanForSlug( title || DEFAULT_TITLE ),
99
+ slug: kebabCase( title || DEFAULT_TITLE ) || 'wp-custom-template',
96
100
  content: newTemplateContent,
97
101
  title: title || DEFAULT_TITLE,
98
102
  } );
@@ -17,6 +17,7 @@ import { store as interfaceStore } from '@wordpress/interface';
17
17
  /**
18
18
  * Internal dependencies
19
19
  */
20
+ import { TEMPLATE_POST_TYPE } from '../../store/constants';
20
21
  import { store as editorStore } from '../../store';
21
22
 
22
23
  export function useStartPatterns() {
@@ -152,7 +153,8 @@ export default function StartPageOptions() {
152
153
  return {
153
154
  postId: getCurrentPostId(),
154
155
  enabled:
155
- choosePatternModalEnabled && 'page' === getCurrentPostType(),
156
+ choosePatternModalEnabled &&
157
+ TEMPLATE_POST_TYPE !== getCurrentPostType(),
156
158
  };
157
159
  }, [] );
158
160