@wordpress/editor 14.2.0 → 14.4.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 (882) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +2 -1
  3. package/build/bindings/api.js +65 -0
  4. package/build/bindings/api.js.map +1 -0
  5. package/build/bindings/pattern-overrides.js +26 -13
  6. package/build/bindings/pattern-overrides.js.map +1 -1
  7. package/build/bindings/post-meta.js +27 -12
  8. package/build/bindings/post-meta.js.map +1 -1
  9. package/build/components/block-settings-menu/content-only-settings-menu.js +4 -1
  10. package/build/components/block-settings-menu/content-only-settings-menu.js.map +1 -1
  11. package/build/components/blog-title/index.js +6 -2
  12. package/build/components/blog-title/index.js.map +1 -1
  13. package/build/components/collapsible-block-toolbar/index.js +2 -3
  14. package/build/components/collapsible-block-toolbar/index.js.map +1 -1
  15. package/build/components/editor-interface/index.js +2 -1
  16. package/build/components/editor-interface/index.js.map +1 -1
  17. package/build/components/entities-saved-states/index.js +1 -1
  18. package/build/components/entities-saved-states/index.js.map +1 -1
  19. package/build/components/global-styles-provider/index.js +15 -3
  20. package/build/components/global-styles-provider/index.js.map +1 -1
  21. package/build/components/header/back-button.js +7 -8
  22. package/build/components/header/back-button.js.map +1 -1
  23. package/build/components/header/index.js +19 -17
  24. package/build/components/header/index.js.map +1 -1
  25. package/build/components/inserter-sidebar/index.js +10 -21
  26. package/build/components/inserter-sidebar/index.js.map +1 -1
  27. package/build/components/list-view-sidebar/index.js +19 -47
  28. package/build/components/list-view-sidebar/index.js.map +1 -1
  29. package/build/components/page-attributes/order.js +1 -67
  30. package/build/components/page-attributes/order.js.map +1 -1
  31. package/build/components/page-attributes/panel.js +1 -4
  32. package/build/components/page-attributes/panel.js.map +1 -1
  33. package/build/components/page-attributes/parent.js +2 -1
  34. package/build/components/page-attributes/parent.js.map +1 -1
  35. package/build/components/post-actions/actions.js +189 -244
  36. package/build/components/post-actions/actions.js.map +1 -1
  37. package/build/components/post-actions/index.js +1 -1
  38. package/build/components/post-actions/index.js.map +1 -1
  39. package/build/components/post-card-panel/index.js +8 -2
  40. package/build/components/post-card-panel/index.js.map +1 -1
  41. package/build/components/post-comments/index.js +1 -1
  42. package/build/components/post-comments/index.js.map +1 -1
  43. package/build/components/post-content-information/index.js +7 -1
  44. package/build/components/post-content-information/index.js.map +1 -1
  45. package/build/components/post-discussion/panel.js +2 -2
  46. package/build/components/post-discussion/panel.js.map +1 -1
  47. package/build/components/post-excerpt/panel.js +2 -2
  48. package/build/components/post-excerpt/panel.js.map +1 -1
  49. package/build/components/post-featured-image/index.js +3 -1
  50. package/build/components/post-featured-image/index.js.map +1 -1
  51. package/build/components/post-last-revision/index.js +2 -1
  52. package/build/components/post-last-revision/index.js.map +1 -1
  53. package/build/components/post-preview-button/index.js +1 -1
  54. package/build/components/post-preview-button/index.js.map +1 -1
  55. package/build/components/post-publish-button/index.js +4 -11
  56. package/build/components/post-publish-button/index.js.map +1 -1
  57. package/build/components/post-publish-panel/index.js +1 -1
  58. package/build/components/post-publish-panel/index.js.map +1 -1
  59. package/build/components/post-publish-panel/maybe-category-panel.js +4 -1
  60. package/build/components/post-publish-panel/maybe-category-panel.js.map +1 -1
  61. package/build/components/post-publish-panel/maybe-tags-panel.js +2 -1
  62. package/build/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
  63. package/build/components/post-saved-state/index.js +11 -1
  64. package/build/components/post-saved-state/index.js.map +1 -1
  65. package/build/components/post-schedule/index.js +3 -0
  66. package/build/components/post-schedule/index.js.map +1 -1
  67. package/build/components/post-status/index.js +32 -11
  68. package/build/components/post-status/index.js.map +1 -1
  69. package/build/components/post-taxonomies/flat-term-selector.js +17 -6
  70. package/build/components/post-taxonomies/flat-term-selector.js.map +1 -1
  71. package/build/components/post-taxonomies/index.js +7 -1
  72. package/build/components/post-taxonomies/index.js.map +1 -1
  73. package/build/components/post-template/block-theme.js +4 -4
  74. package/build/components/post-template/block-theme.js.map +1 -1
  75. package/build/components/post-template/classic-theme.js +8 -2
  76. package/build/components/post-template/classic-theme.js.map +1 -1
  77. package/build/components/post-template/create-new-template.js +4 -1
  78. package/build/components/post-template/create-new-template.js.map +1 -1
  79. package/build/components/post-template/hooks.js +5 -1
  80. package/build/components/post-template/hooks.js.map +1 -1
  81. package/build/components/post-template/panel.js +8 -2
  82. package/build/components/post-template/panel.js.map +1 -1
  83. package/build/components/post-title/index.js +5 -13
  84. package/build/components/post-title/index.js.map +1 -1
  85. package/build/components/post-trash/check.js +6 -4
  86. package/build/components/post-trash/check.js.map +1 -1
  87. package/build/components/post-url/panel.js +6 -2
  88. package/build/components/post-url/panel.js.map +1 -1
  89. package/build/components/posts-per-page/index.js +6 -2
  90. package/build/components/posts-per-page/index.js.map +1 -1
  91. package/build/components/preview-dropdown/index.js +1 -1
  92. package/build/components/preview-dropdown/index.js.map +1 -1
  93. package/build/components/provider/index.native.js +0 -4
  94. package/build/components/provider/index.native.js.map +1 -1
  95. package/build/components/provider/use-block-editor-settings.js +21 -9
  96. package/build/components/provider/use-block-editor-settings.js.map +1 -1
  97. package/build/components/save-publish-panels/index.js +30 -17
  98. package/build/components/save-publish-panels/index.js.map +1 -1
  99. package/build/components/sidebar/index.js +3 -7
  100. package/build/components/sidebar/index.js.map +1 -1
  101. package/build/components/sidebar/post-summary.js +1 -2
  102. package/build/components/sidebar/post-summary.js.map +1 -1
  103. package/build/components/site-discussion/index.js +7 -3
  104. package/build/components/site-discussion/index.js.map +1 -1
  105. package/build/components/template-content-panel/index.js +28 -3
  106. package/build/components/template-content-panel/index.js.map +1 -1
  107. package/build/components/visual-editor/edit-template-blocks-notification.js +4 -4
  108. package/build/components/visual-editor/edit-template-blocks-notification.js.map +1 -1
  109. package/build/components/visual-editor/index.js +6 -3
  110. package/build/components/visual-editor/index.js.map +1 -1
  111. package/build/{hooks → components/visual-editor}/use-select-nearest-editable-block.js +1 -1
  112. package/build/components/visual-editor/use-select-nearest-editable-block.js.map +1 -0
  113. package/build/dataviews/actions/delete-post.js +98 -0
  114. package/build/dataviews/actions/delete-post.js.map +1 -0
  115. package/build/{components/post-actions/export-pattern-action.js → dataviews/actions/export-pattern.js} +11 -20
  116. package/build/dataviews/actions/export-pattern.js.map +1 -0
  117. package/build/dataviews/actions/index.js +32 -0
  118. package/build/dataviews/actions/index.js.map +1 -0
  119. package/build/dataviews/actions/reset-post.js +111 -0
  120. package/build/dataviews/actions/reset-post.js.map +1 -0
  121. package/build/dataviews/actions/utils.js +50 -0
  122. package/build/dataviews/actions/utils.js.map +1 -0
  123. package/build/dataviews/store/private-actions.js.map +1 -1
  124. package/build/dataviews/store/private-selectors.js +6 -6
  125. package/build/dataviews/store/private-selectors.js.map +1 -1
  126. package/build/dataviews/store/reducer.js +6 -2
  127. package/build/dataviews/store/reducer.js.map +1 -1
  128. package/build/dataviews/types.js +6 -0
  129. package/build/dataviews/types.js.map +1 -0
  130. package/build/hooks/pattern-overrides.js +3 -3
  131. package/build/hooks/pattern-overrides.js.map +1 -1
  132. package/build/index.js +0 -1
  133. package/build/index.js.map +1 -1
  134. package/build/private-apis.js +5 -0
  135. package/build/private-apis.js.map +1 -1
  136. package/build/private-apis.native.js +0 -2
  137. package/build/private-apis.native.js.map +1 -1
  138. package/build/store/constants.js.map +1 -1
  139. package/build/store/private-actions.js +1 -1
  140. package/build/store/private-actions.js.map +1 -1
  141. package/build/store/private-selectors.js +0 -18
  142. package/build/store/private-selectors.js.map +1 -1
  143. package/build/store/utils/is-template-revertable.js +6 -8
  144. package/build/store/utils/is-template-revertable.js.map +1 -1
  145. package/build/utils/media-upload/index.js +35 -2
  146. package/build/utils/media-upload/index.js.map +1 -1
  147. package/build-module/bindings/api.js +57 -0
  148. package/build-module/bindings/api.js.map +1 -0
  149. package/build-module/bindings/pattern-overrides.js +26 -13
  150. package/build-module/bindings/pattern-overrides.js.map +1 -1
  151. package/build-module/bindings/post-meta.js +27 -12
  152. package/build-module/bindings/post-meta.js.map +1 -1
  153. package/build-module/components/block-settings-menu/content-only-settings-menu.js +4 -1
  154. package/build-module/components/block-settings-menu/content-only-settings-menu.js.map +1 -1
  155. package/build-module/components/blog-title/index.js +6 -2
  156. package/build-module/components/blog-title/index.js.map +1 -1
  157. package/build-module/components/collapsible-block-toolbar/index.js +1 -2
  158. package/build-module/components/collapsible-block-toolbar/index.js.map +1 -1
  159. package/build-module/components/editor-interface/index.js +2 -1
  160. package/build-module/components/editor-interface/index.js.map +1 -1
  161. package/build-module/components/entities-saved-states/index.js +1 -1
  162. package/build-module/components/entities-saved-states/index.js.map +1 -1
  163. package/build-module/components/global-styles-provider/index.js +15 -3
  164. package/build-module/components/global-styles-provider/index.js.map +1 -1
  165. package/build-module/components/header/back-button.js +5 -7
  166. package/build-module/components/header/back-button.js.map +1 -1
  167. package/build-module/components/header/index.js +19 -19
  168. package/build-module/components/header/index.js.map +1 -1
  169. package/build-module/components/inserter-sidebar/index.js +11 -22
  170. package/build-module/components/inserter-sidebar/index.js.map +1 -1
  171. package/build-module/components/list-view-sidebar/index.js +20 -49
  172. package/build-module/components/list-view-sidebar/index.js.map +1 -1
  173. package/build-module/components/page-attributes/order.js +4 -70
  174. package/build-module/components/page-attributes/order.js.map +1 -1
  175. package/build-module/components/page-attributes/panel.js +1 -6
  176. package/build-module/components/page-attributes/panel.js.map +1 -1
  177. package/build-module/components/page-attributes/parent.js +2 -1
  178. package/build-module/components/page-attributes/parent.js.map +1 -1
  179. package/build-module/components/post-actions/actions.js +186 -240
  180. package/build-module/components/post-actions/actions.js.map +1 -1
  181. package/build-module/components/post-actions/index.js +1 -1
  182. package/build-module/components/post-actions/index.js.map +1 -1
  183. package/build-module/components/post-card-panel/index.js +8 -2
  184. package/build-module/components/post-card-panel/index.js.map +1 -1
  185. package/build-module/components/post-comments/index.js +2 -2
  186. package/build-module/components/post-comments/index.js.map +1 -1
  187. package/build-module/components/post-content-information/index.js +7 -1
  188. package/build-module/components/post-content-information/index.js.map +1 -1
  189. package/build-module/components/post-discussion/panel.js +3 -3
  190. package/build-module/components/post-discussion/panel.js.map +1 -1
  191. package/build-module/components/post-excerpt/panel.js +2 -2
  192. package/build-module/components/post-excerpt/panel.js.map +1 -1
  193. package/build-module/components/post-featured-image/index.js +3 -1
  194. package/build-module/components/post-featured-image/index.js.map +1 -1
  195. package/build-module/components/post-last-revision/index.js +2 -1
  196. package/build-module/components/post-last-revision/index.js.map +1 -1
  197. package/build-module/components/post-preview-button/index.js +1 -1
  198. package/build-module/components/post-preview-button/index.js.map +1 -1
  199. package/build-module/components/post-publish-button/index.js +4 -11
  200. package/build-module/components/post-publish-button/index.js.map +1 -1
  201. package/build-module/components/post-publish-panel/index.js +1 -1
  202. package/build-module/components/post-publish-panel/index.js.map +1 -1
  203. package/build-module/components/post-publish-panel/maybe-category-panel.js +4 -1
  204. package/build-module/components/post-publish-panel/maybe-category-panel.js.map +1 -1
  205. package/build-module/components/post-publish-panel/maybe-tags-panel.js +2 -1
  206. package/build-module/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
  207. package/build-module/components/post-saved-state/index.js +11 -1
  208. package/build-module/components/post-saved-state/index.js.map +1 -1
  209. package/build-module/components/post-schedule/index.js +3 -0
  210. package/build-module/components/post-schedule/index.js.map +1 -1
  211. package/build-module/components/post-status/index.js +31 -11
  212. package/build-module/components/post-status/index.js.map +1 -1
  213. package/build-module/components/post-taxonomies/flat-term-selector.js +17 -6
  214. package/build-module/components/post-taxonomies/flat-term-selector.js.map +1 -1
  215. package/build-module/components/post-taxonomies/index.js +7 -1
  216. package/build-module/components/post-taxonomies/index.js.map +1 -1
  217. package/build-module/components/post-template/block-theme.js +4 -4
  218. package/build-module/components/post-template/block-theme.js.map +1 -1
  219. package/build-module/components/post-template/classic-theme.js +8 -2
  220. package/build-module/components/post-template/classic-theme.js.map +1 -1
  221. package/build-module/components/post-template/create-new-template.js +4 -1
  222. package/build-module/components/post-template/create-new-template.js.map +1 -1
  223. package/build-module/components/post-template/hooks.js +5 -1
  224. package/build-module/components/post-template/hooks.js.map +1 -1
  225. package/build-module/components/post-template/panel.js +8 -2
  226. package/build-module/components/post-template/panel.js.map +1 -1
  227. package/build-module/components/post-title/index.js +5 -13
  228. package/build-module/components/post-title/index.js.map +1 -1
  229. package/build-module/components/post-trash/check.js +6 -4
  230. package/build-module/components/post-trash/check.js.map +1 -1
  231. package/build-module/components/post-url/panel.js +6 -2
  232. package/build-module/components/post-url/panel.js.map +1 -1
  233. package/build-module/components/posts-per-page/index.js +6 -2
  234. package/build-module/components/posts-per-page/index.js.map +1 -1
  235. package/build-module/components/preview-dropdown/index.js +1 -1
  236. package/build-module/components/preview-dropdown/index.js.map +1 -1
  237. package/build-module/components/provider/index.native.js +0 -4
  238. package/build-module/components/provider/index.native.js.map +1 -1
  239. package/build-module/components/provider/use-block-editor-settings.js +21 -9
  240. package/build-module/components/provider/use-block-editor-settings.js.map +1 -1
  241. package/build-module/components/save-publish-panels/index.js +30 -17
  242. package/build-module/components/save-publish-panels/index.js.map +1 -1
  243. package/build-module/components/sidebar/index.js +3 -7
  244. package/build-module/components/sidebar/index.js.map +1 -1
  245. package/build-module/components/sidebar/post-summary.js +1 -2
  246. package/build-module/components/sidebar/post-summary.js.map +1 -1
  247. package/build-module/components/site-discussion/index.js +8 -4
  248. package/build-module/components/site-discussion/index.js.map +1 -1
  249. package/build-module/components/template-content-panel/index.js +29 -4
  250. package/build-module/components/template-content-panel/index.js.map +1 -1
  251. package/build-module/components/visual-editor/edit-template-blocks-notification.js +4 -4
  252. package/build-module/components/visual-editor/edit-template-blocks-notification.js.map +1 -1
  253. package/build-module/components/visual-editor/index.js +6 -3
  254. package/build-module/components/visual-editor/index.js.map +1 -1
  255. package/build-module/{hooks → components/visual-editor}/use-select-nearest-editable-block.js +1 -1
  256. package/build-module/components/visual-editor/use-select-nearest-editable-block.js.map +1 -0
  257. package/build-module/dataviews/actions/delete-post.js +89 -0
  258. package/build-module/dataviews/actions/delete-post.js.map +1 -0
  259. package/build-module/{components/post-actions/export-pattern-action.js → dataviews/actions/export-pattern.js} +10 -19
  260. package/build-module/dataviews/actions/export-pattern.js.map +1 -0
  261. package/build-module/dataviews/actions/index.js +24 -0
  262. package/build-module/dataviews/actions/index.js.map +1 -0
  263. package/build-module/dataviews/actions/reset-post.js +104 -0
  264. package/build-module/dataviews/actions/reset-post.js.map +1 -0
  265. package/build-module/dataviews/actions/utils.js +41 -0
  266. package/build-module/dataviews/actions/utils.js.map +1 -0
  267. package/build-module/dataviews/store/private-actions.js.map +1 -1
  268. package/build-module/dataviews/store/private-selectors.js +5 -5
  269. package/build-module/dataviews/store/private-selectors.js.map +1 -1
  270. package/build-module/dataviews/store/reducer.js +6 -2
  271. package/build-module/dataviews/store/reducer.js.map +1 -1
  272. package/build-module/dataviews/types.js +2 -0
  273. package/build-module/dataviews/types.js.map +1 -0
  274. package/build-module/hooks/pattern-overrides.js +4 -2
  275. package/build-module/hooks/pattern-overrides.js.map +1 -1
  276. package/build-module/index.js +0 -1
  277. package/build-module/index.js.map +1 -1
  278. package/build-module/private-apis.js +5 -0
  279. package/build-module/private-apis.js.map +1 -1
  280. package/build-module/private-apis.native.js +0 -2
  281. package/build-module/private-apis.native.js.map +1 -1
  282. package/build-module/store/constants.js.map +1 -1
  283. package/build-module/store/private-actions.js +1 -1
  284. package/build-module/store/private-actions.js.map +1 -1
  285. package/build-module/store/private-selectors.js +0 -17
  286. package/build-module/store/private-selectors.js.map +1 -1
  287. package/build-module/store/utils/is-template-revertable.js +6 -8
  288. package/build-module/store/utils/is-template-revertable.js.map +1 -1
  289. package/build-module/utils/media-upload/index.js +36 -3
  290. package/build-module/utils/media-upload/index.js.map +1 -1
  291. package/build-style/style-rtl.css +93 -95
  292. package/build-style/style.css +93 -95
  293. package/build-types/bindings/api.d.ts +25 -0
  294. package/build-types/bindings/api.d.ts.map +1 -0
  295. package/build-types/bindings/pattern-overrides.d.ts +17 -0
  296. package/build-types/bindings/pattern-overrides.d.ts.map +1 -0
  297. package/build-types/bindings/post-meta.d.ts +23 -0
  298. package/build-types/bindings/post-meta.d.ts.map +1 -0
  299. package/build-types/components/autocompleters/index.d.ts +2 -0
  300. package/build-types/components/autocompleters/index.d.ts.map +1 -0
  301. package/build-types/components/autocompleters/user.d.ts +6 -0
  302. package/build-types/components/autocompleters/user.d.ts.map +1 -0
  303. package/build-types/components/autosave-monitor/index.d.ts +15 -0
  304. package/build-types/components/autosave-monitor/index.d.ts.map +1 -0
  305. package/build-types/components/block-manager/category.d.ts +6 -0
  306. package/build-types/components/block-manager/category.d.ts.map +1 -0
  307. package/build-types/components/block-manager/checklist.d.ts +7 -0
  308. package/build-types/components/block-manager/checklist.d.ts.map +1 -0
  309. package/build-types/components/block-manager/index.d.ts +3 -0
  310. package/build-types/components/block-manager/index.d.ts.map +1 -0
  311. package/build-types/components/block-removal-warnings/index.d.ts +2 -0
  312. package/build-types/components/block-removal-warnings/index.d.ts.map +1 -0
  313. package/build-types/components/block-settings-menu/content-only-settings-menu.d.ts +2 -0
  314. package/build-types/components/block-settings-menu/content-only-settings-menu.d.ts.map +1 -0
  315. package/build-types/components/block-settings-menu/plugin-block-settings-menu-item.d.ts +65 -0
  316. package/build-types/components/block-settings-menu/plugin-block-settings-menu-item.d.ts.map +1 -0
  317. package/build-types/components/blog-title/index.d.ts +2 -0
  318. package/build-types/components/blog-title/index.d.ts.map +1 -0
  319. package/build-types/components/character-count/index.d.ts +7 -0
  320. package/build-types/components/character-count/index.d.ts.map +1 -0
  321. package/build-types/components/collapsible-block-toolbar/index.d.ts +5 -0
  322. package/build-types/components/collapsible-block-toolbar/index.d.ts.map +1 -0
  323. package/build-types/components/commands/index.d.ts +2 -0
  324. package/build-types/components/commands/index.d.ts.map +1 -0
  325. package/build-types/components/create-template-part-modal/index.d.ts +14 -0
  326. package/build-types/components/create-template-part-modal/index.d.ts.map +1 -0
  327. package/build-types/components/create-template-part-modal/utils.d.ts +4 -0
  328. package/build-types/components/create-template-part-modal/utils.d.ts.map +1 -0
  329. package/build-types/components/deprecated.d.ts +182 -0
  330. package/build-types/components/deprecated.d.ts.map +1 -0
  331. package/build-types/components/document-bar/index.d.ts +22 -0
  332. package/build-types/components/document-bar/index.d.ts.map +1 -0
  333. package/build-types/components/document-outline/check.d.ts +12 -0
  334. package/build-types/components/document-outline/check.d.ts.map +1 -0
  335. package/build-types/components/document-outline/index.d.ts +16 -0
  336. package/build-types/components/document-outline/index.d.ts.map +1 -0
  337. package/build-types/components/document-outline/item.d.ts +9 -0
  338. package/build-types/components/document-outline/item.d.ts.map +1 -0
  339. package/build-types/components/document-tools/index.d.ts +6 -0
  340. package/build-types/components/document-tools/index.d.ts.map +1 -0
  341. package/build-types/components/editor/index.d.ts +14 -0
  342. package/build-types/components/editor/index.d.ts.map +1 -0
  343. package/build-types/components/editor-history/redo.d.ts +4 -0
  344. package/build-types/components/editor-history/redo.d.ts.map +1 -0
  345. package/build-types/components/editor-history/undo.d.ts +4 -0
  346. package/build-types/components/editor-history/undo.d.ts.map +1 -0
  347. package/build-types/components/editor-interface/content-slot-fill.d.ts +3 -0
  348. package/build-types/components/editor-interface/content-slot-fill.d.ts.map +1 -0
  349. package/build-types/components/editor-interface/index.d.ts +17 -0
  350. package/build-types/components/editor-interface/index.d.ts.map +1 -0
  351. package/build-types/components/editor-notices/index.d.ts +13 -0
  352. package/build-types/components/editor-notices/index.d.ts.map +1 -0
  353. package/build-types/components/editor-snackbars/index.d.ts +7 -0
  354. package/build-types/components/editor-snackbars/index.d.ts.map +1 -0
  355. package/build-types/components/entities-saved-states/entity-record-item.d.ts +6 -0
  356. package/build-types/components/entities-saved-states/entity-record-item.d.ts.map +1 -0
  357. package/build-types/components/entities-saved-states/entity-type-list.d.ts +6 -0
  358. package/build-types/components/entities-saved-states/entity-type-list.d.ts.map +1 -0
  359. package/build-types/components/entities-saved-states/hooks/use-is-dirty.d.ts +2 -0
  360. package/build-types/components/entities-saved-states/hooks/use-is-dirty.d.ts.map +1 -0
  361. package/build-types/components/entities-saved-states/index.d.ts +43 -0
  362. package/build-types/components/entities-saved-states/index.d.ts.map +1 -0
  363. package/build-types/components/error-boundary/index.d.ts +14 -0
  364. package/build-types/components/error-boundary/index.d.ts.map +1 -0
  365. package/build-types/components/global-keyboard-shortcuts/index.d.ts +9 -0
  366. package/build-types/components/global-keyboard-shortcuts/index.d.ts.map +1 -0
  367. package/build-types/components/global-keyboard-shortcuts/register-shortcuts.d.ts +8 -0
  368. package/build-types/components/global-keyboard-shortcuts/register-shortcuts.d.ts.map +1 -0
  369. package/build-types/components/global-styles-provider/index.d.ts +20 -0
  370. package/build-types/components/global-styles-provider/index.d.ts.map +1 -0
  371. package/build-types/components/header/back-button.d.ts +7 -0
  372. package/build-types/components/header/back-button.d.ts.map +1 -0
  373. package/build-types/components/header/index.d.ts +10 -0
  374. package/build-types/components/header/index.d.ts.map +1 -0
  375. package/build-types/components/index.d.ts +108 -0
  376. package/build-types/components/index.d.ts.map +1 -0
  377. package/build-types/components/inserter-sidebar/index.d.ts +2 -0
  378. package/build-types/components/inserter-sidebar/index.d.ts.map +1 -0
  379. package/build-types/components/keyboard-shortcut-help-modal/config.d.ts +26 -0
  380. package/build-types/components/keyboard-shortcut-help-modal/config.d.ts.map +1 -0
  381. package/build-types/components/keyboard-shortcut-help-modal/dynamic-shortcut.d.ts +5 -0
  382. package/build-types/components/keyboard-shortcut-help-modal/dynamic-shortcut.d.ts.map +1 -0
  383. package/build-types/components/keyboard-shortcut-help-modal/index.d.ts +3 -0
  384. package/build-types/components/keyboard-shortcut-help-modal/index.d.ts.map +1 -0
  385. package/build-types/components/keyboard-shortcut-help-modal/shortcut.d.ts +8 -0
  386. package/build-types/components/keyboard-shortcut-help-modal/shortcut.d.ts.map +1 -0
  387. package/build-types/components/list-view-sidebar/index.d.ts +2 -0
  388. package/build-types/components/list-view-sidebar/index.d.ts.map +1 -0
  389. package/build-types/components/list-view-sidebar/list-view-outline.d.ts +2 -0
  390. package/build-types/components/list-view-sidebar/list-view-outline.d.ts.map +1 -0
  391. package/build-types/components/local-autosave-monitor/index.d.ts +3 -0
  392. package/build-types/components/local-autosave-monitor/index.d.ts.map +1 -0
  393. package/build-types/components/media-categories/index.d.ts +7 -0
  394. package/build-types/components/media-categories/index.d.ts.map +1 -0
  395. package/build-types/components/mode-switcher/index.d.ts +3 -0
  396. package/build-types/components/mode-switcher/index.d.ts.map +1 -0
  397. package/build-types/components/more-menu/copy-content-menu-item.d.ts +2 -0
  398. package/build-types/components/more-menu/copy-content-menu-item.d.ts.map +1 -0
  399. package/build-types/components/more-menu/index.d.ts +2 -0
  400. package/build-types/components/more-menu/index.d.ts.map +1 -0
  401. package/build-types/components/more-menu/tools-more-menu-group.d.ts +6 -0
  402. package/build-types/components/more-menu/tools-more-menu-group.d.ts.map +1 -0
  403. package/build-types/components/more-menu/view-more-menu-group.d.ts +6 -0
  404. package/build-types/components/more-menu/view-more-menu-group.d.ts.map +1 -0
  405. package/build-types/components/page-attributes/check.d.ts +13 -0
  406. package/build-types/components/page-attributes/check.d.ts.map +1 -0
  407. package/build-types/components/page-attributes/order.d.ts +9 -0
  408. package/build-types/components/page-attributes/order.d.ts.map +1 -0
  409. package/build-types/components/page-attributes/panel.d.ts +7 -0
  410. package/build-types/components/page-attributes/panel.d.ts.map +1 -0
  411. package/build-types/components/page-attributes/parent.d.ts +11 -0
  412. package/build-types/components/page-attributes/parent.d.ts.map +1 -0
  413. package/build-types/components/pattern-duplicate-modal/index.d.ts +3 -0
  414. package/build-types/components/pattern-duplicate-modal/index.d.ts.map +1 -0
  415. package/build-types/components/pattern-overrides-panel/index.d.ts +2 -0
  416. package/build-types/components/pattern-overrides-panel/index.d.ts.map +1 -0
  417. package/build-types/components/pattern-rename-modal/index.d.ts +3 -0
  418. package/build-types/components/pattern-rename-modal/index.d.ts.map +1 -0
  419. package/build-types/components/plugin-document-setting-panel/index.d.ts +69 -0
  420. package/build-types/components/plugin-document-setting-panel/index.d.ts.map +1 -0
  421. package/build-types/components/plugin-more-menu-item/index.d.ts +3 -0
  422. package/build-types/components/plugin-more-menu-item/index.d.ts.map +1 -0
  423. package/build-types/components/plugin-post-publish-panel/index.d.ts +47 -0
  424. package/build-types/components/plugin-post-publish-panel/index.d.ts.map +1 -0
  425. package/build-types/components/plugin-post-status-info/index.d.ts +57 -0
  426. package/build-types/components/plugin-post-status-info/index.d.ts.map +1 -0
  427. package/build-types/components/plugin-pre-publish-panel/index.d.ts +50 -0
  428. package/build-types/components/plugin-pre-publish-panel/index.d.ts.map +1 -0
  429. package/build-types/components/plugin-sidebar/index.d.ts +73 -0
  430. package/build-types/components/plugin-sidebar/index.d.ts.map +1 -0
  431. package/build-types/components/plugin-sidebar-more-menu-item/index.d.ts +52 -0
  432. package/build-types/components/plugin-sidebar-more-menu-item/index.d.ts.map +1 -0
  433. package/build-types/components/post-actions/actions.d.ts +31 -0
  434. package/build-types/components/post-actions/actions.d.ts.map +1 -0
  435. package/build-types/components/post-actions/index.d.ts +5 -0
  436. package/build-types/components/post-actions/index.d.ts.map +1 -0
  437. package/build-types/components/post-author/check.d.ts +13 -0
  438. package/build-types/components/post-author/check.d.ts.map +1 -0
  439. package/build-types/components/post-author/combobox.d.ts +2 -0
  440. package/build-types/components/post-author/combobox.d.ts.map +1 -0
  441. package/build-types/components/post-author/constants.d.ts +9 -0
  442. package/build-types/components/post-author/constants.d.ts.map +1 -0
  443. package/build-types/components/post-author/hook.d.ts +6 -0
  444. package/build-types/components/post-author/hook.d.ts.map +1 -0
  445. package/build-types/components/post-author/index.d.ts +8 -0
  446. package/build-types/components/post-author/index.d.ts.map +1 -0
  447. package/build-types/components/post-author/panel.d.ts +8 -0
  448. package/build-types/components/post-author/panel.d.ts.map +1 -0
  449. package/build-types/components/post-author/select.d.ts +2 -0
  450. package/build-types/components/post-author/select.d.ts.map +1 -0
  451. package/build-types/components/post-card-panel/index.d.ts +4 -0
  452. package/build-types/components/post-card-panel/index.d.ts.map +1 -0
  453. package/build-types/components/post-comments/index.d.ts +3 -0
  454. package/build-types/components/post-comments/index.d.ts.map +1 -0
  455. package/build-types/components/post-content-information/index.d.ts +2 -0
  456. package/build-types/components/post-content-information/index.d.ts.map +1 -0
  457. package/build-types/components/post-discussion/panel.d.ts +10 -0
  458. package/build-types/components/post-discussion/panel.d.ts.map +1 -0
  459. package/build-types/components/post-excerpt/check.d.ts +13 -0
  460. package/build-types/components/post-excerpt/check.d.ts.map +1 -0
  461. package/build-types/components/post-excerpt/index.d.ts +15 -0
  462. package/build-types/components/post-excerpt/index.d.ts.map +1 -0
  463. package/build-types/components/post-excerpt/panel.d.ts +8 -0
  464. package/build-types/components/post-excerpt/panel.d.ts.map +1 -0
  465. package/build-types/components/post-excerpt/plugin.d.ts +53 -0
  466. package/build-types/components/post-excerpt/plugin.d.ts.map +1 -0
  467. package/build-types/components/post-featured-image/check.d.ts +14 -0
  468. package/build-types/components/post-featured-image/check.d.ts.map +1 -0
  469. package/build-types/components/post-featured-image/index.d.ts +3 -0
  470. package/build-types/components/post-featured-image/index.d.ts.map +1 -0
  471. package/build-types/components/post-featured-image/panel.d.ts +13 -0
  472. package/build-types/components/post-featured-image/panel.d.ts.map +1 -0
  473. package/build-types/components/post-format/check.d.ts +5 -0
  474. package/build-types/components/post-format/check.d.ts.map +1 -0
  475. package/build-types/components/post-format/index.d.ts +16 -0
  476. package/build-types/components/post-format/index.d.ts.map +1 -0
  477. package/build-types/components/post-format/panel.d.ts +8 -0
  478. package/build-types/components/post-format/panel.d.ts.map +1 -0
  479. package/build-types/components/post-last-edited-panel/index.d.ts +2 -0
  480. package/build-types/components/post-last-edited-panel/index.d.ts.map +1 -0
  481. package/build-types/components/post-last-revision/check.d.ts +13 -0
  482. package/build-types/components/post-last-revision/check.d.ts.map +1 -0
  483. package/build-types/components/post-last-revision/index.d.ts +9 -0
  484. package/build-types/components/post-last-revision/index.d.ts.map +1 -0
  485. package/build-types/components/post-last-revision/panel.d.ts +8 -0
  486. package/build-types/components/post-last-revision/panel.d.ts.map +1 -0
  487. package/build-types/components/post-locked-modal/index.d.ts +8 -0
  488. package/build-types/components/post-locked-modal/index.d.ts.map +1 -0
  489. package/build-types/components/post-panel-row/index.d.ts +3 -0
  490. package/build-types/components/post-panel-row/index.d.ts.map +1 -0
  491. package/build-types/components/post-panel-section/index.d.ts +6 -0
  492. package/build-types/components/post-panel-section/index.d.ts.map +1 -0
  493. package/build-types/components/post-pending-status/check.d.ts +15 -0
  494. package/build-types/components/post-pending-status/check.d.ts.map +1 -0
  495. package/build-types/components/post-pending-status/index.d.ts +8 -0
  496. package/build-types/components/post-pending-status/index.d.ts.map +1 -0
  497. package/build-types/components/post-pingbacks/index.d.ts +3 -0
  498. package/build-types/components/post-pingbacks/index.d.ts.map +1 -0
  499. package/build-types/components/post-preview-button/index.d.ts +23 -0
  500. package/build-types/components/post-preview-button/index.d.ts.map +1 -0
  501. package/build-types/components/post-publish-button/index.d.ts +17 -0
  502. package/build-types/components/post-publish-button/index.d.ts.map +1 -0
  503. package/build-types/components/post-publish-button/label.d.ts +7 -0
  504. package/build-types/components/post-publish-button/label.d.ts.map +1 -0
  505. package/build-types/components/post-publish-button/post-publish-button-or-toggle.d.ts +17 -0
  506. package/build-types/components/post-publish-button/post-publish-button-or-toggle.d.ts.map +1 -0
  507. package/build-types/components/post-publish-panel/index.d.ts +10 -0
  508. package/build-types/components/post-publish-panel/index.d.ts.map +1 -0
  509. package/build-types/components/post-publish-panel/maybe-category-panel.d.ts +3 -0
  510. package/build-types/components/post-publish-panel/maybe-category-panel.d.ts.map +1 -0
  511. package/build-types/components/post-publish-panel/maybe-post-format-panel.d.ts +2 -0
  512. package/build-types/components/post-publish-panel/maybe-post-format-panel.d.ts.map +1 -0
  513. package/build-types/components/post-publish-panel/maybe-tags-panel.d.ts +3 -0
  514. package/build-types/components/post-publish-panel/maybe-tags-panel.d.ts.map +1 -0
  515. package/build-types/components/post-publish-panel/maybe-upload-media.d.ts +2 -0
  516. package/build-types/components/post-publish-panel/maybe-upload-media.d.ts.map +1 -0
  517. package/build-types/components/post-publish-panel/postpublish.d.ts +3 -0
  518. package/build-types/components/post-publish-panel/postpublish.d.ts.map +1 -0
  519. package/build-types/components/post-publish-panel/prepublish.d.ts +5 -0
  520. package/build-types/components/post-publish-panel/prepublish.d.ts.map +1 -0
  521. package/build-types/components/post-saved-state/index.d.ts +13 -0
  522. package/build-types/components/post-saved-state/index.d.ts.map +1 -0
  523. package/build-types/components/post-schedule/check.d.ts +12 -0
  524. package/build-types/components/post-schedule/check.d.ts.map +1 -0
  525. package/build-types/components/post-schedule/index.d.ts +17 -0
  526. package/build-types/components/post-schedule/index.d.ts.map +1 -0
  527. package/build-types/components/post-schedule/label.d.ts +25 -0
  528. package/build-types/components/post-schedule/label.d.ts.map +1 -0
  529. package/build-types/components/post-schedule/panel.d.ts +7 -0
  530. package/build-types/components/post-schedule/panel.d.ts.map +1 -0
  531. package/build-types/components/post-slug/check.d.ts +12 -0
  532. package/build-types/components/post-slug/check.d.ts.map +1 -0
  533. package/build-types/components/post-slug/index.d.ts +7 -0
  534. package/build-types/components/post-slug/index.d.ts.map +1 -0
  535. package/build-types/components/post-slug/panel.d.ts +3 -0
  536. package/build-types/components/post-slug/panel.d.ts.map +1 -0
  537. package/build-types/components/post-status/index.d.ts +6 -0
  538. package/build-types/components/post-status/index.d.ts.map +1 -0
  539. package/build-types/components/post-sticky/check.d.ts +12 -0
  540. package/build-types/components/post-sticky/check.d.ts.map +1 -0
  541. package/build-types/components/post-sticky/index.d.ts +7 -0
  542. package/build-types/components/post-sticky/index.d.ts.map +1 -0
  543. package/build-types/components/post-sticky/panel.d.ts +3 -0
  544. package/build-types/components/post-sticky/panel.d.ts.map +1 -0
  545. package/build-types/components/post-switch-to-draft-button/index.d.ts +7 -0
  546. package/build-types/components/post-switch-to-draft-button/index.d.ts.map +1 -0
  547. package/build-types/components/post-sync-status/index.d.ts +7 -0
  548. package/build-types/components/post-sync-status/index.d.ts.map +1 -0
  549. package/build-types/components/post-taxonomies/check.d.ts +12 -0
  550. package/build-types/components/post-taxonomies/check.d.ts.map +1 -0
  551. package/build-types/components/post-taxonomies/flat-term-selector.d.ts +66 -0
  552. package/build-types/components/post-taxonomies/flat-term-selector.d.ts.map +1 -0
  553. package/build-types/components/post-taxonomies/hierarchical-term-selector.d.ts +104 -0
  554. package/build-types/components/post-taxonomies/hierarchical-term-selector.d.ts.map +1 -0
  555. package/build-types/components/post-taxonomies/index.d.ts +5 -0
  556. package/build-types/components/post-taxonomies/index.d.ts.map +1 -0
  557. package/build-types/components/post-taxonomies/most-used-terms.d.ts +5 -0
  558. package/build-types/components/post-taxonomies/most-used-terms.d.ts.map +1 -0
  559. package/build-types/components/post-taxonomies/panel.d.ts +3 -0
  560. package/build-types/components/post-taxonomies/panel.d.ts.map +1 -0
  561. package/build-types/components/post-template/block-theme.d.ts +4 -0
  562. package/build-types/components/post-template/block-theme.d.ts.map +1 -0
  563. package/build-types/components/post-template/classic-theme.d.ts +3 -0
  564. package/build-types/components/post-template/classic-theme.d.ts.map +1 -0
  565. package/build-types/components/post-template/create-new-template-modal.d.ts +4 -0
  566. package/build-types/components/post-template/create-new-template-modal.d.ts.map +1 -0
  567. package/build-types/components/post-template/create-new-template.d.ts +4 -0
  568. package/build-types/components/post-template/create-new-template.d.ts.map +1 -0
  569. package/build-types/components/post-template/hooks.d.ts +8 -0
  570. package/build-types/components/post-template/hooks.d.ts.map +1 -0
  571. package/build-types/components/post-template/panel.d.ts +7 -0
  572. package/build-types/components/post-template/panel.d.ts.map +1 -0
  573. package/build-types/components/post-template/reset-default-template.d.ts +4 -0
  574. package/build-types/components/post-template/reset-default-template.d.ts.map +1 -0
  575. package/build-types/components/post-template/swap-template-button.d.ts +4 -0
  576. package/build-types/components/post-template/swap-template-button.d.ts.map +1 -0
  577. package/build-types/components/post-text-editor/index.d.ts +7 -0
  578. package/build-types/components/post-text-editor/index.d.ts.map +1 -0
  579. package/build-types/components/post-title/constants.d.ts +3 -0
  580. package/build-types/components/post-title/constants.d.ts.map +1 -0
  581. package/build-types/components/post-title/index.d.ts +3 -0
  582. package/build-types/components/post-title/index.d.ts.map +1 -0
  583. package/build-types/components/post-title/post-title-raw.d.ts +3 -0
  584. package/build-types/components/post-title/post-title-raw.d.ts.map +1 -0
  585. package/build-types/components/post-title/use-post-title-focus.d.ts +9 -0
  586. package/build-types/components/post-title/use-post-title-focus.d.ts.map +1 -0
  587. package/build-types/components/post-title/use-post-title.d.ts +7 -0
  588. package/build-types/components/post-title/use-post-title.d.ts.map +1 -0
  589. package/build-types/components/post-transform-panel/hooks.d.ts +2 -0
  590. package/build-types/components/post-transform-panel/hooks.d.ts.map +1 -0
  591. package/build-types/components/post-transform-panel/index.d.ts +2 -0
  592. package/build-types/components/post-transform-panel/index.d.ts.map +1 -0
  593. package/build-types/components/post-trash/check.d.ts +12 -0
  594. package/build-types/components/post-trash/check.d.ts.map +1 -0
  595. package/build-types/components/post-trash/index.d.ts +7 -0
  596. package/build-types/components/post-trash/index.d.ts.map +1 -0
  597. package/build-types/components/post-type-support-check/index.d.ts +18 -0
  598. package/build-types/components/post-type-support-check/index.d.ts.map +1 -0
  599. package/build-types/components/post-url/check.d.ts +12 -0
  600. package/build-types/components/post-url/check.d.ts.map +1 -0
  601. package/build-types/components/post-url/index.d.ts +14 -0
  602. package/build-types/components/post-url/index.d.ts.map +1 -0
  603. package/build-types/components/post-url/label.d.ts +13 -0
  604. package/build-types/components/post-url/label.d.ts.map +1 -0
  605. package/build-types/components/post-url/panel.d.ts +7 -0
  606. package/build-types/components/post-url/panel.d.ts.map +1 -0
  607. package/build-types/components/post-view-link/index.d.ts +2 -0
  608. package/build-types/components/post-view-link/index.d.ts.map +1 -0
  609. package/build-types/components/post-visibility/check.d.ts +13 -0
  610. package/build-types/components/post-visibility/check.d.ts.map +1 -0
  611. package/build-types/components/post-visibility/index.d.ts +11 -0
  612. package/build-types/components/post-visibility/index.d.ts.map +1 -0
  613. package/build-types/components/post-visibility/label.d.ts +13 -0
  614. package/build-types/components/post-visibility/label.d.ts.map +1 -0
  615. package/build-types/components/post-visibility/utils.d.ts +21 -0
  616. package/build-types/components/post-visibility/utils.d.ts.map +1 -0
  617. package/build-types/components/posts-per-page/index.d.ts +2 -0
  618. package/build-types/components/posts-per-page/index.d.ts.map +1 -0
  619. package/build-types/components/preferences-modal/enable-panel.d.ts +3 -0
  620. package/build-types/components/preferences-modal/enable-panel.d.ts.map +1 -0
  621. package/build-types/components/preferences-modal/enable-plugin-document-setting-panel.d.ts +14 -0
  622. package/build-types/components/preferences-modal/enable-plugin-document-setting-panel.d.ts.map +1 -0
  623. package/build-types/components/preferences-modal/enable-publish-sidebar.d.ts +3 -0
  624. package/build-types/components/preferences-modal/enable-publish-sidebar.d.ts.map +1 -0
  625. package/build-types/components/preferences-modal/index.d.ts +4 -0
  626. package/build-types/components/preferences-modal/index.d.ts.map +1 -0
  627. package/build-types/components/preview-dropdown/index.d.ts +5 -0
  628. package/build-types/components/preview-dropdown/index.d.ts.map +1 -0
  629. package/build-types/components/provider/disable-non-page-content-blocks.d.ts +6 -0
  630. package/build-types/components/provider/disable-non-page-content-blocks.d.ts.map +1 -0
  631. package/build-types/components/provider/index.d.ts +65 -0
  632. package/build-types/components/provider/index.d.ts.map +1 -0
  633. package/build-types/components/provider/navigation-block-editing-mode.d.ts +9 -0
  634. package/build-types/components/provider/navigation-block-editing-mode.d.ts.map +1 -0
  635. package/build-types/components/provider/use-auto-switch-editor-sidebars.d.ts +7 -0
  636. package/build-types/components/provider/use-auto-switch-editor-sidebars.d.ts.map +1 -0
  637. package/build-types/components/provider/use-block-editor-settings.d.ts +13 -0
  638. package/build-types/components/provider/use-block-editor-settings.d.ts.map +1 -0
  639. package/build-types/components/provider/use-hide-blocks-from-inserter.d.ts +9 -0
  640. package/build-types/components/provider/use-hide-blocks-from-inserter.d.ts.map +1 -0
  641. package/build-types/components/provider/with-registry-provider.d.ts +3 -0
  642. package/build-types/components/provider/with-registry-provider.d.ts.map +1 -0
  643. package/build-types/components/resizable-editor/index.d.ts +8 -0
  644. package/build-types/components/resizable-editor/index.d.ts.map +1 -0
  645. package/build-types/components/resizable-editor/resize-handle.d.ts +5 -0
  646. package/build-types/components/resizable-editor/resize-handle.d.ts.map +1 -0
  647. package/build-types/components/save-publish-panels/index.d.ts +11 -0
  648. package/build-types/components/save-publish-panels/index.d.ts.map +1 -0
  649. package/build-types/components/sidebar/constants.d.ts +5 -0
  650. package/build-types/components/sidebar/constants.d.ts.map +1 -0
  651. package/build-types/components/sidebar/header.d.ts +3 -0
  652. package/build-types/components/sidebar/header.d.ts.map +1 -0
  653. package/build-types/components/sidebar/index.d.ts +6 -0
  654. package/build-types/components/sidebar/index.d.ts.map +1 -0
  655. package/build-types/components/sidebar/post-summary.d.ts +4 -0
  656. package/build-types/components/sidebar/post-summary.d.ts.map +1 -0
  657. package/build-types/components/site-discussion/index.d.ts +2 -0
  658. package/build-types/components/site-discussion/index.d.ts.map +1 -0
  659. package/build-types/components/start-page-options/index.d.ts +2 -0
  660. package/build-types/components/start-page-options/index.d.ts.map +1 -0
  661. package/build-types/components/start-template-options/index.d.ts +2 -0
  662. package/build-types/components/start-template-options/index.d.ts.map +1 -0
  663. package/build-types/components/table-of-contents/index.d.ts +7 -0
  664. package/build-types/components/table-of-contents/index.d.ts.map +1 -0
  665. package/build-types/components/table-of-contents/panel.d.ts +6 -0
  666. package/build-types/components/table-of-contents/panel.d.ts.map +1 -0
  667. package/build-types/components/template-content-panel/index.d.ts +2 -0
  668. package/build-types/components/template-content-panel/index.d.ts.map +1 -0
  669. package/build-types/components/template-part-content-panel/index.d.ts +2 -0
  670. package/build-types/components/template-part-content-panel/index.d.ts.map +1 -0
  671. package/build-types/components/template-part-menu-items/convert-to-regular.d.ts +5 -0
  672. package/build-types/components/template-part-menu-items/convert-to-regular.d.ts.map +1 -0
  673. package/build-types/components/template-part-menu-items/convert-to-template-part.d.ts +5 -0
  674. package/build-types/components/template-part-menu-items/convert-to-template-part.d.ts.map +1 -0
  675. package/build-types/components/template-part-menu-items/index.d.ts +2 -0
  676. package/build-types/components/template-part-menu-items/index.d.ts.map +1 -0
  677. package/build-types/components/template-validation-notice/index.d.ts +2 -0
  678. package/build-types/components/template-validation-notice/index.d.ts.map +1 -0
  679. package/build-types/components/text-editor/index.d.ts +4 -0
  680. package/build-types/components/text-editor/index.d.ts.map +1 -0
  681. package/build-types/components/theme-support-check/index.d.ts +14 -0
  682. package/build-types/components/theme-support-check/index.d.ts.map +1 -0
  683. package/build-types/components/time-to-read/index.d.ts +7 -0
  684. package/build-types/components/time-to-read/index.d.ts.map +1 -0
  685. package/build-types/components/unsaved-changes-warning/index.d.ts +8 -0
  686. package/build-types/components/unsaved-changes-warning/index.d.ts.map +1 -0
  687. package/build-types/components/visual-editor/edit-template-blocks-notification.d.ts +18 -0
  688. package/build-types/components/visual-editor/edit-template-blocks-notification.d.ts.map +1 -0
  689. package/build-types/components/visual-editor/index.d.ts +10 -0
  690. package/build-types/components/visual-editor/index.d.ts.map +1 -0
  691. package/build-types/components/visual-editor/use-select-nearest-editable-block.d.ts +4 -0
  692. package/build-types/components/visual-editor/use-select-nearest-editable-block.d.ts.map +1 -0
  693. package/build-types/components/word-count/index.d.ts +7 -0
  694. package/build-types/components/word-count/index.d.ts.map +1 -0
  695. package/build-types/dataviews/actions/delete-post.d.ts +5 -0
  696. package/build-types/dataviews/actions/delete-post.d.ts.map +1 -0
  697. package/build-types/dataviews/actions/export-pattern.d.ts +8 -0
  698. package/build-types/dataviews/actions/export-pattern.d.ts.map +1 -0
  699. package/build-types/dataviews/actions/index.d.ts +2 -0
  700. package/build-types/dataviews/actions/index.d.ts.map +1 -0
  701. package/build-types/dataviews/actions/reset-post.d.ts +5 -0
  702. package/build-types/dataviews/actions/reset-post.d.ts.map +1 -0
  703. package/build-types/dataviews/actions/utils.d.ts +11 -0
  704. package/build-types/dataviews/actions/utils.d.ts.map +1 -0
  705. package/build-types/dataviews/api.d.ts +27 -0
  706. package/build-types/dataviews/api.d.ts.map +1 -0
  707. package/build-types/dataviews/store/private-actions.d.ts +2 -2
  708. package/build-types/dataviews/store/private-actions.d.ts.map +1 -1
  709. package/build-types/dataviews/store/private-selectors.d.ts +1 -5
  710. package/build-types/dataviews/store/private-selectors.d.ts.map +1 -1
  711. package/build-types/dataviews/store/reducer.d.ts +5 -1
  712. package/build-types/dataviews/store/reducer.d.ts.map +1 -1
  713. package/build-types/dataviews/types.d.ts +34 -0
  714. package/build-types/dataviews/types.d.ts.map +1 -0
  715. package/build-types/hooks/custom-sources-backwards-compatibility.d.ts +10 -0
  716. package/build-types/hooks/custom-sources-backwards-compatibility.d.ts.map +1 -0
  717. package/build-types/hooks/default-autocompleters.d.ts +2 -0
  718. package/build-types/hooks/default-autocompleters.d.ts.map +1 -0
  719. package/build-types/hooks/index.d.ts +2 -0
  720. package/build-types/hooks/index.d.ts.map +1 -0
  721. package/build-types/hooks/media-upload.d.ts +2 -0
  722. package/build-types/hooks/media-upload.d.ts.map +1 -0
  723. package/build-types/hooks/pattern-overrides.d.ts +2 -0
  724. package/build-types/hooks/pattern-overrides.d.ts.map +1 -0
  725. package/build-types/index.d.ts +6 -0
  726. package/build-types/index.d.ts.map +1 -0
  727. package/build-types/lock-unlock.d.ts +3 -0
  728. package/build-types/lock-unlock.d.ts.map +1 -0
  729. package/build-types/private-apis.d.ts +2 -0
  730. package/build-types/private-apis.d.ts.map +1 -0
  731. package/build-types/store/actions.d.ts +367 -0
  732. package/build-types/store/actions.d.ts.map +1 -0
  733. package/build-types/store/constants.d.ts +31 -0
  734. package/build-types/store/constants.d.ts.map +1 -0
  735. package/build-types/store/defaults.d.ts +21 -0
  736. package/build-types/store/defaults.d.ts.map +1 -0
  737. package/build-types/store/index.d.ts +17 -0
  738. package/build-types/store/index.d.ts.map +1 -0
  739. package/build-types/store/local-autosave.d.ts +4 -0
  740. package/build-types/store/local-autosave.d.ts.map +1 -0
  741. package/build-types/store/private-actions.d.ts +37 -0
  742. package/build-types/store/private-actions.d.ts.map +1 -0
  743. package/build-types/store/private-selectors.d.ts +24 -0
  744. package/build-types/store/private-selectors.d.ts.map +1 -0
  745. package/build-types/store/reducer.d.ts +228 -0
  746. package/build-types/store/reducer.d.ts.map +1 -0
  747. package/build-types/store/selectors.d.ts +853 -0
  748. package/build-types/store/selectors.d.ts.map +1 -0
  749. package/build-types/store/utils/is-template-revertable.d.ts +8 -0
  750. package/build-types/store/utils/is-template-revertable.d.ts.map +1 -0
  751. package/build-types/store/utils/notice-builder.d.ts +27 -0
  752. package/build-types/store/utils/notice-builder.d.ts.map +1 -0
  753. package/build-types/utils/get-template-part-icon.d.ts +9 -0
  754. package/build-types/utils/get-template-part-icon.d.ts.map +1 -0
  755. package/build-types/utils/index.d.ts +5 -0
  756. package/build-types/utils/index.d.ts.map +1 -0
  757. package/build-types/utils/media-upload/index.d.ts +21 -0
  758. package/build-types/utils/media-upload/index.d.ts.map +1 -0
  759. package/build-types/utils/terms.d.ts +12 -0
  760. package/build-types/utils/terms.d.ts.map +1 -0
  761. package/build-types/utils/url.d.ts +18 -0
  762. package/build-types/utils/url.d.ts.map +1 -0
  763. package/package.json +38 -36
  764. package/src/bindings/api.js +57 -0
  765. package/src/bindings/pattern-overrides.js +30 -20
  766. package/src/bindings/post-meta.js +24 -14
  767. package/src/components/block-settings-menu/content-only-settings-menu.js +4 -4
  768. package/src/components/blog-title/index.js +7 -2
  769. package/src/components/collapsible-block-toolbar/index.js +1 -3
  770. package/src/components/collapsible-block-toolbar/style.scss +0 -3
  771. package/src/components/document-bar/style.scss +1 -5
  772. package/src/components/document-tools/style.scss +4 -4
  773. package/src/components/editor-interface/index.js +17 -12
  774. package/src/components/editor-interface/style.scss +4 -0
  775. package/src/components/entities-saved-states/index.js +1 -1
  776. package/src/components/global-styles-provider/index.js +22 -11
  777. package/src/components/header/back-button.js +6 -6
  778. package/src/components/header/index.js +26 -25
  779. package/src/components/header/style.scss +64 -21
  780. package/src/components/inserter-sidebar/index.js +4 -24
  781. package/src/components/inserter-sidebar/style.scss +1 -6
  782. package/src/components/list-view-sidebar/index.js +34 -62
  783. package/src/components/list-view-sidebar/style.scss +0 -34
  784. package/src/components/page-attributes/order.js +3 -77
  785. package/src/components/page-attributes/panel.js +1 -7
  786. package/src/components/page-attributes/parent.js +6 -3
  787. package/src/components/post-actions/actions.js +227 -304
  788. package/src/components/post-actions/index.js +1 -1
  789. package/src/components/post-card-panel/index.js +8 -2
  790. package/src/components/post-comments/index.js +2 -2
  791. package/src/components/post-content-information/index.js +7 -1
  792. package/src/components/post-discussion/panel.js +5 -3
  793. package/src/components/post-excerpt/panel.js +3 -2
  794. package/src/components/post-featured-image/index.js +5 -1
  795. package/src/components/post-featured-image/style.scss +15 -0
  796. package/src/components/post-last-revision/index.js +1 -0
  797. package/src/components/post-panel-row/style.scss +1 -1
  798. package/src/components/post-preview-button/index.js +1 -1
  799. package/src/components/post-publish-button/index.js +4 -17
  800. package/src/components/post-publish-panel/index.js +1 -1
  801. package/src/components/post-publish-panel/maybe-category-panel.js +4 -1
  802. package/src/components/post-publish-panel/maybe-tags-panel.js +1 -1
  803. package/src/components/post-saved-state/index.js +11 -1
  804. package/src/components/post-schedule/index.js +5 -0
  805. package/src/components/post-status/index.js +19 -11
  806. package/src/components/post-taxonomies/README.md +1 -1
  807. package/src/components/post-taxonomies/flat-term-selector.js +19 -5
  808. package/src/components/post-taxonomies/index.js +8 -1
  809. package/src/components/post-template/block-theme.js +5 -1
  810. package/src/components/post-template/classic-theme.js +8 -3
  811. package/src/components/post-template/create-new-template.js +4 -1
  812. package/src/components/post-template/hooks.js +8 -2
  813. package/src/components/post-template/panel.js +10 -2
  814. package/src/components/post-title/index.js +5 -12
  815. package/src/components/post-trash/check.js +9 -5
  816. package/src/components/post-url/panel.js +7 -2
  817. package/src/components/posts-per-page/index.js +7 -2
  818. package/src/components/preview-dropdown/index.js +1 -1
  819. package/src/components/provider/index.native.js +3 -11
  820. package/src/components/provider/use-block-editor-settings.js +25 -11
  821. package/src/components/save-publish-panels/index.js +31 -24
  822. package/src/components/sidebar/index.js +2 -7
  823. package/src/components/sidebar/post-summary.js +0 -2
  824. package/src/components/site-discussion/index.js +9 -4
  825. package/src/components/template-content-panel/index.js +29 -4
  826. package/src/components/visual-editor/edit-template-blocks-notification.js +5 -1
  827. package/src/components/visual-editor/index.js +6 -3
  828. package/src/components/visual-editor/style.scss +1 -2
  829. package/src/{hooks → components/visual-editor}/use-select-nearest-editable-block.js +1 -1
  830. package/src/dataviews/actions/delete-post.tsx +109 -0
  831. package/src/{components/post-actions/export-pattern-action.js → dataviews/actions/export-pattern.tsx} +19 -19
  832. package/src/dataviews/actions/index.ts +25 -0
  833. package/src/dataviews/actions/reset-post.tsx +144 -0
  834. package/src/dataviews/actions/utils.ts +54 -0
  835. package/src/dataviews/store/private-actions.ts +2 -2
  836. package/src/dataviews/store/private-selectors.ts +13 -6
  837. package/src/dataviews/store/reducer.ts +12 -5
  838. package/src/dataviews/types.ts +33 -0
  839. package/src/hooks/pattern-overrides.js +5 -2
  840. package/src/index.js +0 -1
  841. package/src/private-apis.js +8 -0
  842. package/src/private-apis.native.js +0 -2
  843. package/src/store/private-actions.js +1 -6
  844. package/src/store/private-selectors.js +0 -25
  845. package/src/store/test/actions.js +9 -3
  846. package/src/store/utils/is-template-revertable.js +8 -8
  847. package/src/style.scss +0 -1
  848. package/src/utils/media-upload/index.js +38 -3
  849. package/tsconfig.json +3 -2
  850. package/tsconfig.tsbuildinfo +1 -1
  851. package/build/bindings/index.js +0 -22
  852. package/build/bindings/index.js.map +0 -1
  853. package/build/components/post-actions/export-pattern-action.js.map +0 -1
  854. package/build/components/post-actions/export-pattern-action.native.js +0 -11
  855. package/build/components/post-actions/export-pattern-action.native.js.map +0 -1
  856. package/build/components/template-areas/index.js +0 -84
  857. package/build/components/template-areas/index.js.map +0 -1
  858. package/build/hooks/use-select-nearest-editable-block.js.map +0 -1
  859. package/build/store/utils/get-filtered-template-parts.js +0 -71
  860. package/build/store/utils/get-filtered-template-parts.js.map +0 -1
  861. package/build/utils/set-nested-value.js +0 -44
  862. package/build/utils/set-nested-value.js.map +0 -1
  863. package/build-module/bindings/index.js +0 -17
  864. package/build-module/bindings/index.js.map +0 -1
  865. package/build-module/components/post-actions/export-pattern-action.js.map +0 -1
  866. package/build-module/components/post-actions/export-pattern-action.native.js +0 -5
  867. package/build-module/components/post-actions/export-pattern-action.native.js.map +0 -1
  868. package/build-module/components/template-areas/index.js +0 -78
  869. package/build-module/components/template-areas/index.js.map +0 -1
  870. package/build-module/hooks/use-select-nearest-editable-block.js.map +0 -1
  871. package/build-module/store/utils/get-filtered-template-parts.js +0 -64
  872. package/build-module/store/utils/get-filtered-template-parts.js.map +0 -1
  873. package/build-module/utils/set-nested-value.js +0 -38
  874. package/build-module/utils/set-nested-value.js.map +0 -1
  875. package/src/bindings/index.js +0 -15
  876. package/src/components/post-actions/export-pattern-action.native.js +0 -4
  877. package/src/components/template-areas/index.js +0 -94
  878. package/src/components/template-areas/style.scss +0 -22
  879. package/src/store/utils/get-filtered-template-parts.js +0 -69
  880. package/src/store/utils/test/get-filtered-template-parts.js +0 -189
  881. package/src/utils/set-nested-value.js +0 -39
  882. /package/src/store/{constants.js → constants.ts} +0 -0
@@ -1 +1 @@
1
- {"version":3,"names":["useViewportMatch","DropdownMenu","MenuGroup","MenuItem","VisuallyHidden","Icon","__","check","desktop","mobile","tablet","external","useSelect","useDispatch","store","coreStore","preferencesStore","editorStore","PostPreviewButton","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","PreviewDropdown","forceIsAutosaveable","disabled","deviceType","homeUrl","isTemplate","isViewable","showIconLabels","select","_getPostType$viewable","getDeviceType","getCurrentPostType","getUnstableBase","getPostType","get","_currentPostType","home","viewable","setDeviceType","isMobile","popoverProps","placement","toggleProps","className","size","showTooltip","__experimentalIsFocusable","menuProps","deviceIcons","icon","toLowerCase","label","disableOpenOnArrowDown","children","onClose","onClick","href","target","as","role","textContent","onPreview"],"sources":["@wordpress/editor/src/components/preview-dropdown/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useViewportMatch } from '@wordpress/compose';\nimport {\n\tDropdownMenu,\n\tMenuGroup,\n\tMenuItem,\n\tVisuallyHidden,\n\tIcon,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { check, desktop, mobile, tablet, external } from '@wordpress/icons';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport PostPreviewButton from '../post-preview-button';\n\nexport default function PreviewDropdown( { forceIsAutosaveable, disabled } ) {\n\tconst { deviceType, homeUrl, isTemplate, isViewable, showIconLabels } =\n\t\tuseSelect( ( select ) => {\n\t\t\tconst { getDeviceType, getCurrentPostType } = select( editorStore );\n\t\t\tconst { getUnstableBase, getPostType } = select( coreStore );\n\t\t\tconst { get } = select( preferencesStore );\n\t\t\tconst _currentPostType = getCurrentPostType();\n\t\t\treturn {\n\t\t\t\tdeviceType: getDeviceType(),\n\t\t\t\thomeUrl: getUnstableBase()?.home,\n\t\t\t\tisTemplate: _currentPostType === 'wp_template',\n\t\t\t\tisViewable: getPostType( _currentPostType )?.viewable ?? false,\n\t\t\t\tshowIconLabels: get( 'core', 'showIconLabels' ),\n\t\t\t};\n\t\t}, [] );\n\tconst { setDeviceType } = useDispatch( editorStore );\n\tconst isMobile = useViewportMatch( 'medium', '<' );\n\tif ( isMobile ) {\n\t\treturn null;\n\t}\n\n\tconst popoverProps = {\n\t\tplacement: 'bottom-end',\n\t};\n\tconst toggleProps = {\n\t\tclassName: 'editor-preview-dropdown__toggle',\n\t\tsize: 'compact',\n\t\tshowTooltip: ! showIconLabels,\n\t\tdisabled,\n\t\t__experimentalIsFocusable: disabled,\n\t};\n\tconst menuProps = {\n\t\t'aria-label': __( 'View options' ),\n\t};\n\n\tconst deviceIcons = {\n\t\tmobile,\n\t\ttablet,\n\t\tdesktop,\n\t};\n\n\treturn (\n\t\t<DropdownMenu\n\t\t\tclassName=\"editor-preview-dropdown\"\n\t\t\tpopoverProps={ popoverProps }\n\t\t\ttoggleProps={ toggleProps }\n\t\t\tmenuProps={ menuProps }\n\t\t\ticon={ deviceIcons[ deviceType.toLowerCase() ] }\n\t\t\tlabel={ __( 'View' ) }\n\t\t\tdisableOpenOnArrowDown={ disabled }\n\t\t>\n\t\t\t{ ( { onClose } ) => (\n\t\t\t\t<>\n\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\tonClick={ () => setDeviceType( 'Desktop' ) }\n\t\t\t\t\t\t\ticon={ deviceType === 'Desktop' && check }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Desktop' ) }\n\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\tonClick={ () => setDeviceType( 'Tablet' ) }\n\t\t\t\t\t\t\ticon={ deviceType === 'Tablet' && check }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Tablet' ) }\n\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\tonClick={ () => setDeviceType( 'Mobile' ) }\n\t\t\t\t\t\t\ticon={ deviceType === 'Mobile' && check }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Mobile' ) }\n\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t{ isTemplate && (\n\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\thref={ homeUrl }\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\ticon={ external }\n\t\t\t\t\t\t\t\tonClick={ onClose }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'View site' ) }\n\t\t\t\t\t\t\t\t<VisuallyHidden as=\"span\">\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t/* translators: accessibility text */\n\t\t\t\t\t\t\t\t\t\t__( '(opens in a new tab)' )\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t) }\n\t\t\t\t\t{ isViewable && (\n\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t<PostPreviewButton\n\t\t\t\t\t\t\t\tclassName=\"editor-preview-dropdown__button-external\"\n\t\t\t\t\t\t\t\trole=\"menuitem\"\n\t\t\t\t\t\t\t\tforceIsAutosaveable={ forceIsAutosaveable }\n\t\t\t\t\t\t\t\ttextContent={\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t{ __( 'Preview in new tab' ) }\n\t\t\t\t\t\t\t\t\t\t<Icon icon={ external } />\n\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tonPreview={ onClose }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t) }\n\t\t\t\t</>\n\t\t\t) }\n\t\t</DropdownMenu>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,gBAAgB,QAAQ,oBAAoB;AACrD,SACCC,YAAY,EACZC,SAAS,EACTC,QAAQ,EACRC,cAAc,EACdC,IAAI,QACE,uBAAuB;AAC9B,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,KAAK,EAAEC,OAAO,EAAEC,MAAM,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,kBAAkB;AAC3E,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;AACzD,SAASD,KAAK,IAAIE,gBAAgB,QAAQ,wBAAwB;;AAElE;AACA;AACA;AACA,SAASF,KAAK,IAAIG,WAAW,QAAQ,aAAa;AAClD,OAAOC,iBAAiB,MAAM,wBAAwB;AAAC,SAAA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D,QAAA,EAEvCpD,EAAE,CAAE,QAAS;QAAC,CACP,CAAC;MAAA,CACD,CAAC,EACVwB,UAAU,iBACXV,IAAA,CAAClB,SAAS;QAAAwD,QAAA,eACTpC,KAAA,CAACnB,QAAQ;UACR0D,IAAI,EAAGhC,OAAS;UAChBiC,MAAM,EAAC,QAAQ;UACfR,IAAI,EAAG3C,QAAU;UACjBiD,OAAO,EAAGD,OAAS;UAAAD,QAAA,GAEjBpD,EAAE,CAAE,WAAY,CAAC,eACnBc,IAAA,CAAChB,cAAc;YAAC2D,EAAE,EAAC,MAAM;YAAAL,QAAA,EAEvB;YACApD,EAAE,CAAE,sBAAuB;UAAC,CAEd,CAAC;QAAA,CACR;MAAC,CACD,CACX,EACCyB,UAAU,iBACXX,IAAA,CAAClB,SAAS;QAAAwD,QAAA,eACTtC,IAAA,CAACF,iBAAiB;UACjB8B,SAAS,EAAC,0CAA0C;UACpDgB,IAAI,EAAC,UAAU;UACftC,mBAAmB,EAAGA,mBAAqB;UAC3CuC,WAAW,eACV3C,KAAA,CAAAE,SAAA;YAAAkC,QAAA,GACGpD,EAAE,CAAE,oBAAqB,CAAC,eAC5Bc,IAAA,CAACf,IAAI;cAACiD,IAAI,EAAG3C;YAAU,CAAE,CAAC;UAAA,CACzB,CACF;UACDuD,SAAS,EAAGP;QAAS,CACrB;MAAC,CACQ,CACX;IAAA,CACA;EACF,CACY,CAAC;AAEjB","ignoreList":[]}
1
+ {"version":3,"names":["useViewportMatch","DropdownMenu","MenuGroup","MenuItem","VisuallyHidden","Icon","__","check","desktop","mobile","tablet","external","useSelect","useDispatch","store","coreStore","preferencesStore","editorStore","PostPreviewButton","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","PreviewDropdown","forceIsAutosaveable","disabled","deviceType","homeUrl","isTemplate","isViewable","showIconLabels","select","_getPostType$viewable","getDeviceType","getCurrentPostType","getUnstableBase","getPostType","get","_currentPostType","home","viewable","setDeviceType","isMobile","popoverProps","placement","toggleProps","className","size","showTooltip","accessibleWhenDisabled","menuProps","deviceIcons","icon","toLowerCase","label","disableOpenOnArrowDown","children","onClose","onClick","href","target","as","role","textContent","onPreview"],"sources":["@wordpress/editor/src/components/preview-dropdown/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useViewportMatch } from '@wordpress/compose';\nimport {\n\tDropdownMenu,\n\tMenuGroup,\n\tMenuItem,\n\tVisuallyHidden,\n\tIcon,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { check, desktop, mobile, tablet, external } from '@wordpress/icons';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport PostPreviewButton from '../post-preview-button';\n\nexport default function PreviewDropdown( { forceIsAutosaveable, disabled } ) {\n\tconst { deviceType, homeUrl, isTemplate, isViewable, showIconLabels } =\n\t\tuseSelect( ( select ) => {\n\t\t\tconst { getDeviceType, getCurrentPostType } = select( editorStore );\n\t\t\tconst { getUnstableBase, getPostType } = select( coreStore );\n\t\t\tconst { get } = select( preferencesStore );\n\t\t\tconst _currentPostType = getCurrentPostType();\n\t\t\treturn {\n\t\t\t\tdeviceType: getDeviceType(),\n\t\t\t\thomeUrl: getUnstableBase()?.home,\n\t\t\t\tisTemplate: _currentPostType === 'wp_template',\n\t\t\t\tisViewable: getPostType( _currentPostType )?.viewable ?? false,\n\t\t\t\tshowIconLabels: get( 'core', 'showIconLabels' ),\n\t\t\t};\n\t\t}, [] );\n\tconst { setDeviceType } = useDispatch( editorStore );\n\tconst isMobile = useViewportMatch( 'medium', '<' );\n\tif ( isMobile ) {\n\t\treturn null;\n\t}\n\n\tconst popoverProps = {\n\t\tplacement: 'bottom-end',\n\t};\n\tconst toggleProps = {\n\t\tclassName: 'editor-preview-dropdown__toggle',\n\t\tsize: 'compact',\n\t\tshowTooltip: ! showIconLabels,\n\t\tdisabled,\n\t\taccessibleWhenDisabled: disabled,\n\t};\n\tconst menuProps = {\n\t\t'aria-label': __( 'View options' ),\n\t};\n\n\tconst deviceIcons = {\n\t\tmobile,\n\t\ttablet,\n\t\tdesktop,\n\t};\n\n\treturn (\n\t\t<DropdownMenu\n\t\t\tclassName=\"editor-preview-dropdown\"\n\t\t\tpopoverProps={ popoverProps }\n\t\t\ttoggleProps={ toggleProps }\n\t\t\tmenuProps={ menuProps }\n\t\t\ticon={ deviceIcons[ deviceType.toLowerCase() ] }\n\t\t\tlabel={ __( 'View' ) }\n\t\t\tdisableOpenOnArrowDown={ disabled }\n\t\t>\n\t\t\t{ ( { onClose } ) => (\n\t\t\t\t<>\n\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\tonClick={ () => setDeviceType( 'Desktop' ) }\n\t\t\t\t\t\t\ticon={ deviceType === 'Desktop' && check }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Desktop' ) }\n\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\tonClick={ () => setDeviceType( 'Tablet' ) }\n\t\t\t\t\t\t\ticon={ deviceType === 'Tablet' && check }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Tablet' ) }\n\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\tonClick={ () => setDeviceType( 'Mobile' ) }\n\t\t\t\t\t\t\ticon={ deviceType === 'Mobile' && check }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Mobile' ) }\n\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t{ isTemplate && (\n\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\thref={ homeUrl }\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\ticon={ external }\n\t\t\t\t\t\t\t\tonClick={ onClose }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'View site' ) }\n\t\t\t\t\t\t\t\t<VisuallyHidden as=\"span\">\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t/* translators: accessibility text */\n\t\t\t\t\t\t\t\t\t\t__( '(opens in a new tab)' )\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t) }\n\t\t\t\t\t{ isViewable && (\n\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t<PostPreviewButton\n\t\t\t\t\t\t\t\tclassName=\"editor-preview-dropdown__button-external\"\n\t\t\t\t\t\t\t\trole=\"menuitem\"\n\t\t\t\t\t\t\t\tforceIsAutosaveable={ forceIsAutosaveable }\n\t\t\t\t\t\t\t\ttextContent={\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t{ __( 'Preview in new tab' ) }\n\t\t\t\t\t\t\t\t\t\t<Icon icon={ external } />\n\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tonPreview={ onClose }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t) }\n\t\t\t\t</>\n\t\t\t) }\n\t\t</DropdownMenu>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,gBAAgB,QAAQ,oBAAoB;AACrD,SACCC,YAAY,EACZC,SAAS,EACTC,QAAQ,EACRC,cAAc,EACdC,IAAI,QACE,uBAAuB;AAC9B,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,KAAK,EAAEC,OAAO,EAAEC,MAAM,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,kBAAkB;AAC3E,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;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mD,QAAA,EAEvCpD,EAAE,CAAE,QAAS;QAAC,CACP,CAAC,eACXc,IAAA,CAACjB,QAAQ;UACRyD,OAAO,EAAGA,CAAA,KAAMjB,aAAa,CAAE,QAAS,CAAG;UAC3CW,IAAI,EAAG1B,UAAU,KAAK,QAAQ,IAAIrB,KAAO;UAAAmD,QAAA,EAEvCpD,EAAE,CAAE,QAAS;QAAC,CACP,CAAC;MAAA,CACD,CAAC,EACVwB,UAAU,iBACXV,IAAA,CAAClB,SAAS;QAAAwD,QAAA,eACTpC,KAAA,CAACnB,QAAQ;UACR0D,IAAI,EAAGhC,OAAS;UAChBiC,MAAM,EAAC,QAAQ;UACfR,IAAI,EAAG3C,QAAU;UACjBiD,OAAO,EAAGD,OAAS;UAAAD,QAAA,GAEjBpD,EAAE,CAAE,WAAY,CAAC,eACnBc,IAAA,CAAChB,cAAc;YAAC2D,EAAE,EAAC,MAAM;YAAAL,QAAA,EAEvB;YACApD,EAAE,CAAE,sBAAuB;UAAC,CAEd,CAAC;QAAA,CACR;MAAC,CACD,CACX,EACCyB,UAAU,iBACXX,IAAA,CAAClB,SAAS;QAAAwD,QAAA,eACTtC,IAAA,CAACF,iBAAiB;UACjB8B,SAAS,EAAC,0CAA0C;UACpDgB,IAAI,EAAC,UAAU;UACftC,mBAAmB,EAAGA,mBAAqB;UAC3CuC,WAAW,eACV3C,KAAA,CAAAE,SAAA;YAAAkC,QAAA,GACGpD,EAAE,CAAE,oBAAqB,CAAC,eAC5Bc,IAAA,CAACf,IAAI;cAACiD,IAAI,EAAG3C;YAAU,CAAE,CAAC;UAAA,CACzB,CACF;UACDuD,SAAS,EAAGP;QAAS,CACrB;MAAC,CACQ,CACX;IAAA,CACA;EACF,CACY,CAAC;AAEjB","ignoreList":[]}
@@ -120,12 +120,8 @@ class NativeEditorProvider extends Component {
120
120
  }
121
121
  });
122
122
  this.subscriptionParentUpdateEditorSettings = subscribeUpdateEditorSettings(({
123
- galleryWithImageBlocks,
124
123
  ...editorSettings
125
124
  }) => {
126
- if (typeof galleryWithImageBlocks === 'boolean') {
127
- window.wp.galleryBlockV2Enabled = galleryWithImageBlocks;
128
- }
129
125
  updateEditorSettings(this.getThemeColors(editorSettings));
130
126
  });
131
127
  this.subscriptionParentUpdateCapabilities = subscribeUpdateCapabilities(payload => {
@@ -1 +1 @@
1
- {"version":3,"names":["BackHandler","memize","SafeAreaProvider","RNReactNativeGutenbergBridge","requestBlockTypeImpressions","setBlockTypeImpressions","subscribeParentGetHtml","subscribeParentToggleHTMLMode","subscribeUpdateHtml","subscribeSetTitle","subscribeMediaAppend","subscribeReplaceBlock","subscribeUpdateEditorSettings","subscribeUpdateCapabilities","subscribeShowNotice","subscribeShowEditorHelp","subscribeToContentUpdate","Component","count","wordCount","parse","serialize","getUnregisteredTypeHandlerName","getBlockType","createBlock","pasteHandler","withDispatch","withSelect","compose","applyFilters","store","blockEditorStore","getGlobalStyles","getColorsAndGradients","NEW_BLOCK_TYPES","__","postTypeEntities","name","baseURL","map","postTypeEntity","kind","transientEdits","blocks","selection","mergedEdits","meta","rawAttributes","EditorHelpTopics","editorStore","noticesStore","coreStore","EditorProvider","insertContentWithTitle","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","NativeEditorProvider","constructor","arguments","post","props","addEntities","receiveEntityRecords","type","onHardwareBackPress","bind","onContentUpdate","getEditorSettings","settings","capabilities","maxSize","state","isHelpVisible","componentDidMount","createErrorNotice","locale","hostAppNamespace","updateEditorSettings","updateBlockEditorSettings","getThemeColors","subscriptionParentGetHtml","serializeToNativeAction","subscriptionParentToggleHTMLMode","toggleMode","subscriptionParentSetTitle","payload","editTitle","title","subscriptionParentUpdateHtml","updateHtmlAction","html","subscriptionParentReplaceBlock","replaceBlockAction","clientId","subscriptionParentMediaAppend","blockName","mediaType","blockType","newBlock","id","mediaId","mediaUrl","indexAfterSelected","selectedBlockIndex","insertionIndex","blockCount","insertBlock","subscriptionParentUpdateEditorSettings","galleryWithImageBlocks","editorSettings","window","wp","galleryBlockV2Enabled","subscriptionParentUpdateCapabilities","updateCapabilitiesAction","subscriptionParentShowNotice","createSuccessNotice","message","subscriptionParentShowEditorHelp","setState","hardwareBackPressListener","addEventListener","subscriptionOnContentUpdate","data","storedImpressions","impressions","storedImpressionKeys","Object","keys","storedImpressionsCurrent","every","newKey","includes","componentWillUnmount","remove","rawStyles","rawFeatures","defaultEditorColors","defaultEditorGradients","componentDidUpdate","prevProps","isReady","isUnsupportedBlock","unsupportedBlockNames","filter","block","attributes","originalName","editorDidMount","clearSelectedBlock","content","rawContent","onClearPostTitleSelection","onInsertBlockAfter","onInsertBlocks","plainText","mode","hasChanges","raw","contentInfo","characterCount","paragraphCount","provideToNative_Html","parsed","resetEditorBlocksWithoutUndoLevel","blockClientId","replaceBlock","switchMode","render","children","isVisible","onClose","close","showSupport","supportSection","ComposedNativeProvider","select","_settings$colors","_settings$gradients","__unstableIsEditorReady","isEditorReady","getEditorBlocks","getEditedPostAttribute","getEditedPostContent","getEditorMode","getBlockIndex","getSelectedBlockClientId","getGlobalBlockCount","colors","gradients","selectedBlockClientId","dispatch","editPost","resetEditorBlocks","switchEditorMode","togglePostTitleSelection","updateSettings","insertBlocks","__unstableShouldCreateUndoLevel","undefined","ExperimentalEditorProvider"],"sources":["@wordpress/editor/src/components/provider/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { BackHandler } from 'react-native';\nimport memize from 'memize';\nimport { SafeAreaProvider } from 'react-native-safe-area-context';\n\n/**\n * WordPress dependencies\n */\nimport RNReactNativeGutenbergBridge, {\n\trequestBlockTypeImpressions,\n\tsetBlockTypeImpressions,\n\tsubscribeParentGetHtml,\n\tsubscribeParentToggleHTMLMode,\n\tsubscribeUpdateHtml,\n\tsubscribeSetTitle,\n\tsubscribeMediaAppend,\n\tsubscribeReplaceBlock,\n\tsubscribeUpdateEditorSettings,\n\tsubscribeUpdateCapabilities,\n\tsubscribeShowNotice,\n\tsubscribeShowEditorHelp,\n\tsubscribeToContentUpdate,\n} from '@wordpress/react-native-bridge';\nimport { Component } from '@wordpress/element';\nimport { count as wordCount } from '@wordpress/wordcount';\nimport {\n\tparse,\n\tserialize,\n\tgetUnregisteredTypeHandlerName,\n\tgetBlockType,\n\tcreateBlock,\n\tpasteHandler,\n} from '@wordpress/blocks';\nimport { withDispatch, withSelect } from '@wordpress/data';\nimport { compose } from '@wordpress/compose';\nimport { applyFilters } from '@wordpress/hooks';\nimport {\n\tstore as blockEditorStore,\n\tgetGlobalStyles,\n\tgetColorsAndGradients,\n} from '@wordpress/block-editor';\nimport { NEW_BLOCK_TYPES } from '@wordpress/block-library';\nimport { __ } from '@wordpress/i18n';\n\nconst postTypeEntities = [\n\t{ name: 'post', baseURL: '/wp/v2/posts' },\n\t{ name: 'page', baseURL: '/wp/v2/pages' },\n\t{ name: 'attachment', baseURL: '/wp/v2/media' },\n\t{ name: 'wp_block', baseURL: '/wp/v2/blocks' },\n].map( ( postTypeEntity ) => ( {\n\tkind: 'postType',\n\t...postTypeEntity,\n\ttransientEdits: {\n\t\tblocks: true,\n\t\tselection: true,\n\t},\n\tmergedEdits: {\n\t\tmeta: true,\n\t},\n\trawAttributes: [ 'title', 'excerpt', 'content' ],\n} ) );\nimport { EditorHelpTopics, store as editorStore } from '@wordpress/editor';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport EditorProvider from './index.js';\nimport { insertContentWithTitle } from '../post-title';\n\nclass NativeEditorProvider extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\t// Keep a local reference to `post` to detect changes.\n\t\tthis.post = this.props.post;\n\t\tthis.props.addEntities( postTypeEntities );\n\t\tthis.props.receiveEntityRecords(\n\t\t\t'postType',\n\t\t\tthis.post.type,\n\t\t\tthis.post\n\t\t);\n\n\t\tthis.onHardwareBackPress = this.onHardwareBackPress.bind( this );\n\t\tthis.onContentUpdate = this.onContentUpdate.bind( this );\n\n\t\tthis.getEditorSettings = memize(\n\t\t\t( settings, capabilities ) => ( {\n\t\t\t\t...settings,\n\t\t\t\tcapabilities,\n\t\t\t} ),\n\t\t\t{\n\t\t\t\tmaxSize: 1,\n\t\t\t}\n\t\t);\n\t\tthis.state = {\n\t\t\tisHelpVisible: false,\n\t\t};\n\t}\n\n\tcomponentDidMount() {\n\t\tconst {\n\t\t\tcapabilities,\n\t\t\tcreateErrorNotice,\n\t\t\tlocale,\n\t\t\thostAppNamespace,\n\t\t\tupdateEditorSettings,\n\t\t\tupdateBlockEditorSettings,\n\t\t} = this.props;\n\n\t\tupdateEditorSettings( {\n\t\t\tcapabilities,\n\t\t\t...this.getThemeColors( this.props ),\n\t\t\tlocale,\n\t\t\thostAppNamespace,\n\t\t} );\n\n\t\tthis.subscriptionParentGetHtml = subscribeParentGetHtml( () => {\n\t\t\tthis.serializeToNativeAction();\n\t\t} );\n\n\t\tthis.subscriptionParentToggleHTMLMode = subscribeParentToggleHTMLMode(\n\t\t\t() => {\n\t\t\t\tthis.toggleMode();\n\t\t\t}\n\t\t);\n\n\t\tthis.subscriptionParentSetTitle = subscribeSetTitle( ( payload ) => {\n\t\t\tthis.props.editTitle( payload.title );\n\t\t} );\n\n\t\tthis.subscriptionParentUpdateHtml = subscribeUpdateHtml(\n\t\t\t( payload ) => {\n\t\t\t\tthis.updateHtmlAction( payload.html );\n\t\t\t}\n\t\t);\n\n\t\tthis.subscriptionParentReplaceBlock = subscribeReplaceBlock(\n\t\t\t( payload ) => {\n\t\t\t\tthis.replaceBlockAction( payload.html, payload.clientId );\n\t\t\t}\n\t\t);\n\n\t\tthis.subscriptionParentMediaAppend = subscribeMediaAppend(\n\t\t\t( payload ) => {\n\t\t\t\tconst blockName = 'core/' + payload.mediaType;\n\t\t\t\tconst blockType = getBlockType( blockName );\n\n\t\t\t\tif ( blockType && blockType?.name ) {\n\t\t\t\t\tconst newBlock = createBlock( blockType.name, {\n\t\t\t\t\t\tid: payload.mediaId,\n\t\t\t\t\t\t[ payload.mediaType === 'image' ? 'url' : 'src' ]:\n\t\t\t\t\t\t\tpayload.mediaUrl,\n\t\t\t\t\t} );\n\n\t\t\t\t\tconst indexAfterSelected =\n\t\t\t\t\t\tthis.props.selectedBlockIndex + 1;\n\t\t\t\t\tconst insertionIndex =\n\t\t\t\t\t\tindexAfterSelected || this.props.blockCount;\n\n\t\t\t\t\tthis.props.insertBlock( newBlock, insertionIndex );\n\t\t\t\t} else {\n\t\t\t\t\tcreateErrorNotice(\n\t\t\t\t\t\t__( 'File type not supported as a media file.' )\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\n\t\tthis.subscriptionParentUpdateEditorSettings =\n\t\t\tsubscribeUpdateEditorSettings(\n\t\t\t\t( { galleryWithImageBlocks, ...editorSettings } ) => {\n\t\t\t\t\tif ( typeof galleryWithImageBlocks === 'boolean' ) {\n\t\t\t\t\t\twindow.wp.galleryBlockV2Enabled =\n\t\t\t\t\t\t\tgalleryWithImageBlocks;\n\t\t\t\t\t}\n\t\t\t\t\tupdateEditorSettings(\n\t\t\t\t\t\tthis.getThemeColors( editorSettings )\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t);\n\n\t\tthis.subscriptionParentUpdateCapabilities = subscribeUpdateCapabilities(\n\t\t\t( payload ) => {\n\t\t\t\tthis.updateCapabilitiesAction( payload );\n\t\t\t}\n\t\t);\n\n\t\tthis.subscriptionParentShowNotice = subscribeShowNotice(\n\t\t\t( payload ) => {\n\t\t\t\tthis.props.createSuccessNotice( payload.message );\n\t\t\t}\n\t\t);\n\n\t\tthis.subscriptionParentShowEditorHelp = subscribeShowEditorHelp( () => {\n\t\t\tthis.setState( { isHelpVisible: true } );\n\t\t} );\n\n\t\tthis.hardwareBackPressListener = BackHandler.addEventListener(\n\t\t\t'hardwareBackPress',\n\t\t\tthis.onHardwareBackPress\n\t\t);\n\n\t\tthis.subscriptionOnContentUpdate = subscribeToContentUpdate(\n\t\t\t( data ) => {\n\t\t\t\tthis.onContentUpdate( data );\n\t\t\t}\n\t\t);\n\n\t\t// Request current block impressions from native app.\n\t\trequestBlockTypeImpressions( ( storedImpressions ) => {\n\t\t\tconst impressions = { ...NEW_BLOCK_TYPES, ...storedImpressions };\n\n\t\t\t// Persist impressions to JavaScript store.\n\t\t\tupdateBlockEditorSettings( { impressions } );\n\n\t\t\t// Persist impressions to native store if they do not include latest\n\t\t\t// `NEW_BLOCK_TYPES` configuration.\n\t\t\tconst storedImpressionKeys = Object.keys( storedImpressions );\n\t\t\tconst storedImpressionsCurrent = Object.keys(\n\t\t\t\tNEW_BLOCK_TYPES\n\t\t\t).every( ( newKey ) => storedImpressionKeys.includes( newKey ) );\n\t\t\tif ( ! storedImpressionsCurrent ) {\n\t\t\t\tsetBlockTypeImpressions( impressions );\n\t\t\t}\n\t\t} );\n\t}\n\n\tcomponentWillUnmount() {\n\t\tif ( this.subscriptionParentGetHtml ) {\n\t\t\tthis.subscriptionParentGetHtml.remove();\n\t\t}\n\n\t\tif ( this.subscriptionParentToggleHTMLMode ) {\n\t\t\tthis.subscriptionParentToggleHTMLMode.remove();\n\t\t}\n\n\t\tif ( this.subscriptionParentSetTitle ) {\n\t\t\tthis.subscriptionParentSetTitle.remove();\n\t\t}\n\n\t\tif ( this.subscriptionParentUpdateHtml ) {\n\t\t\tthis.subscriptionParentUpdateHtml.remove();\n\t\t}\n\n\t\tif ( this.subscriptionParentReplaceBlock ) {\n\t\t\tthis.subscriptionParentReplaceBlock.remove();\n\t\t}\n\n\t\tif ( this.subscriptionParentMediaAppend ) {\n\t\t\tthis.subscriptionParentMediaAppend.remove();\n\t\t}\n\n\t\tif ( this.subscriptionParentUpdateEditorSettings ) {\n\t\t\tthis.subscriptionParentUpdateEditorSettings.remove();\n\t\t}\n\n\t\tif ( this.subscriptionParentUpdateCapabilities ) {\n\t\t\tthis.subscriptionParentUpdateCapabilities.remove();\n\t\t}\n\n\t\tif ( this.subscriptionParentShowNotice ) {\n\t\t\tthis.subscriptionParentShowNotice.remove();\n\t\t}\n\n\t\tif ( this.subscriptionParentShowEditorHelp ) {\n\t\t\tthis.subscriptionParentShowEditorHelp.remove();\n\t\t}\n\n\t\tif ( this.hardwareBackPressListener ) {\n\t\t\tthis.hardwareBackPressListener.remove();\n\t\t}\n\n\t\tif ( this.subscriptionOnContentUpdate ) {\n\t\t\tthis.subscriptionOnContentUpdate.remove();\n\t\t}\n\t}\n\n\tgetThemeColors( { rawStyles, rawFeatures } ) {\n\t\tconst { defaultEditorColors, defaultEditorGradients } = this.props;\n\n\t\tif ( rawStyles && rawFeatures ) {\n\t\t\treturn getGlobalStyles( rawStyles, rawFeatures );\n\t\t}\n\n\t\treturn getColorsAndGradients(\n\t\t\tdefaultEditorColors,\n\t\t\tdefaultEditorGradients,\n\t\t\trawFeatures\n\t\t);\n\t}\n\n\tcomponentDidUpdate( prevProps ) {\n\t\tif ( ! prevProps.isReady && this.props.isReady ) {\n\t\t\tconst blocks = this.props.blocks;\n\t\t\tconst isUnsupportedBlock = ( { name } ) =>\n\t\t\t\tname === getUnregisteredTypeHandlerName();\n\t\t\tconst unsupportedBlockNames = blocks\n\t\t\t\t.filter( isUnsupportedBlock )\n\t\t\t\t.map( ( block ) => block.attributes.originalName );\n\t\t\tRNReactNativeGutenbergBridge.editorDidMount(\n\t\t\t\tunsupportedBlockNames\n\t\t\t);\n\t\t}\n\t}\n\n\tonHardwareBackPress() {\n\t\tconst { clearSelectedBlock, selectedBlockIndex } = this.props;\n\n\t\tif ( selectedBlockIndex !== -1 ) {\n\t\t\tclearSelectedBlock();\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tonContentUpdate( { content: rawContent } ) {\n\t\tconst {\n\t\t\teditTitle,\n\t\t\tonClearPostTitleSelection,\n\t\t\tonInsertBlockAfter: onInsertBlocks,\n\t\t\ttitle,\n\t\t} = this.props;\n\t\tconst content = pasteHandler( {\n\t\t\tplainText: rawContent,\n\t\t} );\n\n\t\tinsertContentWithTitle( title, content, editTitle, onInsertBlocks );\n\t\tonClearPostTitleSelection();\n\t}\n\n\tserializeToNativeAction() {\n\t\tconst title = this.props.title;\n\t\tlet html;\n\n\t\tif ( this.props.mode === 'text' ) {\n\t\t\t// The HTMLTextInput component does not update the store when user is doing changes\n\t\t\t// Let's request the HTML from the component's state directly.\n\t\t\thtml = applyFilters( 'native.persist-html' );\n\t\t} else {\n\t\t\thtml = serialize( this.props.blocks );\n\t\t}\n\n\t\tconst hasChanges =\n\t\t\ttitle !== this.post.title.raw || html !== this.post.content.raw;\n\n\t\t// Variable to store the content structure metrics.\n\t\tconst contentInfo = {};\n\t\tcontentInfo.characterCount = wordCount(\n\t\t\thtml,\n\t\t\t'characters_including_spaces'\n\t\t);\n\t\tcontentInfo.wordCount = wordCount( html, 'words' );\n\t\tcontentInfo.paragraphCount = this.props.paragraphCount;\n\t\tcontentInfo.blockCount = this.props.blockCount;\n\t\tRNReactNativeGutenbergBridge.provideToNative_Html(\n\t\t\thtml,\n\t\t\ttitle,\n\t\t\thasChanges,\n\t\t\tcontentInfo\n\t\t);\n\n\t\tif ( hasChanges ) {\n\t\t\tthis.post.title.raw = title;\n\t\t\tthis.post.content.raw = html;\n\t\t}\n\t}\n\n\tupdateHtmlAction( html ) {\n\t\tconst parsed = parse( html );\n\t\tthis.props.resetEditorBlocksWithoutUndoLevel( parsed );\n\t}\n\n\treplaceBlockAction( html, blockClientId ) {\n\t\tconst parsed = parse( html );\n\t\tthis.props.replaceBlock( blockClientId, parsed );\n\t}\n\n\ttoggleMode() {\n\t\tconst { mode, switchMode } = this.props;\n\t\t// Refresh html content first.\n\t\tthis.serializeToNativeAction();\n\t\tswitchMode( mode === 'visual' ? 'text' : 'visual' );\n\t}\n\n\tupdateCapabilitiesAction( capabilities ) {\n\t\tthis.props.updateEditorSettings( { capabilities } );\n\t}\n\n\trender() {\n\t\tconst { children, post, capabilities, settings, ...props } = this.props;\n\t\tconst editorSettings = this.getEditorSettings( settings, capabilities );\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<EditorProvider\n\t\t\t\t\tpost={ this.post }\n\t\t\t\t\tsettings={ editorSettings }\n\t\t\t\t\t{ ...props }\n\t\t\t\t>\n\t\t\t\t\t<SafeAreaProvider>{ children }</SafeAreaProvider>\n\t\t\t\t</EditorProvider>\n\t\t\t\t<EditorHelpTopics\n\t\t\t\t\tisVisible={ this.state.isHelpVisible }\n\t\t\t\t\tonClose={ () => this.setState( { isHelpVisible: false } ) }\n\t\t\t\t\tclose={ () => this.setState( { isHelpVisible: false } ) }\n\t\t\t\t\tshowSupport={ capabilities?.supportSection === true }\n\t\t\t\t/>\n\t\t\t</>\n\t\t);\n\t}\n}\n\nconst ComposedNativeProvider = compose( [\n\twithSelect( ( select ) => {\n\t\tconst {\n\t\t\t__unstableIsEditorReady: isEditorReady,\n\t\t\tgetEditorBlocks,\n\t\t\tgetEditedPostAttribute,\n\t\t\tgetEditedPostContent,\n\t\t\tgetEditorSettings,\n\t\t\tgetEditorMode,\n\t\t} = select( editorStore );\n\n\t\tconst { getBlockIndex, getSelectedBlockClientId, getGlobalBlockCount } =\n\t\t\tselect( blockEditorStore );\n\n\t\tconst settings = getEditorSettings();\n\t\tconst defaultEditorColors = settings?.colors ?? [];\n\t\tconst defaultEditorGradients = settings?.gradients ?? [];\n\n\t\tconst selectedBlockClientId = getSelectedBlockClientId();\n\t\treturn {\n\t\t\tmode: getEditorMode(),\n\t\t\tisReady: isEditorReady(),\n\t\t\tblocks: getEditorBlocks(),\n\t\t\ttitle: getEditedPostAttribute( 'title' ),\n\t\t\tgetEditedPostContent,\n\t\t\tdefaultEditorColors,\n\t\t\tdefaultEditorGradients,\n\t\t\tselectedBlockIndex: getBlockIndex( selectedBlockClientId ),\n\t\t\tblockCount: getGlobalBlockCount(),\n\t\t\tparagraphCount: getGlobalBlockCount( 'core/paragraph' ),\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch ) => {\n\t\tconst {\n\t\t\teditPost,\n\t\t\tresetEditorBlocks,\n\t\t\tupdateEditorSettings,\n\t\t\tswitchEditorMode,\n\t\t\ttogglePostTitleSelection,\n\t\t} = dispatch( editorStore );\n\t\tconst {\n\t\t\tclearSelectedBlock,\n\t\t\tupdateSettings,\n\t\t\tinsertBlock,\n\t\t\tinsertBlocks,\n\t\t\treplaceBlock,\n\t\t} = dispatch( blockEditorStore );\n\t\tconst { addEntities, receiveEntityRecords } = dispatch( coreStore );\n\t\tconst { createSuccessNotice, createErrorNotice } =\n\t\t\tdispatch( noticesStore );\n\n\t\treturn {\n\t\t\tupdateBlockEditorSettings: updateSettings,\n\t\t\tupdateEditorSettings,\n\t\t\taddEntities,\n\t\t\tinsertBlock,\n\t\t\tinsertBlocks,\n\t\t\tcreateSuccessNotice,\n\t\t\tcreateErrorNotice,\n\t\t\tclearSelectedBlock,\n\t\t\teditTitle( title ) {\n\t\t\t\teditPost( { title } );\n\t\t\t},\n\t\t\treceiveEntityRecords,\n\t\t\tresetEditorBlocksWithoutUndoLevel( blocks ) {\n\t\t\t\tresetEditorBlocks( blocks, {\n\t\t\t\t\t__unstableShouldCreateUndoLevel: false,\n\t\t\t\t} );\n\t\t\t},\n\t\t\tswitchMode( mode ) {\n\t\t\t\tswitchEditorMode( mode );\n\t\t\t},\n\t\t\tonInsertBlockAfter( blocks ) {\n\t\t\t\tinsertBlocks( blocks, undefined, undefined, false );\n\t\t\t},\n\t\t\tonClearPostTitleSelection() {\n\t\t\t\ttogglePostTitleSelection( false );\n\t\t\t},\n\t\t\treplaceBlock,\n\t\t};\n\t} ),\n] )( NativeEditorProvider );\n\nexport default ComposedNativeProvider;\nexport { ComposedNativeProvider as ExperimentalEditorProvider };\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,WAAW,QAAQ,cAAc;AAC1C,OAAOC,MAAM,MAAM,QAAQ;AAC3B,SAASC,gBAAgB,QAAQ,gCAAgC;;AAEjE;AACA;AACA;AACA,OAAOC,4BAA4B,IAClCC,2BAA2B,EAC3BC,uBAAuB,EACvBC,sBAAsB,EACtBC,6BAA6B,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;IACX6C,WAAW;IACX2F,YAAY;IACZjF,mBAAmB;IACnB1C,iBAAiB;IACjB2E,kBAAkB;IAClB/D,SAASA,CAAEC,KAAK,EAAG;MAClByG,QAAQ,CAAE;QAAEzG;MAAM,CAAE,CAAC;IACtB,CAAC;IACDzB,oBAAoB;IACpBsG,iCAAiCA,CAAE7H,MAAM,EAAG;MAC3C0J,iBAAiB,CAAE1J,MAAM,EAAE;QAC1B+J,+BAA+B,EAAE;MAClC,CAAE,CAAC;IACJ,CAAC;IACD/B,UAAUA,CAAEX,IAAI,EAAG;MAClBsC,gBAAgB,CAAEtC,IAAK,CAAC;IACzB,CAAC;IACDH,kBAAkBA,CAAElH,MAAM,EAAG;MAC5B8J,YAAY,CAAE9J,MAAM,EAAEgK,SAAS,EAAEA,SAAS,EAAE,KAAM,CAAC;IACpD,CAAC;IACD/C,yBAAyBA,CAAA,EAAG;MAC3B2C,wBAAwB,CAAE,KAAM,CAAC;IAClC,CAAC;IACD7B;EACD,CAAC;AACF,CAAE,CAAC,CACF,CAAC,CAAE9G,oBAAqB,CAAC;AAE3B,eAAeuH,sBAAsB;AACrC,SAASA,sBAAsB,IAAIyB,0BAA0B","ignoreList":[]}
1
+ {"version":3,"names":["BackHandler","memize","SafeAreaProvider","RNReactNativeGutenbergBridge","requestBlockTypeImpressions","setBlockTypeImpressions","subscribeParentGetHtml","subscribeParentToggleHTMLMode","subscribeUpdateHtml","subscribeSetTitle","subscribeMediaAppend","subscribeReplaceBlock","subscribeUpdateEditorSettings","subscribeUpdateCapabilities","subscribeShowNotice","subscribeShowEditorHelp","subscribeToContentUpdate","Component","count","wordCount","parse","serialize","getUnregisteredTypeHandlerName","getBlockType","createBlock","pasteHandler","withDispatch","withSelect","compose","applyFilters","store","blockEditorStore","getGlobalStyles","getColorsAndGradients","NEW_BLOCK_TYPES","__","postTypeEntities","name","baseURL","map","postTypeEntity","kind","transientEdits","blocks","selection","mergedEdits","meta","rawAttributes","EditorHelpTopics","editorStore","noticesStore","coreStore","EditorProvider","insertContentWithTitle","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","NativeEditorProvider","constructor","arguments","post","props","addEntities","receiveEntityRecords","type","onHardwareBackPress","bind","onContentUpdate","getEditorSettings","settings","capabilities","maxSize","state","isHelpVisible","componentDidMount","createErrorNotice","locale","hostAppNamespace","updateEditorSettings","updateBlockEditorSettings","getThemeColors","subscriptionParentGetHtml","serializeToNativeAction","subscriptionParentToggleHTMLMode","toggleMode","subscriptionParentSetTitle","payload","editTitle","title","subscriptionParentUpdateHtml","updateHtmlAction","html","subscriptionParentReplaceBlock","replaceBlockAction","clientId","subscriptionParentMediaAppend","blockName","mediaType","blockType","newBlock","id","mediaId","mediaUrl","indexAfterSelected","selectedBlockIndex","insertionIndex","blockCount","insertBlock","subscriptionParentUpdateEditorSettings","editorSettings","subscriptionParentUpdateCapabilities","updateCapabilitiesAction","subscriptionParentShowNotice","createSuccessNotice","message","subscriptionParentShowEditorHelp","setState","hardwareBackPressListener","addEventListener","subscriptionOnContentUpdate","data","storedImpressions","impressions","storedImpressionKeys","Object","keys","storedImpressionsCurrent","every","newKey","includes","componentWillUnmount","remove","rawStyles","rawFeatures","defaultEditorColors","defaultEditorGradients","componentDidUpdate","prevProps","isReady","isUnsupportedBlock","unsupportedBlockNames","filter","block","attributes","originalName","editorDidMount","clearSelectedBlock","content","rawContent","onClearPostTitleSelection","onInsertBlockAfter","onInsertBlocks","plainText","mode","hasChanges","raw","contentInfo","characterCount","paragraphCount","provideToNative_Html","parsed","resetEditorBlocksWithoutUndoLevel","blockClientId","replaceBlock","switchMode","render","children","isVisible","onClose","close","showSupport","supportSection","ComposedNativeProvider","select","_settings$colors","_settings$gradients","__unstableIsEditorReady","isEditorReady","getEditorBlocks","getEditedPostAttribute","getEditedPostContent","getEditorMode","getBlockIndex","getSelectedBlockClientId","getGlobalBlockCount","colors","gradients","selectedBlockClientId","dispatch","editPost","resetEditorBlocks","switchEditorMode","togglePostTitleSelection","updateSettings","insertBlocks","__unstableShouldCreateUndoLevel","undefined","ExperimentalEditorProvider"],"sources":["@wordpress/editor/src/components/provider/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { BackHandler } from 'react-native';\nimport memize from 'memize';\nimport { SafeAreaProvider } from 'react-native-safe-area-context';\n\n/**\n * WordPress dependencies\n */\nimport RNReactNativeGutenbergBridge, {\n\trequestBlockTypeImpressions,\n\tsetBlockTypeImpressions,\n\tsubscribeParentGetHtml,\n\tsubscribeParentToggleHTMLMode,\n\tsubscribeUpdateHtml,\n\tsubscribeSetTitle,\n\tsubscribeMediaAppend,\n\tsubscribeReplaceBlock,\n\tsubscribeUpdateEditorSettings,\n\tsubscribeUpdateCapabilities,\n\tsubscribeShowNotice,\n\tsubscribeShowEditorHelp,\n\tsubscribeToContentUpdate,\n} from '@wordpress/react-native-bridge';\nimport { Component } from '@wordpress/element';\nimport { count as wordCount } from '@wordpress/wordcount';\nimport {\n\tparse,\n\tserialize,\n\tgetUnregisteredTypeHandlerName,\n\tgetBlockType,\n\tcreateBlock,\n\tpasteHandler,\n} from '@wordpress/blocks';\nimport { withDispatch, withSelect } from '@wordpress/data';\nimport { compose } from '@wordpress/compose';\nimport { applyFilters } from '@wordpress/hooks';\nimport {\n\tstore as blockEditorStore,\n\tgetGlobalStyles,\n\tgetColorsAndGradients,\n} from '@wordpress/block-editor';\nimport { NEW_BLOCK_TYPES } from '@wordpress/block-library';\nimport { __ } from '@wordpress/i18n';\n\nconst postTypeEntities = [\n\t{ name: 'post', baseURL: '/wp/v2/posts' },\n\t{ name: 'page', baseURL: '/wp/v2/pages' },\n\t{ name: 'attachment', baseURL: '/wp/v2/media' },\n\t{ name: 'wp_block', baseURL: '/wp/v2/blocks' },\n].map( ( postTypeEntity ) => ( {\n\tkind: 'postType',\n\t...postTypeEntity,\n\ttransientEdits: {\n\t\tblocks: true,\n\t\tselection: true,\n\t},\n\tmergedEdits: {\n\t\tmeta: true,\n\t},\n\trawAttributes: [ 'title', 'excerpt', 'content' ],\n} ) );\nimport { EditorHelpTopics, store as editorStore } from '@wordpress/editor';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport EditorProvider from './index.js';\nimport { insertContentWithTitle } from '../post-title';\n\nclass NativeEditorProvider extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\t// Keep a local reference to `post` to detect changes.\n\t\tthis.post = this.props.post;\n\t\tthis.props.addEntities( postTypeEntities );\n\t\tthis.props.receiveEntityRecords(\n\t\t\t'postType',\n\t\t\tthis.post.type,\n\t\t\tthis.post\n\t\t);\n\n\t\tthis.onHardwareBackPress = this.onHardwareBackPress.bind( this );\n\t\tthis.onContentUpdate = this.onContentUpdate.bind( this );\n\n\t\tthis.getEditorSettings = memize(\n\t\t\t( settings, capabilities ) => ( {\n\t\t\t\t...settings,\n\t\t\t\tcapabilities,\n\t\t\t} ),\n\t\t\t{\n\t\t\t\tmaxSize: 1,\n\t\t\t}\n\t\t);\n\t\tthis.state = {\n\t\t\tisHelpVisible: false,\n\t\t};\n\t}\n\n\tcomponentDidMount() {\n\t\tconst {\n\t\t\tcapabilities,\n\t\t\tcreateErrorNotice,\n\t\t\tlocale,\n\t\t\thostAppNamespace,\n\t\t\tupdateEditorSettings,\n\t\t\tupdateBlockEditorSettings,\n\t\t} = this.props;\n\n\t\tupdateEditorSettings( {\n\t\t\tcapabilities,\n\t\t\t...this.getThemeColors( this.props ),\n\t\t\tlocale,\n\t\t\thostAppNamespace,\n\t\t} );\n\n\t\tthis.subscriptionParentGetHtml = subscribeParentGetHtml( () => {\n\t\t\tthis.serializeToNativeAction();\n\t\t} );\n\n\t\tthis.subscriptionParentToggleHTMLMode = subscribeParentToggleHTMLMode(\n\t\t\t() => {\n\t\t\t\tthis.toggleMode();\n\t\t\t}\n\t\t);\n\n\t\tthis.subscriptionParentSetTitle = subscribeSetTitle( ( payload ) => {\n\t\t\tthis.props.editTitle( payload.title );\n\t\t} );\n\n\t\tthis.subscriptionParentUpdateHtml = subscribeUpdateHtml(\n\t\t\t( payload ) => {\n\t\t\t\tthis.updateHtmlAction( payload.html );\n\t\t\t}\n\t\t);\n\n\t\tthis.subscriptionParentReplaceBlock = subscribeReplaceBlock(\n\t\t\t( payload ) => {\n\t\t\t\tthis.replaceBlockAction( payload.html, payload.clientId );\n\t\t\t}\n\t\t);\n\n\t\tthis.subscriptionParentMediaAppend = subscribeMediaAppend(\n\t\t\t( payload ) => {\n\t\t\t\tconst blockName = 'core/' + payload.mediaType;\n\t\t\t\tconst blockType = getBlockType( blockName );\n\n\t\t\t\tif ( blockType && blockType?.name ) {\n\t\t\t\t\tconst newBlock = createBlock( blockType.name, {\n\t\t\t\t\t\tid: payload.mediaId,\n\t\t\t\t\t\t[ payload.mediaType === 'image' ? 'url' : 'src' ]:\n\t\t\t\t\t\t\tpayload.mediaUrl,\n\t\t\t\t\t} );\n\n\t\t\t\t\tconst indexAfterSelected =\n\t\t\t\t\t\tthis.props.selectedBlockIndex + 1;\n\t\t\t\t\tconst insertionIndex =\n\t\t\t\t\t\tindexAfterSelected || this.props.blockCount;\n\n\t\t\t\t\tthis.props.insertBlock( newBlock, insertionIndex );\n\t\t\t\t} else {\n\t\t\t\t\tcreateErrorNotice(\n\t\t\t\t\t\t__( 'File type not supported as a media file.' )\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\n\t\tthis.subscriptionParentUpdateEditorSettings =\n\t\t\tsubscribeUpdateEditorSettings( ( { ...editorSettings } ) => {\n\t\t\t\tupdateEditorSettings( this.getThemeColors( editorSettings ) );\n\t\t\t} );\n\n\t\tthis.subscriptionParentUpdateCapabilities = subscribeUpdateCapabilities(\n\t\t\t( payload ) => {\n\t\t\t\tthis.updateCapabilitiesAction( payload );\n\t\t\t}\n\t\t);\n\n\t\tthis.subscriptionParentShowNotice = subscribeShowNotice(\n\t\t\t( payload ) => {\n\t\t\t\tthis.props.createSuccessNotice( payload.message );\n\t\t\t}\n\t\t);\n\n\t\tthis.subscriptionParentShowEditorHelp = subscribeShowEditorHelp( () => {\n\t\t\tthis.setState( { isHelpVisible: true } );\n\t\t} );\n\n\t\tthis.hardwareBackPressListener = BackHandler.addEventListener(\n\t\t\t'hardwareBackPress',\n\t\t\tthis.onHardwareBackPress\n\t\t);\n\n\t\tthis.subscriptionOnContentUpdate = subscribeToContentUpdate(\n\t\t\t( data ) => {\n\t\t\t\tthis.onContentUpdate( data );\n\t\t\t}\n\t\t);\n\n\t\t// Request current block impressions from native app.\n\t\trequestBlockTypeImpressions( ( storedImpressions ) => {\n\t\t\tconst impressions = { ...NEW_BLOCK_TYPES, ...storedImpressions };\n\n\t\t\t// Persist impressions to JavaScript store.\n\t\t\tupdateBlockEditorSettings( { impressions } );\n\n\t\t\t// Persist impressions to native store if they do not include latest\n\t\t\t// `NEW_BLOCK_TYPES` configuration.\n\t\t\tconst storedImpressionKeys = Object.keys( storedImpressions );\n\t\t\tconst storedImpressionsCurrent = Object.keys(\n\t\t\t\tNEW_BLOCK_TYPES\n\t\t\t).every( ( newKey ) => storedImpressionKeys.includes( newKey ) );\n\t\t\tif ( ! storedImpressionsCurrent ) {\n\t\t\t\tsetBlockTypeImpressions( impressions );\n\t\t\t}\n\t\t} );\n\t}\n\n\tcomponentWillUnmount() {\n\t\tif ( this.subscriptionParentGetHtml ) {\n\t\t\tthis.subscriptionParentGetHtml.remove();\n\t\t}\n\n\t\tif ( this.subscriptionParentToggleHTMLMode ) {\n\t\t\tthis.subscriptionParentToggleHTMLMode.remove();\n\t\t}\n\n\t\tif ( this.subscriptionParentSetTitle ) {\n\t\t\tthis.subscriptionParentSetTitle.remove();\n\t\t}\n\n\t\tif ( this.subscriptionParentUpdateHtml ) {\n\t\t\tthis.subscriptionParentUpdateHtml.remove();\n\t\t}\n\n\t\tif ( this.subscriptionParentReplaceBlock ) {\n\t\t\tthis.subscriptionParentReplaceBlock.remove();\n\t\t}\n\n\t\tif ( this.subscriptionParentMediaAppend ) {\n\t\t\tthis.subscriptionParentMediaAppend.remove();\n\t\t}\n\n\t\tif ( this.subscriptionParentUpdateEditorSettings ) {\n\t\t\tthis.subscriptionParentUpdateEditorSettings.remove();\n\t\t}\n\n\t\tif ( this.subscriptionParentUpdateCapabilities ) {\n\t\t\tthis.subscriptionParentUpdateCapabilities.remove();\n\t\t}\n\n\t\tif ( this.subscriptionParentShowNotice ) {\n\t\t\tthis.subscriptionParentShowNotice.remove();\n\t\t}\n\n\t\tif ( this.subscriptionParentShowEditorHelp ) {\n\t\t\tthis.subscriptionParentShowEditorHelp.remove();\n\t\t}\n\n\t\tif ( this.hardwareBackPressListener ) {\n\t\t\tthis.hardwareBackPressListener.remove();\n\t\t}\n\n\t\tif ( this.subscriptionOnContentUpdate ) {\n\t\t\tthis.subscriptionOnContentUpdate.remove();\n\t\t}\n\t}\n\n\tgetThemeColors( { rawStyles, rawFeatures } ) {\n\t\tconst { defaultEditorColors, defaultEditorGradients } = this.props;\n\n\t\tif ( rawStyles && rawFeatures ) {\n\t\t\treturn getGlobalStyles( rawStyles, rawFeatures );\n\t\t}\n\n\t\treturn getColorsAndGradients(\n\t\t\tdefaultEditorColors,\n\t\t\tdefaultEditorGradients,\n\t\t\trawFeatures\n\t\t);\n\t}\n\n\tcomponentDidUpdate( prevProps ) {\n\t\tif ( ! prevProps.isReady && this.props.isReady ) {\n\t\t\tconst blocks = this.props.blocks;\n\t\t\tconst isUnsupportedBlock = ( { name } ) =>\n\t\t\t\tname === getUnregisteredTypeHandlerName();\n\t\t\tconst unsupportedBlockNames = blocks\n\t\t\t\t.filter( isUnsupportedBlock )\n\t\t\t\t.map( ( block ) => block.attributes.originalName );\n\t\t\tRNReactNativeGutenbergBridge.editorDidMount(\n\t\t\t\tunsupportedBlockNames\n\t\t\t);\n\t\t}\n\t}\n\n\tonHardwareBackPress() {\n\t\tconst { clearSelectedBlock, selectedBlockIndex } = this.props;\n\n\t\tif ( selectedBlockIndex !== -1 ) {\n\t\t\tclearSelectedBlock();\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tonContentUpdate( { content: rawContent } ) {\n\t\tconst {\n\t\t\teditTitle,\n\t\t\tonClearPostTitleSelection,\n\t\t\tonInsertBlockAfter: onInsertBlocks,\n\t\t\ttitle,\n\t\t} = this.props;\n\t\tconst content = pasteHandler( {\n\t\t\tplainText: rawContent,\n\t\t} );\n\n\t\tinsertContentWithTitle( title, content, editTitle, onInsertBlocks );\n\t\tonClearPostTitleSelection();\n\t}\n\n\tserializeToNativeAction() {\n\t\tconst title = this.props.title;\n\t\tlet html;\n\n\t\tif ( this.props.mode === 'text' ) {\n\t\t\t// The HTMLTextInput component does not update the store when user is doing changes\n\t\t\t// Let's request the HTML from the component's state directly.\n\t\t\thtml = applyFilters( 'native.persist-html' );\n\t\t} else {\n\t\t\thtml = serialize( this.props.blocks );\n\t\t}\n\n\t\tconst hasChanges =\n\t\t\ttitle !== this.post.title.raw || html !== this.post.content.raw;\n\n\t\t// Variable to store the content structure metrics.\n\t\tconst contentInfo = {};\n\t\tcontentInfo.characterCount = wordCount(\n\t\t\thtml,\n\t\t\t'characters_including_spaces'\n\t\t);\n\t\tcontentInfo.wordCount = wordCount( html, 'words' );\n\t\tcontentInfo.paragraphCount = this.props.paragraphCount;\n\t\tcontentInfo.blockCount = this.props.blockCount;\n\t\tRNReactNativeGutenbergBridge.provideToNative_Html(\n\t\t\thtml,\n\t\t\ttitle,\n\t\t\thasChanges,\n\t\t\tcontentInfo\n\t\t);\n\n\t\tif ( hasChanges ) {\n\t\t\tthis.post.title.raw = title;\n\t\t\tthis.post.content.raw = html;\n\t\t}\n\t}\n\n\tupdateHtmlAction( html ) {\n\t\tconst parsed = parse( html );\n\t\tthis.props.resetEditorBlocksWithoutUndoLevel( parsed );\n\t}\n\n\treplaceBlockAction( html, blockClientId ) {\n\t\tconst parsed = parse( html );\n\t\tthis.props.replaceBlock( blockClientId, parsed );\n\t}\n\n\ttoggleMode() {\n\t\tconst { mode, switchMode } = this.props;\n\t\t// Refresh html content first.\n\t\tthis.serializeToNativeAction();\n\t\tswitchMode( mode === 'visual' ? 'text' : 'visual' );\n\t}\n\n\tupdateCapabilitiesAction( capabilities ) {\n\t\tthis.props.updateEditorSettings( { capabilities } );\n\t}\n\n\trender() {\n\t\tconst { children, post, capabilities, settings, ...props } = this.props;\n\t\tconst editorSettings = this.getEditorSettings( settings, capabilities );\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<EditorProvider\n\t\t\t\t\tpost={ this.post }\n\t\t\t\t\tsettings={ editorSettings }\n\t\t\t\t\t{ ...props }\n\t\t\t\t>\n\t\t\t\t\t<SafeAreaProvider>{ children }</SafeAreaProvider>\n\t\t\t\t</EditorProvider>\n\t\t\t\t<EditorHelpTopics\n\t\t\t\t\tisVisible={ this.state.isHelpVisible }\n\t\t\t\t\tonClose={ () => this.setState( { isHelpVisible: false } ) }\n\t\t\t\t\tclose={ () => this.setState( { isHelpVisible: false } ) }\n\t\t\t\t\tshowSupport={ capabilities?.supportSection === true }\n\t\t\t\t/>\n\t\t\t</>\n\t\t);\n\t}\n}\n\nconst ComposedNativeProvider = compose( [\n\twithSelect( ( select ) => {\n\t\tconst {\n\t\t\t__unstableIsEditorReady: isEditorReady,\n\t\t\tgetEditorBlocks,\n\t\t\tgetEditedPostAttribute,\n\t\t\tgetEditedPostContent,\n\t\t\tgetEditorSettings,\n\t\t\tgetEditorMode,\n\t\t} = select( editorStore );\n\n\t\tconst { getBlockIndex, getSelectedBlockClientId, getGlobalBlockCount } =\n\t\t\tselect( blockEditorStore );\n\n\t\tconst settings = getEditorSettings();\n\t\tconst defaultEditorColors = settings?.colors ?? [];\n\t\tconst defaultEditorGradients = settings?.gradients ?? [];\n\n\t\tconst selectedBlockClientId = getSelectedBlockClientId();\n\t\treturn {\n\t\t\tmode: getEditorMode(),\n\t\t\tisReady: isEditorReady(),\n\t\t\tblocks: getEditorBlocks(),\n\t\t\ttitle: getEditedPostAttribute( 'title' ),\n\t\t\tgetEditedPostContent,\n\t\t\tdefaultEditorColors,\n\t\t\tdefaultEditorGradients,\n\t\t\tselectedBlockIndex: getBlockIndex( selectedBlockClientId ),\n\t\t\tblockCount: getGlobalBlockCount(),\n\t\t\tparagraphCount: getGlobalBlockCount( 'core/paragraph' ),\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch ) => {\n\t\tconst {\n\t\t\teditPost,\n\t\t\tresetEditorBlocks,\n\t\t\tupdateEditorSettings,\n\t\t\tswitchEditorMode,\n\t\t\ttogglePostTitleSelection,\n\t\t} = dispatch( editorStore );\n\t\tconst {\n\t\t\tclearSelectedBlock,\n\t\t\tupdateSettings,\n\t\t\tinsertBlock,\n\t\t\tinsertBlocks,\n\t\t\treplaceBlock,\n\t\t} = dispatch( blockEditorStore );\n\t\tconst { addEntities, receiveEntityRecords } = dispatch( coreStore );\n\t\tconst { createSuccessNotice, createErrorNotice } =\n\t\t\tdispatch( noticesStore );\n\n\t\treturn {\n\t\t\tupdateBlockEditorSettings: updateSettings,\n\t\t\tupdateEditorSettings,\n\t\t\taddEntities,\n\t\t\tinsertBlock,\n\t\t\tinsertBlocks,\n\t\t\tcreateSuccessNotice,\n\t\t\tcreateErrorNotice,\n\t\t\tclearSelectedBlock,\n\t\t\teditTitle( title ) {\n\t\t\t\teditPost( { title } );\n\t\t\t},\n\t\t\treceiveEntityRecords,\n\t\t\tresetEditorBlocksWithoutUndoLevel( blocks ) {\n\t\t\t\tresetEditorBlocks( blocks, {\n\t\t\t\t\t__unstableShouldCreateUndoLevel: false,\n\t\t\t\t} );\n\t\t\t},\n\t\t\tswitchMode( mode ) {\n\t\t\t\tswitchEditorMode( mode );\n\t\t\t},\n\t\t\tonInsertBlockAfter( blocks ) {\n\t\t\t\tinsertBlocks( blocks, undefined, undefined, false );\n\t\t\t},\n\t\t\tonClearPostTitleSelection() {\n\t\t\t\ttogglePostTitleSelection( false );\n\t\t\t},\n\t\t\treplaceBlock,\n\t\t};\n\t} ),\n] )( NativeEditorProvider );\n\nexport default ComposedNativeProvider;\nexport { ComposedNativeProvider as ExperimentalEditorProvider };\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,WAAW,QAAQ,cAAc;AAC1C,OAAOC,MAAM,MAAM,QAAQ;AAC3B,SAASC,gBAAgB,QAAQ,gCAAgC;;AAEjE;AACA;AACA;AACA,OAAOC,4BAA4B,IAClCC,2BAA2B,EAC3BC,uBAAuB,EACvBC,sBAAsB,EACtBC,6BAA6B,EAC7BC,mBAAmB,EACnBC,iBAAiB,EACjBC,oBAAoB,EACpBC,qBAAqB,EACrBC,6BAA6B,EAC7BC,2BAA2B,EAC3BC,mBAAmB,EACnBC,uBAAuB,EACvBC,wBAAwB,QAClB,gCAAgC;AACvC,SAASC,SAAS,QAAQ,oBAAoB;AAC9C,SAASC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;AACzD,SACCC,KAAK,EACLC,SAAS,EACTC,8BAA8B,EAC9BC,YAAY,EACZC,WAAW,EACXC,YAAY,QACN,mBAAmB;AAC1B,SAASC,YAAY,EAAEC,UAAU,QAAQ,iBAAiB;AAC1D,SAASC,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,YAAY,QAAQ,kBAAkB;AAC/C,SACCC,KAAK,IAAIC,gBAAgB,EACzBC,eAAe,EACfC,qBAAqB,QACf,yBAAyB;AAChC,SAASC,eAAe,QAAQ,0BAA0B;AAC1D,SAASC,EAAE,QAAQ,iBAAiB;AAEpC,MAAMC,gBAAgB,GAAG,CACxB;EAAEC,IAAI,EAAE,MAAM;EAAEC,OAAO,EAAE;AAAe,CAAC,EACzC;EAAED,IAAI,EAAE,MAAM;EAAEC,OAAO,EAAE;AAAe,CAAC,EACzC;EAAED,IAAI,EAAE,YAAY;EAAEC,OAAO,EAAE;AAAe,CAAC,EAC/C;EAAED,IAAI,EAAE,UAAU;EAAEC,OAAO,EAAE;AAAgB,CAAC,CAC9C,CAACC,GAAG,CAAIC,cAAc,KAAQ;EAC9BC,IAAI,EAAE,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CAAC;EACnE,MAAM;IAAEiE,mBAAmB;IAAEtC;EAAkB,CAAC,GAC/CiH,QAAQ,CAAE7I,YAAa,CAAC;EAEzB,OAAO;IACNgC,yBAAyB,EAAEkH,cAAc;IACzCnH,oBAAoB;IACpBhB,WAAW;IACX6C,WAAW;IACXuF,YAAY;IACZjF,mBAAmB;IACnBtC,iBAAiB;IACjBuE,kBAAkB;IAClB3D,SAASA,CAAEC,KAAK,EAAG;MAClBqG,QAAQ,CAAE;QAAErG;MAAM,CAAE,CAAC;IACtB,CAAC;IACDzB,oBAAoB;IACpBkG,iCAAiCA,CAAEzH,MAAM,EAAG;MAC3CsJ,iBAAiB,CAAEtJ,MAAM,EAAE;QAC1B2J,+BAA+B,EAAE;MAClC,CAAE,CAAC;IACJ,CAAC;IACD/B,UAAUA,CAAEX,IAAI,EAAG;MAClBsC,gBAAgB,CAAEtC,IAAK,CAAC;IACzB,CAAC;IACDH,kBAAkBA,CAAE9G,MAAM,EAAG;MAC5B0J,YAAY,CAAE1J,MAAM,EAAE4J,SAAS,EAAEA,SAAS,EAAE,KAAM,CAAC;IACpD,CAAC;IACD/C,yBAAyBA,CAAA,EAAG;MAC3B2C,wBAAwB,CAAE,KAAM,CAAC;IAClC,CAAC;IACD7B;EACD,CAAC;AACF,CAAE,CAAC,CACF,CAAC,CAAE1G,oBAAqB,CAAC;AAE3B,eAAemH,sBAAsB;AACrC,SAASA,sBAAsB,IAAIyB,0BAA0B","ignoreList":[]}
@@ -19,16 +19,17 @@ import { store as editorStore } from '../../store';
19
19
  import { lock, unlock } from '../../lock-unlock';
20
20
  import { useGlobalStylesContext } from '../global-styles-provider';
21
21
  const EMPTY_BLOCKS_LIST = [];
22
- const DEFAULT_STYLES = {};
22
+ const EMPTY_OBJECT = {};
23
23
  function __experimentalReusableBlocksSelect(select) {
24
24
  var _select$getEntityReco;
25
25
  return (_select$getEntityReco = select(coreStore).getEntityRecords('postType', 'wp_block', {
26
26
  per_page: -1
27
27
  })) !== null && _select$getEntityReco !== void 0 ? _select$getEntityReco : EMPTY_BLOCKS_LIST;
28
28
  }
29
- const BLOCK_EDITOR_SETTINGS = ['__experimentalBlockDirectory', '__experimentalDiscussionSettings', '__experimentalFeatures', '__experimentalGlobalStylesBaseStyles', '__unstableGalleryWithImageBlocks', 'alignWide', 'blockInspectorTabs', 'allowedMimeTypes', 'bodyPlaceholder', 'canLockBlocks', 'capabilities', 'clearBlockSelection', 'codeEditingEnabled', 'colors', 'disableCustomColors', 'disableCustomFontSizes', 'disableCustomSpacingSizes', 'disableCustomGradients', 'disableLayoutStyles', 'enableCustomLineHeight', 'enableCustomSpacing', 'enableCustomUnits', 'enableOpenverseMediaCategory', 'fontSizes', 'gradients', 'generateAnchors', 'onNavigateToEntityRecord', 'imageDefaultSize', 'imageDimensions', 'imageEditing', 'imageSizes', 'isRTL', 'locale', 'maxWidth', 'postContentAttributes', 'postsPerPage', 'readOnly', 'sectionRootClientId', 'styles', 'titlePlaceholder', 'supportsLayout', 'widgetTypesToHideFromLegacyWidgetBlock', '__unstableHasCustomAppender', '__unstableIsPreviewMode', '__unstableResolvedAssets', '__unstableIsBlockBasedTheme', '__experimentalArchiveTitleTypeLabel', '__experimentalArchiveTitleNameLabel'];
29
+ const BLOCK_EDITOR_SETTINGS = ['__experimentalBlockDirectory', '__experimentalDiscussionSettings', '__experimentalFeatures', '__experimentalGlobalStylesBaseStyles', 'alignWide', 'blockInspectorTabs', 'allowedMimeTypes', 'bodyPlaceholder', 'canLockBlocks', 'capabilities', 'clearBlockSelection', 'codeEditingEnabled', 'colors', 'disableCustomColors', 'disableCustomFontSizes', 'disableCustomSpacingSizes', 'disableCustomGradients', 'disableLayoutStyles', 'enableCustomLineHeight', 'enableCustomSpacing', 'enableCustomUnits', 'enableOpenverseMediaCategory', 'fontSizes', 'gradients', 'generateAnchors', 'onNavigateToEntityRecord', 'imageDefaultSize', 'imageDimensions', 'imageEditing', 'imageSizes', 'isRTL', 'locale', 'maxWidth', 'postContentAttributes', 'postsPerPage', 'readOnly', 'sectionRootClientId', 'styles', 'titlePlaceholder', 'supportsLayout', 'widgetTypesToHideFromLegacyWidgetBlock', '__unstableHasCustomAppender', '__unstableIsPreviewMode', '__unstableResolvedAssets', '__unstableIsBlockBasedTheme'];
30
30
  const {
31
31
  globalStylesDataKey,
32
+ globalStylesLinksDataKey,
32
33
  selectBlockPatternsKey,
33
34
  reusableBlocksSelectKey
34
35
  } = unlock(privateApis);
@@ -44,7 +45,7 @@ const {
44
45
  * @return {Object} Block Editor Settings.
45
46
  */
46
47
  function useBlockEditorSettings(settings, postType, postId, renderingMode) {
47
- var _mergedGlobalStyles$s, _settings$__experimen, _settings$__experimen2;
48
+ var _mergedGlobalStyles$s, _mergedGlobalStyles$_, _settings$__experimen, _settings$__experimen2;
48
49
  const isLargeViewport = useViewportMatch('medium');
49
50
  const {
50
51
  allowRightClickOverrides,
@@ -81,7 +82,10 @@ function useBlockEditorSettings(settings, postType, postId, renderingMode) {
81
82
  getBlocksByName,
82
83
  getBlockAttributes
83
84
  } = select(blockEditorStore);
84
- const siteSettings = canUser('read', 'settings') ? getEntityRecord('root', 'site') : undefined;
85
+ const siteSettings = canUser('read', {
86
+ kind: 'root',
87
+ name: 'site'
88
+ }) ? getEntityRecord('root', 'site') : undefined;
85
89
  function getSectionRootBlock() {
86
90
  var _getBlocksByName$find;
87
91
  if (renderingMode === 'template-locked') {
@@ -99,8 +103,14 @@ function useBlockEditorSettings(settings, postType, postId, renderingMode) {
99
103
  hiddenBlockTypes: get('core', 'hiddenBlockTypes'),
100
104
  isDistractionFree: get('core', 'distractionFree'),
101
105
  keepCaretInsideBlock: get('core', 'keepCaretInsideBlock'),
102
- hasUploadPermissions: (_canUser = canUser('create', 'media')) !== null && _canUser !== void 0 ? _canUser : true,
103
- userCanCreatePages: canUser('create', 'pages'),
106
+ hasUploadPermissions: (_canUser = canUser('create', {
107
+ kind: 'root',
108
+ name: 'media'
109
+ })) !== null && _canUser !== void 0 ? _canUser : true,
110
+ userCanCreatePages: canUser('create', {
111
+ kind: 'postType',
112
+ name: 'page'
113
+ }),
104
114
  pageOnFront: siteSettings?.page_on_front,
105
115
  pageForPosts: siteSettings?.page_for_posts,
106
116
  userPatternCategories: getUserPatternCategories(),
@@ -111,7 +121,8 @@ function useBlockEditorSettings(settings, postType, postId, renderingMode) {
111
121
  const {
112
122
  merged: mergedGlobalStyles
113
123
  } = useGlobalStylesContext();
114
- const globalStylesData = (_mergedGlobalStyles$s = mergedGlobalStyles.styles) !== null && _mergedGlobalStyles$s !== void 0 ? _mergedGlobalStyles$s : DEFAULT_STYLES;
124
+ const globalStylesData = (_mergedGlobalStyles$s = mergedGlobalStyles.styles) !== null && _mergedGlobalStyles$s !== void 0 ? _mergedGlobalStyles$s : EMPTY_OBJECT;
125
+ const globalStylesLinksData = (_mergedGlobalStyles$_ = mergedGlobalStyles._links) !== null && _mergedGlobalStyles$_ !== void 0 ? _mergedGlobalStyles$_ : EMPTY_OBJECT;
115
126
  const settingsBlockPatterns = (_settings$__experimen = settings.__experimentalAdditionalBlockPatterns) !== null && _settings$__experimen !== void 0 ? _settings$__experimen :
116
127
  // WP 6.0
117
128
  settings.__experimentalBlockPatterns; // WP 5.9
@@ -166,6 +177,7 @@ function useBlockEditorSettings(settings, postType, postId, renderingMode) {
166
177
  const blockEditorSettings = {
167
178
  ...Object.fromEntries(Object.entries(settings).filter(([key]) => BLOCK_EDITOR_SETTINGS.includes(key))),
168
179
  [globalStylesDataKey]: globalStylesData,
180
+ [globalStylesLinksDataKey]: globalStylesLinksData,
169
181
  allowedBlockTypes,
170
182
  allowRightClickOverrides,
171
183
  focusMode: focusMode && !forceDisableFocusMode,
@@ -195,7 +207,7 @@ function useBlockEditorSettings(settings, postType, postId, renderingMode) {
195
207
  __experimentalUndo: undo,
196
208
  // Check whether we want all site editor frames to have outlines
197
209
  // including the navigation / pattern / parts editors.
198
- outlineMode: postType === 'wp_template',
210
+ outlineMode: !isDistractionFree && postType === 'wp_template',
199
211
  // Check these two properties: they were not present in the site editor.
200
212
  __experimentalCreatePageEntity: createPageEntity,
201
213
  __experimentalUserCanCreatePages: userCanCreatePages,
@@ -210,7 +222,7 @@ function useBlockEditorSettings(settings, postType, postId, renderingMode) {
210
222
  sectionRootClientId
211
223
  });
212
224
  return blockEditorSettings;
213
- }, [allowedBlockTypes, allowRightClickOverrides, focusMode, forceDisableFocusMode, hasFixedToolbar, isDistractionFree, keepCaretInsideBlock, settings, hasUploadPermissions, userPatternCategories, blockPatterns, blockPatternCategories, canUseUnfilteredHTML, undo, createPageEntity, userCanCreatePages, pageOnFront, pageForPosts, postType, setIsInserterOpened, sectionRootClientId, globalStylesData]);
225
+ }, [allowedBlockTypes, allowRightClickOverrides, focusMode, forceDisableFocusMode, hasFixedToolbar, isDistractionFree, keepCaretInsideBlock, settings, hasUploadPermissions, userPatternCategories, blockPatterns, blockPatternCategories, canUseUnfilteredHTML, undo, createPageEntity, userCanCreatePages, pageOnFront, pageForPosts, postType, setIsInserterOpened, sectionRootClientId, globalStylesData, globalStylesLinksData]);
214
226
  }
215
227
  export default useBlockEditorSettings;
216
228
  //# sourceMappingURL=use-block-editor-settings.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["useMemo","useCallback","useDispatch","useSelect","store","coreStore","__experimentalFetchLinkSuggestions","fetchLinkSuggestions","__experimentalFetchUrlData","fetchUrlData","__","preferencesStore","useViewportMatch","blocksStore","privateApis","blockEditorStore","inserterMediaCategories","mediaUpload","editorStore","lock","unlock","useGlobalStylesContext","EMPTY_BLOCKS_LIST","DEFAULT_STYLES","__experimentalReusableBlocksSelect","select","_select$getEntityReco","getEntityRecords","per_page","BLOCK_EDITOR_SETTINGS","globalStylesDataKey","selectBlockPatternsKey","reusableBlocksSelectKey","useBlockEditorSettings","settings","postType","postId","renderingMode","_mergedGlobalStyles$s","_settings$__experimen","_settings$__experimen2","isLargeViewport","allowRightClickOverrides","blockTypes","focusMode","hasFixedToolbar","isDistractionFree","keepCaretInsideBlock","hasUploadPermissions","hiddenBlockTypes","canUseUnfilteredHTML","userCanCreatePages","pageOnFront","pageForPosts","userPatternCategories","restBlockPatternCategories","sectionRootClientId","_canUser","canUser","getRawEntityRecord","getEntityRecord","getUserPatternCategories","getBlockPatternCategories","get","getBlockTypes","getBlocksByName","getBlockAttributes","siteSettings","undefined","getSectionRootBlock","_getBlocksByName$find","_getBlocksByName$","find","clientId","tagName","_links","hasOwnProperty","page_on_front","page_for_posts","merged","mergedGlobalStyles","globalStylesData","styles","settingsBlockPatterns","__experimentalAdditionalBlockPatterns","__experimentalBlockPatterns","settingsBlockPatternCategories","__experimentalAdditionalBlockPatternCategories","__experimentalBlockPatternCategories","blockPatterns","filter","postTypes","Array","isArray","includes","blockPatternCategories","x","index","arr","findIndex","y","name","undo","setIsInserterOpened","saveEntityRecord","createPageEntity","options","Promise","reject","message","allowedBlockTypes","length","defaultAllowedBlockTypes","map","type","forceDisableFocusMode","blockEditorSettings","Object","fromEntries","entries","key","hasFinishedResolution","getBlockPatternsForPostType","patterns","__experimentalUserPatternCategories","search","searchOptions","__experimentalFetchRichUrlData","__experimentalCanUserUseUnfilteredHTML","__experimentalUndo","outlineMode","__experimentalCreatePageEntity","__experimentalUserCanCreatePages","__experimentalPreferPatternsOnRoot","templateLock","template","__experimentalSetIsInserterOpened"],"sources":["@wordpress/editor/src/components/provider/use-block-editor-settings.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo, useCallback } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport {\n\tstore as coreStore,\n\t__experimentalFetchLinkSuggestions as fetchLinkSuggestions,\n\t__experimentalFetchUrlData as fetchUrlData,\n} from '@wordpress/core-data';\nimport { __ } from '@wordpress/i18n';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { store as blocksStore } from '@wordpress/blocks';\nimport {\n\tprivateApis,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport inserterMediaCategories from '../media-categories';\nimport { mediaUpload } from '../../utils';\nimport { store as editorStore } from '../../store';\nimport { lock, unlock } from '../../lock-unlock';\nimport { useGlobalStylesContext } from '../global-styles-provider';\n\nconst EMPTY_BLOCKS_LIST = [];\nconst DEFAULT_STYLES = {};\n\nfunction __experimentalReusableBlocksSelect( select ) {\n\treturn (\n\t\tselect( coreStore ).getEntityRecords( 'postType', 'wp_block', {\n\t\t\tper_page: -1,\n\t\t} ) ?? EMPTY_BLOCKS_LIST\n\t);\n}\n\nconst BLOCK_EDITOR_SETTINGS = [\n\t'__experimentalBlockDirectory',\n\t'__experimentalDiscussionSettings',\n\t'__experimentalFeatures',\n\t'__experimentalGlobalStylesBaseStyles',\n\t'__unstableGalleryWithImageBlocks',\n\t'alignWide',\n\t'blockInspectorTabs',\n\t'allowedMimeTypes',\n\t'bodyPlaceholder',\n\t'canLockBlocks',\n\t'capabilities',\n\t'clearBlockSelection',\n\t'codeEditingEnabled',\n\t'colors',\n\t'disableCustomColors',\n\t'disableCustomFontSizes',\n\t'disableCustomSpacingSizes',\n\t'disableCustomGradients',\n\t'disableLayoutStyles',\n\t'enableCustomLineHeight',\n\t'enableCustomSpacing',\n\t'enableCustomUnits',\n\t'enableOpenverseMediaCategory',\n\t'fontSizes',\n\t'gradients',\n\t'generateAnchors',\n\t'onNavigateToEntityRecord',\n\t'imageDefaultSize',\n\t'imageDimensions',\n\t'imageEditing',\n\t'imageSizes',\n\t'isRTL',\n\t'locale',\n\t'maxWidth',\n\t'postContentAttributes',\n\t'postsPerPage',\n\t'readOnly',\n\t'sectionRootClientId',\n\t'styles',\n\t'titlePlaceholder',\n\t'supportsLayout',\n\t'widgetTypesToHideFromLegacyWidgetBlock',\n\t'__unstableHasCustomAppender',\n\t'__unstableIsPreviewMode',\n\t'__unstableResolvedAssets',\n\t'__unstableIsBlockBasedTheme',\n\t'__experimentalArchiveTitleTypeLabel',\n\t'__experimentalArchiveTitleNameLabel',\n];\n\nconst { globalStylesDataKey, selectBlockPatternsKey, reusableBlocksSelectKey } =\n\tunlock( privateApis );\n\n/**\n * React hook used to compute the block editor settings to use for the post editor.\n *\n * @param {Object} settings EditorProvider settings prop.\n * @param {string} postType Editor root level post type.\n * @param {string} postId Editor root level post ID.\n * @param {string} renderingMode Editor rendering mode.\n *\n * @return {Object} Block Editor Settings.\n */\nfunction useBlockEditorSettings( settings, postType, postId, renderingMode ) {\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tconst {\n\t\tallowRightClickOverrides,\n\t\tblockTypes,\n\t\tfocusMode,\n\t\thasFixedToolbar,\n\t\tisDistractionFree,\n\t\tkeepCaretInsideBlock,\n\t\thasUploadPermissions,\n\t\thiddenBlockTypes,\n\t\tcanUseUnfilteredHTML,\n\t\tuserCanCreatePages,\n\t\tpageOnFront,\n\t\tpageForPosts,\n\t\tuserPatternCategories,\n\t\trestBlockPatternCategories,\n\t\tsectionRootClientId,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tcanUser,\n\t\t\t\tgetRawEntityRecord,\n\t\t\t\tgetEntityRecord,\n\t\t\t\tgetUserPatternCategories,\n\t\t\t\tgetBlockPatternCategories,\n\t\t\t} = select( coreStore );\n\t\t\tconst { get } = select( preferencesStore );\n\t\t\tconst { getBlockTypes } = select( blocksStore );\n\t\t\tconst { getBlocksByName, getBlockAttributes } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst siteSettings = canUser( 'read', 'settings' )\n\t\t\t\t? getEntityRecord( 'root', 'site' )\n\t\t\t\t: undefined;\n\n\t\t\tfunction getSectionRootBlock() {\n\t\t\t\tif ( renderingMode === 'template-locked' ) {\n\t\t\t\t\treturn getBlocksByName( 'core/post-content' )?.[ 0 ] ?? '';\n\t\t\t\t}\n\n\t\t\t\treturn (\n\t\t\t\t\tgetBlocksByName( 'core/group' ).find(\n\t\t\t\t\t\t( clientId ) =>\n\t\t\t\t\t\t\tgetBlockAttributes( clientId )?.tagName === 'main'\n\t\t\t\t\t) ?? ''\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tallowRightClickOverrides: get(\n\t\t\t\t\t'core',\n\t\t\t\t\t'allowRightClickOverrides'\n\t\t\t\t),\n\t\t\t\tblockTypes: getBlockTypes(),\n\t\t\t\tcanUseUnfilteredHTML: getRawEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\tpostType,\n\t\t\t\t\tpostId\n\t\t\t\t)?._links?.hasOwnProperty( 'wp:action-unfiltered-html' ),\n\t\t\t\tfocusMode: get( 'core', 'focusMode' ),\n\t\t\t\thasFixedToolbar:\n\t\t\t\t\tget( 'core', 'fixedToolbar' ) || ! isLargeViewport,\n\t\t\t\thiddenBlockTypes: get( 'core', 'hiddenBlockTypes' ),\n\t\t\t\tisDistractionFree: get( 'core', 'distractionFree' ),\n\t\t\t\tkeepCaretInsideBlock: get( 'core', 'keepCaretInsideBlock' ),\n\t\t\t\thasUploadPermissions: canUser( 'create', 'media' ) ?? true,\n\t\t\t\tuserCanCreatePages: canUser( 'create', 'pages' ),\n\t\t\t\tpageOnFront: siteSettings?.page_on_front,\n\t\t\t\tpageForPosts: siteSettings?.page_for_posts,\n\t\t\t\tuserPatternCategories: getUserPatternCategories(),\n\t\t\t\trestBlockPatternCategories: getBlockPatternCategories(),\n\t\t\t\tsectionRootClientId: getSectionRootBlock(),\n\t\t\t};\n\t\t},\n\t\t[ postType, postId, isLargeViewport, renderingMode ]\n\t);\n\n\tconst { merged: mergedGlobalStyles } = useGlobalStylesContext();\n\tconst globalStylesData = mergedGlobalStyles.styles ?? DEFAULT_STYLES;\n\n\tconst settingsBlockPatterns =\n\t\tsettings.__experimentalAdditionalBlockPatterns ?? // WP 6.0\n\t\tsettings.__experimentalBlockPatterns; // WP 5.9\n\tconst settingsBlockPatternCategories =\n\t\tsettings.__experimentalAdditionalBlockPatternCategories ?? // WP 6.0\n\t\tsettings.__experimentalBlockPatternCategories; // WP 5.9\n\n\tconst blockPatterns = useMemo(\n\t\t() =>\n\t\t\t[ ...( settingsBlockPatterns || [] ) ].filter(\n\t\t\t\t( { postTypes } ) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t! postTypes ||\n\t\t\t\t\t\t( Array.isArray( postTypes ) &&\n\t\t\t\t\t\t\tpostTypes.includes( postType ) )\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t),\n\t\t[ settingsBlockPatterns, postType ]\n\t);\n\n\tconst blockPatternCategories = useMemo(\n\t\t() =>\n\t\t\t[\n\t\t\t\t...( settingsBlockPatternCategories || [] ),\n\t\t\t\t...( restBlockPatternCategories || [] ),\n\t\t\t].filter(\n\t\t\t\t( x, index, arr ) =>\n\t\t\t\t\tindex === arr.findIndex( ( y ) => x.name === y.name )\n\t\t\t),\n\t\t[ settingsBlockPatternCategories, restBlockPatternCategories ]\n\t);\n\n\tconst { undo, setIsInserterOpened } = useDispatch( editorStore );\n\n\tconst { saveEntityRecord } = useDispatch( coreStore );\n\n\t/**\n\t * Creates a Post entity.\n\t * This is utilised by the Link UI to allow for on-the-fly creation of Posts/Pages.\n\t *\n\t * @param {Object} options parameters for the post being created. These mirror those used on 3rd param of saveEntityRecord.\n\t * @return {Object} the post type object that was created.\n\t */\n\tconst createPageEntity = useCallback(\n\t\t( options ) => {\n\t\t\tif ( ! userCanCreatePages ) {\n\t\t\t\treturn Promise.reject( {\n\t\t\t\t\tmessage: __(\n\t\t\t\t\t\t'You do not have permission to create Pages.'\n\t\t\t\t\t),\n\t\t\t\t} );\n\t\t\t}\n\t\t\treturn saveEntityRecord( 'postType', 'page', options );\n\t\t},\n\t\t[ saveEntityRecord, userCanCreatePages ]\n\t);\n\n\tconst allowedBlockTypes = useMemo( () => {\n\t\t// Omit hidden block types if exists and non-empty.\n\t\tif ( hiddenBlockTypes && hiddenBlockTypes.length > 0 ) {\n\t\t\t// Defer to passed setting for `allowedBlockTypes` if provided as\n\t\t\t// anything other than `true` (where `true` is equivalent to allow\n\t\t\t// all block types).\n\t\t\tconst defaultAllowedBlockTypes =\n\t\t\t\ttrue === settings.allowedBlockTypes\n\t\t\t\t\t? blockTypes.map( ( { name } ) => name )\n\t\t\t\t\t: settings.allowedBlockTypes || [];\n\n\t\t\treturn defaultAllowedBlockTypes.filter(\n\t\t\t\t( type ) => ! hiddenBlockTypes.includes( type )\n\t\t\t);\n\t\t}\n\n\t\treturn settings.allowedBlockTypes;\n\t}, [ settings.allowedBlockTypes, hiddenBlockTypes, blockTypes ] );\n\n\tconst forceDisableFocusMode = settings.focusMode === false;\n\n\treturn useMemo( () => {\n\t\tconst blockEditorSettings = {\n\t\t\t...Object.fromEntries(\n\t\t\t\tObject.entries( settings ).filter( ( [ key ] ) =>\n\t\t\t\t\tBLOCK_EDITOR_SETTINGS.includes( key )\n\t\t\t\t)\n\t\t\t),\n\t\t\t[ globalStylesDataKey ]: globalStylesData,\n\t\t\tallowedBlockTypes,\n\t\t\tallowRightClickOverrides,\n\t\t\tfocusMode: focusMode && ! forceDisableFocusMode,\n\t\t\thasFixedToolbar,\n\t\t\tisDistractionFree,\n\t\t\tkeepCaretInsideBlock,\n\t\t\tmediaUpload: hasUploadPermissions ? mediaUpload : undefined,\n\t\t\t__experimentalBlockPatterns: blockPatterns,\n\t\t\t[ selectBlockPatternsKey ]: ( select ) => {\n\t\t\t\tconst { hasFinishedResolution, getBlockPatternsForPostType } =\n\t\t\t\t\tunlock( select( coreStore ) );\n\t\t\t\tconst patterns = getBlockPatternsForPostType( postType );\n\t\t\t\treturn hasFinishedResolution( 'getBlockPatterns' )\n\t\t\t\t\t? patterns\n\t\t\t\t\t: undefined;\n\t\t\t},\n\t\t\t[ reusableBlocksSelectKey ]: __experimentalReusableBlocksSelect,\n\t\t\t__experimentalBlockPatternCategories: blockPatternCategories,\n\t\t\t__experimentalUserPatternCategories: userPatternCategories,\n\t\t\t__experimentalFetchLinkSuggestions: ( search, searchOptions ) =>\n\t\t\t\tfetchLinkSuggestions( search, searchOptions, settings ),\n\t\t\tinserterMediaCategories,\n\t\t\t__experimentalFetchRichUrlData: fetchUrlData,\n\t\t\t// Todo: This only checks the top level post, not the post within a template or any other entity that can be edited.\n\t\t\t// This might be better as a generic \"canUser\" selector.\n\t\t\t__experimentalCanUserUseUnfilteredHTML: canUseUnfilteredHTML,\n\t\t\t//Todo: this is only needed for native and should probably be removed.\n\t\t\t__experimentalUndo: undo,\n\t\t\t// Check whether we want all site editor frames to have outlines\n\t\t\t// including the navigation / pattern / parts editors.\n\t\t\toutlineMode: postType === 'wp_template',\n\t\t\t// Check these two properties: they were not present in the site editor.\n\t\t\t__experimentalCreatePageEntity: createPageEntity,\n\t\t\t__experimentalUserCanCreatePages: userCanCreatePages,\n\t\t\tpageOnFront,\n\t\t\tpageForPosts,\n\t\t\t__experimentalPreferPatternsOnRoot: postType === 'wp_template',\n\t\t\ttemplateLock:\n\t\t\t\tpostType === 'wp_navigation' ? 'insert' : settings.templateLock,\n\t\t\ttemplate:\n\t\t\t\tpostType === 'wp_navigation'\n\t\t\t\t\t? [ [ 'core/navigation', {}, [] ] ]\n\t\t\t\t\t: settings.template,\n\t\t\t__experimentalSetIsInserterOpened: setIsInserterOpened,\n\t\t};\n\t\tlock( blockEditorSettings, {\n\t\t\tsectionRootClientId,\n\t\t} );\n\t\treturn blockEditorSettings;\n\t}, [\n\t\tallowedBlockTypes,\n\t\tallowRightClickOverrides,\n\t\tfocusMode,\n\t\tforceDisableFocusMode,\n\t\thasFixedToolbar,\n\t\tisDistractionFree,\n\t\tkeepCaretInsideBlock,\n\t\tsettings,\n\t\thasUploadPermissions,\n\t\tuserPatternCategories,\n\t\tblockPatterns,\n\t\tblockPatternCategories,\n\t\tcanUseUnfilteredHTML,\n\t\tundo,\n\t\tcreatePageEntity,\n\t\tuserCanCreatePages,\n\t\tpageOnFront,\n\t\tpageForPosts,\n\t\tpostType,\n\t\tsetIsInserterOpened,\n\t\tsectionRootClientId,\n\t\tglobalStylesData,\n\t] );\n}\n\nexport default useBlockEditorSettings;\n"],"m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AsB","ignoreList":[]}
1
+ {"version":3,"names":["useMemo","useCallback","useDispatch","useSelect","store","coreStore","__experimentalFetchLinkSuggestions","fetchLinkSuggestions","__experimentalFetchUrlData","fetchUrlData","__","preferencesStore","useViewportMatch","blocksStore","privateApis","blockEditorStore","inserterMediaCategories","mediaUpload","editorStore","lock","unlock","useGlobalStylesContext","EMPTY_BLOCKS_LIST","EMPTY_OBJECT","__experimentalReusableBlocksSelect","select","_select$getEntityReco","getEntityRecords","per_page","BLOCK_EDITOR_SETTINGS","globalStylesDataKey","globalStylesLinksDataKey","selectBlockPatternsKey","reusableBlocksSelectKey","useBlockEditorSettings","settings","postType","postId","renderingMode","_mergedGlobalStyles$s","_mergedGlobalStyles$_","_settings$__experimen","_settings$__experimen2","isLargeViewport","allowRightClickOverrides","blockTypes","focusMode","hasFixedToolbar","isDistractionFree","keepCaretInsideBlock","hasUploadPermissions","hiddenBlockTypes","canUseUnfilteredHTML","userCanCreatePages","pageOnFront","pageForPosts","userPatternCategories","restBlockPatternCategories","sectionRootClientId","_canUser","canUser","getRawEntityRecord","getEntityRecord","getUserPatternCategories","getBlockPatternCategories","get","getBlockTypes","getBlocksByName","getBlockAttributes","siteSettings","kind","name","undefined","getSectionRootBlock","_getBlocksByName$find","_getBlocksByName$","find","clientId","tagName","_links","hasOwnProperty","page_on_front","page_for_posts","merged","mergedGlobalStyles","globalStylesData","styles","globalStylesLinksData","settingsBlockPatterns","__experimentalAdditionalBlockPatterns","__experimentalBlockPatterns","settingsBlockPatternCategories","__experimentalAdditionalBlockPatternCategories","__experimentalBlockPatternCategories","blockPatterns","filter","postTypes","Array","isArray","includes","blockPatternCategories","x","index","arr","findIndex","y","undo","setIsInserterOpened","saveEntityRecord","createPageEntity","options","Promise","reject","message","allowedBlockTypes","length","defaultAllowedBlockTypes","map","type","forceDisableFocusMode","blockEditorSettings","Object","fromEntries","entries","key","hasFinishedResolution","getBlockPatternsForPostType","patterns","__experimentalUserPatternCategories","search","searchOptions","__experimentalFetchRichUrlData","__experimentalCanUserUseUnfilteredHTML","__experimentalUndo","outlineMode","__experimentalCreatePageEntity","__experimentalUserCanCreatePages","__experimentalPreferPatternsOnRoot","templateLock","template","__experimentalSetIsInserterOpened"],"sources":["@wordpress/editor/src/components/provider/use-block-editor-settings.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo, useCallback } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport {\n\tstore as coreStore,\n\t__experimentalFetchLinkSuggestions as fetchLinkSuggestions,\n\t__experimentalFetchUrlData as fetchUrlData,\n} from '@wordpress/core-data';\nimport { __ } from '@wordpress/i18n';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { store as blocksStore } from '@wordpress/blocks';\nimport {\n\tprivateApis,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport inserterMediaCategories from '../media-categories';\nimport { mediaUpload } from '../../utils';\nimport { store as editorStore } from '../../store';\nimport { lock, unlock } from '../../lock-unlock';\nimport { useGlobalStylesContext } from '../global-styles-provider';\n\nconst EMPTY_BLOCKS_LIST = [];\nconst EMPTY_OBJECT = {};\n\nfunction __experimentalReusableBlocksSelect( select ) {\n\treturn (\n\t\tselect( coreStore ).getEntityRecords( 'postType', 'wp_block', {\n\t\t\tper_page: -1,\n\t\t} ) ?? EMPTY_BLOCKS_LIST\n\t);\n}\n\nconst BLOCK_EDITOR_SETTINGS = [\n\t'__experimentalBlockDirectory',\n\t'__experimentalDiscussionSettings',\n\t'__experimentalFeatures',\n\t'__experimentalGlobalStylesBaseStyles',\n\t'alignWide',\n\t'blockInspectorTabs',\n\t'allowedMimeTypes',\n\t'bodyPlaceholder',\n\t'canLockBlocks',\n\t'capabilities',\n\t'clearBlockSelection',\n\t'codeEditingEnabled',\n\t'colors',\n\t'disableCustomColors',\n\t'disableCustomFontSizes',\n\t'disableCustomSpacingSizes',\n\t'disableCustomGradients',\n\t'disableLayoutStyles',\n\t'enableCustomLineHeight',\n\t'enableCustomSpacing',\n\t'enableCustomUnits',\n\t'enableOpenverseMediaCategory',\n\t'fontSizes',\n\t'gradients',\n\t'generateAnchors',\n\t'onNavigateToEntityRecord',\n\t'imageDefaultSize',\n\t'imageDimensions',\n\t'imageEditing',\n\t'imageSizes',\n\t'isRTL',\n\t'locale',\n\t'maxWidth',\n\t'postContentAttributes',\n\t'postsPerPage',\n\t'readOnly',\n\t'sectionRootClientId',\n\t'styles',\n\t'titlePlaceholder',\n\t'supportsLayout',\n\t'widgetTypesToHideFromLegacyWidgetBlock',\n\t'__unstableHasCustomAppender',\n\t'__unstableIsPreviewMode',\n\t'__unstableResolvedAssets',\n\t'__unstableIsBlockBasedTheme',\n];\n\nconst {\n\tglobalStylesDataKey,\n\tglobalStylesLinksDataKey,\n\tselectBlockPatternsKey,\n\treusableBlocksSelectKey,\n} = unlock( privateApis );\n\n/**\n * React hook used to compute the block editor settings to use for the post editor.\n *\n * @param {Object} settings EditorProvider settings prop.\n * @param {string} postType Editor root level post type.\n * @param {string} postId Editor root level post ID.\n * @param {string} renderingMode Editor rendering mode.\n *\n * @return {Object} Block Editor Settings.\n */\nfunction useBlockEditorSettings( settings, postType, postId, renderingMode ) {\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tconst {\n\t\tallowRightClickOverrides,\n\t\tblockTypes,\n\t\tfocusMode,\n\t\thasFixedToolbar,\n\t\tisDistractionFree,\n\t\tkeepCaretInsideBlock,\n\t\thasUploadPermissions,\n\t\thiddenBlockTypes,\n\t\tcanUseUnfilteredHTML,\n\t\tuserCanCreatePages,\n\t\tpageOnFront,\n\t\tpageForPosts,\n\t\tuserPatternCategories,\n\t\trestBlockPatternCategories,\n\t\tsectionRootClientId,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tcanUser,\n\t\t\t\tgetRawEntityRecord,\n\t\t\t\tgetEntityRecord,\n\t\t\t\tgetUserPatternCategories,\n\t\t\t\tgetBlockPatternCategories,\n\t\t\t} = select( coreStore );\n\t\t\tconst { get } = select( preferencesStore );\n\t\t\tconst { getBlockTypes } = select( blocksStore );\n\t\t\tconst { getBlocksByName, getBlockAttributes } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst siteSettings = canUser( 'read', {\n\t\t\t\tkind: 'root',\n\t\t\t\tname: 'site',\n\t\t\t} )\n\t\t\t\t? getEntityRecord( 'root', 'site' )\n\t\t\t\t: undefined;\n\n\t\t\tfunction getSectionRootBlock() {\n\t\t\t\tif ( renderingMode === 'template-locked' ) {\n\t\t\t\t\treturn getBlocksByName( 'core/post-content' )?.[ 0 ] ?? '';\n\t\t\t\t}\n\n\t\t\t\treturn (\n\t\t\t\t\tgetBlocksByName( 'core/group' ).find(\n\t\t\t\t\t\t( clientId ) =>\n\t\t\t\t\t\t\tgetBlockAttributes( clientId )?.tagName === 'main'\n\t\t\t\t\t) ?? ''\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tallowRightClickOverrides: get(\n\t\t\t\t\t'core',\n\t\t\t\t\t'allowRightClickOverrides'\n\t\t\t\t),\n\t\t\t\tblockTypes: getBlockTypes(),\n\t\t\t\tcanUseUnfilteredHTML: getRawEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\tpostType,\n\t\t\t\t\tpostId\n\t\t\t\t)?._links?.hasOwnProperty( 'wp:action-unfiltered-html' ),\n\t\t\t\tfocusMode: get( 'core', 'focusMode' ),\n\t\t\t\thasFixedToolbar:\n\t\t\t\t\tget( 'core', 'fixedToolbar' ) || ! isLargeViewport,\n\t\t\t\thiddenBlockTypes: get( 'core', 'hiddenBlockTypes' ),\n\t\t\t\tisDistractionFree: get( 'core', 'distractionFree' ),\n\t\t\t\tkeepCaretInsideBlock: get( 'core', 'keepCaretInsideBlock' ),\n\t\t\t\thasUploadPermissions:\n\t\t\t\t\tcanUser( 'create', {\n\t\t\t\t\t\tkind: 'root',\n\t\t\t\t\t\tname: 'media',\n\t\t\t\t\t} ) ?? true,\n\t\t\t\tuserCanCreatePages: canUser( 'create', {\n\t\t\t\t\tkind: 'postType',\n\t\t\t\t\tname: 'page',\n\t\t\t\t} ),\n\t\t\t\tpageOnFront: siteSettings?.page_on_front,\n\t\t\t\tpageForPosts: siteSettings?.page_for_posts,\n\t\t\t\tuserPatternCategories: getUserPatternCategories(),\n\t\t\t\trestBlockPatternCategories: getBlockPatternCategories(),\n\t\t\t\tsectionRootClientId: getSectionRootBlock(),\n\t\t\t};\n\t\t},\n\t\t[ postType, postId, isLargeViewport, renderingMode ]\n\t);\n\n\tconst { merged: mergedGlobalStyles } = useGlobalStylesContext();\n\tconst globalStylesData = mergedGlobalStyles.styles ?? EMPTY_OBJECT;\n\tconst globalStylesLinksData = mergedGlobalStyles._links ?? EMPTY_OBJECT;\n\n\tconst settingsBlockPatterns =\n\t\tsettings.__experimentalAdditionalBlockPatterns ?? // WP 6.0\n\t\tsettings.__experimentalBlockPatterns; // WP 5.9\n\tconst settingsBlockPatternCategories =\n\t\tsettings.__experimentalAdditionalBlockPatternCategories ?? // WP 6.0\n\t\tsettings.__experimentalBlockPatternCategories; // WP 5.9\n\n\tconst blockPatterns = useMemo(\n\t\t() =>\n\t\t\t[ ...( settingsBlockPatterns || [] ) ].filter(\n\t\t\t\t( { postTypes } ) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t! postTypes ||\n\t\t\t\t\t\t( Array.isArray( postTypes ) &&\n\t\t\t\t\t\t\tpostTypes.includes( postType ) )\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t),\n\t\t[ settingsBlockPatterns, postType ]\n\t);\n\n\tconst blockPatternCategories = useMemo(\n\t\t() =>\n\t\t\t[\n\t\t\t\t...( settingsBlockPatternCategories || [] ),\n\t\t\t\t...( restBlockPatternCategories || [] ),\n\t\t\t].filter(\n\t\t\t\t( x, index, arr ) =>\n\t\t\t\t\tindex === arr.findIndex( ( y ) => x.name === y.name )\n\t\t\t),\n\t\t[ settingsBlockPatternCategories, restBlockPatternCategories ]\n\t);\n\n\tconst { undo, setIsInserterOpened } = useDispatch( editorStore );\n\n\tconst { saveEntityRecord } = useDispatch( coreStore );\n\n\t/**\n\t * Creates a Post entity.\n\t * This is utilised by the Link UI to allow for on-the-fly creation of Posts/Pages.\n\t *\n\t * @param {Object} options parameters for the post being created. These mirror those used on 3rd param of saveEntityRecord.\n\t * @return {Object} the post type object that was created.\n\t */\n\tconst createPageEntity = useCallback(\n\t\t( options ) => {\n\t\t\tif ( ! userCanCreatePages ) {\n\t\t\t\treturn Promise.reject( {\n\t\t\t\t\tmessage: __(\n\t\t\t\t\t\t'You do not have permission to create Pages.'\n\t\t\t\t\t),\n\t\t\t\t} );\n\t\t\t}\n\t\t\treturn saveEntityRecord( 'postType', 'page', options );\n\t\t},\n\t\t[ saveEntityRecord, userCanCreatePages ]\n\t);\n\n\tconst allowedBlockTypes = useMemo( () => {\n\t\t// Omit hidden block types if exists and non-empty.\n\t\tif ( hiddenBlockTypes && hiddenBlockTypes.length > 0 ) {\n\t\t\t// Defer to passed setting for `allowedBlockTypes` if provided as\n\t\t\t// anything other than `true` (where `true` is equivalent to allow\n\t\t\t// all block types).\n\t\t\tconst defaultAllowedBlockTypes =\n\t\t\t\ttrue === settings.allowedBlockTypes\n\t\t\t\t\t? blockTypes.map( ( { name } ) => name )\n\t\t\t\t\t: settings.allowedBlockTypes || [];\n\n\t\t\treturn defaultAllowedBlockTypes.filter(\n\t\t\t\t( type ) => ! hiddenBlockTypes.includes( type )\n\t\t\t);\n\t\t}\n\n\t\treturn settings.allowedBlockTypes;\n\t}, [ settings.allowedBlockTypes, hiddenBlockTypes, blockTypes ] );\n\n\tconst forceDisableFocusMode = settings.focusMode === false;\n\n\treturn useMemo( () => {\n\t\tconst blockEditorSettings = {\n\t\t\t...Object.fromEntries(\n\t\t\t\tObject.entries( settings ).filter( ( [ key ] ) =>\n\t\t\t\t\tBLOCK_EDITOR_SETTINGS.includes( key )\n\t\t\t\t)\n\t\t\t),\n\t\t\t[ globalStylesDataKey ]: globalStylesData,\n\t\t\t[ globalStylesLinksDataKey ]: globalStylesLinksData,\n\t\t\tallowedBlockTypes,\n\t\t\tallowRightClickOverrides,\n\t\t\tfocusMode: focusMode && ! forceDisableFocusMode,\n\t\t\thasFixedToolbar,\n\t\t\tisDistractionFree,\n\t\t\tkeepCaretInsideBlock,\n\t\t\tmediaUpload: hasUploadPermissions ? mediaUpload : undefined,\n\t\t\t__experimentalBlockPatterns: blockPatterns,\n\t\t\t[ selectBlockPatternsKey ]: ( select ) => {\n\t\t\t\tconst { hasFinishedResolution, getBlockPatternsForPostType } =\n\t\t\t\t\tunlock( select( coreStore ) );\n\t\t\t\tconst patterns = getBlockPatternsForPostType( postType );\n\t\t\t\treturn hasFinishedResolution( 'getBlockPatterns' )\n\t\t\t\t\t? patterns\n\t\t\t\t\t: undefined;\n\t\t\t},\n\t\t\t[ reusableBlocksSelectKey ]: __experimentalReusableBlocksSelect,\n\t\t\t__experimentalBlockPatternCategories: blockPatternCategories,\n\t\t\t__experimentalUserPatternCategories: userPatternCategories,\n\t\t\t__experimentalFetchLinkSuggestions: ( search, searchOptions ) =>\n\t\t\t\tfetchLinkSuggestions( search, searchOptions, settings ),\n\t\t\tinserterMediaCategories,\n\t\t\t__experimentalFetchRichUrlData: fetchUrlData,\n\t\t\t// Todo: This only checks the top level post, not the post within a template or any other entity that can be edited.\n\t\t\t// This might be better as a generic \"canUser\" selector.\n\t\t\t__experimentalCanUserUseUnfilteredHTML: canUseUnfilteredHTML,\n\t\t\t//Todo: this is only needed for native and should probably be removed.\n\t\t\t__experimentalUndo: undo,\n\t\t\t// Check whether we want all site editor frames to have outlines\n\t\t\t// including the navigation / pattern / parts editors.\n\t\t\toutlineMode: ! isDistractionFree && postType === 'wp_template',\n\t\t\t// Check these two properties: they were not present in the site editor.\n\t\t\t__experimentalCreatePageEntity: createPageEntity,\n\t\t\t__experimentalUserCanCreatePages: userCanCreatePages,\n\t\t\tpageOnFront,\n\t\t\tpageForPosts,\n\t\t\t__experimentalPreferPatternsOnRoot: postType === 'wp_template',\n\t\t\ttemplateLock:\n\t\t\t\tpostType === 'wp_navigation' ? 'insert' : settings.templateLock,\n\t\t\ttemplate:\n\t\t\t\tpostType === 'wp_navigation'\n\t\t\t\t\t? [ [ 'core/navigation', {}, [] ] ]\n\t\t\t\t\t: settings.template,\n\t\t\t__experimentalSetIsInserterOpened: setIsInserterOpened,\n\t\t};\n\t\tlock( blockEditorSettings, {\n\t\t\tsectionRootClientId,\n\t\t} );\n\t\treturn blockEditorSettings;\n\t}, [\n\t\tallowedBlockTypes,\n\t\tallowRightClickOverrides,\n\t\tfocusMode,\n\t\tforceDisableFocusMode,\n\t\thasFixedToolbar,\n\t\tisDistractionFree,\n\t\tkeepCaretInsideBlock,\n\t\tsettings,\n\t\thasUploadPermissions,\n\t\tuserPatternCategories,\n\t\tblockPatterns,\n\t\tblockPatternCategories,\n\t\tcanUseUnfilteredHTML,\n\t\tundo,\n\t\tcreatePageEntity,\n\t\tuserCanCreatePages,\n\t\tpageOnFront,\n\t\tpageForPosts,\n\t\tpostType,\n\t\tsetIsInserterOpened,\n\t\tsectionRootClientId,\n\t\tglobalStylesData,\n\t\tglobalStylesLinksData,\n\t] );\n}\n\nexport default useBlockEditorSettings;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,OAAO,EAAEC,WAAW,QAAQ,oBAAoB;AACzD,SAASC,WAAW,EAAEC,SAAS,QAAQ,iBAAiB;AACxD,SACCC,KAAK,IAAIC,SAAS,EAClBC,kCAAkC,IAAIC,oBAAoB,EAC1DC,0BAA0B,IAAIC,YAAY,QACpC,sBAAsB;AAC7B,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASN,KAAK,IAAIO,gBAAgB,QAAQ,wBAAwB;AAClE,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SAASR,KAAK,IAAIS,WAAW,QAAQ,mBAAmB;AACxD,SACCC,WAAW,EACX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oBAAoB,CAAE0H,MAAM,EAAEC,aAAa,EAAE/F,QAAS,CAAC;MACxDnB,uBAAuB;MACvBmH,8BAA8B,EAAE1H,YAAY;MAC5C;MACA;MACA2H,sCAAsC,EAAEhF,oBAAoB;MAC5D;MACAiF,kBAAkB,EAAE3B,IAAI;MACxB;MACA;MACA4B,WAAW,EAAE,CAAEtF,iBAAiB,IAAIZ,QAAQ,KAAK,aAAa;MAC9D;MACAmG,8BAA8B,EAAE1B,gBAAgB;MAChD2B,gCAAgC,EAAEnF,kBAAkB;MACpDC,WAAW;MACXC,YAAY;MACZkF,kCAAkC,EAAErG,QAAQ,KAAK,aAAa;MAC9DsG,YAAY,EACXtG,QAAQ,KAAK,eAAe,GAAG,QAAQ,GAAGD,QAAQ,CAACuG,YAAY;MAChEC,QAAQ,EACPvG,QAAQ,KAAK,eAAe,GACzB,CAAE,CAAE,iBAAiB,EAAE,CAAC,CAAC,EAAE,EAAE,CAAE,CAAE,GACjCD,QAAQ,CAACwG,QAAQ;MACrBC,iCAAiC,EAAEjC;IACpC,CAAC;IACDxF,IAAI,CAAEqG,mBAAmB,EAAE;MAC1B9D;IACD,CAAE,CAAC;IACH,OAAO8D,mBAAmB;EAC3B,CAAC,EAAE,CACFN,iBAAiB,EACjBtE,wBAAwB,EACxBE,SAAS,EACTyE,qBAAqB,EACrBxE,eAAe,EACfC,iBAAiB,EACjBC,oBAAoB,EACpBd,QAAQ,EACRe,oBAAoB,EACpBM,qBAAqB,EACrBsC,aAAa,EACbM,sBAAsB,EACtBhD,oBAAoB,EACpBsD,IAAI,EACJG,gBAAgB,EAChBxD,kBAAkB,EAClBC,WAAW,EACXC,YAAY,EACZnB,QAAQ,EACRuE,mBAAmB,EACnBjD,mBAAmB,EACnB2B,gBAAgB,EAChBE,qBAAqB,CACpB,CAAC;AACJ;AAEA,eAAerD,sBAAsB","ignoreList":[]}
@@ -14,7 +14,6 @@ import PostPublishPanel from '../post-publish-panel';
14
14
  import PluginPrePublishPanel from '../plugin-pre-publish-panel';
15
15
  import PluginPostPublishPanel from '../plugin-post-publish-panel';
16
16
  import { store as editorStore } from '../../store';
17
- import { unlock } from '../../lock-unlock';
18
17
  import { jsx as _jsx } from "react/jsx-runtime";
19
18
  import { Fragment as _Fragment } from "react/jsx-runtime";
20
19
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -35,13 +34,25 @@ export default function SavePublishPanels({
35
34
  } = useDispatch(editorStore);
36
35
  const {
37
36
  publishSidebarOpened,
38
- hasNonPostEntityChanges,
39
- hasPostMetaChanges
40
- } = useSelect(select => ({
41
- publishSidebarOpened: select(editorStore).isPublishSidebarOpened(),
42
- hasNonPostEntityChanges: select(editorStore).hasNonPostEntityChanges(),
43
- hasPostMetaChanges: unlock(select(editorStore)).hasPostMetaChanges()
44
- }), []);
37
+ isPublishable,
38
+ isDirty,
39
+ hasOtherEntitiesChanges
40
+ } = useSelect(select => {
41
+ const {
42
+ isPublishSidebarOpened,
43
+ isEditedPostPublishable,
44
+ isCurrentPostPublished,
45
+ isEditedPostDirty,
46
+ hasNonPostEntityChanges
47
+ } = select(editorStore);
48
+ const _hasOtherEntitiesChanges = hasNonPostEntityChanges();
49
+ return {
50
+ publishSidebarOpened: isPublishSidebarOpened(),
51
+ isPublishable: !isCurrentPostPublished() && isEditedPostPublishable(),
52
+ isDirty: _hasOtherEntitiesChanges || isEditedPostDirty(),
53
+ hasOtherEntitiesChanges: _hasOtherEntitiesChanges
54
+ };
55
+ }, []);
45
56
  const openEntitiesSavedStates = useCallback(() => setEntitiesSavedStatesCallback(true), []);
46
57
 
47
58
  // It is ok for these components to be unmounted when not in visual use.
@@ -54,26 +65,28 @@ export default function SavePublishPanels({
54
65
  PrePublishExtension: PluginPrePublishPanel.Slot,
55
66
  PostPublishExtension: PluginPostPublishPanel.Slot
56
67
  });
57
- } else if (hasNonPostEntityChanges || hasPostMetaChanges) {
68
+ } else if (isPublishable && !hasOtherEntitiesChanges) {
58
69
  unmountableContent = /*#__PURE__*/_jsx("div", {
59
- className: "editor-layout__toggle-entities-saved-states-panel",
70
+ className: "editor-layout__toggle-publish-panel",
60
71
  children: /*#__PURE__*/_jsx(Button, {
61
72
  variant: "secondary",
62
- className: "editor-layout__toggle-entities-saved-states-panel-button",
63
- onClick: openEntitiesSavedStates,
73
+ className: "editor-layout__toggle-publish-panel-button",
74
+ onClick: togglePublishSidebar,
64
75
  "aria-expanded": false,
65
- children: __('Open save panel')
76
+ children: __('Open publish panel')
66
77
  })
67
78
  });
68
79
  } else {
69
80
  unmountableContent = /*#__PURE__*/_jsx("div", {
70
- className: "editor-layout__toggle-publish-panel",
81
+ className: "editor-layout__toggle-entities-saved-states-panel",
71
82
  children: /*#__PURE__*/_jsx(Button, {
72
83
  variant: "secondary",
73
- className: "editor-layout__toggle-publish-panel-button",
74
- onClick: togglePublishSidebar,
84
+ className: "editor-layout__toggle-entities-saved-states-panel-button",
85
+ onClick: openEntitiesSavedStates,
75
86
  "aria-expanded": false,
76
- children: __('Open publish panel')
87
+ disabled: !isDirty,
88
+ accessibleWhenDisabled: true,
89
+ children: __('Open save panel')
77
90
  })
78
91
  });
79
92
  }
@@ -1 +1 @@
1
- {"version":3,"names":["useSelect","useDispatch","Button","createSlotFill","__","useCallback","EntitiesSavedStates","PostPublishPanel","PluginPrePublishPanel","PluginPostPublishPanel","store","editorStore","unlock","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","Fill","Slot","ActionsPanelFill","SavePublishPanels","setEntitiesSavedStatesCallback","closeEntitiesSavedStates","isEntitiesSavedStatesOpen","forceIsDirtyPublishPanel","closePublishSidebar","togglePublishSidebar","publishSidebarOpened","hasNonPostEntityChanges","hasPostMetaChanges","select","isPublishSidebarOpened","openEntitiesSavedStates","unmountableContent","onClose","forceIsDirty","PrePublishExtension","PostPublishExtension","className","children","variant","onClick","close","bubblesVirtually"],"sources":["@wordpress/editor/src/components/save-publish-panels/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { Button, createSlotFill } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useCallback } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport EntitiesSavedStates from '../entities-saved-states';\nimport PostPublishPanel from '../post-publish-panel';\nimport PluginPrePublishPanel from '../plugin-pre-publish-panel';\nimport PluginPostPublishPanel from '../plugin-post-publish-panel';\nimport { store as editorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst { Fill, Slot } = createSlotFill( 'ActionsPanel' );\n\nexport const ActionsPanelFill = Fill;\n\nexport default function SavePublishPanels( {\n\tsetEntitiesSavedStatesCallback,\n\tcloseEntitiesSavedStates,\n\tisEntitiesSavedStatesOpen,\n\tforceIsDirtyPublishPanel,\n} ) {\n\tconst { closePublishSidebar, togglePublishSidebar } =\n\t\tuseDispatch( editorStore );\n\tconst {\n\t\tpublishSidebarOpened,\n\t\thasNonPostEntityChanges,\n\t\thasPostMetaChanges,\n\t} = useSelect(\n\t\t( select ) => ( {\n\t\t\tpublishSidebarOpened:\n\t\t\t\tselect( editorStore ).isPublishSidebarOpened(),\n\t\t\thasNonPostEntityChanges:\n\t\t\t\tselect( editorStore ).hasNonPostEntityChanges(),\n\t\t\thasPostMetaChanges: unlock(\n\t\t\t\tselect( editorStore )\n\t\t\t).hasPostMetaChanges(),\n\t\t} ),\n\t\t[]\n\t);\n\n\tconst openEntitiesSavedStates = useCallback(\n\t\t() => setEntitiesSavedStatesCallback( true ),\n\t\t[]\n\t);\n\n\t// It is ok for these components to be unmounted when not in visual use.\n\t// We don't want more than one present at a time, decide which to render.\n\tlet unmountableContent;\n\tif ( publishSidebarOpened ) {\n\t\tunmountableContent = (\n\t\t\t<PostPublishPanel\n\t\t\t\tonClose={ closePublishSidebar }\n\t\t\t\tforceIsDirty={ forceIsDirtyPublishPanel }\n\t\t\t\tPrePublishExtension={ PluginPrePublishPanel.Slot }\n\t\t\t\tPostPublishExtension={ PluginPostPublishPanel.Slot }\n\t\t\t/>\n\t\t);\n\t} else if ( hasNonPostEntityChanges || hasPostMetaChanges ) {\n\t\tunmountableContent = (\n\t\t\t<div className=\"editor-layout__toggle-entities-saved-states-panel\">\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\tclassName=\"editor-layout__toggle-entities-saved-states-panel-button\"\n\t\t\t\t\tonClick={ openEntitiesSavedStates }\n\t\t\t\t\taria-expanded={ false }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Open save panel' ) }\n\t\t\t\t</Button>\n\t\t\t</div>\n\t\t);\n\t} else {\n\t\tunmountableContent = (\n\t\t\t<div className=\"editor-layout__toggle-publish-panel\">\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\tclassName=\"editor-layout__toggle-publish-panel-button\"\n\t\t\t\t\tonClick={ togglePublishSidebar }\n\t\t\t\t\taria-expanded={ false }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Open publish panel' ) }\n\t\t\t\t</Button>\n\t\t\t</div>\n\t\t);\n\t}\n\n\t// Since EntitiesSavedStates controls its own panel, we can keep it\n\t// always mounted to retain its own component state (such as checkboxes).\n\treturn (\n\t\t<>\n\t\t\t{ isEntitiesSavedStatesOpen && (\n\t\t\t\t<EntitiesSavedStates close={ closeEntitiesSavedStates } />\n\t\t\t) }\n\t\t\t<Slot bubblesVirtually />\n\t\t\t{ ! isEntitiesSavedStatesOpen && unmountableContent }\n\t\t</>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,MAAM,EAAEC,cAAc,QAAQ,uBAAuB;AAC9D,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,WAAW,QAAQ,oBAAoB;;AAEhD;AACA;AACA;AACA,OAAOC,mBAAmB,MAAM,0BAA0B;AAC1D,OAAOC,gBAAgB,MAAM,uBAAuB;AACpD,OAAOC,qBAAqB,MAAM,6BAA6B;AAC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,CAACW;IAAM,CACpD,CACD;EACF,CAAC,MAAM,IAAKU,uBAAuB,IAAIC,kBAAkB,EAAG;IAC3DI,kBAAkB,gBACjBrB,IAAA;MAAK0B,SAAS,EAAC,mDAAmD;MAAAC,QAAA,eACjE3B,IAAA,CAACZ,MAAM;QACNwC,OAAO,EAAC,WAAW;QACnBF,SAAS,EAAC,0DAA0D;QACpEG,OAAO,EAAGT,uBAAyB;QACnC,iBAAgB,KAAO;QAAAO,QAAA,EAErBrC,EAAE,CAAE,iBAAkB;MAAC,CAClB;IAAC,CACL,CACL;EACF,CAAC,MAAM;IACN+B,kBAAkB,gBACjBrB,IAAA;MAAK0B,SAAS,EAAC,qCAAqC;MAAAC,QAAA,eACnD3B,IAAA,CAACZ,MAAM;QACNwC,OAAO,EAAC,WAAW;QACnBF,SAAS,EAAC,4CAA4C;QACtDG,OAAO,EAAGf,oBAAsB;QAChC,iBAAgB,KAAO;QAAAa,QAAA,EAErBrC,EAAE,CAAE,oBAAqB;MAAC,CACrB;IAAC,CACL,CACL;EACF;;EAEA;EACA;EACA,oBACCc,KAAA,CAAAF,SAAA;IAAAyB,QAAA,GACGhB,yBAAyB,iBAC1BX,IAAA,CAACR,mBAAmB;MAACsC,KAAK,EAAGpB;IAA0B,CAAE,CACzD,eACDV,IAAA,CAACM,IAAI;MAACyB,gBAAgB;IAAA,CAAE,CAAC,EACvB,CAAEpB,yBAAyB,IAAIU,kBAAkB;EAAA,CAClD,CAAC;AAEL","ignoreList":[]}
1
+ {"version":3,"names":["useSelect","useDispatch","Button","createSlotFill","__","useCallback","EntitiesSavedStates","PostPublishPanel","PluginPrePublishPanel","PluginPostPublishPanel","store","editorStore","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","Fill","Slot","ActionsPanelFill","SavePublishPanels","setEntitiesSavedStatesCallback","closeEntitiesSavedStates","isEntitiesSavedStatesOpen","forceIsDirtyPublishPanel","closePublishSidebar","togglePublishSidebar","publishSidebarOpened","isPublishable","isDirty","hasOtherEntitiesChanges","select","isPublishSidebarOpened","isEditedPostPublishable","isCurrentPostPublished","isEditedPostDirty","hasNonPostEntityChanges","_hasOtherEntitiesChanges","openEntitiesSavedStates","unmountableContent","onClose","forceIsDirty","PrePublishExtension","PostPublishExtension","className","children","variant","onClick","disabled","accessibleWhenDisabled","close","bubblesVirtually"],"sources":["@wordpress/editor/src/components/save-publish-panels/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { Button, createSlotFill } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useCallback } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport EntitiesSavedStates from '../entities-saved-states';\nimport PostPublishPanel from '../post-publish-panel';\nimport PluginPrePublishPanel from '../plugin-pre-publish-panel';\nimport PluginPostPublishPanel from '../plugin-post-publish-panel';\nimport { store as editorStore } from '../../store';\n\nconst { Fill, Slot } = createSlotFill( 'ActionsPanel' );\n\nexport const ActionsPanelFill = Fill;\n\nexport default function SavePublishPanels( {\n\tsetEntitiesSavedStatesCallback,\n\tcloseEntitiesSavedStates,\n\tisEntitiesSavedStatesOpen,\n\tforceIsDirtyPublishPanel,\n} ) {\n\tconst { closePublishSidebar, togglePublishSidebar } =\n\t\tuseDispatch( editorStore );\n\tconst {\n\t\tpublishSidebarOpened,\n\t\tisPublishable,\n\t\tisDirty,\n\t\thasOtherEntitiesChanges,\n\t} = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tisPublishSidebarOpened,\n\t\t\tisEditedPostPublishable,\n\t\t\tisCurrentPostPublished,\n\t\t\tisEditedPostDirty,\n\t\t\thasNonPostEntityChanges,\n\t\t} = select( editorStore );\n\t\tconst _hasOtherEntitiesChanges = hasNonPostEntityChanges();\n\t\treturn {\n\t\t\tpublishSidebarOpened: isPublishSidebarOpened(),\n\t\t\tisPublishable:\n\t\t\t\t! isCurrentPostPublished() && isEditedPostPublishable(),\n\t\t\tisDirty: _hasOtherEntitiesChanges || isEditedPostDirty(),\n\t\t\thasOtherEntitiesChanges: _hasOtherEntitiesChanges,\n\t\t};\n\t}, [] );\n\n\tconst openEntitiesSavedStates = useCallback(\n\t\t() => setEntitiesSavedStatesCallback( true ),\n\t\t[]\n\t);\n\n\t// It is ok for these components to be unmounted when not in visual use.\n\t// We don't want more than one present at a time, decide which to render.\n\tlet unmountableContent;\n\tif ( publishSidebarOpened ) {\n\t\tunmountableContent = (\n\t\t\t<PostPublishPanel\n\t\t\t\tonClose={ closePublishSidebar }\n\t\t\t\tforceIsDirty={ forceIsDirtyPublishPanel }\n\t\t\t\tPrePublishExtension={ PluginPrePublishPanel.Slot }\n\t\t\t\tPostPublishExtension={ PluginPostPublishPanel.Slot }\n\t\t\t/>\n\t\t);\n\t} else if ( isPublishable && ! hasOtherEntitiesChanges ) {\n\t\tunmountableContent = (\n\t\t\t<div className=\"editor-layout__toggle-publish-panel\">\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\tclassName=\"editor-layout__toggle-publish-panel-button\"\n\t\t\t\t\tonClick={ togglePublishSidebar }\n\t\t\t\t\taria-expanded={ false }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Open publish panel' ) }\n\t\t\t\t</Button>\n\t\t\t</div>\n\t\t);\n\t} else {\n\t\tunmountableContent = (\n\t\t\t<div className=\"editor-layout__toggle-entities-saved-states-panel\">\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\tclassName=\"editor-layout__toggle-entities-saved-states-panel-button\"\n\t\t\t\t\tonClick={ openEntitiesSavedStates }\n\t\t\t\t\taria-expanded={ false }\n\t\t\t\t\tdisabled={ ! isDirty }\n\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Open save panel' ) }\n\t\t\t\t</Button>\n\t\t\t</div>\n\t\t);\n\t}\n\n\t// Since EntitiesSavedStates controls its own panel, we can keep it\n\t// always mounted to retain its own component state (such as checkboxes).\n\treturn (\n\t\t<>\n\t\t\t{ isEntitiesSavedStatesOpen && (\n\t\t\t\t<EntitiesSavedStates close={ closeEntitiesSavedStates } />\n\t\t\t) }\n\t\t\t<Slot bubblesVirtually />\n\t\t\t{ ! isEntitiesSavedStatesOpen && unmountableContent }\n\t\t</>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,MAAM,EAAEC,cAAc,QAAQ,uBAAuB;AAC9D,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,WAAW,QAAQ,oBAAoB;;AAEhD;AACA;AACA;AACA,OAAOC,mBAAmB,MAAM,0BAA0B;AAC1D,OAAOC,gBAAgB,MAAM,uBAAuB;AACpD,OAAOC,qBAAqB,MAAM,6BAA6B;AAC/D,OAAOC,sBAAsB,MAAM,8BAA8B;AACjE,SAASC,KAAK,IAAIC,WAAW,QAAQ,aAAa;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAEnD,MAAM;EAAEC,IAAI;EAAEC;AAAK,CAAC,GAAGhB,cAAc,CAAE,cAAe,CAAC;AAEvD,OAAO,MAAMiB,gBAAgB,GAAGF,IAAI;AAEpC,eAAe,SAASG,iBAAiBA,CAAE;EAC1CC,8BAA8B;EAC9BC,wBAAwB;EACxBC,yBAAyB;EACzBC;AACD,CAAC,EAAG;EACH,MAAM;IAAEC,mBAAmB;IAAEC;EAAqB,CAAC,GAClD1B,WAAW,CAAEU,WAAY,CAAC;EAC3B,MAAM;IACLiB,oBAAoB;IACpBC,aAAa;IACbC,OAAO;IACPC;EACD,CAAC,GAAG/B,SAAS,CAAIgC,MAAM,IAAM;IAC5B,MAAM;MACLC,sBAAsB;MACtBC,uBAAuB;MACvBC,sBAAsB;MACtBC,iBAAiB;MACjBC;IACD,CAAC,GAAGL,MAAM,CAAErB,WAAY,CAAC;IACz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AQ,EAAG,CAAEnB,OAAS;QACtBoB,sBAAsB;QAAAJ,QAAA,EAEpB1C,EAAE,CAAE,iBAAkB;MAAC,CAClB;IAAC,CACL,CACL;EACF;;EAEA;EACA;EACA,oBACCa,KAAA,CAAAF,SAAA;IAAA+B,QAAA,GACGtB,yBAAyB,iBAC1BX,IAAA,CAACP,mBAAmB;MAAC6C,KAAK,EAAG5B;IAA0B,CAAE,CACzD,eACDV,IAAA,CAACM,IAAI;MAACiC,gBAAgB;IAAA,CAAE,CAAC,EACvB,CAAE5B,yBAAyB,IAAIgB,kBAAkB;EAAA,CAClD,CAAC;AAEL","ignoreList":[]}
@@ -39,7 +39,6 @@ const SIDEBAR_ACTIVE_BY_DEFAULT = Platform.select({
39
39
  const SidebarContent = ({
40
40
  tabName,
41
41
  keyboardShortcut,
42
- renderingMode,
43
42
  onActionPerformed,
44
43
  extraPanels
45
44
  }) => {
@@ -95,7 +94,7 @@ const SidebarContent = ({
95
94
  focusable: false,
96
95
  children: [/*#__PURE__*/_jsx(PostSummary, {
97
96
  onActionPerformed: onActionPerformed
98
- }), /*#__PURE__*/_jsx(PluginDocumentSettingPanel.Slot, {}), renderingMode !== 'post-only' && /*#__PURE__*/_jsx(TemplateContentPanel, {}), /*#__PURE__*/_jsx(TemplatePartContentPanel, {}), /*#__PURE__*/_jsx(PostTransformPanel, {}), /*#__PURE__*/_jsx(PostTaxonomiesPanel, {}), /*#__PURE__*/_jsx(PatternOverridesPanel, {}), extraPanels]
97
+ }), /*#__PURE__*/_jsx(PluginDocumentSettingPanel.Slot, {}), /*#__PURE__*/_jsx(TemplateContentPanel, {}), /*#__PURE__*/_jsx(TemplatePartContentPanel, {}), /*#__PURE__*/_jsx(PostTransformPanel, {}), /*#__PURE__*/_jsx(PostTaxonomiesPanel, {}), /*#__PURE__*/_jsx(PatternOverridesPanel, {}), extraPanels]
99
98
  }), /*#__PURE__*/_jsx(Tabs.TabPanel, {
100
99
  tabId: sidebars.block,
101
100
  focusable: false,
@@ -112,8 +111,7 @@ const Sidebar = ({
112
111
  const {
113
112
  tabName,
114
113
  keyboardShortcut,
115
- showSummary,
116
- renderingMode
114
+ showSummary
117
115
  } = useSelect(select => {
118
116
  const shortcut = select(keyboardShortcutsStore).getShortcutRepresentation('core/editor/toggle-sidebar');
119
117
  const sidebar = select(interfaceStore).getActiveComplementaryArea('core');
@@ -125,8 +123,7 @@ const Sidebar = ({
125
123
  return {
126
124
  tabName: _tabName,
127
125
  keyboardShortcut: shortcut,
128
- showSummary: ![TEMPLATE_POST_TYPE, TEMPLATE_PART_POST_TYPE, NAVIGATION_POST_TYPE].includes(select(editorStore).getCurrentPostType()),
129
- renderingMode: select(editorStore).getRenderingMode()
126
+ showSummary: ![TEMPLATE_POST_TYPE, TEMPLATE_PART_POST_TYPE, NAVIGATION_POST_TYPE].includes(select(editorStore).getCurrentPostType())
130
127
  };
131
128
  }, []);
132
129
  const {
@@ -145,7 +142,6 @@ const Sidebar = ({
145
142
  tabName: tabName,
146
143
  keyboardShortcut: keyboardShortcut,
147
144
  showSummary: showSummary,
148
- renderingMode: renderingMode,
149
145
  onActionPerformed: onActionPerformed,
150
146
  extraPanels: extraPanels
151
147
  })