@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
@@ -5,15 +5,13 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = PageAttributesPanel;
8
- var _react = require("react");
9
- var _i18n = require("@wordpress/i18n");
10
- var _components = require("@wordpress/components");
11
8
  var _data = require("@wordpress/data");
12
9
  var _coreData = require("@wordpress/core-data");
13
10
  var _store = require("../../store");
14
11
  var _check = _interopRequireDefault(require("./check"));
15
- var _order = _interopRequireDefault(require("./order"));
16
- var _parent = _interopRequireDefault(require("./parent"));
12
+ var _order = require("./order");
13
+ var _parent = require("./parent");
14
+ var _jsxRuntime = require("react/jsx-runtime");
17
15
  /**
18
16
  * WordPress dependencies
19
17
  */
@@ -24,37 +22,28 @@ var _parent = _interopRequireDefault(require("./parent"));
24
22
 
25
23
  const PANEL_NAME = 'page-attributes';
26
24
  function AttributesPanel() {
27
- var _postType$labels$attr;
28
25
  const {
29
26
  isEnabled,
30
- isOpened,
31
27
  postType
32
28
  } = (0, _data.useSelect)(select => {
33
29
  const {
34
30
  getEditedPostAttribute,
35
- isEditorPanelEnabled,
36
- isEditorPanelOpened
31
+ isEditorPanelEnabled
37
32
  } = select(_store.store);
38
33
  const {
39
34
  getPostType
40
35
  } = select(_coreData.store);
41
36
  return {
42
37
  isEnabled: isEditorPanelEnabled(PANEL_NAME),
43
- isOpened: isEditorPanelOpened(PANEL_NAME),
44
38
  postType: getPostType(getEditedPostAttribute('type'))
45
39
  };
46
40
  }, []);
47
- const {
48
- toggleEditorPanelOpened
49
- } = (0, _data.useDispatch)(_store.store);
50
41
  if (!isEnabled || !postType) {
51
42
  return null;
52
43
  }
53
- return (0, _react.createElement)(_components.PanelBody, {
54
- title: (_postType$labels$attr = postType?.labels?.attributes) !== null && _postType$labels$attr !== void 0 ? _postType$labels$attr : (0, _i18n.__)('Page attributes'),
55
- opened: isOpened,
56
- onToggle: () => toggleEditorPanelOpened(PANEL_NAME)
57
- }, (0, _react.createElement)(_parent.default, null), (0, _react.createElement)(_components.PanelRow, null, (0, _react.createElement)(_order.default, null)));
44
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
45
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_parent.ParentRow, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_order.OrderRow, {})]
46
+ });
58
47
  }
59
48
 
60
49
  /**
@@ -63,6 +52,8 @@ function AttributesPanel() {
63
52
  * @return {Component} The component to be rendered.
64
53
  */
65
54
  function PageAttributesPanel() {
66
- return (0, _react.createElement)(_check.default, null, (0, _react.createElement)(AttributesPanel, null));
55
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_check.default, {
56
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(AttributesPanel, {})
57
+ });
67
58
  }
68
59
  //# sourceMappingURL=panel.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_i18n","require","_components","_data","_coreData","_store","_check","_interopRequireDefault","_order","_parent","PANEL_NAME","AttributesPanel","_postType$labels$attr","isEnabled","isOpened","postType","useSelect","select","getEditedPostAttribute","isEditorPanelEnabled","isEditorPanelOpened","editorStore","getPostType","coreStore","toggleEditorPanelOpened","useDispatch","_react","createElement","PanelBody","title","labels","attributes","__","opened","onToggle","default","PanelRow","PageAttributesPanel"],"sources":["@wordpress/editor/src/components/page-attributes/panel.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { PanelBody, PanelRow } from '@wordpress/components';\n\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport PageAttributesCheck from './check';\nimport PageAttributesOrder from './order';\nimport PageAttributesParent from './parent';\n\nconst PANEL_NAME = 'page-attributes';\n\nfunction AttributesPanel() {\n\tconst { isEnabled, isOpened, postType } = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetEditedPostAttribute,\n\t\t\tisEditorPanelEnabled,\n\t\t\tisEditorPanelOpened,\n\t\t} = select( editorStore );\n\t\tconst { getPostType } = select( coreStore );\n\t\treturn {\n\t\t\tisEnabled: isEditorPanelEnabled( PANEL_NAME ),\n\t\t\tisOpened: isEditorPanelOpened( PANEL_NAME ),\n\t\t\tpostType: getPostType( getEditedPostAttribute( 'type' ) ),\n\t\t};\n\t}, [] );\n\n\tconst { toggleEditorPanelOpened } = useDispatch( editorStore );\n\n\tif ( ! isEnabled || ! postType ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PanelBody\n\t\t\ttitle={ postType?.labels?.attributes ?? __( 'Page attributes' ) }\n\t\t\topened={ isOpened }\n\t\t\tonToggle={ () => toggleEditorPanelOpened( PANEL_NAME ) }\n\t\t>\n\t\t\t<PageAttributesParent />\n\t\t\t<PanelRow>\n\t\t\t\t<PageAttributesOrder />\n\t\t\t</PanelRow>\n\t\t</PanelBody>\n\t);\n}\n\n/**\n * Renders the Page Attributes Panel component.\n *\n * @return {Component} The component to be rendered.\n */\nexport default function PageAttributesPanel() {\n\treturn (\n\t\t<PageAttributesCheck>\n\t\t\t<AttributesPanel />\n\t\t</PageAttributesCheck>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAEA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AAKA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAC,sBAAA,CAAAN,OAAA;AACA,IAAAO,MAAA,GAAAD,sBAAA,CAAAN,OAAA;AACA,IAAAQ,OAAA,GAAAF,sBAAA,CAAAN,OAAA;AAfA;AACA;AACA;;AAOA;AACA;AAC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EA;AACA;AACA;AACA;AACA;AACe,SAASE,mBAAmBA,CAAA,EAAG;EAC7C,OACC,IAAAX,MAAA,CAAAC,aAAA,EAACrB,MAAA,CAAA6B,OAAmB,QACnB,IAAAT,MAAA,CAAAC,aAAA,EAAChB,eAAe,MAAE,CACE,CAAC;AAExB","ignoreList":[]}
1
+ {"version":3,"names":["_data","require","_coreData","_store","_check","_interopRequireDefault","_order","_parent","_jsxRuntime","PANEL_NAME","AttributesPanel","isEnabled","postType","useSelect","select","getEditedPostAttribute","isEditorPanelEnabled","editorStore","getPostType","coreStore","jsxs","Fragment","children","jsx","ParentRow","OrderRow","PageAttributesPanel","default"],"sources":["@wordpress/editor/src/components/page-attributes/panel.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport PageAttributesCheck from './check';\nimport { OrderRow } from './order';\nimport { ParentRow } from './parent';\n\nconst PANEL_NAME = 'page-attributes';\n\nfunction AttributesPanel() {\n\tconst { isEnabled, postType } = useSelect( ( select ) => {\n\t\tconst { getEditedPostAttribute, isEditorPanelEnabled } =\n\t\t\tselect( editorStore );\n\t\tconst { getPostType } = select( coreStore );\n\t\treturn {\n\t\t\tisEnabled: isEditorPanelEnabled( PANEL_NAME ),\n\t\t\tpostType: getPostType( getEditedPostAttribute( 'type' ) ),\n\t\t};\n\t}, [] );\n\n\tif ( ! isEnabled || ! postType ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<ParentRow />\n\t\t\t<OrderRow />\n\t\t</>\n\t);\n}\n\n/**\n * Renders the Page Attributes Panel component.\n *\n * @return {Component} The component to be rendered.\n */\nexport default function PageAttributesPanel() {\n\treturn (\n\t\t<PageAttributesCheck>\n\t\t\t<AttributesPanel />\n\t\t</PageAttributesCheck>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC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C,CACC,CAAC;AAExB","ignoreList":[]}
@@ -5,8 +5,8 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.PageAttributesParent = PageAttributesParent;
8
+ exports.ParentRow = ParentRow;
8
9
  exports.getItemPriority = exports.default = void 0;
9
- var _react = require("react");
10
10
  var _removeAccents = _interopRequireDefault(require("remove-accents"));
11
11
  var _i18n = require("@wordpress/i18n");
12
12
  var _components = require("@wordpress/components");
@@ -15,8 +15,11 @@ var _element = require("@wordpress/element");
15
15
  var _data = require("@wordpress/data");
16
16
  var _htmlEntities = require("@wordpress/html-entities");
17
17
  var _coreData = require("@wordpress/core-data");
18
+ var _blockEditor = require("@wordpress/block-editor");
19
+ var _postPanelRow = _interopRequireDefault(require("../post-panel-row"));
18
20
  var _terms = require("../../utils/terms");
19
21
  var _store = require("../../store");
22
+ var _jsxRuntime = require("react/jsx-runtime");
20
23
  /**
21
24
  * External dependencies
22
25
  */
@@ -159,15 +162,95 @@ function PageAttributesParent() {
159
162
  parent: selectedPostId
160
163
  });
161
164
  };
162
- return (0, _react.createElement)(_components.ComboboxControl, {
165
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.ComboboxControl, {
163
166
  __nextHasNoMarginBottom: true,
164
167
  __next40pxDefaultSize: true,
165
168
  className: "editor-page-attributes__parent",
166
169
  label: (0, _i18n.__)('Parent'),
170
+ help: (0, _i18n.__)('Choose a parent page.'),
167
171
  value: parentPostId,
168
172
  options: parentOptions,
169
173
  onFilterValueChange: (0, _compose.debounce)(handleKeydown, 300),
170
- onChange: handleChange
174
+ onChange: handleChange,
175
+ hideLabelFromVision: true
176
+ });
177
+ }
178
+ function PostParentToggle({
179
+ isOpen,
180
+ onClick
181
+ }) {
182
+ const parentPost = (0, _data.useSelect)(select => {
183
+ const {
184
+ getEditedPostAttribute
185
+ } = select(_store.store);
186
+ const parentPostId = getEditedPostAttribute('parent');
187
+ if (!parentPostId) {
188
+ return null;
189
+ }
190
+ const {
191
+ getEntityRecord
192
+ } = select(_coreData.store);
193
+ const postTypeSlug = getEditedPostAttribute('type');
194
+ return getEntityRecord('postType', postTypeSlug, parentPostId);
195
+ }, []);
196
+ const parentTitle = (0, _element.useMemo)(() => !parentPost ? (0, _i18n.__)('None') : getTitle(parentPost), [parentPost]);
197
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
198
+ size: "compact",
199
+ className: "editor-post-parent__panel-toggle",
200
+ variant: "tertiary",
201
+ "aria-expanded": isOpen
202
+ // translators: %s: Current post parent.
203
+ ,
204
+ "aria-label": (0, _i18n.sprintf)((0, _i18n.__)('Change parent: %s'), parentTitle),
205
+ onClick: onClick,
206
+ children: parentTitle
207
+ });
208
+ }
209
+ function ParentRow() {
210
+ // Use internal state instead of a ref to make sure that the component
211
+ // re-renders when the popover's anchor updates.
212
+ const [popoverAnchor, setPopoverAnchor] = (0, _element.useState)(null);
213
+ // Memoize popoverProps to avoid returning a new object every time.
214
+ const popoverProps = (0, _element.useMemo)(() => ({
215
+ // Anchor the popover to the middle of the entire row so that it doesn't
216
+ // move around when the label changes.
217
+ anchor: popoverAnchor,
218
+ placement: 'left-start',
219
+ offset: 36,
220
+ shift: true
221
+ }), [popoverAnchor]);
222
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_postPanelRow.default, {
223
+ label: (0, _i18n.__)('Parent'),
224
+ ref: setPopoverAnchor,
225
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Dropdown, {
226
+ popoverProps: popoverProps,
227
+ className: "editor-post-parent__panel-dropdown",
228
+ contentClassName: "editor-post-parent__panel-dialog",
229
+ focusOnMount: true,
230
+ renderToggle: ({
231
+ isOpen,
232
+ onToggle
233
+ }) => /*#__PURE__*/(0, _jsxRuntime.jsx)(PostParentToggle, {
234
+ isOpen: isOpen,
235
+ onClick: onToggle
236
+ }),
237
+ renderContent: ({
238
+ onClose
239
+ }) => /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
240
+ className: "editor-post-parent",
241
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_blockEditor.__experimentalInspectorPopoverHeader, {
242
+ title: (0, _i18n.__)('Parent'),
243
+ onClose: onClose
244
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
245
+ children: [(0, _i18n.__)("Child pages inherit characteristics from their parent, such as URL structure. For instance, if 'Web Design' is a child of 'Services,' its URL would be mysite.com/services/web-design."), /*#__PURE__*/(0, _jsxRuntime.jsxs)("p", {
246
+ children: [(0, _i18n.__)('They also show up as sub-items in the default navigation menu. '), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.ExternalLink, {
247
+ href: (0, _i18n.__)('https://wordpress.org/documentation/article/page-post-settings-sidebar/#page-attributes'),
248
+ children: (0, _i18n.__)('Learn more')
249
+ })]
250
+ })]
251
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(PageAttributesParent, {})]
252
+ })
253
+ })
171
254
  });
172
255
  }
173
256
  var _default = exports.default = PageAttributesParent;
@@ -1 +1 @@
1
- {"version":3,"names":["_removeAccents","_interopRequireDefault","require","_i18n","_components","_compose","_element","_data","_htmlEntities","_coreData","_terms","_store","getTitle","post","title","rendered","decodeEntities","id","__","getItemPriority","name","searchValue","normalizedName","removeAccents","toLowerCase","normalizedSearch","startsWith","length","Infinity","exports","PageAttributesParent","editPost","useDispatch","editorStore","fieldValue","setFieldValue","useState","isHierarchical","parentPostId","parentPostTitle","pageItems","useSelect","select","_pType$hierarchical","getPostType","getEntityRecords","getEntityRecord","coreStore","getCurrentPostId","getEditedPostAttribute","postTypeSlug","pageId","pType","postId","postIsHierarchical","hierarchical","query","per_page","exclude","parent_exclude","orderby","order","_fields","search","parentPost","parentOptions","useMemo","getOptionsFromTree","tree","level","mappedNodes","map","treeNode","value","label","repeat","rawName","children","sortedNodes","sort","a","b","priorityA","priorityB","flat","item","parent","buildTermsTree","opts","optsHasParent","find","unshift","handleKeydown","inputValue","handleChange","selectedPostId","_react","createElement","ComboboxControl","__nextHasNoMarginBottom","__next40pxDefaultSize","className","options","onFilterValueChange","debounce","onChange","_default","default"],"sources":["@wordpress/editor/src/components/page-attributes/parent.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport removeAccents from 'remove-accents';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { ComboboxControl } from '@wordpress/components';\nimport { debounce } from '@wordpress/compose';\nimport { useState, useMemo } from '@wordpress/element';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { buildTermsTree } from '../../utils/terms';\nimport { store as editorStore } from '../../store';\n\nfunction getTitle( post ) {\n\treturn post?.title?.rendered\n\t\t? decodeEntities( post.title.rendered )\n\t\t: `#${ post.id } (${ __( 'no title' ) })`;\n}\n\nexport const getItemPriority = ( name, searchValue ) => {\n\tconst normalizedName = removeAccents( name || '' ).toLowerCase();\n\tconst normalizedSearch = removeAccents( searchValue || '' ).toLowerCase();\n\tif ( normalizedName === normalizedSearch ) {\n\t\treturn 0;\n\t}\n\n\tif ( normalizedName.startsWith( normalizedSearch ) ) {\n\t\treturn normalizedName.length;\n\t}\n\n\treturn Infinity;\n};\n\n/**\n * Renders the Page Attributes Parent component. A dropdown menu in an editor interface\n * for selecting the parent page of a given page.\n *\n * @return {Component|null} The component to be rendered. Return null if post type is not hierarchical.\n */\nexport function PageAttributesParent() {\n\tconst { editPost } = useDispatch( editorStore );\n\tconst [ fieldValue, setFieldValue ] = useState( false );\n\tconst { isHierarchical, parentPostId, parentPostTitle, pageItems } =\n\t\tuseSelect(\n\t\t\t( select ) => {\n\t\t\t\tconst { getPostType, getEntityRecords, getEntityRecord } =\n\t\t\t\t\tselect( coreStore );\n\t\t\t\tconst { getCurrentPostId, getEditedPostAttribute } =\n\t\t\t\t\tselect( editorStore );\n\t\t\t\tconst postTypeSlug = getEditedPostAttribute( 'type' );\n\t\t\t\tconst pageId = getEditedPostAttribute( 'parent' );\n\t\t\t\tconst pType = getPostType( postTypeSlug );\n\t\t\t\tconst postId = getCurrentPostId();\n\t\t\t\tconst postIsHierarchical = pType?.hierarchical ?? false;\n\t\t\t\tconst query = {\n\t\t\t\t\tper_page: 100,\n\t\t\t\t\texclude: postId,\n\t\t\t\t\tparent_exclude: postId,\n\t\t\t\t\torderby: 'menu_order',\n\t\t\t\t\torder: 'asc',\n\t\t\t\t\t_fields: 'id,title,parent',\n\t\t\t\t};\n\n\t\t\t\t// Perform a search when the field is changed.\n\t\t\t\tif ( !! fieldValue ) {\n\t\t\t\t\tquery.search = fieldValue;\n\t\t\t\t}\n\n\t\t\t\tconst parentPost = pageId\n\t\t\t\t\t? getEntityRecord( 'postType', postTypeSlug, pageId )\n\t\t\t\t\t: null;\n\n\t\t\t\treturn {\n\t\t\t\t\tisHierarchical: postIsHierarchical,\n\t\t\t\t\tparentPostId: pageId,\n\t\t\t\t\tparentPostTitle: parentPost ? getTitle( parentPost ) : '',\n\t\t\t\t\tpageItems: postIsHierarchical\n\t\t\t\t\t\t? getEntityRecords( 'postType', postTypeSlug, query )\n\t\t\t\t\t\t: null,\n\t\t\t\t};\n\t\t\t},\n\t\t\t[ fieldValue ]\n\t\t);\n\n\tconst parentOptions = useMemo( () => {\n\t\tconst getOptionsFromTree = ( tree, level = 0 ) => {\n\t\t\tconst mappedNodes = tree.map( ( treeNode ) => [\n\t\t\t\t{\n\t\t\t\t\tvalue: treeNode.id,\n\t\t\t\t\tlabel:\n\t\t\t\t\t\t'— '.repeat( level ) + decodeEntities( treeNode.name ),\n\t\t\t\t\trawName: treeNode.name,\n\t\t\t\t},\n\t\t\t\t...getOptionsFromTree( treeNode.children || [], level + 1 ),\n\t\t\t] );\n\n\t\t\tconst sortedNodes = mappedNodes.sort( ( [ a ], [ b ] ) => {\n\t\t\t\tconst priorityA = getItemPriority( a.rawName, fieldValue );\n\t\t\t\tconst priorityB = getItemPriority( b.rawName, fieldValue );\n\t\t\t\treturn priorityA >= priorityB ? 1 : -1;\n\t\t\t} );\n\n\t\t\treturn sortedNodes.flat();\n\t\t};\n\n\t\tif ( ! pageItems ) {\n\t\t\treturn [];\n\t\t}\n\n\t\tlet tree = pageItems.map( ( item ) => ( {\n\t\t\tid: item.id,\n\t\t\tparent: item.parent,\n\t\t\tname: getTitle( item ),\n\t\t} ) );\n\n\t\t// Only build a hierarchical tree when not searching.\n\t\tif ( ! fieldValue ) {\n\t\t\ttree = buildTermsTree( tree );\n\t\t}\n\n\t\tconst opts = getOptionsFromTree( tree );\n\n\t\t// Ensure the current parent is in the options list.\n\t\tconst optsHasParent = opts.find(\n\t\t\t( item ) => item.value === parentPostId\n\t\t);\n\t\tif ( parentPostTitle && ! optsHasParent ) {\n\t\t\topts.unshift( {\n\t\t\t\tvalue: parentPostId,\n\t\t\t\tlabel: parentPostTitle,\n\t\t\t} );\n\t\t}\n\t\treturn opts;\n\t}, [ pageItems, fieldValue, parentPostTitle, parentPostId ] );\n\n\tif ( ! isHierarchical ) {\n\t\treturn null;\n\t}\n\t/**\n\t * Handle user input.\n\t *\n\t * @param {string} inputValue The current value of the input field.\n\t */\n\tconst handleKeydown = ( inputValue ) => {\n\t\tsetFieldValue( inputValue );\n\t};\n\n\t/**\n\t * Handle author selection.\n\t *\n\t * @param {Object} selectedPostId The selected Author.\n\t */\n\tconst handleChange = ( selectedPostId ) => {\n\t\teditPost( { parent: selectedPostId } );\n\t};\n\n\treturn (\n\t\t<ComboboxControl\n\t\t\t__nextHasNoMarginBottom\n\t\t\t__next40pxDefaultSize\n\t\t\tclassName=\"editor-page-attributes__parent\"\n\t\t\tlabel={ __( 'Parent' ) }\n\t\t\tvalue={ parentPostId }\n\t\t\toptions={ parentOptions }\n\t\t\tonFilterValueChange={ debounce( handleKeydown, 300 ) }\n\t\t\tonChange={ handleChange }\n\t\t/>\n\t);\n}\n\nexport default PageAttributesParent;\n"],"mappings":";;;;;;;;;AAGA,IAAAA,cAAA,GAAAC,s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AEJ;AAAC,IAAAY,QAAA,GAAA7E,OAAA,CAAA8E,OAAA,GAEc7E,oBAAoB","ignoreList":[]}
1
+ {"version":3,"names":["_removeAccents","_interopRequireDefault","require","_i18n","_components","_compose","_element","_data","_htmlEntities","_coreData","_blockEditor","_postPanelRow","_terms","_store","_jsxRuntime","getTitle","post","title","rendered","decodeEntities","id","__","getItemPriority","name","searchValue","normalizedName","removeAccents","toLowerCase","normalizedSearch","startsWith","length","Infinity","exports","PageAttributesParent","editPost","useDispatch","editorStore","fieldValue","setFieldValue","useState","isHierarchical","parentPostId","parentPostTitle","pageItems","useSelect","select","_pType$hierarchical","getPostType","getEntityRecords","getEntityRecord","coreStore","getCurrentPostId","getEditedPostAttribute","postTypeSlug","pageId","pType","postId","postIsHierarchical","hierarchical","query","per_page","exclude","parent_exclude","orderby","order","_fields","search","parentPost","parentOptions","useMemo","getOptionsFromTree","tree","level","mappedNodes","map","treeNode","value","label","repeat","rawName","children","sortedNodes","sort","a","b","priorityA","priorityB","flat","item","parent","buildTermsTree","opts","optsHasParent","find","unshift","handleKeydown","inputValue","handleChange","selectedPostId","jsx","ComboboxControl","__nextHasNoMarginBottom","__next40pxDefaultSize","className","help","options","onFilterValueChange","debounce","onChange","hideLabelFromVision","PostParentToggle","isOpen","onClick","parentTitle","Button","size","variant","sprintf","ParentRow","popoverAnchor","setPopoverAnchor","popoverProps","anchor","placement","offset","shift","default","ref","Dropdown","contentClassName","focusOnMount","renderToggle","onToggle","renderContent","onClose","jsxs","__experimentalInspectorPopoverHeader","ExternalLink","href","_default"],"sources":["@wordpress/editor/src/components/page-attributes/parent.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport removeAccents from 'remove-accents';\n\n/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\tButton,\n\tDropdown,\n\tComboboxControl,\n\tExternalLink,\n} from '@wordpress/components';\nimport { debounce } from '@wordpress/compose';\nimport { useState, useMemo } from '@wordpress/element';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __experimentalInspectorPopoverHeader as InspectorPopoverHeader } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport PostPanelRow from '../post-panel-row';\nimport { buildTermsTree } from '../../utils/terms';\nimport { store as editorStore } from '../../store';\n\nfunction getTitle( post ) {\n\treturn post?.title?.rendered\n\t\t? decodeEntities( post.title.rendered )\n\t\t: `#${ post.id } (${ __( 'no title' ) })`;\n}\n\nexport const getItemPriority = ( name, searchValue ) => {\n\tconst normalizedName = removeAccents( name || '' ).toLowerCase();\n\tconst normalizedSearch = removeAccents( searchValue || '' ).toLowerCase();\n\tif ( normalizedName === normalizedSearch ) {\n\t\treturn 0;\n\t}\n\n\tif ( normalizedName.startsWith( normalizedSearch ) ) {\n\t\treturn normalizedName.length;\n\t}\n\n\treturn Infinity;\n};\n\n/**\n * Renders the Page Attributes Parent component. A dropdown menu in an editor interface\n * for selecting the parent page of a given page.\n *\n * @return {Component|null} The component to be rendered. Return null if post type is not hierarchical.\n */\nexport function PageAttributesParent() {\n\tconst { editPost } = useDispatch( editorStore );\n\tconst [ fieldValue, setFieldValue ] = useState( false );\n\tconst { isHierarchical, parentPostId, parentPostTitle, pageItems } =\n\t\tuseSelect(\n\t\t\t( select ) => {\n\t\t\t\tconst { getPostType, getEntityRecords, getEntityRecord } =\n\t\t\t\t\tselect( coreStore );\n\t\t\t\tconst { getCurrentPostId, getEditedPostAttribute } =\n\t\t\t\t\tselect( editorStore );\n\t\t\t\tconst postTypeSlug = getEditedPostAttribute( 'type' );\n\t\t\t\tconst pageId = getEditedPostAttribute( 'parent' );\n\t\t\t\tconst pType = getPostType( postTypeSlug );\n\t\t\t\tconst postId = getCurrentPostId();\n\t\t\t\tconst postIsHierarchical = pType?.hierarchical ?? false;\n\t\t\t\tconst query = {\n\t\t\t\t\tper_page: 100,\n\t\t\t\t\texclude: postId,\n\t\t\t\t\tparent_exclude: postId,\n\t\t\t\t\torderby: 'menu_order',\n\t\t\t\t\torder: 'asc',\n\t\t\t\t\t_fields: 'id,title,parent',\n\t\t\t\t};\n\n\t\t\t\t// Perform a search when the field is changed.\n\t\t\t\tif ( !! fieldValue ) {\n\t\t\t\t\tquery.search = fieldValue;\n\t\t\t\t}\n\n\t\t\t\tconst parentPost = pageId\n\t\t\t\t\t? getEntityRecord( 'postType', postTypeSlug, pageId )\n\t\t\t\t\t: null;\n\n\t\t\t\treturn {\n\t\t\t\t\tisHierarchical: postIsHierarchical,\n\t\t\t\t\tparentPostId: pageId,\n\t\t\t\t\tparentPostTitle: parentPost ? getTitle( parentPost ) : '',\n\t\t\t\t\tpageItems: postIsHierarchical\n\t\t\t\t\t\t? getEntityRecords( 'postType', postTypeSlug, query )\n\t\t\t\t\t\t: null,\n\t\t\t\t};\n\t\t\t},\n\t\t\t[ fieldValue ]\n\t\t);\n\n\tconst parentOptions = useMemo( () => {\n\t\tconst getOptionsFromTree = ( tree, level = 0 ) => {\n\t\t\tconst mappedNodes = tree.map( ( treeNode ) => [\n\t\t\t\t{\n\t\t\t\t\tvalue: treeNode.id,\n\t\t\t\t\tlabel:\n\t\t\t\t\t\t'— '.repeat( level ) + decodeEntities( treeNode.name ),\n\t\t\t\t\trawName: treeNode.name,\n\t\t\t\t},\n\t\t\t\t...getOptionsFromTree( treeNode.children || [], level + 1 ),\n\t\t\t] );\n\n\t\t\tconst sortedNodes = mappedNodes.sort( ( [ a ], [ b ] ) => {\n\t\t\t\tconst priorityA = getItemPriority( a.rawName, fieldValue );\n\t\t\t\tconst priorityB = getItemPriority( b.rawName, fieldValue );\n\t\t\t\treturn priorityA >= priorityB ? 1 : -1;\n\t\t\t} );\n\n\t\t\treturn sortedNodes.flat();\n\t\t};\n\n\t\tif ( ! pageItems ) {\n\t\t\treturn [];\n\t\t}\n\n\t\tlet tree = pageItems.map( ( item ) => ( {\n\t\t\tid: item.id,\n\t\t\tparent: item.parent,\n\t\t\tname: getTitle( item ),\n\t\t} ) );\n\n\t\t// Only build a hierarchical tree when not searching.\n\t\tif ( ! fieldValue ) {\n\t\t\ttree = buildTermsTree( tree );\n\t\t}\n\n\t\tconst opts = getOptionsFromTree( tree );\n\n\t\t// Ensure the current parent is in the options list.\n\t\tconst optsHasParent = opts.find(\n\t\t\t( item ) => item.value === parentPostId\n\t\t);\n\t\tif ( parentPostTitle && ! optsHasParent ) {\n\t\t\topts.unshift( {\n\t\t\t\tvalue: parentPostId,\n\t\t\t\tlabel: parentPostTitle,\n\t\t\t} );\n\t\t}\n\t\treturn opts;\n\t}, [ pageItems, fieldValue, parentPostTitle, parentPostId ] );\n\n\tif ( ! isHierarchical ) {\n\t\treturn null;\n\t}\n\t/**\n\t * Handle user input.\n\t *\n\t * @param {string} inputValue The current value of the input field.\n\t */\n\tconst handleKeydown = ( inputValue ) => {\n\t\tsetFieldValue( inputValue );\n\t};\n\n\t/**\n\t * Handle author selection.\n\t *\n\t * @param {Object} selectedPostId The selected Author.\n\t */\n\tconst handleChange = ( selectedPostId ) => {\n\t\teditPost( { parent: selectedPostId } );\n\t};\n\n\treturn (\n\t\t<ComboboxControl\n\t\t\t__nextHasNoMarginBottom\n\t\t\t__next40pxDefaultSize\n\t\t\tclassName=\"editor-page-attributes__parent\"\n\t\t\tlabel={ __( 'Parent' ) }\n\t\t\thelp={ __( 'Choose a parent page.' ) }\n\t\t\tvalue={ parentPostId }\n\t\t\toptions={ parentOptions }\n\t\t\tonFilterValueChange={ debounce( handleKeydown, 300 ) }\n\t\t\tonChange={ handleChange }\n\t\t\thideLabelFromVision\n\t\t/>\n\t);\n}\n\nfunction PostParentToggle( { isOpen, onClick } ) {\n\tconst parentPost = useSelect( ( select ) => {\n\t\tconst { getEditedPostAttribute } = select( editorStore );\n\t\tconst parentPostId = getEditedPostAttribute( 'parent' );\n\t\tif ( ! parentPostId ) {\n\t\t\treturn null;\n\t\t}\n\t\tconst { getEntityRecord } = select( coreStore );\n\t\tconst postTypeSlug = getEditedPostAttribute( 'type' );\n\t\treturn getEntityRecord( 'postType', postTypeSlug, parentPostId );\n\t}, [] );\n\tconst parentTitle = useMemo(\n\t\t() => ( ! parentPost ? __( 'None' ) : getTitle( parentPost ) ),\n\t\t[ parentPost ]\n\t);\n\treturn (\n\t\t<Button\n\t\t\tsize=\"compact\"\n\t\t\tclassName=\"editor-post-parent__panel-toggle\"\n\t\t\tvariant=\"tertiary\"\n\t\t\taria-expanded={ isOpen }\n\t\t\t// translators: %s: Current post parent.\n\t\t\taria-label={ sprintf( __( 'Change parent: %s' ), parentTitle ) }\n\t\t\tonClick={ onClick }\n\t\t>\n\t\t\t{ parentTitle }\n\t\t</Button>\n\t);\n}\n\nexport function ParentRow() {\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the popover's anchor updates.\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\t// Memoize popoverProps to avoid returning a new object every time.\n\tconst popoverProps = useMemo(\n\t\t() => ( {\n\t\t\t// Anchor the popover to the middle of the entire row so that it doesn't\n\t\t\t// move around when the label changes.\n\t\t\tanchor: popoverAnchor,\n\t\t\tplacement: 'left-start',\n\t\t\toffset: 36,\n\t\t\tshift: true,\n\t\t} ),\n\t\t[ popoverAnchor ]\n\t);\n\treturn (\n\t\t<PostPanelRow label={ __( 'Parent' ) } ref={ setPopoverAnchor }>\n\t\t\t<Dropdown\n\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\tclassName=\"editor-post-parent__panel-dropdown\"\n\t\t\t\tcontentClassName=\"editor-post-parent__panel-dialog\"\n\t\t\t\tfocusOnMount\n\t\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t\t<PostParentToggle isOpen={ isOpen } onClick={ onToggle } />\n\t\t\t\t) }\n\t\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t\t<div className=\"editor-post-parent\">\n\t\t\t\t\t\t<InspectorPopoverHeader\n\t\t\t\t\t\t\ttitle={ __( 'Parent' ) }\n\t\t\t\t\t\t\tonClose={ onClose }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\"Child pages inherit characteristics from their parent, such as URL structure. For instance, if 'Web Design' is a child of 'Services,' its URL would be mysite.com/services/web-design.\"\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t'They also show up as sub-items in the default navigation menu. '\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\t\t\thref={ __(\n\t\t\t\t\t\t\t\t\t\t'https://wordpress.org/documentation/article/page-post-settings-sidebar/#page-attributes'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ __( 'Learn more' ) }\n\t\t\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<PageAttributesParent />\n\t\t\t\t\t</div>\n\t\t\t\t) }\n\t\t\t/>\n\t\t</PostPanelRow>\n\t);\n}\n\nexport default PageAttributesParent;\n"],"mappings":";;;;;;;;;AAGA,IAAAA,cAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAMA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,aAAA,GAAAN,OAAA;AACA,IAAAO,SAAA,GAAAP,OAAA;AACA,IAAAQ,YAAA,GAAAR,OAAA;AAKA,IAAAS,aAAA,GAAAV,sBAAA,CAAAC,OAAA;AACA,IAAAU,MAAA,GAAAV,OAAA;AACA,IAAAW,MAAA,GAAAX,OAAA;AAAmD,IAAAY,WAAA,GAAAZ,OAAA;AA3BnD;AAC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BAAoB","ignoreList":[]}
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = PatternDuplicateModal;
7
+ exports.modalName = void 0;
8
+ var _data = require("@wordpress/data");
9
+ var _patterns = require("@wordpress/patterns");
10
+ var _coreData = require("@wordpress/core-data");
11
+ var _interface = require("@wordpress/interface");
12
+ var _lockUnlock = require("../../lock-unlock");
13
+ var _store = require("../../store");
14
+ var _constants = require("../../store/constants");
15
+ var _jsxRuntime = require("react/jsx-runtime");
16
+ /**
17
+ * WordPress dependencies
18
+ */
19
+
20
+ /**
21
+ * Internal dependencies
22
+ */
23
+
24
+ const {
25
+ DuplicatePatternModal
26
+ } = (0, _lockUnlock.unlock)(_patterns.privateApis);
27
+ const modalName = exports.modalName = 'editor/pattern-duplicate';
28
+ function PatternDuplicateModal() {
29
+ const {
30
+ record,
31
+ postType
32
+ } = (0, _data.useSelect)(select => {
33
+ const {
34
+ getCurrentPostType,
35
+ getCurrentPostId
36
+ } = select(_store.store);
37
+ const {
38
+ getEditedEntityRecord
39
+ } = select(_coreData.store);
40
+ const _postType = getCurrentPostType();
41
+ return {
42
+ record: getEditedEntityRecord('postType', _postType, getCurrentPostId()),
43
+ postType: _postType
44
+ };
45
+ }, []);
46
+ const {
47
+ closeModal
48
+ } = (0, _data.useDispatch)(_interface.store);
49
+ const isActive = (0, _data.useSelect)(select => select(_interface.store).isModalActive(modalName));
50
+ if (!isActive || postType !== _constants.PATTERN_POST_TYPE) {
51
+ return null;
52
+ }
53
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(DuplicatePatternModal, {
54
+ onClose: closeModal,
55
+ onSuccess: () => closeModal(),
56
+ pattern: record
57
+ });
58
+ }
59
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_data","require","_patterns","_coreData","_interface","_lockUnlock","_store","_constants","_jsxRuntime","DuplicatePatternModal","unlock","patternsPrivateApis","modalName","exports","PatternDuplicateModal","record","postType","useSelect","select","getCurrentPostType","getCurrentPostId","editorStore","getEditedEntityRecord","coreStore","_postType","closeModal","useDispatch","interfaceStore","isActive","isModalActive","PATTERN_POST_TYPE","jsx","onClose","onSuccess","pattern"],"sources":["@wordpress/editor/src/components/pattern-duplicate-modal/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { privateApis as patternsPrivateApis } from '@wordpress/patterns';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as interfaceStore } from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as editorStore } from '../../store';\nimport { PATTERN_POST_TYPE } from '../../store/constants';\n\nconst { DuplicatePatternModal } = unlock( patternsPrivateApis );\nexport const modalName = 'editor/pattern-duplicate';\n\nexport default function PatternDuplicateModal() {\n\tconst { record, postType } = useSelect( ( select ) => {\n\t\tconst { getCurrentPostType, getCurrentPostId } = select( editorStore );\n\t\tconst { getEditedEntityRecord } = select( coreStore );\n\t\tconst _postType = getCurrentPostType();\n\t\treturn {\n\t\t\trecord: getEditedEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\t_postType,\n\t\t\t\tgetCurrentPostId()\n\t\t\t),\n\t\t\tpostType: _postType,\n\t\t};\n\t}, [] );\n\tconst { closeModal } = useDispatch( interfaceStore );\n\n\tconst isActive = useSelect( ( select ) =>\n\t\tselect( interfaceStore ).isModalActive( modalName )\n\t);\n\n\tif ( ! isActive || postType !== PATTERN_POST_TYPE ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<DuplicatePatternModal\n\t\t\tonClose={ closeModal }\n\t\t\tonSuccess={ () => closeModal() }\n\t\t\tpattern={ record }\n\t\t/>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAA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EAAGnB;EAAQ,CAClB,CAAC;AAEJ","ignoreList":[]}
@@ -4,11 +4,11 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = PatternOverridesPanel;
7
- var _react = require("react");
8
7
  var _data = require("@wordpress/data");
9
8
  var _patterns = require("@wordpress/patterns");
10
9
  var _store = require("../../store");
11
10
  var _lockUnlock = require("../../lock-unlock");
11
+ var _jsxRuntime = require("react/jsx-runtime");
12
12
  /**
13
13
  * WordPress dependencies
14
14
  */
@@ -25,6 +25,6 @@ function PatternOverridesPanel() {
25
25
  if (!supportsPatternOverridesPanel) {
26
26
  return null;
27
27
  }
28
- return (0, _react.createElement)(OverridesPanel, null);
28
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(OverridesPanel, {});
29
29
  }
30
30
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_data","require","_patterns","_store","_lockUnlock","OverridesPanel","unlock","patternsPrivateApis","PatternOverridesPanel","supportsPatternOverridesPanel","useSelect","select","editorStore","getCurrentPostType","_react","createElement"],"sources":["@wordpress/editor/src/components/pattern-overrides-panel/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { privateApis as patternsPrivateApis } from '@wordpress/patterns';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst { OverridesPanel } = unlock( patternsPrivateApis );\n\nexport default function PatternOverridesPanel() {\n\tconst supportsPatternOverridesPanel = useSelect(\n\t\t( select ) => select( editorStore ).getCurrentPostType() === 'wp_block',\n\t\t[]\n\t);\n\n\tif ( ! supportsPatternOverridesPanel ) {\n\t\treturn null;\n\t}\n\n\treturn <OverridesPanel />;\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AAKA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AAVA;AACA;AACA;;AAIA;AACA;AACA;;AAIA,MAAM;EAAEI;AAAe,CAAC,GAAG,IAAAC,kBAAM,EAAEC,qBAAoB,CAAC;AAEzC,SAASC,qBAAqBA,CAAA,EAAG;EAC/C,MAAMC,6BAA6B,GAAG,IAAAC,eAAS,EAC5CC,MAAM,IAAMA,MAAM,CAAEC,YAAY,CAAC,CAACC,kBAAkB,CAAC,CAAC,KAAK,UAAU,EACvE,EACD,CAAC;EAED,IAAK,CAAEJ,6BAA6B,EAAG;IACtC,OAAO,IAAI;EACZ;EAEA,OAAO,IAAAK,MAAA,CAAAC,aAAA,EAACV,cAAc,MAAE,CAAC;AAC1B","ignoreList":[]}
1
+ {"version":3,"names":["_data","require","_patterns","_store","_lockUnlock","_jsxRuntime","OverridesPanel","unlock","patternsPrivateApis","PatternOverridesPanel","supportsPatternOverridesPanel","useSelect","select","editorStore","getCurrentPostType","jsx"],"sources":["@wordpress/editor/src/components/pattern-overrides-panel/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { privateApis as patternsPrivateApis } from '@wordpress/patterns';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst { OverridesPanel } = unlock( patternsPrivateApis );\n\nexport default function PatternOverridesPanel() {\n\tconst supportsPatternOverridesPanel = useSelect(\n\t\t( select ) => select( editorStore ).getCurrentPostType() === 'wp_block',\n\t\t[]\n\t);\n\n\tif ( ! supportsPatternOverridesPanel ) {\n\t\treturn null;\n\t}\n\n\treturn <OverridesPanel />;\n}\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AAKA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AAA2C,IAAAI,WAAA,GAAAJ,OAAA;AAV3C;AACA;AACA;;AAIA;AACA;AACA;;AAIA,MAAM;EAAEK;AAAe,CAAC,GAAG,IAAAC,kBAAM,EAAEC,qBAAoB,CAAC;AAEzC,SAASC,qBAAqBA,CAAA,EAAG;EAC/C,MAAMC,6BAA6B,GAAG,IAAAC,eAAS,EAC5CC,MAAM,IAAMA,MAAM,CAAEC,YAAY,CAAC,CAACC,kBAAkB,CAAC,CAAC,KAAK,UAAU,EACvE,EACD,CAAC;EAED,IAAK,CAAEJ,6BAA6B,EAAG;IACtC,OAAO,IAAI;EACZ;EAEA,oBAAO,IAAAL,WAAA,CAAAU,GAAA,EAACT,cAAc,IAAE,CAAC;AAC1B","ignoreList":[]}
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = PatternRenameModal;
7
+ exports.modalName = void 0;
8
+ var _data = require("@wordpress/data");
9
+ var _patterns = require("@wordpress/patterns");
10
+ var _coreData = require("@wordpress/core-data");
11
+ var _interface = require("@wordpress/interface");
12
+ var _lockUnlock = require("../../lock-unlock");
13
+ var _store = require("../../store");
14
+ var _constants = require("../../store/constants");
15
+ var _jsxRuntime = require("react/jsx-runtime");
16
+ /**
17
+ * WordPress dependencies
18
+ */
19
+
20
+ /**
21
+ * Internal dependencies
22
+ */
23
+
24
+ const {
25
+ RenamePatternModal
26
+ } = (0, _lockUnlock.unlock)(_patterns.privateApis);
27
+ const modalName = exports.modalName = 'editor/pattern-rename';
28
+ function PatternRenameModal() {
29
+ const {
30
+ record,
31
+ postType
32
+ } = (0, _data.useSelect)(select => {
33
+ const {
34
+ getCurrentPostType,
35
+ getCurrentPostId
36
+ } = select(_store.store);
37
+ const {
38
+ getEditedEntityRecord
39
+ } = select(_coreData.store);
40
+ const _postType = getCurrentPostType();
41
+ return {
42
+ record: getEditedEntityRecord('postType', _postType, getCurrentPostId()),
43
+ postType: _postType
44
+ };
45
+ }, []);
46
+ const {
47
+ closeModal
48
+ } = (0, _data.useDispatch)(_interface.store);
49
+ const isActive = (0, _data.useSelect)(select => select(_interface.store).isModalActive(modalName));
50
+ if (!isActive || postType !== _constants.PATTERN_POST_TYPE) {
51
+ return null;
52
+ }
53
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(RenamePatternModal, {
54
+ onClose: closeModal,
55
+ pattern: record
56
+ });
57
+ }
58
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_data","require","_patterns","_coreData","_interface","_lockUnlock","_store","_constants","_jsxRuntime","RenamePatternModal","unlock","patternsPrivateApis","modalName","exports","PatternRenameModal","record","postType","useSelect","select","getCurrentPostType","getCurrentPostId","editorStore","getEditedEntityRecord","coreStore","_postType","closeModal","useDispatch","interfaceStore","isActive","isModalActive","PATTERN_POST_TYPE","jsx","onClose","pattern"],"sources":["@wordpress/editor/src/components/pattern-rename-modal/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { privateApis as patternsPrivateApis } from '@wordpress/patterns';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as interfaceStore } from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as editorStore } from '../../store';\nimport { PATTERN_POST_TYPE } from '../../store/constants';\n\nconst { RenamePatternModal } = unlock( patternsPrivateApis );\nexport const modalName = 'editor/pattern-rename';\n\nexport default function PatternRenameModal() {\n\tconst { record, postType } = useSelect( ( select ) => {\n\t\tconst { getCurrentPostType, getCurrentPostId } = select( editorStore );\n\t\tconst { getEditedEntityRecord } = select( coreStore );\n\t\tconst _postType = getCurrentPostType();\n\t\treturn {\n\t\t\trecord: getEditedEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\t_postType,\n\t\t\t\tgetCurrentPostId()\n\t\t\t),\n\t\t\tpostType: _postType,\n\t\t};\n\t}, [] );\n\tconst { closeModal } = useDispatch( interfaceStore );\n\n\tconst isActive = useSelect( ( select ) =>\n\t\tselect( interfaceStore ).isModalActive( modalName )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AED,IAAK,CAAEgB,QAAQ,IAAIZ,QAAQ,KAAKc,4BAAiB,EAAG;IACnD,OAAO,IAAI;EACZ;EAEA,oBAAO,IAAAtB,WAAA,CAAAuB,GAAA,EAACtB,kBAAkB;IAACuB,OAAO,EAAGP,UAAY;IAACQ,OAAO,EAAGlB;EAAQ,CAAE,CAAC;AACxE","ignoreList":[]}
@@ -5,13 +5,13 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = void 0;
8
- var _react = require("react");
9
8
  var _components = require("@wordpress/components");
10
9
  var _plugins = require("@wordpress/plugins");
11
10
  var _data = require("@wordpress/data");
12
11
  var _warning = _interopRequireDefault(require("@wordpress/warning"));
13
12
  var _enablePluginDocumentSettingPanel = _interopRequireDefault(require("../preferences-modal/enable-plugin-document-setting-panel"));
14
13
  var _store = require("../../store");
14
+ var _jsxRuntime = require("react/jsx-runtime");
15
15
  /**
16
16
  * WordPress dependencies
17
17
  */
@@ -105,18 +105,23 @@ const PluginDocumentSettingPanel = ({
105
105
  toggleEditorPanelOpened
106
106
  } = (0, _data.useDispatch)(_store.store);
107
107
  if (undefined === name) {
108
- typeof SCRIPT_DEBUG !== "undefined" && SCRIPT_DEBUG === true ? (0, _warning.default)('PluginDocumentSettingPanel requires a name property.') : void 0;
108
+ globalThis.SCRIPT_DEBUG === true ? (0, _warning.default)('PluginDocumentSettingPanel requires a name property.') : void 0;
109
109
  }
110
- return (0, _react.createElement)(_react.Fragment, null, (0, _react.createElement)(_enablePluginDocumentSettingPanel.default, {
111
- label: title,
112
- panelName: panelName
113
- }), (0, _react.createElement)(Fill, null, isEnabled && (0, _react.createElement)(_components.PanelBody, {
114
- className: className,
115
- title: title,
116
- icon: icon,
117
- opened: opened,
118
- onToggle: () => toggleEditorPanelOpened(panelName)
119
- }, children)));
110
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
111
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_enablePluginDocumentSettingPanel.default, {
112
+ label: title,
113
+ panelName: panelName
114
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(Fill, {
115
+ children: isEnabled && /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.PanelBody, {
116
+ className: className,
117
+ title: title,
118
+ icon: icon,
119
+ opened: opened,
120
+ onToggle: () => toggleEditorPanelOpened(panelName),
121
+ children: children
122
+ })
123
+ })]
124
+ });
120
125
  };
121
126
  PluginDocumentSettingPanel.Slot = Slot;
122
127
  var _default = exports.default = PluginDocumentSettingPanel;
@@ -1 +1 @@
1
- {"version":3,"names":["_components","require","_plugins","_data","_warning","_interopRequireDefault","_enablePluginDocumentSettingPanel","_store","Fill","Slot","createSlotFill","PluginDocumentSettingPanel","name","className","title","icon","children","pluginName","usePluginContext","panelName","opened","isEnabled","useSelect","select","isEditorPanelOpened","isEditorPanelEnabled","editorStore","toggleEditorPanelOpened","useDispatch","undefined","SCRIPT_DEBUG","warning","_react","createElement","Fragment","default","label","PanelBody","onToggle","_default","exports"],"sources":["@wordpress/editor/src/components/plugin-document-setting-panel/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createSlotFill, PanelBody } from '@wordpress/components';\nimport { usePluginContext } from '@wordpress/plugins';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport warning from '@wordpress/warning';\n\n/**\n * Internal dependencies\n */\nimport EnablePluginDocumentSettingPanelOption from '../preferences-modal/enable-plugin-document-setting-panel';\nimport { store as editorStore } from '../../store';\n\nconst { Fill, Slot } = createSlotFill( 'PluginDocumentSettingPanel' );\n\n/**\n * Renders items below the Status & Availability panel in the Document Sidebar.\n *\n * @param {Object} props Component properties.\n * @param {string} props.name Required. A machine-friendly name for the panel.\n * @param {string} [props.className] An optional class name added to the row.\n * @param {string} [props.title] The title of the panel\n * @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered when the sidebar is pinned to toolbar.\n * @param {Element} props.children Children to be rendered\n *\n * @example\n * ```js\n * // Using ES5 syntax\n * var el = React.createElement;\n * var __ = wp.i18n.__;\n * var registerPlugin = wp.plugins.registerPlugin;\n * var PluginDocumentSettingPanel = wp.editor.PluginDocumentSettingPanel;\n *\n * function MyDocumentSettingPlugin() {\n * \treturn el(\n * \t\tPluginDocumentSettingPanel,\n * \t\t{\n * \t\t\tclassName: 'my-document-setting-plugin',\n * \t\t\ttitle: 'My Panel',\n * \t\t\tname: 'my-panel',\n * \t\t},\n * \t\t__( 'My Document Setting Panel' )\n * \t);\n * }\n *\n * registerPlugin( 'my-document-setting-plugin', {\n * \t\trender: MyDocumentSettingPlugin\n * } );\n * ```\n *\n * @example\n * ```jsx\n * // Using ESNext syntax\n * import { registerPlugin } from '@wordpress/plugins';\n * import { PluginDocumentSettingPanel } from '@wordpress/editor';\n *\n * const MyDocumentSettingTest = () => (\n * \t\t<PluginDocumentSettingPanel className=\"my-document-setting-plugin\" title=\"My Panel\" name=\"my-panel\">\n *\t\t\t<p>My Document Setting Panel</p>\n *\t\t</PluginDocumentSettingPanel>\n *\t);\n *\n * registerPlugin( 'document-setting-test', { render: MyDocumentSettingTest } );\n * ```\n *\n * @return {Component} The component to be rendered.\n */\nconst PluginDocumentSettingPanel = ( {\n\tname,\n\tclassName,\n\ttitle,\n\ticon,\n\tchildren,\n} ) => {\n\tconst { name: pluginName } = usePluginContext();\n\tconst panelName = `${ pluginName }/${ name }`;\n\tconst { opened, isEnabled } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { isEditorPanelOpened, isEditorPanelEnabled } =\n\t\t\t\tselect( editorStore );\n\n\t\t\treturn {\n\t\t\t\topened: isEditorPanelOpened( panelName ),\n\t\t\t\tisEnabled: isEditorPanelEnabled( panelName ),\n\t\t\t};\n\t\t},\n\t\t[ panelName ]\n\t);\n\tconst { toggleEditorPanelOpened } = useDispatch( editorStore );\n\n\tif ( undefined === name ) {\n\t\twarning( 'PluginDocumentSettingPanel requires a name property.' );\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<EnablePluginDocumentSettingPanelOption\n\t\t\t\tlabel={ title }\n\t\t\t\tpanelName={ panelName }\n\t\t\t/>\n\t\t\t<Fill>\n\t\t\t\t{ isEnabled && (\n\t\t\t\t\t<PanelBody\n\t\t\t\t\t\tclassName={ className }\n\t\t\t\t\t\ttitle={ title }\n\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\topened={ opened }\n\t\t\t\t\t\tonToggle={ () => toggleEditorPanelOpened( panelName ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ children }\n\t\t\t\t\t</PanelBody>\n\t\t\t\t) }\n\t\t\t</Fill>\n\t\t</>\n\t);\n};\n\nPluginDocumentSettingPanel.Slot = Slot;\n\nexport default PluginDocumentSettingPanel;\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAC,sBAAA,CAAAJ,OAAA;AAKA,IAAAK,iCAAA,GAAAD,sBAAA,CAAAJ,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AAZA;AACA;AACA;;AAMA;AACA;AACA;;AAIA,MAAM;EAAEO,IAAI;EAAEC;AAAK,CAAC,GAAG,IAAAC,0BAAc,EAAE,4BAA6B,CAAC;;AAErE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,0BAA0B,GAAGA,CAAE;EACpCC,IAAI;EACJC,SAAS;EACTC,KAAK;EACLC,IAAI;EACJC;AACD,CAAC,KAAM;EACN,MA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CAAAL,OAAA,GAExBxB,0BAA0B","ignoreList":[]}
1
+ {"version":3,"names":["_components","require","_plugins","_data","_warning","_interopRequireDefault","_enablePluginDocumentSettingPanel","_store","_jsxRuntime","Fill","Slot","createSlotFill","PluginDocumentSettingPanel","name","className","title","icon","children","pluginName","usePluginContext","panelName","opened","isEnabled","useSelect","select","isEditorPanelOpened","isEditorPanelEnabled","editorStore","toggleEditorPanelOpened","useDispatch","undefined","globalThis","SCRIPT_DEBUG","warning","jsxs","Fragment","jsx","default","label","PanelBody","onToggle","_default","exports"],"sources":["@wordpress/editor/src/components/plugin-document-setting-panel/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createSlotFill, PanelBody } from '@wordpress/components';\nimport { usePluginContext } from '@wordpress/plugins';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport warning from '@wordpress/warning';\n\n/**\n * Internal dependencies\n */\nimport EnablePluginDocumentSettingPanelOption from '../preferences-modal/enable-plugin-document-setting-panel';\nimport { store as editorStore } from '../../store';\n\nconst { Fill, Slot } = createSlotFill( 'PluginDocumentSettingPanel' );\n\n/**\n * Renders items below the Status & Availability panel in the Document Sidebar.\n *\n * @param {Object} props Component properties.\n * @param {string} props.name Required. A machine-friendly name for the panel.\n * @param {string} [props.className] An optional class name added to the row.\n * @param {string} [props.title] The title of the panel\n * @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered when the sidebar is pinned to toolbar.\n * @param {Element} props.children Children to be rendered\n *\n * @example\n * ```js\n * // Using ES5 syntax\n * var el = React.createElement;\n * var __ = wp.i18n.__;\n * var registerPlugin = wp.plugins.registerPlugin;\n * var PluginDocumentSettingPanel = wp.editor.PluginDocumentSettingPanel;\n *\n * function MyDocumentSettingPlugin() {\n * \treturn el(\n * \t\tPluginDocumentSettingPanel,\n * \t\t{\n * \t\t\tclassName: 'my-document-setting-plugin',\n * \t\t\ttitle: 'My Panel',\n * \t\t\tname: 'my-panel',\n * \t\t},\n * \t\t__( 'My Document Setting Panel' )\n * \t);\n * }\n *\n * registerPlugin( 'my-document-setting-plugin', {\n * \t\trender: MyDocumentSettingPlugin\n * } );\n * ```\n *\n * @example\n * ```jsx\n * // Using ESNext syntax\n * import { registerPlugin } from '@wordpress/plugins';\n * import { PluginDocumentSettingPanel } from '@wordpress/editor';\n *\n * const MyDocumentSettingTest = () => (\n * \t\t<PluginDocumentSettingPanel className=\"my-document-setting-plugin\" title=\"My Panel\" name=\"my-panel\">\n *\t\t\t<p>My Document Setting Panel</p>\n *\t\t</PluginDocumentSettingPanel>\n *\t);\n *\n * registerPlugin( 'document-setting-test', { render: MyDocumentSettingTest } );\n * ```\n *\n * @return {Component} The component to be rendered.\n */\nconst PluginDocumentSettingPanel = ( {\n\tname,\n\tclassName,\n\ttitle,\n\ticon,\n\tchildren,\n} ) => {\n\tconst { name: pluginName } = usePluginContext();\n\tconst panelName = `${ pluginName }/${ name }`;\n\tconst { opened, isEnabled } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { isEditorPanelOpened, isEditorPanelEnabled } =\n\t\t\t\tselect( editorStore );\n\n\t\t\treturn {\n\t\t\t\topened: isEditorPanelOpened( panelName ),\n\t\t\t\tisEnabled: isEditorPanelEnabled( panelName ),\n\t\t\t};\n\t\t},\n\t\t[ panelName ]\n\t);\n\tconst { toggleEditorPanelOpened } = useDispatch( editorStore );\n\n\tif ( undefined === name ) {\n\t\twarning( 'PluginDocumentSettingPanel requires a name property.' );\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<EnablePluginDocumentSettingPanelOption\n\t\t\t\tlabel={ title }\n\t\t\t\tpanelName={ panelName }\n\t\t\t/>\n\t\t\t<Fill>\n\t\t\t\t{ isEnabled && (\n\t\t\t\t\t<PanelBody\n\t\t\t\t\t\tclassName={ className }\n\t\t\t\t\t\ttitle={ title }\n\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\topened={ opened }\n\t\t\t\t\t\tonToggle={ () => toggleEditorPanelOpened( panelName ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ children }\n\t\t\t\t\t</PanelBody>\n\t\t\t\t) }\n\t\t\t</Fill>\n\t\t</>\n\t);\n};\n\nPluginDocumentSettingPanel.Slot = Slot;\n\nexport default PluginDocumentSettingPanel;\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAC,sBAAA,CAAAJ,OAAA;AAKA,IAAAK,iCAAA,GAAAD,sBAAA,CAAAJ,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AAAmD,IAAAO,WAAA,GAAAP,OAAA;AAZnD;AACA;AACA;;AAMA;AACA;AACA;;AAIA,MAAM;EAAEQ,IAAI;EAAEC;AAAK,CAAC,GAAG,IAAAC,0BAAc,EAAE,4BAA6B,CAAC;;AAErE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,0BAA0B,GAAGA,CAAE;EACpCC,IAAI;EACJC,SAAS;EACTC,KAAK;EACLC,IAAI;EACJC;AACD,CAAC,KAAM;EACN,MAAM;IAAEJ,IAAI,EAAEK;EAAW,CAAC,GAAG,IAAAC,yBAAgB,EAAC,CAAC;EAC/C,MAAMC,SAAS,GAAI,GAAGF,UAAY,IAAIL,IAAM,EAAC;EAC7C,MAAM;IAAEQ,MAAM;IAAEC;EAAU,CAAC,GAAG,IAAAC,eAAS,EACpCC,MAAM,IAAM;IACb,MAAM;MAAEC,mBAAmB;MAAEC;IAAqB,CAAC,GAClDF,MAAM,CAAEG,YAAY,CAAC;IAEtB,OAAO;MACNN,MAAM,EAAEI,mBAAmB,CAAEL,SAAU,CAAC;MACxCE,SAAS,EAAEI,oBAAoB,CAAEN,SAAU;IAC5C,CAAC;EACF,CAAC,EACD,CAAEA,SAAS,CACZ,CAAC;EACD,MAAM;IAAEQ;EAAwB,CAAC,GAAG,IAAAC,iBAAW,EAAEF,YAAY,CAAC;EAE9D,IAAKG,SAAS,KAAKjB,IAAI,EAAG;IACzBkB,UAAA,CAAAC,YAAA,gBAAAC,gBAAO,EAAE,sDAAuD,CAAC;EAClE;EAEA,oBACC,IAAAzB,WAAA,CAAA0B,IAAA,EAAA1B,WAAA,CAAA2B,QAAA;IAAAlB,QAAA,gBACC,IAAAT,WAAA,CAAA4B,GAAA,EAAC9B,iCAAA,CAAA+B,OAAsC;MACtCC,KAAK,EAAGvB,KAAO;MACfK,SAAS,EAAGA;IAAW,CACvB,CAAC,eACF,IAAAZ,WAAA,CAAA4B,GAAA,EAAC3B,IAAI;MAAAQ,QAAA,EACFK,SAAS,iBACV,IAAAd,WAAA,CAAA4B,GAAA,EAACpC,WAAA,CAAAuC,SAAS;QACTzB,SAAS,EAAGA,SAAW;QACvBC,KAAK,EAAGA,KAAO;QACfC,IAAI,EAAGA,IAAM;QACbK,MAAM,EAAGA,MAAQ;QACjBmB,QAAQ,EAAGA,CAAA,KAAMZ,uBAAuB,CAAER,SAAU,CAAG;QAAAH,QAAA,EAErDA;MAAQ,CACA;IACX,CACI,CAAC;EAAA,CACN,CAAC;AAEL,CAAC;AAEDL,0BAA0B,CAACF,IAAI,GAAGA,IAAI;AAAC,IAAA+B,QAAA,GAAAC,OAAA,CAAAL,OAAA,GAExBzB,0BAA0B","ignoreList":[]}
@@ -4,9 +4,9 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- var _react = require("react");
8
7
  var _plugins = require("@wordpress/plugins");
9
8
  var _components = require("@wordpress/components");
9
+ var _jsxRuntime = require("react/jsx-runtime");
10
10
  /**
11
11
  * WordPress dependencies
12
12
  */
@@ -56,12 +56,15 @@ const PluginPostPublishPanel = ({
56
56
  const {
57
57
  icon: pluginIcon
58
58
  } = (0, _plugins.usePluginContext)();
59
- return (0, _react.createElement)(Fill, null, (0, _react.createElement)(_components.PanelBody, {
60
- className: className,
61
- initialOpen: initialOpen || !title,
62
- title: title,
63
- icon: icon !== null && icon !== void 0 ? icon : pluginIcon
64
- }, children));
59
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(Fill, {
60
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.PanelBody, {
61
+ className: className,
62
+ initialOpen: initialOpen || !title,
63
+ title: title,
64
+ icon: icon !== null && icon !== void 0 ? icon : pluginIcon,
65
+ children: children
66
+ })
67
+ });
65
68
  };
66
69
  PluginPostPublishPanel.Slot = Slot;
67
70
  var _default = exports.default = PluginPostPublishPanel;
@@ -1 +1 @@
1
- {"version":3,"names":["_plugins","require","_components","Fill","Slot","createSlotFill","PluginPostPublishPanel","children","className","title","initialOpen","icon","pluginIcon","usePluginContext","_react","createElement","PanelBody","_default","exports","default"],"sources":["@wordpress/editor/src/components/plugin-post-publish-panel/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { usePluginContext } from '@wordpress/plugins';\nimport { createSlotFill, PanelBody } from '@wordpress/components';\n\nconst { Fill, Slot } = createSlotFill( 'PluginPostPublishPanel' );\n\n/**\n * Renders provided content to the post-publish panel in the publish flow\n * (side panel that opens after a user publishes the post).\n *\n * @param {Object} props Component properties.\n * @param {string} [props.className] An optional class name added to the panel.\n * @param {string} [props.title] Title displayed at the top of the panel.\n * @param {boolean} [props.initialOpen=false] Whether to have the panel initially opened. When no title is provided it is always opened.\n * @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered when the sidebar is pinned to toolbar.\n * @param {Element} props.children Children to be rendered\n *\n * @example\n * ```jsx\n * // Using ESNext syntax\n * import { __ } from '@wordpress/i18n';\n * import { PluginPostPublishPanel } from '@wordpress/editor';\n *\n * const MyPluginPostPublishPanel = () => (\n * \t<PluginPostPublishPanel\n * \t\tclassName=\"my-plugin-post-publish-panel\"\n * \t\ttitle={ __( 'My panel title' ) }\n * \t\tinitialOpen={ true }\n * \t>\n * { __( 'My panel content' ) }\n * \t</PluginPostPublishPanel>\n * );\n * ```\n *\n * @return {Component} The component to be rendered.\n */\nconst PluginPostPublishPanel = ( {\n\tchildren,\n\tclassName,\n\ttitle,\n\tinitialOpen = false,\n\ticon,\n} ) => {\n\tconst { icon: pluginIcon } = usePluginContext();\n\n\treturn (\n\t\t<Fill>\n\t\t\t<PanelBody\n\t\t\t\tclassName={ className }\n\t\t\t\tinitialOpen={ initialOpen || ! title }\n\t\t\t\ttitle={ title }\n\t\t\t\ticon={ icon ?? pluginIcon }\n\t\t\t>\n\t\t\t\t{ children }\n\t\t\t</PanelBody>\n\t\t</Fill>\n\t);\n};\n\nPluginPostPublishPanel.Slot = Slot;\n\nexport default PluginPostPublishPanel;\n"],"mappings":";;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAJA;AACA;AACA;;AAIA,MAAM;EAAEE,IAAI;EAAEC;AAAK,CAAC,GAAG,IAAAC,0BAAc,EAAE,wBAAyB,CAAC;;AAEjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,sBAAsB,GAAGA,CAAE;EAChCC,QAAQ;EACRC,SAAS;EACTC,KAAK;EACLC,WAAW,GAAG,KAAK;EACnBC;AACD,CAAC,KAAM;EACN,MAAM;IAAEA,IAAI,EAAEC;EAAW,CAAC,GAAG,IAAAC,yBAAgB,EAAC,CAAC;EAE/C,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACZ,IAAI,QACJ,IAAAW,MAAA,CAAAC,aAAA,EAACb,WAAA,CAAAc,SAAS;IACTR,SAAS,EAAGA,SAAW;IACvBE,WAAW,EAAGA,WAAW,IAAI,CAAED,KAAO;IACtCA,KAAK,EAAGA,KAAO;IACfE,IAAI,EAAGA,IAAI,aAAJA,IAAI,cAAJA,IAAI,GAAIC;EAAY,GAEzBL,QACQ,CACN,CAAC;AAET,CAAC;AAEDD,sBAAsB,CAACF,IAAI,GAAGA,IAAI;AAAC,IAAAa,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEpBb,sBAAsB","ignoreList":[]}
1
+ {"version":3,"names":["_plugins","require","_components","_jsxRuntime","Fill","Slot","createSlotFill","PluginPostPublishPanel","children","className","title","initialOpen","icon","pluginIcon","usePluginContext","jsx","PanelBody","_default","exports","default"],"sources":["@wordpress/editor/src/components/plugin-post-publish-panel/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { usePluginContext } from '@wordpress/plugins';\nimport { createSlotFill, PanelBody } from '@wordpress/components';\n\nconst { Fill, Slot } = createSlotFill( 'PluginPostPublishPanel' );\n\n/**\n * Renders provided content to the post-publish panel in the publish flow\n * (side panel that opens after a user publishes the post).\n *\n * @param {Object} props Component properties.\n * @param {string} [props.className] An optional class name added to the panel.\n * @param {string} [props.title] Title displayed at the top of the panel.\n * @param {boolean} [props.initialOpen=false] Whether to have the panel initially opened. When no title is provided it is always opened.\n * @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered when the sidebar is pinned to toolbar.\n * @param {Element} props.children Children to be rendered\n *\n * @example\n * ```jsx\n * // Using ESNext syntax\n * import { __ } from '@wordpress/i18n';\n * import { PluginPostPublishPanel } from '@wordpress/editor';\n *\n * const MyPluginPostPublishPanel = () => (\n * \t<PluginPostPublishPanel\n * \t\tclassName=\"my-plugin-post-publish-panel\"\n * \t\ttitle={ __( 'My panel title' ) }\n * \t\tinitialOpen={ true }\n * \t>\n * { __( 'My panel content' ) }\n * \t</PluginPostPublishPanel>\n * );\n * ```\n *\n * @return {Component} The component to be rendered.\n */\nconst PluginPostPublishPanel = ( {\n\tchildren,\n\tclassName,\n\ttitle,\n\tinitialOpen = false,\n\ticon,\n} ) => {\n\tconst { icon: pluginIcon } = usePluginContext();\n\n\treturn (\n\t\t<Fill>\n\t\t\t<PanelBody\n\t\t\t\tclassName={ className }\n\t\t\t\tinitialOpen={ initialOpen || ! title }\n\t\t\t\ttitle={ title }\n\t\t\t\ticon={ icon ?? pluginIcon }\n\t\t\t>\n\t\t\t\t{ children }\n\t\t\t</PanelBody>\n\t\t</Fill>\n\t);\n};\n\nPluginPostPublishPanel.Slot = Slot;\n\nexport default PluginPostPublishPanel;\n"],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAAkE,IAAAE,WAAA,GAAAF,OAAA;AAJlE;AACA;AACA;;AAIA,MAAM;EAAEG,IAAI;EAAEC;AAAK,CAAC,GAAG,IAAAC,0BAAc,EAAE,wBAAyB,CAAC;;AAEjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,sBAAsB,GAAGA,CAAE;EAChCC,QAAQ;EACRC,SAAS;EACTC,KAAK;EACLC,WAAW,GAAG,KAAK;EACnBC;AACD,CAAC,KAAM;EACN,MAAM;IAAEA,IAAI,EAAEC;EAAW,CAAC,GAAG,IAAAC,yBAAgB,EAAC,CAAC;EAE/C,oBACC,IAAAX,WAAA,CAAAY,GAAA,EAACX,IAAI;IAAAI,QAAA,eACJ,IAAAL,WAAA,CAAAY,GAAA,EAACb,WAAA,CAAAc,SAAS;MACTP,SAAS,EAAGA,SAAW;MACvBE,WAAW,EAAGA,WAAW,IAAI,CAAED,KAAO;MACtCA,KAAK,EAAGA,KAAO;MACfE,IAAI,EAAGA,IAAI,aAAJA,IAAI,cAAJA,IAAI,GAAIC,UAAY;MAAAL,QAAA,EAEzBA;IAAQ,CACA;EAAC,CACP,CAAC;AAET,CAAC;AAEDD,sBAAsB,CAACF,IAAI,GAAGA,IAAI;AAAC,IAAAY,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEpBZ,sBAAsB","ignoreList":[]}