@wordpress/editor 14.48.1 → 14.49.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 (460) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/README.md +5 -13
  3. package/build/bindings/pattern-overrides.cjs +1 -1
  4. package/build/bindings/pattern-overrides.cjs.map +2 -2
  5. package/build/components/autosave-monitor/index.cjs +40 -83
  6. package/build/components/autosave-monitor/index.cjs.map +3 -3
  7. package/build/components/collab-sidebar/note-byline.cjs +1 -1
  8. package/build/components/collab-sidebar/note-byline.cjs.map +2 -2
  9. package/build/components/collab-sidebar/note.cjs +49 -17
  10. package/build/components/collab-sidebar/note.cjs.map +3 -3
  11. package/build/components/collab-sidebar/notes.cjs.map +1 -1
  12. package/build/components/collab-sidebar/utils.cjs +1 -1
  13. package/build/components/collab-sidebar/utils.cjs.map +2 -2
  14. package/build/components/collaborators-overlay/avatar-iframe-styles.cjs.map +1 -1
  15. package/build/components/collaborators-overlay/collaborator-styles.cjs.map +1 -1
  16. package/build/components/collaborators-overlay/compute-selection.cjs.map +1 -1
  17. package/build/components/collaborators-overlay/overlay-iframe-styles.cjs +1 -1
  18. package/build/components/collaborators-overlay/overlay-iframe-styles.cjs.map +1 -1
  19. package/build/components/collaborators-overlay/use-block-highlighting.cjs.map +1 -1
  20. package/build/components/collaborators-presence/avatar/component.cjs.map +2 -2
  21. package/build/components/collaborators-presence/avatar/use-image-loading-status.cjs.map +1 -1
  22. package/build/components/document-bar/index.cjs +7 -5
  23. package/build/components/document-bar/index.cjs.map +2 -2
  24. package/build/components/global-keyboard-shortcuts/index.cjs +3 -2
  25. package/build/components/global-keyboard-shortcuts/index.cjs.map +2 -2
  26. package/build/components/global-styles-sidebar/welcome-guide.cjs +3 -3
  27. package/build/components/global-styles-sidebar/welcome-guide.cjs.map +1 -1
  28. package/build/components/local-autosave-monitor/index.cjs +14 -15
  29. package/build/components/local-autosave-monitor/index.cjs.map +2 -2
  30. package/build/components/page-attributes/parent.cjs +1 -1
  31. package/build/components/page-attributes/parent.cjs.map +2 -2
  32. package/build/components/post-card-panel/index.cjs +1 -1
  33. package/build/components/post-card-panel/index.cjs.map +2 -2
  34. package/build/components/post-excerpt/panel.cjs +1 -1
  35. package/build/components/post-excerpt/panel.cjs.map +2 -2
  36. package/build/components/post-locked-modal/index.cjs +3 -3
  37. package/build/components/post-locked-modal/index.cjs.map +1 -1
  38. package/build/components/post-preview-button/index.cjs +2 -2
  39. package/build/components/post-preview-button/index.cjs.map +2 -2
  40. package/build/components/post-publish-button/index.cjs +4 -3
  41. package/build/components/post-publish-button/index.cjs.map +2 -2
  42. package/build/components/post-publish-button/label.cjs +2 -2
  43. package/build/components/post-publish-button/label.cjs.map +2 -2
  44. package/build/components/post-publish-panel/index.cjs.map +1 -1
  45. package/build/components/post-publish-panel/postpublish.cjs +1 -2
  46. package/build/components/post-publish-panel/postpublish.cjs.map +2 -2
  47. package/build/components/post-revisions-preview/block-diff.cjs.map +1 -1
  48. package/build/components/post-revisions-preview/diff-markers.cjs.map +2 -2
  49. package/build/components/post-revisions-preview/revisions-slider.cjs +1 -1
  50. package/build/components/post-revisions-preview/revisions-slider.cjs.map +2 -2
  51. package/build/components/post-revisions-timeline/index.cjs +173 -0
  52. package/build/components/post-revisions-timeline/index.cjs.map +7 -0
  53. package/build/components/post-saved-state/index.cjs +17 -26
  54. package/build/components/post-saved-state/index.cjs.map +2 -2
  55. package/build/components/post-schedule/label.cjs +5 -5
  56. package/build/components/post-schedule/label.cjs.map +1 -1
  57. package/build/components/post-status/index.cjs +0 -1
  58. package/build/components/post-status/index.cjs.map +2 -2
  59. package/build/components/post-taxonomies/flat-term-selector.cjs +2 -1
  60. package/build/components/post-taxonomies/flat-term-selector.cjs.map +3 -3
  61. package/build/components/post-taxonomies/hierarchical-term-selector.cjs +1 -2
  62. package/build/components/post-taxonomies/hierarchical-term-selector.cjs.map +2 -2
  63. package/build/components/post-template/create-new-template-modal.cjs +0 -1
  64. package/build/components/post-template/create-new-template-modal.cjs.map +2 -2
  65. package/build/components/post-text-editor/index.cjs +51 -0
  66. package/build/components/post-text-editor/index.cjs.map +2 -2
  67. package/build/components/post-text-editor/utils.cjs +150 -0
  68. package/build/components/post-text-editor/utils.cjs.map +7 -0
  69. package/build/components/post-url/index.cjs +1 -1
  70. package/build/components/post-url/index.cjs.map +2 -2
  71. package/build/components/post-view-link/index.cjs +1 -1
  72. package/build/components/post-view-link/index.cjs.map +2 -2
  73. package/build/components/post-visibility/index.cjs +0 -1
  74. package/build/components/post-visibility/index.cjs.map +2 -2
  75. package/build/components/provider/disable-non-page-content-blocks.cjs +23 -3
  76. package/build/components/provider/disable-non-page-content-blocks.cjs.map +2 -2
  77. package/build/components/provider/index.cjs +1 -1
  78. package/build/components/provider/index.cjs.map +2 -2
  79. package/build/components/provider/navigation-block-editing-mode.cjs +9 -2
  80. package/build/components/provider/navigation-block-editing-mode.cjs.map +2 -2
  81. package/build/components/provider/use-block-editor-settings.cjs +2 -1
  82. package/build/components/provider/use-block-editor-settings.cjs.map +2 -2
  83. package/build/components/resizable-editor/resize-handle.cjs.map +2 -2
  84. package/build/components/revision-diff-panel/index.cjs +7 -2
  85. package/build/components/revision-diff-panel/index.cjs.map +2 -2
  86. package/build/components/revision-fields-diff/index.cjs +6 -2
  87. package/build/components/revision-fields-diff/index.cjs.map +2 -2
  88. package/build/components/sidebar/dataform-post-summary.cjs +189 -29
  89. package/build/components/sidebar/dataform-post-summary.cjs.map +3 -3
  90. package/build/components/sidebar/index.cjs +1 -11
  91. package/build/components/sidebar/index.cjs.map +3 -3
  92. package/build/components/sidebar/post-revision-summary.cjs +11 -17
  93. package/build/components/sidebar/post-revision-summary.cjs.map +3 -3
  94. package/build/components/sidebar/post-summary.cjs +8 -6
  95. package/build/components/sidebar/post-summary.cjs.map +3 -3
  96. package/build/components/style-book/examples.cjs +1 -1
  97. package/build/components/style-book/examples.cjs.map +1 -1
  98. package/build/components/style-book/index.cjs +1 -1
  99. package/build/components/style-book/index.cjs.map +2 -2
  100. package/build/components/sync-connection-error-modal/index.cjs +3 -3
  101. package/build/components/sync-connection-error-modal/index.cjs.map +1 -1
  102. package/build/components/template-actions-panel/block-theme-content.cjs.map +2 -2
  103. package/build/components/template-actions-panel/index.cjs +0 -9
  104. package/build/components/template-actions-panel/index.cjs.map +3 -3
  105. package/build/components/template-validation-notice/index.cjs +1 -1
  106. package/build/components/template-validation-notice/index.cjs.map +1 -1
  107. package/build/components/upload-progress-snackbar/index.cjs +3 -3
  108. package/build/components/upload-progress-snackbar/index.cjs.map +2 -2
  109. package/build/components/upload-progress-snackbar/tracker.cjs.map +1 -1
  110. package/build/components/visual-editor/edit-template-blocks-notification.cjs +1 -1
  111. package/build/components/visual-editor/edit-template-blocks-notification.cjs.map +1 -1
  112. package/build/{components/revision-author-panel → dataviews/fields/revisions}/index.cjs +18 -26
  113. package/build/dataviews/fields/revisions/index.cjs.map +7 -0
  114. package/build/dataviews/fields/revisions/revisions-view.cjs +74 -0
  115. package/build/dataviews/fields/revisions/revisions-view.cjs.map +7 -0
  116. package/build/dataviews/store/private-actions.cjs +17 -5
  117. package/build/dataviews/store/private-actions.cjs.map +3 -3
  118. package/build/hooks/push-changes-to-global-styles/index.cjs +1 -1
  119. package/build/hooks/push-changes-to-global-styles/index.cjs.map +1 -1
  120. package/build/store/actions.cjs +1 -1
  121. package/build/store/actions.cjs.map +2 -2
  122. package/build/store/private-actions.cjs +2 -2
  123. package/build/store/private-actions.cjs.map +2 -2
  124. package/build/store/private-selectors.cjs +6 -1
  125. package/build/store/private-selectors.cjs.map +2 -2
  126. package/build/utils/media-upload/index.cjs.map +1 -1
  127. package/build/utils/set-nested-value.cjs.map +1 -1
  128. package/build-module/bindings/pattern-overrides.mjs +1 -1
  129. package/build-module/bindings/pattern-overrides.mjs.map +2 -2
  130. package/build-module/components/autosave-monitor/index.mjs +42 -81
  131. package/build-module/components/autosave-monitor/index.mjs.map +2 -2
  132. package/build-module/components/collab-sidebar/note-byline.mjs +1 -1
  133. package/build-module/components/collab-sidebar/note-byline.mjs.map +2 -2
  134. package/build-module/components/collab-sidebar/note.mjs +50 -18
  135. package/build-module/components/collab-sidebar/note.mjs.map +2 -2
  136. package/build-module/components/collab-sidebar/notes.mjs.map +1 -1
  137. package/build-module/components/collab-sidebar/utils.mjs +1 -1
  138. package/build-module/components/collab-sidebar/utils.mjs.map +2 -2
  139. package/build-module/components/collaborators-overlay/avatar-iframe-styles.mjs.map +1 -1
  140. package/build-module/components/collaborators-overlay/collaborator-styles.mjs.map +1 -1
  141. package/build-module/components/collaborators-overlay/compute-selection.mjs.map +1 -1
  142. package/build-module/components/collaborators-overlay/overlay-iframe-styles.mjs +1 -1
  143. package/build-module/components/collaborators-overlay/overlay-iframe-styles.mjs.map +1 -1
  144. package/build-module/components/collaborators-overlay/use-block-highlighting.mjs.map +1 -1
  145. package/build-module/components/collaborators-presence/avatar/component.mjs.map +2 -2
  146. package/build-module/components/collaborators-presence/avatar/use-image-loading-status.mjs.map +1 -1
  147. package/build-module/components/document-bar/index.mjs +7 -5
  148. package/build-module/components/document-bar/index.mjs.map +2 -2
  149. package/build-module/components/global-keyboard-shortcuts/index.mjs +3 -2
  150. package/build-module/components/global-keyboard-shortcuts/index.mjs.map +2 -2
  151. package/build-module/components/global-styles-sidebar/welcome-guide.mjs +3 -3
  152. package/build-module/components/global-styles-sidebar/welcome-guide.mjs.map +1 -1
  153. package/build-module/components/local-autosave-monitor/index.mjs +15 -16
  154. package/build-module/components/local-autosave-monitor/index.mjs.map +2 -2
  155. package/build-module/components/page-attributes/parent.mjs +1 -1
  156. package/build-module/components/page-attributes/parent.mjs.map +2 -2
  157. package/build-module/components/post-card-panel/index.mjs +1 -1
  158. package/build-module/components/post-card-panel/index.mjs.map +2 -2
  159. package/build-module/components/post-excerpt/panel.mjs +1 -1
  160. package/build-module/components/post-excerpt/panel.mjs.map +2 -2
  161. package/build-module/components/post-locked-modal/index.mjs +3 -3
  162. package/build-module/components/post-locked-modal/index.mjs.map +1 -1
  163. package/build-module/components/post-preview-button/index.mjs +2 -2
  164. package/build-module/components/post-preview-button/index.mjs.map +2 -2
  165. package/build-module/components/post-publish-button/index.mjs +4 -3
  166. package/build-module/components/post-publish-button/index.mjs.map +2 -2
  167. package/build-module/components/post-publish-button/label.mjs +2 -2
  168. package/build-module/components/post-publish-button/label.mjs.map +2 -2
  169. package/build-module/components/post-publish-panel/index.mjs.map +1 -1
  170. package/build-module/components/post-publish-panel/postpublish.mjs +1 -2
  171. package/build-module/components/post-publish-panel/postpublish.mjs.map +2 -2
  172. package/build-module/components/post-revisions-preview/block-diff.mjs.map +1 -1
  173. package/build-module/components/post-revisions-preview/diff-markers.mjs.map +2 -2
  174. package/build-module/components/post-revisions-preview/revisions-slider.mjs +1 -1
  175. package/build-module/components/post-revisions-preview/revisions-slider.mjs.map +2 -2
  176. package/build-module/components/post-revisions-timeline/index.mjs +152 -0
  177. package/build-module/components/post-revisions-timeline/index.mjs.map +7 -0
  178. package/build-module/components/post-saved-state/index.mjs +17 -26
  179. package/build-module/components/post-saved-state/index.mjs.map +2 -2
  180. package/build-module/components/post-schedule/label.mjs +5 -5
  181. package/build-module/components/post-schedule/label.mjs.map +1 -1
  182. package/build-module/components/post-status/index.mjs +0 -1
  183. package/build-module/components/post-status/index.mjs.map +2 -2
  184. package/build-module/components/post-taxonomies/flat-term-selector.mjs +3 -6
  185. package/build-module/components/post-taxonomies/flat-term-selector.mjs.map +2 -2
  186. package/build-module/components/post-taxonomies/hierarchical-term-selector.mjs +1 -2
  187. package/build-module/components/post-taxonomies/hierarchical-term-selector.mjs.map +2 -2
  188. package/build-module/components/post-template/create-new-template-modal.mjs +0 -1
  189. package/build-module/components/post-template/create-new-template-modal.mjs.map +2 -2
  190. package/build-module/components/post-text-editor/index.mjs +51 -0
  191. package/build-module/components/post-text-editor/index.mjs.map +2 -2
  192. package/build-module/components/post-text-editor/utils.mjs +123 -0
  193. package/build-module/components/post-text-editor/utils.mjs.map +7 -0
  194. package/build-module/components/post-url/index.mjs +1 -1
  195. package/build-module/components/post-url/index.mjs.map +2 -2
  196. package/build-module/components/post-view-link/index.mjs +1 -1
  197. package/build-module/components/post-view-link/index.mjs.map +2 -2
  198. package/build-module/components/post-visibility/index.mjs +0 -1
  199. package/build-module/components/post-visibility/index.mjs.map +2 -2
  200. package/build-module/components/provider/disable-non-page-content-blocks.mjs +23 -3
  201. package/build-module/components/provider/disable-non-page-content-blocks.mjs.map +2 -2
  202. package/build-module/components/provider/index.mjs +1 -1
  203. package/build-module/components/provider/index.mjs.map +2 -2
  204. package/build-module/components/provider/navigation-block-editing-mode.mjs +10 -3
  205. package/build-module/components/provider/navigation-block-editing-mode.mjs.map +2 -2
  206. package/build-module/components/provider/use-block-editor-settings.mjs +2 -1
  207. package/build-module/components/provider/use-block-editor-settings.mjs.map +2 -2
  208. package/build-module/components/resizable-editor/resize-handle.mjs.map +2 -2
  209. package/build-module/components/revision-diff-panel/index.mjs +7 -2
  210. package/build-module/components/revision-diff-panel/index.mjs.map +2 -2
  211. package/build-module/components/revision-fields-diff/index.mjs +6 -2
  212. package/build-module/components/revision-fields-diff/index.mjs.map +2 -2
  213. package/build-module/components/sidebar/dataform-post-summary.mjs +190 -30
  214. package/build-module/components/sidebar/dataform-post-summary.mjs.map +2 -2
  215. package/build-module/components/sidebar/index.mjs +1 -11
  216. package/build-module/components/sidebar/index.mjs.map +2 -2
  217. package/build-module/components/sidebar/post-revision-summary.mjs +11 -17
  218. package/build-module/components/sidebar/post-revision-summary.mjs.map +2 -2
  219. package/build-module/components/sidebar/post-summary.mjs +8 -6
  220. package/build-module/components/sidebar/post-summary.mjs.map +2 -2
  221. package/build-module/components/style-book/examples.mjs +1 -1
  222. package/build-module/components/style-book/examples.mjs.map +1 -1
  223. package/build-module/components/style-book/index.mjs +1 -1
  224. package/build-module/components/style-book/index.mjs.map +2 -2
  225. package/build-module/components/sync-connection-error-modal/index.mjs +3 -3
  226. package/build-module/components/sync-connection-error-modal/index.mjs.map +1 -1
  227. package/build-module/components/template-actions-panel/block-theme-content.mjs.map +2 -2
  228. package/build-module/components/template-actions-panel/index.mjs +0 -9
  229. package/build-module/components/template-actions-panel/index.mjs.map +2 -2
  230. package/build-module/components/template-validation-notice/index.mjs +1 -1
  231. package/build-module/components/template-validation-notice/index.mjs.map +1 -1
  232. package/build-module/components/upload-progress-snackbar/index.mjs +3 -3
  233. package/build-module/components/upload-progress-snackbar/index.mjs.map +2 -2
  234. package/build-module/components/upload-progress-snackbar/tracker.mjs.map +1 -1
  235. package/build-module/components/visual-editor/edit-template-blocks-notification.mjs +1 -1
  236. package/build-module/components/visual-editor/edit-template-blocks-notification.mjs.map +1 -1
  237. package/build-module/dataviews/fields/revisions/index.mjs +20 -0
  238. package/build-module/dataviews/fields/revisions/index.mjs.map +7 -0
  239. package/build-module/dataviews/fields/revisions/revisions-view.mjs +53 -0
  240. package/build-module/dataviews/fields/revisions/revisions-view.mjs.map +7 -0
  241. package/build-module/dataviews/store/private-actions.mjs +28 -8
  242. package/build-module/dataviews/store/private-actions.mjs.map +2 -2
  243. package/build-module/hooks/push-changes-to-global-styles/index.mjs +1 -1
  244. package/build-module/hooks/push-changes-to-global-styles/index.mjs.map +1 -1
  245. package/build-module/store/actions.mjs +1 -1
  246. package/build-module/store/actions.mjs.map +2 -2
  247. package/build-module/store/private-actions.mjs +2 -2
  248. package/build-module/store/private-actions.mjs.map +2 -2
  249. package/build-module/store/private-selectors.mjs +7 -1
  250. package/build-module/store/private-selectors.mjs.map +2 -2
  251. package/build-module/utils/media-upload/index.mjs.map +1 -1
  252. package/build-module/utils/set-nested-value.mjs.map +1 -1
  253. package/build-style/style-rtl.css +298 -238
  254. package/build-style/style.css +298 -238
  255. package/build-types/components/autosave-monitor/index.d.ts +11 -29
  256. package/build-types/components/autosave-monitor/index.d.ts.map +1 -1
  257. package/build-types/components/collab-sidebar/note-byline.d.ts +0 -3
  258. package/build-types/components/collab-sidebar/note-byline.d.ts.map +1 -1
  259. package/build-types/components/collab-sidebar/note.d.ts.map +1 -1
  260. package/build-types/components/collaborators-presence/avatar/component.d.ts.map +1 -1
  261. package/build-types/components/document-bar/index.d.ts +2 -2
  262. package/build-types/components/document-bar/index.d.ts.map +1 -1
  263. package/build-types/components/global-keyboard-shortcuts/index.d.ts.map +1 -1
  264. package/build-types/components/local-autosave-monitor/index.d.ts.map +1 -1
  265. package/build-types/components/post-publish-button/index.d.ts.map +1 -1
  266. package/build-types/components/post-publish-panel/postpublish.d.ts.map +1 -1
  267. package/build-types/components/post-revisions-preview/diff-markers.d.ts.map +1 -1
  268. package/build-types/components/post-revisions-timeline/index.d.ts +2 -0
  269. package/build-types/components/post-revisions-timeline/index.d.ts.map +1 -0
  270. package/build-types/components/post-saved-state/index.d.ts.map +1 -1
  271. package/build-types/components/post-status/index.d.ts.map +1 -1
  272. package/build-types/components/post-taxonomies/flat-term-selector.d.ts.map +1 -1
  273. package/build-types/components/post-taxonomies/hierarchical-term-selector.d.ts.map +1 -1
  274. package/build-types/components/post-template/create-new-template-modal.d.ts.map +1 -1
  275. package/build-types/components/post-text-editor/index.d.ts +1 -1
  276. package/build-types/components/post-text-editor/index.d.ts.map +1 -1
  277. package/build-types/components/post-visibility/index.d.ts.map +1 -1
  278. package/build-types/components/provider/disable-non-page-content-blocks.d.ts.map +1 -1
  279. package/build-types/components/provider/index.d.ts.map +1 -1
  280. package/build-types/components/provider/navigation-block-editing-mode.d.ts.map +1 -1
  281. package/build-types/components/provider/use-block-editor-settings.d.ts.map +1 -1
  282. package/build-types/components/resizable-editor/resize-handle.d.ts.map +1 -1
  283. package/build-types/components/revision-diff-panel/index.d.ts +3 -1
  284. package/build-types/components/revision-diff-panel/index.d.ts.map +1 -1
  285. package/build-types/components/revision-fields-diff/index.d.ts.map +1 -1
  286. package/build-types/components/sidebar/dataform-post-summary.d.ts.map +1 -1
  287. package/build-types/components/sidebar/index.d.ts.map +1 -1
  288. package/build-types/components/sidebar/post-revision-summary.d.ts.map +1 -1
  289. package/build-types/components/sidebar/post-summary.d.ts.map +1 -1
  290. package/build-types/components/template-actions-panel/block-theme-content.d.ts.map +1 -1
  291. package/build-types/components/template-actions-panel/index.d.ts.map +1 -1
  292. package/build-types/dataviews/fields/revisions/index.d.ts +8 -0
  293. package/build-types/dataviews/fields/revisions/index.d.ts.map +1 -0
  294. package/build-types/dataviews/fields/revisions/revisions-view.d.ts +2 -0
  295. package/build-types/dataviews/fields/revisions/revisions-view.d.ts.map +1 -0
  296. package/build-types/dataviews/store/private-actions.d.ts.map +1 -1
  297. package/build-types/store/private-selectors.d.ts +1 -1
  298. package/build-types/store/private-selectors.d.ts.map +1 -1
  299. package/build-types/store/selectors.d.ts +1 -1
  300. package/build-types/store/selectors.d.ts.map +1 -1
  301. package/build-types/utils/get-template-part-icon.d.ts.map +1 -1
  302. package/package.json +53 -47
  303. package/src/bindings/pattern-overrides.js +1 -1
  304. package/src/bindings/test/pattern-overrides.js +65 -0
  305. package/src/components/autosave-monitor/index.js +69 -104
  306. package/src/components/autosave-monitor/test/index.js +137 -122
  307. package/src/components/collab-sidebar/note-byline.js +0 -1
  308. package/src/components/collab-sidebar/note.js +64 -29
  309. package/src/components/collab-sidebar/style.scss +20 -0
  310. package/src/components/collaborators-presence/avatar/component.tsx +0 -1
  311. package/src/components/collaborators-presence/avatar/test/index.tsx +0 -1
  312. package/src/components/document-bar/index.js +8 -3
  313. package/src/components/document-bar/style.scss +4 -2
  314. package/src/components/global-keyboard-shortcuts/index.js +2 -1
  315. package/src/components/local-autosave-monitor/index.js +23 -21
  316. package/src/components/plugin-post-publish-panel/test/__snapshots__/index.js.snap +1 -0
  317. package/src/components/post-card-panel/index.js +1 -1
  318. package/src/components/post-publish-button/index.js +6 -3
  319. package/src/components/post-publish-button/test/index.js +13 -0
  320. package/src/components/post-publish-panel/postpublish.js +0 -1
  321. package/src/components/post-publish-panel/test/__snapshots__/index.js.snap +7 -2
  322. package/src/components/post-revisions-preview/diff-markers.js +0 -1
  323. package/src/components/post-revisions-timeline/index.js +186 -0
  324. package/src/components/post-revisions-timeline/style.scss +43 -0
  325. package/src/components/post-saved-state/index.js +23 -26
  326. package/src/components/post-saved-state/test/__snapshots__/index.js.snap +1 -0
  327. package/src/components/post-saved-state/test/index.js +18 -0
  328. package/src/components/post-status/index.js +0 -1
  329. package/src/components/post-taxonomies/flat-term-selector.js +4 -7
  330. package/src/components/post-taxonomies/hierarchical-term-selector.js +0 -1
  331. package/src/components/post-template/create-new-template-modal.js +0 -1
  332. package/src/components/post-text-editor/index.js +65 -0
  333. package/src/components/post-text-editor/test/utils.js +210 -0
  334. package/src/components/post-text-editor/utils.js +204 -0
  335. package/src/components/post-type-support-check/test/index.js +11 -0
  336. package/src/components/post-url/index.js +1 -1
  337. package/src/components/post-view-link/index.js +1 -1
  338. package/src/components/post-view-link/test/index.js +71 -0
  339. package/src/components/post-visibility/index.js +0 -1
  340. package/src/components/provider/disable-non-page-content-blocks.js +23 -6
  341. package/src/components/provider/index.js +2 -1
  342. package/src/components/provider/navigation-block-editing-mode.js +10 -4
  343. package/src/components/provider/use-block-editor-settings.js +3 -1
  344. package/src/components/resizable-editor/resize-handle.js +0 -1
  345. package/src/components/revision-diff-panel/index.js +8 -2
  346. package/src/components/revision-fields-diff/index.js +12 -1
  347. package/src/components/sidebar/dataform-post-summary.js +291 -36
  348. package/src/components/sidebar/index.js +2 -12
  349. package/src/components/sidebar/post-revision-summary.js +8 -15
  350. package/src/components/sidebar/post-summary.js +12 -10
  351. package/src/components/style-book/index.js +1 -1
  352. package/src/components/template-actions-panel/block-theme-content.js +0 -1
  353. package/src/components/template-actions-panel/index.js +0 -15
  354. package/src/dataviews/fields/revisions/index.tsx +28 -0
  355. package/src/dataviews/fields/revisions/revisions-view.tsx +59 -0
  356. package/src/dataviews/store/private-actions.ts +35 -7
  357. package/src/store/private-actions.js +2 -2
  358. package/src/store/private-selectors.js +11 -1
  359. package/src/store/test/actions.js +2 -2
  360. package/src/store/test/private-selectors.js +69 -0
  361. package/src/style.scss +1 -1
  362. package/build/components/post-revisions-panel/index.cjs +0 -173
  363. package/build/components/post-revisions-panel/index.cjs.map +0 -7
  364. package/build/components/revision-author-panel/index.cjs.map +0 -7
  365. package/build/components/revision-created-panel/index.cjs +0 -47
  366. package/build/components/revision-created-panel/index.cjs.map +0 -7
  367. package/build-module/components/post-revisions-panel/index.mjs +0 -148
  368. package/build-module/components/post-revisions-panel/index.mjs.map +0 -7
  369. package/build-module/components/revision-author-panel/index.mjs +0 -28
  370. package/build-module/components/revision-author-panel/index.mjs.map +0 -7
  371. package/build-module/components/revision-created-panel/index.mjs +0 -26
  372. package/build-module/components/revision-created-panel/index.mjs.map +0 -7
  373. package/build-types/components/collab-sidebar/add-comment.d.ts +0 -6
  374. package/build-types/components/collab-sidebar/add-comment.d.ts.map +0 -1
  375. package/build-types/components/collab-sidebar/comment-author-info.d.ts +0 -8
  376. package/build-types/components/collab-sidebar/comment-author-info.d.ts.map +0 -1
  377. package/build-types/components/collab-sidebar/comment-form.d.ts +0 -9
  378. package/build-types/components/collab-sidebar/comment-form.d.ts.map +0 -1
  379. package/build-types/components/collab-sidebar/comment-indicator-toolbar.d.ts +0 -6
  380. package/build-types/components/collab-sidebar/comment-indicator-toolbar.d.ts.map +0 -1
  381. package/build-types/components/collab-sidebar/comment-menu-item.d.ts +0 -6
  382. package/build-types/components/collab-sidebar/comment-menu-item.d.ts.map +0 -1
  383. package/build-types/components/collab-sidebar/comments.d.ts +0 -10
  384. package/build-types/components/collab-sidebar/comments.d.ts.map +0 -1
  385. package/build-types/components/global-styles-provider/index.d.ts +0 -16
  386. package/build-types/components/global-styles-provider/index.d.ts.map +0 -1
  387. package/build-types/components/media/index.d.ts +0 -3
  388. package/build-types/components/media/index.d.ts.map +0 -1
  389. package/build-types/components/media/metadata-panel.d.ts +0 -12
  390. package/build-types/components/media/metadata-panel.d.ts.map +0 -1
  391. package/build-types/components/media/preview.d.ts +0 -9
  392. package/build-types/components/media/preview.d.ts.map +0 -1
  393. package/build-types/components/post-revisions-panel/index.d.ts +0 -2
  394. package/build-types/components/post-revisions-panel/index.d.ts.map +0 -1
  395. package/build-types/components/revision-author-panel/index.d.ts +0 -2
  396. package/build-types/components/revision-author-panel/index.d.ts.map +0 -1
  397. package/build-types/components/revision-created-panel/index.d.ts +0 -2
  398. package/build-types/components/revision-created-panel/index.d.ts.map +0 -1
  399. package/src/components/editor-help/images/add-dark.png +0 -0
  400. package/src/components/editor-help/images/add-dark@2x.png +0 -0
  401. package/src/components/editor-help/images/add-dark@3x.png +0 -0
  402. package/src/components/editor-help/images/add-light.png +0 -0
  403. package/src/components/editor-help/images/add-light@2x.png +0 -0
  404. package/src/components/editor-help/images/add-light@3x.png +0 -0
  405. package/src/components/editor-help/images/block-layout-collage.png +0 -0
  406. package/src/components/editor-help/images/block-layout-collage@2x.png +0 -0
  407. package/src/components/editor-help/images/block-layout-collage@3x.png +0 -0
  408. package/src/components/editor-help/images/build-layouts-dark.png +0 -0
  409. package/src/components/editor-help/images/build-layouts-dark@2x.png +0 -0
  410. package/src/components/editor-help/images/build-layouts-dark@3x.png +0 -0
  411. package/src/components/editor-help/images/build-layouts-light.png +0 -0
  412. package/src/components/editor-help/images/build-layouts-light@2x.png +0 -0
  413. package/src/components/editor-help/images/build-layouts-light@3x.png +0 -0
  414. package/src/components/editor-help/images/drag-and-drop-dark.png +0 -0
  415. package/src/components/editor-help/images/drag-and-drop-dark@2x.png +0 -0
  416. package/src/components/editor-help/images/drag-and-drop-dark@3x.png +0 -0
  417. package/src/components/editor-help/images/drag-and-drop-light.png +0 -0
  418. package/src/components/editor-help/images/drag-and-drop-light@2x.png +0 -0
  419. package/src/components/editor-help/images/drag-and-drop-light@3x.png +0 -0
  420. package/src/components/editor-help/images/edit-media-dark.png +0 -0
  421. package/src/components/editor-help/images/edit-media-dark@2x.png +0 -0
  422. package/src/components/editor-help/images/edit-media-dark@3x.png +0 -0
  423. package/src/components/editor-help/images/edit-media-light.png +0 -0
  424. package/src/components/editor-help/images/edit-media-light@2x.png +0 -0
  425. package/src/components/editor-help/images/edit-media-light@3x.png +0 -0
  426. package/src/components/editor-help/images/embed-media-dark.png +0 -0
  427. package/src/components/editor-help/images/embed-media-dark@2x.png +0 -0
  428. package/src/components/editor-help/images/embed-media-dark@3x.png +0 -0
  429. package/src/components/editor-help/images/embed-media-light.png +0 -0
  430. package/src/components/editor-help/images/embed-media-light@2x.png +0 -0
  431. package/src/components/editor-help/images/embed-media-light@3x.png +0 -0
  432. package/src/components/editor-help/images/move-dark.png +0 -0
  433. package/src/components/editor-help/images/move-dark@2x.png +0 -0
  434. package/src/components/editor-help/images/move-dark@3x.png +0 -0
  435. package/src/components/editor-help/images/move-light.png +0 -0
  436. package/src/components/editor-help/images/move-light@2x.png +0 -0
  437. package/src/components/editor-help/images/move-light@3x.png +0 -0
  438. package/src/components/editor-help/images/options-dark.png +0 -0
  439. package/src/components/editor-help/images/options-dark@2x.png +0 -0
  440. package/src/components/editor-help/images/options-dark@3x.png +0 -0
  441. package/src/components/editor-help/images/options-light.png +0 -0
  442. package/src/components/editor-help/images/options-light@2x.png +0 -0
  443. package/src/components/editor-help/images/options-light@3x.png +0 -0
  444. package/src/components/editor-help/images/rich-text-dark.png +0 -0
  445. package/src/components/editor-help/images/rich-text-dark@2x.png +0 -0
  446. package/src/components/editor-help/images/rich-text-dark@3x.png +0 -0
  447. package/src/components/editor-help/images/rich-text-light.png +0 -0
  448. package/src/components/editor-help/images/rich-text-light@2x.png +0 -0
  449. package/src/components/editor-help/images/rich-text-light@3x.png +0 -0
  450. package/src/components/editor-help/images/settings-dark.png +0 -0
  451. package/src/components/editor-help/images/settings-dark@2x.png +0 -0
  452. package/src/components/editor-help/images/settings-dark@3x.png +0 -0
  453. package/src/components/editor-help/images/settings-light.png +0 -0
  454. package/src/components/editor-help/images/settings-light@2x.png +0 -0
  455. package/src/components/editor-help/images/settings-light@3x.png +0 -0
  456. package/src/components/editor-help/style.scss +0 -123
  457. package/src/components/post-revisions-panel/index.js +0 -161
  458. package/src/components/post-revisions-panel/style.scss +0 -16
  459. package/src/components/revision-author-panel/index.js +0 -36
  460. package/src/components/revision-created-panel/index.js +0 -36
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/utils/media-upload/index.js"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\nimport { v4 as uuid } from 'uuid';\n\n/**\n * WordPress dependencies\n */\nimport { select, dispatch } from '@wordpress/data';\nimport { store as coreDataStore } from '@wordpress/core-data';\nimport { uploadMedia } from '@wordpress/media-utils';\nimport { isClientSideMediaSupported } from '@wordpress/upload-media';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport {\n\taddFiles as trackStart,\n\tadvance as trackAdvance,\n} from '../../components/upload-progress-snackbar/tracker';\n\nconst noop = () => {};\n\n/**\n * Upload a media file when the file upload button is activated.\n * Wrapper around uploadMedia() that injects the current post ID.\n *\n * @param {Object} $0 Parameters object passed to the function.\n * @param {?Object} $0.additionalData Additional data to include in the request.\n * @param {string} $0.allowedTypes Array with the types of media that can be uploaded, if unset all types are allowed.\n * @param {Array} $0.filesList List of files.\n * @param {?number} $0.maxUploadFileSize Maximum upload size in bytes allowed for the site.\n * @param {Function} $0.onError Function called when an error happens.\n * @param {Function} $0.onFileChange Function called each time a file or a temporary representation of the file is available.\n * @param {Function} $0.onSuccess Function called after the final representation of the file is available.\n * @param {boolean} $0.multiple Whether to allow multiple files to be uploaded.\n */\nexport default function mediaUpload( {\n\tadditionalData = {},\n\tallowedTypes,\n\tfilesList,\n\tmaxUploadFileSize,\n\tonError = noop,\n\tonFileChange,\n\tonSuccess,\n\tmultiple = true,\n} ) {\n\tconst { receiveEntityRecords } = dispatch( coreDataStore );\n\tconst { getCurrentPost, getEditorSettings } = select( editorStore );\n\tconst {\n\t\tlockPostAutosaving,\n\t\tunlockPostAutosaving,\n\t\tlockPostSaving,\n\t\tunlockPostSaving,\n\t} = dispatch( editorStore );\n\n\tconst wpAllowedMimeTypes = getEditorSettings().allowedMimeTypes;\n\tconst isClientSideMediaActive =\n\t\twindow.__clientSideMediaProcessing && isClientSideMediaSupported();\n\tconst lockKey = `image-upload-${ uuid() }`;\n\tmaxUploadFileSize =\n\t\tmaxUploadFileSize || getEditorSettings().maxUploadFileSize;\n\tconst currentPost = getCurrentPost();\n\t// Templates and template parts' numerical ID is stored in `wp_id`.\n\tconst currentPostId =\n\t\ttypeof currentPost?.id === 'number'\n\t\t\t? currentPost.id\n\t\t\t: currentPost?.wp_id;\n\tconst clearSaveLock = () => {\n\t\tunlockPostSaving( lockKey );\n\t\tunlockPostAutosaving( lockKey );\n\t};\n\n\t// Lock saving immediately when the upload starts.\n\t// When client-side media processing is enabled, save locking\n\t// is handled by useUploadSaveLock in the editor provider.\n\tif ( ! isClientSideMediaActive ) {\n\t\tlockPostSaving( lockKey );\n\t\tlockPostAutosaving( lockKey );\n\t}\n\n\tconst postData = currentPostId ? { post: currentPostId } : {};\n\n\t// Track this batch for the upload progress snackbar. Only applies to the\n\t// non-CSM path \u2014 when CSM is enabled, the block-editor provider intercepts\n\t// mediaUpload and dispatches to the upload-media store, so this wrapper is\n\t// not called.\n\tif ( ! isClientSideMediaActive ) {\n\t\tconst trackingFiles = Array.from( filesList ).map(\n\t\t\t( f ) => f?.name || ''\n\t\t);\n\t\ttrackStart( trackingFiles );\n\t}\n\tlet lastCompletedCount = 0;\n\n\tuploadMedia( {\n\t\tallowedTypes,\n\t\tfilesList,\n\t\tonFileChange: ( files ) => {\n\t\t\tonFileChange?.( files );\n\n\t\t\t// Files are initially received by `onFileChange` as a blob.\n\t\t\t// After that the function is called again with the file as an entity.\n\t\t\t// For core-data, we only care about receiving/invalidating entities.\n\t\t\tconst entityFiles = files.filter( ( _file ) => _file?.id );\n\t\t\tif ( entityFiles?.length ) {\n\t\t\t\tconst invalidateCache = true;\n\t\t\t\treceiveEntityRecords(\n\t\t\t\t\t'postType',\n\t\t\t\t\t'attachment',\n\t\t\t\t\tentityFiles,\n\t\t\t\t\tundefined,\n\t\t\t\t\tinvalidateCache\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// Unlock saving once all files have been uploaded (all have IDs).\n\t\t\tif (\n\t\t\t\t! isClientSideMediaActive &&\n\t\t\t\tentityFiles.length === files.length\n\t\t\t) {\n\t\t\t\tclearSaveLock();\n\t\t\t}\n\n\t\t\t// Advance the snackbar tracker for newly-completed files.\n\t\t\tif ( ! isClientSideMediaActive ) {\n\t\t\t\tconst completedCount = entityFiles.length;\n\t\t\t\tif ( completedCount > lastCompletedCount ) {\n\t\t\t\t\ttrackAdvance( completedCount - lastCompletedCount );\n\t\t\t\t\tlastCompletedCount = completedCount;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tonSuccess,\n\t\tadditionalData: {\n\t\t\t...postData,\n\t\t\t...additionalData,\n\t\t},\n\t\tmaxUploadFileSize,\n\t\tonError: ( { message } ) => {\n\t\t\tif ( ! isClientSideMediaActive ) {\n\t\t\t\tclearSaveLock();\n\t\t\t\t// Failed files still count as \"done\" for the snackbar.\n\t\t\t\ttrackAdvance( 1 );\n\t\t\t}\n\t\t\tonError( message );\n\t\t},\n\t\twpAllowedMimeTypes,\n\t\tmultiple,\n\t} );\n}\n"],
4
+ "sourcesContent": ["/**\n * External dependencies\n */\nimport { v4 as uuid } from 'uuid';\n\n/**\n * WordPress dependencies\n */\nimport { select, dispatch } from '@wordpress/data';\nimport { store as coreDataStore } from '@wordpress/core-data';\nimport { uploadMedia } from '@wordpress/media-utils';\nimport { isClientSideMediaSupported } from '@wordpress/upload-media';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport {\n\taddFiles as trackStart,\n\tadvance as trackAdvance,\n} from '../../components/upload-progress-snackbar/tracker';\n\nconst noop = () => {};\n\n/**\n * Upload a media file when the file upload button is activated.\n * Wrapper around uploadMedia() that injects the current post ID.\n *\n * @param {Object} $0 Parameters object passed to the function.\n * @param {?Object} $0.additionalData Additional data to include in the request.\n * @param {string} $0.allowedTypes Array with the types of media that can be uploaded, if unset all types are allowed.\n * @param {Array} $0.filesList List of files.\n * @param {?number} $0.maxUploadFileSize Maximum upload size in bytes allowed for the site.\n * @param {Function} $0.onError Function called when an error happens.\n * @param {Function} $0.onFileChange Function called each time a file or a temporary representation of the file is available.\n * @param {Function} $0.onSuccess Function called after the final representation of the file is available.\n * @param {boolean} $0.multiple Whether to allow multiple files to be uploaded.\n */\nexport default function mediaUpload( {\n\tadditionalData = {},\n\tallowedTypes,\n\tfilesList,\n\tmaxUploadFileSize,\n\tonError = noop,\n\tonFileChange,\n\tonSuccess,\n\tmultiple = true,\n} ) {\n\tconst { receiveEntityRecords } = dispatch( coreDataStore );\n\tconst { getCurrentPost, getEditorSettings } = select( editorStore );\n\tconst {\n\t\tlockPostAutosaving,\n\t\tunlockPostAutosaving,\n\t\tlockPostSaving,\n\t\tunlockPostSaving,\n\t} = dispatch( editorStore );\n\n\tconst wpAllowedMimeTypes = getEditorSettings().allowedMimeTypes;\n\tconst isClientSideMediaActive =\n\t\twindow.__clientSideMediaProcessing && isClientSideMediaSupported();\n\tconst lockKey = `image-upload-${ uuid() }`;\n\tmaxUploadFileSize =\n\t\tmaxUploadFileSize || getEditorSettings().maxUploadFileSize;\n\tconst currentPost = getCurrentPost();\n\t// Templates and template parts' numerical ID is stored in `wp_id`.\n\tconst currentPostId =\n\t\ttypeof currentPost?.id === 'number'\n\t\t\t? currentPost.id\n\t\t\t: currentPost?.wp_id;\n\tconst clearSaveLock = () => {\n\t\tunlockPostSaving( lockKey );\n\t\tunlockPostAutosaving( lockKey );\n\t};\n\n\t// Lock saving immediately when the upload starts.\n\t// When client-side media processing is enabled, save locking\n\t// is handled by useUploadSaveLock in the editor provider.\n\tif ( ! isClientSideMediaActive ) {\n\t\tlockPostSaving( lockKey );\n\t\tlockPostAutosaving( lockKey );\n\t}\n\n\tconst postData = currentPostId ? { post: currentPostId } : {};\n\n\t// Track this batch for the upload progress snackbar. Only applies to the\n\t// non-CSM path when CSM is enabled, the block-editor provider intercepts\n\t// mediaUpload and dispatches to the upload-media store, so this wrapper is\n\t// not called.\n\tif ( ! isClientSideMediaActive ) {\n\t\tconst trackingFiles = Array.from( filesList ).map(\n\t\t\t( f ) => f?.name || ''\n\t\t);\n\t\ttrackStart( trackingFiles );\n\t}\n\tlet lastCompletedCount = 0;\n\n\tuploadMedia( {\n\t\tallowedTypes,\n\t\tfilesList,\n\t\tonFileChange: ( files ) => {\n\t\t\tonFileChange?.( files );\n\n\t\t\t// Files are initially received by `onFileChange` as a blob.\n\t\t\t// After that the function is called again with the file as an entity.\n\t\t\t// For core-data, we only care about receiving/invalidating entities.\n\t\t\tconst entityFiles = files.filter( ( _file ) => _file?.id );\n\t\t\tif ( entityFiles?.length ) {\n\t\t\t\tconst invalidateCache = true;\n\t\t\t\treceiveEntityRecords(\n\t\t\t\t\t'postType',\n\t\t\t\t\t'attachment',\n\t\t\t\t\tentityFiles,\n\t\t\t\t\tundefined,\n\t\t\t\t\tinvalidateCache\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// Unlock saving once all files have been uploaded (all have IDs).\n\t\t\tif (\n\t\t\t\t! isClientSideMediaActive &&\n\t\t\t\tentityFiles.length === files.length\n\t\t\t) {\n\t\t\t\tclearSaveLock();\n\t\t\t}\n\n\t\t\t// Advance the snackbar tracker for newly-completed files.\n\t\t\tif ( ! isClientSideMediaActive ) {\n\t\t\t\tconst completedCount = entityFiles.length;\n\t\t\t\tif ( completedCount > lastCompletedCount ) {\n\t\t\t\t\ttrackAdvance( completedCount - lastCompletedCount );\n\t\t\t\t\tlastCompletedCount = completedCount;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tonSuccess,\n\t\tadditionalData: {\n\t\t\t...postData,\n\t\t\t...additionalData,\n\t\t},\n\t\tmaxUploadFileSize,\n\t\tonError: ( { message } ) => {\n\t\t\tif ( ! isClientSideMediaActive ) {\n\t\t\t\tclearSaveLock();\n\t\t\t\t// Failed files still count as \"done\" for the snackbar.\n\t\t\t\ttrackAdvance( 1 );\n\t\t\t}\n\t\t\tonError( message );\n\t\t},\n\t\twpAllowedMimeTypes,\n\t\tmultiple,\n\t} );\n}\n"],
5
5
  "mappings": ";AAGA,SAAS,MAAM,YAAY;AAK3B,SAAS,QAAQ,gBAAgB;AACjC,SAAS,SAAS,qBAAqB;AACvC,SAAS,mBAAmB;AAC5B,SAAS,kCAAkC;AAK3C,SAAS,SAAS,mBAAmB;AACrC;AAAA,EACC,YAAY;AAAA,EACZ,WAAW;AAAA,OACL;AAEP,IAAM,OAAO,MAAM;AAAC;AAgBL,SAAR,YAA8B;AAAA,EACpC,iBAAiB,CAAC;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AAAA,EACA,UAAU;AAAA,EACV;AAAA,EACA;AAAA,EACA,WAAW;AACZ,GAAI;AACH,QAAM,EAAE,qBAAqB,IAAI,SAAU,aAAc;AACzD,QAAM,EAAE,gBAAgB,kBAAkB,IAAI,OAAQ,WAAY;AAClE,QAAM;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD,IAAI,SAAU,WAAY;AAE1B,QAAM,qBAAqB,kBAAkB,EAAE;AAC/C,QAAM,0BACL,OAAO,+BAA+B,2BAA2B;AAClE,QAAM,UAAU,gBAAiB,KAAK,CAAE;AACxC,sBACC,qBAAqB,kBAAkB,EAAE;AAC1C,QAAM,cAAc,eAAe;AAEnC,QAAM,gBACL,OAAO,aAAa,OAAO,WACxB,YAAY,KACZ,aAAa;AACjB,QAAM,gBAAgB,MAAM;AAC3B,qBAAkB,OAAQ;AAC1B,yBAAsB,OAAQ;AAAA,EAC/B;AAKA,MAAK,CAAE,yBAA0B;AAChC,mBAAgB,OAAQ;AACxB,uBAAoB,OAAQ;AAAA,EAC7B;AAEA,QAAM,WAAW,gBAAgB,EAAE,MAAM,cAAc,IAAI,CAAC;AAM5D,MAAK,CAAE,yBAA0B;AAChC,UAAM,gBAAgB,MAAM,KAAM,SAAU,EAAE;AAAA,MAC7C,CAAE,MAAO,GAAG,QAAQ;AAAA,IACrB;AACA,eAAY,aAAc;AAAA,EAC3B;AACA,MAAI,qBAAqB;AAEzB,cAAa;AAAA,IACZ;AAAA,IACA;AAAA,IACA,cAAc,CAAE,UAAW;AAC1B,qBAAgB,KAAM;AAKtB,YAAM,cAAc,MAAM,OAAQ,CAAE,UAAW,OAAO,EAAG;AACzD,UAAK,aAAa,QAAS;AAC1B,cAAM,kBAAkB;AACxB;AAAA,UACC;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QACD;AAAA,MACD;AAGA,UACC,CAAE,2BACF,YAAY,WAAW,MAAM,QAC5B;AACD,sBAAc;AAAA,MACf;AAGA,UAAK,CAAE,yBAA0B;AAChC,cAAM,iBAAiB,YAAY;AACnC,YAAK,iBAAiB,oBAAqB;AAC1C,uBAAc,iBAAiB,kBAAmB;AAClD,+BAAqB;AAAA,QACtB;AAAA,MACD;AAAA,IACD;AAAA,IACA;AAAA,IACA,gBAAgB;AAAA,MACf,GAAG;AAAA,MACH,GAAG;AAAA,IACJ;AAAA,IACA;AAAA,IACA,SAAS,CAAE,EAAE,QAAQ,MAAO;AAC3B,UAAK,CAAE,yBAA0B;AAChC,sBAAc;AAEd,qBAAc,CAAE;AAAA,MACjB;AACA,cAAS,OAAQ;AAAA,IAClB;AAAA,IACA;AAAA,IACA;AAAA,EACD,CAAE;AACH;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/utils/set-nested-value.js"],
4
- "sourcesContent": ["/**\n * Sets the value at path of object.\n * If a portion of path doesn\u2019t exist, it\u2019s created.\n * Arrays are created for missing index properties while objects are created\n * for all other missing properties.\n *\n * This function intentionally mutates the input object.\n *\n * Inspired by _.set().\n *\n * @see https://lodash.com/docs/4.17.15#set\n *\n * @todo Needs to be deduplicated with its copy in `@wordpress/core-data`.\n *\n * @param {Object} object Object to modify\n * @param {Array} path Path of the property to set.\n * @param {*} value Value to set.\n */\nexport default function setNestedValue( object, path, value ) {\n\tif ( ! object || typeof object !== 'object' ) {\n\t\treturn object;\n\t}\n\n\tpath.reduce( ( acc, key, idx ) => {\n\t\tif ( acc[ key ] === undefined ) {\n\t\t\tif ( Number.isInteger( path[ idx + 1 ] ) ) {\n\t\t\t\tacc[ key ] = [];\n\t\t\t} else {\n\t\t\t\tacc[ key ] = {};\n\t\t\t}\n\t\t}\n\t\tif ( idx === path.length - 1 ) {\n\t\t\tacc[ key ] = value;\n\t\t}\n\t\treturn acc[ key ];\n\t}, object );\n\n\treturn object;\n}\n"],
4
+ "sourcesContent": ["/**\n * Sets the value at path of object.\n * If a portion of path doesn’t exist, it’s created.\n * Arrays are created for missing index properties while objects are created\n * for all other missing properties.\n *\n * This function intentionally mutates the input object.\n *\n * Inspired by _.set().\n *\n * @see https://lodash.com/docs/4.17.15#set\n *\n * @todo Needs to be deduplicated with its copy in `@wordpress/core-data`.\n *\n * @param {Object} object Object to modify\n * @param {Array} path Path of the property to set.\n * @param {*} value Value to set.\n */\nexport default function setNestedValue( object, path, value ) {\n\tif ( ! object || typeof object !== 'object' ) {\n\t\treturn object;\n\t}\n\n\tpath.reduce( ( acc, key, idx ) => {\n\t\tif ( acc[ key ] === undefined ) {\n\t\t\tif ( Number.isInteger( path[ idx + 1 ] ) ) {\n\t\t\t\tacc[ key ] = [];\n\t\t\t} else {\n\t\t\t\tacc[ key ] = {};\n\t\t\t}\n\t\t}\n\t\tif ( idx === path.length - 1 ) {\n\t\t\tacc[ key ] = value;\n\t\t}\n\t\treturn acc[ key ];\n\t}, object );\n\n\treturn object;\n}\n"],
5
5
  "mappings": ";AAkBe,SAAR,eAAiC,QAAQ,MAAM,OAAQ;AAC7D,MAAK,CAAE,UAAU,OAAO,WAAW,UAAW;AAC7C,WAAO;AAAA,EACR;AAEA,OAAK,OAAQ,CAAE,KAAK,KAAK,QAAS;AACjC,QAAK,IAAK,GAAI,MAAM,QAAY;AAC/B,UAAK,OAAO,UAAW,KAAM,MAAM,CAAE,CAAE,GAAI;AAC1C,YAAK,GAAI,IAAI,CAAC;AAAA,MACf,OAAO;AACN,YAAK,GAAI,IAAI,CAAC;AAAA,MACf;AAAA,IACD;AACA,QAAK,QAAQ,KAAK,SAAS,GAAI;AAC9B,UAAK,GAAI,IAAI;AAAA,IACd;AACA,WAAO,IAAK,GAAI;AAAA,EACjB,GAAG,MAAO;AAEV,SAAO;AACR;",
6
6
  "names": []
7
7
  }