@wordpress/editor 13.12.0 → 13.12.1

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 (128) hide show
  1. package/build/components/deprecated.js +4 -5
  2. package/build/components/deprecated.js.map +1 -1
  3. package/build/components/editor-help/help-detail-navigation-screen.native.js +2 -4
  4. package/build/components/editor-help/help-detail-navigation-screen.native.js.map +1 -1
  5. package/build/components/editor-help/index.native.js +2 -4
  6. package/build/components/editor-help/index.native.js.map +1 -1
  7. package/build/components/editor-history/redo.js +2 -6
  8. package/build/components/editor-history/redo.js.map +1 -1
  9. package/build/components/editor-history/undo.js +2 -6
  10. package/build/components/editor-history/undo.js.map +1 -1
  11. package/build/components/entities-saved-states/hooks/use-is-dirty.js +3 -1
  12. package/build/components/entities-saved-states/hooks/use-is-dirty.js.map +1 -1
  13. package/build/components/entities-saved-states/index.js +8 -9
  14. package/build/components/entities-saved-states/index.js.map +1 -1
  15. package/build/components/index.js +9 -0
  16. package/build/components/index.js.map +1 -1
  17. package/build/components/page-attributes/order.js +2 -1
  18. package/build/components/page-attributes/order.js.map +1 -1
  19. package/build/components/post-excerpt/check.js +2 -4
  20. package/build/components/post-excerpt/check.js.map +1 -1
  21. package/build/components/post-featured-image/check.js +2 -4
  22. package/build/components/post-featured-image/check.js.map +1 -1
  23. package/build/components/post-format/check.js +2 -4
  24. package/build/components/post-format/check.js.map +1 -1
  25. package/build/components/post-publish-button/index.js +4 -6
  26. package/build/components/post-publish-button/index.js.map +1 -1
  27. package/build/components/post-publish-panel/index.js +4 -5
  28. package/build/components/post-publish-panel/index.js.map +1 -1
  29. package/build/components/post-publish-panel/maybe-upload-media.js +150 -0
  30. package/build/components/post-publish-panel/maybe-upload-media.js.map +1 -0
  31. package/build/components/post-publish-panel/prepublish.js +3 -1
  32. package/build/components/post-publish-panel/prepublish.js.map +1 -1
  33. package/build/components/post-sync-status/index.js +67 -0
  34. package/build/components/post-sync-status/index.js.map +1 -0
  35. package/build/components/post-taxonomies/flat-term-selector.js +25 -34
  36. package/build/components/post-taxonomies/flat-term-selector.js.map +1 -1
  37. package/build/components/post-title/index.js +8 -1
  38. package/build/components/post-title/index.js.map +1 -1
  39. package/build/components/post-visibility/index.js +4 -7
  40. package/build/components/post-visibility/index.js.map +1 -1
  41. package/build/components/provider/index.js +3 -5
  42. package/build/components/provider/index.js.map +1 -1
  43. package/build/components/provider/index.native.js +5 -10
  44. package/build/components/provider/index.native.js.map +1 -1
  45. package/build/components/provider/with-registry-provider.js +4 -2
  46. package/build/components/provider/with-registry-provider.js.map +1 -1
  47. package/build/components/table-of-contents/index.js +2 -4
  48. package/build/components/table-of-contents/index.js.map +1 -1
  49. package/build/hooks/custom-sources-backwards-compatibility.js +4 -7
  50. package/build/hooks/custom-sources-backwards-compatibility.js.map +1 -1
  51. package/build/{lockUnlock.js → lock-unlock.js} +1 -1
  52. package/build/lock-unlock.js.map +1 -0
  53. package/build/private-apis.js +1 -1
  54. package/build/private-apis.js.map +1 -1
  55. package/build-module/components/deprecated.js +4 -4
  56. package/build-module/components/deprecated.js.map +1 -1
  57. package/build-module/components/editor-help/help-detail-navigation-screen.native.js +2 -3
  58. package/build-module/components/editor-help/help-detail-navigation-screen.native.js.map +1 -1
  59. package/build-module/components/editor-help/index.native.js +2 -3
  60. package/build-module/components/editor-help/index.native.js.map +1 -1
  61. package/build-module/components/editor-history/redo.js +2 -3
  62. package/build-module/components/editor-history/redo.js.map +1 -1
  63. package/build-module/components/editor-history/undo.js +2 -3
  64. package/build-module/components/editor-history/undo.js.map +1 -1
  65. package/build-module/components/entities-saved-states/hooks/use-is-dirty.js +3 -1
  66. package/build-module/components/entities-saved-states/hooks/use-is-dirty.js.map +1 -1
  67. package/build-module/components/entities-saved-states/index.js +8 -8
  68. package/build-module/components/entities-saved-states/index.js.map +1 -1
  69. package/build-module/components/index.js +1 -0
  70. package/build-module/components/index.js.map +1 -1
  71. package/build-module/components/page-attributes/order.js +2 -1
  72. package/build-module/components/page-attributes/order.js.map +1 -1
  73. package/build-module/components/post-excerpt/check.js +2 -3
  74. package/build-module/components/post-excerpt/check.js.map +1 -1
  75. package/build-module/components/post-featured-image/check.js +2 -3
  76. package/build-module/components/post-featured-image/check.js.map +1 -1
  77. package/build-module/components/post-format/check.js +2 -3
  78. package/build-module/components/post-format/check.js.map +1 -1
  79. package/build-module/components/post-publish-button/index.js +4 -5
  80. package/build-module/components/post-publish-button/index.js.map +1 -1
  81. package/build-module/components/post-publish-panel/index.js +4 -4
  82. package/build-module/components/post-publish-panel/index.js.map +1 -1
  83. package/build-module/components/post-publish-panel/maybe-upload-media.js +138 -0
  84. package/build-module/components/post-publish-panel/maybe-upload-media.js.map +1 -0
  85. package/build-module/components/post-publish-panel/prepublish.js +2 -1
  86. package/build-module/components/post-publish-panel/prepublish.js.map +1 -1
  87. package/build-module/components/post-sync-status/index.js +56 -0
  88. package/build-module/components/post-sync-status/index.js.map +1 -0
  89. package/build-module/components/post-taxonomies/flat-term-selector.js +25 -32
  90. package/build-module/components/post-taxonomies/flat-term-selector.js.map +1 -1
  91. package/build-module/components/post-title/index.js +8 -1
  92. package/build-module/components/post-title/index.js.map +1 -1
  93. package/build-module/components/post-visibility/index.js +4 -4
  94. package/build-module/components/post-visibility/index.js.map +1 -1
  95. package/build-module/components/provider/index.js +3 -4
  96. package/build-module/components/provider/index.js.map +1 -1
  97. package/build-module/components/provider/index.native.js +5 -9
  98. package/build-module/components/provider/index.native.js.map +1 -1
  99. package/build-module/components/provider/with-registry-provider.js +4 -2
  100. package/build-module/components/provider/with-registry-provider.js.map +1 -1
  101. package/build-module/components/table-of-contents/index.js +2 -3
  102. package/build-module/components/table-of-contents/index.js.map +1 -1
  103. package/build-module/hooks/custom-sources-backwards-compatibility.js +4 -4
  104. package/build-module/hooks/custom-sources-backwards-compatibility.js.map +1 -1
  105. package/build-module/{lockUnlock.js → lock-unlock.js} +1 -1
  106. package/build-module/lock-unlock.js.map +1 -0
  107. package/build-module/private-apis.js +1 -1
  108. package/build-module/private-apis.js.map +1 -1
  109. package/build-style/style-rtl.css +15 -1
  110. package/build-style/style.css +15 -1
  111. package/package.json +30 -31
  112. package/src/components/editor-help/test/index.native.js +3 -2
  113. package/src/components/entities-saved-states/hooks/use-is-dirty.js +2 -0
  114. package/src/components/index.js +1 -0
  115. package/src/components/post-publish-panel/maybe-upload-media.js +167 -0
  116. package/src/components/post-publish-panel/prepublish.js +2 -0
  117. package/src/components/post-publish-panel/style.scss +1 -1
  118. package/src/components/post-sync-status/index.js +55 -0
  119. package/src/components/post-sync-status/style.scss +16 -0
  120. package/src/components/post-taxonomies/flat-term-selector.js +20 -30
  121. package/src/components/post-title/index.js +3 -1
  122. package/src/components/provider/index.js +1 -1
  123. package/src/components/provider/index.native.js +2 -9
  124. package/src/private-apis.js +1 -1
  125. package/src/style.scss +1 -0
  126. package/build/lockUnlock.js.map +0 -1
  127. package/build-module/lockUnlock.js.map +0 -1
  128. /package/src/{lockUnlock.js → lock-unlock.js} +0 -0
@@ -0,0 +1,167 @@
1
+ /**
2
+ * WordPress dependencies
3
+ */
4
+ import {
5
+ PanelBody,
6
+ Button,
7
+ Spinner,
8
+ __unstableMotion as motion,
9
+ __unstableAnimatePresence as AnimatePresence,
10
+ } from '@wordpress/components';
11
+ import { useSelect, useDispatch } from '@wordpress/data';
12
+ import { __ } from '@wordpress/i18n';
13
+ import { upload } from '@wordpress/icons';
14
+ import { store as blockEditorStore } from '@wordpress/block-editor';
15
+ import { useState } from '@wordpress/element';
16
+ import { isBlobURL } from '@wordpress/blob';
17
+
18
+ /**
19
+ * Internal dependencies
20
+ */
21
+ import { store as editorStore } from '../../store';
22
+
23
+ function flattenBlocks( blocks ) {
24
+ const result = [];
25
+
26
+ blocks.forEach( ( block ) => {
27
+ result.push( block );
28
+ result.push( ...flattenBlocks( block.innerBlocks ) );
29
+ } );
30
+
31
+ return result;
32
+ }
33
+
34
+ function Image( block ) {
35
+ const { selectBlock } = useDispatch( blockEditorStore );
36
+ return (
37
+ <motion.img
38
+ tabIndex={ 0 }
39
+ role="button"
40
+ aria-label={ __( 'Select image block.' ) }
41
+ onClick={ () => {
42
+ selectBlock( block.clientId );
43
+ } }
44
+ onKeyDown={ ( event ) => {
45
+ if ( event.key === 'Enter' || event.key === ' ' ) {
46
+ selectBlock( block.clientId );
47
+ event.preventDefault();
48
+ }
49
+ } }
50
+ key={ block.clientId }
51
+ alt={ block.attributes.alt }
52
+ src={ block.attributes.url }
53
+ animate={ { opacity: 1 } }
54
+ exit={ { opacity: 0, scale: 0 } }
55
+ style={ {
56
+ width: '36px',
57
+ height: '36px',
58
+ objectFit: 'cover',
59
+ borderRadius: '2px',
60
+ cursor: 'pointer',
61
+ } }
62
+ whileHover={ { scale: 1.08 } }
63
+ />
64
+ );
65
+ }
66
+
67
+ export default function PostFormatPanel() {
68
+ const [ isUploading, setIsUploading ] = useState( false );
69
+ const { editorBlocks, mediaUpload } = useSelect(
70
+ ( select ) => ( {
71
+ editorBlocks: select( editorStore ).getEditorBlocks(),
72
+ mediaUpload: select( blockEditorStore ).getSettings().mediaUpload,
73
+ } ),
74
+ []
75
+ );
76
+ const externalImages = flattenBlocks( editorBlocks ).filter(
77
+ ( block ) =>
78
+ block.name === 'core/image' &&
79
+ block.attributes.url &&
80
+ ! block.attributes.id
81
+ );
82
+ const { updateBlockAttributes } = useDispatch( blockEditorStore );
83
+
84
+ if ( ! mediaUpload || ! externalImages.length ) {
85
+ return null;
86
+ }
87
+
88
+ const panelBodyTitle = [
89
+ __( 'Suggestion:' ),
90
+ <span className="editor-post-publish-panel__link" key="label">
91
+ { __( 'External media' ) }
92
+ </span>,
93
+ ];
94
+
95
+ function uploadImages() {
96
+ setIsUploading( true );
97
+ Promise.all(
98
+ externalImages.map( ( image ) =>
99
+ window
100
+ .fetch(
101
+ image.attributes.url.includes( '?' )
102
+ ? image.attributes.url
103
+ : image.attributes.url + '?'
104
+ )
105
+ .then( ( response ) => response.blob() )
106
+ .then(
107
+ ( blob ) =>
108
+ new Promise( ( resolve, reject ) => {
109
+ mediaUpload( {
110
+ filesList: [ blob ],
111
+ onFileChange: ( [ media ] ) => {
112
+ if ( isBlobURL( media.url ) ) {
113
+ return;
114
+ }
115
+
116
+ updateBlockAttributes( image.clientId, {
117
+ id: media.id,
118
+ url: media.url,
119
+ } );
120
+ resolve();
121
+ },
122
+ onError() {
123
+ reject();
124
+ },
125
+ } );
126
+ } )
127
+ )
128
+ )
129
+ ).finally( () => {
130
+ setIsUploading( false );
131
+ } );
132
+ }
133
+
134
+ return (
135
+ <PanelBody initialOpen={ true } title={ panelBodyTitle }>
136
+ <p>
137
+ { __(
138
+ 'There are some external images in the post which can be uploaded to the media library. Images coming from different domains may not always display correctly, load slowly for visitors, or be removed unexpectedly.'
139
+ ) }
140
+ </p>
141
+ <div
142
+ style={ {
143
+ display: 'inline-flex',
144
+ flexWrap: 'wrap',
145
+ gap: '8px',
146
+ } }
147
+ >
148
+ <AnimatePresence>
149
+ { externalImages.map( ( image ) => {
150
+ return <Image key={ image.clientId } { ...image } />;
151
+ } ) }
152
+ </AnimatePresence>
153
+ { isUploading ? (
154
+ <Spinner />
155
+ ) : (
156
+ <Button
157
+ icon={ upload }
158
+ variant="primary"
159
+ onClick={ uploadImages }
160
+ >
161
+ { __( 'Upload all' ) }
162
+ </Button>
163
+ ) }
164
+ </div>
165
+ </PanelBody>
166
+ );
167
+ }
@@ -20,6 +20,7 @@ import MaybeTagsPanel from './maybe-tags-panel';
20
20
  import MaybePostFormatPanel from './maybe-post-format-panel';
21
21
  import { store as editorStore } from '../../store';
22
22
  import MaybeCategoryPanel from './maybe-category-panel';
23
+ import MaybeUploadMedia from './maybe-upload-media';
23
24
 
24
25
  function PostPublishPanelPrepublish( { children } ) {
25
26
  const {
@@ -103,6 +104,7 @@ function PostPublishPanelPrepublish( { children } ) {
103
104
  <span className="components-site-home">{ siteHome }</span>
104
105
  </div>
105
106
  </div>
107
+ <MaybeUploadMedia />
106
108
  { hasPublishAction && (
107
109
  <>
108
110
  <PanelBody
@@ -6,7 +6,7 @@
6
6
  // Ensure the post-publish panel accounts for the header and footer height.
7
7
  min-height: calc(100% - #{$header-height + 84px});
8
8
 
9
- .components-spinner {
9
+ > .components-spinner {
10
10
  display: block;
11
11
  margin: 100px auto 0;
12
12
  }
@@ -0,0 +1,55 @@
1
+ /**
2
+ * WordPress dependencies
3
+ */
4
+ import { useSelect, useDispatch } from '@wordpress/data';
5
+ import { __ } from '@wordpress/i18n';
6
+ import { ToggleControl, PanelRow } from '@wordpress/components';
7
+
8
+ /**
9
+ * Internal dependencies
10
+ */
11
+ import { store as editorStore } from '../../store';
12
+
13
+ export default function PostSyncStatus() {
14
+ const { editPost } = useDispatch( editorStore );
15
+ const { meta, postType } = useSelect( ( select ) => {
16
+ const { getEditedPostAttribute } = select( editorStore );
17
+ return {
18
+ meta: getEditedPostAttribute( 'meta' ),
19
+ postType: getEditedPostAttribute( 'type' ),
20
+ };
21
+ }, [] );
22
+ if ( postType !== 'wp_block' ) {
23
+ return null;
24
+ }
25
+ const onUpdateSync = ( syncStatus ) =>
26
+ editPost( {
27
+ meta: {
28
+ ...meta,
29
+ wp_block:
30
+ syncStatus === 'unsynced'
31
+ ? { sync_status: syncStatus }
32
+ : null,
33
+ },
34
+ } );
35
+ const syncStatus = meta?.wp_block?.sync_status;
36
+ const isFullySynced = ! syncStatus;
37
+
38
+ return (
39
+ <PanelRow className="edit-post-sync-status">
40
+ <span>{ __( 'Syncing' ) }</span>
41
+ <ToggleControl
42
+ __nextHasNoMarginBottom
43
+ label={
44
+ isFullySynced ? __( 'Fully synced' ) : __( 'Not synced' )
45
+ }
46
+ checked={ isFullySynced }
47
+ onChange={ () => {
48
+ onUpdateSync(
49
+ syncStatus === 'unsynced' ? 'fully' : 'unsynced'
50
+ );
51
+ } }
52
+ />
53
+ </PanelRow>
54
+ );
55
+ }
@@ -0,0 +1,16 @@
1
+ .edit-post-sync-status {
2
+ width: 100%;
3
+ position: relative;
4
+ justify-content: flex-start;
5
+
6
+ > span {
7
+ display: block;
8
+ width: 45%;
9
+ flex-shrink: 0;
10
+ }
11
+
12
+ .components-base-control {
13
+ // Match padding on tertiary buttons for alignment.
14
+ padding-left: $grid-unit-15 * 0.5;
15
+ }
16
+ }
@@ -1,8 +1,3 @@
1
- /**
2
- * External dependencies
3
- */
4
- import escapeHtml from 'escape-html';
5
-
6
1
  /**
7
2
  * WordPress dependencies
8
3
  */
@@ -12,7 +7,6 @@ import { FormTokenField, withFilters } from '@wordpress/components';
12
7
  import { useSelect, useDispatch } from '@wordpress/data';
13
8
  import { store as coreStore } from '@wordpress/core-data';
14
9
  import { useDebounce } from '@wordpress/compose';
15
- import apiFetch from '@wordpress/api-fetch';
16
10
  import { speak } from '@wordpress/a11y';
17
11
 
18
12
  /**
@@ -51,28 +45,6 @@ const termNamesToIds = ( names, terms ) => {
51
45
  );
52
46
  };
53
47
 
54
- // Tries to create a term or fetch it if it already exists.
55
- function findOrCreateTerm( termName, restBase, namespace ) {
56
- const escapedTermName = escapeHtml( termName );
57
-
58
- return apiFetch( {
59
- path: `/${ namespace }/${ restBase }`,
60
- method: 'POST',
61
- data: { name: escapedTermName },
62
- } )
63
- .catch( ( error ) => {
64
- if ( error.code !== 'term_exists' ) {
65
- return Promise.reject( error );
66
- }
67
-
68
- return Promise.resolve( {
69
- id: error.data.term_id,
70
- name: termName,
71
- } );
72
- } )
73
- .then( unescapeTerm );
74
- }
75
-
76
48
  export function FlatTermSelector( { slug } ) {
77
49
  const [ values, setValues ] = useState( [] );
78
50
  const [ search, setSearch ] = useState( '' );
@@ -165,11 +137,30 @@ export function FlatTermSelector( { slug } ) {
165
137
  }, [ searchResults ] );
166
138
 
167
139
  const { editPost } = useDispatch( editorStore );
140
+ const { saveEntityRecord } = useDispatch( coreStore );
168
141
 
169
142
  if ( ! hasAssignAction ) {
170
143
  return null;
171
144
  }
172
145
 
146
+ async function findOrCreateTerm( term ) {
147
+ try {
148
+ const newTerm = await saveEntityRecord( 'taxonomy', slug, term, {
149
+ throwOnError: true,
150
+ } );
151
+ return unescapeTerm( newTerm );
152
+ } catch ( error ) {
153
+ if ( error.code !== 'term_exists' ) {
154
+ throw error;
155
+ }
156
+
157
+ return {
158
+ id: error.data.term_id,
159
+ name: term.name,
160
+ };
161
+ }
162
+ }
163
+
173
164
  function onUpdateTerms( newTermIds ) {
174
165
  editPost( { [ taxonomy.rest_base ]: newTermIds } );
175
166
  }
@@ -209,10 +200,9 @@ export function FlatTermSelector( { slug } ) {
209
200
  return;
210
201
  }
211
202
 
212
- const namespace = taxonomy?.rest_namespace ?? 'wp/v2';
213
203
  Promise.all(
214
204
  newTermNames.map( ( termName ) =>
215
- findOrCreateTerm( termName, taxonomy.rest_base, namespace )
205
+ findOrCreateTerm( { name: termName } )
216
206
  )
217
207
  ).then( ( newTerms ) => {
218
208
  const newAvailableTerms = availableTerms.concat( newTerms );
@@ -74,8 +74,10 @@ function PostTitle( _, forwardedRef ) {
74
74
  return;
75
75
  }
76
76
 
77
+ const { defaultView } = ref.current.ownerDocument;
78
+ const { name, parent } = defaultView;
77
79
  const ownerDocument =
78
- ref.current.ownerDocument.defaultView.top.document;
80
+ name === 'editor-canvas' ? parent.document : defaultView.document;
79
81
  const { activeElement, body } = ownerDocument;
80
82
 
81
83
  // Only autofocus the title when the post is entirely empty. This should
@@ -19,7 +19,7 @@ import { store as noticesStore } from '@wordpress/notices';
19
19
  import withRegistryProvider from './with-registry-provider';
20
20
  import { store as editorStore } from '../../store';
21
21
  import useBlockEditorSettings from './use-block-editor-settings';
22
- import { unlock } from '../../lockUnlock';
22
+ import { unlock } from '../../lock-unlock';
23
23
 
24
24
  const { ExperimentalBlockEditorProvider } = unlock( blockEditorPrivateApis );
25
25
 
@@ -319,8 +319,6 @@ class NativeEditorProvider extends Component {
319
319
  const { mode, switchMode } = this.props;
320
320
  // Refresh html content first.
321
321
  this.serializeToNativeAction();
322
- // Make sure to blur the selected block and dismiss the keyboard.
323
- this.props.clearSelectedBlock();
324
322
  switchMode( mode === 'visual' ? 'text' : 'visual' );
325
323
  }
326
324
 
@@ -387,12 +385,8 @@ const ComposedNativeProvider = compose( [
387
385
  withDispatch( ( dispatch ) => {
388
386
  const { editPost, resetEditorBlocks, updateEditorSettings } =
389
387
  dispatch( editorStore );
390
- const {
391
- updateSettings,
392
- clearSelectedBlock,
393
- insertBlock,
394
- replaceBlock,
395
- } = dispatch( blockEditorStore );
388
+ const { updateSettings, insertBlock, replaceBlock } =
389
+ dispatch( blockEditorStore );
396
390
  const { switchEditorMode } = dispatch( editPostStore );
397
391
  const { addEntities, receiveEntityRecords } = dispatch( coreStore );
398
392
  const { createSuccessNotice } = dispatch( noticesStore );
@@ -401,7 +395,6 @@ const ComposedNativeProvider = compose( [
401
395
  updateBlockEditorSettings: updateSettings,
402
396
  updateEditorSettings,
403
397
  addEntities,
404
- clearSelectedBlock,
405
398
  insertBlock,
406
399
  createSuccessNotice,
407
400
  editTitle( title ) {
@@ -2,7 +2,7 @@
2
2
  * Internal dependencies
3
3
  */
4
4
  import { ExperimentalEditorProvider } from './components/provider';
5
- import { lock } from './lockUnlock';
5
+ import { lock } from './lock-unlock';
6
6
  import { EntitiesSavedStatesExtensible } from './components/entities-saved-states';
7
7
 
8
8
  export const privateApis = {};
package/src/style.scss CHANGED
@@ -11,6 +11,7 @@
11
11
  @import "./components/post-publish-button/style.scss";
12
12
  @import "./components/post-publish-panel/style.scss";
13
13
  @import "./components/post-saved-state/style.scss";
14
+ @import "./components/post-sync-status/style.scss";
14
15
  @import "./components/post-taxonomies/style.scss";
15
16
  @import "./components/post-text-editor/style.scss";
16
17
  @import "./components/post-url/style.scss";
@@ -1 +0,0 @@
1
- {"version":3,"sources":["@wordpress/editor/src/lockUnlock.js"],"names":["lock","unlock"],"mappings":";;;;;;;AAGA;;AAHA;AACA;AACA;AAEO,MAAM;AAAEA,EAAAA,IAAF;AAAQC,EAAAA;AAAR,IACZ,mEACC,8GADD,EAEC,mBAFD,CADM","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/private-apis';\nexport const { lock, unlock } =\n\t__dangerousOptInToUnstableAPIsOnlyForCoreModules(\n\t\t'I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.',\n\t\t'@wordpress/editor'\n\t);\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["@wordpress/editor/src/lockUnlock.js"],"names":["__dangerousOptInToUnstableAPIsOnlyForCoreModules","lock","unlock"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,gDAAT,QAAiE,yBAAjE;AACA,OAAO,MAAM;AAAEC,EAAAA,IAAF;AAAQC,EAAAA;AAAR,IACZF,gDAAgD,CAC/C,8GAD+C,EAE/C,mBAF+C,CAD1C","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/private-apis';\nexport const { lock, unlock } =\n\t__dangerousOptInToUnstableAPIsOnlyForCoreModules(\n\t\t'I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.',\n\t\t'@wordpress/editor'\n\t);\n"]}
File without changes