@wordpress/editor 13.27.2 → 13.28.1

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 (365) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/bindings/index.js +2 -0
  3. package/build/bindings/index.js.map +1 -1
  4. package/build/bindings/pattern-overrides.js +17 -0
  5. package/build/bindings/pattern-overrides.js.map +1 -0
  6. package/build/bindings/post-meta.js +3 -5
  7. package/build/bindings/post-meta.js.map +1 -1
  8. package/build/components/autocompleters/user.js +1 -2
  9. package/build/components/autocompleters/user.js.map +1 -1
  10. package/build/components/autosave-monitor/index.js +1 -2
  11. package/build/components/autosave-monitor/index.js.map +1 -1
  12. package/build/components/block-manager/category.js +1 -2
  13. package/build/components/block-manager/category.js.map +1 -1
  14. package/build/components/block-manager/checklist.js +1 -2
  15. package/build/components/block-manager/checklist.js.map +1 -1
  16. package/build/components/block-manager/index.js +1 -2
  17. package/build/components/block-manager/index.js.map +1 -1
  18. package/build/components/deprecated.js +52 -104
  19. package/build/components/deprecated.js.map +1 -1
  20. package/build/components/document-bar/index.js +5 -6
  21. package/build/components/document-bar/index.js.map +1 -1
  22. package/build/components/document-outline/check.js +1 -2
  23. package/build/components/document-outline/check.js.map +1 -1
  24. package/build/components/document-outline/index.js +1 -2
  25. package/build/components/document-outline/index.js.map +1 -1
  26. package/build/components/document-outline/item.js +1 -2
  27. package/build/components/document-outline/item.js.map +1 -1
  28. package/build/components/document-tools/index.js +1 -2
  29. package/build/components/document-tools/index.js.map +1 -1
  30. package/build/components/editor-canvas/edit-template-blocks-notification.js +11 -18
  31. package/build/components/editor-canvas/edit-template-blocks-notification.js.map +1 -1
  32. package/build/components/editor-canvas/index.js +28 -16
  33. package/build/components/editor-canvas/index.js.map +1 -1
  34. package/build/components/editor-help/add-blocks.native.js +1 -2
  35. package/build/components/editor-help/add-blocks.native.js.map +1 -1
  36. package/build/components/editor-help/customize-blocks.native.js +1 -2
  37. package/build/components/editor-help/customize-blocks.native.js.map +1 -1
  38. package/build/components/editor-help/help-detail-navigation-screen.native.js +1 -2
  39. package/build/components/editor-help/help-detail-navigation-screen.native.js.map +1 -1
  40. package/build/components/editor-help/help-get-support-button.native.js +1 -2
  41. package/build/components/editor-help/help-get-support-button.native.js.map +1 -1
  42. package/build/components/editor-help/help-section-title.native.js +1 -2
  43. package/build/components/editor-help/help-section-title.native.js.map +1 -1
  44. package/build/components/editor-help/help-topic-row.native.js +1 -2
  45. package/build/components/editor-help/help-topic-row.native.js.map +1 -1
  46. package/build/components/editor-help/icon-move-blocks.native.js +1 -2
  47. package/build/components/editor-help/icon-move-blocks.native.js.map +1 -1
  48. package/build/components/editor-help/index.native.js +1 -2
  49. package/build/components/editor-help/index.native.js.map +1 -1
  50. package/build/components/editor-help/intro-to-blocks.native.js +1 -2
  51. package/build/components/editor-help/intro-to-blocks.native.js.map +1 -1
  52. package/build/components/editor-help/move-blocks.native.js +1 -2
  53. package/build/components/editor-help/move-blocks.native.js.map +1 -1
  54. package/build/components/editor-help/remove-blocks.native.js +1 -2
  55. package/build/components/editor-help/remove-blocks.native.js.map +1 -1
  56. package/build/components/editor-history/redo.js +1 -2
  57. package/build/components/editor-history/redo.js.map +1 -1
  58. package/build/components/editor-history/undo.js +1 -2
  59. package/build/components/editor-history/undo.js.map +1 -1
  60. package/build/components/editor-notices/index.js +1 -2
  61. package/build/components/editor-notices/index.js.map +1 -1
  62. package/build/components/editor-snackbars/index.js +3 -1
  63. package/build/components/editor-snackbars/index.js.map +1 -1
  64. package/build/components/entities-saved-states/entity-record-item.js +1 -1
  65. package/build/components/entities-saved-states/entity-record-item.js.map +1 -1
  66. package/build/components/entities-saved-states/entity-type-list.js +7 -7
  67. package/build/components/entities-saved-states/entity-type-list.js.map +1 -1
  68. package/build/components/entities-saved-states/index.js +4 -1
  69. package/build/components/entities-saved-states/index.js.map +1 -1
  70. package/build/components/error-boundary/index.js +1 -2
  71. package/build/components/error-boundary/index.js.map +1 -1
  72. package/build/components/global-keyboard-shortcuts/register-shortcuts.js +1 -2
  73. package/build/components/global-keyboard-shortcuts/register-shortcuts.js.map +1 -1
  74. package/build/components/index.js +4 -6
  75. package/build/components/index.js.map +1 -1
  76. package/build/components/list-view-sidebar/index.js +43 -36
  77. package/build/components/list-view-sidebar/index.js.map +1 -1
  78. package/build/components/local-autosave-monitor/index.js +1 -2
  79. package/build/components/local-autosave-monitor/index.js.map +1 -1
  80. package/build/components/media-categories/index.js +1 -2
  81. package/build/components/media-categories/index.js.map +1 -1
  82. package/build/components/offline-status/index.native.js +1 -2
  83. package/build/components/offline-status/index.native.js.map +1 -1
  84. package/build/components/page-attributes/check.js +1 -2
  85. package/build/components/page-attributes/check.js.map +1 -1
  86. package/build/components/page-attributes/panel.js +1 -2
  87. package/build/components/page-attributes/panel.js.map +1 -1
  88. package/build/components/page-attributes/parent.js +1 -2
  89. package/build/components/page-attributes/parent.js.map +1 -1
  90. package/build/components/post-author/combobox.js +6 -60
  91. package/build/components/post-author/combobox.js.map +1 -1
  92. package/build/components/post-author/constants.js +7 -5
  93. package/build/components/post-author/constants.js.map +1 -1
  94. package/build/components/post-author/hook.js +72 -0
  95. package/build/components/post-author/hook.js.map +1 -0
  96. package/build/components/post-author/index.js +1 -2
  97. package/build/components/post-author/index.js.map +1 -1
  98. package/build/components/post-author/panel.js +1 -2
  99. package/build/components/post-author/panel.js.map +1 -1
  100. package/build/components/post-author/select.js +6 -24
  101. package/build/components/post-author/select.js.map +1 -1
  102. package/build/components/post-comments/index.js +1 -2
  103. package/build/components/post-comments/index.js.map +1 -1
  104. package/build/components/post-discussion/panel.js +1 -2
  105. package/build/components/post-discussion/panel.js.map +1 -1
  106. package/build/components/post-excerpt/check.js +1 -2
  107. package/build/components/post-excerpt/check.js.map +1 -1
  108. package/build/components/post-excerpt/index.js +1 -2
  109. package/build/components/post-excerpt/index.js.map +1 -1
  110. package/build/components/post-excerpt/plugin.js +1 -2
  111. package/build/components/post-excerpt/plugin.js.map +1 -1
  112. package/build/components/post-featured-image/check.js +1 -2
  113. package/build/components/post-featured-image/check.js.map +1 -1
  114. package/build/components/post-featured-image/index.js +1 -2
  115. package/build/components/post-featured-image/index.js.map +1 -1
  116. package/build/components/post-featured-image/panel.js +1 -2
  117. package/build/components/post-featured-image/panel.js.map +1 -1
  118. package/build/components/post-format/check.js +1 -2
  119. package/build/components/post-format/check.js.map +1 -1
  120. package/build/components/post-format/index.js +1 -2
  121. package/build/components/post-format/index.js.map +1 -1
  122. package/build/components/post-last-revision/check.js +1 -2
  123. package/build/components/post-last-revision/check.js.map +1 -1
  124. package/build/components/post-last-revision/index.js +6 -5
  125. package/build/components/post-last-revision/index.js.map +1 -1
  126. package/build/components/post-last-revision/panel.js +1 -2
  127. package/build/components/post-last-revision/panel.js.map +1 -1
  128. package/build/components/post-panel-row/index.js +1 -2
  129. package/build/components/post-panel-row/index.js.map +1 -1
  130. package/build/components/post-pending-status/check.js +1 -2
  131. package/build/components/post-pending-status/check.js.map +1 -1
  132. package/build/components/post-pending-status/index.js +1 -2
  133. package/build/components/post-pending-status/index.js.map +1 -1
  134. package/build/components/post-pingbacks/index.js +1 -2
  135. package/build/components/post-pingbacks/index.js.map +1 -1
  136. package/build/components/post-publish-button/index.js +1 -2
  137. package/build/components/post-publish-button/index.js.map +1 -1
  138. package/build/components/post-publish-button/label.js +1 -2
  139. package/build/components/post-publish-button/label.js.map +1 -1
  140. package/build/components/post-publish-panel/index.js +1 -2
  141. package/build/components/post-publish-panel/index.js.map +1 -1
  142. package/build/components/post-publish-panel/maybe-category-panel.js +1 -2
  143. package/build/components/post-publish-panel/maybe-category-panel.js.map +1 -1
  144. package/build/components/post-publish-panel/maybe-tags-panel.js +22 -26
  145. package/build/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
  146. package/build/components/post-publish-panel/postpublish.js +1 -2
  147. package/build/components/post-publish-panel/postpublish.js.map +1 -1
  148. package/build/components/post-publish-panel/prepublish.js +1 -2
  149. package/build/components/post-publish-panel/prepublish.js.map +1 -1
  150. package/build/components/post-schedule/index.js +0 -1
  151. package/build/components/post-schedule/index.js.map +1 -1
  152. package/build/components/post-schedule/label.js +1 -1
  153. package/build/components/post-schedule/label.js.map +1 -1
  154. package/build/components/post-schedule/panel.js +1 -0
  155. package/build/components/post-schedule/panel.js.map +1 -1
  156. package/build/components/post-slug/index.js +1 -2
  157. package/build/components/post-slug/index.js.map +1 -1
  158. package/build/components/post-switch-to-draft-button/index.js +1 -0
  159. package/build/components/post-switch-to-draft-button/index.js.map +1 -1
  160. package/build/components/post-sync-status/index.js +1 -1
  161. package/build/components/post-sync-status/index.js.map +1 -1
  162. package/build/components/post-taxonomies/check.js +8 -15
  163. package/build/components/post-taxonomies/check.js.map +1 -1
  164. package/build/components/post-taxonomies/flat-term-selector.js +1 -2
  165. package/build/components/post-taxonomies/flat-term-selector.js.map +1 -1
  166. package/build/components/post-taxonomies/hierarchical-term-selector.js +1 -2
  167. package/build/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
  168. package/build/components/post-taxonomies/index.js +14 -15
  169. package/build/components/post-taxonomies/index.js.map +1 -1
  170. package/build/components/post-taxonomies/panel.js +1 -2
  171. package/build/components/post-taxonomies/panel.js.map +1 -1
  172. package/build/components/post-template/block-theme.js +12 -11
  173. package/build/components/post-template/block-theme.js.map +1 -1
  174. package/build/components/post-template/classic-theme.js +10 -11
  175. package/build/components/post-template/classic-theme.js.map +1 -1
  176. package/build/components/post-template/create-new-template-modal.js +4 -5
  177. package/build/components/post-template/create-new-template-modal.js.map +1 -1
  178. package/build/components/post-template/panel.js +5 -1
  179. package/build/components/post-template/panel.js.map +1 -1
  180. package/build/components/post-title/constants.js +2 -4
  181. package/build/components/post-title/constants.js.map +1 -1
  182. package/build/components/post-title/index.js +2 -3
  183. package/build/components/post-title/index.js.map +1 -1
  184. package/build/components/post-title/index.native.js +1 -2
  185. package/build/components/post-title/index.native.js.map +1 -1
  186. package/build/components/post-title/post-title-raw.js +1 -2
  187. package/build/components/post-title/post-title-raw.js.map +1 -1
  188. package/build/components/post-trash/check.js +1 -2
  189. package/build/components/post-trash/check.js.map +1 -1
  190. package/build/components/post-trash/index.js +1 -0
  191. package/build/components/post-trash/index.js.map +1 -1
  192. package/build/components/post-type-support-check/index.js +1 -2
  193. package/build/components/post-type-support-check/index.js.map +1 -1
  194. package/build/components/post-url/panel.js +1 -0
  195. package/build/components/post-url/panel.js.map +1 -1
  196. package/build/components/post-visibility/utils.js +1 -2
  197. package/build/components/post-visibility/utils.js.map +1 -1
  198. package/build/components/preferences-modal/enable-panel.js +1 -2
  199. package/build/components/preferences-modal/enable-panel.js.map +1 -1
  200. package/build/components/preferences-modal/enable-plugin-document-setting-panel.js +1 -2
  201. package/build/components/preferences-modal/enable-plugin-document-setting-panel.js.map +1 -1
  202. package/build/components/preferences-modal/index.js +0 -1
  203. package/build/components/preferences-modal/index.js.map +1 -1
  204. package/build/components/provider/constants.js +1 -2
  205. package/build/components/provider/constants.js.map +1 -1
  206. package/build/components/provider/index.js +12 -6
  207. package/build/components/provider/index.js.map +1 -1
  208. package/build/components/provider/index.native.js +4 -6
  209. package/build/components/provider/index.native.js.map +1 -1
  210. package/build/components/provider/use-block-editor-settings.js +2 -3
  211. package/build/components/provider/use-block-editor-settings.js.map +1 -1
  212. package/build/components/provider/use-block-editor-settings.native.js +1 -2
  213. package/build/components/provider/use-block-editor-settings.native.js.map +1 -1
  214. package/build/components/provider/with-registry-provider.js +1 -2
  215. package/build/components/provider/with-registry-provider.js.map +1 -1
  216. package/build/components/table-of-contents/index.js +1 -2
  217. package/build/components/table-of-contents/index.js.map +1 -1
  218. package/build/components/table-of-contents/panel.js +1 -2
  219. package/build/components/table-of-contents/panel.js.map +1 -1
  220. package/build/components/template-validation-notice/index.js +1 -2
  221. package/build/components/template-validation-notice/index.js.map +1 -1
  222. package/build/components/theme-support-check/index.js +1 -2
  223. package/build/components/theme-support-check/index.js.map +1 -1
  224. package/build/hooks/pattern-partial-syncing.js +9 -2
  225. package/build/hooks/pattern-partial-syncing.js.map +1 -1
  226. package/build/private-apis.js +1 -2
  227. package/build/private-apis.js.map +1 -1
  228. package/build/store/actions.js +32 -63
  229. package/build/store/actions.js.map +1 -1
  230. package/build/store/constants.js +7 -14
  231. package/build/store/constants.js.map +1 -1
  232. package/build/store/defaults.js +1 -2
  233. package/build/store/defaults.js.map +1 -1
  234. package/build/store/index.js +4 -6
  235. package/build/store/index.js.map +1 -1
  236. package/build/store/private-selectors.js +1 -2
  237. package/build/store/private-selectors.js.map +1 -1
  238. package/build/store/reducer.js +2 -3
  239. package/build/store/reducer.js.map +1 -1
  240. package/build/store/reducer.native.js +2 -4
  241. package/build/store/reducer.native.js.map +1 -1
  242. package/build/store/selectors.js +72 -144
  243. package/build/store/selectors.js.map +1 -1
  244. package/build/store/selectors.native.js +1 -2
  245. package/build/store/selectors.native.js.map +1 -1
  246. package/build-module/bindings/index.js +2 -0
  247. package/build-module/bindings/index.js.map +1 -1
  248. package/build-module/bindings/pattern-overrides.js +11 -0
  249. package/build-module/bindings/pattern-overrides.js.map +1 -0
  250. package/build-module/bindings/post-meta.js +3 -4
  251. package/build-module/bindings/post-meta.js.map +1 -1
  252. package/build-module/components/document-bar/index.js +5 -6
  253. package/build-module/components/document-bar/index.js.map +1 -1
  254. package/build-module/components/editor-canvas/edit-template-blocks-notification.js +11 -18
  255. package/build-module/components/editor-canvas/edit-template-blocks-notification.js.map +1 -1
  256. package/build-module/components/editor-canvas/index.js +27 -14
  257. package/build-module/components/editor-canvas/index.js.map +1 -1
  258. package/build-module/components/editor-snackbars/index.js +4 -1
  259. package/build-module/components/editor-snackbars/index.js.map +1 -1
  260. package/build-module/components/entities-saved-states/entity-record-item.js +1 -1
  261. package/build-module/components/entities-saved-states/entity-record-item.js.map +1 -1
  262. package/build-module/components/entities-saved-states/entity-type-list.js +8 -8
  263. package/build-module/components/entities-saved-states/entity-type-list.js.map +1 -1
  264. package/build-module/components/entities-saved-states/index.js +6 -3
  265. package/build-module/components/entities-saved-states/index.js.map +1 -1
  266. package/build-module/components/list-view-sidebar/index.js +44 -37
  267. package/build-module/components/list-view-sidebar/index.js.map +1 -1
  268. package/build-module/components/post-author/combobox.js +8 -61
  269. package/build-module/components/post-author/combobox.js.map +1 -1
  270. package/build-module/components/post-author/constants.js +5 -2
  271. package/build-module/components/post-author/constants.js.map +1 -1
  272. package/build-module/components/post-author/hook.js +65 -0
  273. package/build-module/components/post-author/hook.js.map +1 -0
  274. package/build-module/components/post-author/select.js +7 -24
  275. package/build-module/components/post-author/select.js.map +1 -1
  276. package/build-module/components/post-last-revision/index.js +6 -4
  277. package/build-module/components/post-last-revision/index.js.map +1 -1
  278. package/build-module/components/post-publish-panel/maybe-tags-panel.js +24 -27
  279. package/build-module/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
  280. package/build-module/components/post-schedule/index.js +0 -1
  281. package/build-module/components/post-schedule/index.js.map +1 -1
  282. package/build-module/components/post-schedule/label.js +1 -1
  283. package/build-module/components/post-schedule/label.js.map +1 -1
  284. package/build-module/components/post-schedule/panel.js +1 -0
  285. package/build-module/components/post-schedule/panel.js.map +1 -1
  286. package/build-module/components/post-switch-to-draft-button/index.js +1 -0
  287. package/build-module/components/post-switch-to-draft-button/index.js.map +1 -1
  288. package/build-module/components/post-sync-status/index.js +1 -1
  289. package/build-module/components/post-sync-status/index.js.map +1 -1
  290. package/build-module/components/post-taxonomies/check.js +9 -14
  291. package/build-module/components/post-taxonomies/check.js.map +1 -1
  292. package/build-module/components/post-taxonomies/index.js +15 -15
  293. package/build-module/components/post-taxonomies/index.js.map +1 -1
  294. package/build-module/components/post-template/block-theme.js +12 -11
  295. package/build-module/components/post-template/block-theme.js.map +1 -1
  296. package/build-module/components/post-template/classic-theme.js +9 -9
  297. package/build-module/components/post-template/classic-theme.js.map +1 -1
  298. package/build-module/components/post-template/create-new-template-modal.js +4 -5
  299. package/build-module/components/post-template/create-new-template-modal.js.map +1 -1
  300. package/build-module/components/post-template/panel.js +5 -1
  301. package/build-module/components/post-template/panel.js.map +1 -1
  302. package/build-module/components/post-title/index.js +1 -2
  303. package/build-module/components/post-title/index.js.map +1 -1
  304. package/build-module/components/post-trash/index.js +1 -0
  305. package/build-module/components/post-trash/index.js.map +1 -1
  306. package/build-module/components/post-url/panel.js +1 -0
  307. package/build-module/components/post-url/panel.js.map +1 -1
  308. package/build-module/components/preferences-modal/index.js +0 -1
  309. package/build-module/components/preferences-modal/index.js.map +1 -1
  310. package/build-module/components/provider/index.js +10 -2
  311. package/build-module/components/provider/index.js.map +1 -1
  312. package/build-module/components/provider/use-block-editor-settings.js +1 -1
  313. package/build-module/components/provider/use-block-editor-settings.js.map +1 -1
  314. package/build-module/components/table-of-contents/panel.js +0 -1
  315. package/build-module/components/table-of-contents/panel.js.map +1 -1
  316. package/build-module/hooks/pattern-partial-syncing.js +9 -2
  317. package/build-module/hooks/pattern-partial-syncing.js.map +1 -1
  318. package/build-module/store/actions.js +1 -1
  319. package/build-module/store/actions.js.map +1 -1
  320. package/build-module/store/reducer.js +1 -1
  321. package/build-module/store/reducer.js.map +1 -1
  322. package/build-style/style-rtl.css +28 -22
  323. package/build-style/style.css +28 -22
  324. package/package.json +32 -32
  325. package/src/bindings/index.js +2 -0
  326. package/src/bindings/pattern-overrides.js +11 -0
  327. package/src/bindings/post-meta.js +2 -3
  328. package/src/components/document-bar/index.js +22 -17
  329. package/src/components/editor-canvas/edit-template-blocks-notification.js +31 -30
  330. package/src/components/editor-canvas/index.js +39 -10
  331. package/src/components/editor-snackbars/index.js +6 -3
  332. package/src/components/entities-saved-states/entity-record-item.js +1 -4
  333. package/src/components/entities-saved-states/entity-type-list.js +8 -8
  334. package/src/components/entities-saved-states/index.js +17 -4
  335. package/src/components/entities-saved-states/style.scss +5 -0
  336. package/src/components/list-view-sidebar/index.js +60 -47
  337. package/src/components/list-view-sidebar/style.scss +20 -20
  338. package/src/components/post-author/combobox.js +5 -61
  339. package/src/components/post-author/constants.js +6 -2
  340. package/src/components/post-author/hook.js +63 -0
  341. package/src/components/post-author/select.js +5 -25
  342. package/src/components/post-last-revision/index.js +6 -6
  343. package/src/components/post-last-revision/style.scss +3 -6
  344. package/src/components/post-panel-row/style.scss +3 -3
  345. package/src/components/post-publish-panel/maybe-tags-panel.js +27 -37
  346. package/src/components/post-publish-panel/style.scss +3 -1
  347. package/src/components/post-schedule/label.js +1 -1
  348. package/src/components/post-schedule/panel.js +1 -0
  349. package/src/components/post-schedule/test/label.js +19 -7
  350. package/src/components/post-switch-to-draft-button/index.js +1 -0
  351. package/src/components/post-sync-status/index.js +8 -2
  352. package/src/components/post-taxonomies/check.js +11 -15
  353. package/src/components/post-taxonomies/index.js +15 -22
  354. package/src/components/post-taxonomies/test/index.js +37 -51
  355. package/src/components/post-template/block-theme.js +29 -22
  356. package/src/components/post-template/classic-theme.js +10 -13
  357. package/src/components/post-template/create-new-template-modal.js +7 -9
  358. package/src/components/post-template/panel.js +5 -1
  359. package/src/components/post-trash/index.js +1 -0
  360. package/src/components/post-url/panel.js +1 -0
  361. package/src/components/provider/index.js +22 -2
  362. package/src/components/provider/use-block-editor-settings.js +1 -1
  363. package/src/hooks/pattern-partial-syncing.js +23 -4
  364. package/src/store/actions.js +1 -1
  365. package/src/store/reducer.js +1 -1
@@ -1 +1 @@
1
- {"version":3,"names":["combineReducers","EDITOR_SETTINGS_DEFAULTS","getPostRawValue","value","raw","hasSameKeys","a","b","keysA","Object","keys","sort","keysB","length","every","key","index","isUpdatingSamePostProperty","action","previousAction","type","edits","shouldOverwriteState","shouldCreateUndoLevel","postId","state","templateId","id","postType","template","isValid","saving","pending","options","deleting","postLock","isLocked","lock","postSavingLock","lockName","removedLockName","restState","postAutosavingLock","editorSettings","settings","renderingMode","mode","deviceType","removedPanels","includes","panelName","blockInserterPanel","isOpen","listViewPanel","listViewToggleRef","current"],"sources":["@wordpress/editor/src/store/reducer.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { combineReducers } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { EDITOR_SETTINGS_DEFAULTS } from './defaults';\n\n/**\n * Returns a post attribute value, flattening nested rendered content using its\n * raw value in place of its original object form.\n *\n * @param {*} value Original value.\n *\n * @return {*} Raw value.\n */\nexport function getPostRawValue( value ) {\n\tif ( value && 'object' === typeof value && 'raw' in value ) {\n\t\treturn value.raw;\n\t}\n\n\treturn value;\n}\n\n/**\n * Returns true if the two object arguments have the same keys, or false\n * otherwise.\n *\n * @param {Object} a First object.\n * @param {Object} b Second object.\n *\n * @return {boolean} Whether the two objects have the same keys.\n */\nexport function hasSameKeys( a, b ) {\n\tconst keysA = Object.keys( a ).sort();\n\tconst keysB = Object.keys( b ).sort();\n\treturn (\n\t\tkeysA.length === keysB.length &&\n\t\tkeysA.every( ( key, index ) => keysB[ index ] === key )\n\t);\n}\n\n/**\n * Returns true if, given the currently dispatching action and the previously\n * dispatched action, the two actions are editing the same post property, or\n * false otherwise.\n *\n * @param {Object} action Currently dispatching action.\n * @param {Object} previousAction Previously dispatched action.\n *\n * @return {boolean} Whether actions are updating the same post property.\n */\nexport function isUpdatingSamePostProperty( action, previousAction ) {\n\treturn (\n\t\taction.type === 'EDIT_POST' &&\n\t\thasSameKeys( action.edits, previousAction.edits )\n\t);\n}\n\n/**\n * Returns true if, given the currently dispatching action and the previously\n * dispatched action, the two actions are modifying the same property such that\n * undo history should be batched.\n *\n * @param {Object} action Currently dispatching action.\n * @param {Object} previousAction Previously dispatched action.\n *\n * @return {boolean} Whether to overwrite present state.\n */\nexport function shouldOverwriteState( action, previousAction ) {\n\tif ( action.type === 'RESET_EDITOR_BLOCKS' ) {\n\t\treturn ! action.shouldCreateUndoLevel;\n\t}\n\n\tif ( ! previousAction || action.type !== previousAction.type ) {\n\t\treturn false;\n\t}\n\n\treturn isUpdatingSamePostProperty( action, previousAction );\n}\n\nexport function postId( state = null, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_EDITED_POST':\n\t\t\treturn action.postId;\n\t}\n\n\treturn state;\n}\n\nexport function templateId( state = null, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_CURRENT_TEMPLATE_ID':\n\t\t\treturn action.id;\n\t}\n\n\treturn state;\n}\n\nexport function postType( state = null, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_EDITED_POST':\n\t\t\treturn action.postType;\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer returning whether the post blocks match the defined template or not.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {boolean} Updated state.\n */\nexport function template( state = { isValid: true }, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_TEMPLATE_VALIDITY':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tisValid: action.isValid,\n\t\t\t};\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer returning current network request state (whether a request to\n * the WP REST API is in progress, successful, or failed).\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function saving( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'REQUEST_POST_UPDATE_START':\n\t\tcase 'REQUEST_POST_UPDATE_FINISH':\n\t\t\treturn {\n\t\t\t\tpending: action.type === 'REQUEST_POST_UPDATE_START',\n\t\t\t\toptions: action.options || {},\n\t\t\t};\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer returning deleting post request state.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function deleting( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'REQUEST_POST_DELETE_START':\n\t\tcase 'REQUEST_POST_DELETE_FINISH':\n\t\t\treturn {\n\t\t\t\tpending: action.type === 'REQUEST_POST_DELETE_START',\n\t\t\t};\n\t}\n\n\treturn state;\n}\n\n/**\n * Post Lock State.\n *\n * @typedef {Object} PostLockState\n *\n * @property {boolean} isLocked Whether the post is locked.\n * @property {?boolean} isTakeover Whether the post editing has been taken over.\n * @property {?boolean} activePostLock Active post lock value.\n * @property {?Object} user User that took over the post.\n */\n\n/**\n * Reducer returning the post lock status.\n *\n * @param {PostLockState} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {PostLockState} Updated state.\n */\nexport function postLock( state = { isLocked: false }, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'UPDATE_POST_LOCK':\n\t\t\treturn action.lock;\n\t}\n\n\treturn state;\n}\n\n/**\n * Post saving lock.\n *\n * When post saving is locked, the post cannot be published or updated.\n *\n * @param {PostLockState} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {PostLockState} Updated state.\n */\nexport function postSavingLock( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'LOCK_POST_SAVING':\n\t\t\treturn { ...state, [ action.lockName ]: true };\n\n\t\tcase 'UNLOCK_POST_SAVING': {\n\t\t\tconst { [ action.lockName ]: removedLockName, ...restState } =\n\t\t\t\tstate;\n\t\t\treturn restState;\n\t\t}\n\t}\n\treturn state;\n}\n\n/**\n * Post autosaving lock.\n *\n * When post autosaving is locked, the post will not autosave.\n *\n * @param {PostLockState} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {PostLockState} Updated state.\n */\nexport function postAutosavingLock( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'LOCK_POST_AUTOSAVING':\n\t\t\treturn { ...state, [ action.lockName ]: true };\n\n\t\tcase 'UNLOCK_POST_AUTOSAVING': {\n\t\t\tconst { [ action.lockName ]: removedLockName, ...restState } =\n\t\t\t\tstate;\n\t\t\treturn restState;\n\t\t}\n\t}\n\treturn state;\n}\n\n/**\n * Reducer returning the post editor setting.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function editorSettings( state = EDITOR_SETTINGS_DEFAULTS, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'UPDATE_EDITOR_SETTINGS':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t...action.settings,\n\t\t\t};\n\t}\n\n\treturn state;\n}\n\nexport function renderingMode( state = 'all', action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_RENDERING_MODE':\n\t\t\treturn action.mode;\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer returning the editing canvas device type.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function deviceType( state = 'Desktop', action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_DEVICE_TYPE':\n\t\t\treturn action.deviceType;\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer storing the list of all programmatically removed panels.\n *\n * @param {Array} state Current state.\n * @param {Object} action Action object.\n *\n * @return {Array} Updated state.\n */\nexport function removedPanels( state = [], action ) {\n\tswitch ( action.type ) {\n\t\tcase 'REMOVE_PANEL':\n\t\t\tif ( ! state.includes( action.panelName ) ) {\n\t\t\t\treturn [ ...state, action.panelName ];\n\t\t\t}\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer to set the block inserter panel open or closed.\n *\n * Note: this reducer interacts with the list view panel reducer\n * to make sure that only one of the two panels is open at the same time.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n */\nexport function blockInserterPanel( state = false, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_IS_LIST_VIEW_OPENED':\n\t\t\treturn action.isOpen ? false : state;\n\t\tcase 'SET_IS_INSERTER_OPENED':\n\t\t\treturn action.value;\n\t}\n\treturn state;\n}\n\n/**\n * Reducer to set the list view panel open or closed.\n *\n * Note: this reducer interacts with the inserter panel reducer\n * to make sure that only one of the two panels is open at the same time.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n */\nexport function listViewPanel( state = false, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_IS_INSERTER_OPENED':\n\t\t\treturn action.value ? false : state;\n\t\tcase 'SET_IS_LIST_VIEW_OPENED':\n\t\t\treturn action.isOpen;\n\t}\n\treturn state;\n}\n\n/**\n * This reducer does nothing aside initializing a ref to the list view toggle.\n * We will have a unique ref per \"editor\" instance.\n *\n * @param {Object} state\n * @return {Object} Reference to the list view toggle button.\n */\nexport function listViewToggleRef( state = { current: null } ) {\n\treturn state;\n}\n\nexport default combineReducers( {\n\tpostId,\n\tpostType,\n\ttemplateId,\n\tsaving,\n\tdeleting,\n\tpostLock,\n\ttemplate,\n\tpostSavingLock,\n\teditorSettings,\n\tpostAutosavingLock,\n\trenderingMode,\n\tdeviceType,\n\tremovedPanels,\n\tblockInserterPanel,\n\tlistViewPanel,\n\tlistViewToggleRef,\n} );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,eAAe,QAAQ,iBAAiB;;AAEjD;AACA;AACA;AACA,SAASC,wBAAwB,QAAQ,YAAY;;AAErD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,eAAeA,CAAEC,KAAK,EAAG;EACxC,IAAKA,KAAK,IAAI,QAAQ,KAAK,OAAOA,KAAK,IAAI,KAAK,IAAIA,KAAK,EAAG;IAC3D,OAAOA,KAAK,CAACC,GAAG;EACjB;EAEA,OAAOD,KAAK;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASE,WAAWA,CAAEC,CAAC,EAAEC,CAAC,EAAG;EACnC,MAAMC,KAAK,GAAGC,MAAM,CAACC,IAAI,CAAEJ,CAAE,CAAC,CAACK,IAAI,CAAC,CAAC;EACrC,MAAMC,KAAK,GAAGH,MAAM,CAACC,IAAI,CAAEH,CAAE,CAAC,CAACI,IAAI,CAAC,CAAC;EACrC,OACCH,KAAK,CAACK,MAAM,KAAKD,KAAK,CAACC,MAAM,IAC7BL,KAAK,CAACM,KAAK,CAAE,CAAEC,GAAG,EAAEC,KAAK,KAAMJ,KAAK,CAAEI,KAAK,CAAE,KAAKD,GAAI,CAAC;AAEzD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASE,0BAA0BA,CAAEC,MA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E8B,OAAO,EAAE;AAAK,CAAC,EAAG;EAC9D,OAAO9B,KAAK;AACb;AAEA,eAAezB,eAAe,CAAE;EAC/BwB,MAAM;EACNI,QAAQ;EACRF,UAAU;EACVK,MAAM;EACNG,QAAQ;EACRC,QAAQ;EACRN,QAAQ;EACRS,cAAc;EACdK,cAAc;EACdD,kBAAkB;EAClBG,aAAa;EACbE,UAAU;EACVC,aAAa;EACbG,kBAAkB;EAClBE,aAAa;EACbC;AACD,CAAE,CAAC"}
1
+ {"version":3,"names":["combineReducers","EDITOR_SETTINGS_DEFAULTS","getPostRawValue","value","raw","hasSameKeys","a","b","keysA","Object","keys","sort","keysB","length","every","key","index","isUpdatingSamePostProperty","action","previousAction","type","edits","shouldOverwriteState","shouldCreateUndoLevel","postId","state","templateId","id","postType","template","isValid","saving","pending","options","deleting","postLock","isLocked","lock","postSavingLock","lockName","removedLockName","restState","postAutosavingLock","editorSettings","settings","renderingMode","mode","deviceType","removedPanels","includes","panelName","blockInserterPanel","isOpen","listViewPanel","listViewToggleRef","current"],"sources":["@wordpress/editor/src/store/reducer.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { combineReducers } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { EDITOR_SETTINGS_DEFAULTS } from './defaults';\n\n/**\n * Returns a post attribute value, flattening nested rendered content using its\n * raw value in place of its original object form.\n *\n * @param {*} value Original value.\n *\n * @return {*} Raw value.\n */\nexport function getPostRawValue( value ) {\n\tif ( value && 'object' === typeof value && 'raw' in value ) {\n\t\treturn value.raw;\n\t}\n\n\treturn value;\n}\n\n/**\n * Returns true if the two object arguments have the same keys, or false\n * otherwise.\n *\n * @param {Object} a First object.\n * @param {Object} b Second object.\n *\n * @return {boolean} Whether the two objects have the same keys.\n */\nexport function hasSameKeys( a, b ) {\n\tconst keysA = Object.keys( a ).sort();\n\tconst keysB = Object.keys( b ).sort();\n\treturn (\n\t\tkeysA.length === keysB.length &&\n\t\tkeysA.every( ( key, index ) => keysB[ index ] === key )\n\t);\n}\n\n/**\n * Returns true if, given the currently dispatching action and the previously\n * dispatched action, the two actions are editing the same post property, or\n * false otherwise.\n *\n * @param {Object} action Currently dispatching action.\n * @param {Object} previousAction Previously dispatched action.\n *\n * @return {boolean} Whether actions are updating the same post property.\n */\nexport function isUpdatingSamePostProperty( action, previousAction ) {\n\treturn (\n\t\taction.type === 'EDIT_POST' &&\n\t\thasSameKeys( action.edits, previousAction.edits )\n\t);\n}\n\n/**\n * Returns true if, given the currently dispatching action and the previously\n * dispatched action, the two actions are modifying the same property such that\n * undo history should be batched.\n *\n * @param {Object} action Currently dispatching action.\n * @param {Object} previousAction Previously dispatched action.\n *\n * @return {boolean} Whether to overwrite present state.\n */\nexport function shouldOverwriteState( action, previousAction ) {\n\tif ( action.type === 'RESET_EDITOR_BLOCKS' ) {\n\t\treturn ! action.shouldCreateUndoLevel;\n\t}\n\n\tif ( ! previousAction || action.type !== previousAction.type ) {\n\t\treturn false;\n\t}\n\n\treturn isUpdatingSamePostProperty( action, previousAction );\n}\n\nexport function postId( state = null, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_EDITED_POST':\n\t\t\treturn action.postId;\n\t}\n\n\treturn state;\n}\n\nexport function templateId( state = null, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_CURRENT_TEMPLATE_ID':\n\t\t\treturn action.id;\n\t}\n\n\treturn state;\n}\n\nexport function postType( state = null, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_EDITED_POST':\n\t\t\treturn action.postType;\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer returning whether the post blocks match the defined template or not.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {boolean} Updated state.\n */\nexport function template( state = { isValid: true }, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_TEMPLATE_VALIDITY':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tisValid: action.isValid,\n\t\t\t};\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer returning current network request state (whether a request to\n * the WP REST API is in progress, successful, or failed).\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function saving( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'REQUEST_POST_UPDATE_START':\n\t\tcase 'REQUEST_POST_UPDATE_FINISH':\n\t\t\treturn {\n\t\t\t\tpending: action.type === 'REQUEST_POST_UPDATE_START',\n\t\t\t\toptions: action.options || {},\n\t\t\t};\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer returning deleting post request state.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function deleting( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'REQUEST_POST_DELETE_START':\n\t\tcase 'REQUEST_POST_DELETE_FINISH':\n\t\t\treturn {\n\t\t\t\tpending: action.type === 'REQUEST_POST_DELETE_START',\n\t\t\t};\n\t}\n\n\treturn state;\n}\n\n/**\n * Post Lock State.\n *\n * @typedef {Object} PostLockState\n *\n * @property {boolean} isLocked Whether the post is locked.\n * @property {?boolean} isTakeover Whether the post editing has been taken over.\n * @property {?boolean} activePostLock Active post lock value.\n * @property {?Object} user User that took over the post.\n */\n\n/**\n * Reducer returning the post lock status.\n *\n * @param {PostLockState} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {PostLockState} Updated state.\n */\nexport function postLock( state = { isLocked: false }, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'UPDATE_POST_LOCK':\n\t\t\treturn action.lock;\n\t}\n\n\treturn state;\n}\n\n/**\n * Post saving lock.\n *\n * When post saving is locked, the post cannot be published or updated.\n *\n * @param {PostLockState} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {PostLockState} Updated state.\n */\nexport function postSavingLock( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'LOCK_POST_SAVING':\n\t\t\treturn { ...state, [ action.lockName ]: true };\n\n\t\tcase 'UNLOCK_POST_SAVING': {\n\t\t\tconst { [ action.lockName ]: removedLockName, ...restState } =\n\t\t\t\tstate;\n\t\t\treturn restState;\n\t\t}\n\t}\n\treturn state;\n}\n\n/**\n * Post autosaving lock.\n *\n * When post autosaving is locked, the post will not autosave.\n *\n * @param {PostLockState} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {PostLockState} Updated state.\n */\nexport function postAutosavingLock( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'LOCK_POST_AUTOSAVING':\n\t\t\treturn { ...state, [ action.lockName ]: true };\n\n\t\tcase 'UNLOCK_POST_AUTOSAVING': {\n\t\t\tconst { [ action.lockName ]: removedLockName, ...restState } =\n\t\t\t\tstate;\n\t\t\treturn restState;\n\t\t}\n\t}\n\treturn state;\n}\n\n/**\n * Reducer returning the post editor setting.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function editorSettings( state = EDITOR_SETTINGS_DEFAULTS, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'UPDATE_EDITOR_SETTINGS':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t...action.settings,\n\t\t\t};\n\t}\n\n\treturn state;\n}\n\nexport function renderingMode( state = 'post-only', action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_RENDERING_MODE':\n\t\t\treturn action.mode;\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer returning the editing canvas device type.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function deviceType( state = 'Desktop', action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_DEVICE_TYPE':\n\t\t\treturn action.deviceType;\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer storing the list of all programmatically removed panels.\n *\n * @param {Array} state Current state.\n * @param {Object} action Action object.\n *\n * @return {Array} Updated state.\n */\nexport function removedPanels( state = [], action ) {\n\tswitch ( action.type ) {\n\t\tcase 'REMOVE_PANEL':\n\t\t\tif ( ! state.includes( action.panelName ) ) {\n\t\t\t\treturn [ ...state, action.panelName ];\n\t\t\t}\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer to set the block inserter panel open or closed.\n *\n * Note: this reducer interacts with the list view panel reducer\n * to make sure that only one of the two panels is open at the same time.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n */\nexport function blockInserterPanel( state = false, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_IS_LIST_VIEW_OPENED':\n\t\t\treturn action.isOpen ? false : state;\n\t\tcase 'SET_IS_INSERTER_OPENED':\n\t\t\treturn action.value;\n\t}\n\treturn state;\n}\n\n/**\n * Reducer to set the list view panel open or closed.\n *\n * Note: this reducer interacts with the inserter panel reducer\n * to make sure that only one of the two panels is open at the same time.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n */\nexport function listViewPanel( state = false, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_IS_INSERTER_OPENED':\n\t\t\treturn action.value ? false : state;\n\t\tcase 'SET_IS_LIST_VIEW_OPENED':\n\t\t\treturn action.isOpen;\n\t}\n\treturn state;\n}\n\n/**\n * This reducer does nothing aside initializing a ref to the list view toggle.\n * We will have a unique ref per \"editor\" instance.\n *\n * @param {Object} state\n * @return {Object} Reference to the list view toggle button.\n */\nexport function listViewToggleRef( state = { current: null } ) {\n\treturn state;\n}\n\nexport default combineReducers( {\n\tpostId,\n\tpostType,\n\ttemplateId,\n\tsaving,\n\tdeleting,\n\tpostLock,\n\ttemplate,\n\tpostSavingLock,\n\teditorSettings,\n\tpostAutosavingLock,\n\trenderingMode,\n\tdeviceType,\n\tremovedPanels,\n\tblockInserterPanel,\n\tlistViewPanel,\n\tlistViewToggleRef,\n} );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,eAAe,QAAQ,iBAAiB;;AAEjD;AACA;AACA;AACA,SAASC,wBAAwB,QAAQ,YAAY;;AAErD;AACA;A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CAAE;MACtC;EACF;EAEA,OAAOzB,KAAK;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAAS0B,kBAAkBA,CAAE1B,KAAK,GAAG,KAAK,EAAEP,MAAM,EAAG;EAC3D,QAASA,MAAM,CAACE,IAAI;IACnB,KAAK,yBAAyB;MAC7B,OAAOF,MAAM,CAACkC,MAAM,GAAG,KAAK,GAAG3B,KAAK;IACrC,KAAK,wBAAwB;MAC5B,OAAOP,MAAM,CAACf,KAAK;EACrB;EACA,OAAOsB,KAAK;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAAS4B,aAAaA,CAAE5B,KAAK,GAAG,KAAK,EAAEP,MAAM,EAAG;EACtD,QAASA,MAAM,CAACE,IAAI;IACnB,KAAK,wBAAwB;MAC5B,OAAOF,MAAM,CAACf,KAAK,GAAG,KAAK,GAAGsB,KAAK;IACpC,KAAK,yBAAyB;MAC7B,OAAOP,MAAM,CAACkC,MAAM;EACtB;EACA,OAAO3B,KAAK;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAAS6B,iBAAiBA,CAAE7B,KAAK,GAAG;EAAE8B,OAAO,EAAE;AAAK,CAAC,EAAG;EAC9D,OAAO9B,KAAK;AACb;AAEA,eAAezB,eAAe,CAAE;EAC/BwB,MAAM;EACNI,QAAQ;EACRF,UAAU;EACVK,MAAM;EACNG,QAAQ;EACRC,QAAQ;EACRN,QAAQ;EACRS,cAAc;EACdK,cAAc;EACdD,kBAAkB;EAClBG,aAAa;EACbE,UAAU;EACVC,aAAa;EACbG,kBAAkB;EAClBE,aAAa;EACbC;AACD,CAAE,CAAC"}
@@ -562,6 +562,11 @@
562
562
  font-size: 13px;
563
563
  }
564
564
 
565
+ .entities-saved-states__change-summary {
566
+ color: #757575;
567
+ font-size: 12px;
568
+ }
569
+
565
570
  .editor-error-boundary {
566
571
  margin: auto;
567
572
  max-width: 780px;
@@ -608,25 +613,28 @@
608
613
  width: 350px;
609
614
  }
610
615
  }
616
+ .editor-list-view-sidebar .edit-post-editor__document-overview-panel__header {
617
+ display: flex;
618
+ border-bottom: 1px solid #ddd;
619
+ }
611
620
  .editor-list-view-sidebar .editor-list-view-sidebar__close-button {
612
- position: absolute;
613
- left: 8px;
614
- top: 6px;
615
- z-index: 1;
616
621
  background: #fff;
622
+ order: 1;
623
+ align-self: center;
624
+ margin-left: 8px;
617
625
  }
618
- .editor-list-view-sidebar .components-tab-panel__tabs {
619
- border-bottom: 1px solid #ddd;
626
+
627
+ .editor-list-view-sidebar__tabs-tablist {
620
628
  box-sizing: border-box;
621
- display: flex;
622
- width: 100%;
623
- padding-left: 56px;
629
+ flex-grow: 1;
624
630
  }
625
- .editor-list-view-sidebar .components-tab-panel__tabs .editor-list-view-sidebar__panel-tab {
631
+
632
+ .editor-list-view-sidebar__tabs-tab {
626
633
  width: 50%;
627
634
  margin-bottom: -1px;
628
635
  }
629
- .editor-list-view-sidebar .components-tab-panel__tab-content {
636
+
637
+ .editor-list-view-sidebar__tabs-tabpanel {
630
638
  height: calc(100% - 47px);
631
639
  }
632
640
 
@@ -806,19 +814,17 @@
806
814
 
807
815
  .editor-post-last-revision__title {
808
816
  width: 100%;
809
- font-weight: 600;
810
- }
811
- .editor-post-last-revision__title .dashicon {
812
- margin-left: 5px;
817
+ font-weight: 500;
813
818
  }
814
819
 
815
- .components-button.editor-post-last-revision__title {
820
+ .editor-post-last-revision__title.components-button.has-icon {
816
821
  height: 100%;
822
+ justify-content: space-between;
817
823
  }
818
- .components-button.editor-post-last-revision__title:hover, .components-button.editor-post-last-revision__title:active {
824
+ .editor-post-last-revision__title.components-button.has-icon:hover, .editor-post-last-revision__title.components-button.has-icon:active {
819
825
  background: #f0f0f0;
820
826
  }
821
- .components-button.editor-post-last-revision__title:focus {
827
+ .editor-post-last-revision__title.components-button.has-icon:focus {
822
828
  box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
823
829
  border-radius: 0;
824
830
  }
@@ -843,7 +849,7 @@
843
849
 
844
850
  .editor-post-panel__row {
845
851
  width: 100%;
846
- min-height: 36px;
852
+ min-height: 40px;
847
853
  justify-content: flex-start !important;
848
854
  align-items: flex-start !important;
849
855
  }
@@ -851,14 +857,14 @@
851
857
  .editor-post-panel__row-label {
852
858
  width: 30%;
853
859
  flex-shrink: 0;
854
- min-height: 36px;
860
+ min-height: 40px;
855
861
  display: flex;
856
862
  align-items: center;
857
863
  }
858
864
 
859
865
  .editor-post-panel__row-control {
860
866
  flex-grow: 1;
861
- min-height: 36px;
867
+ min-height: 40px;
862
868
  display: flex;
863
869
  align-items: center;
864
870
  }
@@ -1014,7 +1020,7 @@
1014
1020
  flex: 1;
1015
1021
  }
1016
1022
  .post-publish-panel__postpublish-post-address-container input[readonly] {
1017
- padding: 16px;
1023
+ padding: 12px;
1018
1024
  background: #f0f0f0;
1019
1025
  border-color: #ccc;
1020
1026
  overflow: hidden;
@@ -562,6 +562,11 @@
562
562
  font-size: 13px;
563
563
  }
564
564
 
565
+ .entities-saved-states__change-summary {
566
+ color: #757575;
567
+ font-size: 12px;
568
+ }
569
+
565
570
  .editor-error-boundary {
566
571
  margin: auto;
567
572
  max-width: 780px;
@@ -608,25 +613,28 @@
608
613
  width: 350px;
609
614
  }
610
615
  }
616
+ .editor-list-view-sidebar .edit-post-editor__document-overview-panel__header {
617
+ display: flex;
618
+ border-bottom: 1px solid #ddd;
619
+ }
611
620
  .editor-list-view-sidebar .editor-list-view-sidebar__close-button {
612
- position: absolute;
613
- right: 8px;
614
- top: 6px;
615
- z-index: 1;
616
621
  background: #fff;
622
+ order: 1;
623
+ align-self: center;
624
+ margin-right: 8px;
617
625
  }
618
- .editor-list-view-sidebar .components-tab-panel__tabs {
619
- border-bottom: 1px solid #ddd;
626
+
627
+ .editor-list-view-sidebar__tabs-tablist {
620
628
  box-sizing: border-box;
621
- display: flex;
622
- width: 100%;
623
- padding-right: 56px;
629
+ flex-grow: 1;
624
630
  }
625
- .editor-list-view-sidebar .components-tab-panel__tabs .editor-list-view-sidebar__panel-tab {
631
+
632
+ .editor-list-view-sidebar__tabs-tab {
626
633
  width: 50%;
627
634
  margin-bottom: -1px;
628
635
  }
629
- .editor-list-view-sidebar .components-tab-panel__tab-content {
636
+
637
+ .editor-list-view-sidebar__tabs-tabpanel {
630
638
  height: calc(100% - 47px);
631
639
  }
632
640
 
@@ -806,19 +814,17 @@
806
814
 
807
815
  .editor-post-last-revision__title {
808
816
  width: 100%;
809
- font-weight: 600;
810
- }
811
- .editor-post-last-revision__title .dashicon {
812
- margin-right: 5px;
817
+ font-weight: 500;
813
818
  }
814
819
 
815
- .components-button.editor-post-last-revision__title {
820
+ .editor-post-last-revision__title.components-button.has-icon {
816
821
  height: 100%;
822
+ justify-content: space-between;
817
823
  }
818
- .components-button.editor-post-last-revision__title:hover, .components-button.editor-post-last-revision__title:active {
824
+ .editor-post-last-revision__title.components-button.has-icon:hover, .editor-post-last-revision__title.components-button.has-icon:active {
819
825
  background: #f0f0f0;
820
826
  }
821
- .components-button.editor-post-last-revision__title:focus {
827
+ .editor-post-last-revision__title.components-button.has-icon:focus {
822
828
  box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
823
829
  border-radius: 0;
824
830
  }
@@ -843,7 +849,7 @@
843
849
 
844
850
  .editor-post-panel__row {
845
851
  width: 100%;
846
- min-height: 36px;
852
+ min-height: 40px;
847
853
  justify-content: flex-start !important;
848
854
  align-items: flex-start !important;
849
855
  }
@@ -851,14 +857,14 @@
851
857
  .editor-post-panel__row-label {
852
858
  width: 30%;
853
859
  flex-shrink: 0;
854
- min-height: 36px;
860
+ min-height: 40px;
855
861
  display: flex;
856
862
  align-items: center;
857
863
  }
858
864
 
859
865
  .editor-post-panel__row-control {
860
866
  flex-grow: 1;
861
- min-height: 36px;
867
+ min-height: 40px;
862
868
  display: flex;
863
869
  align-items: center;
864
870
  }
@@ -1014,7 +1020,7 @@
1014
1020
  flex: 1;
1015
1021
  }
1016
1022
  .post-publish-panel__postpublish-post-address-container input[readonly] {
1017
- padding: 16px;
1023
+ padding: 12px;
1018
1024
  background: #f0f0f0;
1019
1025
  border-color: #ccc;
1020
1026
  overflow: hidden;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/editor",
3
- "version": "13.27.2",
3
+ "version": "13.28.1",
4
4
  "description": "Enhanced block editor for WordPress posts.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -31,36 +31,36 @@
31
31
  ],
32
32
  "dependencies": {
33
33
  "@babel/runtime": "^7.16.0",
34
- "@wordpress/a11y": "^3.50.0",
35
- "@wordpress/api-fetch": "^6.47.0",
36
- "@wordpress/blob": "^3.50.0",
37
- "@wordpress/block-editor": "^12.18.2",
38
- "@wordpress/blocks": "^12.27.1",
39
- "@wordpress/commands": "^0.21.0",
40
- "@wordpress/components": "^25.16.0",
41
- "@wordpress/compose": "^6.27.0",
42
- "@wordpress/core-data": "^6.27.2",
43
- "@wordpress/data": "^9.20.0",
44
- "@wordpress/date": "^4.50.0",
45
- "@wordpress/deprecated": "^3.50.0",
46
- "@wordpress/dom": "^3.50.0",
47
- "@wordpress/element": "^5.27.0",
48
- "@wordpress/hooks": "^3.50.0",
49
- "@wordpress/html-entities": "^3.50.0",
50
- "@wordpress/i18n": "^4.50.0",
51
- "@wordpress/icons": "^9.41.0",
52
- "@wordpress/keyboard-shortcuts": "^4.27.0",
53
- "@wordpress/keycodes": "^3.50.0",
54
- "@wordpress/media-utils": "^4.41.0",
55
- "@wordpress/notices": "^4.18.0",
56
- "@wordpress/patterns": "^1.11.2",
57
- "@wordpress/preferences": "^3.27.0",
58
- "@wordpress/private-apis": "^0.32.0",
59
- "@wordpress/reusable-blocks": "^4.27.2",
60
- "@wordpress/rich-text": "^6.27.0",
61
- "@wordpress/server-side-render": "^4.27.1",
62
- "@wordpress/url": "^3.51.0",
63
- "@wordpress/wordcount": "^3.50.0",
34
+ "@wordpress/a11y": "^3.51.0",
35
+ "@wordpress/api-fetch": "^6.48.0",
36
+ "@wordpress/blob": "^3.51.0",
37
+ "@wordpress/block-editor": "^12.19.1",
38
+ "@wordpress/blocks": "^12.28.1",
39
+ "@wordpress/commands": "^0.22.1",
40
+ "@wordpress/components": "^26.0.1",
41
+ "@wordpress/compose": "^6.28.0",
42
+ "@wordpress/core-data": "^6.28.1",
43
+ "@wordpress/data": "^9.21.0",
44
+ "@wordpress/date": "^4.51.0",
45
+ "@wordpress/deprecated": "^3.51.0",
46
+ "@wordpress/dom": "^3.51.0",
47
+ "@wordpress/element": "^5.28.0",
48
+ "@wordpress/hooks": "^3.51.0",
49
+ "@wordpress/html-entities": "^3.51.0",
50
+ "@wordpress/i18n": "^4.51.0",
51
+ "@wordpress/icons": "^9.42.0",
52
+ "@wordpress/keyboard-shortcuts": "^4.28.0",
53
+ "@wordpress/keycodes": "^3.51.0",
54
+ "@wordpress/media-utils": "^4.42.0",
55
+ "@wordpress/notices": "^4.19.0",
56
+ "@wordpress/patterns": "^1.12.1",
57
+ "@wordpress/preferences": "^3.28.1",
58
+ "@wordpress/private-apis": "^0.33.0",
59
+ "@wordpress/reusable-blocks": "^4.28.1",
60
+ "@wordpress/rich-text": "^6.28.1",
61
+ "@wordpress/server-side-render": "^4.28.1",
62
+ "@wordpress/url": "^3.52.0",
63
+ "@wordpress/wordcount": "^3.51.0",
64
64
  "classnames": "^2.3.1",
65
65
  "date-fns": "^2.28.0",
66
66
  "memize": "^2.1.0",
@@ -75,5 +75,5 @@
75
75
  "publishConfig": {
76
76
  "access": "public"
77
77
  },
78
- "gitHead": "fefb6f718fbfd5df9390f366d5733369f613084a"
78
+ "gitHead": "5902fc0f490528da6965dd4cf97f11192bcf5956"
79
79
  }
@@ -7,7 +7,9 @@ import { dispatch } from '@wordpress/data';
7
7
  * Internal dependencies
8
8
  */
9
9
  import { unlock } from '../lock-unlock';
10
+ import patternOverrides from './pattern-overrides';
10
11
  import postMeta from './post-meta';
11
12
 
12
13
  const { registerBlockBindingsSource } = unlock( dispatch( blockEditorStore ) );
14
+ registerBlockBindingsSource( patternOverrides );
13
15
  registerBlockBindingsSource( postMeta );
@@ -0,0 +1,11 @@
1
+ /**
2
+ * WordPress dependencies
3
+ */
4
+ import { _x } from '@wordpress/i18n';
5
+
6
+ export default {
7
+ name: 'core/pattern-overrides',
8
+ label: _x( 'Pattern Overrides', 'block bindings source' ),
9
+ useSource: null,
10
+ lockAttributesEditing: false,
11
+ };
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import { useEntityProp } from '@wordpress/core-data';
5
5
  import { useSelect } from '@wordpress/data';
6
- import { __ } from '@wordpress/i18n';
6
+ import { _x } from '@wordpress/i18n';
7
7
  /**
8
8
  * Internal dependencies
9
9
  */
@@ -11,7 +11,7 @@ import { store as editorStore } from '../store';
11
11
 
12
12
  export default {
13
13
  name: 'core/post-meta',
14
- label: __( 'Post Meta' ),
14
+ label: _x( 'Post Meta', 'block bindings source' ),
15
15
  useSource( props, sourceAttributes ) {
16
16
  const { getCurrentPostType } = useSelect( editorStore );
17
17
  const { context } = props;
@@ -38,5 +38,4 @@ export default {
38
38
  useValue: [ metaValue, updateMetaValue ],
39
39
  };
40
40
  },
41
- lockAttributesEditing: true,
42
41
  };
@@ -48,24 +48,27 @@ const icons = {
48
48
  };
49
49
 
50
50
  export default function DocumentBar() {
51
- const { postType, postId, goBack } = useSelect( ( select ) => {
52
- const {
53
- getCurrentPostId,
54
- getCurrentPostType,
55
- getEditorSettings: getSettings,
56
- } = select( editorStore );
57
- const back = getSettings().goBack;
58
- return {
59
- postType: getCurrentPostType(),
60
- postId: getCurrentPostId(),
61
- goBack: typeof back === 'function' ? back : undefined,
62
- getEditorSettings: getSettings,
63
- };
64
- }, [] );
51
+ const { postType, postId, onNavigateToPreviousEntityRecord } = useSelect(
52
+ ( select ) => {
53
+ const {
54
+ getCurrentPostId,
55
+ getCurrentPostType,
56
+ getEditorSettings: getSettings,
57
+ } = select( editorStore );
58
+ return {
59
+ postType: getCurrentPostType(),
60
+ postId: getCurrentPostId(),
61
+ onNavigateToPreviousEntityRecord:
62
+ getSettings().onNavigateToPreviousEntityRecord,
63
+ getEditorSettings: getSettings,
64
+ };
65
+ },
66
+ []
67
+ );
65
68
 
66
69
  const handleOnBack = () => {
67
- if ( goBack ) {
68
- goBack();
70
+ if ( onNavigateToPreviousEntityRecord ) {
71
+ onNavigateToPreviousEntityRecord();
69
72
  }
70
73
  };
71
74
 
@@ -73,7 +76,9 @@ export default function DocumentBar() {
73
76
  <BaseDocumentActions
74
77
  postType={ postType }
75
78
  postId={ postId }
76
- onBack={ goBack ? handleOnBack : undefined }
79
+ onBack={
80
+ onNavigateToPreviousEntityRecord ? handleOnBack : undefined
81
+ }
77
82
  />
78
83
  );
79
84
  }
@@ -27,27 +27,17 @@ import { store as editorStore } from '../../store';
27
27
  * editor iframe canvas.
28
28
  */
29
29
  export default function EditTemplateBlocksNotification( { contentRef } ) {
30
- const { renderingMode, getPostLinkProps, templateId } = useSelect(
31
- ( select ) => {
32
- const {
33
- getRenderingMode,
34
- getEditorSettings,
35
- getCurrentTemplateId,
36
- } = select( editorStore );
37
- return {
38
- renderingMode: getRenderingMode(),
39
- getPostLinkProps: getEditorSettings().getPostLinkProps,
40
- templateId: getCurrentTemplateId(),
41
- };
42
- },
43
- []
44
- );
45
- const editTemplate = getPostLinkProps
46
- ? getPostLinkProps( {
47
- postId: templateId,
48
- postType: 'wp_template',
49
- } )
50
- : {};
30
+ const { onNavigateToEntityRecord, templateId } = useSelect( ( select ) => {
31
+ const { getEditorSettings, getCurrentTemplateId } =
32
+ select( editorStore );
33
+
34
+ return {
35
+ onNavigateToEntityRecord:
36
+ getEditorSettings().onNavigateToEntityRecord,
37
+ templateId: getCurrentTemplateId(),
38
+ };
39
+ }, [] );
40
+
51
41
  const { getNotices } = useSelect( noticesStore );
52
42
 
53
43
  const { createInfoNotice, removeNotice } = useDispatch( noticesStore );
@@ -58,18 +48,17 @@ export default function EditTemplateBlocksNotification( { contentRef } ) {
58
48
 
59
49
  useEffect( () => {
60
50
  const handleClick = async ( event ) => {
61
- if ( renderingMode !== 'template-locked' ) {
62
- return;
63
- }
64
51
  if ( ! event.target.classList.contains( 'is-root-container' ) ) {
65
52
  return;
66
53
  }
54
+
67
55
  const isNoticeAlreadyShowing = getNotices().some(
68
56
  ( notice ) => notice.id === lastNoticeId.current
69
57
  );
70
58
  if ( isNoticeAlreadyShowing ) {
71
59
  return;
72
60
  }
61
+
73
62
  const { notice } = await createInfoNotice(
74
63
  __( 'Edit your template to edit this block.' ),
75
64
  {
@@ -78,7 +67,11 @@ export default function EditTemplateBlocksNotification( { contentRef } ) {
78
67
  actions: [
79
68
  {
80
69
  label: __( 'Edit template' ),
81
- onClick: () => editTemplate.onClick(),
70
+ onClick: () =>
71
+ onNavigateToEntityRecord( {
72
+ postId: templateId,
73
+ postType: 'wp_template',
74
+ } ),
82
75
  },
83
76
  ],
84
77
  }
@@ -87,9 +80,6 @@ export default function EditTemplateBlocksNotification( { contentRef } ) {
87
80
  };
88
81
 
89
82
  const handleDblClick = ( event ) => {
90
- if ( renderingMode !== 'template-locked' ) {
91
- return;
92
- }
93
83
  if ( ! event.target.classList.contains( 'is-root-container' ) ) {
94
84
  return;
95
85
  }
@@ -106,7 +96,15 @@ export default function EditTemplateBlocksNotification( { contentRef } ) {
106
96
  canvas?.removeEventListener( 'click', handleClick );
107
97
  canvas?.removeEventListener( 'dblclick', handleDblClick );
108
98
  };
109
- }, [ lastNoticeId, renderingMode, contentRef.current ] );
99
+ }, [
100
+ lastNoticeId,
101
+ contentRef,
102
+ getNotices,
103
+ createInfoNotice,
104
+ onNavigateToEntityRecord,
105
+ templateId,
106
+ removeNotice,
107
+ ] );
110
108
 
111
109
  return (
112
110
  <ConfirmDialog
@@ -114,7 +112,10 @@ export default function EditTemplateBlocksNotification( { contentRef } ) {
114
112
  confirmButtonText={ __( 'Edit template' ) }
115
113
  onConfirm={ () => {
116
114
  setIsDialogOpen( false );
117
- editTemplate.onClick();
115
+ onNavigateToEntityRecord( {
116
+ postId: templateId,
117
+ postType: 'wp_template',
118
+ } );
118
119
  } }
119
120
  onCancel={ () => setIsDialogOpen( false ) }
120
121
  >