@wordpress/editor 13.35.0 → 14.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (947) hide show
  1. package/CHANGELOG.md +7 -0
  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 +1 -1
  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 +59 -36
  20. package/build/components/block-settings-menu/content-only-settings-menu.js.map +1 -1
  21. package/build/components/block-settings-menu/plugin-block-settings-menu-item.js +16 -13
  22. package/build/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -1
  23. package/build/components/blog-title/index.js +116 -0
  24. package/build/components/blog-title/index.js.map +1 -0
  25. package/build/components/collapsible-block-toolbar/index.js +21 -18
  26. package/build/components/collapsible-block-toolbar/index.js.map +1 -1
  27. package/build/components/commands/index.js +109 -3
  28. package/build/components/commands/index.js.map +1 -1
  29. package/build/components/create-template-part-modal/index.js +167 -0
  30. package/build/components/create-template-part-modal/index.js.map +1 -0
  31. package/build/components/create-template-part-modal/utils.js +64 -0
  32. package/build/components/create-template-part-modal/utils.js.map +1 -0
  33. package/build/components/deprecated.js +2 -2
  34. package/build/components/deprecated.js.map +1 -1
  35. package/build/components/document-bar/index.js +94 -70
  36. package/build/components/document-bar/index.js.map +1 -1
  37. package/build/components/document-outline/index.js +124 -121
  38. package/build/components/document-outline/index.js.map +1 -1
  39. package/build/components/document-outline/item.js +18 -14
  40. package/build/components/document-outline/item.js.map +1 -1
  41. package/build/components/document-tools/index.js +56 -53
  42. package/build/components/document-tools/index.js.map +1 -1
  43. package/build/components/editor/index.js +83 -0
  44. package/build/components/editor/index.js.map +1 -0
  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 +176 -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 +3 -4
  92. package/build/components/global-keyboard-shortcuts/register-shortcuts.js.map +1 -1
  93. package/build/components/global-styles-provider/index.js +81 -16
  94. package/build/components/global-styles-provider/index.js.map +1 -1
  95. package/build/components/header/back-button.js +37 -0
  96. package/build/components/header/back-button.js.map +1 -0
  97. package/build/components/header/index.js +85 -60
  98. package/build/components/header/index.js.map +1 -1
  99. package/build/components/inserter-sidebar/index.js +45 -19
  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 +53 -48
  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/media-categories/index.js +1 -1
  114. package/build/components/media-categories/index.js.map +1 -1
  115. package/build/components/mode-switcher/index.js +10 -10
  116. package/build/components/mode-switcher/index.js.map +1 -1
  117. package/build/components/more-menu/copy-content-menu-item.js +5 -4
  118. package/build/components/more-menu/copy-content-menu-item.js.map +1 -1
  119. package/build/components/more-menu/index.js +89 -76
  120. package/build/components/more-menu/index.js.map +1 -1
  121. package/build/components/more-menu/tools-more-menu-group.js +2 -2
  122. package/build/components/more-menu/tools-more-menu-group.js.map +1 -1
  123. package/build/components/more-menu/view-more-menu-group.js +2 -2
  124. package/build/components/more-menu/view-more-menu-group.js.map +1 -1
  125. package/build/components/offline-status/index.native.js +12 -11
  126. package/build/components/offline-status/index.native.js.map +1 -1
  127. package/build/components/page-attributes/order.js +87 -14
  128. package/build/components/page-attributes/order.js.map +1 -1
  129. package/build/components/page-attributes/panel.js +10 -19
  130. package/build/components/page-attributes/panel.js.map +1 -1
  131. package/build/components/page-attributes/parent.js +86 -3
  132. package/build/components/page-attributes/parent.js.map +1 -1
  133. package/build/components/pattern-duplicate-modal/index.js +59 -0
  134. package/build/components/pattern-duplicate-modal/index.js.map +1 -0
  135. package/build/components/pattern-overrides-panel/index.js +2 -2
  136. package/build/components/pattern-overrides-panel/index.js.map +1 -1
  137. package/build/components/pattern-rename-modal/index.js +58 -0
  138. package/build/components/pattern-rename-modal/index.js.map +1 -0
  139. package/build/components/plugin-document-setting-panel/index.js +17 -12
  140. package/build/components/plugin-document-setting-panel/index.js.map +1 -1
  141. package/build/components/plugin-post-publish-panel/index.js +10 -7
  142. package/build/components/plugin-post-publish-panel/index.js.map +1 -1
  143. package/build/components/plugin-post-status-info/index.js +7 -4
  144. package/build/components/plugin-post-status-info/index.js.map +1 -1
  145. package/build/components/plugin-pre-publish-panel/index.js +10 -7
  146. package/build/components/plugin-pre-publish-panel/index.js.map +1 -1
  147. package/build/components/plugin-sidebar/index.js +3 -4
  148. package/build/components/plugin-sidebar/index.js.map +1 -1
  149. package/build/components/plugin-sidebar-more-menu-item/index.js +3 -5
  150. package/build/components/plugin-sidebar-more-menu-item/index.js.map +1 -1
  151. package/build/components/post-actions/actions.js +379 -309
  152. package/build/components/post-actions/actions.js.map +1 -1
  153. package/build/components/post-actions/export-pattern-action.js +64 -0
  154. package/build/components/post-actions/export-pattern-action.js.map +1 -0
  155. package/build/components/post-actions/export-pattern-action.native.js +11 -0
  156. package/build/components/post-actions/export-pattern-action.native.js.map +1 -0
  157. package/build/components/post-actions/index.js +66 -50
  158. package/build/components/post-actions/index.js.map +1 -1
  159. package/build/components/post-author/check.js +6 -6
  160. package/build/components/post-author/check.js.map +1 -1
  161. package/build/components/post-author/combobox.js +4 -3
  162. package/build/components/post-author/combobox.js.map +1 -1
  163. package/build/components/post-author/hook.js +2 -1
  164. package/build/components/post-author/hook.js.map +1 -1
  165. package/build/components/post-author/index.js +3 -3
  166. package/build/components/post-author/index.js.map +1 -1
  167. package/build/components/post-author/panel.js +72 -4
  168. package/build/components/post-author/panel.js.map +1 -1
  169. package/build/components/post-author/select.js +4 -3
  170. package/build/components/post-author/select.js.map +1 -1
  171. package/build/components/post-card-panel/index.js +54 -19
  172. package/build/components/post-card-panel/index.js.map +1 -1
  173. package/build/components/post-comments/index.js +38 -22
  174. package/build/components/post-comments/index.js.map +1 -1
  175. package/build/components/post-content-information/index.js +8 -5
  176. package/build/components/post-content-information/index.js.map +1 -1
  177. package/build/components/post-discussion/panel.js +54 -38
  178. package/build/components/post-discussion/panel.js.map +1 -1
  179. package/build/components/post-excerpt/check.js +6 -6
  180. package/build/components/post-excerpt/check.js.map +1 -1
  181. package/build/components/post-excerpt/index.js +18 -17
  182. package/build/components/post-excerpt/index.js.map +1 -1
  183. package/build/components/post-excerpt/panel.js +59 -42
  184. package/build/components/post-excerpt/panel.js.map +1 -1
  185. package/build/components/post-excerpt/plugin.js +7 -4
  186. package/build/components/post-excerpt/plugin.js.map +1 -1
  187. package/build/components/post-featured-image/check.js +17 -7
  188. package/build/components/post-featured-image/check.js.map +1 -1
  189. package/build/components/post-featured-image/index.js +77 -49
  190. package/build/components/post-featured-image/index.js.map +1 -1
  191. package/build/components/post-featured-image/panel.js +22 -7
  192. package/build/components/post-featured-image/panel.js.map +1 -1
  193. package/build/components/post-format/check.js +14 -4
  194. package/build/components/post-format/check.js.map +1 -1
  195. package/build/components/post-format/index.js +37 -20
  196. package/build/components/post-format/index.js.map +1 -1
  197. package/build/components/post-format/panel.js +73 -7
  198. package/build/components/post-format/panel.js.map +1 -1
  199. package/build/components/post-last-edited-panel/index.js +7 -4
  200. package/build/components/post-last-edited-panel/index.js.map +1 -1
  201. package/build/components/post-last-revision/check.js +13 -5
  202. package/build/components/post-last-revision/check.js.map +1 -1
  203. package/build/components/post-last-revision/index.js +49 -17
  204. package/build/components/post-last-revision/index.js.map +1 -1
  205. package/build/components/post-last-revision/panel.js +12 -5
  206. package/build/components/post-last-revision/panel.js.map +1 -1
  207. package/build/components/post-locked-modal/index.js +57 -35
  208. package/build/components/post-locked-modal/index.js.map +1 -1
  209. package/build/components/post-panel-row/index.js +11 -8
  210. package/build/components/post-panel-row/index.js.map +1 -1
  211. package/build/components/post-panel-section/index.js +5 -4
  212. package/build/components/post-panel-section/index.js.map +1 -1
  213. package/build/components/post-pending-status/check.js +10 -0
  214. package/build/components/post-pending-status/check.js.map +1 -1
  215. package/build/components/post-pending-status/index.js +14 -7
  216. package/build/components/post-pending-status/index.js.map +1 -1
  217. package/build/components/post-pingbacks/index.js +13 -5
  218. package/build/components/post-pingbacks/index.js.map +1 -1
  219. package/build/components/post-preview-button/index.js +46 -21
  220. package/build/components/post-preview-button/index.js.map +1 -1
  221. package/build/components/post-publish-button/index.js +21 -11
  222. package/build/components/post-publish-button/index.js.map +1 -1
  223. package/build/components/post-publish-button/post-publish-button-or-toggle.js +2 -2
  224. package/build/components/post-publish-button/post-publish-button-or-toggle.js.map +1 -1
  225. package/build/components/post-publish-panel/index.js +47 -33
  226. package/build/components/post-publish-panel/index.js.map +1 -1
  227. package/build/components/post-publish-panel/maybe-category-panel.js +12 -9
  228. package/build/components/post-publish-panel/maybe-category-panel.js.map +1 -1
  229. package/build/components/post-publish-panel/maybe-post-format-panel.js +21 -15
  230. package/build/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
  231. package/build/components/post-publish-panel/maybe-tags-panel.js +13 -10
  232. package/build/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
  233. package/build/components/post-publish-panel/maybe-upload-media.js +29 -24
  234. package/build/components/post-publish-panel/maybe-upload-media.js.map +1 -1
  235. package/build/components/post-publish-panel/postpublish.js +55 -38
  236. package/build/components/post-publish-panel/postpublish.js.map +1 -1
  237. package/build/components/post-publish-panel/prepublish.js +41 -26
  238. package/build/components/post-publish-panel/prepublish.js.map +1 -1
  239. package/build/components/post-saved-state/index.js +8 -8
  240. package/build/components/post-saved-state/index.js.map +1 -1
  241. package/build/components/post-schedule/check.js +8 -0
  242. package/build/components/post-schedule/check.js.map +1 -1
  243. package/build/components/post-schedule/index.js +30 -5
  244. package/build/components/post-schedule/index.js.map +1 -1
  245. package/build/components/post-schedule/label.js +16 -0
  246. package/build/components/post-schedule/label.js.map +1 -1
  247. package/build/components/post-schedule/panel.js +43 -30
  248. package/build/components/post-schedule/panel.js.map +1 -1
  249. package/build/components/post-slug/check.js +5 -4
  250. package/build/components/post-slug/check.js.map +1 -1
  251. package/build/components/post-slug/index.js +5 -3
  252. package/build/components/post-slug/index.js.map +1 -1
  253. package/build/components/post-slug/panel.js +7 -4
  254. package/build/components/post-slug/panel.js.map +1 -1
  255. package/build/components/post-status/index.js +118 -119
  256. package/build/components/post-status/index.js.map +1 -1
  257. package/build/components/post-sticky/index.js +16 -8
  258. package/build/components/post-sticky/index.js.map +1 -1
  259. package/build/components/post-sticky/panel.js +6 -2
  260. package/build/components/post-sticky/panel.js.map +1 -1
  261. package/build/components/post-switch-to-draft-button/index.js +25 -21
  262. package/build/components/post-switch-to-draft-button/index.js.map +1 -1
  263. package/build/components/post-sync-status/index.js +8 -6
  264. package/build/components/post-sync-status/index.js.map +1 -1
  265. package/build/components/post-taxonomies/flat-term-selector.js +21 -20
  266. package/build/components/post-taxonomies/flat-term-selector.js.map +1 -1
  267. package/build/components/post-taxonomies/hierarchical-term-selector.js +71 -61
  268. package/build/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
  269. package/build/components/post-taxonomies/index.js +6 -6
  270. package/build/components/post-taxonomies/index.js.map +1 -1
  271. package/build/components/post-taxonomies/most-used-terms.js +19 -15
  272. package/build/components/post-taxonomies/most-used-terms.js.map +1 -1
  273. package/build/components/post-taxonomies/panel.js +15 -11
  274. package/build/components/post-taxonomies/panel.js.map +1 -1
  275. package/build/components/post-template/block-theme.js +42 -32
  276. package/build/components/post-template/block-theme.js.map +1 -1
  277. package/build/components/post-template/classic-theme.js +73 -50
  278. package/build/components/post-template/classic-theme.js.map +1 -1
  279. package/build/components/post-template/create-new-template-modal.js +33 -27
  280. package/build/components/post-template/create-new-template-modal.js.map +1 -1
  281. package/build/components/post-template/create-new-template.js +14 -11
  282. package/build/components/post-template/create-new-template.js.map +1 -1
  283. package/build/components/post-template/panel.js +16 -10
  284. package/build/components/post-template/panel.js.map +1 -1
  285. package/build/components/post-template/reset-default-template.js +5 -4
  286. package/build/components/post-template/reset-default-template.js.map +1 -1
  287. package/build/components/post-template/swap-template-button.js +20 -15
  288. package/build/components/post-template/swap-template-button.js.map +1 -1
  289. package/build/components/post-text-editor/index.js +27 -20
  290. package/build/components/post-text-editor/index.js.map +1 -1
  291. package/build/components/post-title/index.js +29 -17
  292. package/build/components/post-title/index.js.map +1 -1
  293. package/build/components/post-title/index.native.js +81 -57
  294. package/build/components/post-title/index.native.js.map +1 -1
  295. package/build/components/post-title/post-title-raw.js +10 -3
  296. package/build/components/post-title/post-title-raw.js.map +1 -1
  297. package/build/components/post-title/use-post-title-focus.js +7 -0
  298. package/build/components/post-title/use-post-title-focus.js.map +1 -1
  299. package/build/components/post-title/use-post-title.js +5 -0
  300. package/build/components/post-title/use-post-title.js.map +1 -1
  301. package/build/components/post-transform-panel/index.js +11 -11
  302. package/build/components/post-transform-panel/index.js.map +1 -1
  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-url/check.js +8 -0
  306. package/build/components/post-url/check.js.map +1 -1
  307. package/build/components/post-url/index.js +98 -73
  308. package/build/components/post-url/index.js.map +1 -1
  309. package/build/components/post-url/label.js +11 -0
  310. package/build/components/post-url/label.js.map +1 -1
  311. package/build/components/post-url/panel.js +56 -26
  312. package/build/components/post-url/panel.js.map +1 -1
  313. package/build/components/post-view-link/index.js +2 -2
  314. package/build/components/post-view-link/index.js.map +1 -1
  315. package/build/components/post-visibility/check.js +9 -0
  316. package/build/components/post-visibility/check.js.map +1 -1
  317. package/build/components/post-visibility/index.js +83 -68
  318. package/build/components/post-visibility/index.js.map +1 -1
  319. package/build/components/post-visibility/label.js +11 -0
  320. package/build/components/post-visibility/label.js.map +1 -1
  321. package/build/components/posts-per-page/index.js +109 -0
  322. package/build/components/posts-per-page/index.js.map +1 -0
  323. package/build/components/preferences-modal/enable-plugin-document-setting-panel.js +7 -5
  324. package/build/components/preferences-modal/enable-plugin-document-setting-panel.js.map +1 -1
  325. package/build/components/preferences-modal/index.js +124 -102
  326. package/build/components/preferences-modal/index.js.map +1 -1
  327. package/build/components/preview-dropdown/index.js +47 -31
  328. package/build/components/preview-dropdown/index.js.map +1 -1
  329. package/build/components/provider/disable-non-page-content-blocks.js +5 -3
  330. package/build/components/provider/disable-non-page-content-blocks.js.map +1 -1
  331. package/build/components/provider/index.js +94 -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 +7 -6
  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/header.js +17 -14
  346. package/build/components/sidebar/header.js.map +1 -1
  347. package/build/components/sidebar/index.js +36 -32
  348. package/build/components/sidebar/index.js.map +1 -1
  349. package/build/components/sidebar/post-summary.js +39 -33
  350. package/build/components/sidebar/post-summary.js.map +1 -1
  351. package/build/components/site-discussion/index.js +133 -0
  352. package/build/components/site-discussion/index.js.map +1 -0
  353. package/build/components/start-page-options/index.js +13 -11
  354. package/build/components/start-page-options/index.js.map +1 -1
  355. package/build/components/start-template-options/index.js +29 -23
  356. package/build/components/start-template-options/index.js.map +1 -1
  357. package/build/components/table-of-contents/index.js +4 -4
  358. package/build/components/table-of-contents/index.js.map +1 -1
  359. package/build/components/table-of-contents/panel.js +53 -35
  360. package/build/components/table-of-contents/panel.js.map +1 -1
  361. package/build/components/template-areas/index.js +36 -22
  362. package/build/components/template-areas/index.js.map +1 -1
  363. package/build/components/template-content-panel/index.js +7 -6
  364. package/build/components/template-content-panel/index.js.map +1 -1
  365. package/build/components/template-validation-notice/index.js +25 -21
  366. package/build/components/template-validation-notice/index.js.map +1 -1
  367. package/build/components/text-editor/index.js +73 -0
  368. package/build/components/text-editor/index.js.map +1 -0
  369. package/build/components/time-to-read/index.js +8 -8
  370. package/build/components/time-to-read/index.js.map +1 -1
  371. package/build/components/{editor-canvas → visual-editor}/edit-template-blocks-notification.js +6 -6
  372. package/build/components/visual-editor/edit-template-blocks-notification.js.map +1 -0
  373. package/build/components/{editor-canvas → visual-editor}/index.js +115 -74
  374. package/build/components/visual-editor/index.js.map +1 -0
  375. package/build/components/word-count/index.js +5 -4
  376. package/build/components/word-count/index.js.map +1 -1
  377. package/build/hooks/custom-sources-backwards-compatibility.js +3 -4
  378. package/build/hooks/custom-sources-backwards-compatibility.js.map +1 -1
  379. package/build/hooks/index.js +1 -0
  380. package/build/hooks/index.js.map +1 -1
  381. package/build/hooks/media-upload.js +10 -0
  382. package/build/hooks/media-upload.js.map +1 -0
  383. package/build/hooks/pattern-overrides.js +15 -11
  384. package/build/hooks/pattern-overrides.js.map +1 -1
  385. package/build/private-apis.js +12 -28
  386. package/build/private-apis.js.map +1 -1
  387. package/build/private-apis.native.js +2 -26
  388. package/build/private-apis.native.js.map +1 -1
  389. package/build/store/constants.js +4 -1
  390. package/build/store/constants.js.map +1 -1
  391. package/build/store/private-actions.js +10 -14
  392. package/build/store/private-actions.js.map +1 -1
  393. package/build/store/private-selectors.js +39 -1
  394. package/build/store/private-selectors.js.map +1 -1
  395. package/build/store/selectors.js +1 -1
  396. package/build/store/selectors.js.map +1 -1
  397. package/build/utils/set-nested-value.js +44 -0
  398. package/build/utils/set-nested-value.js.map +1 -0
  399. package/build-module/bindings/index.js +1 -3
  400. package/build-module/bindings/index.js.map +1 -1
  401. package/build-module/bindings/pattern-overrides.js +1 -1
  402. package/build-module/bindings/pattern-overrides.js.map +1 -1
  403. package/build-module/bindings/post-meta.js +38 -2
  404. package/build-module/bindings/post-meta.js.map +1 -1
  405. package/build-module/components/autocompleters/user.js +14 -9
  406. package/build-module/components/autocompleters/user.js.map +1 -1
  407. package/build-module/components/block-manager/category.js +20 -17
  408. package/build-module/components/block-manager/category.js.map +1 -1
  409. package/build-module/components/block-manager/checklist.js +16 -14
  410. package/build-module/components/block-manager/checklist.js.map +1 -1
  411. package/build-module/components/block-manager/index.js +38 -33
  412. package/build-module/components/block-manager/index.js.map +1 -1
  413. package/build-module/components/block-removal-warnings/index.js +2 -2
  414. package/build-module/components/block-removal-warnings/index.js.map +1 -1
  415. package/build-module/components/block-settings-menu/content-only-settings-menu.js +61 -36
  416. package/build-module/components/block-settings-menu/content-only-settings-menu.js.map +1 -1
  417. package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js +16 -13
  418. package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -1
  419. package/build-module/components/blog-title/index.js +110 -0
  420. package/build-module/components/blog-title/index.js.map +1 -0
  421. package/build-module/components/collapsible-block-toolbar/index.js +23 -18
  422. package/build-module/components/collapsible-block-toolbar/index.js.map +1 -1
  423. package/build-module/components/commands/index.js +111 -5
  424. package/build-module/components/commands/index.js.map +1 -1
  425. package/build-module/components/create-template-part-modal/index.js +160 -0
  426. package/build-module/components/create-template-part-modal/index.js.map +1 -0
  427. package/build-module/components/create-template-part-modal/utils.js +54 -0
  428. package/build-module/components/create-template-part-modal/utils.js.map +1 -0
  429. package/build-module/components/deprecated.js +2 -2
  430. package/build-module/components/deprecated.js.map +1 -1
  431. package/build-module/components/document-bar/index.js +93 -68
  432. package/build-module/components/document-bar/index.js.map +1 -1
  433. package/build-module/components/document-outline/index.js +125 -120
  434. package/build-module/components/document-outline/index.js.map +1 -1
  435. package/build-module/components/document-outline/item.js +19 -14
  436. package/build-module/components/document-outline/item.js.map +1 -1
  437. package/build-module/components/document-tools/index.js +58 -53
  438. package/build-module/components/document-tools/index.js.map +1 -1
  439. package/build-module/components/editor/index.js +76 -0
  440. package/build-module/components/editor/index.js.map +1 -0
  441. package/build-module/components/editor-help/add-blocks.native.js +16 -11
  442. package/build-module/components/editor-help/add-blocks.native.js.map +1 -1
  443. package/build-module/components/editor-help/customize-blocks.native.js +16 -11
  444. package/build-module/components/editor-help/customize-blocks.native.js.map +1 -1
  445. package/build-module/components/editor-help/help-detail-navigation-screen.native.js +33 -22
  446. package/build-module/components/editor-help/help-detail-navigation-screen.native.js.map +1 -1
  447. package/build-module/components/editor-help/help-get-support-button.native.js +8 -6
  448. package/build-module/components/editor-help/help-get-support-button.native.js.map +1 -1
  449. package/build-module/components/editor-help/help-section-title.native.js +8 -6
  450. package/build-module/components/editor-help/help-section-title.native.js.map +1 -1
  451. package/build-module/components/editor-help/help-topic-row.native.js +7 -6
  452. package/build-module/components/editor-help/help-topic-row.native.js.map +1 -1
  453. package/build-module/components/editor-help/icon-move-blocks.native.js +7 -6
  454. package/build-module/components/editor-help/icon-move-blocks.native.js.map +1 -1
  455. package/build-module/components/editor-help/index.native.js +96 -76
  456. package/build-module/components/editor-help/index.native.js.map +1 -1
  457. package/build-module/components/editor-help/intro-to-blocks.native.js +43 -37
  458. package/build-module/components/editor-help/intro-to-blocks.native.js.map +1 -1
  459. package/build-module/components/editor-help/move-blocks.native.js +27 -21
  460. package/build-module/components/editor-help/move-blocks.native.js.map +1 -1
  461. package/build-module/components/editor-help/remove-blocks.native.js +14 -9
  462. package/build-module/components/editor-help/remove-blocks.native.js.map +1 -1
  463. package/build-module/components/editor-help/view-sections.native.js +25 -19
  464. package/build-module/components/editor-help/view-sections.native.js.map +1 -1
  465. package/build-module/components/editor-history/redo.js +2 -2
  466. package/build-module/components/editor-history/redo.js.map +1 -1
  467. package/build-module/components/editor-history/undo.js +2 -2
  468. package/build-module/components/editor-history/undo.js.map +1 -1
  469. package/build-module/components/editor-interface/content-slot-fill.js +16 -0
  470. package/build-module/components/editor-interface/content-slot-fill.js.map +1 -0
  471. package/build-module/components/editor-interface/index.js +170 -0
  472. package/build-module/components/editor-interface/index.js.map +1 -0
  473. package/build-module/components/editor-notices/index.js +25 -9
  474. package/build-module/components/editor-notices/index.js.map +1 -1
  475. package/build-module/components/editor-snackbars/index.js +2 -2
  476. package/build-module/components/editor-snackbars/index.js.map +1 -1
  477. package/build-module/components/entities-saved-states/entity-record-item.js +40 -11
  478. package/build-module/components/entities-saved-states/entity-record-item.js.map +1 -1
  479. package/build-module/components/entities-saved-states/entity-type-list.js +26 -22
  480. package/build-module/components/entities-saved-states/entity-type-list.js.map +1 -1
  481. package/build-module/components/entities-saved-states/index.js +54 -46
  482. package/build-module/components/entities-saved-states/index.js.map +1 -1
  483. package/build-module/components/error-boundary/index.js +27 -14
  484. package/build-module/components/error-boundary/index.js.map +1 -1
  485. package/build-module/components/error-boundary/index.native.js +46 -35
  486. package/build-module/components/error-boundary/index.native.js.map +1 -1
  487. package/build-module/components/global-keyboard-shortcuts/register-shortcuts.js +2 -2
  488. package/build-module/components/global-keyboard-shortcuts/register-shortcuts.js.map +1 -1
  489. package/build-module/components/global-styles-provider/index.js +82 -17
  490. package/build-module/components/global-styles-provider/index.js.map +1 -1
  491. package/build-module/components/header/back-button.js +31 -0
  492. package/build-module/components/header/back-button.js.map +1 -0
  493. package/build-module/components/header/index.js +86 -60
  494. package/build-module/components/header/index.js.map +1 -1
  495. package/build-module/components/inserter-sidebar/index.js +47 -21
  496. package/build-module/components/inserter-sidebar/index.js.map +1 -1
  497. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +2 -2
  498. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
  499. package/build-module/components/keyboard-shortcut-help-modal/index.js +54 -48
  500. package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  501. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +32 -26
  502. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
  503. package/build-module/components/list-view-sidebar/index.js +60 -47
  504. package/build-module/components/list-view-sidebar/index.js.map +1 -1
  505. package/build-module/components/list-view-sidebar/list-view-outline.js +23 -4
  506. package/build-module/components/list-view-sidebar/list-view-outline.js.map +1 -1
  507. package/build-module/components/local-autosave-monitor/index.js +15 -2
  508. package/build-module/components/local-autosave-monitor/index.js.map +1 -1
  509. package/build-module/components/media-categories/index.js +1 -1
  510. package/build-module/components/media-categories/index.js.map +1 -1
  511. package/build-module/components/mode-switcher/index.js +9 -8
  512. package/build-module/components/mode-switcher/index.js.map +1 -1
  513. package/build-module/components/more-menu/copy-content-menu-item.js +5 -4
  514. package/build-module/components/more-menu/copy-content-menu-item.js.map +1 -1
  515. package/build-module/components/more-menu/index.js +91 -76
  516. package/build-module/components/more-menu/index.js.map +1 -1
  517. package/build-module/components/more-menu/tools-more-menu-group.js +2 -2
  518. package/build-module/components/more-menu/tools-more-menu-group.js.map +1 -1
  519. package/build-module/components/more-menu/view-more-menu-group.js +2 -2
  520. package/build-module/components/more-menu/view-more-menu-group.js.map +1 -1
  521. package/build-module/components/offline-status/index.native.js +12 -9
  522. package/build-module/components/offline-status/index.native.js.map +1 -1
  523. package/build-module/components/page-attributes/order.js +90 -17
  524. package/build-module/components/page-attributes/order.js.map +1 -1
  525. package/build-module/components/page-attributes/panel.js +13 -21
  526. package/build-module/components/page-attributes/panel.js.map +1 -1
  527. package/build-module/components/page-attributes/parent.js +88 -5
  528. package/build-module/components/page-attributes/parent.js.map +1 -1
  529. package/build-module/components/pattern-duplicate-modal/index.js +51 -0
  530. package/build-module/components/pattern-duplicate-modal/index.js.map +1 -0
  531. package/build-module/components/pattern-overrides-panel/index.js +2 -2
  532. package/build-module/components/pattern-overrides-panel/index.js.map +1 -1
  533. package/build-module/components/pattern-rename-modal/index.js +50 -0
  534. package/build-module/components/pattern-rename-modal/index.js.map +1 -0
  535. package/build-module/components/plugin-document-setting-panel/index.js +19 -12
  536. package/build-module/components/plugin-document-setting-panel/index.js.map +1 -1
  537. package/build-module/components/plugin-post-publish-panel/index.js +10 -7
  538. package/build-module/components/plugin-post-publish-panel/index.js.map +1 -1
  539. package/build-module/components/plugin-post-status-info/index.js +7 -4
  540. package/build-module/components/plugin-post-status-info/index.js.map +1 -1
  541. package/build-module/components/plugin-pre-publish-panel/index.js +10 -7
  542. package/build-module/components/plugin-pre-publish-panel/index.js.map +1 -1
  543. package/build-module/components/plugin-sidebar/index.js +2 -2
  544. package/build-module/components/plugin-sidebar/index.js.map +1 -1
  545. package/build-module/components/plugin-sidebar-more-menu-item/index.js +2 -3
  546. package/build-module/components/plugin-sidebar-more-menu-item/index.js.map +1 -1
  547. package/build-module/components/post-actions/actions.js +380 -309
  548. package/build-module/components/post-actions/actions.js.map +1 -1
  549. package/build-module/components/post-actions/export-pattern-action.js +58 -0
  550. package/build-module/components/post-actions/export-pattern-action.js.map +1 -0
  551. package/build-module/components/post-actions/export-pattern-action.native.js +5 -0
  552. package/build-module/components/post-actions/export-pattern-action.native.js.map +1 -0
  553. package/build-module/components/post-actions/index.js +68 -50
  554. package/build-module/components/post-actions/index.js.map +1 -1
  555. package/build-module/components/post-author/check.js +5 -4
  556. package/build-module/components/post-author/check.js.map +1 -1
  557. package/build-module/components/post-author/combobox.js +4 -3
  558. package/build-module/components/post-author/combobox.js.map +1 -1
  559. package/build-module/components/post-author/hook.js +2 -1
  560. package/build-module/components/post-author/hook.js.map +1 -1
  561. package/build-module/components/post-author/index.js +3 -3
  562. package/build-module/components/post-author/index.js.map +1 -1
  563. package/build-module/components/post-author/panel.js +72 -4
  564. package/build-module/components/post-author/panel.js.map +1 -1
  565. package/build-module/components/post-author/select.js +4 -3
  566. package/build-module/components/post-author/select.js.map +1 -1
  567. package/build-module/components/post-card-panel/index.js +54 -20
  568. package/build-module/components/post-card-panel/index.js.map +1 -1
  569. package/build-module/components/post-comments/index.js +40 -22
  570. package/build-module/components/post-comments/index.js.map +1 -1
  571. package/build-module/components/post-content-information/index.js +8 -5
  572. package/build-module/components/post-content-information/index.js.map +1 -1
  573. package/build-module/components/post-discussion/panel.js +56 -39
  574. package/build-module/components/post-discussion/panel.js.map +1 -1
  575. package/build-module/components/post-excerpt/check.js +5 -4
  576. package/build-module/components/post-excerpt/check.js.map +1 -1
  577. package/build-module/components/post-excerpt/index.js +17 -15
  578. package/build-module/components/post-excerpt/index.js.map +1 -1
  579. package/build-module/components/post-excerpt/panel.js +60 -40
  580. package/build-module/components/post-excerpt/panel.js.map +1 -1
  581. package/build-module/components/post-excerpt/plugin.js +7 -4
  582. package/build-module/components/post-excerpt/plugin.js.map +1 -1
  583. package/build-module/components/post-featured-image/check.js +18 -6
  584. package/build-module/components/post-featured-image/check.js.map +1 -1
  585. package/build-module/components/post-featured-image/index.js +78 -49
  586. package/build-module/components/post-featured-image/index.js.map +1 -1
  587. package/build-module/components/post-featured-image/panel.js +22 -7
  588. package/build-module/components/post-featured-image/panel.js.map +1 -1
  589. package/build-module/components/post-format/check.js +14 -4
  590. package/build-module/components/post-format/check.js.map +1 -1
  591. package/build-module/components/post-format/index.js +39 -21
  592. package/build-module/components/post-format/index.js.map +1 -1
  593. package/build-module/components/post-format/panel.js +75 -7
  594. package/build-module/components/post-format/panel.js.map +1 -1
  595. package/build-module/components/post-last-edited-panel/index.js +7 -4
  596. package/build-module/components/post-last-edited-panel/index.js.map +1 -1
  597. package/build-module/components/post-last-revision/check.js +14 -4
  598. package/build-module/components/post-last-revision/check.js.map +1 -1
  599. package/build-module/components/post-last-revision/index.js +48 -17
  600. package/build-module/components/post-last-revision/index.js.map +1 -1
  601. package/build-module/components/post-last-revision/panel.js +13 -4
  602. package/build-module/components/post-last-revision/panel.js.map +1 -1
  603. package/build-module/components/post-locked-modal/index.js +60 -34
  604. package/build-module/components/post-locked-modal/index.js.map +1 -1
  605. package/build-module/components/post-panel-row/index.js +12 -8
  606. package/build-module/components/post-panel-row/index.js.map +1 -1
  607. package/build-module/components/post-panel-section/index.js +5 -4
  608. package/build-module/components/post-panel-section/index.js.map +1 -1
  609. package/build-module/components/post-pending-status/check.js +11 -0
  610. package/build-module/components/post-pending-status/check.js.map +1 -1
  611. package/build-module/components/post-pending-status/index.js +15 -7
  612. package/build-module/components/post-pending-status/index.js.map +1 -1
  613. package/build-module/components/post-pingbacks/index.js +13 -5
  614. package/build-module/components/post-pingbacks/index.js.map +1 -1
  615. package/build-module/components/post-preview-button/index.js +48 -21
  616. package/build-module/components/post-preview-button/index.js.map +1 -1
  617. package/build-module/components/post-publish-button/index.js +22 -11
  618. package/build-module/components/post-publish-button/index.js.map +1 -1
  619. package/build-module/components/post-publish-button/post-publish-button-or-toggle.js +2 -2
  620. package/build-module/components/post-publish-button/post-publish-button-or-toggle.js.map +1 -1
  621. package/build-module/components/post-publish-panel/index.js +49 -33
  622. package/build-module/components/post-publish-panel/index.js.map +1 -1
  623. package/build-module/components/post-publish-panel/maybe-category-panel.js +13 -9
  624. package/build-module/components/post-publish-panel/maybe-category-panel.js.map +1 -1
  625. package/build-module/components/post-publish-panel/maybe-post-format-panel.js +22 -15
  626. package/build-module/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
  627. package/build-module/components/post-publish-panel/maybe-tags-panel.js +14 -10
  628. package/build-module/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
  629. package/build-module/components/post-publish-panel/maybe-upload-media.js +30 -24
  630. package/build-module/components/post-publish-panel/maybe-upload-media.js.map +1 -1
  631. package/build-module/components/post-publish-panel/postpublish.js +57 -38
  632. package/build-module/components/post-publish-panel/postpublish.js.map +1 -1
  633. package/build-module/components/post-publish-panel/prepublish.js +43 -26
  634. package/build-module/components/post-publish-panel/prepublish.js.map +1 -1
  635. package/build-module/components/post-saved-state/index.js +8 -6
  636. package/build-module/components/post-saved-state/index.js.map +1 -1
  637. package/build-module/components/post-schedule/check.js +9 -0
  638. package/build-module/components/post-schedule/check.js.map +1 -1
  639. package/build-module/components/post-schedule/index.js +30 -6
  640. package/build-module/components/post-schedule/index.js.map +1 -1
  641. package/build-module/components/post-schedule/label.js +17 -0
  642. package/build-module/components/post-schedule/label.js.map +1 -1
  643. package/build-module/components/post-schedule/panel.js +43 -30
  644. package/build-module/components/post-schedule/panel.js.map +1 -1
  645. package/build-module/components/post-slug/check.js +5 -4
  646. package/build-module/components/post-slug/check.js.map +1 -1
  647. package/build-module/components/post-slug/index.js +5 -3
  648. package/build-module/components/post-slug/index.js.map +1 -1
  649. package/build-module/components/post-slug/panel.js +7 -4
  650. package/build-module/components/post-slug/panel.js.map +1 -1
  651. package/build-module/components/post-status/index.js +121 -120
  652. package/build-module/components/post-status/index.js.map +1 -1
  653. package/build-module/components/post-sticky/index.js +17 -9
  654. package/build-module/components/post-sticky/index.js.map +1 -1
  655. package/build-module/components/post-sticky/panel.js +6 -2
  656. package/build-module/components/post-sticky/panel.js.map +1 -1
  657. package/build-module/components/post-switch-to-draft-button/index.js +27 -21
  658. package/build-module/components/post-switch-to-draft-button/index.js.map +1 -1
  659. package/build-module/components/post-sync-status/index.js +8 -6
  660. package/build-module/components/post-sync-status/index.js.map +1 -1
  661. package/build-module/components/post-taxonomies/flat-term-selector.js +22 -18
  662. package/build-module/components/post-taxonomies/flat-term-selector.js.map +1 -1
  663. package/build-module/components/post-taxonomies/hierarchical-term-selector.js +71 -59
  664. package/build-module/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
  665. package/build-module/components/post-taxonomies/index.js +6 -6
  666. package/build-module/components/post-taxonomies/index.js.map +1 -1
  667. package/build-module/components/post-taxonomies/most-used-terms.js +20 -15
  668. package/build-module/components/post-taxonomies/most-used-terms.js.map +1 -1
  669. package/build-module/components/post-taxonomies/panel.js +15 -11
  670. package/build-module/components/post-taxonomies/panel.js.map +1 -1
  671. package/build-module/components/post-template/block-theme.js +44 -32
  672. package/build-module/components/post-template/block-theme.js.map +1 -1
  673. package/build-module/components/post-template/classic-theme.js +74 -50
  674. package/build-module/components/post-template/classic-theme.js.map +1 -1
  675. package/build-module/components/post-template/create-new-template-modal.js +34 -27
  676. package/build-module/components/post-template/create-new-template-modal.js.map +1 -1
  677. package/build-module/components/post-template/create-new-template.js +16 -11
  678. package/build-module/components/post-template/create-new-template.js.map +1 -1
  679. package/build-module/components/post-template/panel.js +17 -9
  680. package/build-module/components/post-template/panel.js.map +1 -1
  681. package/build-module/components/post-template/reset-default-template.js +5 -4
  682. package/build-module/components/post-template/reset-default-template.js.map +1 -1
  683. package/build-module/components/post-template/swap-template-button.js +22 -15
  684. package/build-module/components/post-template/swap-template-button.js.map +1 -1
  685. package/build-module/components/post-text-editor/index.js +30 -19
  686. package/build-module/components/post-text-editor/index.js.map +1 -1
  687. package/build-module/components/post-title/index.js +29 -18
  688. package/build-module/components/post-title/index.js.map +1 -1
  689. package/build-module/components/post-title/index.native.js +81 -57
  690. package/build-module/components/post-title/index.native.js.map +1 -1
  691. package/build-module/components/post-title/post-title-raw.js +11 -2
  692. package/build-module/components/post-title/post-title-raw.js.map +1 -1
  693. package/build-module/components/post-title/use-post-title-focus.js +8 -0
  694. package/build-module/components/post-title/use-post-title-focus.js.map +1 -1
  695. package/build-module/components/post-title/use-post-title.js +6 -0
  696. package/build-module/components/post-title/use-post-title.js.map +1 -1
  697. package/build-module/components/post-transform-panel/index.js +12 -12
  698. package/build-module/components/post-transform-panel/index.js.map +1 -1
  699. package/build-module/components/post-trash/index.js +21 -15
  700. package/build-module/components/post-trash/index.js.map +1 -1
  701. package/build-module/components/post-url/check.js +9 -0
  702. package/build-module/components/post-url/check.js.map +1 -1
  703. package/build-module/components/post-url/index.js +100 -72
  704. package/build-module/components/post-url/index.js.map +1 -1
  705. package/build-module/components/post-url/label.js +12 -0
  706. package/build-module/components/post-url/label.js.map +1 -1
  707. package/build-module/components/post-url/panel.js +59 -25
  708. package/build-module/components/post-url/panel.js.map +1 -1
  709. package/build-module/components/post-view-link/index.js +2 -2
  710. package/build-module/components/post-view-link/index.js.map +1 -1
  711. package/build-module/components/post-visibility/check.js +10 -0
  712. package/build-module/components/post-visibility/check.js.map +1 -1
  713. package/build-module/components/post-visibility/index.js +85 -67
  714. package/build-module/components/post-visibility/index.js.map +1 -1
  715. package/build-module/components/post-visibility/label.js +12 -0
  716. package/build-module/components/post-visibility/label.js.map +1 -1
  717. package/build-module/components/posts-per-page/index.js +103 -0
  718. package/build-module/components/posts-per-page/index.js.map +1 -0
  719. package/build-module/components/preferences-modal/enable-plugin-document-setting-panel.js +7 -5
  720. package/build-module/components/preferences-modal/enable-plugin-document-setting-panel.js.map +1 -1
  721. package/build-module/components/preferences-modal/index.js +126 -102
  722. package/build-module/components/preferences-modal/index.js.map +1 -1
  723. package/build-module/components/preview-dropdown/index.js +49 -31
  724. package/build-module/components/preview-dropdown/index.js.map +1 -1
  725. package/build-module/components/provider/disable-non-page-content-blocks.js +5 -3
  726. package/build-module/components/provider/disable-non-page-content-blocks.js.map +1 -1
  727. package/build-module/components/provider/index.js +96 -20
  728. package/build-module/components/provider/index.js.map +1 -1
  729. package/build-module/components/provider/index.native.js +58 -20
  730. package/build-module/components/provider/index.native.js.map +1 -1
  731. package/build-module/components/provider/use-block-editor-settings.js +7 -6
  732. package/build-module/components/provider/use-block-editor-settings.js.map +1 -1
  733. package/build-module/components/provider/with-registry-provider.js +33 -26
  734. package/build-module/components/provider/with-registry-provider.js.map +1 -1
  735. package/build-module/components/resizable-editor/index.js +89 -0
  736. package/build-module/components/resizable-editor/index.js.map +1 -0
  737. package/build-module/components/resizable-editor/resize-handle.js +54 -0
  738. package/build-module/components/resizable-editor/resize-handle.js.map +1 -0
  739. package/build-module/components/save-publish-panels/index.js +37 -26
  740. package/build-module/components/save-publish-panels/index.js.map +1 -1
  741. package/build-module/components/sidebar/header.js +18 -14
  742. package/build-module/components/sidebar/header.js.map +1 -1
  743. package/build-module/components/sidebar/index.js +36 -31
  744. package/build-module/components/sidebar/index.js.map +1 -1
  745. package/build-module/components/sidebar/post-summary.js +34 -25
  746. package/build-module/components/sidebar/post-summary.js.map +1 -1
  747. package/build-module/components/site-discussion/index.js +127 -0
  748. package/build-module/components/site-discussion/index.js.map +1 -0
  749. package/build-module/components/start-page-options/index.js +13 -11
  750. package/build-module/components/start-page-options/index.js.map +1 -1
  751. package/build-module/components/start-template-options/index.js +30 -23
  752. package/build-module/components/start-template-options/index.js.map +1 -1
  753. package/build-module/components/table-of-contents/index.js +4 -4
  754. package/build-module/components/table-of-contents/index.js.map +1 -1
  755. package/build-module/components/table-of-contents/panel.js +55 -35
  756. package/build-module/components/table-of-contents/panel.js.map +1 -1
  757. package/build-module/components/template-areas/index.js +37 -22
  758. package/build-module/components/template-areas/index.js.map +1 -1
  759. package/build-module/components/template-content-panel/index.js +7 -6
  760. package/build-module/components/template-content-panel/index.js.map +1 -1
  761. package/build-module/components/template-validation-notice/index.js +27 -21
  762. package/build-module/components/template-validation-notice/index.js.map +1 -1
  763. package/build-module/components/text-editor/index.js +66 -0
  764. package/build-module/components/text-editor/index.js.map +1 -0
  765. package/build-module/components/time-to-read/index.js +7 -6
  766. package/build-module/components/time-to-read/index.js.map +1 -1
  767. package/build-module/components/{editor-canvas → visual-editor}/edit-template-blocks-notification.js +5 -4
  768. package/build-module/components/visual-editor/edit-template-blocks-notification.js.map +1 -0
  769. package/build-module/components/{editor-canvas → visual-editor}/index.js +118 -75
  770. package/build-module/components/visual-editor/index.js.map +1 -0
  771. package/build-module/components/word-count/index.js +5 -4
  772. package/build-module/components/word-count/index.js.map +1 -1
  773. package/build-module/hooks/custom-sources-backwards-compatibility.js +2 -2
  774. package/build-module/hooks/custom-sources-backwards-compatibility.js.map +1 -1
  775. package/build-module/hooks/index.js +1 -0
  776. package/build-module/hooks/index.js.map +1 -1
  777. package/build-module/hooks/media-upload.js +7 -0
  778. package/build-module/hooks/media-upload.js.map +1 -0
  779. package/build-module/hooks/pattern-overrides.js +17 -11
  780. package/build-module/hooks/pattern-overrides.js.map +1 -1
  781. package/build-module/private-apis.js +12 -28
  782. package/build-module/private-apis.js.map +1 -1
  783. package/build-module/private-apis.native.js +2 -26
  784. package/build-module/private-apis.native.js.map +1 -1
  785. package/build-module/store/constants.js +3 -0
  786. package/build-module/store/constants.js.map +1 -1
  787. package/build-module/store/private-actions.js +10 -14
  788. package/build-module/store/private-actions.js.map +1 -1
  789. package/build-module/store/private-selectors.js +38 -1
  790. package/build-module/store/private-selectors.js.map +1 -1
  791. package/build-module/store/selectors.js +1 -1
  792. package/build-module/store/selectors.js.map +1 -1
  793. package/build-module/utils/set-nested-value.js +38 -0
  794. package/build-module/utils/set-nested-value.js.map +1 -0
  795. package/build-style/style-rtl.css +344 -129
  796. package/build-style/style.css +344 -129
  797. package/package.json +40 -36
  798. package/src/bindings/index.js +1 -4
  799. package/src/bindings/pattern-overrides.js +1 -1
  800. package/src/bindings/post-meta.js +46 -6
  801. package/src/components/block-settings-menu/content-only-settings-menu.js +26 -12
  802. package/src/components/blog-title/index.js +124 -0
  803. package/src/components/blog-title/style.scss +4 -0
  804. package/src/components/collapsible-block-toolbar/style.scss +3 -1
  805. package/src/components/commands/index.js +113 -3
  806. package/src/components/create-template-part-modal/index.js +205 -0
  807. package/src/components/create-template-part-modal/style.scss +69 -0
  808. package/src/components/create-template-part-modal/test/utils.js +60 -0
  809. package/src/components/create-template-part-modal/utils.js +67 -0
  810. package/src/components/document-bar/index.js +32 -21
  811. package/src/components/document-tools/index.js +2 -7
  812. package/src/components/editor/index.js +93 -0
  813. package/src/components/editor-help/help-get-support-button.native.js +1 -1
  814. package/src/components/editor-interface/content-slot-fill.js +15 -0
  815. package/src/components/editor-interface/index.js +230 -0
  816. package/src/components/editor-interface/style.scss +3 -0
  817. package/src/components/editor-notices/index.js +10 -0
  818. package/src/components/entities-saved-states/entity-record-item.js +45 -16
  819. package/src/components/entities-saved-states/style.scss +11 -5
  820. package/src/components/error-boundary/index.js +10 -0
  821. package/src/components/error-boundary/index.native.js +1 -1
  822. package/src/components/global-styles-provider/index.js +100 -8
  823. package/src/components/header/back-button.js +32 -0
  824. package/src/components/header/index.js +26 -18
  825. package/src/components/header/style.scss +6 -1
  826. package/src/components/inserter-sidebar/index.js +65 -32
  827. package/src/components/inserter-sidebar/style.scss +0 -13
  828. package/src/components/local-autosave-monitor/index.js +12 -0
  829. package/src/components/media-categories/index.js +1 -3
  830. package/src/components/page-attributes/order.js +79 -3
  831. package/src/components/page-attributes/panel.js +10 -26
  832. package/src/components/page-attributes/parent.js +98 -2
  833. package/src/components/page-attributes/style.scss +19 -0
  834. package/src/components/pattern-duplicate-modal/index.js +50 -0
  835. package/src/components/pattern-rename-modal/index.js +44 -0
  836. package/src/components/post-actions/actions.js +308 -261
  837. package/src/components/post-actions/export-pattern-action.js +74 -0
  838. package/src/components/post-actions/export-pattern-action.native.js +4 -0
  839. package/src/components/post-actions/index.js +16 -5
  840. package/src/components/post-author/combobox.js +1 -0
  841. package/src/components/post-author/hook.js +1 -1
  842. package/src/components/post-author/panel.js +63 -2
  843. package/src/components/post-author/select.js +1 -0
  844. package/src/components/post-author/style.scss +6 -0
  845. package/src/components/post-card-panel/index.js +69 -22
  846. package/src/components/post-card-panel/style.scss +23 -1
  847. package/src/components/post-comments/index.js +5 -0
  848. package/src/components/post-discussion/panel.js +9 -2
  849. package/src/components/post-discussion/style.scss +1 -3
  850. package/src/components/post-excerpt/panel.js +45 -48
  851. package/src/components/post-excerpt/style.scss +0 -17
  852. package/src/components/post-featured-image/check.js +9 -0
  853. package/src/components/post-featured-image/index.js +15 -0
  854. package/src/components/post-featured-image/panel.js +9 -0
  855. package/src/components/post-format/check.js +8 -0
  856. package/src/components/post-format/index.js +15 -4
  857. package/src/components/post-format/panel.js +71 -6
  858. package/src/components/post-format/style.scss +10 -4
  859. package/src/components/post-last-revision/check.js +8 -0
  860. package/src/components/post-last-revision/index.js +31 -3
  861. package/src/components/post-last-revision/panel.js +5 -0
  862. package/src/components/post-last-revision/style.scss +4 -0
  863. package/src/components/post-locked-modal/index.js +6 -0
  864. package/src/components/post-panel-row/style.scss +16 -0
  865. package/src/components/post-pending-status/check.js +10 -0
  866. package/src/components/post-pending-status/index.js +5 -0
  867. package/src/components/post-pingbacks/index.js +6 -0
  868. package/src/components/post-preview-button/index.js +16 -0
  869. package/src/components/post-preview-button/test/index.js +10 -2
  870. package/src/components/post-publish-button/index.js +17 -4
  871. package/src/components/post-publish-panel/index.js +2 -0
  872. package/src/components/post-publish-panel/maybe-tags-panel.js +1 -1
  873. package/src/components/post-publish-panel/style.scss +28 -36
  874. package/src/components/post-publish-panel/test/__snapshots__/index.js.snap +3 -3
  875. package/src/components/post-schedule/check.js +8 -0
  876. package/src/components/post-schedule/index.js +30 -3
  877. package/src/components/post-schedule/label.js +15 -0
  878. package/src/components/post-schedule/panel.js +9 -1
  879. package/src/components/post-schedule/style.scss +0 -11
  880. package/src/components/post-status/index.js +30 -52
  881. package/src/components/post-status/style.scss +4 -34
  882. package/src/components/post-sticky/index.js +12 -7
  883. package/src/components/post-sticky/style.scss +3 -0
  884. package/src/components/post-sync-status/index.js +2 -8
  885. package/src/components/post-template/block-theme.js +1 -0
  886. package/src/components/post-template/classic-theme.js +15 -0
  887. package/src/components/post-template/panel.js +5 -0
  888. package/src/components/post-template/style.scss +0 -8
  889. package/src/components/post-text-editor/index.js +5 -0
  890. package/src/components/post-title/index.js +8 -1
  891. package/src/components/post-title/index.native.js +70 -35
  892. package/src/components/post-title/post-title-raw.js +8 -0
  893. package/src/components/post-title/use-post-title-focus.js +7 -0
  894. package/src/components/post-title/use-post-title.js +5 -0
  895. package/src/components/post-transform-panel/index.js +2 -10
  896. package/src/components/post-url/check.js +8 -0
  897. package/src/components/post-url/index.js +41 -24
  898. package/src/components/post-url/label.js +10 -0
  899. package/src/components/post-url/panel.js +18 -5
  900. package/src/components/post-url/style.scss +0 -9
  901. package/src/components/post-visibility/check.js +9 -0
  902. package/src/components/post-visibility/index.js +7 -0
  903. package/src/components/post-visibility/label.js +10 -0
  904. package/src/components/posts-per-page/index.js +101 -0
  905. package/src/components/posts-per-page/style.scss +4 -0
  906. package/src/components/provider/disable-non-page-content-blocks.js +9 -4
  907. package/src/components/provider/index.js +68 -0
  908. package/src/components/provider/index.native.js +43 -2
  909. package/src/components/provider/use-block-editor-settings.js +4 -6
  910. package/src/components/provider/with-registry-provider.js +32 -31
  911. package/src/components/resizable-editor/index.js +90 -0
  912. package/src/components/resizable-editor/resize-handle.js +62 -0
  913. package/src/components/resizable-editor/style.scss +53 -0
  914. package/src/components/save-publish-panels/index.js +10 -2
  915. package/src/components/save-publish-panels/style.scss +0 -8
  916. package/src/components/sidebar/index.js +0 -4
  917. package/src/components/sidebar/post-summary.js +16 -21
  918. package/src/components/sidebar/style.scss +1 -1
  919. package/src/components/site-discussion/index.js +138 -0
  920. package/src/components/site-discussion/style.scss +19 -0
  921. package/src/components/start-template-options/style.scss +0 -8
  922. package/src/components/template-areas/index.js +15 -6
  923. package/src/components/text-editor/index.js +57 -0
  924. package/src/components/text-editor/style.scss +71 -0
  925. package/src/components/{editor-canvas → visual-editor}/index.js +177 -108
  926. package/src/components/visual-editor/style.scss +37 -0
  927. package/src/hooks/index.js +1 -0
  928. package/src/hooks/media-upload.js +11 -0
  929. package/src/private-apis.js +12 -28
  930. package/src/private-apis.native.js +2 -26
  931. package/src/store/constants.js +7 -0
  932. package/src/store/private-actions.js +22 -50
  933. package/src/store/private-selectors.js +45 -0
  934. package/src/store/selectors.js +1 -1
  935. package/src/style.scss +10 -0
  936. package/src/utils/set-nested-value.js +39 -0
  937. package/build/components/editor-canvas/edit-template-blocks-notification.js.map +0 -1
  938. package/build/components/editor-canvas/index.js.map +0 -1
  939. package/build/components/post-trash/panel.js +0 -18
  940. package/build/components/post-trash/panel.js.map +0 -1
  941. package/build-module/components/editor-canvas/edit-template-blocks-notification.js.map +0 -1
  942. package/build-module/components/editor-canvas/index.js.map +0 -1
  943. package/build-module/components/post-trash/panel.js +0 -10
  944. package/build-module/components/post-trash/panel.js.map +0 -1
  945. package/src/components/post-trash/panel.js +0 -13
  946. package/src/components/provider/README.md +0 -37
  947. /package/src/components/{editor-canvas → visual-editor}/edit-template-blocks-notification.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_components","_i18n","_keyboardShortcuts","_data","_interface","_config","_shortcut","_dynamicShortcut","KEYBOARD_SHORTCUT_HELP_MODAL_NAME","ShortcutList","shortcuts","_react","createElement","className","role","map","shortcut","index","key","default","name","ShortcutSection","title","clsx","ShortcutCategorySection","categoryName","additionalShortcuts","categoryShortcuts","useSelect","select","keyboardShortcutsStore","getCategoryShortcuts","concat","KeyboardShortcutHelpModal","isModalActive","interfaceStore","openModal","closeModal","useDispatch","toggleModal","useShortcut","Modal","__","closeButtonLabel","onRequestClose","keyCombination","character","description","ariaLabel","textFormattingShortcuts","_default","exports"],"sources":["@wordpress/editor/src/components/keyboard-shortcut-help-modal/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { Modal } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tuseShortcut,\n\tstore as keyboardShortcutsStore,\n} from '@wordpress/keyboard-shortcuts';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { store as interfaceStore } from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport { textFormattingShortcuts } from './config';\nimport Shortcut from './shortcut';\nimport DynamicShortcut from './dynamic-shortcut';\n\nconst KEYBOARD_SHORTCUT_HELP_MODAL_NAME = 'editor/keyboard-shortcut-help';\n\nconst ShortcutList = ( { shortcuts } ) => (\n\t/*\n\t * Disable reason: The `list` ARIA role is redundant but\n\t * Safari+VoiceOver won't announce the list otherwise.\n\t */\n\t/* eslint-disable jsx-a11y/no-redundant-roles */\n\t<ul\n\t\tclassName=\"editor-keyboard-shortcut-help-modal__shortcut-list\"\n\t\trole=\"list\"\n\t>\n\t\t{ shortcuts.map( ( shortcut, index ) => (\n\t\t\t<li\n\t\t\t\tclassName=\"editor-keyboard-shortcut-help-modal__shortcut\"\n\t\t\t\tkey={ index }\n\t\t\t>\n\t\t\t\t{ typeof shortcut === 'string' ? (\n\t\t\t\t\t<DynamicShortcut name={ shortcut } />\n\t\t\t\t) : (\n\t\t\t\t\t<Shortcut { ...shortcut } />\n\t\t\t\t) }\n\t\t\t</li>\n\t\t) ) }\n\t</ul>\n\t/* eslint-enable jsx-a11y/no-redundant-roles */\n);\n\nconst ShortcutSection = ( { title, shortcuts, className } ) => (\n\t<section\n\t\tclassName={ clsx(\n\t\t\t'editor-keyboard-shortcut-help-modal__section',\n\t\t\tclassName\n\t\t) }\n\t>\n\t\t{ !! title && (\n\t\t\t<h2 className=\"editor-keyboard-shortcut-help-modal__section-title\">\n\t\t\t\t{ title }\n\t\t\t</h2>\n\t\t) }\n\t\t<ShortcutList shortcuts={ shortcuts } />\n\t</section>\n);\n\nconst ShortcutCategorySection = ( {\n\ttitle,\n\tcategoryName,\n\tadditionalShortcuts = [],\n} ) => {\n\tconst categoryShortcuts = useSelect(\n\t\t( select ) => {\n\t\t\treturn select( keyboardShortcutsStore ).getCategoryShortcuts(\n\t\t\t\tcategoryName\n\t\t\t);\n\t\t},\n\t\t[ categoryName ]\n\t);\n\n\treturn (\n\t\t<ShortcutSection\n\t\t\ttitle={ title }\n\t\t\tshortcuts={ categoryShortcuts.concat( additionalShortcuts ) }\n\t\t/>\n\t);\n};\n\nfunction KeyboardShortcutHelpModal() {\n\tconst isModalActive = useSelect(\n\t\t( select ) =>\n\t\t\tselect( interfaceStore ).isModalActive(\n\t\t\t\tKEYBOARD_SHORTCUT_HELP_MODAL_NAME\n\t\t\t),\n\t\t[]\n\t);\n\tconst { openModal, closeModal } = useDispatch( interfaceStore );\n\tconst toggleModal = () => {\n\t\tif ( isModalActive ) {\n\t\t\tcloseModal();\n\t\t} else {\n\t\t\topenModal( KEYBOARD_SHORTCUT_HELP_MODAL_NAME );\n\t\t}\n\t};\n\tuseShortcut( 'core/editor/keyboard-shortcuts', toggleModal );\n\n\tif ( ! isModalActive ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Modal\n\t\t\tclassName=\"editor-keyboard-shortcut-help-modal\"\n\t\t\ttitle={ __( 'Keyboard shortcuts' ) }\n\t\t\tcloseButtonLabel={ __( 'Close' ) }\n\t\t\tonRequestClose={ toggleModal }\n\t\t>\n\t\t\t<ShortcutSection\n\t\t\t\tclassName=\"editor-keyboard-shortcut-help-modal__main-shortcuts\"\n\t\t\t\tshortcuts={ [ 'core/editor/keyboard-shortcuts' ] }\n\t\t\t/>\n\t\t\t<ShortcutCategorySection\n\t\t\t\ttitle={ __( 'Global shortcuts' ) }\n\t\t\t\tcategoryName=\"global\"\n\t\t\t/>\n\n\t\t\t<ShortcutCategorySection\n\t\t\t\ttitle={ __( 'Selection shortcuts' ) }\n\t\t\t\tcategoryName=\"selection\"\n\t\t\t/>\n\n\t\t\t<ShortcutCategorySection\n\t\t\t\ttitle={ __( 'Block shortcuts' ) }\n\t\t\t\tcategoryName=\"block\"\n\t\t\t\tadditionalShortcuts={ [\n\t\t\t\t\t{\n\t\t\t\t\t\tkeyCombination: { character: '/' },\n\t\t\t\t\t\tdescription: __(\n\t\t\t\t\t\t\t'Change the block type after adding a new paragraph.'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t/* translators: The forward-slash character. e.g. '/'. */\n\t\t\t\t\t\tariaLabel: __( 'Forward-slash' ),\n\t\t\t\t\t},\n\t\t\t\t] }\n\t\t\t/>\n\t\t\t<ShortcutSection\n\t\t\t\ttitle={ __( 'Text formatting' ) }\n\t\t\t\tshortcuts={ textFormattingShortcuts }\n\t\t\t/>\n\t\t\t<ShortcutCategorySection\n\t\t\t\ttitle={ __( 'List View shortcuts' ) }\n\t\t\t\tcategoryName=\"list-view\"\n\t\t\t/>\n\t\t</Modal>\n\t);\n}\n\nexport default KeyboardShortcutHelpModal;\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,kBAAA,GAAAH,OAAA;AAIA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AAKA,IAAAM,OAAA,GAAAN,OAAA;AACA,IAAAO,SAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,gBAAA,GAAAT,sBAAA,CAAAC,OAAA;AAtBA;AACA;AACA;;AAGA;AACA;AACA;;AAUA;AACA;AACA;;AAKA,MAAMS,iCAAiC,GAAG,+BAA+B;AAEzE,MAAMC,YAAY,GAA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W,CACxB,CAAC,EAEF,IAAAd,MAAA,CAAAC,aAAA,EAACY,uBAAuB;IACvBF,KAAK,EAAG,IAAAoB,QAAE,EAAE,iBAAkB,CAAG;IACjCjB,YAAY,EAAC,OAAO;IACpBC,mBAAmB,EAAG,CACrB;MACCmB,cAAc,EAAE;QAAEC,SAAS,EAAE;MAAI,CAAC;MAClCC,WAAW,EAAE,IAAAL,QAAE,EACd,qDACD,CAAC;MACD;MACAM,SAAS,EAAE,IAAAN,QAAE,EAAE,eAAgB;IAChC,CAAC;EACC,CACH,CAAC,EACF,IAAA/B,MAAA,CAAAC,aAAA,EAACS,eAAe;IACfC,KAAK,EAAG,IAAAoB,QAAE,EAAE,iBAAkB,CAAG;IACjChC,SAAS,EAAGuC;EAAyB,CACrC,CAAC,EACF,IAAAtC,MAAA,CAAAC,aAAA,EAACY,uBAAuB;IACvBF,KAAK,EAAG,IAAAoB,QAAE,EAAE,qBAAsB,CAAG;IACrCjB,YAAY,EAAC;EAAW,CACxB,CACK,CAAC;AAEV;AAAC,IAAAyB,QAAA,GAAAC,OAAA,CAAAhC,OAAA,GAEcc,yBAAyB","ignoreList":[]}
1
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_components","_i18n","_keyboardShortcuts","_data","_interface","_config","_shortcut","_dynamicShortcut","_jsxRuntime","KEYBOARD_SHORTCUT_HELP_MODAL_NAME","ShortcutList","shortcuts","jsx","className","role","children","map","shortcut","index","default","name","ShortcutSection","title","jsxs","clsx","ShortcutCategorySection","categoryName","additionalShortcuts","categoryShortcuts","useSelect","select","keyboardShortcutsStore","getCategoryShortcuts","concat","KeyboardShortcutHelpModal","isModalActive","interfaceStore","openModal","closeModal","useDispatch","toggleModal","useShortcut","Modal","__","closeButtonLabel","onRequestClose","keyCombination","character","description","ariaLabel","textFormattingShortcuts","_default","exports"],"sources":["@wordpress/editor/src/components/keyboard-shortcut-help-modal/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { Modal } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tuseShortcut,\n\tstore as keyboardShortcutsStore,\n} from '@wordpress/keyboard-shortcuts';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { store as interfaceStore } from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport { textFormattingShortcuts } from './config';\nimport Shortcut from './shortcut';\nimport DynamicShortcut from './dynamic-shortcut';\n\nconst KEYBOARD_SHORTCUT_HELP_MODAL_NAME = 'editor/keyboard-shortcut-help';\n\nconst ShortcutList = ( { shortcuts } ) => (\n\t/*\n\t * Disable reason: The `list` ARIA role is redundant but\n\t * Safari+VoiceOver won't announce the list otherwise.\n\t */\n\t/* eslint-disable jsx-a11y/no-redundant-roles */\n\t<ul\n\t\tclassName=\"editor-keyboard-shortcut-help-modal__shortcut-list\"\n\t\trole=\"list\"\n\t>\n\t\t{ shortcuts.map( ( shortcut, index ) => (\n\t\t\t<li\n\t\t\t\tclassName=\"editor-keyboard-shortcut-help-modal__shortcut\"\n\t\t\t\tkey={ index }\n\t\t\t>\n\t\t\t\t{ typeof shortcut === 'string' ? (\n\t\t\t\t\t<DynamicShortcut name={ shortcut } />\n\t\t\t\t) : (\n\t\t\t\t\t<Shortcut { ...shortcut } />\n\t\t\t\t) }\n\t\t\t</li>\n\t\t) ) }\n\t</ul>\n\t/* eslint-enable jsx-a11y/no-redundant-roles */\n);\n\nconst ShortcutSection = ( { title, shortcuts, className } ) => (\n\t<section\n\t\tclassName={ clsx(\n\t\t\t'editor-keyboard-shortcut-help-modal__section',\n\t\t\tclassName\n\t\t) }\n\t>\n\t\t{ !! title && (\n\t\t\t<h2 className=\"editor-keyboard-shortcut-help-modal__section-title\">\n\t\t\t\t{ title }\n\t\t\t</h2>\n\t\t) }\n\t\t<ShortcutList shortcuts={ shortcuts } />\n\t</section>\n);\n\nconst ShortcutCategorySection = ( {\n\ttitle,\n\tcategoryName,\n\tadditionalShortcuts = [],\n} ) => {\n\tconst categoryShortcuts = useSelect(\n\t\t( select ) => {\n\t\t\treturn select( keyboardShortcutsStore ).getCategoryShortcuts(\n\t\t\t\tcategoryName\n\t\t\t);\n\t\t},\n\t\t[ categoryName ]\n\t);\n\n\treturn (\n\t\t<ShortcutSection\n\t\t\ttitle={ title }\n\t\t\tshortcuts={ categoryShortcuts.concat( additionalShortcuts ) }\n\t\t/>\n\t);\n};\n\nfunction KeyboardShortcutHelpModal() {\n\tconst isModalActive = useSelect(\n\t\t( select ) =>\n\t\t\tselect( interfaceStore ).isModalActive(\n\t\t\t\tKEYBOARD_SHORTCUT_HELP_MODAL_NAME\n\t\t\t),\n\t\t[]\n\t);\n\tconst { openModal, closeModal } = useDispatch( interfaceStore );\n\tconst toggleModal = () => {\n\t\tif ( isModalActive ) {\n\t\t\tcloseModal();\n\t\t} else {\n\t\t\topenModal( KEYBOARD_SHORTCUT_HELP_MODAL_NAME );\n\t\t}\n\t};\n\tuseShortcut( 'core/editor/keyboard-shortcuts', toggleModal );\n\n\tif ( ! isModalActive ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Modal\n\t\t\tclassName=\"editor-keyboard-shortcut-help-modal\"\n\t\t\ttitle={ __( 'Keyboard shortcuts' ) }\n\t\t\tcloseButtonLabel={ __( 'Close' ) }\n\t\t\tonRequestClose={ toggleModal }\n\t\t>\n\t\t\t<ShortcutSection\n\t\t\t\tclassName=\"editor-keyboard-shortcut-help-modal__main-shortcuts\"\n\t\t\t\tshortcuts={ [ 'core/editor/keyboard-shortcuts' ] }\n\t\t\t/>\n\t\t\t<ShortcutCategorySection\n\t\t\t\ttitle={ __( 'Global shortcuts' ) }\n\t\t\t\tcategoryName=\"global\"\n\t\t\t/>\n\n\t\t\t<ShortcutCategorySection\n\t\t\t\ttitle={ __( 'Selection shortcuts' ) }\n\t\t\t\tcategoryName=\"selection\"\n\t\t\t/>\n\n\t\t\t<ShortcutCategorySection\n\t\t\t\ttitle={ __( 'Block shortcuts' ) }\n\t\t\t\tcategoryName=\"block\"\n\t\t\t\tadditionalShortcuts={ [\n\t\t\t\t\t{\n\t\t\t\t\t\tkeyCombination: { character: '/' },\n\t\t\t\t\t\tdescription: __(\n\t\t\t\t\t\t\t'Change the block type after adding a new paragraph.'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t/* translators: The forward-slash character. e.g. '/'. */\n\t\t\t\t\t\tariaLabel: __( 'Forward-slash' ),\n\t\t\t\t\t},\n\t\t\t\t] }\n\t\t\t/>\n\t\t\t<ShortcutSection\n\t\t\t\ttitle={ __( 'Text formatting' ) }\n\t\t\t\tshortcuts={ textFormattingShortcuts }\n\t\t\t/>\n\t\t\t<ShortcutCategorySection\n\t\t\t\ttitle={ __( 'List View shortcuts' ) }\n\t\t\t\tcategoryName=\"list-view\"\n\t\t\t/>\n\t\t</Modal>\n\t);\n}\n\nexport default KeyboardShortcutHelpModal;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,kBAAA,GAAAH,OAAA;AAIA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AAKA,IAAAM,OAAA,GAAAN,OAAA;AACA,IAAAO,SAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,gBAAA,GAAAT,sBAAA,CAAAC,OAAA;AAAiD,IAAAS,WAAA,GAAAT,OAAA;AAtBjD;AACA;AACA;;AAGA;AACA;AACA;;AAUA;AACA;AACA;;AAKA,MAAMU,iCAAiC,GAAG,+BAA+B;AAEzE,MAAMC,YAAY,GAAGA,CAAE;EAAEC;AAAU,CAAC;AAAA;AACnC;AACD;AACA;AACA;AACC;AACA,IAAAH,WAAA,CAAAI,GAAA;EACCC,SAAS,EAAC,oDAAoD;EAC9DC,IAAI,EAAC,MAAM;EAAAC,QAAA,EAETJ,SAAS,CAACK,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AAAqB,QAAE,EAAE,iBAAkB,CAAG;MACjCjB,YAAY,EAAC,OAAO;MACpBC,mBAAmB,EAAG,CACrB;QACCmB,cAAc,EAAE;UAAEC,SAAS,EAAE;QAAI,CAAC;QAClCC,WAAW,EAAE,IAAAL,QAAE,EACd,qDACD,CAAC;QACD;QACAM,SAAS,EAAE,IAAAN,QAAE,EAAE,eAAgB;MAChC,CAAC;IACC,CACH,CAAC,eACF,IAAAnC,WAAA,CAAAI,GAAA,EAACS,eAAe;MACfC,KAAK,EAAG,IAAAqB,QAAE,EAAE,iBAAkB,CAAG;MACjChC,SAAS,EAAGuC;IAAyB,CACrC,CAAC,eACF,IAAA1C,WAAA,CAAAI,GAAA,EAACa,uBAAuB;MACvBH,KAAK,EAAG,IAAAqB,QAAE,EAAE,qBAAsB,CAAG;MACrCjB,YAAY,EAAC;IAAW,CACxB,CAAC;EAAA,CACI,CAAC;AAEV;AAAC,IAAAyB,QAAA,GAAAC,OAAA,CAAAjC,OAAA,GAEce,yBAAyB","ignoreList":[]}
@@ -4,9 +4,9 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- var _react = require("react");
8
7
  var _element = require("@wordpress/element");
9
8
  var _keycodes = require("@wordpress/keycodes");
9
+ var _jsxRuntime = require("react/jsx-runtime");
10
10
  /**
11
11
  * WordPress dependencies
12
12
  */
@@ -17,20 +17,21 @@ function KeyCombination({
17
17
  }) {
18
18
  const shortcut = keyCombination.modifier ? _keycodes.displayShortcutList[keyCombination.modifier](keyCombination.character) : keyCombination.character;
19
19
  const ariaLabel = keyCombination.modifier ? _keycodes.shortcutAriaLabel[keyCombination.modifier](keyCombination.character) : keyCombination.character;
20
- return (0, _react.createElement)("kbd", {
20
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("kbd", {
21
21
  className: "editor-keyboard-shortcut-help-modal__shortcut-key-combination",
22
- "aria-label": forceAriaLabel || ariaLabel
23
- }, (Array.isArray(shortcut) ? shortcut : [shortcut]).map((character, index) => {
24
- if (character === '+') {
25
- return (0, _react.createElement)(_element.Fragment, {
26
- key: index
27
- }, character);
28
- }
29
- return (0, _react.createElement)("kbd", {
30
- key: index,
31
- className: "editor-keyboard-shortcut-help-modal__shortcut-key"
32
- }, character);
33
- }));
22
+ "aria-label": forceAriaLabel || ariaLabel,
23
+ children: (Array.isArray(shortcut) ? shortcut : [shortcut]).map((character, index) => {
24
+ if (character === '+') {
25
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_element.Fragment, {
26
+ children: character
27
+ }, index);
28
+ }
29
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("kbd", {
30
+ className: "editor-keyboard-shortcut-help-modal__shortcut-key",
31
+ children: character
32
+ }, index);
33
+ })
34
+ });
34
35
  }
35
36
  function Shortcut({
36
37
  description,
@@ -38,18 +39,21 @@ function Shortcut({
38
39
  aliases = [],
39
40
  ariaLabel
40
41
  }) {
41
- return (0, _react.createElement)(_element.Fragment, null, (0, _react.createElement)("div", {
42
- className: "editor-keyboard-shortcut-help-modal__shortcut-description"
43
- }, description), (0, _react.createElement)("div", {
44
- className: "editor-keyboard-shortcut-help-modal__shortcut-term"
45
- }, (0, _react.createElement)(KeyCombination, {
46
- keyCombination: keyCombination,
47
- forceAriaLabel: ariaLabel
48
- }), aliases.map((alias, index) => (0, _react.createElement)(KeyCombination, {
49
- keyCombination: alias,
50
- forceAriaLabel: ariaLabel,
51
- key: index
52
- }))));
42
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
43
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
44
+ className: "editor-keyboard-shortcut-help-modal__shortcut-description",
45
+ children: description
46
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
47
+ className: "editor-keyboard-shortcut-help-modal__shortcut-term",
48
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(KeyCombination, {
49
+ keyCombination: keyCombination,
50
+ forceAriaLabel: ariaLabel
51
+ }), aliases.map((alias, index) => /*#__PURE__*/(0, _jsxRuntime.jsx)(KeyCombination, {
52
+ keyCombination: alias,
53
+ forceAriaLabel: ariaLabel
54
+ }, index))]
55
+ })]
56
+ });
53
57
  }
54
58
  var _default = exports.default = Shortcut;
55
59
  //# sourceMappingURL=shortcut.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_keycodes","KeyCombination","keyCombination","forceAriaLabel","shortcut","modifier","displayShortcutList","character","ariaLabel","shortcutAriaLabel","_react","createElement","className","Array","isArray","map","index","Fragment","key","Shortcut","description","aliases","alias","_default","exports","default"],"sources":["@wordpress/editor/src/components/keyboard-shortcut-help-modal/shortcut.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Fragment } from '@wordpress/element';\nimport { displayShortcutList, shortcutAriaLabel } from '@wordpress/keycodes';\n\nfunction KeyCombination( { keyCombination, forceAriaLabel } ) {\n\tconst shortcut = keyCombination.modifier\n\t\t? displayShortcutList[ keyCombination.modifier ](\n\t\t\t\tkeyCombination.character\n\t\t )\n\t\t: keyCombination.character;\n\tconst ariaLabel = keyCombination.modifier\n\t\t? shortcutAriaLabel[ keyCombination.modifier ](\n\t\t\t\tkeyCombination.character\n\t\t )\n\t\t: keyCombination.character;\n\n\treturn (\n\t\t<kbd\n\t\t\tclassName=\"editor-keyboard-shortcut-help-modal__shortcut-key-combination\"\n\t\t\taria-label={ forceAriaLabel || ariaLabel }\n\t\t>\n\t\t\t{ ( Array.isArray( shortcut ) ? shortcut : [ shortcut ] ).map(\n\t\t\t\t( character, index ) => {\n\t\t\t\t\tif ( character === '+' ) {\n\t\t\t\t\t\treturn <Fragment key={ index }>{ character }</Fragment>;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<kbd\n\t\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\t\tclassName=\"editor-keyboard-shortcut-help-modal__shortcut-key\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ character }\n\t\t\t\t\t\t</kbd>\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t) }\n\t\t</kbd>\n\t);\n}\n\nfunction Shortcut( { description, keyCombination, aliases = [], ariaLabel } ) {\n\treturn (\n\t\t<>\n\t\t\t<div className=\"editor-keyboard-shortcut-help-modal__shortcut-description\">\n\t\t\t\t{ description }\n\t\t\t</div>\n\t\t\t<div className=\"editor-keyboard-shortcut-help-modal__shortcut-term\">\n\t\t\t\t<KeyCombination\n\t\t\t\t\tkeyCombination={ keyCombination }\n\t\t\t\t\tforceAriaLabel={ ariaLabel }\n\t\t\t\t/>\n\t\t\t\t{ aliases.map( ( alias, index ) => (\n\t\t\t\t\t<KeyCombination\n\t\t\t\t\t\tkeyCombination={ alias }\n\t\t\t\t\t\tforceAriaLabel={ ariaLabel }\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default Shortcut;\n"],"mappings":";;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AAJA;AACA;AACA;;AAIA,SAASE,cAAcA,CAAE;EAAEC,cAAc;EAAEC;AAAe,CAAC,EAAG;EAC7D,MAAMC,QAAQ,GAAGF,cAAc,CAACG,QAAQ,GACrCC,6BAAmB,CAAEJ,cAAc,CAACG,QAAQ,CAAE,CAC9CH,cAAc,CAACK,SACf,CAAC,GACDL,cAAc,CAACK,SAAS;EAC3B,MAAMC,SAAS,GAAGN,cAAc,CAACG,QAAQ,GACtCI,2BAAiB,CAAEP,cAAc,CAACG,QAAQ,CAAE,CAC5CH,cAAc,CAACK,SACf,CAAC,GACDL,cAAc,CAACK,SAAS;EAE3B,OACC,IAAAG,MAAA,CAAAC,aAAA;IACCC,SAAS,EAAC,+DAA+D;IACzE,cAAaT,cAAc,IAAIK;EAAW,GAExC,CAAEK,KAAK,CAACC,OAAO,CAAEV,QAAS,CAAC,GAAGA,QAAQ,GAAG,CAAEA,QAAQ,CAAE,EAAGW,GAAG,CAC5D,CAAER,SAAS,EAAES,KAAK,KAAM;IACvB,IAAKT,SAAS,KAAK,GAAG,EAAG;MACxB,OAAO,IAAAG,MAAA,CAAAC,aAAA,EAACb,QAAA,CAAAmB,QAAQ;QAACC,GAAG,EAAGF;MAAO,GAAGT,SAAqB,CAAC;IACxD;IAEA,OACC,IAAAG,MAAA,CAAAC,aAAA;MACCO,GAAG,EAAGF,KAAO;MACbJ,SAAS,EAAC;IAAmD,GAE3DL,SACE,CAAC;EAER,CACD,CACI,CAAC;AAER;AAEA,SAASY,QAAQA,CAAE;EAAEC,WAAW;EAAElB,cAAc;EAAEmB,OAAO,GAAG,EAAE;EAAEb;AAAU,CAAC,EAAG;EAC7E,OACC,IAAAE,MAAA,CAAAC,aAAA,EAAAb,QAAA,CAAAmB,QAAA,QACC,IAAAP,MAAA,CAAAC,aAAA;IAAKC,SAAS,EAAC;EAA2D,GACvEQ,WACE,CAAC,EACN,IAAAV,MAAA,CAAAC,aAAA;IAAKC,SAAS,EAAC;EAAoD,GAClE,IAAAF,MAAA,CAAAC,aAAA,EAACV,cAAc;IACdC,cAAc,EAAGA,cAAgB;IACjCC,cAAc,EAAGK;EAAW,CAC5B,CAAC,EACAa,OAAO,CAACN,GAAG,CAAE,CAAEO,KAAK,EAAEN,KAAK,KAC5B,IAAAN,MAAA,CAAAC,aAAA,EAACV,cAAc;IACdC,cAAc,EAAGoB,KAAO;IACxBnB,cAAc,EAAGK,SAAW;IAC5BU,GAAG,EAAGF;EAAO,CACb,CACA,CACE,CACJ,CAAC;AAEL;AAAC,IAAAO,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEcN,QAAQ","ignoreList":[]}
1
+ {"version":3,"names":["_element","require","_keycodes","_jsxRuntime","KeyCombination","keyCombination","forceAriaLabel","shortcut","modifier","displayShortcutList","character","ariaLabel","shortcutAriaLabel","jsx","className","children","Array","isArray","map","index","Fragment","Shortcut","description","aliases","jsxs","alias","_default","exports","default"],"sources":["@wordpress/editor/src/components/keyboard-shortcut-help-modal/shortcut.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Fragment } from '@wordpress/element';\nimport { displayShortcutList, shortcutAriaLabel } from '@wordpress/keycodes';\n\nfunction KeyCombination( { keyCombination, forceAriaLabel } ) {\n\tconst shortcut = keyCombination.modifier\n\t\t? displayShortcutList[ keyCombination.modifier ](\n\t\t\t\tkeyCombination.character\n\t\t )\n\t\t: keyCombination.character;\n\tconst ariaLabel = keyCombination.modifier\n\t\t? shortcutAriaLabel[ keyCombination.modifier ](\n\t\t\t\tkeyCombination.character\n\t\t )\n\t\t: keyCombination.character;\n\n\treturn (\n\t\t<kbd\n\t\t\tclassName=\"editor-keyboard-shortcut-help-modal__shortcut-key-combination\"\n\t\t\taria-label={ forceAriaLabel || ariaLabel }\n\t\t>\n\t\t\t{ ( Array.isArray( shortcut ) ? shortcut : [ shortcut ] ).map(\n\t\t\t\t( character, index ) => {\n\t\t\t\t\tif ( character === '+' ) {\n\t\t\t\t\t\treturn <Fragment key={ index }>{ character }</Fragment>;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<kbd\n\t\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\t\tclassName=\"editor-keyboard-shortcut-help-modal__shortcut-key\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ character }\n\t\t\t\t\t\t</kbd>\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t) }\n\t\t</kbd>\n\t);\n}\n\nfunction Shortcut( { description, keyCombination, aliases = [], ariaLabel } ) {\n\treturn (\n\t\t<>\n\t\t\t<div className=\"editor-keyboard-shortcut-help-modal__shortcut-description\">\n\t\t\t\t{ description }\n\t\t\t</div>\n\t\t\t<div className=\"editor-keyboard-shortcut-help-modal__shortcut-term\">\n\t\t\t\t<KeyCombination\n\t\t\t\t\tkeyCombination={ keyCombination }\n\t\t\t\t\tforceAriaLabel={ ariaLabel }\n\t\t\t\t/>\n\t\t\t\t{ aliases.map( ( alias, index ) => (\n\t\t\t\t\t<KeyCombination\n\t\t\t\t\t\tkeyCombination={ alias }\n\t\t\t\t\t\tforceAriaLabel={ ariaLabel }\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default Shortcut;\n"],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AAA6E,IAAAE,WAAA,GAAAF,OAAA;AAJ7E;AACA;AACA;;AAIA,SAASG,cAAcA,CAAE;EAAEC,cAAc;EAAEC;AAAe,CAAC,EAAG;EAC7D,MAAMC,QAAQ,GAAGF,cAAc,CAACG,QAAQ,GACrCC,6BAAmB,CAAEJ,cAAc,CAACG,QAAQ,CAAE,CAC9CH,cAAc,CAACK,SACf,CAAC,GACDL,cAAc,CAACK,SAAS;EAC3B,MAAMC,SAAS,GAAGN,cAAc,CAACG,QAAQ,GACtCI,2BAAiB,CAAEP,cAAc,CAACG,QAAQ,CAAE,CAC5CH,cAAc,CAACK,SACf,CAAC,GACDL,cAAc,CAACK,SAAS;EAE3B,oBACC,IAAAP,WAAA,CAAAU,GAAA;IACCC,SAAS,EAAC,+DAA+D;IACzE,cAAaR,cAAc,IAAIK,SAAW;IAAAI,QAAA,EAExC,CAAEC,KAAK,CAACC,OAAO,CAAEV,QAAS,CAAC,GAAGA,QAAQ,GAAG,CAAEA,QAAQ,CAAE,EAAGW,GAAG,CAC5D,CAAER,SAAS,EAAES,KAAK,KAAM;MACvB,IAAKT,SAAS,KAAK,GAAG,EAAG;QACxB,oBAAO,IAAAP,WAAA,CAAAU,GAAA,EAACb,QAAA,CAAAoB,QAAQ;UAAAL,QAAA,EAAiBL;QAAS,GAAnBS,KAA+B,CAAC;MACxD;MAEA,oBACC,IAAAhB,WAAA,CAAAU,GAAA;QAECC,SAAS,EAAC,mDAAmD;QAAAC,QAAA,EAE3DL;MAAS,GAHLS,KAIF,CAAC;IAER,CACD;EAAC,CACG,CAAC;AAER;AAEA,SAASE,QAAQA,CAAE;EAAEC,WAAW;EAAEjB,cAAc;EAAEkB,OAAO,GAAG,EAAE;EAAEZ;AAAU,CAAC,EAAG;EAC7E,oBACC,IAAAR,WAAA,CAAAqB,IAAA,EAAArB,WAAA,CAAAiB,QAAA;IAAAL,QAAA,gBACC,IAAAZ,WAAA,CAAAU,GAAA;MAAKC,SAAS,EAAC,2DAA2D;MAAAC,QAAA,EACvEO;IAAW,CACT,CAAC,eACN,IAAAnB,WAAA,CAAAqB,IAAA;MAAKV,SAAS,EAAC,oDAAoD;MAAAC,QAAA,gBAClE,IAAAZ,WAAA,CAAAU,GAAA,EAACT,cAAc;QACdC,cAAc,EAAGA,cAAgB;QACjCC,cAAc,EAAGK;MAAW,CAC5B,CAAC,EACAY,OAAO,CAACL,GAAG,CAAE,CAAEO,KAAK,EAAEN,KAAK,kBAC5B,IAAAhB,WAAA,CAAAU,GAAA,EAACT,cAAc;QACdC,cAAc,EAAGoB,KAAO;QACxBnB,cAAc,EAAGK;MAAW,GACtBQ,KACN,CACA,CAAC;IAAA,CACC,CAAC;EAAA,CACL,CAAC;AAEL;AAAC,IAAAO,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEcP,QAAQ","ignoreList":[]}
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = ListViewSidebar;
8
- var _react = require("react");
9
8
  var _blockEditor = require("@wordpress/block-editor");
10
9
  var _components = require("@wordpress/components");
11
10
  var _compose = require("@wordpress/compose");
@@ -19,6 +18,7 @@ var _keycodes = require("@wordpress/keycodes");
19
18
  var _listViewOutline = _interopRequireDefault(require("./list-view-outline"));
20
19
  var _lockUnlock = require("../../lock-unlock");
21
20
  var _store = require("../../store");
21
+ var _jsxRuntime = require("react/jsx-runtime");
22
22
  /**
23
23
  * WordPress dependencies
24
24
  */
@@ -104,55 +104,67 @@ function ListViewSidebar() {
104
104
  // It is the same shortcut to open but that is defined as a global shortcut and only fires when the sidebar is closed.
105
105
  (0, _keyboardShortcuts.useShortcut)('core/editor/toggle-list-view', handleToggleListViewShortcut);
106
106
  return (
107
+ /*#__PURE__*/
107
108
  // eslint-disable-next-line jsx-a11y/no-static-element-interactions
108
- (0, _react.createElement)("div", {
109
+ (0, _jsxRuntime.jsx)("div", {
109
110
  className: "editor-list-view-sidebar",
110
111
  onKeyDown: closeOnEscape,
111
- ref: sidebarRef
112
- }, (0, _react.createElement)(Tabs, {
113
- onSelect: tabName => setTab(tabName),
114
- selectOnMove: false
115
- // The initial tab value is set explicitly to avoid an initial
116
- // render where no tab is selected. This ensures that the
117
- // tabpanel height is correct so the relevant scroll container
118
- // can be rendered internally.
119
- ,
120
- defaultTabId: "list-view"
121
- }, (0, _react.createElement)("div", {
122
- className: "editor-list-view-sidebar__header"
123
- }, (0, _react.createElement)(_components.Button, {
124
- className: "editor-list-view-sidebar__close-button",
125
- icon: _icons.closeSmall,
126
- label: (0, _i18n.__)('Close'),
127
- onClick: closeListView,
128
- size: "small"
129
- }), (0, _react.createElement)(Tabs.TabList, {
130
- className: "editor-list-view-sidebar__tabs-tablist",
131
- ref: tabsRef
132
- }, (0, _react.createElement)(Tabs.Tab, {
133
- className: "editor-list-view-sidebar__tabs-tab",
134
- tabId: "list-view"
135
- }, (0, _i18n._x)('List View', 'Post overview')), (0, _react.createElement)(Tabs.Tab, {
136
- className: "editor-list-view-sidebar__tabs-tab",
137
- tabId: "outline"
138
- }, (0, _i18n._x)('Outline', 'Post overview')))), (0, _react.createElement)(Tabs.TabPanel, {
139
- ref: listViewContainerRef,
140
- className: "editor-list-view-sidebar__tabs-tabpanel",
141
- tabId: "list-view",
142
- focusable: false
143
- }, (0, _react.createElement)("div", {
144
- className: "editor-list-view-sidebar__list-view-container"
145
- }, (0, _react.createElement)("div", {
146
- className: "editor-list-view-sidebar__list-view-panel-content"
147
- }, (0, _react.createElement)(_blockEditor.__experimentalListView, {
148
- dropZoneElement: dropZoneElement
149
- })))), (0, _react.createElement)(Tabs.TabPanel, {
150
- className: "editor-list-view-sidebar__tabs-tabpanel",
151
- tabId: "outline",
152
- focusable: false
153
- }, (0, _react.createElement)("div", {
154
- className: "editor-list-view-sidebar__list-view-container"
155
- }, (0, _react.createElement)(_listViewOutline.default, null)))))
112
+ ref: sidebarRef,
113
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(Tabs, {
114
+ onSelect: tabName => setTab(tabName),
115
+ selectOnMove: false
116
+ // The initial tab value is set explicitly to avoid an initial
117
+ // render where no tab is selected. This ensures that the
118
+ // tabpanel height is correct so the relevant scroll container
119
+ // can be rendered internally.
120
+ ,
121
+ defaultTabId: "list-view",
122
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
123
+ className: "editor-list-view-sidebar__header",
124
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
125
+ className: "editor-list-view-sidebar__close-button",
126
+ icon: _icons.closeSmall,
127
+ label: (0, _i18n.__)('Close'),
128
+ onClick: closeListView,
129
+ size: "small"
130
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(Tabs.TabList, {
131
+ className: "editor-list-view-sidebar__tabs-tablist",
132
+ ref: tabsRef,
133
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Tabs.Tab, {
134
+ className: "editor-list-view-sidebar__tabs-tab",
135
+ tabId: "list-view",
136
+ children: (0, _i18n._x)('List View', 'Post overview')
137
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(Tabs.Tab, {
138
+ className: "editor-list-view-sidebar__tabs-tab",
139
+ tabId: "outline",
140
+ children: (0, _i18n._x)('Outline', 'Post overview')
141
+ })]
142
+ })]
143
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(Tabs.TabPanel, {
144
+ ref: listViewContainerRef,
145
+ className: "editor-list-view-sidebar__tabs-tabpanel",
146
+ tabId: "list-view",
147
+ focusable: false,
148
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
149
+ className: "editor-list-view-sidebar__list-view-container",
150
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
151
+ className: "editor-list-view-sidebar__list-view-panel-content",
152
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_blockEditor.__experimentalListView, {
153
+ dropZoneElement: dropZoneElement
154
+ })
155
+ })
156
+ })
157
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(Tabs.TabPanel, {
158
+ className: "editor-list-view-sidebar__tabs-tabpanel",
159
+ tabId: "outline",
160
+ focusable: false,
161
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
162
+ className: "editor-list-view-sidebar__list-view-container",
163
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_listViewOutline.default, {})
164
+ })
165
+ })]
166
+ })
167
+ })
156
168
  );
157
169
  }
158
170
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_blockEditor","require","_components","_compose","_data","_dom","_element","_i18n","_icons","_keyboardShortcuts","_keycodes","_listViewOutline","_interopRequireDefault","_lockUnlock","_store","Tabs","unlock","componentsPrivateApis","ListViewSidebar","setIsListViewOpened","useDispatch","editorStore","getListViewToggleRef","useSelect","focusOnMountRef","useFocusOnMount","closeListView","useCallback","current","focus","closeOnEscape","event","keyCode","ESCAPE","defaultPrevented","preventDefault","dropZoneElement","setDropZoneElement","useState","tab","setTab","sidebarRef","useRef","tabsRef","listViewRef","listViewContainerRef","useMergeRefs","handleSidebarFocus","currentTab","tabPanelFocus","tabbable","find","listViewApplicationFocus","listViewFocusArea","contains","handleToggleListViewShortcut","ownerDocument","activeElement","useShortcut","_react","createElement","className","onKeyDown","ref","onSelect","tabName","selectOnMove","defaultTabId","Button","icon","closeSmall","label","__","onClick","size","TabList","Tab","tabId","_x","TabPanel","focusable","__experimentalListView","default"],"sources":["@wordpress/editor/src/components/list-view-sidebar/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __experimentalListView as ListView } from '@wordpress/block-editor';\nimport {\n\tButton,\n\tprivateApis as componentsPrivateApis,\n} from '@wordpress/components';\nimport { useFocusOnMount, useMergeRefs } from '@wordpress/compose';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { focus } from '@wordpress/dom';\nimport { useCallback, useRef, useState } from '@wordpress/element';\nimport { __, _x } from '@wordpress/i18n';\nimport { closeSmall } from '@wordpress/icons';\nimport { useShortcut } from '@wordpress/keyboard-shortcuts';\nimport { ESCAPE } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport ListViewOutline from './list-view-outline';\nimport { unlock } from '../../lock-unlock';\nimport { store as editorStore } from '../../store';\n\nconst { Tabs } = unlock( componentsPrivateApis );\n\nexport default function ListViewSidebar() {\n\tconst { setIsListViewOpened } = useDispatch( editorStore );\n\tconst { getListViewToggleRef } = unlock( useSelect( editorStore ) );\n\n\t// This hook handles focus when the sidebar first renders.\n\tconst focusOnMountRef = useFocusOnMount( 'firstElement' );\n\n\t// When closing the list view, focus should return to the toggle button.\n\tconst closeListView = useCallback( () => {\n\t\tsetIsListViewOpened( false );\n\t\tgetListViewToggleRef().current?.focus();\n\t}, [ getListViewToggleRef, setIsListViewOpened ] );\n\n\tconst closeOnEscape = useCallback(\n\t\t( event ) => {\n\t\t\tif ( event.keyCode === ESCAPE && ! event.defaultPrevented ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tcloseListView();\n\t\t\t}\n\t\t},\n\t\t[ closeListView ]\n\t);\n\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the dropZoneElement updates.\n\tconst [ dropZoneElement, setDropZoneElement ] = useState( null );\n\t// Tracks our current tab.\n\tconst [ tab, setTab ] = useState( 'list-view' );\n\n\t// This ref refers to the sidebar as a whole.\n\tconst sidebarRef = useRef();\n\t// This ref refers to the tab panel.\n\tconst tabsRef = useRef();\n\t// This ref refers to the list view application area.\n\tconst listViewRef = useRef();\n\n\t// Must merge the refs together so focus can be handled properly in the next function.\n\tconst listViewContainerRef = useMergeRefs( [\n\t\tfocusOnMountRef,\n\t\tlistViewRef,\n\t\tsetDropZoneElement,\n\t] );\n\n\t/*\n\t * Callback function to handle list view or outline focus.\n\t *\n\t * @param {string} currentTab The current tab. Either list view or outline.\n\t *\n\t * @return void\n\t */\n\tfunction handleSidebarFocus( currentTab ) {\n\t\t// Tab panel focus.\n\t\tconst tabPanelFocus = focus.tabbable.find( tabsRef.current )[ 0 ];\n\t\t// List view tab is selected.\n\t\tif ( currentTab === 'list-view' ) {\n\t\t\t// Either focus the list view or the tab panel. Must have a fallback because the list view does not render when there are no blocks.\n\t\t\tconst listViewApplicationFocus = focus.tabbable.find(\n\t\t\t\tlistViewRef.current\n\t\t\t)[ 0 ];\n\t\t\tconst listViewFocusArea = sidebarRef.current.contains(\n\t\t\t\tlistViewApplicationFocus\n\t\t\t)\n\t\t\t\t? listViewApplicationFocus\n\t\t\t\t: tabPanelFocus;\n\t\t\tlistViewFocusArea.focus();\n\t\t\t// Outline tab is selected.\n\t\t} else {\n\t\t\ttabPanelFocus.focus();\n\t\t}\n\t}\n\n\tconst handleToggleListViewShortcut = useCallback( () => {\n\t\t// If the sidebar has focus, it is safe to close.\n\t\tif (\n\t\t\tsidebarRef.current.contains(\n\t\t\t\tsidebarRef.current.ownerDocument.activeElement\n\t\t\t)\n\t\t) {\n\t\t\tcloseListView();\n\t\t} else {\n\t\t\t// If the list view or outline does not have focus, focus should be moved to it.\n\t\t\thandleSidebarFocus( tab );\n\t\t}\n\t}, [ closeListView, tab ] );\n\n\t// This only fires when the sidebar is open because of the conditional rendering.\n\t// It is the same shortcut to open but that is defined as a global shortcut and only fires when the sidebar is closed.\n\tuseShortcut( 'core/editor/toggle-list-view', handleToggleListViewShortcut );\n\n\treturn (\n\t\t// eslint-disable-next-line jsx-a11y/no-static-element-interactions\n\t\t<div\n\t\t\tclassName=\"editor-list-view-sidebar\"\n\t\t\tonKeyDown={ closeOnEscape }\n\t\t\tref={ sidebarRef }\n\t\t>\n\t\t\t<Tabs\n\t\t\t\tonSelect={ ( tabName ) => setTab( tabName ) }\n\t\t\t\tselectOnMove={ false }\n\t\t\t\t// The initial tab value is set explicitly to avoid an initial\n\t\t\t\t// render where no tab is selected. This ensures that the\n\t\t\t\t// tabpanel height is correct so the relevant scroll container\n\t\t\t\t// can be rendered internally.\n\t\t\t\tdefaultTabId=\"list-view\"\n\t\t\t>\n\t\t\t\t<div className=\"editor-list-view-sidebar__header\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\tclassName=\"editor-list-view-sidebar__close-button\"\n\t\t\t\t\t\ticon={ closeSmall }\n\t\t\t\t\t\tlabel={ __( 'Close' ) }\n\t\t\t\t\t\tonClick={ closeListView }\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t/>\n\t\t\t\t\t<Tabs.TabList\n\t\t\t\t\t\tclassName=\"editor-list-view-sidebar__tabs-tablist\"\n\t\t\t\t\t\tref={ tabsRef }\n\t\t\t\t\t>\n\t\t\t\t\t\t<Tabs.Tab\n\t\t\t\t\t\t\tclassName=\"editor-list-view-sidebar__tabs-tab\"\n\t\t\t\t\t\t\ttabId=\"list-view\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ _x( 'List View', 'Post overview' ) }\n\t\t\t\t\t\t</Tabs.Tab>\n\t\t\t\t\t\t<Tabs.Tab\n\t\t\t\t\t\t\tclassName=\"editor-list-view-sidebar__tabs-tab\"\n\t\t\t\t\t\t\ttabId=\"outline\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ _x( 'Outline', 'Post overview' ) }\n\t\t\t\t\t\t</Tabs.Tab>\n\t\t\t\t\t</Tabs.TabList>\n\t\t\t\t</div>\n\n\t\t\t\t<Tabs.TabPanel\n\t\t\t\t\tref={ listViewContainerRef }\n\t\t\t\t\tclassName=\"editor-list-view-sidebar__tabs-tabpanel\"\n\t\t\t\t\ttabId=\"list-view\"\n\t\t\t\t\tfocusable={ false }\n\t\t\t\t>\n\t\t\t\t\t<div className=\"editor-list-view-sidebar__list-view-container\">\n\t\t\t\t\t\t<div className=\"editor-list-view-sidebar__list-view-panel-content\">\n\t\t\t\t\t\t\t<ListView dropZoneElement={ dropZoneElement } />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</Tabs.TabPanel>\n\t\t\t\t<Tabs.TabPanel\n\t\t\t\t\tclassName=\"editor-list-view-sidebar__tabs-tabpanel\"\n\t\t\t\t\ttabId=\"outline\"\n\t\t\t\t\tfocusable={ false }\n\t\t\t\t>\n\t\t\t\t\t<div className=\"editor-list-view-sidebar__list-view-container\">\n\t\t\t\t\t\t<ListViewOutline />\n\t\t\t\t\t</div>\n\t\t\t\t</Tabs.TabPanel>\n\t\t\t</Tabs>\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAIA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,IAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,KAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,kBAAA,GAAAR,OAAA;AACA,IAAAS,SAAA,GAAAT,OAAA;AAKA,IAAAU,gBAAA,GAAAC,sBAAA,CAAAX,OAAA;AACA,IAAAY,WAAA,GAAAZ,OAAA;AACA,IAAAa,MAAA,GAAAb,OAAA;AAtBA;AACA;AACA;;AAeA;AACA;AACA;;AAKA,MAAM;EAAEc;AAAK,CAAC,GAAG,IAAAC,kBAAM,EAAEC,uBAAsB,CAAC;AAEjC,SAASC,eAAeA,CAAA,EAAG;EACzC,MAAM;IAAEC;EAAoB,CAAC,GAAG,IAAAC,iBAAW,EAAEC,YAAY,CAAC;EAC1D,MAAM;IAAEC;EAAqB,CAAC,GAA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,SAAS,EAAC;IAA+C,GAC7D,IAAAF,MAAA,CAAAC,aAAA,EAACjD,gBAAA,CAAAuE,OAAe,MAAE,CACd,CACS,CACV,CACF;EAAC;AAER","ignoreList":[]}
1
+ {"version":3,"names":["_blockEditor","require","_components","_compose","_data","_dom","_element","_i18n","_icons","_keyboardShortcuts","_keycodes","_listViewOutline","_interopRequireDefault","_lockUnlock","_store","_jsxRuntime","Tabs","unlock","componentsPrivateApis","ListViewSidebar","setIsListViewOpened","useDispatch","editorStore","getListViewToggleRef","useSelect","focusOnMountRef","useFocusOnMount","closeListView","useCallback","current","focus","closeOnEscape","event","keyCode","ESCAPE","defaultPrevented","preventDefault","dropZoneElement","setDropZoneElement","useState","tab","setTab","sidebarRef","useRef","tabsRef","listViewRef","listViewContainerRef","useMergeRefs","handleSidebarFocus","currentTab","tabPanelFocus","tabbable","find","listViewApplicationFocus","listViewFocusArea","contains","handleToggleListViewShortcut","ownerDocument","activeElement","useShortcut","jsx","className","onKeyDown","ref","children","jsxs","onSelect","tabName","selectOnMove","defaultTabId","Button","icon","closeSmall","label","__","onClick","size","TabList","Tab","tabId","_x","TabPanel","focusable","__experimentalListView","default"],"sources":["@wordpress/editor/src/components/list-view-sidebar/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __experimentalListView as ListView } from '@wordpress/block-editor';\nimport {\n\tButton,\n\tprivateApis as componentsPrivateApis,\n} from '@wordpress/components';\nimport { useFocusOnMount, useMergeRefs } from '@wordpress/compose';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { focus } from '@wordpress/dom';\nimport { useCallback, useRef, useState } from '@wordpress/element';\nimport { __, _x } from '@wordpress/i18n';\nimport { closeSmall } from '@wordpress/icons';\nimport { useShortcut } from '@wordpress/keyboard-shortcuts';\nimport { ESCAPE } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport ListViewOutline from './list-view-outline';\nimport { unlock } from '../../lock-unlock';\nimport { store as editorStore } from '../../store';\n\nconst { Tabs } = unlock( componentsPrivateApis );\n\nexport default function ListViewSidebar() {\n\tconst { setIsListViewOpened } = useDispatch( editorStore );\n\tconst { getListViewToggleRef } = unlock( useSelect( editorStore ) );\n\n\t// This hook handles focus when the sidebar first renders.\n\tconst focusOnMountRef = useFocusOnMount( 'firstElement' );\n\n\t// When closing the list view, focus should return to the toggle button.\n\tconst closeListView = useCallback( () => {\n\t\tsetIsListViewOpened( false );\n\t\tgetListViewToggleRef().current?.focus();\n\t}, [ getListViewToggleRef, setIsListViewOpened ] );\n\n\tconst closeOnEscape = useCallback(\n\t\t( event ) => {\n\t\t\tif ( event.keyCode === ESCAPE && ! event.defaultPrevented ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tcloseListView();\n\t\t\t}\n\t\t},\n\t\t[ closeListView ]\n\t);\n\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the dropZoneElement updates.\n\tconst [ dropZoneElement, setDropZoneElement ] = useState( null );\n\t// Tracks our current tab.\n\tconst [ tab, setTab ] = useState( 'list-view' );\n\n\t// This ref refers to the sidebar as a whole.\n\tconst sidebarRef = useRef();\n\t// This ref refers to the tab panel.\n\tconst tabsRef = useRef();\n\t// This ref refers to the list view application area.\n\tconst listViewRef = useRef();\n\n\t// Must merge the refs together so focus can be handled properly in the next function.\n\tconst listViewContainerRef = useMergeRefs( [\n\t\tfocusOnMountRef,\n\t\tlistViewRef,\n\t\tsetDropZoneElement,\n\t] );\n\n\t/*\n\t * Callback function to handle list view or outline focus.\n\t *\n\t * @param {string} currentTab The current tab. Either list view or outline.\n\t *\n\t * @return void\n\t */\n\tfunction handleSidebarFocus( currentTab ) {\n\t\t// Tab panel focus.\n\t\tconst tabPanelFocus = focus.tabbable.find( tabsRef.current )[ 0 ];\n\t\t// List view tab is selected.\n\t\tif ( currentTab === 'list-view' ) {\n\t\t\t// Either focus the list view or the tab panel. Must have a fallback because the list view does not render when there are no blocks.\n\t\t\tconst listViewApplicationFocus = focus.tabbable.find(\n\t\t\t\tlistViewRef.current\n\t\t\t)[ 0 ];\n\t\t\tconst listViewFocusArea = sidebarRef.current.contains(\n\t\t\t\tlistViewApplicationFocus\n\t\t\t)\n\t\t\t\t? listViewApplicationFocus\n\t\t\t\t: tabPanelFocus;\n\t\t\tlistViewFocusArea.focus();\n\t\t\t// Outline tab is selected.\n\t\t} else {\n\t\t\ttabPanelFocus.focus();\n\t\t}\n\t}\n\n\tconst handleToggleListViewShortcut = useCallback( () => {\n\t\t// If the sidebar has focus, it is safe to close.\n\t\tif (\n\t\t\tsidebarRef.current.contains(\n\t\t\t\tsidebarRef.current.ownerDocument.activeElement\n\t\t\t)\n\t\t) {\n\t\t\tcloseListView();\n\t\t} else {\n\t\t\t// If the list view or outline does not have focus, focus should be moved to it.\n\t\t\thandleSidebarFocus( tab );\n\t\t}\n\t}, [ closeListView, tab ] );\n\n\t// This only fires when the sidebar is open because of the conditional rendering.\n\t// It is the same shortcut to open but that is defined as a global shortcut and only fires when the sidebar is closed.\n\tuseShortcut( 'core/editor/toggle-list-view', handleToggleListViewShortcut );\n\n\treturn (\n\t\t// eslint-disable-next-line jsx-a11y/no-static-element-interactions\n\t\t<div\n\t\t\tclassName=\"editor-list-view-sidebar\"\n\t\t\tonKeyDown={ closeOnEscape }\n\t\t\tref={ sidebarRef }\n\t\t>\n\t\t\t<Tabs\n\t\t\t\tonSelect={ ( tabName ) => setTab( tabName ) }\n\t\t\t\tselectOnMove={ false }\n\t\t\t\t// The initial tab value is set explicitly to avoid an initial\n\t\t\t\t// render where no tab is selected. This ensures that the\n\t\t\t\t// tabpanel height is correct so the relevant scroll container\n\t\t\t\t// can be rendered internally.\n\t\t\t\tdefaultTabId=\"list-view\"\n\t\t\t>\n\t\t\t\t<div className=\"editor-list-view-sidebar__header\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\tclassName=\"editor-list-view-sidebar__close-button\"\n\t\t\t\t\t\ticon={ closeSmall }\n\t\t\t\t\t\tlabel={ __( 'Close' ) }\n\t\t\t\t\t\tonClick={ closeListView }\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t/>\n\t\t\t\t\t<Tabs.TabList\n\t\t\t\t\t\tclassName=\"editor-list-view-sidebar__tabs-tablist\"\n\t\t\t\t\t\tref={ tabsRef }\n\t\t\t\t\t>\n\t\t\t\t\t\t<Tabs.Tab\n\t\t\t\t\t\t\tclassName=\"editor-list-view-sidebar__tabs-tab\"\n\t\t\t\t\t\t\ttabId=\"list-view\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ _x( 'List View', 'Post overview' ) }\n\t\t\t\t\t\t</Tabs.Tab>\n\t\t\t\t\t\t<Tabs.Tab\n\t\t\t\t\t\t\tclassName=\"editor-list-view-sidebar__tabs-tab\"\n\t\t\t\t\t\t\ttabId=\"outline\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ _x( 'Outline', 'Post overview' ) }\n\t\t\t\t\t\t</Tabs.Tab>\n\t\t\t\t\t</Tabs.TabList>\n\t\t\t\t</div>\n\n\t\t\t\t<Tabs.TabPanel\n\t\t\t\t\tref={ listViewContainerRef }\n\t\t\t\t\tclassName=\"editor-list-view-sidebar__tabs-tabpanel\"\n\t\t\t\t\ttabId=\"list-view\"\n\t\t\t\t\tfocusable={ false }\n\t\t\t\t>\n\t\t\t\t\t<div className=\"editor-list-view-sidebar__list-view-container\">\n\t\t\t\t\t\t<div className=\"editor-list-view-sidebar__list-view-panel-content\">\n\t\t\t\t\t\t\t<ListView dropZoneElement={ dropZoneElement } />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</Tabs.TabPanel>\n\t\t\t\t<Tabs.TabPanel\n\t\t\t\t\tclassName=\"editor-list-view-sidebar__tabs-tabpanel\"\n\t\t\t\t\ttabId=\"outline\"\n\t\t\t\t\tfocusable={ false }\n\t\t\t\t>\n\t\t\t\t\t<div className=\"editor-list-view-sidebar__list-view-container\">\n\t\t\t\t\t\t<ListViewOutline />\n\t\t\t\t\t</div>\n\t\t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perty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = ListViewOutline;
8
- var _react = require("react");
9
8
  var _components = require("@wordpress/components");
10
9
  var _i18n = require("@wordpress/i18n");
11
10
  var _characterCount = _interopRequireDefault(require("../character-count"));
12
11
  var _wordCount = _interopRequireDefault(require("../word-count"));
13
12
  var _timeToRead = _interopRequireDefault(require("../time-to-read"));
14
13
  var _documentOutline = _interopRequireDefault(require("../document-outline"));
14
+ var _jsxRuntime = require("react/jsx-runtime");
15
15
  /**
16
16
  * WordPress dependencies
17
17
  */
@@ -21,8 +21,25 @@ var _documentOutline = _interopRequireDefault(require("../document-outline"));
21
21
  */
22
22
 
23
23
  function ListViewOutline() {
24
- return (0, _react.createElement)(_react.Fragment, null, (0, _react.createElement)("div", {
25
- className: "editor-list-view-sidebar__outline"
26
- }, (0, _react.createElement)("div", null, (0, _react.createElement)(_components.__experimentalText, null, (0, _i18n.__)('Characters:')), (0, _react.createElement)(_components.__experimentalText, null, (0, _react.createElement)(_characterCount.default, null))), (0, _react.createElement)("div", null, (0, _react.createElement)(_components.__experimentalText, null, (0, _i18n.__)('Words:')), (0, _react.createElement)(_wordCount.default, null)), (0, _react.createElement)("div", null, (0, _react.createElement)(_components.__experimentalText, null, (0, _i18n.__)('Time to read:')), (0, _react.createElement)(_timeToRead.default, null))), (0, _react.createElement)(_documentOutline.default, null));
24
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
25
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
26
+ className: "editor-list-view-sidebar__outline",
27
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
28
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__experimentalText, {
29
+ children: (0, _i18n.__)('Characters:')
30
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__experimentalText, {
31
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_characterCount.default, {})
32
+ })]
33
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
34
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__experimentalText, {
35
+ children: (0, _i18n.__)('Words:')
36
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_wordCount.default, {})]
37
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
38
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__experimentalText, {
39
+ children: (0, _i18n.__)('Time to read:')
40
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_timeToRead.default, {})]
41
+ })]
42
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_documentOutline.default, {})]
43
+ });
27
44
  }
28
45
  //# sourceMappingURL=list-view-outline.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_components","require","_i18n","_characterCount","_interopRequireDefault","_wordCount","_timeToRead","_documentOutline","ListViewOutline","_react","createElement","Fragment","className","__experimentalText","__","default"],"sources":["@wordpress/editor/src/components/list-view-sidebar/list-view-outline.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __experimentalText as Text } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport CharacterCount from '../character-count';\nimport WordCount from '../word-count';\nimport TimeToRead from '../time-to-read';\nimport DocumentOutline from '../document-outline';\n\nexport default function ListViewOutline() {\n\treturn (\n\t\t<>\n\t\t\t<div className=\"editor-list-view-sidebar__outline\">\n\t\t\t\t<div>\n\t\t\t\t\t<Text>{ __( 'Characters:' ) }</Text>\n\t\t\t\t\t<Text>\n\t\t\t\t\t\t<CharacterCount />\n\t\t\t\t\t</Text>\n\t\t\t\t</div>\n\t\t\t\t<div>\n\t\t\t\t\t<Text>{ __( 'Words:' ) }</Text>\n\t\t\t\t\t<WordCount />\n\t\t\t\t</div>\n\t\t\t\t<div>\n\t\t\t\t\t<Text>{ __( 'Time to read:' ) }</Text>\n\t\t\t\t\t<TimeToRead />\n\t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A,CAAAC,aAAA,EAACH,gBAAA,CAAAQ,OAAe,MAAE,CACjB,CAAC;AAEL","ignoreList":[]}
1
+ {"version":3,"names":["_components","require","_i18n","_characterCount","_interopRequireDefault","_wordCount","_timeToRead","_documentOutline","_jsxRuntime","ListViewOutline","jsxs","Fragment","children","className","jsx","__experimentalText","__","default"],"sources":["@wordpress/editor/src/components/list-view-sidebar/list-view-outline.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __experimentalText as Text } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport CharacterCount from '../character-count';\nimport WordCount from '../word-count';\nimport TimeToRead from '../time-to-read';\nimport DocumentOutline from '../document-outline';\n\nexport default function ListViewOutline() {\n\treturn (\n\t\t<>\n\t\t\t<div className=\"editor-list-view-sidebar__outline\">\n\t\t\t\t<div>\n\t\t\t\t\t<Text>{ __( 'Characters:' ) }</Text>\n\t\t\t\t\t<Text>\n\t\t\t\t\t\t<CharacterCount />\n\t\t\t\t\t</Text>\n\t\t\t\t</div>\n\t\t\t\t<div>\n\t\t\t\t\t<Text>{ __( 'Words:' ) }</Text>\n\t\t\t\t\t<WordCount />\n\t\t\t\t</div>\n\t\t\t\t<div>\n\t\t\t\t\t<Text>{ __( 'Time to read:' ) }</Text>\n\t\t\t\t\t<TimeToRead />\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<DocumentOutline />\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AAKA,IAAAE,eAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,UAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,WAAA,GAAAF,sBAAA,CAAAH,OAAA;AACA,IAAAM,gBAAA,GAAAH,sBAAA,CAAAH,OAAA;AAAkD,IAAAO,WAAA,GAAAP,OAAA;AAZlD;AACA;AACA;;AAIA;AACA;AAC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7
  exports.default = void 0;
8
- var _react = require("react");
9
8
  var _element = require("@wordpress/element");
10
9
  var _compose = require("@wordpress/compose");
11
10
  var _data = require("@wordpress/data");
@@ -15,6 +14,7 @@ var _notices = require("@wordpress/notices");
15
14
  var _autosaveMonitor = _interopRequireDefault(require("../autosave-monitor"));
16
15
  var _localAutosave = require("../../store/local-autosave");
17
16
  var _store = require("../../store");
17
+ var _jsxRuntime = require("react/jsx-runtime");
18
18
  /**
19
19
  * WordPress dependencies
20
20
  */
@@ -176,10 +176,23 @@ function LocalAutosaveMonitor() {
176
176
  useAutosaveNotice();
177
177
  useAutosavePurge();
178
178
  const localAutosaveInterval = (0, _data.useSelect)(select => select(_store.store).getEditorSettings().localAutosaveInterval, []);
179
- return (0, _react.createElement)(_autosaveMonitor.default, {
179
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_autosaveMonitor.default, {
180
180
  interval: localAutosaveInterval,
181
181
  autosave: deferredAutosave
182
182
  });
183
183
  }
184
+
185
+ /**
186
+ * Monitors local autosaves of a post in the editor.
187
+ * It uses several hooks and functions to manage autosave behavior:
188
+ * - `useAutosaveNotice` hook: Manages the creation of a notice prompting the user to restore a local autosave, if one exists.
189
+ * - `useAutosavePurge` hook: Ejects a local autosave after a successful save occurs.
190
+ * - `hasSessionStorageSupport` function: Checks if the current environment supports browser sessionStorage.
191
+ * - `LocalAutosaveMonitor` component: Uses the `AutosaveMonitor` component to perform autosaves at a specified interval.
192
+ *
193
+ * The module also checks for sessionStorage support and conditionally exports the `LocalAutosaveMonitor` component based on that.
194
+ *
195
+ * @module LocalAutosaveMonitor
196
+ */
184
197
  var _default = exports.default = (0, _compose.ifCondition)(hasSessionStorageSupport)(LocalAutosaveMonitor);
185
198
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_compose","_data","_i18n","_blocks","_notices","_autosaveMonitor","_interopRequireDefault","_localAutosave","_store","requestIdleCallback","window","requestAnimationFrame","hasStorageSupport","hasSessionStorageSupport","undefined","sessionStorage","setItem","removeItem","useAutosaveNotice","postId","isEditedPostNew","hasRemoteAutosave","useSelect","select","editorStore","getCurrentPostId","getEditorSettings","autosave","getEditedPostAttribute","createWarningNotice","removeNotice","useDispatch","noticesStore","editPost","resetEditorBlocks","useEffect","localAutosave","localAutosaveGet","JSON","parse","post_title","title","content","excerpt","edits","hasDifference","Object","keys","some","key","localAutosaveClear","id","__","actions","label","onClick","editsContent","editsWithoutContent","useAutosavePurge","isDirty","isAutosaving","didError","isEditedPostDirty","isAutosavingPost","didPostSaveRequestFail","lastIsDirty","useRef","lastIsAutosaving","current","wasEditedPostNew","usePrevious","prevPostId","LocalAutosaveMonitor","deferredAutosave","useCallback","local","localAutosaveInterval","_react","createElement","default","interval","_default","exports","ifCondition"],"sources":["@wordpress/editor/src/components/local-autosave-monitor/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useCallback, useEffect, useRef } from '@wordpress/element';\nimport { ifCondition, usePrevious } from '@wordpress/compose';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { parse } from '@wordpress/blocks';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\nimport AutosaveMonitor from '../autosave-monitor';\nimport {\n\tlocalAutosaveGet,\n\tlocalAutosaveClear,\n} from '../../store/local-autosave';\nimport { store as editorStore } from '../../store';\n\nconst requestIdleCallback = window.requestIdleCallback\n\t? window.requestIdleCallback\n\t: window.requestAnimationFrame;\n\nlet hasStorageSupport;\n\n/**\n * Function which returns true if the current environment supports browser\n * sessionStorage, or false otherwise. The result of this function is cached and\n * reused in subsequent invocations.\n */\nconst hasSessionStorageSupport = () => {\n\tif ( hasStorageSupport !== undefined ) {\n\t\treturn hasStorageSupport;\n\t}\n\n\ttry {\n\t\t// Private Browsing in Safari 10 and earlier will throw an error when\n\t\t// attempting to set into sessionStorage. The test here is intentional in\n\t\t// causing a thrown error as condition bailing from local autosave.\n\t\twindow.sessionStorage.setItem( '__wpEditorTestSessionStorage', '' );\n\t\twindow.sessionStorage.removeItem( '__wpEditorTestSessionStorage' );\n\t\thasStorageSupport = true;\n\t} catch {\n\t\thasStorageSupport = false;\n\t}\n\n\treturn hasStorageSupport;\n};\n\n/**\n * Custom hook which manages the creation of a notice prompting the user to\n * restore a local autosave, if one exists.\n */\nfunction useAutosaveNotice() {\n\tconst { postId, isEditedPostNew, hasRemoteAutosave } = useSelect(\n\t\t( select ) => ( {\n\t\t\tpostId: select( editorStore ).getCurrentPostId(),\n\t\t\tisEditedPostNew: select( editorStore ).isEditedPostNew(),\n\t\t\thasRemoteAutosave:\n\t\t\t\t!! select( editorStore ).getEditorSettings().autosave,\n\t\t} ),\n\t\t[]\n\t);\n\tconst { getEditedPostAttribute } = useSelect( editorStore );\n\n\tconst { createWarningNotice, removeNotice } = useDispatch( noticesStore );\n\tconst { editPost, resetEditorBlocks } = useDispatch( editorStore );\n\n\tuseEffect( () => {\n\t\tlet localAutosave = localAutosaveGet( postId, isEditedPostNew );\n\t\tif ( ! localAutosave ) {\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tlocalAutosave = JSON.parse( localAutosave );\n\t\t} catch {\n\t\t\t// Not usable if it can't be parsed.\n\t\t\treturn;\n\t\t}\n\n\t\tconst { post_title: title, content, excerpt } = localAutosave;\n\t\tconst edits = { title, content, excerpt };\n\n\t\t{\n\t\t\t// Only display a notice if there is a difference between what has been\n\t\t\t// saved and that which is stored in sessionStorage.\n\t\t\tconst hasDifference = Object.keys( edits ).some( ( key ) => {\n\t\t\t\treturn edits[ key ] !== getEditedPostAttribute( key );\n\t\t\t} );\n\n\t\t\tif ( ! hasDifference ) {\n\t\t\t\t// If there is no difference, it can be safely ejected from storage.\n\t\t\t\tlocalAutosaveClear( postId, isEditedPostNew );\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tif ( hasRemoteAutosave ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst id = 'wpEditorAutosaveRestore';\n\n\t\tcreateWarningNotice(\n\t\t\t__(\n\t\t\t\t'The backup of this post in your browser is different from the version below.'\n\t\t\t),\n\t\t\t{\n\t\t\t\tid,\n\t\t\t\tactions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tlabel: __( 'Restore the backup' ),\n\t\t\t\t\t\tonClick() {\n\t\t\t\t\t\t\tconst {\n\t\t\t\t\t\t\t\tcontent: editsContent,\n\t\t\t\t\t\t\t\t...editsWithoutContent\n\t\t\t\t\t\t\t} = edits;\n\t\t\t\t\t\t\teditPost( editsWithoutContent );\n\t\t\t\t\t\t\tresetEditorBlocks( parse( edits.content ) );\n\t\t\t\t\t\t\tremoveNotice( id );\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);\n\t}, [ isEditedPostNew, postId ] );\n}\n\n/**\n * Custom hook which ejects a local autosave after a successful save occurs.\n */\nfunction useAutosavePurge() {\n\tconst { postId, isEditedPostNew, isDirty, isAutosaving, didError } =\n\t\tuseSelect(\n\t\t\t( select ) => ( {\n\t\t\t\tpostId: select( editorStore ).getCurrentPostId(),\n\t\t\t\tisEditedPostNew: select( editorStore ).isEditedPostNew(),\n\t\t\t\tisDirty: select( editorStore ).isEditedPostDirty(),\n\t\t\t\tisAutosaving: select( editorStore ).isAutosavingPost(),\n\t\t\t\tdidError: select( editorStore ).didPostSaveRequestFail(),\n\t\t\t} ),\n\t\t\t[]\n\t\t);\n\n\tconst lastIsDirty = useRef( isDirty );\n\tconst lastIsAutosaving = useRef( isAutosaving );\n\n\tuseEffect( () => {\n\t\tif (\n\t\t\t! didError &&\n\t\t\t( ( lastIsAutosaving.current && ! isAutosaving ) ||\n\t\t\t\t( lastIsDirty.current && ! isDirty ) )\n\t\t) {\n\t\t\tlocalAutosaveClear( postId, isEditedPostNew );\n\t\t}\n\n\t\tlastIsDirty.current = isDirty;\n\t\tlastIsAutosaving.current = isAutosaving;\n\t}, [ isDirty, isAutosaving, didError ] );\n\n\t// Once the isEditedPostNew changes from true to false, let's clear the auto-draft autosave.\n\tconst wasEditedPostNew = usePrevious( isEditedPostNew );\n\tconst prevPostId = usePrevious( postId );\n\tuseEffect( () => {\n\t\tif ( prevPostId === postId && wasEditedPostNew && ! isEditedPostNew ) {\n\t\t\tlocalAutosaveClear( postId, true );\n\t\t}\n\t}, [ isEditedPostNew, postId ] );\n}\n\nfunction LocalAutosaveMonitor() {\n\tconst { autosave } = useDispatch( editorStore );\n\tconst deferredAutosave = useCallback( () => {\n\t\trequestIdleCallback( () => autosave( { local: true } ) );\n\t}, [] );\n\tuseAutosaveNotice();\n\tuseAutosavePurge();\n\n\tconst localAutosaveInterval = useSelect(\n\t\t( select ) =>\n\t\t\tselect( editorStore ).getEditorSettings().localAutosaveInterval,\n\t\t[]\n\t);\n\n\treturn (\n\t\t<AutosaveMonitor\n\t\t\tinterval={ localAutosaveInterval }\n\t\t\tautosave={ deferredAutosave }\n\t\t/>\n\t);\n}\n\nexport default ifCondition( hasSessionStorageSupport )( LocalAutosaveMonitor );\n"],"mappings":";;;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AAKA,IAAAM,gBAAA,GAAAC,sBAAA,CAAAP,OAAA;AACA,IAAAQ,cAAA,GAAAR,OAAA;AAIA,IAAAS,MAAA,GAAAT,OAAA;AAlBA;AACA;AACA;;AAQA;AACA;AACA;;AAQA,MAAMU,mBAAmB,GAAGC,MAAM,CAACD,mBAAmB,GACnDC,MAAM,CAACD,mBAAmB,GAC1BC,MAAM,CAACC,qBAAqB;AAE/B,IAAIC,iBAAiB;;AAErB;AACA;AACA;AACA;AACA;AACA,MAAMC,wBAAwB,GAAGA,CAAA,KAAM;EACtC,IAAKD,iBAAiB,KAAKE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AM,CAAG,CAAC;AACjC;AAEA,SAASqD,oBAAoBA,CAAA,EAAG;EAC/B,MAAM;IAAE7C;EAAS,CAAC,GAAG,IAAAI,iBAAW,EAAEP,YAAY,CAAC;EAC/C,MAAMiD,gBAAgB,GAAG,IAAAC,oBAAW,EAAE,MAAM;IAC3CjE,mBAAmB,CAAE,MAAMkB,QAAQ,CAAE;MAAEgD,KAAK,EAAE;IAAK,CAAE,CAAE,CAAC;EACzD,CAAC,EAAE,EAAG,CAAC;EACPzD,iBAAiB,CAAC,CAAC;EACnBwC,gBAAgB,CAAC,CAAC;EAElB,MAAMkB,qBAAqB,GAAG,IAAAtD,eAAS,EACpCC,MAAM,IACPA,MAAM,CAAEC,YAAY,CAAC,CAACE,iBAAiB,CAAC,CAAC,CAACkD,qBAAqB,EAChE,EACD,CAAC;EAED,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACzE,gBAAA,CAAA0E,OAAe;IACfC,QAAQ,EAAGJ,qBAAuB;IAClCjD,QAAQ,EAAG8C;EAAkB,CAC7B,CAAC;AAEJ;AAAC,IAAAQ,QAAA,GAAAC,OAAA,CAAAH,OAAA,GAEc,IAAAI,oBAAW,EAAEtE,wBAAyB,CAAC,CAAE2D,oBAAqB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_element","require","_compose","_data","_i18n","_blocks","_notices","_autosaveMonitor","_interopRequireDefault","_localAutosave","_store","_jsxRuntime","requestIdleCallback","window","requestAnimationFrame","hasStorageSupport","hasSessionStorageSupport","undefined","sessionStorage","setItem","removeItem","useAutosaveNotice","postId","isEditedPostNew","hasRemoteAutosave","useSelect","select","editorStore","getCurrentPostId","getEditorSettings","autosave","getEditedPostAttribute","createWarningNotice","removeNotice","useDispatch","noticesStore","editPost","resetEditorBlocks","useEffect","localAutosave","localAutosaveGet","JSON","parse","post_title","title","content","excerpt","edits","hasDifference","Object","keys","some","key","localAutosaveClear","id","__","actions","label","onClick","editsContent","editsWithoutContent","useAutosavePurge","isDirty","isAutosaving","didError","isEditedPostDirty","isAutosavingPost","didPostSaveRequestFail","lastIsDirty","useRef","lastIsAutosaving","current","wasEditedPostNew","usePrevious","prevPostId","LocalAutosaveMonitor","deferredAutosave","useCallback","local","localAutosaveInterval","jsx","default","interval","_default","exports","ifCondition"],"sources":["@wordpress/editor/src/components/local-autosave-monitor/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useCallback, useEffect, useRef } from '@wordpress/element';\nimport { ifCondition, usePrevious } from '@wordpress/compose';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { parse } from '@wordpress/blocks';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\nimport AutosaveMonitor from '../autosave-monitor';\nimport {\n\tlocalAutosaveGet,\n\tlocalAutosaveClear,\n} from '../../store/local-autosave';\nimport { store as editorStore } from '../../store';\n\nconst requestIdleCallback = window.requestIdleCallback\n\t? window.requestIdleCallback\n\t: window.requestAnimationFrame;\n\nlet hasStorageSupport;\n\n/**\n * Function which returns true if the current environment supports browser\n * sessionStorage, or false otherwise. The result of this function is cached and\n * reused in subsequent invocations.\n */\nconst hasSessionStorageSupport = () => {\n\tif ( hasStorageSupport !== undefined ) {\n\t\treturn hasStorageSupport;\n\t}\n\n\ttry {\n\t\t// Private Browsing in Safari 10 and earlier will throw an error when\n\t\t// attempting to set into sessionStorage. The test here is intentional in\n\t\t// causing a thrown error as condition bailing from local autosave.\n\t\twindow.sessionStorage.setItem( '__wpEditorTestSessionStorage', '' );\n\t\twindow.sessionStorage.removeItem( '__wpEditorTestSessionStorage' );\n\t\thasStorageSupport = true;\n\t} catch {\n\t\thasStorageSupport = false;\n\t}\n\n\treturn hasStorageSupport;\n};\n\n/**\n * Custom hook which manages the creation of a notice prompting the user to\n * restore a local autosave, if one exists.\n */\nfunction useAutosaveNotice() {\n\tconst { postId, isEditedPostNew, hasRemoteAutosave } = useSelect(\n\t\t( select ) => ( {\n\t\t\tpostId: select( editorStore ).getCurrentPostId(),\n\t\t\tisEditedPostNew: select( editorStore ).isEditedPostNew(),\n\t\t\thasRemoteAutosave:\n\t\t\t\t!! select( editorStore ).getEditorSettings().autosave,\n\t\t} ),\n\t\t[]\n\t);\n\tconst { getEditedPostAttribute } = useSelect( editorStore );\n\n\tconst { createWarningNotice, removeNotice } = useDispatch( noticesStore );\n\tconst { editPost, resetEditorBlocks } = useDispatch( editorStore );\n\n\tuseEffect( () => {\n\t\tlet localAutosave = localAutosaveGet( postId, isEditedPostNew );\n\t\tif ( ! localAutosave ) {\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tlocalAutosave = JSON.parse( localAutosave );\n\t\t} catch {\n\t\t\t// Not usable if it can't be parsed.\n\t\t\treturn;\n\t\t}\n\n\t\tconst { post_title: title, content, excerpt } = localAutosave;\n\t\tconst edits = { title, content, excerpt };\n\n\t\t{\n\t\t\t// Only display a notice if there is a difference between what has been\n\t\t\t// saved and that which is stored in sessionStorage.\n\t\t\tconst hasDifference = Object.keys( edits ).some( ( key ) => {\n\t\t\t\treturn edits[ key ] !== getEditedPostAttribute( key );\n\t\t\t} );\n\n\t\t\tif ( ! hasDifference ) {\n\t\t\t\t// If there is no difference, it can be safely ejected from storage.\n\t\t\t\tlocalAutosaveClear( postId, isEditedPostNew );\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tif ( hasRemoteAutosave ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst id = 'wpEditorAutosaveRestore';\n\n\t\tcreateWarningNotice(\n\t\t\t__(\n\t\t\t\t'The backup of this post in your browser is different from the version below.'\n\t\t\t),\n\t\t\t{\n\t\t\t\tid,\n\t\t\t\tactions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tlabel: __( 'Restore the backup' ),\n\t\t\t\t\t\tonClick() {\n\t\t\t\t\t\t\tconst {\n\t\t\t\t\t\t\t\tcontent: editsContent,\n\t\t\t\t\t\t\t\t...editsWithoutContent\n\t\t\t\t\t\t\t} = edits;\n\t\t\t\t\t\t\teditPost( editsWithoutContent );\n\t\t\t\t\t\t\tresetEditorBlocks( parse( edits.content ) );\n\t\t\t\t\t\t\tremoveNotice( id );\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);\n\t}, [ isEditedPostNew, postId ] );\n}\n\n/**\n * Custom hook which ejects a local autosave after a successful save occurs.\n */\nfunction useAutosavePurge() {\n\tconst { postId, isEditedPostNew, isDirty, isAutosaving, didError } =\n\t\tuseSelect(\n\t\t\t( select ) => ( {\n\t\t\t\tpostId: select( editorStore ).getCurrentPostId(),\n\t\t\t\tisEditedPostNew: select( editorStore ).isEditedPostNew(),\n\t\t\t\tisDirty: select( editorStore ).isEditedPostDirty(),\n\t\t\t\tisAutosaving: select( editorStore ).isAutosavingPost(),\n\t\t\t\tdidError: select( editorStore ).didPostSaveRequestFail(),\n\t\t\t} ),\n\t\t\t[]\n\t\t);\n\n\tconst lastIsDirty = useRef( isDirty );\n\tconst lastIsAutosaving = useRef( isAutosaving );\n\n\tuseEffect( () => {\n\t\tif (\n\t\t\t! didError &&\n\t\t\t( ( lastIsAutosaving.current && ! isAutosaving ) ||\n\t\t\t\t( lastIsDirty.current && ! isDirty ) )\n\t\t) {\n\t\t\tlocalAutosaveClear( postId, isEditedPostNew );\n\t\t}\n\n\t\tlastIsDirty.current = isDirty;\n\t\tlastIsAutosaving.current = isAutosaving;\n\t}, [ isDirty, isAutosaving, didError ] );\n\n\t// Once the isEditedPostNew changes from true to false, let's clear the auto-draft autosave.\n\tconst wasEditedPostNew = usePrevious( isEditedPostNew );\n\tconst prevPostId = usePrevious( postId );\n\tuseEffect( () => {\n\t\tif ( prevPostId === postId && wasEditedPostNew && ! isEditedPostNew ) {\n\t\t\tlocalAutosaveClear( postId, true );\n\t\t}\n\t}, [ isEditedPostNew, postId ] );\n}\n\nfunction LocalAutosaveMonitor() {\n\tconst { autosave } = useDispatch( editorStore );\n\tconst deferredAutosave = useCallback( () => {\n\t\trequestIdleCallback( () => autosave( { local: true } ) );\n\t}, [] );\n\tuseAutosaveNotice();\n\tuseAutosavePurge();\n\n\tconst localAutosaveInterval = useSelect(\n\t\t( select ) =>\n\t\t\tselect( editorStore ).getEditorSettings().localAutosaveInterval,\n\t\t[]\n\t);\n\n\treturn (\n\t\t<AutosaveMonitor\n\t\t\tinterval={ localAutosaveInterval }\n\t\t\tautosave={ deferredAutosave }\n\t\t/>\n\t);\n}\n\n/**\n * Monitors local autosaves of a post in the editor.\n * It uses several hooks and functions to manage autosave behavior:\n * - `useAutosaveNotice` hook: Manages the creation of a notice prompting the user to restore a local autosave, if one exists.\n * - `useAutosavePurge` hook: Ejects a local autosave after a successful save occurs.\n * - `hasSessionStorageSupport` function: Checks if the current environment supports browser sessionStorage.\n * - `LocalAutosaveMonitor` component: Uses the `AutosaveMonitor` component to perform autosaves at a specified interval.\n *\n * The module also checks for sessionStorage support and conditionally exports the `LocalAutosaveMonitor` component based on that.\n *\n * @module LocalAutosaveMonitor\n */\nexport default ifCondition( hasSessionStorageSupport )( LocalAutosaveMonitor );\n"],"mappings":";;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AAKA,IAAAM,gBAAA,GAAAC,sBAAA,CAAAP,OAAA;AACA,IAAAQ,cAAA,GAAAR,OAAA;AAIA,IAAAS,MAAA,GAAAT,OAAA;AAAmD,IAAAU,WAAA,GAAAV,OAAA;AAlBnD;AACA;AACA;;AAQA;AACA;AACA;;AAQA,MAAMW,mBAAmB,GAAGC,MAAM,CAACD,mBAAmB,GACnDC,MAAM,CAACD,mBAAmB,GAC1BC,MAAM,CAACC,qBAAqB;AAE/B,IAAIC,iBAAiB;;AAErB;AACA;AACA;AACA;AACA;AACA,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EAAE,IAAK,CAAC;IACnC;EACD,CAAC,EAAE,CAAEC,eAAe,EAAED,MAAM,CAAG,CAAC;AACjC;AAEA,SAASqD,oBAAoBA,CAAA,EAAG;EAC/B,MAAM;IAAE7C;EAAS,CAAC,GAAG,IAAAI,iBAAW,EAAEP,YAAY,CAAC;EAC/C,MAAMiD,gBAAgB,GAAG,IAAAC,oBAAW,EAAE,MAAM;IAC3CjE,mBAAmB,CAAE,MAAMkB,QAAQ,CAAE;MAAEgD,KAAK,EAAE;IAAK,CAAE,CAAE,CAAC;EACzD,CAAC,EAAE,EAAG,CAAC;EACPzD,iBAAiB,CAAC,CAAC;EACnBwC,gBAAgB,CAAC,CAAC;EAElB,MAAMkB,qBAAqB,GAAG,IAAAtD,eAAS,EACpCC,MAAM,IACPA,MAAM,CAAEC,YAAY,CAAC,CAACE,iBAAiB,CAAC,CAAC,CAACkD,qBAAqB,EAChE,EACD,CAAC;EAED,oBACC,IAAApE,WAAA,CAAAqE,GAAA,EAACzE,gBAAA,CAAA0E,OAAe;IACfC,QAAQ,EAAGH,qBAAuB;IAClCjD,QAAQ,EAAG8C;EAAkB,CAC7B,CAAC;AAEJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAXA,IAAAO,QAAA,GAAAC,OAAA,CAAAH,OAAA,GAYe,IAAAI,oBAAW,EAAErE,wBAAyB,CAAC,CAAE2D,oBAAqB,CAAC","ignoreList":[]}
@@ -151,7 +151,7 @@ const inserterMediaCategories = [{
151
151
  per_page: 'page_size',
152
152
  search: 'q'
153
153
  };
154
- const url = new URL('https://api.openverse.engineering/v1/images/');
154
+ const url = new URL('https://api.openverse.org/v1/images/');
155
155
  Object.entries(finalQuery).forEach(([key, value]) => {
156
156
  const queryKey = mapFromInserterMediaRequest[key] || key;
157
157
  url.searchParams.set(queryKey, value);