@wordpress/editor 13.32.0 → 13.34.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 (733) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/README.md +355 -20
  3. package/build/bindings/index.js.map +1 -1
  4. package/build/bindings/pattern-overrides.js.map +1 -1
  5. package/build/bindings/post-meta.js +12 -30
  6. package/build/bindings/post-meta.js.map +1 -1
  7. package/build/components/autocompleters/index.js.map +1 -1
  8. package/build/components/autocompleters/user.js.map +1 -1
  9. package/build/components/autosave-monitor/index.js +24 -11
  10. package/build/components/autosave-monitor/index.js.map +1 -1
  11. package/build/components/block-manager/category.js.map +1 -1
  12. package/build/components/block-manager/checklist.js.map +1 -1
  13. package/build/components/block-manager/index.js.map +1 -1
  14. package/build/components/block-removal-warnings/index.js.map +1 -1
  15. package/build/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -1
  16. package/build/components/character-count/index.js +5 -0
  17. package/build/components/character-count/index.js.map +1 -1
  18. package/build/components/collapsible-block-toolbar/index.js +73 -0
  19. package/build/components/collapsible-block-toolbar/index.js.map +1 -0
  20. package/build/components/commands/index.js +19 -0
  21. package/build/components/commands/index.js.map +1 -1
  22. package/build/components/commands/index.native.js.map +1 -1
  23. package/build/components/deprecated.js.map +1 -1
  24. package/build/components/deprecated.native.js.map +1 -1
  25. package/build/components/document-bar/index.js.map +1 -1
  26. package/build/components/document-outline/check.js +8 -0
  27. package/build/components/document-outline/check.js.map +1 -1
  28. package/build/components/document-outline/index.js +11 -0
  29. package/build/components/document-outline/index.js.map +1 -1
  30. package/build/components/document-outline/item.js.map +1 -1
  31. package/build/components/document-tools/index.js +1 -8
  32. package/build/components/document-tools/index.js.map +1 -1
  33. package/build/components/editor-canvas/edit-template-blocks-notification.js +13 -2
  34. package/build/components/editor-canvas/edit-template-blocks-notification.js.map +1 -1
  35. package/build/components/editor-canvas/index.js +2 -2
  36. package/build/components/editor-canvas/index.js.map +1 -1
  37. package/build/components/editor-help/add-blocks.native.js.map +1 -1
  38. package/build/components/editor-help/customize-blocks.native.js.map +1 -1
  39. package/build/components/editor-help/help-detail-navigation-screen.native.js.map +1 -1
  40. package/build/components/editor-help/help-get-support-button.native.js.map +1 -1
  41. package/build/components/editor-help/help-section-title.native.js.map +1 -1
  42. package/build/components/editor-help/help-topic-row.native.js.map +1 -1
  43. package/build/components/editor-help/icon-move-blocks.native.js.map +1 -1
  44. package/build/components/editor-help/index.native.js.map +1 -1
  45. package/build/components/editor-help/intro-to-blocks.native.js.map +1 -1
  46. package/build/components/editor-help/move-blocks.native.js.map +1 -1
  47. package/build/components/editor-help/remove-blocks.native.js.map +1 -1
  48. package/build/components/editor-help/view-sections.native.js.map +1 -1
  49. package/build/components/editor-history/redo.js +11 -0
  50. package/build/components/editor-history/redo.js.map +1 -1
  51. package/build/components/editor-history/undo.js +11 -0
  52. package/build/components/editor-history/undo.js.map +1 -1
  53. package/build/components/editor-notices/index.js.map +1 -1
  54. package/build/components/editor-snackbars/index.js +6 -0
  55. package/build/components/editor-snackbars/index.js.map +1 -1
  56. package/build/components/entities-saved-states/entity-record-item.js.map +1 -1
  57. package/build/components/entities-saved-states/entity-type-list.js.map +1 -1
  58. package/build/components/entities-saved-states/hooks/use-is-dirty.js.map +1 -1
  59. package/build/components/entities-saved-states/index.js.map +1 -1
  60. package/build/components/error-boundary/index.js.map +1 -1
  61. package/build/components/error-boundary/index.native.js.map +1 -1
  62. package/build/components/global-keyboard-shortcuts/index.js +31 -0
  63. package/build/components/global-keyboard-shortcuts/index.js.map +1 -1
  64. package/build/components/global-keyboard-shortcuts/register-shortcuts.js +52 -0
  65. package/build/components/global-keyboard-shortcuts/register-shortcuts.js.map +1 -1
  66. package/build/components/index.js +33 -1
  67. package/build/components/index.js.map +1 -1
  68. package/build/components/index.native.js.map +1 -1
  69. package/build/components/inserter-sidebar/index.js +1 -4
  70. package/build/components/inserter-sidebar/index.js.map +1 -1
  71. package/build/components/keyboard-shortcut-help-modal/config.js +82 -0
  72. package/build/components/keyboard-shortcut-help-modal/config.js.map +1 -0
  73. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +49 -0
  74. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -0
  75. package/build/components/keyboard-shortcut-help-modal/index.js +126 -0
  76. package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -0
  77. package/build/components/keyboard-shortcut-help-modal/shortcut.js +55 -0
  78. package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -0
  79. package/build/components/list-view-sidebar/index.js +1 -1
  80. package/build/components/list-view-sidebar/index.js.map +1 -1
  81. package/build/components/list-view-sidebar/list-view-outline.js.map +1 -1
  82. package/build/components/local-autosave-monitor/index.js.map +1 -1
  83. package/build/components/media-categories/index.js.map +1 -1
  84. package/build/components/mode-switcher/index.js.map +1 -1
  85. package/build/components/more-menu/copy-content-menu-item.js +59 -0
  86. package/build/components/more-menu/copy-content-menu-item.js.map +1 -0
  87. package/build/components/more-menu/index.js +119 -0
  88. package/build/components/more-menu/index.js.map +1 -0
  89. package/build/components/more-menu/tools-more-menu-group.js +23 -0
  90. package/build/components/more-menu/tools-more-menu-group.js.map +1 -0
  91. package/build/components/more-menu/view-more-menu-group.js +24 -0
  92. package/build/components/more-menu/view-more-menu-group.js.map +1 -0
  93. package/build/components/offline-status/index.native.js.map +1 -1
  94. package/build/components/page-attributes/check.js +8 -0
  95. package/build/components/page-attributes/check.js.map +1 -1
  96. package/build/components/page-attributes/order.js +7 -0
  97. package/build/components/page-attributes/order.js.map +1 -1
  98. package/build/components/page-attributes/panel.js +14 -8
  99. package/build/components/page-attributes/panel.js.map +1 -1
  100. package/build/components/page-attributes/parent.js +7 -0
  101. package/build/components/page-attributes/parent.js.map +1 -1
  102. package/build/components/pattern-overrides-panel/index.js.map +1 -1
  103. package/build/components/plugin-document-setting-panel/index.js.map +1 -1
  104. package/build/components/plugin-more-menu-item/index.js +78 -0
  105. package/build/components/plugin-more-menu-item/index.js.map +1 -0
  106. package/build/components/plugin-post-publish-panel/index.js +1 -1
  107. package/build/components/plugin-post-publish-panel/index.js.map +1 -1
  108. package/build/components/plugin-post-status-info/index.js +73 -0
  109. package/build/components/plugin-post-status-info/index.js.map +1 -0
  110. package/build/components/plugin-pre-publish-panel/index.js +1 -1
  111. package/build/components/plugin-pre-publish-panel/index.js.map +1 -1
  112. package/build/components/plugin-sidebar/index.js +108 -0
  113. package/build/components/plugin-sidebar/index.js.map +1 -0
  114. package/build/components/plugin-sidebar-more-menu-item/index.js +71 -0
  115. package/build/components/plugin-sidebar-more-menu-item/index.js.map +1 -0
  116. package/build/components/post-actions/actions.js +316 -20
  117. package/build/components/post-actions/actions.js.map +1 -1
  118. package/build/components/post-actions/index.js +160 -0
  119. package/build/components/post-actions/index.js.map +1 -0
  120. package/build/components/post-author/check.js +9 -0
  121. package/build/components/post-author/check.js.map +1 -1
  122. package/build/components/post-author/combobox.js.map +1 -1
  123. package/build/components/post-author/constants.js.map +1 -1
  124. package/build/components/post-author/hook.js.map +1 -1
  125. package/build/components/post-author/index.js +6 -0
  126. package/build/components/post-author/index.js.map +1 -1
  127. package/build/components/post-author/panel.js +5 -0
  128. package/build/components/post-author/panel.js.map +1 -1
  129. package/build/components/post-author/select.js.map +1 -1
  130. package/build/components/post-card-panel/index.js +14 -15
  131. package/build/components/post-card-panel/index.js.map +1 -1
  132. package/build/components/post-comments/index.js.map +1 -1
  133. package/build/components/post-content-information/index.js +72 -0
  134. package/build/components/post-content-information/index.js.map +1 -0
  135. package/build/components/post-discussion/panel.js +9 -7
  136. package/build/components/post-discussion/panel.js.map +1 -1
  137. package/build/components/post-excerpt/check.js +7 -18
  138. package/build/components/post-excerpt/check.js.map +1 -1
  139. package/build/components/post-excerpt/index.js +52 -12
  140. package/build/components/post-excerpt/index.js.map +1 -1
  141. package/build/components/post-excerpt/panel.js +118 -7
  142. package/build/components/post-excerpt/panel.js.map +1 -1
  143. package/build/components/post-excerpt/plugin.js +2 -2
  144. package/build/components/post-excerpt/plugin.js.map +1 -1
  145. package/build/components/post-featured-image/check.js.map +1 -1
  146. package/build/components/post-featured-image/index.js +1 -1
  147. package/build/components/post-featured-image/index.js.map +1 -1
  148. package/build/components/post-featured-image/panel.js.map +1 -1
  149. package/build/components/post-format/check.js.map +1 -1
  150. package/build/components/post-format/index.js.map +1 -1
  151. package/build/components/post-last-edited-panel/index.js +33 -0
  152. package/build/components/post-last-edited-panel/index.js.map +1 -0
  153. package/build/components/post-last-revision/check.js.map +1 -1
  154. package/build/components/post-last-revision/index.js.map +1 -1
  155. package/build/components/post-last-revision/panel.js.map +1 -1
  156. package/build/components/post-locked-modal/index.js.map +1 -1
  157. package/build/components/post-panel-row/index.js.map +1 -1
  158. package/build/components/post-pending-status/check.js.map +1 -1
  159. package/build/components/post-pending-status/index.js.map +1 -1
  160. package/build/components/post-pingbacks/index.js.map +1 -1
  161. package/build/components/post-preview-button/index.js.map +1 -1
  162. package/build/components/post-publish-button/index.js +31 -31
  163. package/build/components/post-publish-button/index.js.map +1 -1
  164. package/build/components/post-publish-button/label.js +51 -43
  165. package/build/components/post-publish-button/label.js.map +1 -1
  166. package/build/components/post-publish-button/post-publish-button-or-toggle.js +100 -0
  167. package/build/components/post-publish-button/post-publish-button-or-toggle.js.map +1 -0
  168. package/build/components/post-publish-panel/index.js.map +1 -1
  169. package/build/components/post-publish-panel/maybe-category-panel.js.map +1 -1
  170. package/build/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
  171. package/build/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
  172. package/build/components/post-publish-panel/maybe-upload-media.js.map +1 -1
  173. package/build/components/post-publish-panel/postpublish.js.map +1 -1
  174. package/build/components/post-publish-panel/prepublish.js.map +1 -1
  175. package/build/components/post-saved-state/index.js +10 -6
  176. package/build/components/post-saved-state/index.js.map +1 -1
  177. package/build/components/post-schedule/check.js.map +1 -1
  178. package/build/components/post-schedule/index.js.map +1 -1
  179. package/build/components/post-schedule/label.js.map +1 -1
  180. package/build/components/post-schedule/panel.js +9 -1
  181. package/build/components/post-schedule/panel.js.map +1 -1
  182. package/build/components/post-slug/check.js.map +1 -1
  183. package/build/components/post-slug/index.js +43 -68
  184. package/build/components/post-slug/index.js.map +1 -1
  185. package/build/components/post-status/index.js +239 -0
  186. package/build/components/post-status/index.js.map +1 -0
  187. package/build/components/post-sticky/check.js.map +1 -1
  188. package/build/components/post-sticky/index.js.map +1 -1
  189. package/build/components/post-switch-to-draft-button/index.js +6 -1
  190. package/build/components/post-switch-to-draft-button/index.js.map +1 -1
  191. package/build/components/post-sync-status/index.js.map +1 -1
  192. package/build/components/post-taxonomies/check.js.map +1 -1
  193. package/build/components/post-taxonomies/flat-term-selector.js.map +1 -1
  194. package/build/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
  195. package/build/components/post-taxonomies/index.js.map +1 -1
  196. package/build/components/post-taxonomies/most-used-terms.js.map +1 -1
  197. package/build/components/post-taxonomies/panel.js.map +1 -1
  198. package/build/components/post-template/block-theme.js +8 -4
  199. package/build/components/post-template/block-theme.js.map +1 -1
  200. package/build/components/post-template/classic-theme.js +0 -1
  201. package/build/components/post-template/classic-theme.js.map +1 -1
  202. package/build/components/post-template/create-new-template-modal.js.map +1 -1
  203. package/build/components/post-template/create-new-template.js.map +1 -1
  204. package/build/components/post-template/hooks.js.map +1 -1
  205. package/build/components/post-template/panel.js.map +1 -1
  206. package/build/components/post-template/reset-default-template.js.map +1 -1
  207. package/build/components/post-template/swap-template-button.js +2 -5
  208. package/build/components/post-template/swap-template-button.js.map +1 -1
  209. package/build/components/post-text-editor/index.js.map +1 -1
  210. package/build/components/post-title/constants.js.map +1 -1
  211. package/build/components/post-title/index.js.map +1 -1
  212. package/build/components/post-title/index.native.js.map +1 -1
  213. package/build/components/post-title/post-title-raw.js.map +1 -1
  214. package/build/components/post-title/use-post-title-focus.js.map +1 -1
  215. package/build/components/post-title/use-post-title.js.map +1 -1
  216. package/build/components/post-trash/check.js +23 -25
  217. package/build/components/post-trash/check.js.map +1 -1
  218. package/build/components/post-trash/index.js +2 -1
  219. package/build/components/post-trash/index.js.map +1 -1
  220. package/build/components/post-type-support-check/index.js.map +1 -1
  221. package/build/components/post-url/check.js.map +1 -1
  222. package/build/components/post-url/index.js +45 -19
  223. package/build/components/post-url/index.js.map +1 -1
  224. package/build/components/post-url/label.js.map +1 -1
  225. package/build/components/post-url/panel.js +15 -8
  226. package/build/components/post-url/panel.js.map +1 -1
  227. package/build/components/post-view-link/index.js.map +1 -1
  228. package/build/components/post-visibility/check.js.map +1 -1
  229. package/build/components/post-visibility/index.js +2 -1
  230. package/build/components/post-visibility/index.js.map +1 -1
  231. package/build/components/post-visibility/label.js.map +1 -1
  232. package/build/components/post-visibility/utils.js.map +1 -1
  233. package/build/components/preferences-modal/enable-panel.js.map +1 -1
  234. package/build/components/preferences-modal/enable-plugin-document-setting-panel.js.map +1 -1
  235. package/build/components/preferences-modal/enable-publish-sidebar.js +34 -0
  236. package/build/components/preferences-modal/enable-publish-sidebar.js.map +1 -0
  237. package/build/components/preferences-modal/index.js +26 -18
  238. package/build/components/preferences-modal/index.js.map +1 -1
  239. package/build/components/preview-dropdown/index.js +3 -1
  240. package/build/components/preview-dropdown/index.js.map +1 -1
  241. package/build/components/provider/disable-non-page-content-blocks.js +23 -16
  242. package/build/components/provider/disable-non-page-content-blocks.js.map +1 -1
  243. package/build/components/provider/index.js +4 -2
  244. package/build/components/provider/index.js.map +1 -1
  245. package/build/components/provider/index.native.js +6 -1
  246. package/build/components/provider/index.native.js.map +1 -1
  247. package/build/components/provider/navigation-block-editing-mode.js.map +1 -1
  248. package/build/components/provider/use-auto-switch-editor-sidebars.js +52 -0
  249. package/build/components/provider/use-auto-switch-editor-sidebars.js.map +1 -0
  250. package/build/components/provider/use-block-editor-settings.js +64 -43
  251. package/build/components/provider/use-block-editor-settings.js.map +1 -1
  252. package/build/components/provider/use-block-editor-settings.native.js.map +1 -1
  253. package/build/components/provider/use-hide-blocks-from-inserter.js.map +1 -1
  254. package/build/components/provider/with-registry-provider.js +1 -0
  255. package/build/components/provider/with-registry-provider.js.map +1 -1
  256. package/build/components/save-publish-panels/index.js +89 -0
  257. package/build/components/save-publish-panels/index.js.map +1 -0
  258. package/build/components/start-page-options/index.js +143 -0
  259. package/build/components/start-page-options/index.js.map +1 -0
  260. package/build/components/table-of-contents/index.js.map +1 -1
  261. package/build/components/table-of-contents/panel.js.map +1 -1
  262. package/build/components/template-areas/index.js.map +1 -1
  263. package/build/components/template-validation-notice/index.js +23 -29
  264. package/build/components/template-validation-notice/index.js.map +1 -1
  265. package/build/components/theme-support-check/index.js +10 -16
  266. package/build/components/theme-support-check/index.js.map +1 -1
  267. package/build/components/time-to-read/index.js.map +1 -1
  268. package/build/components/unsaved-changes-warning/index.js.map +1 -1
  269. package/build/components/word-count/index.js.map +1 -1
  270. package/build/hooks/custom-sources-backwards-compatibility.js.map +1 -1
  271. package/build/hooks/default-autocompleters.js.map +1 -1
  272. package/build/hooks/index.js.map +1 -1
  273. package/build/hooks/index.native.js.map +1 -1
  274. package/build/hooks/pattern-overrides.js +22 -10
  275. package/build/hooks/pattern-overrides.js.map +1 -1
  276. package/build/hooks/use-select-nearest-editable-block.js.map +1 -1
  277. package/build/index.js.map +1 -1
  278. package/build/index.native.js.map +1 -1
  279. package/build/lock-unlock.js.map +1 -1
  280. package/build/private-apis.js +38 -3
  281. package/build/private-apis.js.map +1 -1
  282. package/build/store/actions.js.map +1 -1
  283. package/build/store/actions.native.js.map +1 -1
  284. package/build/store/constants.js +8 -1
  285. package/build/store/constants.js.map +1 -1
  286. package/build/store/defaults.js.map +1 -1
  287. package/build/store/index.js +1 -1
  288. package/build/store/index.js.map +1 -1
  289. package/build/store/local-autosave.js.map +1 -1
  290. package/build/store/private-actions.js +177 -4
  291. package/build/store/private-actions.js.map +1 -1
  292. package/build/store/private-selectors.js +1 -7
  293. package/build/store/private-selectors.js.map +1 -1
  294. package/build/store/reducer.js.map +1 -1
  295. package/build/store/reducer.native.js.map +1 -1
  296. package/build/store/selectors.js +8 -11
  297. package/build/store/selectors.js.map +1 -1
  298. package/build/store/selectors.native.js.map +1 -1
  299. package/build/store/utils/get-filtered-template-parts.js.map +1 -1
  300. package/build/store/utils/is-template-revertable.js +28 -0
  301. package/build/store/utils/is-template-revertable.js.map +1 -0
  302. package/build/store/utils/notice-builder.js.map +1 -1
  303. package/build/utils/get-template-part-icon.js.map +1 -1
  304. package/build/utils/index.js.map +1 -1
  305. package/build/utils/index.native.js.map +1 -1
  306. package/build/utils/media-upload/index.js.map +1 -1
  307. package/build/utils/media-upload/index.native.js.map +1 -1
  308. package/build/utils/terms.js.map +1 -1
  309. package/build/utils/url.js.map +1 -1
  310. package/build-module/bindings/index.js.map +1 -1
  311. package/build-module/bindings/pattern-overrides.js.map +1 -1
  312. package/build-module/bindings/post-meta.js +14 -31
  313. package/build-module/bindings/post-meta.js.map +1 -1
  314. package/build-module/components/autocompleters/index.js.map +1 -1
  315. package/build-module/components/autocompleters/user.js.map +1 -1
  316. package/build-module/components/autosave-monitor/index.js +24 -12
  317. package/build-module/components/autosave-monitor/index.js.map +1 -1
  318. package/build-module/components/block-manager/category.js.map +1 -1
  319. package/build-module/components/block-manager/checklist.js.map +1 -1
  320. package/build-module/components/block-manager/index.js.map +1 -1
  321. package/build-module/components/block-removal-warnings/index.js.map +1 -1
  322. package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -1
  323. package/build-module/components/character-count/index.js +6 -0
  324. package/build-module/components/character-count/index.js.map +1 -1
  325. package/build-module/components/collapsible-block-toolbar/index.js +65 -0
  326. package/build-module/components/collapsible-block-toolbar/index.js.map +1 -0
  327. package/build-module/components/commands/index.js +20 -1
  328. package/build-module/components/commands/index.js.map +1 -1
  329. package/build-module/components/commands/index.native.js.map +1 -1
  330. package/build-module/components/deprecated.js.map +1 -1
  331. package/build-module/components/deprecated.native.js.map +1 -1
  332. package/build-module/components/document-bar/index.js.map +1 -1
  333. package/build-module/components/document-outline/check.js +9 -0
  334. package/build-module/components/document-outline/check.js.map +1 -1
  335. package/build-module/components/document-outline/index.js +11 -0
  336. package/build-module/components/document-outline/index.js.map +1 -1
  337. package/build-module/components/document-outline/item.js.map +1 -1
  338. package/build-module/components/document-tools/index.js +2 -9
  339. package/build-module/components/document-tools/index.js.map +1 -1
  340. package/build-module/components/editor-canvas/edit-template-blocks-notification.js +13 -2
  341. package/build-module/components/editor-canvas/edit-template-blocks-notification.js.map +1 -1
  342. package/build-module/components/editor-canvas/index.js +2 -2
  343. package/build-module/components/editor-canvas/index.js.map +1 -1
  344. package/build-module/components/editor-help/add-blocks.native.js.map +1 -1
  345. package/build-module/components/editor-help/customize-blocks.native.js.map +1 -1
  346. package/build-module/components/editor-help/help-detail-navigation-screen.native.js.map +1 -1
  347. package/build-module/components/editor-help/help-get-support-button.native.js.map +1 -1
  348. package/build-module/components/editor-help/help-section-title.native.js.map +1 -1
  349. package/build-module/components/editor-help/help-topic-row.native.js.map +1 -1
  350. package/build-module/components/editor-help/icon-move-blocks.native.js.map +1 -1
  351. package/build-module/components/editor-help/index.native.js.map +1 -1
  352. package/build-module/components/editor-help/intro-to-blocks.native.js.map +1 -1
  353. package/build-module/components/editor-help/move-blocks.native.js.map +1 -1
  354. package/build-module/components/editor-help/remove-blocks.native.js.map +1 -1
  355. package/build-module/components/editor-help/view-sections.native.js.map +1 -1
  356. package/build-module/components/editor-history/redo.js +11 -0
  357. package/build-module/components/editor-history/redo.js.map +1 -1
  358. package/build-module/components/editor-history/undo.js +11 -0
  359. package/build-module/components/editor-history/undo.js.map +1 -1
  360. package/build-module/components/editor-notices/index.js.map +1 -1
  361. package/build-module/components/editor-snackbars/index.js +6 -0
  362. package/build-module/components/editor-snackbars/index.js.map +1 -1
  363. package/build-module/components/entities-saved-states/entity-record-item.js.map +1 -1
  364. package/build-module/components/entities-saved-states/entity-type-list.js.map +1 -1
  365. package/build-module/components/entities-saved-states/hooks/use-is-dirty.js.map +1 -1
  366. package/build-module/components/entities-saved-states/index.js.map +1 -1
  367. package/build-module/components/error-boundary/index.js.map +1 -1
  368. package/build-module/components/error-boundary/index.native.js.map +1 -1
  369. package/build-module/components/global-keyboard-shortcuts/index.js +32 -0
  370. package/build-module/components/global-keyboard-shortcuts/index.js.map +1 -1
  371. package/build-module/components/global-keyboard-shortcuts/register-shortcuts.js +53 -0
  372. package/build-module/components/global-keyboard-shortcuts/register-shortcuts.js.map +1 -1
  373. package/build-module/components/index.js +4 -0
  374. package/build-module/components/index.js.map +1 -1
  375. package/build-module/components/index.native.js.map +1 -1
  376. package/build-module/components/inserter-sidebar/index.js +2 -5
  377. package/build-module/components/inserter-sidebar/index.js.map +1 -1
  378. package/build-module/components/keyboard-shortcut-help-modal/config.js +75 -0
  379. package/build-module/components/keyboard-shortcut-help-modal/config.js.map +1 -0
  380. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +41 -0
  381. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -0
  382. package/build-module/components/keyboard-shortcut-help-modal/index.js +118 -0
  383. package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -0
  384. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +48 -0
  385. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -0
  386. package/build-module/components/list-view-sidebar/index.js +1 -1
  387. package/build-module/components/list-view-sidebar/index.js.map +1 -1
  388. package/build-module/components/list-view-sidebar/list-view-outline.js.map +1 -1
  389. package/build-module/components/local-autosave-monitor/index.js.map +1 -1
  390. package/build-module/components/media-categories/index.js.map +1 -1
  391. package/build-module/components/mode-switcher/index.js.map +1 -1
  392. package/build-module/components/more-menu/copy-content-menu-item.js +52 -0
  393. package/build-module/components/more-menu/copy-content-menu-item.js.map +1 -0
  394. package/build-module/components/more-menu/index.js +111 -0
  395. package/build-module/components/more-menu/index.js.map +1 -0
  396. package/build-module/components/more-menu/tools-more-menu-group.js +16 -0
  397. package/build-module/components/more-menu/tools-more-menu-group.js.map +1 -0
  398. package/build-module/components/more-menu/view-more-menu-group.js +17 -0
  399. package/build-module/components/more-menu/view-more-menu-group.js.map +1 -0
  400. package/build-module/components/offline-status/index.native.js.map +1 -1
  401. package/build-module/components/page-attributes/check.js +9 -0
  402. package/build-module/components/page-attributes/check.js.map +1 -1
  403. package/build-module/components/page-attributes/order.js +7 -0
  404. package/build-module/components/page-attributes/order.js.map +1 -1
  405. package/build-module/components/page-attributes/panel.js +13 -6
  406. package/build-module/components/page-attributes/panel.js.map +1 -1
  407. package/build-module/components/page-attributes/parent.js +7 -0
  408. package/build-module/components/page-attributes/parent.js.map +1 -1
  409. package/build-module/components/pattern-overrides-panel/index.js.map +1 -1
  410. package/build-module/components/plugin-document-setting-panel/index.js.map +1 -1
  411. package/build-module/components/plugin-more-menu-item/index.js +73 -0
  412. package/build-module/components/plugin-more-menu-item/index.js.map +1 -0
  413. package/build-module/components/plugin-post-publish-panel/index.js +1 -1
  414. package/build-module/components/plugin-post-publish-panel/index.js.map +1 -1
  415. package/build-module/components/plugin-post-status-info/index.js +66 -0
  416. package/build-module/components/plugin-post-status-info/index.js.map +1 -0
  417. package/build-module/components/plugin-pre-publish-panel/index.js +1 -1
  418. package/build-module/components/plugin-pre-publish-panel/index.js.map +1 -1
  419. package/build-module/components/plugin-sidebar/index.js +102 -0
  420. package/build-module/components/plugin-sidebar/index.js.map +1 -0
  421. package/build-module/components/plugin-sidebar-more-menu-item/index.js +65 -0
  422. package/build-module/components/plugin-sidebar-more-menu-item/index.js.map +1 -0
  423. package/build-module/components/post-actions/actions.js +317 -19
  424. package/build-module/components/post-actions/actions.js.map +1 -1
  425. package/build-module/components/post-actions/index.js +153 -0
  426. package/build-module/components/post-actions/index.js.map +1 -0
  427. package/build-module/components/post-author/check.js +10 -0
  428. package/build-module/components/post-author/check.js.map +1 -1
  429. package/build-module/components/post-author/combobox.js.map +1 -1
  430. package/build-module/components/post-author/constants.js.map +1 -1
  431. package/build-module/components/post-author/hook.js.map +1 -1
  432. package/build-module/components/post-author/index.js +6 -0
  433. package/build-module/components/post-author/index.js.map +1 -1
  434. package/build-module/components/post-author/panel.js +6 -0
  435. package/build-module/components/post-author/panel.js.map +1 -1
  436. package/build-module/components/post-author/select.js.map +1 -1
  437. package/build-module/components/post-card-panel/index.js +16 -17
  438. package/build-module/components/post-card-panel/index.js.map +1 -1
  439. package/build-module/components/post-comments/index.js.map +1 -1
  440. package/build-module/components/post-content-information/index.js +66 -0
  441. package/build-module/components/post-content-information/index.js.map +1 -0
  442. package/build-module/components/post-discussion/panel.js +8 -6
  443. package/build-module/components/post-discussion/panel.js.map +1 -1
  444. package/build-module/components/post-excerpt/check.js +8 -18
  445. package/build-module/components/post-excerpt/check.js.map +1 -1
  446. package/build-module/components/post-excerpt/index.js +52 -11
  447. package/build-module/components/post-excerpt/index.js.map +1 -1
  448. package/build-module/components/post-excerpt/panel.js +118 -8
  449. package/build-module/components/post-excerpt/panel.js.map +1 -1
  450. package/build-module/components/post-excerpt/plugin.js +2 -2
  451. package/build-module/components/post-excerpt/plugin.js.map +1 -1
  452. package/build-module/components/post-featured-image/check.js.map +1 -1
  453. package/build-module/components/post-featured-image/index.js +1 -1
  454. package/build-module/components/post-featured-image/index.js.map +1 -1
  455. package/build-module/components/post-featured-image/panel.js.map +1 -1
  456. package/build-module/components/post-format/check.js.map +1 -1
  457. package/build-module/components/post-format/index.js.map +1 -1
  458. package/build-module/components/post-last-edited-panel/index.js +26 -0
  459. package/build-module/components/post-last-edited-panel/index.js.map +1 -0
  460. package/build-module/components/post-last-revision/check.js.map +1 -1
  461. package/build-module/components/post-last-revision/index.js.map +1 -1
  462. package/build-module/components/post-last-revision/panel.js.map +1 -1
  463. package/build-module/components/post-locked-modal/index.js.map +1 -1
  464. package/build-module/components/post-panel-row/index.js.map +1 -1
  465. package/build-module/components/post-pending-status/check.js.map +1 -1
  466. package/build-module/components/post-pending-status/index.js.map +1 -1
  467. package/build-module/components/post-pingbacks/index.js.map +1 -1
  468. package/build-module/components/post-preview-button/index.js.map +1 -1
  469. package/build-module/components/post-publish-button/index.js +31 -31
  470. package/build-module/components/post-publish-button/index.js.map +1 -1
  471. package/build-module/components/post-publish-button/label.js +51 -42
  472. package/build-module/components/post-publish-button/label.js.map +1 -1
  473. package/build-module/components/post-publish-button/post-publish-button-or-toggle.js +91 -0
  474. package/build-module/components/post-publish-button/post-publish-button-or-toggle.js.map +1 -0
  475. package/build-module/components/post-publish-panel/index.js.map +1 -1
  476. package/build-module/components/post-publish-panel/maybe-category-panel.js.map +1 -1
  477. package/build-module/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
  478. package/build-module/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
  479. package/build-module/components/post-publish-panel/maybe-upload-media.js.map +1 -1
  480. package/build-module/components/post-publish-panel/postpublish.js.map +1 -1
  481. package/build-module/components/post-publish-panel/prepublish.js.map +1 -1
  482. package/build-module/components/post-saved-state/index.js +10 -6
  483. package/build-module/components/post-saved-state/index.js.map +1 -1
  484. package/build-module/components/post-schedule/check.js.map +1 -1
  485. package/build-module/components/post-schedule/index.js.map +1 -1
  486. package/build-module/components/post-schedule/label.js.map +1 -1
  487. package/build-module/components/post-schedule/panel.js +9 -1
  488. package/build-module/components/post-schedule/panel.js.map +1 -1
  489. package/build-module/components/post-slug/check.js.map +1 -1
  490. package/build-module/components/post-slug/index.js +44 -68
  491. package/build-module/components/post-slug/index.js.map +1 -1
  492. package/build-module/components/post-status/index.js +231 -0
  493. package/build-module/components/post-status/index.js.map +1 -0
  494. package/build-module/components/post-sticky/check.js.map +1 -1
  495. package/build-module/components/post-sticky/index.js.map +1 -1
  496. package/build-module/components/post-switch-to-draft-button/index.js +7 -1
  497. package/build-module/components/post-switch-to-draft-button/index.js.map +1 -1
  498. package/build-module/components/post-sync-status/index.js.map +1 -1
  499. package/build-module/components/post-taxonomies/check.js.map +1 -1
  500. package/build-module/components/post-taxonomies/flat-term-selector.js.map +1 -1
  501. package/build-module/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
  502. package/build-module/components/post-taxonomies/index.js.map +1 -1
  503. package/build-module/components/post-taxonomies/most-used-terms.js.map +1 -1
  504. package/build-module/components/post-taxonomies/panel.js.map +1 -1
  505. package/build-module/components/post-template/block-theme.js +9 -5
  506. package/build-module/components/post-template/block-theme.js.map +1 -1
  507. package/build-module/components/post-template/classic-theme.js +0 -1
  508. package/build-module/components/post-template/classic-theme.js.map +1 -1
  509. package/build-module/components/post-template/create-new-template-modal.js.map +1 -1
  510. package/build-module/components/post-template/create-new-template.js.map +1 -1
  511. package/build-module/components/post-template/hooks.js.map +1 -1
  512. package/build-module/components/post-template/panel.js.map +1 -1
  513. package/build-module/components/post-template/reset-default-template.js.map +1 -1
  514. package/build-module/components/post-template/swap-template-button.js +3 -6
  515. package/build-module/components/post-template/swap-template-button.js.map +1 -1
  516. package/build-module/components/post-text-editor/index.js.map +1 -1
  517. package/build-module/components/post-title/constants.js.map +1 -1
  518. package/build-module/components/post-title/index.js.map +1 -1
  519. package/build-module/components/post-title/index.native.js.map +1 -1
  520. package/build-module/components/post-title/post-title-raw.js.map +1 -1
  521. package/build-module/components/post-title/use-post-title-focus.js.map +1 -1
  522. package/build-module/components/post-title/use-post-title.js.map +1 -1
  523. package/build-module/components/post-trash/check.js +24 -26
  524. package/build-module/components/post-trash/check.js.map +1 -1
  525. package/build-module/components/post-trash/index.js +2 -1
  526. package/build-module/components/post-trash/index.js.map +1 -1
  527. package/build-module/components/post-type-support-check/index.js.map +1 -1
  528. package/build-module/components/post-url/check.js.map +1 -1
  529. package/build-module/components/post-url/index.js +47 -21
  530. package/build-module/components/post-url/index.js.map +1 -1
  531. package/build-module/components/post-url/label.js.map +1 -1
  532. package/build-module/components/post-url/panel.js +15 -8
  533. package/build-module/components/post-url/panel.js.map +1 -1
  534. package/build-module/components/post-view-link/index.js.map +1 -1
  535. package/build-module/components/post-visibility/check.js.map +1 -1
  536. package/build-module/components/post-visibility/index.js +2 -1
  537. package/build-module/components/post-visibility/index.js.map +1 -1
  538. package/build-module/components/post-visibility/label.js.map +1 -1
  539. package/build-module/components/post-visibility/utils.js.map +1 -1
  540. package/build-module/components/preferences-modal/enable-panel.js.map +1 -1
  541. package/build-module/components/preferences-modal/enable-plugin-document-setting-panel.js.map +1 -1
  542. package/build-module/components/preferences-modal/enable-publish-sidebar.js +27 -0
  543. package/build-module/components/preferences-modal/enable-publish-sidebar.js.map +1 -0
  544. package/build-module/components/preferences-modal/index.js +26 -18
  545. package/build-module/components/preferences-modal/index.js.map +1 -1
  546. package/build-module/components/preview-dropdown/index.js +3 -1
  547. package/build-module/components/preview-dropdown/index.js.map +1 -1
  548. package/build-module/components/provider/disable-non-page-content-blocks.js +24 -17
  549. package/build-module/components/provider/disable-non-page-content-blocks.js.map +1 -1
  550. package/build-module/components/provider/index.js +5 -3
  551. package/build-module/components/provider/index.js.map +1 -1
  552. package/build-module/components/provider/index.native.js.map +1 -1
  553. package/build-module/components/provider/navigation-block-editing-mode.js.map +1 -1
  554. package/build-module/components/provider/use-auto-switch-editor-sidebars.js +46 -0
  555. package/build-module/components/provider/use-auto-switch-editor-sidebars.js.map +1 -0
  556. package/build-module/components/provider/use-block-editor-settings.js +66 -45
  557. package/build-module/components/provider/use-block-editor-settings.js.map +1 -1
  558. package/build-module/components/provider/use-block-editor-settings.native.js.map +1 -1
  559. package/build-module/components/provider/use-hide-blocks-from-inserter.js.map +1 -1
  560. package/build-module/components/provider/with-registry-provider.js +1 -0
  561. package/build-module/components/provider/with-registry-provider.js.map +1 -1
  562. package/build-module/components/save-publish-panels/index.js +80 -0
  563. package/build-module/components/save-publish-panels/index.js.map +1 -0
  564. package/build-module/components/start-page-options/index.js +136 -0
  565. package/build-module/components/start-page-options/index.js.map +1 -0
  566. package/build-module/components/table-of-contents/index.js.map +1 -1
  567. package/build-module/components/table-of-contents/panel.js.map +1 -1
  568. package/build-module/components/template-areas/index.js.map +1 -1
  569. package/build-module/components/template-validation-notice/index.js +25 -31
  570. package/build-module/components/template-validation-notice/index.js.map +1 -1
  571. package/build-module/components/theme-support-check/index.js +11 -16
  572. package/build-module/components/theme-support-check/index.js.map +1 -1
  573. package/build-module/components/time-to-read/index.js.map +1 -1
  574. package/build-module/components/unsaved-changes-warning/index.js.map +1 -1
  575. package/build-module/components/word-count/index.js.map +1 -1
  576. package/build-module/hooks/custom-sources-backwards-compatibility.js.map +1 -1
  577. package/build-module/hooks/default-autocompleters.js.map +1 -1
  578. package/build-module/hooks/index.js.map +1 -1
  579. package/build-module/hooks/index.native.js.map +1 -1
  580. package/build-module/hooks/pattern-overrides.js +22 -10
  581. package/build-module/hooks/pattern-overrides.js.map +1 -1
  582. package/build-module/hooks/use-select-nearest-editable-block.js.map +1 -1
  583. package/build-module/index.js.map +1 -1
  584. package/build-module/index.native.js.map +1 -1
  585. package/build-module/lock-unlock.js.map +1 -1
  586. package/build-module/private-apis.js +36 -3
  587. package/build-module/private-apis.js.map +1 -1
  588. package/build-module/store/actions.js.map +1 -1
  589. package/build-module/store/actions.native.js.map +1 -1
  590. package/build-module/store/constants.js +7 -0
  591. package/build-module/store/constants.js.map +1 -1
  592. package/build-module/store/defaults.js.map +1 -1
  593. package/build-module/store/index.js.map +1 -1
  594. package/build-module/store/local-autosave.js.map +1 -1
  595. package/build-module/store/private-actions.js +174 -4
  596. package/build-module/store/private-actions.js.map +1 -1
  597. package/build-module/store/private-selectors.js +1 -6
  598. package/build-module/store/private-selectors.js.map +1 -1
  599. package/build-module/store/reducer.js.map +1 -1
  600. package/build-module/store/reducer.native.js.map +1 -1
  601. package/build-module/store/selectors.js +4 -7
  602. package/build-module/store/selectors.js.map +1 -1
  603. package/build-module/store/selectors.native.js.map +1 -1
  604. package/build-module/store/utils/get-filtered-template-parts.js.map +1 -1
  605. package/build-module/store/utils/is-template-revertable.js +22 -0
  606. package/build-module/store/utils/is-template-revertable.js.map +1 -0
  607. package/build-module/store/utils/notice-builder.js.map +1 -1
  608. package/build-module/utils/get-template-part-icon.js.map +1 -1
  609. package/build-module/utils/index.js.map +1 -1
  610. package/build-module/utils/index.native.js.map +1 -1
  611. package/build-module/utils/media-upload/index.js.map +1 -1
  612. package/build-module/utils/media-upload/index.native.js.map +1 -1
  613. package/build-module/utils/terms.js.map +1 -1
  614. package/build-module/utils/url.js.map +1 -1
  615. package/build-style/style-rtl.css +703 -53
  616. package/build-style/style.css +703 -53
  617. package/package.json +35 -35
  618. package/src/bindings/post-meta.js +11 -27
  619. package/src/components/autosave-monitor/index.js +23 -11
  620. package/src/components/character-count/index.js +5 -0
  621. package/src/components/collapsible-block-toolbar/index.js +77 -0
  622. package/src/components/collapsible-block-toolbar/style.scss +80 -0
  623. package/src/components/commands/index.js +20 -1
  624. package/src/components/document-outline/check.js +8 -0
  625. package/src/components/document-outline/index.js +10 -0
  626. package/src/components/document-tools/index.js +16 -19
  627. package/src/components/editor-canvas/edit-template-blocks-notification.js +16 -2
  628. package/src/components/editor-canvas/index.js +4 -4
  629. package/src/components/editor-history/redo.js +10 -0
  630. package/src/components/editor-history/undo.js +10 -0
  631. package/src/components/editor-snackbars/index.js +5 -0
  632. package/src/components/entities-saved-states/style.scss +7 -0
  633. package/src/components/error-boundary/style.native.scss +1 -1
  634. package/src/components/global-keyboard-shortcuts/index.js +32 -0
  635. package/src/components/global-keyboard-shortcuts/register-shortcuts.js +61 -0
  636. package/src/components/index.js +4 -0
  637. package/src/components/inserter-sidebar/index.js +2 -5
  638. package/src/components/keyboard-shortcut-help-modal/config.js +62 -0
  639. package/src/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +43 -0
  640. package/src/components/keyboard-shortcut-help-modal/index.js +160 -0
  641. package/src/components/keyboard-shortcut-help-modal/shortcut.js +67 -0
  642. package/src/components/keyboard-shortcut-help-modal/style.scss +61 -0
  643. package/src/components/list-view-sidebar/index.js +1 -1
  644. package/src/components/list-view-sidebar/style.scss +2 -2
  645. package/src/components/more-menu/copy-content-menu-item.js +51 -0
  646. package/src/components/more-menu/index.js +158 -0
  647. package/src/components/more-menu/tools-more-menu-group.js +11 -0
  648. package/src/components/more-menu/view-more-menu-group.js +13 -0
  649. package/src/components/page-attributes/check.js +8 -0
  650. package/src/components/page-attributes/order.js +6 -0
  651. package/src/components/page-attributes/panel.js +21 -17
  652. package/src/components/page-attributes/parent.js +6 -0
  653. package/src/components/plugin-more-menu-item/index.js +73 -0
  654. package/src/components/plugin-post-publish-panel/index.js +1 -1
  655. package/src/components/plugin-post-status-info/index.js +63 -0
  656. package/src/components/plugin-pre-publish-panel/index.js +1 -1
  657. package/src/components/plugin-sidebar/index.js +98 -0
  658. package/src/components/plugin-sidebar-more-menu-item/index.js +64 -0
  659. package/src/components/post-actions/actions.js +413 -18
  660. package/src/components/post-actions/index.js +190 -0
  661. package/src/components/post-actions/style.scss +3 -0
  662. package/src/components/post-author/check.js +9 -0
  663. package/src/components/post-author/index.js +5 -0
  664. package/src/components/post-author/panel.js +5 -0
  665. package/src/components/post-card-panel/index.js +28 -23
  666. package/src/components/post-card-panel/style.scss +2 -6
  667. package/src/components/post-content-information/index.js +83 -0
  668. package/src/components/post-content-information/style.scss +6 -0
  669. package/src/components/post-discussion/panel.js +24 -20
  670. package/src/components/post-excerpt/check.js +8 -18
  671. package/src/components/post-excerpt/index.js +66 -15
  672. package/src/components/post-excerpt/panel.js +196 -19
  673. package/src/components/post-excerpt/plugin.js +2 -2
  674. package/src/components/post-excerpt/style.scss +24 -0
  675. package/src/components/post-featured-image/index.js +1 -1
  676. package/src/components/post-featured-image/style.scss +2 -8
  677. package/src/components/post-last-edited-panel/index.js +35 -0
  678. package/src/components/post-last-edited-panel/style.scss +6 -0
  679. package/src/components/post-panel-row/style.scss +3 -3
  680. package/src/components/post-publish-button/index.js +23 -36
  681. package/src/components/post-publish-button/label.js +54 -39
  682. package/src/components/post-publish-button/post-publish-button-or-toggle.js +102 -0
  683. package/src/components/post-publish-button/test/index.js +15 -26
  684. package/src/components/post-publish-button/test/label.js +44 -21
  685. package/src/components/post-publish-button/test/post-publish-button-or-toggle.js +63 -0
  686. package/src/components/post-publish-panel/style.scss +43 -0
  687. package/src/components/post-publish-panel/test/__snapshots__/index.js.snap +225 -75
  688. package/src/components/post-saved-state/index.js +13 -6
  689. package/src/components/post-saved-state/test/index.js +4 -0
  690. package/src/components/post-schedule/panel.js +23 -1
  691. package/src/components/post-schedule/style.scss +2 -4
  692. package/src/components/post-slug/index.js +50 -68
  693. package/src/components/post-slug/test/index.js +29 -6
  694. package/src/components/post-status/index.js +318 -0
  695. package/src/components/post-status/style.scss +74 -0
  696. package/src/components/post-switch-to-draft-button/index.js +5 -0
  697. package/src/components/post-template/block-theme.js +33 -24
  698. package/src/components/post-template/classic-theme.js +0 -1
  699. package/src/components/post-template/swap-template-button.js +3 -6
  700. package/src/components/post-text-editor/style.scss +1 -1
  701. package/src/components/post-title/style.scss +1 -1
  702. package/src/components/post-trash/check.js +19 -19
  703. package/src/components/post-trash/index.js +1 -0
  704. package/src/components/post-url/index.js +132 -101
  705. package/src/components/post-url/panel.js +21 -8
  706. package/src/components/post-url/style.scss +8 -6
  707. package/src/components/post-visibility/index.js +1 -0
  708. package/src/components/preferences-modal/enable-publish-sidebar.js +28 -0
  709. package/src/components/preferences-modal/index.js +40 -22
  710. package/src/components/preview-dropdown/index.js +3 -1
  711. package/src/components/provider/disable-non-page-content-blocks.js +23 -21
  712. package/src/components/provider/index.js +17 -8
  713. package/src/components/provider/use-auto-switch-editor-sidebars.js +49 -0
  714. package/src/components/provider/use-block-editor-settings.js +59 -33
  715. package/src/components/provider/with-registry-provider.js +1 -0
  716. package/src/components/save-publish-panels/index.js +96 -0
  717. package/src/components/save-publish-panels/style.scss +36 -0
  718. package/src/components/start-page-options/index.js +140 -0
  719. package/src/components/start-page-options/style.scss +26 -0
  720. package/src/components/template-validation-notice/index.js +48 -50
  721. package/src/components/theme-support-check/index.js +9 -16
  722. package/src/components/theme-support-check/test/index.js +44 -43
  723. package/src/hooks/pattern-overrides.js +25 -14
  724. package/src/private-apis.js +33 -2
  725. package/src/store/constants.js +7 -0
  726. package/src/store/private-actions.js +269 -4
  727. package/src/store/private-selectors.js +1 -6
  728. package/src/store/selectors.js +4 -7
  729. package/src/store/utils/is-template-revertable.js +23 -0
  730. package/src/style.scss +10 -2
  731. package/src/components/post-publish-button/style.scss +0 -8
  732. package/src/components/provider/test/disable-non-page-content-blocks.js +0 -111
  733. package/src/components/template-validation-notice/style.scss +0 -9
@@ -1 +1 @@
1
- {"version":3,"names":["_components","require","_i18n","_data","_compose","_blockEditor","TemplateValidationNotice","isValid","props","confirmSynchronization","window","confirm","__","synchronizeTemplate","_react","createElement","Notice","className","isDismissible","status","actions","label","onClick","resetTemplateValidity","_default","exports","default","compose","withSelect","select","blockEditorStore","isValidTemplate","withDispatch","dispatch","setTemplateValidity"],"sources":["@wordpress/editor/src/components/template-validation-notice/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Notice } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { compose } from '@wordpress/compose';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\nfunction TemplateValidationNotice( { isValid, ...props } ) {\n\tif ( isValid ) {\n\t\treturn null;\n\t}\n\n\tconst confirmSynchronization = () => {\n\t\tif (\n\t\t\t// eslint-disable-next-line no-alert\n\t\t\twindow.confirm(\n\t\t\t\t__(\n\t\t\t\t\t'Resetting the template may result in loss of content, do you want to continue?'\n\t\t\t\t)\n\t\t\t)\n\t\t) {\n\t\t\tprops.synchronizeTemplate();\n\t\t}\n\t};\n\n\treturn (\n\t\t<Notice\n\t\t\tclassName=\"editor-template-validation-notice\"\n\t\t\tisDismissible={ false }\n\t\t\tstatus=\"warning\"\n\t\t\tactions={ [\n\t\t\t\t{\n\t\t\t\t\tlabel: __( 'Keep it as is' ),\n\t\t\t\t\tonClick: props.resetTemplateValidity,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: __( 'Reset the template' ),\n\t\t\t\t\tonClick: confirmSynchronization,\n\t\t\t\t},\n\t\t\t] }\n\t\t>\n\t\t\t{ __(\n\t\t\t\t'The content of your post doesn’t match the template assigned to your post type.'\n\t\t\t) }\n\t\t</Notice>\n\t);\n}\n\nexport default compose( [\n\twithSelect( ( select ) => ( {\n\t\tisValid: select( blockEditorStore ).isValidTemplate(),\n\t} ) ),\n\twithDispatch( ( dispatch ) => {\n\t\tconst { setTemplateValidity, synchronizeTemplate } =\n\t\t\tdispatch( blockEditorStore );\n\t\treturn {\n\t\t\tresetTemplateValidity: () => setTemplateValidity( true ),\n\t\t\tsynchronizeTemplate,\n\t\t};\n\t} ),\n] )( TemplateValidationNotice );\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AAPA;AACA;AACA;;AAOA,SAASK,wBAAwBA,CAAE;EAAEC,OAAO;EAAE,GAAGC;AAAM,CAAC,EAAG;EAC1D,IAAKD,OAAO,EAAG;IACd,OAAO,IAAI;EACZ;EAEA,MAAME,sBAAsB,GAAGA,CAAA,KAAM;IACpC;IACC;IACAC,MAAM,CAACC,OAAO,CACb,IAAAC,QAAE,EACD,gFACD,CACD,CAAC,EACA;MACDJ,KAAK,CAACK,mBAAmB,CAAC,CAAC;IAC5B;EACD,CAAC;EAED,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACf,WAAA,CAAAgB,MAAM;IACNC,SAAS,EAAC,mCAAmC;IAC7CC,aAAa,EAAG,KAAO;IACvBC,MAAM,EAAC,SAAS;IAChBC,OAAO,EAAG,CACT;MACCC,KAAK,EAAE,IAAAT,QAAE,EAAE,eAAgB,CAAC;MAC5BU,OAAO,EAAEd,KAAK,CAACe;IAChB,CAAC,EACD;MACCF,KAAK,EAAE,IAAAT,QAAE,EAAE,oBAAqB,CAAC;MACjCU,OAAO,EAAEb;IACV,CAAC;EACC,GAED,IAAAG,QAAE,EACH,iFACD,CACO,CAAC;AAEX;AAAC,IAAAY,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEc,IAAAC,gBAAO,EAAE,CACvB,IAAAC,gBAAU,EAAIC,MAAM,KAAQ;EAC3BtB,OAAO,EAAEsB,MAAM,CAAEC,kBAAiB,CAAC,CAACC,eAAe,CAAC;AACrD,CAAC,CAAG,CAAC,EACL,IAAAC,kBAAY,EAAIC,QAAQ,IAAM;EAC7B,MAAM;IAAEC,mBAAmB;IAAErB;EAAoB,CAAC,GACjDoB,QAAQ,CAAEH,kBAAiB,CAAC;EAC7B,OAAO;IACNP,qBAAqB,EAAEA,CAAA,KAAMW,mBAAmB,CAAE,IAAK,CAAC;IACxDrB;EACD,CAAC;AACF,CAAE,CAAC,CACF,CAAC,CAAEP,wBAAyB,CAAC"}
1
+ {"version":3,"names":["_components","require","_i18n","_data","_element","_blockEditor","TemplateValidationNotice","showConfirmDialog","setShowConfirmDialog","useState","isValid","useSelect","select","blockEditorStore","isValidTemplate","setTemplateValidity","synchronizeTemplate","useDispatch","_react","createElement","Fragment","Notice","className","isDismissible","status","actions","label","__","onClick","__experimentalConfirmDialog","isOpen","confirmButtonText","onConfirm","onCancel"],"sources":["@wordpress/editor/src/components/template-validation-notice/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tNotice,\n\t__experimentalConfirmDialog as ConfirmDialog,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useState } from '@wordpress/element';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\nexport default function TemplateValidationNotice() {\n\tconst [ showConfirmDialog, setShowConfirmDialog ] = useState( false );\n\tconst isValid = useSelect( ( select ) => {\n\t\treturn select( blockEditorStore ).isValidTemplate();\n\t}, [] );\n\tconst { setTemplateValidity, synchronizeTemplate } =\n\t\tuseDispatch( blockEditorStore );\n\n\tif ( isValid ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<Notice\n\t\t\t\tclassName=\"editor-template-validation-notice\"\n\t\t\t\tisDismissible={ false }\n\t\t\t\tstatus=\"warning\"\n\t\t\t\tactions={ [\n\t\t\t\t\t{\n\t\t\t\t\t\tlabel: __( 'Keep it as is' ),\n\t\t\t\t\t\tonClick: () => setTemplateValidity( true ),\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tlabel: __( 'Reset the template' ),\n\t\t\t\t\t\tonClick: () => setShowConfirmDialog( true ),\n\t\t\t\t\t},\n\t\t\t\t] }\n\t\t\t>\n\t\t\t\t{ __(\n\t\t\t\t\t'The content of your post doesn’t match the template assigned to your post type.'\n\t\t\t\t) }\n\t\t\t</Notice>\n\t\t\t<ConfirmDialog\n\t\t\t\tisOpen={ showConfirmDialog }\n\t\t\t\tconfirmButtonText={ __( 'Reset' ) }\n\t\t\t\tonConfirm={ () => {\n\t\t\t\t\tsetShowConfirmDialog( false );\n\t\t\t\t\tsynchronizeTemplate();\n\t\t\t\t} }\n\t\t\t\tonCancel={ () => setShowConfirmDialog( false ) }\n\t\t\t>\n\t\t\t\t{ __(\n\t\t\t\t\t'Resetting the template may result in loss of content, do you want to continue?'\n\t\t\t\t) }\n\t\t\t</ConfirmDialog>\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAIA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AAVA;AACA;AACA;;AAUe,SAASK,wBAAwBA,CAAA,EAAG;EAClD,MAAM,CAAEC,iBAAiB,EAAEC,oBAAoB,CAAE,GAAG,IAAAC,iBAAQ,EAAE,KAAM,CAAC;EACrE,MAAMC,OAAO,GAAG,IAAAC,eAAS,EAAIC,MAAM,IAAM;IACxC,OAAOA,MAAM,CAAEC,kBAAiB,CAAC,CAACC,eAAe,CAAC,CAAC;EACpD,CAAC,EAAE,EAAG,CAAC;EACP,MAAM;IAAEC,mBAAmB;IAAEC;EAAoB,CAAC,GACjD,IAAAC,iBAAW,EAAEJ,kBAAiB,CAAC;EAEhC,IAAKH,OAAO,EAAG;IACd,OAAO,IAAI;EACZ;EAEA,OACC,IAAAQ,MAAA,CAAAC,aAAA,EAAAD,MAAA,CAAAE,QAAA,QACC,IAAAF,MAAA,CAAAC,aAAA,EAACnB,WAAA,CAAAqB,MAAM;IACNC,SAAS,EAAC,mCAAmC;IAC7CC,aAAa,EAAG,KAAO;IACvBC,MAAM,EAAC,SAAS;IAChBC,OAAO,EAAG,CACT;MACCC,KAAK,EAAE,IAAAC,QAAE,EAAE,eAAgB,CAAC;MAC5BC,OAAO,EAAEA,CAAA,KAAMb,mBAAmB,CAAE,IAAK;IAC1C,CAAC,EACD;MACCW,KAAK,EAAE,IAAAC,QAAE,EAAE,oBAAqB,CAAC;MACjCC,OAAO,EAAEA,CAAA,KAAMpB,oBAAoB,CAAE,IAAK;IAC3C,CAAC;EACC,GAED,IAAAmB,QAAE,EACH,iFACD,CACO,CAAC,EACT,IAAAT,MAAA,CAAAC,aAAA,EAACnB,WAAA,CAAA6B,2BAAa;IACbC,MAAM,EAAGvB,iBAAmB;IAC5BwB,iBAAiB,EAAG,IAAAJ,QAAE,EAAE,OAAQ,CAAG;IACnCK,SAAS,EAAGA,CAAA,KAAM;MACjBxB,oBAAoB,CAAE,KAAM,CAAC;MAC7BQ,mBAAmB,CAAC,CAAC;IACtB,CAAG;IACHiB,QAAQ,EAAGA,CAAA,KAAMzB,oBAAoB,CAAE,KAAM;EAAG,GAE9C,IAAAmB,QAAE,EACH,gFACD,CACc,CACd,CAAC;AAEL","ignoreList":[]}
@@ -3,8 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.ThemeSupportCheck = ThemeSupportCheck;
7
- exports.default = void 0;
6
+ exports.default = ThemeSupportCheck;
8
7
  var _data = require("@wordpress/data");
9
8
  var _coreData = require("@wordpress/core-data");
10
9
  var _store = require("../../store");
@@ -17,11 +16,18 @@ var _store = require("../../store");
17
16
  */
18
17
 
19
18
  function ThemeSupportCheck({
20
- themeSupports,
21
19
  children,
22
- postType,
23
20
  supportKeys
24
21
  }) {
22
+ const {
23
+ postType,
24
+ themeSupports
25
+ } = (0, _data.useSelect)(select => {
26
+ return {
27
+ postType: select(_store.store).getEditedPostAttribute('type'),
28
+ themeSupports: select(_coreData.store).getThemeSupports()
29
+ };
30
+ }, []);
25
31
  const isSupported = (Array.isArray(supportKeys) ? supportKeys : [supportKeys]).some(key => {
26
32
  var _themeSupports$key;
27
33
  const supported = (_themeSupports$key = themeSupports?.[key]) !== null && _themeSupports$key !== void 0 ? _themeSupports$key : false;
@@ -39,16 +45,4 @@ function ThemeSupportCheck({
39
45
  }
40
46
  return children;
41
47
  }
42
- var _default = exports.default = (0, _data.withSelect)(select => {
43
- const {
44
- getThemeSupports
45
- } = select(_coreData.store);
46
- const {
47
- getEditedPostAttribute
48
- } = select(_store.store);
49
- return {
50
- postType: getEditedPostAttribute('type'),
51
- themeSupports: getThemeSupports()
52
- };
53
- })(ThemeSupportCheck);
54
48
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_data","require","_coreData","_store","ThemeSupportCheck","themeSupports","children","postType","supportKeys","isSupported","Array","isArray","some","key","_themeSupports$key","supported","includes","_default","exports","default","withSelect","select","getThemeSupports","coreStore","getEditedPostAttribute","editorStore"],"sources":["@wordpress/editor/src/components/theme-support-check/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { withSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nexport function ThemeSupportCheck( {\n\tthemeSupports,\n\tchildren,\n\tpostType,\n\tsupportKeys,\n} ) {\n\tconst isSupported = (\n\t\tArray.isArray( supportKeys ) ? supportKeys : [ supportKeys ]\n\t).some( ( key ) => {\n\t\tconst supported = themeSupports?.[ key ] ?? false;\n\t\t// 'post-thumbnails' can be boolean or an array of post types.\n\t\t// In the latter case, we need to verify `postType` exists\n\t\t// within `supported`. If `postType` isn't passed, then the check\n\t\t// should fail.\n\t\tif ( 'post-thumbnails' === key && Array.isArray( supported ) ) {\n\t\t\treturn supported.includes( postType );\n\t\t}\n\t\treturn supported;\n\t} );\n\n\tif ( ! isSupported ) {\n\t\treturn null;\n\t}\n\n\treturn children;\n}\n\nexport default withSelect( ( select ) => {\n\tconst { getThemeSupports } = select( coreStore );\n\tconst { getEditedPostAttribute } = select( editorStore );\n\treturn {\n\t\tpostType: getEditedPostAttribute( 'type' ),\n\t\tthemeSupports: getThemeSupports(),\n\t};\n} )( ThemeSupportCheck );\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AAKA,IAAAE,MAAA,GAAAF,OAAA;AATA;AACA;AACA;;AAIA;AACA;AACA;;AAGO,SAASG,iBAAiBA,CAAE;EAClCC,aAAa;EACbC,QAAQ;EACRC,QAAQ;EACRC;AACD,CAAC,EAAG;EACH,MAAMC,WAAW,GAAG,CACnBC,KAAK,CAACC,OAAO,CAAEH,WAAY,CAAC,GAAGA,WAAW,GAAG,CAAEA,WAAW,CAAE,EAC3DI,IAAI,CAAIC,GAAG,IAAM;IAAA,IAAAC,kBAAA;IAClB,MAAMC,SAAS,IAAAD,kBAAA,GAAGT,aAAa,GAAIQ,GAAG,CAAE,cAAAC,kBAAA,cAAAA,kBAAA,GAAI,KAAK;IACjD;IACA;IACA;IACA;IACA,IAAK,iBAAiB,KAAKD,GAAG,IAAIH,KAAK,CAACC,OAAO,CAAEI,SAAU,CAAC,EAAG;MAC9D,OAAOA,SAAS,CAACC,QAAQ,CAAET,QAAS,CAAC;IACtC;IACA,OAAOQ,SAAS;EACjB,CAAE,CAAC;EAEH,IAAK,CAAEN,WAAW,EAAG;IACpB,OAAO,IAAI;EACZ;EAEA,OAAOH,QAAQ;AAChB;AAAC,IAAAW,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEc,IAAAC,gBAAU,EAAIC,MAAM,IAAM;EACxC,MAAM;IAAEC;EAAiB,CAAC,GAAGD,MAAM,CAAEE,eAAU,CAAC;EAChD,MAAM;IAAEC;EAAuB,CAAC,GAAGH,MAAM,CAAEI,YAAY,CAAC;EACxD,OAAO;IACNlB,QAAQ,EAAEiB,sBAAsB,CAAE,MAAO,CAAC;IAC1CnB,aAAa,EAAEiB,gBAAgB,CAAC;EACjC,CAAC;AACF,CAAE,CAAC,CAAElB,iBAAkB,CAAC"}
1
+ {"version":3,"names":["_data","require","_coreData","_store","ThemeSupportCheck","children","supportKeys","postType","themeSupports","useSelect","select","editorStore","getEditedPostAttribute","coreStore","getThemeSupports","isSupported","Array","isArray","some","key","_themeSupports$key","supported","includes"],"sources":["@wordpress/editor/src/components/theme-support-check/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nexport default function ThemeSupportCheck( { children, supportKeys } ) {\n\tconst { postType, themeSupports } = useSelect( ( select ) => {\n\t\treturn {\n\t\t\tpostType: select( editorStore ).getEditedPostAttribute( 'type' ),\n\t\t\tthemeSupports: select( coreStore ).getThemeSupports(),\n\t\t};\n\t}, [] );\n\n\tconst isSupported = (\n\t\tArray.isArray( supportKeys ) ? supportKeys : [ supportKeys ]\n\t).some( ( key ) => {\n\t\tconst supported = themeSupports?.[ key ] ?? false;\n\t\t// 'post-thumbnails' can be boolean or an array of post types.\n\t\t// In the latter case, we need to verify `postType` exists\n\t\t// within `supported`. If `postType` isn't passed, then the check\n\t\t// should fail.\n\t\tif ( 'post-thumbnails' === key && Array.isArray( supported ) ) {\n\t\t\treturn supported.includes( postType );\n\t\t}\n\t\treturn supported;\n\t} );\n\n\tif ( ! isSupported ) {\n\t\treturn null;\n\t}\n\n\treturn children;\n}\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AAKA,IAAAE,MAAA,GAAAF,OAAA;AATA;AACA;AACA;;AAIA;AACA;AACA;;AAGe,SAASG,iBAAiBA,CAAE;EAAEC,QAAQ;EAAEC;AAAY,CAAC,EAAG;EACtE,MAAM;IAAEC,QAAQ;IAAEC;EAAc,CAAC,GAAG,IAAAC,eAAS,EAAIC,MAAM,IAAM;IAC5D,OAAO;MACNH,QAAQ,EAAEG,MAAM,CAAEC,YAAY,CAAC,CAACC,sBAAsB,CAAE,MAAO,CAAC;MAChEJ,aAAa,EAAEE,MAAM,CAAEG,eAAU,CAAC,CAACC,gBAAgB,CAAC;IACrD,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EAEP,MAAMC,WAAW,GAAG,CACnBC,KAAK,CAACC,OAAO,CAAEX,WAAY,CAAC,GAAGA,WAAW,GAAG,CAAEA,WAAW,CAAE,EAC3DY,IAAI,CAAIC,GAAG,IAAM;IAAA,IAAAC,kBAAA;IAClB,MAAMC,SAAS,IAAAD,kBAAA,GAAGZ,aAAa,GAAIW,GAAG,CAAE,cAAAC,kBAAA,cAAAA,kBAAA,GAAI,KAAK;IACjD;IACA;IACA;IACA;IACA,IAAK,iBAAiB,KAAKD,GAAG,IAAIH,KAAK,CAACC,OAAO,CAAEI,SAAU,CAAC,EAAG;MAC9D,OAAOA,SAAS,CAACC,QAAQ,CAAEf,QAAS,CAAC;IACtC;IACA,OAAOc,SAAS;EACjB,CAAE,CAAC;EAEH,IAAK,CAAEN,WAAW,EAAG;IACpB,OAAO,IAAI;EACZ;EAEA,OAAOV,QAAQ;AAChB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_data","require","_i18n","_wordcount","_element","_store","AVERAGE_READING_RATE","TimeToRead","content","useSelect","select","editorStore","getEditedPostAttribute","wordCountType","_x","minutesToRead","Math","round","wordCount","minutesToReadString","createInterpolateElement","__","span","_react","createElement","sprintf","_n","className"],"sources":["@wordpress/editor/src/components/time-to-read/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { _x, _n, __, sprintf } from '@wordpress/i18n';\nimport { count as wordCount } from '@wordpress/wordcount';\nimport { createInterpolateElement } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * Average reading rate - based on average taken from\n * https://irisreading.com/average-reading-speed-in-various-languages/\n * (Characters/minute used for Chinese rather than words).\n *\n * @type {number} A rough estimate of the average reading rate across multiple languages.\n */\nconst AVERAGE_READING_RATE = 189;\n\nexport default function TimeToRead() {\n\tconst content = useSelect(\n\t\t( select ) => select( editorStore ).getEditedPostAttribute( 'content' ),\n\t\t[]\n\t);\n\n\t/*\n\t * translators: If your word count is based on single characters (e.g. East Asian characters),\n\t * enter 'characters_excluding_spaces' or 'characters_including_spaces'. Otherwise, enter 'words'.\n\t * Do not translate into your own language.\n\t */\n\tconst wordCountType = _x( 'words', 'Word count type. Do not translate!' );\n\tconst minutesToRead = Math.round(\n\t\twordCount( content, wordCountType ) / AVERAGE_READING_RATE\n\t);\n\tconst minutesToReadString =\n\t\tminutesToRead === 0\n\t\t\t? createInterpolateElement( __( '<span>< 1</span> minute' ), {\n\t\t\t\t\tspan: <span />,\n\t\t\t } )\n\t\t\t: createInterpolateElement(\n\t\t\t\t\tsprintf(\n\t\t\t\t\t\t/* translators: %s is the number of minutes the post will take to read. */\n\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t'<span>%d</span> minute',\n\t\t\t\t\t\t\t'<span>%d</span> minutes',\n\t\t\t\t\t\t\tminutesToRead\n\t\t\t\t\t\t),\n\t\t\t\t\t\tminutesToRead\n\t\t\t\t\t),\n\t\t\t\t\t{\n\t\t\t\t\t\tspan: <span />,\n\t\t\t\t\t}\n\t\t\t );\n\n\treturn <span className=\"time-to-read\">{ minutesToReadString }</span>;\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AAKA,IAAAI,MAAA,GAAAJ,OAAA;AAXA;AACA;AACA;;AAMA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMK,oBAAoB,GAAG,GAAG;AAEjB,SAASC,UAAUA,CAAA,EAAG;EACpC,MAAMC,OAAO,GAAG,IAAAC,eAAS,EACtBC,MAAM,IAAMA,MAAM,CAAEC,YAAY,CAAC,CAACC,sBAAsB,CAAE,SAAU,CAAC,EACvE,EACD,CAAC;;EAED;AACD;AACA;AACA;AACA;EACC,MAAMC,aAAa,GAAG,IAAAC,QAAE,EAAE,OAAO,EAAE,oCAAqC,CAAC;EACzE,MAAMC,aAAa,GAAGC,IAAI,CAACC,KAAK,CAC/B,IAAAC,gBAAS,EAAEV,OAAO,EAAEK,aAAc,CAAC,GAAGP,oBACvC,CAAC;EACD,MAAMa,mBAAmB,GACxBJ,aAAa,KAAK,CAAC,GAChB,IAAAK,iCAAwB,EAAE,IAAAC,QAAE,EAAE,yBAA0B,CAAC,EAAE;IAC3DC,IAAI,EAAE,IAAAC,MAAA,CAAAC,aAAA,cAAO;EACb,CAAE,CAAC,GACH,IAAAJ,iCAAwB,EACxB,IAAAK,aAAO,GACN;EACA,IAAAC,QAAE,EACD,wBAAwB,EACxB,yBAAyB,EACzBX,aACD,CAAC,EACDA,aACD,CAAC,EACD;IACCO,IAAI,EAAE,IAAAC,MAAA,CAAAC,aAAA,cAAO;EACd,CACA,CAAC;EAEL,OAAO,IAAAD,MAAA,CAAAC,aAAA;IAAMG,SAAS,EAAC;EAAc,GAAGR,mBAA2B,CAAC;AACrE"}
1
+ {"version":3,"names":["_data","require","_i18n","_wordcount","_element","_store","AVERAGE_READING_RATE","TimeToRead","content","useSelect","select","editorStore","getEditedPostAttribute","wordCountType","_x","minutesToRead","Math","round","wordCount","minutesToReadString","createInterpolateElement","__","span","_react","createElement","sprintf","_n","className"],"sources":["@wordpress/editor/src/components/time-to-read/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { _x, _n, __, sprintf } from '@wordpress/i18n';\nimport { count as wordCount } from '@wordpress/wordcount';\nimport { createInterpolateElement } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * Average reading rate - based on average taken from\n * https://irisreading.com/average-reading-speed-in-various-languages/\n * (Characters/minute used for Chinese rather than words).\n *\n * @type {number} A rough estimate of the average reading rate across multiple languages.\n */\nconst AVERAGE_READING_RATE = 189;\n\nexport default function TimeToRead() {\n\tconst content = useSelect(\n\t\t( select ) => select( editorStore ).getEditedPostAttribute( 'content' ),\n\t\t[]\n\t);\n\n\t/*\n\t * translators: If your word count is based on single characters (e.g. East Asian characters),\n\t * enter 'characters_excluding_spaces' or 'characters_including_spaces'. Otherwise, enter 'words'.\n\t * Do not translate into your own language.\n\t */\n\tconst wordCountType = _x( 'words', 'Word count type. Do not translate!' );\n\tconst minutesToRead = Math.round(\n\t\twordCount( content, wordCountType ) / AVERAGE_READING_RATE\n\t);\n\tconst minutesToReadString =\n\t\tminutesToRead === 0\n\t\t\t? createInterpolateElement( __( '<span>< 1</span> minute' ), {\n\t\t\t\t\tspan: <span />,\n\t\t\t } )\n\t\t\t: createInterpolateElement(\n\t\t\t\t\tsprintf(\n\t\t\t\t\t\t/* translators: %s is the number of minutes the post will take to read. */\n\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t'<span>%d</span> minute',\n\t\t\t\t\t\t\t'<span>%d</span> minutes',\n\t\t\t\t\t\t\tminutesToRead\n\t\t\t\t\t\t),\n\t\t\t\t\t\tminutesToRead\n\t\t\t\t\t),\n\t\t\t\t\t{\n\t\t\t\t\t\tspan: <span />,\n\t\t\t\t\t}\n\t\t\t );\n\n\treturn <span className=\"time-to-read\">{ minutesToReadString }</span>;\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AAKA,IAAAI,MAAA,GAAAJ,OAAA;AAXA;AACA;AACA;;AAMA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMK,oBAAoB,GAAG,GAAG;AAEjB,SAASC,UAAUA,CAAA,EAAG;EACpC,MAAMC,OAAO,GAAG,IAAAC,eAAS,EACtBC,MAAM,IAAMA,MAAM,CAAEC,YAAY,CAAC,CAACC,sBAAsB,CAAE,SAAU,CAAC,EACvE,EACD,CAAC;;EAED;AACD;AACA;AACA;AACA;EACC,MAAMC,aAAa,GAAG,IAAAC,QAAE,EAAE,OAAO,EAAE,oCAAqC,CAAC;EACzE,MAAMC,aAAa,GAAGC,IAAI,CAACC,KAAK,CAC/B,IAAAC,gBAAS,EAAEV,OAAO,EAAEK,aAAc,CAAC,GAAGP,oBACvC,CAAC;EACD,MAAMa,mBAAmB,GACxBJ,aAAa,KAAK,CAAC,GAChB,IAAAK,iCAAwB,EAAE,IAAAC,QAAE,EAAE,yBAA0B,CAAC,EAAE;IAC3DC,IAAI,EAAE,IAAAC,MAAA,CAAAC,aAAA,cAAO;EACb,CAAE,CAAC,GACH,IAAAJ,iCAAwB,EACxB,IAAAK,aAAO,GACN;EACA,IAAAC,QAAE,EACD,wBAAwB,EACxB,yBAAyB,EACzBX,aACD,CAAC,EACDA,aACD,CAAC,EACD;IACCO,IAAI,EAAE,IAAAC,MAAA,CAAAC,aAAA,cAAO;EACd,CACA,CAAC;EAEL,OAAO,IAAAD,MAAA,CAAAC,aAAA;IAAMG,SAAS,EAAC;EAAc,GAAGR,mBAA2B,CAAC;AACrE","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_i18n","require","_element","_data","_coreData","UnsavedChangesWarning","__experimentalGetDirtyEntityRecords","useSelect","coreStore","useEffect","warnIfUnsavedChanges","event","dirtyEntityRecords","length","returnValue","__","window","addEventListener","removeEventListener"],"sources":["@wordpress/editor/src/components/unsaved-changes-warning/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useEffect } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Warns the user if there are unsaved changes before leaving the editor.\n * Compatible with Post Editor and Site Editor.\n *\n * @return {Component} The component.\n */\nexport default function UnsavedChangesWarning() {\n\tconst { __experimentalGetDirtyEntityRecords } = useSelect( coreStore );\n\n\tuseEffect( () => {\n\t\t/**\n\t\t * Warns the user if there are unsaved changes before leaving the editor.\n\t\t *\n\t\t * @param {Event} event `beforeunload` event.\n\t\t *\n\t\t * @return {string | undefined} Warning prompt message, if unsaved changes exist.\n\t\t */\n\t\tconst warnIfUnsavedChanges = ( event ) => {\n\t\t\t// We need to call the selector directly in the listener to avoid race\n\t\t\t// conditions with `BrowserURL` where `componentDidUpdate` gets the\n\t\t\t// new value of `isEditedPostDirty` before this component does,\n\t\t\t// causing this component to incorrectly think a trashed post is still dirty.\n\t\t\tconst dirtyEntityRecords = __experimentalGetDirtyEntityRecords();\n\t\t\tif ( dirtyEntityRecords.length > 0 ) {\n\t\t\t\tevent.returnValue = __(\n\t\t\t\t\t'You have unsaved changes. If you proceed, they will be lost.'\n\t\t\t\t);\n\t\t\t\treturn event.returnValue;\n\t\t\t}\n\t\t};\n\n\t\twindow.addEventListener( 'beforeunload', warnIfUnsavedChanges );\n\n\t\treturn () => {\n\t\t\twindow.removeEventListener( 'beforeunload', warnIfUnsavedChanges );\n\t\t};\n\t}, [ __experimentalGetDirtyEntityRecords ] );\n\n\treturn null;\n}\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AANA;AACA;AACA;;AAMA;AACA;AACA;AACA;AACA;AACA;AACe,SAASI,qBAAqBA,CAAA,EAAG;EAC/C,MAAM;IAAEC;EAAoC,CAAC,GAAG,IAAAC,eAAS,EAAEC,eAAU,CAAC;EAEtE,IAAAC,kBAAS,EAAE,MAAM;IAChB;AACF;AACA;AACA;AACA;AACA;AACA;IACE,MAAMC,oBAAoB,GAAKC,KAAK,IAAM;MACzC;MACA;MACA;MACA;MACA,MAAMC,kBAAkB,GAAGN,mCAAmC,CAAC,CAAC;MAChE,IAAKM,kBAAkB,CAACC,MAAM,GAAG,CAAC,EAAG;QACpCF,KAAK,CAACG,WAAW,GAAG,IAAAC,QAAE,EACrB,8DACD,CAAC;QACD,OAAOJ,KAAK,CAACG,WAAW;MACzB;IACD,CAAC;IAEDE,MAAM,CAACC,gBAAgB,CAAE,cAAc,EAAEP,oBAAqB,CAAC;IAE/D,OAAO,MAAM;MACZM,MAAM,CAACE,mBAAmB,CAAE,cAAc,EAAER,oBAAqB,CAAC;IACnE,CAAC;EACF,CAAC,EAAE,CAAEJ,mCAAmC,CAAG,CAAC;EAE5C,OAAO,IAAI;AACZ"}
1
+ {"version":3,"names":["_i18n","require","_element","_data","_coreData","UnsavedChangesWarning","__experimentalGetDirtyEntityRecords","useSelect","coreStore","useEffect","warnIfUnsavedChanges","event","dirtyEntityRecords","length","returnValue","__","window","addEventListener","removeEventListener"],"sources":["@wordpress/editor/src/components/unsaved-changes-warning/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useEffect } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Warns the user if there are unsaved changes before leaving the editor.\n * Compatible with Post Editor and Site Editor.\n *\n * @return {Component} The component.\n */\nexport default function UnsavedChangesWarning() {\n\tconst { __experimentalGetDirtyEntityRecords } = useSelect( coreStore );\n\n\tuseEffect( () => {\n\t\t/**\n\t\t * Warns the user if there are unsaved changes before leaving the editor.\n\t\t *\n\t\t * @param {Event} event `beforeunload` event.\n\t\t *\n\t\t * @return {string | undefined} Warning prompt message, if unsaved changes exist.\n\t\t */\n\t\tconst warnIfUnsavedChanges = ( event ) => {\n\t\t\t// We need to call the selector directly in the listener to avoid race\n\t\t\t// conditions with `BrowserURL` where `componentDidUpdate` gets the\n\t\t\t// new value of `isEditedPostDirty` before this component does,\n\t\t\t// causing this component to incorrectly think a trashed post is still dirty.\n\t\t\tconst dirtyEntityRecords = __experimentalGetDirtyEntityRecords();\n\t\t\tif ( dirtyEntityRecords.length > 0 ) {\n\t\t\t\tevent.returnValue = __(\n\t\t\t\t\t'You have unsaved changes. If you proceed, they will be lost.'\n\t\t\t\t);\n\t\t\t\treturn event.returnValue;\n\t\t\t}\n\t\t};\n\n\t\twindow.addEventListener( 'beforeunload', warnIfUnsavedChanges );\n\n\t\treturn () => {\n\t\t\twindow.removeEventListener( 'beforeunload', warnIfUnsavedChanges );\n\t\t};\n\t}, [ __experimentalGetDirtyEntityRecords ] );\n\n\treturn null;\n}\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AANA;AACA;AACA;;AAMA;AACA;AACA;AACA;AACA;AACA;AACe,SAASI,qBAAqBA,CAAA,EAAG;EAC/C,MAAM;IAAEC;EAAoC,CAAC,GAAG,IAAAC,eAAS,EAAEC,eAAU,CAAC;EAEtE,IAAAC,kBAAS,EAAE,MAAM;IAChB;AACF;AACA;AACA;AACA;AACA;AACA;IACE,MAAMC,oBAAoB,GAAKC,KAAK,IAAM;MACzC;MACA;MACA;MACA;MACA,MAAMC,kBAAkB,GAAGN,mCAAmC,CAAC,CAAC;MAChE,IAAKM,kBAAkB,CAACC,MAAM,GAAG,CAAC,EAAG;QACpCF,KAAK,CAACG,WAAW,GAAG,IAAAC,QAAE,EACrB,8DACD,CAAC;QACD,OAAOJ,KAAK,CAACG,WAAW;MACzB;IACD,CAAC;IAEDE,MAAM,CAACC,gBAAgB,CAAE,cAAc,EAAEP,oBAAqB,CAAC;IAE/D,OAAO,MAAM;MACZM,MAAM,CAACE,mBAAmB,CAAE,cAAc,EAAER,oBAAqB,CAAC;IACnE,CAAC;EACF,CAAC,EAAE,CAAEJ,mCAAmC,CAAG,CAAC;EAE5C,OAAO,IAAI;AACZ","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_data","require","_i18n","_wordcount","_store","WordCount","content","useSelect","select","editorStore","getEditedPostAttribute","wordCountType","_x","_react","createElement","className","wordCount"],"sources":["@wordpress/editor/src/components/word-count/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { _x } from '@wordpress/i18n';\nimport { count as wordCount } from '@wordpress/wordcount';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nexport default function WordCount() {\n\tconst content = useSelect(\n\t\t( select ) => select( editorStore ).getEditedPostAttribute( 'content' ),\n\t\t[]\n\t);\n\n\t/*\n\t * translators: If your word count is based on single characters (e.g. East Asian characters),\n\t * enter 'characters_excluding_spaces' or 'characters_including_spaces'. Otherwise, enter 'words'.\n\t * Do not translate into your own language.\n\t */\n\tconst wordCountType = _x( 'words', 'Word count type. Do not translate!' );\n\n\treturn (\n\t\t<span className=\"word-count\">\n\t\t\t{ wordCount( content, wordCountType ) }\n\t\t</span>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AAKA,IAAAG,MAAA,GAAAH,OAAA;AAVA;AACA;AACA;;AAKA;AACA;AACA;;AAGe,SAASI,SAASA,CAAA,EAAG;EACnC,MAAMC,OAAO,GAAG,IAAAC,eAAS,EACtBC,MAAM,IAAMA,MAAM,CAAEC,YAAY,CAAC,CAACC,sBAAsB,CAAE,SAAU,CAAC,EACvE,EACD,CAAC;;EAED;AACD;AACA;AACA;AACA;EACC,MAAMC,aAAa,GAAG,IAAAC,QAAE,EAAE,OAAO,EAAE,oCAAqC,CAAC;EAEzE,OACC,IAAAC,MAAA,CAAAC,aAAA;IAAMC,SAAS,EAAC;EAAY,GACzB,IAAAC,gBAAS,EAAEV,OAAO,EAAEK,aAAc,CAC/B,CAAC;AAET"}
1
+ {"version":3,"names":["_data","require","_i18n","_wordcount","_store","WordCount","content","useSelect","select","editorStore","getEditedPostAttribute","wordCountType","_x","_react","createElement","className","wordCount"],"sources":["@wordpress/editor/src/components/word-count/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { _x } from '@wordpress/i18n';\nimport { count as wordCount } from '@wordpress/wordcount';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nexport default function WordCount() {\n\tconst content = useSelect(\n\t\t( select ) => select( editorStore ).getEditedPostAttribute( 'content' ),\n\t\t[]\n\t);\n\n\t/*\n\t * translators: If your word count is based on single characters (e.g. East Asian characters),\n\t * enter 'characters_excluding_spaces' or 'characters_including_spaces'. Otherwise, enter 'words'.\n\t * Do not translate into your own language.\n\t */\n\tconst wordCountType = _x( 'words', 'Word count type. Do not translate!' );\n\n\treturn (\n\t\t<span className=\"word-count\">\n\t\t\t{ wordCount( content, wordCountType ) }\n\t\t</span>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AAKA,IAAAG,MAAA,GAAAH,OAAA;AAVA;AACA;AACA;;AAKA;AACA;AACA;;AAGe,SAASI,SAASA,CAAA,EAAG;EACnC,MAAMC,OAAO,GAAG,IAAAC,eAAS,EACtBC,MAAM,IAAMA,MAAM,CAAEC,YAAY,CAAC,CAACC,sBAAsB,CAAE,SAAU,CAAC,EACvE,EACD,CAAC;;EAED;AACD;AACA;AACA;AACA;EACC,MAAMC,aAAa,GAAG,IAAAC,QAAE,EAAE,OAAO,EAAE,oCAAqC,CAAC;EAEzE,OACC,IAAAC,MAAA,CAAAC,aAAA;IAAMC,SAAS,EAAC;EAAY,GACzB,IAAAC,gBAAS,EAAEV,OAAO,EAAEK,aAAc,CAC/B,CAAC;AAET","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_data","require","_coreData","_element","_compose","_hooks","_store","createWithMetaAttributeSource","metaAttributes","createHigherOrderComponent","BlockEdit","attributes","setAttributes","props","postType","useSelect","select","editorStore","getCurrentPostType","meta","setMeta","useEntityProp","mergedAttributes","useMemo","Object","fromEntries","entries","map","attributeKey","metaKey","_react","createElement","nextAttributes","nextMeta","filter","key","value","length","shimAttributeSource","settings","_settings$attributes","source","edit","addFilter"],"sources":["@wordpress/editor/src/hooks/custom-sources-backwards-compatibility.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { useEntityProp } from '@wordpress/core-data';\nimport { useMemo } from '@wordpress/element';\nimport { createHigherOrderComponent } from '@wordpress/compose';\nimport { addFilter } from '@wordpress/hooks';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../store';\n\n/** @typedef {import('@wordpress/compose').WPHigherOrderComponent} WPHigherOrderComponent */\n/** @typedef {import('@wordpress/blocks').WPBlockSettings} WPBlockSettings */\n\n/**\n * Object whose keys are the names of block attributes, where each value\n * represents the meta key to which the block attribute is intended to save.\n *\n * @see https://developer.wordpress.org/reference/functions/register_meta/\n *\n * @typedef {Object<string,string>} WPMetaAttributeMapping\n */\n\n/**\n * Given a mapping of attribute names (meta source attributes) to their\n * associated meta key, returns a higher order component that overrides its\n * `attributes` and `setAttributes` props to sync any changes with the edited\n * post's meta keys.\n *\n * @param {WPMetaAttributeMapping} metaAttributes Meta attribute mapping.\n *\n * @return {WPHigherOrderComponent} Higher-order component.\n */\nconst createWithMetaAttributeSource = ( metaAttributes ) =>\n\tcreateHigherOrderComponent(\n\t\t( BlockEdit ) =>\n\t\t\t( { attributes, setAttributes, ...props } ) => {\n\t\t\t\tconst postType = useSelect(\n\t\t\t\t\t( select ) => select( editorStore ).getCurrentPostType(),\n\t\t\t\t\t[]\n\t\t\t\t);\n\t\t\t\tconst [ meta, setMeta ] = useEntityProp(\n\t\t\t\t\t'postType',\n\t\t\t\t\tpostType,\n\t\t\t\t\t'meta'\n\t\t\t\t);\n\n\t\t\t\tconst mergedAttributes = useMemo(\n\t\t\t\t\t() => ( {\n\t\t\t\t\t\t...attributes,\n\t\t\t\t\t\t...Object.fromEntries(\n\t\t\t\t\t\t\tObject.entries( metaAttributes ).map(\n\t\t\t\t\t\t\t\t( [ attributeKey, metaKey ] ) => [\n\t\t\t\t\t\t\t\t\tattributeKey,\n\t\t\t\t\t\t\t\t\tmeta[ metaKey ],\n\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t),\n\t\t\t\t\t} ),\n\t\t\t\t\t[ attributes, meta ]\n\t\t\t\t);\n\n\t\t\t\treturn (\n\t\t\t\t\t<BlockEdit\n\t\t\t\t\t\tattributes={ mergedAttributes }\n\t\t\t\t\t\tsetAttributes={ ( nextAttributes ) => {\n\t\t\t\t\t\t\tconst nextMeta = Object.fromEntries(\n\t\t\t\t\t\t\t\tObject.entries( nextAttributes ?? {} )\n\t\t\t\t\t\t\t\t\t.filter(\n\t\t\t\t\t\t\t\t\t\t// Filter to intersection of keys between the updated\n\t\t\t\t\t\t\t\t\t\t// attributes and those with an associated meta key.\n\t\t\t\t\t\t\t\t\t\t( [ key ] ) => key in metaAttributes\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t.map( ( [ attributeKey, value ] ) => [\n\t\t\t\t\t\t\t\t\t\t// Rename the keys to the expected meta key name.\n\t\t\t\t\t\t\t\t\t\tmetaAttributes[ attributeKey ],\n\t\t\t\t\t\t\t\t\t\tvalue,\n\t\t\t\t\t\t\t\t\t] )\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\tif ( Object.entries( nextMeta ).length ) {\n\t\t\t\t\t\t\t\tsetMeta( nextMeta );\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tsetAttributes( nextAttributes );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\t{ ...props }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t},\n\t\t'withMetaAttributeSource'\n\t);\n\n/**\n * Filters a registered block's settings to enhance a block's `edit` component\n * to upgrade meta-sourced attributes to use the post's meta entity property.\n *\n * @param {WPBlockSettings} settings Registered block settings.\n *\n * @return {WPBlockSettings} Filtered block settings.\n */\nfunction shimAttributeSource( settings ) {\n\t/** @type {WPMetaAttributeMapping} */\n\tconst metaAttributes = Object.fromEntries(\n\t\tObject.entries( settings.attributes ?? {} )\n\t\t\t.filter( ( [ , { source } ] ) => source === 'meta' )\n\t\t\t.map( ( [ attributeKey, { meta } ] ) => [ attributeKey, meta ] )\n\t);\n\tif ( Object.entries( metaAttributes ).length ) {\n\t\tsettings.edit = createWithMetaAttributeSource( metaAttributes )(\n\t\t\tsettings.edit\n\t\t);\n\t}\n\n\treturn settings;\n}\n\naddFilter(\n\t'blocks.registerBlockType',\n\t'core/editor/custom-sources-backwards-compatibility/shim-attribute-source',\n\tshimAttributeSource\n);\n"],"mappings":";;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AAKA,IAAAK,MAAA,GAAAL,OAAA;AAZA;AACA;AACA;;AAOA;AACA;AACA;;AA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AY,CAAE,EAC9BQ,KAAK,CACJ,CACJ,CAAC;MAED,IAAKZ,MAAM,CAACE,OAAO,CAAEO,QAAS,CAAC,CAACI,MAAM,EAAG;QACxCjB,OAAO,CAAEa,QAAS,CAAC;MACpB;MAEArB,aAAa,CAAEoB,cAAe,CAAC;IAChC,CAAG;IAAA,GACEnB;EAAK,CACV,CAAC;AAEJ,CAAC,EACF,yBACD,CAAC;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASyB,mBAAmBA,CAAEC,QAAQ,EAAG;EAAA,IAAAC,oBAAA;EACxC;EACA,MAAMhC,cAAc,GAAGgB,MAAM,CAACC,WAAW,CACxCD,MAAM,CAACE,OAAO,EAAAc,oBAAA,GAAED,QAAQ,CAAC5B,UAAU,cAAA6B,oBAAA,cAAAA,oBAAA,GAAI,CAAC,CAAE,CAAC,CACzCN,MAAM,CAAE,CAAE,GAAI;IAAEO;EAAO,CAAC,CAAE,KAAMA,MAAM,KAAK,MAAO,CAAC,CACnDd,GAAG,CAAE,CAAE,CAAEC,YAAY,EAAE;IAAET;EAAK,CAAC,CAAE,KAAM,CAAES,YAAY,EAAET,IAAI,CAAG,CACjE,CAAC;EACD,IAAKK,MAAM,CAACE,OAAO,CAAElB,cAAe,CAAC,CAAC6B,MAAM,EAAG;IAC9CE,QAAQ,CAACG,IAAI,GAAGnC,6BAA6B,CAAEC,cAAe,CAAC,CAC9D+B,QAAQ,CAACG,IACV,CAAC;EACF;EAEA,OAAOH,QAAQ;AAChB;AAEA,IAAAI,gBAAS,EACR,0BAA0B,EAC1B,0EAA0E,EAC1EL,mBACD,CAAC"}
1
+ {"version":3,"names":["_data","require","_coreData","_element","_compose","_hooks","_store","createWithMetaAttributeSource","metaAttributes","createHigherOrderComponent","BlockEdit","attributes","setAttributes","props","postType","useSelect","select","editorStore","getCurrentPostType","meta","setMeta","useEntityProp","mergedAttributes","useMemo","Object","fromEntries","entries","map","attributeKey","metaKey","_react","createElement","nextAttributes","nextMeta","filter","key","value","length","shimAttributeSource","settings","_settings$attributes","source","edit","addFilter"],"sources":["@wordpress/editor/src/hooks/custom-sources-backwards-compatibility.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { useEntityProp } from '@wordpress/core-data';\nimport { useMemo } from '@wordpress/element';\nimport { createHigherOrderComponent } from '@wordpress/compose';\nimport { addFilter } from '@wordpress/hooks';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../store';\n\n/** @typedef {import('@wordpress/compose').WPHigherOrderComponent} WPHigherOrderComponent */\n/** @typedef {import('@wordpress/blocks').WPBlockSettings} WPBlockSettings */\n\n/**\n * Object whose keys are the names of block attributes, where each value\n * represents the meta key to which the block attribute is intended to save.\n *\n * @see https://developer.wordpress.org/reference/functions/register_meta/\n *\n * @typedef {Object<string,string>} WPMetaAttributeMapping\n */\n\n/**\n * Given a mapping of attribute names (meta source attributes) to their\n * associated meta key, returns a higher order component that overrides its\n * `attributes` and `setAttributes` props to sync any changes with the edited\n * post's meta keys.\n *\n * @param {WPMetaAttributeMapping} metaAttributes Meta attribute mapping.\n *\n * @return {WPHigherOrderComponent} Higher-order component.\n */\nconst createWithMetaAttributeSource = ( metaAttributes ) =>\n\tcreateHigherOrderComponent(\n\t\t( BlockEdit ) =>\n\t\t\t( { attributes, setAttributes, ...props } ) => {\n\t\t\t\tconst postType = useSelect(\n\t\t\t\t\t( select ) => select( editorStore ).getCurrentPostType(),\n\t\t\t\t\t[]\n\t\t\t\t);\n\t\t\t\tconst [ meta, setMeta ] = useEntityProp(\n\t\t\t\t\t'postType',\n\t\t\t\t\tpostType,\n\t\t\t\t\t'meta'\n\t\t\t\t);\n\n\t\t\t\tconst mergedAttributes = useMemo(\n\t\t\t\t\t() => ( {\n\t\t\t\t\t\t...attributes,\n\t\t\t\t\t\t...Object.fromEntries(\n\t\t\t\t\t\t\tObject.entries( metaAttributes ).map(\n\t\t\t\t\t\t\t\t( [ attributeKey, metaKey ] ) => [\n\t\t\t\t\t\t\t\t\tattributeKey,\n\t\t\t\t\t\t\t\t\tmeta[ metaKey ],\n\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t),\n\t\t\t\t\t} ),\n\t\t\t\t\t[ attributes, meta ]\n\t\t\t\t);\n\n\t\t\t\treturn (\n\t\t\t\t\t<BlockEdit\n\t\t\t\t\t\tattributes={ mergedAttributes }\n\t\t\t\t\t\tsetAttributes={ ( nextAttributes ) => {\n\t\t\t\t\t\t\tconst nextMeta = Object.fromEntries(\n\t\t\t\t\t\t\t\tObject.entries( nextAttributes ?? {} )\n\t\t\t\t\t\t\t\t\t.filter(\n\t\t\t\t\t\t\t\t\t\t// Filter to intersection of keys between the updated\n\t\t\t\t\t\t\t\t\t\t// attributes and those with an associated meta key.\n\t\t\t\t\t\t\t\t\t\t( [ key ] ) => key in metaAttributes\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t.map( ( [ attributeKey, value ] ) => [\n\t\t\t\t\t\t\t\t\t\t// Rename the keys to the expected meta key name.\n\t\t\t\t\t\t\t\t\t\tmetaAttributes[ attributeKey ],\n\t\t\t\t\t\t\t\t\t\tvalue,\n\t\t\t\t\t\t\t\t\t] )\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\tif ( Object.entries( nextMeta ).length ) {\n\t\t\t\t\t\t\t\tsetMeta( nextMeta );\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tsetAttributes( nextAttributes );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\t{ ...props }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t},\n\t\t'withMetaAttributeSource'\n\t);\n\n/**\n * Filters a registered block's settings to enhance a block's `edit` component\n * to upgrade meta-sourced attributes to use the post's meta entity property.\n *\n * @param {WPBlockSettings} settings Registered block settings.\n *\n * @return {WPBlockSettings} Filtered block settings.\n */\nfunction shimAttributeSource( settings ) {\n\t/** @type {WPMetaAttributeMapping} */\n\tconst metaAttributes = Object.fromEntries(\n\t\tObject.entries( settings.attributes ?? {} )\n\t\t\t.filter( ( [ , { source } ] ) => source === 'meta' )\n\t\t\t.map( ( [ attributeKey, { meta } ] ) => [ attributeKey, meta ] )\n\t);\n\tif ( Object.entries( metaAttributes ).length ) {\n\t\tsettings.edit = createWithMetaAttributeSource( metaAttributes )(\n\t\t\tsettings.edit\n\t\t);\n\t}\n\n\treturn settings;\n}\n\naddFilter(\n\t'blocks.registerBlockType',\n\t'core/editor/custom-sources-backwards-compatibility/shim-attribute-source',\n\tshimAttributeSource\n);\n"],"mappings":";;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AAKA,IAAAK,MAAA,GAAAL,OAAA;AAZA;AACA;AACA;;AAOA;AACA;AACA;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMM,6BAA6B,GAAKC,cAAc,IACrD,IAAAC,mCAA0B,EACvBC,SAAS,IACV,CAAE;EAAEC,UAAU;EAAEC,aAAa;EAAE,GAAGC;AAAM,CAAC,KAAM;EAC9C,MAAMC,QAAQ,GAAG,IAAAC,eAAS,EACvBC,MAAM,IAAMA,MAAM,CAAEC,YAAY,CAAC,CAACC,kBAAkB,CAAC,CAAC,EACxD,EACD,CAAC;EACD,MAAM,CAAEC,IAAI,EAAEC,OAAO,CAAE,GAAG,IAAAC,uBAAa,EACtC,UAAU,EACVP,QAAQ,EACR,MACD,CAAC;EAED,MAAMQ,gBAAgB,GAAG,IAAAC,gBAAO,EAC/B,OAAQ;IACP,GAAGZ,UAAU;IACb,GAAGa,MAAM,CAACC,WAAW,CACpBD,MAAM,CAACE,OAAO,CAAElB,cAAe,CAAC,CAAC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Dd,GAAG,CAAE,CAAE,CAAEC,YAAY,EAAE;IAAET;EAAK,CAAC,CAAE,KAAM,CAAES,YAAY,EAAET,IAAI,CAAG,CACjE,CAAC;EACD,IAAKK,MAAM,CAACE,OAAO,CAAElB,cAAe,CAAC,CAAC6B,MAAM,EAAG;IAC9CE,QAAQ,CAACG,IAAI,GAAGnC,6BAA6B,CAAEC,cAAe,CAAC,CAC9D+B,QAAQ,CAACG,IACV,CAAC;EACF;EAEA,OAAOH,QAAQ;AAChB;AAEA,IAAAI,gBAAS,EACR,0BAA0B,EAC1B,0EAA0E,EAC1EL,mBACD,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_hooks","require","_components","setDefaultCompleters","completers","push","userAutocompleter","addFilter"],"sources":["@wordpress/editor/src/hooks/default-autocompleters.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { addFilter } from '@wordpress/hooks';\n\n/**\n * Internal dependencies\n */\nimport { userAutocompleter } from '../components';\n\nfunction setDefaultCompleters( completers = [] ) {\n\t// Provide copies so filters may directly modify them.\n\tcompleters.push( { ...userAutocompleter } );\n\n\treturn completers;\n}\n\naddFilter(\n\t'editor.Autocomplete.completers',\n\t'editor/autocompleters/set-default-completers',\n\tsetDefaultCompleters\n);\n"],"mappings":";;AAGA,IAAAA,MAAA,GAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AARA;AACA;AACA;;AAGA;AACA;AACA;;AAGA,SAASE,oBAAoBA,CAAEC,UAAU,GAAG,EAAE,EAAG;EAChD;EACAA,UAAU,CAACC,IAAI,CAAE;IAAE,GAAGC;EAAkB,CAAE,CAAC;EAE3C,OAAOF,UAAU;AAClB;AAEA,IAAAG,gBAAS,EACR,gCAAgC,EAChC,8CAA8C,EAC9CJ,oBACD,CAAC"}
1
+ {"version":3,"names":["_hooks","require","_components","setDefaultCompleters","completers","push","userAutocompleter","addFilter"],"sources":["@wordpress/editor/src/hooks/default-autocompleters.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { addFilter } from '@wordpress/hooks';\n\n/**\n * Internal dependencies\n */\nimport { userAutocompleter } from '../components';\n\nfunction setDefaultCompleters( completers = [] ) {\n\t// Provide copies so filters may directly modify them.\n\tcompleters.push( { ...userAutocompleter } );\n\n\treturn completers;\n}\n\naddFilter(\n\t'editor.Autocomplete.completers',\n\t'editor/autocompleters/set-default-completers',\n\tsetDefaultCompleters\n);\n"],"mappings":";;AAGA,IAAAA,MAAA,GAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AARA;AACA;AACA;;AAGA;AACA;AACA;;AAGA,SAASE,oBAAoBA,CAAEC,UAAU,GAAG,EAAE,EAAG;EAChD;EACAA,UAAU,CAACC,IAAI,CAAE;IAAE,GAAGC;EAAkB,CAAE,CAAC;EAE3C,OAAOF,UAAU;AAClB;AAEA,IAAAG,gBAAS,EACR,gCAAgC,EAChC,8CAA8C,EAC9CJ,oBACD,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["require"],"sources":["@wordpress/editor/src/hooks/index.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport './custom-sources-backwards-compatibility';\nimport './default-autocompleters';\nimport './pattern-overrides';\n"],"mappings":";;AAGAA,OAAA;AACAA,OAAA;AACAA,OAAA"}
1
+ {"version":3,"names":["require"],"sources":["@wordpress/editor/src/hooks/index.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport './custom-sources-backwards-compatibility';\nimport './default-autocompleters';\nimport './pattern-overrides';\n"],"mappings":";;AAGAA,OAAA;AACAA,OAAA;AACAA,OAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["@wordpress/editor/src/hooks/index.native.js"],"sourcesContent":[""],"mappings":""}
1
+ {"version":3,"names":[],"sources":["@wordpress/editor/src/hooks/index.native.js"],"sourcesContent":[""],"mappings":"","ignoreList":[]}
@@ -6,6 +6,7 @@ var _patterns = require("@wordpress/patterns");
6
6
  var _compose = require("@wordpress/compose");
7
7
  var _blockEditor = require("@wordpress/block-editor");
8
8
  var _data = require("@wordpress/data");
9
+ var _blocks = require("@wordpress/blocks");
9
10
  var _store = require("../store");
10
11
  var _lockUnlock = require("../lock-unlock");
11
12
  /**
@@ -17,7 +18,7 @@ var _lockUnlock = require("../lock-unlock");
17
18
  */
18
19
 
19
20
  const {
20
- useSetPatternBindings,
21
+ PatternOverridesControls,
21
22
  ResetOverridesControl,
22
23
  PATTERN_TYPES,
23
24
  PARTIAL_SYNCING_SUPPORTED_BLOCKS
@@ -36,27 +37,38 @@ const withPatternOverrideControls = (0, _compose.createHigherOrderComponent)(Blo
36
37
  const isSupportedBlock = Object.keys(PARTIAL_SYNCING_SUPPORTED_BLOCKS).includes(props.name);
37
38
  return (0, _react.createElement)(_react.Fragment, null, (0, _react.createElement)(BlockEdit, {
38
39
  ...props
39
- }), isSupportedBlock && (0, _react.createElement)(BindingUpdater, {
40
- ...props
41
40
  }), props.isSelected && isSupportedBlock && (0, _react.createElement)(ControlsWithStoreSubscription, {
42
41
  ...props
43
42
  }));
44
43
  });
45
- function BindingUpdater(props) {
46
- const postType = (0, _data.useSelect)(select => select(_store.store).getCurrentPostType(), []);
47
- useSetPatternBindings(props, postType);
48
- return null;
49
- }
50
44
 
51
45
  // Split into a separate component to avoid a store subscription
52
46
  // on every block.
53
47
  function ControlsWithStoreSubscription(props) {
54
48
  const blockEditingMode = (0, _blockEditor.useBlockEditingMode)();
55
- const isEditingPattern = (0, _data.useSelect)(select => select(_store.store).getCurrentPostType() === PATTERN_TYPES.user, []);
49
+ const {
50
+ hasPatternOverridesSource,
51
+ isEditingPattern
52
+ } = (0, _data.useSelect)(select => {
53
+ const {
54
+ getBlockBindingsSource
55
+ } = (0, _lockUnlock.unlock)(select(_blocks.store));
56
+ return {
57
+ // For editing link to the site editor if the theme and user permissions support it.
58
+ hasPatternOverridesSource: !!getBlockBindingsSource('core/pattern-overrides'),
59
+ isEditingPattern: select(_store.store).getCurrentPostType() === PATTERN_TYPES.user
60
+ };
61
+ }, []);
56
62
  const bindings = props.attributes.metadata?.bindings;
57
63
  const hasPatternBindings = !!bindings && Object.values(bindings).some(binding => binding.source === 'core/pattern-overrides');
64
+ const shouldShowPatternOverridesControls = isEditingPattern && blockEditingMode === 'default';
58
65
  const shouldShowResetOverridesControl = !isEditingPattern && !!props.attributes.metadata?.name && blockEditingMode !== 'disabled' && hasPatternBindings;
59
- return (0, _react.createElement)(_react.Fragment, null, shouldShowResetOverridesControl && (0, _react.createElement)(ResetOverridesControl, {
66
+ if (!hasPatternOverridesSource) {
67
+ return null;
68
+ }
69
+ return (0, _react.createElement)(_react.Fragment, null, shouldShowPatternOverridesControls && (0, _react.createElement)(PatternOverridesControls, {
70
+ ...props
71
+ }), shouldShowResetOverridesControl && (0, _react.createElement)(ResetOverridesControl, {
60
72
  ...props
61
73
  }));
62
74
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_hooks","require","_patterns","_compose","_blockEditor","_data","_store","_lockUnlock","useSetPatternBindings","ResetOverridesControl","PATTERN_TYPES","PARTIAL_SYNCING_SUPPORTED_BLOCKS","unlock","patternsPrivateApis","withPatternOverrideControls","createHigherOrderComponent","BlockEdit","props","isSupportedBlock","Object","keys","includes","name","_react","createElement","Fragment","BindingUpdater","isSelected","ControlsWithStoreSubscription","postType","useSelect","select","editorStore","getCurrentPostType","blockEditingMode","useBlockEditingMode","isEditingPattern","user","bindings","attributes","metadata","hasPatternBindings","values","some","binding","source","shouldShowResetOverridesControl","addFilter"],"sources":["@wordpress/editor/src/hooks/pattern-overrides.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { addFilter } from '@wordpress/hooks';\nimport { privateApis as patternsPrivateApis } from '@wordpress/patterns';\nimport { createHigherOrderComponent } from '@wordpress/compose';\nimport { useBlockEditingMode } from '@wordpress/block-editor';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../store';\nimport { unlock } from '../lock-unlock';\n\nconst {\n\tuseSetPatternBindings,\n\tResetOverridesControl,\n\tPATTERN_TYPES,\n\tPARTIAL_SYNCING_SUPPORTED_BLOCKS,\n} = unlock( patternsPrivateApis );\n\n/**\n * Override the default edit UI to include a new block inspector control for\n * assigning a partial syncing controls to supported blocks in the pattern editor.\n * Currently, only the `core/paragraph` block is supported.\n *\n * @param {Component} BlockEdit Original component.\n *\n * @return {Component} Wrapped component.\n */\nconst withPatternOverrideControls = createHigherOrderComponent(\n\t( BlockEdit ) => ( props ) => {\n\t\tconst isSupportedBlock = Object.keys(\n\t\t\tPARTIAL_SYNCING_SUPPORTED_BLOCKS\n\t\t).includes( props.name );\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<BlockEdit { ...props } />\n\t\t\t\t{ isSupportedBlock && <BindingUpdater { ...props } /> }\n\t\t\t\t{ props.isSelected && isSupportedBlock && (\n\t\t\t\t\t<ControlsWithStoreSubscription { ...props } />\n\t\t\t\t) }\n\t\t\t</>\n\t\t);\n\t}\n);\n\nfunction BindingUpdater( props ) {\n\tconst postType = useSelect(\n\t\t( select ) => select( editorStore ).getCurrentPostType(),\n\t\t[]\n\t);\n\tuseSetPatternBindings( props, postType );\n\treturn null;\n}\n\n// Split into a separate component to avoid a store subscription\n// on every block.\nfunction ControlsWithStoreSubscription( props ) {\n\tconst blockEditingMode = useBlockEditingMode();\n\tconst isEditingPattern = useSelect(\n\t\t( select ) =>\n\t\t\tselect( editorStore ).getCurrentPostType() === PATTERN_TYPES.user,\n\t\t[]\n\t);\n\n\tconst bindings = props.attributes.metadata?.bindings;\n\tconst hasPatternBindings =\n\t\t!! bindings &&\n\t\tObject.values( bindings ).some(\n\t\t\t( binding ) => binding.source === 'core/pattern-overrides'\n\t\t);\n\n\tconst shouldShowResetOverridesControl =\n\t\t! isEditingPattern &&\n\t\t!! props.attributes.metadata?.name &&\n\t\tblockEditingMode !== 'disabled' &&\n\t\thasPatternBindings;\n\n\treturn (\n\t\t<>\n\t\t\t{ shouldShowResetOverridesControl && (\n\t\t\t\t<ResetOverridesControl { ...props } />\n\t\t\t) }\n\t\t</>\n\t);\n}\n\naddFilter(\n\t'editor.BlockEdit',\n\t'core/editor/with-pattern-override-controls',\n\twithPatternOverrideControls\n);\n"],"mappings":";;;AAGA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AAKA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AAbA;AACA;AACA;;AAOA;AACA;AACA;;AAIA,MAAM;EACLO,qBAAqB;EACrBC,qBAAqB;EACrBC,aAAa;EACbC;AACD,CAAC,GAAG,IAAAC,kBAAM,EAAEC,qBAAoB,CAAC;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,2BAA2B,GAAG,IAAAC,mCAA0B,EAC3DC,SAAS,IAAQC,KAAK,IAAM;EAC7B,MAAMC,gBAAgB,GAAGC,MAAM,CAACC,IAAI,CACnCT,gCACD,CAAC,CAACU,QAAQ,CAAEJ,KAAK,CAACK,IAAK,CAAC;EAExB,OACC,IAAAC,MAAA,CAAAC,aAAA,EAAAD,MAAA,CAAAE,QAAA,QACC,IAAAF,MAAA,CAAAC,aAAA,EAACR,SAAS;IAAA,GAAMC;EAAK,CAAI,CAAC,EACxBC,gBAAgB,IAAI,IAAAK,MAAA,CAAAC,aAAA,EAACE,cAAc;IAAA,GAAMT;EAAK,CAAI,CAAC,EACnDA,KAAK,CAACU,UAAU,IAAIT,gBAAgB,IACrC,IAAAK,MAAA,CAAAC,aAAA,EAACI,6BAA6B;IAAA,GAAMX;EAAK,CAAI,CAE7C,CAAC;AAEL,CACD,CAAC;AAED,SAASS,cAAcA,CAAET,KAAK,EAAG;EAChC,MAAMY,QAAQ,GAAG,IAAAC,eAAS,EACvBC,MAAM,IAAMA,MAAM,CAAEC,YAAY,CAAC,CAACC,kBAAkB,CAAC,CAAC,EACxD,EACD,CAAC;EACDzB,qBAAqB,CAAES,KAAK,EAAEY,QAAS,CAAC;EACxC,OAAO,IAAI;AACZ;;AAEA;AACA;AACA,SAASD,6BAA6BA,CAAEX,KAAK,EAAG;EAC/C,MAAMiB,gBAAgB,GAAG,IAAAC,gCAAmB,EAAC,CAAC;EAC9C,MAAMC,gBAAgB,GAAG,IAAAN,eAAS,EAC/BC,MAAM,IACPA,MAAM,CAAEC,YAAY,CAAC,CAACC,kBAAkB,CAAC,CAAC,KAAKvB,aAAa,CAAC2B,IAAI,EAClE,EACD,CAAC;EAED,MAAMC,QAAQ,GAAGrB,KAAK,CAACsB,UAAU,CAACC,QAAQ,EAAEF,QAAQ;EACpD,MAAMG,kBAAkB,GACvB,CAAC,CAAEH,QAAQ,IACXnB,MAAM,CAACuB,MAAM,CAAEJ,QAAS,CAAC,CAACK,IAAI,CAC3BC,OAAO,IAAMA,OAAO,CAACC,MAAM,KAAK,wBACnC,CAAC;EAEF,MAAMC,+BAA+B,GACpC,CAAEV,gBAAgB,IAClB,CAAC,CAAEnB,KAAK,CAACsB,UAAU,CAACC,QAAQ,EAAElB,IAAI,IAClCY,gBAAgB,KAAK,UAAU,IAC/BO,kBAAkB;EAEnB,OACC,IAAAlB,MAAA,CAAAC,aAAA,EAAAD,MAAA,CAAAE,QAAA,QACGqB,+BAA+B,IAChC,IAAAvB,MAAA,CAAAC,aAAA,EAACf,qBAAqB;IAAA,GAAMQ;EAAK,CAAI,CAErC,CAAC;AAEL;AAEA,IAAA8B,gBAAS,EACR,kBAAkB,EAClB,4CAA4C,EAC5CjC,2BACD,CAAC"}
1
+ {"version":3,"names":["_hooks","require","_patterns","_compose","_blockEditor","_data","_blocks","_store","_lockUnlock","PatternOverridesControls","ResetOverridesControl","PATTERN_TYPES","PARTIAL_SYNCING_SUPPORTED_BLOCKS","unlock","patternsPrivateApis","withPatternOverrideControls","createHigherOrderComponent","BlockEdit","props","isSupportedBlock","Object","keys","includes","name","_react","createElement","Fragment","isSelected","ControlsWithStoreSubscription","blockEditingMode","useBlockEditingMode","hasPatternOverridesSource","isEditingPattern","useSelect","select","getBlockBindingsSource","blocksStore","editorStore","getCurrentPostType","user","bindings","attributes","metadata","hasPatternBindings","values","some","binding","source","shouldShowPatternOverridesControls","shouldShowResetOverridesControl","addFilter"],"sources":["@wordpress/editor/src/hooks/pattern-overrides.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { addFilter } from '@wordpress/hooks';\nimport { privateApis as patternsPrivateApis } from '@wordpress/patterns';\nimport { createHigherOrderComponent } from '@wordpress/compose';\nimport { useBlockEditingMode } from '@wordpress/block-editor';\nimport { useSelect } from '@wordpress/data';\nimport { store as blocksStore } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../store';\nimport { unlock } from '../lock-unlock';\n\nconst {\n\tPatternOverridesControls,\n\tResetOverridesControl,\n\tPATTERN_TYPES,\n\tPARTIAL_SYNCING_SUPPORTED_BLOCKS,\n} = unlock( patternsPrivateApis );\n\n/**\n * Override the default edit UI to include a new block inspector control for\n * assigning a partial syncing controls to supported blocks in the pattern editor.\n * Currently, only the `core/paragraph` block is supported.\n *\n * @param {Component} BlockEdit Original component.\n *\n * @return {Component} Wrapped component.\n */\nconst withPatternOverrideControls = createHigherOrderComponent(\n\t( BlockEdit ) => ( props ) => {\n\t\tconst isSupportedBlock = Object.keys(\n\t\t\tPARTIAL_SYNCING_SUPPORTED_BLOCKS\n\t\t).includes( props.name );\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<BlockEdit { ...props } />\n\t\t\t\t{ props.isSelected && isSupportedBlock && (\n\t\t\t\t\t<ControlsWithStoreSubscription { ...props } />\n\t\t\t\t) }\n\t\t\t</>\n\t\t);\n\t}\n);\n\n// Split into a separate component to avoid a store subscription\n// on every block.\nfunction ControlsWithStoreSubscription( props ) {\n\tconst blockEditingMode = useBlockEditingMode();\n\tconst { hasPatternOverridesSource, isEditingPattern } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockBindingsSource } = unlock( select( blocksStore ) );\n\n\t\t\treturn {\n\t\t\t\t// For editing link to the site editor if the theme and user permissions support it.\n\t\t\t\thasPatternOverridesSource: !! getBlockBindingsSource(\n\t\t\t\t\t'core/pattern-overrides'\n\t\t\t\t),\n\t\t\t\tisEditingPattern:\n\t\t\t\t\tselect( editorStore ).getCurrentPostType() ===\n\t\t\t\t\tPATTERN_TYPES.user,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\tconst bindings = props.attributes.metadata?.bindings;\n\tconst hasPatternBindings =\n\t\t!! bindings &&\n\t\tObject.values( bindings ).some(\n\t\t\t( binding ) => binding.source === 'core/pattern-overrides'\n\t\t);\n\n\tconst shouldShowPatternOverridesControls =\n\t\tisEditingPattern && blockEditingMode === 'default';\n\tconst shouldShowResetOverridesControl =\n\t\t! isEditingPattern &&\n\t\t!! props.attributes.metadata?.name &&\n\t\tblockEditingMode !== 'disabled' &&\n\t\thasPatternBindings;\n\n\tif ( ! hasPatternOverridesSource ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t{ shouldShowPatternOverridesControls && (\n\t\t\t\t<PatternOverridesControls { ...props } />\n\t\t\t) }\n\t\t\t{ shouldShowResetOverridesControl && (\n\t\t\t\t<ResetOverridesControl { ...props } />\n\t\t\t) }\n\t\t</>\n\t);\n}\n\naddFilter(\n\t'editor.BlockEdit',\n\t'core/editor/with-pattern-override-controls',\n\twithPatternOverrideControls\n);\n"],"mappings":";;;AAGA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AAKA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,WAAA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C,QAAQ,EAAEF,QAAQ;EACpD,MAAMG,kBAAkB,GACvB,CAAC,CAAEH,QAAQ,IACXpB,MAAM,CAACwB,MAAM,CAAEJ,QAAS,CAAC,CAACK,IAAI,CAC3BC,OAAO,IAAMA,OAAO,CAACC,MAAM,KAAK,wBACnC,CAAC;EAEF,MAAMC,kCAAkC,GACvChB,gBAAgB,IAAIH,gBAAgB,KAAK,SAAS;EACnD,MAAMoB,+BAA+B,GACpC,CAAEjB,gBAAgB,IAClB,CAAC,CAAEd,KAAK,CAACuB,UAAU,CAACC,QAAQ,EAAEnB,IAAI,IAClCM,gBAAgB,KAAK,UAAU,IAC/Bc,kBAAkB;EAEnB,IAAK,CAAEZ,yBAAyB,EAAG;IAClC,OAAO,IAAI;EACZ;EAEA,OACC,IAAAP,MAAA,CAAAC,aAAA,EAAAD,MAAA,CAAAE,QAAA,QACGsB,kCAAkC,IACnC,IAAAxB,MAAA,CAAAC,aAAA,EAAChB,wBAAwB;IAAA,GAAMS;EAAK,CAAI,CACxC,EACC+B,+BAA+B,IAChC,IAAAzB,MAAA,CAAAC,aAAA,EAACf,qBAAqB;IAAA,GAAMQ;EAAK,CAAI,CAErC,CAAC;AAEL;AAEA,IAAAgC,gBAAS,EACR,kBAAkB,EAClB,4CAA4C,EAC5CnC,2BACD,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_compose","require","_data","_blockEditor","_lockUnlock","DISTANCE_THRESHOLD","clamp","value","min","max","Math","distanceFromRect","x","y","rect","dx","left","right","dy","top","bottom","sqrt","useSelectNearestEditableBlock","isEnabled","getEnabledClientIdsTree","getBlockName","getBlockOrder","unlock","useSelect","blockEditorStore","selectBlock","useDispatch","useRefEffect","element","selectNearestEditableBlock","editableBlockClientIds","flatMap","clientId","blockName","innerBlocks","length","nearestDistance","Infinity","nearestClientId","block","querySelector","getBoundingClientRect","distance","handleClick","event","shouldSelect","target","classList","contains","clientX","clientY","addEventListener","removeEventListener"],"sources":["@wordpress/editor/src/hooks/use-select-nearest-editable-block.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useRefEffect } from '@wordpress/compose';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../lock-unlock';\n\nconst DISTANCE_THRESHOLD = 500;\n\nfunction clamp( value, min, max ) {\n\treturn Math.min( Math.max( value, min ), max );\n}\n\nfunction distanceFromRect( x, y, rect ) {\n\tconst dx = x - clamp( x, rect.left, rect.right );\n\tconst dy = y - clamp( y, rect.top, rect.bottom );\n\treturn Math.sqrt( dx * dx + dy * dy );\n}\n\nexport default function useSelectNearestEditableBlock( {\n\tisEnabled = true,\n} = {} ) {\n\tconst { getEnabledClientIdsTree, getBlockName, getBlockOrder } = unlock(\n\t\tuseSelect( blockEditorStore )\n\t);\n\tconst { selectBlock } = useDispatch( blockEditorStore );\n\n\treturn useRefEffect(\n\t\t( element ) => {\n\t\t\tif ( ! isEnabled ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst selectNearestEditableBlock = ( x, y ) => {\n\t\t\t\tconst editableBlockClientIds =\n\t\t\t\t\tgetEnabledClientIdsTree().flatMap( ( { clientId } ) => {\n\t\t\t\t\t\tconst blockName = getBlockName( clientId );\n\t\t\t\t\t\tif ( blockName === 'core/template-part' ) {\n\t\t\t\t\t\t\treturn [];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( blockName === 'core/post-content' ) {\n\t\t\t\t\t\t\tconst innerBlocks = getBlockOrder( clientId );\n\t\t\t\t\t\t\tif ( innerBlocks.length ) {\n\t\t\t\t\t\t\t\treturn innerBlocks;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn [ clientId ];\n\t\t\t\t\t} );\n\n\t\t\t\tlet nearestDistance = Infinity,\n\t\t\t\t\tnearestClientId = null;\n\n\t\t\t\tfor ( const clientId of editableBlockClientIds ) {\n\t\t\t\t\tconst block = element.querySelector(\n\t\t\t\t\t\t`[data-block=\"${ clientId }\"]`\n\t\t\t\t\t);\n\t\t\t\t\tif ( ! block ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tconst rect = block.getBoundingClientRect();\n\t\t\t\t\tconst distance = distanceFromRect( x, y, rect );\n\t\t\t\t\tif (\n\t\t\t\t\t\tdistance < nearestDistance &&\n\t\t\t\t\t\tdistance < DISTANCE_THRESHOLD\n\t\t\t\t\t) {\n\t\t\t\t\t\tnearestDistance = distance;\n\t\t\t\t\t\tnearestClientId = clientId;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ( nearestClientId ) {\n\t\t\t\t\tselectBlock( nearestClientId );\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tconst handleClick = ( event ) => {\n\t\t\t\tconst shouldSelect =\n\t\t\t\t\tevent.target === element ||\n\t\t\t\t\tevent.target.classList.contains( 'is-root-container' );\n\t\t\t\tif ( shouldSelect ) {\n\t\t\t\t\tselectNearestEditableBlock( event.clientX, event.clientY );\n\t\t\t\t}\n\t\t\t};\n\n\t\t\telement.addEventListener( 'click', handleClick );\n\t\t\treturn () => element.removeEventListener( 'click', handleClick );\n\t\t},\n\t\t[ isEnabled ]\n\t);\n}\n"],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAKA,IAAAG,WAAA,GAAAH,OAAA;AAVA;AACA;AACA;;AAKA;AACA;AACA;;AAGA,MAAMI,kBAAkB,GAAG,GAAG;AAE9B,SAASC,KAAKA,CAAEC,KAAK,EAAEC,GAAG,EAAEC,GAAG,EAAG;EACjC,OAAOC,IAAI,CAACF,GAAG,CAAEE,IAAI,CAACD,GAAG,CAAEF,KAAK,EAAEC,GAAI,CAAC,EAAEC,GAAI,CAAC;AAC/C;AAEA,SAASE,gBAAgBA,CAAEC,CAAC,EAAEC,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AGC,QAAQ;QAC7BC,eAAe,GAAG,IAAI;MAEvB,KAAM,MAAMN,QAAQ,IAAIF,sBAAsB,EAAG;QAChD,MAAMS,KAAK,GAAGX,OAAO,CAACY,aAAa,CACjC,gBAAgBR,QAAU,IAC5B,CAAC;QACD,IAAK,CAAEO,KAAK,EAAG;UACd;QACD;QACA,MAAM9B,IAAI,GAAG8B,KAAK,CAACE,qBAAqB,CAAC,CAAC;QAC1C,MAAMC,QAAQ,GAAGpC,gBAAgB,CAAEC,CAAC,EAAEC,CAAC,EAAEC,IAAK,CAAC;QAC/C,IACCiC,QAAQ,GAAGN,eAAe,IAC1BM,QAAQ,GAAG1C,kBAAkB,EAC5B;UACDoC,eAAe,GAAGM,QAAQ;UAC1BJ,eAAe,GAAGN,QAAQ;QAC3B;MACD;MAEA,IAAKM,eAAe,EAAG;QACtBb,WAAW,CAAEa,eAAgB,CAAC;MAC/B;IACD,CAAC;IAED,MAAMK,WAAW,GAAKC,KAAK,IAAM;MAChC,MAAMC,YAAY,GACjBD,KAAK,CAACE,MAAM,KAAKlB,OAAO,IACxBgB,KAAK,CAACE,MAAM,CAACC,SAAS,CAACC,QAAQ,CAAE,mBAAoB,CAAC;MACvD,IAAKH,YAAY,EAAG;QACnBhB,0BAA0B,CAAEe,KAAK,CAACK,OAAO,EAAEL,KAAK,CAACM,OAAQ,CAAC;MAC3D;IACD,CAAC;IAEDtB,OAAO,CAACuB,gBAAgB,CAAE,OAAO,EAAER,WAAY,CAAC;IAChD,OAAO,MAAMf,OAAO,CAACwB,mBAAmB,CAAE,OAAO,EAAET,WAAY,CAAC;EACjE,CAAC,EACD,CAAEzB,SAAS,CACZ,CAAC;AACF"}
1
+ {"version":3,"names":["_compose","require","_data","_blockEditor","_lockUnlock","DISTANCE_THRESHOLD","clamp","value","min","max","Math","distanceFromRect","x","y","rect","dx","left","right","dy","top","bottom","sqrt","useSelectNearestEditableBlock","isEnabled","getEnabledClientIdsTree","getBlockName","getBlockOrder","unlock","useSelect","blockEditorStore","selectBlock","useDispatch","useRefEffect","element","selectNearestEditableBlock","editableBlockClientIds","flatMap","clientId","blockName","innerBlocks","length","nearestDistance","Infinity","nearestClientId","block","querySelector","getBoundingClientRect","distance","handleClick","event","shouldSelect","target","classList","contains","clientX","clientY","addEventListener","removeEventListener"],"sources":["@wordpress/editor/src/hooks/use-select-nearest-editable-block.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useRefEffect } from '@wordpress/compose';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../lock-unlock';\n\nconst DISTANCE_THRESHOLD = 500;\n\nfunction clamp( value, min, max ) {\n\treturn Math.min( Math.max( value, min ), max );\n}\n\nfunction distanceFromRect( x, y, rect ) {\n\tconst dx = x - clamp( x, rect.left, rect.right );\n\tconst dy = y - clamp( y, rect.top, rect.bottom );\n\treturn Math.sqrt( dx * dx + dy * dy );\n}\n\nexport default function useSelectNearestEditableBlock( {\n\tisEnabled = true,\n} = {} ) {\n\tconst { getEnabledClientIdsTree, getBlockName, getBlockOrder } = unlock(\n\t\tuseSelect( blockEditorStore )\n\t);\n\tconst { selectBlock } = useDispatch( blockEditorStore );\n\n\treturn useRefEffect(\n\t\t( element ) => {\n\t\t\tif ( ! isEnabled ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst selectNearestEditableBlock = ( x, y ) => {\n\t\t\t\tconst editableBlockClientIds =\n\t\t\t\t\tgetEnabledClientIdsTree().flatMap( ( { clientId } ) => {\n\t\t\t\t\t\tconst blockName = getBlockName( clientId );\n\t\t\t\t\t\tif ( blockName === 'core/template-part' ) {\n\t\t\t\t\t\t\treturn [];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( blockName === 'core/post-content' ) {\n\t\t\t\t\t\t\tconst innerBlocks = getBlockOrder( clientId );\n\t\t\t\t\t\t\tif ( innerBlocks.length ) {\n\t\t\t\t\t\t\t\treturn innerBlocks;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn [ clientId ];\n\t\t\t\t\t} );\n\n\t\t\t\tlet nearestDistance = Infinity,\n\t\t\t\t\tnearestClientId = null;\n\n\t\t\t\tfor ( const clientId of editableBlockClientIds ) {\n\t\t\t\t\tconst block = element.querySelector(\n\t\t\t\t\t\t`[data-block=\"${ clientId }\"]`\n\t\t\t\t\t);\n\t\t\t\t\tif ( ! block ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tconst rect = block.getBoundingClientRect();\n\t\t\t\t\tconst distance = distanceFromRect( x, y, rect );\n\t\t\t\t\tif (\n\t\t\t\t\t\tdistance < nearestDistance &&\n\t\t\t\t\t\tdistance < DISTANCE_THRESHOLD\n\t\t\t\t\t) {\n\t\t\t\t\t\tnearestDistance = distance;\n\t\t\t\t\t\tnearestClientId = clientId;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ( nearestClientId ) {\n\t\t\t\t\tselectBlock( nearestClientId );\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tconst handleClick = ( event ) => {\n\t\t\t\tconst shouldSelect =\n\t\t\t\t\tevent.target === element ||\n\t\t\t\t\tevent.target.classList.contains( 'is-root-container' );\n\t\t\t\tif ( shouldSelect ) {\n\t\t\t\t\tselectNearestEditableBlock( event.clientX, event.clientY );\n\t\t\t\t}\n\t\t\t};\n\n\t\t\telement.addEventListener( 'click', handleClick );\n\t\t\treturn () => element.removeEventListener( 'click', handleClick );\n\t\t},\n\t\t[ isEnabled ]\n\t);\n}\n"],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAKA,IAAAG,WAAA,GAAAH,OAAA;AAVA;AACA;AACA;;AAKA;AACA;AACA;;AAGA,MAAMI,kBAAkB,GAAG,GAAG;AAE9B,SAASC,KAAKA,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AAC;AACF","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["require","_store","_components","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_utils","_privateApis","_blockEditor"],"sources":["@wordpress/editor/src/index.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport './bindings';\nimport './hooks';\n\nexport { storeConfig, store } from './store';\nexport * from './components';\nexport * from './utils';\nexport * from './private-apis';\n\n/*\n * Backward compatibility\n */\nexport { transformStyles } from '@wordpress/block-editor';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGAA,OAAA;AACAA,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAAAG,MAAA,CAAAC,IAAA,CAAAF,WAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,WAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAZ,WAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AACA,IAAAS,MAAA,GAAAf,OAAA;AAAAG,MAAA,CAAAC,IAAA,CAAAW,MAAA,EAAAV,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAS,MAAA,CAAAT,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,MAAA,CAAAT,GAAA;IAAA;EAAA;AAAA;AACA,IAAAU,YAAA,GAAAhB,OAAA;AAAAG,MAAA,CAAAC,IAAA,CAAAY,YAAA,EAAAX,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAU,YAAA,CAAAV,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAE,YAAA,CAAAV,GAAA;IAAA;EAAA;AAAA;AAKA,IAAAW,YAAA,GAAAjB,OAAA"}
1
+ {"version":3,"names":["require","_store","_components","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_utils","_privateApis","_blockEditor"],"sources":["@wordpress/editor/src/index.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport './bindings';\nimport './hooks';\n\nexport { storeConfig, store } from './store';\nexport * from './components';\nexport * from './utils';\nexport * from './private-apis';\n\n/*\n * Backward compatibility\n */\nexport { transformStyles } from '@wordpress/block-editor';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGAA,OAAA;AACAA,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAAAG,MAAA,CAAAC,IAAA,CAAAF,WAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,WAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAZ,WAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AACA,IAAAS,MAAA,GAAAf,OAAA;AAAAG,MAAA,CAAAC,IAAA,CAAAW,MAAA,EAAAV,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAS,MAAA,CAAAT,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,MAAA,CAAAT,GAAA;IAAA;EAAA;AAAA;AACA,IAAAU,YAAA,GAAAhB,OAAA;AAAAG,MAAA,CAAAC,IAAA,CAAAY,YAAA,EAAAX,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAU,YAAA,CAAAV,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAE,YAAA,CAAAV,GAAA;IAAA;EAAA;AAAA;AAKA,IAAAW,YAAA,GAAAjB,OAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["require","_store","_components","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_utils","_privateApis"],"sources":["@wordpress/editor/src/index.native.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport '@wordpress/block-editor';\nimport '@wordpress/core-data';\nimport '@wordpress/rich-text';\n\n/**\n * Internal dependencies\n */\nimport './hooks';\n\nexport { store } from './store';\nexport * from './components';\nexport * from './utils';\nexport * from './private-apis';\n"],"mappings":";;;;;;;;;;;;;;AAGAA,OAAA;AACAA,OAAA;AACAA,OAAA;AAKAA,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAAAG,MAAA,CAAAC,IAAA,CAAAF,WAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,WAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAZ,WAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AACA,IAAAS,MAAA,GAAAf,OAAA;AAAAG,MAAA,CAAAC,IAAA,CAAAW,MAAA,EAAAV,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAS,MAAA,CAAAT,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,MAAA,CAAAT,GAAA;IAAA;EAAA;AAAA;AACA,IAAAU,YAAA,GAAAhB,OAAA;AAAAG,MAAA,CAAAC,IAAA,CAAAY,YAAA,EAAAX,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAU,YAAA,CAAAV,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAE,YAAA,CAAAV,GAAA;IAAA;EAAA;AAAA"}
1
+ {"version":3,"names":["require","_store","_components","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_utils","_privateApis"],"sources":["@wordpress/editor/src/index.native.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport '@wordpress/block-editor';\nimport '@wordpress/core-data';\nimport '@wordpress/rich-text';\n\n/**\n * Internal dependencies\n */\nimport './hooks';\n\nexport { store } from './store';\nexport * from './components';\nexport * from './utils';\nexport * from './private-apis';\n"],"mappings":";;;;;;;;;;;;;;AAGAA,OAAA;AACAA,OAAA;AACAA,OAAA;AAKAA,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAAAG,MAAA,CAAAC,IAAA,CAAAF,WAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,WAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAZ,WAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AACA,IAAAS,MAAA,GAAAf,OAAA;AAAAG,MAAA,CAAAC,IAAA,CAAAW,MAAA,EAAAV,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAS,MAAA,CAAAT,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,MAAA,CAAAT,GAAA;IAAA;EAAA;AAAA;AACA,IAAAU,YAAA,GAAAhB,OAAA;AAAAG,MAAA,CAAAC,IAAA,CAAAY,YAAA,EAAAX,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAU,YAAA,CAAAV,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAE,YAAA,CAAAV,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_privateApis","require","lock","unlock","__dangerousOptInToUnstableAPIsOnlyForCoreModules","exports"],"sources":["@wordpress/editor/src/lock-unlock.js"],"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 theme or plugin will inevitably break in the next version of WordPress.',\n\t\t'@wordpress/editor'\n\t);\n"],"mappings":";;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAEO,MAAM;EAAEC,IAAI;EAAEC;AAAO,CAAC,GAC5B,IAAAC,6DAAgD,EAC/C,iHAAiH,EACjH,mBACD,CAAC;AAACC,OAAA,CAAAF,MAAA,GAAAA,MAAA;AAAAE,OAAA,CAAAH,IAAA,GAAAA,IAAA"}
1
+ {"version":3,"names":["_privateApis","require","lock","unlock","__dangerousOptInToUnstableAPIsOnlyForCoreModules","exports"],"sources":["@wordpress/editor/src/lock-unlock.js"],"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 theme or plugin will inevitably break in the next version of WordPress.',\n\t\t'@wordpress/editor'\n\t);\n"],"mappings":";;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAEO,MAAM;EAAEC,IAAI;EAAEC;AAAO,CAAC,GAC5B,IAAAC,6DAAgD,EAC/C,iHAAiH,EACjH,mBACD,CAAC;AAACC,OAAA,CAAAF,MAAA,GAAAA,MAAA;AAAAE,OAAA,CAAAH,IAAA,GAAAA,IAAA","ignoreList":[]}
@@ -5,45 +5,80 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.privateApis = void 0;
8
+ var interfaceApis = _interopRequireWildcard(require("@wordpress/interface"));
9
+ var _collapsibleBlockToolbar = _interopRequireDefault(require("./components/collapsible-block-toolbar"));
8
10
  var _editorCanvas = _interopRequireDefault(require("./components/editor-canvas"));
9
11
  var _provider = require("./components/provider");
10
12
  var _lockUnlock = require("./lock-unlock");
11
13
  var _entitiesSavedStates = require("./components/entities-saved-states");
14
+ var _useAutoSwitchEditorSidebars = _interopRequireDefault(require("./components/provider/use-auto-switch-editor-sidebars"));
12
15
  var _useBlockEditorSettings = _interopRequireDefault(require("./components/provider/use-block-editor-settings"));
13
16
  var _documentTools = _interopRequireDefault(require("./components/document-tools"));
14
17
  var _inserterSidebar = _interopRequireDefault(require("./components/inserter-sidebar"));
15
18
  var _listViewSidebar = _interopRequireDefault(require("./components/list-view-sidebar"));
16
- var _modeSwitcher = _interopRequireDefault(require("./components/mode-switcher"));
19
+ var _moreMenu = _interopRequireDefault(require("./components/more-menu"));
17
20
  var _patternOverridesPanel = _interopRequireDefault(require("./components/pattern-overrides-panel"));
18
21
  var _plugin = _interopRequireDefault(require("./components/post-excerpt/plugin"));
19
22
  var _postPanelRow = _interopRequireDefault(require("./components/post-panel-row"));
20
23
  var _postViewLink = _interopRequireDefault(require("./components/post-view-link"));
21
24
  var _previewDropdown = _interopRequireDefault(require("./components/preview-dropdown"));
22
25
  var _preferencesModal = _interopRequireDefault(require("./components/preferences-modal"));
26
+ var _postActions = _interopRequireDefault(require("./components/post-actions"));
23
27
  var _actions = require("./components/post-actions/actions");
24
28
  var _postCardPanel = _interopRequireDefault(require("./components/post-card-panel"));
29
+ var _postStatus = _interopRequireDefault(require("./components/post-status"));
30
+ var _toolsMoreMenuGroup = _interopRequireDefault(require("./components/more-menu/tools-more-menu-group"));
31
+ var _viewMoreMenuGroup = _interopRequireDefault(require("./components/more-menu/view-more-menu-group"));
32
+ var _panel = require("./components/post-excerpt/panel");
33
+ var _postPublishButtonOrToggle = _interopRequireDefault(require("./components/post-publish-button/post-publish-button-or-toggle"));
34
+ var _savePublishPanels = _interopRequireDefault(require("./components/save-publish-panels"));
35
+ var _postContentInformation = _interopRequireDefault(require("./components/post-content-information"));
36
+ var _postLastEditedPanel = _interopRequireDefault(require("./components/post-last-edited-panel"));
37
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
38
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
39
+ /**
40
+ * WordPress dependencies
41
+ */
42
+
25
43
  /**
26
44
  * Internal dependencies
27
45
  */
28
46
 
47
+ const {
48
+ store: interfaceStore,
49
+ ...remainingInterfaceApis
50
+ } = interfaceApis;
29
51
  const privateApis = exports.privateApis = {};
30
52
  (0, _lockUnlock.lock)(privateApis, {
53
+ CollapsableBlockToolbar: _collapsibleBlockToolbar.default,
31
54
  DocumentTools: _documentTools.default,
32
55
  EditorCanvas: _editorCanvas.default,
33
56
  ExperimentalEditorProvider: _provider.ExperimentalEditorProvider,
34
57
  EntitiesSavedStatesExtensible: _entitiesSavedStates.EntitiesSavedStatesExtensible,
35
58
  InserterSidebar: _inserterSidebar.default,
36
59
  ListViewSidebar: _listViewSidebar.default,
37
- ModeSwitcher: _modeSwitcher.default,
60
+ MoreMenu: _moreMenu.default,
38
61
  PatternOverridesPanel: _patternOverridesPanel.default,
39
62
  PluginPostExcerpt: _plugin.default,
63
+ PostActions: _postActions.default,
40
64
  PostPanelRow: _postPanelRow.default,
41
65
  PostViewLink: _postViewLink.default,
42
66
  PreviewDropdown: _previewDropdown.default,
43
67
  PreferencesModal: _preferencesModal.default,
44
68
  usePostActions: _actions.usePostActions,
45
69
  PostCardPanel: _postCardPanel.default,
70
+ PostStatus: _postStatus.default,
71
+ ToolsMoreMenuGroup: _toolsMoreMenuGroup.default,
72
+ ViewMoreMenuGroup: _viewMoreMenuGroup.default,
73
+ PrivatePostExcerptPanel: _panel.PrivatePostExcerptPanel,
74
+ PostPublishButtonOrToggle: _postPublishButtonOrToggle.default,
75
+ SavePublishPanels: _savePublishPanels.default,
76
+ PostContentInformation: _postContentInformation.default,
77
+ PostLastEditedPanel: _postLastEditedPanel.default,
46
78
  // This is a temporary private API while we're updating the site editor to use EditorProvider.
47
- useBlockEditorSettings: _useBlockEditorSettings.default
79
+ useAutoSwitchEditorSidebars: _useAutoSwitchEditorSidebars.default,
80
+ useBlockEditorSettings: _useBlockEditorSettings.default,
81
+ interfaceStore,
82
+ ...remainingInterfaceApis
48
83
  });
49
84
  //# sourceMappingURL=private-apis.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_editorCanvas","_interopRequireDefault","require","_provider","_lockUnlock","_entitiesSavedStates","_useBlockEditorSettings","_documentTools","_inserterSidebar","_listViewSidebar","_modeSwitcher","_patternOverridesPanel","_plugin","_postPanelRow","_postViewLink","_previewDropdown","_preferencesModal","_actions","_postCardPanel","privateApis","exports","lock","DocumentTools","EditorCanvas","ExperimentalEditorProvider","EntitiesSavedStatesExtensible","InserterSidebar","ListViewSidebar","ModeSwitcher","PatternOverridesPanel","PluginPostExcerpt","PostPanelRow","PostViewLink","PreviewDropdown","PreferencesModal","usePostActions","PostCardPanel","useBlockEditorSettings"],"sources":["@wordpress/editor/src/private-apis.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport EditorCanvas from './components/editor-canvas';\nimport { ExperimentalEditorProvider } from './components/provider';\nimport { lock } from './lock-unlock';\nimport { EntitiesSavedStatesExtensible } from './components/entities-saved-states';\nimport useBlockEditorSettings from './components/provider/use-block-editor-settings';\nimport DocumentTools from './components/document-tools';\nimport InserterSidebar from './components/inserter-sidebar';\nimport ListViewSidebar from './components/list-view-sidebar';\nimport ModeSwitcher from './components/mode-switcher';\nimport PatternOverridesPanel from './components/pattern-overrides-panel';\nimport PluginPostExcerpt from './components/post-excerpt/plugin';\nimport PostPanelRow from './components/post-panel-row';\nimport PostViewLink from './components/post-view-link';\nimport PreviewDropdown from './components/preview-dropdown';\nimport PreferencesModal from './components/preferences-modal';\nimport { usePostActions } from './components/post-actions/actions';\nimport PostCardPanel from './components/post-card-panel';\n\nexport const privateApis = {};\nlock( privateApis, {\n\tDocumentTools,\n\tEditorCanvas,\n\tExperimentalEditorProvider,\n\tEntitiesSavedStatesExtensible,\n\tInserterSidebar,\n\tListViewSidebar,\n\tModeSwitcher,\n\tPatternOverridesPanel,\n\tPluginPostExcerpt,\n\tPostPanelRow,\n\tPostViewLink,\n\tPreviewDropdown,\n\tPreferencesModal,\n\tusePostActions,\n\tPostCardPanel,\n\n\t// This is a temporary private API while we're updating the site editor to use EditorProvider.\n\tuseBlockEditorSettings,\n} );\n"],"mappings":";;;;;;;AAGA,IAAAA,aAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,oBAAA,GAAAH,OAAA;AACA,IAAAI,uBAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,cAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,gBAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,gBAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,aAAA,GAAAT,sBAAA,CAAAC,OAAA;AACA,IAAAS,sBAAA,GAAAV,sBAAA,CAAAC,OAAA;AACA,IAAAU,OAAA,GAAAX,sBAAA,CAAAC,OAAA;AACA,IAAAW,aAAA,GAAAZ,sBAAA,CAAAC,OAAA;AACA,IAAAY,aAAA,GAAAb,sBAAA,CAAAC,OAAA;AACA,IAAAa,gBAAA,GAAAd,sBAAA,CAAAC,OAAA;AACA,IAAAc,iBAAA,GAAAf,sBAAA,CAAAC,OAAA;AACA,IAAAe,QAAA,GAAAf,OAAA;AACA,IAAAgB,cAAA,GAAAjB,sBAAA,CAAAC,OAAA;AAnBA;AACA;AACA;;AAmBO,MAAMiB,WAAW,GAAAC,OAAA,CAAAD,WAAA,GAAG,CAAC,CAAC;AAC7B,IAAAE,gBAAI,EAAEF,WAAW,EAAE;EAClBG,aAAa,EAAbA,sBAAa;EACbC,YAAY,EAAZA,qBAAY;EACZC,0BAA0B,EAA1BA,oCAA0B;EAC1BC,6BAA6B,EAA7BA,kDAA6B;EAC7BC,eAAe,EAAfA,wBAAe;EACfC,eAAe,EAAfA,wBAAe;EACfC,YAAY,EAAZA,qBAAY;EACZC,qBAAqB,EAArBA,8BAAqB;EACrBC,iBAAiB,EAAjBA,eAAiB;EACjBC,YAAY,EAAZA,qBAAY;EACZC,YAAY,EAAZA,qBAAY;EACZC,eAAe,EAAfA,wBAAe;EACfC,gBAAgB,EAAhBA,yBAAgB;EAChBC,cAAc,EAAdA,uBAAc;EACdC,aAAa,EAAbA,sBAAa;EAEb;EACAC,sBAAsB,EAAtBA;AACD,CAAE,CAAC"}
1
+ {"version":3,"names":["interfaceApis","_interopRequireWildcard","require","_collapsibleBlockToolbar","_interopRequireDefault","_editorCanvas","_provider","_lockUnlock","_entitiesSavedStates","_useAutoSwitchEditorSidebars","_useBlockEditorSettings","_documentTools","_inserterSidebar","_listViewSidebar","_moreMenu","_patternOverridesPanel","_plugin","_postPanelRow","_postViewLink","_previewDropdown","_preferencesModal","_postActions","_actions","_postCardPanel","_postStatus","_toolsMoreMenuGroup","_viewMoreMenuGroup","_panel","_postPublishButtonOrToggle","_savePublishPanels","_postContentInformation","_postLastEditedPanel","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","store","interfaceStore","remainingInterfaceApis","privateApis","exports","lock","CollapsableBlockToolbar","DocumentTools","EditorCanvas","ExperimentalEditorProvider","EntitiesSavedStatesExtensible","InserterSidebar","ListViewSidebar","MoreMenu","PatternOverridesPanel","PluginPostExcerpt","PostActions","PostPanelRow","PostViewLink","PreviewDropdown","PreferencesModal","usePostActions","PostCardPanel","PostStatus","ToolsMoreMenuGroup","ViewMoreMenuGroup","PrivatePostExcerptPanel","PostPublishButtonOrToggle","SavePublishPanels","PostContentInformation","PostLastEditedPanel","useAutoSwitchEditorSidebars","useBlockEditorSettings"],"sources":["@wordpress/editor/src/private-apis.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport * as interfaceApis from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport CollapsableBlockToolbar from './components/collapsible-block-toolbar';\nimport EditorCanvas from './components/editor-canvas';\nimport { ExperimentalEditorProvider } from './components/provider';\nimport { lock } from './lock-unlock';\nimport { EntitiesSavedStatesExtensible } from './components/entities-saved-states';\nimport useAutoSwitchEditorSidebars from './components/provider/use-auto-switch-editor-sidebars';\nimport useBlockEditorSettings from './components/provider/use-block-editor-settings';\nimport DocumentTools from './components/document-tools';\nimport InserterSidebar from './components/inserter-sidebar';\nimport ListViewSidebar from './components/list-view-sidebar';\nimport MoreMenu from './components/more-menu';\nimport PatternOverridesPanel from './components/pattern-overrides-panel';\nimport PluginPostExcerpt from './components/post-excerpt/plugin';\nimport PostPanelRow from './components/post-panel-row';\nimport PostViewLink from './components/post-view-link';\nimport PreviewDropdown from './components/preview-dropdown';\nimport PreferencesModal from './components/preferences-modal';\nimport PostActions from './components/post-actions';\nimport { usePostActions } from './components/post-actions/actions';\nimport PostCardPanel from './components/post-card-panel';\nimport PostStatus from './components/post-status';\nimport ToolsMoreMenuGroup from './components/more-menu/tools-more-menu-group';\nimport ViewMoreMenuGroup from './components/more-menu/view-more-menu-group';\nimport { PrivatePostExcerptPanel } from './components/post-excerpt/panel';\nimport PostPublishButtonOrToggle from './components/post-publish-button/post-publish-button-or-toggle';\nimport SavePublishPanels from './components/save-publish-panels';\nimport PostContentInformation from './components/post-content-information';\nimport PostLastEditedPanel from './components/post-last-edited-panel';\n\nconst { store: interfaceStore, ...remainingInterfaceApis } = interfaceApis;\n\nexport const privateApis = {};\nlock( privateApis, {\n\tCollapsableBlockToolbar,\n\tDocumentTools,\n\tEditorCanvas,\n\tExperimentalEditorProvider,\n\tEntitiesSavedStatesExtensible,\n\tInserterSidebar,\n\tListViewSidebar,\n\tMoreMenu,\n\tPatternOverridesPanel,\n\tPluginPostExcerpt,\n\tPostActions,\n\tPostPanelRow,\n\tPostViewLink,\n\tPreviewDropdown,\n\tPreferencesModal,\n\tusePostActions,\n\tPostCardPanel,\n\tPostStatus,\n\tToolsMoreMenuGroup,\n\tViewMoreMenuGroup,\n\tPrivatePostExcerptPanel,\n\tPostPublishButtonOrToggle,\n\tSavePublishPanels,\n\tPostContentInformation,\n\tPostLastEditedPanel,\n\n\t// This is a temporary private API while we're updating the site editor to use EditorProvider.\n\tuseAutoSwitchEditorSidebars,\n\tuseBlockEditorSettings,\n\tinterfaceStore,\n\t...remainingInterfaceApis,\n} );\n"],"mappings":";;;;;;;AAGA,IAAAA,aAAA,GAAAC,uBAAA,CAAAC,OAAA;AAKA,IAAAC,wBAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,aAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,oBAAA,GAAAN,OAAA;AACA,IAAAO,4BAAA,GAAAL,sBAAA,CAAAF,OAAA;AACA,IAAAQ,uBAAA,GAAAN,sBAAA,CAAAF,OAAA;AACA,IAAAS,cAAA,GAAAP,sBAAA,CAAAF,OAAA;AACA,IAAAU,gBAAA,GAAAR,sBAAA,CAAAF,OAAA;AACA,IAAAW,gBAAA,GAAAT,sBAAA,CAAAF,OAAA;AACA,IAAAY,SAAA,GAAAV,sBAAA,CAAAF,OAAA;AACA,IAAAa,sBAAA,GAAAX,sBAAA,CAAAF,OAAA;AACA,IAAAc,OAAA,GAAAZ,sBAAA,CAAAF,OAAA;AACA,IAAAe,aAAA,GAAAb,sBAAA,CAAAF,OAAA;AACA,IAAAgB,aAAA,GAAAd,sBAAA,CAAAF,OAAA;AACA,I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