@wordpress/editor 14.48.0 → 14.48.2-next.v.202606191442.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 (509) hide show
  1. package/CHANGELOG.md +25 -1
  2. package/build/bindings/pattern-overrides.cjs +1 -1
  3. package/build/bindings/pattern-overrides.cjs.map +2 -2
  4. package/build/components/block-removal-warnings/index.cjs +0 -3
  5. package/build/components/block-removal-warnings/index.cjs.map +2 -2
  6. package/build/components/collab-sidebar/note-byline.cjs +1 -1
  7. package/build/components/collab-sidebar/note-byline.cjs.map +2 -2
  8. package/build/components/collab-sidebar/note-indicator-toolbar.cjs +49 -43
  9. package/build/components/collab-sidebar/note-indicator-toolbar.cjs.map +3 -3
  10. package/build/components/collab-sidebar/note.cjs +49 -17
  11. package/build/components/collab-sidebar/note.cjs.map +3 -3
  12. package/build/components/collab-sidebar/notes.cjs.map +1 -1
  13. package/build/components/collab-sidebar/utils.cjs +1 -1
  14. package/build/components/collab-sidebar/utils.cjs.map +2 -2
  15. package/build/components/collaborators-overlay/avatar-iframe-styles.cjs.map +1 -1
  16. package/build/components/collaborators-overlay/collaborator-styles.cjs.map +1 -1
  17. package/build/components/collaborators-overlay/compute-selection.cjs.map +1 -1
  18. package/build/components/collaborators-overlay/overlay-iframe-styles.cjs +1 -1
  19. package/build/components/collaborators-overlay/overlay-iframe-styles.cjs.map +1 -1
  20. package/build/components/collaborators-overlay/use-block-highlighting.cjs +1 -8
  21. package/build/components/collaborators-overlay/use-block-highlighting.cjs.map +3 -3
  22. package/build/components/collaborators-overlay/use-render-cursors.cjs +1 -7
  23. package/build/components/collaborators-overlay/use-render-cursors.cjs.map +3 -3
  24. package/build/components/collaborators-presence/avatar/component.cjs.map +2 -2
  25. package/build/components/collaborators-presence/avatar/use-image-loading-status.cjs.map +1 -1
  26. package/build/components/document-bar/index.cjs +7 -5
  27. package/build/components/document-bar/index.cjs.map +2 -2
  28. package/build/components/global-keyboard-shortcuts/index.cjs +3 -2
  29. package/build/components/global-keyboard-shortcuts/index.cjs.map +2 -2
  30. package/build/components/global-styles-sidebar/welcome-guide.cjs +3 -3
  31. package/build/components/global-styles-sidebar/welcome-guide.cjs.map +1 -1
  32. package/build/components/local-autosave-monitor/index.cjs +14 -15
  33. package/build/components/local-autosave-monitor/index.cjs.map +2 -2
  34. package/build/components/more-menu/view-more-menu-group.cjs +1 -2
  35. package/build/components/more-menu/view-more-menu-group.cjs.map +2 -2
  36. package/build/components/page-attributes/parent.cjs +2 -1
  37. package/build/components/page-attributes/parent.cjs.map +2 -2
  38. package/build/components/post-card-panel/index.cjs +1 -1
  39. package/build/components/post-card-panel/index.cjs.map +2 -2
  40. package/build/components/post-excerpt/panel.cjs +1 -1
  41. package/build/components/post-excerpt/panel.cjs.map +2 -2
  42. package/build/components/post-locked-modal/index.cjs +3 -3
  43. package/build/components/post-locked-modal/index.cjs.map +1 -1
  44. package/build/components/post-preview-button/index.cjs +2 -2
  45. package/build/components/post-preview-button/index.cjs.map +2 -2
  46. package/build/components/post-publish-button/index.cjs +115 -157
  47. package/build/components/post-publish-button/index.cjs.map +3 -3
  48. package/build/components/post-publish-button/label.cjs +2 -2
  49. package/build/components/post-publish-button/label.cjs.map +2 -2
  50. package/build/components/post-publish-panel/index.cjs.map +1 -1
  51. package/build/components/post-publish-panel/postpublish.cjs +1 -1
  52. package/build/components/post-publish-panel/postpublish.cjs.map +2 -2
  53. package/build/components/post-revisions-preview/block-diff.cjs +21 -9
  54. package/build/components/post-revisions-preview/block-diff.cjs.map +2 -2
  55. package/build/components/post-revisions-preview/diff-markers.cjs.map +2 -2
  56. package/build/components/post-revisions-preview/preserve-client-ids.cjs +2 -2
  57. package/build/components/post-revisions-preview/preserve-client-ids.cjs.map +2 -2
  58. package/build/components/post-revisions-preview/revisions-slider.cjs +1 -1
  59. package/build/components/post-revisions-preview/revisions-slider.cjs.map +2 -2
  60. package/build/components/post-revisions-timeline/index.cjs +173 -0
  61. package/build/components/post-revisions-timeline/index.cjs.map +7 -0
  62. package/build/components/post-saved-state/index.cjs +17 -26
  63. package/build/components/post-saved-state/index.cjs.map +2 -2
  64. package/build/components/post-schedule/label.cjs +5 -5
  65. package/build/components/post-schedule/label.cjs.map +1 -1
  66. package/build/components/post-taxonomies/flat-term-selector.cjs +2 -1
  67. package/build/components/post-taxonomies/flat-term-selector.cjs.map +3 -3
  68. package/build/components/post-taxonomies/hierarchical-term-selector.cjs +1 -1
  69. package/build/components/post-taxonomies/hierarchical-term-selector.cjs.map +2 -2
  70. package/build/components/post-text-editor/index.cjs +51 -0
  71. package/build/components/post-text-editor/index.cjs.map +2 -2
  72. package/build/components/post-text-editor/utils.cjs +150 -0
  73. package/build/components/post-text-editor/utils.cjs.map +7 -0
  74. package/build/components/post-url/index.cjs +1 -1
  75. package/build/components/post-url/index.cjs.map +2 -2
  76. package/build/components/post-view-link/index.cjs +1 -1
  77. package/build/components/post-view-link/index.cjs.map +2 -2
  78. package/build/components/provider/disable-non-page-content-blocks.cjs.map +1 -1
  79. package/build/components/provider/index.cjs +3 -1
  80. package/build/components/provider/index.cjs.map +3 -3
  81. package/build/components/provider/use-network-reconnect.cjs +51 -0
  82. package/build/components/provider/use-network-reconnect.cjs.map +7 -0
  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 +8 -4
  87. package/build/components/revision-fields-diff/index.cjs.map +2 -2
  88. package/build/components/sidebar/dataform-post-summary.cjs +125 -20
  89. package/build/components/sidebar/dataform-post-summary.cjs.map +3 -3
  90. package/build/components/sidebar/index.cjs +2 -15
  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 +1 -1
  95. package/build/components/sidebar/post-summary.cjs.map +2 -2
  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 +7 -1
  103. package/build/components/template-actions-panel/block-theme-content.cjs.map +2 -2
  104. package/build/components/template-actions-panel/index.cjs +0 -9
  105. package/build/components/template-actions-panel/index.cjs.map +3 -3
  106. package/build/components/template-validation-notice/index.cjs +1 -1
  107. package/build/components/template-validation-notice/index.cjs.map +1 -1
  108. package/build/components/upload-progress-snackbar/index.cjs +161 -0
  109. package/build/components/upload-progress-snackbar/index.cjs.map +7 -0
  110. package/build/components/upload-progress-snackbar/tracker.cjs +90 -0
  111. package/build/components/upload-progress-snackbar/tracker.cjs.map +7 -0
  112. package/build/components/visual-editor/edit-template-blocks-notification.cjs +1 -1
  113. package/build/components/visual-editor/edit-template-blocks-notification.cjs.map +1 -1
  114. package/build/{components/revision-author-panel → dataviews/fields/revisions}/index.cjs +18 -26
  115. package/build/dataviews/fields/revisions/index.cjs.map +7 -0
  116. package/build/dataviews/fields/revisions/revisions-view.cjs +74 -0
  117. package/build/dataviews/fields/revisions/revisions-view.cjs.map +7 -0
  118. package/build/dataviews/store/private-actions.cjs +14 -4
  119. package/build/dataviews/store/private-actions.cjs.map +3 -3
  120. package/build/hooks/push-changes-to-global-styles/index.cjs +1 -1
  121. package/build/hooks/push-changes-to-global-styles/index.cjs.map +1 -1
  122. package/build/private-apis.cjs +2 -0
  123. package/build/private-apis.cjs.map +3 -3
  124. package/build/store/actions.cjs +1 -1
  125. package/build/store/actions.cjs.map +2 -2
  126. package/build/store/private-selectors.cjs +6 -1
  127. package/build/store/private-selectors.cjs.map +2 -2
  128. package/build/store/selectors.cjs +1 -2
  129. package/build/store/selectors.cjs.map +2 -2
  130. package/build/utils/media-upload/index.cjs +16 -0
  131. package/build/utils/media-upload/index.cjs.map +3 -3
  132. package/build/utils/set-nested-value.cjs.map +1 -1
  133. package/build-module/bindings/pattern-overrides.mjs +1 -1
  134. package/build-module/bindings/pattern-overrides.mjs.map +2 -2
  135. package/build-module/components/block-removal-warnings/index.mjs +0 -3
  136. package/build-module/components/block-removal-warnings/index.mjs.map +2 -2
  137. package/build-module/components/collab-sidebar/note-byline.mjs +1 -1
  138. package/build-module/components/collab-sidebar/note-byline.mjs.map +2 -2
  139. package/build-module/components/collab-sidebar/note-indicator-toolbar.mjs +53 -44
  140. package/build-module/components/collab-sidebar/note-indicator-toolbar.mjs.map +2 -2
  141. package/build-module/components/collab-sidebar/note.mjs +50 -18
  142. package/build-module/components/collab-sidebar/note.mjs.map +2 -2
  143. package/build-module/components/collab-sidebar/notes.mjs.map +1 -1
  144. package/build-module/components/collab-sidebar/utils.mjs +1 -1
  145. package/build-module/components/collab-sidebar/utils.mjs.map +2 -2
  146. package/build-module/components/collaborators-overlay/avatar-iframe-styles.mjs.map +1 -1
  147. package/build-module/components/collaborators-overlay/collaborator-styles.mjs.map +1 -1
  148. package/build-module/components/collaborators-overlay/compute-selection.mjs.map +1 -1
  149. package/build-module/components/collaborators-overlay/overlay-iframe-styles.mjs +1 -1
  150. package/build-module/components/collaborators-overlay/overlay-iframe-styles.mjs.map +1 -1
  151. package/build-module/components/collaborators-overlay/use-block-highlighting.mjs +1 -8
  152. package/build-module/components/collaborators-overlay/use-block-highlighting.mjs.map +2 -2
  153. package/build-module/components/collaborators-overlay/use-render-cursors.mjs +1 -7
  154. package/build-module/components/collaborators-overlay/use-render-cursors.mjs.map +2 -2
  155. package/build-module/components/collaborators-presence/avatar/component.mjs.map +2 -2
  156. package/build-module/components/collaborators-presence/avatar/use-image-loading-status.mjs.map +1 -1
  157. package/build-module/components/document-bar/index.mjs +7 -5
  158. package/build-module/components/document-bar/index.mjs.map +2 -2
  159. package/build-module/components/global-keyboard-shortcuts/index.mjs +3 -2
  160. package/build-module/components/global-keyboard-shortcuts/index.mjs.map +2 -2
  161. package/build-module/components/global-styles-sidebar/welcome-guide.mjs +3 -3
  162. package/build-module/components/global-styles-sidebar/welcome-guide.mjs.map +1 -1
  163. package/build-module/components/local-autosave-monitor/index.mjs +15 -16
  164. package/build-module/components/local-autosave-monitor/index.mjs.map +2 -2
  165. package/build-module/components/more-menu/view-more-menu-group.mjs +1 -2
  166. package/build-module/components/more-menu/view-more-menu-group.mjs.map +2 -2
  167. package/build-module/components/page-attributes/parent.mjs +2 -1
  168. package/build-module/components/page-attributes/parent.mjs.map +2 -2
  169. package/build-module/components/post-card-panel/index.mjs +1 -1
  170. package/build-module/components/post-card-panel/index.mjs.map +2 -2
  171. package/build-module/components/post-excerpt/panel.mjs +1 -1
  172. package/build-module/components/post-excerpt/panel.mjs.map +2 -2
  173. package/build-module/components/post-locked-modal/index.mjs +3 -3
  174. package/build-module/components/post-locked-modal/index.mjs.map +1 -1
  175. package/build-module/components/post-preview-button/index.mjs +2 -2
  176. package/build-module/components/post-preview-button/index.mjs.map +2 -2
  177. package/build-module/components/post-publish-button/index.mjs +117 -159
  178. package/build-module/components/post-publish-button/index.mjs.map +2 -2
  179. package/build-module/components/post-publish-button/label.mjs +2 -2
  180. package/build-module/components/post-publish-button/label.mjs.map +2 -2
  181. package/build-module/components/post-publish-panel/index.mjs.map +1 -1
  182. package/build-module/components/post-publish-panel/postpublish.mjs +1 -1
  183. package/build-module/components/post-publish-panel/postpublish.mjs.map +2 -2
  184. package/build-module/components/post-revisions-preview/block-diff.mjs +20 -8
  185. package/build-module/components/post-revisions-preview/block-diff.mjs.map +2 -2
  186. package/build-module/components/post-revisions-preview/diff-markers.mjs.map +2 -2
  187. package/build-module/components/post-revisions-preview/preserve-client-ids.mjs +1 -1
  188. package/build-module/components/post-revisions-preview/preserve-client-ids.mjs.map +1 -1
  189. package/build-module/components/post-revisions-preview/revisions-slider.mjs +1 -1
  190. package/build-module/components/post-revisions-preview/revisions-slider.mjs.map +2 -2
  191. package/build-module/components/post-revisions-timeline/index.mjs +152 -0
  192. package/build-module/components/post-revisions-timeline/index.mjs.map +7 -0
  193. package/build-module/components/post-saved-state/index.mjs +17 -26
  194. package/build-module/components/post-saved-state/index.mjs.map +2 -2
  195. package/build-module/components/post-schedule/label.mjs +5 -5
  196. package/build-module/components/post-schedule/label.mjs.map +1 -1
  197. package/build-module/components/post-taxonomies/flat-term-selector.mjs +3 -6
  198. package/build-module/components/post-taxonomies/flat-term-selector.mjs.map +2 -2
  199. package/build-module/components/post-taxonomies/hierarchical-term-selector.mjs +1 -1
  200. package/build-module/components/post-taxonomies/hierarchical-term-selector.mjs.map +2 -2
  201. package/build-module/components/post-text-editor/index.mjs +51 -0
  202. package/build-module/components/post-text-editor/index.mjs.map +2 -2
  203. package/build-module/components/post-text-editor/utils.mjs +123 -0
  204. package/build-module/components/post-text-editor/utils.mjs.map +7 -0
  205. package/build-module/components/post-url/index.mjs +1 -1
  206. package/build-module/components/post-url/index.mjs.map +2 -2
  207. package/build-module/components/post-view-link/index.mjs +1 -1
  208. package/build-module/components/post-view-link/index.mjs.map +2 -2
  209. package/build-module/components/provider/disable-non-page-content-blocks.mjs.map +1 -1
  210. package/build-module/components/provider/index.mjs +3 -1
  211. package/build-module/components/provider/index.mjs.map +2 -2
  212. package/build-module/components/provider/use-network-reconnect.mjs +30 -0
  213. package/build-module/components/provider/use-network-reconnect.mjs.map +7 -0
  214. package/build-module/components/resizable-editor/resize-handle.mjs.map +2 -2
  215. package/build-module/components/revision-diff-panel/index.mjs +7 -2
  216. package/build-module/components/revision-diff-panel/index.mjs.map +2 -2
  217. package/build-module/components/revision-fields-diff/index.mjs +8 -4
  218. package/build-module/components/revision-fields-diff/index.mjs.map +2 -2
  219. package/build-module/components/sidebar/dataform-post-summary.mjs +125 -20
  220. package/build-module/components/sidebar/dataform-post-summary.mjs.map +2 -2
  221. package/build-module/components/sidebar/index.mjs +3 -22
  222. package/build-module/components/sidebar/index.mjs.map +2 -2
  223. package/build-module/components/sidebar/post-revision-summary.mjs +11 -17
  224. package/build-module/components/sidebar/post-revision-summary.mjs.map +2 -2
  225. package/build-module/components/sidebar/post-summary.mjs +1 -1
  226. package/build-module/components/sidebar/post-summary.mjs.map +2 -2
  227. package/build-module/components/style-book/examples.mjs +1 -1
  228. package/build-module/components/style-book/examples.mjs.map +1 -1
  229. package/build-module/components/style-book/index.mjs +1 -1
  230. package/build-module/components/style-book/index.mjs.map +2 -2
  231. package/build-module/components/sync-connection-error-modal/index.mjs +3 -3
  232. package/build-module/components/sync-connection-error-modal/index.mjs.map +1 -1
  233. package/build-module/components/template-actions-panel/block-theme-content.mjs +7 -1
  234. package/build-module/components/template-actions-panel/block-theme-content.mjs.map +2 -2
  235. package/build-module/components/template-actions-panel/index.mjs +0 -9
  236. package/build-module/components/template-actions-panel/index.mjs.map +2 -2
  237. package/build-module/components/template-validation-notice/index.mjs +1 -1
  238. package/build-module/components/template-validation-notice/index.mjs.map +1 -1
  239. package/build-module/components/upload-progress-snackbar/index.mjs +135 -0
  240. package/build-module/components/upload-progress-snackbar/index.mjs.map +7 -0
  241. package/build-module/components/upload-progress-snackbar/tracker.mjs +61 -0
  242. package/build-module/components/upload-progress-snackbar/tracker.mjs.map +7 -0
  243. package/build-module/components/visual-editor/edit-template-blocks-notification.mjs +1 -1
  244. package/build-module/components/visual-editor/edit-template-blocks-notification.mjs.map +1 -1
  245. package/build-module/dataviews/fields/revisions/index.mjs +20 -0
  246. package/build-module/dataviews/fields/revisions/index.mjs.map +7 -0
  247. package/build-module/dataviews/fields/revisions/revisions-view.mjs +53 -0
  248. package/build-module/dataviews/fields/revisions/revisions-view.mjs.map +7 -0
  249. package/build-module/dataviews/store/private-actions.mjs +23 -7
  250. package/build-module/dataviews/store/private-actions.mjs.map +2 -2
  251. package/build-module/hooks/push-changes-to-global-styles/index.mjs +1 -1
  252. package/build-module/hooks/push-changes-to-global-styles/index.mjs.map +1 -1
  253. package/build-module/private-apis.mjs +2 -0
  254. package/build-module/private-apis.mjs.map +2 -2
  255. package/build-module/store/actions.mjs +1 -1
  256. package/build-module/store/actions.mjs.map +2 -2
  257. package/build-module/store/private-selectors.mjs +7 -1
  258. package/build-module/store/private-selectors.mjs.map +2 -2
  259. package/build-module/store/selectors.mjs +1 -2
  260. package/build-module/store/selectors.mjs.map +2 -2
  261. package/build-module/utils/media-upload/index.mjs +19 -0
  262. package/build-module/utils/media-upload/index.mjs.map +2 -2
  263. package/build-module/utils/set-nested-value.mjs.map +1 -1
  264. package/build-style/style-rtl.css +707 -270
  265. package/build-style/style.css +707 -270
  266. package/build-types/components/block-removal-warnings/index.d.ts.map +1 -1
  267. package/build-types/components/collab-sidebar/note-byline.d.ts +0 -3
  268. package/build-types/components/collab-sidebar/note-byline.d.ts.map +1 -1
  269. package/build-types/components/collab-sidebar/note-indicator-toolbar.d.ts.map +1 -1
  270. package/build-types/components/collab-sidebar/note.d.ts.map +1 -1
  271. package/build-types/components/collaborators-overlay/use-block-highlighting.d.ts +0 -3
  272. package/build-types/components/collaborators-overlay/use-block-highlighting.d.ts.map +1 -1
  273. package/build-types/components/collaborators-overlay/use-render-cursors.d.ts.map +1 -1
  274. package/build-types/components/collaborators-presence/avatar/component.d.ts.map +1 -1
  275. package/build-types/components/document-bar/index.d.ts.map +1 -1
  276. package/build-types/components/global-keyboard-shortcuts/index.d.ts.map +1 -1
  277. package/build-types/components/local-autosave-monitor/index.d.ts.map +1 -1
  278. package/build-types/components/more-menu/view-more-menu-group.d.ts.map +1 -1
  279. package/build-types/components/page-attributes/parent.d.ts.map +1 -1
  280. package/build-types/components/post-publish-button/index.d.ts +9 -9
  281. package/build-types/components/post-publish-button/index.d.ts.map +1 -1
  282. package/build-types/components/post-revisions-preview/block-diff.d.ts +3 -0
  283. package/build-types/components/post-revisions-preview/block-diff.d.ts.map +1 -1
  284. package/build-types/components/post-revisions-preview/diff-markers.d.ts.map +1 -1
  285. package/build-types/components/post-revisions-timeline/index.d.ts +2 -0
  286. package/build-types/components/post-revisions-timeline/index.d.ts.map +1 -0
  287. package/build-types/components/post-saved-state/index.d.ts.map +1 -1
  288. package/build-types/components/post-taxonomies/flat-term-selector.d.ts.map +1 -1
  289. package/build-types/components/post-text-editor/index.d.ts.map +1 -1
  290. package/build-types/components/post-text-editor/utils.d.ts +29 -0
  291. package/build-types/components/post-text-editor/utils.d.ts.map +1 -0
  292. package/build-types/components/provider/index.d.ts.map +1 -1
  293. package/build-types/components/provider/use-network-reconnect.d.ts +8 -0
  294. package/build-types/components/provider/use-network-reconnect.d.ts.map +1 -0
  295. package/build-types/components/resizable-editor/resize-handle.d.ts.map +1 -1
  296. package/build-types/components/revision-diff-panel/index.d.ts +3 -1
  297. package/build-types/components/revision-diff-panel/index.d.ts.map +1 -1
  298. package/build-types/components/revision-fields-diff/index.d.ts +3 -0
  299. package/build-types/components/revision-fields-diff/index.d.ts.map +1 -1
  300. package/build-types/components/sidebar/dataform-post-summary.d.ts.map +1 -1
  301. package/build-types/components/sidebar/index.d.ts.map +1 -1
  302. package/build-types/components/sidebar/post-revision-summary.d.ts.map +1 -1
  303. package/build-types/components/template-actions-panel/block-theme-content.d.ts.map +1 -1
  304. package/build-types/components/template-actions-panel/index.d.ts.map +1 -1
  305. package/build-types/components/upload-progress-snackbar/index.d.ts +19 -0
  306. package/build-types/components/upload-progress-snackbar/index.d.ts.map +1 -0
  307. package/build-types/components/upload-progress-snackbar/stories/index.story.d.ts +28 -0
  308. package/build-types/components/upload-progress-snackbar/stories/index.story.d.ts.map +1 -0
  309. package/build-types/components/upload-progress-snackbar/tracker.d.ts +41 -0
  310. package/build-types/components/upload-progress-snackbar/tracker.d.ts.map +1 -0
  311. package/build-types/dataviews/fields/revisions/index.d.ts +8 -0
  312. package/build-types/dataviews/fields/revisions/index.d.ts.map +1 -0
  313. package/build-types/dataviews/fields/revisions/revisions-view.d.ts +2 -0
  314. package/build-types/dataviews/fields/revisions/revisions-view.d.ts.map +1 -0
  315. package/build-types/dataviews/store/private-actions.d.ts.map +1 -1
  316. package/build-types/private-apis.d.ts.map +1 -1
  317. package/build-types/store/private-selectors.d.ts +1 -1
  318. package/build-types/store/private-selectors.d.ts.map +1 -1
  319. package/build-types/store/selectors.d.ts +1 -1
  320. package/build-types/store/selectors.d.ts.map +1 -1
  321. package/build-types/utils/get-template-part-icon.d.ts.map +1 -1
  322. package/build-types/utils/media-upload/index.d.ts.map +1 -1
  323. package/package.json +59 -50
  324. package/src/bindings/pattern-overrides.js +1 -1
  325. package/src/bindings/test/pattern-overrides.js +65 -0
  326. package/src/components/README.md +1 -1
  327. package/src/components/block-removal-warnings/index.js +0 -7
  328. package/src/components/collab-sidebar/note-byline.js +0 -1
  329. package/src/components/collab-sidebar/note-indicator-toolbar.js +73 -60
  330. package/src/components/collab-sidebar/note.js +64 -29
  331. package/src/components/collab-sidebar/style.scss +20 -0
  332. package/src/components/collaborators-overlay/use-block-highlighting.ts +0 -9
  333. package/src/components/collaborators-overlay/use-render-cursors.ts +0 -8
  334. package/src/components/collaborators-presence/avatar/component.tsx +0 -1
  335. package/src/components/collaborators-presence/avatar/test/index.tsx +8 -4
  336. package/src/components/document-bar/index.js +8 -3
  337. package/src/components/document-bar/style.scss +4 -2
  338. package/src/components/global-keyboard-shortcuts/index.js +2 -1
  339. package/src/components/local-autosave-monitor/index.js +23 -21
  340. package/src/components/more-menu/view-more-menu-group.js +1 -2
  341. package/src/components/page-attributes/parent.js +1 -0
  342. package/src/components/post-card-panel/index.js +1 -1
  343. package/src/components/post-publish-button/index.js +146 -192
  344. package/src/components/post-publish-button/test/index.js +149 -113
  345. package/src/components/post-revisions-preview/block-diff.js +63 -19
  346. package/src/components/post-revisions-preview/diff-markers.js +0 -1
  347. package/src/components/post-revisions-preview/preserve-client-ids.js +1 -1
  348. package/src/components/post-revisions-preview/test/block-diff.js +109 -6
  349. package/src/components/post-revisions-timeline/index.js +186 -0
  350. package/src/components/post-revisions-timeline/style.scss +43 -0
  351. package/src/components/post-saved-state/index.js +23 -26
  352. package/src/components/post-saved-state/test/index.js +18 -0
  353. package/src/components/post-taxonomies/flat-term-selector.js +4 -7
  354. package/src/components/post-text-editor/index.js +65 -0
  355. package/src/components/post-text-editor/test/utils.js +210 -0
  356. package/src/components/post-text-editor/utils.js +204 -0
  357. package/src/components/post-type-support-check/test/index.js +11 -0
  358. package/src/components/post-url/index.js +1 -1
  359. package/src/components/post-view-link/index.js +1 -1
  360. package/src/components/post-view-link/test/index.js +71 -0
  361. package/src/components/provider/index.js +6 -1
  362. package/src/components/provider/test/use-network-reconnect.js +137 -0
  363. package/src/components/provider/use-network-reconnect.js +44 -0
  364. package/src/components/resizable-editor/resize-handle.js +0 -1
  365. package/src/components/revision-diff-panel/index.js +8 -2
  366. package/src/components/revision-fields-diff/index.js +19 -3
  367. package/src/components/sidebar/dataform-post-summary.js +196 -25
  368. package/src/components/sidebar/index.js +4 -23
  369. package/src/components/sidebar/post-revision-summary.js +8 -15
  370. package/src/components/sidebar/post-summary.js +1 -1
  371. package/src/components/style-book/index.js +1 -1
  372. package/src/components/template-actions-panel/block-theme-content.js +10 -2
  373. package/src/components/template-actions-panel/index.js +0 -15
  374. package/src/components/upload-progress-snackbar/README.md +26 -0
  375. package/src/components/upload-progress-snackbar/index.js +216 -0
  376. package/src/components/upload-progress-snackbar/stories/index.story.tsx +85 -0
  377. package/src/components/upload-progress-snackbar/style.scss +30 -0
  378. package/src/components/upload-progress-snackbar/test/index.js +199 -0
  379. package/src/components/upload-progress-snackbar/tracker.js +105 -0
  380. package/src/dataviews/fields/revisions/index.tsx +28 -0
  381. package/src/dataviews/fields/revisions/revisions-view.tsx +59 -0
  382. package/src/dataviews/store/private-actions.ts +27 -6
  383. package/src/private-apis.js +2 -0
  384. package/src/store/private-selectors.js +11 -1
  385. package/src/store/selectors.js +1 -3
  386. package/src/store/test/private-selectors.js +69 -0
  387. package/src/style.scss +2 -1
  388. package/src/utils/media-upload/index.js +27 -0
  389. package/build/components/post-revisions-panel/index.cjs +0 -173
  390. package/build/components/post-revisions-panel/index.cjs.map +0 -7
  391. package/build/components/revision-author-panel/index.cjs.map +0 -7
  392. package/build/components/revision-created-panel/index.cjs +0 -47
  393. package/build/components/revision-created-panel/index.cjs.map +0 -7
  394. package/build-module/components/post-revisions-panel/index.mjs +0 -148
  395. package/build-module/components/post-revisions-panel/index.mjs.map +0 -7
  396. package/build-module/components/revision-author-panel/index.mjs +0 -28
  397. package/build-module/components/revision-author-panel/index.mjs.map +0 -7
  398. package/build-module/components/revision-created-panel/index.mjs +0 -26
  399. package/build-module/components/revision-created-panel/index.mjs.map +0 -7
  400. package/build-types/components/post-revisions-panel/index.d.ts +0 -2
  401. package/build-types/components/post-revisions-panel/index.d.ts.map +0 -1
  402. package/build-types/components/revision-author-panel/index.d.ts +0 -2
  403. package/build-types/components/revision-author-panel/index.d.ts.map +0 -1
  404. package/build-types/components/revision-created-panel/index.d.ts +0 -2
  405. package/build-types/components/revision-created-panel/index.d.ts.map +0 -1
  406. package/src/components/commands/index.native.js +0 -2
  407. package/src/components/deprecated.native.js +0 -47
  408. package/src/components/editor-help/add-blocks.native.js +0 -40
  409. package/src/components/editor-help/customize-blocks.native.js +0 -40
  410. package/src/components/editor-help/help-detail-navigation-screen.native.js +0 -67
  411. package/src/components/editor-help/help-get-support-button.native.js +0 -38
  412. package/src/components/editor-help/help-section-title.native.js +0 -29
  413. package/src/components/editor-help/help-topic-row.native.js +0 -33
  414. package/src/components/editor-help/icon-move-blocks.native.js +0 -10
  415. package/src/components/editor-help/images/add-dark.png +0 -0
  416. package/src/components/editor-help/images/add-dark@2x.png +0 -0
  417. package/src/components/editor-help/images/add-dark@3x.png +0 -0
  418. package/src/components/editor-help/images/add-light.png +0 -0
  419. package/src/components/editor-help/images/add-light@2x.png +0 -0
  420. package/src/components/editor-help/images/add-light@3x.png +0 -0
  421. package/src/components/editor-help/images/block-layout-collage.png +0 -0
  422. package/src/components/editor-help/images/block-layout-collage@2x.png +0 -0
  423. package/src/components/editor-help/images/block-layout-collage@3x.png +0 -0
  424. package/src/components/editor-help/images/build-layouts-dark.png +0 -0
  425. package/src/components/editor-help/images/build-layouts-dark@2x.png +0 -0
  426. package/src/components/editor-help/images/build-layouts-dark@3x.png +0 -0
  427. package/src/components/editor-help/images/build-layouts-light.png +0 -0
  428. package/src/components/editor-help/images/build-layouts-light@2x.png +0 -0
  429. package/src/components/editor-help/images/build-layouts-light@3x.png +0 -0
  430. package/src/components/editor-help/images/drag-and-drop-dark.png +0 -0
  431. package/src/components/editor-help/images/drag-and-drop-dark@2x.png +0 -0
  432. package/src/components/editor-help/images/drag-and-drop-dark@3x.png +0 -0
  433. package/src/components/editor-help/images/drag-and-drop-light.png +0 -0
  434. package/src/components/editor-help/images/drag-and-drop-light@2x.png +0 -0
  435. package/src/components/editor-help/images/drag-and-drop-light@3x.png +0 -0
  436. package/src/components/editor-help/images/edit-media-dark.png +0 -0
  437. package/src/components/editor-help/images/edit-media-dark@2x.png +0 -0
  438. package/src/components/editor-help/images/edit-media-dark@3x.png +0 -0
  439. package/src/components/editor-help/images/edit-media-light.png +0 -0
  440. package/src/components/editor-help/images/edit-media-light@2x.png +0 -0
  441. package/src/components/editor-help/images/edit-media-light@3x.png +0 -0
  442. package/src/components/editor-help/images/embed-media-dark.png +0 -0
  443. package/src/components/editor-help/images/embed-media-dark@2x.png +0 -0
  444. package/src/components/editor-help/images/embed-media-dark@3x.png +0 -0
  445. package/src/components/editor-help/images/embed-media-light.png +0 -0
  446. package/src/components/editor-help/images/embed-media-light@2x.png +0 -0
  447. package/src/components/editor-help/images/embed-media-light@3x.png +0 -0
  448. package/src/components/editor-help/images/move-dark.png +0 -0
  449. package/src/components/editor-help/images/move-dark@2x.png +0 -0
  450. package/src/components/editor-help/images/move-dark@3x.png +0 -0
  451. package/src/components/editor-help/images/move-light.png +0 -0
  452. package/src/components/editor-help/images/move-light@2x.png +0 -0
  453. package/src/components/editor-help/images/move-light@3x.png +0 -0
  454. package/src/components/editor-help/images/options-dark.png +0 -0
  455. package/src/components/editor-help/images/options-dark@2x.png +0 -0
  456. package/src/components/editor-help/images/options-dark@3x.png +0 -0
  457. package/src/components/editor-help/images/options-light.png +0 -0
  458. package/src/components/editor-help/images/options-light@2x.png +0 -0
  459. package/src/components/editor-help/images/options-light@3x.png +0 -0
  460. package/src/components/editor-help/images/rich-text-dark.png +0 -0
  461. package/src/components/editor-help/images/rich-text-dark@2x.png +0 -0
  462. package/src/components/editor-help/images/rich-text-dark@3x.png +0 -0
  463. package/src/components/editor-help/images/rich-text-light.png +0 -0
  464. package/src/components/editor-help/images/rich-text-light@2x.png +0 -0
  465. package/src/components/editor-help/images/rich-text-light@3x.png +0 -0
  466. package/src/components/editor-help/images/settings-dark.png +0 -0
  467. package/src/components/editor-help/images/settings-dark@2x.png +0 -0
  468. package/src/components/editor-help/images/settings-dark@3x.png +0 -0
  469. package/src/components/editor-help/images/settings-light.png +0 -0
  470. package/src/components/editor-help/images/settings-light@2x.png +0 -0
  471. package/src/components/editor-help/images/settings-light@3x.png +0 -0
  472. package/src/components/editor-help/index.native.js +0 -208
  473. package/src/components/editor-help/intro-to-blocks.native.js +0 -91
  474. package/src/components/editor-help/move-blocks.native.js +0 -55
  475. package/src/components/editor-help/remove-blocks.native.js +0 -35
  476. package/src/components/editor-help/style.android.scss +0 -6
  477. package/src/components/editor-help/style.ios.scss +0 -6
  478. package/src/components/editor-help/style.scss +0 -123
  479. package/src/components/editor-help/test/index.native.js +0 -81
  480. package/src/components/editor-help/view-sections.native.js +0 -79
  481. package/src/components/error-boundary/index.native.js +0 -192
  482. package/src/components/error-boundary/style.native.scss +0 -116
  483. package/src/components/index.native.js +0 -15
  484. package/src/components/offline-status/index.native.js +0 -99
  485. package/src/components/offline-status/style.native.scss +0 -28
  486. package/src/components/offline-status/test/index.native.js +0 -108
  487. package/src/components/post-revisions-panel/index.js +0 -161
  488. package/src/components/post-revisions-panel/style.scss +0 -16
  489. package/src/components/post-title/index.native.js +0 -282
  490. package/src/components/post-title/style.native.scss +0 -13
  491. package/src/components/post-title/test/__snapshots__/index.native.js.snap +0 -25
  492. package/src/components/post-title/test/index.native.js +0 -78
  493. package/src/components/provider/index.native.js +0 -497
  494. package/src/components/provider/use-block-editor-settings.native.js +0 -48
  495. package/src/components/revision-author-panel/index.js +0 -36
  496. package/src/components/revision-created-panel/index.js +0 -36
  497. package/src/components/template-part-menu-items/index.native.js +0 -3
  498. package/src/hooks/index.native.js +0 -0
  499. package/src/index.native.js +0 -16
  500. package/src/private-apis.native.js +0 -33
  501. package/src/store/actions.native.js +0 -27
  502. package/src/store/reducer.native.js +0 -94
  503. package/src/store/selectors.native.js +0 -57
  504. package/src/store/test/actions.native.js +0 -16
  505. package/src/store/test/reducer.native.js +0 -36
  506. package/src/store/test/selectors.native.js +0 -28
  507. package/src/utils/index.native.js +0 -6
  508. package/src/utils/media-sideload/index.native.js +0 -1
  509. package/src/utils/media-upload/index.native.js +0 -1
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/post-preview-button/index.js"],
4
- "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { renderToString } from '@wordpress/element';\nimport { Button, Path, SVG } from '@wordpress/components';\nimport { __, _x } from '@wordpress/i18n';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { applyFilters } from '@wordpress/hooks';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { VisuallyHidden } from '@wordpress/ui';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nfunction writeInterstitialMessage( targetDocument ) {\n\tlet markup = renderToString(\n\t\t<div className=\"editor-post-preview-button__interstitial-message\">\n\t\t\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 96 96\">\n\t\t\t\t<Path\n\t\t\t\t\tclassName=\"outer\"\n\t\t\t\t\td=\"M48 12c19.9 0 36 16.1 36 36S67.9 84 48 84 12 67.9 12 48s16.1-36 36-36\"\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t/>\n\t\t\t\t<Path\n\t\t\t\t\tclassName=\"inner\"\n\t\t\t\t\td=\"M69.5 46.4c0-3.9-1.4-6.7-2.6-8.8-1.6-2.6-3.1-4.9-3.1-7.5 0-2.9 2.2-5.7 5.4-5.7h.4C63.9 19.2 56.4 16 48 16c-11.2 0-21 5.7-26.7 14.4h2.1c3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3L40 67.5l7-20.9L42 33c-1.7-.1-3.3-.3-3.3-.3-1.7-.1-1.5-2.7.2-2.6 0 0 5.3.4 8.4.4 3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3l11.5 34.3 3.3-10.4c1.6-4.5 2.4-7.8 2.4-10.5zM16.1 48c0 12.6 7.3 23.5 18 28.7L18.8 35c-1.7 4-2.7 8.4-2.7 13zm32.5 2.8L39 78.6c2.9.8 5.9 1.3 9 1.3 3.7 0 7.3-.6 10.6-1.8-.1-.1-.2-.3-.2-.4l-9.8-26.9zM76.2 36c0 3.2-.6 6.9-2.4 11.4L64 75.6c9.5-5.5 15.9-15.8 15.9-27.6 0-5.5-1.4-10.8-3.9-15.3.1 1 .2 2.1.2 3.3z\"\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t/>\n\t\t\t</SVG>\n\t\t\t<p>{ __( 'Generating preview\u2026' ) }</p>\n\t\t</div>\n\t);\n\n\tmarkup += `\n\t\t<style>\n\t\t\tbody {\n\t\t\t\tmargin: 0;\n\t\t\t}\n\t\t\t.editor-post-preview-button__interstitial-message {\n\t\t\t\tdisplay: flex;\n\t\t\t\tflex-direction: column;\n\t\t\t\talign-items: center;\n\t\t\t\tjustify-content: center;\n\t\t\t\theight: 100vh;\n\t\t\t\twidth: 100vw;\n\t\t\t}\n\t\t\t@-webkit-keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t@-moz-keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t@-o-keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t@keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t.editor-post-preview-button__interstitial-message svg {\n\t\t\t\twidth: 192px;\n\t\t\t\theight: 192px;\n\t\t\t\tstroke: #555d66;\n\t\t\t\tstroke-width: 0.75;\n\t\t\t}\n\t\t\t.editor-post-preview-button__interstitial-message svg .outer,\n\t\t\t.editor-post-preview-button__interstitial-message svg .inner {\n\t\t\t\tstroke-dasharray: 280;\n\t\t\t\tstroke-dashoffset: 280;\n\t\t\t\t-webkit-animation: paint 1.5s ease infinite alternate;\n\t\t\t\t-moz-animation: paint 1.5s ease infinite alternate;\n\t\t\t\t-o-animation: paint 1.5s ease infinite alternate;\n\t\t\t\tanimation: paint 1.5s ease infinite alternate;\n\t\t\t}\n\t\t\tp {\n\t\t\t\ttext-align: center;\n\t\t\t\tfont-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Oxygen-Sans, Ubuntu, Cantarell, \"Helvetica Neue\", sans-serif;\n\t\t\t}\n\t\t</style>\n\t`;\n\n\t/**\n\t * Filters the interstitial message shown when generating previews.\n\t *\n\t * @param {string} markup The preview interstitial markup.\n\t */\n\tmarkup = applyFilters( 'editor.PostPreview.interstitialMarkup', markup );\n\n\ttargetDocument.write( markup );\n\ttargetDocument.title = __( 'Generating preview\u2026' );\n\ttargetDocument.close();\n}\n\n/**\n * Renders a button that opens a new window or tab for the preview,\n * writes the interstitial message to this window, and then navigates\n * to the actual preview link. The button is not rendered if the post\n * is not viewable and disabled if the post is not saveable.\n *\n * @param {Object} props The component props.\n * @param {string} props.className The class name for the button.\n * @param {string} props.textContent The text content for the button.\n * @param {boolean} props.forceIsAutosaveable Whether to force autosave.\n * @param {string} props.role The role attribute for the button.\n * @param {Function} props.onPreview The callback function for preview event.\n *\n * @return {React.ReactNode} The rendered button component.\n */\nexport default function PostPreviewButton( {\n\tclassName,\n\ttextContent,\n\tforceIsAutosaveable,\n\trole,\n\tonPreview,\n} ) {\n\tconst { postId, currentPostLink, previewLink, isSaveable, isViewable } =\n\t\tuseSelect( ( select ) => {\n\t\t\tconst editor = select( editorStore );\n\t\t\tconst core = select( coreStore );\n\n\t\t\tconst postType = core.getPostType(\n\t\t\t\teditor.getCurrentPostType( 'type' )\n\t\t\t);\n\t\t\tconst canView = postType?.viewable ?? false;\n\t\t\tif ( ! canView ) {\n\t\t\t\treturn { isViewable: canView };\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tpostId: editor.getCurrentPostId(),\n\t\t\t\tcurrentPostLink: editor.getCurrentPostAttribute( 'link' ),\n\t\t\t\tpreviewLink: editor.getEditedPostPreviewLink(),\n\t\t\t\tisSaveable: editor.isEditedPostSaveable(),\n\t\t\t\tisViewable: canView,\n\t\t\t};\n\t\t}, [] );\n\n\tconst { __unstableSaveForPreview } = useDispatch( editorStore );\n\n\tif ( ! isViewable ) {\n\t\treturn null;\n\t}\n\n\tconst targetId = `wp-preview-${ postId }`;\n\n\tconst openPreviewWindow = async ( event ) => {\n\t\t// Our Preview button has its 'href' and 'target' set correctly for a11y\n\t\t// purposes. Unfortunately, though, we can't rely on the default 'click'\n\t\t// handler since sometimes it incorrectly opens a new tab instead of reusing\n\t\t// the existing one.\n\t\t// https://github.com/WordPress/gutenberg/pull/8330\n\t\tevent.preventDefault();\n\n\t\t// Open up a Preview tab if needed. This is where we'll show the preview.\n\t\tconst previewWindow = window.open( '', targetId );\n\n\t\t// Focus the Preview tab. This might not do anything, depending on the browser's\n\t\t// and user's preferences.\n\t\t// https://html.spec.whatwg.org/multipage/interaction.html#dom-window-focus\n\t\tpreviewWindow.focus();\n\n\t\twriteInterstitialMessage( previewWindow.document );\n\n\t\tconst link = await __unstableSaveForPreview( { forceIsAutosaveable } );\n\n\t\tpreviewWindow.location = link;\n\n\t\tonPreview?.();\n\t};\n\n\t// Link to the `?preview=true` URL if we have it, since this lets us see\n\t// changes that were autosaved since the post was last published. Otherwise,\n\t// just link to the post's URL.\n\tconst href = previewLink || currentPostLink;\n\n\treturn (\n\t\t<Button\n\t\t\tvariant={ ! className ? 'tertiary' : undefined }\n\t\t\tclassName={ className || 'editor-post-preview' }\n\t\t\thref={ href }\n\t\t\ttarget={ targetId }\n\t\t\taccessibleWhenDisabled\n\t\t\tdisabled={ ! isSaveable }\n\t\t\tonClick={ openPreviewWindow }\n\t\t\trole={ role }\n\t\t\tsize=\"compact\"\n\t\t>\n\t\t\t{ textContent || (\n\t\t\t\t<>\n\t\t\t\t\t{ _x( 'Preview', 'imperative verb' ) }\n\t\t\t\t\t<VisuallyHidden render={ <span /> }>\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t/* translators: accessibility text */\n\t\t\t\t\t\t\t__( '(opens in a new tab)' )\n\t\t\t\t\t\t}\n\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t</>\n\t\t\t) }\n\t\t</Button>\n\t);\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAA+B;AAC/B,wBAAkC;AAClC,kBAAuB;AACvB,kBAAuC;AACvC,mBAA6B;AAC7B,uBAAmC;AACnC,gBAA+B;AAK/B,mBAAqC;AAKlC;AAHH,SAAS,yBAA0B,gBAAiB;AACnD,MAAI,aAAS;AAAA,IACZ,6CAAC,SAAI,WAAU,oDACd;AAAA,mDAAC,yBAAI,OAAM,8BAA6B,SAAQ,aAC/C;AAAA;AAAA,UAAC;AAAA;AAAA,YACA,WAAU;AAAA,YACV,GAAE;AAAA,YACF,MAAK;AAAA;AAAA,QACN;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACA,WAAU;AAAA,YACV,GAAE;AAAA,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Y;AAE9D,MAAK,CAAE,YAAa;AACnB,WAAO;AAAA,EACR;AAEA,QAAM,WAAW,cAAe,MAAO;AAEvC,QAAM,oBAAoB,OAAQ,UAAW;AAM5C,UAAM,eAAe;AAGrB,UAAM,gBAAgB,OAAO,KAAM,IAAI,QAAS;AAKhD,kBAAc,MAAM;AAEpB,6BAA0B,cAAc,QAAS;AAEjD,UAAM,OAAO,MAAM,yBAA0B,EAAE,oBAAoB,CAAE;AAErE,kBAAc,WAAW;AAEzB,gBAAY;AAAA,EACb;AAKA,QAAM,OAAO,eAAe;AAE5B,SACC;AAAA,IAAC;AAAA;AAAA,MACA,SAAU,CAAE,YAAY,aAAa;AAAA,MACrC,WAAY,aAAa;AAAA,MACzB;AAAA,MACA,QAAS;AAAA,MACT,wBAAsB;AAAA,MACtB,UAAW,CAAE;AAAA,MACb,SAAU;AAAA,MACV;AAAA,MACA,MAAK;AAAA,MAEH,yBACD,4EACG;AAAA,4BAAI,WAAW,iBAAkB;AAAA,QACnC,4CAAC;AAAA,UAAe,QAAS,4CAAC,UAAK;AAAA;AAAA,UAG7B,8BAAI,sBAAuB;AAAA,SAE7B;AAAA,SACD;AAAA;AAAA,EAEF;AAEF;",
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { renderToString } from '@wordpress/element';\nimport { Button, Path, SVG } from '@wordpress/components';\nimport { __, _x } from '@wordpress/i18n';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { applyFilters } from '@wordpress/hooks';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { VisuallyHidden } from '@wordpress/ui';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nfunction writeInterstitialMessage( targetDocument ) {\n\tlet markup = renderToString(\n\t\t<div className=\"editor-post-preview-button__interstitial-message\">\n\t\t\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 96 96\">\n\t\t\t\t<Path\n\t\t\t\t\tclassName=\"outer\"\n\t\t\t\t\td=\"M48 12c19.9 0 36 16.1 36 36S67.9 84 48 84 12 67.9 12 48s16.1-36 36-36\"\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t/>\n\t\t\t\t<Path\n\t\t\t\t\tclassName=\"inner\"\n\t\t\t\t\td=\"M69.5 46.4c0-3.9-1.4-6.7-2.6-8.8-1.6-2.6-3.1-4.9-3.1-7.5 0-2.9 2.2-5.7 5.4-5.7h.4C63.9 19.2 56.4 16 48 16c-11.2 0-21 5.7-26.7 14.4h2.1c3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3L40 67.5l7-20.9L42 33c-1.7-.1-3.3-.3-3.3-.3-1.7-.1-1.5-2.7.2-2.6 0 0 5.3.4 8.4.4 3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3l11.5 34.3 3.3-10.4c1.6-4.5 2.4-7.8 2.4-10.5zM16.1 48c0 12.6 7.3 23.5 18 28.7L18.8 35c-1.7 4-2.7 8.4-2.7 13zm32.5 2.8L39 78.6c2.9.8 5.9 1.3 9 1.3 3.7 0 7.3-.6 10.6-1.8-.1-.1-.2-.3-.2-.4l-9.8-26.9zM76.2 36c0 3.2-.6 6.9-2.4 11.4L64 75.6c9.5-5.5 15.9-15.8 15.9-27.6 0-5.5-1.4-10.8-3.9-15.3.1 1 .2 2.1.2 3.3z\"\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t/>\n\t\t\t</SVG>\n\t\t\t<p>{ __( 'Generating preview' ) }</p>\n\t\t</div>\n\t);\n\n\tmarkup += `\n\t\t<style>\n\t\t\tbody {\n\t\t\t\tmargin: 0;\n\t\t\t}\n\t\t\t.editor-post-preview-button__interstitial-message {\n\t\t\t\tdisplay: flex;\n\t\t\t\tflex-direction: column;\n\t\t\t\talign-items: center;\n\t\t\t\tjustify-content: center;\n\t\t\t\theight: 100vh;\n\t\t\t\twidth: 100vw;\n\t\t\t}\n\t\t\t@-webkit-keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t@-moz-keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t@-o-keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t@keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t.editor-post-preview-button__interstitial-message svg {\n\t\t\t\twidth: 192px;\n\t\t\t\theight: 192px;\n\t\t\t\tstroke: #555d66;\n\t\t\t\tstroke-width: 0.75;\n\t\t\t}\n\t\t\t.editor-post-preview-button__interstitial-message svg .outer,\n\t\t\t.editor-post-preview-button__interstitial-message svg .inner {\n\t\t\t\tstroke-dasharray: 280;\n\t\t\t\tstroke-dashoffset: 280;\n\t\t\t\t-webkit-animation: paint 1.5s ease infinite alternate;\n\t\t\t\t-moz-animation: paint 1.5s ease infinite alternate;\n\t\t\t\t-o-animation: paint 1.5s ease infinite alternate;\n\t\t\t\tanimation: paint 1.5s ease infinite alternate;\n\t\t\t}\n\t\t\tp {\n\t\t\t\ttext-align: center;\n\t\t\t\tfont-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Oxygen-Sans, Ubuntu, Cantarell, \"Helvetica Neue\", sans-serif;\n\t\t\t}\n\t\t</style>\n\t`;\n\n\t/**\n\t * Filters the interstitial message shown when generating previews.\n\t *\n\t * @param {string} markup The preview interstitial markup.\n\t */\n\tmarkup = applyFilters( 'editor.PostPreview.interstitialMarkup', markup );\n\n\ttargetDocument.write( markup );\n\ttargetDocument.title = __( 'Generating preview' );\n\ttargetDocument.close();\n}\n\n/**\n * Renders a button that opens a new window or tab for the preview,\n * writes the interstitial message to this window, and then navigates\n * to the actual preview link. The button is not rendered if the post\n * is not viewable and disabled if the post is not saveable.\n *\n * @param {Object} props The component props.\n * @param {string} props.className The class name for the button.\n * @param {string} props.textContent The text content for the button.\n * @param {boolean} props.forceIsAutosaveable Whether to force autosave.\n * @param {string} props.role The role attribute for the button.\n * @param {Function} props.onPreview The callback function for preview event.\n *\n * @return {React.ReactNode} The rendered button component.\n */\nexport default function PostPreviewButton( {\n\tclassName,\n\ttextContent,\n\tforceIsAutosaveable,\n\trole,\n\tonPreview,\n} ) {\n\tconst { postId, currentPostLink, previewLink, isSaveable, isViewable } =\n\t\tuseSelect( ( select ) => {\n\t\t\tconst editor = select( editorStore );\n\t\t\tconst core = select( coreStore );\n\n\t\t\tconst postType = core.getPostType(\n\t\t\t\teditor.getCurrentPostType( 'type' )\n\t\t\t);\n\t\t\tconst canView = postType?.viewable ?? false;\n\t\t\tif ( ! canView ) {\n\t\t\t\treturn { isViewable: canView };\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tpostId: editor.getCurrentPostId(),\n\t\t\t\tcurrentPostLink: editor.getCurrentPostAttribute( 'link' ),\n\t\t\t\tpreviewLink: editor.getEditedPostPreviewLink(),\n\t\t\t\tisSaveable: editor.isEditedPostSaveable(),\n\t\t\t\tisViewable: canView,\n\t\t\t};\n\t\t}, [] );\n\n\tconst { __unstableSaveForPreview } = useDispatch( editorStore );\n\n\tif ( ! isViewable ) {\n\t\treturn null;\n\t}\n\n\tconst targetId = `wp-preview-${ postId }`;\n\n\tconst openPreviewWindow = async ( event ) => {\n\t\t// Our Preview button has its 'href' and 'target' set correctly for a11y\n\t\t// purposes. Unfortunately, though, we can't rely on the default 'click'\n\t\t// handler since sometimes it incorrectly opens a new tab instead of reusing\n\t\t// the existing one.\n\t\t// https://github.com/WordPress/gutenberg/pull/8330\n\t\tevent.preventDefault();\n\n\t\t// Open up a Preview tab if needed. This is where we'll show the preview.\n\t\tconst previewWindow = window.open( '', targetId );\n\n\t\t// Focus the Preview tab. This might not do anything, depending on the browser's\n\t\t// and user's preferences.\n\t\t// https://html.spec.whatwg.org/multipage/interaction.html#dom-window-focus\n\t\tpreviewWindow.focus();\n\n\t\twriteInterstitialMessage( previewWindow.document );\n\n\t\tconst link = await __unstableSaveForPreview( { forceIsAutosaveable } );\n\n\t\tpreviewWindow.location = link;\n\n\t\tonPreview?.();\n\t};\n\n\t// Link to the `?preview=true` URL if we have it, since this lets us see\n\t// changes that were autosaved since the post was last published. Otherwise,\n\t// just link to the post's URL.\n\tconst href = previewLink || currentPostLink;\n\n\treturn (\n\t\t<Button\n\t\t\tvariant={ ! className ? 'tertiary' : undefined }\n\t\t\tclassName={ className || 'editor-post-preview' }\n\t\t\thref={ href }\n\t\t\ttarget={ targetId }\n\t\t\taccessibleWhenDisabled\n\t\t\tdisabled={ ! isSaveable }\n\t\t\tonClick={ openPreviewWindow }\n\t\t\trole={ role }\n\t\t\tsize=\"compact\"\n\t\t>\n\t\t\t{ textContent || (\n\t\t\t\t<>\n\t\t\t\t\t{ _x( 'Preview', 'imperative verb' ) }\n\t\t\t\t\t<VisuallyHidden render={ <span /> }>\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t/* translators: accessibility text */\n\t\t\t\t\t\t\t__( '(opens in a new tab)' )\n\t\t\t\t\t\t}\n\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t</>\n\t\t\t) }\n\t\t</Button>\n\t);\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAA+B;AAC/B,wBAAkC;AAClC,kBAAuB;AACvB,kBAAuC;AACvC,mBAA6B;AAC7B,uBAAmC;AACnC,gBAA+B;AAK/B,mBAAqC;AAKlC;AAHH,SAAS,yBAA0B,gBAAiB;AACnD,MAAI,aAAS;AAAA,IACZ,6CAAC,SAAI,WAAU,oDACd;AAAA,mDAAC,yBAAI,OAAM,8BAA6B,SAAQ,aAC/C;AAAA;AAAA,UAAC;AAAA;AAAA,YACA,WAAU;AAAA,YACV,GAAE;AAAA,YACF,MAAK;A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IACb;AAAA,EACD,GAAG,CAAC,CAAE;AAEP,QAAM,EAAE,yBAAyB,QAAI,yBAAa,aAAAD,KAAY;AAE9D,MAAK,CAAE,YAAa;AACnB,WAAO;AAAA,EACR;AAEA,QAAM,WAAW,cAAe,MAAO;AAEvC,QAAM,oBAAoB,OAAQ,UAAW;AAM5C,UAAM,eAAe;AAGrB,UAAM,gBAAgB,OAAO,KAAM,IAAI,QAAS;AAKhD,kBAAc,MAAM;AAEpB,6BAA0B,cAAc,QAAS;AAEjD,UAAM,OAAO,MAAM,yBAA0B,EAAE,oBAAoB,CAAE;AAErE,kBAAc,WAAW;AAEzB,gBAAY;AAAA,EACb;AAKA,QAAM,OAAO,eAAe;AAE5B,SACC;AAAA,IAAC;AAAA;AAAA,MACA,SAAU,CAAE,YAAY,aAAa;AAAA,MACrC,WAAY,aAAa;AAAA,MACzB;AAAA,MACA,QAAS;AAAA,MACT,wBAAsB;AAAA,MACtB,UAAW,CAAE;AAAA,MACb,SAAU;AAAA,MACV;AAAA,MACA,MAAK;AAAA,MAEH,yBACD,4EACG;AAAA,4BAAI,WAAW,iBAAkB;AAAA,QACnC,4CAAC;AAAA,UAAe,QAAS,4CAAC,UAAK;AAAA;AAAA,UAG7B,8BAAI,sBAAuB;AAAA,SAE7B;AAAA,SACD;AAAA;AAAA,EAEF;AAEF;",
6
6
  "names": ["editorStore", "coreStore"]
7
7
  }
@@ -35,173 +35,131 @@ __export(post_publish_button_exports, {
35
35
  });
36
36
  module.exports = __toCommonJS(post_publish_button_exports);
37
37
  var import_components = require("@wordpress/components");
38
- var import_element = require("@wordpress/element");
39
38
  var import_data = require("@wordpress/data");
40
- var import_compose = require("@wordpress/compose");
41
39
  var import_label = __toESM(require("./label.cjs"));
42
40
  var import_store = require("../../store/index.cjs");
43
41
  var import_jsx_runtime = require("react/jsx-runtime");
44
42
  var noop = () => {
45
43
  };
46
- var PostPublishButton = class extends import_element.Component {
47
- constructor(props) {
48
- super(props);
49
- this.createOnClick = this.createOnClick.bind(this);
50
- this.closeEntitiesSavedStates = this.closeEntitiesSavedStates.bind(this);
51
- this.state = {
52
- entitiesSavedStatesCallback: false
53
- };
54
- }
55
- createOnClick(callback) {
56
- return (...args) => {
57
- const { hasNonPostEntityChanges, setEntitiesSavedStatesCallback } = this.props;
58
- if (hasNonPostEntityChanges && setEntitiesSavedStatesCallback) {
59
- this.setState({
60
- entitiesSavedStatesCallback: () => callback(...args)
61
- });
62
- setEntitiesSavedStatesCallback(
63
- () => this.closeEntitiesSavedStates
64
- );
65
- return noop;
66
- }
67
- return callback(...args);
44
+ function PostPublishButton({
45
+ forceIsDirty,
46
+ isOpen,
47
+ isToggle,
48
+ onSubmit = noop,
49
+ onToggle,
50
+ setEntitiesSavedStatesCallback
51
+ }) {
52
+ const {
53
+ hasPublishAction,
54
+ isBeingScheduled,
55
+ isPostSavingLocked,
56
+ isPublishable,
57
+ isPublished,
58
+ isSaveable,
59
+ isSaving,
60
+ isAutoSaving,
61
+ visibility,
62
+ hasNonPostEntityChanges,
63
+ isSavingNonPostEntityChanges,
64
+ postStatus,
65
+ postStatusHasChanged,
66
+ postType,
67
+ postId
68
+ } = (0, import_data.useSelect)((select) => {
69
+ const store = select(import_store.store);
70
+ return {
71
+ isSaving: store.isSavingPost(),
72
+ isAutoSaving: store.isAutosavingPost(),
73
+ isBeingScheduled: store.isEditedPostBeingScheduled(),
74
+ visibility: store.getEditedPostVisibility(),
75
+ isSaveable: store.isEditedPostSaveable(),
76
+ isPostSavingLocked: store.isPostSavingLocked(),
77
+ isPublishable: store.isEditedPostPublishable(),
78
+ isPublished: store.isCurrentPostPublished(),
79
+ hasPublishAction: !!store.getCurrentPost()?._links?.["wp:action-publish"],
80
+ postType: store.getCurrentPostType(),
81
+ postId: store.getCurrentPostId(),
82
+ postStatus: store.getEditedPostAttribute("status"),
83
+ postStatusHasChanged: store.getPostEdits()?.status,
84
+ hasNonPostEntityChanges: store.hasNonPostEntityChanges(),
85
+ isSavingNonPostEntityChanges: store.isSavingNonPostEntityChanges()
68
86
  };
87
+ }, []);
88
+ const { editPost, savePost } = (0, import_data.useDispatch)(import_store.store);
89
+ const savePostStatus = (status) => {
90
+ editPost({ status }, { undoIgnore: true });
91
+ savePost();
92
+ };
93
+ const createOnClick = (callback) => (...args) => {
94
+ if (hasNonPostEntityChanges && setEntitiesSavedStatesCallback) {
95
+ const onClose = (savedEntities) => {
96
+ if (savedEntities && savedEntities.some(
97
+ (elt) => elt.kind === "postType" && elt.name === postType && elt.key === postId
98
+ )) {
99
+ callback(...args);
100
+ }
101
+ };
102
+ setEntitiesSavedStatesCallback(() => onClose);
103
+ return noop;
104
+ }
105
+ return callback(...args);
106
+ };
107
+ const isButtonDisabled = isPostSavingLocked || // Disable while a non-post entity (e.g. a newly created term) is mid-save.
108
+ isSavingNonPostEntityChanges || (isSaving || !isSaveable || !isPublishable && !forceIsDirty) && !hasNonPostEntityChanges;
109
+ const isToggleDisabled = isPostSavingLocked || isSavingNonPostEntityChanges || (isPublished || isSaving || !isSaveable || !isPublishable && !forceIsDirty) && !hasNonPostEntityChanges;
110
+ let publishStatus = "publish";
111
+ if (postStatusHasChanged) {
112
+ publishStatus = postStatus;
113
+ } else if (!hasPublishAction) {
114
+ publishStatus = "pending";
115
+ } else if (visibility === "private") {
116
+ publishStatus = "private";
117
+ } else if (isBeingScheduled) {
118
+ publishStatus = "future";
69
119
  }
70
- closeEntitiesSavedStates(savedEntities) {
71
- const { postType, postId } = this.props;
72
- const { entitiesSavedStatesCallback } = this.state;
73
- this.setState({ entitiesSavedStatesCallback: false }, () => {
74
- if (savedEntities && savedEntities.some(
75
- (elt) => elt.kind === "postType" && elt.name === postType && elt.key === postId
76
- )) {
77
- entitiesSavedStatesCallback();
78
- }
79
- });
80
- }
81
- render() {
82
- const {
83
- forceIsDirty,
84
- hasPublishAction,
85
- isBeingScheduled,
86
- isOpen,
87
- isPostSavingLocked,
88
- isPublishable,
89
- isPublished,
90
- isSaveable,
91
- isSaving,
92
- isAutoSaving,
93
- isToggle,
94
- savePostStatus,
95
- onSubmit = noop,
96
- onToggle,
97
- visibility,
98
- hasNonPostEntityChanges,
99
- isSavingNonPostEntityChanges,
100
- postStatus,
101
- postStatusHasChanged
102
- } = this.props;
103
- const isButtonDisabled = isPostSavingLocked || (isSaving || !isSaveable || !isPublishable && !forceIsDirty) && (!hasNonPostEntityChanges || isSavingNonPostEntityChanges);
104
- const isToggleDisabled = isPostSavingLocked || (isPublished || isSaving || !isSaveable || !isPublishable && !forceIsDirty) && (!hasNonPostEntityChanges || isSavingNonPostEntityChanges);
105
- let publishStatus = "publish";
106
- if (postStatusHasChanged) {
107
- publishStatus = postStatus;
108
- } else if (!hasPublishAction) {
109
- publishStatus = "pending";
110
- } else if (visibility === "private") {
111
- publishStatus = "private";
112
- } else if (isBeingScheduled) {
113
- publishStatus = "future";
120
+ const onClickButton = () => {
121
+ if (isButtonDisabled) {
122
+ return;
114
123
  }
115
- const onClickButton = () => {
116
- if (isButtonDisabled) {
117
- return;
118
- }
119
- onSubmit();
120
- savePostStatus(publishStatus);
121
- };
122
- const onClickToggle = () => {
123
- if (isToggleDisabled) {
124
- return;
125
- }
126
- onToggle();
127
- };
128
- const buttonProps = {
129
- "aria-disabled": isButtonDisabled,
130
- className: "editor-post-publish-button",
131
- isBusy: !isAutoSaving && isSaving,
132
- variant: "primary",
133
- onClick: this.createOnClick(onClickButton),
134
- "aria-haspopup": hasNonPostEntityChanges ? "dialog" : void 0
135
- };
136
- const toggleProps = {
137
- "aria-disabled": isToggleDisabled,
138
- "aria-expanded": isOpen,
139
- className: "editor-post-publish-panel__toggle",
140
- isBusy: isSaving && isPublished,
141
- variant: "primary",
124
+ onSubmit();
125
+ savePostStatus(publishStatus);
126
+ };
127
+ const onClickToggle = () => {
128
+ if (isToggleDisabled) {
129
+ return;
130
+ }
131
+ onToggle();
132
+ };
133
+ const buttonProps = {
134
+ "aria-disabled": isButtonDisabled,
135
+ className: "editor-post-publish-button",
136
+ isBusy: !isAutoSaving && isSaving,
137
+ variant: "primary",
138
+ onClick: createOnClick(onClickButton),
139
+ "aria-haspopup": hasNonPostEntityChanges ? "dialog" : void 0
140
+ };
141
+ const toggleProps = {
142
+ "aria-disabled": isToggleDisabled,
143
+ "aria-expanded": isOpen,
144
+ className: "editor-post-publish-panel__toggle",
145
+ isBusy: isSaving && isPublished,
146
+ variant: "primary",
147
+ size: "compact",
148
+ onClick: createOnClick(onClickToggle),
149
+ "aria-haspopup": hasNonPostEntityChanges ? "dialog" : void 0
150
+ };
151
+ const componentProps = isToggle ? toggleProps : buttonProps;
152
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
153
+ import_components.Button,
154
+ {
155
+ ...componentProps,
156
+ className: `${componentProps.className} editor-post-publish-button__button`,
142
157
  size: "compact",
143
- onClick: this.createOnClick(onClickToggle),
144
- "aria-haspopup": hasNonPostEntityChanges ? "dialog" : void 0
145
- };
146
- const componentProps = isToggle ? toggleProps : buttonProps;
147
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
148
- import_components.Button,
149
- {
150
- ...componentProps,
151
- className: `${componentProps.className} editor-post-publish-button__button`,
152
- size: "compact",
153
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_label.default, {})
154
- }
155
- ) });
156
- }
157
- };
158
- var post_publish_button_default = (0, import_compose.compose)([
159
- (0, import_data.withSelect)((select) => {
160
- const {
161
- isSavingPost,
162
- isAutosavingPost,
163
- isEditedPostBeingScheduled,
164
- getEditedPostVisibility,
165
- isCurrentPostPublished,
166
- isEditedPostSaveable,
167
- isEditedPostPublishable,
168
- isPostSavingLocked,
169
- getCurrentPost,
170
- getCurrentPostType,
171
- getCurrentPostId,
172
- hasNonPostEntityChanges,
173
- isSavingNonPostEntityChanges,
174
- getEditedPostAttribute,
175
- getPostEdits
176
- } = select(import_store.store);
177
- return {
178
- isSaving: isSavingPost(),
179
- isAutoSaving: isAutosavingPost(),
180
- isBeingScheduled: isEditedPostBeingScheduled(),
181
- visibility: getEditedPostVisibility(),
182
- isSaveable: isEditedPostSaveable(),
183
- isPostSavingLocked: isPostSavingLocked(),
184
- isPublishable: isEditedPostPublishable(),
185
- isPublished: isCurrentPostPublished(),
186
- hasPublishAction: getCurrentPost()._links?.["wp:action-publish"] ?? false,
187
- postType: getCurrentPostType(),
188
- postId: getCurrentPostId(),
189
- postStatus: getEditedPostAttribute("status"),
190
- postStatusHasChanged: getPostEdits()?.status,
191
- hasNonPostEntityChanges: hasNonPostEntityChanges(),
192
- isSavingNonPostEntityChanges: isSavingNonPostEntityChanges()
193
- };
194
- }),
195
- (0, import_data.withDispatch)((dispatch) => {
196
- const { editPost, savePost } = dispatch(import_store.store);
197
- return {
198
- savePostStatus: (status) => {
199
- editPost({ status }, { undoIgnore: true });
200
- savePost();
201
- }
202
- };
203
- })
204
- ])(PostPublishButton);
158
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_label.default, {})
159
+ }
160
+ );
161
+ }
162
+ var post_publish_button_default = PostPublishButton;
205
163
  // Annotate the CommonJS export names for ESM import in node:
206
164
  0 && (module.exports = {
207
165
  PostPublishButton
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/post-publish-button/index.js"],
4
- "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { Button } from '@wordpress/components';\nimport { Component } from '@wordpress/element';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { compose } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport PublishButtonLabel from './label';\nimport { store as editorStore } from '../../store';\n\nconst noop = () => {};\n\nexport class PostPublishButton extends Component {\n\tconstructor( props ) {\n\t\tsuper( props );\n\n\t\tthis.createOnClick = this.createOnClick.bind( this );\n\t\tthis.closeEntitiesSavedStates =\n\t\t\tthis.closeEntitiesSavedStates.bind( this );\n\n\t\tthis.state = {\n\t\t\tentitiesSavedStatesCallback: false,\n\t\t};\n\t}\n\n\tcreateOnClick( callback ) {\n\t\treturn ( ...args ) => {\n\t\t\tconst { hasNonPostEntityChanges, setEntitiesSavedStatesCallback } =\n\t\t\t\tthis.props;\n\t\t\t// If a post with non-post entities is published, but the user\n\t\t\t// elects to not save changes to the non-post entities, those\n\t\t\t// entities will still be dirty when the Publish button is clicked.\n\t\t\t// We also need to check that the `setEntitiesSavedStatesCallback`\n\t\t\t// prop was passed. See https://github.com/WordPress/gutenberg/pull/37383\n\t\t\tif ( hasNonPostEntityChanges && setEntitiesSavedStatesCallback ) {\n\t\t\t\t// The modal for multiple entity saving will open,\n\t\t\t\t// hold the callback for saving/publishing the post\n\t\t\t\t// so that we can call it if the post entity is checked.\n\t\t\t\tthis.setState( {\n\t\t\t\t\tentitiesSavedStatesCallback: () => callback( ...args ),\n\t\t\t\t} );\n\n\t\t\t\t// Open the save panel by setting its callback.\n\t\t\t\t// To set a function on the useState hook, we must set it\n\t\t\t\t// with another function (() => myFunction). Passing the\n\t\t\t\t// function on its own will cause an error when called.\n\t\t\t\tsetEntitiesSavedStatesCallback(\n\t\t\t\t\t() => this.closeEntitiesSavedStates\n\t\t\t\t);\n\t\t\t\treturn noop;\n\t\t\t}\n\n\t\t\treturn callback( ...args );\n\t\t};\n\t}\n\n\tcloseEntitiesSavedStates( savedEntities ) {\n\t\tconst { postType, postId } = this.props;\n\t\tconst { entitiesSavedStatesCallback } = this.state;\n\t\tthis.setState( { entitiesSavedStatesCallback: false }, () => {\n\t\t\tif (\n\t\t\t\tsavedEntities &&\n\t\t\t\tsavedEntities.some(\n\t\t\t\t\t( elt ) =>\n\t\t\t\t\t\telt.kind === 'postType' &&\n\t\t\t\t\t\telt.name === postType &&\n\t\t\t\t\t\telt.key === postId\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t// The post entity was checked, call the held callback from `createOnClick`.\n\t\t\t\tentitiesSavedStatesCallback();\n\t\t\t}\n\t\t} );\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\tforceIsDirty,\n\t\t\thasPublishAction,\n\t\t\tisBeingScheduled,\n\t\t\tisOpen,\n\t\t\tisPostSavingLocked,\n\t\t\tisPublishable,\n\t\t\tisPublished,\n\t\t\tisSaveable,\n\t\t\tisSaving,\n\t\t\tisAutoSaving,\n\t\t\tisToggle,\n\t\t\tsavePostStatus,\n\t\t\tonSubmit = noop,\n\t\t\tonToggle,\n\t\t\tvisibility,\n\t\t\thasNonPostEntityChanges,\n\t\t\tisSavingNonPostEntityChanges,\n\t\t\tpostStatus,\n\t\t\tpostStatusHasChanged,\n\t\t} = this.props;\n\n\t\tconst isButtonDisabled =\n\t\t\tisPostSavingLocked ||\n\t\t\t( ( isSaving ||\n\t\t\t\t! isSaveable ||\n\t\t\t\t( ! isPublishable && ! forceIsDirty ) ) &&\n\t\t\t\t( ! hasNonPostEntityChanges || isSavingNonPostEntityChanges ) );\n\n\t\tconst isToggleDisabled =\n\t\t\tisPostSavingLocked ||\n\t\t\t( ( isPublished ||\n\t\t\t\tisSaving ||\n\t\t\t\t! isSaveable ||\n\t\t\t\t( ! isPublishable && ! forceIsDirty ) ) &&\n\t\t\t\t( ! hasNonPostEntityChanges || isSavingNonPostEntityChanges ) );\n\n\t\t// If the new status has not changed explicitly, we derive it from\n\t\t// other factors, like having a publish action, etc.. We need to preserve\n\t\t// this because it affects when to show the pre and post publish panels.\n\t\t// If it has changed though explicitly, we need to respect that.\n\t\tlet publishStatus = 'publish';\n\t\tif ( postStatusHasChanged ) {\n\t\t\tpublishStatus = postStatus;\n\t\t} else if ( ! hasPublishAction ) {\n\t\t\tpublishStatus = 'pending';\n\t\t} else if ( visibility === 'private' ) {\n\t\t\tpublishStatus = 'private';\n\t\t} else if ( isBeingScheduled ) {\n\t\t\tpublishStatus = 'future';\n\t\t}\n\n\t\tconst onClickButton = () => {\n\t\t\tif ( isButtonDisabled ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tonSubmit();\n\t\t\tsavePostStatus( publishStatus );\n\t\t};\n\n\t\t// Callback to open the publish panel.\n\t\tconst onClickToggle = () => {\n\t\t\tif ( isToggleDisabled ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tonToggle();\n\t\t};\n\n\t\tconst buttonProps = {\n\t\t\t'aria-disabled': isButtonDisabled,\n\t\t\tclassName: 'editor-post-publish-button',\n\t\t\tisBusy: ! isAutoSaving && isSaving,\n\t\t\tvariant: 'primary',\n\t\t\tonClick: this.createOnClick( onClickButton ),\n\t\t\t'aria-haspopup': hasNonPostEntityChanges ? 'dialog' : undefined,\n\t\t};\n\n\t\tconst toggleProps = {\n\t\t\t'aria-disabled': isToggleDisabled,\n\t\t\t'aria-expanded': isOpen,\n\t\t\tclassName: 'editor-post-publish-panel__toggle',\n\t\t\tisBusy: isSaving && isPublished,\n\t\t\tvariant: 'primary',\n\t\t\tsize: 'compact',\n\t\t\tonClick: this.createOnClick( onClickToggle ),\n\t\t\t'aria-haspopup': hasNonPostEntityChanges ? 'dialog' : undefined,\n\t\t};\n\t\tconst componentProps = isToggle ? toggleProps : buttonProps;\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<Button\n\t\t\t\t\t{ ...componentProps }\n\t\t\t\t\tclassName={ `${ componentProps.className } editor-post-publish-button__button` }\n\t\t\t\t\tsize=\"compact\"\n\t\t\t\t>\n\t\t\t\t\t<PublishButtonLabel />\n\t\t\t\t</Button>\n\t\t\t</>\n\t\t);\n\t}\n}\n\n/**\n * Renders the publish button.\n */\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\tconst {\n\t\t\tisSavingPost,\n\t\t\tisAutosavingPost,\n\t\t\tisEditedPostBeingScheduled,\n\t\t\tgetEditedPostVisibility,\n\t\t\tisCurrentPostPublished,\n\t\t\tisEditedPostSaveable,\n\t\t\tisEditedPostPublishable,\n\t\t\tisPostSavingLocked,\n\t\t\tgetCurrentPost,\n\t\t\tgetCurrentPostType,\n\t\t\tgetCurrentPostId,\n\t\t\thasNonPostEntityChanges,\n\t\t\tisSavingNonPostEntityChanges,\n\t\t\tgetEditedPostAttribute,\n\t\t\tgetPostEdits,\n\t\t} = select( editorStore );\n\t\treturn {\n\t\t\tisSaving: isSavingPost(),\n\t\t\tisAutoSaving: isAutosavingPost(),\n\t\t\tisBeingScheduled: isEditedPostBeingScheduled(),\n\t\t\tvisibility: getEditedPostVisibility(),\n\t\t\tisSaveable: isEditedPostSaveable(),\n\t\t\tisPostSavingLocked: isPostSavingLocked(),\n\t\t\tisPublishable: isEditedPostPublishable(),\n\t\t\tisPublished: isCurrentPostPublished(),\n\t\t\thasPublishAction:\n\t\t\t\tgetCurrentPost()._links?.[ 'wp:action-publish' ] ?? false,\n\t\t\tpostType: getCurrentPostType(),\n\t\t\tpostId: getCurrentPostId(),\n\t\t\tpostStatus: getEditedPostAttribute( 'status' ),\n\t\t\tpostStatusHasChanged: getPostEdits()?.status,\n\t\t\thasNonPostEntityChanges: hasNonPostEntityChanges(),\n\t\t\tisSavingNonPostEntityChanges: isSavingNonPostEntityChanges(),\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch ) => {\n\t\tconst { editPost, savePost } = dispatch( editorStore );\n\t\treturn {\n\t\t\tsavePostStatus: ( status ) => {\n\t\t\t\teditPost( { status }, { undoIgnore: true } );\n\t\t\t\tsavePost();\n\t\t\t},\n\t\t};\n\t} ),\n] )( PostPublishButton );\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,wBAAuB;AACvB,qBAA0B;AAC1B,kBAAyC;AACzC,qBAAwB;AAKxB,mBAA+B;AAC/B,mBAAqC;AA6JlC;AA3JH,IAAM,OAAO,MAAM;AAAC;AAEb,IAAM,oBAAN,cAAgC,yBAAU;AAAA,EAChD,YAAa,OAAQ;AACpB,UAAO,KAAM;AAEb,SAAK,gBAAgB,KAAK,cAAc,KAAM,IAAK;AACnD,SAAK,2BACJ,KAAK,yBAAyB,KAAM,IAAK;AAE1C,SAAK,QAAQ;AAAA,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BAAiB;AAAA,MAC/B,kBAAkB,2BAA2B;AAAA,MAC7C,YAAY,wBAAwB;AAAA,MACpC,YAAY,qBAAqB;AAAA,MACjC,oBAAoB,mBAAmB;AAAA,MACvC,eAAe,wBAAwB;AAAA,MACvC,aAAa,uBAAuB;AAAA,MACpC,kBACC,eAAe,EAAE,SAAU,mBAAoB,KAAK;AAAA,MACrD,UAAU,mBAAmB;AAAA,MAC7B,QAAQ,iBAAiB;AAAA,MACzB,YAAY,uBAAwB,QAAS;AAAA,MAC7C,sBAAsB,aAAa,GAAG;AAAA,MACtC,yBAAyB,wBAAwB;AAAA,MACjD,8BAA8B,6BAA6B;AAAA,IAC5D;AAAA,EACD,CAAE;AAAA,MACF,0BAAc,CAAE,aAAc;AAC7B,UAAM,EAAE,UAAU,SAAS,IAAI,SAAU,aAAAA,KAAY;AACrD,WAAO;AAAA,MACN,gBAAgB,CAAE,WAAY;AAC7B,iBAAU,EAAE,OAAO,GAAG,EAAE,YAAY,KAAK,CAAE;AAC3C,iBAAS;AAAA,MACV;AAAA,IACD;AAAA,EACD,CAAE;AACH,CAAE,EAAG,iBAAkB;",
6
- "names": ["PublishButtonLabel", "editorStore"]
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { Button } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport PublishButtonLabel from './label';\nimport { store as editorStore } from '../../store';\n\nconst noop = () => {};\n\nexport function PostPublishButton( {\n\tforceIsDirty,\n\tisOpen,\n\tisToggle,\n\tonSubmit = noop,\n\tonToggle,\n\tsetEntitiesSavedStatesCallback,\n} ) {\n\tconst {\n\t\thasPublishAction,\n\t\tisBeingScheduled,\n\t\tisPostSavingLocked,\n\t\tisPublishable,\n\t\tisPublished,\n\t\tisSaveable,\n\t\tisSaving,\n\t\tisAutoSaving,\n\t\tvisibility,\n\t\thasNonPostEntityChanges,\n\t\tisSavingNonPostEntityChanges,\n\t\tpostStatus,\n\t\tpostStatusHasChanged,\n\t\tpostType,\n\t\tpostId,\n\t} = useSelect( ( select ) => {\n\t\tconst store = select( editorStore );\n\t\treturn {\n\t\t\tisSaving: store.isSavingPost(),\n\t\t\tisAutoSaving: store.isAutosavingPost(),\n\t\t\tisBeingScheduled: store.isEditedPostBeingScheduled(),\n\t\t\tvisibility: store.getEditedPostVisibility(),\n\t\t\tisSaveable: store.isEditedPostSaveable(),\n\t\t\tisPostSavingLocked: store.isPostSavingLocked(),\n\t\t\tisPublishable: store.isEditedPostPublishable(),\n\t\t\tisPublished: store.isCurrentPostPublished(),\n\t\t\thasPublishAction:\n\t\t\t\t!! store.getCurrentPost()?._links?.[ 'wp:action-publish' ],\n\t\t\tpostType: store.getCurrentPostType(),\n\t\t\tpostId: store.getCurrentPostId(),\n\t\t\tpostStatus: store.getEditedPostAttribute( 'status' ),\n\t\t\tpostStatusHasChanged: store.getPostEdits()?.status,\n\t\t\thasNonPostEntityChanges: store.hasNonPostEntityChanges(),\n\t\t\tisSavingNonPostEntityChanges: store.isSavingNonPostEntityChanges(),\n\t\t};\n\t}, [] );\n\n\tconst { editPost, savePost } = useDispatch( editorStore );\n\n\tconst savePostStatus = ( status ) => {\n\t\teditPost( { status }, { undoIgnore: true } );\n\t\tsavePost();\n\t};\n\n\tconst createOnClick =\n\t\t( callback ) =>\n\t\t( ...args ) => {\n\t\t\t// If a post with non-post entities is published, but the user\n\t\t\t// elects to not save changes to the non-post entities, those\n\t\t\t// entities will still be dirty when the Publish button is clicked.\n\t\t\t// We also need to check that the `setEntitiesSavedStatesCallback`\n\t\t\t// prop was passed. See https://github.com/WordPress/gutenberg/pull/37383\n\t\t\tif ( hasNonPostEntityChanges && setEntitiesSavedStatesCallback ) {\n\t\t\t\t// The modal for multiple entity saving will open. If the post\n\t\t\t\t// entity is checked when it closes, run the held callback.\n\t\t\t\tconst onClose = ( savedEntities ) => {\n\t\t\t\t\tif (\n\t\t\t\t\t\tsavedEntities &&\n\t\t\t\t\t\tsavedEntities.some(\n\t\t\t\t\t\t\t( elt ) =>\n\t\t\t\t\t\t\t\telt.kind === 'postType' &&\n\t\t\t\t\t\t\t\telt.name === postType &&\n\t\t\t\t\t\t\t\telt.key === postId\n\t\t\t\t\t\t)\n\t\t\t\t\t) {\n\t\t\t\t\t\tcallback( ...args );\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\t// Open the save panel by setting its callback.\n\t\t\t\t// To set a function on the useState hook, we must set it\n\t\t\t\t// with another function (() => myFunction). Passing the\n\t\t\t\t// function on its own will cause an error when called.\n\t\t\t\tsetEntitiesSavedStatesCallback( () => onClose );\n\t\t\t\treturn noop;\n\t\t\t}\n\n\t\t\treturn callback( ...args );\n\t\t};\n\n\tconst isButtonDisabled =\n\t\tisPostSavingLocked ||\n\t\t// Disable while a non-post entity (e.g. a newly created term) is mid-save.\n\t\tisSavingNonPostEntityChanges ||\n\t\t( ( isSaving ||\n\t\t\t! isSaveable ||\n\t\t\t( ! isPublishable && ! forceIsDirty ) ) &&\n\t\t\t! hasNonPostEntityChanges );\n\n\tconst isToggleDisabled =\n\t\tisPostSavingLocked ||\n\t\tisSavingNonPostEntityChanges ||\n\t\t( ( isPublished ||\n\t\t\tisSaving ||\n\t\t\t! isSaveable ||\n\t\t\t( ! isPublishable && ! forceIsDirty ) ) &&\n\t\t\t! hasNonPostEntityChanges );\n\n\t// If the new status has not changed explicitly, we derive it from\n\t// other factors, like having a publish action, etc.. We need to preserve\n\t// this because it affects when to show the pre and post publish panels.\n\t// If it has changed though explicitly, we need to respect that.\n\tlet publishStatus = 'publish';\n\tif ( postStatusHasChanged ) {\n\t\tpublishStatus = postStatus;\n\t} else if ( ! hasPublishAction ) {\n\t\tpublishStatus = 'pending';\n\t} else if ( visibility === 'private' ) {\n\t\tpublishStatus = 'private';\n\t} else if ( isBeingScheduled ) {\n\t\tpublishStatus = 'future';\n\t}\n\n\tconst onClickButton = () => {\n\t\tif ( isButtonDisabled ) {\n\t\t\treturn;\n\t\t}\n\t\tonSubmit();\n\t\tsavePostStatus( publishStatus );\n\t};\n\n\t// Callback to open the publish panel.\n\tconst onClickToggle = () => {\n\t\tif ( isToggleDisabled ) {\n\t\t\treturn;\n\t\t}\n\t\tonToggle();\n\t};\n\n\tconst buttonProps = {\n\t\t'aria-disabled': isButtonDisabled,\n\t\tclassName: 'editor-post-publish-button',\n\t\tisBusy: ! isAutoSaving && isSaving,\n\t\tvariant: 'primary',\n\t\tonClick: createOnClick( onClickButton ),\n\t\t'aria-haspopup': hasNonPostEntityChanges ? 'dialog' : undefined,\n\t};\n\n\tconst toggleProps = {\n\t\t'aria-disabled': isToggleDisabled,\n\t\t'aria-expanded': isOpen,\n\t\tclassName: 'editor-post-publish-panel__toggle',\n\t\tisBusy: isSaving && isPublished,\n\t\tvariant: 'primary',\n\t\tsize: 'compact',\n\t\tonClick: createOnClick( onClickToggle ),\n\t\t'aria-haspopup': hasNonPostEntityChanges ? 'dialog' : undefined,\n\t};\n\tconst componentProps = isToggle ? toggleProps : buttonProps;\n\treturn (\n\t\t<Button\n\t\t\t{ ...componentProps }\n\t\t\tclassName={ `${ componentProps.className } editor-post-publish-button__button` }\n\t\t\tsize=\"compact\"\n\t\t>\n\t\t\t<PublishButtonLabel />\n\t\t</Button>\n\t);\n}\n\n/**\n * Renders the publish button.\n */\nexport default PostPublishButton;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,wBAAuB;AACvB,kBAAuC;AAKvC,mBAA+B;AAC/B,mBAAqC;AAwKlC;AAtKH,IAAM,OAAO,MAAM;AAAC;AAEb,SAAS,kBAAmB;AAAA,EAClC;AAAA,EACA;AAAA,EACA;AAAA,EACA,WAAW;AAAA,EACX;AAAA,EACA;AACD,GAAI;AACH,QAAM;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IAC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
7
7
  }
@@ -65,9 +65,9 @@ function PublishButtonLabel() {
65
65
  };
66
66
  }, []);
67
67
  if (isPublishing) {
68
- return (0, import_i18n.__)("Publishing\u2026");
68
+ return (0, import_i18n.__)("Publishing");
69
69
  } else if ((isPublished || isBeingScheduled) && isSaving && !isAutosaving) {
70
- return (0, import_i18n.__)("Saving\u2026");
70
+ return (0, import_i18n.__)("Saving");
71
71
  }
72
72
  if (!hasPublishAction) {
73
73
  return isSmallerThanMediumViewport ? (0, import_i18n.__)("Publish") : (0, import_i18n.__)("Submit for Review");
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/post-publish-button/label.js"],
4
- "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { useViewportMatch } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * Renders the label for the publish button.\n *\n * @return {string} The label for the publish button.\n */\nexport default function PublishButtonLabel() {\n\tconst isSmallerThanMediumViewport = useViewportMatch( 'medium', '<' );\n\tconst {\n\t\tisPublished,\n\t\tisBeingScheduled,\n\t\tisSaving,\n\t\tisPublishing,\n\t\thasPublishAction,\n\t\tisAutosaving,\n\t\thasNonPostEntityChanges,\n\t\tpostStatusHasChanged,\n\t\tpostStatus,\n\t\tisPostSavingLocked,\n\t} = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tisCurrentPostPublished,\n\t\t\tisEditedPostBeingScheduled,\n\t\t\tisSavingPost,\n\t\t\tisPublishingPost,\n\t\t\tgetCurrentPost,\n\t\t\tisAutosavingPost,\n\t\t\tgetPostEdits,\n\t\t\tgetEditedPostAttribute,\n\t\t} = select( editorStore );\n\t\treturn {\n\t\t\tisPublished: isCurrentPostPublished(),\n\t\t\tisBeingScheduled: isEditedPostBeingScheduled(),\n\t\t\tisSaving: isSavingPost(),\n\t\t\tisPublishing: isPublishingPost(),\n\t\t\thasPublishAction:\n\t\t\t\tgetCurrentPost()._links?.[ 'wp:action-publish' ] ?? false,\n\t\t\tisAutosaving: isAutosavingPost(),\n\t\t\thasNonPostEntityChanges:\n\t\t\t\tselect( editorStore ).hasNonPostEntityChanges(),\n\t\t\tisPostSavingLocked: select( editorStore ).isPostSavingLocked(),\n\t\t\tpostStatusHasChanged: !! getPostEdits()?.status,\n\t\t\tpostStatus: getEditedPostAttribute( 'status' ),\n\t\t};\n\t}, [] );\n\tif ( isPublishing ) {\n\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\treturn __( 'Publishing\u2026' );\n\t} else if (\n\t\t( isPublished || isBeingScheduled ) &&\n\t\tisSaving &&\n\t\t! isAutosaving\n\t) {\n\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\treturn __( 'Saving\u2026' );\n\t}\n\tif ( ! hasPublishAction ) {\n\t\t// TODO: this is because \"Submit for review\" string is too long in some languages.\n\t\t// @see https://github.com/WordPress/gutenberg/issues/10475\n\t\treturn isSmallerThanMediumViewport\n\t\t\t? __( 'Publish' )\n\t\t\t: __( 'Submit for Review' );\n\t}\n\tif (\n\t\t( hasNonPostEntityChanges && ! isPostSavingLocked ) ||\n\t\tisPublished ||\n\t\t( postStatusHasChanged &&\n\t\t\t! [ 'future', 'publish' ].includes( postStatus ) ) ||\n\t\t( ! postStatusHasChanged && postStatus === 'future' )\n\t) {\n\t\treturn __( 'Save' );\n\t}\n\tif ( isBeingScheduled ) {\n\t\treturn __( 'Schedule' );\n\t}\n\treturn __( 'Publish' );\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAmB;AACnB,kBAA0B;AAC1B,qBAAiC;AAKjC,mBAAqC;AAOtB,SAAR,qBAAsC;AAC5C,QAAM,kCAA8B,iCAAkB,UAAU,GAAI;AACpE,QAAM;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD,QAAI,uBAAW,CAAE,WAAY;AAC5B,UAAM;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACD,IAAI,OAAQ,aAAAA,KAAY;AACxB,WAAO;AAAA,MACN,aAAa,uBAAuB;AAAA,MACpC,kBAAkB,2BAA2B;AAAA,MAC7C,UAAU,aAAa;AAAA,MACvB,cAAc,iBAAiB;AAAA,MAC/B,kBACC,eAAe,EAAE,SAAU,mBAAoB,KAAK;AAAA,MACrD,cAAc,iBAAiB;AAAA,MAC/B,yBACC,OAAQ,aAAAA,KAAY,EAAE,wBAAwB;AAAA,MAC/C,oBAAoB,OAAQ,aAAAA,KAAY,EAAE,mBAAmB;AAAA,MAC7D,sBAAsB,CAAC,CAAE,aAAa,GAAG;AAAA,MACzC,YAAY,uBAAwB,QAAS;AAAA,IAC9C;AAAA,EACD,GAAG,CAAC,CAAE;AACN,MAAK,cAAe;AAEnB,eAAO,gBAAI,kBAAc;AAAA,EAC1B,YACG,eAAe,qBACjB,YACA,CAAE,cACD;AAED,eAAO,gBAAI,cAAU;AAAA,EACtB;AACA,MAAK,CAAE,kBAAmB;AAGzB,WAAO,kCACJ,gBAAI,SAAU,QACd,gBAAI,mBAAoB;AAAA,EAC5B;AACA,MACG,2BAA2B,CAAE,sBAC/B,eACE,wBACD,CAAE,CAAE,UAAU,SAAU,EAAE,SAAU,UAAW,KAC9C,CAAE,wBAAwB,eAAe,UAC1C;AACD,eAAO,gBAAI,MAAO;AAAA,EACnB;AACA,MAAK,kBAAmB;AACvB,eAAO,gBAAI,UAAW;AAAA,EACvB;AACA,aAAO,gBAAI,SAAU;AACtB;",
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { useViewportMatch } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * Renders the label for the publish button.\n *\n * @return {string} The label for the publish button.\n */\nexport default function PublishButtonLabel() {\n\tconst isSmallerThanMediumViewport = useViewportMatch( 'medium', '<' );\n\tconst {\n\t\tisPublished,\n\t\tisBeingScheduled,\n\t\tisSaving,\n\t\tisPublishing,\n\t\thasPublishAction,\n\t\tisAutosaving,\n\t\thasNonPostEntityChanges,\n\t\tpostStatusHasChanged,\n\t\tpostStatus,\n\t\tisPostSavingLocked,\n\t} = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tisCurrentPostPublished,\n\t\t\tisEditedPostBeingScheduled,\n\t\t\tisSavingPost,\n\t\t\tisPublishingPost,\n\t\t\tgetCurrentPost,\n\t\t\tisAutosavingPost,\n\t\t\tgetPostEdits,\n\t\t\tgetEditedPostAttribute,\n\t\t} = select( editorStore );\n\t\treturn {\n\t\t\tisPublished: isCurrentPostPublished(),\n\t\t\tisBeingScheduled: isEditedPostBeingScheduled(),\n\t\t\tisSaving: isSavingPost(),\n\t\t\tisPublishing: isPublishingPost(),\n\t\t\thasPublishAction:\n\t\t\t\tgetCurrentPost()._links?.[ 'wp:action-publish' ] ?? false,\n\t\t\tisAutosaving: isAutosavingPost(),\n\t\t\thasNonPostEntityChanges:\n\t\t\t\tselect( editorStore ).hasNonPostEntityChanges(),\n\t\t\tisPostSavingLocked: select( editorStore ).isPostSavingLocked(),\n\t\t\tpostStatusHasChanged: !! getPostEdits()?.status,\n\t\t\tpostStatus: getEditedPostAttribute( 'status' ),\n\t\t};\n\t}, [] );\n\tif ( isPublishing ) {\n\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\treturn __( 'Publishing' );\n\t} else if (\n\t\t( isPublished || isBeingScheduled ) &&\n\t\tisSaving &&\n\t\t! isAutosaving\n\t) {\n\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\treturn __( 'Saving' );\n\t}\n\tif ( ! hasPublishAction ) {\n\t\t// TODO: this is because \"Submit for review\" string is too long in some languages.\n\t\t// @see https://github.com/WordPress/gutenberg/issues/10475\n\t\treturn isSmallerThanMediumViewport\n\t\t\t? __( 'Publish' )\n\t\t\t: __( 'Submit for Review' );\n\t}\n\tif (\n\t\t( hasNonPostEntityChanges && ! isPostSavingLocked ) ||\n\t\tisPublished ||\n\t\t( postStatusHasChanged &&\n\t\t\t! [ 'future', 'publish' ].includes( postStatus ) ) ||\n\t\t( ! postStatusHasChanged && postStatus === 'future' )\n\t) {\n\t\treturn __( 'Save' );\n\t}\n\tif ( isBeingScheduled ) {\n\t\treturn __( 'Schedule' );\n\t}\n\treturn __( 'Publish' );\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAmB;AACnB,kBAA0B;AAC1B,qBAAiC;AAKjC,mBAAqC;AAOtB,SAAR,qBAAsC;AAC5C,QAAM,kCAA8B,iCAAkB,UAAU,GAAI;AACpE,QAAM;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD,QAAI,uBAAW,CAAE,WAAY;AAC5B,UAAM;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACD,IAAI,OAAQ,aAAAA,KAAY;AACxB,WAAO;AAAA,MACN,aAAa,uBAAuB;AAAA,MACpC,kBAAkB,2BAA2B;AAAA,MAC7C,UAAU,aAAa;AAAA,MACvB,cAAc,iBAAiB;AAAA,MAC/B,kBACC,eAAe,EAAE,SAAU,mBAAoB,KAAK;AAAA,MACrD,cAAc,iBAAiB;AAAA,MAC/B,yBACC,OAAQ,aAAAA,KAAY,EAAE,wBAAwB;AAAA,MAC/C,oBAAoB,OAAQ,aAAAA,KAAY,EAAE,mBAAmB;AAAA,MAC7D,sBAAsB,CAAC,CAAE,aAAa,GAAG;AAAA,MACzC,YAAY,uBAAwB,QAAS;AAAA,IAC9C;AAAA,EACD,GAAG,CAAC,CAAE;AACN,MAAK,cAAe;AAEnB,eAAO,gBAAI,aAAc;AAAA,EAC1B,YACG,eAAe,qBACjB,YACA,CAAE,cACD;AAED,eAAO,gBAAI,SAAU;AAAA,EACtB;AACA,MAAK,CAAE,kBAAmB;AAGzB,WAAO,kCACJ,gBAAI,SAAU,QACd,gBAAI,mBAAoB;AAAA,EAC5B;AACA,MACG,2BAA2B,CAAE,sBAC/B,eACE,wBACD,CAAE,CAAE,UAAU,SAAU,EAAE,SAAU,UAAW,KAC9C,CAAE,wBAAwB,eAAe,UAC1C;AACD,eAAO,gBAAI,MAAO;AAAA,EACnB;AACA,MAAK,kBAAmB;AACvB,eAAO,gBAAI,UAAW;AAAA,EACvB;AACA,aAAO,gBAAI,SAAU;AACtB;",
6
6
  "names": ["editorStore"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/post-publish-panel/index.js"],
4
- "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useEffect, useRef } from '@wordpress/element';\nimport { Button, Spinner, CheckboxControl } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tuseConstrainedTabbing,\n\tuseEvent,\n\tuseFocusReturn,\n\tuseMergeRefs,\n} from '@wordpress/compose';\nimport { closeSmall } from '@wordpress/icons';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport PostPublishButton from '../post-publish-button';\nimport PostPublishPanelPrepublish from './prepublish';\nimport PostPublishPanelPostpublish from './postpublish';\nimport { store as editorStore } from '../../store';\n\n/**\n * Renders a panel for publishing a post.\n *\n * @param {Object} props Component props.\n * @param {boolean} [props.forceIsDirty] Whether to force the dirty state.\n * @param {()=>void} props.onClose Called when the panel requests to close.\n * @param {React.ComponentType} [props.PostPublishExtension] Component rendered after publishing.\n * @param {React.ComponentType} [props.PrePublishExtension] Component rendered before publishing.\n *\n * @return {React.JSX.Element} The post publish panel.\n */\nexport default function PostPublishPanel( {\n\tforceIsDirty,\n\tonClose,\n\tPostPublishExtension,\n\tPrePublishExtension,\n\t...propsForPanel\n} ) {\n\tconst {\n\t\thasPublishAction,\n\t\tisPostTypeViewable,\n\t\tisBeingScheduled,\n\t\tisDirty,\n\t\tisPublished,\n\t\tisPublishSidebarEnabled,\n\t\tisSaving,\n\t\tisSavingNonPostEntityChanges,\n\t\tisScheduled,\n\t\tcurrentPostId,\n\t} = useSelect( ( select ) => {\n\t\tconst { getPostType } = select( coreStore );\n\t\tconst {\n\t\t\tgetCurrentPost,\n\t\t\tgetCurrentPostId,\n\t\t\tgetEditedPostAttribute,\n\t\t\tisCurrentPostPublished,\n\t\t\tisCurrentPostScheduled,\n\t\t\tisEditedPostBeingScheduled,\n\t\t\tisEditedPostDirty,\n\t\t\tisAutosavingPost,\n\t\t\tisSavingPost,\n\t\t\tisSavingNonPostEntityChanges: _isSavingNonPostEntityChanges,\n\t\t\tisPublishSidebarEnabled: _isPublishSidebarEnabled,\n\t\t} = select( editorStore );\n\t\tconst postType = getPostType( getEditedPostAttribute( 'type' ) );\n\n\t\treturn {\n\t\t\thasPublishAction:\n\t\t\t\tgetCurrentPost()._links?.[ 'wp:action-publish' ] ?? false,\n\t\t\tisPostTypeViewable: postType?.viewable,\n\t\t\tisBeingScheduled: isEditedPostBeingScheduled(),\n\t\t\tisDirty: isEditedPostDirty(),\n\t\t\tisPublished: isCurrentPostPublished(),\n\t\t\tisPublishSidebarEnabled: _isPublishSidebarEnabled(),\n\t\t\tisSaving: isSavingPost() && ! isAutosavingPost(),\n\t\t\tisSavingNonPostEntityChanges: _isSavingNonPostEntityChanges(),\n\t\t\tisScheduled: isCurrentPostScheduled(),\n\t\t\tcurrentPostId: getCurrentPostId(),\n\t\t};\n\t}, [] );\n\n\tconst { disablePublishSidebar, enablePublishSidebar } =\n\t\tuseDispatch( editorStore );\n\n\tconst cancelButtonRef = useRef( null );\n\tconst wrapperRef = useMergeRefs( [\n\t\tuseFocusReturn(),\n\t\tuseConstrainedTabbing(),\n\t] );\n\n\tuseEffect( () => {\n\t\tcancelButtonRef.current?.focus();\n\t}, [] );\n\n\t// Auto-collapse the publish sidebar when a post is published and the user\n\t// makes an edit, or when the edited post changes. The panel only mounts\n\t// for unpublished posts, so `isPublished && isDirty` cannot be true on\n\t// mount \u2014 it implies a publish-then-edit transition.\n\tconst prevPostIdRef = useRef( currentPostId );\n\tconst stableOnClose = useEvent( onClose );\n\tuseEffect( () => {\n\t\tconst postChanged = currentPostId !== prevPostIdRef.current;\n\t\tprevPostIdRef.current = currentPostId;\n\n\t\tif ( postChanged || ( isPublished && ! isSaving && isDirty ) ) {\n\t\t\tstableOnClose();\n\t\t}\n\t}, [ isPublished, isSaving, isDirty, currentPostId, stableOnClose ] );\n\n\tfunction onTogglePublishSidebar() {\n\t\tif ( isPublishSidebarEnabled ) {\n\t\t\tdisablePublishSidebar();\n\t\t} else {\n\t\t\tenablePublishSidebar();\n\t\t}\n\t}\n\n\tfunction onSubmit() {\n\t\tif ( ! hasPublishAction || ! isPostTypeViewable ) {\n\t\t\tonClose();\n\t\t}\n\t}\n\n\tconst isPublishedOrScheduled =\n\t\tisPublished || ( isScheduled && isBeingScheduled );\n\tconst isPrePublish = ! isPublishedOrScheduled && ! isSaving;\n\tconst isPostPublish = isPublishedOrScheduled && ! isSaving;\n\n\treturn (\n\t\t<div\n\t\t\tref={ wrapperRef }\n\t\t\ttabIndex={ -1 }\n\t\t\tclassName=\"editor-post-publish-panel\"\n\t\t\t{ ...propsForPanel }\n\t\t>\n\t\t\t<div className=\"editor-post-publish-panel__header\">\n\t\t\t\t{ isPostPublish ? (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\tonClick={ onClose }\n\t\t\t\t\t\ticon={ closeSmall }\n\t\t\t\t\t\tlabel={ __( 'Close panel' ) }\n\t\t\t\t\t/>\n\t\t\t\t) : (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<div className=\"editor-post-publish-panel__header-cancel-button\">\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tref={ cancelButtonRef }\n\t\t\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\t\t\tdisabled={ isSavingNonPostEntityChanges }\n\t\t\t\t\t\t\t\tonClick={ onClose }\n\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"editor-post-publish-panel__header-publish-button\">\n\t\t\t\t\t\t\t<PostPublishButton\n\t\t\t\t\t\t\t\tonSubmit={ onSubmit }\n\t\t\t\t\t\t\t\tforceIsDirty={ forceIsDirty }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t\t<div className=\"editor-post-publish-panel__content\">\n\t\t\t\t{ isPrePublish && (\n\t\t\t\t\t<PostPublishPanelPrepublish>\n\t\t\t\t\t\t{ PrePublishExtension && <PrePublishExtension /> }\n\t\t\t\t\t</PostPublishPanelPrepublish>\n\t\t\t\t) }\n\t\t\t\t{ isPostPublish && (\n\t\t\t\t\t<PostPublishPanelPostpublish focusOnMount>\n\t\t\t\t\t\t{ PostPublishExtension && <PostPublishExtension /> }\n\t\t\t\t\t</PostPublishPanelPostpublish>\n\t\t\t\t) }\n\t\t\t\t{ isSaving && <Spinner /> }\n\t\t\t</div>\n\t\t\t<div className=\"editor-post-publish-panel__footer\">\n\t\t\t\t<CheckboxControl\n\t\t\t\t\tlabel={ __( 'Always show pre-publish checks.' ) }\n\t\t\t\t\tchecked={ isPublishSidebarEnabled }\n\t\t\t\t\tonChange={ onTogglePublishSidebar }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n"],
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useEffect, useRef } from '@wordpress/element';\nimport { Button, Spinner, CheckboxControl } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tuseConstrainedTabbing,\n\tuseEvent,\n\tuseFocusReturn,\n\tuseMergeRefs,\n} from '@wordpress/compose';\nimport { closeSmall } from '@wordpress/icons';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport PostPublishButton from '../post-publish-button';\nimport PostPublishPanelPrepublish from './prepublish';\nimport PostPublishPanelPostpublish from './postpublish';\nimport { store as editorStore } from '../../store';\n\n/**\n * Renders a panel for publishing a post.\n *\n * @param {Object} props Component props.\n * @param {boolean} [props.forceIsDirty] Whether to force the dirty state.\n * @param {()=>void} props.onClose Called when the panel requests to close.\n * @param {React.ComponentType} [props.PostPublishExtension] Component rendered after publishing.\n * @param {React.ComponentType} [props.PrePublishExtension] Component rendered before publishing.\n *\n * @return {React.JSX.Element} The post publish panel.\n */\nexport default function PostPublishPanel( {\n\tforceIsDirty,\n\tonClose,\n\tPostPublishExtension,\n\tPrePublishExtension,\n\t...propsForPanel\n} ) {\n\tconst {\n\t\thasPublishAction,\n\t\tisPostTypeViewable,\n\t\tisBeingScheduled,\n\t\tisDirty,\n\t\tisPublished,\n\t\tisPublishSidebarEnabled,\n\t\tisSaving,\n\t\tisSavingNonPostEntityChanges,\n\t\tisScheduled,\n\t\tcurrentPostId,\n\t} = useSelect( ( select ) => {\n\t\tconst { getPostType } = select( coreStore );\n\t\tconst {\n\t\t\tgetCurrentPost,\n\t\t\tgetCurrentPostId,\n\t\t\tgetEditedPostAttribute,\n\t\t\tisCurrentPostPublished,\n\t\t\tisCurrentPostScheduled,\n\t\t\tisEditedPostBeingScheduled,\n\t\t\tisEditedPostDirty,\n\t\t\tisAutosavingPost,\n\t\t\tisSavingPost,\n\t\t\tisSavingNonPostEntityChanges: _isSavingNonPostEntityChanges,\n\t\t\tisPublishSidebarEnabled: _isPublishSidebarEnabled,\n\t\t} = select( editorStore );\n\t\tconst postType = getPostType( getEditedPostAttribute( 'type' ) );\n\n\t\treturn {\n\t\t\thasPublishAction:\n\t\t\t\tgetCurrentPost()._links?.[ 'wp:action-publish' ] ?? false,\n\t\t\tisPostTypeViewable: postType?.viewable,\n\t\t\tisBeingScheduled: isEditedPostBeingScheduled(),\n\t\t\tisDirty: isEditedPostDirty(),\n\t\t\tisPublished: isCurrentPostPublished(),\n\t\t\tisPublishSidebarEnabled: _isPublishSidebarEnabled(),\n\t\t\tisSaving: isSavingPost() && ! isAutosavingPost(),\n\t\t\tisSavingNonPostEntityChanges: _isSavingNonPostEntityChanges(),\n\t\t\tisScheduled: isCurrentPostScheduled(),\n\t\t\tcurrentPostId: getCurrentPostId(),\n\t\t};\n\t}, [] );\n\n\tconst { disablePublishSidebar, enablePublishSidebar } =\n\t\tuseDispatch( editorStore );\n\n\tconst cancelButtonRef = useRef( null );\n\tconst wrapperRef = useMergeRefs( [\n\t\tuseFocusReturn(),\n\t\tuseConstrainedTabbing(),\n\t] );\n\n\tuseEffect( () => {\n\t\tcancelButtonRef.current?.focus();\n\t}, [] );\n\n\t// Auto-collapse the publish sidebar when a post is published and the user\n\t// makes an edit, or when the edited post changes. The panel only mounts\n\t// for unpublished posts, so `isPublished && isDirty` cannot be true on\n\t// mount it implies a publish-then-edit transition.\n\tconst prevPostIdRef = useRef( currentPostId );\n\tconst stableOnClose = useEvent( onClose );\n\tuseEffect( () => {\n\t\tconst postChanged = currentPostId !== prevPostIdRef.current;\n\t\tprevPostIdRef.current = currentPostId;\n\n\t\tif ( postChanged || ( isPublished && ! isSaving && isDirty ) ) {\n\t\t\tstableOnClose();\n\t\t}\n\t}, [ isPublished, isSaving, isDirty, currentPostId, stableOnClose ] );\n\n\tfunction onTogglePublishSidebar() {\n\t\tif ( isPublishSidebarEnabled ) {\n\t\t\tdisablePublishSidebar();\n\t\t} else {\n\t\t\tenablePublishSidebar();\n\t\t}\n\t}\n\n\tfunction onSubmit() {\n\t\tif ( ! hasPublishAction || ! isPostTypeViewable ) {\n\t\t\tonClose();\n\t\t}\n\t}\n\n\tconst isPublishedOrScheduled =\n\t\tisPublished || ( isScheduled && isBeingScheduled );\n\tconst isPrePublish = ! isPublishedOrScheduled && ! isSaving;\n\tconst isPostPublish = isPublishedOrScheduled && ! isSaving;\n\n\treturn (\n\t\t<div\n\t\t\tref={ wrapperRef }\n\t\t\ttabIndex={ -1 }\n\t\t\tclassName=\"editor-post-publish-panel\"\n\t\t\t{ ...propsForPanel }\n\t\t>\n\t\t\t<div className=\"editor-post-publish-panel__header\">\n\t\t\t\t{ isPostPublish ? (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\tonClick={ onClose }\n\t\t\t\t\t\ticon={ closeSmall }\n\t\t\t\t\t\tlabel={ __( 'Close panel' ) }\n\t\t\t\t\t/>\n\t\t\t\t) : (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<div className=\"editor-post-publish-panel__header-cancel-button\">\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tref={ cancelButtonRef }\n\t\t\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\t\t\tdisabled={ isSavingNonPostEntityChanges }\n\t\t\t\t\t\t\t\tonClick={ onClose }\n\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"editor-post-publish-panel__header-publish-button\">\n\t\t\t\t\t\t\t<PostPublishButton\n\t\t\t\t\t\t\t\tonSubmit={ onSubmit }\n\t\t\t\t\t\t\t\tforceIsDirty={ forceIsDirty }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t\t<div className=\"editor-post-publish-panel__content\">\n\t\t\t\t{ isPrePublish && (\n\t\t\t\t\t<PostPublishPanelPrepublish>\n\t\t\t\t\t\t{ PrePublishExtension && <PrePublishExtension /> }\n\t\t\t\t\t</PostPublishPanelPrepublish>\n\t\t\t\t) }\n\t\t\t\t{ isPostPublish && (\n\t\t\t\t\t<PostPublishPanelPostpublish focusOnMount>\n\t\t\t\t\t\t{ PostPublishExtension && <PostPublishExtension /> }\n\t\t\t\t\t</PostPublishPanelPostpublish>\n\t\t\t\t) }\n\t\t\t\t{ isSaving && <Spinner /> }\n\t\t\t</div>\n\t\t\t<div className=\"editor-post-publish-panel__footer\">\n\t\t\t\t<CheckboxControl\n\t\t\t\t\tlabel={ __( 'Always show pre-publish checks.' ) }\n\t\t\t\t\tchecked={ isPublishSidebarEnabled }\n\t\t\t\t\tonChange={ onTogglePublishSidebar }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAmB;AACnB,qBAAkC;AAClC,wBAAiD;AACjD,kBAAuC;AACvC,qBAKO;AACP,mBAA2B;AAC3B,uBAAmC;AAKnC,iCAA8B;AAC9B,wBAAuC;AACvC,yBAAwC;AACxC,mBAAqC;AAuHhC;AA1GU,SAAR,iBAAmC;AAAA,EACzC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACJ,GAAI;AACH,QAAM;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD,QAAI,uBAAW,CAAE,WAAY;AAC5B,UAAM,EAA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AAA,QACZ,GACD;AAAA;AAAA;AAAA,EACD;AAEF;",
6
6
  "names": ["coreStore", "editorStore", "PostPublishButton", "PostPublishPanelPrepublish", "PostPublishPanelPostpublish"]
7
7
  }
@@ -124,7 +124,7 @@ function PostPublishPanelPostpublish({
124
124
  postPublishNonLinkHeader
125
125
  ] }),
126
126
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_components.PanelBody, { children: [
127
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "post-publish-panel__postpublish-subheader", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("strong", { children: (0, import_i18n.__)("What\u2019s next?") }) }),
127
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "post-publish-panel__postpublish-subheader", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("strong", { children: (0, import_i18n.__)("What’s next?") }) }),
128
128
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "post-publish-panel__postpublish-post-address-container", children: [
129
129
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
130
130
  import_components.TextControl,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/post-publish-panel/postpublish.js"],
4
- "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport {\n\tPanelBody,\n\tButton,\n\tTextControl,\n\tExternalLink,\n} from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useCallback, useEffect, useState, useRef } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { addQueryArgs, safeDecodeURIComponent } from '@wordpress/url';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { useCopyToClipboard } from '@wordpress/compose';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { external } from '@wordpress/icons';\nimport { VisuallyHidden } from '@wordpress/ui';\n\n/**\n * Internal dependencies\n */\nimport PostScheduleLabel from '../post-schedule/label';\nimport { store as editorStore } from '../../store';\n\nconst POSTNAME = '%postname%';\nconst PAGENAME = '%pagename%';\n\n/**\n * Returns URL for a future post.\n *\n * @param {Object} post Post object.\n *\n * @return {string} PostPublish URL.\n */\n\nconst getFuturePostUrl = ( post ) => {\n\tconst { slug } = post;\n\n\tif ( post.permalink_template.includes( POSTNAME ) ) {\n\t\treturn post.permalink_template.replace( POSTNAME, slug );\n\t}\n\n\tif ( post.permalink_template.includes( PAGENAME ) ) {\n\t\treturn post.permalink_template.replace( PAGENAME, slug );\n\t}\n\n\treturn post.permalink_template;\n};\n\nfunction CopyButton( { text } ) {\n\tconst [ showCopyConfirmation, setShowCopyConfirmation ] = useState( false );\n\tconst timeoutIdRef = useRef();\n\tconst ref = useCopyToClipboard( text, () => {\n\t\tsetShowCopyConfirmation( true );\n\t\tif ( timeoutIdRef.current ) {\n\t\t\tclearTimeout( timeoutIdRef.current );\n\t\t}\n\t\ttimeoutIdRef.current = setTimeout( () => {\n\t\t\tsetShowCopyConfirmation( false );\n\t\t}, 4000 );\n\t} );\n\n\tuseEffect( () => {\n\t\treturn () => {\n\t\t\tif ( timeoutIdRef.current ) {\n\t\t\t\tclearTimeout( timeoutIdRef.current );\n\t\t\t}\n\t\t};\n\t}, [] );\n\n\treturn (\n\t\t<Button __next40pxDefaultSize variant=\"secondary\" ref={ ref }>\n\t\t\t{ showCopyConfirmation ? __( 'Copied!' ) : __( 'Copy' ) }\n\t\t</Button>\n\t);\n}\n\nexport default function PostPublishPanelPostpublish( {\n\tfocusOnMount,\n\tchildren,\n} ) {\n\tconst { post, postType, isScheduled } = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetEditedPostAttribute,\n\t\t\tgetCurrentPost,\n\t\t\tisCurrentPostScheduled,\n\t\t} = select( editorStore );\n\t\tconst { getPostType } = select( coreStore );\n\n\t\treturn {\n\t\t\tpost: getCurrentPost(),\n\t\t\tpostType: getPostType( getEditedPostAttribute( 'type' ) ),\n\t\t\tisScheduled: isCurrentPostScheduled(),\n\t\t};\n\t}, [] );\n\n\tconst postLabel = postType?.labels?.singular_name;\n\tconst viewPostLabel = postType?.labels?.view_item;\n\tconst addNewPostLabel = postType?.labels?.add_new_item;\n\tconst link =\n\t\tpost.status === 'future' ? getFuturePostUrl( post ) : post.link;\n\tconst addLink = addQueryArgs( 'post-new.php', {\n\t\tpost_type: post.type,\n\t} );\n\n\tconst postLinkRef = useCallback(\n\t\t( node ) => {\n\t\t\tif ( focusOnMount && node ) {\n\t\t\t\tnode.focus();\n\t\t\t}\n\t\t},\n\t\t[ focusOnMount ]\n\t);\n\n\tconst postPublishNonLinkHeader = isScheduled ? (\n\t\t<>\n\t\t\t{ __( 'is now scheduled. It will go live on' ) }{ ' ' }\n\t\t\t<PostScheduleLabel />.\n\t\t</>\n\t) : (\n\t\t__( 'is now live.' )\n\t);\n\n\treturn (\n\t\t<div className=\"post-publish-panel__postpublish\">\n\t\t\t<PanelBody className=\"post-publish-panel__postpublish-header\">\n\t\t\t\t<ExternalLink ref={ postLinkRef } href={ link }>\n\t\t\t\t\t{ decodeEntities( post.title ) || __( '(no title)' ) }\n\t\t\t\t</ExternalLink>{ ' ' }\n\t\t\t\t{ postPublishNonLinkHeader }\n\t\t\t</PanelBody>\n\t\t\t<PanelBody>\n\t\t\t\t<p className=\"post-publish-panel__postpublish-subheader\">\n\t\t\t\t\t<strong>{ __( 'What\u2019s next?' ) }</strong>\n\t\t\t\t</p>\n\t\t\t\t<div className=\"post-publish-panel__postpublish-post-address-container\">\n\t\t\t\t\t<TextControl\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tclassName=\"post-publish-panel__postpublish-post-address\"\n\t\t\t\t\t\treadOnly\n\t\t\t\t\t\tlabel={ sprintf(\n\t\t\t\t\t\t\t/* translators: %s: post type singular name */\n\t\t\t\t\t\t\t__( '%s address' ),\n\t\t\t\t\t\t\tpostLabel\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tvalue={ safeDecodeURIComponent( link ) }\n\t\t\t\t\t\tonFocus={ ( event ) => event.target.select() }\n\t\t\t\t\t/>\n\n\t\t\t\t\t<div className=\"post-publish-panel__postpublish-post-address__copy-button-wrap\">\n\t\t\t\t\t\t<CopyButton text={ link } />\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t<div className=\"post-publish-panel__postpublish-buttons\">\n\t\t\t\t\t{ ! isScheduled && (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\thref={ link }\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\ticon={ external }\n\t\t\t\t\t\t\ticonPosition=\"right\"\n\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ viewPostLabel }\n\t\t\t\t\t\t\t<VisuallyHidden render={ <span /> }>\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t/* translators: accessibility text */\n\t\t\t\t\t\t\t\t\t__( '(opens in a new tab)' )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t) }\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant={ isScheduled ? 'primary' : 'secondary' }\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\thref={ addLink }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ addNewPostLabel }\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t</PanelBody>\n\t\t\t{ children }\n\t\t</div>\n\t);\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,wBAKO;AACP,kBAA4B;AAC5B,qBAAyD;AACzD,kBAA0B;AAC1B,iBAAqD;AACrD,2BAA+B;AAC/B,qBAAmC;AACnC,uBAAmC;AACnC,mBAAyB;AACzB,gBAA+B;AAK/B,mBAA8B;AAC9B,mBAAqC;AAiDnC;AA/CF,IAAM,WAA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AAO,MAAO,GAC3B;AAAA,SACD;AAAA,MAEA,6CAAC,SAAI,WAAU,2CACZ;AAAA,SAAE,eACH;AAAA,UAAC;AAAA;AAAA,YACA,SAAQ;AAAA,YACR,MAAO;AAAA,YACP,uBAAqB;AAAA,YACrB,MAAO;AAAA,YACP,cAAa;AAAA,YACb,QAAO;AAAA,YAEL;AAAA;AAAA,cACF,4CAAC;AAAA,gBAAe,QAAS,4CAAC,UAAK;AAAA;AAAA,gBAG7B,8BAAI,sBAAuB;AAAA,eAE7B;AAAA;AAAA;AAAA,QACD;AAAA,QAED;AAAA,UAAC;AAAA;AAAA,YACA,SAAU,cAAc,YAAY;AAAA,YACpC,uBAAqB;AAAA,YACrB,MAAO;AAAA,YAEL;AAAA;AAAA,QACH;AAAA,SACD;AAAA,OACD;AAAA,IACE;AAAA,KACH;AAEF;",
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport {\n\tPanelBody,\n\tButton,\n\tTextControl,\n\tExternalLink,\n} from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useCallback, useEffect, useState, useRef } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { addQueryArgs, safeDecodeURIComponent } from '@wordpress/url';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { useCopyToClipboard } from '@wordpress/compose';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { external } from '@wordpress/icons';\nimport { VisuallyHidden } from '@wordpress/ui';\n\n/**\n * Internal dependencies\n */\nimport PostScheduleLabel from '../post-schedule/label';\nimport { store as editorStore } from '../../store';\n\nconst POSTNAME = '%postname%';\nconst PAGENAME = '%pagename%';\n\n/**\n * Returns URL for a future post.\n *\n * @param {Object} post Post object.\n *\n * @return {string} PostPublish URL.\n */\n\nconst getFuturePostUrl = ( post ) => {\n\tconst { slug } = post;\n\n\tif ( post.permalink_template.includes( POSTNAME ) ) {\n\t\treturn post.permalink_template.replace( POSTNAME, slug );\n\t}\n\n\tif ( post.permalink_template.includes( PAGENAME ) ) {\n\t\treturn post.permalink_template.replace( PAGENAME, slug );\n\t}\n\n\treturn post.permalink_template;\n};\n\nfunction CopyButton( { text } ) {\n\tconst [ showCopyConfirmation, setShowCopyConfirmation ] = useState( false );\n\tconst timeoutIdRef = useRef();\n\tconst ref = useCopyToClipboard( text, () => {\n\t\tsetShowCopyConfirmation( true );\n\t\tif ( timeoutIdRef.current ) {\n\t\t\tclearTimeout( timeoutIdRef.current );\n\t\t}\n\t\ttimeoutIdRef.current = setTimeout( () => {\n\t\t\tsetShowCopyConfirmation( false );\n\t\t}, 4000 );\n\t} );\n\n\tuseEffect( () => {\n\t\treturn () => {\n\t\t\tif ( timeoutIdRef.current ) {\n\t\t\t\tclearTimeout( timeoutIdRef.current );\n\t\t\t}\n\t\t};\n\t}, [] );\n\n\treturn (\n\t\t<Button __next40pxDefaultSize variant=\"secondary\" ref={ ref }>\n\t\t\t{ showCopyConfirmation ? __( 'Copied!' ) : __( 'Copy' ) }\n\t\t</Button>\n\t);\n}\n\nexport default function PostPublishPanelPostpublish( {\n\tfocusOnMount,\n\tchildren,\n} ) {\n\tconst { post, postType, isScheduled } = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetEditedPostAttribute,\n\t\t\tgetCurrentPost,\n\t\t\tisCurrentPostScheduled,\n\t\t} = select( editorStore );\n\t\tconst { getPostType } = select( coreStore );\n\n\t\treturn {\n\t\t\tpost: getCurrentPost(),\n\t\t\tpostType: getPostType( getEditedPostAttribute( 'type' ) ),\n\t\t\tisScheduled: isCurrentPostScheduled(),\n\t\t};\n\t}, [] );\n\n\tconst postLabel = postType?.labels?.singular_name;\n\tconst viewPostLabel = postType?.labels?.view_item;\n\tconst addNewPostLabel = postType?.labels?.add_new_item;\n\tconst link =\n\t\tpost.status === 'future' ? getFuturePostUrl( post ) : post.link;\n\tconst addLink = addQueryArgs( 'post-new.php', {\n\t\tpost_type: post.type,\n\t} );\n\n\tconst postLinkRef = useCallback(\n\t\t( node ) => {\n\t\t\tif ( focusOnMount && node ) {\n\t\t\t\tnode.focus();\n\t\t\t}\n\t\t},\n\t\t[ focusOnMount ]\n\t);\n\n\tconst postPublishNonLinkHeader = isScheduled ? (\n\t\t<>\n\t\t\t{ __( 'is now scheduled. It will go live on' ) }{ ' ' }\n\t\t\t<PostScheduleLabel />.\n\t\t</>\n\t) : (\n\t\t__( 'is now live.' )\n\t);\n\n\treturn (\n\t\t<div className=\"post-publish-panel__postpublish\">\n\t\t\t<PanelBody className=\"post-publish-panel__postpublish-header\">\n\t\t\t\t<ExternalLink ref={ postLinkRef } href={ link }>\n\t\t\t\t\t{ decodeEntities( post.title ) || __( '(no title)' ) }\n\t\t\t\t</ExternalLink>{ ' ' }\n\t\t\t\t{ postPublishNonLinkHeader }\n\t\t\t</PanelBody>\n\t\t\t<PanelBody>\n\t\t\t\t<p className=\"post-publish-panel__postpublish-subheader\">\n\t\t\t\t\t<strong>{ __( 'What’s next?' ) }</strong>\n\t\t\t\t</p>\n\t\t\t\t<div className=\"post-publish-panel__postpublish-post-address-container\">\n\t\t\t\t\t<TextControl\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tclassName=\"post-publish-panel__postpublish-post-address\"\n\t\t\t\t\t\treadOnly\n\t\t\t\t\t\tlabel={ sprintf(\n\t\t\t\t\t\t\t/* translators: %s: post type singular name */\n\t\t\t\t\t\t\t__( '%s address' ),\n\t\t\t\t\t\t\tpostLabel\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tvalue={ safeDecodeURIComponent( link ) }\n\t\t\t\t\t\tonFocus={ ( event ) => event.target.select() }\n\t\t\t\t\t/>\n\n\t\t\t\t\t<div className=\"post-publish-panel__postpublish-post-address__copy-button-wrap\">\n\t\t\t\t\t\t<CopyButton text={ link } />\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t<div className=\"post-publish-panel__postpublish-buttons\">\n\t\t\t\t\t{ ! isScheduled && (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\thref={ link }\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\ticon={ external }\n\t\t\t\t\t\t\ticonPosition=\"right\"\n\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ viewPostLabel }\n\t\t\t\t\t\t\t<VisuallyHidden render={ <span /> }>\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t/* translators: accessibility text */\n\t\t\t\t\t\t\t\t\t__( '(opens in a new tab)' )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t) }\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant={ isScheduled ? 'primary' : 'secondary' }\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\thref={ addLink }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ addNewPostLabel }\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t</PanelBody>\n\t\t\t{ children }\n\t\t</div>\n\t);\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,wBAKO;AACP,kBAA4B;AAC5B,qBAAyD;AACzD,kBAA0B;AAC1B,iBAAqD;AACrD,2BAA+B;AAC/B,qBAAmC;AACnC,uBAAmC;AACnC,mBAAyB;AACzB,gBAA+B;AAK/B,mBAA8B;AAC9B,mBAAqC;AAiDnC;AA/CF,IAAM,WAAW;AACjB,IAAM,WAAW;AAUjB,IAAM,mBAAmB,CAAE,SAAU;AACpC,QAAM,EAAE,KAAK,IAAI;AAEjB,MAAK,KAAK,mBAAmB,SAAU,QAAS,GAAI;AACnD,WAAO,KAAK,mBAAmB,QAAS,UAAU,IAAK;AAAA,EACxD;AAEA,MAAK,KAAK,mBAAmB,SAAU,QAAS,GAAI;AACnD,WAA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