@wordpress/editor 13.34.0 → 14.0.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 (972) hide show
  1. package/CHANGELOG.md +17 -4
  2. package/README.md +333 -39
  3. package/build/bindings/index.js +1 -3
  4. package/build/bindings/index.js.map +1 -1
  5. package/build/bindings/pattern-overrides.js +71 -2
  6. package/build/bindings/pattern-overrides.js.map +1 -1
  7. package/build/bindings/post-meta.js +38 -2
  8. package/build/bindings/post-meta.js.map +1 -1
  9. package/build/components/autocompleters/user.js +12 -8
  10. package/build/components/autocompleters/user.js.map +1 -1
  11. package/build/components/block-manager/category.js +19 -17
  12. package/build/components/block-manager/category.js.map +1 -1
  13. package/build/components/block-manager/checklist.js +15 -14
  14. package/build/components/block-manager/checklist.js.map +1 -1
  15. package/build/components/block-manager/index.js +37 -33
  16. package/build/components/block-manager/index.js.map +1 -1
  17. package/build/components/block-removal-warnings/index.js +2 -2
  18. package/build/components/block-removal-warnings/index.js.map +1 -1
  19. package/build/components/block-settings-menu/content-only-settings-menu.js +140 -0
  20. package/build/components/block-settings-menu/content-only-settings-menu.js.map +1 -0
  21. package/build/components/block-settings-menu/content-only-settings-menu.native.js +11 -0
  22. package/build/components/block-settings-menu/content-only-settings-menu.native.js.map +1 -0
  23. package/build/components/block-settings-menu/plugin-block-settings-menu-item.js +16 -13
  24. package/build/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -1
  25. package/build/components/blog-title/index.js +116 -0
  26. package/build/components/blog-title/index.js.map +1 -0
  27. package/build/components/collapsible-block-toolbar/index.js +22 -19
  28. package/build/components/collapsible-block-toolbar/index.js.map +1 -1
  29. package/build/components/commands/index.js +109 -3
  30. package/build/components/commands/index.js.map +1 -1
  31. package/build/components/create-template-part-modal/index.js +167 -0
  32. package/build/components/create-template-part-modal/index.js.map +1 -0
  33. package/build/components/create-template-part-modal/utils.js +64 -0
  34. package/build/components/create-template-part-modal/utils.js.map +1 -0
  35. package/build/components/deprecated.js +2 -2
  36. package/build/components/deprecated.js.map +1 -1
  37. package/build/components/document-bar/index.js +96 -72
  38. package/build/components/document-bar/index.js.map +1 -1
  39. package/build/components/document-outline/index.js +124 -121
  40. package/build/components/document-outline/index.js.map +1 -1
  41. package/build/components/document-outline/item.js +20 -16
  42. package/build/components/document-outline/item.js.map +1 -1
  43. package/build/components/document-tools/index.js +69 -69
  44. package/build/components/document-tools/index.js.map +1 -1
  45. package/build/components/editor-help/add-blocks.native.js +14 -11
  46. package/build/components/editor-help/add-blocks.native.js.map +1 -1
  47. package/build/components/editor-help/customize-blocks.native.js +14 -11
  48. package/build/components/editor-help/customize-blocks.native.js.map +1 -1
  49. package/build/components/editor-help/help-detail-navigation-screen.native.js +32 -22
  50. package/build/components/editor-help/help-detail-navigation-screen.native.js.map +1 -1
  51. package/build/components/editor-help/help-get-support-button.native.js +8 -6
  52. package/build/components/editor-help/help-get-support-button.native.js.map +1 -1
  53. package/build/components/editor-help/help-section-title.native.js +8 -6
  54. package/build/components/editor-help/help-section-title.native.js.map +1 -1
  55. package/build/components/editor-help/help-topic-row.native.js +7 -6
  56. package/build/components/editor-help/help-topic-row.native.js.map +1 -1
  57. package/build/components/editor-help/icon-move-blocks.native.js +7 -6
  58. package/build/components/editor-help/icon-move-blocks.native.js.map +1 -1
  59. package/build/components/editor-help/index.native.js +94 -76
  60. package/build/components/editor-help/index.native.js.map +1 -1
  61. package/build/components/editor-help/intro-to-blocks.native.js +41 -37
  62. package/build/components/editor-help/intro-to-blocks.native.js.map +1 -1
  63. package/build/components/editor-help/move-blocks.native.js +25 -21
  64. package/build/components/editor-help/move-blocks.native.js.map +1 -1
  65. package/build/components/editor-help/remove-blocks.native.js +12 -9
  66. package/build/components/editor-help/remove-blocks.native.js.map +1 -1
  67. package/build/components/editor-help/view-sections.native.js +24 -19
  68. package/build/components/editor-help/view-sections.native.js.map +1 -1
  69. package/build/components/editor-history/redo.js +2 -2
  70. package/build/components/editor-history/redo.js.map +1 -1
  71. package/build/components/editor-history/undo.js +2 -2
  72. package/build/components/editor-history/undo.js.map +1 -1
  73. package/build/components/editor-interface/content-slot-fill.js +23 -0
  74. package/build/components/editor-interface/content-slot-fill.js.map +1 -0
  75. package/build/components/editor-interface/index.js +178 -0
  76. package/build/components/editor-interface/index.js.map +1 -0
  77. package/build/components/editor-notices/index.js +22 -9
  78. package/build/components/editor-notices/index.js.map +1 -1
  79. package/build/components/editor-snackbars/index.js +2 -2
  80. package/build/components/editor-snackbars/index.js.map +1 -1
  81. package/build/components/entities-saved-states/entity-record-item.js +37 -10
  82. package/build/components/entities-saved-states/entity-record-item.js.map +1 -1
  83. package/build/components/entities-saved-states/entity-type-list.js +25 -22
  84. package/build/components/entities-saved-states/entity-type-list.js.map +1 -1
  85. package/build/components/entities-saved-states/index.js +53 -46
  86. package/build/components/entities-saved-states/index.js.map +1 -1
  87. package/build/components/error-boundary/index.js +27 -14
  88. package/build/components/error-boundary/index.js.map +1 -1
  89. package/build/components/error-boundary/index.native.js +45 -35
  90. package/build/components/error-boundary/index.native.js.map +1 -1
  91. package/build/components/global-keyboard-shortcuts/register-shortcuts.js +4 -5
  92. package/build/components/global-keyboard-shortcuts/register-shortcuts.js.map +1 -1
  93. package/build/components/global-styles-provider/index.js +195 -0
  94. package/build/components/global-styles-provider/index.js.map +1 -0
  95. package/build/components/header/back-button.js +34 -0
  96. package/build/components/header/back-button.js.map +1 -0
  97. package/build/components/header/index.js +176 -0
  98. package/build/components/header/index.js.map +1 -0
  99. package/build/components/inserter-sidebar/index.js +83 -32
  100. package/build/components/inserter-sidebar/index.js.map +1 -1
  101. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +2 -2
  102. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
  103. package/build/components/keyboard-shortcut-help-modal/index.js +54 -49
  104. package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  105. package/build/components/keyboard-shortcut-help-modal/shortcut.js +30 -26
  106. package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
  107. package/build/components/list-view-sidebar/index.js +59 -47
  108. package/build/components/list-view-sidebar/index.js.map +1 -1
  109. package/build/components/list-view-sidebar/list-view-outline.js +21 -4
  110. package/build/components/list-view-sidebar/list-view-outline.js.map +1 -1
  111. package/build/components/local-autosave-monitor/index.js +15 -2
  112. package/build/components/local-autosave-monitor/index.js.map +1 -1
  113. package/build/components/mode-switcher/index.js +10 -10
  114. package/build/components/mode-switcher/index.js.map +1 -1
  115. package/build/components/more-menu/copy-content-menu-item.js +5 -4
  116. package/build/components/more-menu/copy-content-menu-item.js.map +1 -1
  117. package/build/components/more-menu/index.js +89 -76
  118. package/build/components/more-menu/index.js.map +1 -1
  119. package/build/components/more-menu/tools-more-menu-group.js +2 -2
  120. package/build/components/more-menu/tools-more-menu-group.js.map +1 -1
  121. package/build/components/more-menu/view-more-menu-group.js +2 -2
  122. package/build/components/more-menu/view-more-menu-group.js.map +1 -1
  123. package/build/components/offline-status/index.native.js +12 -11
  124. package/build/components/offline-status/index.native.js.map +1 -1
  125. package/build/components/page-attributes/order.js +87 -14
  126. package/build/components/page-attributes/order.js.map +1 -1
  127. package/build/components/page-attributes/panel.js +10 -19
  128. package/build/components/page-attributes/panel.js.map +1 -1
  129. package/build/components/page-attributes/parent.js +86 -3
  130. package/build/components/page-attributes/parent.js.map +1 -1
  131. package/build/components/pattern-duplicate-modal/index.js +59 -0
  132. package/build/components/pattern-duplicate-modal/index.js.map +1 -0
  133. package/build/components/pattern-overrides-panel/index.js +2 -2
  134. package/build/components/pattern-overrides-panel/index.js.map +1 -1
  135. package/build/components/pattern-rename-modal/index.js +58 -0
  136. package/build/components/pattern-rename-modal/index.js.map +1 -0
  137. package/build/components/plugin-document-setting-panel/index.js +17 -12
  138. package/build/components/plugin-document-setting-panel/index.js.map +1 -1
  139. package/build/components/plugin-post-publish-panel/index.js +10 -7
  140. package/build/components/plugin-post-publish-panel/index.js.map +1 -1
  141. package/build/components/plugin-post-status-info/index.js +7 -4
  142. package/build/components/plugin-post-status-info/index.js.map +1 -1
  143. package/build/components/plugin-pre-publish-panel/index.js +10 -7
  144. package/build/components/plugin-pre-publish-panel/index.js.map +1 -1
  145. package/build/components/plugin-sidebar/index.js +3 -4
  146. package/build/components/plugin-sidebar/index.js.map +1 -1
  147. package/build/components/plugin-sidebar-more-menu-item/index.js +3 -5
  148. package/build/components/plugin-sidebar-more-menu-item/index.js.map +1 -1
  149. package/build/components/post-actions/actions.js +454 -327
  150. package/build/components/post-actions/actions.js.map +1 -1
  151. package/build/components/post-actions/export-pattern-action.js +64 -0
  152. package/build/components/post-actions/export-pattern-action.js.map +1 -0
  153. package/build/components/post-actions/export-pattern-action.native.js +11 -0
  154. package/build/components/post-actions/export-pattern-action.native.js.map +1 -0
  155. package/build/components/post-actions/index.js +71 -62
  156. package/build/components/post-actions/index.js.map +1 -1
  157. package/build/components/post-author/check.js +6 -6
  158. package/build/components/post-author/check.js.map +1 -1
  159. package/build/components/post-author/combobox.js +4 -3
  160. package/build/components/post-author/combobox.js.map +1 -1
  161. package/build/components/post-author/hook.js +2 -1
  162. package/build/components/post-author/hook.js.map +1 -1
  163. package/build/components/post-author/index.js +3 -3
  164. package/build/components/post-author/index.js.map +1 -1
  165. package/build/components/post-author/panel.js +72 -4
  166. package/build/components/post-author/panel.js.map +1 -1
  167. package/build/components/post-author/select.js +4 -3
  168. package/build/components/post-author/select.js.map +1 -1
  169. package/build/components/post-card-panel/index.js +46 -35
  170. package/build/components/post-card-panel/index.js.map +1 -1
  171. package/build/components/post-comments/index.js +44 -8
  172. package/build/components/post-comments/index.js.map +1 -1
  173. package/build/components/post-content-information/index.js +8 -5
  174. package/build/components/post-content-information/index.js.map +1 -1
  175. package/build/components/post-discussion/panel.js +122 -24
  176. package/build/components/post-discussion/panel.js.map +1 -1
  177. package/build/components/post-excerpt/check.js +6 -6
  178. package/build/components/post-excerpt/check.js.map +1 -1
  179. package/build/components/post-excerpt/index.js +18 -17
  180. package/build/components/post-excerpt/index.js.map +1 -1
  181. package/build/components/post-excerpt/panel.js +59 -42
  182. package/build/components/post-excerpt/panel.js.map +1 -1
  183. package/build/components/post-excerpt/plugin.js +7 -4
  184. package/build/components/post-excerpt/plugin.js.map +1 -1
  185. package/build/components/post-featured-image/check.js +17 -7
  186. package/build/components/post-featured-image/check.js.map +1 -1
  187. package/build/components/post-featured-image/index.js +77 -49
  188. package/build/components/post-featured-image/index.js.map +1 -1
  189. package/build/components/post-featured-image/panel.js +22 -7
  190. package/build/components/post-featured-image/panel.js.map +1 -1
  191. package/build/components/post-format/check.js +14 -4
  192. package/build/components/post-format/check.js.map +1 -1
  193. package/build/components/post-format/index.js +37 -20
  194. package/build/components/post-format/index.js.map +1 -1
  195. package/build/components/post-format/panel.js +93 -0
  196. package/build/components/post-format/panel.js.map +1 -0
  197. package/build/components/post-last-edited-panel/index.js +7 -4
  198. package/build/components/post-last-edited-panel/index.js.map +1 -1
  199. package/build/components/post-last-revision/check.js +13 -5
  200. package/build/components/post-last-revision/check.js.map +1 -1
  201. package/build/components/post-last-revision/index.js +19 -13
  202. package/build/components/post-last-revision/index.js.map +1 -1
  203. package/build/components/post-last-revision/panel.js +12 -5
  204. package/build/components/post-last-revision/panel.js.map +1 -1
  205. package/build/components/post-locked-modal/index.js +57 -35
  206. package/build/components/post-locked-modal/index.js.map +1 -1
  207. package/build/components/post-panel-row/index.js +13 -10
  208. package/build/components/post-panel-row/index.js.map +1 -1
  209. package/build/components/post-panel-section/index.js +29 -0
  210. package/build/components/post-panel-section/index.js.map +1 -0
  211. package/build/components/post-pending-status/check.js +10 -0
  212. package/build/components/post-pending-status/check.js.map +1 -1
  213. package/build/components/post-pending-status/index.js +14 -7
  214. package/build/components/post-pending-status/index.js.map +1 -1
  215. package/build/components/post-pingbacks/index.js +15 -4
  216. package/build/components/post-pingbacks/index.js.map +1 -1
  217. package/build/components/post-preview-button/index.js +45 -21
  218. package/build/components/post-preview-button/index.js.map +1 -1
  219. package/build/components/post-publish-button/index.js +21 -11
  220. package/build/components/post-publish-button/index.js.map +1 -1
  221. package/build/components/post-publish-button/post-publish-button-or-toggle.js +2 -2
  222. package/build/components/post-publish-button/post-publish-button-or-toggle.js.map +1 -1
  223. package/build/components/post-publish-panel/index.js +46 -33
  224. package/build/components/post-publish-panel/index.js.map +1 -1
  225. package/build/components/post-publish-panel/maybe-category-panel.js +12 -9
  226. package/build/components/post-publish-panel/maybe-category-panel.js.map +1 -1
  227. package/build/components/post-publish-panel/maybe-post-format-panel.js +21 -15
  228. package/build/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
  229. package/build/components/post-publish-panel/maybe-tags-panel.js +13 -10
  230. package/build/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
  231. package/build/components/post-publish-panel/maybe-upload-media.js +29 -24
  232. package/build/components/post-publish-panel/maybe-upload-media.js.map +1 -1
  233. package/build/components/post-publish-panel/postpublish.js +55 -38
  234. package/build/components/post-publish-panel/postpublish.js.map +1 -1
  235. package/build/components/post-publish-panel/prepublish.js +41 -26
  236. package/build/components/post-publish-panel/prepublish.js.map +1 -1
  237. package/build/components/post-saved-state/index.js +10 -10
  238. package/build/components/post-saved-state/index.js.map +1 -1
  239. package/build/components/post-schedule/check.js +8 -0
  240. package/build/components/post-schedule/check.js.map +1 -1
  241. package/build/components/post-schedule/index.js +30 -5
  242. package/build/components/post-schedule/index.js.map +1 -1
  243. package/build/components/post-schedule/label.js +16 -0
  244. package/build/components/post-schedule/label.js.map +1 -1
  245. package/build/components/post-schedule/panel.js +43 -30
  246. package/build/components/post-schedule/panel.js.map +1 -1
  247. package/build/components/post-slug/check.js +5 -4
  248. package/build/components/post-slug/check.js.map +1 -1
  249. package/build/components/post-slug/index.js +5 -3
  250. package/build/components/post-slug/index.js.map +1 -1
  251. package/build/components/post-slug/panel.js +30 -0
  252. package/build/components/post-slug/panel.js.map +1 -0
  253. package/build/components/post-status/index.js +118 -119
  254. package/build/components/post-status/index.js.map +1 -1
  255. package/build/components/post-sticky/index.js +16 -8
  256. package/build/components/post-sticky/index.js.map +1 -1
  257. package/build/components/post-sticky/panel.js +25 -0
  258. package/build/components/post-sticky/panel.js.map +1 -0
  259. package/build/components/post-switch-to-draft-button/index.js +25 -21
  260. package/build/components/post-switch-to-draft-button/index.js.map +1 -1
  261. package/build/components/post-sync-status/index.js +8 -6
  262. package/build/components/post-sync-status/index.js.map +1 -1
  263. package/build/components/post-taxonomies/flat-term-selector.js +21 -20
  264. package/build/components/post-taxonomies/flat-term-selector.js.map +1 -1
  265. package/build/components/post-taxonomies/hierarchical-term-selector.js +71 -61
  266. package/build/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
  267. package/build/components/post-taxonomies/index.js +6 -6
  268. package/build/components/post-taxonomies/index.js.map +1 -1
  269. package/build/components/post-taxonomies/most-used-terms.js +19 -15
  270. package/build/components/post-taxonomies/most-used-terms.js.map +1 -1
  271. package/build/components/post-taxonomies/panel.js +15 -11
  272. package/build/components/post-taxonomies/panel.js.map +1 -1
  273. package/build/components/post-template/block-theme.js +42 -32
  274. package/build/components/post-template/block-theme.js.map +1 -1
  275. package/build/components/post-template/classic-theme.js +73 -50
  276. package/build/components/post-template/classic-theme.js.map +1 -1
  277. package/build/components/post-template/create-new-template-modal.js +33 -27
  278. package/build/components/post-template/create-new-template-modal.js.map +1 -1
  279. package/build/components/post-template/create-new-template.js +14 -11
  280. package/build/components/post-template/create-new-template.js.map +1 -1
  281. package/build/components/post-template/panel.js +16 -10
  282. package/build/components/post-template/panel.js.map +1 -1
  283. package/build/components/post-template/reset-default-template.js +5 -4
  284. package/build/components/post-template/reset-default-template.js.map +1 -1
  285. package/build/components/post-template/swap-template-button.js +20 -15
  286. package/build/components/post-template/swap-template-button.js.map +1 -1
  287. package/build/components/post-text-editor/index.js +27 -20
  288. package/build/components/post-text-editor/index.js.map +1 -1
  289. package/build/components/post-title/index.js +31 -19
  290. package/build/components/post-title/index.js.map +1 -1
  291. package/build/components/post-title/index.native.js +81 -57
  292. package/build/components/post-title/index.native.js.map +1 -1
  293. package/build/components/post-title/post-title-raw.js +12 -5
  294. package/build/components/post-title/post-title-raw.js.map +1 -1
  295. package/build/components/post-title/use-post-title-focus.js +7 -0
  296. package/build/components/post-title/use-post-title-focus.js.map +1 -1
  297. package/build/components/post-title/use-post-title.js +5 -0
  298. package/build/components/post-title/use-post-title.js.map +1 -1
  299. package/build/components/post-transform-panel/hooks.js +90 -0
  300. package/build/components/post-transform-panel/hooks.js.map +1 -0
  301. package/build/components/post-transform-panel/index.js +101 -0
  302. package/build/components/post-transform-panel/index.js.map +1 -0
  303. package/build/components/post-trash/index.js +19 -15
  304. package/build/components/post-trash/index.js.map +1 -1
  305. package/build/components/post-type-support-check/index.js +1 -1
  306. package/build/components/post-type-support-check/index.js.map +1 -1
  307. package/build/components/post-url/check.js +8 -0
  308. package/build/components/post-url/check.js.map +1 -1
  309. package/build/components/post-url/index.js +98 -73
  310. package/build/components/post-url/index.js.map +1 -1
  311. package/build/components/post-url/label.js +11 -0
  312. package/build/components/post-url/label.js.map +1 -1
  313. package/build/components/post-url/panel.js +33 -25
  314. package/build/components/post-url/panel.js.map +1 -1
  315. package/build/components/post-view-link/index.js +2 -2
  316. package/build/components/post-view-link/index.js.map +1 -1
  317. package/build/components/post-visibility/check.js +9 -0
  318. package/build/components/post-visibility/check.js.map +1 -1
  319. package/build/components/post-visibility/index.js +83 -68
  320. package/build/components/post-visibility/index.js.map +1 -1
  321. package/build/components/post-visibility/label.js +11 -0
  322. package/build/components/post-visibility/label.js.map +1 -1
  323. package/build/components/posts-per-page/index.js +109 -0
  324. package/build/components/posts-per-page/index.js.map +1 -0
  325. package/build/components/preferences-modal/enable-plugin-document-setting-panel.js +7 -5
  326. package/build/components/preferences-modal/enable-plugin-document-setting-panel.js.map +1 -1
  327. package/build/components/preferences-modal/index.js +124 -102
  328. package/build/components/preferences-modal/index.js.map +1 -1
  329. package/build/components/preview-dropdown/index.js +47 -31
  330. package/build/components/preview-dropdown/index.js.map +1 -1
  331. package/build/components/provider/index.js +96 -20
  332. package/build/components/provider/index.js.map +1 -1
  333. package/build/components/provider/index.native.js +55 -19
  334. package/build/components/provider/index.native.js.map +1 -1
  335. package/build/components/provider/use-block-editor-settings.js +23 -4
  336. package/build/components/provider/use-block-editor-settings.js.map +1 -1
  337. package/build/components/provider/with-registry-provider.js +31 -24
  338. package/build/components/provider/with-registry-provider.js.map +1 -1
  339. package/build/components/resizable-editor/index.js +96 -0
  340. package/build/components/resizable-editor/index.js.map +1 -0
  341. package/build/components/resizable-editor/resize-handle.js +59 -0
  342. package/build/components/resizable-editor/resize-handle.js.map +1 -0
  343. package/build/components/save-publish-panels/index.js +35 -26
  344. package/build/components/save-publish-panels/index.js.map +1 -1
  345. package/build/components/sidebar/constants.js +11 -0
  346. package/build/components/sidebar/constants.js.map +1 -0
  347. package/build/components/sidebar/header.js +56 -0
  348. package/build/components/sidebar/header.js.map +1 -0
  349. package/build/components/sidebar/index.js +161 -0
  350. package/build/components/sidebar/index.js.map +1 -0
  351. package/build/components/sidebar/post-summary.js +89 -0
  352. package/build/components/sidebar/post-summary.js.map +1 -0
  353. package/build/components/site-discussion/index.js +133 -0
  354. package/build/components/site-discussion/index.js.map +1 -0
  355. package/build/components/start-page-options/index.js +18 -18
  356. package/build/components/start-page-options/index.js.map +1 -1
  357. package/build/components/start-template-options/index.js +198 -0
  358. package/build/components/start-template-options/index.js.map +1 -0
  359. package/build/components/table-of-contents/index.js +4 -4
  360. package/build/components/table-of-contents/index.js.map +1 -1
  361. package/build/components/table-of-contents/panel.js +53 -35
  362. package/build/components/table-of-contents/panel.js.map +1 -1
  363. package/build/components/template-areas/index.js +36 -22
  364. package/build/components/template-areas/index.js.map +1 -1
  365. package/build/components/template-content-panel/index.js +39 -0
  366. package/build/components/template-content-panel/index.js.map +1 -0
  367. package/build/components/template-validation-notice/index.js +25 -21
  368. package/build/components/template-validation-notice/index.js.map +1 -1
  369. package/build/components/text-editor/index.js +73 -0
  370. package/build/components/text-editor/index.js.map +1 -0
  371. package/build/components/time-to-read/index.js +8 -8
  372. package/build/components/time-to-read/index.js.map +1 -1
  373. package/build/components/{editor-canvas → visual-editor}/edit-template-blocks-notification.js +6 -6
  374. package/build/components/visual-editor/edit-template-blocks-notification.js.map +1 -0
  375. package/build/components/{editor-canvas → visual-editor}/index.js +130 -78
  376. package/build/components/visual-editor/index.js.map +1 -0
  377. package/build/components/word-count/index.js +5 -4
  378. package/build/components/word-count/index.js.map +1 -1
  379. package/build/hooks/custom-sources-backwards-compatibility.js +3 -4
  380. package/build/hooks/custom-sources-backwards-compatibility.js.map +1 -1
  381. package/build/hooks/index.js +1 -0
  382. package/build/hooks/index.js.map +1 -1
  383. package/build/hooks/media-upload.js +10 -0
  384. package/build/hooks/media-upload.js.map +1 -0
  385. package/build/hooks/pattern-overrides.js +25 -16
  386. package/build/hooks/pattern-overrides.js.map +1 -1
  387. package/build/private-apis.js +15 -38
  388. package/build/private-apis.js.map +1 -1
  389. package/build/private-apis.native.js +48 -0
  390. package/build/private-apis.native.js.map +1 -0
  391. package/build/store/constants.js +4 -1
  392. package/build/store/constants.js.map +1 -1
  393. package/build/store/private-actions.js +10 -14
  394. package/build/store/private-actions.js.map +1 -1
  395. package/build/store/private-selectors.js +45 -2
  396. package/build/store/private-selectors.js.map +1 -1
  397. package/build/store/reducer.js +15 -0
  398. package/build/store/reducer.js.map +1 -1
  399. package/build/store/selectors.js +1 -1
  400. package/build/store/selectors.js.map +1 -1
  401. package/build/utils/set-nested-value.js +44 -0
  402. package/build/utils/set-nested-value.js.map +1 -0
  403. package/build-module/bindings/index.js +1 -3
  404. package/build-module/bindings/index.js.map +1 -1
  405. package/build-module/bindings/pattern-overrides.js +70 -2
  406. package/build-module/bindings/pattern-overrides.js.map +1 -1
  407. package/build-module/bindings/post-meta.js +38 -2
  408. package/build-module/bindings/post-meta.js.map +1 -1
  409. package/build-module/components/autocompleters/user.js +14 -9
  410. package/build-module/components/autocompleters/user.js.map +1 -1
  411. package/build-module/components/block-manager/category.js +20 -17
  412. package/build-module/components/block-manager/category.js.map +1 -1
  413. package/build-module/components/block-manager/checklist.js +16 -14
  414. package/build-module/components/block-manager/checklist.js.map +1 -1
  415. package/build-module/components/block-manager/index.js +38 -33
  416. package/build-module/components/block-manager/index.js.map +1 -1
  417. package/build-module/components/block-removal-warnings/index.js +2 -2
  418. package/build-module/components/block-removal-warnings/index.js.map +1 -1
  419. package/build-module/components/block-settings-menu/content-only-settings-menu.js +135 -0
  420. package/build-module/components/block-settings-menu/content-only-settings-menu.js.map +1 -0
  421. package/build-module/components/block-settings-menu/content-only-settings-menu.native.js +5 -0
  422. package/build-module/components/block-settings-menu/content-only-settings-menu.native.js.map +1 -0
  423. package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js +16 -13
  424. package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -1
  425. package/build-module/components/blog-title/index.js +110 -0
  426. package/build-module/components/blog-title/index.js.map +1 -0
  427. package/build-module/components/collapsible-block-toolbar/index.js +24 -19
  428. package/build-module/components/collapsible-block-toolbar/index.js.map +1 -1
  429. package/build-module/components/commands/index.js +111 -5
  430. package/build-module/components/commands/index.js.map +1 -1
  431. package/build-module/components/create-template-part-modal/index.js +160 -0
  432. package/build-module/components/create-template-part-modal/index.js.map +1 -0
  433. package/build-module/components/create-template-part-modal/utils.js +54 -0
  434. package/build-module/components/create-template-part-modal/utils.js.map +1 -0
  435. package/build-module/components/deprecated.js +2 -2
  436. package/build-module/components/deprecated.js.map +1 -1
  437. package/build-module/components/document-bar/index.js +95 -70
  438. package/build-module/components/document-bar/index.js.map +1 -1
  439. package/build-module/components/document-outline/index.js +125 -120
  440. package/build-module/components/document-outline/index.js.map +1 -1
  441. package/build-module/components/document-outline/item.js +21 -16
  442. package/build-module/components/document-outline/item.js.map +1 -1
  443. package/build-module/components/document-tools/index.js +72 -70
  444. package/build-module/components/document-tools/index.js.map +1 -1
  445. package/build-module/components/editor-help/add-blocks.native.js +16 -11
  446. package/build-module/components/editor-help/add-blocks.native.js.map +1 -1
  447. package/build-module/components/editor-help/customize-blocks.native.js +16 -11
  448. package/build-module/components/editor-help/customize-blocks.native.js.map +1 -1
  449. package/build-module/components/editor-help/help-detail-navigation-screen.native.js +33 -22
  450. package/build-module/components/editor-help/help-detail-navigation-screen.native.js.map +1 -1
  451. package/build-module/components/editor-help/help-get-support-button.native.js +8 -6
  452. package/build-module/components/editor-help/help-get-support-button.native.js.map +1 -1
  453. package/build-module/components/editor-help/help-section-title.native.js +8 -6
  454. package/build-module/components/editor-help/help-section-title.native.js.map +1 -1
  455. package/build-module/components/editor-help/help-topic-row.native.js +7 -6
  456. package/build-module/components/editor-help/help-topic-row.native.js.map +1 -1
  457. package/build-module/components/editor-help/icon-move-blocks.native.js +7 -6
  458. package/build-module/components/editor-help/icon-move-blocks.native.js.map +1 -1
  459. package/build-module/components/editor-help/index.native.js +96 -76
  460. package/build-module/components/editor-help/index.native.js.map +1 -1
  461. package/build-module/components/editor-help/intro-to-blocks.native.js +43 -37
  462. package/build-module/components/editor-help/intro-to-blocks.native.js.map +1 -1
  463. package/build-module/components/editor-help/move-blocks.native.js +27 -21
  464. package/build-module/components/editor-help/move-blocks.native.js.map +1 -1
  465. package/build-module/components/editor-help/remove-blocks.native.js +14 -9
  466. package/build-module/components/editor-help/remove-blocks.native.js.map +1 -1
  467. package/build-module/components/editor-help/view-sections.native.js +25 -19
  468. package/build-module/components/editor-help/view-sections.native.js.map +1 -1
  469. package/build-module/components/editor-history/redo.js +2 -2
  470. package/build-module/components/editor-history/redo.js.map +1 -1
  471. package/build-module/components/editor-history/undo.js +2 -2
  472. package/build-module/components/editor-history/undo.js.map +1 -1
  473. package/build-module/components/editor-interface/content-slot-fill.js +16 -0
  474. package/build-module/components/editor-interface/content-slot-fill.js.map +1 -0
  475. package/build-module/components/editor-interface/index.js +172 -0
  476. package/build-module/components/editor-interface/index.js.map +1 -0
  477. package/build-module/components/editor-notices/index.js +25 -9
  478. package/build-module/components/editor-notices/index.js.map +1 -1
  479. package/build-module/components/editor-snackbars/index.js +2 -2
  480. package/build-module/components/editor-snackbars/index.js.map +1 -1
  481. package/build-module/components/entities-saved-states/entity-record-item.js +40 -11
  482. package/build-module/components/entities-saved-states/entity-record-item.js.map +1 -1
  483. package/build-module/components/entities-saved-states/entity-type-list.js +26 -22
  484. package/build-module/components/entities-saved-states/entity-type-list.js.map +1 -1
  485. package/build-module/components/entities-saved-states/index.js +54 -46
  486. package/build-module/components/entities-saved-states/index.js.map +1 -1
  487. package/build-module/components/error-boundary/index.js +27 -14
  488. package/build-module/components/error-boundary/index.js.map +1 -1
  489. package/build-module/components/error-boundary/index.native.js +46 -35
  490. package/build-module/components/error-boundary/index.native.js.map +1 -1
  491. package/build-module/components/global-keyboard-shortcuts/register-shortcuts.js +3 -3
  492. package/build-module/components/global-keyboard-shortcuts/register-shortcuts.js.map +1 -1
  493. package/build-module/components/global-styles-provider/index.js +185 -0
  494. package/build-module/components/global-styles-provider/index.js.map +1 -0
  495. package/build-module/components/header/back-button.js +28 -0
  496. package/build-module/components/header/back-button.js.map +1 -0
  497. package/build-module/components/header/index.js +169 -0
  498. package/build-module/components/header/index.js.map +1 -0
  499. package/build-module/components/inserter-sidebar/index.js +85 -34
  500. package/build-module/components/inserter-sidebar/index.js.map +1 -1
  501. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +2 -2
  502. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
  503. package/build-module/components/keyboard-shortcut-help-modal/index.js +55 -49
  504. package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  505. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +32 -26
  506. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
  507. package/build-module/components/list-view-sidebar/index.js +60 -47
  508. package/build-module/components/list-view-sidebar/index.js.map +1 -1
  509. package/build-module/components/list-view-sidebar/list-view-outline.js +23 -4
  510. package/build-module/components/list-view-sidebar/list-view-outline.js.map +1 -1
  511. package/build-module/components/local-autosave-monitor/index.js +15 -2
  512. package/build-module/components/local-autosave-monitor/index.js.map +1 -1
  513. package/build-module/components/mode-switcher/index.js +9 -8
  514. package/build-module/components/mode-switcher/index.js.map +1 -1
  515. package/build-module/components/more-menu/copy-content-menu-item.js +5 -4
  516. package/build-module/components/more-menu/copy-content-menu-item.js.map +1 -1
  517. package/build-module/components/more-menu/index.js +91 -76
  518. package/build-module/components/more-menu/index.js.map +1 -1
  519. package/build-module/components/more-menu/tools-more-menu-group.js +2 -2
  520. package/build-module/components/more-menu/tools-more-menu-group.js.map +1 -1
  521. package/build-module/components/more-menu/view-more-menu-group.js +2 -2
  522. package/build-module/components/more-menu/view-more-menu-group.js.map +1 -1
  523. package/build-module/components/offline-status/index.native.js +12 -9
  524. package/build-module/components/offline-status/index.native.js.map +1 -1
  525. package/build-module/components/page-attributes/order.js +90 -17
  526. package/build-module/components/page-attributes/order.js.map +1 -1
  527. package/build-module/components/page-attributes/panel.js +13 -21
  528. package/build-module/components/page-attributes/panel.js.map +1 -1
  529. package/build-module/components/page-attributes/parent.js +88 -5
  530. package/build-module/components/page-attributes/parent.js.map +1 -1
  531. package/build-module/components/pattern-duplicate-modal/index.js +51 -0
  532. package/build-module/components/pattern-duplicate-modal/index.js.map +1 -0
  533. package/build-module/components/pattern-overrides-panel/index.js +2 -2
  534. package/build-module/components/pattern-overrides-panel/index.js.map +1 -1
  535. package/build-module/components/pattern-rename-modal/index.js +50 -0
  536. package/build-module/components/pattern-rename-modal/index.js.map +1 -0
  537. package/build-module/components/plugin-document-setting-panel/index.js +19 -12
  538. package/build-module/components/plugin-document-setting-panel/index.js.map +1 -1
  539. package/build-module/components/plugin-post-publish-panel/index.js +10 -7
  540. package/build-module/components/plugin-post-publish-panel/index.js.map +1 -1
  541. package/build-module/components/plugin-post-status-info/index.js +7 -4
  542. package/build-module/components/plugin-post-status-info/index.js.map +1 -1
  543. package/build-module/components/plugin-pre-publish-panel/index.js +10 -7
  544. package/build-module/components/plugin-pre-publish-panel/index.js.map +1 -1
  545. package/build-module/components/plugin-sidebar/index.js +2 -2
  546. package/build-module/components/plugin-sidebar/index.js.map +1 -1
  547. package/build-module/components/plugin-sidebar-more-menu-item/index.js +2 -3
  548. package/build-module/components/plugin-sidebar-more-menu-item/index.js.map +1 -1
  549. package/build-module/components/post-actions/actions.js +458 -329
  550. package/build-module/components/post-actions/actions.js.map +1 -1
  551. package/build-module/components/post-actions/export-pattern-action.js +58 -0
  552. package/build-module/components/post-actions/export-pattern-action.js.map +1 -0
  553. package/build-module/components/post-actions/export-pattern-action.native.js +5 -0
  554. package/build-module/components/post-actions/export-pattern-action.native.js.map +1 -0
  555. package/build-module/components/post-actions/index.js +73 -62
  556. package/build-module/components/post-actions/index.js.map +1 -1
  557. package/build-module/components/post-author/check.js +5 -4
  558. package/build-module/components/post-author/check.js.map +1 -1
  559. package/build-module/components/post-author/combobox.js +4 -3
  560. package/build-module/components/post-author/combobox.js.map +1 -1
  561. package/build-module/components/post-author/hook.js +2 -1
  562. package/build-module/components/post-author/hook.js.map +1 -1
  563. package/build-module/components/post-author/index.js +3 -3
  564. package/build-module/components/post-author/index.js.map +1 -1
  565. package/build-module/components/post-author/panel.js +72 -4
  566. package/build-module/components/post-author/panel.js.map +1 -1
  567. package/build-module/components/post-author/select.js +4 -3
  568. package/build-module/components/post-author/select.js.map +1 -1
  569. package/build-module/components/post-card-panel/index.js +49 -38
  570. package/build-module/components/post-card-panel/index.js.map +1 -1
  571. package/build-module/components/post-comments/index.js +47 -9
  572. package/build-module/components/post-comments/index.js.map +1 -1
  573. package/build-module/components/post-content-information/index.js +8 -5
  574. package/build-module/components/post-content-information/index.js.map +1 -1
  575. package/build-module/components/post-discussion/panel.js +125 -26
  576. package/build-module/components/post-discussion/panel.js.map +1 -1
  577. package/build-module/components/post-excerpt/check.js +5 -4
  578. package/build-module/components/post-excerpt/check.js.map +1 -1
  579. package/build-module/components/post-excerpt/index.js +17 -15
  580. package/build-module/components/post-excerpt/index.js.map +1 -1
  581. package/build-module/components/post-excerpt/panel.js +60 -40
  582. package/build-module/components/post-excerpt/panel.js.map +1 -1
  583. package/build-module/components/post-excerpt/plugin.js +7 -4
  584. package/build-module/components/post-excerpt/plugin.js.map +1 -1
  585. package/build-module/components/post-featured-image/check.js +18 -6
  586. package/build-module/components/post-featured-image/check.js.map +1 -1
  587. package/build-module/components/post-featured-image/index.js +78 -49
  588. package/build-module/components/post-featured-image/index.js.map +1 -1
  589. package/build-module/components/post-featured-image/panel.js +22 -7
  590. package/build-module/components/post-featured-image/panel.js.map +1 -1
  591. package/build-module/components/post-format/check.js +14 -4
  592. package/build-module/components/post-format/check.js.map +1 -1
  593. package/build-module/components/post-format/index.js +39 -21
  594. package/build-module/components/post-format/index.js.map +1 -1
  595. package/build-module/components/post-format/panel.js +86 -0
  596. package/build-module/components/post-format/panel.js.map +1 -0
  597. package/build-module/components/post-last-edited-panel/index.js +7 -4
  598. package/build-module/components/post-last-edited-panel/index.js.map +1 -1
  599. package/build-module/components/post-last-revision/check.js +14 -4
  600. package/build-module/components/post-last-revision/check.js.map +1 -1
  601. package/build-module/components/post-last-revision/index.js +21 -13
  602. package/build-module/components/post-last-revision/index.js.map +1 -1
  603. package/build-module/components/post-last-revision/panel.js +13 -4
  604. package/build-module/components/post-last-revision/panel.js.map +1 -1
  605. package/build-module/components/post-locked-modal/index.js +60 -34
  606. package/build-module/components/post-locked-modal/index.js.map +1 -1
  607. package/build-module/components/post-panel-row/index.js +14 -10
  608. package/build-module/components/post-panel-row/index.js.map +1 -1
  609. package/build-module/components/post-panel-section/index.js +21 -0
  610. package/build-module/components/post-panel-section/index.js.map +1 -0
  611. package/build-module/components/post-pending-status/check.js +11 -0
  612. package/build-module/components/post-pending-status/check.js.map +1 -1
  613. package/build-module/components/post-pending-status/index.js +15 -7
  614. package/build-module/components/post-pending-status/index.js.map +1 -1
  615. package/build-module/components/post-pingbacks/index.js +16 -5
  616. package/build-module/components/post-pingbacks/index.js.map +1 -1
  617. package/build-module/components/post-preview-button/index.js +47 -21
  618. package/build-module/components/post-preview-button/index.js.map +1 -1
  619. package/build-module/components/post-publish-button/index.js +22 -11
  620. package/build-module/components/post-publish-button/index.js.map +1 -1
  621. package/build-module/components/post-publish-button/post-publish-button-or-toggle.js +2 -2
  622. package/build-module/components/post-publish-button/post-publish-button-or-toggle.js.map +1 -1
  623. package/build-module/components/post-publish-panel/index.js +48 -33
  624. package/build-module/components/post-publish-panel/index.js.map +1 -1
  625. package/build-module/components/post-publish-panel/maybe-category-panel.js +13 -9
  626. package/build-module/components/post-publish-panel/maybe-category-panel.js.map +1 -1
  627. package/build-module/components/post-publish-panel/maybe-post-format-panel.js +22 -15
  628. package/build-module/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
  629. package/build-module/components/post-publish-panel/maybe-tags-panel.js +14 -10
  630. package/build-module/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
  631. package/build-module/components/post-publish-panel/maybe-upload-media.js +30 -24
  632. package/build-module/components/post-publish-panel/maybe-upload-media.js.map +1 -1
  633. package/build-module/components/post-publish-panel/postpublish.js +57 -38
  634. package/build-module/components/post-publish-panel/postpublish.js.map +1 -1
  635. package/build-module/components/post-publish-panel/prepublish.js +43 -26
  636. package/build-module/components/post-publish-panel/prepublish.js.map +1 -1
  637. package/build-module/components/post-saved-state/index.js +10 -8
  638. package/build-module/components/post-saved-state/index.js.map +1 -1
  639. package/build-module/components/post-schedule/check.js +9 -0
  640. package/build-module/components/post-schedule/check.js.map +1 -1
  641. package/build-module/components/post-schedule/index.js +30 -6
  642. package/build-module/components/post-schedule/index.js.map +1 -1
  643. package/build-module/components/post-schedule/label.js +17 -0
  644. package/build-module/components/post-schedule/label.js.map +1 -1
  645. package/build-module/components/post-schedule/panel.js +43 -30
  646. package/build-module/components/post-schedule/panel.js.map +1 -1
  647. package/build-module/components/post-slug/check.js +5 -4
  648. package/build-module/components/post-slug/check.js.map +1 -1
  649. package/build-module/components/post-slug/index.js +5 -3
  650. package/build-module/components/post-slug/index.js.map +1 -1
  651. package/build-module/components/post-slug/panel.js +21 -0
  652. package/build-module/components/post-slug/panel.js.map +1 -0
  653. package/build-module/components/post-status/index.js +121 -120
  654. package/build-module/components/post-status/index.js.map +1 -1
  655. package/build-module/components/post-sticky/index.js +17 -9
  656. package/build-module/components/post-sticky/index.js.map +1 -1
  657. package/build-module/components/post-sticky/panel.js +16 -0
  658. package/build-module/components/post-sticky/panel.js.map +1 -0
  659. package/build-module/components/post-switch-to-draft-button/index.js +27 -21
  660. package/build-module/components/post-switch-to-draft-button/index.js.map +1 -1
  661. package/build-module/components/post-sync-status/index.js +8 -6
  662. package/build-module/components/post-sync-status/index.js.map +1 -1
  663. package/build-module/components/post-taxonomies/flat-term-selector.js +22 -18
  664. package/build-module/components/post-taxonomies/flat-term-selector.js.map +1 -1
  665. package/build-module/components/post-taxonomies/hierarchical-term-selector.js +71 -59
  666. package/build-module/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
  667. package/build-module/components/post-taxonomies/index.js +6 -6
  668. package/build-module/components/post-taxonomies/index.js.map +1 -1
  669. package/build-module/components/post-taxonomies/most-used-terms.js +20 -15
  670. package/build-module/components/post-taxonomies/most-used-terms.js.map +1 -1
  671. package/build-module/components/post-taxonomies/panel.js +15 -11
  672. package/build-module/components/post-taxonomies/panel.js.map +1 -1
  673. package/build-module/components/post-template/block-theme.js +44 -32
  674. package/build-module/components/post-template/block-theme.js.map +1 -1
  675. package/build-module/components/post-template/classic-theme.js +74 -50
  676. package/build-module/components/post-template/classic-theme.js.map +1 -1
  677. package/build-module/components/post-template/create-new-template-modal.js +34 -27
  678. package/build-module/components/post-template/create-new-template-modal.js.map +1 -1
  679. package/build-module/components/post-template/create-new-template.js +16 -11
  680. package/build-module/components/post-template/create-new-template.js.map +1 -1
  681. package/build-module/components/post-template/panel.js +17 -9
  682. package/build-module/components/post-template/panel.js.map +1 -1
  683. package/build-module/components/post-template/reset-default-template.js +5 -4
  684. package/build-module/components/post-template/reset-default-template.js.map +1 -1
  685. package/build-module/components/post-template/swap-template-button.js +22 -15
  686. package/build-module/components/post-template/swap-template-button.js.map +1 -1
  687. package/build-module/components/post-text-editor/index.js +30 -19
  688. package/build-module/components/post-text-editor/index.js.map +1 -1
  689. package/build-module/components/post-title/index.js +31 -20
  690. package/build-module/components/post-title/index.js.map +1 -1
  691. package/build-module/components/post-title/index.native.js +81 -57
  692. package/build-module/components/post-title/index.native.js.map +1 -1
  693. package/build-module/components/post-title/post-title-raw.js +13 -4
  694. package/build-module/components/post-title/post-title-raw.js.map +1 -1
  695. package/build-module/components/post-title/use-post-title-focus.js +8 -0
  696. package/build-module/components/post-title/use-post-title-focus.js.map +1 -1
  697. package/build-module/components/post-title/use-post-title.js +6 -0
  698. package/build-module/components/post-title/use-post-title.js.map +1 -1
  699. package/build-module/components/post-transform-panel/hooks.js +83 -0
  700. package/build-module/components/post-transform-panel/hooks.js.map +1 -0
  701. package/build-module/components/post-transform-panel/index.js +94 -0
  702. package/build-module/components/post-transform-panel/index.js.map +1 -0
  703. package/build-module/components/post-trash/index.js +21 -15
  704. package/build-module/components/post-trash/index.js.map +1 -1
  705. package/build-module/components/post-type-support-check/index.js +1 -1
  706. package/build-module/components/post-type-support-check/index.js.map +1 -1
  707. package/build-module/components/post-url/check.js +9 -0
  708. package/build-module/components/post-url/check.js.map +1 -1
  709. package/build-module/components/post-url/index.js +100 -72
  710. package/build-module/components/post-url/index.js.map +1 -1
  711. package/build-module/components/post-url/label.js +12 -0
  712. package/build-module/components/post-url/label.js.map +1 -1
  713. package/build-module/components/post-url/panel.js +35 -24
  714. package/build-module/components/post-url/panel.js.map +1 -1
  715. package/build-module/components/post-view-link/index.js +2 -2
  716. package/build-module/components/post-view-link/index.js.map +1 -1
  717. package/build-module/components/post-visibility/check.js +10 -0
  718. package/build-module/components/post-visibility/check.js.map +1 -1
  719. package/build-module/components/post-visibility/index.js +85 -67
  720. package/build-module/components/post-visibility/index.js.map +1 -1
  721. package/build-module/components/post-visibility/label.js +12 -0
  722. package/build-module/components/post-visibility/label.js.map +1 -1
  723. package/build-module/components/posts-per-page/index.js +103 -0
  724. package/build-module/components/posts-per-page/index.js.map +1 -0
  725. package/build-module/components/preferences-modal/enable-plugin-document-setting-panel.js +7 -5
  726. package/build-module/components/preferences-modal/enable-plugin-document-setting-panel.js.map +1 -1
  727. package/build-module/components/preferences-modal/index.js +126 -102
  728. package/build-module/components/preferences-modal/index.js.map +1 -1
  729. package/build-module/components/preview-dropdown/index.js +49 -31
  730. package/build-module/components/preview-dropdown/index.js.map +1 -1
  731. package/build-module/components/provider/index.js +98 -20
  732. package/build-module/components/provider/index.js.map +1 -1
  733. package/build-module/components/provider/index.native.js +58 -20
  734. package/build-module/components/provider/index.native.js.map +1 -1
  735. package/build-module/components/provider/use-block-editor-settings.js +23 -4
  736. package/build-module/components/provider/use-block-editor-settings.js.map +1 -1
  737. package/build-module/components/provider/with-registry-provider.js +33 -26
  738. package/build-module/components/provider/with-registry-provider.js.map +1 -1
  739. package/build-module/components/resizable-editor/index.js +89 -0
  740. package/build-module/components/resizable-editor/index.js.map +1 -0
  741. package/build-module/components/resizable-editor/resize-handle.js +54 -0
  742. package/build-module/components/resizable-editor/resize-handle.js.map +1 -0
  743. package/build-module/components/save-publish-panels/index.js +37 -26
  744. package/build-module/components/save-publish-panels/index.js.map +1 -1
  745. package/build-module/components/sidebar/constants.js +5 -0
  746. package/build-module/components/sidebar/constants.js.map +1 -0
  747. package/build-module/components/sidebar/header.js +50 -0
  748. package/build-module/components/sidebar/header.js.map +1 -0
  749. package/build-module/components/sidebar/index.js +154 -0
  750. package/build-module/components/sidebar/index.js.map +1 -0
  751. package/build-module/components/sidebar/post-summary.js +85 -0
  752. package/build-module/components/sidebar/post-summary.js.map +1 -0
  753. package/build-module/components/site-discussion/index.js +127 -0
  754. package/build-module/components/site-discussion/index.js.map +1 -0
  755. package/build-module/components/start-page-options/index.js +18 -18
  756. package/build-module/components/start-page-options/index.js.map +1 -1
  757. package/build-module/components/start-template-options/index.js +192 -0
  758. package/build-module/components/start-template-options/index.js.map +1 -0
  759. package/build-module/components/table-of-contents/index.js +4 -4
  760. package/build-module/components/table-of-contents/index.js.map +1 -1
  761. package/build-module/components/table-of-contents/panel.js +55 -35
  762. package/build-module/components/table-of-contents/panel.js.map +1 -1
  763. package/build-module/components/template-areas/index.js +37 -22
  764. package/build-module/components/template-areas/index.js.map +1 -1
  765. package/build-module/components/template-content-panel/index.js +32 -0
  766. package/build-module/components/template-content-panel/index.js.map +1 -0
  767. package/build-module/components/template-validation-notice/index.js +27 -21
  768. package/build-module/components/template-validation-notice/index.js.map +1 -1
  769. package/build-module/components/text-editor/index.js +66 -0
  770. package/build-module/components/text-editor/index.js.map +1 -0
  771. package/build-module/components/time-to-read/index.js +7 -6
  772. package/build-module/components/time-to-read/index.js.map +1 -1
  773. package/build-module/components/{editor-canvas → visual-editor}/edit-template-blocks-notification.js +5 -4
  774. package/build-module/components/visual-editor/edit-template-blocks-notification.js.map +1 -0
  775. package/build-module/components/{editor-canvas → visual-editor}/index.js +133 -79
  776. package/build-module/components/visual-editor/index.js.map +1 -0
  777. package/build-module/components/word-count/index.js +5 -4
  778. package/build-module/components/word-count/index.js.map +1 -1
  779. package/build-module/hooks/custom-sources-backwards-compatibility.js +2 -2
  780. package/build-module/hooks/custom-sources-backwards-compatibility.js.map +1 -1
  781. package/build-module/hooks/index.js +1 -0
  782. package/build-module/hooks/index.js.map +1 -1
  783. package/build-module/hooks/media-upload.js +7 -0
  784. package/build-module/hooks/media-upload.js.map +1 -0
  785. package/build-module/hooks/pattern-overrides.js +27 -16
  786. package/build-module/hooks/pattern-overrides.js.map +1 -1
  787. package/build-module/private-apis.js +15 -38
  788. package/build-module/private-apis.js.map +1 -1
  789. package/build-module/private-apis.native.js +38 -0
  790. package/build-module/private-apis.native.js.map +1 -0
  791. package/build-module/store/constants.js +3 -0
  792. package/build-module/store/constants.js.map +1 -1
  793. package/build-module/store/private-actions.js +10 -14
  794. package/build-module/store/private-actions.js.map +1 -1
  795. package/build-module/store/private-selectors.js +41 -1
  796. package/build-module/store/private-selectors.js.map +1 -1
  797. package/build-module/store/reducer.js +14 -0
  798. package/build-module/store/reducer.js.map +1 -1
  799. package/build-module/store/selectors.js +1 -1
  800. package/build-module/store/selectors.js.map +1 -1
  801. package/build-module/utils/set-nested-value.js +38 -0
  802. package/build-module/utils/set-nested-value.js.map +1 -0
  803. package/build-style/style-rtl.css +623 -85
  804. package/build-style/style.css +623 -85
  805. package/package.json +43 -37
  806. package/src/bindings/index.js +1 -4
  807. package/src/bindings/pattern-overrides.js +84 -2
  808. package/src/bindings/post-meta.js +46 -6
  809. package/src/components/autocompleters/style.scss +1 -2
  810. package/src/components/block-settings-menu/content-only-settings-menu.js +175 -0
  811. package/src/components/block-settings-menu/content-only-settings-menu.native.js +4 -0
  812. package/src/components/block-settings-menu/style.scss +4 -0
  813. package/src/components/blog-title/index.js +124 -0
  814. package/src/components/blog-title/style.scss +4 -0
  815. package/src/components/collapsible-block-toolbar/index.js +2 -2
  816. package/src/components/commands/index.js +113 -3
  817. package/src/components/create-template-part-modal/index.js +205 -0
  818. package/src/components/create-template-part-modal/style.scss +69 -0
  819. package/src/components/create-template-part-modal/test/utils.js +60 -0
  820. package/src/components/create-template-part-modal/utils.js +67 -0
  821. package/src/components/document-bar/index.js +34 -23
  822. package/src/components/document-outline/item.js +2 -2
  823. package/src/components/document-tools/index.js +21 -28
  824. package/src/components/editor-help/help-get-support-button.native.js +1 -1
  825. package/src/components/editor-interface/content-slot-fill.js +15 -0
  826. package/src/components/editor-interface/index.js +230 -0
  827. package/src/components/editor-notices/index.js +10 -0
  828. package/src/components/entities-saved-states/entity-record-item.js +45 -16
  829. package/src/components/entities-saved-states/style.scss +13 -0
  830. package/src/components/error-boundary/index.js +10 -0
  831. package/src/components/error-boundary/index.native.js +1 -1
  832. package/src/components/global-keyboard-shortcuts/register-shortcuts.js +1 -1
  833. package/src/components/global-styles-provider/index.js +254 -0
  834. package/src/components/header/back-button.js +27 -0
  835. package/src/components/header/index.js +169 -0
  836. package/src/components/header/style.scss +236 -0
  837. package/src/components/inserter-sidebar/index.js +92 -36
  838. package/src/components/inserter-sidebar/style.scss +1 -7
  839. package/src/components/keyboard-shortcut-help-modal/index.js +2 -2
  840. package/src/components/list-view-sidebar/style.scss +1 -0
  841. package/src/components/local-autosave-monitor/index.js +12 -0
  842. package/src/components/page-attributes/order.js +79 -3
  843. package/src/components/page-attributes/panel.js +10 -26
  844. package/src/components/page-attributes/parent.js +98 -2
  845. package/src/components/page-attributes/style.scss +19 -0
  846. package/src/components/page-attributes/test/order.js +5 -1
  847. package/src/components/pattern-duplicate-modal/index.js +50 -0
  848. package/src/components/pattern-rename-modal/index.js +44 -0
  849. package/src/components/post-actions/actions.js +522 -371
  850. package/src/components/post-actions/export-pattern-action.js +74 -0
  851. package/src/components/post-actions/export-pattern-action.native.js +4 -0
  852. package/src/components/post-actions/index.js +20 -42
  853. package/src/components/post-author/combobox.js +1 -0
  854. package/src/components/post-author/hook.js +1 -1
  855. package/src/components/post-author/panel.js +63 -2
  856. package/src/components/post-author/select.js +1 -0
  857. package/src/components/post-author/style.scss +6 -0
  858. package/src/components/post-card-panel/index.js +56 -55
  859. package/src/components/post-card-panel/style.scss +23 -1
  860. package/src/components/post-comments/index.js +52 -9
  861. package/src/components/post-discussion/panel.js +115 -31
  862. package/src/components/post-discussion/style.scss +24 -0
  863. package/src/components/post-excerpt/panel.js +45 -48
  864. package/src/components/post-excerpt/style.scss +0 -17
  865. package/src/components/post-featured-image/check.js +9 -0
  866. package/src/components/post-featured-image/index.js +15 -0
  867. package/src/components/post-featured-image/panel.js +9 -0
  868. package/src/components/post-format/check.js +8 -0
  869. package/src/components/post-format/index.js +15 -4
  870. package/src/components/post-format/panel.js +87 -0
  871. package/src/components/post-format/style.scss +12 -0
  872. package/src/components/post-last-revision/check.js +8 -0
  873. package/src/components/post-last-revision/index.js +7 -2
  874. package/src/components/post-last-revision/panel.js +5 -0
  875. package/src/components/post-last-revision/test/check.js +5 -1
  876. package/src/components/post-locked-modal/index.js +6 -0
  877. package/src/components/post-panel-row/index.js +2 -2
  878. package/src/components/post-panel-row/style.scss +15 -0
  879. package/src/components/post-panel-section/index.js +19 -0
  880. package/src/components/post-panel-section/style.scss +3 -0
  881. package/src/components/post-pending-status/check.js +10 -0
  882. package/src/components/post-pending-status/index.js +5 -0
  883. package/src/components/post-pingbacks/index.js +17 -2
  884. package/src/components/post-preview-button/index.js +15 -0
  885. package/src/components/post-publish-button/index.js +17 -4
  886. package/src/components/post-publish-panel/index.js +1 -0
  887. package/src/components/post-publish-panel/maybe-tags-panel.js +1 -1
  888. package/src/components/post-publish-panel/style.scss +5 -0
  889. package/src/components/post-publish-panel/test/__snapshots__/index.js.snap +3 -3
  890. package/src/components/post-saved-state/index.js +2 -2
  891. package/src/components/post-schedule/check.js +8 -0
  892. package/src/components/post-schedule/index.js +30 -3
  893. package/src/components/post-schedule/label.js +15 -0
  894. package/src/components/post-schedule/panel.js +9 -1
  895. package/src/components/post-schedule/style.scss +0 -11
  896. package/src/components/post-slug/panel.js +22 -0
  897. package/src/components/post-slug/style.scss +5 -0
  898. package/src/components/post-slug/test/index.js +5 -1
  899. package/src/components/post-status/index.js +30 -52
  900. package/src/components/post-status/style.scss +4 -34
  901. package/src/components/post-sticky/index.js +12 -7
  902. package/src/components/post-sticky/panel.js +18 -0
  903. package/src/components/post-sticky/style.scss +3 -0
  904. package/src/components/post-template/block-theme.js +1 -0
  905. package/src/components/post-template/classic-theme.js +15 -0
  906. package/src/components/post-template/panel.js +5 -0
  907. package/src/components/post-template/style.scss +0 -8
  908. package/src/components/post-text-editor/index.js +5 -0
  909. package/src/components/post-title/index.js +10 -3
  910. package/src/components/post-title/index.native.js +70 -35
  911. package/src/components/post-title/post-title-raw.js +10 -2
  912. package/src/components/post-title/use-post-title-focus.js +7 -0
  913. package/src/components/post-title/use-post-title.js +5 -0
  914. package/src/components/post-transform-panel/hooks.js +114 -0
  915. package/src/components/post-transform-panel/index.js +91 -0
  916. package/src/components/post-type-support-check/index.js +1 -1
  917. package/src/components/post-type-support-check/test/index.js +2 -2
  918. package/src/components/post-url/check.js +8 -0
  919. package/src/components/post-url/index.js +41 -24
  920. package/src/components/post-url/label.js +10 -0
  921. package/src/components/post-url/panel.js +6 -1
  922. package/src/components/post-url/style.scss +0 -9
  923. package/src/components/post-visibility/check.js +9 -0
  924. package/src/components/post-visibility/index.js +7 -0
  925. package/src/components/post-visibility/label.js +10 -0
  926. package/src/components/posts-per-page/index.js +101 -0
  927. package/src/components/posts-per-page/style.scss +4 -0
  928. package/src/components/preferences-modal/index.js +3 -3
  929. package/src/components/provider/index.js +72 -0
  930. package/src/components/provider/index.native.js +43 -2
  931. package/src/components/provider/use-block-editor-settings.js +19 -6
  932. package/src/components/provider/with-registry-provider.js +32 -31
  933. package/src/components/resizable-editor/index.js +90 -0
  934. package/src/components/resizable-editor/resize-handle.js +62 -0
  935. package/src/components/resizable-editor/style.scss +53 -0
  936. package/src/components/save-publish-panels/index.js +10 -2
  937. package/src/components/sidebar/constants.js +4 -0
  938. package/src/components/sidebar/header.js +49 -0
  939. package/src/components/sidebar/index.js +196 -0
  940. package/src/components/sidebar/post-summary.js +97 -0
  941. package/src/components/sidebar/style.scss +18 -0
  942. package/src/components/site-discussion/index.js +138 -0
  943. package/src/components/site-discussion/style.scss +19 -0
  944. package/src/components/start-page-options/index.js +6 -4
  945. package/src/components/start-template-options/index.js +219 -0
  946. package/src/components/start-template-options/style.scss +47 -0
  947. package/src/components/template-areas/index.js +15 -6
  948. package/src/components/template-areas/style.scss +0 -1
  949. package/src/components/template-content-panel/index.js +36 -0
  950. package/src/components/text-editor/index.js +57 -0
  951. package/src/components/text-editor/style.scss +71 -0
  952. package/src/components/{editor-canvas → visual-editor}/index.js +191 -110
  953. package/src/components/visual-editor/style.scss +37 -0
  954. package/src/hooks/index.js +1 -0
  955. package/src/hooks/media-upload.js +11 -0
  956. package/src/hooks/pattern-overrides.js +12 -6
  957. package/src/private-apis.js +18 -38
  958. package/src/private-apis.native.js +37 -0
  959. package/src/store/constants.js +7 -0
  960. package/src/store/private-actions.js +22 -50
  961. package/src/store/private-selectors.js +48 -0
  962. package/src/store/reducer.js +12 -0
  963. package/src/store/selectors.js +1 -1
  964. package/src/style.scss +16 -0
  965. package/src/utils/set-nested-value.js +39 -0
  966. package/build/components/editor-canvas/edit-template-blocks-notification.js.map +0 -1
  967. package/build/components/editor-canvas/index.js.map +0 -1
  968. package/build-module/components/editor-canvas/edit-template-blocks-notification.js.map +0 -1
  969. package/build-module/components/editor-canvas/index.js.map +0 -1
  970. package/src/components/post-slug/test/check.js +0 -17
  971. package/src/components/provider/README.md +0 -37
  972. /package/src/components/{editor-canvas → visual-editor}/edit-template-blocks-notification.js +0 -0
@@ -1,88 +1,76 @@
1
- import { createElement, Fragment } from "react";
2
- /**
3
- * External dependencies
4
- */
5
- import classnames from 'classnames';
6
-
7
1
  /**
8
2
  * WordPress dependencies
9
3
  */
10
4
  import { Button, CheckboxControl, Dropdown, __experimentalText as Text, __experimentalVStack as VStack, TextControl, RadioControl } from '@wordpress/components';
11
- import { __ } from '@wordpress/i18n';
5
+ import { __, sprintf } from '@wordpress/i18n';
12
6
  import { useDispatch, useSelect } from '@wordpress/data';
13
7
  import { useState, useMemo } from '@wordpress/element';
14
8
  import { store as coreStore } from '@wordpress/core-data';
15
9
  import { __experimentalInspectorPopoverHeader as InspectorPopoverHeader } from '@wordpress/block-editor';
16
10
  import { useInstanceId } from '@wordpress/compose';
17
- import { Icon, chevronDownSmall } from '@wordpress/icons';
18
11
 
19
12
  /**
20
13
  * Internal dependencies
21
14
  */
22
15
  import { TEMPLATE_POST_TYPE, TEMPLATE_PART_POST_TYPE, PATTERN_POST_TYPE, NAVIGATION_POST_TYPE } from '../../store/constants';
23
16
  import PostPanelRow from '../post-panel-row';
17
+ import { PrivatePostSchedule } from '../post-schedule';
24
18
  import { store as editorStore } from '../../store';
25
- function PostStatusLabel({
26
- canEdit
27
- }) {
28
- const status = useSelect(select => select(editorStore).getEditedPostAttribute('status'), []);
29
- let statusLabel;
30
- switch (status) {
31
- case 'publish':
32
- statusLabel = __('Published');
33
- break;
34
- case 'future':
35
- statusLabel = __('Scheduled');
36
- break;
37
- case 'draft':
38
- case 'auto-draft':
39
- statusLabel = __('Draft');
40
- break;
41
- case 'pending':
42
- statusLabel = __('Pending review');
43
- break;
44
- case 'private':
45
- statusLabel = __('Published privately');
46
- break;
47
- }
48
- return createElement(Text, {
49
- className: classnames('editor-post-status-label', {
50
- [` has-status-${status}`]: !!status,
51
- 'has-icon': canEdit
52
- })
53
- }, statusLabel, canEdit && createElement(Icon, {
54
- icon: chevronDownSmall
55
- }));
56
- }
19
+ import { jsx as _jsx } from "react/jsx-runtime";
20
+ import { Fragment as _Fragment } from "react/jsx-runtime";
21
+ import { jsxs as _jsxs } from "react/jsx-runtime";
22
+ const labels = {
23
+ 'auto-draft': __('Draft'),
24
+ draft: __('Draft'),
25
+ pending: __('Pending'),
26
+ private: __('Private'),
27
+ future: __('Scheduled'),
28
+ publish: __('Published')
29
+ };
57
30
  const STATUS_OPTIONS = [{
58
- label: createElement(Fragment, null, __('Draft'), createElement(Text, {
59
- variant: "muted",
60
- size: 12
61
- }, __('Not ready to publish.'))),
31
+ label: /*#__PURE__*/_jsxs(_Fragment, {
32
+ children: [__('Draft'), /*#__PURE__*/_jsx(Text, {
33
+ variant: "muted",
34
+ size: 12,
35
+ children: __('Not ready to publish.')
36
+ })]
37
+ }),
62
38
  value: 'draft'
63
39
  }, {
64
- label: createElement(Fragment, null, __('Pending'), createElement(Text, {
65
- variant: "muted",
66
- size: 12
67
- }, __('Waiting for review before publishing.'))),
40
+ label: /*#__PURE__*/_jsxs(_Fragment, {
41
+ children: [__('Pending'), /*#__PURE__*/_jsx(Text, {
42
+ variant: "muted",
43
+ size: 12,
44
+ children: __('Waiting for review before publishing.')
45
+ })]
46
+ }),
68
47
  value: 'pending'
69
48
  }, {
70
- label: createElement(Fragment, null, __('Private'), createElement(Text, {
71
- variant: "muted",
72
- size: 12
73
- }, __('Only visible to site admins and editors.'))),
49
+ label: /*#__PURE__*/_jsxs(_Fragment, {
50
+ children: [__('Private'), /*#__PURE__*/_jsx(Text, {
51
+ variant: "muted",
52
+ size: 12,
53
+ children: __('Only visible to site admins and editors.')
54
+ })]
55
+ }),
74
56
  value: 'private'
75
57
  }, {
76
- label: createElement(Fragment, null, __('Scheduled'), createElement(Text, {
77
- variant: "muted",
78
- size: 12
79
- }, __('Publish automatically on a chosen date.'))),
58
+ label: /*#__PURE__*/_jsxs(_Fragment, {
59
+ children: [__('Scheduled'), /*#__PURE__*/_jsx(Text, {
60
+ variant: "muted",
61
+ size: 12,
62
+ children: __('Publish automatically on a chosen date.')
63
+ })]
64
+ }),
80
65
  value: 'future'
81
66
  }, {
82
- label: createElement(Fragment, null, __('Published'), createElement(Text, {
83
- variant: "muted",
84
- size: 12
85
- }, __('Visible to everyone.'))),
67
+ label: /*#__PURE__*/_jsxs(_Fragment, {
68
+ children: [__('Published'), /*#__PURE__*/_jsx(Text, {
69
+ variant: "muted",
70
+ size: 12,
71
+ children: __('Visible to everyone.')
72
+ })]
73
+ }),
86
74
  value: 'publish'
87
75
  }];
88
76
  const DESIGN_POST_TYPES = [TEMPLATE_POST_TYPE, TEMPLATE_PART_POST_TYPE, PATTERN_POST_TYPE, NAVIGATION_POST_TYPE];
@@ -155,11 +143,6 @@ export default function PostStatus() {
155
143
  let newPassword = password;
156
144
  if (status === 'future' && new Date(date) > new Date()) {
157
145
  newDate = null;
158
- } else if (value === 'future') {
159
- if (!date || new Date(date) < new Date()) {
160
- newDate = new Date();
161
- newDate.setDate(newDate.getDate() + 7);
162
- }
163
146
  }
164
147
  if (value === 'private' && password) {
165
148
  newPassword = '';
@@ -170,62 +153,80 @@ export default function PostStatus() {
170
153
  password: newPassword
171
154
  });
172
155
  };
173
- return createElement(PostPanelRow, {
156
+ return /*#__PURE__*/_jsx(PostPanelRow, {
174
157
  label: __('Status'),
175
- ref: setPopoverAnchor
176
- }, canEdit ? createElement(Dropdown, {
177
- className: "editor-post-status",
178
- contentClassName: "editor-change-status__content",
179
- popoverProps: popoverProps,
180
- focusOnMount: true,
181
- renderToggle: ({
182
- onToggle
183
- }) => createElement(Button, {
184
- className: "editor-post-status-trigger",
185
- onClick: onToggle
186
- }, createElement(PostStatusLabel, {
187
- canEdit: canEdit
188
- })),
189
- renderContent: ({
190
- onClose
191
- }) => createElement(Fragment, null, createElement(InspectorPopoverHeader, {
192
- title: __('Status & visibility'),
193
- onClose: onClose
194
- }), createElement("form", null, createElement(VStack, {
195
- spacing: 4
196
- }, createElement(RadioControl, {
197
- className: "editor-change-status__options",
198
- hideLabelFromVision: true,
199
- label: __('Status'),
200
- options: STATUS_OPTIONS,
201
- onChange: handleStatus,
202
- selected: status === 'auto-draft' ? 'draft' : status
203
- }), status !== 'private' && createElement(VStack, {
204
- as: "fieldset",
205
- spacing: 4,
206
- className: "editor-change-status__password-fieldset"
207
- }, createElement(CheckboxControl, {
208
- __nextHasNoMarginBottom: true,
209
- label: __('Password protected'),
210
- help: __('Only visible to those who know the password'),
211
- checked: showPassword,
212
- onChange: handleTogglePassword
213
- }), showPassword && createElement("div", {
214
- className: "editor-change-status__password-input"
215
- }, createElement(TextControl, {
216
- label: __('Password'),
217
- onChange: value => updatePost({
218
- password: value
158
+ ref: setPopoverAnchor,
159
+ children: canEdit ? /*#__PURE__*/_jsx(Dropdown, {
160
+ className: "editor-post-status",
161
+ contentClassName: "editor-change-status__content",
162
+ popoverProps: popoverProps,
163
+ focusOnMount: true,
164
+ renderToggle: ({
165
+ onToggle
166
+ }) => /*#__PURE__*/_jsx(Button, {
167
+ variant: "tertiary",
168
+ size: "compact",
169
+ onClick: onToggle,
170
+ "aria-label": sprintf(
171
+ // translators: %s: Current post status.
172
+ __('Change post status: %s'), labels[status]),
173
+ children: labels[status]
219
174
  }),
220
- value: password,
221
- placeholder: __('Use a secure password'),
222
- type: "text",
223
- id: passwordInputId,
224
- __next40pxDefaultSize: true,
225
- __nextHasNoMarginBottom: true
226
- }))))))
227
- }) : createElement("div", {
228
- className: "editor-post-status"
229
- }, createElement(PostStatusLabel, null)));
175
+ renderContent: ({
176
+ onClose
177
+ }) => /*#__PURE__*/_jsxs(_Fragment, {
178
+ children: [/*#__PURE__*/_jsx(InspectorPopoverHeader, {
179
+ title: __('Status & visibility'),
180
+ onClose: onClose
181
+ }), /*#__PURE__*/_jsx("form", {
182
+ children: /*#__PURE__*/_jsxs(VStack, {
183
+ spacing: 4,
184
+ children: [/*#__PURE__*/_jsx(RadioControl, {
185
+ className: "editor-change-status__options",
186
+ hideLabelFromVision: true,
187
+ label: __('Status'),
188
+ options: STATUS_OPTIONS,
189
+ onChange: handleStatus,
190
+ selected: status === 'auto-draft' ? 'draft' : status
191
+ }), status === 'future' && /*#__PURE__*/_jsx("div", {
192
+ className: "editor-change-status__publish-date-wrapper",
193
+ children: /*#__PURE__*/_jsx(PrivatePostSchedule, {
194
+ showPopoverHeaderActions: false,
195
+ isCompact: true
196
+ })
197
+ }), status !== 'private' && /*#__PURE__*/_jsxs(VStack, {
198
+ as: "fieldset",
199
+ spacing: 4,
200
+ className: "editor-change-status__password-fieldset",
201
+ children: [/*#__PURE__*/_jsx(CheckboxControl, {
202
+ __nextHasNoMarginBottom: true,
203
+ label: __('Password protected'),
204
+ help: __('Only visible to those who know the password'),
205
+ checked: showPassword,
206
+ onChange: handleTogglePassword
207
+ }), showPassword && /*#__PURE__*/_jsx("div", {
208
+ className: "editor-change-status__password-input",
209
+ children: /*#__PURE__*/_jsx(TextControl, {
210
+ label: __('Password'),
211
+ onChange: value => updatePost({
212
+ password: value
213
+ }),
214
+ value: password,
215
+ placeholder: __('Use a secure password'),
216
+ type: "text",
217
+ id: passwordInputId,
218
+ __next40pxDefaultSize: true,
219
+ __nextHasNoMarginBottom: true
220
+ })
221
+ })]
222
+ })]
223
+ })
224
+ })]
225
+ })
226
+ }) : /*#__PURE__*/_jsx("div", {
227
+ className: "editor-post-status is-read-only",
228
+ children: labels[status]
229
+ })
230
+ });
230
231
  }
231
232
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["classnames","Button","CheckboxControl","Dropdown","__experimentalText","Text","__experimentalVStack","VStack","TextControl","RadioControl","__","useDispatch","useSelect","useState","useMemo","store","coreStore","__experimentalInspectorPopoverHeader","InspectorPopoverHeader","useInstanceId","Icon","chevronDownSmall","TEMPLATE_POST_TYPE","TEMPLATE_PART_POST_TYPE","PATTERN_POST_TYPE","NAVIGATION_POST_TYPE","PostPanelRow","editorStore","PostStatusLabel","canEdit","status","select","getEditedPostAttribute","statusLabel","createElement","className","icon","STATUS_OPTIONS","label","Fragment","variant","size","value","DESIGN_POST_TYPES","PostStatus","date","password","postId","postType","_getCurrentPost$_link","getCurrentPostId","getCurrentPostType","getCurrentPost","_links","showPassword","setShowPassword","passwordInputId","editEntityRecord","popoverAnchor","setPopoverAnchor","popoverProps","anchor","headerTitle","placement","offset","shift","includes","updatePost","newStatus","newPassword","newDate","handleTogglePassword","handleStatus","Date","setDate","getDate","ref","contentClassName","focusOnMount","renderToggle","onToggle","onClick","renderContent","onClose","title","spacing","hideLabelFromVision","options","onChange","selected","as","__nextHasNoMarginBottom","help","checked","placeholder","type","id","__next40pxDefaultSize"],"sources":["@wordpress/editor/src/components/post-status/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tButton,\n\tCheckboxControl,\n\tDropdown,\n\t__experimentalText as Text,\n\t__experimentalVStack as VStack,\n\tTextControl,\n\tRadioControl,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useState, useMemo } from '@wordpress/element';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __experimentalInspectorPopoverHeader as InspectorPopoverHeader } from '@wordpress/block-editor';\nimport { useInstanceId } from '@wordpress/compose';\nimport { Icon, chevronDownSmall } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport {\n\tTEMPLATE_POST_TYPE,\n\tTEMPLATE_PART_POST_TYPE,\n\tPATTERN_POST_TYPE,\n\tNAVIGATION_POST_TYPE,\n} from '../../store/constants';\nimport PostPanelRow from '../post-panel-row';\nimport { store as editorStore } from '../../store';\n\nfunction PostStatusLabel( { canEdit } ) {\n\tconst status = useSelect(\n\t\t( select ) => select( editorStore ).getEditedPostAttribute( 'status' ),\n\t\t[]\n\t);\n\tlet statusLabel;\n\tswitch ( status ) {\n\t\tcase 'publish':\n\t\t\tstatusLabel = __( 'Published' );\n\t\t\tbreak;\n\t\tcase 'future':\n\t\t\tstatusLabel = __( 'Scheduled' );\n\t\t\tbreak;\n\t\tcase 'draft':\n\t\tcase 'auto-draft':\n\t\t\tstatusLabel = __( 'Draft' );\n\t\t\tbreak;\n\t\tcase 'pending':\n\t\t\tstatusLabel = __( 'Pending review' );\n\t\t\tbreak;\n\t\tcase 'private':\n\t\t\tstatusLabel = __( 'Published privately' );\n\t\t\tbreak;\n\t}\n\treturn (\n\t\t<Text\n\t\t\tclassName={ classnames( 'editor-post-status-label', {\n\t\t\t\t[ ` has-status-${ status }` ]: !! status,\n\t\t\t\t'has-icon': canEdit,\n\t\t\t} ) }\n\t\t>\n\t\t\t{ statusLabel }\n\t\t\t{ canEdit && <Icon icon={ chevronDownSmall } /> }\n\t\t</Text>\n\t);\n}\n\nconst STATUS_OPTIONS = [\n\t{\n\t\tlabel: (\n\t\t\t<>\n\t\t\t\t{ __( 'Draft' ) }\n\t\t\t\t<Text variant=\"muted\" size={ 12 }>\n\t\t\t\t\t{ __( 'Not ready to publish.' ) }\n\t\t\t\t</Text>\n\t\t\t</>\n\t\t),\n\t\tvalue: 'draft',\n\t},\n\t{\n\t\tlabel: (\n\t\t\t<>\n\t\t\t\t{ __( 'Pending' ) }\n\t\t\t\t<Text variant=\"muted\" size={ 12 }>\n\t\t\t\t\t{ __( 'Waiting for review before publishing.' ) }\n\t\t\t\t</Text>\n\t\t\t</>\n\t\t),\n\t\tvalue: 'pending',\n\t},\n\t{\n\t\tlabel: (\n\t\t\t<>\n\t\t\t\t{ __( 'Private' ) }\n\t\t\t\t<Text variant=\"muted\" size={ 12 }>\n\t\t\t\t\t{ __( 'Only visible to site admins and editors.' ) }\n\t\t\t\t</Text>\n\t\t\t</>\n\t\t),\n\t\tvalue: 'private',\n\t},\n\t{\n\t\tlabel: (\n\t\t\t<>\n\t\t\t\t{ __( 'Scheduled' ) }\n\t\t\t\t<Text variant=\"muted\" size={ 12 }>\n\t\t\t\t\t{ __( 'Publish automatically on a chosen date.' ) }\n\t\t\t\t</Text>\n\t\t\t</>\n\t\t),\n\t\tvalue: 'future',\n\t},\n\t{\n\t\tlabel: (\n\t\t\t<>\n\t\t\t\t{ __( 'Published' ) }\n\t\t\t\t<Text variant=\"muted\" size={ 12 }>\n\t\t\t\t\t{ __( 'Visible to everyone.' ) }\n\t\t\t\t</Text>\n\t\t\t</>\n\t\t),\n\t\tvalue: 'publish',\n\t},\n];\n\nconst DESIGN_POST_TYPES = [\n\tTEMPLATE_POST_TYPE,\n\tTEMPLATE_PART_POST_TYPE,\n\tPATTERN_POST_TYPE,\n\tNAVIGATION_POST_TYPE,\n];\n\nexport default function PostStatus() {\n\tconst { status, date, password, postId, postType, canEdit } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetEditedPostAttribute,\n\t\t\t\tgetCurrentPostId,\n\t\t\t\tgetCurrentPostType,\n\t\t\t\tgetCurrentPost,\n\t\t\t} = select( editorStore );\n\t\t\treturn {\n\t\t\t\tstatus: getEditedPostAttribute( 'status' ),\n\t\t\t\tdate: getEditedPostAttribute( 'date' ),\n\t\t\t\tpassword: getEditedPostAttribute( 'password' ),\n\t\t\t\tpostId: getCurrentPostId(),\n\t\t\t\tpostType: getCurrentPostType(),\n\t\t\t\tcanEdit:\n\t\t\t\t\tgetCurrentPost()._links?.[ 'wp:action-publish' ] ?? false,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\tconst [ showPassword, setShowPassword ] = useState( !! password );\n\tconst passwordInputId = useInstanceId(\n\t\tPostStatus,\n\t\t'editor-change-status__password-input'\n\t);\n\tconst { editEntityRecord } = useDispatch( coreStore );\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\t// Memoize popoverProps to avoid returning a new object every time.\n\tconst popoverProps = useMemo(\n\t\t() => ( {\n\t\t\t// Anchor the popover to the middle of the entire row so that it doesn't\n\t\t\t// move around when the label changes.\n\t\t\tanchor: popoverAnchor,\n\t\t\t'aria-label': __( 'Status & visibility' ),\n\t\t\theaderTitle: __( 'Status & visibility' ),\n\t\t\tplacement: 'left-start',\n\t\t\toffset: 36,\n\t\t\tshift: true,\n\t\t} ),\n\t\t[ popoverAnchor ]\n\t);\n\n\tif ( DESIGN_POST_TYPES.includes( postType ) ) {\n\t\treturn null;\n\t}\n\n\tconst updatePost = ( {\n\t\tstatus: newStatus = status,\n\t\tpassword: newPassword = password,\n\t\tdate: newDate = date,\n\t} ) => {\n\t\teditEntityRecord( 'postType', postType, postId, {\n\t\t\tstatus: newStatus,\n\t\t\tdate: newDate,\n\t\t\tpassword: newPassword,\n\t\t} );\n\t};\n\n\tconst handleTogglePassword = ( value ) => {\n\t\tsetShowPassword( value );\n\t\tif ( ! value ) {\n\t\t\tupdatePost( { password: '' } );\n\t\t}\n\t};\n\n\tconst handleStatus = ( value ) => {\n\t\tlet newDate = date;\n\t\tlet newPassword = password;\n\t\tif ( status === 'future' && new Date( date ) > new Date() ) {\n\t\t\tnewDate = null;\n\t\t} else if ( value === 'future' ) {\n\t\t\tif ( ! date || new Date( date ) < new Date() ) {\n\t\t\t\tnewDate = new Date();\n\t\t\t\tnewDate.setDate( newDate.getDate() + 7 );\n\t\t\t}\n\t\t}\n\t\tif ( value === 'private' && password ) {\n\t\t\tnewPassword = '';\n\t\t}\n\t\tupdatePost( {\n\t\t\tstatus: value,\n\t\t\tdate: newDate,\n\t\t\tpassword: newPassword,\n\t\t} );\n\t};\n\n\treturn (\n\t\t<PostPanelRow label={ __( 'Status' ) } ref={ setPopoverAnchor }>\n\t\t\t{ canEdit ? (\n\t\t\t\t<Dropdown\n\t\t\t\t\tclassName=\"editor-post-status\"\n\t\t\t\t\tcontentClassName=\"editor-change-status__content\"\n\t\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\t\tfocusOnMount\n\t\t\t\t\trenderToggle={ ( { onToggle } ) => (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tclassName=\"editor-post-status-trigger\"\n\t\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<PostStatusLabel canEdit={ canEdit } />\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t) }\n\t\t\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<InspectorPopoverHeader\n\t\t\t\t\t\t\t\ttitle={ __( 'Status & visibility' ) }\n\t\t\t\t\t\t\t\tonClose={ onClose }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<form>\n\t\t\t\t\t\t\t\t<VStack spacing={ 4 }>\n\t\t\t\t\t\t\t\t\t<RadioControl\n\t\t\t\t\t\t\t\t\t\tclassName=\"editor-change-status__options\"\n\t\t\t\t\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Status' ) }\n\t\t\t\t\t\t\t\t\t\toptions={ STATUS_OPTIONS }\n\t\t\t\t\t\t\t\t\t\tonChange={ handleStatus }\n\t\t\t\t\t\t\t\t\t\tselected={\n\t\t\t\t\t\t\t\t\t\t\tstatus === 'auto-draft'\n\t\t\t\t\t\t\t\t\t\t\t\t? 'draft'\n\t\t\t\t\t\t\t\t\t\t\t\t: status\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t{ status !== 'private' && (\n\t\t\t\t\t\t\t\t\t\t<VStack\n\t\t\t\t\t\t\t\t\t\t\tas=\"fieldset\"\n\t\t\t\t\t\t\t\t\t\t\tspacing={ 4 }\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"editor-change-status__password-fieldset\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<CheckboxControl\n\t\t\t\t\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t\t\t\t\tlabel={ __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'Password protected'\n\t\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'Only visible to those who know the password'\n\t\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t\tchecked={ showPassword }\n\t\t\t\t\t\t\t\t\t\t\t\tonChange={\n\t\t\t\t\t\t\t\t\t\t\t\t\thandleTogglePassword\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t{ showPassword && (\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"editor-change-status__password-input\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel={ __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Password'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tupdatePost( {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpassword: value,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={ password }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder={ __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Use a secure password'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tid={ passwordInputId }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t</VStack>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</VStack>\n\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t</>\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t) : (\n\t\t\t\t<div className=\"editor-post-status\">\n\t\t\t\t\t<PostStatusLabel />\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</PostPanelRow>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SACCC,MAAM,EACNC,eAAe,EACfC,QAAQ,EACRC,kBAAkB,IAAIC,IAAI,EAC1BC,oBAAoB,IAAIC,MAAM,EAC9BC,WAAW,EACXC,YAAY,QACN,uBAAuB;AAC9B,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,WAAW,EAAEC,SAAS,QAAQ,iBAAiB;AACxD,SAASC,QAAQ,EAAEC,OAAO,QAAQ,oBAAoB;AACtD,SAASC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;AACzD,SAASC,oCAAoC,IAAIC,sBAAsB,QAAQ,yBAAyB;AACxG,SAASC,aAAa,QAAQ,oBAAoB;AAClD,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CAAChC,eAAe;MACfyF,uBAAuB;MACvBrD,KAAK,EAAG5B,EAAE,CACT,oBACD,CAAG;MACHkF,IAAI,EAAGlF,EAAE,CACR,6CACD,CAAG;MACHmF,OAAO,EAAGvC,YAAc;MACxBkC,QAAQ,EACPjB;IACA,CACD,CAAC,EACAjB,YAAY,IACbpB,aAAA;MAAKC,SAAS,EAAC;IAAsC,GACpDD,aAAA,CAAC1B,WAAW;MACX8B,KAAK,EAAG5B,EAAE,CACT,UACD,CAAG;MACH8E,QAAQ,EAAK9C,KAAK,IACjByB,UAAU,CAAE;QACXrB,QAAQ,EAAEJ;MACX,CAAE,CACF;MACDA,KAAK,EAAGI,QAAU;MAClBgD,WAAW,EAAGpF,EAAE,CACf,uBACD,CAAG;MACHqF,IAAI,EAAC,MAAM;MACXC,EAAE,EAAGxC,eAAiB;MACtByC,qBAAqB;MACrBN,uBAAuB;IAAA,CACvB,CACG,CAEC,CAEF,CACH,CACL;EACA,CACH,CAAC,GAEFzD,aAAA;IAAKC,SAAS,EAAC;EAAoB,GAClCD,aAAA,CAACN,eAAe,MAAE,CACd,CAEO,CAAC;AAEjB","ignoreList":[]}
1
+ {"version":3,"names":["Button","CheckboxControl","Dropdown","__experimentalText","Text","__experimentalVStack","VStack","TextControl","RadioControl","__","sprintf","useDispatch","useSelect","useState","useMemo","store","coreStore","__experimentalInspectorPopoverHeader","InspectorPopoverHeader","useInstanceId","TEMPLATE_POST_TYPE","TEMPLATE_PART_POST_TYPE","PATTERN_POST_TYPE","NAVIGATION_POST_TYPE","PostPanelRow","PrivatePostSchedule","editorStore","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","labels","draft","pending","private","future","publish","STATUS_OPTIONS","label","children","variant","size","value","DESIGN_POST_TYPES","PostStatus","status","date","password","postId","postType","canEdit","select","_getCurrentPost$_link","getEditedPostAttribute","getCurrentPostId","getCurrentPostType","getCurrentPost","_links","showPassword","setShowPassword","passwordInputId","editEntityRecord","popoverAnchor","setPopoverAnchor","popoverProps","anchor","headerTitle","placement","offset","shift","includes","updatePost","newStatus","newPassword","newDate","handleTogglePassword","handleStatus","Date","ref","className","contentClassName","focusOnMount","renderToggle","onToggle","onClick","renderContent","onClose","title","spacing","hideLabelFromVision","options","onChange","selected","showPopoverHeaderActions","isCompact","as","__nextHasNoMarginBottom","help","checked","placeholder","type","id","__next40pxDefaultSize"],"sources":["@wordpress/editor/src/components/post-status/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tButton,\n\tCheckboxControl,\n\tDropdown,\n\t__experimentalText as Text,\n\t__experimentalVStack as VStack,\n\tTextControl,\n\tRadioControl,\n} from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useState, useMemo } from '@wordpress/element';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __experimentalInspectorPopoverHeader as InspectorPopoverHeader } from '@wordpress/block-editor';\nimport { useInstanceId } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport {\n\tTEMPLATE_POST_TYPE,\n\tTEMPLATE_PART_POST_TYPE,\n\tPATTERN_POST_TYPE,\n\tNAVIGATION_POST_TYPE,\n} from '../../store/constants';\nimport PostPanelRow from '../post-panel-row';\nimport { PrivatePostSchedule } from '../post-schedule';\nimport { store as editorStore } from '../../store';\n\nconst labels = {\n\t'auto-draft': __( 'Draft' ),\n\tdraft: __( 'Draft' ),\n\tpending: __( 'Pending' ),\n\tprivate: __( 'Private' ),\n\tfuture: __( 'Scheduled' ),\n\tpublish: __( 'Published' ),\n};\n\nconst STATUS_OPTIONS = [\n\t{\n\t\tlabel: (\n\t\t\t<>\n\t\t\t\t{ __( 'Draft' ) }\n\t\t\t\t<Text variant=\"muted\" size={ 12 }>\n\t\t\t\t\t{ __( 'Not ready to publish.' ) }\n\t\t\t\t</Text>\n\t\t\t</>\n\t\t),\n\t\tvalue: 'draft',\n\t},\n\t{\n\t\tlabel: (\n\t\t\t<>\n\t\t\t\t{ __( 'Pending' ) }\n\t\t\t\t<Text variant=\"muted\" size={ 12 }>\n\t\t\t\t\t{ __( 'Waiting for review before publishing.' ) }\n\t\t\t\t</Text>\n\t\t\t</>\n\t\t),\n\t\tvalue: 'pending',\n\t},\n\t{\n\t\tlabel: (\n\t\t\t<>\n\t\t\t\t{ __( 'Private' ) }\n\t\t\t\t<Text variant=\"muted\" size={ 12 }>\n\t\t\t\t\t{ __( 'Only visible to site admins and editors.' ) }\n\t\t\t\t</Text>\n\t\t\t</>\n\t\t),\n\t\tvalue: 'private',\n\t},\n\t{\n\t\tlabel: (\n\t\t\t<>\n\t\t\t\t{ __( 'Scheduled' ) }\n\t\t\t\t<Text variant=\"muted\" size={ 12 }>\n\t\t\t\t\t{ __( 'Publish automatically on a chosen date.' ) }\n\t\t\t\t</Text>\n\t\t\t</>\n\t\t),\n\t\tvalue: 'future',\n\t},\n\t{\n\t\tlabel: (\n\t\t\t<>\n\t\t\t\t{ __( 'Published' ) }\n\t\t\t\t<Text variant=\"muted\" size={ 12 }>\n\t\t\t\t\t{ __( 'Visible to everyone.' ) }\n\t\t\t\t</Text>\n\t\t\t</>\n\t\t),\n\t\tvalue: 'publish',\n\t},\n];\n\nconst DESIGN_POST_TYPES = [\n\tTEMPLATE_POST_TYPE,\n\tTEMPLATE_PART_POST_TYPE,\n\tPATTERN_POST_TYPE,\n\tNAVIGATION_POST_TYPE,\n];\n\nexport default function PostStatus() {\n\tconst { status, date, password, postId, postType, canEdit } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetEditedPostAttribute,\n\t\t\t\tgetCurrentPostId,\n\t\t\t\tgetCurrentPostType,\n\t\t\t\tgetCurrentPost,\n\t\t\t} = select( editorStore );\n\t\t\treturn {\n\t\t\t\tstatus: getEditedPostAttribute( 'status' ),\n\t\t\t\tdate: getEditedPostAttribute( 'date' ),\n\t\t\t\tpassword: getEditedPostAttribute( 'password' ),\n\t\t\t\tpostId: getCurrentPostId(),\n\t\t\t\tpostType: getCurrentPostType(),\n\t\t\t\tcanEdit:\n\t\t\t\t\tgetCurrentPost()._links?.[ 'wp:action-publish' ] ?? false,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\tconst [ showPassword, setShowPassword ] = useState( !! password );\n\tconst passwordInputId = useInstanceId(\n\t\tPostStatus,\n\t\t'editor-change-status__password-input'\n\t);\n\tconst { editEntityRecord } = useDispatch( coreStore );\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\t// Memoize popoverProps to avoid returning a new object every time.\n\tconst popoverProps = useMemo(\n\t\t() => ( {\n\t\t\t// Anchor the popover to the middle of the entire row so that it doesn't\n\t\t\t// move around when the label changes.\n\t\t\tanchor: popoverAnchor,\n\t\t\t'aria-label': __( 'Status & visibility' ),\n\t\t\theaderTitle: __( 'Status & visibility' ),\n\t\t\tplacement: 'left-start',\n\t\t\toffset: 36,\n\t\t\tshift: true,\n\t\t} ),\n\t\t[ popoverAnchor ]\n\t);\n\n\tif ( DESIGN_POST_TYPES.includes( postType ) ) {\n\t\treturn null;\n\t}\n\n\tconst updatePost = ( {\n\t\tstatus: newStatus = status,\n\t\tpassword: newPassword = password,\n\t\tdate: newDate = date,\n\t} ) => {\n\t\teditEntityRecord( 'postType', postType, postId, {\n\t\t\tstatus: newStatus,\n\t\t\tdate: newDate,\n\t\t\tpassword: newPassword,\n\t\t} );\n\t};\n\n\tconst handleTogglePassword = ( value ) => {\n\t\tsetShowPassword( value );\n\t\tif ( ! value ) {\n\t\t\tupdatePost( { password: '' } );\n\t\t}\n\t};\n\n\tconst handleStatus = ( value ) => {\n\t\tlet newDate = date;\n\t\tlet newPassword = password;\n\t\tif ( status === 'future' && new Date( date ) > new Date() ) {\n\t\t\tnewDate = null;\n\t\t}\n\t\tif ( value === 'private' && password ) {\n\t\t\tnewPassword = '';\n\t\t}\n\t\tupdatePost( {\n\t\t\tstatus: value,\n\t\t\tdate: newDate,\n\t\t\tpassword: newPassword,\n\t\t} );\n\t};\n\n\treturn (\n\t\t<PostPanelRow label={ __( 'Status' ) } ref={ setPopoverAnchor }>\n\t\t\t{ canEdit ? (\n\t\t\t\t<Dropdown\n\t\t\t\t\tclassName=\"editor-post-status\"\n\t\t\t\t\tcontentClassName=\"editor-change-status__content\"\n\t\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\t\tfocusOnMount\n\t\t\t\t\trenderToggle={ ( { onToggle } ) => (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t\t\taria-label={ sprintf(\n\t\t\t\t\t\t\t\t// translators: %s: Current post status.\n\t\t\t\t\t\t\t\t__( 'Change post status: %s' ),\n\t\t\t\t\t\t\t\tlabels[ status ]\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ labels[ status ] }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t) }\n\t\t\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<InspectorPopoverHeader\n\t\t\t\t\t\t\t\ttitle={ __( 'Status & visibility' ) }\n\t\t\t\t\t\t\t\tonClose={ onClose }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<form>\n\t\t\t\t\t\t\t\t<VStack spacing={ 4 }>\n\t\t\t\t\t\t\t\t\t<RadioControl\n\t\t\t\t\t\t\t\t\t\tclassName=\"editor-change-status__options\"\n\t\t\t\t\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Status' ) }\n\t\t\t\t\t\t\t\t\t\toptions={ STATUS_OPTIONS }\n\t\t\t\t\t\t\t\t\t\tonChange={ handleStatus }\n\t\t\t\t\t\t\t\t\t\tselected={\n\t\t\t\t\t\t\t\t\t\t\tstatus === 'auto-draft'\n\t\t\t\t\t\t\t\t\t\t\t\t? 'draft'\n\t\t\t\t\t\t\t\t\t\t\t\t: status\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t{ status === 'future' && (\n\t\t\t\t\t\t\t\t\t\t<div className=\"editor-change-status__publish-date-wrapper\">\n\t\t\t\t\t\t\t\t\t\t\t<PrivatePostSchedule\n\t\t\t\t\t\t\t\t\t\t\t\tshowPopoverHeaderActions={\n\t\t\t\t\t\t\t\t\t\t\t\t\tfalse\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tisCompact\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t{ status !== 'private' && (\n\t\t\t\t\t\t\t\t\t\t<VStack\n\t\t\t\t\t\t\t\t\t\t\tas=\"fieldset\"\n\t\t\t\t\t\t\t\t\t\t\tspacing={ 4 }\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"editor-change-status__password-fieldset\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<CheckboxControl\n\t\t\t\t\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t\t\t\t\tlabel={ __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'Password protected'\n\t\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'Only visible to those who know the password'\n\t\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t\tchecked={ showPassword }\n\t\t\t\t\t\t\t\t\t\t\t\tonChange={\n\t\t\t\t\t\t\t\t\t\t\t\t\thandleTogglePassword\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t{ showPassword && (\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"editor-change-status__password-input\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel={ __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Password'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tupdatePost( {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpassword: value,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={ password }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder={ __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Use a secure password'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tid={ passwordInputId }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t</VStack>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</VStack>\n\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t</>\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t) : (\n\t\t\t\t<div className=\"editor-post-status is-read-only\">\n\t\t\t\t\t{ labels[ status ] }\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</PostPanelRow>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,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nBsE,wBAAwB,EACvB,KACA;gBACDC,SAAS;cAAA,CACT;YAAC,CACE,CACL,EACCjD,MAAM,KAAK,SAAS,iBACrBf,KAAA,CAAC1B,MAAM;cACN2F,EAAE,EAAC,UAAU;cACbP,OAAO,EAAG,CAAG;cACbT,SAAS,EAAC,yCAAyC;cAAAxC,QAAA,gBAEnDb,IAAA,CAAC3B,eAAe;gBACfiG,uBAAuB;gBACvB1D,KAAK,EAAG/B,EAAE,CACT,oBACD,CAAG;gBACH0F,IAAI,EAAG1F,EAAE,CACR,6CACD,CAAG;gBACH2F,OAAO,EAAGxC,YAAc;gBACxBiC,QAAQ,EACPhB;cACA,CACD,CAAC,EACAjB,YAAY,iBACbhC,IAAA;gBAAKqD,SAAS,EAAC,sCAAsC;gBAAAxC,QAAA,eACpDb,IAAA,CAACrB,WAAW;kBACXiC,KAAK,EAAG/B,EAAE,CACT,UACD,CAAG;kBACHoF,QAAQ,EAAKjD,KAAK,IACjB6B,UAAU,CAAE;oBACXxB,QAAQ,EAAEL;kBACX,CAAE,CACF;kBACDA,KAAK,EAAGK,QAAU;kBAClBoD,WAAW,EAAG5F,EAAE,CACf,uBACD,CAAG;kBACH6F,IAAI,EAAC,MAAM;kBACXC,EAAE,EAAGzC,eAAiB;kBACtB0C,qBAAqB;kBACrBN,uBAAuB;gBAAA,CACvB;cAAC,CACE,CACL;YAAA,CACM,CACR;UAAA,CACM;QAAC,CACJ,CAAC;MAAA,CACN;IACA,CACH,CAAC,gBAEFtE,IAAA;MAAKqD,SAAS,EAAC,iCAAiC;MAAAxC,QAAA,EAC7CR,MAAM,CAAEc,MAAM;IAAE,CACd;EACL,CACY,CAAC;AAEjB","ignoreList":[]}
@@ -1,9 +1,8 @@
1
- import { createElement } from "react";
2
1
  /**
3
2
  * WordPress dependencies
4
3
  */
5
4
  import { __ } from '@wordpress/i18n';
6
- import { CheckboxControl } from '@wordpress/components';
5
+ import { ToggleControl, VisuallyHidden } from '@wordpress/components';
7
6
  import { useDispatch, useSelect } from '@wordpress/data';
8
7
 
9
8
  /**
@@ -11,6 +10,8 @@ import { useDispatch, useSelect } from '@wordpress/data';
11
10
  */
12
11
  import PostStickyCheck from './check';
13
12
  import { store as editorStore } from '../../store';
13
+ import PostPanelRow from '../post-panel-row';
14
+ import { jsx as _jsx } from "react/jsx-runtime";
14
15
  export default function PostSticky() {
15
16
  const postSticky = useSelect(select => {
16
17
  var _select$getEditedPost;
@@ -19,13 +20,20 @@ export default function PostSticky() {
19
20
  const {
20
21
  editPost
21
22
  } = useDispatch(editorStore);
22
- return createElement(PostStickyCheck, null, createElement(CheckboxControl, {
23
- __nextHasNoMarginBottom: true,
24
- label: __('Stick to the top of the blog'),
25
- checked: postSticky,
26
- onChange: () => editPost({
27
- sticky: !postSticky
23
+ return /*#__PURE__*/_jsx(PostStickyCheck, {
24
+ children: /*#__PURE__*/_jsx(PostPanelRow, {
25
+ label: __('Sticky'),
26
+ children: /*#__PURE__*/_jsx(ToggleControl, {
27
+ className: "editor-post-sticky__toggle-control",
28
+ label: /*#__PURE__*/_jsx(VisuallyHidden, {
29
+ children: __('Sticky')
30
+ }),
31
+ checked: postSticky,
32
+ onChange: () => editPost({
33
+ sticky: !postSticky
34
+ })
35
+ })
28
36
  })
29
- }));
37
+ });
30
38
  }
31
39
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["__","CheckboxControl","useDispatch","useSelect","PostStickyCheck","store","editorStore","PostSticky","postSticky","select","_select$getEditedPost","getEditedPostAttribute","editPost","createElement","__nextHasNoMarginBottom","label","checked","onChange","sticky"],"sources":["@wordpress/editor/src/components/post-sticky/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { CheckboxControl } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport PostStickyCheck from './check';\nimport { store as editorStore } from '../../store';\n\nexport default function PostSticky() {\n\tconst postSticky = useSelect( ( select ) => {\n\t\treturn (\n\t\t\tselect( editorStore ).getEditedPostAttribute( 'sticky' ) ?? false\n\t\t);\n\t}, [] );\n\tconst { editPost } = useDispatch( editorStore );\n\n\treturn (\n\t\t<PostStickyCheck>\n\t\t\t<CheckboxControl\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\tlabel={ __( 'Stick to the top of the blog' ) }\n\t\t\t\tchecked={ postSticky }\n\t\t\t\tonChange={ () => editPost( { sticky: ! postSticky } ) }\n\t\t\t/>\n\t\t</PostStickyCheck>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,eAAe,QAAQ,uBAAuB;AACvD,SAASC,WAAW,EAAEC,SAAS,QAAQ,iBAAiB;;AAExD;AACA;AACA;AACA,OAAOC,eAAe,MAAM,SAAS;AACrC,SAASC,KAAK,IAAIC,WAAW,QAAQ,aAAa;AAElD,eAAe,SAASC,UAAUA,CAAA,EAAG;EACpC,MAAMC,UAAU,GAAGL,SAAS,CAAIM,MAAM,IAAM;IAAA,IAAAC,qBAAA;IAC3C,QAAAA,qBAAA,GACCD,MAAM,CAAEH,WAAY,CAAC,CAACK,sBAAsB,CAAE,QAAS,CAAC,cAAAD,qBAAA,cAAAA,qBAAA,GAAI,KAAK;EAEnE,CAAC,EAAE,EAAG,CAAC;EACP,MAAM;IAAEE;EAAS,CAAC,GAAGV,WAAW,CAAEI,WAAY,CAAC;EAE/C,OACCO,aAAA,CAACT,eAAe,QACfS,aAAA,CAACZ,eAAe;IACfa,uBAAuB;IACvBC,KAAK,EAAGf,EAAE,CAAE,8BAA+B,CAAG;IAC9CgB,OAAO,EAAGR,UAAY;IACtBS,QAAQ,EAAGA,CAAA,KAAML,QAAQ,CAAE;MAAEM,MAAM,EAAE,CAAEV;IAAW,CAAE;EAAG,CACvD,CACe,CAAC;AAEpB","ignoreList":[]}
1
+ {"version":3,"names":["__","ToggleControl","VisuallyHidden","useDispatch","useSelect","PostStickyCheck","store","editorStore","PostPanelRow","jsx","_jsx","PostSticky","postSticky","select","_select$getEditedPost","getEditedPostAttribute","editPost","children","label","className","checked","onChange","sticky"],"sources":["@wordpress/editor/src/components/post-sticky/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { ToggleControl, VisuallyHidden } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport PostStickyCheck from './check';\nimport { store as editorStore } from '../../store';\nimport PostPanelRow from '../post-panel-row';\n\nexport default function PostSticky() {\n\tconst postSticky = useSelect( ( select ) => {\n\t\treturn (\n\t\t\tselect( editorStore ).getEditedPostAttribute( 'sticky' ) ?? false\n\t\t);\n\t}, [] );\n\tconst { editPost } = useDispatch( editorStore );\n\n\treturn (\n\t\t<PostStickyCheck>\n\t\t\t<PostPanelRow label={ __( 'Sticky' ) }>\n\t\t\t\t<ToggleControl\n\t\t\t\t\tclassName=\"editor-post-sticky__toggle-control\"\n\t\t\t\t\tlabel={\n\t\t\t\t\t\t<VisuallyHidden>{ __( 'Sticky' ) }</VisuallyHidden>\n\t\t\t\t\t}\n\t\t\t\t\tchecked={ postSticky }\n\t\t\t\t\tonChange={ () => editPost( { sticky: ! postSticky } ) }\n\t\t\t\t/>\n\t\t\t</PostPanelRow>\n\t\t</PostStickyCheck>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,aAAa,EAAEC,cAAc,QAAQ,uBAAuB;AACrE,SAASC,WAAW,EAAEC,SAAS,QAAQ,iBAAiB;;AAExD;AACA;AACA;AACA,OAAOC,eAAe,MAAM,SAAS;AACrC,SAASC,KAAK,IAAIC,WAAW,QAAQ,aAAa;AAClD,OAAOC,YAAY,MAAM,mBAAmB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE7C,eAAe,SAASC,UAAUA,CAAA,EAAG;EACpC,MAAMC,UAAU,GAAGR,SAAS,CAAIS,MAAM,IAAM;IAAA,IAAAC,qBAAA;IAC3C,QAAAA,qBAAA,GACCD,MAAM,CAAEN,WAAY,CAAC,CAACQ,sBAAsB,CAAE,QAAS,CAAC,cAAAD,qBAAA,cAAAA,qBAAA,GAAI,KAAK;EAEnE,CAAC,EAAE,EAAG,CAAC;EACP,MAAM;IAAEE;EAAS,CAAC,GAAGb,WAAW,CAAEI,WAAY,CAAC;EAE/C,oBACCG,IAAA,CAACL,eAAe;IAAAY,QAAA,eACfP,IAAA,CAACF,YAAY;MAACU,KAAK,EAAGlB,EAAE,CAAE,QAAS,CAAG;MAAAiB,QAAA,eACrCP,IAAA,CAACT,aAAa;QACbkB,SAAS,EAAC,oCAAoC;QAC9CD,KAAK,eACJR,IAAA,CAACR,cAAc;UAAAe,QAAA,EAAGjB,EAAE,CAAE,QAAS;QAAC,CAAkB,CAClD;QACDoB,OAAO,EAAGR,UAAY;QACtBS,QAAQ,EAAGA,CAAA,KAAML,QAAQ,CAAE;UAAEM,MAAM,EAAE,CAAEV;QAAW,CAAE;MAAG,CACvD;IAAC,CACW;EAAC,CACC,CAAC;AAEpB","ignoreList":[]}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Internal dependencies
3
+ */
4
+ import PostPanelRow from '../post-panel-row';
5
+ import PostStickyForm from './';
6
+ import PostStickyCheck from './check';
7
+ import { jsx as _jsx } from "react/jsx-runtime";
8
+ export function PostStickyPanel() {
9
+ return /*#__PURE__*/_jsx(PostStickyCheck, {
10
+ children: /*#__PURE__*/_jsx(PostPanelRow, {
11
+ children: /*#__PURE__*/_jsx(PostStickyForm, {})
12
+ })
13
+ });
14
+ }
15
+ export default PostStickyPanel;
16
+ //# sourceMappingURL=panel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["PostPanelRow","PostStickyForm","PostStickyCheck","jsx","_jsx","PostStickyPanel","children"],"sources":["@wordpress/editor/src/components/post-sticky/panel.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport PostPanelRow from '../post-panel-row';\nimport PostStickyForm from './';\nimport PostStickyCheck from './check';\n\nexport function PostStickyPanel() {\n\treturn (\n\t\t<PostStickyCheck>\n\t\t\t<PostPanelRow>\n\t\t\t\t<PostStickyForm />\n\t\t\t</PostPanelRow>\n\t\t</PostStickyCheck>\n\t);\n}\n\nexport default PostStickyPanel;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,YAAY,MAAM,mBAAmB;AAC5C,OAAOC,cAAc,MAAM,IAAI;AAC/B,OAAOC,eAAe,MAAM,SAAS;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEtC,OAAO,SAASC,eAAeA,CAAA,EAAG;EACjC,oBACCD,IAAA,CAACF,eAAe;IAAAI,QAAA,eACfF,IAAA,CAACJ,YAAY;MAAAM,QAAA,eACZF,IAAA,CAACH,cAAc,IAAE;IAAC,CACL;EAAC,CACC,CAAC;AAEpB;AAEA,eAAeI,eAAe","ignoreList":[]}
@@ -1,4 +1,3 @@
1
- import { createElement, Fragment } from "react";
2
1
  /**
3
2
  * WordPress dependencies
4
3
  */
@@ -13,6 +12,9 @@ import { useState } from '@wordpress/element';
13
12
  import { store as editorStore } from '../../store';
14
13
 
15
14
  // TODO: deprecate..
15
+ import { jsx as _jsx } from "react/jsx-runtime";
16
+ import { Fragment as _Fragment } from "react/jsx-runtime";
17
+ import { jsxs as _jsxs } from "react/jsx-runtime";
16
18
  export default function PostSwitchToDraftButton() {
17
19
  const [showConfirmDialog, setShowConfirmDialog] = useState(false);
18
20
  const {
@@ -52,25 +54,29 @@ export default function PostSwitchToDraftButton() {
52
54
  });
53
55
  savePost();
54
56
  };
55
- return createElement(Fragment, null, createElement(Button, {
56
- __next40pxDefaultSize: true,
57
- className: "editor-post-switch-to-draft",
58
- onClick: () => {
59
- if (!isDisabled) {
60
- setShowConfirmDialog(true);
61
- }
62
- },
63
- "aria-disabled": isDisabled,
64
- variant: "secondary",
65
- style: {
66
- flexGrow: '1',
67
- justifyContent: 'center'
68
- }
69
- }, __('Switch to draft')), createElement(ConfirmDialog, {
70
- isOpen: showConfirmDialog,
71
- onConfirm: handleConfirm,
72
- onCancel: () => setShowConfirmDialog(false),
73
- confirmButtonText: confirmButtonText
74
- }, alertMessage));
57
+ return /*#__PURE__*/_jsxs(_Fragment, {
58
+ children: [/*#__PURE__*/_jsx(Button, {
59
+ __next40pxDefaultSize: true,
60
+ className: "editor-post-switch-to-draft",
61
+ onClick: () => {
62
+ if (!isDisabled) {
63
+ setShowConfirmDialog(true);
64
+ }
65
+ },
66
+ "aria-disabled": isDisabled,
67
+ variant: "secondary",
68
+ style: {
69
+ flexGrow: '1',
70
+ justifyContent: 'center'
71
+ },
72
+ children: __('Switch to draft')
73
+ }), /*#__PURE__*/_jsx(ConfirmDialog, {
74
+ isOpen: showConfirmDialog,
75
+ onConfirm: handleConfirm,
76
+ onCancel: () => setShowConfirmDialog(false),
77
+ confirmButtonText: confirmButtonText,
78
+ children: alertMessage
79
+ })]
80
+ });
75
81
  }
76
82
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["Button","__experimentalConfirmDialog","ConfirmDialog","__","useDispatch","useSelect","useState","store","editorStore","PostSwitchToDraftButton","showConfirmDialog","setShowConfirmDialog","editPost","savePost","isSaving","isPublished","isScheduled","select","isSavingPost","isCurrentPostPublished","isCurrentPostScheduled","isDisabled","alertMessage","confirmButtonText","handleConfirm","status","createElement","Fragment","__next40pxDefaultSize","className","onClick","variant","style","flexGrow","justifyContent","isOpen","onConfirm","onCancel"],"sources":["@wordpress/editor/src/components/post-switch-to-draft-button/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tButton,\n\t__experimentalConfirmDialog as ConfirmDialog,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n// TODO: deprecate..\nexport default function PostSwitchToDraftButton() {\n\tconst [ showConfirmDialog, setShowConfirmDialog ] = useState( false );\n\n\tconst { editPost, savePost } = useDispatch( editorStore );\n\tconst { isSaving, isPublished, isScheduled } = useSelect( ( select ) => {\n\t\tconst { isSavingPost, isCurrentPostPublished, isCurrentPostScheduled } =\n\t\t\tselect( editorStore );\n\t\treturn {\n\t\t\tisSaving: isSavingPost(),\n\t\t\tisPublished: isCurrentPostPublished(),\n\t\t\tisScheduled: isCurrentPostScheduled(),\n\t\t};\n\t}, [] );\n\n\tconst isDisabled = isSaving || ( ! isPublished && ! isScheduled );\n\n\tlet alertMessage;\n\tlet confirmButtonText;\n\tif ( isPublished ) {\n\t\talertMessage = __( 'Are you sure you want to unpublish this post?' );\n\t\tconfirmButtonText = __( 'Unpublish' );\n\t} else if ( isScheduled ) {\n\t\talertMessage = __( 'Are you sure you want to unschedule this post?' );\n\t\tconfirmButtonText = __( 'Unschedule' );\n\t}\n\n\tconst handleConfirm = () => {\n\t\tsetShowConfirmDialog( false );\n\t\teditPost( { status: 'draft' } );\n\t\tsavePost();\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<Button\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\tclassName=\"editor-post-switch-to-draft\"\n\t\t\t\tonClick={ () => {\n\t\t\t\t\tif ( ! isDisabled ) {\n\t\t\t\t\t\tsetShowConfirmDialog( true );\n\t\t\t\t\t}\n\t\t\t\t} }\n\t\t\t\taria-disabled={ isDisabled }\n\t\t\t\tvariant=\"secondary\"\n\t\t\t\tstyle={ { flexGrow: '1', justifyContent: 'center' } }\n\t\t\t>\n\t\t\t\t{ __( 'Switch to draft' ) }\n\t\t\t</Button>\n\t\t\t<ConfirmDialog\n\t\t\t\tisOpen={ showConfirmDialog }\n\t\t\t\tonConfirm={ handleConfirm }\n\t\t\t\tonCancel={ () => setShowConfirmDialog( false ) }\n\t\t\t\tconfirmButtonText={ confirmButtonText }\n\t\t\t>\n\t\t\t\t{ alertMessage }\n\t\t\t</ConfirmDialog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B,aAAa,GAAGA,CAAA,KAAM;IAC3Bb,oBAAoB,CAAE,KAAM,CAAC;IAC7BC,QAAQ,CAAE;MAAEa,MAAM,EAAE;IAAQ,CAAE,CAAC;IAC/BZ,QAAQ,CAAC,CAAC;EACX,CAAC;EAED,OACCa,aAAA,CAAAC,QAAA,QACCD,aAAA,CAAC1B,MAAM;IACN4B,qBAAqB;IACrBC,SAAS,EAAC,6BAA6B;IACvCC,OAAO,EAAGA,CAAA,KAAM;MACf,IAAK,CAAET,UAAU,EAAG;QACnBV,oBAAoB,CAAE,IAAK,CAAC;MAC7B;IACD,CAAG;IACH,iBAAgBU,UAAY;IAC5BU,OAAO,EAAC,WAAW;IACnBC,KAAK,EAAG;MAAEC,QAAQ,EAAE,GAAG;MAAEC,cAAc,EAAE;IAAS;EAAG,GAEnD/B,EAAE,CAAE,iBAAkB,CACjB,CAAC,EACTuB,aAAA,CAACxB,aAAa;IACbiC,MAAM,EAAGzB,iBAAmB;IAC5B0B,SAAS,EAAGZ,aAAe;IAC3Ba,QAAQ,EAAGA,CAAA,KAAM1B,oBAAoB,CAAE,KAAM,CAAG;IAChDY,iBAAiB,EAAGA;EAAmB,GAErCD,YACY,CACd,CAAC;AAEL","ignoreList":[]}
1
+ {"version":3,"names":["Button","__experimentalConfirmDialog","ConfirmDialog","__","useDispatch","useSelect","useState","store","editorStore","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","PostSwitchToDraftButton","showConfirmDialog","setShowConfirmDialog","editPost","savePost","isSaving","isPublished","isScheduled","select","isSavingPost","isCurrentPostPublished","isCurrentPostScheduled","isDisabled","alertMessage","confirmButtonText","handleConfirm","status","children","__next40pxDefaultSize","className","onClick","variant","style","flexGrow","justifyContent","isOpen","onConfirm","onCancel"],"sources":["@wordpress/editor/src/components/post-switch-to-draft-button/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tButton,\n\t__experimentalConfirmDialog as ConfirmDialog,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n// TODO: deprecate..\nexport default function PostSwitchToDraftButton() {\n\tconst [ showConfirmDialog, setShowConfirmDialog ] = useState( false );\n\n\tconst { editPost, savePost } = useDispatch( editorStore );\n\tconst { isSaving, isPublished, isScheduled } = useSelect( ( select ) => {\n\t\tconst { isSavingPost, isCurrentPostPublished, isCurrentPostScheduled } =\n\t\t\tselect( editorStore );\n\t\treturn {\n\t\t\tisSaving: isSavingPost(),\n\t\t\tisPublished: isCurrentPostPublished(),\n\t\t\tisScheduled: isCurrentPostScheduled(),\n\t\t};\n\t}, [] );\n\n\tconst isDisabled = isSaving || ( ! isPublished && ! isScheduled );\n\n\tlet alertMessage;\n\tlet confirmButtonText;\n\tif ( isPublished ) {\n\t\talertMessage = __( 'Are you sure you want to unpublish this post?' );\n\t\tconfirmButtonText = __( 'Unpublish' );\n\t} else if ( isScheduled ) {\n\t\talertMessage = __( 'Are you sure you want to unschedule this post?' );\n\t\tconfirmButtonText = __( 'Unschedule' );\n\t}\n\n\tconst handleConfirm = () => {\n\t\tsetShowConfirmDialog( false );\n\t\teditPost( { status: 'draft' } );\n\t\tsavePost();\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<Button\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\tclassName=\"editor-post-switch-to-draft\"\n\t\t\t\tonClick={ () => {\n\t\t\t\t\tif ( ! isDisabled ) {\n\t\t\t\t\t\tsetShowConfirmDialog( true );\n\t\t\t\t\t}\n\t\t\t\t} }\n\t\t\t\taria-disabled={ isDisabled }\n\t\t\t\tvariant=\"secondary\"\n\t\t\t\tstyle={ { flexGrow: '1', justifyContent: 'center' } }\n\t\t\t>\n\t\t\t\t{ __( 'Switch to draft' ) }\n\t\t\t</Button>\n\t\t\t<ConfirmDialog\n\t\t\t\tisOpen={ showConfirmDialog }\n\t\t\t\tonCon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AAY,GAAGzB,EAAE,CAAE,+CAAgD,CAAC;IACpE0B,iBAAiB,GAAG1B,EAAE,CAAE,WAAY,CAAC;EACtC,CAAC,MAAM,IAAKmB,WAAW,EAAG;IACzBM,YAAY,GAAGzB,EAAE,CAAE,gDAAiD,CAAC;IACrE0B,iBAAiB,GAAG1B,EAAE,CAAE,YAAa,CAAC;EACvC;EAEA,MAAM2B,aAAa,GAAGA,CAAA,KAAM;IAC3Bb,oBAAoB,CAAE,KAAM,CAAC;IAC7BC,QAAQ,CAAE;MAAEa,MAAM,EAAE;IAAQ,CAAE,CAAC;IAC/BZ,QAAQ,CAAC,CAAC;EACX,CAAC;EAED,oBACCL,KAAA,CAAAF,SAAA;IAAAoB,QAAA,gBACCtB,IAAA,CAACV,MAAM;MACNiC,qBAAqB;MACrBC,SAAS,EAAC,6BAA6B;MACvCC,OAAO,EAAGA,CAAA,KAAM;QACf,IAAK,CAAER,UAAU,EAAG;UACnBV,oBAAoB,CAAE,IAAK,CAAC;QAC7B;MACD,CAAG;MACH,iBAAgBU,UAAY;MAC5BS,OAAO,EAAC,WAAW;MACnBC,KAAK,EAAG;QAAEC,QAAQ,EAAE,GAAG;QAAEC,cAAc,EAAE;MAAS,CAAG;MAAAP,QAAA,EAEnD7B,EAAE,CAAE,iBAAkB;IAAC,CAClB,CAAC,eACTO,IAAA,CAACR,aAAa;MACbsC,MAAM,EAAGxB,iBAAmB;MAC5ByB,SAAS,EAAGX,aAAe;MAC3BY,QAAQ,EAAGA,CAAA,KAAMzB,oBAAoB,CAAE,KAAM,CAAG;MAChDY,iBAAiB,EAAGA,iBAAmB;MAAAG,QAAA,EAErCJ;IAAY,CACA,CAAC;EAAA,CACf,CAAC;AAEL","ignoreList":[]}
@@ -1,4 +1,3 @@
1
- import { createElement } from "react";
2
1
  /**
3
2
  * WordPress dependencies
4
3
  */
@@ -10,6 +9,7 @@ import { __, _x } from '@wordpress/i18n';
10
9
  */
11
10
  import PostPanelRow from '../post-panel-row';
12
11
  import { store as editorStore } from '../../store';
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
13
  export default function PostSyncStatus() {
14
14
  const {
15
15
  syncStatus,
@@ -30,10 +30,12 @@ export default function PostSyncStatus() {
30
30
  if (postType !== 'wp_block') {
31
31
  return null;
32
32
  }
33
- return createElement(PostPanelRow, {
34
- label: __('Sync status')
35
- }, createElement("div", {
36
- className: "editor-post-sync-status__value"
37
- }, syncStatus === 'unsynced' ? _x('Not synced', 'Text that indicates that the pattern is not synchronized') : _x('Synced', 'Text that indicates that the pattern is synchronized')));
33
+ return /*#__PURE__*/_jsx(PostPanelRow, {
34
+ label: __('Sync status'),
35
+ children: /*#__PURE__*/_jsx("div", {
36
+ className: "editor-post-sync-status__value",
37
+ children: syncStatus === 'unsynced' ? _x('Not synced', 'Text that indicates that the pattern is not synchronized') : _x('Synced', 'Text that indicates that the pattern is synchronized')
38
+ })
39
+ });
38
40
  }
39
41
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["useSelect","__","_x","PostPanelRow","store","editorStore","PostSyncStatus","syncStatus","postType","select","getEditedPostAttribute","meta","currentSyncStatus","wp_pattern_sync_status","createElement","label","className"],"sources":["@wordpress/editor/src/components/post-sync-status/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { __, _x } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport PostPanelRow from '../post-panel-row';\nimport { store as editorStore } from '../../store';\n\nexport default function PostSyncStatus() {\n\tconst { syncStatus, postType } = useSelect( ( select ) => {\n\t\tconst { getEditedPostAttribute } = select( editorStore );\n\t\tconst meta = getEditedPostAttribute( 'meta' );\n\n\t\t// When the post is first created, the top level wp_pattern_sync_status is not set so get meta value instead.\n\t\tconst currentSyncStatus =\n\t\t\tmeta?.wp_pattern_sync_status === 'unsynced'\n\t\t\t\t? 'unsynced'\n\t\t\t\t: getEditedPostAttribute( 'wp_pattern_sync_status' );\n\n\t\treturn {\n\t\t\tsyncStatus: currentSyncStatus,\n\t\t\tpostType: getEditedPostAttribute( 'type' ),\n\t\t};\n\t} );\n\n\tif ( postType !== 'wp_block' ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PostPanelRow label={ __( 'Sync status' ) }>\n\t\t\t<div className=\"editor-post-sync-status__value\">\n\t\t\t\t{ syncStatus === 'unsynced'\n\t\t\t\t\t? _x(\n\t\t\t\t\t\t\t'Not synced',\n\t\t\t\t\t\t\t'Text that indicates that the pattern is not synchronized'\n\t\t\t\t\t )\n\t\t\t\t\t: _x(\n\t\t\t\t\t\t\t'Synced',\n\t\t\t\t\t\t\t'Text that indicates that the pattern is synchronized'\n\t\t\t\t\t ) }\n\t\t\t</div>\n\t\t</PostPanelRow>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,EAAE,EAAEC,EAAE,QAAQ,iBAAiB;;AAExC;AACA;AACA;AACA,OAAOC,YAAY,MAAM,mBAAmB;AAC5C,SAASC,KAAK,IAAIC,WAAW,QAAQ,aAAa;AAElD,eAAe,SAASC,cAAcA,CAAA,EAAG;EACxC,MAAM;IAAEC,UAAU;IAAEC;EAAS,CAAC,GAAGR,SAAS,CAAIS,MAAM,IAAM;IACzD,MAAM;MAAEC;IAAuB,CAAC,GAAGD,MAAM,CAAEJ,WAAY,CAAC;IACxD,MAAMM,IAAI,GAAGD,sBAAsB,CAAE,MAAO,CAAC;;IAE7C;IACA,MAAME,iBAAiB,GACtBD,IAAI,EAAEE,sBAAsB,KAAK,UAAU,GACxC,UAAU,GACVH,sBAAsB,CAAE,wBAAyB,CAAC;IAEtD,OAAO;MACNH,UAAU,EAAEK,iBAAiB;MAC7BJ,QAAQ,EAAEE,sBAAsB,CAAE,MAAO;IAC1C,CAAC;EACF,CAAE,CAAC;EAEH,IAAKF,QAAQ,KAAK,UAAU,EAAG;IAC9B,OAAO,IAAI;EACZ;EAEA,OACCM,aAAA,CAACX,YAAY;IAACY,KAAK,EAAGd,EAAE,CAAE,aAAc;EAAG,GAC1Ca,aAAA;IAAKE,SAAS,EAAC;EAAgC,GAC5CT,UAAU,KAAK,UAAU,GACxBL,EAAE,CACF,YAAY,EACZ,0DACA,CAAC,GACDA,EAAE,CACF,QAAQ,EACR,sDACA,CACC,CACQ,CAAC;AAEjB","ignoreList":[]}
1
+ {"version":3,"names":["useSelect","__","_x","PostPanelRow","store","editorStore","jsx","_jsx","PostSyncStatus","syncStatus","postType","select","getEditedPostAttribute","meta","currentSyncStatus","wp_pattern_sync_status","label","children","className"],"sources":["@wordpress/editor/src/components/post-sync-status/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { __, _x } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport PostPanelRow from '../post-panel-row';\nimport { store as editorStore } from '../../store';\n\nexport default function PostSyncStatus() {\n\tconst { syncStatus, postType } = useSelect( ( select ) => {\n\t\tconst { getEditedPostAttribute } = select( editorStore );\n\t\tconst meta = getEditedPostAttribute( 'meta' );\n\n\t\t// When the post is first created, the top level wp_pattern_sync_status is not set so get meta value instead.\n\t\tconst currentSyncStatus =\n\t\t\tmeta?.wp_pattern_sync_status === 'unsynced'\n\t\t\t\t? 'unsynced'\n\t\t\t\t: getEditedPostAttribute( 'wp_pattern_sync_status' );\n\n\t\treturn {\n\t\t\tsyncStatus: currentSyncStatus,\n\t\t\tpostType: getEditedPostAttribute( 'type' ),\n\t\t};\n\t} );\n\n\tif ( postType !== 'wp_block' ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PostPanelRow label={ __( 'Sync status' ) }>\n\t\t\t<div className=\"editor-post-sync-status__value\">\n\t\t\t\t{ syncStatus === 'unsynced'\n\t\t\t\t\t? _x(\n\t\t\t\t\t\t\t'Not synced',\n\t\t\t\t\t\t\t'Text that indicates that the pattern is not synchronized'\n\t\t\t\t\t )\n\t\t\t\t\t: _x(\n\t\t\t\t\t\t\t'Synced',\n\t\t\t\t\t\t\t'Text that indicates that the pattern is synchronized'\n\t\t\t\t\t ) }\n\t\t\t</div>\n\t\t</PostPanelRow>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,EAAE,EAAEC,EAAE,QAAQ,iBAAiB;;AAExC;AACA;AACA;AACA,OAAOC,YAAY,MAAM,mBAAmB;AAC5C,SAASC,KAAK,IAAIC,WAAW,QAAQ,aAAa;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEnD,eAAe,SAASC,cAAcA,CAAA,EAAG;EACxC,MAAM;IAAEC,UAAU;IAAEC;EAAS,CAAC,GAAGV,SAAS,CAAIW,MAAM,IAAM;IACzD,MAAM;MAAEC;IAAuB,CAAC,GAAGD,MAAM,CAAEN,WAAY,CAAC;IACxD,MAAMQ,IAAI,GAAGD,sBAAsB,CAAE,MAAO,CAAC;;IAE7C;IACA,MAAME,iBAAiB,GACtBD,IAAI,EAAEE,sBAAsB,KAAK,UAAU,GACxC,UAAU,GACVH,sBAAsB,CAAE,wBAAyB,CAAC;IAEtD,OAAO;MACNH,UAAU,EAAEK,iBAAiB;MAC7BJ,QAAQ,EAAEE,sBAAsB,CAAE,MAAO;IAC1C,CAAC;EACF,CAAE,CAAC;EAEH,IAAKF,QAAQ,KAAK,UAAU,EAAG;IAC9B,OAAO,IAAI;EACZ;EAEA,oBACCH,IAAA,CAACJ,YAAY;IAACa,KAAK,EAAGf,EAAE,CAAE,aAAc,CAAG;IAAAgB,QAAA,eAC1CV,IAAA;MAAKW,SAAS,EAAC,gCAAgC;MAAAD,QAAA,EAC5CR,UAAU,KAAK,UAAU,GACxBP,EAAE,CACF,YAAY,EACZ,0DACA,CAAC,GACDA,EAAE,CACF,QAAQ,EACR,sDACA;IAAC,CACA;EAAC,CACO,CAAC;AAEjB","ignoreList":[]}