@wordpress/editor 13.34.0 → 14.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (972) hide show
  1. package/CHANGELOG.md +17 -4
  2. package/README.md +333 -39
  3. package/build/bindings/index.js +1 -3
  4. package/build/bindings/index.js.map +1 -1
  5. package/build/bindings/pattern-overrides.js +71 -2
  6. package/build/bindings/pattern-overrides.js.map +1 -1
  7. package/build/bindings/post-meta.js +38 -2
  8. package/build/bindings/post-meta.js.map +1 -1
  9. package/build/components/autocompleters/user.js +12 -8
  10. package/build/components/autocompleters/user.js.map +1 -1
  11. package/build/components/block-manager/category.js +19 -17
  12. package/build/components/block-manager/category.js.map +1 -1
  13. package/build/components/block-manager/checklist.js +15 -14
  14. package/build/components/block-manager/checklist.js.map +1 -1
  15. package/build/components/block-manager/index.js +37 -33
  16. package/build/components/block-manager/index.js.map +1 -1
  17. package/build/components/block-removal-warnings/index.js +2 -2
  18. package/build/components/block-removal-warnings/index.js.map +1 -1
  19. package/build/components/block-settings-menu/content-only-settings-menu.js +140 -0
  20. package/build/components/block-settings-menu/content-only-settings-menu.js.map +1 -0
  21. package/build/components/block-settings-menu/content-only-settings-menu.native.js +11 -0
  22. package/build/components/block-settings-menu/content-only-settings-menu.native.js.map +1 -0
  23. package/build/components/block-settings-menu/plugin-block-settings-menu-item.js +16 -13
  24. package/build/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -1
  25. package/build/components/blog-title/index.js +116 -0
  26. package/build/components/blog-title/index.js.map +1 -0
  27. package/build/components/collapsible-block-toolbar/index.js +22 -19
  28. package/build/components/collapsible-block-toolbar/index.js.map +1 -1
  29. package/build/components/commands/index.js +109 -3
  30. package/build/components/commands/index.js.map +1 -1
  31. package/build/components/create-template-part-modal/index.js +167 -0
  32. package/build/components/create-template-part-modal/index.js.map +1 -0
  33. package/build/components/create-template-part-modal/utils.js +64 -0
  34. package/build/components/create-template-part-modal/utils.js.map +1 -0
  35. package/build/components/deprecated.js +2 -2
  36. package/build/components/deprecated.js.map +1 -1
  37. package/build/components/document-bar/index.js +96 -72
  38. package/build/components/document-bar/index.js.map +1 -1
  39. package/build/components/document-outline/index.js +124 -121
  40. package/build/components/document-outline/index.js.map +1 -1
  41. package/build/components/document-outline/item.js +20 -16
  42. package/build/components/document-outline/item.js.map +1 -1
  43. package/build/components/document-tools/index.js +69 -69
  44. package/build/components/document-tools/index.js.map +1 -1
  45. package/build/components/editor-help/add-blocks.native.js +14 -11
  46. package/build/components/editor-help/add-blocks.native.js.map +1 -1
  47. package/build/components/editor-help/customize-blocks.native.js +14 -11
  48. package/build/components/editor-help/customize-blocks.native.js.map +1 -1
  49. package/build/components/editor-help/help-detail-navigation-screen.native.js +32 -22
  50. package/build/components/editor-help/help-detail-navigation-screen.native.js.map +1 -1
  51. package/build/components/editor-help/help-get-support-button.native.js +8 -6
  52. package/build/components/editor-help/help-get-support-button.native.js.map +1 -1
  53. package/build/components/editor-help/help-section-title.native.js +8 -6
  54. package/build/components/editor-help/help-section-title.native.js.map +1 -1
  55. package/build/components/editor-help/help-topic-row.native.js +7 -6
  56. package/build/components/editor-help/help-topic-row.native.js.map +1 -1
  57. package/build/components/editor-help/icon-move-blocks.native.js +7 -6
  58. package/build/components/editor-help/icon-move-blocks.native.js.map +1 -1
  59. package/build/components/editor-help/index.native.js +94 -76
  60. package/build/components/editor-help/index.native.js.map +1 -1
  61. package/build/components/editor-help/intro-to-blocks.native.js +41 -37
  62. package/build/components/editor-help/intro-to-blocks.native.js.map +1 -1
  63. package/build/components/editor-help/move-blocks.native.js +25 -21
  64. package/build/components/editor-help/move-blocks.native.js.map +1 -1
  65. package/build/components/editor-help/remove-blocks.native.js +12 -9
  66. package/build/components/editor-help/remove-blocks.native.js.map +1 -1
  67. package/build/components/editor-help/view-sections.native.js +24 -19
  68. package/build/components/editor-help/view-sections.native.js.map +1 -1
  69. package/build/components/editor-history/redo.js +2 -2
  70. package/build/components/editor-history/redo.js.map +1 -1
  71. package/build/components/editor-history/undo.js +2 -2
  72. package/build/components/editor-history/undo.js.map +1 -1
  73. package/build/components/editor-interface/content-slot-fill.js +23 -0
  74. package/build/components/editor-interface/content-slot-fill.js.map +1 -0
  75. package/build/components/editor-interface/index.js +178 -0
  76. package/build/components/editor-interface/index.js.map +1 -0
  77. package/build/components/editor-notices/index.js +22 -9
  78. package/build/components/editor-notices/index.js.map +1 -1
  79. package/build/components/editor-snackbars/index.js +2 -2
  80. package/build/components/editor-snackbars/index.js.map +1 -1
  81. package/build/components/entities-saved-states/entity-record-item.js +37 -10
  82. package/build/components/entities-saved-states/entity-record-item.js.map +1 -1
  83. package/build/components/entities-saved-states/entity-type-list.js +25 -22
  84. package/build/components/entities-saved-states/entity-type-list.js.map +1 -1
  85. package/build/components/entities-saved-states/index.js +53 -46
  86. package/build/components/entities-saved-states/index.js.map +1 -1
  87. package/build/components/error-boundary/index.js +27 -14
  88. package/build/components/error-boundary/index.js.map +1 -1
  89. package/build/components/error-boundary/index.native.js +45 -35
  90. package/build/components/error-boundary/index.native.js.map +1 -1
  91. package/build/components/global-keyboard-shortcuts/register-shortcuts.js +4 -5
  92. package/build/components/global-keyboard-shortcuts/register-shortcuts.js.map +1 -1
  93. package/build/components/global-styles-provider/index.js +195 -0
  94. package/build/components/global-styles-provider/index.js.map +1 -0
  95. package/build/components/header/back-button.js +34 -0
  96. package/build/components/header/back-button.js.map +1 -0
  97. package/build/components/header/index.js +176 -0
  98. package/build/components/header/index.js.map +1 -0
  99. package/build/components/inserter-sidebar/index.js +83 -32
  100. package/build/components/inserter-sidebar/index.js.map +1 -1
  101. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +2 -2
  102. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
  103. package/build/components/keyboard-shortcut-help-modal/index.js +54 -49
  104. package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  105. package/build/components/keyboard-shortcut-help-modal/shortcut.js +30 -26
  106. package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
  107. package/build/components/list-view-sidebar/index.js +59 -47
  108. package/build/components/list-view-sidebar/index.js.map +1 -1
  109. package/build/components/list-view-sidebar/list-view-outline.js +21 -4
  110. package/build/components/list-view-sidebar/list-view-outline.js.map +1 -1
  111. package/build/components/local-autosave-monitor/index.js +15 -2
  112. package/build/components/local-autosave-monitor/index.js.map +1 -1
  113. package/build/components/mode-switcher/index.js +10 -10
  114. package/build/components/mode-switcher/index.js.map +1 -1
  115. package/build/components/more-menu/copy-content-menu-item.js +5 -4
  116. package/build/components/more-menu/copy-content-menu-item.js.map +1 -1
  117. package/build/components/more-menu/index.js +89 -76
  118. package/build/components/more-menu/index.js.map +1 -1
  119. package/build/components/more-menu/tools-more-menu-group.js +2 -2
  120. package/build/components/more-menu/tools-more-menu-group.js.map +1 -1
  121. package/build/components/more-menu/view-more-menu-group.js +2 -2
  122. package/build/components/more-menu/view-more-menu-group.js.map +1 -1
  123. package/build/components/offline-status/index.native.js +12 -11
  124. package/build/components/offline-status/index.native.js.map +1 -1
  125. package/build/components/page-attributes/order.js +87 -14
  126. package/build/components/page-attributes/order.js.map +1 -1
  127. package/build/components/page-attributes/panel.js +10 -19
  128. package/build/components/page-attributes/panel.js.map +1 -1
  129. package/build/components/page-attributes/parent.js +86 -3
  130. package/build/components/page-attributes/parent.js.map +1 -1
  131. package/build/components/pattern-duplicate-modal/index.js +59 -0
  132. package/build/components/pattern-duplicate-modal/index.js.map +1 -0
  133. package/build/components/pattern-overrides-panel/index.js +2 -2
  134. package/build/components/pattern-overrides-panel/index.js.map +1 -1
  135. package/build/components/pattern-rename-modal/index.js +58 -0
  136. package/build/components/pattern-rename-modal/index.js.map +1 -0
  137. package/build/components/plugin-document-setting-panel/index.js +17 -12
  138. package/build/components/plugin-document-setting-panel/index.js.map +1 -1
  139. package/build/components/plugin-post-publish-panel/index.js +10 -7
  140. package/build/components/plugin-post-publish-panel/index.js.map +1 -1
  141. package/build/components/plugin-post-status-info/index.js +7 -4
  142. package/build/components/plugin-post-status-info/index.js.map +1 -1
  143. package/build/components/plugin-pre-publish-panel/index.js +10 -7
  144. package/build/components/plugin-pre-publish-panel/index.js.map +1 -1
  145. package/build/components/plugin-sidebar/index.js +3 -4
  146. package/build/components/plugin-sidebar/index.js.map +1 -1
  147. package/build/components/plugin-sidebar-more-menu-item/index.js +3 -5
  148. package/build/components/plugin-sidebar-more-menu-item/index.js.map +1 -1
  149. package/build/components/post-actions/actions.js +454 -327
  150. package/build/components/post-actions/actions.js.map +1 -1
  151. package/build/components/post-actions/export-pattern-action.js +64 -0
  152. package/build/components/post-actions/export-pattern-action.js.map +1 -0
  153. package/build/components/post-actions/export-pattern-action.native.js +11 -0
  154. package/build/components/post-actions/export-pattern-action.native.js.map +1 -0
  155. package/build/components/post-actions/index.js +71 -62
  156. package/build/components/post-actions/index.js.map +1 -1
  157. package/build/components/post-author/check.js +6 -6
  158. package/build/components/post-author/check.js.map +1 -1
  159. package/build/components/post-author/combobox.js +4 -3
  160. package/build/components/post-author/combobox.js.map +1 -1
  161. package/build/components/post-author/hook.js +2 -1
  162. package/build/components/post-author/hook.js.map +1 -1
  163. package/build/components/post-author/index.js +3 -3
  164. package/build/components/post-author/index.js.map +1 -1
  165. package/build/components/post-author/panel.js +72 -4
  166. package/build/components/post-author/panel.js.map +1 -1
  167. package/build/components/post-author/select.js +4 -3
  168. package/build/components/post-author/select.js.map +1 -1
  169. package/build/components/post-card-panel/index.js +46 -35
  170. package/build/components/post-card-panel/index.js.map +1 -1
  171. package/build/components/post-comments/index.js +44 -8
  172. package/build/components/post-comments/index.js.map +1 -1
  173. package/build/components/post-content-information/index.js +8 -5
  174. package/build/components/post-content-information/index.js.map +1 -1
  175. package/build/components/post-discussion/panel.js +122 -24
  176. package/build/components/post-discussion/panel.js.map +1 -1
  177. package/build/components/post-excerpt/check.js +6 -6
  178. package/build/components/post-excerpt/check.js.map +1 -1
  179. package/build/components/post-excerpt/index.js +18 -17
  180. package/build/components/post-excerpt/index.js.map +1 -1
  181. package/build/components/post-excerpt/panel.js +59 -42
  182. package/build/components/post-excerpt/panel.js.map +1 -1
  183. package/build/components/post-excerpt/plugin.js +7 -4
  184. package/build/components/post-excerpt/plugin.js.map +1 -1
  185. package/build/components/post-featured-image/check.js +17 -7
  186. package/build/components/post-featured-image/check.js.map +1 -1
  187. package/build/components/post-featured-image/index.js +77 -49
  188. package/build/components/post-featured-image/index.js.map +1 -1
  189. package/build/components/post-featured-image/panel.js +22 -7
  190. package/build/components/post-featured-image/panel.js.map +1 -1
  191. package/build/components/post-format/check.js +14 -4
  192. package/build/components/post-format/check.js.map +1 -1
  193. package/build/components/post-format/index.js +37 -20
  194. package/build/components/post-format/index.js.map +1 -1
  195. package/build/components/post-format/panel.js +93 -0
  196. package/build/components/post-format/panel.js.map +1 -0
  197. package/build/components/post-last-edited-panel/index.js +7 -4
  198. package/build/components/post-last-edited-panel/index.js.map +1 -1
  199. package/build/components/post-last-revision/check.js +13 -5
  200. package/build/components/post-last-revision/check.js.map +1 -1
  201. package/build/components/post-last-revision/index.js +19 -13
  202. package/build/components/post-last-revision/index.js.map +1 -1
  203. package/build/components/post-last-revision/panel.js +12 -5
  204. package/build/components/post-last-revision/panel.js.map +1 -1
  205. package/build/components/post-locked-modal/index.js +57 -35
  206. package/build/components/post-locked-modal/index.js.map +1 -1
  207. package/build/components/post-panel-row/index.js +13 -10
  208. package/build/components/post-panel-row/index.js.map +1 -1
  209. package/build/components/post-panel-section/index.js +29 -0
  210. package/build/components/post-panel-section/index.js.map +1 -0
  211. package/build/components/post-pending-status/check.js +10 -0
  212. package/build/components/post-pending-status/check.js.map +1 -1
  213. package/build/components/post-pending-status/index.js +14 -7
  214. package/build/components/post-pending-status/index.js.map +1 -1
  215. package/build/components/post-pingbacks/index.js +15 -4
  216. package/build/components/post-pingbacks/index.js.map +1 -1
  217. package/build/components/post-preview-button/index.js +45 -21
  218. package/build/components/post-preview-button/index.js.map +1 -1
  219. package/build/components/post-publish-button/index.js +21 -11
  220. package/build/components/post-publish-button/index.js.map +1 -1
  221. package/build/components/post-publish-button/post-publish-button-or-toggle.js +2 -2
  222. package/build/components/post-publish-button/post-publish-button-or-toggle.js.map +1 -1
  223. package/build/components/post-publish-panel/index.js +46 -33
  224. package/build/components/post-publish-panel/index.js.map +1 -1
  225. package/build/components/post-publish-panel/maybe-category-panel.js +12 -9
  226. package/build/components/post-publish-panel/maybe-category-panel.js.map +1 -1
  227. package/build/components/post-publish-panel/maybe-post-format-panel.js +21 -15
  228. package/build/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
  229. package/build/components/post-publish-panel/maybe-tags-panel.js +13 -10
  230. package/build/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
  231. package/build/components/post-publish-panel/maybe-upload-media.js +29 -24
  232. package/build/components/post-publish-panel/maybe-upload-media.js.map +1 -1
  233. package/build/components/post-publish-panel/postpublish.js +55 -38
  234. package/build/components/post-publish-panel/postpublish.js.map +1 -1
  235. package/build/components/post-publish-panel/prepublish.js +41 -26
  236. package/build/components/post-publish-panel/prepublish.js.map +1 -1
  237. package/build/components/post-saved-state/index.js +10 -10
  238. package/build/components/post-saved-state/index.js.map +1 -1
  239. package/build/components/post-schedule/check.js +8 -0
  240. package/build/components/post-schedule/check.js.map +1 -1
  241. package/build/components/post-schedule/index.js +30 -5
  242. package/build/components/post-schedule/index.js.map +1 -1
  243. package/build/components/post-schedule/label.js +16 -0
  244. package/build/components/post-schedule/label.js.map +1 -1
  245. package/build/components/post-schedule/panel.js +43 -30
  246. package/build/components/post-schedule/panel.js.map +1 -1
  247. package/build/components/post-slug/check.js +5 -4
  248. package/build/components/post-slug/check.js.map +1 -1
  249. package/build/components/post-slug/index.js +5 -3
  250. package/build/components/post-slug/index.js.map +1 -1
  251. package/build/components/post-slug/panel.js +30 -0
  252. package/build/components/post-slug/panel.js.map +1 -0
  253. package/build/components/post-status/index.js +118 -119
  254. package/build/components/post-status/index.js.map +1 -1
  255. package/build/components/post-sticky/index.js +16 -8
  256. package/build/components/post-sticky/index.js.map +1 -1
  257. package/build/components/post-sticky/panel.js +25 -0
  258. package/build/components/post-sticky/panel.js.map +1 -0
  259. package/build/components/post-switch-to-draft-button/index.js +25 -21
  260. package/build/components/post-switch-to-draft-button/index.js.map +1 -1
  261. package/build/components/post-sync-status/index.js +8 -6
  262. package/build/components/post-sync-status/index.js.map +1 -1
  263. package/build/components/post-taxonomies/flat-term-selector.js +21 -20
  264. package/build/components/post-taxonomies/flat-term-selector.js.map +1 -1
  265. package/build/components/post-taxonomies/hierarchical-term-selector.js +71 -61
  266. package/build/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
  267. package/build/components/post-taxonomies/index.js +6 -6
  268. package/build/components/post-taxonomies/index.js.map +1 -1
  269. package/build/components/post-taxonomies/most-used-terms.js +19 -15
  270. package/build/components/post-taxonomies/most-used-terms.js.map +1 -1
  271. package/build/components/post-taxonomies/panel.js +15 -11
  272. package/build/components/post-taxonomies/panel.js.map +1 -1
  273. package/build/components/post-template/block-theme.js +42 -32
  274. package/build/components/post-template/block-theme.js.map +1 -1
  275. package/build/components/post-template/classic-theme.js +73 -50
  276. package/build/components/post-template/classic-theme.js.map +1 -1
  277. package/build/components/post-template/create-new-template-modal.js +33 -27
  278. package/build/components/post-template/create-new-template-modal.js.map +1 -1
  279. package/build/components/post-template/create-new-template.js +14 -11
  280. package/build/components/post-template/create-new-template.js.map +1 -1
  281. package/build/components/post-template/panel.js +16 -10
  282. package/build/components/post-template/panel.js.map +1 -1
  283. package/build/components/post-template/reset-default-template.js +5 -4
  284. package/build/components/post-template/reset-default-template.js.map +1 -1
  285. package/build/components/post-template/swap-template-button.js +20 -15
  286. package/build/components/post-template/swap-template-button.js.map +1 -1
  287. package/build/components/post-text-editor/index.js +27 -20
  288. package/build/components/post-text-editor/index.js.map +1 -1
  289. package/build/components/post-title/index.js +31 -19
  290. package/build/components/post-title/index.js.map +1 -1
  291. package/build/components/post-title/index.native.js +81 -57
  292. package/build/components/post-title/index.native.js.map +1 -1
  293. package/build/components/post-title/post-title-raw.js +12 -5
  294. package/build/components/post-title/post-title-raw.js.map +1 -1
  295. package/build/components/post-title/use-post-title-focus.js +7 -0
  296. package/build/components/post-title/use-post-title-focus.js.map +1 -1
  297. package/build/components/post-title/use-post-title.js +5 -0
  298. package/build/components/post-title/use-post-title.js.map +1 -1
  299. package/build/components/post-transform-panel/hooks.js +90 -0
  300. package/build/components/post-transform-panel/hooks.js.map +1 -0
  301. package/build/components/post-transform-panel/index.js +101 -0
  302. package/build/components/post-transform-panel/index.js.map +1 -0
  303. package/build/components/post-trash/index.js +19 -15
  304. package/build/components/post-trash/index.js.map +1 -1
  305. package/build/components/post-type-support-check/index.js +1 -1
  306. package/build/components/post-type-support-check/index.js.map +1 -1
  307. package/build/components/post-url/check.js +8 -0
  308. package/build/components/post-url/check.js.map +1 -1
  309. package/build/components/post-url/index.js +98 -73
  310. package/build/components/post-url/index.js.map +1 -1
  311. package/build/components/post-url/label.js +11 -0
  312. package/build/components/post-url/label.js.map +1 -1
  313. package/build/components/post-url/panel.js +33 -25
  314. package/build/components/post-url/panel.js.map +1 -1
  315. package/build/components/post-view-link/index.js +2 -2
  316. package/build/components/post-view-link/index.js.map +1 -1
  317. package/build/components/post-visibility/check.js +9 -0
  318. package/build/components/post-visibility/check.js.map +1 -1
  319. package/build/components/post-visibility/index.js +83 -68
  320. package/build/components/post-visibility/index.js.map +1 -1
  321. package/build/components/post-visibility/label.js +11 -0
  322. package/build/components/post-visibility/label.js.map +1 -1
  323. package/build/components/posts-per-page/index.js +109 -0
  324. package/build/components/posts-per-page/index.js.map +1 -0
  325. package/build/components/preferences-modal/enable-plugin-document-setting-panel.js +7 -5
  326. package/build/components/preferences-modal/enable-plugin-document-setting-panel.js.map +1 -1
  327. package/build/components/preferences-modal/index.js +124 -102
  328. package/build/components/preferences-modal/index.js.map +1 -1
  329. package/build/components/preview-dropdown/index.js +47 -31
  330. package/build/components/preview-dropdown/index.js.map +1 -1
  331. package/build/components/provider/index.js +96 -20
  332. package/build/components/provider/index.js.map +1 -1
  333. package/build/components/provider/index.native.js +55 -19
  334. package/build/components/provider/index.native.js.map +1 -1
  335. package/build/components/provider/use-block-editor-settings.js +23 -4
  336. package/build/components/provider/use-block-editor-settings.js.map +1 -1
  337. package/build/components/provider/with-registry-provider.js +31 -24
  338. package/build/components/provider/with-registry-provider.js.map +1 -1
  339. package/build/components/resizable-editor/index.js +96 -0
  340. package/build/components/resizable-editor/index.js.map +1 -0
  341. package/build/components/resizable-editor/resize-handle.js +59 -0
  342. package/build/components/resizable-editor/resize-handle.js.map +1 -0
  343. package/build/components/save-publish-panels/index.js +35 -26
  344. package/build/components/save-publish-panels/index.js.map +1 -1
  345. package/build/components/sidebar/constants.js +11 -0
  346. package/build/components/sidebar/constants.js.map +1 -0
  347. package/build/components/sidebar/header.js +56 -0
  348. package/build/components/sidebar/header.js.map +1 -0
  349. package/build/components/sidebar/index.js +161 -0
  350. package/build/components/sidebar/index.js.map +1 -0
  351. package/build/components/sidebar/post-summary.js +89 -0
  352. package/build/components/sidebar/post-summary.js.map +1 -0
  353. package/build/components/site-discussion/index.js +133 -0
  354. package/build/components/site-discussion/index.js.map +1 -0
  355. package/build/components/start-page-options/index.js +18 -18
  356. package/build/components/start-page-options/index.js.map +1 -1
  357. package/build/components/start-template-options/index.js +198 -0
  358. package/build/components/start-template-options/index.js.map +1 -0
  359. package/build/components/table-of-contents/index.js +4 -4
  360. package/build/components/table-of-contents/index.js.map +1 -1
  361. package/build/components/table-of-contents/panel.js +53 -35
  362. package/build/components/table-of-contents/panel.js.map +1 -1
  363. package/build/components/template-areas/index.js +36 -22
  364. package/build/components/template-areas/index.js.map +1 -1
  365. package/build/components/template-content-panel/index.js +39 -0
  366. package/build/components/template-content-panel/index.js.map +1 -0
  367. package/build/components/template-validation-notice/index.js +25 -21
  368. package/build/components/template-validation-notice/index.js.map +1 -1
  369. package/build/components/text-editor/index.js +73 -0
  370. package/build/components/text-editor/index.js.map +1 -0
  371. package/build/components/time-to-read/index.js +8 -8
  372. package/build/components/time-to-read/index.js.map +1 -1
  373. package/build/components/{editor-canvas → visual-editor}/edit-template-blocks-notification.js +6 -6
  374. package/build/components/visual-editor/edit-template-blocks-notification.js.map +1 -0
  375. package/build/components/{editor-canvas → visual-editor}/index.js +130 -78
  376. package/build/components/visual-editor/index.js.map +1 -0
  377. package/build/components/word-count/index.js +5 -4
  378. package/build/components/word-count/index.js.map +1 -1
  379. package/build/hooks/custom-sources-backwards-compatibility.js +3 -4
  380. package/build/hooks/custom-sources-backwards-compatibility.js.map +1 -1
  381. package/build/hooks/index.js +1 -0
  382. package/build/hooks/index.js.map +1 -1
  383. package/build/hooks/media-upload.js +10 -0
  384. package/build/hooks/media-upload.js.map +1 -0
  385. package/build/hooks/pattern-overrides.js +25 -16
  386. package/build/hooks/pattern-overrides.js.map +1 -1
  387. package/build/private-apis.js +15 -38
  388. package/build/private-apis.js.map +1 -1
  389. package/build/private-apis.native.js +48 -0
  390. package/build/private-apis.native.js.map +1 -0
  391. package/build/store/constants.js +4 -1
  392. package/build/store/constants.js.map +1 -1
  393. package/build/store/private-actions.js +10 -14
  394. package/build/store/private-actions.js.map +1 -1
  395. package/build/store/private-selectors.js +45 -2
  396. package/build/store/private-selectors.js.map +1 -1
  397. package/build/store/reducer.js +15 -0
  398. package/build/store/reducer.js.map +1 -1
  399. package/build/store/selectors.js +1 -1
  400. package/build/store/selectors.js.map +1 -1
  401. package/build/utils/set-nested-value.js +44 -0
  402. package/build/utils/set-nested-value.js.map +1 -0
  403. package/build-module/bindings/index.js +1 -3
  404. package/build-module/bindings/index.js.map +1 -1
  405. package/build-module/bindings/pattern-overrides.js +70 -2
  406. package/build-module/bindings/pattern-overrides.js.map +1 -1
  407. package/build-module/bindings/post-meta.js +38 -2
  408. package/build-module/bindings/post-meta.js.map +1 -1
  409. package/build-module/components/autocompleters/user.js +14 -9
  410. package/build-module/components/autocompleters/user.js.map +1 -1
  411. package/build-module/components/block-manager/category.js +20 -17
  412. package/build-module/components/block-manager/category.js.map +1 -1
  413. package/build-module/components/block-manager/checklist.js +16 -14
  414. package/build-module/components/block-manager/checklist.js.map +1 -1
  415. package/build-module/components/block-manager/index.js +38 -33
  416. package/build-module/components/block-manager/index.js.map +1 -1
  417. package/build-module/components/block-removal-warnings/index.js +2 -2
  418. package/build-module/components/block-removal-warnings/index.js.map +1 -1
  419. package/build-module/components/block-settings-menu/content-only-settings-menu.js +135 -0
  420. package/build-module/components/block-settings-menu/content-only-settings-menu.js.map +1 -0
  421. package/build-module/components/block-settings-menu/content-only-settings-menu.native.js +5 -0
  422. package/build-module/components/block-settings-menu/content-only-settings-menu.native.js.map +1 -0
  423. package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js +16 -13
  424. package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -1
  425. package/build-module/components/blog-title/index.js +110 -0
  426. package/build-module/components/blog-title/index.js.map +1 -0
  427. package/build-module/components/collapsible-block-toolbar/index.js +24 -19
  428. package/build-module/components/collapsible-block-toolbar/index.js.map +1 -1
  429. package/build-module/components/commands/index.js +111 -5
  430. package/build-module/components/commands/index.js.map +1 -1
  431. package/build-module/components/create-template-part-modal/index.js +160 -0
  432. package/build-module/components/create-template-part-modal/index.js.map +1 -0
  433. package/build-module/components/create-template-part-modal/utils.js +54 -0
  434. package/build-module/components/create-template-part-modal/utils.js.map +1 -0
  435. package/build-module/components/deprecated.js +2 -2
  436. package/build-module/components/deprecated.js.map +1 -1
  437. package/build-module/components/document-bar/index.js +95 -70
  438. package/build-module/components/document-bar/index.js.map +1 -1
  439. package/build-module/components/document-outline/index.js +125 -120
  440. package/build-module/components/document-outline/index.js.map +1 -1
  441. package/build-module/components/document-outline/item.js +21 -16
  442. package/build-module/components/document-outline/item.js.map +1 -1
  443. package/build-module/components/document-tools/index.js +72 -70
  444. package/build-module/components/document-tools/index.js.map +1 -1
  445. package/build-module/components/editor-help/add-blocks.native.js +16 -11
  446. package/build-module/components/editor-help/add-blocks.native.js.map +1 -1
  447. package/build-module/components/editor-help/customize-blocks.native.js +16 -11
  448. package/build-module/components/editor-help/customize-blocks.native.js.map +1 -1
  449. package/build-module/components/editor-help/help-detail-navigation-screen.native.js +33 -22
  450. package/build-module/components/editor-help/help-detail-navigation-screen.native.js.map +1 -1
  451. package/build-module/components/editor-help/help-get-support-button.native.js +8 -6
  452. package/build-module/components/editor-help/help-get-support-button.native.js.map +1 -1
  453. package/build-module/components/editor-help/help-section-title.native.js +8 -6
  454. package/build-module/components/editor-help/help-section-title.native.js.map +1 -1
  455. package/build-module/components/editor-help/help-topic-row.native.js +7 -6
  456. package/build-module/components/editor-help/help-topic-row.native.js.map +1 -1
  457. package/build-module/components/editor-help/icon-move-blocks.native.js +7 -6
  458. package/build-module/components/editor-help/icon-move-blocks.native.js.map +1 -1
  459. package/build-module/components/editor-help/index.native.js +96 -76
  460. package/build-module/components/editor-help/index.native.js.map +1 -1
  461. package/build-module/components/editor-help/intro-to-blocks.native.js +43 -37
  462. package/build-module/components/editor-help/intro-to-blocks.native.js.map +1 -1
  463. package/build-module/components/editor-help/move-blocks.native.js +27 -21
  464. package/build-module/components/editor-help/move-blocks.native.js.map +1 -1
  465. package/build-module/components/editor-help/remove-blocks.native.js +14 -9
  466. package/build-module/components/editor-help/remove-blocks.native.js.map +1 -1
  467. package/build-module/components/editor-help/view-sections.native.js +25 -19
  468. package/build-module/components/editor-help/view-sections.native.js.map +1 -1
  469. package/build-module/components/editor-history/redo.js +2 -2
  470. package/build-module/components/editor-history/redo.js.map +1 -1
  471. package/build-module/components/editor-history/undo.js +2 -2
  472. package/build-module/components/editor-history/undo.js.map +1 -1
  473. package/build-module/components/editor-interface/content-slot-fill.js +16 -0
  474. package/build-module/components/editor-interface/content-slot-fill.js.map +1 -0
  475. package/build-module/components/editor-interface/index.js +172 -0
  476. package/build-module/components/editor-interface/index.js.map +1 -0
  477. package/build-module/components/editor-notices/index.js +25 -9
  478. package/build-module/components/editor-notices/index.js.map +1 -1
  479. package/build-module/components/editor-snackbars/index.js +2 -2
  480. package/build-module/components/editor-snackbars/index.js.map +1 -1
  481. package/build-module/components/entities-saved-states/entity-record-item.js +40 -11
  482. package/build-module/components/entities-saved-states/entity-record-item.js.map +1 -1
  483. package/build-module/components/entities-saved-states/entity-type-list.js +26 -22
  484. package/build-module/components/entities-saved-states/entity-type-list.js.map +1 -1
  485. package/build-module/components/entities-saved-states/index.js +54 -46
  486. package/build-module/components/entities-saved-states/index.js.map +1 -1
  487. package/build-module/components/error-boundary/index.js +27 -14
  488. package/build-module/components/error-boundary/index.js.map +1 -1
  489. package/build-module/components/error-boundary/index.native.js +46 -35
  490. package/build-module/components/error-boundary/index.native.js.map +1 -1
  491. package/build-module/components/global-keyboard-shortcuts/register-shortcuts.js +3 -3
  492. package/build-module/components/global-keyboard-shortcuts/register-shortcuts.js.map +1 -1
  493. package/build-module/components/global-styles-provider/index.js +185 -0
  494. package/build-module/components/global-styles-provider/index.js.map +1 -0
  495. package/build-module/components/header/back-button.js +28 -0
  496. package/build-module/components/header/back-button.js.map +1 -0
  497. package/build-module/components/header/index.js +169 -0
  498. package/build-module/components/header/index.js.map +1 -0
  499. package/build-module/components/inserter-sidebar/index.js +85 -34
  500. package/build-module/components/inserter-sidebar/index.js.map +1 -1
  501. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +2 -2
  502. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
  503. package/build-module/components/keyboard-shortcut-help-modal/index.js +55 -49
  504. package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  505. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +32 -26
  506. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
  507. package/build-module/components/list-view-sidebar/index.js +60 -47
  508. package/build-module/components/list-view-sidebar/index.js.map +1 -1
  509. package/build-module/components/list-view-sidebar/list-view-outline.js +23 -4
  510. package/build-module/components/list-view-sidebar/list-view-outline.js.map +1 -1
  511. package/build-module/components/local-autosave-monitor/index.js +15 -2
  512. package/build-module/components/local-autosave-monitor/index.js.map +1 -1
  513. package/build-module/components/mode-switcher/index.js +9 -8
  514. package/build-module/components/mode-switcher/index.js.map +1 -1
  515. package/build-module/components/more-menu/copy-content-menu-item.js +5 -4
  516. package/build-module/components/more-menu/copy-content-menu-item.js.map +1 -1
  517. package/build-module/components/more-menu/index.js +91 -76
  518. package/build-module/components/more-menu/index.js.map +1 -1
  519. package/build-module/components/more-menu/tools-more-menu-group.js +2 -2
  520. package/build-module/components/more-menu/tools-more-menu-group.js.map +1 -1
  521. package/build-module/components/more-menu/view-more-menu-group.js +2 -2
  522. package/build-module/components/more-menu/view-more-menu-group.js.map +1 -1
  523. package/build-module/components/offline-status/index.native.js +12 -9
  524. package/build-module/components/offline-status/index.native.js.map +1 -1
  525. package/build-module/components/page-attributes/order.js +90 -17
  526. package/build-module/components/page-attributes/order.js.map +1 -1
  527. package/build-module/components/page-attributes/panel.js +13 -21
  528. package/build-module/components/page-attributes/panel.js.map +1 -1
  529. package/build-module/components/page-attributes/parent.js +88 -5
  530. package/build-module/components/page-attributes/parent.js.map +1 -1
  531. package/build-module/components/pattern-duplicate-modal/index.js +51 -0
  532. package/build-module/components/pattern-duplicate-modal/index.js.map +1 -0
  533. package/build-module/components/pattern-overrides-panel/index.js +2 -2
  534. package/build-module/components/pattern-overrides-panel/index.js.map +1 -1
  535. package/build-module/components/pattern-rename-modal/index.js +50 -0
  536. package/build-module/components/pattern-rename-modal/index.js.map +1 -0
  537. package/build-module/components/plugin-document-setting-panel/index.js +19 -12
  538. package/build-module/components/plugin-document-setting-panel/index.js.map +1 -1
  539. package/build-module/components/plugin-post-publish-panel/index.js +10 -7
  540. package/build-module/components/plugin-post-publish-panel/index.js.map +1 -1
  541. package/build-module/components/plugin-post-status-info/index.js +7 -4
  542. package/build-module/components/plugin-post-status-info/index.js.map +1 -1
  543. package/build-module/components/plugin-pre-publish-panel/index.js +10 -7
  544. package/build-module/components/plugin-pre-publish-panel/index.js.map +1 -1
  545. package/build-module/components/plugin-sidebar/index.js +2 -2
  546. package/build-module/components/plugin-sidebar/index.js.map +1 -1
  547. package/build-module/components/plugin-sidebar-more-menu-item/index.js +2 -3
  548. package/build-module/components/plugin-sidebar-more-menu-item/index.js.map +1 -1
  549. package/build-module/components/post-actions/actions.js +458 -329
  550. package/build-module/components/post-actions/actions.js.map +1 -1
  551. package/build-module/components/post-actions/export-pattern-action.js +58 -0
  552. package/build-module/components/post-actions/export-pattern-action.js.map +1 -0
  553. package/build-module/components/post-actions/export-pattern-action.native.js +5 -0
  554. package/build-module/components/post-actions/export-pattern-action.native.js.map +1 -0
  555. package/build-module/components/post-actions/index.js +73 -62
  556. package/build-module/components/post-actions/index.js.map +1 -1
  557. package/build-module/components/post-author/check.js +5 -4
  558. package/build-module/components/post-author/check.js.map +1 -1
  559. package/build-module/components/post-author/combobox.js +4 -3
  560. package/build-module/components/post-author/combobox.js.map +1 -1
  561. package/build-module/components/post-author/hook.js +2 -1
  562. package/build-module/components/post-author/hook.js.map +1 -1
  563. package/build-module/components/post-author/index.js +3 -3
  564. package/build-module/components/post-author/index.js.map +1 -1
  565. package/build-module/components/post-author/panel.js +72 -4
  566. package/build-module/components/post-author/panel.js.map +1 -1
  567. package/build-module/components/post-author/select.js +4 -3
  568. package/build-module/components/post-author/select.js.map +1 -1
  569. package/build-module/components/post-card-panel/index.js +49 -38
  570. package/build-module/components/post-card-panel/index.js.map +1 -1
  571. package/build-module/components/post-comments/index.js +47 -9
  572. package/build-module/components/post-comments/index.js.map +1 -1
  573. package/build-module/components/post-content-information/index.js +8 -5
  574. package/build-module/components/post-content-information/index.js.map +1 -1
  575. package/build-module/components/post-discussion/panel.js +125 -26
  576. package/build-module/components/post-discussion/panel.js.map +1 -1
  577. package/build-module/components/post-excerpt/check.js +5 -4
  578. package/build-module/components/post-excerpt/check.js.map +1 -1
  579. package/build-module/components/post-excerpt/index.js +17 -15
  580. package/build-module/components/post-excerpt/index.js.map +1 -1
  581. package/build-module/components/post-excerpt/panel.js +60 -40
  582. package/build-module/components/post-excerpt/panel.js.map +1 -1
  583. package/build-module/components/post-excerpt/plugin.js +7 -4
  584. package/build-module/components/post-excerpt/plugin.js.map +1 -1
  585. package/build-module/components/post-featured-image/check.js +18 -6
  586. package/build-module/components/post-featured-image/check.js.map +1 -1
  587. package/build-module/components/post-featured-image/index.js +78 -49
  588. package/build-module/components/post-featured-image/index.js.map +1 -1
  589. package/build-module/components/post-featured-image/panel.js +22 -7
  590. package/build-module/components/post-featured-image/panel.js.map +1 -1
  591. package/build-module/components/post-format/check.js +14 -4
  592. package/build-module/components/post-format/check.js.map +1 -1
  593. package/build-module/components/post-format/index.js +39 -21
  594. package/build-module/components/post-format/index.js.map +1 -1
  595. package/build-module/components/post-format/panel.js +86 -0
  596. package/build-module/components/post-format/panel.js.map +1 -0
  597. package/build-module/components/post-last-edited-panel/index.js +7 -4
  598. package/build-module/components/post-last-edited-panel/index.js.map +1 -1
  599. package/build-module/components/post-last-revision/check.js +14 -4
  600. package/build-module/components/post-last-revision/check.js.map +1 -1
  601. package/build-module/components/post-last-revision/index.js +21 -13
  602. package/build-module/components/post-last-revision/index.js.map +1 -1
  603. package/build-module/components/post-last-revision/panel.js +13 -4
  604. package/build-module/components/post-last-revision/panel.js.map +1 -1
  605. package/build-module/components/post-locked-modal/index.js +60 -34
  606. package/build-module/components/post-locked-modal/index.js.map +1 -1
  607. package/build-module/components/post-panel-row/index.js +14 -10
  608. package/build-module/components/post-panel-row/index.js.map +1 -1
  609. package/build-module/components/post-panel-section/index.js +21 -0
  610. package/build-module/components/post-panel-section/index.js.map +1 -0
  611. package/build-module/components/post-pending-status/check.js +11 -0
  612. package/build-module/components/post-pending-status/check.js.map +1 -1
  613. package/build-module/components/post-pending-status/index.js +15 -7
  614. package/build-module/components/post-pending-status/index.js.map +1 -1
  615. package/build-module/components/post-pingbacks/index.js +16 -5
  616. package/build-module/components/post-pingbacks/index.js.map +1 -1
  617. package/build-module/components/post-preview-button/index.js +47 -21
  618. package/build-module/components/post-preview-button/index.js.map +1 -1
  619. package/build-module/components/post-publish-button/index.js +22 -11
  620. package/build-module/components/post-publish-button/index.js.map +1 -1
  621. package/build-module/components/post-publish-button/post-publish-button-or-toggle.js +2 -2
  622. package/build-module/components/post-publish-button/post-publish-button-or-toggle.js.map +1 -1
  623. package/build-module/components/post-publish-panel/index.js +48 -33
  624. package/build-module/components/post-publish-panel/index.js.map +1 -1
  625. package/build-module/components/post-publish-panel/maybe-category-panel.js +13 -9
  626. package/build-module/components/post-publish-panel/maybe-category-panel.js.map +1 -1
  627. package/build-module/components/post-publish-panel/maybe-post-format-panel.js +22 -15
  628. package/build-module/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
  629. package/build-module/components/post-publish-panel/maybe-tags-panel.js +14 -10
  630. package/build-module/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
  631. package/build-module/components/post-publish-panel/maybe-upload-media.js +30 -24
  632. package/build-module/components/post-publish-panel/maybe-upload-media.js.map +1 -1
  633. package/build-module/components/post-publish-panel/postpublish.js +57 -38
  634. package/build-module/components/post-publish-panel/postpublish.js.map +1 -1
  635. package/build-module/components/post-publish-panel/prepublish.js +43 -26
  636. package/build-module/components/post-publish-panel/prepublish.js.map +1 -1
  637. package/build-module/components/post-saved-state/index.js +10 -8
  638. package/build-module/components/post-saved-state/index.js.map +1 -1
  639. package/build-module/components/post-schedule/check.js +9 -0
  640. package/build-module/components/post-schedule/check.js.map +1 -1
  641. package/build-module/components/post-schedule/index.js +30 -6
  642. package/build-module/components/post-schedule/index.js.map +1 -1
  643. package/build-module/components/post-schedule/label.js +17 -0
  644. package/build-module/components/post-schedule/label.js.map +1 -1
  645. package/build-module/components/post-schedule/panel.js +43 -30
  646. package/build-module/components/post-schedule/panel.js.map +1 -1
  647. package/build-module/components/post-slug/check.js +5 -4
  648. package/build-module/components/post-slug/check.js.map +1 -1
  649. package/build-module/components/post-slug/index.js +5 -3
  650. package/build-module/components/post-slug/index.js.map +1 -1
  651. package/build-module/components/post-slug/panel.js +21 -0
  652. package/build-module/components/post-slug/panel.js.map +1 -0
  653. package/build-module/components/post-status/index.js +121 -120
  654. package/build-module/components/post-status/index.js.map +1 -1
  655. package/build-module/components/post-sticky/index.js +17 -9
  656. package/build-module/components/post-sticky/index.js.map +1 -1
  657. package/build-module/components/post-sticky/panel.js +16 -0
  658. package/build-module/components/post-sticky/panel.js.map +1 -0
  659. package/build-module/components/post-switch-to-draft-button/index.js +27 -21
  660. package/build-module/components/post-switch-to-draft-button/index.js.map +1 -1
  661. package/build-module/components/post-sync-status/index.js +8 -6
  662. package/build-module/components/post-sync-status/index.js.map +1 -1
  663. package/build-module/components/post-taxonomies/flat-term-selector.js +22 -18
  664. package/build-module/components/post-taxonomies/flat-term-selector.js.map +1 -1
  665. package/build-module/components/post-taxonomies/hierarchical-term-selector.js +71 -59
  666. package/build-module/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
  667. package/build-module/components/post-taxonomies/index.js +6 -6
  668. package/build-module/components/post-taxonomies/index.js.map +1 -1
  669. package/build-module/components/post-taxonomies/most-used-terms.js +20 -15
  670. package/build-module/components/post-taxonomies/most-used-terms.js.map +1 -1
  671. package/build-module/components/post-taxonomies/panel.js +15 -11
  672. package/build-module/components/post-taxonomies/panel.js.map +1 -1
  673. package/build-module/components/post-template/block-theme.js +44 -32
  674. package/build-module/components/post-template/block-theme.js.map +1 -1
  675. package/build-module/components/post-template/classic-theme.js +74 -50
  676. package/build-module/components/post-template/classic-theme.js.map +1 -1
  677. package/build-module/components/post-template/create-new-template-modal.js +34 -27
  678. package/build-module/components/post-template/create-new-template-modal.js.map +1 -1
  679. package/build-module/components/post-template/create-new-template.js +16 -11
  680. package/build-module/components/post-template/create-new-template.js.map +1 -1
  681. package/build-module/components/post-template/panel.js +17 -9
  682. package/build-module/components/post-template/panel.js.map +1 -1
  683. package/build-module/components/post-template/reset-default-template.js +5 -4
  684. package/build-module/components/post-template/reset-default-template.js.map +1 -1
  685. package/build-module/components/post-template/swap-template-button.js +22 -15
  686. package/build-module/components/post-template/swap-template-button.js.map +1 -1
  687. package/build-module/components/post-text-editor/index.js +30 -19
  688. package/build-module/components/post-text-editor/index.js.map +1 -1
  689. package/build-module/components/post-title/index.js +31 -20
  690. package/build-module/components/post-title/index.js.map +1 -1
  691. package/build-module/components/post-title/index.native.js +81 -57
  692. package/build-module/components/post-title/index.native.js.map +1 -1
  693. package/build-module/components/post-title/post-title-raw.js +13 -4
  694. package/build-module/components/post-title/post-title-raw.js.map +1 -1
  695. package/build-module/components/post-title/use-post-title-focus.js +8 -0
  696. package/build-module/components/post-title/use-post-title-focus.js.map +1 -1
  697. package/build-module/components/post-title/use-post-title.js +6 -0
  698. package/build-module/components/post-title/use-post-title.js.map +1 -1
  699. package/build-module/components/post-transform-panel/hooks.js +83 -0
  700. package/build-module/components/post-transform-panel/hooks.js.map +1 -0
  701. package/build-module/components/post-transform-panel/index.js +94 -0
  702. package/build-module/components/post-transform-panel/index.js.map +1 -0
  703. package/build-module/components/post-trash/index.js +21 -15
  704. package/build-module/components/post-trash/index.js.map +1 -1
  705. package/build-module/components/post-type-support-check/index.js +1 -1
  706. package/build-module/components/post-type-support-check/index.js.map +1 -1
  707. package/build-module/components/post-url/check.js +9 -0
  708. package/build-module/components/post-url/check.js.map +1 -1
  709. package/build-module/components/post-url/index.js +100 -72
  710. package/build-module/components/post-url/index.js.map +1 -1
  711. package/build-module/components/post-url/label.js +12 -0
  712. package/build-module/components/post-url/label.js.map +1 -1
  713. package/build-module/components/post-url/panel.js +35 -24
  714. package/build-module/components/post-url/panel.js.map +1 -1
  715. package/build-module/components/post-view-link/index.js +2 -2
  716. package/build-module/components/post-view-link/index.js.map +1 -1
  717. package/build-module/components/post-visibility/check.js +10 -0
  718. package/build-module/components/post-visibility/check.js.map +1 -1
  719. package/build-module/components/post-visibility/index.js +85 -67
  720. package/build-module/components/post-visibility/index.js.map +1 -1
  721. package/build-module/components/post-visibility/label.js +12 -0
  722. package/build-module/components/post-visibility/label.js.map +1 -1
  723. package/build-module/components/posts-per-page/index.js +103 -0
  724. package/build-module/components/posts-per-page/index.js.map +1 -0
  725. package/build-module/components/preferences-modal/enable-plugin-document-setting-panel.js +7 -5
  726. package/build-module/components/preferences-modal/enable-plugin-document-setting-panel.js.map +1 -1
  727. package/build-module/components/preferences-modal/index.js +126 -102
  728. package/build-module/components/preferences-modal/index.js.map +1 -1
  729. package/build-module/components/preview-dropdown/index.js +49 -31
  730. package/build-module/components/preview-dropdown/index.js.map +1 -1
  731. package/build-module/components/provider/index.js +98 -20
  732. package/build-module/components/provider/index.js.map +1 -1
  733. package/build-module/components/provider/index.native.js +58 -20
  734. package/build-module/components/provider/index.native.js.map +1 -1
  735. package/build-module/components/provider/use-block-editor-settings.js +23 -4
  736. package/build-module/components/provider/use-block-editor-settings.js.map +1 -1
  737. package/build-module/components/provider/with-registry-provider.js +33 -26
  738. package/build-module/components/provider/with-registry-provider.js.map +1 -1
  739. package/build-module/components/resizable-editor/index.js +89 -0
  740. package/build-module/components/resizable-editor/index.js.map +1 -0
  741. package/build-module/components/resizable-editor/resize-handle.js +54 -0
  742. package/build-module/components/resizable-editor/resize-handle.js.map +1 -0
  743. package/build-module/components/save-publish-panels/index.js +37 -26
  744. package/build-module/components/save-publish-panels/index.js.map +1 -1
  745. package/build-module/components/sidebar/constants.js +5 -0
  746. package/build-module/components/sidebar/constants.js.map +1 -0
  747. package/build-module/components/sidebar/header.js +50 -0
  748. package/build-module/components/sidebar/header.js.map +1 -0
  749. package/build-module/components/sidebar/index.js +154 -0
  750. package/build-module/components/sidebar/index.js.map +1 -0
  751. package/build-module/components/sidebar/post-summary.js +85 -0
  752. package/build-module/components/sidebar/post-summary.js.map +1 -0
  753. package/build-module/components/site-discussion/index.js +127 -0
  754. package/build-module/components/site-discussion/index.js.map +1 -0
  755. package/build-module/components/start-page-options/index.js +18 -18
  756. package/build-module/components/start-page-options/index.js.map +1 -1
  757. package/build-module/components/start-template-options/index.js +192 -0
  758. package/build-module/components/start-template-options/index.js.map +1 -0
  759. package/build-module/components/table-of-contents/index.js +4 -4
  760. package/build-module/components/table-of-contents/index.js.map +1 -1
  761. package/build-module/components/table-of-contents/panel.js +55 -35
  762. package/build-module/components/table-of-contents/panel.js.map +1 -1
  763. package/build-module/components/template-areas/index.js +37 -22
  764. package/build-module/components/template-areas/index.js.map +1 -1
  765. package/build-module/components/template-content-panel/index.js +32 -0
  766. package/build-module/components/template-content-panel/index.js.map +1 -0
  767. package/build-module/components/template-validation-notice/index.js +27 -21
  768. package/build-module/components/template-validation-notice/index.js.map +1 -1
  769. package/build-module/components/text-editor/index.js +66 -0
  770. package/build-module/components/text-editor/index.js.map +1 -0
  771. package/build-module/components/time-to-read/index.js +7 -6
  772. package/build-module/components/time-to-read/index.js.map +1 -1
  773. package/build-module/components/{editor-canvas → visual-editor}/edit-template-blocks-notification.js +5 -4
  774. package/build-module/components/visual-editor/edit-template-blocks-notification.js.map +1 -0
  775. package/build-module/components/{editor-canvas → visual-editor}/index.js +133 -79
  776. package/build-module/components/visual-editor/index.js.map +1 -0
  777. package/build-module/components/word-count/index.js +5 -4
  778. package/build-module/components/word-count/index.js.map +1 -1
  779. package/build-module/hooks/custom-sources-backwards-compatibility.js +2 -2
  780. package/build-module/hooks/custom-sources-backwards-compatibility.js.map +1 -1
  781. package/build-module/hooks/index.js +1 -0
  782. package/build-module/hooks/index.js.map +1 -1
  783. package/build-module/hooks/media-upload.js +7 -0
  784. package/build-module/hooks/media-upload.js.map +1 -0
  785. package/build-module/hooks/pattern-overrides.js +27 -16
  786. package/build-module/hooks/pattern-overrides.js.map +1 -1
  787. package/build-module/private-apis.js +15 -38
  788. package/build-module/private-apis.js.map +1 -1
  789. package/build-module/private-apis.native.js +38 -0
  790. package/build-module/private-apis.native.js.map +1 -0
  791. package/build-module/store/constants.js +3 -0
  792. package/build-module/store/constants.js.map +1 -1
  793. package/build-module/store/private-actions.js +10 -14
  794. package/build-module/store/private-actions.js.map +1 -1
  795. package/build-module/store/private-selectors.js +41 -1
  796. package/build-module/store/private-selectors.js.map +1 -1
  797. package/build-module/store/reducer.js +14 -0
  798. package/build-module/store/reducer.js.map +1 -1
  799. package/build-module/store/selectors.js +1 -1
  800. package/build-module/store/selectors.js.map +1 -1
  801. package/build-module/utils/set-nested-value.js +38 -0
  802. package/build-module/utils/set-nested-value.js.map +1 -0
  803. package/build-style/style-rtl.css +623 -85
  804. package/build-style/style.css +623 -85
  805. package/package.json +43 -37
  806. package/src/bindings/index.js +1 -4
  807. package/src/bindings/pattern-overrides.js +84 -2
  808. package/src/bindings/post-meta.js +46 -6
  809. package/src/components/autocompleters/style.scss +1 -2
  810. package/src/components/block-settings-menu/content-only-settings-menu.js +175 -0
  811. package/src/components/block-settings-menu/content-only-settings-menu.native.js +4 -0
  812. package/src/components/block-settings-menu/style.scss +4 -0
  813. package/src/components/blog-title/index.js +124 -0
  814. package/src/components/blog-title/style.scss +4 -0
  815. package/src/components/collapsible-block-toolbar/index.js +2 -2
  816. package/src/components/commands/index.js +113 -3
  817. package/src/components/create-template-part-modal/index.js +205 -0
  818. package/src/components/create-template-part-modal/style.scss +69 -0
  819. package/src/components/create-template-part-modal/test/utils.js +60 -0
  820. package/src/components/create-template-part-modal/utils.js +67 -0
  821. package/src/components/document-bar/index.js +34 -23
  822. package/src/components/document-outline/item.js +2 -2
  823. package/src/components/document-tools/index.js +21 -28
  824. package/src/components/editor-help/help-get-support-button.native.js +1 -1
  825. package/src/components/editor-interface/content-slot-fill.js +15 -0
  826. package/src/components/editor-interface/index.js +230 -0
  827. package/src/components/editor-notices/index.js +10 -0
  828. package/src/components/entities-saved-states/entity-record-item.js +45 -16
  829. package/src/components/entities-saved-states/style.scss +13 -0
  830. package/src/components/error-boundary/index.js +10 -0
  831. package/src/components/error-boundary/index.native.js +1 -1
  832. package/src/components/global-keyboard-shortcuts/register-shortcuts.js +1 -1
  833. package/src/components/global-styles-provider/index.js +254 -0
  834. package/src/components/header/back-button.js +27 -0
  835. package/src/components/header/index.js +169 -0
  836. package/src/components/header/style.scss +236 -0
  837. package/src/components/inserter-sidebar/index.js +92 -36
  838. package/src/components/inserter-sidebar/style.scss +1 -7
  839. package/src/components/keyboard-shortcut-help-modal/index.js +2 -2
  840. package/src/components/list-view-sidebar/style.scss +1 -0
  841. package/src/components/local-autosave-monitor/index.js +12 -0
  842. package/src/components/page-attributes/order.js +79 -3
  843. package/src/components/page-attributes/panel.js +10 -26
  844. package/src/components/page-attributes/parent.js +98 -2
  845. package/src/components/page-attributes/style.scss +19 -0
  846. package/src/components/page-attributes/test/order.js +5 -1
  847. package/src/components/pattern-duplicate-modal/index.js +50 -0
  848. package/src/components/pattern-rename-modal/index.js +44 -0
  849. package/src/components/post-actions/actions.js +522 -371
  850. package/src/components/post-actions/export-pattern-action.js +74 -0
  851. package/src/components/post-actions/export-pattern-action.native.js +4 -0
  852. package/src/components/post-actions/index.js +20 -42
  853. package/src/components/post-author/combobox.js +1 -0
  854. package/src/components/post-author/hook.js +1 -1
  855. package/src/components/post-author/panel.js +63 -2
  856. package/src/components/post-author/select.js +1 -0
  857. package/src/components/post-author/style.scss +6 -0
  858. package/src/components/post-card-panel/index.js +56 -55
  859. package/src/components/post-card-panel/style.scss +23 -1
  860. package/src/components/post-comments/index.js +52 -9
  861. package/src/components/post-discussion/panel.js +115 -31
  862. package/src/components/post-discussion/style.scss +24 -0
  863. package/src/components/post-excerpt/panel.js +45 -48
  864. package/src/components/post-excerpt/style.scss +0 -17
  865. package/src/components/post-featured-image/check.js +9 -0
  866. package/src/components/post-featured-image/index.js +15 -0
  867. package/src/components/post-featured-image/panel.js +9 -0
  868. package/src/components/post-format/check.js +8 -0
  869. package/src/components/post-format/index.js +15 -4
  870. package/src/components/post-format/panel.js +87 -0
  871. package/src/components/post-format/style.scss +12 -0
  872. package/src/components/post-last-revision/check.js +8 -0
  873. package/src/components/post-last-revision/index.js +7 -2
  874. package/src/components/post-last-revision/panel.js +5 -0
  875. package/src/components/post-last-revision/test/check.js +5 -1
  876. package/src/components/post-locked-modal/index.js +6 -0
  877. package/src/components/post-panel-row/index.js +2 -2
  878. package/src/components/post-panel-row/style.scss +15 -0
  879. package/src/components/post-panel-section/index.js +19 -0
  880. package/src/components/post-panel-section/style.scss +3 -0
  881. package/src/components/post-pending-status/check.js +10 -0
  882. package/src/components/post-pending-status/index.js +5 -0
  883. package/src/components/post-pingbacks/index.js +17 -2
  884. package/src/components/post-preview-button/index.js +15 -0
  885. package/src/components/post-publish-button/index.js +17 -4
  886. package/src/components/post-publish-panel/index.js +1 -0
  887. package/src/components/post-publish-panel/maybe-tags-panel.js +1 -1
  888. package/src/components/post-publish-panel/style.scss +5 -0
  889. package/src/components/post-publish-panel/test/__snapshots__/index.js.snap +3 -3
  890. package/src/components/post-saved-state/index.js +2 -2
  891. package/src/components/post-schedule/check.js +8 -0
  892. package/src/components/post-schedule/index.js +30 -3
  893. package/src/components/post-schedule/label.js +15 -0
  894. package/src/components/post-schedule/panel.js +9 -1
  895. package/src/components/post-schedule/style.scss +0 -11
  896. package/src/components/post-slug/panel.js +22 -0
  897. package/src/components/post-slug/style.scss +5 -0
  898. package/src/components/post-slug/test/index.js +5 -1
  899. package/src/components/post-status/index.js +30 -52
  900. package/src/components/post-status/style.scss +4 -34
  901. package/src/components/post-sticky/index.js +12 -7
  902. package/src/components/post-sticky/panel.js +18 -0
  903. package/src/components/post-sticky/style.scss +3 -0
  904. package/src/components/post-template/block-theme.js +1 -0
  905. package/src/components/post-template/classic-theme.js +15 -0
  906. package/src/components/post-template/panel.js +5 -0
  907. package/src/components/post-template/style.scss +0 -8
  908. package/src/components/post-text-editor/index.js +5 -0
  909. package/src/components/post-title/index.js +10 -3
  910. package/src/components/post-title/index.native.js +70 -35
  911. package/src/components/post-title/post-title-raw.js +10 -2
  912. package/src/components/post-title/use-post-title-focus.js +7 -0
  913. package/src/components/post-title/use-post-title.js +5 -0
  914. package/src/components/post-transform-panel/hooks.js +114 -0
  915. package/src/components/post-transform-panel/index.js +91 -0
  916. package/src/components/post-type-support-check/index.js +1 -1
  917. package/src/components/post-type-support-check/test/index.js +2 -2
  918. package/src/components/post-url/check.js +8 -0
  919. package/src/components/post-url/index.js +41 -24
  920. package/src/components/post-url/label.js +10 -0
  921. package/src/components/post-url/panel.js +6 -1
  922. package/src/components/post-url/style.scss +0 -9
  923. package/src/components/post-visibility/check.js +9 -0
  924. package/src/components/post-visibility/index.js +7 -0
  925. package/src/components/post-visibility/label.js +10 -0
  926. package/src/components/posts-per-page/index.js +101 -0
  927. package/src/components/posts-per-page/style.scss +4 -0
  928. package/src/components/preferences-modal/index.js +3 -3
  929. package/src/components/provider/index.js +72 -0
  930. package/src/components/provider/index.native.js +43 -2
  931. package/src/components/provider/use-block-editor-settings.js +19 -6
  932. package/src/components/provider/with-registry-provider.js +32 -31
  933. package/src/components/resizable-editor/index.js +90 -0
  934. package/src/components/resizable-editor/resize-handle.js +62 -0
  935. package/src/components/resizable-editor/style.scss +53 -0
  936. package/src/components/save-publish-panels/index.js +10 -2
  937. package/src/components/sidebar/constants.js +4 -0
  938. package/src/components/sidebar/header.js +49 -0
  939. package/src/components/sidebar/index.js +196 -0
  940. package/src/components/sidebar/post-summary.js +97 -0
  941. package/src/components/sidebar/style.scss +18 -0
  942. package/src/components/site-discussion/index.js +138 -0
  943. package/src/components/site-discussion/style.scss +19 -0
  944. package/src/components/start-page-options/index.js +6 -4
  945. package/src/components/start-template-options/index.js +219 -0
  946. package/src/components/start-template-options/style.scss +47 -0
  947. package/src/components/template-areas/index.js +15 -6
  948. package/src/components/template-areas/style.scss +0 -1
  949. package/src/components/template-content-panel/index.js +36 -0
  950. package/src/components/text-editor/index.js +57 -0
  951. package/src/components/text-editor/style.scss +71 -0
  952. package/src/components/{editor-canvas → visual-editor}/index.js +191 -110
  953. package/src/components/visual-editor/style.scss +37 -0
  954. package/src/hooks/index.js +1 -0
  955. package/src/hooks/media-upload.js +11 -0
  956. package/src/hooks/pattern-overrides.js +12 -6
  957. package/src/private-apis.js +18 -38
  958. package/src/private-apis.native.js +37 -0
  959. package/src/store/constants.js +7 -0
  960. package/src/store/private-actions.js +22 -50
  961. package/src/store/private-selectors.js +48 -0
  962. package/src/store/reducer.js +12 -0
  963. package/src/store/selectors.js +1 -1
  964. package/src/style.scss +16 -0
  965. package/src/utils/set-nested-value.js +39 -0
  966. package/build/components/editor-canvas/edit-template-blocks-notification.js.map +0 -1
  967. package/build/components/editor-canvas/index.js.map +0 -1
  968. package/build-module/components/editor-canvas/edit-template-blocks-notification.js.map +0 -1
  969. package/build-module/components/editor-canvas/index.js.map +0 -1
  970. package/src/components/post-slug/test/check.js +0 -17
  971. package/src/components/provider/README.md +0 -37
  972. /package/src/components/{editor-canvas → visual-editor}/edit-template-blocks-notification.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"names":["useDispatch","useSelect","Button","VisuallyHidden","__experimentalLibrary","Library","close","useViewportMatch","__experimentalUseDialog","useDialog","__","useRef","store","preferencesStore","unlock","editorStore","InserterSidebar","closeGeneralSidebar","isRightSidebarOpen","insertionPoint","showMostUsedBlocks","select","getInsertionPoint","get","setIsInserterOpened","isMobileViewport","TagName","inserterDialogRef","inserterDialogProps","onClose","focusOnMount","libraryRef","createElement","ref","className","icon","label","onClick","showInserterHelpPanel","shouldFocusBlock","rootClientId","__experimentalInsertionIndex","insertionIndex","__experimentalFilterValue","filterValue","__experimentalOnPatternCategorySelection","undefined"],"sources":["@wordpress/editor/src/components/inserter-sidebar/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { Button, VisuallyHidden } from '@wordpress/components';\nimport { __experimentalLibrary as Library } from '@wordpress/block-editor';\nimport { close } from '@wordpress/icons';\nimport {\n\tuseViewportMatch,\n\t__experimentalUseDialog as useDialog,\n} from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\nimport { useRef } from '@wordpress/element';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as editorStore } from '../../store';\n\nexport default function InserterSidebar( {\n\tcloseGeneralSidebar,\n\tisRightSidebarOpen,\n} ) {\n\tconst { insertionPoint, showMostUsedBlocks } = useSelect( ( select ) => {\n\t\tconst { getInsertionPoint } = unlock( select( editorStore ) );\n\t\tconst { get } = select( preferencesStore );\n\t\treturn {\n\t\t\tinsertionPoint: getInsertionPoint(),\n\t\t\tshowMostUsedBlocks: get( 'core', 'mostUsedBlocks' ),\n\t\t};\n\t}, [] );\n\tconst { setIsInserterOpened } = useDispatch( editorStore );\n\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst TagName = ! isMobileViewport ? VisuallyHidden : 'div';\n\tconst [ inserterDialogRef, inserterDialogProps ] = useDialog( {\n\t\tonClose: () => setIsInserterOpened( false ),\n\t\tfocusOnMount: true,\n\t} );\n\n\tconst libraryRef = useRef();\n\n\treturn (\n\t\t<div\n\t\t\tref={ inserterDialogRef }\n\t\t\t{ ...inserterDialogProps }\n\t\t\tclassName=\"editor-inserter-sidebar\"\n\t\t>\n\t\t\t<TagName className=\"editor-inserter-sidebar__header\">\n\t\t\t\t<Button\n\t\t\t\t\ticon={ close }\n\t\t\t\t\tlabel={ __( 'Close block inserter' ) }\n\t\t\t\t\tonClick={ () => setIsInserterOpened( false ) }\n\t\t\t\t/>\n\t\t\t</TagName>\n\t\t\t<div className=\"editor-inserter-sidebar__content\">\n\t\t\t\t<Library\n\t\t\t\t\tshowMostUsedBlocks={ showMostUsedBlocks }\n\t\t\t\t\tshowInserterHelpPanel\n\t\t\t\t\tshouldFocusBlock={ isMobileViewport }\n\t\t\t\t\trootClientId={ insertionPoint.rootClientId }\n\t\t\t\t\t__experimentalInsertionIndex={\n\t\t\t\t\t\tinsertionPoint.insertionIndex\n\t\t\t\t\t}\n\t\t\t\t\t__experimentalFilterValue={ insertionPoint.filterValue }\n\t\t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AAC;EAC1D,MAAMmB,OAAO,GAAG,CAAED,gBAAgB,GAAGtB,cAAc,GAAG,KAAK;EAC3D,MAAM,CAAEwB,iBAAiB,EAAEC,mBAAmB,CAAE,GAAGnB,SAAS,CAAE;IAC7DoB,OAAO,EAAEA,CAAA,KAAML,mBAAmB,CAAE,KAAM,CAAC;IAC3CM,YAAY,EAAE;EACf,CAAE,CAAC;EAEH,MAAMC,UAAU,GAAGpB,MAAM,CAAC,CAAC;EAE3B,OACCqB,aAAA;IACCC,GAAG,EAAGN,iBAAmB;IAAA,GACpBC,mBAAmB;IACxBM,SAAS,EAAC;EAAyB,GAEnCF,aAAA,CAACN,OAAO;IAACQ,SAAS,EAAC;EAAiC,GACnDF,aAAA,CAAC9B,MAAM;IACNiC,IAAI,EAAG7B,KAAO;IACd8B,KAAK,EAAG1B,EAAE,CAAE,sBAAuB,CAAG;IACtC2B,OAAO,EAAGA,CAAA,KAAMb,mBAAmB,CAAE,KAAM;EAAG,CAC9C,CACO,CAAC,EACVQ,aAAA;IAAKE,SAAS,EAAC;EAAkC,GAChDF,aAAA,CAAC3B,OAAO;IACPe,kBAAkB,EAAGA,kBAAoB;IACzCkB,qBAAqB;IACrBC,gBAAgB,EAAGd,gBAAkB;IACrCe,YAAY,EAAGrB,cAAc,CAACqB,YAAc;IAC5CC,4BAA4B,EAC3BtB,cAAc,CAACuB,cACf;IACDC,yBAAyB,EAAGxB,cAAc,CAACyB,WAAa;IACxDC,wCAAwC,EACvC3B,kBAAkB,GAAGD,mBAAmB,GAAG6B,SAC3C;IACDb,GAAG,EAAGF;EAAY,CAClB,CACG,CACD,CAAC;AAER","ignoreList":[]}
1
+ {"version":3,"names":["useDispatch","useSelect","store","blockEditorStore","privateApis","blockEditorPrivateApis","useViewportMatch","__experimentalUseDialog","useDialog","useCallback","useRef","preferencesStore","ESCAPE","interfaceStore","unlock","editorStore","jsx","_jsx","PrivateInserterLibrary","InserterSidebar","blockSectionRootClientId","inserterSidebarToggleRef","insertionPoint","showMostUsedBlocks","sidebarIsOpened","select","getInserterSidebarToggleRef","getInsertionPoint","isPublishSidebarOpened","getBlockRootClientId","__unstableGetEditorMode","getSettings","get","getActiveComplementaryArea","getBlockSectionRootClientId","sectionRootClientId","setIsInserterOpened","disableComplementaryArea","isMobileViewport","inserterDialogRef","inserterDialogProps","onClose","focusOnMount","libraryRef","closeInserterSidebar","current","focus","closeOnEscape","event","keyCode","defaultPrevented","preventDefault","inserterContents","className","children","showInserterHelpPanel","shouldFocusBlock","rootClientId","__experimentalInsertionIndex","insertionIndex","__experimentalInitialTab","tab","__experimentalInitialCategory","category","__experimentalFilterValue","filterValue","onPatternCategorySelection","undefined","ref","window","__experimentalEnableZoomedOutPatternsTab","onKeyDown"],"sources":["@wordpress/editor/src/components/inserter-sidebar/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport {\n\tstore as blockEditorStore,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport {\n\tuseViewportMatch,\n\t__experimentalUseDialog as useDialog,\n} from '@wordpress/compose';\nimport { useCallback, useRef } from '@wordpress/element';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { ESCAPE } from '@wordpress/keycodes';\nimport { store as interfaceStore } from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as editorStore } from '../../store';\n\nconst { PrivateInserterLibrary } = unlock( blockEditorPrivateApis );\n\nexport default function InserterSidebar() {\n\tconst {\n\t\tblockSectionRootClientId,\n\t\tinserterSidebarToggleRef,\n\t\tinsertionPoint,\n\t\tshowMostUsedBlocks,\n\t\tsidebarIsOpened,\n\t} = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetInserterSidebarToggleRef,\n\t\t\tgetInsertionPoint,\n\t\t\tisPublishSidebarOpened,\n\t\t} = unlock( select( editorStore ) );\n\t\tconst { getBlockRootClientId, __unstableGetEditorMode, getSettings } =\n\t\t\tselect( blockEditorStore );\n\t\tconst { get } = select( preferencesStore );\n\t\tconst { getActiveComplementaryArea } = select( interfaceStore );\n\t\tconst getBlockSectionRootClientId = () => {\n\t\t\tif ( __unstableGetEditorMode() === 'zoom-out' ) {\n\t\t\t\tconst { sectionRootClientId } = unlock( getSettings() );\n\t\t\t\tif ( sectionRootClientId ) {\n\t\t\t\t\treturn sectionRootClientId;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn getBlockRootClientId();\n\t\t};\n\t\treturn {\n\t\t\tinserterSidebarToggleRef: getInserterSidebarToggleRef(),\n\t\t\tinsertionPoint: getInsertionPoint(),\n\t\t\tshowMostUsedBlocks: get( 'core', 'mostUsedBlocks' ),\n\t\t\tblockSectionRootClientId: getBlockSectionRootClientId(),\n\t\t\tsidebarIsOpened: !! (\n\t\t\t\tgetActiveComplementaryArea( 'core' ) || isPublishSidebarOpened()\n\t\t\t),\n\t\t};\n\t}, [] );\n\tconst { setIsInserterOpened } = useDispatch( editorStore );\n\tconst { disableComplementaryArea } = useDispatch( interfaceStore );\n\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst [ inserterDialogRef, inserterDialogProps ] = useDialog( {\n\t\tonClose: () => setIsInserterOpened( false ),\n\t\tfocusOnMount: true,\n\t} );\n\tconst libraryRef = useRef();\n\n\t// When closing the inserter, focus should return to the toggle button.\n\tconst closeInserterSidebar = useCallback( () => {\n\t\tsetIsInserterOpened( false );\n\t\tinserterSidebarToggleRef.current?.focus();\n\t}, [ inserterSidebarToggleRef, setIsInserterOpened ] );\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\tcloseInserterSidebar();\n\t\t\t}\n\t\t},\n\t\t[ closeInserterSidebar ]\n\t);\n\n\tconst inserterContents = (\n\t\t<div className=\"editor-inserter-sidebar__content\">\n\t\t\t<PrivateInserterLibrary\n\t\t\t\tshowMostUsedBlocks={ showMostUsedBlocks }\n\t\t\t\tshowInserterHelpPanel\n\t\t\t\tshouldFocusBlock={ isMobileViewport }\n\t\t\t\trootClientId={\n\t\t\t\t\tblockSectionRootClientId ?? insertionPoint.rootClientId\n\t\t\t\t}\n\t\t\t\t__experimentalInsertionIndex={ insertionPoint.insertionIndex }\n\t\t\t\t__experimentalInitialTab={ insertionPoint.tab }\n\t\t\t\t__experimentalInitialCategory={ insertionPoint.category }\n\t\t\t\t__experimentalFilterValue={ insertionPoint.filterValue }\n\t\t\t\tonPatternCategorySelection={\n\t\t\t\t\tsidebarIsOpened\n\t\t\t\t\t\t? () => disableComplementaryArea( 'core' )\n\t\t\t\t\t\t: undefined\n\t\t\t\t}\n\t\t\t\tref={ libraryRef }\n\t\t\t\tonClose={ closeInserterSidebar }\n\t\t\t/>\n\t\t</div>\n\t);\n\n\tif ( window.__experimentalEnableZoomedOutPatternsTab ) {\n\t\treturn (\n\t\t\t// eslint-disable-next-line jsx-a11y/no-static-element-interactions\n\t\t\t<div\n\t\t\t\tonKeyDown={ closeOnEscape }\n\t\t\t\tclassName=\"editor-inserter-sidebar\"\n\t\t\t>\n\t\t\t\t{ inserterContents }\n\t\t\t</div>\n\t\t);\n\t}\n\treturn (\n\t\t<div\n\t\t\tref={ inserterDialogRef }\n\t\t\t{ ...inserterDialogProps }\n\t\t\tclassName=\"editor-inserter-sidebar\"\n\t\t>\n\t\t\t{ inserterContents }\n\t\t</div>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,WAAW,EAAEC,SAAS,QAAQ,iBAAiB;AACxD,SACCC,KAAK,IAAIC,gBAAgB,EACzBC,WAAW,IAAIC,sBAAsB,QAC/B,yBAAyB;AAChC,SACCC,gBAAgB,EAChBC,uBAAuB,IAAIC,SAAS,QAC9B,oBAAoB;AAC3B,SAASC,WAAW,EAAEC,MAAM,QAAQ,oBAAoB;AACxD,SAASR,KAAK,IAAIS,gBAAgB,QAAQ,wBAAwB;A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gB,EAAGlB,gBAAkB;MACrCmB,YAAY,EACXrC,wBAAwB,aAAxBA,wBAAwB,cAAxBA,wBAAwB,GAAIE,cAAc,CAACmC,YAC3C;MACDC,4BAA4B,EAAGpC,cAAc,CAACqC,cAAgB;MAC9DC,wBAAwB,EAAGtC,cAAc,CAACuC,GAAK;MAC/CC,6BAA6B,EAAGxC,cAAc,CAACyC,QAAU;MACzDC,yBAAyB,EAAG1C,cAAc,CAAC2C,WAAa;MACxDC,0BAA0B,EACzB1C,eAAe,GACZ,MAAMa,wBAAwB,CAAE,MAAO,CAAC,GACxC8B,SACH;MACDC,GAAG,EAAGzB,UAAY;MAClBF,OAAO,EAAGG;IAAsB,CAChC;EAAC,CACE,CACL;EAED,IAAKyB,MAAM,CAACC,wCAAwC,EAAG;IACtD;MAAA;MACC;MACArD,IAAA;QACCsD,SAAS,EAAGxB,aAAe;QAC3BM,SAAS,EAAC,yBAAyB;QAAAC,QAAA,EAEjCF;MAAgB,CACd;IAAC;EAER;EACA,oBACCnC,IAAA;IACCmD,GAAG,EAAG7B,iBAAmB;IAAA,GACpBC,mBAAmB;IACxBa,SAAS,EAAC,yBAAyB;IAAAC,QAAA,EAEjCF;EAAgB,CACd,CAAC;AAER","ignoreList":[]}
@@ -1,4 +1,3 @@
1
- import { createElement } from "react";
2
1
  /**
3
2
  * WordPress dependencies
4
3
  */
@@ -9,6 +8,7 @@ import { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';
9
8
  * Internal dependencies
10
9
  */
11
10
  import Shortcut from './shortcut';
11
+ import { jsx as _jsx } from "react/jsx-runtime";
12
12
  function DynamicShortcut({
13
13
  name
14
14
  }) {
@@ -31,7 +31,7 @@ function DynamicShortcut({
31
31
  if (!keyCombination) {
32
32
  return null;
33
33
  }
34
- return createElement(Shortcut, {
34
+ return /*#__PURE__*/_jsx(Shortcut, {
35
35
  keyCombination: keyCombination,
36
36
  description: description,
37
37
  aliases: aliases
@@ -1 +1 @@
1
- {"version":3,"names":["useSelect","store","keyboardShortcutsStore","Shortcut","DynamicShortcut","name","keyCombination","description","aliases","select","getShortcutKeyCombination","getShortcutDescription","getShortcutAliases","createElement"],"sources":["@wordpress/editor/src/components/keyboard-shortcut-help-modal/dynamic-shortcut.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\n\n/**\n * Internal dependencies\n */\nimport Shortcut from './shortcut';\n\nfunction DynamicShortcut( { name } ) {\n\tconst { keyCombination, description, aliases } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetShortcutKeyCombination,\n\t\t\t\tgetShortcutDescription,\n\t\t\t\tgetShortcutAliases,\n\t\t\t} = select( keyboardShortcutsStore );\n\n\t\t\treturn {\n\t\t\t\tkeyCombination: getShortcutKeyCombination( name ),\n\t\t\t\taliases: getShortcutAliases( name ),\n\t\t\t\tdescription: getShortcutDescription( name ),\n\t\t\t};\n\t\t},\n\t\t[ name ]\n\t);\n\n\tif ( ! keyCombination ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Shortcut\n\t\t\tkeyCombination={ keyCombination }\n\t\t\tdescription={ description }\n\t\t\taliases={ aliases }\n\t\t/>\n\t);\n}\n\nexport default DynamicShortcut;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,KAAK,IAAIC,sBAAsB,QAAQ,+BAA+B;;AAE/E;AACA;AACA;AACA,OAAOC,QAAQ,MAAM,YAAY;AAEjC,SAASC,eAAeA,CAAE;EAAEC;AAAK,CAAC,EAAG;EACpC,MAAM;IAAEC,cAAc;IAAEC,WAAW;IAAEC;EAAQ,CAAC,GAAGR,SAAS,CACvDS,MAAM,IAAM;IACb,MAAM;MACLC,yBAAyB;MACzBC,sBAAsB;MACtBC;IACD,CAAC,GAAGH,MAAM,CAAEP,sBAAuB,CAAC;IAEpC,OAAO;MACNI,cAAc,EAAEI,yBAAyB,CAAEL,IAAK,CAAC;MACjDG,OAAO,EAAEI,kBAAkB,CAAEP,IAAK,CAAC;MACnCE,WAAW,EAAEI,sBAAsB,CAAEN,IAAK;IAC3C,CAAC;EACF,CAAC,EACD,CAAEA,IAAI,CACP,CAAC;EAED,IAAK,CAAEC,cAAc,EAAG;IACvB,OAAO,IAAI;EACZ;EAEA,OACCO,aAAA,CAACV,QAAQ;IACRG,cAAc,EAAGA,cAAgB;IACjCC,WAAW,EAAGA,WAAa;IAC3BC,OAAO,EAAGA;EAAS,CACnB,CAAC;AAEJ;AAEA,eAAeJ,eAAe","ignoreList":[]}
1
+ {"version":3,"names":["useSelect","store","keyboardShortcutsStore","Shortcut","jsx","_jsx","DynamicShortcut","name","keyCombination","description","aliases","select","getShortcutKeyCombination","getShortcutDescription","getShortcutAliases"],"sources":["@wordpress/editor/src/components/keyboard-shortcut-help-modal/dynamic-shortcut.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\n\n/**\n * Internal dependencies\n */\nimport Shortcut from './shortcut';\n\nfunction DynamicShortcut( { name } ) {\n\tconst { keyCombination, description, aliases } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetShortcutKeyCombination,\n\t\t\t\tgetShortcutDescription,\n\t\t\t\tgetShortcutAliases,\n\t\t\t} = select( keyboardShortcutsStore );\n\n\t\t\treturn {\n\t\t\t\tkeyCombination: getShortcutKeyCombination( name ),\n\t\t\t\taliases: getShortcutAliases( name ),\n\t\t\t\tdescription: getShortcutDescription( name ),\n\t\t\t};\n\t\t},\n\t\t[ name ]\n\t);\n\n\tif ( ! keyCombination ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Shortcut\n\t\t\tkeyCombination={ keyCombination }\n\t\t\tdescription={ description }\n\t\t\taliases={ aliases }\n\t\t/>\n\t);\n}\n\nexport default DynamicShortcut;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,KAAK,IAAIC,sBAAsB,QAAQ,+BAA+B;;AAE/E;AACA;AACA;AACA,OAAOC,QAAQ,MAAM,YAAY;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAElC,SAASC,eAAeA,CAAE;EAAEC;AAAK,CAAC,EAAG;EACpC,MAAM;IAAEC,cAAc;IAAEC,WAAW;IAAEC;EAAQ,CAAC,GAAGV,SAAS,CACvDW,MAAM,IAAM;IACb,MAAM;MACLC,yBAAyB;MACzBC,sBAAsB;MACtBC;IACD,CAAC,GAAGH,MAAM,CAAET,sBAAuB,CAAC;IAEpC,OAAO;MACNM,cAAc,EAAEI,yBAAyB,CAAEL,IAAK,CAAC;MACjDG,OAAO,EAAEI,kBAAkB,CAAEP,IAAK,CAAC;MACnCE,WAAW,EAAEI,sBAAsB,CAAEN,IAAK;IAC3C,CAAC;EACF,CAAC,EACD,CAAEA,IAAI,CACP,CAAC;EAED,IAAK,CAAEC,cAAc,EAAG;IACvB,OAAO,IAAI;EACZ;EAEA,oBACCH,IAAA,CAACF,QAAQ;IACRK,cAAc,EAAGA,cAAgB;IACjCC,WAAW,EAAGA,WAAa;IAC3BC,OAAO,EAAGA;EAAS,CACnB,CAAC;AAEJ;AAEA,eAAeJ,eAAe","ignoreList":[]}
@@ -1,8 +1,7 @@
1
- import { createElement } from "react";
2
1
  /**
3
2
  * External dependencies
4
3
  */
5
- import classnames from 'classnames';
4
+ import clsx from 'clsx';
6
5
 
7
6
  /**
8
7
  * WordPress dependencies
@@ -19,38 +18,44 @@ import { store as interfaceStore } from '@wordpress/interface';
19
18
  import { textFormattingShortcuts } from './config';
20
19
  import Shortcut from './shortcut';
21
20
  import DynamicShortcut from './dynamic-shortcut';
21
+ import { jsx as _jsx } from "react/jsx-runtime";
22
+ import { jsxs as _jsxs } from "react/jsx-runtime";
22
23
  const KEYBOARD_SHORTCUT_HELP_MODAL_NAME = 'editor/keyboard-shortcut-help';
23
24
  const ShortcutList = ({
24
25
  shortcuts
25
26
  }) =>
27
+ /*#__PURE__*/
26
28
  /*
27
29
  * Disable reason: The `list` ARIA role is redundant but
28
30
  * Safari+VoiceOver won't announce the list otherwise.
29
31
  */
30
32
  /* eslint-disable jsx-a11y/no-redundant-roles */
31
- createElement("ul", {
33
+ _jsx("ul", {
32
34
  className: "editor-keyboard-shortcut-help-modal__shortcut-list",
33
- role: "list"
34
- }, shortcuts.map((shortcut, index) => createElement("li", {
35
- className: "editor-keyboard-shortcut-help-modal__shortcut",
36
- key: index
37
- }, typeof shortcut === 'string' ? createElement(DynamicShortcut, {
38
- name: shortcut
39
- }) : createElement(Shortcut, {
40
- ...shortcut
41
- }))))
35
+ role: "list",
36
+ children: shortcuts.map((shortcut, index) => /*#__PURE__*/_jsx("li", {
37
+ className: "editor-keyboard-shortcut-help-modal__shortcut",
38
+ children: typeof shortcut === 'string' ? /*#__PURE__*/_jsx(DynamicShortcut, {
39
+ name: shortcut
40
+ }) : /*#__PURE__*/_jsx(Shortcut, {
41
+ ...shortcut
42
+ })
43
+ }, index))
44
+ })
42
45
  /* eslint-enable jsx-a11y/no-redundant-roles */;
43
46
  const ShortcutSection = ({
44
47
  title,
45
48
  shortcuts,
46
49
  className
47
- }) => createElement("section", {
48
- className: classnames('editor-keyboard-shortcut-help-modal__section', className)
49
- }, !!title && createElement("h2", {
50
- className: "editor-keyboard-shortcut-help-modal__section-title"
51
- }, title), createElement(ShortcutList, {
52
- shortcuts: shortcuts
53
- }));
50
+ }) => /*#__PURE__*/_jsxs("section", {
51
+ className: clsx('editor-keyboard-shortcut-help-modal__section', className),
52
+ children: [!!title && /*#__PURE__*/_jsx("h2", {
53
+ className: "editor-keyboard-shortcut-help-modal__section-title",
54
+ children: title
55
+ }), /*#__PURE__*/_jsx(ShortcutList, {
56
+ shortcuts: shortcuts
57
+ })]
58
+ });
54
59
  const ShortcutCategorySection = ({
55
60
  title,
56
61
  categoryName,
@@ -59,7 +64,7 @@ const ShortcutCategorySection = ({
59
64
  const categoryShortcuts = useSelect(select => {
60
65
  return select(keyboardShortcutsStore).getCategoryShortcuts(categoryName);
61
66
  }, [categoryName]);
62
- return createElement(ShortcutSection, {
67
+ return /*#__PURE__*/_jsx(ShortcutSection, {
63
68
  title: title,
64
69
  shortcuts: categoryShortcuts.concat(additionalShortcuts)
65
70
  });
@@ -81,38 +86,39 @@ function KeyboardShortcutHelpModal() {
81
86
  if (!isModalActive) {
82
87
  return null;
83
88
  }
84
- return createElement(Modal, {
89
+ return /*#__PURE__*/_jsxs(Modal, {
85
90
  className: "editor-keyboard-shortcut-help-modal",
86
91
  title: __('Keyboard shortcuts'),
87
92
  closeButtonLabel: __('Close'),
88
- onRequestClose: toggleModal
89
- }, createElement(ShortcutSection, {
90
- className: "editor-keyboard-shortcut-help-modal__main-shortcuts",
91
- shortcuts: ['core/editor/keyboard-shortcuts']
92
- }), createElement(ShortcutCategorySection, {
93
- title: __('Global shortcuts'),
94
- categoryName: "global"
95
- }), createElement(ShortcutCategorySection, {
96
- title: __('Selection shortcuts'),
97
- categoryName: "selection"
98
- }), createElement(ShortcutCategorySection, {
99
- title: __('Block shortcuts'),
100
- categoryName: "block",
101
- additionalShortcuts: [{
102
- keyCombination: {
103
- character: '/'
104
- },
105
- description: __('Change the block type after adding a new paragraph.'),
106
- /* translators: The forward-slash character. e.g. '/'. */
107
- ariaLabel: __('Forward-slash')
108
- }]
109
- }), createElement(ShortcutSection, {
110
- title: __('Text formatting'),
111
- shortcuts: textFormattingShortcuts
112
- }), createElement(ShortcutCategorySection, {
113
- title: __('List View shortcuts'),
114
- categoryName: "list-view"
115
- }));
93
+ onRequestClose: toggleModal,
94
+ children: [/*#__PURE__*/_jsx(ShortcutSection, {
95
+ className: "editor-keyboard-shortcut-help-modal__main-shortcuts",
96
+ shortcuts: ['core/editor/keyboard-shortcuts']
97
+ }), /*#__PURE__*/_jsx(ShortcutCategorySection, {
98
+ title: __('Global shortcuts'),
99
+ categoryName: "global"
100
+ }), /*#__PURE__*/_jsx(ShortcutCategorySection, {
101
+ title: __('Selection shortcuts'),
102
+ categoryName: "selection"
103
+ }), /*#__PURE__*/_jsx(ShortcutCategorySection, {
104
+ title: __('Block shortcuts'),
105
+ categoryName: "block",
106
+ additionalShortcuts: [{
107
+ keyCombination: {
108
+ character: '/'
109
+ },
110
+ description: __('Change the block type after adding a new paragraph.'),
111
+ /* translators: The forward-slash character. e.g. '/'. */
112
+ ariaLabel: __('Forward-slash')
113
+ }]
114
+ }), /*#__PURE__*/_jsx(ShortcutSection, {
115
+ title: __('Text formatting'),
116
+ shortcuts: textFormattingShortcuts
117
+ }), /*#__PURE__*/_jsx(ShortcutCategorySection, {
118
+ title: __('List View shortcuts'),
119
+ categoryName: "list-view"
120
+ })]
121
+ });
116
122
  }
117
123
  export default KeyboardShortcutHelpModal;
118
124
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["classnames","Modal","__","useShortcut","store","keyboardShortcutsStore","useDispatch","useSelect","interfaceStore","textFormattingShortcuts","Shortcut","DynamicShortcut","KEYBOARD_SHORTCUT_HELP_MODAL_NAME","ShortcutList","shortcuts","createElement","className","role","map","shortcut","index","key","name","ShortcutSection","title","ShortcutCategorySection","categoryName","additionalShortcuts","categoryShortcuts","select","getCategoryShortcuts","concat","KeyboardShortcutHelpModal","isModalActive","openModal","closeModal","toggleModal","closeButtonLabel","onRequestClose","keyCombination","character","description","ariaLabel"],"sources":["@wordpress/editor/src/components/keyboard-shortcut-help-modal/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\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={ classnames(\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":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,KAAK,QAAQ,uBAAuB;AAC7C,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SACCC,WAAW,EACXC,KAAK,IAAIC,sBAAsB,QACzB,+BAA+B;AACtC,SAASC,WAAW,EAAEC,SAAS,QAAQ,iBAAiB;AACxD,SAASH,KAAK,IAAII,cAAc,QAAQ,sBAAsB;;AAE9D;AACA;AACA;AACA,SAASC,uBAAuB,QAAQ,UAAU;AAClD,OAAOC,QAAQ,MAAM,YAAY;AACjC,OAAOC,eAAe,MAAM,oBAAoB;AAEhD,MAAMC,iCAAiC,GAAG,+BAA+B;AAEzE,MAAMC,YAAY,GAAGA,CAAE;EAAEC;AAAU,CAAC;AACnC;AACD;AACA;AACA;AACC;AACAC,aAAA;EACCC,SAAS,EAAC,oDAAoD;EAC9DC,IAAI,EAAC;AAAM,GAETH,SAAS,CAACI,GAAG,CAAE,CAAEC,QAAQ,EAAEC,KAAK,KACjCL,aAAA;EACCC,SAAS,EAAC,+CAA+C;EACzDK,GAAG,EAAGD;AAAO,GAEX,OAAOD,QAAQ,KAAK,QAAQ,GAC7BJ,aAAA,CAACJ,eAAe;EAACW,IAAI,EAAGH;AAAU,CAAE,CAAC,GAErCJ,aAAA,CAACL,QAAQ;EAAA,GAAMS;AAAQ,CAAI,CAEzB,CACH,CACC;A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AEA,OACClB,aAAA,CAACd,KAAK;IACLe,SAAS,EAAC,qCAAqC;IAC/CQ,KAAK,EAAGtB,EAAE,CAAE,oBAAqB,CAAG;IACpCmC,gBAAgB,EAAGnC,EAAE,CAAE,OAAQ,CAAG;IAClCoC,cAAc,EAAGF;EAAa,GAE9BrB,aAAA,CAACQ,eAAe;IACfP,SAAS,EAAC,qDAAqD;IAC/DF,SAAS,EAAG,CAAE,gCAAgC;EAAI,CAClD,CAAC,EACFC,aAAA,CAACU,uBAAuB;IACvBD,KAAK,EAAGtB,EAAE,CAAE,kBAAmB,CAAG;IAClCwB,YAAY,EAAC;EAAQ,CACrB,CAAC,EAEFX,aAAA,CAACU,uBAAuB;IACvBD,KAAK,EAAGtB,EAAE,CAAE,qBAAsB,CAAG;IACrCwB,YAAY,EAAC;EAAW,CACxB,CAAC,EAEFX,aAAA,CAACU,uBAAuB;IACvBD,KAAK,EAAGtB,EAAE,CAAE,iBAAkB,CAAG;IACjCwB,YAAY,EAAC,OAAO;IACpBC,mBAAmB,EAAG,CACrB;MACCY,cAAc,EAAE;QAAEC,SAAS,EAAE;MAAI,CAAC;MAClCC,WAAW,EAAEvC,EAAE,CACd,qDACD,CAAC;MACD;MACAwC,SAAS,EAAExC,EAAE,CAAE,eAAgB;IAChC,CAAC;EACC,CACH,CAAC,EACFa,aAAA,CAACQ,eAAe;IACfC,KAAK,EAAGtB,EAAE,CAAE,iBAAkB,CAAG;IACjCY,SAAS,EAAGL;EAAyB,CACrC,CAAC,EACFM,aAAA,CAACU,uBAAuB;IACvBD,KAAK,EAAGtB,EAAE,CAAE,qBAAsB,CAAG;IACrCwB,YAAY,EAAC;EAAW,CACxB,CACK,CAAC;AAEV;AAEA,eAAeM,yBAAyB","ignoreList":[]}
1
+ {"version":3,"names":["clsx","Modal","__","useShortcut","store","keyboardShortcutsStore","useDispatch","useSelect","interfaceStore","textFormattingShortcuts","Shortcut","DynamicShortcut","jsx","_jsx","jsxs","_jsxs","KEYBOARD_SHORTCUT_HELP_MODAL_NAME","ShortcutList","shortcuts","className","role","children","map","shortcut","index","name","ShortcutSection","title","ShortcutCategorySection","categoryName","additionalShortcuts","categoryShortcuts","select","getCategoryShortcuts","concat","KeyboardShortcutHelpModal","isModalActive","openModal","closeModal","toggleModal","closeButtonLabel","onRequestClose","keyCombination","character","description","ariaLabel"],"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":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,KAAK,QAAQ,uBAAuB;AAC7C,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SACCC,WAAW,EACXC,KAAK,IAAIC,sBAAsB,QACzB,+BAA+B;AACtC,SAASC,WAAW,EAAEC,SAAS,QAAQ,iBAAiB;AACxD,SAASH,KAAK,IAAII,cAAc,QAAQ,sBAAsB;;AAE9D;AACA;AACA;AACA,SAASC,uBAAuB,QAAQ,UAAU;AAClD,OAAOC,QAA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vBD,KAAK,EAAGzB,EAAE,CAAE,iBAAkB,CAAG;MACjC2B,YAAY,EAAC,OAAO;MACpBC,mBAAmB,EAAG,CACrB;QACCY,cAAc,EAAE;UAAEC,SAAS,EAAE;QAAI,CAAC;QAClCC,WAAW,EAAE1C,EAAE,CACd,qDACD,CAAC;QACD;QACA2C,SAAS,EAAE3C,EAAE,CAAE,eAAgB;MAChC,CAAC;IACC,CACH,CAAC,eACFW,IAAA,CAACa,eAAe;MACfC,KAAK,EAAGzB,EAAE,CAAE,iBAAkB,CAAG;MACjCgB,SAAS,EAAGT;IAAyB,CACrC,CAAC,eACFI,IAAA,CAACe,uBAAuB;MACvBD,KAAK,EAAGzB,EAAE,CAAE,qBAAsB,CAAG;MACrC2B,YAAY,EAAC;IAAW,CACxB,CAAC;EAAA,CACI,CAAC;AAEV;AAEA,eAAeM,yBAAyB","ignoreList":[]}
@@ -1,29 +1,32 @@
1
- import { createElement } from "react";
2
1
  /**
3
2
  * WordPress dependencies
4
3
  */
5
4
  import { Fragment } from '@wordpress/element';
6
5
  import { displayShortcutList, shortcutAriaLabel } from '@wordpress/keycodes';
6
+ import { jsx as _jsx } from "react/jsx-runtime";
7
+ import { jsxs as _jsxs } from "react/jsx-runtime";
8
+ import { Fragment as _Fragment } from "react/jsx-runtime";
7
9
  function KeyCombination({
8
10
  keyCombination,
9
11
  forceAriaLabel
10
12
  }) {
11
13
  const shortcut = keyCombination.modifier ? displayShortcutList[keyCombination.modifier](keyCombination.character) : keyCombination.character;
12
14
  const ariaLabel = keyCombination.modifier ? shortcutAriaLabel[keyCombination.modifier](keyCombination.character) : keyCombination.character;
13
- return createElement("kbd", {
15
+ return /*#__PURE__*/_jsx("kbd", {
14
16
  className: "editor-keyboard-shortcut-help-modal__shortcut-key-combination",
15
- "aria-label": forceAriaLabel || ariaLabel
16
- }, (Array.isArray(shortcut) ? shortcut : [shortcut]).map((character, index) => {
17
- if (character === '+') {
18
- return createElement(Fragment, {
19
- key: index
20
- }, character);
21
- }
22
- return createElement("kbd", {
23
- key: index,
24
- className: "editor-keyboard-shortcut-help-modal__shortcut-key"
25
- }, character);
26
- }));
17
+ "aria-label": forceAriaLabel || ariaLabel,
18
+ children: (Array.isArray(shortcut) ? shortcut : [shortcut]).map((character, index) => {
19
+ if (character === '+') {
20
+ return /*#__PURE__*/_jsx(Fragment, {
21
+ children: character
22
+ }, index);
23
+ }
24
+ return /*#__PURE__*/_jsx("kbd", {
25
+ className: "editor-keyboard-shortcut-help-modal__shortcut-key",
26
+ children: character
27
+ }, index);
28
+ })
29
+ });
27
30
  }
28
31
  function Shortcut({
29
32
  description,
@@ -31,18 +34,21 @@ function Shortcut({
31
34
  aliases = [],
32
35
  ariaLabel
33
36
  }) {
34
- return createElement(Fragment, null, createElement("div", {
35
- className: "editor-keyboard-shortcut-help-modal__shortcut-description"
36
- }, description), createElement("div", {
37
- className: "editor-keyboard-shortcut-help-modal__shortcut-term"
38
- }, createElement(KeyCombination, {
39
- keyCombination: keyCombination,
40
- forceAriaLabel: ariaLabel
41
- }), aliases.map((alias, index) => createElement(KeyCombination, {
42
- keyCombination: alias,
43
- forceAriaLabel: ariaLabel,
44
- key: index
45
- }))));
37
+ return /*#__PURE__*/_jsxs(_Fragment, {
38
+ children: [/*#__PURE__*/_jsx("div", {
39
+ className: "editor-keyboard-shortcut-help-modal__shortcut-description",
40
+ children: description
41
+ }), /*#__PURE__*/_jsxs("div", {
42
+ className: "editor-keyboard-shortcut-help-modal__shortcut-term",
43
+ children: [/*#__PURE__*/_jsx(KeyCombination, {
44
+ keyCombination: keyCombination,
45
+ forceAriaLabel: ariaLabel
46
+ }), aliases.map((alias, index) => /*#__PURE__*/_jsx(KeyCombination, {
47
+ keyCombination: alias,
48
+ forceAriaLabel: ariaLabel
49
+ }, index))]
50
+ })]
51
+ });
46
52
  }
47
53
  export default Shortcut;
48
54
  //# sourceMappingURL=shortcut.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["Fragment","displayShortcutList","shortcutAriaLabel","KeyCombination","keyCombination","forceAriaLabel","shortcut","modifier","character","ariaLabel","createElement","className","Array","isArray","map","index","key","Shortcut","description","aliases","alias"],"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":";AAAA;AACA;AACA;AACA,SAASA,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,mBAAmB,EAAEC,iBAAiB,QAAQ,qBAAqB;AAE5E,SAASC,cAAcA,CAAE;EAAEC,cAAc;EAAEC;AAAe,CAAC,EAAG;EAC7D,MAAMC,QAAQ,GAAGF,cAAc,CAACG,QAAQ,GACrCN,mBAAmB,CAAEG,cAAc,CAACG,QAAQ,CAAE,CAC9CH,cAAc,CAACI,SACf,CAAC,GACDJ,cAAc,CAACI,SAAS;EAC3B,MAAMC,SAAS,GAAGL,cAAc,CAACG,QAAQ,GACtCL,iBAAiB,CAAEE,cAAc,CAACG,QAAQ,CAAE,CAC5CH,cAAc,CAACI,SACf,CAAC,GACDJ,cAAc,CAACI,SAAS;EAE3B,OACCE,aAAA;IACCC,SAAS,EAAC,+DAA+D;IACzE,cAAaN,cAAc,IAAII;EAAW,GAExC,CAAEG,KAAK,CAACC,OAAO,CAAEP,QAAS,CAAC,GAAGA,QAAQ,GAAG,CAAEA,QAAQ,CAAE,EAAGQ,GAAG,CAC5D,CAAEN,SAAS,EAAEO,KAAK,KAAM;IACvB,IAAKP,SAAS,KAAK,GAAG,EAAG;MACxB,OAAOE,aAAA,CAACV,QAAQ;QAACgB,GAAG,EAAGD;MAAO,GAAGP,SAAqB,CAAC;IACxD;IAEA,OACCE,aAAA;MACCM,GAAG,EAAGD,KAAO;MACbJ,SAAS,EAAC;IAAmD,GAE3DH,SACE,CAAC;EAER,CACD,CACI,CAAC;AAER;AAEA,SAASS,QAAQA,CAAE;EAAEC,WAAW;EAAEd,cAAc;EAAEe,OAAO,GAAG,EAAE;EAAEV;AAAU,CAAC,EAAG;EAC7E,OACCC,aAAA,CAAAV,QAAA,QACCU,aAAA;IAAKC,SAAS,EAAC;EAA2D,GACvEO,WACE,CAAC,EACNR,aAAA;IAAKC,SAAS,EAAC;EAAoD,GAClED,aAAA,CAACP,cAAc;IACdC,cAAc,EAAGA,cAAgB;IACjCC,cAAc,EAAGI;EAAW,CAC5B,CAAC,EACAU,OAAO,CAACL,GAAG,CAAE,CAAEM,KAAK,EAAEL,KAAK,KAC5BL,aAAA,CAACP,cAAc;IACdC,cAAc,EAAGgB,KAAO;IACxBf,cAAc,EAAGI,SAAW;IAC5BO,GAAG,EAAGD;EAAO,CACb,CACA,CACE,CACJ,CAAC;AAEL;AAEA,eAAeE,QAAQ","ignoreList":[]}
1
+ {"version":3,"names":["Fragment","displayShortcutList","shortcutAriaLabel","jsx","_jsx","jsxs","_jsxs","_Fragment","KeyCombination","keyCombination","forceAriaLabel","shortcut","modifier","character","ariaLabel","className","children","Array","isArray","map","index","Shortcut","description","aliases","alias"],"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":"AAAA;AACA;AACA;AACA,SAASA,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,mBAAmB,EAAEC,iBAAiB,QAAQ,qBAAqB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAAA,SAAAN,QAAA,IAAAO,SAAA;AAE7E,SAASC,cAAcA,CAAE;EAAEC,cAAc;EAAEC;AA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AAEJ,KAAK,kBAC5BhB,IAAA,CAACI,cAAc;QACdC,cAAc,EAAGe,KAAO;QACxBd,cAAc,EAAGI;MAAW,GACtBM,KACN,CACA,CAAC;IAAA,CACC,CAAC;EAAA,CACL,CAAC;AAEL;AAEA,eAAeC,QAAQ","ignoreList":[]}
@@ -1,4 +1,3 @@
1
- import { createElement } from "react";
2
1
  /**
3
2
  * WordPress dependencies
4
3
  */
@@ -19,6 +18,8 @@ import { ESCAPE } from '@wordpress/keycodes';
19
18
  import ListViewOutline from './list-view-outline';
20
19
  import { unlock } from '../../lock-unlock';
21
20
  import { store as editorStore } from '../../store';
21
+ import { jsx as _jsx } from "react/jsx-runtime";
22
+ import { jsxs as _jsxs } from "react/jsx-runtime";
22
23
  const {
23
24
  Tabs
24
25
  } = unlock(componentsPrivateApis);
@@ -96,55 +97,67 @@ export default function ListViewSidebar() {
96
97
  // It is the same shortcut to open but that is defined as a global shortcut and only fires when the sidebar is closed.
97
98
  useShortcut('core/editor/toggle-list-view', handleToggleListViewShortcut);
98
99
  return (
100
+ /*#__PURE__*/
99
101
  // eslint-disable-next-line jsx-a11y/no-static-element-interactions
100
- createElement("div", {
102
+ _jsx("div", {
101
103
  className: "editor-list-view-sidebar",
102
104
  onKeyDown: closeOnEscape,
103
- ref: sidebarRef
104
- }, createElement(Tabs, {
105
- onSelect: tabName => setTab(tabName),
106
- selectOnMove: false
107
- // The initial tab value is set explicitly to avoid an initial
108
- // render where no tab is selected. This ensures that the
109
- // tabpanel height is correct so the relevant scroll container
110
- // can be rendered internally.
111
- ,
112
- defaultTabId: "list-view"
113
- }, createElement("div", {
114
- className: "editor-list-view-sidebar__header"
115
- }, createElement(Button, {
116
- className: "editor-list-view-sidebar__close-button",
117
- icon: closeSmall,
118
- label: __('Close'),
119
- onClick: closeListView,
120
- size: "small"
121
- }), createElement(Tabs.TabList, {
122
- className: "editor-list-view-sidebar__tabs-tablist",
123
- ref: tabsRef
124
- }, createElement(Tabs.Tab, {
125
- className: "editor-list-view-sidebar__tabs-tab",
126
- tabId: "list-view"
127
- }, _x('List View', 'Post overview')), createElement(Tabs.Tab, {
128
- className: "editor-list-view-sidebar__tabs-tab",
129
- tabId: "outline"
130
- }, _x('Outline', 'Post overview')))), createElement(Tabs.TabPanel, {
131
- ref: listViewContainerRef,
132
- className: "editor-list-view-sidebar__tabs-tabpanel",
133
- tabId: "list-view",
134
- focusable: false
135
- }, createElement("div", {
136
- className: "editor-list-view-sidebar__list-view-container"
137
- }, createElement("div", {
138
- className: "editor-list-view-sidebar__list-view-panel-content"
139
- }, createElement(ListView, {
140
- dropZoneElement: dropZoneElement
141
- })))), createElement(Tabs.TabPanel, {
142
- className: "editor-list-view-sidebar__tabs-tabpanel",
143
- tabId: "outline",
144
- focusable: false
145
- }, createElement("div", {
146
- className: "editor-list-view-sidebar__list-view-container"
147
- }, createElement(ListViewOutline, null)))))
105
+ ref: sidebarRef,
106
+ children: /*#__PURE__*/_jsxs(Tabs, {
107
+ onSelect: tabName => setTab(tabName),
108
+ selectOnMove: false
109
+ // The initial tab value is set explicitly to avoid an initial
110
+ // render where no tab is selected. This ensures that the
111
+ // tabpanel height is correct so the relevant scroll container
112
+ // can be rendered internally.
113
+ ,
114
+ defaultTabId: "list-view",
115
+ children: [/*#__PURE__*/_jsxs("div", {
116
+ className: "editor-list-view-sidebar__header",
117
+ children: [/*#__PURE__*/_jsx(Button, {
118
+ className: "editor-list-view-sidebar__close-button",
119
+ icon: closeSmall,
120
+ label: __('Close'),
121
+ onClick: closeListView,
122
+ size: "small"
123
+ }), /*#__PURE__*/_jsxs(Tabs.TabList, {
124
+ className: "editor-list-view-sidebar__tabs-tablist",
125
+ ref: tabsRef,
126
+ children: [/*#__PURE__*/_jsx(Tabs.Tab, {
127
+ className: "editor-list-view-sidebar__tabs-tab",
128
+ tabId: "list-view",
129
+ children: _x('List View', 'Post overview')
130
+ }), /*#__PURE__*/_jsx(Tabs.Tab, {
131
+ className: "editor-list-view-sidebar__tabs-tab",
132
+ tabId: "outline",
133
+ children: _x('Outline', 'Post overview')
134
+ })]
135
+ })]
136
+ }), /*#__PURE__*/_jsx(Tabs.TabPanel, {
137
+ ref: listViewContainerRef,
138
+ className: "editor-list-view-sidebar__tabs-tabpanel",
139
+ tabId: "list-view",
140
+ focusable: false,
141
+ children: /*#__PURE__*/_jsx("div", {
142
+ className: "editor-list-view-sidebar__list-view-container",
143
+ children: /*#__PURE__*/_jsx("div", {
144
+ className: "editor-list-view-sidebar__list-view-panel-content",
145
+ children: /*#__PURE__*/_jsx(ListView, {
146
+ dropZoneElement: dropZoneElement
147
+ })
148
+ })
149
+ })
150
+ }), /*#__PURE__*/_jsx(Tabs.TabPanel, {
151
+ className: "editor-list-view-sidebar__tabs-tabpanel",
152
+ tabId: "outline",
153
+ focusable: false,
154
+ children: /*#__PURE__*/_jsx("div", {
155
+ className: "editor-list-view-sidebar__list-view-container",
156
+ children: /*#__PURE__*/_jsx(ListViewOutline, {})
157
+ })
158
+ })]
159
+ })
160
+ })
148
161
  );
149
162
  }
150
163
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["__experimentalListView","ListView","Button","privateApis","componentsPrivateApis","useFocusOnMount","useMergeRefs","useDispatch","useSelect","focus","useCallback","useRef","useState","__","_x","closeSmall","useShortcut","ESCAPE","ListViewOutline","unlock","store","editorStore","Tabs","ListViewSidebar","setIsListViewOpened","getListViewToggleRef","focusOnMountRef","closeListView","current","closeOnEscape","event","keyCode","defaultPrevented","preventDefault","dropZoneElement","setDropZoneElement","tab","setTab","sidebarRef","tabsRef","listViewRef","listViewContainerRef","handleSidebarFocus","currentTab","tabPanelFocus","tabbable","find","listViewApplicationFocus","listViewFocusArea","contains","handleToggleListViewShortcut","ownerDocument","activeElement","createElement","className","onKeyDown","ref","onSelect","tabName","selectOnMove","defaultTabId","icon","label","onClick","size","TabList","Tab","tabId","TabPanel","focusable"],"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":";AAAA;AACA;AACA;AACA,SAASA,sBAAsB,IAAIC,QAAQ,QAAQ,yBAAyB;AAC5E,SACCC,MAAM,EACNC,WAAW,IAAIC,qBAAqB,QAC9B,uBAAuB;AAC9B,SAASC,eAAe,EAAEC,YAAY,QAAQ,oBAAoB;AAClE,SAASC,WAAW,EAAEC,SAAS,QAAQ,iBAAiB;AACxD,SAASC,KAAK,QAAQ,gBAAgB;AACtC,SAASC,WAAW,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,oBAAoB;AAClE,SAASC,EAAE,EAAEC,EAAE,QAAQ,iBAAiB;AACxC,SAASC,UAAU,QAAQ,kBAAkB;AAC7C,SAASC,WAAW,QAAQ,+BAA+B;AAC3D,SAASC,MAAM,QAAQ,qBAAqB;;AAE5C;AACA;AACA;AACA,OAAOC,eAAe,MAAM,qBAAqB;AACjD,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,SAASC,KAAK,IAAIC,WAAW,QAAQ,aAAa;AAElD,MAAM;EAAEC;AAAK,CAAC,GAAGH,MAAM,CAAEf,qBAAsB,CAAC;AAEhD,eAAe,SAASmB,eAAeA,CAAA,EAAG;EACzC,MAA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CAAE,OAAQ,CAAG;MACvBkD,OAAO,EAAGpC,aAAe;MACzBqC,IAAI,EAAC;IAAO,CACZ,CAAC,EACFX,aAAA,CAAC/B,IAAI,CAAC2C,OAAO;MACZX,SAAS,EAAC,wCAAwC;MAClDE,GAAG,EAAGjB;IAAS,GAEfc,aAAA,CAAC/B,IAAI,CAAC4C,GAAG;MACRZ,SAAS,EAAC,oCAAoC;MAC9Ca,KAAK,EAAC;IAAW,GAEfrD,EAAE,CAAE,WAAW,EAAE,eAAgB,CAC1B,CAAC,EACXuC,aAAA,CAAC/B,IAAI,CAAC4C,GAAG;MACRZ,SAAS,EAAC,oCAAoC;MAC9Ca,KAAK,EAAC;IAAS,GAEbrD,EAAE,CAAE,SAAS,EAAE,eAAgB,CACxB,CACG,CACV,CAAC,EAENuC,aAAA,CAAC/B,IAAI,CAAC8C,QAAQ;MACbZ,GAAG,EAAGf,oBAAsB;MAC5Ba,SAAS,EAAC,yCAAyC;MACnDa,KAAK,EAAC,WAAW;MACjBE,SAAS,EAAG;IAAO,GAEnBhB,aAAA;MAAKC,SAAS,EAAC;IAA+C,GAC7DD,aAAA;MAAKC,SAAS,EAAC;IAAmD,GACjED,aAAA,CAACpD,QAAQ;MAACiC,eAAe,EAAGA;IAAiB,CAAE,CAC3C,CACD,CACS,CAAC,EAChBmB,aAAA,CAAC/B,IAAI,CAAC8C,QAAQ;MACbd,SAAS,EAAC,yCAAyC;MACnDa,KAAK,EAAC,SAAS;MACfE,SAAS,EAAG;IAAO,GAEnBhB,aAAA;MAAKC,SAAS,EAAC;IAA+C,GAC7DD,aAAA,CAACnC,eAAe,MAAE,CACd,CACS,CACV,CACF;EAAC;AAER","ignoreList":[]}
1
+ {"version":3,"names":["__experimentalListView","ListView","Button","privateApis","componentsPrivateApis","useFocusOnMount","useMergeRefs","useDispatch","useSelect","focus","useCallback","useRef","useState","__","_x","closeSmall","useShortcut","ESCAPE","ListViewOutline","unlock","store","editorStore","jsx","_jsx","jsxs","_jsxs","Tabs","ListViewSidebar","setIsListViewOpened","getListViewToggleRef","focusOnMountRef","closeListView","current","closeOnEscape","event","keyCode","defaultPrevented","preventDefault","dropZoneElement","setDropZoneElement","tab","setTab","sidebarRef","tabsRef","listViewRef","listViewContainerRef","handleSidebarFocus","currentTab","tabPanelFocus","tabbable","find","listViewApplicationFocus","listViewFocusArea","contains","handleToggleListViewShortcut","ownerDocument","activeElement","className","onKeyDown","ref","children","onSelect","tabName","selectOnMove","defaultTabId","icon","label","onClick","size","TabList","Tab","tabId","TabPanel","focusable"],"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":"AAAA;AACA;AACA;AACA,SAASA,sBAAsB,IAAIC,QAAQ,QAAQ,yBAAyB;AAC5E,SACCC,MAAM,EACNC,WAAW,IAAIC,qBAAqB,QAC9B,uBAAuB;AAC9B,SAASC,eAAe,EAAEC,YAAY,QAAQ,oBAAoB;AAClE,SAASC,WAAW,EAAEC,SAAS,QAAQ,iBAAiB;AACxD,SAASC,KAAK,QAAQ,gBAAgB;AACtC,SAASC,WAAW,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,oBAAoB;AACl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