@wordpress/editor 13.35.0 → 14.0.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 (924) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/README.md +333 -39
  3. package/build/bindings/index.js +1 -3
  4. package/build/bindings/index.js.map +1 -1
  5. package/build/bindings/pattern-overrides.js +1 -1
  6. package/build/bindings/pattern-overrides.js.map +1 -1
  7. package/build/bindings/post-meta.js +38 -2
  8. package/build/bindings/post-meta.js.map +1 -1
  9. package/build/components/autocompleters/user.js +12 -8
  10. package/build/components/autocompleters/user.js.map +1 -1
  11. package/build/components/block-manager/category.js +19 -17
  12. package/build/components/block-manager/category.js.map +1 -1
  13. package/build/components/block-manager/checklist.js +15 -14
  14. package/build/components/block-manager/checklist.js.map +1 -1
  15. package/build/components/block-manager/index.js +37 -33
  16. package/build/components/block-manager/index.js.map +1 -1
  17. package/build/components/block-removal-warnings/index.js +2 -2
  18. package/build/components/block-removal-warnings/index.js.map +1 -1
  19. package/build/components/block-settings-menu/content-only-settings-menu.js +46 -32
  20. package/build/components/block-settings-menu/content-only-settings-menu.js.map +1 -1
  21. package/build/components/block-settings-menu/plugin-block-settings-menu-item.js +16 -13
  22. package/build/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -1
  23. package/build/components/blog-title/index.js +116 -0
  24. package/build/components/blog-title/index.js.map +1 -0
  25. package/build/components/collapsible-block-toolbar/index.js +21 -18
  26. package/build/components/collapsible-block-toolbar/index.js.map +1 -1
  27. package/build/components/commands/index.js +109 -3
  28. package/build/components/commands/index.js.map +1 -1
  29. package/build/components/create-template-part-modal/index.js +167 -0
  30. package/build/components/create-template-part-modal/index.js.map +1 -0
  31. package/build/components/create-template-part-modal/utils.js +64 -0
  32. package/build/components/create-template-part-modal/utils.js.map +1 -0
  33. package/build/components/deprecated.js +2 -2
  34. package/build/components/deprecated.js.map +1 -1
  35. package/build/components/document-bar/index.js +94 -70
  36. package/build/components/document-bar/index.js.map +1 -1
  37. package/build/components/document-outline/index.js +124 -121
  38. package/build/components/document-outline/index.js.map +1 -1
  39. package/build/components/document-outline/item.js +18 -14
  40. package/build/components/document-outline/item.js.map +1 -1
  41. package/build/components/document-tools/index.js +56 -53
  42. package/build/components/document-tools/index.js.map +1 -1
  43. package/build/components/editor-help/add-blocks.native.js +14 -11
  44. package/build/components/editor-help/add-blocks.native.js.map +1 -1
  45. package/build/components/editor-help/customize-blocks.native.js +14 -11
  46. package/build/components/editor-help/customize-blocks.native.js.map +1 -1
  47. package/build/components/editor-help/help-detail-navigation-screen.native.js +32 -22
  48. package/build/components/editor-help/help-detail-navigation-screen.native.js.map +1 -1
  49. package/build/components/editor-help/help-get-support-button.native.js +8 -6
  50. package/build/components/editor-help/help-get-support-button.native.js.map +1 -1
  51. package/build/components/editor-help/help-section-title.native.js +8 -6
  52. package/build/components/editor-help/help-section-title.native.js.map +1 -1
  53. package/build/components/editor-help/help-topic-row.native.js +7 -6
  54. package/build/components/editor-help/help-topic-row.native.js.map +1 -1
  55. package/build/components/editor-help/icon-move-blocks.native.js +7 -6
  56. package/build/components/editor-help/icon-move-blocks.native.js.map +1 -1
  57. package/build/components/editor-help/index.native.js +94 -76
  58. package/build/components/editor-help/index.native.js.map +1 -1
  59. package/build/components/editor-help/intro-to-blocks.native.js +41 -37
  60. package/build/components/editor-help/intro-to-blocks.native.js.map +1 -1
  61. package/build/components/editor-help/move-blocks.native.js +25 -21
  62. package/build/components/editor-help/move-blocks.native.js.map +1 -1
  63. package/build/components/editor-help/remove-blocks.native.js +12 -9
  64. package/build/components/editor-help/remove-blocks.native.js.map +1 -1
  65. package/build/components/editor-help/view-sections.native.js +24 -19
  66. package/build/components/editor-help/view-sections.native.js.map +1 -1
  67. package/build/components/editor-history/redo.js +2 -2
  68. package/build/components/editor-history/redo.js.map +1 -1
  69. package/build/components/editor-history/undo.js +2 -2
  70. package/build/components/editor-history/undo.js.map +1 -1
  71. package/build/components/editor-interface/content-slot-fill.js +23 -0
  72. package/build/components/editor-interface/content-slot-fill.js.map +1 -0
  73. package/build/components/editor-interface/index.js +178 -0
  74. package/build/components/editor-interface/index.js.map +1 -0
  75. package/build/components/editor-notices/index.js +22 -9
  76. package/build/components/editor-notices/index.js.map +1 -1
  77. package/build/components/editor-snackbars/index.js +2 -2
  78. package/build/components/editor-snackbars/index.js.map +1 -1
  79. package/build/components/entities-saved-states/entity-record-item.js +37 -10
  80. package/build/components/entities-saved-states/entity-record-item.js.map +1 -1
  81. package/build/components/entities-saved-states/entity-type-list.js +25 -22
  82. package/build/components/entities-saved-states/entity-type-list.js.map +1 -1
  83. package/build/components/entities-saved-states/index.js +53 -46
  84. package/build/components/entities-saved-states/index.js.map +1 -1
  85. package/build/components/error-boundary/index.js +27 -14
  86. package/build/components/error-boundary/index.js.map +1 -1
  87. package/build/components/error-boundary/index.native.js +45 -35
  88. package/build/components/error-boundary/index.native.js.map +1 -1
  89. package/build/components/global-keyboard-shortcuts/register-shortcuts.js +3 -4
  90. package/build/components/global-keyboard-shortcuts/register-shortcuts.js.map +1 -1
  91. package/build/components/global-styles-provider/index.js +81 -16
  92. package/build/components/global-styles-provider/index.js.map +1 -1
  93. package/build/components/header/back-button.js +34 -0
  94. package/build/components/header/back-button.js.map +1 -0
  95. package/build/components/header/index.js +88 -59
  96. package/build/components/header/index.js.map +1 -1
  97. package/build/components/inserter-sidebar/index.js +45 -19
  98. package/build/components/inserter-sidebar/index.js.map +1 -1
  99. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +2 -2
  100. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
  101. package/build/components/keyboard-shortcut-help-modal/index.js +53 -48
  102. package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  103. package/build/components/keyboard-shortcut-help-modal/shortcut.js +30 -26
  104. package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
  105. package/build/components/list-view-sidebar/index.js +59 -47
  106. package/build/components/list-view-sidebar/index.js.map +1 -1
  107. package/build/components/list-view-sidebar/list-view-outline.js +21 -4
  108. package/build/components/list-view-sidebar/list-view-outline.js.map +1 -1
  109. package/build/components/local-autosave-monitor/index.js +15 -2
  110. package/build/components/local-autosave-monitor/index.js.map +1 -1
  111. package/build/components/mode-switcher/index.js +10 -10
  112. package/build/components/mode-switcher/index.js.map +1 -1
  113. package/build/components/more-menu/copy-content-menu-item.js +5 -4
  114. package/build/components/more-menu/copy-content-menu-item.js.map +1 -1
  115. package/build/components/more-menu/index.js +89 -76
  116. package/build/components/more-menu/index.js.map +1 -1
  117. package/build/components/more-menu/tools-more-menu-group.js +2 -2
  118. package/build/components/more-menu/tools-more-menu-group.js.map +1 -1
  119. package/build/components/more-menu/view-more-menu-group.js +2 -2
  120. package/build/components/more-menu/view-more-menu-group.js.map +1 -1
  121. package/build/components/offline-status/index.native.js +12 -11
  122. package/build/components/offline-status/index.native.js.map +1 -1
  123. package/build/components/page-attributes/order.js +87 -14
  124. package/build/components/page-attributes/order.js.map +1 -1
  125. package/build/components/page-attributes/panel.js +10 -19
  126. package/build/components/page-attributes/panel.js.map +1 -1
  127. package/build/components/page-attributes/parent.js +86 -3
  128. package/build/components/page-attributes/parent.js.map +1 -1
  129. package/build/components/pattern-duplicate-modal/index.js +59 -0
  130. package/build/components/pattern-duplicate-modal/index.js.map +1 -0
  131. package/build/components/pattern-overrides-panel/index.js +2 -2
  132. package/build/components/pattern-overrides-panel/index.js.map +1 -1
  133. package/build/components/pattern-rename-modal/index.js +58 -0
  134. package/build/components/pattern-rename-modal/index.js.map +1 -0
  135. package/build/components/plugin-document-setting-panel/index.js +17 -12
  136. package/build/components/plugin-document-setting-panel/index.js.map +1 -1
  137. package/build/components/plugin-post-publish-panel/index.js +10 -7
  138. package/build/components/plugin-post-publish-panel/index.js.map +1 -1
  139. package/build/components/plugin-post-status-info/index.js +7 -4
  140. package/build/components/plugin-post-status-info/index.js.map +1 -1
  141. package/build/components/plugin-pre-publish-panel/index.js +10 -7
  142. package/build/components/plugin-pre-publish-panel/index.js.map +1 -1
  143. package/build/components/plugin-sidebar/index.js +3 -4
  144. package/build/components/plugin-sidebar/index.js.map +1 -1
  145. package/build/components/plugin-sidebar-more-menu-item/index.js +3 -5
  146. package/build/components/plugin-sidebar-more-menu-item/index.js.map +1 -1
  147. package/build/components/post-actions/actions.js +378 -309
  148. package/build/components/post-actions/actions.js.map +1 -1
  149. package/build/components/post-actions/export-pattern-action.js +64 -0
  150. package/build/components/post-actions/export-pattern-action.js.map +1 -0
  151. package/build/components/post-actions/export-pattern-action.native.js +11 -0
  152. package/build/components/post-actions/export-pattern-action.native.js.map +1 -0
  153. package/build/components/post-actions/index.js +66 -50
  154. package/build/components/post-actions/index.js.map +1 -1
  155. package/build/components/post-author/check.js +6 -6
  156. package/build/components/post-author/check.js.map +1 -1
  157. package/build/components/post-author/combobox.js +4 -3
  158. package/build/components/post-author/combobox.js.map +1 -1
  159. package/build/components/post-author/hook.js +2 -1
  160. package/build/components/post-author/hook.js.map +1 -1
  161. package/build/components/post-author/index.js +3 -3
  162. package/build/components/post-author/index.js.map +1 -1
  163. package/build/components/post-author/panel.js +72 -4
  164. package/build/components/post-author/panel.js.map +1 -1
  165. package/build/components/post-author/select.js +4 -3
  166. package/build/components/post-author/select.js.map +1 -1
  167. package/build/components/post-card-panel/index.js +54 -19
  168. package/build/components/post-card-panel/index.js.map +1 -1
  169. package/build/components/post-comments/index.js +38 -22
  170. package/build/components/post-comments/index.js.map +1 -1
  171. package/build/components/post-content-information/index.js +8 -5
  172. package/build/components/post-content-information/index.js.map +1 -1
  173. package/build/components/post-discussion/panel.js +54 -38
  174. package/build/components/post-discussion/panel.js.map +1 -1
  175. package/build/components/post-excerpt/check.js +6 -6
  176. package/build/components/post-excerpt/check.js.map +1 -1
  177. package/build/components/post-excerpt/index.js +18 -17
  178. package/build/components/post-excerpt/index.js.map +1 -1
  179. package/build/components/post-excerpt/panel.js +59 -42
  180. package/build/components/post-excerpt/panel.js.map +1 -1
  181. package/build/components/post-excerpt/plugin.js +7 -4
  182. package/build/components/post-excerpt/plugin.js.map +1 -1
  183. package/build/components/post-featured-image/check.js +17 -7
  184. package/build/components/post-featured-image/check.js.map +1 -1
  185. package/build/components/post-featured-image/index.js +77 -49
  186. package/build/components/post-featured-image/index.js.map +1 -1
  187. package/build/components/post-featured-image/panel.js +22 -7
  188. package/build/components/post-featured-image/panel.js.map +1 -1
  189. package/build/components/post-format/check.js +14 -4
  190. package/build/components/post-format/check.js.map +1 -1
  191. package/build/components/post-format/index.js +37 -20
  192. package/build/components/post-format/index.js.map +1 -1
  193. package/build/components/post-format/panel.js +73 -7
  194. package/build/components/post-format/panel.js.map +1 -1
  195. package/build/components/post-last-edited-panel/index.js +7 -4
  196. package/build/components/post-last-edited-panel/index.js.map +1 -1
  197. package/build/components/post-last-revision/check.js +13 -5
  198. package/build/components/post-last-revision/check.js.map +1 -1
  199. package/build/components/post-last-revision/index.js +19 -13
  200. package/build/components/post-last-revision/index.js.map +1 -1
  201. package/build/components/post-last-revision/panel.js +12 -5
  202. package/build/components/post-last-revision/panel.js.map +1 -1
  203. package/build/components/post-locked-modal/index.js +57 -35
  204. package/build/components/post-locked-modal/index.js.map +1 -1
  205. package/build/components/post-panel-row/index.js +11 -8
  206. package/build/components/post-panel-row/index.js.map +1 -1
  207. package/build/components/post-panel-section/index.js +5 -4
  208. package/build/components/post-panel-section/index.js.map +1 -1
  209. package/build/components/post-pending-status/check.js +10 -0
  210. package/build/components/post-pending-status/check.js.map +1 -1
  211. package/build/components/post-pending-status/index.js +14 -7
  212. package/build/components/post-pending-status/index.js.map +1 -1
  213. package/build/components/post-pingbacks/index.js +13 -5
  214. package/build/components/post-pingbacks/index.js.map +1 -1
  215. package/build/components/post-preview-button/index.js +45 -21
  216. package/build/components/post-preview-button/index.js.map +1 -1
  217. package/build/components/post-publish-button/index.js +21 -11
  218. package/build/components/post-publish-button/index.js.map +1 -1
  219. package/build/components/post-publish-button/post-publish-button-or-toggle.js +2 -2
  220. package/build/components/post-publish-button/post-publish-button-or-toggle.js.map +1 -1
  221. package/build/components/post-publish-panel/index.js +46 -33
  222. package/build/components/post-publish-panel/index.js.map +1 -1
  223. package/build/components/post-publish-panel/maybe-category-panel.js +12 -9
  224. package/build/components/post-publish-panel/maybe-category-panel.js.map +1 -1
  225. package/build/components/post-publish-panel/maybe-post-format-panel.js +21 -15
  226. package/build/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
  227. package/build/components/post-publish-panel/maybe-tags-panel.js +13 -10
  228. package/build/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
  229. package/build/components/post-publish-panel/maybe-upload-media.js +29 -24
  230. package/build/components/post-publish-panel/maybe-upload-media.js.map +1 -1
  231. package/build/components/post-publish-panel/postpublish.js +55 -38
  232. package/build/components/post-publish-panel/postpublish.js.map +1 -1
  233. package/build/components/post-publish-panel/prepublish.js +41 -26
  234. package/build/components/post-publish-panel/prepublish.js.map +1 -1
  235. package/build/components/post-saved-state/index.js +8 -8
  236. package/build/components/post-saved-state/index.js.map +1 -1
  237. package/build/components/post-schedule/check.js +8 -0
  238. package/build/components/post-schedule/check.js.map +1 -1
  239. package/build/components/post-schedule/index.js +30 -5
  240. package/build/components/post-schedule/index.js.map +1 -1
  241. package/build/components/post-schedule/label.js +16 -0
  242. package/build/components/post-schedule/label.js.map +1 -1
  243. package/build/components/post-schedule/panel.js +43 -30
  244. package/build/components/post-schedule/panel.js.map +1 -1
  245. package/build/components/post-slug/check.js +5 -4
  246. package/build/components/post-slug/check.js.map +1 -1
  247. package/build/components/post-slug/index.js +5 -3
  248. package/build/components/post-slug/index.js.map +1 -1
  249. package/build/components/post-slug/panel.js +7 -4
  250. package/build/components/post-slug/panel.js.map +1 -1
  251. package/build/components/post-status/index.js +118 -119
  252. package/build/components/post-status/index.js.map +1 -1
  253. package/build/components/post-sticky/index.js +16 -8
  254. package/build/components/post-sticky/index.js.map +1 -1
  255. package/build/components/post-sticky/panel.js +6 -2
  256. package/build/components/post-sticky/panel.js.map +1 -1
  257. package/build/components/post-switch-to-draft-button/index.js +25 -21
  258. package/build/components/post-switch-to-draft-button/index.js.map +1 -1
  259. package/build/components/post-sync-status/index.js +8 -6
  260. package/build/components/post-sync-status/index.js.map +1 -1
  261. package/build/components/post-taxonomies/flat-term-selector.js +21 -20
  262. package/build/components/post-taxonomies/flat-term-selector.js.map +1 -1
  263. package/build/components/post-taxonomies/hierarchical-term-selector.js +71 -61
  264. package/build/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
  265. package/build/components/post-taxonomies/index.js +6 -6
  266. package/build/components/post-taxonomies/index.js.map +1 -1
  267. package/build/components/post-taxonomies/most-used-terms.js +19 -15
  268. package/build/components/post-taxonomies/most-used-terms.js.map +1 -1
  269. package/build/components/post-taxonomies/panel.js +15 -11
  270. package/build/components/post-taxonomies/panel.js.map +1 -1
  271. package/build/components/post-template/block-theme.js +42 -32
  272. package/build/components/post-template/block-theme.js.map +1 -1
  273. package/build/components/post-template/classic-theme.js +73 -50
  274. package/build/components/post-template/classic-theme.js.map +1 -1
  275. package/build/components/post-template/create-new-template-modal.js +33 -27
  276. package/build/components/post-template/create-new-template-modal.js.map +1 -1
  277. package/build/components/post-template/create-new-template.js +14 -11
  278. package/build/components/post-template/create-new-template.js.map +1 -1
  279. package/build/components/post-template/panel.js +16 -10
  280. package/build/components/post-template/panel.js.map +1 -1
  281. package/build/components/post-template/reset-default-template.js +5 -4
  282. package/build/components/post-template/reset-default-template.js.map +1 -1
  283. package/build/components/post-template/swap-template-button.js +20 -15
  284. package/build/components/post-template/swap-template-button.js.map +1 -1
  285. package/build/components/post-text-editor/index.js +27 -20
  286. package/build/components/post-text-editor/index.js.map +1 -1
  287. package/build/components/post-title/index.js +29 -17
  288. package/build/components/post-title/index.js.map +1 -1
  289. package/build/components/post-title/index.native.js +81 -57
  290. package/build/components/post-title/index.native.js.map +1 -1
  291. package/build/components/post-title/post-title-raw.js +10 -3
  292. package/build/components/post-title/post-title-raw.js.map +1 -1
  293. package/build/components/post-title/use-post-title-focus.js +7 -0
  294. package/build/components/post-title/use-post-title-focus.js.map +1 -1
  295. package/build/components/post-title/use-post-title.js +5 -0
  296. package/build/components/post-title/use-post-title.js.map +1 -1
  297. package/build/components/post-transform-panel/index.js +11 -11
  298. package/build/components/post-transform-panel/index.js.map +1 -1
  299. package/build/components/post-trash/index.js +19 -15
  300. package/build/components/post-trash/index.js.map +1 -1
  301. package/build/components/post-url/check.js +8 -0
  302. package/build/components/post-url/check.js.map +1 -1
  303. package/build/components/post-url/index.js +98 -73
  304. package/build/components/post-url/index.js.map +1 -1
  305. package/build/components/post-url/label.js +11 -0
  306. package/build/components/post-url/label.js.map +1 -1
  307. package/build/components/post-url/panel.js +33 -25
  308. package/build/components/post-url/panel.js.map +1 -1
  309. package/build/components/post-view-link/index.js +2 -2
  310. package/build/components/post-view-link/index.js.map +1 -1
  311. package/build/components/post-visibility/check.js +9 -0
  312. package/build/components/post-visibility/check.js.map +1 -1
  313. package/build/components/post-visibility/index.js +83 -68
  314. package/build/components/post-visibility/index.js.map +1 -1
  315. package/build/components/post-visibility/label.js +11 -0
  316. package/build/components/post-visibility/label.js.map +1 -1
  317. package/build/components/posts-per-page/index.js +109 -0
  318. package/build/components/posts-per-page/index.js.map +1 -0
  319. package/build/components/preferences-modal/enable-plugin-document-setting-panel.js +7 -5
  320. package/build/components/preferences-modal/enable-plugin-document-setting-panel.js.map +1 -1
  321. package/build/components/preferences-modal/index.js +124 -102
  322. package/build/components/preferences-modal/index.js.map +1 -1
  323. package/build/components/preview-dropdown/index.js +47 -31
  324. package/build/components/preview-dropdown/index.js.map +1 -1
  325. package/build/components/provider/index.js +94 -20
  326. package/build/components/provider/index.js.map +1 -1
  327. package/build/components/provider/index.native.js +55 -19
  328. package/build/components/provider/index.native.js.map +1 -1
  329. package/build/components/provider/use-block-editor-settings.js +7 -6
  330. package/build/components/provider/use-block-editor-settings.js.map +1 -1
  331. package/build/components/provider/with-registry-provider.js +31 -24
  332. package/build/components/provider/with-registry-provider.js.map +1 -1
  333. package/build/components/resizable-editor/index.js +96 -0
  334. package/build/components/resizable-editor/index.js.map +1 -0
  335. package/build/components/resizable-editor/resize-handle.js +59 -0
  336. package/build/components/resizable-editor/resize-handle.js.map +1 -0
  337. package/build/components/save-publish-panels/index.js +35 -26
  338. package/build/components/save-publish-panels/index.js.map +1 -1
  339. package/build/components/sidebar/header.js +17 -14
  340. package/build/components/sidebar/header.js.map +1 -1
  341. package/build/components/sidebar/index.js +36 -32
  342. package/build/components/sidebar/index.js.map +1 -1
  343. package/build/components/sidebar/post-summary.js +38 -33
  344. package/build/components/sidebar/post-summary.js.map +1 -1
  345. package/build/components/site-discussion/index.js +133 -0
  346. package/build/components/site-discussion/index.js.map +1 -0
  347. package/build/components/start-page-options/index.js +13 -11
  348. package/build/components/start-page-options/index.js.map +1 -1
  349. package/build/components/start-template-options/index.js +29 -23
  350. package/build/components/start-template-options/index.js.map +1 -1
  351. package/build/components/table-of-contents/index.js +4 -4
  352. package/build/components/table-of-contents/index.js.map +1 -1
  353. package/build/components/table-of-contents/panel.js +53 -35
  354. package/build/components/table-of-contents/panel.js.map +1 -1
  355. package/build/components/template-areas/index.js +36 -22
  356. package/build/components/template-areas/index.js.map +1 -1
  357. package/build/components/template-content-panel/index.js +7 -6
  358. package/build/components/template-content-panel/index.js.map +1 -1
  359. package/build/components/template-validation-notice/index.js +25 -21
  360. package/build/components/template-validation-notice/index.js.map +1 -1
  361. package/build/components/text-editor/index.js +73 -0
  362. package/build/components/text-editor/index.js.map +1 -0
  363. package/build/components/time-to-read/index.js +8 -8
  364. package/build/components/time-to-read/index.js.map +1 -1
  365. package/build/components/{editor-canvas → visual-editor}/edit-template-blocks-notification.js +6 -6
  366. package/build/components/visual-editor/edit-template-blocks-notification.js.map +1 -0
  367. package/build/components/{editor-canvas → visual-editor}/index.js +115 -74
  368. package/build/components/visual-editor/index.js.map +1 -0
  369. package/build/components/word-count/index.js +5 -4
  370. package/build/components/word-count/index.js.map +1 -1
  371. package/build/hooks/custom-sources-backwards-compatibility.js +3 -4
  372. package/build/hooks/custom-sources-backwards-compatibility.js.map +1 -1
  373. package/build/hooks/index.js +1 -0
  374. package/build/hooks/index.js.map +1 -1
  375. package/build/hooks/media-upload.js +10 -0
  376. package/build/hooks/media-upload.js.map +1 -0
  377. package/build/hooks/pattern-overrides.js +15 -11
  378. package/build/hooks/pattern-overrides.js.map +1 -1
  379. package/build/private-apis.js +10 -28
  380. package/build/private-apis.js.map +1 -1
  381. package/build/private-apis.native.js +2 -26
  382. package/build/private-apis.native.js.map +1 -1
  383. package/build/store/constants.js +4 -1
  384. package/build/store/constants.js.map +1 -1
  385. package/build/store/private-actions.js +10 -14
  386. package/build/store/private-actions.js.map +1 -1
  387. package/build/store/private-selectors.js +39 -1
  388. package/build/store/private-selectors.js.map +1 -1
  389. package/build/store/selectors.js +1 -1
  390. package/build/store/selectors.js.map +1 -1
  391. package/build/utils/set-nested-value.js +44 -0
  392. package/build/utils/set-nested-value.js.map +1 -0
  393. package/build-module/bindings/index.js +1 -3
  394. package/build-module/bindings/index.js.map +1 -1
  395. package/build-module/bindings/pattern-overrides.js +1 -1
  396. package/build-module/bindings/pattern-overrides.js.map +1 -1
  397. package/build-module/bindings/post-meta.js +38 -2
  398. package/build-module/bindings/post-meta.js.map +1 -1
  399. package/build-module/components/autocompleters/user.js +14 -9
  400. package/build-module/components/autocompleters/user.js.map +1 -1
  401. package/build-module/components/block-manager/category.js +20 -17
  402. package/build-module/components/block-manager/category.js.map +1 -1
  403. package/build-module/components/block-manager/checklist.js +16 -14
  404. package/build-module/components/block-manager/checklist.js.map +1 -1
  405. package/build-module/components/block-manager/index.js +38 -33
  406. package/build-module/components/block-manager/index.js.map +1 -1
  407. package/build-module/components/block-removal-warnings/index.js +2 -2
  408. package/build-module/components/block-removal-warnings/index.js.map +1 -1
  409. package/build-module/components/block-settings-menu/content-only-settings-menu.js +48 -32
  410. package/build-module/components/block-settings-menu/content-only-settings-menu.js.map +1 -1
  411. package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js +16 -13
  412. package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -1
  413. package/build-module/components/blog-title/index.js +110 -0
  414. package/build-module/components/blog-title/index.js.map +1 -0
  415. package/build-module/components/collapsible-block-toolbar/index.js +23 -18
  416. package/build-module/components/collapsible-block-toolbar/index.js.map +1 -1
  417. package/build-module/components/commands/index.js +111 -5
  418. package/build-module/components/commands/index.js.map +1 -1
  419. package/build-module/components/create-template-part-modal/index.js +160 -0
  420. package/build-module/components/create-template-part-modal/index.js.map +1 -0
  421. package/build-module/components/create-template-part-modal/utils.js +54 -0
  422. package/build-module/components/create-template-part-modal/utils.js.map +1 -0
  423. package/build-module/components/deprecated.js +2 -2
  424. package/build-module/components/deprecated.js.map +1 -1
  425. package/build-module/components/document-bar/index.js +93 -68
  426. package/build-module/components/document-bar/index.js.map +1 -1
  427. package/build-module/components/document-outline/index.js +125 -120
  428. package/build-module/components/document-outline/index.js.map +1 -1
  429. package/build-module/components/document-outline/item.js +19 -14
  430. package/build-module/components/document-outline/item.js.map +1 -1
  431. package/build-module/components/document-tools/index.js +58 -53
  432. package/build-module/components/document-tools/index.js.map +1 -1
  433. package/build-module/components/editor-help/add-blocks.native.js +16 -11
  434. package/build-module/components/editor-help/add-blocks.native.js.map +1 -1
  435. package/build-module/components/editor-help/customize-blocks.native.js +16 -11
  436. package/build-module/components/editor-help/customize-blocks.native.js.map +1 -1
  437. package/build-module/components/editor-help/help-detail-navigation-screen.native.js +33 -22
  438. package/build-module/components/editor-help/help-detail-navigation-screen.native.js.map +1 -1
  439. package/build-module/components/editor-help/help-get-support-button.native.js +8 -6
  440. package/build-module/components/editor-help/help-get-support-button.native.js.map +1 -1
  441. package/build-module/components/editor-help/help-section-title.native.js +8 -6
  442. package/build-module/components/editor-help/help-section-title.native.js.map +1 -1
  443. package/build-module/components/editor-help/help-topic-row.native.js +7 -6
  444. package/build-module/components/editor-help/help-topic-row.native.js.map +1 -1
  445. package/build-module/components/editor-help/icon-move-blocks.native.js +7 -6
  446. package/build-module/components/editor-help/icon-move-blocks.native.js.map +1 -1
  447. package/build-module/components/editor-help/index.native.js +96 -76
  448. package/build-module/components/editor-help/index.native.js.map +1 -1
  449. package/build-module/components/editor-help/intro-to-blocks.native.js +43 -37
  450. package/build-module/components/editor-help/intro-to-blocks.native.js.map +1 -1
  451. package/build-module/components/editor-help/move-blocks.native.js +27 -21
  452. package/build-module/components/editor-help/move-blocks.native.js.map +1 -1
  453. package/build-module/components/editor-help/remove-blocks.native.js +14 -9
  454. package/build-module/components/editor-help/remove-blocks.native.js.map +1 -1
  455. package/build-module/components/editor-help/view-sections.native.js +25 -19
  456. package/build-module/components/editor-help/view-sections.native.js.map +1 -1
  457. package/build-module/components/editor-history/redo.js +2 -2
  458. package/build-module/components/editor-history/redo.js.map +1 -1
  459. package/build-module/components/editor-history/undo.js +2 -2
  460. package/build-module/components/editor-history/undo.js.map +1 -1
  461. package/build-module/components/editor-interface/content-slot-fill.js +16 -0
  462. package/build-module/components/editor-interface/content-slot-fill.js.map +1 -0
  463. package/build-module/components/editor-interface/index.js +172 -0
  464. package/build-module/components/editor-interface/index.js.map +1 -0
  465. package/build-module/components/editor-notices/index.js +25 -9
  466. package/build-module/components/editor-notices/index.js.map +1 -1
  467. package/build-module/components/editor-snackbars/index.js +2 -2
  468. package/build-module/components/editor-snackbars/index.js.map +1 -1
  469. package/build-module/components/entities-saved-states/entity-record-item.js +40 -11
  470. package/build-module/components/entities-saved-states/entity-record-item.js.map +1 -1
  471. package/build-module/components/entities-saved-states/entity-type-list.js +26 -22
  472. package/build-module/components/entities-saved-states/entity-type-list.js.map +1 -1
  473. package/build-module/components/entities-saved-states/index.js +54 -46
  474. package/build-module/components/entities-saved-states/index.js.map +1 -1
  475. package/build-module/components/error-boundary/index.js +27 -14
  476. package/build-module/components/error-boundary/index.js.map +1 -1
  477. package/build-module/components/error-boundary/index.native.js +46 -35
  478. package/build-module/components/error-boundary/index.native.js.map +1 -1
  479. package/build-module/components/global-keyboard-shortcuts/register-shortcuts.js +2 -2
  480. package/build-module/components/global-keyboard-shortcuts/register-shortcuts.js.map +1 -1
  481. package/build-module/components/global-styles-provider/index.js +82 -17
  482. package/build-module/components/global-styles-provider/index.js.map +1 -1
  483. package/build-module/components/header/back-button.js +28 -0
  484. package/build-module/components/header/back-button.js.map +1 -0
  485. package/build-module/components/header/index.js +89 -59
  486. package/build-module/components/header/index.js.map +1 -1
  487. package/build-module/components/inserter-sidebar/index.js +47 -21
  488. package/build-module/components/inserter-sidebar/index.js.map +1 -1
  489. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +2 -2
  490. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
  491. package/build-module/components/keyboard-shortcut-help-modal/index.js +54 -48
  492. package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  493. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +32 -26
  494. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
  495. package/build-module/components/list-view-sidebar/index.js +60 -47
  496. package/build-module/components/list-view-sidebar/index.js.map +1 -1
  497. package/build-module/components/list-view-sidebar/list-view-outline.js +23 -4
  498. package/build-module/components/list-view-sidebar/list-view-outline.js.map +1 -1
  499. package/build-module/components/local-autosave-monitor/index.js +15 -2
  500. package/build-module/components/local-autosave-monitor/index.js.map +1 -1
  501. package/build-module/components/mode-switcher/index.js +9 -8
  502. package/build-module/components/mode-switcher/index.js.map +1 -1
  503. package/build-module/components/more-menu/copy-content-menu-item.js +5 -4
  504. package/build-module/components/more-menu/copy-content-menu-item.js.map +1 -1
  505. package/build-module/components/more-menu/index.js +91 -76
  506. package/build-module/components/more-menu/index.js.map +1 -1
  507. package/build-module/components/more-menu/tools-more-menu-group.js +2 -2
  508. package/build-module/components/more-menu/tools-more-menu-group.js.map +1 -1
  509. package/build-module/components/more-menu/view-more-menu-group.js +2 -2
  510. package/build-module/components/more-menu/view-more-menu-group.js.map +1 -1
  511. package/build-module/components/offline-status/index.native.js +12 -9
  512. package/build-module/components/offline-status/index.native.js.map +1 -1
  513. package/build-module/components/page-attributes/order.js +90 -17
  514. package/build-module/components/page-attributes/order.js.map +1 -1
  515. package/build-module/components/page-attributes/panel.js +13 -21
  516. package/build-module/components/page-attributes/panel.js.map +1 -1
  517. package/build-module/components/page-attributes/parent.js +88 -5
  518. package/build-module/components/page-attributes/parent.js.map +1 -1
  519. package/build-module/components/pattern-duplicate-modal/index.js +51 -0
  520. package/build-module/components/pattern-duplicate-modal/index.js.map +1 -0
  521. package/build-module/components/pattern-overrides-panel/index.js +2 -2
  522. package/build-module/components/pattern-overrides-panel/index.js.map +1 -1
  523. package/build-module/components/pattern-rename-modal/index.js +50 -0
  524. package/build-module/components/pattern-rename-modal/index.js.map +1 -0
  525. package/build-module/components/plugin-document-setting-panel/index.js +19 -12
  526. package/build-module/components/plugin-document-setting-panel/index.js.map +1 -1
  527. package/build-module/components/plugin-post-publish-panel/index.js +10 -7
  528. package/build-module/components/plugin-post-publish-panel/index.js.map +1 -1
  529. package/build-module/components/plugin-post-status-info/index.js +7 -4
  530. package/build-module/components/plugin-post-status-info/index.js.map +1 -1
  531. package/build-module/components/plugin-pre-publish-panel/index.js +10 -7
  532. package/build-module/components/plugin-pre-publish-panel/index.js.map +1 -1
  533. package/build-module/components/plugin-sidebar/index.js +2 -2
  534. package/build-module/components/plugin-sidebar/index.js.map +1 -1
  535. package/build-module/components/plugin-sidebar-more-menu-item/index.js +2 -3
  536. package/build-module/components/plugin-sidebar-more-menu-item/index.js.map +1 -1
  537. package/build-module/components/post-actions/actions.js +379 -309
  538. package/build-module/components/post-actions/actions.js.map +1 -1
  539. package/build-module/components/post-actions/export-pattern-action.js +58 -0
  540. package/build-module/components/post-actions/export-pattern-action.js.map +1 -0
  541. package/build-module/components/post-actions/export-pattern-action.native.js +5 -0
  542. package/build-module/components/post-actions/export-pattern-action.native.js.map +1 -0
  543. package/build-module/components/post-actions/index.js +68 -50
  544. package/build-module/components/post-actions/index.js.map +1 -1
  545. package/build-module/components/post-author/check.js +5 -4
  546. package/build-module/components/post-author/check.js.map +1 -1
  547. package/build-module/components/post-author/combobox.js +4 -3
  548. package/build-module/components/post-author/combobox.js.map +1 -1
  549. package/build-module/components/post-author/hook.js +2 -1
  550. package/build-module/components/post-author/hook.js.map +1 -1
  551. package/build-module/components/post-author/index.js +3 -3
  552. package/build-module/components/post-author/index.js.map +1 -1
  553. package/build-module/components/post-author/panel.js +72 -4
  554. package/build-module/components/post-author/panel.js.map +1 -1
  555. package/build-module/components/post-author/select.js +4 -3
  556. package/build-module/components/post-author/select.js.map +1 -1
  557. package/build-module/components/post-card-panel/index.js +54 -20
  558. package/build-module/components/post-card-panel/index.js.map +1 -1
  559. package/build-module/components/post-comments/index.js +40 -22
  560. package/build-module/components/post-comments/index.js.map +1 -1
  561. package/build-module/components/post-content-information/index.js +8 -5
  562. package/build-module/components/post-content-information/index.js.map +1 -1
  563. package/build-module/components/post-discussion/panel.js +56 -39
  564. package/build-module/components/post-discussion/panel.js.map +1 -1
  565. package/build-module/components/post-excerpt/check.js +5 -4
  566. package/build-module/components/post-excerpt/check.js.map +1 -1
  567. package/build-module/components/post-excerpt/index.js +17 -15
  568. package/build-module/components/post-excerpt/index.js.map +1 -1
  569. package/build-module/components/post-excerpt/panel.js +60 -40
  570. package/build-module/components/post-excerpt/panel.js.map +1 -1
  571. package/build-module/components/post-excerpt/plugin.js +7 -4
  572. package/build-module/components/post-excerpt/plugin.js.map +1 -1
  573. package/build-module/components/post-featured-image/check.js +18 -6
  574. package/build-module/components/post-featured-image/check.js.map +1 -1
  575. package/build-module/components/post-featured-image/index.js +78 -49
  576. package/build-module/components/post-featured-image/index.js.map +1 -1
  577. package/build-module/components/post-featured-image/panel.js +22 -7
  578. package/build-module/components/post-featured-image/panel.js.map +1 -1
  579. package/build-module/components/post-format/check.js +14 -4
  580. package/build-module/components/post-format/check.js.map +1 -1
  581. package/build-module/components/post-format/index.js +39 -21
  582. package/build-module/components/post-format/index.js.map +1 -1
  583. package/build-module/components/post-format/panel.js +75 -7
  584. package/build-module/components/post-format/panel.js.map +1 -1
  585. package/build-module/components/post-last-edited-panel/index.js +7 -4
  586. package/build-module/components/post-last-edited-panel/index.js.map +1 -1
  587. package/build-module/components/post-last-revision/check.js +14 -4
  588. package/build-module/components/post-last-revision/check.js.map +1 -1
  589. package/build-module/components/post-last-revision/index.js +21 -13
  590. package/build-module/components/post-last-revision/index.js.map +1 -1
  591. package/build-module/components/post-last-revision/panel.js +13 -4
  592. package/build-module/components/post-last-revision/panel.js.map +1 -1
  593. package/build-module/components/post-locked-modal/index.js +60 -34
  594. package/build-module/components/post-locked-modal/index.js.map +1 -1
  595. package/build-module/components/post-panel-row/index.js +12 -8
  596. package/build-module/components/post-panel-row/index.js.map +1 -1
  597. package/build-module/components/post-panel-section/index.js +5 -4
  598. package/build-module/components/post-panel-section/index.js.map +1 -1
  599. package/build-module/components/post-pending-status/check.js +11 -0
  600. package/build-module/components/post-pending-status/check.js.map +1 -1
  601. package/build-module/components/post-pending-status/index.js +15 -7
  602. package/build-module/components/post-pending-status/index.js.map +1 -1
  603. package/build-module/components/post-pingbacks/index.js +13 -5
  604. package/build-module/components/post-pingbacks/index.js.map +1 -1
  605. package/build-module/components/post-preview-button/index.js +47 -21
  606. package/build-module/components/post-preview-button/index.js.map +1 -1
  607. package/build-module/components/post-publish-button/index.js +22 -11
  608. package/build-module/components/post-publish-button/index.js.map +1 -1
  609. package/build-module/components/post-publish-button/post-publish-button-or-toggle.js +2 -2
  610. package/build-module/components/post-publish-button/post-publish-button-or-toggle.js.map +1 -1
  611. package/build-module/components/post-publish-panel/index.js +48 -33
  612. package/build-module/components/post-publish-panel/index.js.map +1 -1
  613. package/build-module/components/post-publish-panel/maybe-category-panel.js +13 -9
  614. package/build-module/components/post-publish-panel/maybe-category-panel.js.map +1 -1
  615. package/build-module/components/post-publish-panel/maybe-post-format-panel.js +22 -15
  616. package/build-module/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
  617. package/build-module/components/post-publish-panel/maybe-tags-panel.js +14 -10
  618. package/build-module/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
  619. package/build-module/components/post-publish-panel/maybe-upload-media.js +30 -24
  620. package/build-module/components/post-publish-panel/maybe-upload-media.js.map +1 -1
  621. package/build-module/components/post-publish-panel/postpublish.js +57 -38
  622. package/build-module/components/post-publish-panel/postpublish.js.map +1 -1
  623. package/build-module/components/post-publish-panel/prepublish.js +43 -26
  624. package/build-module/components/post-publish-panel/prepublish.js.map +1 -1
  625. package/build-module/components/post-saved-state/index.js +8 -6
  626. package/build-module/components/post-saved-state/index.js.map +1 -1
  627. package/build-module/components/post-schedule/check.js +9 -0
  628. package/build-module/components/post-schedule/check.js.map +1 -1
  629. package/build-module/components/post-schedule/index.js +30 -6
  630. package/build-module/components/post-schedule/index.js.map +1 -1
  631. package/build-module/components/post-schedule/label.js +17 -0
  632. package/build-module/components/post-schedule/label.js.map +1 -1
  633. package/build-module/components/post-schedule/panel.js +43 -30
  634. package/build-module/components/post-schedule/panel.js.map +1 -1
  635. package/build-module/components/post-slug/check.js +5 -4
  636. package/build-module/components/post-slug/check.js.map +1 -1
  637. package/build-module/components/post-slug/index.js +5 -3
  638. package/build-module/components/post-slug/index.js.map +1 -1
  639. package/build-module/components/post-slug/panel.js +7 -4
  640. package/build-module/components/post-slug/panel.js.map +1 -1
  641. package/build-module/components/post-status/index.js +121 -120
  642. package/build-module/components/post-status/index.js.map +1 -1
  643. package/build-module/components/post-sticky/index.js +17 -9
  644. package/build-module/components/post-sticky/index.js.map +1 -1
  645. package/build-module/components/post-sticky/panel.js +6 -2
  646. package/build-module/components/post-sticky/panel.js.map +1 -1
  647. package/build-module/components/post-switch-to-draft-button/index.js +27 -21
  648. package/build-module/components/post-switch-to-draft-button/index.js.map +1 -1
  649. package/build-module/components/post-sync-status/index.js +8 -6
  650. package/build-module/components/post-sync-status/index.js.map +1 -1
  651. package/build-module/components/post-taxonomies/flat-term-selector.js +22 -18
  652. package/build-module/components/post-taxonomies/flat-term-selector.js.map +1 -1
  653. package/build-module/components/post-taxonomies/hierarchical-term-selector.js +71 -59
  654. package/build-module/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
  655. package/build-module/components/post-taxonomies/index.js +6 -6
  656. package/build-module/components/post-taxonomies/index.js.map +1 -1
  657. package/build-module/components/post-taxonomies/most-used-terms.js +20 -15
  658. package/build-module/components/post-taxonomies/most-used-terms.js.map +1 -1
  659. package/build-module/components/post-taxonomies/panel.js +15 -11
  660. package/build-module/components/post-taxonomies/panel.js.map +1 -1
  661. package/build-module/components/post-template/block-theme.js +44 -32
  662. package/build-module/components/post-template/block-theme.js.map +1 -1
  663. package/build-module/components/post-template/classic-theme.js +74 -50
  664. package/build-module/components/post-template/classic-theme.js.map +1 -1
  665. package/build-module/components/post-template/create-new-template-modal.js +34 -27
  666. package/build-module/components/post-template/create-new-template-modal.js.map +1 -1
  667. package/build-module/components/post-template/create-new-template.js +16 -11
  668. package/build-module/components/post-template/create-new-template.js.map +1 -1
  669. package/build-module/components/post-template/panel.js +17 -9
  670. package/build-module/components/post-template/panel.js.map +1 -1
  671. package/build-module/components/post-template/reset-default-template.js +5 -4
  672. package/build-module/components/post-template/reset-default-template.js.map +1 -1
  673. package/build-module/components/post-template/swap-template-button.js +22 -15
  674. package/build-module/components/post-template/swap-template-button.js.map +1 -1
  675. package/build-module/components/post-text-editor/index.js +30 -19
  676. package/build-module/components/post-text-editor/index.js.map +1 -1
  677. package/build-module/components/post-title/index.js +29 -18
  678. package/build-module/components/post-title/index.js.map +1 -1
  679. package/build-module/components/post-title/index.native.js +81 -57
  680. package/build-module/components/post-title/index.native.js.map +1 -1
  681. package/build-module/components/post-title/post-title-raw.js +11 -2
  682. package/build-module/components/post-title/post-title-raw.js.map +1 -1
  683. package/build-module/components/post-title/use-post-title-focus.js +8 -0
  684. package/build-module/components/post-title/use-post-title-focus.js.map +1 -1
  685. package/build-module/components/post-title/use-post-title.js +6 -0
  686. package/build-module/components/post-title/use-post-title.js.map +1 -1
  687. package/build-module/components/post-transform-panel/index.js +12 -12
  688. package/build-module/components/post-transform-panel/index.js.map +1 -1
  689. package/build-module/components/post-trash/index.js +21 -15
  690. package/build-module/components/post-trash/index.js.map +1 -1
  691. package/build-module/components/post-url/check.js +9 -0
  692. package/build-module/components/post-url/check.js.map +1 -1
  693. package/build-module/components/post-url/index.js +100 -72
  694. package/build-module/components/post-url/index.js.map +1 -1
  695. package/build-module/components/post-url/label.js +12 -0
  696. package/build-module/components/post-url/label.js.map +1 -1
  697. package/build-module/components/post-url/panel.js +35 -24
  698. package/build-module/components/post-url/panel.js.map +1 -1
  699. package/build-module/components/post-view-link/index.js +2 -2
  700. package/build-module/components/post-view-link/index.js.map +1 -1
  701. package/build-module/components/post-visibility/check.js +10 -0
  702. package/build-module/components/post-visibility/check.js.map +1 -1
  703. package/build-module/components/post-visibility/index.js +85 -67
  704. package/build-module/components/post-visibility/index.js.map +1 -1
  705. package/build-module/components/post-visibility/label.js +12 -0
  706. package/build-module/components/post-visibility/label.js.map +1 -1
  707. package/build-module/components/posts-per-page/index.js +103 -0
  708. package/build-module/components/posts-per-page/index.js.map +1 -0
  709. package/build-module/components/preferences-modal/enable-plugin-document-setting-panel.js +7 -5
  710. package/build-module/components/preferences-modal/enable-plugin-document-setting-panel.js.map +1 -1
  711. package/build-module/components/preferences-modal/index.js +126 -102
  712. package/build-module/components/preferences-modal/index.js.map +1 -1
  713. package/build-module/components/preview-dropdown/index.js +49 -31
  714. package/build-module/components/preview-dropdown/index.js.map +1 -1
  715. package/build-module/components/provider/index.js +96 -20
  716. package/build-module/components/provider/index.js.map +1 -1
  717. package/build-module/components/provider/index.native.js +58 -20
  718. package/build-module/components/provider/index.native.js.map +1 -1
  719. package/build-module/components/provider/use-block-editor-settings.js +7 -6
  720. package/build-module/components/provider/use-block-editor-settings.js.map +1 -1
  721. package/build-module/components/provider/with-registry-provider.js +33 -26
  722. package/build-module/components/provider/with-registry-provider.js.map +1 -1
  723. package/build-module/components/resizable-editor/index.js +89 -0
  724. package/build-module/components/resizable-editor/index.js.map +1 -0
  725. package/build-module/components/resizable-editor/resize-handle.js +54 -0
  726. package/build-module/components/resizable-editor/resize-handle.js.map +1 -0
  727. package/build-module/components/save-publish-panels/index.js +37 -26
  728. package/build-module/components/save-publish-panels/index.js.map +1 -1
  729. package/build-module/components/sidebar/header.js +18 -14
  730. package/build-module/components/sidebar/header.js.map +1 -1
  731. package/build-module/components/sidebar/index.js +36 -31
  732. package/build-module/components/sidebar/index.js.map +1 -1
  733. package/build-module/components/sidebar/post-summary.js +33 -25
  734. package/build-module/components/sidebar/post-summary.js.map +1 -1
  735. package/build-module/components/site-discussion/index.js +127 -0
  736. package/build-module/components/site-discussion/index.js.map +1 -0
  737. package/build-module/components/start-page-options/index.js +13 -11
  738. package/build-module/components/start-page-options/index.js.map +1 -1
  739. package/build-module/components/start-template-options/index.js +30 -23
  740. package/build-module/components/start-template-options/index.js.map +1 -1
  741. package/build-module/components/table-of-contents/index.js +4 -4
  742. package/build-module/components/table-of-contents/index.js.map +1 -1
  743. package/build-module/components/table-of-contents/panel.js +55 -35
  744. package/build-module/components/table-of-contents/panel.js.map +1 -1
  745. package/build-module/components/template-areas/index.js +37 -22
  746. package/build-module/components/template-areas/index.js.map +1 -1
  747. package/build-module/components/template-content-panel/index.js +7 -6
  748. package/build-module/components/template-content-panel/index.js.map +1 -1
  749. package/build-module/components/template-validation-notice/index.js +27 -21
  750. package/build-module/components/template-validation-notice/index.js.map +1 -1
  751. package/build-module/components/text-editor/index.js +66 -0
  752. package/build-module/components/text-editor/index.js.map +1 -0
  753. package/build-module/components/time-to-read/index.js +7 -6
  754. package/build-module/components/time-to-read/index.js.map +1 -1
  755. package/build-module/components/{editor-canvas → visual-editor}/edit-template-blocks-notification.js +5 -4
  756. package/build-module/components/visual-editor/edit-template-blocks-notification.js.map +1 -0
  757. package/build-module/components/{editor-canvas → visual-editor}/index.js +118 -75
  758. package/build-module/components/visual-editor/index.js.map +1 -0
  759. package/build-module/components/word-count/index.js +5 -4
  760. package/build-module/components/word-count/index.js.map +1 -1
  761. package/build-module/hooks/custom-sources-backwards-compatibility.js +2 -2
  762. package/build-module/hooks/custom-sources-backwards-compatibility.js.map +1 -1
  763. package/build-module/hooks/index.js +1 -0
  764. package/build-module/hooks/index.js.map +1 -1
  765. package/build-module/hooks/media-upload.js +7 -0
  766. package/build-module/hooks/media-upload.js.map +1 -0
  767. package/build-module/hooks/pattern-overrides.js +17 -11
  768. package/build-module/hooks/pattern-overrides.js.map +1 -1
  769. package/build-module/private-apis.js +10 -28
  770. package/build-module/private-apis.js.map +1 -1
  771. package/build-module/private-apis.native.js +2 -26
  772. package/build-module/private-apis.native.js.map +1 -1
  773. package/build-module/store/constants.js +3 -0
  774. package/build-module/store/constants.js.map +1 -1
  775. package/build-module/store/private-actions.js +10 -14
  776. package/build-module/store/private-actions.js.map +1 -1
  777. package/build-module/store/private-selectors.js +38 -1
  778. package/build-module/store/private-selectors.js.map +1 -1
  779. package/build-module/store/selectors.js +1 -1
  780. package/build-module/store/selectors.js.map +1 -1
  781. package/build-module/utils/set-nested-value.js +38 -0
  782. package/build-module/utils/set-nested-value.js.map +1 -0
  783. package/build-style/style-rtl.css +318 -90
  784. package/build-style/style.css +318 -90
  785. package/package.json +40 -36
  786. package/src/bindings/index.js +1 -4
  787. package/src/bindings/pattern-overrides.js +1 -1
  788. package/src/bindings/post-meta.js +46 -6
  789. package/src/components/blog-title/index.js +124 -0
  790. package/src/components/blog-title/style.scss +4 -0
  791. package/src/components/commands/index.js +113 -3
  792. package/src/components/create-template-part-modal/index.js +205 -0
  793. package/src/components/create-template-part-modal/style.scss +69 -0
  794. package/src/components/create-template-part-modal/test/utils.js +60 -0
  795. package/src/components/create-template-part-modal/utils.js +67 -0
  796. package/src/components/document-bar/index.js +32 -21
  797. package/src/components/document-tools/index.js +2 -7
  798. package/src/components/editor-help/help-get-support-button.native.js +1 -1
  799. package/src/components/editor-interface/content-slot-fill.js +15 -0
  800. package/src/components/editor-interface/index.js +230 -0
  801. package/src/components/editor-notices/index.js +10 -0
  802. package/src/components/entities-saved-states/entity-record-item.js +45 -16
  803. package/src/components/entities-saved-states/style.scss +13 -0
  804. package/src/components/error-boundary/index.js +10 -0
  805. package/src/components/error-boundary/index.native.js +1 -1
  806. package/src/components/global-styles-provider/index.js +100 -8
  807. package/src/components/header/back-button.js +27 -0
  808. package/src/components/header/index.js +25 -10
  809. package/src/components/header/style.scss +5 -0
  810. package/src/components/inserter-sidebar/index.js +65 -32
  811. package/src/components/inserter-sidebar/style.scss +0 -13
  812. package/src/components/local-autosave-monitor/index.js +12 -0
  813. package/src/components/page-attributes/order.js +79 -3
  814. package/src/components/page-attributes/panel.js +10 -26
  815. package/src/components/page-attributes/parent.js +98 -2
  816. package/src/components/page-attributes/style.scss +19 -0
  817. package/src/components/pattern-duplicate-modal/index.js +50 -0
  818. package/src/components/pattern-rename-modal/index.js +44 -0
  819. package/src/components/post-actions/actions.js +306 -261
  820. package/src/components/post-actions/export-pattern-action.js +74 -0
  821. package/src/components/post-actions/export-pattern-action.native.js +4 -0
  822. package/src/components/post-actions/index.js +16 -5
  823. package/src/components/post-author/combobox.js +1 -0
  824. package/src/components/post-author/hook.js +1 -1
  825. package/src/components/post-author/panel.js +63 -2
  826. package/src/components/post-author/select.js +1 -0
  827. package/src/components/post-author/style.scss +6 -0
  828. package/src/components/post-card-panel/index.js +69 -22
  829. package/src/components/post-card-panel/style.scss +23 -1
  830. package/src/components/post-comments/index.js +5 -0
  831. package/src/components/post-discussion/panel.js +9 -2
  832. package/src/components/post-discussion/style.scss +1 -3
  833. package/src/components/post-excerpt/panel.js +45 -48
  834. package/src/components/post-excerpt/style.scss +0 -17
  835. package/src/components/post-featured-image/check.js +9 -0
  836. package/src/components/post-featured-image/index.js +15 -0
  837. package/src/components/post-featured-image/panel.js +9 -0
  838. package/src/components/post-format/check.js +8 -0
  839. package/src/components/post-format/index.js +15 -4
  840. package/src/components/post-format/panel.js +71 -6
  841. package/src/components/post-format/style.scss +10 -4
  842. package/src/components/post-last-revision/check.js +8 -0
  843. package/src/components/post-last-revision/index.js +7 -2
  844. package/src/components/post-last-revision/panel.js +5 -0
  845. package/src/components/post-locked-modal/index.js +6 -0
  846. package/src/components/post-panel-row/style.scss +15 -0
  847. package/src/components/post-pending-status/check.js +10 -0
  848. package/src/components/post-pending-status/index.js +5 -0
  849. package/src/components/post-pingbacks/index.js +6 -0
  850. package/src/components/post-preview-button/index.js +15 -0
  851. package/src/components/post-publish-button/index.js +17 -4
  852. package/src/components/post-publish-panel/index.js +1 -0
  853. package/src/components/post-publish-panel/maybe-tags-panel.js +1 -1
  854. package/src/components/post-publish-panel/test/__snapshots__/index.js.snap +3 -3
  855. package/src/components/post-schedule/check.js +8 -0
  856. package/src/components/post-schedule/index.js +30 -3
  857. package/src/components/post-schedule/label.js +15 -0
  858. package/src/components/post-schedule/panel.js +9 -1
  859. package/src/components/post-schedule/style.scss +0 -11
  860. package/src/components/post-status/index.js +30 -52
  861. package/src/components/post-status/style.scss +4 -34
  862. package/src/components/post-sticky/index.js +12 -7
  863. package/src/components/post-sticky/style.scss +3 -0
  864. package/src/components/post-template/block-theme.js +1 -0
  865. package/src/components/post-template/classic-theme.js +15 -0
  866. package/src/components/post-template/panel.js +5 -0
  867. package/src/components/post-template/style.scss +0 -8
  868. package/src/components/post-text-editor/index.js +5 -0
  869. package/src/components/post-title/index.js +8 -1
  870. package/src/components/post-title/index.native.js +70 -35
  871. package/src/components/post-title/post-title-raw.js +8 -0
  872. package/src/components/post-title/use-post-title-focus.js +7 -0
  873. package/src/components/post-title/use-post-title.js +5 -0
  874. package/src/components/post-transform-panel/index.js +2 -10
  875. package/src/components/post-url/check.js +8 -0
  876. package/src/components/post-url/index.js +41 -24
  877. package/src/components/post-url/label.js +10 -0
  878. package/src/components/post-url/panel.js +6 -1
  879. package/src/components/post-url/style.scss +0 -9
  880. package/src/components/post-visibility/check.js +9 -0
  881. package/src/components/post-visibility/index.js +7 -0
  882. package/src/components/post-visibility/label.js +10 -0
  883. package/src/components/posts-per-page/index.js +101 -0
  884. package/src/components/posts-per-page/style.scss +4 -0
  885. package/src/components/provider/index.js +68 -0
  886. package/src/components/provider/index.native.js +43 -2
  887. package/src/components/provider/use-block-editor-settings.js +4 -6
  888. package/src/components/provider/with-registry-provider.js +32 -31
  889. package/src/components/resizable-editor/index.js +90 -0
  890. package/src/components/resizable-editor/resize-handle.js +62 -0
  891. package/src/components/resizable-editor/style.scss +53 -0
  892. package/src/components/save-publish-panels/index.js +10 -2
  893. package/src/components/sidebar/index.js +0 -4
  894. package/src/components/sidebar/post-summary.js +14 -21
  895. package/src/components/sidebar/style.scss +1 -1
  896. package/src/components/site-discussion/index.js +138 -0
  897. package/src/components/site-discussion/style.scss +19 -0
  898. package/src/components/start-template-options/style.scss +0 -8
  899. package/src/components/template-areas/index.js +15 -6
  900. package/src/components/text-editor/index.js +57 -0
  901. package/src/components/text-editor/style.scss +71 -0
  902. package/src/components/{editor-canvas → visual-editor}/index.js +177 -108
  903. package/src/components/visual-editor/style.scss +37 -0
  904. package/src/hooks/index.js +1 -0
  905. package/src/hooks/media-upload.js +11 -0
  906. package/src/private-apis.js +10 -28
  907. package/src/private-apis.native.js +2 -26
  908. package/src/store/constants.js +7 -0
  909. package/src/store/private-actions.js +22 -50
  910. package/src/store/private-selectors.js +45 -0
  911. package/src/store/selectors.js +1 -1
  912. package/src/style.scss +9 -0
  913. package/src/utils/set-nested-value.js +39 -0
  914. package/build/components/editor-canvas/edit-template-blocks-notification.js.map +0 -1
  915. package/build/components/editor-canvas/index.js.map +0 -1
  916. package/build/components/post-trash/panel.js +0 -18
  917. package/build/components/post-trash/panel.js.map +0 -1
  918. package/build-module/components/editor-canvas/edit-template-blocks-notification.js.map +0 -1
  919. package/build-module/components/editor-canvas/index.js.map +0 -1
  920. package/build-module/components/post-trash/panel.js +0 -10
  921. package/build-module/components/post-trash/panel.js.map +0 -1
  922. package/src/components/post-trash/panel.js +0 -13
  923. package/src/components/provider/README.md +0 -37
  924. /package/src/components/{editor-canvas → visual-editor}/edit-template-blocks-notification.js +0 -0
@@ -4,12 +4,12 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = TemplateValidationNotice;
7
- var _react = require("react");
8
7
  var _components = require("@wordpress/components");
9
8
  var _i18n = require("@wordpress/i18n");
10
9
  var _data = require("@wordpress/data");
11
10
  var _element = require("@wordpress/element");
12
11
  var _blockEditor = require("@wordpress/block-editor");
12
+ var _jsxRuntime = require("react/jsx-runtime");
13
13
  /**
14
14
  * WordPress dependencies
15
15
  */
@@ -26,25 +26,29 @@ function TemplateValidationNotice() {
26
26
  if (isValid) {
27
27
  return null;
28
28
  }
29
- return (0, _react.createElement)(_react.Fragment, null, (0, _react.createElement)(_components.Notice, {
30
- className: "editor-template-validation-notice",
31
- isDismissible: false,
32
- status: "warning",
33
- actions: [{
34
- label: (0, _i18n.__)('Keep it as is'),
35
- onClick: () => setTemplateValidity(true)
36
- }, {
37
- label: (0, _i18n.__)('Reset the template'),
38
- onClick: () => setShowConfirmDialog(true)
39
- }]
40
- }, (0, _i18n.__)('The content of your post doesn’t match the template assigned to your post type.')), (0, _react.createElement)(_components.__experimentalConfirmDialog, {
41
- isOpen: showConfirmDialog,
42
- confirmButtonText: (0, _i18n.__)('Reset'),
43
- onConfirm: () => {
44
- setShowConfirmDialog(false);
45
- synchronizeTemplate();
46
- },
47
- onCancel: () => setShowConfirmDialog(false)
48
- }, (0, _i18n.__)('Resetting the template may result in loss of content, do you want to continue?')));
29
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
30
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Notice, {
31
+ className: "editor-template-validation-notice",
32
+ isDismissible: false,
33
+ status: "warning",
34
+ actions: [{
35
+ label: (0, _i18n.__)('Keep it as is'),
36
+ onClick: () => setTemplateValidity(true)
37
+ }, {
38
+ label: (0, _i18n.__)('Reset the template'),
39
+ onClick: () => setShowConfirmDialog(true)
40
+ }],
41
+ children: (0, _i18n.__)('The content of your post doesn’t match the template assigned to your post type.')
42
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__experimentalConfirmDialog, {
43
+ isOpen: showConfirmDialog,
44
+ confirmButtonText: (0, _i18n.__)('Reset'),
45
+ onConfirm: () => {
46
+ setShowConfirmDialog(false);
47
+ synchronizeTemplate();
48
+ },
49
+ onCancel: () => setShowConfirmDialog(false),
50
+ children: (0, _i18n.__)('Resetting the template may result in loss of content, do you want to continue?')
51
+ })]
52
+ });
49
53
  }
50
54
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
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":[]}
1
+ {"version":3,"names":["_components","require","_i18n","_data","_element","_blockEditor","_jsxRuntime","TemplateValidationNotice","showConfirmDialog","setShowConfirmDialog","useState","isValid","useSelect","select","blockEditorStore","isValidTemplate","setTemplateValidity","synchronizeTemplate","useDispatch","jsxs","Fragment","children","jsx","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;AAAoE,IAAAK,WAAA,GAAAL,OAAA;AAVpE;AACA;AACA;;AAUe,SAASM,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,oBACC,IAAAL,WAAA,CAAAa,IAAA,EAAAb,WAAA,CAAAc,QAAA;IAAAC,QAAA,gBACC,IAAAf,WAAA,CAAAgB,GAAA,EAACtB,WAAA,CAAAuB,MAAM;MACNC,SAAS,EAAC,mCAAmC;MAC7CC,aAAa,EAAG,KAAO;MACvBC,MAAM,EAAC,SAAS;MAChBC,OAAO,EAAG,CACT;QACCC,KAAK,EAAE,IAAAC,QAAE,EAAE,eAAgB,CAAC;QAC5BC,OAAO,EAAEA,CAAA,KAAMd,mBAAmB,CAAE,IAAK;MAC1C,CAAC,EACD;QACCY,KAAK,EAAE,IAAAC,QAAE,EAAE,oBAAqB,CAAC;QACjCC,OAAO,EAAEA,CAAA,KAAMrB,oBAAoB,CAAE,IAAK;MAC3C,CAAC,CACC;MAAAY,QAAA,EAED,IAAAQ,QAAE,EACH,iFACD;IAAC,CACM,CAAC,eACT,IAAAvB,WAAA,CAAAgB,GAAA,EAACtB,WAAA,CAAA+B,2BAAa;MACbC,MAAM,EAAGxB,iBAAmB;MAC5ByB,iBAAiB,EAAG,IAAAJ,QAAE,EAAE,OAAQ,CAAG;MACnCK,SAAS,EAAGA,CAAA,KAAM;QACjBzB,oBAAoB,CAAE,KAAM,CAAC;QAC7BQ,mBAAmB,CAAC,CAAC;MACtB,CAAG;MACHkB,QAAQ,EAAGA,CAAA,KAAM1B,oBAAoB,CAAE,KAAM,CAAG;MAAAY,QAAA,EAE9C,IAAAQ,QAAE,EACH,gFACD;IAAC,CACa,CAAC;EAAA,CACf,CAAC;AAEL","ignoreList":[]}
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = TextEditor;
8
+ var _components = require("@wordpress/components");
9
+ var _data = require("@wordpress/data");
10
+ var _i18n = require("@wordpress/i18n");
11
+ var _keyboardShortcuts = require("@wordpress/keyboard-shortcuts");
12
+ var _element = require("@wordpress/element");
13
+ var _store = require("../../store");
14
+ var _postTextEditor = _interopRequireDefault(require("../post-text-editor"));
15
+ var _postTitleRaw = _interopRequireDefault(require("../post-title/post-title-raw"));
16
+ var _jsxRuntime = require("react/jsx-runtime");
17
+ /**
18
+ * WordPress dependencies
19
+ */
20
+
21
+ /**
22
+ * Internal dependencies
23
+ */
24
+
25
+ function TextEditor({
26
+ autoFocus = false
27
+ }) {
28
+ const {
29
+ switchEditorMode
30
+ } = (0, _data.useDispatch)(_store.store);
31
+ const {
32
+ shortcut,
33
+ isRichEditingEnabled
34
+ } = (0, _data.useSelect)(select => {
35
+ const {
36
+ getEditorSettings
37
+ } = select(_store.store);
38
+ const {
39
+ getShortcutRepresentation
40
+ } = select(_keyboardShortcuts.store);
41
+ return {
42
+ shortcut: getShortcutRepresentation('core/editor/toggle-mode'),
43
+ isRichEditingEnabled: getEditorSettings().richEditingEnabled
44
+ };
45
+ }, []);
46
+ const titleRef = (0, _element.useRef)();
47
+ (0, _element.useEffect)(() => {
48
+ if (autoFocus) {
49
+ return;
50
+ }
51
+ titleRef?.current?.focus();
52
+ }, [autoFocus]);
53
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
54
+ className: "editor-text-editor",
55
+ children: [isRichEditingEnabled && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
56
+ className: "editor-text-editor__toolbar",
57
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("h2", {
58
+ children: (0, _i18n.__)('Editing code')
59
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
60
+ variant: "tertiary",
61
+ onClick: () => switchEditorMode('visual'),
62
+ shortcut: shortcut,
63
+ children: (0, _i18n.__)('Exit code editor')
64
+ })]
65
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
66
+ className: "editor-text-editor__body",
67
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_postTitleRaw.default, {
68
+ ref: titleRef
69
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_postTextEditor.default, {})]
70
+ })]
71
+ });
72
+ }
73
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_components","require","_data","_i18n","_keyboardShortcuts","_element","_store","_postTextEditor","_interopRequireDefault","_postTitleRaw","_jsxRuntime","TextEditor","autoFocus","switchEditorMode","useDispatch","editorStore","shortcut","isRichEditingEnabled","useSelect","select","getEditorSettings","getShortcutRepresentation","keyboardShortcutsStore","richEditingEnabled","titleRef","useRef","useEffect","current","focus","jsxs","className","children","jsx","__","Button","variant","onClick","default","ref"],"sources":["@wordpress/editor/src/components/text-editor/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Button } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport { useEffect, useRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport PostTextEditor from '../post-text-editor';\nimport PostTitleRaw from '../post-title/post-title-raw';\n\nexport default function TextEditor( { autoFocus = false } ) {\n\tconst { switchEditorMode } = useDispatch( editorStore );\n\tconst { shortcut, isRichEditingEnabled } = useSelect( ( select ) => {\n\t\tconst { getEditorSettings } = select( editorStore );\n\t\tconst { getShortcutRepresentation } = select( keyboardShortcutsStore );\n\n\t\treturn {\n\t\t\tshortcut: getShortcutRepresentation( 'core/editor/toggle-mode' ),\n\t\t\tisRichEditingEnabled: getEditorSettings().richEditingEnabled,\n\t\t};\n\t}, [] );\n\n\tconst titleRef = useRef();\n\tuseEffect( () => {\n\t\tif ( autoFocus ) {\n\t\t\treturn;\n\t\t}\n\t\ttitleRef?.current?.focus();\n\t}, [ autoFocus ] );\n\n\treturn (\n\t\t<div className=\"editor-text-editor\">\n\t\t\t{ isRichEditingEnabled && (\n\t\t\t\t<div className=\"editor-text-editor__toolbar\">\n\t\t\t\t\t<h2>{ __( 'Editing code' ) }</h2>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tonClick={ () => switchEditorMode( 'visual' ) }\n\t\t\t\t\t\tshortcut={ shortcut }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Exit code editor' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t<div className=\"editor-text-editor__body\">\n\t\t\t\t<PostTitleRaw ref={ titleRef } />\n\t\t\t\t<PostTextEditor />\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,kBAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AAKA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,eAAA,GAAAC,sBAAA,CAAAP,OAAA;AACA,IAAAQ,aAAA,GAAAD,sBAAA,CAAAP,OAAA;AAAwD,IAAAS,WAAA,GAAAT,OAAA;AAdxD;AACA;AACA;;AAOA;AACA;AACA;;AAKe,SAASU,UAAUA,CAAE;EAAEC,SAAS,GAAG;AAAM,CAAC,EAAG;EAC3D,MAAM;IAAEC;EAAiB,CAAC,GAAG,IAAAC,iBAAW,EAAEC,YAAY,CAAC;EACvD,MAAM;IAAEC,QAAQ;IAAEC;EAAqB,CAAC,GAAG,IAAAC,eAAS,EAAIC,MAAM,IAAM;IACnE,MAAM;MAAEC;IAAkB,CAAC,GAAGD,MAAM,CAAEJ,YAAY,CAAC;IACnD,MAAM;MAAEM;IAA0B,CAAC,GAAGF,MAAM,CAAEG,wBAAuB,CAAC;IAEtE,OAAO;MACNN,QAAQ,EAAEK,yBAAyB,CAAE,yBAA0B,CAAC;MAChEJ,oBAAoB,EAAEG,iBAAiB,CAAC,CAAC,CAACG;IAC3C,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EAEP,MAAMC,QAAQ,GAAG,IAAAC,eAAM,EAAC,CAAC;EACzB,IAAAC,kBAAS,EAAE,MAAM;IAChB,IAAKd,SAAS,EAAG;MAChB;IACD;IACAY,QAAQ,EAAEG,OAAO,EAAEC,KAAK,CAAC,CAAC;EAC3B,CAAC,EAAE,CAAEhB,SAAS,CAAG,CAAC;EAElB,oBACC,IAAAF,WAAA,CAAAmB,IAAA;IAAKC,SAAS,EAAC,oBAAoB;IAAAC,QAAA,GAChCd,oBAAoB,iBACrB,IAAAP,WAAA,CAAAmB,IAAA;MAAKC,SAAS,EAAC,6BAA6B;MAAAC,QAAA,gBAC3C,IAAArB,WAAA,CAAAsB,GAAA;QAAAD,QAAA,EAAM,IAAAE,QAAE,EAAE,cAAe;MAAC,CAAM,CAAC,eACjC,IAAAvB,WAAA,CAAAsB,GAAA,EAAChC,WAAA,CAAAkC,MAAM;QACNC,OAAO,EAAC,UAAU;QAClBC,OAAO,EAAGA,CAAA,KAAMvB,gBAAgB,CAAE,QAAS,CAAG;QAC9CG,QAAQ,EAAGA,QAAU;QAAAe,QAAA,EAEnB,IAAAE,QAAE,EAAE,kBAAmB;MAAC,CACnB,CAAC;IAAA,CACL,CACL,eACD,IAAAvB,WAAA,CAAAmB,IAAA;MAAKC,SAAS,EAAC,0BAA0B;MAAAC,QAAA,gBACxC,IAAArB,WAAA,CAAAsB,GAAA,EAACvB,aAAA,CAAA4B,OAAY;QAACC,GAAG,EAAGd;MAAU,CAAE,CAAC,eACjC,IAAAd,WAAA,CAAAsB,GAAA,EAACzB,eAAA,CAAA8B,OAAc,IAAE,CAAC;IAAA,CACd,CAAC;EAAA,CACF,CAAC;AAER","ignoreList":[]}
@@ -4,12 +4,12 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = TimeToRead;
7
- var _react = require("react");
8
7
  var _data = require("@wordpress/data");
9
8
  var _i18n = require("@wordpress/i18n");
10
9
  var _wordcount = require("@wordpress/wordcount");
11
10
  var _element = require("@wordpress/element");
12
11
  var _store = require("../../store");
12
+ var _jsxRuntime = require("react/jsx-runtime");
13
13
  /**
14
14
  * WordPress dependencies
15
15
  */
@@ -24,8 +24,7 @@ var _store = require("../../store");
24
24
  * (Characters/minute used for Chinese rather than words).
25
25
  *
26
26
  * @type {number} A rough estimate of the average reading rate across multiple languages.
27
- */
28
- const AVERAGE_READING_RATE = 189;
27
+ */const AVERAGE_READING_RATE = 189;
29
28
  function TimeToRead() {
30
29
  const content = (0, _data.useSelect)(select => select(_store.store).getEditedPostAttribute('content'), []);
31
30
 
@@ -37,13 +36,14 @@ function TimeToRead() {
37
36
  const wordCountType = (0, _i18n._x)('words', 'Word count type. Do not translate!');
38
37
  const minutesToRead = Math.round((0, _wordcount.count)(content, wordCountType) / AVERAGE_READING_RATE);
39
38
  const minutesToReadString = minutesToRead === 0 ? (0, _element.createInterpolateElement)((0, _i18n.__)('<span>< 1</span> minute'), {
40
- span: (0, _react.createElement)("span", null)
39
+ span: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {})
41
40
  }) : (0, _element.createInterpolateElement)((0, _i18n.sprintf)( /* translators: %s is the number of minutes the post will take to read. */
42
41
  (0, _i18n._n)('<span>%d</span> minute', '<span>%d</span> minutes', minutesToRead), minutesToRead), {
43
- span: (0, _react.createElement)("span", null)
42
+ span: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {})
43
+ });
44
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
45
+ className: "time-to-read",
46
+ children: minutesToReadString
44
47
  });
45
- return (0, _react.createElement)("span", {
46
- className: "time-to-read"
47
- }, minutesToReadString);
48
48
  }
49
49
  //# sourceMappingURL=index.js.map
@@ -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","ignoreList":[]}
1
+ {"version":3,"names":["_data","require","_i18n","_wordcount","_element","_store","_jsxRuntime","AVERAGE_READING_RATE","TimeToRead","content","useSelect","select","editorStore","getEditedPostAttribute","wordCountType","_x","minutesToRead","Math","round","wordCount","minutesToReadString","createInterpolateElement","__","span","jsx","sprintf","_n","className","children"],"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;AAAmD,IAAAK,WAAA,GAAAL,OAAA;AAXnD;AACA;AACA;;AAMA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,GACA,MAAMM,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,IAAAjB,WAAA,CAAAkB,GAAA,YAAO;EACb,CAAE,CAAC,GACH,IAAAH,iCAAwB,EACxB,IAAAI,aAAO,GACN;EACA,IAAAC,QAAE,EACD,wBAAwB,EACxB,yBAAyB,EACzBV,aACD,CAAC,EACDA,aACD,CAAC,EACD;IACCO,IAAI,eAAE,IAAAjB,WAAA,CAAAkB,GAAA,YAAO;EACd,CACA,CAAC;EAEL,oBAAO,IAAAlB,WAAA,CAAAkB,GAAA;IAAMG,SAAS,EAAC,cAAc;IAAAC,QAAA,EAAGR;EAAmB,CAAQ,CAAC;AACrE","ignoreList":[]}
@@ -4,13 +4,13 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = EditTemplateBlocksNotification;
7
- var _react = require("react");
8
7
  var _data = require("@wordpress/data");
9
8
  var _coreData = require("@wordpress/core-data");
10
9
  var _element = require("@wordpress/element");
11
10
  var _i18n = require("@wordpress/i18n");
12
11
  var _components = require("@wordpress/components");
13
12
  var _store = require("../../store");
13
+ var _jsxRuntime = require("react/jsx-runtime");
14
14
  /**
15
15
  * WordPress dependencies
16
16
  */
@@ -32,8 +32,7 @@ var _store = require("../../store");
32
32
  * @param {Object} props
33
33
  * @param {import('react').RefObject<HTMLElement>} props.contentRef Ref to the block
34
34
  * editor iframe canvas.
35
- */
36
- function EditTemplateBlocksNotification({
35
+ */function EditTemplateBlocksNotification({
37
36
  contentRef
38
37
  }) {
39
38
  const {
@@ -73,7 +72,7 @@ function EditTemplateBlocksNotification({
73
72
  if (!canEditTemplate) {
74
73
  return null;
75
74
  }
76
- return (0, _react.createElement)(_components.__experimentalConfirmDialog, {
75
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__experimentalConfirmDialog, {
77
76
  isOpen: isDialogOpen,
78
77
  confirmButtonText: (0, _i18n.__)('Edit template'),
79
78
  onConfirm: () => {
@@ -83,7 +82,8 @@ function EditTemplateBlocksNotification({
83
82
  postType: 'wp_template'
84
83
  });
85
84
  },
86
- onCancel: () => setIsDialogOpen(false)
87
- }, (0, _i18n.__)('You’ve tried to select a block that is part of a template, which may be used on other posts and pages. Would you like to edit the template?'));
85
+ onCancel: () => setIsDialogOpen(false),
86
+ children: (0, _i18n.__)('You’ve tried to select a block that is part of a template, which may be used on other posts and pages. Would you like to edit the template?')
87
+ });
88
88
  }
89
89
  //# sourceMappingURL=edit-template-blocks-notification.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_data","require","_coreData","_element","_i18n","_components","_store","_jsxRuntime","EditTemplateBlocksNotification","contentRef","onNavigateToEntityRecord","templateId","useSelect","select","getEditorSettings","getCurrentTemplateId","editorStore","canEditTemplate","_select$canUser","coreStore","canUser","isDialogOpen","setIsDialogOpen","useState","useEffect","handleDblClick","event","target","classList","contains","canvas","current","addEventListener","removeEventListener","jsx","__experimentalConfirmDialog","isOpen","confirmButtonText","__","onConfirm","postId","postType","onCancel","children"],"sources":["@wordpress/editor/src/components/visual-editor/edit-template-blocks-notification.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useEffect, useState } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { __experimentalConfirmDialog as ConfirmDialog } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * Component that:\n *\n * - Displays a 'Edit your template to edit this block' notification when the\n * user is focusing on editing page content and clicks on a disabled template\n * block.\n * - Displays a 'Edit your template to edit this block' dialog when the user\n * is focusing on editing page conetnt and double clicks on a disabled\n * template block.\n *\n * @param {Object} props\n * @param {import('react').RefObject<HTMLElement>} props.contentRef Ref to the block\n * editor iframe canvas.\n */\nexport default function EditTemplateBlocksNotification( { contentRef } ) {\n\tconst { onNavigateToEntityRecord, templateId } = useSelect( ( select ) => {\n\t\tconst { getEditorSettings, getCurrentTemplateId } =\n\t\t\tselect( editorStore );\n\n\t\treturn {\n\t\t\tonNavigateToEntityRecord:\n\t\t\t\tgetEditorSettings().onNavigateToEntityRecord,\n\t\t\ttemplateId: getCurrentTemplateId(),\n\t\t};\n\t}, [] );\n\n\tconst canEditTemplate = useSelect(\n\t\t( select ) =>\n\t\t\tselect( coreStore ).canUser( 'create', 'templates' ) ?? false\n\t);\n\n\tconst [ isDialogOpen, setIsDialogOpen ] = useState( false );\n\n\tuseEffect( () => {\n\t\tconst handleDblClick = ( event ) => {\n\t\t\tif ( ! canEditTemplate ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( ! event.target.classList.contains( 'is-root-container' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tsetIsDialogOpen( true );\n\t\t};\n\n\t\tconst canvas = contentRef.current;\n\t\tcanvas?.addEventListener( 'dblclick', handleDblClick );\n\t\treturn () => {\n\t\t\tcanvas?.removeEventListener( 'dblclick', handleDblClick );\n\t\t};\n\t}, [ contentRef, canEditTemplate ] );\n\n\tif ( ! canEditTemplate ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<ConfirmDialog\n\t\t\tisOpen={ isDialogOpen }\n\t\t\tconfirmButtonText={ __( 'Edit template' ) }\n\t\t\tonConfirm={ () => {\n\t\t\t\tsetIsDialogOpen( false );\n\t\t\t\tonNavigateToEntityRecord( {\n\t\t\t\t\tpostId: templateId,\n\t\t\t\t\tpostType: 'wp_template',\n\t\t\t\t} );\n\t\t\t} }\n\t\t\tonCancel={ () => setIsDialogOpen( false ) }\n\t\t>\n\t\t\t{ __(\n\t\t\t\t'You’ve tried to select a block that is part of a template, which may be used on other posts and pages. Would you like to edit the template?'\n\t\t\t) }\n\t\t</ConfirmDialog>\n\t);\n}\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AAKA,IAAAK,MAAA,GAAAL,OAAA;AAAmD,IAAAM,WAAA,GAAAN,OAAA;AAZnD;AACA;AACA;;AAOA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GACe,SAASO,8BAA8BA,CAAE;EAAEC;AAAW,CAAC,EAAG;EACxE,MAAM;IAAEC,wBAAwB;IAAEC;EAAW,CAAC,GAAG,IAAAC,eAAS,EAAIC,MAAM,IAAM;IACzE,MAAM;MAAEC,iBAAiB;MAAEC;IAAqB,CAAC,GAChDF,MAAM,CAAEG,YAAY,CAAC;IAEtB,OAAO;MACNN,wBAAwB,EACvBI,iBAAiB,CAAC,CAAC,CAACJ,wBAAwB;MAC7CC,UAAU,EAAEI,oBAAoB,CAAC;IAClC,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EAEP,MAAME,eAAe,GAAG,IAAAL,eAAS,EAC9BC,MAAM;IAAA,IAAAK,eAAA;IAAA,QAAAA,eAAA,GACPL,MAAM,CAAEM,eAAU,CAAC,CAACC,OAAO,CAAE,QAAQ,EAAE,WAAY,CAAC,cAAAF,eAAA,cAAAA,eAAA,GAAI,KAAK;EAAA,CAC/D,CAAC;EAED,MAAM,CAAEG,YAAY,EAAEC,eAAe,CAAE,GAAG,IAAAC,iBAAQ,EAAE,KAAM,CAAC;EAE3D,IAAAC,kBAAS,EAAE,MAAM;IAChB,MAAMC,cAAc,GAAKC,KAAK,IAAM;MACnC,IAAK,CAAET,eAAe,EAAG;QACxB;MACD;MAEA,IAAK,CAAES,KAAK,CAACC,MAAM,CAACC,SAAS,CAACC,QAAQ,CAAE,mBAAoB,CAAC,EAAG;QAC/D;MACD;MACAP,eAAe,CAAE,IAAK,CAAC;IACxB,CAAC;IAED,MAAMQ,MAAM,GAAGrB,UAAU,CAACsB,OAAO;IACjCD,MAAM,EAAEE,gBAAgB,CAAE,UAAU,EAAEP,cAAe,CAAC;IACtD,OAAO,MAAM;MACZK,MAAM,EAAEG,mBAAmB,CAAE,UAAU,EAAER,cAAe,CAAC;IAC1D,CAAC;EACF,CAAC,EAAE,CAAEhB,UAAU,EAAEQ,eAAe,CAAG,CAAC;EAEpC,IAAK,CAAEA,eAAe,EAAG;IACxB,OAAO,IAAI;EACZ;EAEA,oBACC,IAAAV,WAAA,CAAA2B,GAAA,EAAC7B,WAAA,CAAA8B,2BAAa;IACbC,MAAM,EAAGf,YAAc;IACvBgB,iBAAiB,EAAG,IAAAC,QAAE,EAAE,eAAgB,CAAG;IAC3CC,SAAS,EAAGA,CAAA,KAAM;MACjBjB,eAAe,CAAE,KAAM,CAAC;MACxBZ,wBAAwB,CAAE;QACzB8B,MAAM,EAAE7B,UAAU;QAClB8B,QAAQ,EAAE;MACX,CAAE,CAAC;IACJ,CAAG;IACHC,QAAQ,EAAGA,CAAA,KAAMpB,eAAe,CAAE,KAAM,CAAG;IAAAqB,QAAA,EAEzC,IAAAL,QAAE,EACH,6IACD;EAAC,CACa,CAAC;AAElB","ignoreList":[]}
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = void 0;
8
- var _react = require("react");
9
8
  var _clsx = _interopRequireDefault(require("clsx"));
10
9
  var _blockEditor = require("@wordpress/block-editor");
11
10
  var _element = require("@wordpress/element");
@@ -17,7 +16,10 @@ var _postTitle = _interopRequireDefault(require("../post-title"));
17
16
  var _store = require("../../store");
18
17
  var _lockUnlock = require("../../lock-unlock");
19
18
  var _editTemplateBlocksNotification = _interopRequireDefault(require("./edit-template-blocks-notification"));
19
+ var _resizableEditor = _interopRequireDefault(require("../resizable-editor"));
20
20
  var _useSelectNearestEditableBlock = _interopRequireDefault(require("../../hooks/use-select-nearest-editable-block"));
21
+ var _constants = require("../../store/constants");
22
+ var _jsxRuntime = require("react/jsx-runtime");
21
23
  /**
22
24
  * External dependencies
23
25
  */
@@ -42,7 +44,7 @@ const {
42
44
  * These post types have a special editor where they don't allow you to fill the title
43
45
  * and they don't apply the layout styles.
44
46
  */
45
- const DESIGN_POST_TYPES = ['wp_block', 'wp_template', 'wp_navigation', 'wp_template_part'];
47
+ const DESIGN_POST_TYPES = [_constants.PATTERN_POST_TYPE, _constants.TEMPLATE_POST_TYPE, _constants.NAVIGATION_POST_TYPE, _constants.TEMPLATE_PART_POST_TYPE];
46
48
 
47
49
  /**
48
50
  * Given an array of nested blocks, find the first Post Content
@@ -74,17 +76,17 @@ function checkForPostContentAtRootLevel(blocks) {
74
76
  }
75
77
  return false;
76
78
  }
77
- function EditorCanvas({
79
+ function VisualEditor({
78
80
  // Ideally as we unify post and site editors, we won't need these props.
79
81
  autoFocus,
80
- className,
81
- renderAppender,
82
82
  styles,
83
83
  disableIframe = false,
84
84
  iframeProps,
85
85
  contentRef,
86
- children
86
+ className
87
87
  }) {
88
+ const [resizeObserver, sizes] = (0, _compose.useResizeObserver)();
89
+ const isMobileViewport = (0, _compose.useViewportMatch)('small', '<');
88
90
  const {
89
91
  renderingMode,
90
92
  postContentAttributes,
@@ -92,8 +94,10 @@ function EditorCanvas({
92
94
  wrapperBlockName,
93
95
  wrapperUniqueId,
94
96
  deviceType,
95
- showEditorPadding,
96
- isDesignPostType
97
+ isFocusedEntity,
98
+ isDesignPostType,
99
+ postType,
100
+ isPreview
97
101
  } = (0, _data.useSelect)(select => {
98
102
  const {
99
103
  getCurrentPostId,
@@ -111,28 +115,30 @@ function EditorCanvas({
111
115
  const postTypeSlug = getCurrentPostType();
112
116
  const _renderingMode = getRenderingMode();
113
117
  let _wrapperBlockName;
114
- if (postTypeSlug === 'wp_block') {
118
+ if (postTypeSlug === _constants.PATTERN_POST_TYPE) {
115
119
  _wrapperBlockName = 'core/block';
116
120
  } else if (_renderingMode === 'post-only') {
117
121
  _wrapperBlockName = 'core/post-content';
118
122
  }
119
123
  const editorSettings = getEditorSettings();
120
124
  const supportsTemplateMode = editorSettings.supportsTemplateMode;
121
- const postType = getPostType(postTypeSlug);
125
+ const postTypeObject = getPostType(postTypeSlug);
122
126
  const canEditTemplate = canUser('create', 'templates');
123
127
  const currentTemplateId = getCurrentTemplateId();
124
- const template = currentTemplateId ? getEditedEntityRecord('postType', 'wp_template', currentTemplateId) : undefined;
128
+ const template = currentTemplateId ? getEditedEntityRecord('postType', _constants.TEMPLATE_POST_TYPE, currentTemplateId) : undefined;
125
129
  return {
126
130
  renderingMode: _renderingMode,
127
131
  postContentAttributes: editorSettings.postContentAttributes,
128
132
  isDesignPostType: DESIGN_POST_TYPES.includes(postTypeSlug),
129
133
  // Post template fetch returns a 404 on classic themes, which
130
134
  // messes with e2e tests, so check it's a block theme first.
131
- editedPostTemplate: postType?.viewable && supportsTemplateMode && canEditTemplate ? template : undefined,
135
+ editedPostTemplate: postTypeObject?.viewable && supportsTemplateMode && canEditTemplate ? template : undefined,
132
136
  wrapperBlockName: _wrapperBlockName,
133
137
  wrapperUniqueId: getCurrentPostId(),
134
138
  deviceType: getDeviceType(),
135
- showEditorPadding: !!editorSettings.onNavigateToPreviousEntityRecord
139
+ isFocusedEntity: !!editorSettings.onNavigateToPreviousEntityRecord,
140
+ postType: postTypeSlug,
141
+ isPreview: editorSettings.__unstableIsPreviewMode
136
142
  };
137
143
  }, []);
138
144
  const {
@@ -258,67 +264,102 @@ function EditorCanvas({
258
264
  scale: 'default',
259
265
  frameSize: '20px'
260
266
  } : {};
261
- return (0, _react.createElement)(BlockCanvas, {
262
- shouldIframe: !disableIframe || ['Tablet', 'Mobile'].includes(deviceType),
263
- contentRef: contentRef,
264
- styles: styles,
265
- height: "100%",
266
- iframeProps: {
267
- className: (0, _clsx.default)('editor-canvas__iframe', {
268
- 'has-editor-padding': showEditorPadding
269
- }),
270
- ...iframeProps,
271
- ...zoomOutProps,
272
- style: {
273
- ...iframeProps?.style,
274
- ...deviceStyles
275
- }
276
- }
277
- }, themeSupportsLayout && !themeHasDisabledLayoutStyles && renderingMode === 'post-only' && !isDesignPostType && (0, _react.createElement)(_react.Fragment, null, (0, _react.createElement)(LayoutStyle, {
278
- selector: ".editor-editor-canvas__post-title-wrapper",
279
- layout: fallbackLayout
280
- }), (0, _react.createElement)(LayoutStyle, {
281
- selector: ".block-editor-block-list__layout.is-root-container",
282
- layout: postEditorLayout
283
- }), align && (0, _react.createElement)(LayoutStyle, {
284
- css: alignCSS
285
- }), postContentLayoutStyles && (0, _react.createElement)(LayoutStyle, {
286
- layout: postContentLayout,
287
- css: postContentLayoutStyles
288
- })), renderingMode === 'post-only' && !isDesignPostType && (0, _react.createElement)("div", {
289
- className: (0, _clsx.default)('editor-editor-canvas__post-title-wrapper',
290
- // The following class is only here for backward comapatibility
291
- // some themes might be using it to style the post title.
292
- 'edit-post-visual-editor__post-title-wrapper', {
293
- 'has-global-padding': hasRootPaddingAwareAlignments
267
+ const forceFullHeight = postType === _constants.NAVIGATION_POST_TYPE;
268
+ const enableResizing = [_constants.NAVIGATION_POST_TYPE, _constants.TEMPLATE_PART_POST_TYPE, _constants.PATTERN_POST_TYPE].includes(postType) &&
269
+ // Disable in previews / view mode.
270
+ !isPreview &&
271
+ // Disable resizing in mobile viewport.
272
+ !isMobileViewport &&
273
+ // Dsiable resizing in zoomed-out mode.
274
+ !isZoomOutMode;
275
+ const shouldIframe = !disableIframe || ['Tablet', 'Mobile'].includes(deviceType);
276
+ const iframeStyles = (0, _element.useMemo)(() => {
277
+ return [...(styles !== null && styles !== void 0 ? styles : []), {
278
+ css: `.is-root-container{display:flow-root;${
279
+ // Some themes will have `min-height: 100vh` for the root container,
280
+ // which isn't a requirement in auto resize mode.
281
+ enableResizing ? 'min-height:0!important;' : ''}}`
282
+ }];
283
+ }, [styles, enableResizing]);
284
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
285
+ className: (0, _clsx.default)('editor-visual-editor',
286
+ // this class is here for backward compatibility reasons.
287
+ 'edit-post-visual-editor', className, {
288
+ 'has-padding': isFocusedEntity || enableResizing,
289
+ 'is-resizable': enableResizing,
290
+ 'is-iframed': shouldIframe
294
291
  }),
295
- contentEditable: false,
296
- ref: observeTypingRef,
297
- style: {
298
- // This is using inline styles
299
- // so it's applied for both iframed and non iframed editors.
300
- marginTop: '4rem'
301
- }
302
- }, (0, _react.createElement)(_postTitle.default, {
303
- ref: titleRef
304
- })), (0, _react.createElement)(_blockEditor.RecursionProvider, {
305
- blockName: wrapperBlockName,
306
- uniqueId: wrapperUniqueId
307
- }, (0, _react.createElement)(_blockEditor.BlockList, {
308
- className: (0, _clsx.default)(className, 'is-' + deviceType.toLowerCase() + '-preview', renderingMode !== 'post-only' || isDesignPostType ? 'wp-site-blocks' : `${blockListLayoutClass} wp-block-post-content` // Ensure root level blocks receive default/flow blockGap styling rules.
309
- ),
310
- layout: blockListLayout,
311
- dropZoneElement:
312
- // When iframed, pass in the html element of the iframe to
313
- // ensure the drop zone extends to the edges of the iframe.
314
- disableIframe ? localRef.current : localRef.current?.parentNode,
315
- renderAppender: renderAppender,
316
- __unstableDisableDropZone:
317
- // In template preview mode, disable drop zones at the root of the template.
318
- renderingMode === 'template-locked' ? true : false
319
- }), renderingMode === 'template-locked' && (0, _react.createElement)(_editTemplateBlocksNotification.default, {
320
- contentRef: localRef
321
- })), children);
292
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_resizableEditor.default, {
293
+ enableResizing: enableResizing,
294
+ height: sizes.height && !forceFullHeight ? sizes.height : '100%',
295
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(BlockCanvas, {
296
+ shouldIframe: shouldIframe,
297
+ contentRef: contentRef,
298
+ styles: iframeStyles,
299
+ height: "100%",
300
+ iframeProps: {
301
+ ...iframeProps,
302
+ ...zoomOutProps,
303
+ style: {
304
+ ...iframeProps?.style,
305
+ ...deviceStyles
306
+ }
307
+ },
308
+ children: [themeSupportsLayout && !themeHasDisabledLayoutStyles && renderingMode === 'post-only' && !isDesignPostType && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
309
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(LayoutStyle, {
310
+ selector: ".editor-visual-editor__post-title-wrapper",
311
+ layout: fallbackLayout
312
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(LayoutStyle, {
313
+ selector: ".block-editor-block-list__layout.is-root-container",
314
+ layout: postEditorLayout
315
+ }), align && /*#__PURE__*/(0, _jsxRuntime.jsx)(LayoutStyle, {
316
+ css: alignCSS
317
+ }), postContentLayoutStyles && /*#__PURE__*/(0, _jsxRuntime.jsx)(LayoutStyle, {
318
+ layout: postContentLayout,
319
+ css: postContentLayoutStyles
320
+ })]
321
+ }), renderingMode === 'post-only' && !isDesignPostType && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
322
+ className: (0, _clsx.default)('editor-visual-editor__post-title-wrapper',
323
+ // The following class is only here for backward comapatibility
324
+ // some themes might be using it to style the post title.
325
+ 'edit-post-visual-editor__post-title-wrapper', {
326
+ 'has-global-padding': hasRootPaddingAwareAlignments
327
+ }),
328
+ contentEditable: false,
329
+ ref: observeTypingRef,
330
+ style: {
331
+ // This is using inline styles
332
+ // so it's applied for both iframed and non iframed editors.
333
+ marginTop: '4rem'
334
+ },
335
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_postTitle.default, {
336
+ ref: titleRef
337
+ })
338
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_blockEditor.RecursionProvider, {
339
+ blockName: wrapperBlockName,
340
+ uniqueId: wrapperUniqueId,
341
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_blockEditor.BlockList, {
342
+ className: (0, _clsx.default)('is-' + deviceType.toLowerCase() + '-preview', renderingMode !== 'post-only' || isDesignPostType ? 'wp-site-blocks' : `${blockListLayoutClass} wp-block-post-content` // Ensure root level blocks receive default/flow blockGap styling rules.
343
+ ),
344
+ layout: blockListLayout,
345
+ dropZoneElement:
346
+ // When iframed, pass in the html element of the iframe to
347
+ // ensure the drop zone extends to the edges of the iframe.
348
+ disableIframe ? localRef.current : localRef.current?.parentNode,
349
+ __unstableDisableDropZone:
350
+ // In template preview mode, disable drop zones at the root of the template.
351
+ renderingMode === 'template-locked' ? true : false
352
+ }), renderingMode === 'template-locked' && /*#__PURE__*/(0, _jsxRuntime.jsx)(_editTemplateBlocksNotification.default, {
353
+ contentRef: localRef
354
+ })]
355
+ }),
356
+ // Avoid resize listeners when not needed,
357
+ // these will trigger unnecessary re-renders
358
+ // when animating the iframe width.
359
+ enableResizing && resizeObserver]
360
+ })
361
+ })
362
+ });
322
363
  }
323
- var _default = exports.default = EditorCanvas;
364
+ var _default = exports.default = VisualEditor;
324
365
  //# sourceMappingURL=index.js.map