@wordpress/editor 13.23.0 → 13.24.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 (112) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/components/entities-saved-states/index.js +15 -1
  3. package/build/components/entities-saved-states/index.js.map +1 -1
  4. package/build/components/index.js +26 -2
  5. package/build/components/index.js.map +1 -1
  6. package/build/components/post-author/panel.js +24 -0
  7. package/build/components/post-author/panel.js.map +1 -0
  8. package/build/components/post-panel-row/index.js +36 -0
  9. package/build/components/post-panel-row/index.js.map +1 -0
  10. package/build/components/post-saved-state/index.js +21 -16
  11. package/build/components/post-saved-state/index.js.map +1 -1
  12. package/build/components/post-schedule/panel.js +67 -0
  13. package/build/components/post-schedule/panel.js.map +1 -0
  14. package/build/components/post-sync-status/index.js +8 -4
  15. package/build/components/post-sync-status/index.js.map +1 -1
  16. package/build/components/post-title/constants.js +11 -0
  17. package/build/components/post-title/constants.js.map +1 -0
  18. package/build/components/post-title/index.js +61 -89
  19. package/build/components/post-title/index.js.map +1 -1
  20. package/build/components/post-title/post-title-raw.js +92 -0
  21. package/build/components/post-title/post-title-raw.js.map +1 -0
  22. package/build/components/post-title/use-post-title-focus.js +64 -0
  23. package/build/components/post-title/use-post-title-focus.js.map +1 -0
  24. package/build/components/post-title/use-post-title.js +41 -0
  25. package/build/components/post-title/use-post-title.js.map +1 -0
  26. package/build/components/post-url/panel.js +4 -3
  27. package/build/components/post-url/panel.js.map +1 -1
  28. package/build/components/provider/constants.js +9 -0
  29. package/build/components/provider/constants.js.map +1 -0
  30. package/build/components/provider/disable-non-page-content-blocks.js +63 -0
  31. package/build/components/provider/disable-non-page-content-blocks.js.map +1 -0
  32. package/build/components/provider/index.js +8 -7
  33. package/build/components/provider/index.js.map +1 -1
  34. package/build/private-apis.js +2 -0
  35. package/build/private-apis.js.map +1 -1
  36. package/build/store/actions.js +23 -2
  37. package/build/store/actions.js.map +1 -1
  38. package/build/store/reducer.js +10 -1
  39. package/build/store/reducer.js.map +1 -1
  40. package/build/store/selectors.js +16 -2
  41. package/build/store/selectors.js.map +1 -1
  42. package/build-module/components/entities-saved-states/index.js +16 -2
  43. package/build-module/components/entities-saved-states/index.js.map +1 -1
  44. package/build-module/components/index.js +3 -0
  45. package/build-module/components/index.js.map +1 -1
  46. package/build-module/components/post-author/panel.js +14 -0
  47. package/build-module/components/post-author/panel.js.map +1 -0
  48. package/build-module/components/post-panel-row/index.js +27 -0
  49. package/build-module/components/post-panel-row/index.js.map +1 -0
  50. package/build-module/components/post-saved-state/index.js +22 -17
  51. package/build-module/components/post-saved-state/index.js.map +1 -1
  52. package/build-module/components/post-schedule/panel.js +59 -0
  53. package/build-module/components/post-schedule/panel.js.map +1 -0
  54. package/build-module/components/post-sync-status/index.js +8 -5
  55. package/build-module/components/post-sync-status/index.js.map +1 -1
  56. package/build-module/components/post-title/constants.js +3 -0
  57. package/build-module/components/post-title/constants.js.map +1 -0
  58. package/build-module/components/post-title/index.js +62 -91
  59. package/build-module/components/post-title/index.js.map +1 -1
  60. package/build-module/components/post-title/post-title-raw.js +83 -0
  61. package/build-module/components/post-title/post-title-raw.js.map +1 -0
  62. package/build-module/components/post-title/use-post-title-focus.js +57 -0
  63. package/build-module/components/post-title/use-post-title-focus.js.map +1 -0
  64. package/build-module/components/post-title/use-post-title.js +33 -0
  65. package/build-module/components/post-title/use-post-title.js.map +1 -0
  66. package/build-module/components/post-url/panel.js +5 -4
  67. package/build-module/components/post-url/panel.js.map +1 -1
  68. package/build-module/components/provider/constants.js +2 -0
  69. package/build-module/components/provider/constants.js.map +1 -0
  70. package/build-module/components/provider/disable-non-page-content-blocks.js +56 -0
  71. package/build-module/components/provider/disable-non-page-content-blocks.js.map +1 -0
  72. package/build-module/components/provider/index.js +6 -4
  73. package/build-module/components/provider/index.js.map +1 -1
  74. package/build-module/private-apis.js +2 -0
  75. package/build-module/private-apis.js.map +1 -1
  76. package/build-module/store/actions.js +21 -0
  77. package/build-module/store/actions.js.map +1 -1
  78. package/build-module/store/reducer.js +9 -1
  79. package/build-module/store/reducer.js.map +1 -1
  80. package/build-module/store/selectors.js +11 -0
  81. package/build-module/store/selectors.js.map +1 -1
  82. package/build-style/style-rtl.css +51 -18
  83. package/build-style/style.css +51 -18
  84. package/package.json +31 -31
  85. package/src/components/entities-saved-states/index.js +16 -1
  86. package/src/components/index.js +3 -0
  87. package/src/components/post-author/panel.js +18 -0
  88. package/src/components/post-author/style.scss +7 -0
  89. package/src/components/post-panel-row/index.js +26 -0
  90. package/src/components/post-panel-row/style.scss +21 -0
  91. package/src/components/post-saved-state/index.js +46 -37
  92. package/src/components/post-schedule/panel.js +65 -0
  93. package/src/components/post-schedule/style.scss +23 -0
  94. package/src/components/post-sync-status/index.js +5 -6
  95. package/src/components/post-sync-status/style.scss +3 -17
  96. package/src/components/post-title/constants.js +4 -0
  97. package/src/components/post-title/index.js +56 -87
  98. package/src/components/post-title/post-title-raw.js +82 -0
  99. package/src/components/post-title/style.scss +5 -0
  100. package/src/components/post-title/use-post-title-focus.js +50 -0
  101. package/src/components/post-title/use-post-title.js +25 -0
  102. package/src/components/post-url/panel.js +4 -8
  103. package/src/components/post-url/style.scss +1 -12
  104. package/src/components/provider/README.md +0 -13
  105. package/src/components/provider/constants.js +5 -0
  106. package/src/components/provider/disable-non-page-content-blocks.js +55 -0
  107. package/src/components/provider/index.js +19 -9
  108. package/src/private-apis.js +2 -0
  109. package/src/store/actions.js +21 -0
  110. package/src/store/reducer.js +10 -0
  111. package/src/store/selectors.js +11 -0
  112. package/src/style.scss +4 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/editor",
3
- "version": "13.23.0",
3
+ "version": "13.24.0",
4
4
  "description": "Enhanced block editor for WordPress posts.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -31,35 +31,35 @@
31
31
  ],
32
32
  "dependencies": {
33
33
  "@babel/runtime": "^7.16.0",
34
- "@wordpress/a11y": "^3.46.0",
35
- "@wordpress/api-fetch": "^6.43.0",
36
- "@wordpress/blob": "^3.46.0",
37
- "@wordpress/block-editor": "^12.14.0",
38
- "@wordpress/blocks": "^12.23.0",
39
- "@wordpress/components": "^25.12.0",
40
- "@wordpress/compose": "^6.23.0",
41
- "@wordpress/core-data": "^6.23.0",
42
- "@wordpress/data": "^9.16.0",
43
- "@wordpress/date": "^4.46.0",
44
- "@wordpress/deprecated": "^3.46.0",
45
- "@wordpress/dom": "^3.46.0",
46
- "@wordpress/element": "^5.23.0",
47
- "@wordpress/hooks": "^3.46.0",
48
- "@wordpress/html-entities": "^3.46.0",
49
- "@wordpress/i18n": "^4.46.0",
50
- "@wordpress/icons": "^9.37.0",
51
- "@wordpress/keyboard-shortcuts": "^4.23.0",
52
- "@wordpress/keycodes": "^3.46.0",
53
- "@wordpress/media-utils": "^4.37.0",
54
- "@wordpress/notices": "^4.14.0",
55
- "@wordpress/patterns": "^1.7.0",
56
- "@wordpress/preferences": "^3.23.0",
57
- "@wordpress/private-apis": "^0.28.0",
58
- "@wordpress/reusable-blocks": "^4.23.0",
59
- "@wordpress/rich-text": "^6.23.0",
60
- "@wordpress/server-side-render": "^4.23.0",
61
- "@wordpress/url": "^3.47.0",
62
- "@wordpress/wordcount": "^3.46.0",
34
+ "@wordpress/a11y": "^3.47.0",
35
+ "@wordpress/api-fetch": "^6.44.0",
36
+ "@wordpress/blob": "^3.47.0",
37
+ "@wordpress/block-editor": "^12.15.0",
38
+ "@wordpress/blocks": "^12.24.0",
39
+ "@wordpress/components": "^25.13.0",
40
+ "@wordpress/compose": "^6.24.0",
41
+ "@wordpress/core-data": "^6.24.0",
42
+ "@wordpress/data": "^9.17.0",
43
+ "@wordpress/date": "^4.47.0",
44
+ "@wordpress/deprecated": "^3.47.0",
45
+ "@wordpress/dom": "^3.47.0",
46
+ "@wordpress/element": "^5.24.0",
47
+ "@wordpress/hooks": "^3.47.0",
48
+ "@wordpress/html-entities": "^3.47.0",
49
+ "@wordpress/i18n": "^4.47.0",
50
+ "@wordpress/icons": "^9.38.0",
51
+ "@wordpress/keyboard-shortcuts": "^4.24.0",
52
+ "@wordpress/keycodes": "^3.47.0",
53
+ "@wordpress/media-utils": "^4.38.0",
54
+ "@wordpress/notices": "^4.15.0",
55
+ "@wordpress/patterns": "^1.8.0",
56
+ "@wordpress/preferences": "^3.24.0",
57
+ "@wordpress/private-apis": "^0.29.0",
58
+ "@wordpress/reusable-blocks": "^4.24.0",
59
+ "@wordpress/rich-text": "^6.24.0",
60
+ "@wordpress/server-side-render": "^4.24.0",
61
+ "@wordpress/url": "^3.48.0",
62
+ "@wordpress/wordcount": "^3.47.0",
63
63
  "classnames": "^2.3.1",
64
64
  "date-fns": "^2.28.0",
65
65
  "memize": "^2.1.0",
@@ -74,5 +74,5 @@
74
74
  "publishConfig": {
75
75
  "access": "public"
76
76
  },
77
- "gitHead": "839018ff6029ba749780e288e08ff9cd898e50e8"
77
+ "gitHead": "d98dff8ea96f29cfea045bf964269f46f040d539"
78
78
  }
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import { Button, Flex, FlexItem } from '@wordpress/components';
5
5
  import { __ } from '@wordpress/i18n';
6
- import { useDispatch } from '@wordpress/data';
6
+ import { useSelect, useDispatch } from '@wordpress/data';
7
7
  import { useCallback, useRef } from '@wordpress/element';
8
8
  import { store as coreStore } from '@wordpress/core-data';
9
9
  import { store as blockEditorStore } from '@wordpress/block-editor';
@@ -85,6 +85,15 @@ export function EntitiesSavedStatesExtensible( {
85
85
 
86
86
  const saveEnabled = saveEnabledProp ?? isDirty;
87
87
 
88
+ const { homeUrl } = useSelect( ( select ) => {
89
+ const {
90
+ getUnstableBase, // Site index.
91
+ } = select( coreStore );
92
+ return {
93
+ homeUrl: getUnstableBase()?.home,
94
+ };
95
+ }, [] );
96
+
88
97
  const saveCheckedEntities = () => {
89
98
  const saveNoticeId = 'site-editor-save-success';
90
99
  removeNotice( saveNoticeId );
@@ -149,6 +158,12 @@ export function EntitiesSavedStatesExtensible( {
149
158
  createSuccessNotice( __( 'Site updated.' ), {
150
159
  type: 'snackbar',
151
160
  id: saveNoticeId,
161
+ actions: [
162
+ {
163
+ label: __( 'View site' ),
164
+ url: homeUrl,
165
+ },
166
+ ],
152
167
  } );
153
168
  }
154
169
  } )
@@ -26,6 +26,7 @@ export { default as PageAttributesParent } from './page-attributes/parent';
26
26
  export { default as PageTemplate } from './post-template';
27
27
  export { default as PostAuthor } from './post-author';
28
28
  export { default as PostAuthorCheck } from './post-author/check';
29
+ export { default as PostAuthorPanel } from './post-author/panel';
29
30
  export { default as PostComments } from './post-comments';
30
31
  export { default as PostExcerpt } from './post-excerpt';
31
32
  export { default as PostExcerptCheck } from './post-excerpt/check';
@@ -50,6 +51,7 @@ export {
50
51
  default as PostScheduleLabel,
51
52
  usePostScheduleLabel,
52
53
  } from './post-schedule/label';
54
+ export { default as PostSchedulePanel } from './post-schedule/panel';
53
55
  export { default as PostSlug } from './post-slug';
54
56
  export { default as PostSlugCheck } from './post-slug/check';
55
57
  export { default as PostSticky } from './post-sticky';
@@ -65,6 +67,7 @@ export { HierarchicalTermSelector as PostTaxonomiesHierarchicalTermSelector } fr
65
67
  export { default as PostTaxonomiesCheck } from './post-taxonomies/check';
66
68
  export { default as PostTextEditor } from './post-text-editor';
67
69
  export { default as PostTitle } from './post-title';
70
+ export { default as PostTitleRaw } from './post-title/post-title-raw';
68
71
  export { default as PostTrash } from './post-trash';
69
72
  export { default as PostTrashCheck } from './post-trash/check';
70
73
  export { default as PostTypeSupportCheck } from './post-type-support-check';
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Internal dependencies
3
+ */
4
+ import PostAuthorCheck from './check';
5
+ import PostAuthorForm from './index';
6
+ import PostPanelRow from '../post-panel-row';
7
+
8
+ export function PostAuthor() {
9
+ return (
10
+ <PostAuthorCheck>
11
+ <PostPanelRow className="editor-post-author__panel">
12
+ <PostAuthorForm />
13
+ </PostPanelRow>
14
+ </PostAuthorCheck>
15
+ );
16
+ }
17
+
18
+ export default PostAuthor;
@@ -0,0 +1,7 @@
1
+ .editor-post-author__panel {
2
+ padding-top: $grid-unit-10;
3
+ }
4
+
5
+ .editor-post-author__panel .editor-post-panel__row-control > div {
6
+ width: 100%;
7
+ }
@@ -0,0 +1,26 @@
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import classnames from 'classnames';
5
+
6
+ /**
7
+ * WordPress dependencies
8
+ */
9
+ import { __experimentalHStack as HStack } from '@wordpress/components';
10
+ import { forwardRef } from '@wordpress/element';
11
+
12
+ const PostPanelRow = forwardRef( ( { className, label, children }, ref ) => {
13
+ return (
14
+ <HStack
15
+ className={ classnames( 'editor-post-panel__row', className ) }
16
+ ref={ ref }
17
+ >
18
+ { label && (
19
+ <div className="editor-post-panel__row-label">{ label }</div>
20
+ ) }
21
+ <div className="editor-post-panel__row-control">{ children }</div>
22
+ </HStack>
23
+ );
24
+ } );
25
+
26
+ export default PostPanelRow;
@@ -0,0 +1,21 @@
1
+ .editor-post-panel__row {
2
+ width: 100%;
3
+ min-height: $button-size;
4
+ justify-content: flex-start !important;
5
+ align-items: flex-start !important;
6
+ }
7
+
8
+ .editor-post-panel__row-label {
9
+ width: 30%;
10
+ flex-shrink: 0;
11
+ min-height: $button-size;
12
+ display: flex;
13
+ align-items: center;
14
+ }
15
+
16
+ .editor-post-panel__row-control {
17
+ flex-grow: 1;
18
+ min-height: $button-size;
19
+ display: flex;
20
+ align-items: center;
21
+ }
@@ -9,6 +9,7 @@ import classnames from 'classnames';
9
9
  import {
10
10
  __unstableGetAnimateClassName as getAnimateClassName,
11
11
  Button,
12
+ Tooltip,
12
13
  } from '@wordpress/components';
13
14
  import { usePrevious, useViewportMatch } from '@wordpress/compose';
14
15
  import { useDispatch, useSelect } from '@wordpress/data';
@@ -128,45 +129,53 @@ export default function PostSavedState( {
128
129
  text = shortLabel;
129
130
  }
130
131
 
132
+ const buttonAccessibleLabel = text || label;
133
+
134
+ /**
135
+ * The tooltip needs to be enabled only if the button is not disabled. When
136
+ * relying on the internal Button tooltip functionality, this causes the
137
+ * resulting `button` element to be always removed and re-added to the DOM,
138
+ * causing focus loss. An alternative approach to circumvent the issue
139
+ * is not to use the `label` and `shortcut` props on `Button` (which would
140
+ * trigger the tooltip), and instead manually wrap the `Button` in a separate
141
+ * `Tooltip` component.
142
+ */
143
+ const tooltipProps = isDisabled
144
+ ? undefined
145
+ : {
146
+ text: buttonAccessibleLabel,
147
+ shortcut: displayShortcut.primary( 's' ),
148
+ };
149
+
131
150
  // Use common Button instance for all saved states so that focus is not
132
151
  // lost.
133
152
  return (
134
- <Button
135
- className={
136
- isSaveable || isSaving
137
- ? classnames( {
138
- 'editor-post-save-draft': ! isSavedState,
139
- 'editor-post-saved-state': isSavedState,
140
- 'is-saving': isSaving,
141
- 'is-autosaving': isAutosaving,
142
- 'is-saved': isSaved,
143
- [ getAnimateClassName( {
144
- type: 'loading',
145
- } ) ]: isSaving,
146
- } )
147
- : undefined
148
- }
149
- onClick={ isDisabled ? undefined : () => savePost() }
150
- /*
151
- * We want the tooltip to show the keyboard shortcut only when the
152
- * button does something, i.e. when it's not disabled.
153
- */
154
- shortcut={ isDisabled ? undefined : displayShortcut.primary( 's' ) }
155
- /*
156
- * Displaying the keyboard shortcut conditionally makes the tooltip
157
- * itself show conditionally. This would trigger a full-rerendering
158
- * of the button that we want to avoid. By setting `showTooltip`,
159
- & the tooltip is always rendered even when there's no keyboard shortcut.
160
- */
161
- showTooltip
162
- variant="tertiary"
163
- icon={ isLargeViewport ? undefined : cloudUpload }
164
- // Make sure the aria-label has always a value, as the default `text` is undefined on small screens.
165
- label={ text || label }
166
- aria-disabled={ isDisabled }
167
- >
168
- { isSavedState && <Icon icon={ isSaved ? check : cloud } /> }
169
- { text }
170
- </Button>
153
+ <Tooltip { ...tooltipProps }>
154
+ <Button
155
+ className={
156
+ isSaveable || isSaving
157
+ ? classnames( {
158
+ 'editor-post-save-draft': ! isSavedState,
159
+ 'editor-post-saved-state': isSavedState,
160
+ 'is-saving': isSaving,
161
+ 'is-autosaving': isAutosaving,
162
+ 'is-saved': isSaved,
163
+ [ getAnimateClassName( {
164
+ type: 'loading',
165
+ } ) ]: isSaving,
166
+ } )
167
+ : undefined
168
+ }
169
+ onClick={ isDisabled ? undefined : () => savePost() }
170
+ variant="tertiary"
171
+ icon={ isLargeViewport ? undefined : cloudUpload }
172
+ // Make sure the aria-label has always a value, as the default `text` is undefined on small screens.
173
+ aria-label={ buttonAccessibleLabel }
174
+ aria-disabled={ isDisabled }
175
+ >
176
+ { isSavedState && <Icon icon={ isSaved ? check : cloud } /> }
177
+ { text }
178
+ </Button>
179
+ </Tooltip>
171
180
  );
172
181
  }
@@ -0,0 +1,65 @@
1
+ /**
2
+ * WordPress dependencies
3
+ */
4
+ import { Button, Dropdown } from '@wordpress/components';
5
+ import { __, sprintf } from '@wordpress/i18n';
6
+ import { useState, useMemo } from '@wordpress/element';
7
+
8
+ /**
9
+ * Internal dependencies
10
+ */
11
+ import PostScheduleCheck from './check';
12
+ import PostScheduleForm from './index';
13
+ import { usePostScheduleLabel } from './label';
14
+ import PostPanelRow from '../post-panel-row';
15
+
16
+ export default function PostSchedulePanel() {
17
+ const [ popoverAnchor, setPopoverAnchor ] = useState( null );
18
+ // Memoize popoverProps to avoid returning a new object every time.
19
+ const popoverProps = useMemo(
20
+ () => ( {
21
+ // Anchor the popover to the middle of the entire row so that it doesn't
22
+ // move around when the label changes.
23
+ anchor: popoverAnchor,
24
+ 'aria-label': __( 'Change publish date' ),
25
+ placement: 'bottom-end',
26
+ } ),
27
+ [ popoverAnchor ]
28
+ );
29
+
30
+ const label = usePostScheduleLabel();
31
+ const fullLabel = usePostScheduleLabel( { full: true } );
32
+
33
+ return (
34
+ <PostScheduleCheck>
35
+ <PostPanelRow label={ __( 'Publish' ) } ref={ setPopoverAnchor }>
36
+ <Dropdown
37
+ popoverProps={ popoverProps }
38
+ focusOnMount
39
+ className="editor-post-schedule__panel-dropdown"
40
+ contentClassName="editor-post-schedule__dialog"
41
+ renderToggle={ ( { onToggle, isOpen } ) => (
42
+ <Button
43
+ className="editor-post-schedule__dialog-toggle"
44
+ variant="tertiary"
45
+ onClick={ onToggle }
46
+ aria-label={ sprintf(
47
+ // translators: %s: Current post date.
48
+ __( 'Change date: %s' ),
49
+ label
50
+ ) }
51
+ label={ fullLabel }
52
+ showTooltip
53
+ aria-expanded={ isOpen }
54
+ >
55
+ { label }
56
+ </Button>
57
+ ) }
58
+ renderContent={ ( { onClose } ) => (
59
+ <PostScheduleForm onClose={ onClose } />
60
+ ) }
61
+ />
62
+ </PostPanelRow>
63
+ </PostScheduleCheck>
64
+ );
65
+ }
@@ -0,0 +1,23 @@
1
+ .editor-post-schedule__panel-dropdown {
2
+ width: 100%;
3
+ }
4
+
5
+ .editor-post-schedule__dialog {
6
+ .components-popover__content {
7
+ min-width: 320px;
8
+ padding: $grid-unit-20;
9
+ }
10
+ }
11
+
12
+ .editor-post-schedule__dialog-toggle.components-button {
13
+ display: block;
14
+ max-width: 100%;
15
+ overflow: hidden;
16
+ text-align: left;
17
+ white-space: unset;
18
+ height: auto;
19
+
20
+ // The line height + the padding should be the same as the button size.
21
+ padding: math.div($button-size - $grid-unit-20, 2) 12px;
22
+ line-height: $grid-unit-20;
23
+ }
@@ -4,7 +4,6 @@
4
4
  import { useSelect, useDispatch } from '@wordpress/data';
5
5
  import { __, _x } from '@wordpress/i18n';
6
6
  import {
7
- PanelRow,
8
7
  Modal,
9
8
  Button,
10
9
  __experimentalHStack as HStack,
@@ -17,6 +16,7 @@ import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
17
16
  /**
18
17
  * Internal dependencies
19
18
  */
19
+ import PostPanelRow from '../post-panel-row';
20
20
  import { store as editorStore } from '../../store';
21
21
  import { unlock } from '../../lock-unlock';
22
22
 
@@ -44,14 +44,13 @@ export default function PostSyncStatus() {
44
44
  }
45
45
 
46
46
  return (
47
- <PanelRow className="edit-post-sync-status">
48
- <span>{ __( 'Sync status' ) }</span>
49
- <div>
47
+ <PostPanelRow label={ __( 'Sync status' ) }>
48
+ <div className="editor-post-sync-status__value">
50
49
  { syncStatus === 'unsynced'
51
50
  ? __( 'Not synced' )
52
51
  : __( 'Fully synced' ) }
53
52
  </div>
54
- </PanelRow>
53
+ </PostPanelRow>
55
54
  );
56
55
  }
57
56
 
@@ -114,7 +113,7 @@ export function PostSyncStatusModal() {
114
113
  'Option that makes an individual pattern synchronized'
115
114
  ) }
116
115
  help={ __(
117
- 'Editing the pattern will update it anywhere it is used.'
116
+ 'Sync this pattern across multiple locations.'
118
117
  ) }
119
118
  checked={ ! syncType }
120
119
  onChange={ () => {
@@ -1,18 +1,4 @@
1
- .edit-post-sync-status {
2
- width: 100%;
3
- position: relative;
4
- justify-content: flex-start;
5
- align-items: flex-start;
6
-
7
- > span {
8
- display: block;
9
- width: 30%;
10
- margin-right: 8px;
11
- word-break: break-word;
12
- }
13
-
14
- > div {
15
- // Match padding on tertiary buttons for alignment.
16
- padding: $grid-unit-15 * 0.5 0 $grid-unit-15 * 0.5 $grid-unit-15;
17
- }
1
+ .editor-post-sync-status__value {
2
+ // Match padding on tertiary buttons for alignment.
3
+ padding: $grid-unit-15 * 0.5 0 $grid-unit-15 * 0.5 $grid-unit-15;
18
4
  }
@@ -0,0 +1,4 @@
1
+ export const DEFAULT_CLASSNAMES =
2
+ 'wp-block wp-block-post-title block-editor-block-list__block editor-post-title editor-post-title__input rich-text';
3
+
4
+ export const REGEXP_NEWLINES = /[\r\n]+/g;