@wordpress/editor 13.30.0 → 13.32.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 (219) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/README.md +857 -0
  3. package/build/bindings/index.js +3 -1
  4. package/build/bindings/index.js.map +1 -1
  5. package/build/components/block-settings-menu/plugin-block-settings-menu-item.js +107 -0
  6. package/build/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -0
  7. package/build/components/commands/index.js +1 -1
  8. package/build/components/commands/index.js.map +1 -1
  9. package/build/components/deprecated.js +158 -0
  10. package/build/components/deprecated.js.map +1 -1
  11. package/build/components/document-bar/index.js +7 -10
  12. package/build/components/document-bar/index.js.map +1 -1
  13. package/build/components/document-outline/index.js +1 -1
  14. package/build/components/document-outline/index.js.map +1 -1
  15. package/build/components/editor-canvas/edit-template-blocks-notification.js +2 -39
  16. package/build/components/editor-canvas/edit-template-blocks-notification.js.map +1 -1
  17. package/build/components/editor-canvas/index.js +3 -0
  18. package/build/components/editor-canvas/index.js.map +1 -1
  19. package/build/components/entities-saved-states/hooks/use-is-dirty.js +10 -16
  20. package/build/components/entities-saved-states/hooks/use-is-dirty.js.map +1 -1
  21. package/build/components/entities-saved-states/index.js +28 -88
  22. package/build/components/entities-saved-states/index.js.map +1 -1
  23. package/build/components/error-boundary/index.native.js +133 -0
  24. package/build/components/error-boundary/index.native.js.map +1 -0
  25. package/build/components/index.js +33 -8
  26. package/build/components/index.js.map +1 -1
  27. package/build/components/index.native.js +9 -1
  28. package/build/components/index.native.js.map +1 -1
  29. package/build/components/inserter-sidebar/index.js +5 -1
  30. package/build/components/inserter-sidebar/index.js.map +1 -1
  31. package/build/components/list-view-sidebar/index.js +2 -1
  32. package/build/components/list-view-sidebar/index.js.map +1 -1
  33. package/build/components/pattern-overrides-panel/index.js +30 -0
  34. package/build/components/pattern-overrides-panel/index.js.map +1 -0
  35. package/build/components/plugin-document-setting-panel/index.js +123 -0
  36. package/build/components/plugin-document-setting-panel/index.js.map +1 -0
  37. package/build/components/plugin-post-publish-panel/index.js +68 -0
  38. package/build/components/plugin-post-publish-panel/index.js.map +1 -0
  39. package/build/components/plugin-pre-publish-panel/index.js +71 -0
  40. package/build/components/plugin-pre-publish-panel/index.js.map +1 -0
  41. package/build/components/post-actions/actions.js +455 -0
  42. package/build/components/post-actions/actions.js.map +1 -0
  43. package/build/components/post-card-panel/index.js +93 -0
  44. package/build/components/post-card-panel/index.js.map +1 -0
  45. package/build/components/post-featured-image/index.js +3 -8
  46. package/build/components/post-featured-image/index.js.map +1 -1
  47. package/build/components/post-featured-image/panel.js +7 -3
  48. package/build/components/post-featured-image/panel.js.map +1 -1
  49. package/build/components/post-sync-status/index.js +0 -72
  50. package/build/components/post-sync-status/index.js.map +1 -1
  51. package/build/components/post-taxonomies/flat-term-selector.js +7 -3
  52. package/build/components/post-taxonomies/flat-term-selector.js.map +1 -1
  53. package/build/components/post-title/index.native.js +1 -1
  54. package/build/components/post-title/index.native.js.map +1 -1
  55. package/build/components/provider/disable-non-page-content-blocks.js +36 -20
  56. package/build/components/provider/disable-non-page-content-blocks.js.map +1 -1
  57. package/build/components/provider/index.js +1 -1
  58. package/build/components/provider/index.js.map +1 -1
  59. package/build/components/provider/use-block-editor-settings.js +8 -9
  60. package/build/components/provider/use-block-editor-settings.js.map +1 -1
  61. package/build/components/provider/use-hide-blocks-from-inserter.js +4 -3
  62. package/build/components/provider/use-hide-blocks-from-inserter.js.map +1 -1
  63. package/build/components/template-areas/index.js +70 -0
  64. package/build/components/template-areas/index.js.map +1 -0
  65. package/build/hooks/use-select-nearest-editable-block.js +87 -0
  66. package/build/hooks/use-select-nearest-editable-block.js.map +1 -0
  67. package/build/private-apis.js +6 -2
  68. package/build/private-apis.js.map +1 -1
  69. package/build/store/actions.js +46 -6
  70. package/build/store/actions.js.map +1 -1
  71. package/build/store/constants.js +3 -1
  72. package/build/store/constants.js.map +1 -1
  73. package/build/store/private-actions.js +80 -1
  74. package/build/store/private-actions.js.map +1 -1
  75. package/build/store/private-selectors.js +56 -3
  76. package/build/store/private-selectors.js.map +1 -1
  77. package/build/store/reducer.js +14 -1
  78. package/build/store/reducer.js.map +1 -1
  79. package/build/store/selectors.js +21 -11
  80. package/build/store/selectors.js.map +1 -1
  81. package/build/store/utils/get-filtered-template-parts.js +71 -0
  82. package/build/store/utils/get-filtered-template-parts.js.map +1 -0
  83. package/build-module/bindings/index.js +3 -1
  84. package/build-module/bindings/index.js.map +1 -1
  85. package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js +100 -0
  86. package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -0
  87. package/build-module/components/commands/index.js +1 -1
  88. package/build-module/components/commands/index.js.map +1 -1
  89. package/build-module/components/deprecated.js +159 -0
  90. package/build-module/components/deprecated.js.map +1 -1
  91. package/build-module/components/document-bar/index.js +8 -11
  92. package/build-module/components/document-bar/index.js.map +1 -1
  93. package/build-module/components/document-outline/index.js +1 -1
  94. package/build-module/components/document-outline/index.js.map +1 -1
  95. package/build-module/components/editor-canvas/edit-template-blocks-notification.js +4 -41
  96. package/build-module/components/editor-canvas/edit-template-blocks-notification.js.map +1 -1
  97. package/build-module/components/editor-canvas/index.js +3 -0
  98. package/build-module/components/editor-canvas/index.js.map +1 -1
  99. package/build-module/components/entities-saved-states/hooks/use-is-dirty.js +10 -16
  100. package/build-module/components/entities-saved-states/hooks/use-is-dirty.js.map +1 -1
  101. package/build-module/components/entities-saved-states/index.js +29 -89
  102. package/build-module/components/entities-saved-states/index.js.map +1 -1
  103. package/build-module/components/error-boundary/index.native.js +125 -0
  104. package/build-module/components/error-boundary/index.native.js.map +1 -0
  105. package/build-module/components/index.js +5 -1
  106. package/build-module/components/index.js.map +1 -1
  107. package/build-module/components/index.native.js +1 -0
  108. package/build-module/components/index.native.js.map +1 -1
  109. package/build-module/components/inserter-sidebar/index.js +5 -1
  110. package/build-module/components/inserter-sidebar/index.js.map +1 -1
  111. package/build-module/components/list-view-sidebar/index.js +2 -1
  112. package/build-module/components/list-view-sidebar/index.js.map +1 -1
  113. package/build-module/components/pattern-overrides-panel/index.js +23 -0
  114. package/build-module/components/pattern-overrides-panel/index.js.map +1 -0
  115. package/build-module/components/plugin-document-setting-panel/index.js +115 -0
  116. package/build-module/components/plugin-document-setting-panel/index.js.map +1 -0
  117. package/build-module/components/plugin-post-publish-panel/index.js +61 -0
  118. package/build-module/components/plugin-post-publish-panel/index.js.map +1 -0
  119. package/build-module/components/plugin-pre-publish-panel/index.js +64 -0
  120. package/build-module/components/plugin-pre-publish-panel/index.js.map +1 -0
  121. package/build-module/components/post-actions/actions.js +444 -0
  122. package/build-module/components/post-actions/actions.js.map +1 -0
  123. package/build-module/components/post-card-panel/index.js +85 -0
  124. package/build-module/components/post-card-panel/index.js.map +1 -0
  125. package/build-module/components/post-featured-image/index.js +4 -9
  126. package/build-module/components/post-featured-image/index.js.map +1 -1
  127. package/build-module/components/post-featured-image/panel.js +6 -2
  128. package/build-module/components/post-featured-image/panel.js.map +1 -1
  129. package/build-module/components/post-sync-status/index.js +2 -73
  130. package/build-module/components/post-sync-status/index.js.map +1 -1
  131. package/build-module/components/post-taxonomies/flat-term-selector.js +7 -3
  132. package/build-module/components/post-taxonomies/flat-term-selector.js.map +1 -1
  133. package/build-module/components/post-title/index.native.js +1 -1
  134. package/build-module/components/post-title/index.native.js.map +1 -1
  135. package/build-module/components/provider/disable-non-page-content-blocks.js +36 -20
  136. package/build-module/components/provider/disable-non-page-content-blocks.js.map +1 -1
  137. package/build-module/components/provider/index.js +1 -1
  138. package/build-module/components/provider/index.js.map +1 -1
  139. package/build-module/components/provider/use-block-editor-settings.js +9 -10
  140. package/build-module/components/provider/use-block-editor-settings.js.map +1 -1
  141. package/build-module/components/provider/use-hide-blocks-from-inserter.js +4 -3
  142. package/build-module/components/provider/use-hide-blocks-from-inserter.js.map +1 -1
  143. package/build-module/components/template-areas/index.js +63 -0
  144. package/build-module/components/template-areas/index.js.map +1 -0
  145. package/build-module/hooks/use-select-nearest-editable-block.js +80 -0
  146. package/build-module/hooks/use-select-nearest-editable-block.js.map +1 -0
  147. package/build-module/private-apis.js +6 -2
  148. package/build-module/private-apis.js.map +1 -1
  149. package/build-module/store/actions.js +37 -3
  150. package/build-module/store/actions.js.map +1 -1
  151. package/build-module/store/constants.js +2 -0
  152. package/build-module/store/constants.js.map +1 -1
  153. package/build-module/store/private-actions.js +78 -0
  154. package/build-module/store/private-actions.js.map +1 -1
  155. package/build-module/store/private-selectors.js +54 -3
  156. package/build-module/store/private-selectors.js.map +1 -1
  157. package/build-module/store/reducer.js +13 -1
  158. package/build-module/store/reducer.js.map +1 -1
  159. package/build-module/store/selectors.js +19 -10
  160. package/build-module/store/selectors.js.map +1 -1
  161. package/build-module/store/utils/get-filtered-template-parts.js +64 -0
  162. package/build-module/store/utils/get-filtered-template-parts.js.map +1 -0
  163. package/build-style/style-rtl.css +76 -33
  164. package/build-style/style.css +76 -33
  165. package/package.json +35 -33
  166. package/src/bindings/index.js +4 -1
  167. package/src/components/block-settings-menu/plugin-block-settings-menu-item.js +108 -0
  168. package/src/components/commands/index.js +1 -1
  169. package/src/components/deprecated.js +157 -0
  170. package/src/components/document-bar/index.js +12 -17
  171. package/src/components/document-bar/style.scss +9 -12
  172. package/src/components/document-outline/index.js +2 -1
  173. package/src/components/document-tools/style.scss +4 -11
  174. package/src/components/editor-canvas/edit-template-blocks-notification.js +6 -56
  175. package/src/components/editor-canvas/index.js +4 -0
  176. package/src/components/entities-saved-states/hooks/use-is-dirty.js +18 -22
  177. package/src/components/entities-saved-states/index.js +45 -121
  178. package/src/components/entities-saved-states/test/use-is-dirty.js +3 -0
  179. package/src/components/error-boundary/index.native.js +192 -0
  180. package/src/components/error-boundary/style.native.scss +116 -0
  181. package/src/components/index.js +5 -4
  182. package/src/components/index.native.js +1 -0
  183. package/src/components/inserter-sidebar/index.js +7 -1
  184. package/src/components/list-view-sidebar/index.js +1 -0
  185. package/src/components/list-view-sidebar/style.scss +1 -1
  186. package/src/components/pattern-overrides-panel/index.js +26 -0
  187. package/src/components/plugin-document-setting-panel/index.js +121 -0
  188. package/src/components/plugin-post-publish-panel/index.js +64 -0
  189. package/src/components/plugin-post-publish-panel/test/__snapshots__/index.js.snap +39 -0
  190. package/src/components/plugin-post-publish-panel/test/index.js +33 -0
  191. package/src/components/plugin-pre-publish-panel/index.js +67 -0
  192. package/src/components/plugin-pre-publish-panel/test/index.js +33 -0
  193. package/src/components/post-actions/actions.js +582 -0
  194. package/src/components/post-card-panel/index.js +108 -0
  195. package/src/components/post-card-panel/style.scss +32 -0
  196. package/src/components/post-featured-image/index.js +6 -15
  197. package/src/components/post-featured-image/panel.js +9 -3
  198. package/src/components/post-featured-image/style.scss +9 -13
  199. package/src/components/post-sync-status/index.js +1 -94
  200. package/src/components/post-taxonomies/flat-term-selector.js +13 -8
  201. package/src/components/post-title/index.native.js +1 -1
  202. package/src/components/provider/disable-non-page-content-blocks.js +40 -20
  203. package/src/components/provider/index.js +1 -1
  204. package/src/components/provider/test/disable-non-page-content-blocks.js +35 -14
  205. package/src/components/provider/use-block-editor-settings.js +11 -11
  206. package/src/components/provider/use-hide-blocks-from-inserter.js +5 -3
  207. package/src/components/template-areas/index.js +85 -0
  208. package/src/components/template-areas/style.scss +23 -0
  209. package/src/hooks/use-select-nearest-editable-block.js +95 -0
  210. package/src/private-apis.js +6 -2
  211. package/src/store/actions.js +37 -3
  212. package/src/store/constants.js +2 -0
  213. package/src/store/private-actions.js +111 -0
  214. package/src/store/private-selectors.js +105 -17
  215. package/src/store/reducer.js +13 -0
  216. package/src/store/selectors.js +50 -40
  217. package/src/store/utils/get-filtered-template-parts.js +69 -0
  218. package/src/store/utils/test/get-filtered-template-parts.js +189 -0
  219. package/src/style.scss +2 -0
package/README.md CHANGED
@@ -114,6 +114,863 @@ Example:
114
114
  } )( window.wp.editor, window.React );
115
115
  ```
116
116
 
117
+ ## API
118
+
119
+ <!-- START TOKEN(Autogenerated API docs) -->
120
+
121
+ ### AlignmentToolbar
122
+
123
+ > **Deprecated** since 5.3, use `wp.blockEditor.AlignmentToolbar` instead.
124
+
125
+ ### Autocomplete
126
+
127
+ > **Deprecated** since 5.3, use `wp.blockEditor.Autocomplete` instead.
128
+
129
+ ### AutosaveMonitor
130
+
131
+ Undocumented declaration.
132
+
133
+ ### BlockAlignmentToolbar
134
+
135
+ > **Deprecated** since 5.3, use `wp.blockEditor.BlockAlignmentToolbar` instead.
136
+
137
+ ### BlockControls
138
+
139
+ > **Deprecated** since 5.3, use `wp.blockEditor.BlockControls` instead.
140
+
141
+ ### BlockEdit
142
+
143
+ > **Deprecated** since 5.3, use `wp.blockEditor.BlockEdit` instead.
144
+
145
+ ### BlockEditorKeyboardShortcuts
146
+
147
+ > **Deprecated** since 5.3, use `wp.blockEditor.BlockEditorKeyboardShortcuts` instead.
148
+
149
+ ### BlockFormatControls
150
+
151
+ > **Deprecated** since 5.3, use `wp.blockEditor.BlockFormatControls` instead.
152
+
153
+ ### BlockIcon
154
+
155
+ > **Deprecated** since 5.3, use `wp.blockEditor.BlockIcon` instead.
156
+
157
+ ### BlockInspector
158
+
159
+ > **Deprecated** since 5.3, use `wp.blockEditor.BlockInspector` instead.
160
+
161
+ ### BlockList
162
+
163
+ > **Deprecated** since 5.3, use `wp.blockEditor.BlockList` instead.
164
+
165
+ ### BlockMover
166
+
167
+ > **Deprecated** since 5.3, use `wp.blockEditor.BlockMover` instead.
168
+
169
+ ### BlockNavigationDropdown
170
+
171
+ > **Deprecated** since 5.3, use `wp.blockEditor.BlockNavigationDropdown` instead.
172
+
173
+ ### BlockSelectionClearer
174
+
175
+ > **Deprecated** since 5.3, use `wp.blockEditor.BlockSelectionClearer` instead.
176
+
177
+ ### BlockSettingsMenu
178
+
179
+ > **Deprecated** since 5.3, use `wp.blockEditor.BlockSettingsMenu` instead.
180
+
181
+ ### BlockTitle
182
+
183
+ > **Deprecated** since 5.3, use `wp.blockEditor.BlockTitle` instead.
184
+
185
+ ### BlockToolbar
186
+
187
+ > **Deprecated** since 5.3, use `wp.blockEditor.BlockToolbar` instead.
188
+
189
+ ### CharacterCount
190
+
191
+ Undocumented declaration.
192
+
193
+ ### cleanForSlug
194
+
195
+ Performs some basic cleanup of a string for use as a post slug
196
+
197
+ This replicates some of what sanitize_title() does in WordPress core, but is only designed to approximate what the slug will be.
198
+
199
+ Converts Latin-1 Supplement and Latin Extended-A letters to basic Latin letters. Removes combining diacritical marks. Converts whitespace, periods, and forward slashes to hyphens. Removes any remaining non-word characters except hyphens and underscores. Converts remaining string to lowercase. It does not account for octets, HTML entities, or other encoded characters.
200
+
201
+ _Parameters_
202
+
203
+ - _string_ `string`: Title or slug to be processed
204
+
205
+ _Returns_
206
+
207
+ - `string`: Processed string
208
+
209
+ ### ColorPalette
210
+
211
+ > **Deprecated** since 5.3, use `wp.blockEditor.ColorPalette` instead.
212
+
213
+ ### ContrastChecker
214
+
215
+ > **Deprecated** since 5.3, use `wp.blockEditor.ContrastChecker` instead.
216
+
217
+ ### CopyHandler
218
+
219
+ > **Deprecated** since 5.3, use `wp.blockEditor.CopyHandler` instead.
220
+
221
+ ### createCustomColorsHOC
222
+
223
+ > **Deprecated** since 5.3, use `wp.blockEditor.createCustomColorsHOC` instead.
224
+
225
+ ### DefaultBlockAppender
226
+
227
+ > **Deprecated** since 5.3, use `wp.blockEditor.DefaultBlockAppender` instead.
228
+
229
+ ### DocumentBar
230
+
231
+ Undocumented declaration.
232
+
233
+ ### DocumentOutline
234
+
235
+ Undocumented declaration.
236
+
237
+ ### DocumentOutlineCheck
238
+
239
+ Undocumented declaration.
240
+
241
+ ### EditorHistoryRedo
242
+
243
+ Undocumented declaration.
244
+
245
+ ### EditorHistoryUndo
246
+
247
+ Undocumented declaration.
248
+
249
+ ### EditorKeyboardShortcuts
250
+
251
+ Undocumented declaration.
252
+
253
+ ### EditorKeyboardShortcutsRegister
254
+
255
+ Undocumented declaration.
256
+
257
+ ### EditorNotices
258
+
259
+ Undocumented declaration.
260
+
261
+ ### EditorProvider
262
+
263
+ Undocumented declaration.
264
+
265
+ ### EditorSnackbars
266
+
267
+ Undocumented declaration.
268
+
269
+ ### EntitiesSavedStates
270
+
271
+ Undocumented declaration.
272
+
273
+ ### ErrorBoundary
274
+
275
+ Undocumented declaration.
276
+
277
+ ### FontSizePicker
278
+
279
+ > **Deprecated** since 5.3, use `wp.blockEditor.FontSizePicker` instead.
280
+
281
+ ### getColorClassName
282
+
283
+ > **Deprecated** since 5.3, use `wp.blockEditor.getColorClassName` instead.
284
+
285
+ ### getColorObjectByAttributeValues
286
+
287
+ > **Deprecated** since 5.3, use `wp.blockEditor.getColorObjectByAttributeValues` instead.
288
+
289
+ ### getColorObjectByColorValue
290
+
291
+ > **Deprecated** since 5.3, use `wp.blockEditor.getColorObjectByColorValue` instead.
292
+
293
+ ### getFontSize
294
+
295
+ > **Deprecated** since 5.3, use `wp.blockEditor.getFontSize` instead.
296
+
297
+ ### getFontSizeClass
298
+
299
+ > **Deprecated** since 5.3, use `wp.blockEditor.getFontSizeClass` instead.
300
+
301
+ ### getTemplatePartIcon
302
+
303
+ Helper function to retrieve the corresponding icon by name.
304
+
305
+ _Parameters_
306
+
307
+ - _iconName_ `string`: The name of the icon.
308
+
309
+ _Returns_
310
+
311
+ - `Object`: The corresponding icon.
312
+
313
+ ### InnerBlocks
314
+
315
+ > **Deprecated** since 5.3, use `wp.blockEditor.InnerBlocks` instead.
316
+
317
+ ### Inserter
318
+
319
+ > **Deprecated** since 5.3, use `wp.blockEditor.Inserter` instead.
320
+
321
+ ### InspectorAdvancedControls
322
+
323
+ > **Deprecated** since 5.3, use `wp.blockEditor.InspectorAdvancedControls` instead.
324
+
325
+ ### InspectorControls
326
+
327
+ > **Deprecated** since 5.3, use `wp.blockEditor.InspectorControls` instead.
328
+
329
+ ### LocalAutosaveMonitor
330
+
331
+ Undocumented declaration.
332
+
333
+ ### MediaPlaceholder
334
+
335
+ > **Deprecated** since 5.3, use `wp.blockEditor.MediaPlaceholder` instead.
336
+
337
+ ### MediaUpload
338
+
339
+ > **Deprecated** since 5.3, use `wp.blockEditor.MediaUpload` instead.
340
+
341
+ ### mediaUpload
342
+
343
+ Upload a media file when the file upload button is activated. Wrapper around mediaUpload() that injects the current post ID.
344
+
345
+ _Parameters_
346
+
347
+ - _$0_ `Object`: Parameters object passed to the function.
348
+ - _$0.additionalData_ `?Object`: Additional data to include in the request.
349
+ - _$0.allowedTypes_ `string`: Array with the types of media that can be uploaded, if unset all types are allowed.
350
+ - _$0.filesList_ `Array`: List of files.
351
+ - _$0.maxUploadFileSize_ `?number`: Maximum upload size in bytes allowed for the site.
352
+ - _$0.onError_ `Function`: Function called when an error happens.
353
+ - _$0.onFileChange_ `Function`: Function called each time a file or a temporary representation of the file is available.
354
+
355
+ ### MediaUploadCheck
356
+
357
+ > **Deprecated** since 5.3, use `wp.blockEditor.MediaUploadCheck` instead.
358
+
359
+ ### MultiSelectScrollIntoView
360
+
361
+ > **Deprecated** since 5.3, use `wp.blockEditor.MultiSelectScrollIntoView` instead.
362
+
363
+ ### NavigableToolbar
364
+
365
+ > **Deprecated** since 5.3, use `wp.blockEditor.NavigableToolbar` instead.
366
+
367
+ ### ObserveTyping
368
+
369
+ > **Deprecated** since 5.3, use `wp.blockEditor.ObserveTyping` instead.
370
+
371
+ ### PageAttributesCheck
372
+
373
+ Undocumented declaration.
374
+
375
+ ### PageAttributesOrder
376
+
377
+ Undocumented declaration.
378
+
379
+ ### PageAttributesPanel
380
+
381
+ Undocumented declaration.
382
+
383
+ ### PageAttributesParent
384
+
385
+ Undocumented declaration.
386
+
387
+ ### PageTemplate
388
+
389
+ Undocumented declaration.
390
+
391
+ ### PanelColorSettings
392
+
393
+ > **Deprecated** since 5.3, use `wp.blockEditor.PanelColorSettings` instead.
394
+
395
+ ### PlainText
396
+
397
+ > **Deprecated** since 5.3, use `wp.blockEditor.PlainText` instead.
398
+
399
+ ### PluginBlockSettingsMenuItem
400
+
401
+ Renders a new item in the block settings menu.
402
+
403
+ _Usage_
404
+
405
+ ```js
406
+ // Using ES5 syntax
407
+ var __ = wp.i18n.__;
408
+ var PluginBlockSettingsMenuItem = wp.editor.PluginBlockSettingsMenuItem;
409
+
410
+ function doOnClick() {
411
+ // To be called when the user clicks the menu item.
412
+ }
413
+
414
+ function MyPluginBlockSettingsMenuItem() {
415
+ return React.createElement( PluginBlockSettingsMenuItem, {
416
+ allowedBlocks: [ 'core/paragraph' ],
417
+ icon: 'dashicon-name',
418
+ label: __( 'Menu item text' ),
419
+ onClick: doOnClick,
420
+ } );
421
+ }
422
+ ```
423
+
424
+ ```jsx
425
+ // Using ESNext syntax
426
+ import { __ } from '@wordpress/i18n';
427
+ import { PluginBlockSettingsMenuItem } from '@wordpress/editor';
428
+
429
+ const doOnClick = () => {
430
+ // To be called when the user clicks the menu item.
431
+ };
432
+
433
+ const MyPluginBlockSettingsMenuItem = () => (
434
+ <PluginBlockSettingsMenuItem
435
+ allowedBlocks={ [ 'core/paragraph' ] }
436
+ icon="dashicon-name"
437
+ label={ __( 'Menu item text' ) }
438
+ onClick={ doOnClick }
439
+ />
440
+ );
441
+ ```
442
+
443
+ _Parameters_
444
+
445
+ - _props_ `Object`: Component props.
446
+ - _props.allowedBlocks_ `[Array]`: An array containing a list of block names for which the item should be shown. If not present, it'll be rendered for any block. If multiple blocks are selected, it'll be shown if and only if all of them are in the allowed list.
447
+ - _props.icon_ `[WPBlockTypeIconRender]`: The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element.
448
+ - _props.label_ `string`: The menu item text.
449
+ - _props.onClick_ `Function`: Callback function to be executed when the user click the menu item.
450
+ - _props.small_ `[boolean]`: Whether to render the label or not.
451
+ - _props.role_ `[string]`: The ARIA role for the menu item.
452
+
453
+ _Returns_
454
+
455
+ - `Component`: The component to be rendered.
456
+
457
+ ### PluginDocumentSettingPanel
458
+
459
+ Renders items below the Status & Availability panel in the Document Sidebar.
460
+
461
+ _Usage_
462
+
463
+ ```js
464
+ // Using ES5 syntax
465
+ var el = React.createElement;
466
+ var __ = wp.i18n.__;
467
+ var registerPlugin = wp.plugins.registerPlugin;
468
+ var PluginDocumentSettingPanel = wp.editor.PluginDocumentSettingPanel;
469
+
470
+ function MyDocumentSettingPlugin() {
471
+ return el(
472
+ PluginDocumentSettingPanel,
473
+ {
474
+ className: 'my-document-setting-plugin',
475
+ title: 'My Panel',
476
+ name: 'my-panel',
477
+ },
478
+ __( 'My Document Setting Panel' )
479
+ );
480
+ }
481
+
482
+ registerPlugin( 'my-document-setting-plugin', {
483
+ render: MyDocumentSettingPlugin,
484
+ } );
485
+ ```
486
+
487
+ ```jsx
488
+ // Using ESNext syntax
489
+ import { registerPlugin } from '@wordpress/plugins';
490
+ import { PluginDocumentSettingPanel } from '@wordpress/editor';
491
+
492
+ const MyDocumentSettingTest = () => (
493
+ <PluginDocumentSettingPanel
494
+ className="my-document-setting-plugin"
495
+ title="My Panel"
496
+ name="my-panel"
497
+ >
498
+ <p>My Document Setting Panel</p>
499
+ </PluginDocumentSettingPanel>
500
+ );
501
+
502
+ registerPlugin( 'document-setting-test', { render: MyDocumentSettingTest } );
503
+ ```
504
+
505
+ _Parameters_
506
+
507
+ - _props_ `Object`: Component properties.
508
+ - _props.name_ `string`: Required. A machine-friendly name for the panel.
509
+ - _props.className_ `[string]`: An optional class name added to the row.
510
+ - _props.title_ `[string]`: The title of the panel
511
+ - _props.icon_ `[WPBlockTypeIconRender]`: The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered when the sidebar is pinned to toolbar.
512
+ - _props.children_ `Element`: Children to be rendered
513
+
514
+ _Returns_
515
+
516
+ - `Component`: The component to be rendered.
517
+
518
+ ### PluginPostPublishPanel
519
+
520
+ Renders provided content to the post-publish panel in the publish flow (side panel that opens after a user publishes the post).
521
+
522
+ _Usage_
523
+
524
+ ```jsx
525
+ // Using ESNext syntax
526
+ import { __ } from '@wordpress/i18n';
527
+ import { PluginPostPublishPanel } from '@wordpress/edit-post';
528
+
529
+ const MyPluginPostPublishPanel = () => (
530
+ <PluginPostPublishPanel
531
+ className="my-plugin-post-publish-panel"
532
+ title={ __( 'My panel title' ) }
533
+ initialOpen={ true }
534
+ >
535
+ { __( 'My panel content' ) }
536
+ </PluginPostPublishPanel>
537
+ );
538
+ ```
539
+
540
+ _Parameters_
541
+
542
+ - _props_ `Object`: Component properties.
543
+ - _props.className_ `[string]`: An optional class name added to the panel.
544
+ - _props.title_ `[string]`: Title displayed at the top of the panel.
545
+ - _props.initialOpen_ `[boolean]`: Whether to have the panel initially opened. When no title is provided it is always opened.
546
+ - _props.icon_ `[WPBlockTypeIconRender]`: The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered when the sidebar is pinned to toolbar.
547
+ - _props.children_ `Element`: Children to be rendered
548
+
549
+ _Returns_
550
+
551
+ - `Component`: The component to be rendered.
552
+
553
+ ### PluginPrePublishPanel
554
+
555
+ Renders provided content to the pre-publish side panel in the publish flow (side panel that opens when a user first pushes "Publish" from the main editor).
556
+
557
+ _Usage_
558
+
559
+ ```jsx
560
+ // Using ESNext syntax
561
+ import { __ } from '@wordpress/i18n';
562
+ import { PluginPrePublishPanel } from '@wordpress/edit-post';
563
+
564
+ const MyPluginPrePublishPanel = () => (
565
+ <PluginPrePublishPanel
566
+ className="my-plugin-pre-publish-panel"
567
+ title={ __( 'My panel title' ) }
568
+ initialOpen={ true }
569
+ >
570
+ { __( 'My panel content' ) }
571
+ </PluginPrePublishPanel>
572
+ );
573
+ ```
574
+
575
+ _Parameters_
576
+
577
+ - _props_ `Object`: Component props.
578
+ - _props.className_ `[string]`: An optional class name added to the panel.
579
+ - _props.title_ `[string]`: Title displayed at the top of the panel.
580
+ - _props.initialOpen_ `[boolean]`: Whether to have the panel initially opened. When no title is provided it is always opened.
581
+ - _props.icon_ `[WPBlockTypeIconRender]`: The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered when the sidebar is pinned to toolbar.
582
+ - _props.children_ `Element`: Children to be rendered
583
+
584
+ _Returns_
585
+
586
+ - `Component`: The component to be rendered.
587
+
588
+ ### PostAuthor
589
+
590
+ Undocumented declaration.
591
+
592
+ ### PostAuthorCheck
593
+
594
+ Undocumented declaration.
595
+
596
+ ### PostAuthorPanel
597
+
598
+ Undocumented declaration.
599
+
600
+ ### PostComments
601
+
602
+ Undocumented declaration.
603
+
604
+ ### PostDiscussionPanel
605
+
606
+ Undocumented declaration.
607
+
608
+ ### PostExcerpt
609
+
610
+ Undocumented declaration.
611
+
612
+ ### PostExcerptCheck
613
+
614
+ Undocumented declaration.
615
+
616
+ ### PostExcerptPanel
617
+
618
+ Undocumented declaration.
619
+
620
+ ### PostFeaturedImage
621
+
622
+ Undocumented declaration.
623
+
624
+ ### PostFeaturedImageCheck
625
+
626
+ Undocumented declaration.
627
+
628
+ ### PostFeaturedImagePanel
629
+
630
+ Undocumented declaration.
631
+
632
+ ### PostFormat
633
+
634
+ Undocumented declaration.
635
+
636
+ ### PostFormatCheck
637
+
638
+ Undocumented declaration.
639
+
640
+ ### PostLastRevision
641
+
642
+ Undocumented declaration.
643
+
644
+ ### PostLastRevisionCheck
645
+
646
+ Undocumented declaration.
647
+
648
+ ### PostLastRevisionPanel
649
+
650
+ Undocumented declaration.
651
+
652
+ ### PostLockedModal
653
+
654
+ Undocumented declaration.
655
+
656
+ ### PostPendingStatus
657
+
658
+ Undocumented declaration.
659
+
660
+ ### PostPendingStatusCheck
661
+
662
+ Undocumented declaration.
663
+
664
+ ### PostPingbacks
665
+
666
+ Undocumented declaration.
667
+
668
+ ### PostPreviewButton
669
+
670
+ Undocumented declaration.
671
+
672
+ ### PostPublishButton
673
+
674
+ Undocumented declaration.
675
+
676
+ ### PostPublishButtonLabel
677
+
678
+ Undocumented declaration.
679
+
680
+ ### PostPublishPanel
681
+
682
+ Undocumented declaration.
683
+
684
+ ### PostSavedState
685
+
686
+ Component showing whether the post is saved or not and providing save buttons.
687
+
688
+ _Parameters_
689
+
690
+ - _props_ `Object`: Component props.
691
+ - _props.forceIsDirty_ `?boolean`: Whether to force the post to be marked as dirty.
692
+
693
+ _Returns_
694
+
695
+ - `import('react').ComponentType`: The component.
696
+
697
+ ### PostSchedule
698
+
699
+ Undocumented declaration.
700
+
701
+ ### PostScheduleCheck
702
+
703
+ Undocumented declaration.
704
+
705
+ ### PostScheduleLabel
706
+
707
+ Undocumented declaration.
708
+
709
+ ### PostSchedulePanel
710
+
711
+ Undocumented declaration.
712
+
713
+ ### PostSlug
714
+
715
+ Undocumented declaration.
716
+
717
+ ### PostSlugCheck
718
+
719
+ Undocumented declaration.
720
+
721
+ ### PostSticky
722
+
723
+ Undocumented declaration.
724
+
725
+ ### PostStickyCheck
726
+
727
+ Undocumented declaration.
728
+
729
+ ### PostSwitchToDraftButton
730
+
731
+ Undocumented declaration.
732
+
733
+ ### PostSyncStatus
734
+
735
+ Undocumented declaration.
736
+
737
+ ### PostTaxonomies
738
+
739
+ Undocumented declaration.
740
+
741
+ ### PostTaxonomiesCheck
742
+
743
+ Undocumented declaration.
744
+
745
+ ### PostTaxonomiesFlatTermSelector
746
+
747
+ Undocumented declaration.
748
+
749
+ ### PostTaxonomiesHierarchicalTermSelector
750
+
751
+ Hierarchical term selector.
752
+
753
+ _Parameters_
754
+
755
+ - _props_ `Object`: Component props.
756
+ - _props.slug_ `string`: Taxonomy slug.
757
+
758
+ _Returns_
759
+
760
+ - `Element`: Hierarchical term selector component.
761
+
762
+ ### PostTaxonomiesPanel
763
+
764
+ Undocumented declaration.
765
+
766
+ ### PostTemplatePanel
767
+
768
+ Undocumented declaration.
769
+
770
+ ### PostTextEditor
771
+
772
+ Undocumented declaration.
773
+
774
+ ### PostTitle
775
+
776
+ Undocumented declaration.
777
+
778
+ ### PostTitleRaw
779
+
780
+ Undocumented declaration.
781
+
782
+ ### PostTrash
783
+
784
+ Undocumented declaration.
785
+
786
+ ### PostTrashCheck
787
+
788
+ Undocumented declaration.
789
+
790
+ ### PostTypeSupportCheck
791
+
792
+ A component which renders its own children only if the current editor post type supports one of the given `supportKeys` prop.
793
+
794
+ _Parameters_
795
+
796
+ - _props_ `Object`: Props.
797
+ - _props.children_ `Element`: Children to be rendered if post type supports.
798
+ - _props.supportKeys_ `(string|string[])`: String or string array of keys to test.
799
+
800
+ _Returns_
801
+
802
+ - `Component`: The component to be rendered.
803
+
804
+ ### PostURL
805
+
806
+ Undocumented declaration.
807
+
808
+ ### PostURLCheck
809
+
810
+ Undocumented declaration.
811
+
812
+ ### PostURLLabel
813
+
814
+ Undocumented declaration.
815
+
816
+ ### PostURLPanel
817
+
818
+ Undocumented declaration.
819
+
820
+ ### PostVisibility
821
+
822
+ Undocumented declaration.
823
+
824
+ ### PostVisibilityCheck
825
+
826
+ Undocumented declaration.
827
+
828
+ ### PostVisibilityLabel
829
+
830
+ Undocumented declaration.
831
+
832
+ ### privateApis
833
+
834
+ Undocumented declaration.
835
+
836
+ ### RichText
837
+
838
+ > **Deprecated** since 5.3, use `wp.blockEditor.RichText` instead.
839
+
840
+ ### RichTextShortcut
841
+
842
+ > **Deprecated** since 5.3, use `wp.blockEditor.RichTextShortcut` instead.
843
+
844
+ ### RichTextToolbarButton
845
+
846
+ > **Deprecated** since 5.3, use `wp.blockEditor.RichTextToolbarButton` instead.
847
+
848
+ ### ServerSideRender
849
+
850
+ Undocumented declaration.
851
+
852
+ ### SkipToSelectedBlock
853
+
854
+ > **Deprecated** since 5.3, use `wp.blockEditor.SkipToSelectedBlock` instead.
855
+
856
+ ### store
857
+
858
+ Store definition for the editor namespace.
859
+
860
+ _Related_
861
+
862
+ - <https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore>
863
+
864
+ _Type_
865
+
866
+ - `Object`
867
+
868
+ ### storeConfig
869
+
870
+ Post editor data store configuration.
871
+
872
+ _Related_
873
+
874
+ - <https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#registerStore>
875
+
876
+ _Type_
877
+
878
+ - `Object`
879
+
880
+ ### TableOfContents
881
+
882
+ Undocumented declaration.
883
+
884
+ ### TextEditorGlobalKeyboardShortcuts
885
+
886
+ Undocumented declaration.
887
+
888
+ ### ThemeSupportCheck
889
+
890
+ Undocumented declaration.
891
+
892
+ ### TimeToRead
893
+
894
+ Undocumented declaration.
895
+
896
+ ### transformStyles
897
+
898
+ Undocumented declaration.
899
+
900
+ ### UnsavedChangesWarning
901
+
902
+ Warns the user if there are unsaved changes before leaving the editor. Compatible with Post Editor and Site Editor.
903
+
904
+ _Returns_
905
+
906
+ - `Component`: The component.
907
+
908
+ ### URLInput
909
+
910
+ > **Deprecated** since 5.3, use `wp.blockEditor.URLInput` instead.
911
+
912
+ ### URLInputButton
913
+
914
+ > **Deprecated** since 5.3, use `wp.blockEditor.URLInputButton` instead.
915
+
916
+ ### URLPopover
917
+
918
+ > **Deprecated** since 5.3, use `wp.blockEditor.URLPopover` instead.
919
+
920
+ ### useEntitiesSavedStatesIsDirty
921
+
922
+ Undocumented declaration.
923
+
924
+ ### usePostScheduleLabel
925
+
926
+ Undocumented declaration.
927
+
928
+ ### usePostURLLabel
929
+
930
+ Undocumented declaration.
931
+
932
+ ### usePostVisibilityLabel
933
+
934
+ Undocumented declaration.
935
+
936
+ ### userAutocompleter
937
+
938
+ A user mentions completer.
939
+
940
+ _Type_
941
+
942
+ - `WPCompleter`
943
+
944
+ ### VisualEditorGlobalKeyboardShortcuts
945
+
946
+ Undocumented declaration.
947
+
948
+ ### Warning
949
+
950
+ > **Deprecated** since 5.3, use `wp.blockEditor.Warning` instead.
951
+
952
+ ### withColorContext
953
+
954
+ > **Deprecated** since 5.3, use `wp.blockEditor.createCustomColorsHOC` instead.
955
+
956
+ ### withColors
957
+
958
+ > **Deprecated** since 5.3, use `wp.blockEditor.withColors` instead.
959
+
960
+ ### withFontSizes
961
+
962
+ > **Deprecated** since 5.3, use `wp.blockEditor.withFontSizes` instead.
963
+
964
+ ### WordCount
965
+
966
+ Undocumented declaration.
967
+
968
+ ### WritingFlow
969
+
970
+ > **Deprecated** since 5.3, use `wp.blockEditor.WritingFlow` instead.
971
+
972
+ <!-- END TOKEN(Autogenerated API docs) -->
973
+
117
974
  ## Contributing to this package
118
975
 
119
976
  This is an individual package that's part of the Gutenberg project. The project is organized as a monorepo. It's made up of multiple self-contained software packages, each with a specific purpose. The packages in this monorepo are published to [npm](https://www.npmjs.com/) and used by [WordPress](https://make.wordpress.org/core/) as well as other software projects.