@wordpress/editor 14.32.0 → 14.32.1-next.ff1cebbba.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 (1263) hide show
  1. package/build/bindings/api.js +45 -33
  2. package/build/bindings/api.js.map +7 -1
  3. package/build/bindings/entity.js +78 -0
  4. package/build/bindings/entity.js.map +7 -0
  5. package/build/bindings/pattern-overrides.js +58 -65
  6. package/build/bindings/pattern-overrides.js.map +7 -1
  7. package/build/bindings/post-data.js +71 -91
  8. package/build/bindings/post-data.js.map +7 -1
  9. package/build/bindings/post-meta.js +74 -106
  10. package/build/bindings/post-meta.js.map +7 -1
  11. package/build/components/autocompleters/index.js +36 -11
  12. package/build/components/autocompleters/index.js.map +7 -1
  13. package/build/components/autocompleters/user.js +66 -54
  14. package/build/components/autocompleters/user.js.map +7 -1
  15. package/build/components/autosave-monitor/index.js +59 -73
  16. package/build/components/autosave-monitor/index.js.map +7 -1
  17. package/build/components/block-removal-warnings/index.js +81 -57
  18. package/build/components/block-removal-warnings/index.js.map +7 -1
  19. package/build/components/block-settings-menu/content-only-settings-menu.js +161 -121
  20. package/build/components/block-settings-menu/content-only-settings-menu.js.map +7 -1
  21. package/build/components/block-settings-menu/plugin-block-settings-menu-item.js +42 -99
  22. package/build/components/block-settings-menu/plugin-block-settings-menu-item.js.map +7 -1
  23. package/build/components/block-visibility/index.js +123 -0
  24. package/build/components/block-visibility/index.js.map +7 -0
  25. package/build/components/blog-title/index.js +127 -108
  26. package/build/components/blog-title/index.js.map +7 -1
  27. package/build/components/character-count/index.js +30 -23
  28. package/build/components/character-count/index.js.map +7 -1
  29. package/build/components/collab-sidebar/add-comment.js +89 -70
  30. package/build/components/collab-sidebar/add-comment.js.map +7 -1
  31. package/build/components/collab-sidebar/comment-author-info.js +72 -84
  32. package/build/components/collab-sidebar/comment-author-info.js.map +7 -1
  33. package/build/components/collab-sidebar/comment-form.js +92 -81
  34. package/build/components/collab-sidebar/comment-form.js.map +7 -1
  35. package/build/components/collab-sidebar/comment-indicator-toolbar.js +96 -83
  36. package/build/components/collab-sidebar/comment-indicator-toolbar.js.map +7 -1
  37. package/build/components/collab-sidebar/comment-menu-item.js +46 -0
  38. package/build/components/collab-sidebar/comment-menu-item.js.map +7 -0
  39. package/build/components/collab-sidebar/comments.js +544 -317
  40. package/build/components/collab-sidebar/comments.js.map +7 -1
  41. package/build/components/collab-sidebar/constants.js +30 -7
  42. package/build/components/collab-sidebar/constants.js.map +7 -1
  43. package/build/components/collab-sidebar/hooks.js +312 -58
  44. package/build/components/collab-sidebar/hooks.js.map +7 -1
  45. package/build/components/collab-sidebar/index.js +183 -252
  46. package/build/components/collab-sidebar/index.js.map +7 -1
  47. package/build/components/collab-sidebar/utils.js +94 -79
  48. package/build/components/collab-sidebar/utils.js.map +7 -1
  49. package/build/components/collapsible-block-toolbar/index.js +70 -60
  50. package/build/components/collapsible-block-toolbar/index.js.map +7 -1
  51. package/build/components/commands/index.js +218 -268
  52. package/build/components/commands/index.js.map +7 -1
  53. package/build/components/deprecated.js +328 -248
  54. package/build/components/deprecated.js.map +7 -1
  55. package/build/components/document-bar/index.js +145 -153
  56. package/build/components/document-bar/index.js.map +7 -1
  57. package/build/components/document-outline/check.js +28 -27
  58. package/build/components/document-outline/check.js.map +7 -1
  59. package/build/components/document-outline/index.js +169 -207
  60. package/build/components/document-outline/index.js.map +7 -1
  61. package/build/components/document-outline/item.js +68 -35
  62. package/build/components/document-outline/item.js.map +7 -1
  63. package/build/components/document-tools/index.js +145 -133
  64. package/build/components/document-tools/index.js.map +7 -1
  65. package/build/components/editor/index.js +99 -63
  66. package/build/components/editor/index.js.map +7 -1
  67. package/build/components/editor-history/redo.js +51 -54
  68. package/build/components/editor-history/redo.js.map +7 -1
  69. package/build/components/editor-history/undo.js +50 -53
  70. package/build/components/editor-history/undo.js.map +7 -1
  71. package/build/components/editor-interface/content-slot-fill.js +27 -12
  72. package/build/components/editor-interface/content-slot-fill.js.map +7 -1
  73. package/build/components/editor-interface/index.js +142 -127
  74. package/build/components/editor-interface/index.js.map +7 -1
  75. package/build/components/editor-notices/index.js +74 -58
  76. package/build/components/editor-notices/index.js.map +7 -1
  77. package/build/components/editor-snackbars/index.js +40 -32
  78. package/build/components/editor-snackbars/index.js.map +7 -1
  79. package/build/components/entities-saved-states/entity-record-item.js +70 -70
  80. package/build/components/entities-saved-states/entity-record-item.js.map +7 -1
  81. package/build/components/entities-saved-states/entity-type-list.js +108 -78
  82. package/build/components/entities-saved-states/entity-type-list.js.map +7 -1
  83. package/build/components/entities-saved-states/hooks/use-is-dirty.js +62 -61
  84. package/build/components/entities-saved-states/hooks/use-is-dirty.js.map +7 -1
  85. package/build/components/entities-saved-states/index.js +177 -161
  86. package/build/components/entities-saved-states/index.js.map +7 -1
  87. package/build/components/error-boundary/index.js +59 -85
  88. package/build/components/error-boundary/index.js.map +7 -1
  89. package/build/components/global-keyboard-shortcuts/index.js +58 -71
  90. package/build/components/global-keyboard-shortcuts/index.js.map +7 -1
  91. package/build/components/global-keyboard-shortcuts/register-shortcuts.js +106 -93
  92. package/build/components/global-keyboard-shortcuts/register-shortcuts.js.map +7 -1
  93. package/build/components/global-styles-provider/index.js +173 -146
  94. package/build/components/global-styles-provider/index.js.map +7 -1
  95. package/build/components/header/back-button.js +40 -26
  96. package/build/components/header/back-button.js.map +7 -1
  97. package/build/components/header/index.js +175 -162
  98. package/build/components/header/index.js.map +7 -1
  99. package/build/components/index.js +311 -780
  100. package/build/components/index.js.map +7 -1
  101. package/build/components/inserter-sidebar/index.js +62 -71
  102. package/build/components/inserter-sidebar/index.js.map +7 -1
  103. package/build/components/keyboard-shortcut-help-modal/config.js +74 -70
  104. package/build/components/keyboard-shortcut-help-modal/config.js.map +7 -1
  105. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +61 -43
  106. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +7 -1
  107. package/build/components/keyboard-shortcut-help-modal/index.js +165 -111
  108. package/build/components/keyboard-shortcut-help-modal/index.js.map +7 -1
  109. package/build/components/keyboard-shortcut-help-modal/shortcut.js +76 -55
  110. package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +7 -1
  111. package/build/components/list-view-sidebar/index.js +117 -121
  112. package/build/components/list-view-sidebar/index.js.map +7 -1
  113. package/build/components/list-view-sidebar/list-view-outline.js +56 -41
  114. package/build/components/list-view-sidebar/list-view-outline.js.map +7 -1
  115. package/build/components/local-autosave-monitor/index.js +118 -148
  116. package/build/components/local-autosave-monitor/index.js.map +7 -1
  117. package/build/components/media-categories/index.js +160 -144
  118. package/build/components/media-categories/index.js.map +7 -1
  119. package/build/components/mode-switcher/index.js +68 -63
  120. package/build/components/mode-switcher/index.js.map +7 -1
  121. package/build/components/more-menu/copy-content-menu-item.js +46 -43
  122. package/build/components/more-menu/copy-content-menu-item.js.map +7 -1
  123. package/build/components/more-menu/index.js +174 -119
  124. package/build/components/more-menu/index.js.map +7 -1
  125. package/build/components/more-menu/tools-more-menu-group.js +27 -21
  126. package/build/components/more-menu/tools-more-menu-group.js.map +7 -1
  127. package/build/components/more-menu/view-more-menu-group.js +30 -22
  128. package/build/components/more-menu/view-more-menu-group.js.map +7 -1
  129. package/build/components/page-attributes/check.js +37 -40
  130. package/build/components/page-attributes/check.js.map +7 -1
  131. package/build/components/page-attributes/order.js +66 -64
  132. package/build/components/page-attributes/order.js.map +7 -1
  133. package/build/components/page-attributes/panel.js +45 -43
  134. package/build/components/page-attributes/panel.js.map +7 -1
  135. package/build/components/page-attributes/parent.js +224 -207
  136. package/build/components/page-attributes/parent.js.map +7 -1
  137. package/build/components/pattern-duplicate-modal/index.js +58 -48
  138. package/build/components/pattern-duplicate-modal/index.js.map +7 -1
  139. package/build/components/pattern-overrides-panel/index.js +33 -23
  140. package/build/components/pattern-overrides-panel/index.js.map +7 -1
  141. package/build/components/pattern-rename-modal/index.js +51 -47
  142. package/build/components/pattern-rename-modal/index.js.map +7 -1
  143. package/build/components/plugin-document-setting-panel/index.js +74 -114
  144. package/build/components/plugin-document-setting-panel/index.js.map +7 -1
  145. package/build/components/plugin-more-menu-item/index.js +37 -78
  146. package/build/components/plugin-more-menu-item/index.js.map +7 -1
  147. package/build/components/plugin-post-publish-panel/index.js +37 -59
  148. package/build/components/plugin-post-publish-panel/index.js.map +7 -1
  149. package/build/components/plugin-post-status-info/index.js +27 -73
  150. package/build/components/plugin-post-status-info/index.js.map +7 -1
  151. package/build/components/plugin-pre-publish-panel/index.js +37 -62
  152. package/build/components/plugin-pre-publish-panel/index.js.map +7 -1
  153. package/build/components/plugin-preview-menu-item/index.js +37 -57
  154. package/build/components/plugin-preview-menu-item/index.js.map +7 -1
  155. package/build/components/plugin-sidebar/index.js +34 -86
  156. package/build/components/plugin-sidebar/index.js.map +7 -1
  157. package/build/components/plugin-sidebar-more-menu-item/index.js +33 -67
  158. package/build/components/plugin-sidebar-more-menu-item/index.js.map +7 -1
  159. package/build/components/post-actions/actions.js +111 -103
  160. package/build/components/post-actions/actions.js.map +7 -1
  161. package/build/components/post-actions/index.js +126 -131
  162. package/build/components/post-actions/index.js.map +7 -1
  163. package/build/components/post-actions/set-as-homepage.js +123 -123
  164. package/build/components/post-actions/set-as-homepage.js.map +7 -1
  165. package/build/components/post-actions/set-as-posts-page.js +118 -120
  166. package/build/components/post-actions/set-as-posts-page.js.map +7 -1
  167. package/build/components/post-author/check.js +41 -38
  168. package/build/components/post-author/check.js.map +7 -1
  169. package/build/components/post-author/combobox.js +50 -52
  170. package/build/components/post-author/combobox.js.map +7 -1
  171. package/build/components/post-author/constants.js +34 -10
  172. package/build/components/post-author/constants.js.map +7 -1
  173. package/build/components/post-author/hook.js +71 -71
  174. package/build/components/post-author/hook.js.map +7 -1
  175. package/build/components/post-author/index.js +43 -31
  176. package/build/components/post-author/index.js.map +7 -1
  177. package/build/components/post-author/panel.js +106 -95
  178. package/build/components/post-author/panel.js.map +7 -1
  179. package/build/components/post-author/select.js +45 -40
  180. package/build/components/post-author/select.js.map +7 -1
  181. package/build/components/post-card-panel/index.js +128 -113
  182. package/build/components/post-card-panel/index.js.map +7 -1
  183. package/build/components/post-comments/index.js +60 -55
  184. package/build/components/post-comments/index.js.map +7 -1
  185. package/build/components/post-content-information/index.js +64 -65
  186. package/build/components/post-content-information/index.js.map +7 -1
  187. package/build/components/post-discussion/panel.js +114 -128
  188. package/build/components/post-discussion/panel.js.map +7 -1
  189. package/build/components/post-excerpt/check.js +37 -27
  190. package/build/components/post-excerpt/check.js.map +7 -1
  191. package/build/components/post-excerpt/index.js +75 -71
  192. package/build/components/post-excerpt/index.js.map +7 -1
  193. package/build/components/post-excerpt/panel.js +152 -141
  194. package/build/components/post-excerpt/panel.js.map +7 -1
  195. package/build/components/post-excerpt/plugin.js +28 -70
  196. package/build/components/post-excerpt/plugin.js.map +7 -1
  197. package/build/components/post-featured-image/check.js +38 -32
  198. package/build/components/post-featured-image/check.js.map +7 -1
  199. package/build/components/post-featured-image/index.js +224 -211
  200. package/build/components/post-featured-image/index.js.map +7 -1
  201. package/build/components/post-featured-image/panel.js +55 -59
  202. package/build/components/post-featured-image/panel.js.map +7 -1
  203. package/build/components/post-fields/index.js +55 -56
  204. package/build/components/post-fields/index.js.map +7 -1
  205. package/build/components/post-format/check.js +42 -33
  206. package/build/components/post-format/check.js.map +7 -1
  207. package/build/components/post-format/index.js +100 -113
  208. package/build/components/post-format/index.js.map +7 -1
  209. package/build/components/post-format/panel.js +91 -82
  210. package/build/components/post-format/panel.js.map +7 -1
  211. package/build/components/post-last-edited-panel/index.js +38 -29
  212. package/build/components/post-last-edited-panel/index.js.map +7 -1
  213. package/build/components/post-last-revision/check.js +41 -41
  214. package/build/components/post-last-revision/check.js.map +7 -1
  215. package/build/components/post-last-revision/index.js +75 -66
  216. package/build/components/post-last-revision/index.js.map +7 -1
  217. package/build/components/post-last-revision/panel.js +39 -30
  218. package/build/components/post-last-revision/panel.js.map +7 -1
  219. package/build/components/post-locked-modal/index.js +148 -145
  220. package/build/components/post-locked-modal/index.js.map +7 -1
  221. package/build/components/post-panel-row/index.js +49 -35
  222. package/build/components/post-panel-row/index.js.map +7 -1
  223. package/build/components/post-panel-section/index.js +38 -26
  224. package/build/components/post-panel-section/index.js.map +7 -1
  225. package/build/components/post-pending-status/check.js +34 -40
  226. package/build/components/post-pending-status/check.js.map +7 -1
  227. package/build/components/post-pending-status/index.js +58 -41
  228. package/build/components/post-pending-status/index.js.map +7 -1
  229. package/build/components/post-pingbacks/index.js +52 -44
  230. package/build/components/post-pingbacks/index.js.map +7 -1
  231. package/build/components/post-preview-button/index.js +90 -120
  232. package/build/components/post-preview-button/index.js.map +7 -1
  233. package/build/components/post-publish-button/index.js +125 -137
  234. package/build/components/post-publish-button/index.js.map +7 -1
  235. package/build/components/post-publish-button/label.js +39 -40
  236. package/build/components/post-publish-button/label.js.map +7 -1
  237. package/build/components/post-publish-button/post-publish-button-or-toggle.js +62 -68
  238. package/build/components/post-publish-button/post-publish-button-or-toggle.js.map +7 -1
  239. package/build/components/post-publish-panel/index.js +136 -135
  240. package/build/components/post-publish-panel/index.js.map +7 -1
  241. package/build/components/post-publish-panel/maybe-category-panel.js +71 -67
  242. package/build/components/post-publish-panel/maybe-category-panel.js.map +7 -1
  243. package/build/components/post-publish-panel/maybe-post-format-panel.js +72 -63
  244. package/build/components/post-publish-panel/maybe-post-format-panel.js.map +7 -1
  245. package/build/components/post-publish-panel/maybe-tags-panel.js +86 -80
  246. package/build/components/post-publish-panel/maybe-tags-panel.js.map +7 -1
  247. package/build/components/post-publish-panel/maybe-upload-media.js +172 -214
  248. package/build/components/post-publish-panel/maybe-upload-media.js.map +7 -1
  249. package/build/components/post-publish-panel/media-util.js +63 -72
  250. package/build/components/post-publish-panel/media-util.js.map +7 -1
  251. package/build/components/post-publish-panel/postpublish.js +135 -130
  252. package/build/components/post-publish-panel/postpublish.js.map +7 -1
  253. package/build/components/post-publish-panel/prepublish.js +137 -103
  254. package/build/components/post-publish-panel/prepublish.js.map +7 -1
  255. package/build/components/post-saved-state/index.js +115 -131
  256. package/build/components/post-saved-state/index.js.map +7 -1
  257. package/build/components/post-schedule/check.js +27 -29
  258. package/build/components/post-schedule/check.js.map +7 -1
  259. package/build/components/post-schedule/index.js +96 -93
  260. package/build/components/post-schedule/index.js.map +7 -1
  261. package/build/components/post-schedule/label.js +79 -86
  262. package/build/components/post-schedule/label.js.map +7 -1
  263. package/build/components/post-schedule/panel.js +88 -73
  264. package/build/components/post-schedule/panel.js.map +7 -1
  265. package/build/components/post-status/index.js +238 -202
  266. package/build/components/post-status/index.js.map +7 -1
  267. package/build/components/post-sticky/check.js +30 -35
  268. package/build/components/post-sticky/check.js.map +7 -1
  269. package/build/components/post-sticky/index.js +50 -40
  270. package/build/components/post-sticky/index.js.map +7 -1
  271. package/build/components/post-sticky/panel.js +43 -21
  272. package/build/components/post-sticky/panel.js.map +7 -1
  273. package/build/components/post-switch-to-draft-button/index.js +80 -75
  274. package/build/components/post-switch-to-draft-button/index.js.map +7 -1
  275. package/build/components/post-sync-status/index.js +45 -44
  276. package/build/components/post-sync-status/index.js.map +7 -1
  277. package/build/components/post-taxonomies/check.js +36 -33
  278. package/build/components/post-taxonomies/check.js.map +7 -1
  279. package/build/components/post-taxonomies/flat-term-selector.js +189 -189
  280. package/build/components/post-taxonomies/flat-term-selector.js.map +7 -1
  281. package/build/components/post-taxonomies/hierarchical-term-selector.js +244 -280
  282. package/build/components/post-taxonomies/hierarchical-term-selector.js.map +7 -1
  283. package/build/components/post-taxonomies/index.js +68 -58
  284. package/build/components/post-taxonomies/index.js.map +7 -1
  285. package/build/components/post-taxonomies/most-used-terms.js +73 -56
  286. package/build/components/post-taxonomies/most-used-terms.js.map +7 -1
  287. package/build/components/post-taxonomies/panel.js +66 -69
  288. package/build/components/post-taxonomies/panel.js.map +7 -1
  289. package/build/components/post-template/block-theme.js +165 -123
  290. package/build/components/post-template/block-theme.js.map +7 -1
  291. package/build/components/post-template/classic-theme.js +193 -187
  292. package/build/components/post-template/classic-theme.js.map +7 -1
  293. package/build/components/post-template/create-new-template-modal.js +139 -110
  294. package/build/components/post-template/create-new-template-modal.js.map +7 -1
  295. package/build/components/post-template/create-new-template.js +65 -46
  296. package/build/components/post-template/create-new-template.js.map +7 -1
  297. package/build/components/post-template/hooks.js +116 -84
  298. package/build/components/post-template/hooks.js.map +7 -1
  299. package/build/components/post-template/panel.js +56 -52
  300. package/build/components/post-template/panel.js.map +7 -1
  301. package/build/components/post-template/reset-default-template.js +49 -43
  302. package/build/components/post-template/reset-default-template.js.map +7 -1
  303. package/build/components/post-template/swap-template-button.js +109 -91
  304. package/build/components/post-template/swap-template-button.js.map +7 -1
  305. package/build/components/post-text-editor/index.js +80 -81
  306. package/build/components/post-text-editor/index.js.map +7 -1
  307. package/build/components/post-title/constants.js +30 -7
  308. package/build/components/post-title/constants.js.map +7 -1
  309. package/build/components/post-title/index.js +99 -126
  310. package/build/components/post-title/index.js.map +7 -1
  311. package/build/components/post-title/post-title-raw.js +74 -78
  312. package/build/components/post-title/post-title-raw.js.map +7 -1
  313. package/build/components/post-title/use-post-title-focus.js +35 -52
  314. package/build/components/post-title/use-post-title-focus.js.map +7 -1
  315. package/build/components/post-title/use-post-title.js +30 -37
  316. package/build/components/post-title/use-post-title.js.map +7 -1
  317. package/build/components/post-transform-panel/hooks.js +70 -67
  318. package/build/components/post-transform-panel/hooks.js.map +7 -1
  319. package/build/components/post-transform-panel/index.js +69 -75
  320. package/build/components/post-transform-panel/index.js.map +7 -1
  321. package/build/components/post-trash/check.js +33 -42
  322. package/build/components/post-trash/check.js.map +7 -1
  323. package/build/components/post-trash/index.js +78 -67
  324. package/build/components/post-trash/index.js.map +7 -1
  325. package/build/components/post-type-support-check/index.js +34 -47
  326. package/build/components/post-type-support-check/index.js.map +7 -1
  327. package/build/components/post-url/check.js +31 -32
  328. package/build/components/post-url/check.js.map +7 -1
  329. package/build/components/post-url/index.js +155 -156
  330. package/build/components/post-url/index.js.map +7 -1
  331. package/build/components/post-url/label.js +35 -30
  332. package/build/components/post-url/label.js.map +7 -1
  333. package/build/components/post-url/panel.js +111 -112
  334. package/build/components/post-url/panel.js.map +7 -1
  335. package/build/components/post-view-link/index.js +48 -47
  336. package/build/components/post-view-link/index.js.map +7 -1
  337. package/build/components/post-visibility/check.js +28 -33
  338. package/build/components/post-visibility/check.js.map +7 -1
  339. package/build/components/post-visibility/index.js +83 -84
  340. package/build/components/post-visibility/index.js.map +7 -1
  341. package/build/components/post-visibility/label.js +35 -30
  342. package/build/components/post-visibility/label.js.map +7 -1
  343. package/build/components/post-visibility/utils.js +44 -23
  344. package/build/components/post-visibility/utils.js.map +7 -1
  345. package/build/components/posts-per-page/index.js +110 -98
  346. package/build/components/posts-per-page/index.js.map +7 -1
  347. package/build/components/preferences-modal/enable-panel.js +47 -42
  348. package/build/components/preferences-modal/enable-panel.js.map +7 -1
  349. package/build/components/preferences-modal/enable-plugin-document-setting-panel.js +40 -31
  350. package/build/components/preferences-modal/enable-plugin-document-setting-panel.js.map +7 -1
  351. package/build/components/preferences-modal/enable-publish-sidebar.js +39 -32
  352. package/build/components/preferences-modal/enable-publish-sidebar.js.map +7 -1
  353. package/build/components/preferences-modal/index.js +391 -231
  354. package/build/components/preferences-modal/index.js.map +7 -1
  355. package/build/components/preview-dropdown/index.js +165 -151
  356. package/build/components/preview-dropdown/index.js.map +7 -1
  357. package/build/components/provider/disable-non-page-content-blocks.js +67 -82
  358. package/build/components/provider/disable-non-page-content-blocks.js.map +7 -1
  359. package/build/components/provider/index.js +283 -325
  360. package/build/components/provider/index.js.map +7 -1
  361. package/build/components/provider/navigation-block-editing-mode.js +32 -29
  362. package/build/components/provider/navigation-block-editing-mode.js.map +7 -1
  363. package/build/components/provider/use-auto-switch-editor-sidebars.js +48 -39
  364. package/build/components/provider/use-auto-switch-editor-sidebars.js.map +7 -1
  365. package/build/components/provider/use-block-editor-settings.js +249 -178
  366. package/build/components/provider/use-block-editor-settings.js.map +7 -1
  367. package/build/components/provider/use-hide-blocks-from-inserter.js +87 -46
  368. package/build/components/provider/use-hide-blocks-from-inserter.js.map +7 -1
  369. package/build/components/provider/use-post-content-blocks.js +48 -29
  370. package/build/components/provider/use-post-content-blocks.js.map +7 -1
  371. package/build/components/provider/with-registry-provider.js +52 -46
  372. package/build/components/provider/with-registry-provider.js.map +7 -1
  373. package/build/components/resizable-editor/index.js +99 -86
  374. package/build/components/resizable-editor/index.js.map +7 -1
  375. package/build/components/resizable-editor/resize-handle.js +42 -36
  376. package/build/components/resizable-editor/resize-handle.js.map +7 -1
  377. package/build/components/save-publish-panels/index.js +88 -69
  378. package/build/components/save-publish-panels/index.js.map +7 -1
  379. package/build/components/sidebar/constants.js +29 -8
  380. package/build/components/sidebar/constants.js.map +7 -1
  381. package/build/components/sidebar/header.js +56 -50
  382. package/build/components/sidebar/header.js.map +7 -1
  383. package/build/components/sidebar/index.js +156 -136
  384. package/build/components/sidebar/index.js.map +7 -1
  385. package/build/components/sidebar/post-summary.js +114 -91
  386. package/build/components/sidebar/post-summary.js.map +7 -1
  387. package/build/components/site-discussion/index.js +132 -113
  388. package/build/components/site-discussion/index.js.map +7 -1
  389. package/build/components/start-page-options/index.js +136 -146
  390. package/build/components/start-page-options/index.js.map +7 -1
  391. package/build/components/start-template-options/index.js +168 -157
  392. package/build/components/start-template-options/index.js.map +7 -1
  393. package/build/components/table-of-contents/index.js +78 -69
  394. package/build/components/table-of-contents/index.js.map +7 -1
  395. package/build/components/table-of-contents/panel.js +101 -94
  396. package/build/components/table-of-contents/panel.js.map +7 -1
  397. package/build/components/template-content-panel/index.js +74 -58
  398. package/build/components/template-content-panel/index.js.map +7 -1
  399. package/build/components/template-part-content-panel/index.js +51 -54
  400. package/build/components/template-part-content-panel/index.js.map +7 -1
  401. package/build/components/template-part-menu-items/convert-to-regular.js +44 -32
  402. package/build/components/template-part-menu-items/convert-to-regular.js.map +7 -1
  403. package/build/components/template-part-menu-items/convert-to-template-part.js +76 -68
  404. package/build/components/template-part-menu-items/convert-to-template-part.js.map +7 -1
  405. package/build/components/template-part-menu-items/index.js +62 -52
  406. package/build/components/template-part-menu-items/index.js.map +7 -1
  407. package/build/components/template-validation-notice/index.js +71 -47
  408. package/build/components/template-validation-notice/index.js.map +7 -1
  409. package/build/components/text-editor/index.js +68 -62
  410. package/build/components/text-editor/index.js.map +7 -1
  411. package/build/components/theme-support-check/index.js +32 -43
  412. package/build/components/theme-support-check/index.js.map +7 -1
  413. package/build/components/time-to-read/index.js +54 -51
  414. package/build/components/time-to-read/index.js.map +7 -1
  415. package/build/components/unsaved-changes-warning/index.js +34 -38
  416. package/build/components/unsaved-changes-warning/index.js.map +7 -1
  417. package/build/components/visual-editor/edit-template-blocks-notification.js +64 -68
  418. package/build/components/visual-editor/edit-template-blocks-notification.js.map +7 -1
  419. package/build/components/visual-editor/index.js +286 -247
  420. package/build/components/visual-editor/index.js.map +7 -1
  421. package/build/components/visual-editor/use-select-nearest-editable-block.js +75 -68
  422. package/build/components/visual-editor/use-select-nearest-editable-block.js.map +7 -1
  423. package/build/components/visual-editor/use-zoom-out-mode-exit.js +52 -46
  424. package/build/components/visual-editor/use-zoom-out-mode-exit.js.map +7 -1
  425. package/build/components/word-count/index.js +34 -35
  426. package/build/components/word-count/index.js.map +7 -1
  427. package/build/components/zoom-out-toggle/index.js +88 -72
  428. package/build/components/zoom-out-toggle/index.js.map +7 -1
  429. package/build/dataviews/api.js +47 -80
  430. package/build/dataviews/api.js.map +7 -1
  431. package/build/dataviews/fields/content-preview/content-preview-view.js +81 -89
  432. package/build/dataviews/fields/content-preview/content-preview-view.js.map +7 -1
  433. package/build/dataviews/fields/content-preview/index.js +39 -21
  434. package/build/dataviews/fields/content-preview/index.js.map +7 -1
  435. package/build/dataviews/store/private-actions.js +122 -56
  436. package/build/dataviews/store/private-actions.js.map +7 -1
  437. package/build/dataviews/store/private-selectors.js +32 -15
  438. package/build/dataviews/store/private-selectors.js.map +7 -1
  439. package/build/dataviews/store/reducer.js +50 -31
  440. package/build/dataviews/store/reducer.js.map +7 -1
  441. package/build/hooks/custom-sources-backwards-compatibility.js +70 -83
  442. package/build/hooks/custom-sources-backwards-compatibility.js.map +7 -1
  443. package/build/hooks/default-autocompleters.js +9 -17
  444. package/build/hooks/default-autocompleters.js.map +7 -1
  445. package/build/hooks/index.js +7 -7
  446. package/build/hooks/index.js.map +7 -1
  447. package/build/hooks/media-upload.js +8 -9
  448. package/build/hooks/media-upload.js.map +7 -1
  449. package/build/hooks/navigation-link-view-button.js +44 -66
  450. package/build/hooks/navigation-link-view-button.js.map +7 -1
  451. package/build/hooks/pattern-overrides.js +51 -70
  452. package/build/hooks/pattern-overrides.js.map +7 -1
  453. package/build/hooks/template-part-navigation-edit-button.js +91 -0
  454. package/build/hooks/template-part-navigation-edit-button.js.map +7 -0
  455. package/build/index.js +41 -77
  456. package/build/index.js.map +7 -1
  457. package/build/lock-unlock.js +31 -14
  458. package/build/lock-unlock.js.map +7 -1
  459. package/build/private-apis.js +76 -59
  460. package/build/private-apis.js.map +7 -1
  461. package/build/store/actions.js +516 -931
  462. package/build/store/actions.js.map +7 -1
  463. package/build/store/constants.js +70 -31
  464. package/build/store/constants.js.map +7 -1
  465. package/build/store/defaults.js +31 -33
  466. package/build/store/defaults.js.map +7 -1
  467. package/build/store/index.js +52 -41
  468. package/build/store/index.js.map +7 -1
  469. package/build/store/local-autosave.js +39 -27
  470. package/build/store/local-autosave.js.map +7 -1
  471. package/build/store/private-actions.js +290 -299
  472. package/build/store/private-actions.js.map +7 -1
  473. package/build/store/private-selectors.js +189 -188
  474. package/build/store/private-selectors.js.map +7 -1
  475. package/build/store/reducer.js +128 -280
  476. package/build/store/reducer.js.map +7 -1
  477. package/build/store/selectors.js +819 -1470
  478. package/build/store/selectors.js.map +7 -1
  479. package/build/store/utils/is-template-revertable.js +24 -19
  480. package/build/store/utils/is-template-revertable.js.map +7 -1
  481. package/build/store/utils/notice-builder.js +73 -94
  482. package/build/store/utils/notice-builder.js.map +7 -1
  483. package/build/utils/get-item-title.js +34 -25
  484. package/build/utils/get-item-title.js.map +7 -1
  485. package/build/utils/get-template-info.js +37 -46
  486. package/build/utils/get-template-info.js.map +7 -1
  487. package/build/utils/get-template-part-icon.js +34 -24
  488. package/build/utils/get-template-part-icon.js.map +7 -1
  489. package/build/utils/index.js +41 -24
  490. package/build/utils/index.js.map +7 -1
  491. package/build/utils/media-sideload/index.js +26 -19
  492. package/build/utils/media-sideload/index.js.map +7 -1
  493. package/build/utils/media-upload/index.js +46 -63
  494. package/build/utils/media-upload/index.js.map +7 -1
  495. package/build/utils/pageTypeBadge.js +33 -31
  496. package/build/utils/pageTypeBadge.js.map +7 -1
  497. package/build/utils/search-templates.js +45 -47
  498. package/build/utils/search-templates.js.map +7 -1
  499. package/build/utils/terms.js +57 -63
  500. package/build/utils/terms.js.map +7 -1
  501. package/build/utils/url.js +43 -33
  502. package/build/utils/url.js.map +7 -1
  503. package/build-module/bindings/api.js +11 -26
  504. package/build-module/bindings/api.js.map +7 -1
  505. package/build-module/bindings/entity.js +58 -0
  506. package/build-module/bindings/entity.js.map +7 -0
  507. package/build-module/bindings/pattern-overrides.js +39 -59
  508. package/build-module/bindings/pattern-overrides.js.map +7 -1
  509. package/build-module/bindings/post-data.js +53 -87
  510. package/build-module/bindings/post-data.js.map +7 -1
  511. package/build-module/bindings/post-meta.js +55 -101
  512. package/build-module/bindings/post-meta.js.map +7 -1
  513. package/build-module/components/autocompleters/index.js +5 -2
  514. package/build-module/components/autocompleters/index.js.map +7 -1
  515. package/build-module/components/autocompleters/user.js +45 -49
  516. package/build-module/components/autocompleters/user.js.map +7 -1
  517. package/build-module/components/autosave-monitor/index.js +37 -67
  518. package/build-module/components/autosave-monitor/index.js.map +7 -1
  519. package/build-module/components/block-removal-warnings/index.js +64 -54
  520. package/build-module/components/block-removal-warnings/index.js.map +7 -1
  521. package/build-module/components/block-settings-menu/content-only-settings-menu.js +136 -113
  522. package/build-module/components/block-settings-menu/content-only-settings-menu.js.map +7 -1
  523. package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js +23 -93
  524. package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js.map +7 -1
  525. package/build-module/components/block-visibility/index.js +103 -0
  526. package/build-module/components/block-visibility/index.js.map +7 -0
  527. package/build-module/components/blog-title/index.js +102 -101
  528. package/build-module/components/blog-title/index.js.map +7 -1
  529. package/build-module/components/character-count/index.js +13 -20
  530. package/build-module/components/character-count/index.js.map +7 -1
  531. package/build-module/components/collab-sidebar/add-comment.js +64 -66
  532. package/build-module/components/collab-sidebar/add-comment.js.map +7 -1
  533. package/build-module/components/collab-sidebar/comment-author-info.js +55 -77
  534. package/build-module/components/collab-sidebar/comment-author-info.js.map +7 -1
  535. package/build-module/components/collab-sidebar/comment-form.js +68 -75
  536. package/build-module/components/collab-sidebar/comment-form.js.map +7 -1
  537. package/build-module/components/collab-sidebar/comment-indicator-toolbar.js +67 -76
  538. package/build-module/components/collab-sidebar/comment-indicator-toolbar.js.map +7 -1
  539. package/build-module/components/collab-sidebar/comment-menu-item.js +26 -0
  540. package/build-module/components/collab-sidebar/comment-menu-item.js.map +7 -0
  541. package/build-module/components/collab-sidebar/comments.js +521 -309
  542. package/build-module/components/collab-sidebar/comments.js.map +7 -1
  543. package/build-module/components/collab-sidebar/constants.js +7 -3
  544. package/build-module/components/collab-sidebar/constants.js.map +7 -1
  545. package/build-module/components/collab-sidebar/hooks.js +301 -54
  546. package/build-module/components/collab-sidebar/hooks.js.map +7 -1
  547. package/build-module/components/collab-sidebar/index.js +158 -245
  548. package/build-module/components/collab-sidebar/index.js.map +7 -1
  549. package/build-module/components/collab-sidebar/utils.js +71 -76
  550. package/build-module/components/collab-sidebar/utils.js.map +7 -1
  551. package/build-module/components/collapsible-block-toolbar/index.js +44 -52
  552. package/build-module/components/collapsible-block-toolbar/index.js.map +7 -1
  553. package/build-module/components/commands/index.js +188 -241
  554. package/build-module/components/commands/index.js.map +7 -1
  555. package/build-module/components/deprecated.js +297 -237
  556. package/build-module/components/deprecated.js.map +7 -1
  557. package/build-module/components/document-bar/index.js +114 -141
  558. package/build-module/components/document-bar/index.js.map +7 -1
  559. package/build-module/components/document-outline/check.js +10 -23
  560. package/build-module/components/document-outline/check.js.map +7 -1
  561. package/build-module/components/document-outline/index.js +141 -203
  562. package/build-module/components/document-outline/index.js.map +7 -1
  563. package/build-module/components/document-outline/item.js +40 -29
  564. package/build-module/components/document-outline/item.js.map +7 -1
  565. package/build-module/components/document-tools/index.js +115 -125
  566. package/build-module/components/document-tools/index.js.map +7 -1
  567. package/build-module/components/editor/index.js +71 -57
  568. package/build-module/components/editor/index.js.map +7 -1
  569. package/build-module/components/editor-history/redo.js +33 -49
  570. package/build-module/components/editor-history/redo.js.map +7 -1
  571. package/build-module/components/editor-history/undo.js +32 -48
  572. package/build-module/components/editor-history/undo.js.map +7 -1
  573. package/build-module/components/editor-interface/content-slot-fill.js +9 -7
  574. package/build-module/components/editor-interface/content-slot-fill.js.map +7 -1
  575. package/build-module/components/editor-interface/index.js +111 -118
  576. package/build-module/components/editor-interface/index.js.map +7 -1
  577. package/build-module/components/editor-notices/index.js +43 -53
  578. package/build-module/components/editor-notices/index.js.map +7 -1
  579. package/build-module/components/editor-snackbars/index.js +23 -29
  580. package/build-module/components/editor-snackbars/index.js.map +7 -1
  581. package/build-module/components/entities-saved-states/entity-record-item.js +52 -65
  582. package/build-module/components/entities-saved-states/entity-record-item.js.map +7 -1
  583. package/build-module/components/entities-saved-states/entity-type-list.js +81 -73
  584. package/build-module/components/entities-saved-states/entity-type-list.js.map +7 -1
  585. package/build-module/components/entities-saved-states/hooks/use-is-dirty.js +39 -55
  586. package/build-module/components/entities-saved-states/hooks/use-is-dirty.js.map +7 -1
  587. package/build-module/components/entities-saved-states/index.js +150 -152
  588. package/build-module/components/entities-saved-states/index.js.map +7 -1
  589. package/build-module/components/error-boundary/index.js +42 -77
  590. package/build-module/components/error-boundary/index.js.map +7 -1
  591. package/build-module/components/global-keyboard-shortcuts/index.js +39 -66
  592. package/build-module/components/global-keyboard-shortcuts/index.js.map +7 -1
  593. package/build-module/components/global-keyboard-shortcuts/register-shortcuts.js +86 -88
  594. package/build-module/components/global-keyboard-shortcuts/register-shortcuts.js.map +7 -1
  595. package/build-module/components/global-styles-provider/index.js +135 -134
  596. package/build-module/components/global-styles-provider/index.js.map +7 -1
  597. package/build-module/components/header/back-button.js +20 -20
  598. package/build-module/components/header/back-button.js.map +7 -1
  599. package/build-module/components/header/index.js +148 -151
  600. package/build-module/components/header/index.js.map +7 -1
  601. package/build-module/components/index.js +192 -118
  602. package/build-module/components/index.js.map +7 -1
  603. package/build-module/components/inserter-sidebar/index.js +45 -64
  604. package/build-module/components/inserter-sidebar/index.js.map +7 -1
  605. package/build-module/components/keyboard-shortcut-help-modal/config.js +62 -75
  606. package/build-module/components/keyboard-shortcut-help-modal/config.js.map +7 -1
  607. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +33 -37
  608. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +7 -1
  609. package/build-module/components/keyboard-shortcut-help-modal/index.js +140 -105
  610. package/build-module/components/keyboard-shortcut-help-modal/index.js.map +7 -1
  611. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +58 -50
  612. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +7 -1
  613. package/build-module/components/list-view-sidebar/index.js +86 -109
  614. package/build-module/components/list-view-sidebar/index.js.map +7 -1
  615. package/build-module/components/list-view-sidebar/list-view-outline.js +29 -36
  616. package/build-module/components/list-view-sidebar/list-view-outline.js.map +7 -1
  617. package/build-module/components/local-autosave-monitor/index.js +81 -130
  618. package/build-module/components/local-autosave-monitor/index.js.map +7 -1
  619. package/build-module/components/media-categories/index.js +139 -137
  620. package/build-module/components/media-categories/index.js.map +7 -1
  621. package/build-module/components/mode-switcher/index.js +50 -60
  622. package/build-module/components/mode-switcher/index.js.map +7 -1
  623. package/build-module/components/more-menu/copy-content-menu-item.js +27 -37
  624. package/build-module/components/more-menu/copy-content-menu-item.js.map +7 -1
  625. package/build-module/components/more-menu/index.js +154 -113
  626. package/build-module/components/more-menu/index.js.map +7 -1
  627. package/build-module/components/more-menu/tools-more-menu-group.js +9 -16
  628. package/build-module/components/more-menu/tools-more-menu-group.js.map +7 -1
  629. package/build-module/components/more-menu/view-more-menu-group.js +12 -17
  630. package/build-module/components/more-menu/view-more-menu-group.js.map +7 -1
  631. package/build-module/components/page-attributes/check.js +15 -35
  632. package/build-module/components/page-attributes/check.js.map +7 -1
  633. package/build-module/components/page-attributes/order.js +42 -58
  634. package/build-module/components/page-attributes/order.js.map +7 -1
  635. package/build-module/components/page-attributes/panel.js +18 -37
  636. package/build-module/components/page-attributes/panel.js.map +7 -1
  637. package/build-module/components/page-attributes/parent.js +198 -197
  638. package/build-module/components/page-attributes/parent.js.map +7 -1
  639. package/build-module/components/pattern-duplicate-modal/index.js +36 -42
  640. package/build-module/components/pattern-duplicate-modal/index.js.map +7 -1
  641. package/build-module/components/pattern-overrides-panel/index.js +16 -19
  642. package/build-module/components/pattern-overrides-panel/index.js.map +7 -1
  643. package/build-module/components/pattern-rename-modal/index.js +29 -41
  644. package/build-module/components/pattern-rename-modal/index.js.map +7 -1
  645. package/build-module/components/plugin-document-setting-panel/index.js +46 -108
  646. package/build-module/components/plugin-document-setting-panel/index.js.map +7 -1
  647. package/build-module/components/plugin-more-menu-item/index.js +18 -74
  648. package/build-module/components/plugin-more-menu-item/index.js.map +7 -1
  649. package/build-module/components/plugin-post-publish-panel/index.js +19 -54
  650. package/build-module/components/plugin-post-publish-panel/index.js.map +7 -1
  651. package/build-module/components/plugin-post-status-info/index.js +9 -68
  652. package/build-module/components/plugin-post-status-info/index.js.map +7 -1
  653. package/build-module/components/plugin-pre-publish-panel/index.js +19 -57
  654. package/build-module/components/plugin-pre-publish-panel/index.js.map +7 -1
  655. package/build-module/components/plugin-preview-menu-item/index.js +18 -53
  656. package/build-module/components/plugin-preview-menu-item/index.js.map +7 -1
  657. package/build-module/components/plugin-sidebar/index.js +16 -83
  658. package/build-module/components/plugin-sidebar/index.js.map +7 -1
  659. package/build-module/components/plugin-sidebar-more-menu-item/index.js +15 -64
  660. package/build-module/components/plugin-sidebar-more-menu-item/index.js.map +7 -1
  661. package/build-module/components/post-actions/actions.js +85 -94
  662. package/build-module/components/post-actions/actions.js.map +7 -1
  663. package/build-module/components/post-actions/index.js +104 -121
  664. package/build-module/components/post-actions/index.js.map +7 -1
  665. package/build-module/components/post-actions/set-as-homepage.js +104 -115
  666. package/build-module/components/post-actions/set-as-homepage.js.map +7 -1
  667. package/build-module/components/post-actions/set-as-posts-page.js +99 -112
  668. package/build-module/components/post-actions/set-as-posts-page.js.map +7 -1
  669. package/build-module/components/post-author/check.js +12 -33
  670. package/build-module/components/post-author/check.js.map +7 -1
  671. package/build-module/components/post-author/combobox.js +32 -47
  672. package/build-module/components/post-author/combobox.js.map +7 -1
  673. package/build-module/components/post-author/constants.js +11 -6
  674. package/build-module/components/post-author/constants.js.map +7 -1
  675. package/build-module/components/post-author/hook.js +48 -65
  676. package/build-module/components/post-author/hook.js.map +7 -1
  677. package/build-module/components/post-author/index.js +14 -24
  678. package/build-module/components/post-author/index.js.map +7 -1
  679. package/build-module/components/post-author/panel.js +73 -87
  680. package/build-module/components/post-author/panel.js.map +7 -1
  681. package/build-module/components/post-author/select.js +28 -36
  682. package/build-module/components/post-author/select.js.map +7 -1
  683. package/build-module/components/post-card-panel/index.js +107 -105
  684. package/build-module/components/post-card-panel/index.js.map +7 -1
  685. package/build-module/components/post-comments/index.js +45 -50
  686. package/build-module/components/post-comments/index.js.map +7 -1
  687. package/build-module/components/post-content-information/index.js +49 -61
  688. package/build-module/components/post-content-information/index.js.map +7 -1
  689. package/build-module/components/post-discussion/panel.js +90 -122
  690. package/build-module/components/post-discussion/panel.js.map +7 -1
  691. package/build-module/components/post-excerpt/check.js +9 -23
  692. package/build-module/components/post-excerpt/check.js.map +7 -1
  693. package/build-module/components/post-excerpt/index.js +57 -68
  694. package/build-module/components/post-excerpt/index.js.map +7 -1
  695. package/build-module/components/post-excerpt/panel.js +124 -134
  696. package/build-module/components/post-excerpt/panel.js.map +7 -1
  697. package/build-module/components/post-excerpt/plugin.js +10 -65
  698. package/build-module/components/post-excerpt/plugin.js.map +7 -1
  699. package/build-module/components/post-featured-image/check.js +10 -28
  700. package/build-module/components/post-featured-image/check.js.map +7 -1
  701. package/build-module/components/post-featured-image/index.js +203 -200
  702. package/build-module/components/post-featured-image/index.js.map +7 -1
  703. package/build-module/components/post-featured-image/panel.js +26 -52
  704. package/build-module/components/post-featured-image/panel.js.map +7 -1
  705. package/build-module/components/post-fields/index.js +36 -49
  706. package/build-module/components/post-fields/index.js.map +7 -1
  707. package/build-module/components/post-format/check.js +14 -29
  708. package/build-module/components/post-format/check.js.map +7 -1
  709. package/build-module/components/post-format/index.js +68 -107
  710. package/build-module/components/post-format/index.js.map +7 -1
  711. package/build-module/components/post-format/panel.js +60 -73
  712. package/build-module/components/post-format/panel.js.map +7 -1
  713. package/build-module/components/post-last-edited-panel/index.js +20 -24
  714. package/build-module/components/post-last-edited-panel/index.js.map +7 -1
  715. package/build-module/components/post-last-revision/check.js +13 -37
  716. package/build-module/components/post-last-revision/check.js.map +7 -1
  717. package/build-module/components/post-last-revision/index.js +43 -59
  718. package/build-module/components/post-last-revision/index.js.map +7 -1
  719. package/build-module/components/post-last-revision/panel.js +10 -25
  720. package/build-module/components/post-last-revision/panel.js.map +7 -1
  721. package/build-module/components/post-locked-modal/index.js +133 -137
  722. package/build-module/components/post-locked-modal/index.js.map +7 -1
  723. package/build-module/components/post-panel-row/index.js +21 -29
  724. package/build-module/components/post-panel-row/index.js.map +7 -1
  725. package/build-module/components/post-panel-section/index.js +10 -20
  726. package/build-module/components/post-panel-section/index.js.map +7 -1
  727. package/build-module/components/post-pending-status/check.js +12 -35
  728. package/build-module/components/post-pending-status/check.js.map +7 -1
  729. package/build-module/components/post-pending-status/index.js +27 -36
  730. package/build-module/components/post-pending-status/index.js.map +7 -1
  731. package/build-module/components/post-pingbacks/index.js +34 -39
  732. package/build-module/components/post-pingbacks/index.js.map +7 -1
  733. package/build-module/components/post-preview-button/index.js +71 -114
  734. package/build-module/components/post-preview-button/index.js.map +7 -1
  735. package/build-module/components/post-publish-button/index.js +93 -130
  736. package/build-module/components/post-publish-button/index.js.map +7 -1
  737. package/build-module/components/post-publish-button/label.js +20 -35
  738. package/build-module/components/post-publish-button/label.js.map +7 -1
  739. package/build-module/components/post-publish-button/post-publish-button-or-toggle.js +28 -56
  740. package/build-module/components/post-publish-button/post-publish-button-or-toggle.js.map +7 -1
  741. package/build-module/components/post-publish-panel/index.js +108 -126
  742. package/build-module/components/post-publish-panel/index.js.map +7 -1
  743. package/build-module/components/post-publish-panel/maybe-category-panel.js +40 -58
  744. package/build-module/components/post-publish-panel/maybe-category-panel.js.map +7 -1
  745. package/build-module/components/post-publish-panel/maybe-post-format-panel.js +55 -59
  746. package/build-module/components/post-publish-panel/maybe-post-format-panel.js.map +7 -1
  747. package/build-module/components/post-publish-panel/maybe-tags-panel.js +57 -73
  748. package/build-module/components/post-publish-panel/maybe-tags-panel.js.map +7 -1
  749. package/build-module/components/post-publish-panel/maybe-upload-media.js +158 -207
  750. package/build-module/components/post-publish-panel/maybe-upload-media.js.map +7 -1
  751. package/build-module/components/post-publish-panel/media-util.js +42 -69
  752. package/build-module/components/post-publish-panel/media-util.js.map +7 -1
  753. package/build-module/components/post-publish-panel/postpublish.js +109 -120
  754. package/build-module/components/post-publish-panel/postpublish.js.map +7 -1
  755. package/build-module/components/post-publish-panel/prepublish.js +108 -96
  756. package/build-module/components/post-publish-panel/prepublish.js.map +7 -1
  757. package/build-module/components/post-saved-state/index.js +87 -124
  758. package/build-module/components/post-saved-state/index.js.map +7 -1
  759. package/build-module/components/post-schedule/check.js +9 -25
  760. package/build-module/components/post-schedule/check.js.map +7 -1
  761. package/build-module/components/post-schedule/index.js +75 -88
  762. package/build-module/components/post-schedule/index.js.map +7 -1
  763. package/build-module/components/post-schedule/label.js +49 -73
  764. package/build-module/components/post-schedule/label.js.map +7 -1
  765. package/build-module/components/post-schedule/panel.js +63 -65
  766. package/build-module/components/post-schedule/panel.js.map +7 -1
  767. package/build-module/components/post-status/index.js +223 -194
  768. package/build-module/components/post-status/index.js.map +7 -1
  769. package/build-module/components/post-sticky/check.js +10 -29
  770. package/build-module/components/post-sticky/check.js.map +7 -1
  771. package/build-module/components/post-sticky/index.js +22 -36
  772. package/build-module/components/post-sticky/index.js.map +7 -1
  773. package/build-module/components/post-sticky/panel.js +12 -15
  774. package/build-module/components/post-sticky/panel.js.map +7 -1
  775. package/build-module/components/post-switch-to-draft-button/index.js +54 -70
  776. package/build-module/components/post-switch-to-draft-button/index.js.map +7 -1
  777. package/build-module/components/post-sync-status/index.js +17 -40
  778. package/build-module/components/post-sync-status/index.js.map +7 -1
  779. package/build-module/components/post-taxonomies/check.js +17 -28
  780. package/build-module/components/post-taxonomies/check.js.map +7 -1
  781. package/build-module/components/post-taxonomies/flat-term-selector.js +154 -177
  782. package/build-module/components/post-taxonomies/flat-term-selector.js.map +7 -1
  783. package/build-module/components/post-taxonomies/hierarchical-term-selector.js +232 -270
  784. package/build-module/components/post-taxonomies/hierarchical-term-selector.js.map +7 -1
  785. package/build-module/components/post-taxonomies/index.js +34 -49
  786. package/build-module/components/post-taxonomies/index.js.map +7 -1
  787. package/build-module/components/post-taxonomies/most-used-terms.js +54 -50
  788. package/build-module/components/post-taxonomies/most-used-terms.js.map +7 -1
  789. package/build-module/components/post-taxonomies/panel.js +39 -66
  790. package/build-module/components/post-taxonomies/panel.js.map +7 -1
  791. package/build-module/components/post-template/block-theme.js +134 -114
  792. package/build-module/components/post-template/block-theme.js.map +7 -1
  793. package/build-module/components/post-template/classic-theme.js +161 -177
  794. package/build-module/components/post-template/classic-theme.js.map +7 -1
  795. package/build-module/components/post-template/create-new-template-modal.js +126 -104
  796. package/build-module/components/post-template/create-new-template-modal.js.map +7 -1
  797. package/build-module/components/post-template/create-new-template.js +36 -39
  798. package/build-module/components/post-template/create-new-template.js.map +7 -1
  799. package/build-module/components/post-template/hooks.js +95 -80
  800. package/build-module/components/post-template/hooks.js.map +7 -1
  801. package/build-module/components/post-template/panel.js +25 -45
  802. package/build-module/components/post-template/panel.js.map +7 -1
  803. package/build-module/components/post-template/reset-default-template.js +33 -36
  804. package/build-module/components/post-template/reset-default-template.js.map +7 -1
  805. package/build-module/components/post-template/swap-template-button.js +86 -81
  806. package/build-module/components/post-template/swap-template-button.js.map +7 -1
  807. package/build-module/components/post-text-editor/index.js +49 -74
  808. package/build-module/components/post-text-editor/index.js.map +7 -1
  809. package/build-module/components/post-title/constants.js +7 -3
  810. package/build-module/components/post-title/constants.js.map +7 -1
  811. package/build-module/components/post-title/index.js +67 -111
  812. package/build-module/components/post-title/index.js.map +7 -1
  813. package/build-module/components/post-title/post-title-raw.js +43 -71
  814. package/build-module/components/post-title/post-title-raw.js.map +7 -1
  815. package/build-module/components/post-title/use-post-title-focus.js +15 -46
  816. package/build-module/components/post-title/use-post-title-focus.js.map +7 -1
  817. package/build-module/components/post-title/use-post-title.js +13 -33
  818. package/build-module/components/post-title/use-post-title.js.map +7 -1
  819. package/build-module/components/post-transform-panel/hooks.js +44 -58
  820. package/build-module/components/post-transform-panel/hooks.js.map +7 -1
  821. package/build-module/components/post-transform-panel/index.js +53 -69
  822. package/build-module/components/post-transform-panel/index.js.map +7 -1
  823. package/build-module/components/post-trash/check.js +14 -37
  824. package/build-module/components/post-trash/check.js.map +7 -1
  825. package/build-module/components/post-trash/index.js +49 -59
  826. package/build-module/components/post-trash/index.js.map +7 -1
  827. package/build-module/components/post-type-support-check/index.js +16 -42
  828. package/build-module/components/post-type-support-check/index.js.map +7 -1
  829. package/build-module/components/post-url/check.js +9 -24
  830. package/build-module/components/post-url/check.js.map +7 -1
  831. package/build-module/components/post-url/index.js +137 -146
  832. package/build-module/components/post-url/index.js.map +7 -1
  833. package/build-module/components/post-url/label.js +14 -26
  834. package/build-module/components/post-url/label.js.map +7 -1
  835. package/build-module/components/post-url/panel.js +80 -105
  836. package/build-module/components/post-url/panel.js.map +7 -1
  837. package/build-module/components/post-view-link/index.js +27 -39
  838. package/build-module/components/post-view-link/index.js.map +7 -1
  839. package/build-module/components/post-visibility/check.js +10 -29
  840. package/build-module/components/post-visibility/check.js.map +7 -1
  841. package/build-module/components/post-visibility/index.js +66 -78
  842. package/build-module/components/post-visibility/index.js.map +7 -1
  843. package/build-module/components/post-visibility/label.js +15 -27
  844. package/build-module/components/post-visibility/label.js.map +7 -1
  845. package/build-module/components/post-visibility/utils.js +22 -18
  846. package/build-module/components/post-visibility/utils.js.map +7 -1
  847. package/build-module/components/posts-per-page/index.js +85 -91
  848. package/build-module/components/posts-per-page/index.js.map +7 -1
  849. package/build-module/components/preferences-modal/enable-panel.js +30 -38
  850. package/build-module/components/preferences-modal/enable-panel.js.map +7 -1
  851. package/build-module/components/preferences-modal/enable-plugin-document-setting-panel.js +12 -25
  852. package/build-module/components/preferences-modal/enable-plugin-document-setting-panel.js.map +7 -1
  853. package/build-module/components/preferences-modal/enable-publish-sidebar.js +21 -27
  854. package/build-module/components/preferences-modal/enable-publish-sidebar.js.map +7 -1
  855. package/build-module/components/preferences-modal/index.js +365 -225
  856. package/build-module/components/preferences-modal/index.js.map +7 -1
  857. package/build-module/components/preview-dropdown/index.js +140 -141
  858. package/build-module/components/preview-dropdown/index.js.map +7 -1
  859. package/build-module/components/provider/disable-non-page-content-blocks.js +34 -72
  860. package/build-module/components/provider/disable-non-page-content-blocks.js.map +7 -1
  861. package/build-module/components/provider/index.js +257 -317
  862. package/build-module/components/provider/index.js.map +7 -1
  863. package/build-module/components/provider/navigation-block-editing-mode.js +14 -25
  864. package/build-module/components/provider/navigation-block-editing-mode.js.map +7 -1
  865. package/build-module/components/provider/use-auto-switch-editor-sidebars.js +28 -33
  866. package/build-module/components/provider/use-auto-switch-editor-sidebars.js.map +7 -1
  867. package/build-module/components/provider/use-block-editor-settings.js +223 -166
  868. package/build-module/components/provider/use-block-editor-settings.js.map +7 -1
  869. package/build-module/components/provider/use-hide-blocks-from-inserter.js +65 -42
  870. package/build-module/components/provider/use-hide-blocks-from-inserter.js.map +7 -1
  871. package/build-module/components/provider/use-post-content-blocks.js +31 -25
  872. package/build-module/components/provider/use-post-content-blocks.js.map +7 -1
  873. package/build-module/components/provider/with-registry-provider.js +34 -41
  874. package/build-module/components/provider/with-registry-provider.js.map +7 -1
  875. package/build-module/components/resizable-editor/index.js +70 -80
  876. package/build-module/components/resizable-editor/index.js.map +7 -1
  877. package/build-module/components/resizable-editor/resize-handle.js +27 -30
  878. package/build-module/components/resizable-editor/resize-handle.js.map +7 -1
  879. package/build-module/components/save-publish-panels/index.js +56 -62
  880. package/build-module/components/save-publish-panels/index.js.map +7 -1
  881. package/build-module/components/sidebar/constants.js +7 -4
  882. package/build-module/components/sidebar/constants.js.map +7 -1
  883. package/build-module/components/sidebar/header.js +38 -45
  884. package/build-module/components/sidebar/header.js.map +7 -1
  885. package/build-module/components/sidebar/index.js +136 -125
  886. package/build-module/components/sidebar/index.js.map +7 -1
  887. package/build-module/components/sidebar/post-summary.js +86 -87
  888. package/build-module/components/sidebar/post-summary.js.map +7 -1
  889. package/build-module/components/site-discussion/index.js +110 -107
  890. package/build-module/components/site-discussion/index.js.map +7 -1
  891. package/build-module/components/start-page-options/index.js +114 -137
  892. package/build-module/components/start-page-options/index.js.map +7 -1
  893. package/build-module/components/start-template-options/index.js +148 -150
  894. package/build-module/components/start-template-options/index.js.map +7 -1
  895. package/build-module/components/table-of-contents/index.js +50 -63
  896. package/build-module/components/table-of-contents/index.js.map +7 -1
  897. package/build-module/components/table-of-contents/panel.js +73 -88
  898. package/build-module/components/table-of-contents/panel.js.map +7 -1
  899. package/build-module/components/template-content-panel/index.js +57 -54
  900. package/build-module/components/template-content-panel/index.js.map +7 -1
  901. package/build-module/components/template-part-content-panel/index.js +35 -48
  902. package/build-module/components/template-part-content-panel/index.js.map +7 -1
  903. package/build-module/components/template-part-menu-items/convert-to-regular.js +26 -27
  904. package/build-module/components/template-part-menu-items/convert-to-regular.js.map +7 -1
  905. package/build-module/components/template-part-menu-items/convert-to-template-part.js +56 -61
  906. package/build-module/components/template-part-menu-items/convert-to-template-part.js.map +7 -1
  907. package/build-module/components/template-part-menu-items/index.js +38 -47
  908. package/build-module/components/template-part-menu-items/index.js.map +7 -1
  909. package/build-module/components/template-validation-notice/index.js +55 -41
  910. package/build-module/components/template-validation-notice/index.js.map +7 -1
  911. package/build-module/components/text-editor/index.js +38 -54
  912. package/build-module/components/text-editor/index.js.map +7 -1
  913. package/build-module/components/theme-support-check/index.js +13 -38
  914. package/build-module/components/theme-support-check/index.js.map +7 -1
  915. package/build-module/components/time-to-read/index.js +36 -48
  916. package/build-module/components/time-to-read/index.js.map +7 -1
  917. package/build-module/components/unsaved-changes-warning/index.js +16 -34
  918. package/build-module/components/unsaved-changes-warning/index.js.map +7 -1
  919. package/build-module/components/visual-editor/edit-template-blocks-notification.js +44 -63
  920. package/build-module/components/visual-editor/edit-template-blocks-notification.js.map +7 -1
  921. package/build-module/components/visual-editor/index.js +256 -225
  922. package/build-module/components/visual-editor/index.js.map +7 -1
  923. package/build-module/components/visual-editor/use-select-nearest-editable-block.js +58 -64
  924. package/build-module/components/visual-editor/use-select-nearest-editable-block.js.map +7 -1
  925. package/build-module/components/visual-editor/use-zoom-out-mode-exit.js +31 -43
  926. package/build-module/components/visual-editor/use-zoom-out-mode-exit.js.map +7 -1
  927. package/build-module/components/word-count/index.js +16 -32
  928. package/build-module/components/word-count/index.js.map +7 -1
  929. package/build-module/components/zoom-out-toggle/index.js +72 -66
  930. package/build-module/components/zoom-out-toggle/index.js.map +7 -1
  931. package/build-module/dataviews/api.js +26 -77
  932. package/build-module/dataviews/api.js.map +7 -1
  933. package/build-module/dataviews/fields/content-preview/content-preview-view.js +66 -85
  934. package/build-module/dataviews/fields/content-preview/content-preview-view.js.map +7 -1
  935. package/build-module/dataviews/fields/content-preview/index.js +10 -15
  936. package/build-module/dataviews/fields/content-preview/index.js.map +7 -1
  937. package/build-module/dataviews/store/private-actions.js +113 -43
  938. package/build-module/dataviews/store/private-actions.js.map +7 -1
  939. package/build-module/dataviews/store/private-selectors.js +11 -12
  940. package/build-module/dataviews/store/private-selectors.js.map +7 -1
  941. package/build-module/dataviews/store/reducer.js +32 -26
  942. package/build-module/dataviews/store/reducer.js.map +7 -1
  943. package/build-module/hooks/custom-sources-backwards-compatibility.js +70 -83
  944. package/build-module/hooks/custom-sources-backwards-compatibility.js.map +7 -1
  945. package/build-module/hooks/default-autocompleters.js +9 -15
  946. package/build-module/hooks/default-autocompleters.js.map +7 -1
  947. package/build-module/hooks/index.js +7 -9
  948. package/build-module/hooks/index.js.map +7 -1
  949. package/build-module/hooks/media-upload.js +8 -7
  950. package/build-module/hooks/media-upload.js.map +7 -1
  951. package/build-module/hooks/navigation-link-view-button.js +46 -63
  952. package/build-module/hooks/navigation-link-view-button.js.map +7 -1
  953. package/build-module/hooks/pattern-overrides.js +48 -67
  954. package/build-module/hooks/pattern-overrides.js.map +7 -1
  955. package/build-module/hooks/template-part-navigation-edit-button.js +97 -0
  956. package/build-module/hooks/template-part-navigation-edit-button.js.map +7 -0
  957. package/build-module/index.js +13 -15
  958. package/build-module/index.js.map +7 -1
  959. package/build-module/lock-unlock.js +8 -7
  960. package/build-module/lock-unlock.js.map +7 -1
  961. package/build-module/private-apis.js +31 -31
  962. package/build-module/private-apis.js.map +7 -1
  963. package/build-module/store/actions.js +424 -872
  964. package/build-module/store/actions.js.map +7 -1
  965. package/build-module/store/constants.js +36 -27
  966. package/build-module/store/constants.js.map +7 -1
  967. package/build-module/store/defaults.js +8 -28
  968. package/build-module/store/defaults.js.map +7 -1
  969. package/build-module/store/index.js +15 -30
  970. package/build-module/store/index.js.map +7 -1
  971. package/build-module/store/local-autosave.js +18 -24
  972. package/build-module/store/local-autosave.js.map +7 -1
  973. package/build-module/store/private-actions.js +242 -257
  974. package/build-module/store/private-actions.js.map +7 -1
  975. package/build-module/store/private-selectors.js +157 -174
  976. package/build-module/store/private-selectors.js.map +7 -1
  977. package/build-module/store/reducer.js +89 -267
  978. package/build-module/store/reducer.js.map +7 -1
  979. package/build-module/store/selectors.js +712 -1433
  980. package/build-module/store/selectors.js.map +7 -1
  981. package/build-module/store/utils/is-template-revertable.js +6 -15
  982. package/build-module/store/utils/is-template-revertable.js.map +7 -1
  983. package/build-module/store/utils/notice-builder.js +52 -91
  984. package/build-module/store/utils/notice-builder.js.map +7 -1
  985. package/build-module/utils/get-item-title.js +10 -19
  986. package/build-module/utils/get-item-title.js.map +7 -1
  987. package/build-module/utils/get-template-info.js +14 -38
  988. package/build-module/utils/get-template-info.js.map +7 -1
  989. package/build-module/utils/get-template-part-icon.js +14 -16
  990. package/build-module/utils/get-template-part-icon.js.map +7 -1
  991. package/build-module/utils/index.js +9 -8
  992. package/build-module/utils/index.js.map +7 -1
  993. package/build-module/utils/media-sideload/index.js +8 -14
  994. package/build-module/utils/media-sideload/index.js.map +7 -1
  995. package/build-module/utils/media-upload/index.js +26 -56
  996. package/build-module/utils/media-upload/index.js.map +7 -1
  997. package/build-module/utils/pageTypeBadge.js +16 -28
  998. package/build-module/utils/pageTypeBadge.js.map +7 -1
  999. package/build-module/utils/search-templates.js +12 -41
  1000. package/build-module/utils/search-templates.js.map +7 -1
  1001. package/build-module/utils/terms.js +32 -55
  1002. package/build-module/utils/terms.js.map +7 -1
  1003. package/build-module/utils/url.js +11 -28
  1004. package/build-module/utils/url.js.map +7 -1
  1005. package/build-style/style-rtl.css +327 -136
  1006. package/build-style/style.css +327 -136
  1007. package/build-types/bindings/entity.d.ts +16 -0
  1008. package/build-types/bindings/entity.d.ts.map +1 -0
  1009. package/build-types/bindings/post-data.d.ts +16 -0
  1010. package/build-types/bindings/post-meta.d.ts +13 -0
  1011. package/build-types/components/{preferences-modal/block-visibility.d.ts → block-visibility/index.d.ts} +1 -1
  1012. package/build-types/components/block-visibility/index.d.ts.map +1 -0
  1013. package/build-types/components/collab-sidebar/add-comment.d.ts +6 -14
  1014. package/build-types/components/collab-sidebar/add-comment.d.ts.map +1 -1
  1015. package/build-types/components/collab-sidebar/comment-form.d.ts +9 -18
  1016. package/build-types/components/collab-sidebar/comment-form.d.ts.map +1 -1
  1017. package/build-types/components/collab-sidebar/comment-menu-item.d.ts +5 -0
  1018. package/build-types/components/collab-sidebar/comment-menu-item.d.ts.map +1 -0
  1019. package/build-types/components/collab-sidebar/comments.d.ts +10 -1
  1020. package/build-types/components/collab-sidebar/comments.d.ts.map +1 -1
  1021. package/build-types/components/collab-sidebar/hooks.d.ts +33 -0
  1022. package/build-types/components/collab-sidebar/hooks.d.ts.map +1 -1
  1023. package/build-types/components/collab-sidebar/index.d.ts.map +1 -1
  1024. package/build-types/components/collab-sidebar/utils.d.ts +20 -0
  1025. package/build-types/components/collab-sidebar/utils.d.ts.map +1 -1
  1026. package/build-types/components/document-tools/index.d.ts.map +1 -1
  1027. package/build-types/components/header/index.d.ts.map +1 -1
  1028. package/build-types/components/post-excerpt/panel.d.ts.map +1 -1
  1029. package/build-types/components/post-template/block-theme.d.ts.map +1 -1
  1030. package/build-types/components/post-template/hooks.d.ts.map +1 -1
  1031. package/build-types/components/provider/disable-non-page-content-blocks.d.ts.map +1 -1
  1032. package/build-types/components/provider/use-hide-blocks-from-inserter.d.ts.map +1 -1
  1033. package/build-types/components/visual-editor/index.d.ts.map +1 -1
  1034. package/build-types/hooks/template-part-navigation-edit-button.d.ts +2 -0
  1035. package/build-types/hooks/template-part-navigation-edit-button.d.ts.map +1 -0
  1036. package/build-types/store/actions.d.ts.map +1 -1
  1037. package/package.json +59 -39
  1038. package/src/bindings/api.js +2 -2
  1039. package/src/bindings/entity.js +89 -0
  1040. package/src/bindings/post-data.js +23 -0
  1041. package/src/bindings/post-meta.js +19 -0
  1042. package/src/components/autocompleters/style.scss +2 -0
  1043. package/src/components/block-settings-menu/style.scss +2 -0
  1044. package/src/components/{preferences-modal/block-visibility.js → block-visibility/index.js} +37 -5
  1045. package/src/components/block-visibility/style.scss +25 -0
  1046. package/src/components/blog-title/style.scss +2 -0
  1047. package/src/components/collab-sidebar/add-comment.js +18 -17
  1048. package/src/components/collab-sidebar/comment-author-info.js +2 -2
  1049. package/src/components/collab-sidebar/comment-form.js +15 -17
  1050. package/src/components/collab-sidebar/comment-indicator-toolbar.js +2 -2
  1051. package/src/components/collab-sidebar/{comment-button.js → comment-menu-item.js} +4 -4
  1052. package/src/components/collab-sidebar/comments.js +413 -183
  1053. package/src/components/collab-sidebar/hooks.js +343 -22
  1054. package/src/components/collab-sidebar/index.js +94 -190
  1055. package/src/components/collab-sidebar/style.scss +44 -26
  1056. package/src/components/collab-sidebar/utils.js +55 -0
  1057. package/src/components/collapsible-block-toolbar/style.scss +5 -1
  1058. package/src/components/commands/index.js +2 -2
  1059. package/src/components/document-bar/style.scss +5 -0
  1060. package/src/components/document-outline/style.scss +3 -0
  1061. package/src/components/document-tools/index.js +1 -20
  1062. package/src/components/document-tools/style.scss +4 -0
  1063. package/src/components/editor-help/style.scss +3 -0
  1064. package/src/components/editor-interface/style.scss +2 -0
  1065. package/src/components/editor-notices/style.scss +3 -0
  1066. package/src/components/entities-saved-states/style.scss +3 -0
  1067. package/src/components/error-boundary/style.scss +3 -0
  1068. package/src/components/header/index.js +3 -8
  1069. package/src/components/header/style.scss +6 -0
  1070. package/src/components/inserter-sidebar/style.scss +2 -0
  1071. package/src/components/keyboard-shortcut-help-modal/style.scss +2 -0
  1072. package/src/components/list-view-sidebar/style.scss +4 -1
  1073. package/src/components/page-attributes/style.scss +2 -0
  1074. package/src/components/post-actions/style.scss +2 -0
  1075. package/src/components/post-author/style.scss +2 -0
  1076. package/src/components/post-card-panel/style.scss +4 -0
  1077. package/src/components/post-content-information/style.scss +2 -0
  1078. package/src/components/post-discussion/style.scss +2 -0
  1079. package/src/components/post-excerpt/panel.js +12 -6
  1080. package/src/components/post-excerpt/style.scss +2 -0
  1081. package/src/components/post-featured-image/style.scss +7 -0
  1082. package/src/components/post-format/style.scss +2 -0
  1083. package/src/components/post-last-edited-panel/style.scss +2 -0
  1084. package/src/components/post-last-revision/style.scss +3 -0
  1085. package/src/components/post-locked-modal/style.scss +2 -0
  1086. package/src/components/post-panel-row/style.scss +2 -0
  1087. package/src/components/post-panel-section/style.scss +2 -0
  1088. package/src/components/post-publish-button/post-publish-button-or-toggle.js +1 -1
  1089. package/src/components/post-publish-panel/style.scss +5 -0
  1090. package/src/components/post-saved-state/style.scss +4 -0
  1091. package/src/components/post-schedule/style.scss +2 -0
  1092. package/src/components/post-status/style.scss +3 -0
  1093. package/src/components/post-sticky/style.scss +3 -0
  1094. package/src/components/post-sync-status/style.scss +2 -0
  1095. package/src/components/post-taxonomies/style.scss +2 -0
  1096. package/src/components/post-template/block-theme.js +45 -3
  1097. package/src/components/post-template/hooks.js +48 -21
  1098. package/src/components/post-template/style.scss +5 -0
  1099. package/src/components/post-text-editor/style.scss +4 -0
  1100. package/src/components/post-title/style.scss +2 -0
  1101. package/src/components/post-url/style.scss +2 -0
  1102. package/src/components/posts-per-page/style.scss +2 -0
  1103. package/src/components/preferences-modal/index.js +1 -1
  1104. package/src/components/provider/disable-non-page-content-blocks.js +7 -13
  1105. package/src/components/provider/use-hide-blocks-from-inserter.js +37 -6
  1106. package/src/components/resizable-editor/style.scss +4 -0
  1107. package/src/components/save-publish-panels/style.scss +4 -0
  1108. package/src/components/sidebar/style.scss +3 -0
  1109. package/src/components/site-discussion/style.scss +2 -1
  1110. package/src/components/start-page-options/style.scss +5 -0
  1111. package/src/components/start-template-options/style.scss +5 -0
  1112. package/src/components/table-of-contents/style.scss +5 -0
  1113. package/src/components/text-editor/style.scss +6 -0
  1114. package/src/components/visual-editor/index.js +11 -21
  1115. package/src/components/visual-editor/style.scss +3 -1
  1116. package/src/dataviews/fields/content-preview/style.scss +2 -0
  1117. package/src/hooks/index.js +1 -0
  1118. package/src/hooks/template-part-navigation-edit-button.js +145 -0
  1119. package/src/store/actions.js +6 -1
  1120. package/src/style.scss +57 -56
  1121. package/tsconfig.tsbuildinfo +1 -1
  1122. package/build/bindings/term-data.js +0 -171
  1123. package/build/bindings/term-data.js.map +0 -1
  1124. package/build/components/block-settings-menu/content-only-settings-menu.native.js +0 -11
  1125. package/build/components/block-settings-menu/content-only-settings-menu.native.js.map +0 -1
  1126. package/build/components/collab-sidebar/comment-button.js +0 -42
  1127. package/build/components/collab-sidebar/comment-button.js.map +0 -1
  1128. package/build/components/commands/index.native.js +0 -9
  1129. package/build/components/commands/index.native.js.map +0 -1
  1130. package/build/components/deprecated.native.js +0 -121
  1131. package/build/components/deprecated.native.js.map +0 -1
  1132. package/build/components/editor-help/add-blocks.native.js +0 -41
  1133. package/build/components/editor-help/add-blocks.native.js.map +0 -1
  1134. package/build/components/editor-help/customize-blocks.native.js +0 -41
  1135. package/build/components/editor-help/customize-blocks.native.js.map +0 -1
  1136. package/build/components/editor-help/help-detail-navigation-screen.native.js +0 -69
  1137. package/build/components/editor-help/help-detail-navigation-screen.native.js.map +0 -1
  1138. package/build/components/editor-help/help-get-support-button.native.js +0 -41
  1139. package/build/components/editor-help/help-get-support-button.native.js.map +0 -1
  1140. package/build/components/editor-help/help-section-title.native.js +0 -37
  1141. package/build/components/editor-help/help-section-title.native.js.map +0 -1
  1142. package/build/components/editor-help/help-topic-row.native.js +0 -42
  1143. package/build/components/editor-help/help-topic-row.native.js.map +0 -1
  1144. package/build/components/editor-help/icon-move-blocks.native.js +0 -19
  1145. package/build/components/editor-help/icon-move-blocks.native.js.map +0 -1
  1146. package/build/components/editor-help/index.native.js +0 -173
  1147. package/build/components/editor-help/index.native.js.map +0 -1
  1148. package/build/components/editor-help/intro-to-blocks.native.js +0 -70
  1149. package/build/components/editor-help/intro-to-blocks.native.js.map +0 -1
  1150. package/build/components/editor-help/move-blocks.native.js +0 -52
  1151. package/build/components/editor-help/move-blocks.native.js.map +0 -1
  1152. package/build/components/editor-help/remove-blocks.native.js +0 -39
  1153. package/build/components/editor-help/remove-blocks.native.js.map +0 -1
  1154. package/build/components/editor-help/view-sections.native.js +0 -80
  1155. package/build/components/editor-help/view-sections.native.js.map +0 -1
  1156. package/build/components/error-boundary/index.native.js +0 -143
  1157. package/build/components/error-boundary/index.native.js.map +0 -1
  1158. package/build/components/index.native.js +0 -85
  1159. package/build/components/index.native.js.map +0 -1
  1160. package/build/components/offline-status/index.native.js +0 -83
  1161. package/build/components/offline-status/index.native.js.map +0 -1
  1162. package/build/components/post-title/index.native.js +0 -251
  1163. package/build/components/post-title/index.native.js.map +0 -1
  1164. package/build/components/preferences-modal/block-visibility.js +0 -88
  1165. package/build/components/preferences-modal/block-visibility.js.map +0 -1
  1166. package/build/components/provider/index.native.js +0 -426
  1167. package/build/components/provider/index.native.js.map +0 -1
  1168. package/build/components/provider/use-block-editor-settings.native.js +0 -46
  1169. package/build/components/provider/use-block-editor-settings.native.js.map +0 -1
  1170. package/build/components/template-part-menu-items/index.native.js +0 -10
  1171. package/build/components/template-part-menu-items/index.native.js.map +0 -1
  1172. package/build/hooks/index.native.js +0 -2
  1173. package/build/hooks/index.native.js.map +0 -1
  1174. package/build/index.native.js +0 -56
  1175. package/build/index.native.js.map +0 -1
  1176. package/build/private-apis.native.js +0 -44
  1177. package/build/private-apis.native.js.map +0 -1
  1178. package/build/store/actions.native.js +0 -51
  1179. package/build/store/actions.native.js.map +0 -1
  1180. package/build/store/reducer.native.js +0 -105
  1181. package/build/store/reducer.native.js.map +0 -1
  1182. package/build/store/selectors.native.js +0 -70
  1183. package/build/store/selectors.native.js.map +0 -1
  1184. package/build/utils/index.native.js +0 -14
  1185. package/build/utils/index.native.js.map +0 -1
  1186. package/build/utils/media-sideload/index.native.js +0 -8
  1187. package/build/utils/media-sideload/index.native.js.map +0 -1
  1188. package/build/utils/media-upload/index.native.js +0 -8
  1189. package/build/utils/media-upload/index.native.js.map +0 -1
  1190. package/build-module/bindings/term-data.js +0 -165
  1191. package/build-module/bindings/term-data.js.map +0 -1
  1192. package/build-module/components/block-settings-menu/content-only-settings-menu.native.js +0 -5
  1193. package/build-module/components/block-settings-menu/content-only-settings-menu.native.js.map +0 -1
  1194. package/build-module/components/collab-sidebar/comment-button.js +0 -35
  1195. package/build-module/components/collab-sidebar/comment-button.js.map +0 -1
  1196. package/build-module/components/commands/index.native.js +0 -3
  1197. package/build-module/components/commands/index.native.js.map +0 -1
  1198. package/build-module/components/deprecated.native.js +0 -7
  1199. package/build-module/components/deprecated.native.js.map +0 -1
  1200. package/build-module/components/editor-help/add-blocks.native.js +0 -33
  1201. package/build-module/components/editor-help/add-blocks.native.js.map +0 -1
  1202. package/build-module/components/editor-help/customize-blocks.native.js +0 -33
  1203. package/build-module/components/editor-help/customize-blocks.native.js.map +0 -1
  1204. package/build-module/components/editor-help/help-detail-navigation-screen.native.js +0 -61
  1205. package/build-module/components/editor-help/help-detail-navigation-screen.native.js.map +0 -1
  1206. package/build-module/components/editor-help/help-get-support-button.native.js +0 -33
  1207. package/build-module/components/editor-help/help-get-support-button.native.js.map +0 -1
  1208. package/build-module/components/editor-help/help-section-title.native.js +0 -29
  1209. package/build-module/components/editor-help/help-section-title.native.js.map +0 -1
  1210. package/build-module/components/editor-help/help-topic-row.native.js +0 -35
  1211. package/build-module/components/editor-help/help-topic-row.native.js.map +0 -1
  1212. package/build-module/components/editor-help/icon-move-blocks.native.js +0 -13
  1213. package/build-module/components/editor-help/icon-move-blocks.native.js.map +0 -1
  1214. package/build-module/components/editor-help/index.native.js +0 -165
  1215. package/build-module/components/editor-help/index.native.js.map +0 -1
  1216. package/build-module/components/editor-help/intro-to-blocks.native.js +0 -62
  1217. package/build-module/components/editor-help/intro-to-blocks.native.js.map +0 -1
  1218. package/build-module/components/editor-help/move-blocks.native.js +0 -44
  1219. package/build-module/components/editor-help/move-blocks.native.js.map +0 -1
  1220. package/build-module/components/editor-help/remove-blocks.native.js +0 -31
  1221. package/build-module/components/editor-help/remove-blocks.native.js.map +0 -1
  1222. package/build-module/components/editor-help/view-sections.native.js +0 -69
  1223. package/build-module/components/editor-help/view-sections.native.js.map +0 -1
  1224. package/build-module/components/error-boundary/index.native.js +0 -135
  1225. package/build-module/components/error-boundary/index.native.js.map +0 -1
  1226. package/build-module/components/index.native.js +0 -15
  1227. package/build-module/components/index.native.js.map +0 -1
  1228. package/build-module/components/offline-status/index.native.js +0 -77
  1229. package/build-module/components/offline-status/index.native.js.map +0 -1
  1230. package/build-module/components/post-title/index.native.js +0 -243
  1231. package/build-module/components/post-title/index.native.js.map +0 -1
  1232. package/build-module/components/preferences-modal/block-visibility.js +0 -81
  1233. package/build-module/components/preferences-modal/block-visibility.js.map +0 -1
  1234. package/build-module/components/provider/index.native.js +0 -416
  1235. package/build-module/components/provider/index.native.js.map +0 -1
  1236. package/build-module/components/provider/use-block-editor-settings.native.js +0 -38
  1237. package/build-module/components/provider/use-block-editor-settings.native.js.map +0 -1
  1238. package/build-module/components/template-part-menu-items/index.native.js +0 -4
  1239. package/build-module/components/template-part-menu-items/index.native.js.map +0 -1
  1240. package/build-module/hooks/index.native.js +0 -2
  1241. package/build-module/hooks/index.native.js.map +0 -1
  1242. package/build-module/index.native.js +0 -16
  1243. package/build-module/index.native.js.map +0 -1
  1244. package/build-module/private-apis.native.js +0 -34
  1245. package/build-module/private-apis.native.js.map +0 -1
  1246. package/build-module/store/actions.native.js +0 -27
  1247. package/build-module/store/actions.native.js.map +0 -1
  1248. package/build-module/store/reducer.native.js +0 -81
  1249. package/build-module/store/reducer.native.js.map +0 -1
  1250. package/build-module/store/selectors.native.js +0 -49
  1251. package/build-module/store/selectors.native.js.map +0 -1
  1252. package/build-module/utils/index.native.js +0 -6
  1253. package/build-module/utils/index.native.js.map +0 -1
  1254. package/build-module/utils/media-sideload/index.native.js +0 -2
  1255. package/build-module/utils/media-sideload/index.native.js.map +0 -1
  1256. package/build-module/utils/media-upload/index.native.js +0 -2
  1257. package/build-module/utils/media-upload/index.native.js.map +0 -1
  1258. package/build-types/bindings/term-data.d.ts +0 -25
  1259. package/build-types/bindings/term-data.d.ts.map +0 -1
  1260. package/build-types/components/collab-sidebar/comment-button.d.ts +0 -5
  1261. package/build-types/components/collab-sidebar/comment-button.d.ts.map +0 -1
  1262. package/build-types/components/preferences-modal/block-visibility.d.ts.map +0 -1
  1263. package/src/bindings/term-data.js +0 -159
@@ -1,64 +1,74 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
-
5
- import { _n } from '@wordpress/i18n';
6
- import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
7
- import { useSelect } from '@wordpress/data';
8
- import { useMemo } from '@wordpress/element';
9
-
10
- /**
11
- * Internal dependencies
12
- */
13
- import { unlock } from '../../lock-unlock';
14
- import { store as editorStore } from '../../store';
15
- import { jsx as _jsx } from "react/jsx-runtime";
16
- const {
17
- BlockRemovalWarningModal
18
- } = unlock(blockEditorPrivateApis);
19
-
20
- // Prevent accidental removal of certain blocks, asking the user for confirmation first.
21
- const TEMPLATE_BLOCKS = ['core/post-content', 'core/post-template', 'core/query'];
22
- const BLOCK_REMOVAL_RULES = [{
23
- // Template blocks.
24
- // The warning is only shown when a user manipulates templates or template parts.
25
- postTypes: ['wp_template', 'wp_template_part'],
26
- callback(removedBlocks) {
27
- const removedTemplateBlocks = removedBlocks.filter(({
28
- name
29
- }) => TEMPLATE_BLOCKS.includes(name));
30
- if (removedTemplateBlocks.length) {
31
- return _n('Deleting this block will stop your post or page content from displaying on this template. It is not recommended.', 'Some of the deleted blocks will stop your post or page content from displaying on this template. It is not recommended.', removedBlocks.length);
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { _n } from "@wordpress/i18n";
3
+ import { privateApis as blockEditorPrivateApis } from "@wordpress/block-editor";
4
+ import { useSelect } from "@wordpress/data";
5
+ import { useMemo } from "@wordpress/element";
6
+ import { unlock } from "../../lock-unlock";
7
+ import { store as editorStore } from "../../store";
8
+ const { BlockRemovalWarningModal } = unlock(blockEditorPrivateApis);
9
+ const TEMPLATE_BLOCKS = [
10
+ "core/post-content",
11
+ "core/post-template",
12
+ "core/query"
13
+ ];
14
+ const BLOCK_REMOVAL_RULES = [
15
+ {
16
+ // Template blocks.
17
+ // The warning is only shown when a user manipulates templates or template parts.
18
+ postTypes: ["wp_template", "wp_template_part"],
19
+ callback(removedBlocks) {
20
+ const removedTemplateBlocks = removedBlocks.filter(
21
+ ({ name }) => TEMPLATE_BLOCKS.includes(name)
22
+ );
23
+ if (removedTemplateBlocks.length) {
24
+ return _n(
25
+ "Deleting this block will stop your post or page content from displaying on this template. It is not recommended.",
26
+ "Some of the deleted blocks will stop your post or page content from displaying on this template. It is not recommended.",
27
+ removedBlocks.length
28
+ );
29
+ }
32
30
  }
33
- }
34
- }, {
35
- // Pattern overrides.
36
- // The warning is only shown when the user edits a pattern.
37
- postTypes: ['wp_block'],
38
- callback(removedBlocks) {
39
- const removedBlocksWithOverrides = removedBlocks.filter(({
40
- attributes
41
- }) => attributes?.metadata?.bindings && Object.values(attributes.metadata.bindings).some(binding => binding.source === 'core/pattern-overrides'));
42
- if (removedBlocksWithOverrides.length) {
43
- return _n('The deleted block allows instance overrides. Removing it may result in content not displaying where this pattern is used. Are you sure you want to proceed?', 'Some of the deleted blocks allow instance overrides. Removing them may result in content not displaying where this pattern is used. Are you sure you want to proceed?', removedBlocks.length);
31
+ },
32
+ {
33
+ // Pattern overrides.
34
+ // The warning is only shown when the user edits a pattern.
35
+ postTypes: ["wp_block"],
36
+ callback(removedBlocks) {
37
+ const removedBlocksWithOverrides = removedBlocks.filter(
38
+ ({ attributes }) => attributes?.metadata?.bindings && Object.values(attributes.metadata.bindings).some(
39
+ (binding) => binding.source === "core/pattern-overrides"
40
+ )
41
+ );
42
+ if (removedBlocksWithOverrides.length) {
43
+ return _n(
44
+ "The deleted block allows instance overrides. Removing it may result in content not displaying where this pattern is used. Are you sure you want to proceed?",
45
+ "Some of the deleted blocks allow instance overrides. Removing them may result in content not displaying where this pattern is used. Are you sure you want to proceed?",
46
+ removedBlocks.length
47
+ );
48
+ }
44
49
  }
45
50
  }
46
- }];
47
- export default function BlockRemovalWarnings() {
48
- const currentPostType = useSelect(select => select(editorStore).getCurrentPostType(), []);
49
- const removalRulesForPostType = useMemo(() => BLOCK_REMOVAL_RULES.filter(rule => rule.postTypes.includes(currentPostType)), [currentPostType]);
50
-
51
- // `BlockRemovalWarnings` is rendered in the editor provider, a shared component
52
- // across react native and web. However, `BlockRemovalWarningModal` is web only.
53
- // Check it exists before trying to render it.
51
+ ];
52
+ function BlockRemovalWarnings() {
53
+ const currentPostType = useSelect(
54
+ (select) => select(editorStore).getCurrentPostType(),
55
+ []
56
+ );
57
+ const removalRulesForPostType = useMemo(
58
+ () => BLOCK_REMOVAL_RULES.filter(
59
+ (rule) => rule.postTypes.includes(currentPostType)
60
+ ),
61
+ [currentPostType]
62
+ );
54
63
  if (!BlockRemovalWarningModal) {
55
64
  return null;
56
65
  }
57
66
  if (!removalRulesForPostType) {
58
67
  return null;
59
68
  }
60
- return /*#__PURE__*/_jsx(BlockRemovalWarningModal, {
61
- rules: removalRulesForPostType
62
- });
69
+ return /* @__PURE__ */ jsx(BlockRemovalWarningModal, { rules: removalRulesForPostType });
63
70
  }
64
- //# sourceMappingURL=index.js.map
71
+ export {
72
+ BlockRemovalWarnings as default
73
+ };
74
+ //# sourceMappingURL=index.js.map
@@ -1 +1,7 @@
1
- {"version":3,"names":["_n","privateApis","blockEditorPrivateApis","useSelect","useMemo","unlock","store","editorStore","jsx","_jsx","BlockRemovalWarningModal","TEMPLATE_BLOCKS","BLOCK_REMOVAL_RULES","postTypes","callback","removedBlocks","removedTemplateBlocks","filter","name","includes","length","removedBlocksWithOverrides","attributes","metadata","bindings","Object","values","some","binding","source","BlockRemovalWarnings","currentPostType","select","getCurrentPostType","removalRulesForPostType","rule","rules"],"sources":["@wordpress/editor/src/components/block-removal-warnings/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\n\nimport { _n } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { useSelect } from '@wordpress/data';\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as editorStore } from '../../store';\n\nconst { BlockRemovalWarningModal } = unlock( blockEditorPrivateApis );\n\n// Prevent accidental removal of certain blocks, asking the user for confirmation first.\nconst TEMPLATE_BLOCKS = [\n\t'core/post-content',\n\t'core/post-template',\n\t'core/query',\n];\nconst BLOCK_REMOVAL_RULES = [\n\t{\n\t\t// Template blocks.\n\t\t// The warning is only shown when a user manipulates templates or template parts.\n\t\tpostTypes: [ 'wp_template', 'wp_template_part' ],\n\t\tcallback( removedBlocks ) {\n\t\t\tconst removedTemplateBlocks = removedBlocks.filter( ( { name } ) =>\n\t\t\t\tTEMPLATE_BLOCKS.includes( name )\n\t\t\t);\n\t\t\tif ( removedTemplateBlocks.length ) {\n\t\t\t\treturn _n(\n\t\t\t\t\t'Deleting this block will stop your post or page content from displaying on this template. It is not recommended.',\n\t\t\t\t\t'Some of the deleted blocks will stop your post or page content from displaying on this template. It is not recommended.',\n\t\t\t\t\tremovedBlocks.length\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t},\n\t{\n\t\t// Pattern overrides.\n\t\t// The warning is only shown when the user edits a pattern.\n\t\tpostTypes: [ 'wp_block' ],\n\t\tcallback( removedBlocks ) {\n\t\t\tconst removedBlocksWithOverrides = removedBlocks.filter(\n\t\t\t\t( { attributes } ) =>\n\t\t\t\t\tattributes?.metadata?.bindings &&\n\t\t\t\t\tObject.values( attributes.metadata.bindings ).some(\n\t\t\t\t\t\t( binding ) =>\n\t\t\t\t\t\t\tbinding.source === 'core/pattern-overrides'\n\t\t\t\t\t)\n\t\t\t);\n\t\t\tif ( removedBlocksWithOverrides.length ) {\n\t\t\t\treturn _n(\n\t\t\t\t\t'The deleted block allows instance overrides. Removing it may result in content not displaying where this pattern is used. Are you sure you want to proceed?',\n\t\t\t\t\t'Some of the deleted blocks allow instance overrides. Removing them may result in content not displaying where this pattern is used. Are you sure you want to proceed?',\n\t\t\t\t\tremovedBlocks.length\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t},\n];\n\nexport default function BlockRemovalWarnings() {\n\tconst currentPostType = useSelect(\n\t\t( select ) => select( editorStore ).getCurrentPostType(),\n\t\t[]\n\t);\n\n\tconst removalRulesForPostType = useMemo(\n\t\t() =>\n\t\t\tBLOCK_REMOVAL_RULES.filter( ( rule ) =>\n\t\t\t\trule.postTypes.includes( currentPostType )\n\t\t\t),\n\t\t[ currentPostType ]\n\t);\n\n\t// `BlockRemovalWarnings` is rendered in the editor provider, a shared component\n\t// across react native and web. However, `BlockRemovalWarningModal` is web only.\n\t// Check it exists before trying to render it.\n\tif ( ! BlockRemovalWarningModal ) {\n\t\treturn null;\n\t}\n\n\tif ( ! removalRulesForPostType ) {\n\t\treturn null;\n\t}\n\n\treturn <BlockRemovalWarningModal rules={ removalRulesForPostType } />;\n}\n"],"mappings":"AAAA;AACA;AACA;;AAEA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,WAAW,IAAIC,sBAAsB,QAAQ,yBAAyB;AAC/E,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,OAAO,QAAQ,oBAAoB;;AAE5C;AACA;AACA;AACA,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,SAASC,KAAK,IAAIC,WAAW,QAAQ,aAAa;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEnD,MAAM;EAAEC;AAAyB,CAAC,GAAGL,MAAM,CAAEH,sBAAuB,CAAC;;AAErE;AACA,MAAMS,eAAe,GAAG,CACvB,mBAAmB,EACnB,oBAAoB,EACpB,YAAY,CACZ;AACD,MAAMC,mBAAmB,GAAG,CAC3B;EACC;EACA;EACAC,SAAS,EAAE,CAAE,aAAa,EAAE,kBAAkB,CAAE;EAChDC,QAAQA,CAAEC,aAAa,EAAG;IACzB,MAAMC,qBAAqB,GAAGD,aAAa,CAACE,MAAM,CAAE,CAAE;MAAEC;IAAK,CAAC,KAC7DP,eAAe,CAACQ,QAAQ,CAAED,IAAK,CAChC,CAAC;IACD,IAAKF,qBAAqB,CAACI,MAAM,EAAG;MACnC,OAAOpB,EAAE,CACR,kHAAkH,EAClH,yHAAyH,EACzHe,aAAa,CAACK,MACf,CAAC;IACF;EACD;AACD,CAAC,EACD;EACC;EACA;EACAP,SAAS,EAAE,CAAE,UAAU,CAAE;EACzBC,QAAQA,CAAEC,aAAa,EAAG;IACzB,MAAMM,0BAA0B,GAAGN,aAAa,CAACE,MAAM,CACtD,CAAE;MAAEK;IAAW,CAAC,KACfA,UAAU,EAAEC,QAAQ,EAAEC,QAAQ,IAC9BC,MAAM,CAACC,MAAM,CAAEJ,UAAU,CAACC,QAAQ,CAACC,QAAS,CAAC,CAACG,IAAI,CAC/CC,OAAO,IACRA,OAAO,CAACC,MAAM,KAAK,wBACrB,CACF,CAAC;IACD,IAAKR,0BAA0B,CAACD,MAAM,EAAG;MACxC,OAAOpB,EAAE,CACR,6JAA6J,EAC7J,uKAAuK,EACvKe,aAAa,CAACK,MACf,CAAC;IACF;EACD;AACD,CAAC,CACD;AAED,eAAe,SAASU,oBAAoBA,CAAA,EAAG;EAC9C,MAAMC,eAAe,GAAG5B,SAAS,CAC9B6B,MAAM,IAAMA,MAAM,CAAEzB,WAAY,CAAC,CAAC0B,kBAAkB,CAAC,CAAC,EACxD,EACD,CAAC;EAED,MAAMC,uBAAuB,GAAG9B,OAAO,CACtC,MACCQ,mBAAmB,CAACK,MAAM,CAAIkB,IAAI,IACjCA,IAAI,CAACtB,SAAS,CAACM,QAAQ,CAAEY,eAAgB,CAC1C,CAAC,EACF,CAAEA,eAAe,CAClB,CAAC;;EAED;EACA;EACA;EACA,IAAK,CAAErB,wBAAwB,EAAG;IACjC,OAAO,IAAI;EACZ;EAEA,IAAK,CAAEwB,uBAAuB,EAAG;IAChC,OAAO,IAAI;EACZ;EAEA,oBAAOzB,IAAA,CAACC,wBAAwB;IAAC0B,KAAK,EAAGF;EAAyB,CAAE,CAAC;AACtE","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/block-removal-warnings/index.js"],
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\n\nimport { _n } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { useSelect } from '@wordpress/data';\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as editorStore } from '../../store';\n\nconst { BlockRemovalWarningModal } = unlock( blockEditorPrivateApis );\n\n// Prevent accidental removal of certain blocks, asking the user for confirmation first.\nconst TEMPLATE_BLOCKS = [\n\t'core/post-content',\n\t'core/post-template',\n\t'core/query',\n];\nconst BLOCK_REMOVAL_RULES = [\n\t{\n\t\t// Template blocks.\n\t\t// The warning is only shown when a user manipulates templates or template parts.\n\t\tpostTypes: [ 'wp_template', 'wp_template_part' ],\n\t\tcallback( removedBlocks ) {\n\t\t\tconst removedTemplateBlocks = removedBlocks.filter( ( { name } ) =>\n\t\t\t\tTEMPLATE_BLOCKS.includes( name )\n\t\t\t);\n\t\t\tif ( removedTemplateBlocks.length ) {\n\t\t\t\treturn _n(\n\t\t\t\t\t'Deleting this block will stop your post or page content from displaying on this template. It is not recommended.',\n\t\t\t\t\t'Some of the deleted blocks will stop your post or page content from displaying on this template. It is not recommended.',\n\t\t\t\t\tremovedBlocks.length\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t},\n\t{\n\t\t// Pattern overrides.\n\t\t// The warning is only shown when the user edits a pattern.\n\t\tpostTypes: [ 'wp_block' ],\n\t\tcallback( removedBlocks ) {\n\t\t\tconst removedBlocksWithOverrides = removedBlocks.filter(\n\t\t\t\t( { attributes } ) =>\n\t\t\t\t\tattributes?.metadata?.bindings &&\n\t\t\t\t\tObject.values( attributes.metadata.bindings ).some(\n\t\t\t\t\t\t( binding ) =>\n\t\t\t\t\t\t\tbinding.source === 'core/pattern-overrides'\n\t\t\t\t\t)\n\t\t\t);\n\t\t\tif ( removedBlocksWithOverrides.length ) {\n\t\t\t\treturn _n(\n\t\t\t\t\t'The deleted block allows instance overrides. Removing it may result in content not displaying where this pattern is used. Are you sure you want to proceed?',\n\t\t\t\t\t'Some of the deleted blocks allow instance overrides. Removing them may result in content not displaying where this pattern is used. Are you sure you want to proceed?',\n\t\t\t\t\tremovedBlocks.length\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t},\n];\n\nexport default function BlockRemovalWarnings() {\n\tconst currentPostType = useSelect(\n\t\t( select ) => select( editorStore ).getCurrentPostType(),\n\t\t[]\n\t);\n\n\tconst removalRulesForPostType = useMemo(\n\t\t() =>\n\t\t\tBLOCK_REMOVAL_RULES.filter( ( rule ) =>\n\t\t\t\trule.postTypes.includes( currentPostType )\n\t\t\t),\n\t\t[ currentPostType ]\n\t);\n\n\t// `BlockRemovalWarnings` is rendered in the editor provider, a shared component\n\t// across react native and web. However, `BlockRemovalWarningModal` is web only.\n\t// Check it exists before trying to render it.\n\tif ( ! BlockRemovalWarningModal ) {\n\t\treturn null;\n\t}\n\n\tif ( ! removalRulesForPostType ) {\n\t\treturn null;\n\t}\n\n\treturn <BlockRemovalWarningModal rules={ removalRulesForPostType } />;\n}\n"],
5
+ "mappings": "AA0FQ;AAtFR,SAAS,UAAU;AACnB,SAAS,eAAe,8BAA8B;AACtD,SAAS,iBAAiB;AAC1B,SAAS,eAAe;AAKxB,SAAS,cAAc;AACvB,SAAS,SAAS,mBAAmB;AAErC,MAAM,EAAE,yBAAyB,IAAI,OAAQ,sBAAuB;AAGpE,MAAM,kBAAkB;AAAA,EACvB;AAAA,EACA;AAAA,EACA;AACD;AACA,MAAM,sBAAsB;AAAA,EAC3B;AAAA;AAAA;AAAA,IAGC,WAAW,CAAE,eAAe,kBAAmB;AAAA,IAC/C,SAAU,eAAgB;AACzB,YAAM,wBAAwB,cAAc;AAAA,QAAQ,CAAE,EAAE,KAAK,MAC5D,gBAAgB,SAAU,IAAK;AAAA,MAChC;AACA,UAAK,sBAAsB,QAAS;AACnC,eAAO;AAAA,UACN;AAAA,UACA;AAAA,UACA,cAAc;AAAA,QACf;AAAA,MACD;AAAA,IACD;AAAA,EACD;AAAA,EACA;AAAA;AAAA;AAAA,IAGC,WAAW,CAAE,UAAW;AAAA,IACxB,SAAU,eAAgB;AACzB,YAAM,6BAA6B,cAAc;AAAA,QAChD,CAAE,EAAE,WAAW,MACd,YAAY,UAAU,YACtB,OAAO,OAAQ,WAAW,SAAS,QAAS,EAAE;AAAA,UAC7C,CAAE,YACD,QAAQ,WAAW;AAAA,QACrB;AAAA,MACF;AACA,UAAK,2BAA2B,QAAS;AACxC,eAAO;AAAA,UACN;AAAA,UACA;AAAA,UACA,cAAc;AAAA,QACf;AAAA,MACD;AAAA,IACD;AAAA,EACD;AACD;AAEe,SAAR,uBAAwC;AAC9C,QAAM,kBAAkB;AAAA,IACvB,CAAE,WAAY,OAAQ,WAAY,EAAE,mBAAmB;AAAA,IACvD,CAAC;AAAA,EACF;AAEA,QAAM,0BAA0B;AAAA,IAC/B,MACC,oBAAoB;AAAA,MAAQ,CAAE,SAC7B,KAAK,UAAU,SAAU,eAAgB;AAAA,IAC1C;AAAA,IACD,CAAE,eAAgB;AAAA,EACnB;AAKA,MAAK,CAAE,0BAA2B;AACjC,WAAO;AAAA,EACR;AAEA,MAAK,CAAE,yBAA0B;AAChC,WAAO;AAAA,EACR;AAEA,SAAO,oBAAC,4BAAyB,OAAQ,yBAA0B;AACpE;",
6
+ "names": []
7
+ }
@@ -1,73 +1,88 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
- import { BlockSettingsMenuControls, __unstableBlockSettingsMenuFirstItem as BlockSettingsMenuFirstItem, store as blockEditorStore, useBlockDisplayInformation } from '@wordpress/block-editor';
5
- import { store as coreStore } from '@wordpress/core-data';
6
- import { __experimentalText as Text, MenuItem } from '@wordpress/components';
7
- import { useSelect, useDispatch } from '@wordpress/data';
8
- import { __, _x } from '@wordpress/i18n';
9
-
10
- /**
11
- * Internal dependencies
12
- */
13
- import { store as editorStore } from '../../store';
14
- import { unlock } from '../../lock-unlock';
15
- import usePostContentBlocks from '../provider/use-post-content-blocks';
16
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
17
- function ContentOnlySettingsMenuItems({
18
- clientId,
19
- onClose
20
- }) {
1
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
+ import {
3
+ BlockSettingsMenuControls,
4
+ __unstableBlockSettingsMenuFirstItem as BlockSettingsMenuFirstItem,
5
+ store as blockEditorStore,
6
+ useBlockDisplayInformation
7
+ } from "@wordpress/block-editor";
8
+ import { store as coreStore } from "@wordpress/core-data";
9
+ import { __experimentalText as Text, MenuItem } from "@wordpress/components";
10
+ import { useSelect, useDispatch } from "@wordpress/data";
11
+ import { __, _x } from "@wordpress/i18n";
12
+ import { store as editorStore } from "../../store";
13
+ import { unlock } from "../../lock-unlock";
14
+ import usePostContentBlocks from "../provider/use-post-content-blocks";
15
+ function ContentOnlySettingsMenuItems({ clientId, onClose }) {
21
16
  const postContentBlocks = usePostContentBlocks();
22
- const {
23
- entity,
24
- onNavigateToEntityRecord,
25
- canEditTemplates
26
- } = useSelect(select => {
27
- const {
28
- getBlockParentsByBlockName,
29
- getSettings,
30
- getBlockAttributes,
31
- getBlockParents
32
- } = select(blockEditorStore);
33
- const {
34
- getCurrentTemplateId,
35
- getRenderingMode
36
- } = select(editorStore);
37
- const patternParent = getBlockParentsByBlockName(clientId, 'core/block', true)[0];
38
- let record;
39
- if (patternParent) {
40
- record = select(coreStore).getEntityRecord('postType', 'wp_block', getBlockAttributes(patternParent).ref);
41
- } else if (getRenderingMode() === 'template-locked' && !getBlockParents(clientId).some(parent => postContentBlocks.includes(parent))) {
42
- record = select(coreStore).getEntityRecord('postType', 'wp_template', getCurrentTemplateId());
43
- }
44
- if (!record) {
45
- return {};
46
- }
47
- const _canEditTemplates = select(coreStore).canUser('create', {
48
- kind: 'postType',
49
- name: 'wp_template'
50
- });
51
- return {
52
- canEditTemplates: _canEditTemplates,
53
- entity: record,
54
- onNavigateToEntityRecord: getSettings().onNavigateToEntityRecord
55
- };
56
- }, [clientId, postContentBlocks]);
17
+ const { entity, onNavigateToEntityRecord, canEditTemplates } = useSelect(
18
+ (select) => {
19
+ const {
20
+ getBlockParentsByBlockName,
21
+ getSettings,
22
+ getBlockAttributes,
23
+ getBlockParents
24
+ } = select(blockEditorStore);
25
+ const { getCurrentTemplateId, getRenderingMode } = select(editorStore);
26
+ const patternParent = getBlockParentsByBlockName(
27
+ clientId,
28
+ "core/block",
29
+ true
30
+ )[0];
31
+ let record;
32
+ if (patternParent) {
33
+ record = select(coreStore).getEntityRecord(
34
+ "postType",
35
+ "wp_block",
36
+ getBlockAttributes(patternParent).ref
37
+ );
38
+ } else if (getRenderingMode() === "template-locked" && !getBlockParents(clientId).some(
39
+ (parent) => postContentBlocks.includes(parent)
40
+ )) {
41
+ record = select(coreStore).getEntityRecord(
42
+ "postType",
43
+ "wp_template",
44
+ getCurrentTemplateId()
45
+ );
46
+ }
47
+ if (!record) {
48
+ return {};
49
+ }
50
+ const _canEditTemplates = select(coreStore).canUser("create", {
51
+ kind: "postType",
52
+ name: "wp_template"
53
+ });
54
+ return {
55
+ canEditTemplates: _canEditTemplates,
56
+ entity: record,
57
+ onNavigateToEntityRecord: getSettings().onNavigateToEntityRecord
58
+ };
59
+ },
60
+ [clientId, postContentBlocks]
61
+ );
57
62
  if (!entity) {
58
- return /*#__PURE__*/_jsx(TemplateLockContentOnlyMenuItems, {
59
- clientId: clientId,
60
- onClose: onClose
61
- });
63
+ return /* @__PURE__ */ jsx(
64
+ TemplateLockContentOnlyMenuItems,
65
+ {
66
+ clientId,
67
+ onClose
68
+ }
69
+ );
62
70
  }
63
- const isPattern = entity.type === 'wp_block';
64
- let helpText = isPattern ? __('Edit the pattern to move, delete, or make further changes to this block.') : __('Edit the template to move, delete, or make further changes to this block.');
71
+ const isPattern = entity.type === "wp_block";
72
+ let helpText = isPattern ? __(
73
+ "Edit the pattern to move, delete, or make further changes to this block."
74
+ ) : __(
75
+ "Edit the template to move, delete, or make further changes to this block."
76
+ );
65
77
  if (!canEditTemplates) {
66
- helpText = __('Only users with permissions to edit the template can move or delete this block');
78
+ helpText = __(
79
+ "Only users with permissions to edit the template can move or delete this block"
80
+ );
67
81
  }
68
- return /*#__PURE__*/_jsxs(_Fragment, {
69
- children: [/*#__PURE__*/_jsx(BlockSettingsMenuFirstItem, {
70
- children: /*#__PURE__*/_jsx(MenuItem, {
82
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
83
+ /* @__PURE__ */ jsx(BlockSettingsMenuFirstItem, { children: /* @__PURE__ */ jsx(
84
+ MenuItem,
85
+ {
71
86
  onClick: () => {
72
87
  onNavigateToEntityRecord({
73
88
  postId: entity.id,
@@ -75,64 +90,72 @@ function ContentOnlySettingsMenuItems({
75
90
  });
76
91
  },
77
92
  disabled: !canEditTemplates,
78
- children: isPattern ? __('Edit pattern') : __('Edit template')
79
- })
80
- }), /*#__PURE__*/_jsx(Text, {
81
- variant: "muted",
82
- as: "p",
83
- className: "editor-content-only-settings-menu__description",
84
- children: helpText
85
- })]
86
- });
93
+ children: isPattern ? __("Edit pattern") : __("Edit template")
94
+ }
95
+ ) }),
96
+ /* @__PURE__ */ jsx(
97
+ Text,
98
+ {
99
+ variant: "muted",
100
+ as: "p",
101
+ className: "editor-content-only-settings-menu__description",
102
+ children: helpText
103
+ }
104
+ )
105
+ ] });
87
106
  }
88
- function TemplateLockContentOnlyMenuItems({
89
- clientId,
90
- onClose
91
- }) {
92
- const {
93
- contentLockingParent
94
- } = useSelect(select => {
95
- const {
96
- getContentLockingParent
97
- } = unlock(select(blockEditorStore));
98
- return {
99
- contentLockingParent: getContentLockingParent(clientId)
100
- };
101
- }, [clientId]);
107
+ function TemplateLockContentOnlyMenuItems({ clientId, onClose }) {
108
+ const { contentLockingParent } = useSelect(
109
+ (select) => {
110
+ const { getContentLockingParent } = unlock(
111
+ select(blockEditorStore)
112
+ );
113
+ return {
114
+ contentLockingParent: getContentLockingParent(clientId)
115
+ };
116
+ },
117
+ [clientId]
118
+ );
102
119
  const blockDisplayInformation = useBlockDisplayInformation(contentLockingParent);
103
120
  const blockEditorActions = useDispatch(blockEditorStore);
104
121
  if (!blockDisplayInformation?.title) {
105
122
  return null;
106
123
  }
107
- const {
108
- modifyContentLockBlock
109
- } = unlock(blockEditorActions);
110
- return /*#__PURE__*/_jsxs(_Fragment, {
111
- children: [/*#__PURE__*/_jsx(BlockSettingsMenuFirstItem, {
112
- children: /*#__PURE__*/_jsx(MenuItem, {
124
+ const { modifyContentLockBlock } = unlock(blockEditorActions);
125
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
126
+ /* @__PURE__ */ jsx(BlockSettingsMenuFirstItem, { children: /* @__PURE__ */ jsx(
127
+ MenuItem,
128
+ {
113
129
  onClick: () => {
114
130
  modifyContentLockBlock(contentLockingParent);
115
131
  onClose();
116
132
  },
117
- children: _x('Unlock', 'Unlock content locked blocks')
118
- })
119
- }), /*#__PURE__*/_jsx(Text, {
120
- variant: "muted",
121
- as: "p",
122
- className: "editor-content-only-settings-menu__description",
123
- children: __('Temporarily unlock the parent block to edit, delete or make further changes to this block.')
124
- })]
125
- });
133
+ children: _x("Unlock", "Unlock content locked blocks")
134
+ }
135
+ ) }),
136
+ /* @__PURE__ */ jsx(
137
+ Text,
138
+ {
139
+ variant: "muted",
140
+ as: "p",
141
+ className: "editor-content-only-settings-menu__description",
142
+ children: __(
143
+ "Temporarily unlock the parent block to edit, delete or make further changes to this block."
144
+ )
145
+ }
146
+ )
147
+ ] });
126
148
  }
127
- export default function ContentOnlySettingsMenu() {
128
- return /*#__PURE__*/_jsx(BlockSettingsMenuControls, {
129
- children: ({
130
- selectedClientIds,
131
- onClose
132
- }) => selectedClientIds.length === 1 && /*#__PURE__*/_jsx(ContentOnlySettingsMenuItems, {
149
+ function ContentOnlySettingsMenu() {
150
+ return /* @__PURE__ */ jsx(BlockSettingsMenuControls, { children: ({ selectedClientIds, onClose }) => selectedClientIds.length === 1 && /* @__PURE__ */ jsx(
151
+ ContentOnlySettingsMenuItems,
152
+ {
133
153
  clientId: selectedClientIds[0],
134
- onClose: onClose
135
- })
136
- });
154
+ onClose
155
+ }
156
+ ) });
137
157
  }
138
- //# sourceMappingURL=content-only-settings-menu.js.map
158
+ export {
159
+ ContentOnlySettingsMenu as default
160
+ };
161
+ //# sourceMappingURL=content-only-settings-menu.js.map
@@ -1 +1,7 @@
1
- {"version":3,"names":["BlockSettingsMenuControls","__unstableBlockSettingsMenuFirstItem","BlockSettingsMenuFirstItem","store","blockEditorStore","useBlockDisplayInformation","coreStore","__experimentalText","Text","MenuItem","useSelect","useDispatch","__","_x","editorStore","unlock","usePostContentBlocks","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","ContentOnlySettingsMenuItems","clientId","onClose","postContentBlocks","entity","onNavigateToEntityRecord","canEditTemplates","select","getBlockParentsByBlockName","getSettings","getBlockAttributes","getBlockParents","getCurrentTemplateId","getRenderingMode","patternParent","record","getEntityRecord","ref","some","parent","includes","_canEditTemplates","canUser","kind","name","TemplateLockContentOnlyMenuItems","isPattern","type","helpText","children","onClick","postId","id","postType","disabled","variant","as","className","contentLockingParent","getContentLockingParent","blockDisplayInformation","blockEditorActions","title","modifyContentLockBlock","ContentOnlySettingsMenu","selectedClientIds","length"],"sources":["@wordpress/editor/src/components/block-settings-menu/content-only-settings-menu.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tBlockSettingsMenuControls,\n\t__unstableBlockSettingsMenuFirstItem as BlockSettingsMenuFirstItem,\n\tstore as blockEditorStore,\n\tuseBlockDisplayInformation,\n} from '@wordpress/block-editor';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __experimentalText as Text, MenuItem } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __, _x } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport usePostContentBlocks from '../provider/use-post-content-blocks';\n\nfunction ContentOnlySettingsMenuItems( { clientId, onClose } ) {\n\tconst postContentBlocks = usePostContentBlocks();\n\tconst { entity, onNavigateToEntityRecord, canEditTemplates } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlockParentsByBlockName,\n\t\t\t\tgetSettings,\n\t\t\t\tgetBlockAttributes,\n\t\t\t\tgetBlockParents,\n\t\t\t} = select( blockEditorStore );\n\t\t\tconst { getCurrentTemplateId, getRenderingMode } =\n\t\t\t\tselect( editorStore );\n\t\t\tconst patternParent = getBlockParentsByBlockName(\n\t\t\t\tclientId,\n\t\t\t\t'core/block',\n\t\t\t\ttrue\n\t\t\t)[ 0 ];\n\n\t\t\tlet record;\n\t\t\tif ( patternParent ) {\n\t\t\t\trecord = select( coreStore ).getEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\t'wp_block',\n\t\t\t\t\tgetBlockAttributes( patternParent ).ref\n\t\t\t\t);\n\t\t\t} else if (\n\t\t\t\tgetRenderingMode() === 'template-locked' &&\n\t\t\t\t! getBlockParents( clientId ).some( ( parent ) =>\n\t\t\t\t\tpostContentBlocks.includes( parent )\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\trecord = select( coreStore ).getEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\t'wp_template',\n\t\t\t\t\tgetCurrentTemplateId()\n\t\t\t\t);\n\t\t\t}\n\t\t\tif ( ! record ) {\n\t\t\t\treturn {};\n\t\t\t}\n\t\t\tconst _canEditTemplates = select( coreStore ).canUser( 'create', {\n\t\t\t\tkind: 'postType',\n\t\t\t\tname: 'wp_template',\n\t\t\t} );\n\t\t\treturn {\n\t\t\t\tcanEditTemplates: _canEditTemplates,\n\t\t\t\tentity: record,\n\t\t\t\tonNavigateToEntityRecord:\n\t\t\t\t\tgetSettings().onNavigateToEntityRecord,\n\t\t\t};\n\t\t},\n\t\t[ clientId, postContentBlocks ]\n\t);\n\n\tif ( ! entity ) {\n\t\treturn (\n\t\t\t<TemplateLockContentOnlyMenuItems\n\t\t\t\tclientId={ clientId }\n\t\t\t\tonClose={ onClose }\n\t\t\t/>\n\t\t);\n\t}\n\n\tconst isPattern = entity.type === 'wp_block';\n\tlet helpText = isPattern\n\t\t? __(\n\t\t\t\t'Edit the pattern to move, delete, or make further changes to this block.'\n\t\t )\n\t\t: __(\n\t\t\t\t'Edit the template to move, delete, or make further changes to this block.'\n\t\t );\n\n\tif ( ! canEditTemplates ) {\n\t\thelpText = __(\n\t\t\t'Only users with permissions to edit the template can move or delete this block'\n\t\t);\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<BlockSettingsMenuFirstItem>\n\t\t\t\t<MenuItem\n\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\tonNavigateToEntityRecord( {\n\t\t\t\t\t\t\tpostId: entity.id,\n\t\t\t\t\t\t\tpostType: entity.type,\n\t\t\t\t\t\t} );\n\t\t\t\t\t} }\n\t\t\t\t\tdisabled={ ! canEditTemplates }\n\t\t\t\t>\n\t\t\t\t\t{ isPattern ? __( 'Edit pattern' ) : __( 'Edit template' ) }\n\t\t\t\t</MenuItem>\n\t\t\t</BlockSettingsMenuFirstItem>\n\t\t\t<Text\n\t\t\t\tvariant=\"muted\"\n\t\t\t\tas=\"p\"\n\t\t\t\tclassName=\"editor-content-only-settings-menu__description\"\n\t\t\t>\n\t\t\t\t{ helpText }\n\t\t\t</Text>\n\t\t</>\n\t);\n}\n\nfunction TemplateLockContentOnlyMenuItems( { clientId, onClose } ) {\n\tconst { contentLockingParent } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getContentLockingParent } = unlock(\n\t\t\t\tselect( blockEditorStore )\n\t\t\t);\n\t\t\treturn {\n\t\t\t\tcontentLockingParent: getContentLockingParent( clientId ),\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\tconst blockDisplayInformation =\n\t\tuseBlockDisplayInformation( contentLockingParent );\n\tconst blockEditorActions = useDispatch( blockEditorStore );\n\tif ( ! blockDisplayInformation?.title ) {\n\t\treturn null;\n\t}\n\n\tconst { modifyContentLockBlock } = unlock( blockEditorActions );\n\n\treturn (\n\t\t<>\n\t\t\t<BlockSettingsMenuFirstItem>\n\t\t\t\t<MenuItem\n\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\tmodifyContentLockBlock( contentLockingParent );\n\t\t\t\t\t\tonClose();\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t{ _x( 'Unlock', 'Unlock content locked blocks' ) }\n\t\t\t\t</MenuItem>\n\t\t\t</BlockSettingsMenuFirstItem>\n\t\t\t<Text\n\t\t\t\tvariant=\"muted\"\n\t\t\t\tas=\"p\"\n\t\t\t\tclassName=\"editor-content-only-settings-menu__description\"\n\t\t\t>\n\t\t\t\t{ __(\n\t\t\t\t\t'Temporarily unlock the parent block to edit, delete or make further changes to this block.'\n\t\t\t\t) }\n\t\t\t</Text>\n\t\t</>\n\t);\n}\n\nexport default function ContentOnlySettingsMenu() {\n\treturn (\n\t\t<BlockSettingsMenuControls>\n\t\t\t{ ( { selectedClientIds, onClose } ) =>\n\t\t\t\tselectedClientIds.length === 1 && (\n\t\t\t\t\t<ContentOnlySettingsMenuItems\n\t\t\t\t\t\tclientId={ selectedClientIds[ 0 ] }\n\t\t\t\t\t\tonClose={ onClose }\n\t\t\t\t\t/>\n\t\t\t\t)\n\t\t\t}\n\t\t</BlockSettingsMenuControls>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SACCA,yBAAyB,EACzBC,oCAAoC,IAAIC,0BAA0B,EAClEC,KAAK,IAAIC,gBAAgB,EACzBC,0BAA0B,QACpB,yBAAyB;AAChC,SAASF,KAAK,IAAIG,SAAS,QAAQ,sBAAsB;AACzD,SAASC,kBAAkB,IAAIC,IAAI,EAAEC,QAAQ,QAAQ,uBAAuB;AAC5E,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,EAAE,EAAEC,EAAE,QAAQ,iBAAiB;;AAExC;AACA;AACA;AACA,SAASV,KAAK,IAAIW,WAAW,QAAQ,aAAa;AAClD,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,OAAOC,oBAAoB,MAAM,qCAAqC;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA,EAAAC,IAAA,IAAAC,KAAA;AAEvE,SAASC,4BAA4BA,CAAE;EAAEC,QAAQ;EAAEC;AAAQ,CAAC,EAAG;EAC9D,MAAMC,iBAAiB,GAAGV,oBAAoB,CAAC,CAAC;EAChD,MAAM;IAAEW,MAAM;IAAEC,wBAAwB;IAAEC;EAAiB,CAAC,GAAGnB,SAAS,CACrEoB,MAAM,IAAM;IACb,MAAM;MACLC,0BAA0B;MAC1BC,WAAW;MACXC,kBAAkB;MAClBC;IACD,CAAC,GAAGJ,MAAM,CAAE1B,gBAAiB,CAAC;IAC9B,MAAM;MAAE+B,oBAAoB;MAAEC;IAAiB,CAAC,GAC/CN,MAAM,CAAEhB,WAAY,CAAC;IACtB,MAAMuB,aAAa,GAAGN,0BAA0B,CAC/CP,QAAQ,EACR,YAAY,EACZ,IACD,CAAC,CAAE,CAAC,CAAE;IAEN,IAAIc,MAAM;IACV,IAAKD,aAAa,EAAG;MACpBC,MAAM,GAAGR,MAAM,CAAExB,SAAU,CAAC,CAACiC,eAAe,CAC3C,UAAU,EACV,UAAU,EACVN,kBAAkB,CAAEI,aAAc,CAAC,CAACG,GACrC,CAAC;IACF,CAAC,MAAM,IACNJ,gBAAgB,CAAC,CAAC,KAAK,iBAAiB,IACxC,CAAEF,eAAe,CAAEV,QAAS,CAAC,CAACiB,IAAI,CAAIC,MAAM,IAC3ChB,iBAAiB,CAACiB,QAAQ,CAAED,MAAO,CACpC,CAAC,EACA;MACDJ,MAAM,GAAGR,MAAM,CAAExB,SAAU,CAAC,CAACiC,eAAe,CAC3C,UAAU,EACV,aAAa,EACbJ,oBAAoB,CAAC,CACtB,CAAC;IACF;IACA,IAAK,CAAEG,MAAM,EAAG;MACf,OAAO,CAAC,CAAC;IACV;IACA,MAAMM,iBAAiB,GAAGd,MAAM,CAAExB,SAAU,CAAC,CAACuC,OAAO,CAAE,QAAQ,EAAE;MAChEC,IAAI,EAAE,UAAU;MAChBC,IAAI,EAAE;IACP,CAAE,CAAC;IACH,OAAO;MACNlB,gBAAgB,EAAEe,iBAAiB;MACnCjB,MAAM,EAAEW,MAAM;MACdV,wBAAwB,EACvBI,WAAW,CAAC,CAAC,CAACJ;IAChB,CAAC;EACF,CAAC,EACD,CAAEJ,QAAQ,EAAEE,iBAAiB,CAC9B,CAAC;EAED,IAAK,CAAEC,MAAM,EAAG;IACf,oBACCT,IAAA,CAAC8B,gCAAgC;MAChCxB,QAAQ,EAAGA,QAAU;MACrBC,OAAO,EAAGA;IAAS,CACnB,CAAC;EAEJ;EAEA,MAAMwB,SAAS,GAAGtB,MAAM,CAACuB,IAAI,KAAK,UAAU;EAC5C,IAAIC,QAAQ,GAAGF,SAAS,GACrBrC,EAAE,CACF,0EACA,CAAC,GACDA,EAAE,CACF,2EACA,CAAC;EAEJ,IAAK,CAAEiB,gBAAgB,EAAG;IACzBsB,QAAQ,GAAGvC,EAAE,CACZ,gFACD,CAAC;EACF;EAEA,oBACCU,KAAA,CAAAF,SAAA;IAAAgC,QAAA,gBACClC,IAAA,CAAChB,0BAA0B;MAAAkD,QAAA,eAC1BlC,IAAA,CAACT,QAAQ;QACR4C,OAAO,EAAGA,CAAA,KAAM;UACfzB,wBAAwB,CAAE;YACzB0B,MAAM,EAAE3B,MAAM,CAAC4B,EAAE;YACjBC,QAAQ,EAAE7B,MAAM,CAACuB;UAClB,CAAE,CAAC;QACJ,CAAG;QACHO,QAAQ,EAAG,CAAE5B,gBAAkB;QAAAuB,QAAA,EAE7BH,SAAS,GAAGrC,EAAE,CAAE,cAAe,CAAC,GAAGA,EAAE,CAAE,eAAgB;MAAC,CACjD;IAAC,CACgB,CAAC,eAC7BM,IAAA,CAACV,IAAI;MACJkD,OAAO,EAAC,OAAO;MACfC,EAAE,EAAC,GAAG;MACNC,SAAS,EAAC,gDAAgD;MAAAR,QAAA,EAExDD;IAAQ,CACL,CAAC;EAAA,CACN,CAAC;AAEL;AAEA,SAASH,gCAAgCA,CAAE;EAAExB,QAAQ;EAAEC;AAAQ,CAAC,EAAG;EAClE,MAAM;IAAEoC;EAAqB,CAAC,GAAGnD,SAAS,CACvCoB,MAAM,IAAM;IACb,MAAM;MAAEgC;IAAwB,CAAC,GAAG/C,MAAM,CACzCe,MAAM,CAAE1B,gBAAiB,CAC1B,CAAC;IACD,OAAO;MACNyD,oBAAoB,EAAEC,uBAAuB,CAAEtC,QAAS;IACzD,CAAC;EACF,CAAC,EACD,CAAEA,QAAQ,CACX,CAAC;EACD,MAAMuC,uBAAuB,GAC5B1D,0BAA0B,CAAEwD,oBAAqB,CAAC;EACnD,MAAMG,kBAAkB,GAAGrD,WAAW,CAAEP,gBAAiB,CAAC;EAC1D,IAAK,CAAE2D,uBAAuB,EAAEE,KAAK,EAAG;IACvC,OAAO,IAAI;EACZ;EAEA,MAAM;IAAEC;EAAuB,CAAC,GAAGnD,MAAM,CAAEiD,kBAAmB,CAAC;EAE/D,oBACC1C,KAAA,CAAAF,SAAA;IAAAgC,QAAA,gBACClC,IAAA,CAAChB,0BAA0B;MAAAkD,QAAA,eAC1BlC,IAAA,CAACT,QAAQ;QACR4C,OAAO,EAAGA,CAAA,KAAM;UACfa,sBAAsB,CAAEL,oBAAqB,CAAC;UAC9CpC,OAAO,CAAC,CAAC;QACV,CAAG;QAAA2B,QAAA,EAEDvC,EAAE,CAAE,QAAQ,EAAE,8BAA+B;MAAC,CACvC;IAAC,CACgB,CAAC,eAC7BK,IAAA,CAACV,IAAI;MACJkD,OAAO,EAAC,OAAO;MACfC,EAAE,EAAC,GAAG;MACNC,SAAS,EAAC,gDAAgD;MAAAR,QAAA,EAExDxC,EAAE,CACH,4FACD;IAAC,CACI,CAAC;EAAA,CACN,CAAC;AAEL;AAEA,eAAe,SAASuD,uBAAuBA,CAAA,EAAG;EACjD,oBACCjD,IAAA,CAAClB,yBAAyB;IAAAoD,QAAA,EACvBA,CAAE;MAAEgB,iBAAiB;MAAE3C;IAAQ,CAAC,KACjC2C,iBAAiB,CAACC,MAAM,KAAK,CAAC,iBAC7BnD,IAAA,CAACK,4BAA4B;MAC5BC,QAAQ,EAAG4C,iBAAiB,CAAE,CAAC,CAAI;MACnC3C,OAAO,EAAGA;IAAS,CACnB;EACD,CAEwB,CAAC;AAE9B","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/block-settings-menu/content-only-settings-menu.js"],
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport {\n\tBlockSettingsMenuControls,\n\t__unstableBlockSettingsMenuFirstItem as BlockSettingsMenuFirstItem,\n\tstore as blockEditorStore,\n\tuseBlockDisplayInformation,\n} from '@wordpress/block-editor';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __experimentalText as Text, MenuItem } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __, _x } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport usePostContentBlocks from '../provider/use-post-content-blocks';\n\nfunction ContentOnlySettingsMenuItems( { clientId, onClose } ) {\n\tconst postContentBlocks = usePostContentBlocks();\n\tconst { entity, onNavigateToEntityRecord, canEditTemplates } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlockParentsByBlockName,\n\t\t\t\tgetSettings,\n\t\t\t\tgetBlockAttributes,\n\t\t\t\tgetBlockParents,\n\t\t\t} = select( blockEditorStore );\n\t\t\tconst { getCurrentTemplateId, getRenderingMode } =\n\t\t\t\tselect( editorStore );\n\t\t\tconst patternParent = getBlockParentsByBlockName(\n\t\t\t\tclientId,\n\t\t\t\t'core/block',\n\t\t\t\ttrue\n\t\t\t)[ 0 ];\n\n\t\t\tlet record;\n\t\t\tif ( patternParent ) {\n\t\t\t\trecord = select( coreStore ).getEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\t'wp_block',\n\t\t\t\t\tgetBlockAttributes( patternParent ).ref\n\t\t\t\t);\n\t\t\t} else if (\n\t\t\t\tgetRenderingMode() === 'template-locked' &&\n\t\t\t\t! getBlockParents( clientId ).some( ( parent ) =>\n\t\t\t\t\tpostContentBlocks.includes( parent )\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\trecord = select( coreStore ).getEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\t'wp_template',\n\t\t\t\t\tgetCurrentTemplateId()\n\t\t\t\t);\n\t\t\t}\n\t\t\tif ( ! record ) {\n\t\t\t\treturn {};\n\t\t\t}\n\t\t\tconst _canEditTemplates = select( coreStore ).canUser( 'create', {\n\t\t\t\tkind: 'postType',\n\t\t\t\tname: 'wp_template',\n\t\t\t} );\n\t\t\treturn {\n\t\t\t\tcanEditTemplates: _canEditTemplates,\n\t\t\t\tentity: record,\n\t\t\t\tonNavigateToEntityRecord:\n\t\t\t\t\tgetSettings().onNavigateToEntityRecord,\n\t\t\t};\n\t\t},\n\t\t[ clientId, postContentBlocks ]\n\t);\n\n\tif ( ! entity ) {\n\t\treturn (\n\t\t\t<TemplateLockContentOnlyMenuItems\n\t\t\t\tclientId={ clientId }\n\t\t\t\tonClose={ onClose }\n\t\t\t/>\n\t\t);\n\t}\n\n\tconst isPattern = entity.type === 'wp_block';\n\tlet helpText = isPattern\n\t\t? __(\n\t\t\t\t'Edit the pattern to move, delete, or make further changes to this block.'\n\t\t )\n\t\t: __(\n\t\t\t\t'Edit the template to move, delete, or make further changes to this block.'\n\t\t );\n\n\tif ( ! canEditTemplates ) {\n\t\thelpText = __(\n\t\t\t'Only users with permissions to edit the template can move or delete this block'\n\t\t);\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<BlockSettingsMenuFirstItem>\n\t\t\t\t<MenuItem\n\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\tonNavigateToEntityRecord( {\n\t\t\t\t\t\t\tpostId: entity.id,\n\t\t\t\t\t\t\tpostType: entity.type,\n\t\t\t\t\t\t} );\n\t\t\t\t\t} }\n\t\t\t\t\tdisabled={ ! canEditTemplates }\n\t\t\t\t>\n\t\t\t\t\t{ isPattern ? __( 'Edit pattern' ) : __( 'Edit template' ) }\n\t\t\t\t</MenuItem>\n\t\t\t</BlockSettingsMenuFirstItem>\n\t\t\t<Text\n\t\t\t\tvariant=\"muted\"\n\t\t\t\tas=\"p\"\n\t\t\t\tclassName=\"editor-content-only-settings-menu__description\"\n\t\t\t>\n\t\t\t\t{ helpText }\n\t\t\t</Text>\n\t\t</>\n\t);\n}\n\nfunction TemplateLockContentOnlyMenuItems( { clientId, onClose } ) {\n\tconst { contentLockingParent } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getContentLockingParent } = unlock(\n\t\t\t\tselect( blockEditorStore )\n\t\t\t);\n\t\t\treturn {\n\t\t\t\tcontentLockingParent: getContentLockingParent( clientId ),\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\tconst blockDisplayInformation =\n\t\tuseBlockDisplayInformation( contentLockingParent );\n\tconst blockEditorActions = useDispatch( blockEditorStore );\n\tif ( ! blockDisplayInformation?.title ) {\n\t\treturn null;\n\t}\n\n\tconst { modifyContentLockBlock } = unlock( blockEditorActions );\n\n\treturn (\n\t\t<>\n\t\t\t<BlockSettingsMenuFirstItem>\n\t\t\t\t<MenuItem\n\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\tmodifyContentLockBlock( contentLockingParent );\n\t\t\t\t\t\tonClose();\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t{ _x( 'Unlock', 'Unlock content locked blocks' ) }\n\t\t\t\t</MenuItem>\n\t\t\t</BlockSettingsMenuFirstItem>\n\t\t\t<Text\n\t\t\t\tvariant=\"muted\"\n\t\t\t\tas=\"p\"\n\t\t\t\tclassName=\"editor-content-only-settings-menu__description\"\n\t\t\t>\n\t\t\t\t{ __(\n\t\t\t\t\t'Temporarily unlock the parent block to edit, delete or make further changes to this block.'\n\t\t\t\t) }\n\t\t\t</Text>\n\t\t</>\n\t);\n}\n\nexport default function ContentOnlySettingsMenu() {\n\treturn (\n\t\t<BlockSettingsMenuControls>\n\t\t\t{ ( { selectedClientIds, onClose } ) =>\n\t\t\t\tselectedClientIds.length === 1 && (\n\t\t\t\t\t<ContentOnlySettingsMenuItems\n\t\t\t\t\t\tclientId={ selectedClientIds[ 0 ] }\n\t\t\t\t\t\tonClose={ onClose }\n\t\t\t\t\t/>\n\t\t\t\t)\n\t\t\t}\n\t\t</BlockSettingsMenuControls>\n\t);\n}\n"],
5
+ "mappings": "AA6EG,SAuBD,UAvBC,KAuBD,YAvBC;AA1EH;AAAA,EACC;AAAA,EACA,wCAAwC;AAAA,EACxC,SAAS;AAAA,EACT;AAAA,OACM;AACP,SAAS,SAAS,iBAAiB;AACnC,SAAS,sBAAsB,MAAM,gBAAgB;AACrD,SAAS,WAAW,mBAAmB;AACvC,SAAS,IAAI,UAAU;AAKvB,SAAS,SAAS,mBAAmB;AACrC,SAAS,cAAc;AACvB,OAAO,0BAA0B;AAEjC,SAAS,6BAA8B,EAAE,UAAU,QAAQ,GAAI;AAC9D,QAAM,oBAAoB,qBAAqB;AAC/C,QAAM,EAAE,QAAQ,0BAA0B,iBAAiB,IAAI;AAAA,IAC9D,CAAE,WAAY;AACb,YAAM;AAAA,QACL;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACD,IAAI,OAAQ,gBAAiB;AAC7B,YAAM,EAAE,sBAAsB,iBAAiB,IAC9C,OAAQ,WAAY;AACrB,YAAM,gBAAgB;AAAA,QACrB;AAAA,QACA;AAAA,QACA;AAAA,MACD,EAAG,CAAE;AAEL,UAAI;AACJ,UAAK,eAAgB;AACpB,iBAAS,OAAQ,SAAU,EAAE;AAAA,UAC5B;AAAA,UACA;AAAA,UACA,mBAAoB,aAAc,EAAE;AAAA,QACrC;AAAA,MACD,WACC,iBAAiB,MAAM,qBACvB,CAAE,gBAAiB,QAAS,EAAE;AAAA,QAAM,CAAE,WACrC,kBAAkB,SAAU,MAAO;AAAA,MACpC,GACC;AACD,iBAAS,OAAQ,SAAU,EAAE;AAAA,UAC5B;AAAA,UACA;AAAA,UACA,qBAAqB;AAAA,QACtB;AAAA,MACD;AACA,UAAK,CAAE,QAAS;AACf,eAAO,CAAC;AAAA,MACT;AACA,YAAM,oBAAoB,OAAQ,SAAU,EAAE,QAAS,UAAU;AAAA,QAChE,MAAM;AAAA,QACN,MAAM;AAAA,MACP,CAAE;AACF,aAAO;AAAA,QACN,kBAAkB;AAAA,QAClB,QAAQ;AAAA,QACR,0BACC,YAAY,EAAE;AAAA,MAChB;AAAA,IACD;AAAA,IACA,CAAE,UAAU,iBAAkB;AAAA,EAC/B;AAEA,MAAK,CAAE,QAAS;AACf,WACC;AAAA,MAAC;AAAA;AAAA,QACA;AAAA,QACA;AAAA;AAAA,IACD;AAAA,EAEF;AAEA,QAAM,YAAY,OAAO,SAAS;AAClC,MAAI,WAAW,YACZ;AAAA,IACA;AAAA,EACA,IACA;AAAA,IACA;AAAA,EACA;AAEH,MAAK,CAAE,kBAAmB;AACzB,eAAW;AAAA,MACV;AAAA,IACD;AAAA,EACD;AAEA,SACC,iCACC;AAAA,wBAAC,8BACA;AAAA,MAAC;AAAA;AAAA,QACA,SAAU,MAAM;AACf,mCAA0B;AAAA,YACzB,QAAQ,OAAO;AAAA,YACf,UAAU,OAAO;AAAA,UAClB,CAAE;AAAA,QACH;AAAA,QACA,UAAW,CAAE;AAAA,QAEX,sBAAY,GAAI,cAAe,IAAI,GAAI,eAAgB;AAAA;AAAA,IAC1D,GACD;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACA,SAAQ;AAAA,QACR,IAAG;AAAA,QACH,WAAU;AAAA,QAER;AAAA;AAAA,IACH;AAAA,KACD;AAEF;AAEA,SAAS,iCAAkC,EAAE,UAAU,QAAQ,GAAI;AAClE,QAAM,EAAE,qBAAqB,IAAI;AAAA,IAChC,CAAE,WAAY;AACb,YAAM,EAAE,wBAAwB,IAAI;AAAA,QACnC,OAAQ,gBAAiB;AAAA,MAC1B;AACA,aAAO;AAAA,QACN,sBAAsB,wBAAyB,QAAS;AAAA,MACzD;AAAA,IACD;AAAA,IACA,CAAE,QAAS;AAAA,EACZ;AACA,QAAM,0BACL,2BAA4B,oBAAqB;AAClD,QAAM,qBAAqB,YAAa,gBAAiB;AACzD,MAAK,CAAE,yBAAyB,OAAQ;AACvC,WAAO;AAAA,EACR;AAEA,QAAM,EAAE,uBAAuB,IAAI,OAAQ,kBAAmB;AAE9D,SACC,iCACC;AAAA,wBAAC,8BACA;AAAA,MAAC;AAAA;AAAA,QACA,SAAU,MAAM;AACf,iCAAwB,oBAAqB;AAC7C,kBAAQ;AAAA,QACT;AAAA,QAEE,aAAI,UAAU,8BAA+B;AAAA;AAAA,IAChD,GACD;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACA,SAAQ;AAAA,QACR,IAAG;AAAA,QACH,WAAU;AAAA,QAER;AAAA,UACD;AAAA,QACD;AAAA;AAAA,IACD;AAAA,KACD;AAEF;AAEe,SAAR,0BAA2C;AACjD,SACC,oBAAC,6BACE,WAAE,EAAE,mBAAmB,QAAQ,MAChC,kBAAkB,WAAW,KAC5B;AAAA,IAAC;AAAA;AAAA,MACA,UAAW,kBAAmB,CAAE;AAAA,MAChC;AAAA;AAAA,EACD,GAGH;AAEF;",
6
+ "names": []
7
+ }
@@ -1,80 +1,9 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
- import { BlockSettingsMenuControls } from '@wordpress/block-editor';
5
- import { MenuItem } from '@wordpress/components';
6
- import { compose } from '@wordpress/compose';
7
- import { jsx as _jsx } from "react/jsx-runtime";
8
- const isEverySelectedBlockAllowed = (selected, allowed) => selected.filter(id => !allowed.includes(id)).length === 0;
9
-
10
- /**
11
- * Plugins may want to add an item to the menu either for every block
12
- * or only for the specific ones provided in the `allowedBlocks` component property.
13
- *
14
- * If there are multiple blocks selected the item will be rendered if every block
15
- * is of one allowed type (not necessarily the same).
16
- *
17
- * @param {string[]} selectedBlocks Array containing the names of the blocks selected
18
- * @param {string[]} allowedBlocks Array containing the names of the blocks allowed
19
- * @return {boolean} Whether the item will be rendered or not.
20
- */
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { BlockSettingsMenuControls } from "@wordpress/block-editor";
3
+ import { MenuItem } from "@wordpress/components";
4
+ import { compose } from "@wordpress/compose";
5
+ const isEverySelectedBlockAllowed = (selected, allowed) => selected.filter((id) => !allowed.includes(id)).length === 0;
21
6
  const shouldRenderItem = (selectedBlocks, allowedBlocks) => !Array.isArray(allowedBlocks) || isEverySelectedBlockAllowed(selectedBlocks, allowedBlocks);
22
-
23
- /**
24
- * Renders a new item in the block settings menu.
25
- *
26
- * @param {Object} props Component props.
27
- * @param {Array} [props.allowedBlocks] An array containing a list of block names for which the item should be shown. If not present, it'll be rendered for any block. If multiple blocks are selected, it'll be shown if and only if all of them are in the allowed list.
28
- * @param {WPBlockTypeIconRender} [props.icon] The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element.
29
- * @param {string} props.label The menu item text.
30
- * @param {Function} props.onClick Callback function to be executed when the user click the menu item.
31
- * @param {boolean} [props.small] Whether to render the label or not.
32
- * @param {string} [props.role] The ARIA role for the menu item.
33
- *
34
- * @example
35
- * ```js
36
- * // Using ES5 syntax
37
- * var __ = wp.i18n.__;
38
- * var PluginBlockSettingsMenuItem = wp.editor.PluginBlockSettingsMenuItem;
39
- *
40
- * function doOnClick(){
41
- * // To be called when the user clicks the menu item.
42
- * }
43
- *
44
- * function MyPluginBlockSettingsMenuItem() {
45
- * return React.createElement(
46
- * PluginBlockSettingsMenuItem,
47
- * {
48
- * allowedBlocks: [ 'core/paragraph' ],
49
- * icon: 'dashicon-name',
50
- * label: __( 'Menu item text' ),
51
- * onClick: doOnClick,
52
- * }
53
- * );
54
- * }
55
- * ```
56
- *
57
- * @example
58
- * ```jsx
59
- * // Using ESNext syntax
60
- * import { __ } from '@wordpress/i18n';
61
- * import { PluginBlockSettingsMenuItem } from '@wordpress/editor';
62
- *
63
- * const doOnClick = ( ) => {
64
- * // To be called when the user clicks the menu item.
65
- * };
66
- *
67
- * const MyPluginBlockSettingsMenuItem = () => (
68
- * <PluginBlockSettingsMenuItem
69
- * allowedBlocks={ [ 'core/paragraph' ] }
70
- * icon='dashicon-name'
71
- * label={ __( 'Menu item text' ) }
72
- * onClick={ doOnClick } />
73
- * );
74
- * ```
75
- *
76
- * @return {React.ReactNode} The rendered component.
77
- */
78
7
  const PluginBlockSettingsMenuItem = ({
79
8
  allowedBlocks,
80
9
  icon,
@@ -82,22 +11,23 @@ const PluginBlockSettingsMenuItem = ({
82
11
  onClick,
83
12
  small,
84
13
  role
85
- }) => /*#__PURE__*/_jsx(BlockSettingsMenuControls, {
86
- children: ({
87
- selectedBlocks,
88
- onClose
89
- }) => {
90
- if (!shouldRenderItem(selectedBlocks, allowedBlocks)) {
91
- return null;
92
- }
93
- return /*#__PURE__*/_jsx(MenuItem, {
14
+ }) => /* @__PURE__ */ jsx(BlockSettingsMenuControls, { children: ({ selectedBlocks, onClose }) => {
15
+ if (!shouldRenderItem(selectedBlocks, allowedBlocks)) {
16
+ return null;
17
+ }
18
+ return /* @__PURE__ */ jsx(
19
+ MenuItem,
20
+ {
94
21
  onClick: compose(onClick, onClose),
95
- icon: icon,
96
- label: small ? label : undefined,
97
- role: role,
22
+ icon,
23
+ label: small ? label : void 0,
24
+ role,
98
25
  children: !small && label
99
- });
100
- }
101
- });
102
- export default PluginBlockSettingsMenuItem;
103
- //# sourceMappingURL=plugin-block-settings-menu-item.js.map
26
+ }
27
+ );
28
+ } });
29
+ var plugin_block_settings_menu_item_default = PluginBlockSettingsMenuItem;
30
+ export {
31
+ plugin_block_settings_menu_item_default as default
32
+ };
33
+ //# sourceMappingURL=plugin-block-settings-menu-item.js.map