@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":["_i18n","require","_data","_coreData","_components","_element","_blockEditor","_constants","_store","_postPanelRow","_interopRequireDefault","_jsxRuntime","PostsPerPage","editEntityRecord","useDispatch","coreStore","postsPerPage","isTemplate","postSlug","useSelect","select","getEditedPostAttribute","getCurrentPostType","editorStore","getEditedEntityRecord","siteSettings","TEMPLATE_POST_TYPE","posts_per_page","popoverAnchor","setPopoverAnchor","useState","popoverProps","useMemo","anchor","placement","offset","shift","includes","setPostsPerPage","newValue","undefined","jsx","default","label","__","ref","children","Dropdown","contentClassName","focusOnMount","renderToggle","isOpen","onToggle","Button","size","variant","onClick","renderContent","onClose","jsxs","Fragment","__experimentalInspectorPopoverHeader","title","__experimentalNumberControl","placeholder","value","spinControls","step","min","onChange","help","hideLabelFromVision"],"sources":["@wordpress/editor/src/components/posts-per-page/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport {\n\tButton,\n\tDropdown,\n\t__experimentalNumberControl as NumberControl,\n} from '@wordpress/components';\nimport { useState, useMemo } from '@wordpress/element';\nimport { __experimentalInspectorPopoverHeader as InspectorPopoverHeader } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { TEMPLATE_POST_TYPE } from '../../store/constants';\nimport { store as editorStore } from '../../store';\nimport PostPanelRow from '../post-panel-row';\n\nexport default function PostsPerPage() {\n\tconst { editEntityRecord } = useDispatch( coreStore );\n\tconst { postsPerPage, isTemplate, postSlug } = useSelect( ( select ) => {\n\t\tconst { getEditedPostAttribute, getCurrentPostType } =\n\t\t\tselect( editorStore );\n\t\tconst { getEditedEntityRecord } = select( coreStore );\n\t\tconst siteSettings = getEditedEntityRecord( 'root', 'site' );\n\t\treturn {\n\t\t\tisTemplate: getCurrentPostType() === TEMPLATE_POST_TYPE,\n\t\t\tpostSlug: getEditedPostAttribute( 'slug' ),\n\t\t\tpostsPerPage: siteSettings?.posts_per_page || 1,\n\t\t};\n\t}, [] );\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the popover's anchor updates.\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\t// Memoize popoverProps to avoid returning a new object every time.\n\tconst popoverProps = useMemo(\n\t\t() => ( {\n\t\t\t// Anchor the popover to the middle of the entire row so that it doesn't\n\t\t\t// move around when the label changes.\n\t\t\tanchor: popoverAnchor,\n\t\t\tplacement: 'left-start',\n\t\t\toffset: 36,\n\t\t\tshift: true,\n\t\t} ),\n\t\t[ popoverAnchor ]\n\t);\n\n\tif ( ! isTemplate || ! [ 'home', 'index' ].includes( postSlug ) ) {\n\t\treturn null;\n\t}\n\tconst setPostsPerPage = ( newValue ) => {\n\t\teditEntityRecord( 'root', 'site', undefined, {\n\t\t\tposts_per_page: newValue,\n\t\t} );\n\t};\n\treturn (\n\t\t<PostPanelRow label={ __( 'Posts per page' ) } ref={ setPopoverAnchor }>\n\t\t\t<Dropdown\n\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\tcontentClassName=\"editor-posts-per-page-dropdown__content\"\n\t\t\t\tfocusOnMount\n\t\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\t\taria-label={ __( 'Change posts per page' ) }\n\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ postsPerPage }\n\t\t\t\t\t</Button>\n\t\t\t\t) }\n\t\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<InspectorPopoverHeader\n\t\t\t\t\t\t\ttitle={ __( 'Posts per page' ) }\n\t\t\t\t\t\t\tonClose={ onClose }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<NumberControl\n\t\t\t\t\t\t\tplaceholder={ 0 }\n\t\t\t\t\t\t\tvalue={ postsPerPage }\n\t\t\t\t\t\t\tsize=\"__unstable-large\"\n\t\t\t\t\t\t\tspinControls=\"custom\"\n\t\t\t\t\t\t\tstep=\"1\"\n\t\t\t\t\t\t\tmin=\"1\"\n\t\t\t\t\t\t\tonChange={ setPostsPerPage }\n\t\t\t\t\t\t\tlabel={ __( 'Posts per page' ) }\n\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t'Set the default number of posts to display on blog pages, including categories and tags. Some templates may override this setting.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\t/>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t/>\n\t\t</PostPanelRow>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GA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A2D,2BAAa;UACbC,WAAW,EAAG,CAAG;UACjBC,KAAK,EAAGjD,YAAc;UACtBsC,IAAI,EAAC,kBAAkB;UACvBY,YAAY,EAAC,QAAQ;UACrBC,IAAI,EAAC,GAAG;UACRC,GAAG,EAAC,GAAG;UACPC,QAAQ,EAAG/B,eAAiB;UAC5BK,KAAK,EAAG,IAAAC,QAAE,EAAE,gBAAiB,CAAG;UAChC0B,IAAI,EAAG,IAAA1B,QAAE,EACR,oIACD,CAAG;UACH2B,mBAAmB;QAAA,CACnB,CAAC;MAAA,CACD;IACA,CACH;EAAC,CACW,CAAC;AAEjB","ignoreList":[]}
1
+ {"version":3,"names":["_i18n","require","_data","_coreData","_components","_element","_blockEditor","_constants","_store","_postPanelRow","_interopRequireDefault","_jsxRuntime","PostsPerPage","editEntityRecord","useDispatch","coreStore","postsPerPage","isTemplate","postSlug","useSelect","select","getEditedPostAttribute","getCurrentPostType","editorStore","getEditedEntityRecord","canUser","siteSettings","kind","name","undefined","TEMPLATE_POST_TYPE","posts_per_page","popoverAnchor","setPopoverAnchor","useState","popoverProps","useMemo","anchor","placement","offset","shift","includes","setPostsPerPage","newValue","jsx","default","label","__","ref","children","Dropdown","contentClassName","focusOnMount","renderToggle","isOpen","onToggle","Button","size","variant","onClick","renderContent","onClose","jsxs","Fragment","__experimentalInspectorPopoverHeader","title","__experimentalNumberControl","placeholder","value","spinControls","step","min","onChange","help","hideLabelFromVision"],"sources":["@wordpress/editor/src/components/posts-per-page/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport {\n\tButton,\n\tDropdown,\n\t__experimentalNumberControl as NumberControl,\n} from '@wordpress/components';\nimport { useState, useMemo } from '@wordpress/element';\nimport { __experimentalInspectorPopoverHeader as InspectorPopoverHeader } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { TEMPLATE_POST_TYPE } from '../../store/constants';\nimport { store as editorStore } from '../../store';\nimport PostPanelRow from '../post-panel-row';\n\nexport default function PostsPerPage() {\n\tconst { editEntityRecord } = useDispatch( coreStore );\n\tconst { postsPerPage, isTemplate, postSlug } = useSelect( ( select ) => {\n\t\tconst { getEditedPostAttribute, getCurrentPostType } =\n\t\t\tselect( editorStore );\n\t\tconst { getEditedEntityRecord, canUser } = select( coreStore );\n\t\tconst siteSettings = canUser( 'read', {\n\t\t\tkind: 'root',\n\t\t\tname: 'site',\n\t\t} )\n\t\t\t? getEditedEntityRecord( 'root', 'site' )\n\t\t\t: undefined;\n\t\treturn {\n\t\t\tisTemplate: getCurrentPostType() === TEMPLATE_POST_TYPE,\n\t\t\tpostSlug: getEditedPostAttribute( 'slug' ),\n\t\t\tpostsPerPage: siteSettings?.posts_per_page || 1,\n\t\t};\n\t}, [] );\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the popover's anchor updates.\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\t// Memoize popoverProps to avoid returning a new object every time.\n\tconst popoverProps = useMemo(\n\t\t() => ( {\n\t\t\t// Anchor the popover to the middle of the entire row so that it doesn't\n\t\t\t// move around when the label changes.\n\t\t\tanchor: popoverAnchor,\n\t\t\tplacement: 'left-start',\n\t\t\toffset: 36,\n\t\t\tshift: true,\n\t\t} ),\n\t\t[ popoverAnchor ]\n\t);\n\n\tif ( ! isTemplate || ! [ 'home', 'index' ].includes( postSlug ) ) {\n\t\treturn null;\n\t}\n\tconst setPostsPerPage = ( newValue ) => {\n\t\teditEntityRecord( 'root', 'site', undefined, {\n\t\t\tposts_per_page: newValue,\n\t\t} );\n\t};\n\treturn (\n\t\t<PostPanelRow label={ __( 'Posts per page' ) } ref={ setPopoverAnchor }>\n\t\t\t<Dropdown\n\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\tcontentClassName=\"editor-posts-per-page-dropdown__content\"\n\t\t\t\tfocusOnMount\n\t\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\t\taria-label={ __( 'Change posts per page' ) }\n\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ postsPerPage }\n\t\t\t\t\t</Button>\n\t\t\t\t) }\n\t\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<InspectorPopoverHeader\n\t\t\t\t\t\t\ttitle={ __( 'Posts per page' ) }\n\t\t\t\t\t\t\tonClose={ onClose }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<NumberControl\n\t\t\t\t\t\t\tplaceholder={ 0 }\n\t\t\t\t\t\t\tvalue={ postsPerPage }\n\t\t\t\t\t\t\tsize=\"__unstable-large\"\n\t\t\t\t\t\t\tspinControls=\"custom\"\n\t\t\t\t\t\t\tstep=\"1\"\n\t\t\t\t\t\t\tmin=\"1\"\n\t\t\t\t\t\t\tonChange={ setPostsPerPage }\n\t\t\t\t\t\t\tlabel={ __( 'Posts per page' ) }\n\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t'Set the default number of posts to display on blog pages, including categories and tags. Some templates may override this setting.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\t/>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t/>\n\t\t</PostPanelRow>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AAKA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,YAAA,GAAAL,OAAA;AAKA,IAAAM,UAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP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I,EAAC,kBAAkB;UACvBY,YAAY,EAAC,QAAQ;UACrBC,IAAI,EAAC,GAAG;UACRC,GAAG,EAAC,GAAG;UACPC,QAAQ,EAAG9B,eAAiB;UAC5BI,KAAK,EAAG,IAAAC,QAAE,EAAE,gBAAiB,CAAG;UAChC0B,IAAI,EAAG,IAAA1B,QAAE,EACR,oIACD,CAAG;UACH2B,mBAAmB;QAAA,CACnB,CAAC;MAAA,CACD;IACA,CACH;EAAC,CACW,CAAC;AAEjB","ignoreList":[]}
@@ -70,7 +70,7 @@ function PreviewDropdown({
70
70
  size: 'compact',
71
71
  showTooltip: !showIconLabels,
72
72
  disabled,
73
- __experimentalIsFocusable: disabled
73
+ accessibleWhenDisabled: disabled
74
74
  };
75
75
  const menuProps = {
76
76
  'aria-label': (0, _i18n.__)('View options')
@@ -1 +1 @@
1
- {"version":3,"names":["_compose","require","_components","_i18n","_icons","_data","_coreData","_preferences","_store","_postPreviewButton","_interopRequireDefault","_jsxRuntime","PreviewDropdown","forceIsAutosaveable","disabled","deviceType","homeUrl","isTemplate","isViewable","showIconLabels","useSelect","select","_getPostType$viewable","getDeviceType","getCurrentPostType","editorStore","getUnstableBase","getPostType","coreStore","get","preferencesStore","_currentPostType","home","viewable","setDeviceType","useDispatch","isMobile","useViewportMatch","popoverProps","placement","toggleProps","className","size","showTooltip","__experimentalIsFocusable","menuProps","__","deviceIcons","mobile","tablet","desktop","jsx","DropdownMenu","icon","toLowerCase","label","disableOpenOnArrowDown","children","onClose","jsxs","Fragment","MenuGroup","MenuItem","onClick","check","href","target","external","VisuallyHidden","as","default","role","textContent","Icon","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":";;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAOA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AAKA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,kBAAA,GAAAC,sBAAA,CAAAT,OAAA;AAAuD,IAAAU,WAAA,GAAAV,OAAA;AArBvD;AACA;AACA;;AAeA;AACA;AACA;;AAIe,SAASW,eAAeA,CAAE;EAAEC,mBAAmB;EAAEC;AAAS,CAAC,EAAG;EAC5E,MAAM;IAAEC,UAAU;IAAEC,OAAO;IAAEC,UAAU;IAAEC,UAAU;IAAEC;EAAe,CAAC,GACpE,IAAAC,eAAS,EAAIC,MAAM,IAAM;IAAA,IAAAC,qBAAA;IACxB,MAAM;MAAEC,aAAa;MAAEC;IAAmB,C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,UAAU,iBACX,IAAAN,WAAA,CAAAwC,GAAA,EAACjD,WAAA,CAAA2D,SAAS;QAAAJ,QAAA,eACT,IAAA9C,WAAA,CAAAgD,IAAA,EAACzD,WAAA,CAAA4D,QAAQ;UACRG,IAAI,EAAGjD,OAAS;UAChBkD,MAAM,EAAC,QAAQ;UACfb,IAAI,EAAGc,eAAU;UACjBJ,OAAO,EAAGL,OAAS;UAAAD,QAAA,GAEjB,IAAAX,QAAE,EAAE,WAAY,CAAC,eACnB,IAAAnC,WAAA,CAAAwC,GAAA,EAACjD,WAAA,CAAAkE,cAAc;YAACC,EAAE,EAAC,MAAM;YAAAZ,QAAA,EAEvB;YACA,IAAAX,QAAE,EAAE,sBAAuB;UAAC,CAEd,CAAC;QAAA,CACR;MAAC,CACD,CACX,EACC5B,UAAU,iBACX,IAAAP,WAAA,CAAAwC,GAAA,EAACjD,WAAA,CAAA2D,SAAS;QAAAJ,QAAA,eACT,IAAA9C,WAAA,CAAAwC,GAAA,EAAC1C,kBAAA,CAAA6D,OAAiB;UACjB7B,SAAS,EAAC,0CAA0C;UACpD8B,IAAI,EAAC,UAAU;UACf1D,mBAAmB,EAAGA,mBAAqB;UAC3C2D,WAAW,eACV,IAAA7D,WAAA,CAAAgD,IAAA,EAAAhD,WAAA,CAAAiD,QAAA;YAAAH,QAAA,GACG,IAAAX,QAAE,EAAE,oBAAqB,CAAC,eAC5B,IAAAnC,WAAA,CAAAwC,GAAA,EAACjD,WAAA,CAAAuE,IAAI;cAACpB,IAAI,EAAGc;YAAU,CAAE,CAAC;UAAA,CACzB,CACF;UACDO,SAAS,EAAGhB;QAAS,CACrB;MAAC,CACQ,CACX;IAAA,CACA;EACF,CACY,CAAC;AAEjB","ignoreList":[]}
1
+ {"version":3,"names":["_compose","require","_components","_i18n","_icons","_data","_coreData","_preferences","_store","_postPreviewButton","_interopRequireDefault","_jsxRuntime","PreviewDropdown","forceIsAutosaveable","disabled","deviceType","homeUrl","isTemplate","isViewable","showIconLabels","useSelect","select","_getPostType$viewable","getDeviceType","getCurrentPostType","editorStore","getUnstableBase","getPostType","coreStore","get","preferencesStore","_currentPostType","home","viewable","setDeviceType","useDispatch","isMobile","useViewportMatch","popoverProps","placement","toggleProps","className","size","showTooltip","accessibleWhenDisabled","menuProps","__","deviceIcons","mobile","tablet","desktop","jsx","DropdownMenu","icon","toLowerCase","label","disableOpenOnArrowDown","children","onClose","jsxs","Fragment","MenuGroup","MenuItem","onClick","check","href","target","external","VisuallyHidden","as","default","role","textContent","Icon","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":";;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AA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D8B,IAAI,EAAC,UAAU;UACf1D,mBAAmB,EAAGA,mBAAqB;UAC3C2D,WAAW,eACV,IAAA7D,WAAA,CAAAgD,IAAA,EAAAhD,WAAA,CAAAiD,QAAA;YAAAH,QAAA,GACG,IAAAX,QAAE,EAAE,oBAAqB,CAAC,eAC5B,IAAAnC,WAAA,CAAAwC,GAAA,EAACjD,WAAA,CAAAuE,IAAI;cAACpB,IAAI,EAAGc;YAAU,CAAE,CAAC;UAAA,CACzB,CACF;UACDO,SAAS,EAAGhB;QAAS,CACrB;MAAC,CACQ,CACX;IAAA,CACA;EACF,CACY,CAAC;AAEjB","ignoreList":[]}
@@ -129,12 +129,8 @@ class NativeEditorProvider extends _element.Component {
129
129
  }
130
130
  });
131
131
  this.subscriptionParentUpdateEditorSettings = (0, _reactNativeBridge.subscribeUpdateEditorSettings)(({
132
- galleryWithImageBlocks,
133
132
  ...editorSettings
134
133
  }) => {
135
- if (typeof galleryWithImageBlocks === 'boolean') {
136
- window.wp.galleryBlockV2Enabled = galleryWithImageBlocks;
137
- }
138
134
  updateEditorSettings(this.getThemeColors(editorSettings));
139
135
  });
140
136
  this.subscriptionParentUpdateCapabilities = (0, _reactNativeBridge.subscribeUpdateCapabilities)(payload => {
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNative","require","_memize","_interopRequireDefault","_reactNativeSafeAreaContext","_reactNativeBridge","_interopRequireWildcard","_element","_wordcount","_blocks","_data","_compose","_hooks","_blockEditor","_blockLibrary","_i18n","_editor","_notices","_coreData","_index","_postTitle","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","postTypeEntities","name","baseURL","map","postTypeEntity","kind","transientEdits","blocks","selection","mergedEdits","meta","rawAttributes","NativeEditorProvider","Component","constructor","arguments","post","props","addEntities","receiveEntityRecords","type","onHardwareBackPress","bind","onContentUpdate","getEditorSettings","memize","settings","capabilities","maxSize","state","isHelpVisible","componentDidMount","createErrorNotice","locale","hostAppNamespace","updateEditorSettings","updateBlockEditorSettings","getThemeColors","subscriptionParentGetHtml","subscribeParentGetHtml","serializeToNativeAction","subscriptionParentToggleHTMLMode","subscribeParentToggleHTMLMode","toggleMode","subscriptionParentSetTitle","subscribeSetTitle","payload","editTitle","title","subscriptionParentUpdateHtml","subscribeUpdateHtml","updateHtmlAction","html","subscriptionParentReplaceBlock","subscribeReplaceBlock","replaceBlockAction","clientId","subscriptionParentMediaAppend","subscribeMediaAppend","blockName","mediaType","blockType","getBlockType","newBlock","createBlock","id","mediaId","mediaUrl","indexAfterSelected","selectedBlockIndex","insertionIndex","blockCount","insertBlock","__","subscriptionParentUpdateEditorSettings","subscribeUpdateEditorSettings","galleryWithImageBlocks","editorSettings","window","wp","galleryBlockV2Enabled","subscriptionParentUpdateCapabilities","subscribeUpdateCapabilities","updateCapabilitiesAction","subscriptionParentShowNotice","subscribeShowNotice","createSuccessNotice","message","subscriptionParentShowEditorHelp","subscribeShowEditorHelp","setState","hardwareBackPressListener","BackHandler","addEventListener","subscriptionOnContentUpdate","subscribeToContentUpdate","data","requestBlockTypeImpressions","storedImpressions","impressions","NEW_BLOCK_TYPES","storedImpressionKeys","keys","storedImpressionsCurrent","every","newKey","includes","setBlockTypeImpressions","componentWillUnmount","remove","rawStyles","rawFeatures","defaultEditorColors","defaultEditorGradients","getGlobalStyles","getColorsAndGradients","componentDidUpdate","prevProps","isReady","isUnsupportedBlock","getUnregisteredTypeHandlerName","unsupportedBlockNames","filter","block","attributes","originalName","RNReactNativeGutenbergBridge","editorDidMount","clearSelectedBlock","content","rawContent","onClearPostTitleSelection","onInsertBlockAfter","onInsertBlocks","pasteHandler","plainText","insertContentWithTitle","mode","applyFilters","serialize","hasChanges","raw","contentInfo","characterCount","wordCount","paragraphCount","provideToNative_Html","parsed","parse","resetEditorBlocksWithoutUndoLevel","blockClientId","replaceBlock","switchMode","render","children","jsxs","Fragment","jsx","SafeAreaProvider","EditorHelpTopics","isVisible","onClose","close","showSupport","supportSection","ComposedNativeProvider","exports","ExperimentalEditorProvider","compose","withSelect","select","_settings$colors","_settings$gradients","__unstableIsEditorReady","isEditorReady","getEditorBlocks","getEditedPostAttribute","getEditedPostContent","getEditorMode","editorStore","getBlockIndex","getSelectedBlockClientId","getGlobalBlockCount","blockEditorStore","colors","gradients","selectedBlockClientId","withDispatch","dispatch","editPost","resetEditorBlocks","switchEditorMode","togglePostTitleSelection","updateSettings","insertBlocks","coreStore","noticesStore","__unstableShouldCreateUndoLevel","undefined","_default"],"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":";;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,2BAAA,GAAAH,OAAA;AAKA,IAAAI,kBAAA,GAAAC,uBAAA,CAAAL,OAAA;AAeA,IAAAM,QAAA,GAAAN,OAAA;AACA,IAAAO,UAAA,GAAAP,OAAA;AACA,IAAAQ,OAAA,GAAAR,OAAA;AAQA,IAAAS,KAAA,GAAAT,OAAA;AACA,IAAAU,QAAA,GAAAV,OAAA;AACA,IAAAW,MAAA,GAAAX,OAAA;AACA,IAAAY,YAAA,GAAAZ,OAAA;AAKA,IAAAa,aAAA,GAAAb,OAAA;AACA,IAAAc,KAAA,GAAAd,OAAA;AAmBA,IAAAe,OAAA,GAAAf,OAAA;AACA,IAAAgB,QAAA,GAAAhB,OAAA;AACA,IAAAiB,SAAA,GAAAjB,OAAA;AAKA,IAAAkB,MAAA,GAAAhB,sBAAA,CAAAF,OAAA;AACA,IAAAmB,UAAA,GAAAnB,OAAA;AAA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"version":3,"names":["_reactNative","require","_memize","_interopRequireDefault","_reactNativeSafeAreaContext","_reactNativeBridge","_interopRequireWildcard","_element","_wordcount","_blocks","_data","_compose","_hooks","_blockEditor","_blockLibrary","_i18n","_editor","_notices","_coreData","_index","_postTitle","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","postTypeEntities","name","baseURL","map","postTypeEntity","kind","transientEdits","blocks","selection","mergedEdits","meta","rawAttributes","NativeEditorProvider","Component","constructor","arguments","post","props","addEntities","receiveEntityRecords","type","onHardwareBackPress","bind","onContentUpdate","getEditorSettings","memize","settings","capabilities","maxSize","state","isHelpVisible","componentDidMount","createErrorNotice","locale","hostAppNamespace","updateEditorSettings","updateBlockEditorSettings","getThemeColors","subscriptionParentGetHtml","subscribeParentGetHtml","serializeToNativeAction","subscriptionParentToggleHTMLMode","subscribeParentToggleHTMLMode","toggleMode","subscriptionParentSetTitle","subscribeSetTitle","payload","editTitle","title","subscriptionParentUpdateHtml","subscribeUpdateHtml","updateHtmlAction","html","subscriptionParentReplaceBlock","subscribeReplaceBlock","replaceBlockAction","clientId","subscriptionParentMediaAppend","subscribeMediaAppend","blockName","mediaType","blockType","getBlockType","newBlock","createBlock","id","mediaId","mediaUrl","indexAfterSelected","selectedBlockIndex","insertionIndex","blockCount","insertBlock","__","subscriptionParentUpdateEditorSettings","subscribeUpdateEditorSettings","editorSettings","subscriptionParentUpdateCapabilities","subscribeUpdateCapabilities","updateCapabilitiesAction","subscriptionParentShowNotice","subscribeShowNotice","createSuccessNotice","message","subscriptionParentShowEditorHelp","subscribeShowEditorHelp","setState","hardwareBackPressListener","BackHandler","addEventListener","subscriptionOnContentUpdate","subscribeToContentUpdate","data","requestBlockTypeImpressions","storedImpressions","impressions","NEW_BLOCK_TYPES","storedImpressionKeys","keys","storedImpressionsCurrent","every","newKey","includes","setBlockTypeImpressions","componentWillUnmount","remove","rawStyles","rawFeatures","defaultEditorColors","defaultEditorGradients","getGlobalStyles","getColorsAndGradients","componentDidUpdate","prevProps","isReady","isUnsupportedBlock","getUnregisteredTypeHandlerName","unsupportedBlockNames","filter","block","attributes","originalName","RNReactNativeGutenbergBridge","editorDidMount","clearSelectedBlock","content","rawContent","onClearPostTitleSelection","onInsertBlockAfter","onInsertBlocks","pasteHandler","plainText","insertContentWithTitle","mode","applyFilters","serialize","hasChanges","raw","contentInfo","characterCount","wordCount","paragraphCount","provideToNative_Html","parsed","parse","resetEditorBlocksWithoutUndoLevel","blockClientId","replaceBlock","switchMode","render","children","jsxs","Fragment","jsx","SafeAreaProvider","EditorHelpTopics","isVisible","onClose","close","showSupport","supportSection","ComposedNativeProvider","exports","ExperimentalEditorProvider","compose","withSelect","select","_settings$colors","_settings$gradients","__unstableIsEditorReady","isEditorReady","getEditorBlocks","getEditedPostAttribute","getEditedPostContent","getEditorMode","editorStore","getBlockIndex","getSelectedBlockClientId","getGlobalBlockCount","blockEditorStore","colors","gradients","selectedBlockClientId","withDispatch","dispatch","editPost","resetEditorBlocks","switchEditorMode","togglePostTitleSelection","updateSettings","insertBlocks","coreStore","noticesStore","__unstableShouldCreateUndoLevel","undefined","_default"],"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":";;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,2BAAA,GAAAH,OAAA;AAKA,IAAAI,kBAAA,GAAAC,uBAAA,CAAAL,OAAA;AAeA,IAAAM,QAAA,GAAAN,OAAA;AACA,IAAAO,UAAA,GAAAP,OAAA;AACA,IAAAQ,OAAA,GAAAR,OAAA;AAQA,IAAAS,KAAA,GAAAT,OAAA;AACA,IAAAU,QAAA,GAAAV,OAAA;AACA,IAAAW,MAAA,GAAAX,OAAA;AACA,IAAAY,YAAA,GAAAZ,OAAA;AAKA,IAAAa,aAAA,GAAAb,OAAA;AACA,IAAAc,KAA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qB,CAAC;AAAC,IAAAuL,QAAA,GAAAjC,OAAA,CAAAhL,OAAA,GAEb+K,sBAAsB","ignoreList":[]}
@@ -27,16 +27,17 @@ var _globalStylesProvider = require("../global-styles-provider");
27
27
  */
28
28
 
29
29
  const EMPTY_BLOCKS_LIST = [];
30
- const DEFAULT_STYLES = {};
30
+ const EMPTY_OBJECT = {};
31
31
  function __experimentalReusableBlocksSelect(select) {
32
32
  var _select$getEntityReco;
33
33
  return (_select$getEntityReco = select(_coreData.store).getEntityRecords('postType', 'wp_block', {
34
34
  per_page: -1
35
35
  })) !== null && _select$getEntityReco !== void 0 ? _select$getEntityReco : EMPTY_BLOCKS_LIST;
36
36
  }
37
- 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'];
37
+ 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'];
38
38
  const {
39
39
  globalStylesDataKey,
40
+ globalStylesLinksDataKey,
40
41
  selectBlockPatternsKey,
41
42
  reusableBlocksSelectKey
42
43
  } = (0, _lockUnlock.unlock)(_blockEditor.privateApis);
@@ -52,7 +53,7 @@ const {
52
53
  * @return {Object} Block Editor Settings.
53
54
  */
54
55
  function useBlockEditorSettings(settings, postType, postId, renderingMode) {
55
- var _mergedGlobalStyles$s, _settings$__experimen, _settings$__experimen2;
56
+ var _mergedGlobalStyles$s, _mergedGlobalStyles$_, _settings$__experimen, _settings$__experimen2;
56
57
  const isLargeViewport = (0, _compose.useViewportMatch)('medium');
57
58
  const {
58
59
  allowRightClickOverrides,
@@ -89,7 +90,10 @@ function useBlockEditorSettings(settings, postType, postId, renderingMode) {
89
90
  getBlocksByName,
90
91
  getBlockAttributes
91
92
  } = select(_blockEditor.store);
92
- const siteSettings = canUser('read', 'settings') ? getEntityRecord('root', 'site') : undefined;
93
+ const siteSettings = canUser('read', {
94
+ kind: 'root',
95
+ name: 'site'
96
+ }) ? getEntityRecord('root', 'site') : undefined;
93
97
  function getSectionRootBlock() {
94
98
  var _getBlocksByName$find;
95
99
  if (renderingMode === 'template-locked') {
@@ -107,8 +111,14 @@ function useBlockEditorSettings(settings, postType, postId, renderingMode) {
107
111
  hiddenBlockTypes: get('core', 'hiddenBlockTypes'),
108
112
  isDistractionFree: get('core', 'distractionFree'),
109
113
  keepCaretInsideBlock: get('core', 'keepCaretInsideBlock'),
110
- hasUploadPermissions: (_canUser = canUser('create', 'media')) !== null && _canUser !== void 0 ? _canUser : true,
111
- userCanCreatePages: canUser('create', 'pages'),
114
+ hasUploadPermissions: (_canUser = canUser('create', {
115
+ kind: 'root',
116
+ name: 'media'
117
+ })) !== null && _canUser !== void 0 ? _canUser : true,
118
+ userCanCreatePages: canUser('create', {
119
+ kind: 'postType',
120
+ name: 'page'
121
+ }),
112
122
  pageOnFront: siteSettings?.page_on_front,
113
123
  pageForPosts: siteSettings?.page_for_posts,
114
124
  userPatternCategories: getUserPatternCategories(),
@@ -119,7 +129,8 @@ function useBlockEditorSettings(settings, postType, postId, renderingMode) {
119
129
  const {
120
130
  merged: mergedGlobalStyles
121
131
  } = (0, _globalStylesProvider.useGlobalStylesContext)();
122
- const globalStylesData = (_mergedGlobalStyles$s = mergedGlobalStyles.styles) !== null && _mergedGlobalStyles$s !== void 0 ? _mergedGlobalStyles$s : DEFAULT_STYLES;
132
+ const globalStylesData = (_mergedGlobalStyles$s = mergedGlobalStyles.styles) !== null && _mergedGlobalStyles$s !== void 0 ? _mergedGlobalStyles$s : EMPTY_OBJECT;
133
+ const globalStylesLinksData = (_mergedGlobalStyles$_ = mergedGlobalStyles._links) !== null && _mergedGlobalStyles$_ !== void 0 ? _mergedGlobalStyles$_ : EMPTY_OBJECT;
123
134
  const settingsBlockPatterns = (_settings$__experimen = settings.__experimentalAdditionalBlockPatterns) !== null && _settings$__experimen !== void 0 ? _settings$__experimen :
124
135
  // WP 6.0
125
136
  settings.__experimentalBlockPatterns; // WP 5.9
@@ -174,6 +185,7 @@ function useBlockEditorSettings(settings, postType, postId, renderingMode) {
174
185
  const blockEditorSettings = {
175
186
  ...Object.fromEntries(Object.entries(settings).filter(([key]) => BLOCK_EDITOR_SETTINGS.includes(key))),
176
187
  [globalStylesDataKey]: globalStylesData,
188
+ [globalStylesLinksDataKey]: globalStylesLinksData,
177
189
  allowedBlockTypes,
178
190
  allowRightClickOverrides,
179
191
  focusMode: focusMode && !forceDisableFocusMode,
@@ -203,7 +215,7 @@ function useBlockEditorSettings(settings, postType, postId, renderingMode) {
203
215
  __experimentalUndo: undo,
204
216
  // Check whether we want all site editor frames to have outlines
205
217
  // including the navigation / pattern / parts editors.
206
- outlineMode: postType === 'wp_template',
218
+ outlineMode: !isDistractionFree && postType === 'wp_template',
207
219
  // Check these two properties: they were not present in the site editor.
208
220
  __experimentalCreatePageEntity: createPageEntity,
209
221
  __experimentalUserCanCreatePages: userCanCreatePages,
@@ -218,7 +230,7 @@ function useBlockEditorSettings(settings, postType, postId, renderingMode) {
218
230
  sectionRootClientId
219
231
  });
220
232
  return blockEditorSettings;
221
- }, [allowedBlockTypes, allowRightClickOverrides, focusMode, forceDisableFocusMode, hasFixedToolbar, isDistractionFree, keepCaretInsideBlock, settings, hasUploadPermissions, userPatternCategories, blockPatterns, blockPatternCategories, canUseUnfilteredHTML, undo, createPageEntity, userCanCreatePages, pageOnFront, pageForPosts, postType, setIsInserterOpened, sectionRootClientId, globalStylesData]);
233
+ }, [allowedBlockTypes, allowRightClickOverrides, focusMode, forceDisableFocusMode, hasFixedToolbar, isDistractionFree, keepCaretInsideBlock, settings, hasUploadPermissions, userPatternCategories, blockPatterns, blockPatternCategories, canUseUnfilteredHTML, undo, createPageEntity, userCanCreatePages, pageOnFront, pageForPosts, postType, setIsInserterOpened, sectionRootClientId, globalStylesData, globalStylesLinksData]);
222
234
  }
223
235
  var _default = exports.default = useBlockEditorSettings;
224
236
  //# sourceMappingURL=use-block-editor-settings.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_data","_coreData","_i18n","_preferences","_compose","_blocks","_blockEditor","_mediaCategories","_interopRequireDefault","_utils","_store","_lockUnlock","_globalStylesProvider","EMPTY_BLOCKS_LIST","DEFAULT_STYLES","__experimentalReusableBlocksSelect","select","_select$getEntityReco","coreStore","getEntityRecords","per_page","BLOCK_EDITOR_SETTINGS","globalStylesDataKey","selectBlockPatternsKey","reusableBlocksSelectKey","unlock","privateApis","useBlockEditorSettings","settings","postType","postId","renderingMode","_mergedGlobalStyles$s","_settings$__experimen","_settings$__experimen2","isLargeViewport","useViewportMatch","allowRightClickOverrides","blockTypes","focusMode","hasFixedToolbar","isDistractionFree","keepCaretInsideBlock","hasUploadPermissions","hiddenBlockTypes","canUseUnfilteredHTML","userCanCreatePages","pageOnFront","pageForPosts","userPatternCategories","restBlockPatternCategories","sectionRootClientId","useSelect","_canUser","canUser","getRawEntityRecord","getEntityRecord","getUserPatternCategories","getBlockPatternCategories","get","preferencesStore","getBlockTypes","blocksStore","getBlocksByName","getBlockAttributes","blockEditorStore","siteSettings","undefined","getSectionRootBlock","_getBlocksByName$find","_getBlocksByName$","find","clientId","tagName","_links","hasOwnProperty","page_on_front","page_for_posts","merged","mergedGlobalStyles","useGlobalStylesContext","globalStylesData","styles","settingsBlockPatterns","__experimentalAdditionalBlockPatterns","__experimentalBlockPatterns","settingsBlockPatternCategories","__experimentalAdditionalBlockPatternCategories","__experimentalBlockPatternCategories","blockPatterns","useMemo","filter","postTypes","Array","isArray","includes","blockPatternCategories","x","index","arr","findIndex","y","name","undo","setIsInserterOpened","useDispatch","editorStore","saveEntityRecord","createPageEntity","useCallback","options","Promise","reject","message","__","allowedBlockTypes","length","defaultAllowedBlockTypes","map","type","forceDisableFocusMode","blockEditorSettings","Object","fromEntries","entries","key","mediaUpload","hasFinishedResolution","getBlockPatternsForPostType","patterns","__experimentalUserPatternCategories","__experimentalFetchLinkSuggestions","search","searchOptions","fetchLinkSuggestions","inserterMediaCategories","__experimentalFetchRichUrlData","fetchUrlData","__experimentalCanUserUseUnfilteredHTML","__experimentalUndo","outlineMode","__experimentalCreatePageEntity","__experimentalUserCanCreatePages","__experimentalPreferPatternsOnRoot","templateLock","template","__experimentalSetIsInserterOpened","lock","_default","exports","default"],"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"],"mappings":";;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AAKA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AACA,IAAAO,YAAA,GAAAP,OAAA;AAQA,IAAAQ,gBAAA,GAAAC,sBAAA,CAAAT,OAAA;AACA,IAAAU,MAAA,GAAAV,OAAA;AACA,IAAAW,MAAA,GAAAX,OAAA;AACA,IAAAY,WAAA,GAAAZ,OAAA;AACA,IAAAa,qBAAA,GAAAb,OAAA;AA1BA;AACA;AACA;;AAiBA;AACA;AACA;;AAOA,MAAMc,iBAAiB,GAAG,EAAE;AAC5B,MAAMC,cAAc,GAAG,CAAC,CAAC;AAEzB,SAASC,kCAAkCA,CAAEC,MAAM,EAAG;EAAA,IAAAC,qBAAA;EACrD,QAAAA,qBAAA,GACCD,MAAM,CAAEE,eAAU,CAAC,CAACC,gBAAgB,CAAE,UAAU,EAAE,UAAU,EAAE;IAC7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BAAmB,EAAE;MAC1BtE;IACD,CAAE,CAAC;IACH,OAAOsE,mBAAmB;EAC3B,CAAC,EAAE,CACFN,iBAAiB,EACjB9E,wBAAwB,EACxBE,SAAS,EACTiF,qBAAqB,EACrBhF,eAAe,EACfC,iBAAiB,EACjBC,oBAAoB,EACpBd,QAAQ,EACRe,oBAAoB,EACpBM,qBAAqB,EACrBwC,aAAa,EACbO,sBAAsB,EACtBnD,oBAAoB,EACpB0D,IAAI,EACJK,gBAAgB,EAChB9D,kBAAkB,EAClBC,WAAW,EACXC,YAAY,EACZnB,QAAQ,EACR2E,mBAAmB,EACnBrD,mBAAmB,EACnB8B,gBAAgB,CACf,CAAC;AACJ;AAAC,IAAAmE,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEc3H,sBAAsB","ignoreList":[]}
1
+ {"version":3,"names":["_element","require","_data","_coreData","_i18n","_preferences","_compose","_blocks","_blockEditor","_mediaCategories","_interopRequireDefault","_utils","_store","_lockUnlock","_globalStylesProvider","EMPTY_BLOCKS_LIST","EMPTY_OBJECT","__experimentalReusableBlocksSelect","select","_select$getEntityReco","coreStore","getEntityRecords","per_page","BLOCK_EDITOR_SETTINGS","globalStylesDataKey","globalStylesLinksDataKey","selectBlockPatternsKey","reusableBlocksSelectKey","unlock","privateApis","useBlockEditorSettings","settings","postType","postId","renderingMode","_mergedGlobalStyles$s","_mergedGlobalStyles$_","_settings$__experimen","_settings$__experimen2","isLargeViewport","useViewportMatch","allowRightClickOverrides","blockTypes","focusMode","hasFixedToolbar","isDistractionFree","keepCaretInsideBlock","hasUploadPermissions","hiddenBlockTypes","canUseUnfilteredHTML","userCanCreatePages","pageOnFront","pageForPosts","userPatternCategories","restBlockPatternCategories","sectionRootClientId","useSelect","_canUser","canUser","getRawEntityRecord","getEntityRecord","getUserPatternCategories","getBlockPatternCategories","get","preferencesStore","getBlockTypes","blocksStore","getBlocksByName","getBlockAttributes","blockEditorStore","siteSettings","kind","name","undefined","getSectionRootBlock","_getBlocksByName$find","_getBlocksByName$","find","clientId","tagName","_links","hasOwnProperty","page_on_front","page_for_posts","merged","mergedGlobalStyles","useGlobalStylesContext","globalStylesData","styles","globalStylesLinksData","settingsBlockPatterns","__experimentalAdditionalBlockPatterns","__experimentalBlockPatterns","settingsBlockPatternCategories","__experimentalAdditionalBlockPatternCategories","__experimentalBlockPatternCategories","blockPatterns","useMemo","filter","postTypes","Array","isArray","includes","blockPatternCategories","x","index","arr","findIndex","y","undo","setIsInserterOpened","useDispatch","editorStore","saveEntityRecord","createPageEntity","useCallback","options","Promise","reject","message","__","allowedBlockTypes","length","defaultAllowedBlockTypes","map","type","forceDisableFocusMode","blockEditorSettings","Object","fromEntries","entries","key","mediaUpload","hasFinishedResolution","getBlockPatternsForPostType","patterns","__experimentalUserPatternCategories","__experimentalFetchLinkSuggestions","search","searchOptions","fetchLinkSuggestions","inserterMediaCategories","__experimentalFetchRichUrlData","fetchUrlData","__experimentalCanUserUseUnfilteredHTML","__experimentalUndo","outlineMode","__experimentalCreatePageEntity","__experimentalUserCanCreatePages","__experimentalPreferPatternsOnRoot","templateLock","template","__experimentalSetIsInserterOpened","lock","_default","exports","default"],"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":";;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AAKA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AACA,IAAAO,YAAA,GAAAP,OAAA;AAQA,IAAAQ,gBAAA,GAAAC,sBAAA,CAAAT,OAAA;AACA,IAAAU,MAAA,GAAAV,OAAA;AACA,IAAAW,MAAA,GAAAX,OAAA;AACA,IAAAY,WAAA,GAAAZ,OAAA;AACA,IAAAa,qBAAA,GAAAb,OAAA;AA1BA;AACA;AACA;;AAiBA;AACA;AACA;;AAOA,MAAMc,iBAAiB,GAAG,EAAE;AAC5B,MAAMC,YAAY,GAAG,CAAC,CAAC;AAEvB,SAASC,kCAAkCA,CAAEC,MAAM,EAAG;EAAA,IAAAC,qBAAA;EACrD,QAAAA,qBAAA,GACCD,MAAM,CAAEE,eAAU,CAAC,CAACC,gBAAgB,CAAE,UAAU,EAAE,UAAU,EAAE;IAC7DC,QAAQ,EAAE,CAAC;EACZ,CAAE,CAAC,cAAAH,qBAAA,cAAAA,qBAAA,GAAIJ,iBAAiB;AAE1B;AAEA,MAAMQ,qBAAqB,GAAG,CAC7B,8BAA8B,EAC9B,kCAAkC,EAClC,wBAAwB,EACxB,sCAAsC,EACtC,WAAW,EACX,oBAAoB,EACpB,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,EACf,cAAc,EACd,qBAAqB,EACrB,oBAAoB,EACpB,QAAQ,EACR,qBAAqB,EACrB,wBAAwB,EACxB,2BAA2B,EAC3B,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BAAmB;EAC3B,CAAC,EAAE,CACFN,iBAAiB,EACjBhF,wBAAwB,EACxBE,SAAS,EACTmF,qBAAqB,EACrBlF,eAAe,EACfC,iBAAiB,EACjBC,oBAAoB,EACpBf,QAAQ,EACRgB,oBAAoB,EACpBM,qBAAqB,EACrB2C,aAAa,EACbO,sBAAsB,EACtBtD,oBAAoB,EACpB4D,IAAI,EACJK,gBAAgB,EAChBhE,kBAAkB,EAClBC,WAAW,EACXC,YAAY,EACZpB,QAAQ,EACR8E,mBAAmB,EACnBvD,mBAAmB,EACnBgC,gBAAgB,EAChBE,qBAAqB,CACpB,CAAC;AACJ;AAAC,IAAAiE,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEc9H,sBAAsB","ignoreList":[]}
@@ -15,7 +15,6 @@ var _postPublishPanel = _interopRequireDefault(require("../post-publish-panel"))
15
15
  var _pluginPrePublishPanel = _interopRequireDefault(require("../plugin-pre-publish-panel"));
16
16
  var _pluginPostPublishPanel = _interopRequireDefault(require("../plugin-post-publish-panel"));
17
17
  var _store = require("../../store");
18
- var _lockUnlock = require("../../lock-unlock");
19
18
  var _jsxRuntime = require("react/jsx-runtime");
20
19
  /**
21
20
  * WordPress dependencies
@@ -42,13 +41,25 @@ function SavePublishPanels({
42
41
  } = (0, _data.useDispatch)(_store.store);
43
42
  const {
44
43
  publishSidebarOpened,
45
- hasNonPostEntityChanges,
46
- hasPostMetaChanges
47
- } = (0, _data.useSelect)(select => ({
48
- publishSidebarOpened: select(_store.store).isPublishSidebarOpened(),
49
- hasNonPostEntityChanges: select(_store.store).hasNonPostEntityChanges(),
50
- hasPostMetaChanges: (0, _lockUnlock.unlock)(select(_store.store)).hasPostMetaChanges()
51
- }), []);
44
+ isPublishable,
45
+ isDirty,
46
+ hasOtherEntitiesChanges
47
+ } = (0, _data.useSelect)(select => {
48
+ const {
49
+ isPublishSidebarOpened,
50
+ isEditedPostPublishable,
51
+ isCurrentPostPublished,
52
+ isEditedPostDirty,
53
+ hasNonPostEntityChanges
54
+ } = select(_store.store);
55
+ const _hasOtherEntitiesChanges = hasNonPostEntityChanges();
56
+ return {
57
+ publishSidebarOpened: isPublishSidebarOpened(),
58
+ isPublishable: !isCurrentPostPublished() && isEditedPostPublishable(),
59
+ isDirty: _hasOtherEntitiesChanges || isEditedPostDirty(),
60
+ hasOtherEntitiesChanges: _hasOtherEntitiesChanges
61
+ };
62
+ }, []);
52
63
  const openEntitiesSavedStates = (0, _element.useCallback)(() => setEntitiesSavedStatesCallback(true), []);
53
64
 
54
65
  // It is ok for these components to be unmounted when not in visual use.
@@ -61,26 +72,28 @@ function SavePublishPanels({
61
72
  PrePublishExtension: _pluginPrePublishPanel.default.Slot,
62
73
  PostPublishExtension: _pluginPostPublishPanel.default.Slot
63
74
  });
64
- } else if (hasNonPostEntityChanges || hasPostMetaChanges) {
75
+ } else if (isPublishable && !hasOtherEntitiesChanges) {
65
76
  unmountableContent = /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
66
- className: "editor-layout__toggle-entities-saved-states-panel",
77
+ className: "editor-layout__toggle-publish-panel",
67
78
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
68
79
  variant: "secondary",
69
- className: "editor-layout__toggle-entities-saved-states-panel-button",
70
- onClick: openEntitiesSavedStates,
80
+ className: "editor-layout__toggle-publish-panel-button",
81
+ onClick: togglePublishSidebar,
71
82
  "aria-expanded": false,
72
- children: (0, _i18n.__)('Open save panel')
83
+ children: (0, _i18n.__)('Open publish panel')
73
84
  })
74
85
  });
75
86
  } else {
76
87
  unmountableContent = /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
77
- className: "editor-layout__toggle-publish-panel",
88
+ className: "editor-layout__toggle-entities-saved-states-panel",
78
89
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
79
90
  variant: "secondary",
80
- className: "editor-layout__toggle-publish-panel-button",
81
- onClick: togglePublishSidebar,
91
+ className: "editor-layout__toggle-entities-saved-states-panel-button",
92
+ onClick: openEntitiesSavedStates,
82
93
  "aria-expanded": false,
83
- children: (0, _i18n.__)('Open publish panel')
94
+ disabled: !isDirty,
95
+ accessibleWhenDisabled: true,
96
+ children: (0, _i18n.__)('Open save panel')
84
97
  })
85
98
  });
86
99
  }