@wordpress/edit-site 5.16.0 → 5.17.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 (996) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/components/add-new-page/index.js +3 -13
  3. package/build/components/add-new-page/index.js.map +1 -1
  4. package/build/components/add-new-pattern/index.js +13 -26
  5. package/build/components/add-new-pattern/index.js.map +1 -1
  6. package/build/components/add-new-template/add-custom-generic-template-modal-content.js +1 -11
  7. package/build/components/add-new-template/add-custom-generic-template-modal-content.js.map +1 -1
  8. package/build/components/add-new-template/add-custom-template-modal-content.js +9 -28
  9. package/build/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
  10. package/build/components/add-new-template/index.js +3 -10
  11. package/build/components/add-new-template/index.js.map +1 -1
  12. package/build/components/add-new-template/new-template.js +19 -49
  13. package/build/components/add-new-template/new-template.js.map +1 -1
  14. package/build/components/add-new-template/template-actions-loading-screen.js +1 -3
  15. package/build/components/add-new-template/template-actions-loading-screen.js.map +1 -1
  16. package/build/components/add-new-template/utils.js +52 -102
  17. package/build/components/add-new-template/utils.js.map +1 -1
  18. package/build/components/app/index.js +2 -19
  19. package/build/components/app/index.js.map +1 -1
  20. package/build/components/block-editor/back-button.js +1 -11
  21. package/build/components/block-editor/back-button.js.map +1 -1
  22. package/build/components/block-editor/block-inspector-button.js +3 -14
  23. package/build/components/block-editor/block-inspector-button.js.map +1 -1
  24. package/build/components/block-editor/constants.js.map +1 -1
  25. package/build/components/block-editor/editor-canvas.js +5 -14
  26. package/build/components/block-editor/editor-canvas.js.map +1 -1
  27. package/build/components/block-editor/get-block-editor-provider.js +0 -7
  28. package/build/components/block-editor/get-block-editor-provider.js.map +1 -1
  29. package/build/components/block-editor/index.js +10 -15
  30. package/build/components/block-editor/index.js.map +1 -1
  31. package/build/components/block-editor/inserter-media-categories.js +30 -45
  32. package/build/components/block-editor/inserter-media-categories.js.map +1 -1
  33. package/build/components/block-editor/providers/default-block-editor-provider.js +1 -10
  34. package/build/components/block-editor/providers/default-block-editor-provider.js.map +1 -1
  35. package/build/components/block-editor/providers/navigation-block-editor-provider.js +10 -19
  36. package/build/components/block-editor/providers/navigation-block-editor-provider.js.map +1 -1
  37. package/build/components/block-editor/resizable-editor.js +3 -8
  38. package/build/components/block-editor/resizable-editor.js.map +1 -1
  39. package/build/components/block-editor/resize-handle.js +1 -7
  40. package/build/components/block-editor/resize-handle.js.map +1 -1
  41. package/build/components/block-editor/site-editor-canvas.js +6 -22
  42. package/build/components/block-editor/site-editor-canvas.js.map +1 -1
  43. package/build/components/block-editor/use-site-editor-settings.js +11 -29
  44. package/build/components/block-editor/use-site-editor-settings.js.map +1 -1
  45. package/build/components/canvas-spinner/index.js +31 -5
  46. package/build/components/canvas-spinner/index.js.map +1 -1
  47. package/build/components/code-editor/index.js +3 -18
  48. package/build/components/code-editor/index.js.map +1 -1
  49. package/build/components/create-template-part-modal/index.js +4 -19
  50. package/build/components/create-template-part-modal/index.js.map +1 -1
  51. package/build/components/editor/index.js +30 -46
  52. package/build/components/editor/index.js.map +1 -1
  53. package/build/components/editor-canvas-container/index.js +2 -28
  54. package/build/components/editor-canvas-container/index.js.map +1 -1
  55. package/build/components/error-boundary/index.js +1 -12
  56. package/build/components/error-boundary/index.js.map +1 -1
  57. package/build/components/error-boundary/warning.js +1 -7
  58. package/build/components/error-boundary/warning.js.map +1 -1
  59. package/build/components/global-styles/block-preview-panel.js +22 -13
  60. package/build/components/global-styles/block-preview-panel.js.map +1 -1
  61. package/build/components/global-styles/color-indicator-wrapper.js +1 -6
  62. package/build/components/global-styles/color-indicator-wrapper.js.map +1 -1
  63. package/build/components/global-styles/color-palette-panel.js +1 -8
  64. package/build/components/global-styles/color-palette-panel.js.map +1 -1
  65. package/build/components/global-styles/dimensions-panel.js +14 -16
  66. package/build/components/global-styles/dimensions-panel.js.map +1 -1
  67. package/build/components/global-styles/global-styles-provider.js +1 -22
  68. package/build/components/global-styles/global-styles-provider.js.map +1 -1
  69. package/build/components/global-styles/gradients-palette-panel.js +1 -11
  70. package/build/components/global-styles/gradients-palette-panel.js.map +1 -1
  71. package/build/components/global-styles/header.js +3 -7
  72. package/build/components/global-styles/header.js.map +1 -1
  73. package/build/components/global-styles/hooks.js +26 -15
  74. package/build/components/global-styles/hooks.js.map +1 -1
  75. package/build/components/global-styles/icon-with-current-color.js +1 -5
  76. package/build/components/global-styles/icon-with-current-color.js.map +1 -1
  77. package/build/components/global-styles/index.js +0 -2
  78. package/build/components/global-styles/index.js.map +1 -1
  79. package/build/components/global-styles/navigation-button.js +3 -7
  80. package/build/components/global-styles/navigation-button.js.map +1 -1
  81. package/build/components/global-styles/palette.js +3 -15
  82. package/build/components/global-styles/palette.js.map +1 -1
  83. package/build/components/global-styles/preview.js +7 -18
  84. package/build/components/global-styles/preview.js.map +1 -1
  85. package/build/components/global-styles/root-menu.js +1 -10
  86. package/build/components/global-styles/root-menu.js.map +1 -1
  87. package/build/components/global-styles/screen-block-list.js +10 -32
  88. package/build/components/global-styles/screen-block-list.js.map +1 -1
  89. package/build/components/global-styles/screen-block.js +28 -49
  90. package/build/components/global-styles/screen-block.js.map +1 -1
  91. package/build/components/global-styles/screen-color-palette.js +1 -9
  92. package/build/components/global-styles/screen-color-palette.js.map +1 -1
  93. package/build/components/global-styles/screen-colors.js +2 -14
  94. package/build/components/global-styles/screen-colors.js.map +1 -1
  95. package/build/components/global-styles/screen-css.js +1 -10
  96. package/build/components/global-styles/screen-css.js.map +1 -1
  97. package/build/components/global-styles/screen-layout.js +2 -13
  98. package/build/components/global-styles/screen-layout.js.map +1 -1
  99. package/build/components/global-styles/screen-revisions/index.js +7 -25
  100. package/build/components/global-styles/screen-revisions/index.js.map +1 -1
  101. package/build/components/global-styles/screen-revisions/revisions-buttons.js +20 -24
  102. package/build/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  103. package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js +12 -22
  104. package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -1
  105. package/build/components/global-styles/screen-root.js +2 -20
  106. package/build/components/global-styles/screen-root.js.map +1 -1
  107. package/build/components/global-styles/screen-style-variations.js +6 -15
  108. package/build/components/global-styles/screen-style-variations.js.map +1 -1
  109. package/build/components/global-styles/screen-typography-element.js +2 -12
  110. package/build/components/global-styles/screen-typography-element.js.map +1 -1
  111. package/build/components/global-styles/screen-typography.js +4 -17
  112. package/build/components/global-styles/screen-typography.js.map +1 -1
  113. package/build/components/global-styles/style-variations-container.js +4 -25
  114. package/build/components/global-styles/style-variations-container.js.map +1 -1
  115. package/build/components/global-styles/subtitle.js +1 -4
  116. package/build/components/global-styles/subtitle.js.map +1 -1
  117. package/build/components/global-styles/typography-panel.js +1 -7
  118. package/build/components/global-styles/typography-panel.js.map +1 -1
  119. package/build/components/global-styles/typography-preview.js +1 -7
  120. package/build/components/global-styles/typography-preview.js.map +1 -1
  121. package/build/components/global-styles/ui.js +14 -62
  122. package/build/components/global-styles/ui.js.map +1 -1
  123. package/build/components/global-styles/utils.js +0 -2
  124. package/build/components/global-styles/utils.js.map +1 -1
  125. package/build/components/global-styles/variations-panel.js +1 -9
  126. package/build/components/global-styles/variations-panel.js.map +1 -1
  127. package/build/components/global-styles-renderer/index.js +3 -11
  128. package/build/components/global-styles-renderer/index.js.map +1 -1
  129. package/build/components/header-edit-mode/document-actions/index.js +10 -51
  130. package/build/components/header-edit-mode/document-actions/index.js.map +1 -1
  131. package/build/components/header-edit-mode/index.js +8 -36
  132. package/build/components/header-edit-mode/index.js.map +1 -1
  133. package/build/components/header-edit-mode/mode-switcher/index.js +2 -11
  134. package/build/components/header-edit-mode/mode-switcher/index.js.map +1 -1
  135. package/build/components/header-edit-mode/more-menu/copy-content-menu-item.js +1 -14
  136. package/build/components/header-edit-mode/more-menu/copy-content-menu-item.js.map +1 -1
  137. package/build/components/header-edit-mode/more-menu/index.js +2 -24
  138. package/build/components/header-edit-mode/more-menu/index.js.map +1 -1
  139. package/build/components/header-edit-mode/more-menu/site-export.js +1 -14
  140. package/build/components/header-edit-mode/more-menu/site-export.js.map +1 -1
  141. package/build/components/header-edit-mode/more-menu/welcome-guide-menu-item.js +1 -6
  142. package/build/components/header-edit-mode/more-menu/welcome-guide-menu-item.js.map +1 -1
  143. package/build/components/header-edit-mode/plugin-more-menu-item/index.js +0 -8
  144. package/build/components/header-edit-mode/plugin-more-menu-item/index.js.map +1 -1
  145. package/build/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js +3 -4
  146. package/build/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js.map +1 -1
  147. package/build/components/header-edit-mode/tools-more-menu-group/index.js +1 -5
  148. package/build/components/header-edit-mode/tools-more-menu-group/index.js.map +1 -1
  149. package/build/components/header-edit-mode/undo-redo/redo.js +5 -12
  150. package/build/components/header-edit-mode/undo-redo/redo.js.map +1 -1
  151. package/build/components/header-edit-mode/undo-redo/undo.js +5 -12
  152. package/build/components/header-edit-mode/undo-redo/undo.js.map +1 -1
  153. package/build/components/keyboard-shortcut-help-modal/config.js +1 -2
  154. package/build/components/keyboard-shortcut-help-modal/config.js.map +1 -1
  155. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +1 -8
  156. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
  157. package/build/components/keyboard-shortcut-help-modal/index.js +4 -24
  158. package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  159. package/build/components/keyboard-shortcut-help-modal/shortcut.js +1 -5
  160. package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
  161. package/build/components/keyboard-shortcuts/edit-mode.js +3 -24
  162. package/build/components/keyboard-shortcuts/edit-mode.js.map +1 -1
  163. package/build/components/keyboard-shortcuts/global.js +1 -9
  164. package/build/components/keyboard-shortcuts/global.js.map +1 -1
  165. package/build/components/keyboard-shortcuts/register.js +1 -7
  166. package/build/components/keyboard-shortcuts/register.js.map +1 -1
  167. package/build/components/layout/hooks.js +2 -9
  168. package/build/components/layout/hooks.js.map +1 -1
  169. package/build/components/layout/index.js +17 -50
  170. package/build/components/layout/index.js.map +1 -1
  171. package/build/components/list/added-by.js +10 -23
  172. package/build/components/list/added-by.js.map +1 -1
  173. package/build/components/list/header.js +1 -10
  174. package/build/components/list/header.js.map +1 -1
  175. package/build/components/list/index.js +8 -20
  176. package/build/components/list/index.js.map +1 -1
  177. package/build/components/list/table.js +5 -16
  178. package/build/components/list/table.js.map +1 -1
  179. package/build/components/list/use-register-shortcuts.js +1 -5
  180. package/build/components/list/use-register-shortcuts.js.map +1 -1
  181. package/build/components/page/header.js +1 -3
  182. package/build/components/page/header.js.map +1 -1
  183. package/build/components/page/index.js +1 -7
  184. package/build/components/page/index.js.map +1 -1
  185. package/build/components/page-actions/index.js +1 -7
  186. package/build/components/page-actions/index.js.map +1 -1
  187. package/build/components/page-actions/trash-page-menu-item.js +4 -13
  188. package/build/components/page-actions/trash-page-menu-item.js.map +1 -1
  189. package/build/components/page-content-focus-manager/back-to-page-notification.js +1 -9
  190. package/build/components/page-content-focus-manager/back-to-page-notification.js.map +1 -1
  191. package/build/components/page-content-focus-manager/disable-non-page-content-blocks.js +7 -17
  192. package/build/components/page-content-focus-manager/disable-non-page-content-blocks.js.map +1 -1
  193. package/build/components/page-content-focus-manager/edit-template-notification.js +0 -16
  194. package/build/components/page-content-focus-manager/edit-template-notification.js.map +1 -1
  195. package/build/components/page-content-focus-manager/index.js +1 -8
  196. package/build/components/page-content-focus-manager/index.js.map +1 -1
  197. package/build/components/page-main/index.js +1 -11
  198. package/build/components/page-main/index.js.map +1 -1
  199. package/build/components/page-patterns/duplicate-menu-item.js +22 -49
  200. package/build/components/page-patterns/duplicate-menu-item.js.map +1 -1
  201. package/build/components/page-patterns/grid-item.js +12 -32
  202. package/build/components/page-patterns/grid-item.js.map +1 -1
  203. package/build/components/page-patterns/grid.js +1 -5
  204. package/build/components/page-patterns/grid.js.map +1 -1
  205. package/build/components/page-patterns/header.js +1 -11
  206. package/build/components/page-patterns/header.js.map +1 -1
  207. package/build/components/page-patterns/index.js +6 -15
  208. package/build/components/page-patterns/index.js.map +1 -1
  209. package/build/components/page-patterns/no-patterns.js +1 -3
  210. package/build/components/page-patterns/no-patterns.js.map +1 -1
  211. package/build/components/page-patterns/pagination.js +7 -7
  212. package/build/components/page-patterns/pagination.js.map +1 -1
  213. package/build/components/page-patterns/patterns-list.js +1 -23
  214. package/build/components/page-patterns/patterns-list.js.map +1 -1
  215. package/build/components/page-patterns/rename-menu-item.js +5 -14
  216. package/build/components/page-patterns/rename-menu-item.js.map +1 -1
  217. package/build/components/page-patterns/search-items.js +27 -38
  218. package/build/components/page-patterns/search-items.js.map +1 -1
  219. package/build/components/page-patterns/use-pattern-settings.js +5 -10
  220. package/build/components/page-patterns/use-pattern-settings.js.map +1 -1
  221. package/build/components/page-patterns/use-patterns.js +15 -34
  222. package/build/components/page-patterns/use-patterns.js.map +1 -1
  223. package/build/components/page-patterns/utils.js +0 -2
  224. package/build/components/page-patterns/utils.js.map +1 -1
  225. package/build/components/page-template-parts/add-new-template-part.js +1 -13
  226. package/build/components/page-template-parts/add-new-template-part.js.map +1 -1
  227. package/build/components/page-template-parts/index.js +1 -13
  228. package/build/components/page-template-parts/index.js.map +1 -1
  229. package/build/components/page-templates/index.js +1 -13
  230. package/build/components/page-templates/index.js.map +1 -1
  231. package/build/components/plugin-template-setting-panel/index.js +2 -3
  232. package/build/components/plugin-template-setting-panel/index.js.map +1 -1
  233. package/build/components/preferences-modal/enable-feature.js +1 -7
  234. package/build/components/preferences-modal/enable-feature.js.map +1 -1
  235. package/build/components/preferences-modal/index.js +1 -16
  236. package/build/components/preferences-modal/index.js.map +1 -1
  237. package/build/components/resizable-frame/index.js +24 -44
  238. package/build/components/resizable-frame/index.js.map +1 -1
  239. package/build/components/revisions/index.js +5 -17
  240. package/build/components/revisions/index.js.map +1 -1
  241. package/build/components/routes/link.js +3 -14
  242. package/build/components/routes/link.js.map +1 -1
  243. package/build/components/routes/use-title.js +5 -16
  244. package/build/components/routes/use-title.js.map +1 -1
  245. package/build/components/save-button/index.js +3 -20
  246. package/build/components/save-button/index.js.map +1 -1
  247. package/build/components/save-hub/index.js +7 -29
  248. package/build/components/save-hub/index.js.map +1 -1
  249. package/build/components/save-panel/index.js +6 -28
  250. package/build/components/save-panel/index.js.map +1 -1
  251. package/build/components/secondary-sidebar/inserter-sidebar.js +1 -9
  252. package/build/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
  253. package/build/components/secondary-sidebar/list-view-sidebar.js +21 -32
  254. package/build/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
  255. package/build/components/sidebar/index.js +1 -25
  256. package/build/components/sidebar/index.js.map +1 -1
  257. package/build/components/sidebar-button/index.js +3 -6
  258. package/build/components/sidebar-button/index.js.map +1 -1
  259. package/build/components/sidebar-edit-mode/constants.js.map +1 -1
  260. package/build/components/sidebar-edit-mode/default-sidebar.js +2 -5
  261. package/build/components/sidebar-edit-mode/default-sidebar.js.map +1 -1
  262. package/build/components/sidebar-edit-mode/global-styles-sidebar.js +1 -18
  263. package/build/components/sidebar-edit-mode/global-styles-sidebar.js.map +1 -1
  264. package/build/components/sidebar-edit-mode/index.js +1 -24
  265. package/build/components/sidebar-edit-mode/index.js.map +1 -1
  266. package/build/components/sidebar-edit-mode/page-panels/edit-template.js +11 -20
  267. package/build/components/sidebar-edit-mode/page-panels/edit-template.js.map +1 -1
  268. package/build/components/sidebar-edit-mode/page-panels/index.js +3 -18
  269. package/build/components/sidebar-edit-mode/page-panels/index.js.map +1 -1
  270. package/build/components/sidebar-edit-mode/page-panels/page-content.js +1 -6
  271. package/build/components/sidebar-edit-mode/page-panels/page-content.js.map +1 -1
  272. package/build/components/sidebar-edit-mode/page-panels/page-status.js +3 -20
  273. package/build/components/sidebar-edit-mode/page-panels/page-status.js.map +1 -1
  274. package/build/components/sidebar-edit-mode/page-panels/page-summary.js +1 -6
  275. package/build/components/sidebar-edit-mode/page-panels/page-summary.js.map +1 -1
  276. package/build/components/sidebar-edit-mode/page-panels/publish-date.js +3 -15
  277. package/build/components/sidebar-edit-mode/page-panels/publish-date.js.map +1 -1
  278. package/build/components/sidebar-edit-mode/plugin-sidebar/index.js +0 -5
  279. package/build/components/sidebar-edit-mode/plugin-sidebar/index.js.map +1 -1
  280. package/build/components/sidebar-edit-mode/settings-header/index.js +14 -25
  281. package/build/components/sidebar-edit-mode/settings-header/index.js.map +1 -1
  282. package/build/components/sidebar-edit-mode/sidebar-card/index.js +1 -5
  283. package/build/components/sidebar-edit-mode/sidebar-card/index.js.map +1 -1
  284. package/build/components/sidebar-edit-mode/sidebar-fixed-bottom.js +1 -5
  285. package/build/components/sidebar-edit-mode/sidebar-fixed-bottom.js.map +1 -1
  286. package/build/components/sidebar-edit-mode/template-panel/index.js +1 -21
  287. package/build/components/sidebar-edit-mode/template-panel/index.js.map +1 -1
  288. package/build/components/sidebar-edit-mode/template-panel/last-revision.js +2 -17
  289. package/build/components/sidebar-edit-mode/template-panel/last-revision.js.map +1 -1
  290. package/build/components/sidebar-edit-mode/template-panel/template-actions.js +1 -11
  291. package/build/components/sidebar-edit-mode/template-panel/template-actions.js.map +1 -1
  292. package/build/components/sidebar-edit-mode/template-panel/template-areas.js +1 -15
  293. package/build/components/sidebar-edit-mode/template-panel/template-areas.js.map +1 -1
  294. package/build/components/sidebar-navigation-item/index.js +1 -7
  295. package/build/components/sidebar-navigation-item/index.js.map +1 -1
  296. package/build/components/sidebar-navigation-screen/index.js +2 -19
  297. package/build/components/sidebar-navigation-screen/index.js.map +1 -1
  298. package/build/components/sidebar-navigation-screen-details-footer/index.js +2 -7
  299. package/build/components/sidebar-navigation-screen-details-footer/index.js.map +1 -1
  300. package/build/components/sidebar-navigation-screen-details-panel/index.js +1 -7
  301. package/build/components/sidebar-navigation-screen-details-panel/index.js.map +1 -1
  302. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js +1 -3
  303. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js.map +1 -1
  304. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js +1 -5
  305. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js.map +1 -1
  306. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js +1 -3
  307. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js.map +1 -1
  308. package/build/components/sidebar-navigation-screen-global-styles/index.js +19 -48
  309. package/build/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  310. package/build/components/sidebar-navigation-screen-main/index.js +3 -14
  311. package/build/components/sidebar-navigation-screen-main/index.js.map +1 -1
  312. package/build/components/sidebar-navigation-screen-main/template-part-hint.js +1 -10
  313. package/build/components/sidebar-navigation-screen-main/template-part-hint.js.map +1 -1
  314. package/build/components/sidebar-navigation-screen-navigation-item/index.js +1 -13
  315. package/build/components/sidebar-navigation-screen-navigation-item/index.js.map +1 -1
  316. package/build/components/sidebar-navigation-screen-navigation-menu/delete-modal.js +3 -5
  317. package/build/components/sidebar-navigation-screen-navigation-menu/delete-modal.js.map +1 -1
  318. package/build/components/sidebar-navigation-screen-navigation-menu/edit-button.js +3 -8
  319. package/build/components/sidebar-navigation-screen-navigation-menu/edit-button.js.map +1 -1
  320. package/build/components/sidebar-navigation-screen-navigation-menu/index.js +5 -25
  321. package/build/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -1
  322. package/build/components/sidebar-navigation-screen-navigation-menu/more-menu.js +5 -16
  323. package/build/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -1
  324. package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js +1 -13
  325. package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +1 -1
  326. package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +3 -8
  327. package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -1
  328. package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +1 -10
  329. package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -1
  330. package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +12 -33
  331. package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -1
  332. package/build/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js +3 -6
  333. package/build/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js.map +1 -1
  334. package/build/components/sidebar-navigation-screen-navigation-menus/constants.js.map +1 -1
  335. package/build/components/sidebar-navigation-screen-navigation-menus/index.js +14 -35
  336. package/build/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  337. package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +5 -19
  338. package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +1 -1
  339. package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +6 -14
  340. package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
  341. package/build/components/sidebar-navigation-screen-page/index.js +6 -23
  342. package/build/components/sidebar-navigation-screen-page/index.js.map +1 -1
  343. package/build/components/sidebar-navigation-screen-page/page-details.js +9 -32
  344. package/build/components/sidebar-navigation-screen-page/page-details.js.map +1 -1
  345. package/build/components/sidebar-navigation-screen-page/status-label.js +3 -17
  346. package/build/components/sidebar-navigation-screen-page/status-label.js.map +1 -1
  347. package/build/components/sidebar-navigation-screen-pages/index.js +6 -31
  348. package/build/components/sidebar-navigation-screen-pages/index.js.map +1 -1
  349. package/build/components/sidebar-navigation-screen-pattern/index.js +11 -25
  350. package/build/components/sidebar-navigation-screen-pattern/index.js.map +1 -1
  351. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js +1 -7
  352. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js.map +1 -1
  353. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js +1 -5
  354. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js.map +1 -1
  355. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js +1 -7
  356. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js.map +1 -1
  357. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js +5 -10
  358. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js.map +1 -1
  359. package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js +5 -22
  360. package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js.map +1 -1
  361. package/build/components/sidebar-navigation-screen-pattern/use-pattern-details.js +7 -29
  362. package/build/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +1 -1
  363. package/build/components/sidebar-navigation-screen-patterns/category-item.js +3 -8
  364. package/build/components/sidebar-navigation-screen-patterns/category-item.js.map +1 -1
  365. package/build/components/sidebar-navigation-screen-patterns/index.js +4 -22
  366. package/build/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
  367. package/build/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js +1 -6
  368. package/build/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js.map +1 -1
  369. package/build/components/sidebar-navigation-screen-patterns/use-my-patterns.js +1 -5
  370. package/build/components/sidebar-navigation-screen-patterns/use-my-patterns.js.map +1 -1
  371. package/build/components/sidebar-navigation-screen-patterns/use-pattern-categories.js +11 -12
  372. package/build/components/sidebar-navigation-screen-patterns/use-pattern-categories.js.map +1 -1
  373. package/build/components/sidebar-navigation-screen-patterns/use-template-part-areas.js +6 -8
  374. package/build/components/sidebar-navigation-screen-patterns/use-template-part-areas.js.map +1 -1
  375. package/build/components/sidebar-navigation-screen-patterns/use-theme-patterns.js +1 -8
  376. package/build/components/sidebar-navigation-screen-patterns/use-theme-patterns.js.map +1 -1
  377. package/build/components/sidebar-navigation-screen-template/home-template-details.js +7 -31
  378. package/build/components/sidebar-navigation-screen-template/home-template-details.js.map +1 -1
  379. package/build/components/sidebar-navigation-screen-template/index.js +1 -20
  380. package/build/components/sidebar-navigation-screen-template/index.js.map +1 -1
  381. package/build/components/sidebar-navigation-screen-templates/index.js +4 -16
  382. package/build/components/sidebar-navigation-screen-templates/index.js.map +1 -1
  383. package/build/components/sidebar-navigation-screen-templates-browse/index.js +1 -9
  384. package/build/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
  385. package/build/components/site-hub/index.js +4 -21
  386. package/build/components/site-hub/index.js.map +1 -1
  387. package/build/components/site-icon/index.js +1 -12
  388. package/build/components/site-icon/index.js.map +1 -1
  389. package/build/components/start-template-options/index.js +3 -26
  390. package/build/components/start-template-options/index.js.map +1 -1
  391. package/build/components/style-book/index.js +23 -34
  392. package/build/components/style-book/index.js.map +1 -1
  393. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js +8 -25
  394. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  395. package/build/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +5 -13
  396. package/build/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +1 -1
  397. package/build/components/sync-state-with-url/use-sync-path-with-url.js +9 -19
  398. package/build/components/sync-state-with-url/use-sync-path-with-url.js.map +1 -1
  399. package/build/components/table/index.js +0 -2
  400. package/build/components/table/index.js.map +1 -1
  401. package/build/components/template-actions/index.js +2 -21
  402. package/build/components/template-actions/index.js.map +1 -1
  403. package/build/components/template-actions/rename-menu-item.js +7 -15
  404. package/build/components/template-actions/rename-menu-item.js.map +1 -1
  405. package/build/components/template-part-converter/convert-to-regular.js +1 -8
  406. package/build/components/template-part-converter/convert-to-regular.js.map +1 -1
  407. package/build/components/template-part-converter/convert-to-template-part.js +4 -15
  408. package/build/components/template-part-converter/convert-to-template-part.js.map +1 -1
  409. package/build/components/template-part-converter/index.js +3 -10
  410. package/build/components/template-part-converter/index.js.map +1 -1
  411. package/build/components/use-edited-entity-record/index.js +2 -15
  412. package/build/components/use-edited-entity-record/index.js.map +1 -1
  413. package/build/components/welcome-guide/editor.js +1 -10
  414. package/build/components/welcome-guide/editor.js.map +1 -1
  415. package/build/components/welcome-guide/image.js +0 -2
  416. package/build/components/welcome-guide/image.js.map +1 -1
  417. package/build/components/welcome-guide/index.js +1 -7
  418. package/build/components/welcome-guide/index.js.map +1 -1
  419. package/build/components/welcome-guide/page.js +1 -9
  420. package/build/components/welcome-guide/page.js.map +1 -1
  421. package/build/components/welcome-guide/styles.js +1 -12
  422. package/build/components/welcome-guide/styles.js.map +1 -1
  423. package/build/components/welcome-guide/template.js +1 -9
  424. package/build/components/welcome-guide/template.js.map +1 -1
  425. package/build/hooks/commands/use-common-commands.js +132 -122
  426. package/build/hooks/commands/use-common-commands.js.map +1 -1
  427. package/build/hooks/commands/use-edit-mode-commands.js +68 -65
  428. package/build/hooks/commands/use-edit-mode-commands.js.map +1 -1
  429. package/build/hooks/components.js +1 -2
  430. package/build/hooks/components.js.map +1 -1
  431. package/build/hooks/index.js +0 -3
  432. package/build/hooks/index.js.map +1 -1
  433. package/build/hooks/navigation-menu-edit.js +11 -24
  434. package/build/hooks/navigation-menu-edit.js.map +1 -1
  435. package/build/hooks/push-changes-to-global-styles/index.js +161 -69
  436. package/build/hooks/push-changes-to-global-styles/index.js.map +1 -1
  437. package/build/hooks/template-part-edit.js +7 -19
  438. package/build/hooks/template-part-edit.js.map +1 -1
  439. package/build/index.js +8 -31
  440. package/build/index.js.map +1 -1
  441. package/build/lock-unlock.js +1 -2
  442. package/build/lock-unlock.js.map +1 -1
  443. package/build/store/actions.js +33 -98
  444. package/build/store/actions.js.map +1 -1
  445. package/build/store/constants.js +0 -1
  446. package/build/store/constants.js.map +1 -1
  447. package/build/store/index.js +1 -12
  448. package/build/store/index.js.map +1 -1
  449. package/build/store/private-actions.js +5 -13
  450. package/build/store/private-actions.js.map +1 -1
  451. package/build/store/private-selectors.js +1 -3
  452. package/build/store/private-selectors.js.map +1 -1
  453. package/build/store/reducer.js +12 -38
  454. package/build/store/reducer.js.map +1 -1
  455. package/build/store/selectors.js +23 -60
  456. package/build/store/selectors.js.map +1 -1
  457. package/build/store/utils.js +13 -16
  458. package/build/store/utils.js.map +1 -1
  459. package/build/utils/get-is-list-page.js +2 -2
  460. package/build/utils/get-is-list-page.js.map +1 -1
  461. package/build/utils/is-previewing-theme.js +1 -4
  462. package/build/utils/is-previewing-theme.js.map +1 -1
  463. package/build/utils/is-template-removable.js +0 -2
  464. package/build/utils/is-template-removable.js.map +1 -1
  465. package/build/utils/is-template-revertable.js +0 -3
  466. package/build/utils/is-template-revertable.js.map +1 -1
  467. package/build/utils/template-part-create.js +3 -15
  468. package/build/utils/template-part-create.js.map +1 -1
  469. package/build/utils/use-activate-theme.js +2 -5
  470. package/build/utils/use-activate-theme.js.map +1 -1
  471. package/build/utils/use-debounced-input.js +1 -3
  472. package/build/utils/use-debounced-input.js.map +1 -1
  473. package/build-module/components/add-new-page/index.js +2 -7
  474. package/build-module/components/add-new-page/index.js.map +1 -1
  475. package/build-module/components/add-new-pattern/index.js +12 -13
  476. package/build-module/components/add-new-pattern/index.js.map +1 -1
  477. package/build-module/components/add-new-template/add-custom-generic-template-modal-content.js +1 -11
  478. package/build-module/components/add-new-template/add-custom-generic-template-modal-content.js.map +1 -1
  479. package/build-module/components/add-new-template/add-custom-template-modal-content.js +9 -21
  480. package/build-module/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
  481. package/build-module/components/add-new-template/index.js +3 -6
  482. package/build-module/components/add-new-template/index.js.map +1 -1
  483. package/build-module/components/add-new-template/new-template.js +20 -34
  484. package/build-module/components/add-new-template/new-template.js.map +1 -1
  485. package/build-module/components/add-new-template/template-actions-loading-screen.js +0 -1
  486. package/build-module/components/add-new-template/template-actions-loading-screen.js.map +1 -1
  487. package/build-module/components/add-new-template/utils.js +52 -82
  488. package/build-module/components/add-new-template/utils.js.map +1 -1
  489. package/build-module/components/app/index.js +2 -6
  490. package/build-module/components/app/index.js.map +1 -1
  491. package/build-module/components/block-editor/back-button.js +1 -6
  492. package/build-module/components/block-editor/back-button.js.map +1 -1
  493. package/build-module/components/block-editor/block-inspector-button.js +3 -5
  494. package/build-module/components/block-editor/block-inspector-button.js.map +1 -1
  495. package/build-module/components/block-editor/constants.js.map +1 -1
  496. package/build-module/components/block-editor/editor-canvas.js +6 -8
  497. package/build-module/components/block-editor/editor-canvas.js.map +1 -1
  498. package/build-module/components/block-editor/get-block-editor-provider.js +1 -4
  499. package/build-module/components/block-editor/get-block-editor-provider.js.map +1 -1
  500. package/build-module/components/block-editor/index.js +10 -6
  501. package/build-module/components/block-editor/index.js.map +1 -1
  502. package/build-module/components/block-editor/inserter-media-categories.js +31 -41
  503. package/build-module/components/block-editor/inserter-media-categories.js.map +1 -1
  504. package/build-module/components/block-editor/providers/default-block-editor-provider.js +1 -2
  505. package/build-module/components/block-editor/providers/default-block-editor-provider.js.map +1 -1
  506. package/build-module/components/block-editor/providers/navigation-block-editor-provider.js +10 -11
  507. package/build-module/components/block-editor/providers/navigation-block-editor-provider.js.map +1 -1
  508. package/build-module/components/block-editor/resizable-editor.js +5 -6
  509. package/build-module/components/block-editor/resizable-editor.js.map +1 -1
  510. package/build-module/components/block-editor/resize-handle.js +0 -3
  511. package/build-module/components/block-editor/resize-handle.js.map +1 -1
  512. package/build-module/components/block-editor/site-editor-canvas.js +5 -8
  513. package/build-module/components/block-editor/site-editor-canvas.js.map +1 -1
  514. package/build-module/components/block-editor/use-site-editor-settings.js +10 -23
  515. package/build-module/components/block-editor/use-site-editor-settings.js.map +1 -1
  516. package/build-module/components/canvas-spinner/index.js +31 -4
  517. package/build-module/components/canvas-spinner/index.js.map +1 -1
  518. package/build-module/components/code-editor/index.js +4 -9
  519. package/build-module/components/code-editor/index.js.map +1 -1
  520. package/build-module/components/create-template-part-modal/index.js +4 -8
  521. package/build-module/components/create-template-part-modal/index.js.map +1 -1
  522. package/build-module/components/editor/index.js +31 -21
  523. package/build-module/components/editor/index.js.map +1 -1
  524. package/build-module/components/editor-canvas-container/index.js +4 -18
  525. package/build-module/components/editor-canvas-container/index.js.map +1 -1
  526. package/build-module/components/error-boundary/index.js +1 -7
  527. package/build-module/components/error-boundary/index.js.map +1 -1
  528. package/build-module/components/error-boundary/warning.js +0 -3
  529. package/build-module/components/error-boundary/warning.js.map +1 -1
  530. package/build-module/components/global-styles/block-preview-panel.js +22 -10
  531. package/build-module/components/global-styles/block-preview-panel.js.map +1 -1
  532. package/build-module/components/global-styles/color-indicator-wrapper.js +1 -4
  533. package/build-module/components/global-styles/color-indicator-wrapper.js.map +1 -1
  534. package/build-module/components/global-styles/color-palette-panel.js +1 -2
  535. package/build-module/components/global-styles/color-palette-panel.js.map +1 -1
  536. package/build-module/components/global-styles/dimensions-panel.js +14 -13
  537. package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
  538. package/build-module/components/global-styles/global-styles-provider.js +2 -15
  539. package/build-module/components/global-styles/global-styles-provider.js.map +1 -1
  540. package/build-module/components/global-styles/gradients-palette-panel.js +1 -4
  541. package/build-module/components/global-styles/gradients-palette-panel.js.map +1 -1
  542. package/build-module/components/global-styles/header.js +2 -4
  543. package/build-module/components/global-styles/header.js.map +1 -1
  544. package/build-module/components/global-styles/hooks.js +26 -7
  545. package/build-module/components/global-styles/hooks.js.map +1 -1
  546. package/build-module/components/global-styles/icon-with-current-color.js +1 -2
  547. package/build-module/components/global-styles/icon-with-current-color.js.map +1 -1
  548. package/build-module/components/global-styles/index.js.map +1 -1
  549. package/build-module/components/global-styles/navigation-button.js +3 -7
  550. package/build-module/components/global-styles/navigation-button.js.map +1 -1
  551. package/build-module/components/global-styles/palette.js +3 -5
  552. package/build-module/components/global-styles/palette.js.map +1 -1
  553. package/build-module/components/global-styles/preview.js +7 -14
  554. package/build-module/components/global-styles/preview.js.map +1 -1
  555. package/build-module/components/global-styles/root-menu.js +1 -4
  556. package/build-module/components/global-styles/root-menu.js.map +1 -1
  557. package/build-module/components/global-styles/screen-block-list.js +10 -20
  558. package/build-module/components/global-styles/screen-block-list.js.map +1 -1
  559. package/build-module/components/global-styles/screen-block.js +28 -38
  560. package/build-module/components/global-styles/screen-block.js.map +1 -1
  561. package/build-module/components/global-styles/screen-color-palette.js +1 -4
  562. package/build-module/components/global-styles/screen-color-palette.js.map +1 -1
  563. package/build-module/components/global-styles/screen-colors.js +2 -6
  564. package/build-module/components/global-styles/screen-colors.js.map +1 -1
  565. package/build-module/components/global-styles/screen-css.js +1 -5
  566. package/build-module/components/global-styles/screen-css.js.map +1 -1
  567. package/build-module/components/global-styles/screen-layout.js +2 -6
  568. package/build-module/components/global-styles/screen-layout.js.map +1 -1
  569. package/build-module/components/global-styles/screen-revisions/index.js +7 -13
  570. package/build-module/components/global-styles/screen-revisions/index.js.map +1 -1
  571. package/build-module/components/global-styles/screen-revisions/revisions-buttons.js +22 -22
  572. package/build-module/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  573. package/build-module/components/global-styles/screen-revisions/use-global-styles-revisions.js +12 -16
  574. package/build-module/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -1
  575. package/build-module/components/global-styles/screen-root.js +2 -9
  576. package/build-module/components/global-styles/screen-root.js.map +1 -1
  577. package/build-module/components/global-styles/screen-style-variations.js +6 -9
  578. package/build-module/components/global-styles/screen-style-variations.js.map +1 -1
  579. package/build-module/components/global-styles/screen-typography-element.js +2 -6
  580. package/build-module/components/global-styles/screen-typography-element.js.map +1 -1
  581. package/build-module/components/global-styles/screen-typography.js +4 -8
  582. package/build-module/components/global-styles/screen-typography.js.map +1 -1
  583. package/build-module/components/global-styles/style-variations-container.js +5 -15
  584. package/build-module/components/global-styles/style-variations-container.js.map +1 -1
  585. package/build-module/components/global-styles/subtitle.js +0 -3
  586. package/build-module/components/global-styles/subtitle.js.map +1 -1
  587. package/build-module/components/global-styles/typography-panel.js +1 -4
  588. package/build-module/components/global-styles/typography-panel.js.map +1 -1
  589. package/build-module/components/global-styles/typography-preview.js +1 -4
  590. package/build-module/components/global-styles/typography-preview.js.map +1 -1
  591. package/build-module/components/global-styles/ui.js +15 -37
  592. package/build-module/components/global-styles/ui.js.map +1 -1
  593. package/build-module/components/global-styles/utils.js +0 -1
  594. package/build-module/components/global-styles/utils.js.map +1 -1
  595. package/build-module/components/global-styles/variations-panel.js +0 -4
  596. package/build-module/components/global-styles/variations-panel.js.map +1 -1
  597. package/build-module/components/global-styles-renderer/index.js +3 -6
  598. package/build-module/components/global-styles-renderer/index.js.map +1 -1
  599. package/build-module/components/header-edit-mode/document-actions/index.js +12 -41
  600. package/build-module/components/header-edit-mode/document-actions/index.js.map +1 -1
  601. package/build-module/components/header-edit-mode/index.js +9 -18
  602. package/build-module/components/header-edit-mode/index.js.map +1 -1
  603. package/build-module/components/header-edit-mode/mode-switcher/index.js +4 -7
  604. package/build-module/components/header-edit-mode/mode-switcher/index.js.map +1 -1
  605. package/build-module/components/header-edit-mode/more-menu/copy-content-menu-item.js +1 -6
  606. package/build-module/components/header-edit-mode/more-menu/copy-content-menu-item.js.map +1 -1
  607. package/build-module/components/header-edit-mode/more-menu/index.js +2 -6
  608. package/build-module/components/header-edit-mode/more-menu/index.js.map +1 -1
  609. package/build-module/components/header-edit-mode/more-menu/site-export.js +1 -6
  610. package/build-module/components/header-edit-mode/more-menu/site-export.js.map +1 -1
  611. package/build-module/components/header-edit-mode/more-menu/welcome-guide-menu-item.js +0 -1
  612. package/build-module/components/header-edit-mode/more-menu/welcome-guide-menu-item.js.map +1 -1
  613. package/build-module/components/header-edit-mode/plugin-more-menu-item/index.js +1 -2
  614. package/build-module/components/header-edit-mode/plugin-more-menu-item/index.js.map +1 -1
  615. package/build-module/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js +3 -2
  616. package/build-module/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js.map +1 -1
  617. package/build-module/components/header-edit-mode/tools-more-menu-group/index.js +0 -3
  618. package/build-module/components/header-edit-mode/tools-more-menu-group/index.js.map +1 -1
  619. package/build-module/components/header-edit-mode/undo-redo/redo.js +4 -5
  620. package/build-module/components/header-edit-mode/undo-redo/redo.js.map +1 -1
  621. package/build-module/components/header-edit-mode/undo-redo/undo.js +4 -5
  622. package/build-module/components/header-edit-mode/undo-redo/undo.js.map +1 -1
  623. package/build-module/components/keyboard-shortcut-help-modal/config.js.map +1 -1
  624. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +1 -4
  625. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
  626. package/build-module/components/keyboard-shortcut-help-modal/index.js +5 -15
  627. package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  628. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +0 -4
  629. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
  630. package/build-module/components/keyboard-shortcuts/edit-mode.js +3 -13
  631. package/build-module/components/keyboard-shortcuts/edit-mode.js.map +1 -1
  632. package/build-module/components/keyboard-shortcuts/global.js +1 -6
  633. package/build-module/components/keyboard-shortcuts/global.js.map +1 -1
  634. package/build-module/components/keyboard-shortcuts/register.js +0 -2
  635. package/build-module/components/keyboard-shortcuts/register.js.map +1 -1
  636. package/build-module/components/layout/hooks.js +2 -4
  637. package/build-module/components/layout/hooks.js.map +1 -1
  638. package/build-module/components/layout/index.js +19 -20
  639. package/build-module/components/layout/index.js.map +1 -1
  640. package/build-module/components/list/added-by.js +12 -15
  641. package/build-module/components/list/added-by.js.map +1 -1
  642. package/build-module/components/list/header.js +1 -4
  643. package/build-module/components/list/header.js.map +1 -1
  644. package/build-module/components/list/index.js +8 -6
  645. package/build-module/components/list/index.js.map +1 -1
  646. package/build-module/components/list/table.js +5 -7
  647. package/build-module/components/list/table.js.map +1 -1
  648. package/build-module/components/list/use-register-shortcuts.js +1 -0
  649. package/build-module/components/list/use-register-shortcuts.js.map +1 -1
  650. package/build-module/components/page/header.js +1 -1
  651. package/build-module/components/page/header.js.map +1 -1
  652. package/build-module/components/page/index.js +2 -3
  653. package/build-module/components/page/index.js.map +1 -1
  654. package/build-module/components/page-actions/index.js +1 -2
  655. package/build-module/components/page-actions/index.js.map +1 -1
  656. package/build-module/components/page-actions/trash-page-menu-item.js +3 -6
  657. package/build-module/components/page-actions/trash-page-menu-item.js.map +1 -1
  658. package/build-module/components/page-content-focus-manager/back-to-page-notification.js +3 -4
  659. package/build-module/components/page-content-focus-manager/back-to-page-notification.js.map +1 -1
  660. package/build-module/components/page-content-focus-manager/disable-non-page-content-blocks.js +6 -9
  661. package/build-module/components/page-content-focus-manager/disable-non-page-content-blocks.js.map +1 -1
  662. package/build-module/components/page-content-focus-manager/edit-template-notification.js +2 -12
  663. package/build-module/components/page-content-focus-manager/edit-template-notification.js.map +1 -1
  664. package/build-module/components/page-content-focus-manager/index.js +1 -2
  665. package/build-module/components/page-content-focus-manager/index.js.map +1 -1
  666. package/build-module/components/page-main/index.js +1 -4
  667. package/build-module/components/page-main/index.js.map +1 -1
  668. package/build-module/components/page-patterns/duplicate-menu-item.js +22 -40
  669. package/build-module/components/page-patterns/duplicate-menu-item.js.map +1 -1
  670. package/build-module/components/page-patterns/grid-item.js +13 -18
  671. package/build-module/components/page-patterns/grid-item.js.map +1 -1
  672. package/build-module/components/page-patterns/grid.js +0 -2
  673. package/build-module/components/page-patterns/grid.js.map +1 -1
  674. package/build-module/components/page-patterns/header.js +1 -4
  675. package/build-module/components/page-patterns/header.js.map +1 -1
  676. package/build-module/components/page-patterns/index.js +6 -5
  677. package/build-module/components/page-patterns/index.js.map +1 -1
  678. package/build-module/components/page-patterns/no-patterns.js +0 -1
  679. package/build-module/components/page-patterns/no-patterns.js.map +1 -1
  680. package/build-module/components/page-patterns/pagination.js +6 -4
  681. package/build-module/components/page-patterns/pagination.js.map +1 -1
  682. package/build-module/components/page-patterns/patterns-list.js +1 -7
  683. package/build-module/components/page-patterns/patterns-list.js.map +1 -1
  684. package/build-module/components/page-patterns/rename-menu-item.js +5 -8
  685. package/build-module/components/page-patterns/rename-menu-item.js.map +1 -1
  686. package/build-module/components/page-patterns/search-items.js +28 -32
  687. package/build-module/components/page-patterns/search-items.js.map +1 -1
  688. package/build-module/components/page-patterns/use-pattern-settings.js +5 -4
  689. package/build-module/components/page-patterns/use-pattern-settings.js.map +1 -1
  690. package/build-module/components/page-patterns/use-patterns.js +15 -24
  691. package/build-module/components/page-patterns/use-patterns.js.map +1 -1
  692. package/build-module/components/page-patterns/utils.js.map +1 -1
  693. package/build-module/components/page-template-parts/add-new-template-part.js +1 -4
  694. package/build-module/components/page-template-parts/add-new-template-part.js.map +1 -1
  695. package/build-module/components/page-template-parts/index.js +1 -2
  696. package/build-module/components/page-template-parts/index.js.map +1 -1
  697. package/build-module/components/page-templates/index.js +1 -2
  698. package/build-module/components/page-templates/index.js.map +1 -1
  699. package/build-module/components/plugin-template-setting-panel/index.js +1 -1
  700. package/build-module/components/plugin-template-setting-panel/index.js.map +1 -1
  701. package/build-module/components/preferences-modal/enable-feature.js +0 -3
  702. package/build-module/components/preferences-modal/enable-feature.js.map +1 -1
  703. package/build-module/components/preferences-modal/index.js +1 -8
  704. package/build-module/components/preferences-modal/index.js.map +1 -1
  705. package/build-module/components/resizable-frame/index.js +27 -38
  706. package/build-module/components/resizable-frame/index.js.map +1 -1
  707. package/build-module/components/revisions/index.js +5 -7
  708. package/build-module/components/revisions/index.js.map +1 -1
  709. package/build-module/components/routes/link.js +3 -8
  710. package/build-module/components/routes/link.js.map +1 -1
  711. package/build-module/components/routes/use-title.js +5 -7
  712. package/build-module/components/routes/use-title.js.map +1 -1
  713. package/build-module/components/save-button/index.js +3 -13
  714. package/build-module/components/save-button/index.js.map +1 -1
  715. package/build-module/components/save-hub/index.js +7 -16
  716. package/build-module/components/save-hub/index.js.map +1 -1
  717. package/build-module/components/save-panel/index.js +7 -17
  718. package/build-module/components/save-panel/index.js.map +1 -1
  719. package/build-module/components/secondary-sidebar/inserter-sidebar.js +1 -2
  720. package/build-module/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
  721. package/build-module/components/secondary-sidebar/list-view-sidebar.js +21 -19
  722. package/build-module/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
  723. package/build-module/components/sidebar/index.js +1 -5
  724. package/build-module/components/sidebar/index.js.map +1 -1
  725. package/build-module/components/sidebar-button/index.js +3 -3
  726. package/build-module/components/sidebar-button/index.js.map +1 -1
  727. package/build-module/components/sidebar-edit-mode/constants.js.map +1 -1
  728. package/build-module/components/sidebar-edit-mode/default-sidebar.js +2 -2
  729. package/build-module/components/sidebar-edit-mode/default-sidebar.js.map +1 -1
  730. package/build-module/components/sidebar-edit-mode/global-styles-sidebar.js +1 -6
  731. package/build-module/components/sidebar-edit-mode/global-styles-sidebar.js.map +1 -1
  732. package/build-module/components/sidebar-edit-mode/index.js +1 -7
  733. package/build-module/components/sidebar-edit-mode/index.js.map +1 -1
  734. package/build-module/components/sidebar-edit-mode/page-panels/edit-template.js +11 -13
  735. package/build-module/components/sidebar-edit-mode/page-panels/edit-template.js.map +1 -1
  736. package/build-module/components/sidebar-edit-mode/page-panels/index.js +3 -5
  737. package/build-module/components/sidebar-edit-mode/page-panels/index.js.map +1 -1
  738. package/build-module/components/sidebar-edit-mode/page-panels/page-content.js +1 -2
  739. package/build-module/components/sidebar-edit-mode/page-panels/page-content.js.map +1 -1
  740. package/build-module/components/sidebar-edit-mode/page-panels/page-status.js +2 -11
  741. package/build-module/components/sidebar-edit-mode/page-panels/page-status.js.map +1 -1
  742. package/build-module/components/sidebar-edit-mode/page-panels/page-summary.js +0 -2
  743. package/build-module/components/sidebar-edit-mode/page-panels/page-summary.js.map +1 -1
  744. package/build-module/components/sidebar-edit-mode/page-panels/publish-date.js +2 -7
  745. package/build-module/components/sidebar-edit-mode/page-panels/publish-date.js.map +1 -1
  746. package/build-module/components/sidebar-edit-mode/plugin-sidebar/index.js +2 -3
  747. package/build-module/components/sidebar-edit-mode/plugin-sidebar/index.js.map +1 -1
  748. package/build-module/components/sidebar-edit-mode/settings-header/index.js +15 -17
  749. package/build-module/components/sidebar-edit-mode/settings-header/index.js.map +1 -1
  750. package/build-module/components/sidebar-edit-mode/sidebar-card/index.js +1 -2
  751. package/build-module/components/sidebar-edit-mode/sidebar-card/index.js.map +1 -1
  752. package/build-module/components/sidebar-edit-mode/sidebar-fixed-bottom.js +1 -2
  753. package/build-module/components/sidebar-edit-mode/sidebar-fixed-bottom.js.map +1 -1
  754. package/build-module/components/sidebar-edit-mode/template-panel/index.js +1 -7
  755. package/build-module/components/sidebar-edit-mode/template-panel/index.js.map +1 -1
  756. package/build-module/components/sidebar-edit-mode/template-panel/last-revision.js +2 -11
  757. package/build-module/components/sidebar-edit-mode/template-panel/last-revision.js.map +1 -1
  758. package/build-module/components/sidebar-edit-mode/template-panel/template-actions.js +1 -4
  759. package/build-module/components/sidebar-edit-mode/template-panel/template-actions.js.map +1 -1
  760. package/build-module/components/sidebar-edit-mode/template-panel/template-areas.js +1 -10
  761. package/build-module/components/sidebar-edit-mode/template-panel/template-areas.js.map +1 -1
  762. package/build-module/components/sidebar-navigation-item/index.js +1 -2
  763. package/build-module/components/sidebar-navigation-item/index.js.map +1 -1
  764. package/build-module/components/sidebar-navigation-screen/index.js +3 -7
  765. package/build-module/components/sidebar-navigation-screen/index.js.map +1 -1
  766. package/build-module/components/sidebar-navigation-screen-details-footer/index.js +2 -4
  767. package/build-module/components/sidebar-navigation-screen-details-footer/index.js.map +1 -1
  768. package/build-module/components/sidebar-navigation-screen-details-panel/index.js +1 -4
  769. package/build-module/components/sidebar-navigation-screen-details-panel/index.js.map +1 -1
  770. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js +0 -1
  771. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js.map +1 -1
  772. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js +1 -2
  773. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js.map +1 -1
  774. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js +0 -1
  775. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js.map +1 -1
  776. package/build-module/components/sidebar-navigation-screen-global-styles/index.js +19 -30
  777. package/build-module/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  778. package/build-module/components/sidebar-navigation-screen-main/index.js +3 -3
  779. package/build-module/components/sidebar-navigation-screen-main/index.js.map +1 -1
  780. package/build-module/components/sidebar-navigation-screen-main/template-part-hint.js +0 -4
  781. package/build-module/components/sidebar-navigation-screen-main/template-part-hint.js.map +1 -1
  782. package/build-module/components/sidebar-navigation-screen-navigation-item/index.js +1 -2
  783. package/build-module/components/sidebar-navigation-screen-navigation-item/index.js.map +1 -1
  784. package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-modal.js +2 -2
  785. package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-modal.js.map +1 -1
  786. package/build-module/components/sidebar-navigation-screen-navigation-menu/edit-button.js +2 -3
  787. package/build-module/components/sidebar-navigation-screen-navigation-menu/edit-button.js.map +1 -1
  788. package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js +5 -13
  789. package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -1
  790. package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.js +5 -9
  791. package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -1
  792. package/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js +1 -7
  793. package/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +1 -1
  794. package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +2 -6
  795. package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -1
  796. package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +0 -2
  797. package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -1
  798. package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +11 -28
  799. package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -1
  800. package/build-module/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js +4 -4
  801. package/build-module/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js.map +1 -1
  802. package/build-module/components/sidebar-navigation-screen-navigation-menus/constants.js.map +1 -1
  803. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js +16 -20
  804. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  805. package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +5 -9
  806. package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +1 -1
  807. package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +6 -6
  808. package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
  809. package/build-module/components/sidebar-navigation-screen-page/index.js +6 -6
  810. package/build-module/components/sidebar-navigation-screen-page/index.js.map +1 -1
  811. package/build-module/components/sidebar-navigation-screen-page/page-details.js +11 -22
  812. package/build-module/components/sidebar-navigation-screen-page/page-details.js.map +1 -1
  813. package/build-module/components/sidebar-navigation-screen-page/status-label.js +3 -13
  814. package/build-module/components/sidebar-navigation-screen-page/status-label.js.map +1 -1
  815. package/build-module/components/sidebar-navigation-screen-pages/index.js +6 -17
  816. package/build-module/components/sidebar-navigation-screen-pages/index.js.map +1 -1
  817. package/build-module/components/sidebar-navigation-screen-pattern/index.js +11 -12
  818. package/build-module/components/sidebar-navigation-screen-pattern/index.js.map +1 -1
  819. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js +1 -2
  820. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js.map +1 -1
  821. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js +0 -2
  822. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js.map +1 -1
  823. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js +1 -2
  824. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js.map +1 -1
  825. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js +4 -5
  826. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js.map +1 -1
  827. package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js +7 -19
  828. package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js.map +1 -1
  829. package/build-module/components/sidebar-navigation-screen-pattern/use-pattern-details.js +8 -18
  830. package/build-module/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +1 -1
  831. package/build-module/components/sidebar-navigation-screen-patterns/category-item.js +2 -4
  832. package/build-module/components/sidebar-navigation-screen-patterns/category-item.js.map +1 -1
  833. package/build-module/components/sidebar-navigation-screen-patterns/index.js +4 -7
  834. package/build-module/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
  835. package/build-module/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js +1 -2
  836. package/build-module/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js.map +1 -1
  837. package/build-module/components/sidebar-navigation-screen-patterns/use-my-patterns.js +0 -1
  838. package/build-module/components/sidebar-navigation-screen-patterns/use-my-patterns.js.map +1 -1
  839. package/build-module/components/sidebar-navigation-screen-patterns/use-pattern-categories.js +11 -7
  840. package/build-module/components/sidebar-navigation-screen-patterns/use-pattern-categories.js.map +1 -1
  841. package/build-module/components/sidebar-navigation-screen-patterns/use-template-part-areas.js +5 -5
  842. package/build-module/components/sidebar-navigation-screen-patterns/use-template-part-areas.js.map +1 -1
  843. package/build-module/components/sidebar-navigation-screen-patterns/use-theme-patterns.js +1 -2
  844. package/build-module/components/sidebar-navigation-screen-patterns/use-theme-patterns.js.map +1 -1
  845. package/build-module/components/sidebar-navigation-screen-template/home-template-details.js +7 -18
  846. package/build-module/components/sidebar-navigation-screen-template/home-template-details.js.map +1 -1
  847. package/build-module/components/sidebar-navigation-screen-template/index.js +0 -6
  848. package/build-module/components/sidebar-navigation-screen-template/index.js.map +1 -1
  849. package/build-module/components/sidebar-navigation-screen-templates/index.js +4 -6
  850. package/build-module/components/sidebar-navigation-screen-templates/index.js.map +1 -1
  851. package/build-module/components/sidebar-navigation-screen-templates-browse/index.js +1 -2
  852. package/build-module/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
  853. package/build-module/components/site-hub/index.js +5 -7
  854. package/build-module/components/site-hub/index.js.map +1 -1
  855. package/build-module/components/site-icon/index.js +1 -6
  856. package/build-module/components/site-icon/index.js.map +1 -1
  857. package/build-module/components/start-template-options/index.js +3 -14
  858. package/build-module/components/start-template-options/index.js.map +1 -1
  859. package/build-module/components/style-book/index.js +24 -24
  860. package/build-module/components/style-book/index.js.map +1 -1
  861. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js +8 -15
  862. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  863. package/build-module/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +5 -7
  864. package/build-module/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +1 -1
  865. package/build-module/components/sync-state-with-url/use-sync-path-with-url.js +9 -14
  866. package/build-module/components/sync-state-with-url/use-sync-path-with-url.js.map +1 -1
  867. package/build-module/components/table/index.js.map +1 -1
  868. package/build-module/components/template-actions/index.js +2 -9
  869. package/build-module/components/template-actions/index.js.map +1 -1
  870. package/build-module/components/template-actions/rename-menu-item.js +6 -8
  871. package/build-module/components/template-actions/rename-menu-item.js.map +1 -1
  872. package/build-module/components/template-part-converter/convert-to-regular.js +0 -3
  873. package/build-module/components/template-part-converter/convert-to-regular.js.map +1 -1
  874. package/build-module/components/template-part-converter/convert-to-template-part.js +4 -5
  875. package/build-module/components/template-part-converter/convert-to-template-part.js.map +1 -1
  876. package/build-module/components/template-part-converter/index.js +3 -5
  877. package/build-module/components/template-part-converter/index.js.map +1 -1
  878. package/build-module/components/use-edited-entity-record/index.js +2 -7
  879. package/build-module/components/use-edited-entity-record/index.js.map +1 -1
  880. package/build-module/components/welcome-guide/editor.js +1 -4
  881. package/build-module/components/welcome-guide/editor.js.map +1 -1
  882. package/build-module/components/welcome-guide/image.js.map +1 -1
  883. package/build-module/components/welcome-guide/index.js +0 -1
  884. package/build-module/components/welcome-guide/index.js.map +1 -1
  885. package/build-module/components/welcome-guide/page.js +1 -5
  886. package/build-module/components/welcome-guide/page.js.map +1 -1
  887. package/build-module/components/welcome-guide/styles.js +1 -5
  888. package/build-module/components/welcome-guide/styles.js.map +1 -1
  889. package/build-module/components/welcome-guide/template.js +1 -5
  890. package/build-module/components/welcome-guide/template.js.map +1 -1
  891. package/build-module/hooks/commands/use-common-commands.js +133 -108
  892. package/build-module/hooks/commands/use-common-commands.js.map +1 -1
  893. package/build-module/hooks/commands/use-edit-mode-commands.js +69 -49
  894. package/build-module/hooks/commands/use-edit-mode-commands.js.map +1 -1
  895. package/build-module/hooks/components.js.map +1 -1
  896. package/build-module/hooks/index.js.map +1 -1
  897. package/build-module/hooks/navigation-menu-edit.js +11 -14
  898. package/build-module/hooks/navigation-menu-edit.js.map +1 -1
  899. package/build-module/hooks/push-changes-to-global-styles/index.js +162 -61
  900. package/build-module/hooks/push-changes-to-global-styles/index.js.map +1 -1
  901. package/build-module/hooks/template-part-edit.js +7 -9
  902. package/build-module/hooks/template-part-edit.js.map +1 -1
  903. package/build-module/index.js +10 -15
  904. package/build-module/index.js.map +1 -1
  905. package/build-module/lock-unlock.js.map +1 -1
  906. package/build-module/store/actions.js +35 -53
  907. package/build-module/store/actions.js.map +1 -1
  908. package/build-module/store/constants.js.map +1 -1
  909. package/build-module/store/index.js +1 -1
  910. package/build-module/store/index.js.map +1 -1
  911. package/build-module/store/private-actions.js +6 -8
  912. package/build-module/store/private-actions.js.map +1 -1
  913. package/build-module/store/private-selectors.js +1 -1
  914. package/build-module/store/private-selectors.js.map +1 -1
  915. package/build-module/store/reducer.js +13 -29
  916. package/build-module/store/reducer.js.map +1 -1
  917. package/build-module/store/selectors.js +26 -31
  918. package/build-module/store/selectors.js.map +1 -1
  919. package/build-module/store/utils.js +13 -13
  920. package/build-module/store/utils.js.map +1 -1
  921. package/build-module/utils/get-is-list-page.js +2 -1
  922. package/build-module/utils/get-is-list-page.js.map +1 -1
  923. package/build-module/utils/is-previewing-theme.js +0 -1
  924. package/build-module/utils/is-previewing-theme.js.map +1 -1
  925. package/build-module/utils/is-template-removable.js +0 -1
  926. package/build-module/utils/is-template-removable.js.map +1 -1
  927. package/build-module/utils/is-template-revertable.js +0 -2
  928. package/build-module/utils/is-template-revertable.js.map +1 -1
  929. package/build-module/utils/template-part-create.js +3 -7
  930. package/build-module/utils/template-part-create.js.map +1 -1
  931. package/build-module/utils/use-activate-theme.js +2 -2
  932. package/build-module/utils/use-activate-theme.js.map +1 -1
  933. package/build-module/utils/use-debounced-input.js.map +1 -1
  934. package/build-style/style-rtl.css +37 -27
  935. package/build-style/style.css +37 -27
  936. package/package.json +41 -40
  937. package/src/components/add-new-pattern/index.js +4 -3
  938. package/src/components/block-editor/index.js +4 -3
  939. package/src/components/block-editor/providers/navigation-block-editor-provider.js +2 -3
  940. package/src/components/canvas-spinner/index.js +21 -3
  941. package/src/components/canvas-spinner/style.scss +5 -2
  942. package/src/components/editor/index.js +15 -1
  943. package/src/components/global-styles/block-preview-panel.js +26 -15
  944. package/src/components/global-styles/hooks.js +27 -1
  945. package/src/components/global-styles/preview.js +3 -13
  946. package/src/components/global-styles/screen-colors.js +0 -4
  947. package/src/components/global-styles/screen-layout.js +0 -2
  948. package/src/components/global-styles/screen-revisions/index.js +6 -4
  949. package/src/components/global-styles/screen-revisions/revisions-buttons.js +46 -21
  950. package/src/components/global-styles/screen-revisions/test/use-global-styles-revisions.js +10 -0
  951. package/src/components/global-styles/screen-revisions/use-global-styles-revisions.js +6 -0
  952. package/src/components/global-styles/screen-typography.js +0 -4
  953. package/src/components/global-styles/ui.js +1 -1
  954. package/src/components/header-edit-mode/document-actions/index.js +13 -26
  955. package/src/components/header-edit-mode/document-actions/style.scss +17 -4
  956. package/src/components/header-edit-mode/index.js +1 -1
  957. package/src/components/header-edit-mode/style.scss +0 -9
  958. package/src/components/layout/index.js +5 -2
  959. package/src/components/page-actions/trash-page-menu-item.js +5 -1
  960. package/src/components/page-content-focus-manager/disable-non-page-content-blocks.js +1 -4
  961. package/src/components/page-patterns/duplicate-menu-item.js +18 -39
  962. package/src/components/page-patterns/use-patterns.js +9 -3
  963. package/src/components/sidebar-edit-mode/default-sidebar.js +1 -0
  964. package/src/components/sidebar-edit-mode/page-panels/edit-template.js +13 -5
  965. package/src/components/sidebar-navigation-screen-global-styles/index.js +1 -1
  966. package/src/components/sidebar-navigation-screen-navigation-menu/index.js +3 -4
  967. package/src/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +2 -1
  968. package/src/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +11 -10
  969. package/src/components/sidebar-navigation-screen-page/index.js +3 -3
  970. package/src/components/sidebar-navigation-screen-pages/index.js +1 -1
  971. package/src/components/sidebar-navigation-screen-pattern/index.js +2 -5
  972. package/src/components/sidebar-navigation-screen-pattern/use-pattern-details.js +0 -3
  973. package/src/components/sidebar-navigation-screen-patterns/index.js +1 -1
  974. package/src/components/sidebar-navigation-screen-template/home-template-details.js +4 -2
  975. package/src/components/sidebar-navigation-screen-templates/index.js +1 -1
  976. package/src/components/site-hub/index.js +1 -1
  977. package/src/components/sync-state-with-url/use-init-edited-entity-from-url.js +2 -8
  978. package/src/components/template-actions/index.js +1 -5
  979. package/src/components/use-edited-entity-record/index.js +1 -6
  980. package/src/hooks/commands/use-common-commands.js +153 -72
  981. package/src/hooks/commands/use-edit-mode-commands.js +61 -19
  982. package/src/hooks/navigation-menu-edit.js +1 -5
  983. package/src/hooks/push-changes-to-global-styles/index.js +163 -28
  984. package/src/style.scss +0 -1
  985. package/build/components/create-pattern-modal/index.js +0 -129
  986. package/build/components/create-pattern-modal/index.js.map +0 -1
  987. package/build/utils/normalize-record-key.js +0 -19
  988. package/build/utils/normalize-record-key.js.map +0 -1
  989. package/build-module/components/create-pattern-modal/index.js +0 -116
  990. package/build-module/components/create-pattern-modal/index.js.map +0 -1
  991. package/build-module/utils/normalize-record-key.js +0 -12
  992. package/build-module/utils/normalize-record-key.js.map +0 -1
  993. package/src/components/create-pattern-modal/index.js +0 -136
  994. package/src/components/create-pattern-modal/style.scss +0 -3
  995. package/src/utils/normalize-record-key.js +0 -11
  996. /package/src/components/global-styles/stories/{index.js → index.story.js} +0 -0
@@ -1,5 +1,4 @@
1
1
  import { createElement } from "@wordpress/element";
2
-
3
2
  /**
4
3
  * WordPress dependencies
5
4
  */
@@ -10,17 +9,18 @@ import { undo as undoIcon, redo as redoIcon } from '@wordpress/icons';
10
9
  import { displayShortcut } from '@wordpress/keycodes';
11
10
  import { store as coreStore } from '@wordpress/core-data';
12
11
  import { forwardRef } from '@wordpress/element';
13
-
14
12
  function UndoButton(props, ref) {
15
13
  const hasUndo = useSelect(select => select(coreStore).hasUndo(), []);
16
14
  const {
17
15
  undo
18
16
  } = useDispatch(coreStore);
19
- return createElement(Button, { ...props,
17
+ return createElement(Button, {
18
+ ...props,
20
19
  ref: ref,
21
20
  icon: !isRTL() ? undoIcon : redoIcon,
22
21
  label: __('Undo'),
23
- shortcut: displayShortcut.primary('z') // If there are no undo levels we don't want to actually disable this
22
+ shortcut: displayShortcut.primary('z')
23
+ // If there are no undo levels we don't want to actually disable this
24
24
  // button, because it will remove focus for keyboard users.
25
25
  // See: https://github.com/WordPress/gutenberg/issues/3486
26
26
  ,
@@ -28,6 +28,5 @@ function UndoButton(props, ref) {
28
28
  onClick: hasUndo ? undo : undefined
29
29
  });
30
30
  }
31
-
32
31
  export default forwardRef(UndoButton);
33
32
  //# sourceMappingURL=undo.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/header-edit-mode/undo-redo/undo.js"],"names":["__","isRTL","Button","useSelect","useDispatch","undo","undoIcon","redo","redoIcon","displayShortcut","store","coreStore","forwardRef","UndoButton","props","ref","hasUndo","select","primary","undefined"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,EAAT,EAAaC,KAAb,QAA0B,iBAA1B;AACA,SAASC,MAAT,QAAuB,uBAAvB;AACA,SAASC,SAAT,EAAoBC,WAApB,QAAuC,iBAAvC;AACA,SAASC,IAAI,IAAIC,QAAjB,EAA2BC,IAAI,IAAIC,QAAnC,QAAmD,kBAAnD;AACA,SAASC,eAAT,QAAgC,qBAAhC;AACA,SAASC,KAAK,IAAIC,SAAlB,QAAmC,sBAAnC;AACA,SAASC,UAAT,QAA2B,oBAA3B;;AAEA,SAASC,UAAT,CAAqBC,KAArB,EAA4BC,GAA5B,EAAkC;AACjC,QAAMC,OAAO,GAAGb,SAAS,CACtBc,MAAF,IAAcA,MAAM,CAAEN,SAAF,CAAN,CAAoBK,OAApB,EADU,EAExB,EAFwB,CAAzB;AAIA,QAAM;AAAEX,IAAAA;AAAF,MAAWD,WAAW,CAAEO,SAAF,CAA5B;AACA,SACC,cAAC,MAAD,OACMG,KADN;AAEC,IAAA,GAAG,EAAGC,GAFP;AAGC,IAAA,IAAI,EAAG,CAAEd,KAAK,EAAP,GAAYK,QAAZ,GAAuBE,QAH/B;AAIC,IAAA,KAAK,EAAGR,EAAE,CAAE,MAAF,CAJX;AAKC,IAAA,QAAQ,EAAGS,eAAe,CAACS,OAAhB,CAAyB,GAAzB,CALZ,CAMC;AACA;AACA;AARD;AASC,qBAAgB,CAAEF,OATnB;AAUC,IAAA,OAAO,EAAGA,OAAO,GAAGX,IAAH,GAAUc;AAV5B,IADD;AAcA;;AAED,eAAeP,UAAU,CAAEC,UAAF,CAAzB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, isRTL } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { undo as undoIcon, redo as redoIcon } from '@wordpress/icons';\nimport { displayShortcut } from '@wordpress/keycodes';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { forwardRef } from '@wordpress/element';\n\nfunction UndoButton( props, ref ) {\n\tconst hasUndo = useSelect(\n\t\t( select ) => select( coreStore ).hasUndo(),\n\t\t[]\n\t);\n\tconst { undo } = useDispatch( coreStore );\n\treturn (\n\t\t<Button\n\t\t\t{ ...props }\n\t\t\tref={ ref }\n\t\t\ticon={ ! isRTL() ? undoIcon : redoIcon }\n\t\t\tlabel={ __( 'Undo' ) }\n\t\t\tshortcut={ displayShortcut.primary( 'z' ) }\n\t\t\t// If there are no undo levels we don't want to actually disable this\n\t\t\t// button, because it will remove focus for keyboard users.\n\t\t\t// See: https://github.com/WordPress/gutenberg/issues/3486\n\t\t\taria-disabled={ ! hasUndo }\n\t\t\tonClick={ hasUndo ? undo : undefined }\n\t\t/>\n\t);\n}\n\nexport default forwardRef( UndoButton );\n"]}
1
+ {"version":3,"names":["__","isRTL","Button","useSelect","useDispatch","undo","undoIcon","redo","redoIcon","displayShortcut","store","coreStore","forwardRef","UndoButton","props","ref","hasUndo","select","createElement","icon","label","shortcut","primary","onClick","undefined"],"sources":["@wordpress/edit-site/src/components/header-edit-mode/undo-redo/undo.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, isRTL } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { undo as undoIcon, redo as redoIcon } from '@wordpress/icons';\nimport { displayShortcut } from '@wordpress/keycodes';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { forwardRef } from '@wordpress/element';\n\nfunction UndoButton( props, ref ) {\n\tconst hasUndo = useSelect(\n\t\t( select ) => select( coreStore ).hasUndo(),\n\t\t[]\n\t);\n\tconst { undo } = useDispatch( coreStore );\n\treturn (\n\t\t<Button\n\t\t\t{ ...props }\n\t\t\tref={ ref }\n\t\t\ticon={ ! isRTL() ? undoIcon : redoIcon }\n\t\t\tlabel={ __( 'Undo' ) }\n\t\t\tshortcut={ displayShortcut.primary( 'z' ) }\n\t\t\t// If there are no undo levels we don't want to actually disable this\n\t\t\t// button, because it will remove focus for keyboard users.\n\t\t\t// See: https://github.com/WordPress/gutenberg/issues/3486\n\t\t\taria-disabled={ ! hasUndo }\n\t\t\tonClick={ hasUndo ? undo : undefined }\n\t\t/>\n\t);\n}\n\nexport default forwardRef( UndoButton );\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,EAAEC,KAAK,QAAQ,iBAAiB;AAC3C,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,IAAI,IAAIC,QAAQ,EAAEC,IAAI,IAAIC,QAAQ,QAAQ,kBAAkB;AACrE,SAASC,eAAe,QAAQ,qBAAqB;AACrD,SAASC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;AACzD,SAASC,UAAU,QAAQ,oBAAoB;AAE/C,SAASC,UAAUA,CAAEC,KAAK,EAAEC,GAAG,EAAG;EACjC,MAAMC,OAAO,GAAGb,SAAS,CACtBc,MAAM,IAAMA,MAAM,CAAEN,SAAU,CAAC,CAACK,OAAO,CAAC,CAAC,EAC3C,EACD,CAAC;EACD,MAAM;IAAEX;EAAK,CAAC,GAAGD,WAAW,CAAEO,SAAU,CAAC;EACzC,OACCO,aAAA,CAAChB,MAAM;IAAA,GACDY,KAAK;IACVC,GAAG,EAAGA,GAAK;IACXI,IAAI,EAAG,CAAElB,KAAK,CAAC,CAAC,GAAGK,QAAQ,GAAGE,QAAU;IACxCY,KAAK,EAAGpB,EAAE,CAAE,MAAO,CAAG;IACtBqB,QAAQ,EAAGZ,eAAe,CAACa,OAAO,CAAE,GAAI;IACxC;IACA;IACA;IAAA;IACA,iBAAgB,CAAEN,OAAS;IAC3BO,OAAO,EAAGP,OAAO,GAAGX,IAAI,GAAGmB;EAAW,CACtC,CAAC;AAEJ;AAEA,eAAeZ,UAAU,CAAEC,UAAW,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/keyboard-shortcut-help-modal/config.js"],"names":["__","textFormattingShortcuts","keyCombination","modifier","character","description"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAT,QAAmB,iBAAnB;AAEA,OAAO,MAAMC,uBAAuB,GAAG,CACtC;AACCC,EAAAA,cAAc,EAAE;AAAEC,IAAAA,QAAQ,EAAE,SAAZ;AAAuBC,IAAAA,SAAS,EAAE;AAAlC,GADjB;AAECC,EAAAA,WAAW,EAAEL,EAAE,CAAE,8BAAF;AAFhB,CADsC,EAKtC;AACCE,EAAAA,cAAc,EAAE;AAAEC,IAAAA,QAAQ,EAAE,SAAZ;AAAuBC,IAAAA,SAAS,EAAE;AAAlC,GADjB;AAECC,EAAAA,WAAW,EAAEL,EAAE,CAAE,gCAAF;AAFhB,CALsC,EAStC;AACCE,EAAAA,cAAc,EAAE;AAAEC,IAAAA,QAAQ,EAAE,SAAZ;AAAuBC,IAAAA,SAAS,EAAE;AAAlC,GADjB;AAECC,EAAAA,WAAW,EAAEL,EAAE,CAAE,wCAAF;AAFhB,CATsC,EAatC;AACCE,EAAAA,cAAc,EAAE;AAAEC,IAAAA,QAAQ,EAAE,cAAZ;AAA4BC,IAAAA,SAAS,EAAE;AAAvC,GADjB;AAECC,EAAAA,WAAW,EAAEL,EAAE,CAAE,gBAAF;AAFhB,CAbsC,EAiBtC;AACCE,EAAAA,cAAc,EAAE;AAAEE,IAAAA,SAAS,EAAE;AAAb,GADjB;AAECC,EAAAA,WAAW,EAAEL,EAAE,CAAE,kCAAF;AAFhB,CAjBsC,EAqBtC;AACCE,EAAAA,cAAc,EAAE;AAAEC,IAAAA,QAAQ,EAAE,SAAZ;AAAuBC,IAAAA,SAAS,EAAE;AAAlC,GADjB;AAECC,EAAAA,WAAW,EAAEL,EAAE,CAAE,8BAAF;AAFhB,CArBsC,EAyBtC;AACCE,EAAAA,cAAc,EAAE;AAAEC,IAAAA,QAAQ,EAAE,QAAZ;AAAsBC,IAAAA,SAAS,EAAE;AAAjC,GADjB;AAECC,EAAAA,WAAW,EAAEL,EAAE,CAAE,kCAAF;AAFhB,CAzBsC,EA6BtC;AACCE,EAAAA,cAAc,EAAE;AAAEC,IAAAA,QAAQ,EAAE,QAAZ;AAAsBC,IAAAA,SAAS,EAAE;AAAjC,GADjB;AAECC,EAAAA,WAAW,EAAEL,EAAE,CAAE,qCAAF;AAFhB,CA7BsC,EAiCtC;AACCE,EAAAA,cAAc,EAAE;AAAEC,IAAAA,QAAQ,EAAE,QAAZ;AAAsBC,IAAAA,SAAS,EAAE;AAAjC,GADjB;AAECC,EAAAA,WAAW,EAAEL,EAAE,CAAE,6CAAF;AAFhB,CAjCsC,EAqCtC;AACCE,EAAAA,cAAc,EAAE;AAAEC,IAAAA,QAAQ,EAAE,QAAZ;AAAsBC,IAAAA,SAAS,EAAE;AAAjC,GADjB;AAECC,EAAAA,WAAW,EAAEL,EAAE,CACd,wEADc;AAFhB,CArCsC,CAAhC","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\nexport const textFormattingShortcuts = [\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'b' },\n\t\tdescription: __( 'Make the selected text bold.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'i' },\n\t\tdescription: __( 'Make the selected text italic.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'k' },\n\t\tdescription: __( 'Convert the selected text into a link.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primaryShift', character: 'k' },\n\t\tdescription: __( 'Remove a link.' ),\n\t},\n\t{\n\t\tkeyCombination: { character: '[[' },\n\t\tdescription: __( 'Insert a link to a post or page.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'u' },\n\t\tdescription: __( 'Underline the selected text.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'access', character: 'd' },\n\t\tdescription: __( 'Strikethrough the selected text.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'access', character: 'x' },\n\t\tdescription: __( 'Make the selected text inline code.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'access', character: '0' },\n\t\tdescription: __( 'Convert the current heading to a paragraph.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'access', character: '1-6' },\n\t\tdescription: __(\n\t\t\t'Convert the current paragraph or heading to a heading of level 1 to 6.'\n\t\t),\n\t},\n];\n"]}
1
+ {"version":3,"names":["__","textFormattingShortcuts","keyCombination","modifier","character","description"],"sources":["@wordpress/edit-site/src/components/keyboard-shortcut-help-modal/config.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\nexport const textFormattingShortcuts = [\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'b' },\n\t\tdescription: __( 'Make the selected text bold.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'i' },\n\t\tdescription: __( 'Make the selected text italic.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'k' },\n\t\tdescription: __( 'Convert the selected text into a link.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primaryShift', character: 'k' },\n\t\tdescription: __( 'Remove a link.' ),\n\t},\n\t{\n\t\tkeyCombination: { character: '[[' },\n\t\tdescription: __( 'Insert a link to a post or page.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'u' },\n\t\tdescription: __( 'Underline the selected text.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'access', character: 'd' },\n\t\tdescription: __( 'Strikethrough the selected text.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'access', character: 'x' },\n\t\tdescription: __( 'Make the selected text inline code.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'access', character: '0' },\n\t\tdescription: __( 'Convert the current heading to a paragraph.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'access', character: '1-6' },\n\t\tdescription: __(\n\t\t\t'Convert the current paragraph or heading to a heading of level 1 to 6.'\n\t\t),\n\t},\n];\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AAEpC,OAAO,MAAMC,uBAAuB,GAAG,CACtC;EACCC,cAAc,EAAE;IAAEC,QAAQ,EAAE,SAAS;IAAEC,SAAS,EAAE;EAAI,CAAC;EACvDC,WAAW,EAAEL,EAAE,CAAE,8BAA+B;AACjD,CAAC,EACD;EACCE,cAAc,EAAE;IAAEC,QAAQ,EAAE,SAAS;IAAEC,SAAS,EAAE;EAAI,CAAC;EACvDC,WAAW,EAAEL,EAAE,CAAE,gCAAiC;AACnD,CAAC,EACD;EACCE,cAAc,EAAE;IAAEC,QAAQ,EAAE,SAAS;IAAEC,SAAS,EAAE;EAAI,CAAC;EACvDC,WAAW,EAAEL,EAAE,CAAE,wCAAyC;AAC3D,CAAC,EACD;EACCE,cAAc,EAAE;IAAEC,QAAQ,EAAE,cAAc;IAAEC,SAAS,EAAE;EAAI,CAAC;EAC5DC,WAAW,EAAEL,EAAE,CAAE,gBAAiB;AACnC,CAAC,EACD;EACCE,cAAc,EAAE;IAAEE,SAAS,EAAE;EAAK,CAAC;EACnCC,WAAW,EAAEL,EAAE,CAAE,kCAAmC;AACrD,CAAC,EACD;EACCE,cAAc,EAAE;IAAEC,QAAQ,EAAE,SAAS;IAAEC,SAAS,EAAE;EAAI,CAAC;EACvDC,WAAW,EAAEL,EAAE,CAAE,8BAA+B;AACjD,CAAC,EACD;EACCE,cAAc,EAAE;IAAEC,QAAQ,EAAE,QAAQ;IAAEC,SAAS,EAAE;EAAI,CAAC;EACtDC,WAAW,EAAEL,EAAE,CAAE,kCAAmC;AACrD,CAAC,EACD;EACCE,cAAc,EAAE;IAAEC,QAAQ,EAAE,QAAQ;IAAEC,SAAS,EAAE;EAAI,CAAC;EACtDC,WAAW,EAAEL,EAAE,CAAE,qCAAsC;AACxD,CAAC,EACD;EACCE,cAAc,EAAE;IAAEC,QAAQ,EAAE,QAAQ;IAAEC,SAAS,EAAE;EAAI,CAAC;EACtDC,WAAW,EAAEL,EAAE,CAAE,6CAA8C;AAChE,CAAC,EACD;EACCE,cAAc,EAAE;IAAEC,QAAQ,EAAE,QAAQ;IAAEC,SAAS,EAAE;EAAM,CAAC;EACxDC,WAAW,EAAEL,EAAE,CACd,wEACD;AACD,CAAC,CACD"}
@@ -1,14 +1,13 @@
1
1
  import { createElement } from "@wordpress/element";
2
-
3
2
  /**
4
3
  * WordPress dependencies
5
4
  */
6
5
  import { useSelect } from '@wordpress/data';
7
6
  import { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';
7
+
8
8
  /**
9
9
  * Internal dependencies
10
10
  */
11
-
12
11
  import Shortcut from './shortcut';
13
12
  export default function DynamicShortcut({
14
13
  name
@@ -29,11 +28,9 @@ export default function DynamicShortcut({
29
28
  description: getShortcutDescription(name)
30
29
  };
31
30
  }, [name]);
32
-
33
31
  if (!keyCombination) {
34
32
  return null;
35
33
  }
36
-
37
34
  return createElement(Shortcut, {
38
35
  keyCombination: keyCombination,
39
36
  description: description,
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/keyboard-shortcut-help-modal/dynamic-shortcut.js"],"names":["useSelect","store","keyboardShortcutsStore","Shortcut","DynamicShortcut","name","keyCombination","description","aliases","select","getShortcutKeyCombination","getShortcutDescription","getShortcutAliases"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,SAAT,QAA0B,iBAA1B;AACA,SAASC,KAAK,IAAIC,sBAAlB,QAAgD,+BAAhD;AAEA;AACA;AACA;;AACA,OAAOC,QAAP,MAAqB,YAArB;AAEA,eAAe,SAASC,eAAT,CAA0B;AAAEC,EAAAA;AAAF,CAA1B,EAAqC;AACnD,QAAM;AAAEC,IAAAA,cAAF;AAAkBC,IAAAA,WAAlB;AAA+BC,IAAAA;AAA/B,MAA2CR,SAAS,CACvDS,MAAF,IAAc;AACb,UAAM;AACLC,MAAAA,yBADK;AAELC,MAAAA,sBAFK;AAGLC,MAAAA;AAHK,QAIFH,MAAM,CAAEP,sBAAF,CAJV;AAMA,WAAO;AACNI,MAAAA,cAAc,EAAEI,yBAAyB,CAAEL,IAAF,CADnC;AAENG,MAAAA,OAAO,EAAEI,kBAAkB,CAAEP,IAAF,CAFrB;AAGNE,MAAAA,WAAW,EAAEI,sBAAsB,CAAEN,IAAF;AAH7B,KAAP;AAKA,GAbwD,EAczD,CAAEA,IAAF,CAdyD,CAA1D;;AAiBA,MAAK,CAAEC,cAAP,EAAwB;AACvB,WAAO,IAAP;AACA;;AAED,SACC,cAAC,QAAD;AACC,IAAA,cAAc,EAAGA,cADlB;AAEC,IAAA,WAAW,EAAGC,WAFf;AAGC,IAAA,OAAO,EAAGC;AAHX,IADD;AAOA","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\nexport default function 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"]}
1
+ {"version":3,"names":["useSelect","store","keyboardShortcutsStore","Shortcut","DynamicShortcut","name","keyCombination","description","aliases","select","getShortcutKeyCombination","getShortcutDescription","getShortcutAliases","createElement"],"sources":["@wordpress/edit-site/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\nexport default function 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"],"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,eAAe,SAASC,eAAeA,CAAE;EAAEC;AAAK,CAAC,EAAG;EACnD,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"}
@@ -1,27 +1,25 @@
1
1
  import { createElement } from "@wordpress/element";
2
-
3
2
  /**
4
3
  * External dependencies
5
4
  */
6
5
  import classnames from 'classnames';
6
+
7
7
  /**
8
8
  * WordPress dependencies
9
9
  */
10
-
11
10
  import { Modal } from '@wordpress/components';
12
11
  import { __ } from '@wordpress/i18n';
13
12
  import { useShortcut, store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';
14
13
  import { store as interfaceStore } from '@wordpress/interface';
15
14
  import { useSelect, useDispatch } from '@wordpress/data';
15
+
16
16
  /**
17
17
  * Internal dependencies
18
18
  */
19
-
20
19
  import { textFormattingShortcuts } from './config';
21
20
  import Shortcut from './shortcut';
22
21
  import DynamicShortcut from './dynamic-shortcut';
23
22
  export const KEYBOARD_SHORTCUT_HELP_MODAL_NAME = 'edit-site/keyboard-shortcut-help';
24
-
25
23
  const ShortcutList = ({
26
24
  shortcuts
27
25
  }) =>
@@ -29,7 +27,6 @@ const ShortcutList = ({
29
27
  * Disable reason: The `list` ARIA role is redundant but
30
28
  * Safari+VoiceOver won't announce the list otherwise.
31
29
  */
32
-
33
30
  /* eslint-disable jsx-a11y/no-redundant-roles */
34
31
  createElement("ul", {
35
32
  className: "edit-site-keyboard-shortcut-help-modal__shortcut-list",
@@ -39,10 +36,10 @@ createElement("ul", {
39
36
  key: index
40
37
  }, typeof shortcut === 'string' ? createElement(DynamicShortcut, {
41
38
  name: shortcut
42
- }) : createElement(Shortcut, { ...shortcut
39
+ }) : createElement(Shortcut, {
40
+ ...shortcut
43
41
  }))))
44
- /* eslint-enable jsx-a11y/no-redundant-roles */
45
- ;
42
+ /* eslint-enable jsx-a11y/no-redundant-roles */;
46
43
 
47
44
  const ShortcutSection = ({
48
45
  title,
@@ -55,7 +52,6 @@ const ShortcutSection = ({
55
52
  }, title), createElement(ShortcutList, {
56
53
  shortcuts: shortcuts
57
54
  }));
58
-
59
55
  const ShortcutCategorySection = ({
60
56
  title,
61
57
  categoryName,
@@ -69,22 +65,17 @@ const ShortcutCategorySection = ({
69
65
  shortcuts: categoryShortcuts.concat(additionalShortcuts)
70
66
  });
71
67
  };
72
-
73
68
  export default function KeyboardShortcutHelpModal() {
74
69
  const isModalActive = useSelect(select => select(interfaceStore).isModalActive(KEYBOARD_SHORTCUT_HELP_MODAL_NAME));
75
70
  const {
76
71
  closeModal,
77
72
  openModal
78
73
  } = useDispatch(interfaceStore);
79
-
80
74
  const toggleModal = () => isModalActive ? closeModal() : openModal(KEYBOARD_SHORTCUT_HELP_MODAL_NAME);
81
-
82
75
  useShortcut('core/edit-site/keyboard-shortcuts', toggleModal);
83
-
84
76
  if (!isModalActive) {
85
77
  return null;
86
78
  }
87
-
88
79
  return createElement(Modal, {
89
80
  className: "edit-site-keyboard-shortcut-help-modal",
90
81
  title: __('Keyboard shortcuts'),
@@ -106,7 +97,6 @@ export default function KeyboardShortcutHelpModal() {
106
97
  character: '/'
107
98
  },
108
99
  description: __('Change the block type after adding a new paragraph.'),
109
-
110
100
  /* translators: The forward-slash character. e.g. '/'. */
111
101
  ariaLabel: __('Forward-slash')
112
102
  }]
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/keyboard-shortcut-help-modal/index.js"],"names":["classnames","Modal","__","useShortcut","store","keyboardShortcutsStore","interfaceStore","useSelect","useDispatch","textFormattingShortcuts","Shortcut","DynamicShortcut","KEYBOARD_SHORTCUT_HELP_MODAL_NAME","ShortcutList","shortcuts","map","shortcut","index","ShortcutSection","title","className","ShortcutCategorySection","categoryName","additionalShortcuts","categoryShortcuts","select","getCategoryShortcuts","concat","KeyboardShortcutHelpModal","isModalActive","closeModal","openModal","toggleModal","keyCombination","character","description","ariaLabel"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SAASC,KAAT,QAAsB,uBAAtB;AACA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SACCC,WADD,EAECC,KAAK,IAAIC,sBAFV,QAGO,+BAHP;AAIA,SAASD,KAAK,IAAIE,cAAlB,QAAwC,sBAAxC;AACA,SAASC,SAAT,EAAoBC,WAApB,QAAuC,iBAAvC;AAEA;AACA;AACA;;AACA,SAASC,uBAAT,QAAwC,UAAxC;AACA,OAAOC,QAAP,MAAqB,YAArB;AACA,OAAOC,eAAP,MAA4B,oBAA5B;AAEA,OAAO,MAAMC,iCAAiC,GAC7C,kCADM;;AAGP,MAAMC,YAAY,GAAG,CAAE;AAAEC,EAAAA;AAAF,CAAF;AACpB;AACD;AACA;AACA;;AACC;AACA;AACC,EAAA,SAAS,EAAC,uDADX;AAEC,EAAA,IAAI,EAAC;AAFN,GAIGA,SAAS,CAACC,GAAV,CAAe,CAAEC,QAAF,EAAYC,KAAZ,KAChB;AACC,EAAA,SAAS,EAAC,kDADX;AAEC,EAAA,GAAG,EAAGA;AAFP,GAIG,OAAOD,QAAP,KAAoB,QAApB,GACD,cAAC,eAAD;AAAiB,EAAA,IAAI,EAAGA;AAAxB,EADC,GAGD,cAAC,QAAD,OAAeA;AAAf,EAPF,CADC,CAJH;AAiBA;AAvBD;;AA0BA,MAAME,eAAe,GAAG,CAAE;AAAEC,EAAAA,KAAF;AAASL,EAAAA,SAAT;AAAoBM,EAAAA;AAApB,CAAF,KACvB;AACC,EAAA,SAAS,EAAGpB,UAAU,CACrB,iDADqB,EAErBoB,SAFqB;AAD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AAA,SAAS,EAAG,CAAE,mCAAF;AAFb,IALD,EASC,cAAC,uBAAD;AACC,IAAA,KAAK,EAAG9B,EAAE,CAAE,kBAAF,CADX;AAEC,IAAA,YAAY,EAAC;AAFd,IATD,EAcC,cAAC,uBAAD;AACC,IAAA,KAAK,EAAGA,EAAE,CAAE,qBAAF,CADX;AAEC,IAAA,YAAY,EAAC;AAFd,IAdD,EAmBC,cAAC,uBAAD;AACC,IAAA,KAAK,EAAGA,EAAE,CAAE,iBAAF,CADX;AAEC,IAAA,YAAY,EAAC,OAFd;AAGC,IAAA,mBAAmB,EAAG,CACrB;AACC+B,MAAAA,cAAc,EAAE;AAAEC,QAAAA,SAAS,EAAE;AAAb,OADjB;AAECC,MAAAA,WAAW,EAAEjC,EAAE,CACd,qDADc,CAFhB;;AAKC;AACAkC,MAAAA,SAAS,EAAElC,EAAE,CAAE,eAAF;AANd,KADqB;AAHvB,IAnBD,EAiCC,cAAC,eAAD;AACC,IAAA,KAAK,EAAGA,EAAE,CAAE,iBAAF,CADX;AAEC,IAAA,SAAS,EAAGO;AAFb,IAjCD,CADD;AAwCA","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 { store as interfaceStore } from '@wordpress/interface';\nimport { useSelect, useDispatch } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { textFormattingShortcuts } from './config';\nimport Shortcut from './shortcut';\nimport DynamicShortcut from './dynamic-shortcut';\n\nexport const KEYBOARD_SHORTCUT_HELP_MODAL_NAME =\n\t'edit-site/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=\"edit-site-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=\"edit-site-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'edit-site-keyboard-shortcut-help-modal__section',\n\t\t\tclassName\n\t\t) }\n\t>\n\t\t{ !! title && (\n\t\t\t<h2 className=\"edit-site-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\nexport default function KeyboardShortcutHelpModal() {\n\tconst isModalActive = useSelect( ( select ) =>\n\t\tselect( interfaceStore ).isModalActive(\n\t\t\tKEYBOARD_SHORTCUT_HELP_MODAL_NAME\n\t\t)\n\t);\n\tconst { closeModal, openModal } = useDispatch( interfaceStore );\n\tconst toggleModal = () =>\n\t\tisModalActive\n\t\t\t? closeModal()\n\t\t\t: openModal( KEYBOARD_SHORTCUT_HELP_MODAL_NAME );\n\tuseShortcut( 'core/edit-site/keyboard-shortcuts', toggleModal );\n\tif ( ! isModalActive ) {\n\t\treturn null;\n\t}\n\treturn (\n\t\t<Modal\n\t\t\tclassName=\"edit-site-keyboard-shortcut-help-modal\"\n\t\t\ttitle={ __( 'Keyboard shortcuts' ) }\n\t\t\tonRequestClose={ toggleModal }\n\t\t>\n\t\t\t<ShortcutSection\n\t\t\t\tclassName=\"edit-site-keyboard-shortcut-help-modal__main-shortcuts\"\n\t\t\t\tshortcuts={ [ 'core/edit-site/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</Modal>\n\t);\n}\n"]}
1
+ {"version":3,"names":["classnames","Modal","__","useShortcut","store","keyboardShortcutsStore","interfaceStore","useSelect","useDispatch","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","closeModal","openModal","toggleModal","onRequestClose","keyCombination","character","description","ariaLabel"],"sources":["@wordpress/edit-site/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 { store as interfaceStore } from '@wordpress/interface';\nimport { useSelect, useDispatch } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { textFormattingShortcuts } from './config';\nimport Shortcut from './shortcut';\nimport DynamicShortcut from './dynamic-shortcut';\n\nexport const KEYBOARD_SHORTCUT_HELP_MODAL_NAME =\n\t'edit-site/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=\"edit-site-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=\"edit-site-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'edit-site-keyboard-shortcut-help-modal__section',\n\t\t\tclassName\n\t\t) }\n\t>\n\t\t{ !! title && (\n\t\t\t<h2 className=\"edit-site-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\nexport default function KeyboardShortcutHelpModal() {\n\tconst isModalActive = useSelect( ( select ) =>\n\t\tselect( interfaceStore ).isModalActive(\n\t\t\tKEYBOARD_SHORTCUT_HELP_MODAL_NAME\n\t\t)\n\t);\n\tconst { closeModal, openModal } = useDispatch( interfaceStore );\n\tconst toggleModal = () =>\n\t\tisModalActive\n\t\t\t? closeModal()\n\t\t\t: openModal( KEYBOARD_SHORTCUT_HELP_MODAL_NAME );\n\tuseShortcut( 'core/edit-site/keyboard-shortcuts', toggleModal );\n\tif ( ! isModalActive ) {\n\t\treturn null;\n\t}\n\treturn (\n\t\t<Modal\n\t\t\tclassName=\"edit-site-keyboard-shortcut-help-modal\"\n\t\t\ttitle={ __( 'Keyboard shortcuts' ) }\n\t\t\tonRequestClose={ toggleModal }\n\t\t>\n\t\t\t<ShortcutSection\n\t\t\t\tclassName=\"edit-site-keyboard-shortcut-help-modal__main-shortcuts\"\n\t\t\t\tshortcuts={ [ 'core/edit-site/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</Modal>\n\t);\n}\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,SAASD,KAAK,IAAIE,cAAc,QAAQ,sBAAsB;AAC9D,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;;AAExD;AACA;AACA;AACA,SAASC,uBAAuB,QAAQ,UAAU;AAClD,OAAOC,QAAQ,MAAM,YAAY;AACjC,OAAOC,eAAe,MAAM,oBAAoB;AAEhD,OAAO,MAAMC,iCAAiC,GAC7C,kCAAkC;AAEnC,MAAMC,YAAY,GAAGA,CAAE;EAAEC;AAAU,CAAC;AACnC;AACD;AACA;AACA;AACC;AACAC,aAAA;EACC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2
  /**
4
3
  * WordPress dependencies
5
4
  */
6
5
  import { Fragment } from '@wordpress/element';
7
6
  import { displayShortcutList, shortcutAriaLabel } from '@wordpress/keycodes';
8
-
9
7
  function KeyCombination({
10
8
  keyCombination,
11
9
  forceAriaLabel
@@ -21,14 +19,12 @@ function KeyCombination({
21
19
  key: index
22
20
  }, character);
23
21
  }
24
-
25
22
  return createElement("kbd", {
26
23
  key: index,
27
24
  className: "edit-site-keyboard-shortcut-help-modal__shortcut-key"
28
25
  }, character);
29
26
  }));
30
27
  }
31
-
32
28
  export default function Shortcut({
33
29
  description,
34
30
  keyCombination,
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/keyboard-shortcut-help-modal/shortcut.js"],"names":["Fragment","displayShortcutList","shortcutAriaLabel","KeyCombination","keyCombination","forceAriaLabel","shortcut","modifier","character","ariaLabel","Array","isArray","map","index","Shortcut","description","aliases","alias"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,QAAT,QAAyB,oBAAzB;AACA,SAASC,mBAAT,EAA8BC,iBAA9B,QAAuD,qBAAvD;;AAEA,SAASC,cAAT,CAAyB;AAAEC,EAAAA,cAAF;AAAkBC,EAAAA;AAAlB,CAAzB,EAA8D;AAC7D,QAAMC,QAAQ,GAAGF,cAAc,CAACG,QAAf,GACdN,mBAAmB,CAAEG,cAAc,CAACG,QAAjB,CAAnB,CACAH,cAAc,CAACI,SADf,CADc,GAIdJ,cAAc,CAACI,SAJlB;AAKA,QAAMC,SAAS,GAAGL,cAAc,CAACG,QAAf,GACfL,iBAAiB,CAAEE,cAAc,CAACG,QAAjB,CAAjB,CACAH,cAAc,CAACI,SADf,CADe,GAIfJ,cAAc,CAACI,SAJlB;AAMA,SACC;AACC,IAAA,SAAS,EAAC,kEADX;AAEC,kBAAaH,cAAc,IAAII;AAFhC,KAIG,CAAEC,KAAK,CAACC,OAAN,CAAeL,QAAf,IAA4BA,QAA5B,GAAuC,CAAEA,QAAF,CAAzC,EAAwDM,GAAxD,CACD,CAAEJ,SAAF,EAAaK,KAAb,KAAwB;AACvB,QAAKL,SAAS,KAAK,GAAnB,EAAyB;AACxB,aAAO,cAAC,QAAD;AAAU,QAAA,GAAG,EAAGK;AAAhB,SAA0BL,SAA1B,CAAP;AACA;;AAED,WACC;AACC,MAAA,GAAG,EAAGK,KADP;AAEC,MAAA,SAAS,EAAC;AAFX,OAIGL,SAJH,CADD;AAQA,GAdA,CAJH,CADD;AAuBA;;AAED,eAAe,SAASM,QAAT,CAAmB;AACjCC,EAAAA,WADiC;AAEjCX,EAAAA,cAFiC;AAGjCY,EAAAA,OAAO,GAAG,EAHuB;AAIjCP,EAAAA;AAJiC,CAAnB,EAKX;AACH,SACC,8BACC;AAAK,IAAA,SAAS,EAAC;AAAf,KACGM,WADH,CADD,EAIC;AAAK,IAAA,SAAS,EAAC;AAAf,KACC,cAAC,cAAD;AACC,IAAA,cAAc,EAAGX,cADlB;AAEC,IAAA,cAAc,EAAGK;AAFlB,IADD,EAKGO,OAAO,CAACJ,GAAR,CAAa,CAAEK,KAAF,EAASJ,KAAT,KACd,cAAC,cAAD;AACC,IAAA,cAAc,EAAGI,KADlB;AAEC,IAAA,cAAc,EAAGR,SAFlB;AAGC,IAAA,GAAG,EAAGI;AAHP,IADC,CALH,CAJD,CADD;AAoBA","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=\"edit-site-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=\"edit-site-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\nexport default function Shortcut( {\n\tdescription,\n\tkeyCombination,\n\taliases = [],\n\tariaLabel,\n} ) {\n\treturn (\n\t\t<>\n\t\t\t<div className=\"edit-site-keyboard-shortcut-help-modal__shortcut-description\">\n\t\t\t\t{ description }\n\t\t\t</div>\n\t\t\t<div className=\"edit-site-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"]}
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/edit-site/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=\"edit-site-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=\"edit-site-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\nexport default function Shortcut( {\n\tdescription,\n\tkeyCombination,\n\taliases = [],\n\tariaLabel,\n} ) {\n\treturn (\n\t\t<>\n\t\t\t<div className=\"edit-site-keyboard-shortcut-help-modal__shortcut-description\">\n\t\t\t\t{ description }\n\t\t\t</div>\n\t\t\t<div className=\"edit-site-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\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,CAAAV,QAAA,QACCU,aAAA;IAAKC,SAAS,EAAC;EAA8D,GAC1EO,WACE,CAAC,EACNR,aAAA;IAAKC,SAAS,EAAC;EAAuD,GACrED,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"}
@@ -10,14 +10,13 @@ import { store as interfaceStore } from '@wordpress/interface';
10
10
  import { createBlock } from '@wordpress/blocks';
11
11
  import { store as preferencesStore } from '@wordpress/preferences';
12
12
  import { store as noticesStore } from '@wordpress/notices';
13
+
13
14
  /**
14
15
  * Internal dependencies
15
16
  */
16
-
17
17
  import { store as editSiteStore } from '../../store';
18
18
  import { SIDEBAR_BLOCK } from '../sidebar-edit-mode/constants';
19
19
  import { STORE_NAME } from '../../store/constants';
20
-
21
20
  function KeyboardShortcutsEditMode() {
22
21
  const {
23
22
  getEditorMode
@@ -56,29 +55,23 @@ function KeyboardShortcutsEditMode() {
56
55
  const {
57
56
  createInfoNotice
58
57
  } = useDispatch(noticesStore);
59
-
60
58
  const toggleDistractionFree = () => {
61
59
  setPreference('core/edit-site', 'fixedToolbar', false);
62
60
  setIsInserterOpened(false);
63
61
  setIsListViewOpened(false);
64
62
  closeGeneralSidebar();
65
63
  };
66
-
67
64
  const handleTextLevelShortcut = (event, level) => {
68
65
  event.preventDefault();
69
66
  const destinationBlockName = level === 0 ? 'core/paragraph' : 'core/heading';
70
67
  const currentClientId = getSelectedBlockClientId();
71
-
72
68
  if (currentClientId === null) {
73
69
  return;
74
70
  }
75
-
76
71
  const blockName = getBlockName(currentClientId);
77
-
78
72
  if (blockName !== 'core/paragraph' && blockName !== 'core/heading') {
79
73
  return;
80
74
  }
81
-
82
75
  const attributes = getBlockAttributes(currentClientId);
83
76
  const textAlign = blockName === 'core/paragraph' ? 'align' : 'textAlign';
84
77
  const destinationTextAlign = destinationBlockName === 'core/paragraph' ? 'align' : 'textAlign';
@@ -90,7 +83,6 @@ function KeyboardShortcutsEditMode() {
90
83
  }
91
84
  }));
92
85
  };
93
-
94
86
  useShortcut('core/edit-site/undo', event => {
95
87
  undo();
96
88
  event.preventDefault();
@@ -98,20 +90,19 @@ function KeyboardShortcutsEditMode() {
98
90
  useShortcut('core/edit-site/redo', event => {
99
91
  redo();
100
92
  event.preventDefault();
101
- }); // Only opens the list view. Other functionality for this shortcut happens in the rendered sidebar.
93
+ });
102
94
 
95
+ // Only opens the list view. Other functionality for this shortcut happens in the rendered sidebar.
103
96
  useShortcut('core/edit-site/toggle-list-view', () => {
104
97
  if (isListViewOpen) {
105
98
  return;
106
99
  }
107
-
108
100
  setIsListViewOpened(true);
109
101
  });
110
102
  useShortcut('core/edit-site/toggle-block-settings-sidebar', event => {
111
103
  // This shortcut has no known clashes, but use preventDefault to prevent any
112
104
  // obscure shortcuts from triggering.
113
105
  event.preventDefault();
114
-
115
106
  if (isBlockInspectorOpen) {
116
107
  disableComplementaryArea(STORE_NAME);
117
108
  } else {
@@ -138,6 +129,5 @@ function KeyboardShortcutsEditMode() {
138
129
  });
139
130
  return null;
140
131
  }
141
-
142
132
  export default KeyboardShortcutsEditMode;
143
133
  //# sourceMappingURL=edit-mode.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/keyboard-shortcuts/edit-mode.js"],"names":["__","useShortcut","useDispatch","useSelect","store","coreStore","blockEditorStore","interfaceStore","createBlock","preferencesStore","noticesStore","editSiteStore","SIDEBAR_BLOCK","STORE_NAME","KeyboardShortcutsEditMode","getEditorMode","isListViewOpen","select","isListViewOpened","isBlockInspectorOpen","getActiveComplementaryArea","name","redo","undo","setIsListViewOpened","switchEditorMode","setIsInserterOpened","closeGeneralSidebar","enableComplementaryArea","disableComplementaryArea","replaceBlocks","getBlockName","getSelectedBlockClientId","getBlockAttributes","get","getPreference","set","setPreference","toggle","createInfoNotice","toggleDistractionFree","handleTextLevelShortcut","event","level","preventDefault","destinationBlockName","currentClientId","blockName","attributes","textAlign","destinationTextAlign","content","forEach","id","type"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAT,QAAmB,iBAAnB;AACA,SAASC,WAAT,QAA4B,+BAA5B;AACA,SAASC,WAAT,EAAsBC,SAAtB,QAAuC,iBAAvC;AACA,SAASC,KAAK,IAAIC,SAAlB,QAAmC,sBAAnC;AACA,SAASD,KAAK,IAAIE,gBAAlB,QAA0C,yBAA1C;AACA,SAASF,KAAK,IAAIG,cAAlB,QAAwC,sBAAxC;AACA,SAASC,WAAT,QAA4B,mBAA5B;AACA,SAASJ,KAAK,IAAIK,gBAAlB,QAA0C,wBAA1C;AACA,SAASL,KAAK,IAAIM,YAAlB,QAAsC,oBAAtC;AAEA;AACA;AACA;;AACA,SAASN,KAAK,IAAIO,aAAlB,QAAuC,aAAvC;AACA,SAASC,aAAT,QAA8B,gCAA9B;AACA,SAASC,UAAT,QAA2B,uBAA3B;;AAEA,SAASC,yBAAT,GAAqC;AACpC,QAAM;AAAEC,IAAAA;AAAF,MAAoBZ,SAAS,CAAEQ,aAAF,CAAnC;AACA,QAAMK,cAAc,GAAGb,SAAS,CAC7Bc,MAAF,IAAcA,MAAM,CAAEN,aAAF,CAAN,CAAwBO,gBAAxB,EADiB,EAE/B,EAF+B,CAAhC;AAIA,QAAMC,oBAAoB,GAAGhB,SAAS,CACnCc,MAAF,IACCA,MAAM,CAAEV,cAAF,CAAN,CAAyBa,0BAAzB,CACCT,aAAa,CAACU,IADf,MAEMT,aAJ8B,EAKrC,EALqC,CAAtC;AAOA,QAAM;AAAEU,IAAAA,IAAF;AAAQC,IAAAA;AAAR,MAAiBrB,WAAW,CAAEG,SAAF,CAAlC;AACA,QAAM;AACLmB,IAAAA,mBADK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B,GAA+B,MAA/B,GAAwC,QAA1C,CAAhB;AACA,GAFU,CAAX;AAIAd,EAAAA,WAAW,CAAE,+CAAF,EAAqDyC,KAAF,IAC7DD,uBAAuB,CAAEC,KAAF,EAAS,CAAT,CADb,CAAX;AAIA,GAAE,CAAF,EAAK,CAAL,EAAQ,CAAR,EAAW,CAAX,EAAc,CAAd,EAAiB,CAAjB,EAAqBU,OAArB,CAAgCT,KAAF,IAAa;AAC1C;AACA;AACA;AACA1C,IAAAA,WAAW,CACT,iDAAiD0C,KAAO,EAD/C,EAERD,KAAF,IAAaD,uBAAuB,CAAEC,KAAF,EAASC,KAAT,CAF1B,CAAX;AAIA,GARD;AAUA1C,EAAAA,WAAW,CAAE,wCAAF,EAA4C,MAAM;AAC5DuC,IAAAA,qBAAqB;AACrBF,IAAAA,MAAM,CAAE,gBAAF,EAAoB,iBAApB,CAAN;AACAC,IAAAA,gBAAgB,CACfJ,aAAa,CAAE,gBAAF,EAAoB,iBAApB,CAAb,GACGnC,EAAE,CAAE,kCAAF,CADL,GAEGA,EAAE,CAAE,mCAAF,CAHU,EAIf;AACCqD,MAAAA,EAAE,EAAE,6CADL;AAECC,MAAAA,IAAI,EAAE;AAFP,KAJe,CAAhB;AASA,GAZU,CAAX;AAcA,SAAO,IAAP;AACA;;AAED,eAAexC,yBAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useShortcut } from '@wordpress/keyboard-shortcuts';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { store as interfaceStore } from '@wordpress/interface';\nimport { createBlock } from '@wordpress/blocks';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\nimport { SIDEBAR_BLOCK } from '../sidebar-edit-mode/constants';\nimport { STORE_NAME } from '../../store/constants';\n\nfunction KeyboardShortcutsEditMode() {\n\tconst { getEditorMode } = useSelect( editSiteStore );\n\tconst isListViewOpen = useSelect(\n\t\t( select ) => select( editSiteStore ).isListViewOpened(),\n\t\t[]\n\t);\n\tconst isBlockInspectorOpen = useSelect(\n\t\t( select ) =>\n\t\t\tselect( interfaceStore ).getActiveComplementaryArea(\n\t\t\t\teditSiteStore.name\n\t\t\t) === SIDEBAR_BLOCK,\n\t\t[]\n\t);\n\tconst { redo, undo } = useDispatch( coreStore );\n\tconst {\n\t\tsetIsListViewOpened,\n\t\tswitchEditorMode,\n\t\tsetIsInserterOpened,\n\t\tcloseGeneralSidebar,\n\t} = useDispatch( editSiteStore );\n\tconst { enableComplementaryArea, disableComplementaryArea } =\n\t\tuseDispatch( interfaceStore );\n\n\tconst { replaceBlocks } = useDispatch( blockEditorStore );\n\tconst { getBlockName, getSelectedBlockClientId, getBlockAttributes } =\n\t\tuseSelect( blockEditorStore );\n\n\tconst { get: getPreference } = useSelect( preferencesStore );\n\tconst { set: setPreference, toggle } = useDispatch( preferencesStore );\n\tconst { createInfoNotice } = useDispatch( noticesStore );\n\n\tconst toggleDistractionFree = () => {\n\t\tsetPreference( 'core/edit-site', 'fixedToolbar', false );\n\t\tsetIsInserterOpened( false );\n\t\tsetIsListViewOpened( false );\n\t\tcloseGeneralSidebar();\n\t};\n\n\tconst handleTextLevelShortcut = ( event, level ) => {\n\t\tevent.preventDefault();\n\t\tconst destinationBlockName =\n\t\t\tlevel === 0 ? 'core/paragraph' : 'core/heading';\n\t\tconst currentClientId = getSelectedBlockClientId();\n\t\tif ( currentClientId === null ) {\n\t\t\treturn;\n\t\t}\n\t\tconst blockName = getBlockName( currentClientId );\n\t\tif ( blockName !== 'core/paragraph' && blockName !== 'core/heading' ) {\n\t\t\treturn;\n\t\t}\n\t\tconst attributes = getBlockAttributes( currentClientId );\n\t\tconst textAlign =\n\t\t\tblockName === 'core/paragraph' ? 'align' : 'textAlign';\n\t\tconst destinationTextAlign =\n\t\t\tdestinationBlockName === 'core/paragraph' ? 'align' : 'textAlign';\n\n\t\treplaceBlocks(\n\t\t\tcurrentClientId,\n\t\t\tcreateBlock( destinationBlockName, {\n\t\t\t\tlevel,\n\t\t\t\tcontent: attributes.content,\n\t\t\t\t...{ [ destinationTextAlign ]: attributes[ textAlign ] },\n\t\t\t} )\n\t\t);\n\t};\n\n\tuseShortcut( 'core/edit-site/undo', ( event ) => {\n\t\tundo();\n\t\tevent.preventDefault();\n\t} );\n\n\tuseShortcut( 'core/edit-site/redo', ( event ) => {\n\t\tredo();\n\t\tevent.preventDefault();\n\t} );\n\n\t// Only opens the list view. Other functionality for this shortcut happens in the rendered sidebar.\n\tuseShortcut( 'core/edit-site/toggle-list-view', () => {\n\t\tif ( isListViewOpen ) {\n\t\t\treturn;\n\t\t}\n\t\tsetIsListViewOpened( true );\n\t} );\n\n\tuseShortcut( 'core/edit-site/toggle-block-settings-sidebar', ( event ) => {\n\t\t// This shortcut has no known clashes, but use preventDefault to prevent any\n\t\t// obscure shortcuts from triggering.\n\t\tevent.preventDefault();\n\n\t\tif ( isBlockInspectorOpen ) {\n\t\t\tdisableComplementaryArea( STORE_NAME );\n\t\t} else {\n\t\t\tenableComplementaryArea( STORE_NAME, SIDEBAR_BLOCK );\n\t\t}\n\t} );\n\n\tuseShortcut( 'core/edit-site/toggle-mode', () => {\n\t\tswitchEditorMode( getEditorMode() === 'visual' ? 'text' : 'visual' );\n\t} );\n\n\tuseShortcut( 'core/edit-site/transform-heading-to-paragraph', ( event ) =>\n\t\thandleTextLevelShortcut( event, 0 )\n\t);\n\n\t[ 1, 2, 3, 4, 5, 6 ].forEach( ( level ) => {\n\t\t//the loop is based off on a constant therefore\n\t\t//the hook will execute the same way every time\n\t\t//eslint-disable-next-line react-hooks/rules-of-hooks\n\t\tuseShortcut(\n\t\t\t`core/edit-site/transform-paragraph-to-heading-${ level }`,\n\t\t\t( event ) => handleTextLevelShortcut( event, level )\n\t\t);\n\t} );\n\n\tuseShortcut( 'core/edit-site/toggle-distraction-free', () => {\n\t\ttoggleDistractionFree();\n\t\ttoggle( 'core/edit-site', 'distractionFree' );\n\t\tcreateInfoNotice(\n\t\t\tgetPreference( 'core/edit-site', 'distractionFree' )\n\t\t\t\t? __( 'Distraction free mode turned on.' )\n\t\t\t\t: __( 'Distraction free mode turned off.' ),\n\t\t\t{\n\t\t\t\tid: 'core/edit-site/distraction-free-mode/notice',\n\t\t\t\ttype: 'snackbar',\n\t\t\t}\n\t\t);\n\t} );\n\n\treturn null;\n}\n\nexport default KeyboardShortcutsEditMode;\n"]}
1
+ {"version":3,"names":["__","useShortcut","useDispatch","useSelect","store","coreStore","blockEditorStore","interfaceStore","createBlock","preferencesStore","noticesStore","editSiteStore","SIDEBAR_BLOCK","STORE_NAME","KeyboardShortcutsEditMode","getEditorMode","isListViewOpen","select","isListViewOpened","isBlockInspectorOpen","getActiveComplementaryArea","name","redo","undo","setIsListViewOpened","switchEditorMode","setIsInserterOpened","closeGeneralSidebar","enableComplementaryArea","disableComplementaryArea","replaceBlocks","getBlockName","getSelectedBlockClientId","getBlockAttributes","get","getPreference","set","setPreference","toggle","createInfoNotice","toggleDistractionFree","handleTextLevelShortcut","event","level","preventDefault","destinationBlockName","currentClientId","blockName","attributes","textAlign","destinationTextAlign","content","forEach","id","type"],"sources":["@wordpress/edit-site/src/components/keyboard-shortcuts/edit-mode.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useShortcut } from '@wordpress/keyboard-shortcuts';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { store as interfaceStore } from '@wordpress/interface';\nimport { createBlock } from '@wordpress/blocks';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\nimport { SIDEBAR_BLOCK } from '../sidebar-edit-mode/constants';\nimport { STORE_NAME } from '../../store/constants';\n\nfunction KeyboardShortcutsEditMode() {\n\tconst { getEditorMode } = useSelect( editSiteStore );\n\tconst isListViewOpen = useSelect(\n\t\t( select ) => select( editSiteStore ).isListViewOpened(),\n\t\t[]\n\t);\n\tconst isBlockInspectorOpen = useSelect(\n\t\t( select ) =>\n\t\t\tselect( interfaceStore ).getActiveComplementaryArea(\n\t\t\t\teditSiteStore.name\n\t\t\t) === SIDEBAR_BLOCK,\n\t\t[]\n\t);\n\tconst { redo, undo } = useDispatch( coreStore );\n\tconst {\n\t\tsetIsListViewOpened,\n\t\tswitchEditorMode,\n\t\tsetIsInserterOpened,\n\t\tcloseGeneralSidebar,\n\t} = useDispatch( editSiteStore );\n\tconst { enableComplementaryArea, disableComplementaryArea } =\n\t\tuseDispatch( interfaceStore );\n\n\tconst { replaceBlocks } = useDispatch( blockEditorStore );\n\tconst { getBlockName, getSelectedBlockClientId, getBlockAttributes } =\n\t\tuseSelect( blockEditorStore );\n\n\tconst { get: getPreference } = useSelect( preferencesStore );\n\tconst { set: setPreference, toggle } = useDispatch( preferencesStore );\n\tconst { createInfoNotice } = useDispatch( noticesStore );\n\n\tconst toggleDistractionFree = () => {\n\t\tsetPreference( 'core/edit-site', 'fixedToolbar', false );\n\t\tsetIsInserterOpened( false );\n\t\tsetIsListViewOpened( false );\n\t\tcloseGeneralSidebar();\n\t};\n\n\tconst handleTextLevelShortcut = ( event, level ) => {\n\t\tevent.preventDefault();\n\t\tconst destinationBlockName =\n\t\t\tlevel === 0 ? 'core/paragraph' : 'core/heading';\n\t\tconst currentClientId = getSelectedBlockClientId();\n\t\tif ( currentClientId === null ) {\n\t\t\treturn;\n\t\t}\n\t\tconst blockName = getBlockName( currentClientId );\n\t\tif ( blockName !== 'core/paragraph' && blockName !== 'core/heading' ) {\n\t\t\treturn;\n\t\t}\n\t\tconst attributes = getBlockAttributes( currentClientId );\n\t\tconst textAlign =\n\t\t\tblockName === 'core/paragraph' ? 'align' : 'textAlign';\n\t\tconst destinationTextAlign =\n\t\t\tdestinationBlockName === 'core/paragraph' ? 'align' : 'textAlign';\n\n\t\treplaceBlocks(\n\t\t\tcurrentClientId,\n\t\t\tcreateBlock( destinationBlockName, {\n\t\t\t\tlevel,\n\t\t\t\tcontent: attributes.content,\n\t\t\t\t...{ [ destinationTextAlign ]: attributes[ textAlign ] },\n\t\t\t} )\n\t\t);\n\t};\n\n\tuseShortcut( 'core/edit-site/undo', ( event ) => {\n\t\tundo();\n\t\tevent.preventDefault();\n\t} );\n\n\tuseShortcut( 'core/edit-site/redo', ( event ) => {\n\t\tredo();\n\t\tevent.preventDefault();\n\t} );\n\n\t// Only opens the list view. Other functionality for this shortcut happens in the rendered sidebar.\n\tuseShortcut( 'core/edit-site/toggle-list-view', () => {\n\t\tif ( isListViewOpen ) {\n\t\t\treturn;\n\t\t}\n\t\tsetIsListViewOpened( true );\n\t} );\n\n\tuseShortcut( 'core/edit-site/toggle-block-settings-sidebar', ( event ) => {\n\t\t// This shortcut has no known clashes, but use preventDefault to prevent any\n\t\t// obscure shortcuts from triggering.\n\t\tevent.preventDefault();\n\n\t\tif ( isBlockInspectorOpen ) {\n\t\t\tdisableComplementaryArea( STORE_NAME );\n\t\t} else {\n\t\t\tenableComplementaryArea( STORE_NAME, SIDEBAR_BLOCK );\n\t\t}\n\t} );\n\n\tuseShortcut( 'core/edit-site/toggle-mode', () => {\n\t\tswitchEditorMode( getEditorMode() === 'visual' ? 'text' : 'visual' );\n\t} );\n\n\tuseShortcut( 'core/edit-site/transform-heading-to-paragraph', ( event ) =>\n\t\thandleTextLevelShortcut( event, 0 )\n\t);\n\n\t[ 1, 2, 3, 4, 5, 6 ].forEach( ( level ) => {\n\t\t//the loop is based off on a constant therefore\n\t\t//the hook will execute the same way every time\n\t\t//eslint-disable-next-line react-hooks/rules-of-hooks\n\t\tuseShortcut(\n\t\t\t`core/edit-site/transform-paragraph-to-heading-${ level }`,\n\t\t\t( event ) => handleTextLevelShortcut( event, level )\n\t\t);\n\t} );\n\n\tuseShortcut( 'core/edit-site/toggle-distraction-free', () => {\n\t\ttoggleDistractionFree();\n\t\ttoggle( 'core/edit-site', 'distractionFree' );\n\t\tcreateInfoNotice(\n\t\t\tgetPreference( 'core/edit-site', 'distractionFree' )\n\t\t\t\t? __( 'Distraction free mode turned on.' )\n\t\t\t\t: __( 'Distraction free mode turned off.' ),\n\t\t\t{\n\t\t\t\tid: 'core/edit-site/distraction-free-mode/notice',\n\t\t\t\ttype: 'snackbar',\n\t\t\t}\n\t\t);\n\t} );\n\n\treturn null;\n}\n\nexport default KeyboardShortcutsEditMode;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,WAAW,QAAQ,+BAA+B;AAC3D,SAASC,WAAW,EAAEC,SAAS,QAAQ,iBAAiB;AACxD,SAASC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;AACzD,SAASD,KAAK,IAAIE,gBAAgB,QAAQ,yBAAyB;AACnE,SAASF,KAAK,IAAIG,cAAc,QAAQ,sBAAsB;AAC9D,SAASC,WAAW,QAAQ,mBAAmB;AAC/C,SAASJ,KAAK,IAAIK,gBAAgB,QAAQ,wBAAwB;AAClE,SAASL,KAAK,IAAIM,YAAY,QAAQ,oBAAoB;;AAE1D;AACA;AACA;AACA,SAASN,KAAK,IAAIO,aAAa,QAAQ,aAAa;AACpD,SAASC,aAAa,QAAQ,gCAAgC;AAC9D,SAASC,UAAU,QAAQ,uBAAuB;AAElD,SAASC,yBAAyBA,CAAA,EAAG;EACpC,MAAM;IAAEC;EAAc,CAAC,GAAGZ,SAAS,CAAEQ,aAAc,CAAC;EACpD,MAAMK,cAAc,GAAGb,SAAS,CAC7Bc,MAAM,IAAMA,MAAM,CAAEN,aAAc,CAAC,CAACO,gBAAgB,CAAC,CAAC,EACxD,EACD,CAAC;EACD,MAAMC,oBAAoB,GAAGhB,SAAS,CACnCc,MAAM,IACPA,MAAM,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AE,4BAA4B,EAAE,MAAM;IAChDwB,gBAAgB,CAAEV,aAAa,CAAC,CAAC,KAAK,QAAQ,GAAG,MAAM,GAAG,QAAS,CAAC;EACrE,CAAE,CAAC;EAEHd,WAAW,CAAE,+CAA+C,EAAIyC,KAAK,IACpED,uBAAuB,CAAEC,KAAK,EAAE,CAAE,CACnC,CAAC;EAED,CAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAE,CAACU,OAAO,CAAIT,KAAK,IAAM;IAC1C;IACA;IACA;IACA1C,WAAW,CACT,iDAAiD0C,KAAO,EAAC,EACxDD,KAAK,IAAMD,uBAAuB,CAAEC,KAAK,EAAEC,KAAM,CACpD,CAAC;EACF,CAAE,CAAC;EAEH1C,WAAW,CAAE,wCAAwC,EAAE,MAAM;IAC5DuC,qBAAqB,CAAC,CAAC;IACvBF,MAAM,CAAE,gBAAgB,EAAE,iBAAkB,CAAC;IAC7CC,gBAAgB,CACfJ,aAAa,CAAE,gBAAgB,EAAE,iBAAkB,CAAC,GACjDnC,EAAE,CAAE,kCAAmC,CAAC,GACxCA,EAAE,CAAE,mCAAoC,CAAC,EAC5C;MACCqD,EAAE,EAAE,6CAA6C;MACjDC,IAAI,EAAE;IACP,CACD,CAAC;EACF,CAAE,CAAC;EAEH,OAAO,IAAI;AACZ;AAEA,eAAexC,yBAAyB"}
@@ -4,12 +4,11 @@
4
4
  import { useShortcut } from '@wordpress/keyboard-shortcuts';
5
5
  import { useDispatch, useSelect } from '@wordpress/data';
6
6
  import { store as coreStore } from '@wordpress/core-data';
7
+
7
8
  /**
8
9
  * Internal dependencies
9
10
  */
10
-
11
11
  import { store as editSiteStore } from '../../store';
12
-
13
12
  function KeyboardShortcutsGlobal() {
14
13
  const {
15
14
  __experimentalGetDirtyEntityRecords,
@@ -20,18 +19,14 @@ function KeyboardShortcutsGlobal() {
20
19
  } = useDispatch(editSiteStore);
21
20
  useShortcut('core/edit-site/save', event => {
22
21
  event.preventDefault();
23
-
24
22
  const dirtyEntityRecords = __experimentalGetDirtyEntityRecords();
25
-
26
23
  const isDirty = !!dirtyEntityRecords.length;
27
24
  const isSaving = dirtyEntityRecords.some(record => isSavingEntityRecord(record.kind, record.name, record.key));
28
-
29
25
  if (!isSaving && isDirty) {
30
26
  setIsSaveViewOpened(true);
31
27
  }
32
28
  });
33
29
  return null;
34
30
  }
35
-
36
31
  export default KeyboardShortcutsGlobal;
37
32
  //# sourceMappingURL=global.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/keyboard-shortcuts/global.js"],"names":["useShortcut","useDispatch","useSelect","store","coreStore","editSiteStore","KeyboardShortcutsGlobal","__experimentalGetDirtyEntityRecords","isSavingEntityRecord","setIsSaveViewOpened","event","preventDefault","dirtyEntityRecords","isDirty","length","isSaving","some","record","kind","name","key"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,WAAT,QAA4B,+BAA5B;AACA,SAASC,WAAT,EAAsBC,SAAtB,QAAuC,iBAAvC;AACA,SAASC,KAAK,IAAIC,SAAlB,QAAmC,sBAAnC;AAEA;AACA;AACA;;AACA,SAASD,KAAK,IAAIE,aAAlB,QAAuC,aAAvC;;AAEA,SAASC,uBAAT,GAAmC;AAClC,QAAM;AAAEC,IAAAA,mCAAF;AAAuCC,IAAAA;AAAvC,MACLN,SAAS,CAAEE,SAAF,CADV;AAEA,QAAM;AAAEK,IAAAA;AAAF,MAA0BR,WAAW,CAAEI,aAAF,CAA3C;AAEAL,EAAAA,WAAW,CAAE,qBAAF,EAA2BU,KAAF,IAAa;AAChDA,IAAAA,KAAK,CAACC,cAAN;;AAEA,UAAMC,kBAAkB,GAAGL,mCAAmC,EAA9D;;AACA,UAAMM,OAAO,GAAG,CAAC,CAAED,kBAAkB,CAACE,MAAtC;AACA,UAAMC,QAAQ,GAAGH,kBAAkB,CAACI,IAAnB,CAA2BC,MAAF,IACzCT,oBAAoB,CAAES,MAAM,CAACC,IAAT,EAAeD,MAAM,CAACE,IAAtB,EAA4BF,MAAM,CAACG,GAAnC,CADJ,CAAjB;;AAIA,QAAK,CAAEL,QAAF,IAAcF,OAAnB,EAA6B;AAC5BJ,MAAAA,mBAAmB,CAAE,IAAF,CAAnB;AACA;AACD,GAZU,CAAX;AAcA,SAAO,IAAP;AACA;;AAED,eAAeH,uBAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useShortcut } from '@wordpress/keyboard-shortcuts';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\n\nfunction KeyboardShortcutsGlobal() {\n\tconst { __experimentalGetDirtyEntityRecords, isSavingEntityRecord } =\n\t\tuseSelect( coreStore );\n\tconst { setIsSaveViewOpened } = useDispatch( editSiteStore );\n\n\tuseShortcut( 'core/edit-site/save', ( event ) => {\n\t\tevent.preventDefault();\n\n\t\tconst dirtyEntityRecords = __experimentalGetDirtyEntityRecords();\n\t\tconst isDirty = !! dirtyEntityRecords.length;\n\t\tconst isSaving = dirtyEntityRecords.some( ( record ) =>\n\t\t\tisSavingEntityRecord( record.kind, record.name, record.key )\n\t\t);\n\n\t\tif ( ! isSaving && isDirty ) {\n\t\t\tsetIsSaveViewOpened( true );\n\t\t}\n\t} );\n\n\treturn null;\n}\n\nexport default KeyboardShortcutsGlobal;\n"]}
1
+ {"version":3,"names":["useShortcut","useDispatch","useSelect","store","coreStore","editSiteStore","KeyboardShortcutsGlobal","__experimentalGetDirtyEntityRecords","isSavingEntityRecord","setIsSaveViewOpened","event","preventDefault","dirtyEntityRecords","isDirty","length","isSaving","some","record","kind","name","key"],"sources":["@wordpress/edit-site/src/components/keyboard-shortcuts/global.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useShortcut } from '@wordpress/keyboard-shortcuts';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\n\nfunction KeyboardShortcutsGlobal() {\n\tconst { __experimentalGetDirtyEntityRecords, isSavingEntityRecord } =\n\t\tuseSelect( coreStore );\n\tconst { setIsSaveViewOpened } = useDispatch( editSiteStore );\n\n\tuseShortcut( 'core/edit-site/save', ( event ) => {\n\t\tevent.preventDefault();\n\n\t\tconst dirtyEntityRecords = __experimentalGetDirtyEntityRecords();\n\t\tconst isDirty = !! dirtyEntityRecords.length;\n\t\tconst isSaving = dirtyEntityRecords.some( ( record ) =>\n\t\t\tisSavingEntityRecord( record.kind, record.name, record.key )\n\t\t);\n\n\t\tif ( ! isSaving && isDirty ) {\n\t\t\tsetIsSaveViewOpened( true );\n\t\t}\n\t} );\n\n\treturn null;\n}\n\nexport default KeyboardShortcutsGlobal;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,WAAW,QAAQ,+BAA+B;AAC3D,SAASC,WAAW,EAAEC,SAAS,QAAQ,iBAAiB;AACxD,SAASC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;;AAEzD;AACA;AACA;AACA,SAASD,KAAK,IAAIE,aAAa,QAAQ,aAAa;AAEpD,SAASC,uBAAuBA,CAAA,EAAG;EAClC,MAAM;IAAEC,mCAAmC;IAAEC;EAAqB,CAAC,GAClEN,SAAS,CAAEE,SAAU,CAAC;EACvB,MAAM;IAAEK;EAAoB,CAAC,GAAGR,WAAW,CAAEI,aAAc,CAAC;EAE5DL,WAAW,CAAE,qBAAqB,EAAIU,KAAK,IAAM;IAChDA,KAAK,CAACC,cAAc,CAAC,CAAC;IAEtB,MAAMC,kBAAkB,GAAGL,mCAAmC,CAAC,CAAC;IAChE,MAAMM,OAAO,GAAG,CAAC,CAAED,kBAAkB,CAACE,MAAM;IAC5C,MAAMC,QAAQ,GAAGH,kBAAkB,CAACI,IAAI,CAAIC,MAAM,IACjDT,oBAAoB,CAAES,MAAM,CAACC,IAAI,EAAED,MAAM,CAACE,IAAI,EAAEF,MAAM,CAACG,GAAI,CAC5D,CAAC;IAED,IAAK,CAAEL,QAAQ,IAAIF,OAAO,EAAG;MAC5BJ,mBAAmB,CAAE,IAAK,CAAC;IAC5B;EACD,CAAE,CAAC;EAEH,OAAO,IAAI;AACZ;AAEA,eAAeH,uBAAuB"}
@@ -6,7 +6,6 @@ import { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';
6
6
  import { isAppleOS } from '@wordpress/keycodes';
7
7
  import { useDispatch } from '@wordpress/data';
8
8
  import { __ } from '@wordpress/i18n';
9
-
10
9
  function KeyboardShortcutsRegister() {
11
10
  // Registering the shortcuts.
12
11
  const {
@@ -145,6 +144,5 @@ function KeyboardShortcutsRegister() {
145
144
  }, [registerShortcut]);
146
145
  return null;
147
146
  }
148
-
149
147
  export default KeyboardShortcutsRegister;
150
148
  //# sourceMappingURL=register.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/keyboard-shortcuts/register.js"],"names":["useEffect","store","keyboardShortcutsStore","isAppleOS","useDispatch","__","KeyboardShortcutsRegister","registerShortcut","name","category","description","keyCombination","modifier","character","aliases","forEach","level"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAT,QAA0B,oBAA1B;AACA,SAASC,KAAK,IAAIC,sBAAlB,QAAgD,+BAAhD;AACA,SAASC,SAAT,QAA0B,qBAA1B;AACA,SAASC,WAAT,QAA4B,iBAA5B;AACA,SAASC,EAAT,QAAmB,iBAAnB;;AAEA,SAASC,yBAAT,GAAqC;AACpC;AACA,QAAM;AAAEC,IAAAA;AAAF,MAAuBH,WAAW,CAAEF,sBAAF,CAAxC;AACAF,EAAAA,SAAS,CAAE,MAAM;AAChBO,IAAAA,gBAAgB,CAAE;AACjBC,MAAAA,IAAI,EAAE,qBADW;AAEjBC,MAAAA,QAAQ,EAAE,QAFO;AAGjBC,MAAAA,WAAW,EAAEL,EAAE,CAAE,oBAAF,CAHE;AAIjBM,MAAAA,cAAc,EAAE;AACfC,QAAAA,QAAQ,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ShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport { isAppleOS } from '@wordpress/keycodes';\nimport { useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\n\nfunction KeyboardShortcutsRegister() {\n\t// Registering the shortcuts.\n\tconst { registerShortcut } = useDispatch( keyboardShortcutsStore );\n\tuseEffect( () => {\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-site/save',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Save your changes.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primary',\n\t\t\t\tcharacter: 's',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-site/undo',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Undo your last changes.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primary',\n\t\t\t\tcharacter: 'z',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-site/redo',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Redo your last undo.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primaryShift',\n\t\t\t\tcharacter: 'z',\n\t\t\t},\n\t\t\t// Disable on Apple OS because it conflicts with the browser's\n\t\t\t// history shortcut. It's a fine alias for both Windows and Linux.\n\t\t\t// Since there's no conflict for Ctrl+Shift+Z on both Windows and\n\t\t\t// Linux, we keep it as the default for consistency.\n\t\t\taliases: isAppleOS()\n\t\t\t\t? []\n\t\t\t\t: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmodifier: 'primary',\n\t\t\t\t\t\t\tcharacter: 'y',\n\t\t\t\t\t\t},\n\t\t\t\t ],\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-site/toggle-list-view',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Open the block list view.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'access',\n\t\t\t\tcharacter: 'o',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-site/toggle-block-settings-sidebar',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Show or hide the Settings sidebar.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primaryShift',\n\t\t\t\tcharacter: ',',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-site/keyboard-shortcuts',\n\t\t\tcategory: 'main',\n\t\t\tdescription: __( 'Display these keyboard shortcuts.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'access',\n\t\t\t\tcharacter: 'h',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-site/next-region',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Navigate to the next part of the editor.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'ctrl',\n\t\t\t\tcharacter: '`',\n\t\t\t},\n\t\t\taliases: [\n\t\t\t\t{\n\t\t\t\t\tmodifier: 'access',\n\t\t\t\t\tcharacter: 'n',\n\t\t\t\t},\n\t\t\t],\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-site/previous-region',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Navigate to the previous part of the editor.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'ctrlShift',\n\t\t\t\tcharacter: '`',\n\t\t\t},\n\t\t\taliases: [\n\t\t\t\t{\n\t\t\t\t\tmodifier: 'access',\n\t\t\t\t\tcharacter: 'p',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tmodifier: 'ctrlShift',\n\t\t\t\t\tcharacter: '~',\n\t\t\t\t},\n\t\t\t],\n\t\t} );\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-site/toggle-mode',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Switch between visual editor and code editor.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'secondary',\n\t\t\t\tcharacter: 'm',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-site/transform-heading-to-paragraph',\n\t\t\tcategory: 'block-library',\n\t\t\tdescription: __( 'Transform heading to paragraph.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'access',\n\t\t\t\tcharacter: `0`,\n\t\t\t},\n\t\t} );\n\n\t\t[ 1, 2, 3, 4, 5, 6 ].forEach( ( level ) => {\n\t\t\tregisterShortcut( {\n\t\t\t\tname: `core/edit-site/transform-paragraph-to-heading-${ level }`,\n\t\t\t\tcategory: 'block-library',\n\t\t\t\tdescription: __( 'Transform paragraph to heading.' ),\n\t\t\t\tkeyCombination: {\n\t\t\t\t\tmodifier: 'access',\n\t\t\t\t\tcharacter: `${ level }`,\n\t\t\t\t},\n\t\t\t} );\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-site/toggle-distraction-free',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Toggle distraction free mode.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primaryShift',\n\t\t\t\tcharacter: '\\\\',\n\t\t\t},\n\t\t} );\n\t}, [ registerShortcut ] );\n\n\treturn null;\n}\n\nexport default KeyboardShortcutsRegister;\n"]}
1
+ {"version":3,"names":["useEffect","store","keyboardShortcutsStore","isAppleOS","useDispatch","__","KeyboardShortcutsRegister","registerShortcut","name","category","description","keyCombination","modifier","character","aliases","forEach","level"],"sources":["@wordpress/edit-site/src/components/keyboard-shortcuts/register.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport { isAppleOS } from '@wordpress/keycodes';\nimport { useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\n\nfunction KeyboardShortcutsRegister() {\n\t// Registering the shortcuts.\n\tconst { registerShortcut } = useDispatch( keyboardShortcutsStore );\n\tuseEffect( () => {\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-site/save',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Save your changes.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primary',\n\t\t\t\tcharacter: 's',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-site/undo',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Undo your last changes.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primary',\n\t\t\t\tcharacter: 'z',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-site/redo',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Redo your last undo.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primaryShift',\n\t\t\t\tcharacter: 'z',\n\t\t\t},\n\t\t\t// Disable on Apple OS because it conflicts with the browser's\n\t\t\t// history shortcut. It's a fine alias for both Windows and Linux.\n\t\t\t// Since there's no conflict for Ctrl+Shift+Z on both Windows and\n\t\t\t// Linux, we keep it as the default for consistency.\n\t\t\taliases: isAppleOS()\n\t\t\t\t? []\n\t\t\t\t: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmodifier: 'primary',\n\t\t\t\t\t\t\tcharacter: 'y',\n\t\t\t\t\t\t},\n\t\t\t\t ],\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-site/toggle-list-view',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Open the block list view.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'access',\n\t\t\t\tcharacter: 'o',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-site/toggle-block-settings-sidebar',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Show or hide the Settings sidebar.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primaryShift',\n\t\t\t\tcharacter: ',',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-site/keyboard-shortcuts',\n\t\t\tcategory: 'main',\n\t\t\tdescription: __( 'Display these keyboard shortcuts.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'access',\n\t\t\t\tcharacter: 'h',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-site/next-region',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Navigate to the next part of the editor.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'ctrl',\n\t\t\t\tcharacter: '`',\n\t\t\t},\n\t\t\taliases: [\n\t\t\t\t{\n\t\t\t\t\tmodifier: 'access',\n\t\t\t\t\tcharacter: 'n',\n\t\t\t\t},\n\t\t\t],\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-site/previous-region',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Navigate to the previous part of the editor.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'ctrlShift',\n\t\t\t\tcharacter: '`',\n\t\t\t},\n\t\t\taliases: [\n\t\t\t\t{\n\t\t\t\t\tmodifier: 'access',\n\t\t\t\t\tcharacter: 'p',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tmodifier: 'ctrlShift',\n\t\t\t\t\tcharacter: '~',\n\t\t\t\t},\n\t\t\t],\n\t\t} );\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-site/toggle-mode',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Switch between visual editor and code editor.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'secondary',\n\t\t\t\tcharacter: 'm',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-site/transform-heading-to-paragraph',\n\t\t\tcategory: 'block-library',\n\t\t\tdescription: __( 'Transform heading to paragraph.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'access',\n\t\t\t\tcharacter: `0`,\n\t\t\t},\n\t\t} );\n\n\t\t[ 1, 2, 3, 4, 5, 6 ].forEach( ( level ) => {\n\t\t\tregisterShortcut( {\n\t\t\t\tname: `core/edit-site/transform-paragraph-to-heading-${ level }`,\n\t\t\t\tcategory: 'block-library',\n\t\t\t\tdescription: __( 'Transform paragraph to heading.' ),\n\t\t\t\tkeyCombination: {\n\t\t\t\t\tmodifier: 'access',\n\t\t\t\t\tcharacter: `${ level }`,\n\t\t\t\t},\n\t\t\t} );\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-site/toggle-distraction-free',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Toggle distraction free mode.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primaryShift',\n\t\t\t\tcharacter: '\\\\',\n\t\t\t},\n\t\t} );\n\t}, [ registerShortcut ] );\n\n\treturn null;\n}\n\nexport default KeyboardShortcutsRegister;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,oBAAoB;AAC9C,SAASC,KAAK,IAAIC,sBAAsB,QAAQ,+BAA+B;AAC/E,SAASC,SAAS,QAAQ,qBAAqB;AAC/C,SAASC,WAAW,QAAQ,iBAAiB;AAC7C,SAASC,EAAE,QAAQ,iBAAiB;AAEpC,SAASC,yBAAyBA,CAAA,EAAG;EACpC;EACA,MAAM;IAAEC;EAAiB,CAAC,GAAGH,WAAW,CAAEF,sBAAuB,CAAC;EAClEF,SAAS,CAAE,MAAM;IAChBO,gBAAgB,CAAE;MACjBC,IAAI,EAAE,qBAAqB;MAC3BC,QAAQ,EAAE,QAAQ;MAClBC,WAAW,EAAEL,EAAE,CAAE,oBAAqB,CAAC;MACvCM,cAAc,EAAE;QACfC,QAAQ,EAAE,SAAS;QACnBC,SAAS,EAAE;MACZ;IACD,CAAE,CA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AChEP,QAAQ,EAAE,eAAe;QACzBC,WAAW,EAAEL,EAAE,CAAE,iCAAkC,CAAC;QACpDM,cAAc,EAAE;UACfC,QAAQ,EAAE,QAAQ;UAClBC,SAAS,EAAG,GAAGG,KAAO;QACvB;MACD,CAAE,CAAC;IACJ,CAAE,CAAC;IAEHT,gBAAgB,CAAE;MACjBC,IAAI,EAAE,wCAAwC;MAC9CC,QAAQ,EAAE,QAAQ;MAClBC,WAAW,EAAEL,EAAE,CAAE,+BAAgC,CAAC;MAClDM,cAAc,EAAE;QACfC,QAAQ,EAAE,cAAc;QACxBC,SAAS,EAAE;MACZ;IACD,CAAE,CAAC;EACJ,CAAC,EAAE,CAAEN,gBAAgB,CAAG,CAAC;EAEzB,OAAO,IAAI;AACZ;AAEA,eAAeD,yBAAyB"}
@@ -4,10 +4,10 @@
4
4
  import { useEffect, useState } from '@wordpress/element';
5
5
  import { useSelect } from '@wordpress/data';
6
6
  import { store as coreStore } from '@wordpress/core-data';
7
+
7
8
  /**
8
9
  * Internal dependencies
9
10
  */
10
-
11
11
  import useEditedEntityRecord from '../use-edited-entity-record';
12
12
  const MAX_LOADING_TIME = 10000; // 10 seconds
13
13
 
@@ -20,21 +20,19 @@ export function useIsSiteEditorLoading() {
20
20
  const hasResolvingSelectors = select(coreStore).hasResolvingSelectors();
21
21
  return !loaded && !hasResolvingSelectors;
22
22
  }, [loaded]);
23
+
23
24
  /*
24
25
  * If the maximum expected loading time has passed, we're marking the
25
26
  * editor as loaded, in order to prevent any failed requests from blocking
26
27
  * the editor canvas from appearing.
27
28
  */
28
-
29
29
  useEffect(() => {
30
30
  let timeout;
31
-
32
31
  if (!loaded) {
33
32
  timeout = setTimeout(() => {
34
33
  setLoaded(true);
35
34
  }, MAX_LOADING_TIME);
36
35
  }
37
-
38
36
  return () => {
39
37
  clearTimeout(timeout);
40
38
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/layout/hooks.js"],"names":["useEffect","useState","useSelect","store","coreStore","useEditedEntityRecord","MAX_LOADING_TIME","useIsSiteEditorLoading","isLoaded","hasLoadedPost","loaded","setLoaded","inLoadingPause","select","hasResolvingSelectors","timeout","setTimeout","clearTimeout"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAT,EAAoBC,QAApB,QAAoC,oBAApC;AACA,SAASC,SAAT,QAA0B,iBAA1B;AACA,SAASC,KAAK,IAAIC,SAAlB,QAAmC,sBAAnC;AAEA;AACA;AACA;;AACA,OAAOC,qBAAP,MAAkC,6BAAlC;AAEA,MAAMC,gBAAgB,GAAG,KAAzB,C,CAAgC;;AAEhC,OAAO,SAASC,sBAAT,GAAkC;AACxC,QAAM;AAAEC,IAAAA,QAAQ,EAAEC;AAAZ,MAA8BJ,qBAAqB,EAAzD;AACA,QAAM,CAAEK,MAAF,EAAUC,SAAV,IAAwBV,QAAQ,CAAE,KAAF,CAAtC;AACA,QAAMW,cAAc,GAAGV,SAAS,CAC7BW,MAAF,IAAc;AACb,UAAMC,qBAAqB,GAC1BD,MAAM,CAAET,SAAF,CAAN,CAAoBU,qBAApB,EADD;AAEA,WAAO,CAAEJ,MAAF,IAAY,CAAEI,qBAArB;AACA,GAL8B,EAM/B,CAAEJ,MAAF,CAN+B,CAAhC;AASA;AACD;AACA;AACA;AACA;;AACCV,EAAAA,SAAS,CAAE,MAAM;AAChB,QAAIe,OAAJ;;AAEA,QAAK,CAAEL,MAAP,EAAgB;AACfK,MAAAA,OAAO,GAAGC,UAAU,CAAE,MAAM;AAC3BL,QAAAA,SAAS,CAAE,IAAF,CAAT;AACA,OAFmB,EAEjBL,gBAFiB,CAApB;AAGA;;AAED,WAAO,MAAM;AACZW,MAAAA,YAAY,CAAEF,OAAF,CAAZ;AACA,KAFD;AAGA,GAZQ,EAYN,CAAEL,MAAF,CAZM,CAAT;AAcAV,EAAAA,SAAS,CAAE,MAAM;AAChB,QAAKY,cAAL,EAAsB;AACrB;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACG,YAAMG,OAAO,GAAGC,UAAU,CAAE,MAAM;AACjCL,QAAAA,SAAS,CAAE,IAAF,CAAT;AACA,OAFyB,EAEvB,IAFuB,CAA1B;AAIA,aAAO,MAAM;AACZM,QAAAA,YAAY,CAAEF,OAAF,CAAZ;AACA,OAFD;AAGA;AACD,GAlBQ,EAkBN,CAAEH,cAAF,CAlBM,CAAT;AAoBA,SAAO,CAAEF,MAAF,IAAY,CAAED,aAArB;AACA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useEffect, useState } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport useEditedEntityRecord from '../use-edited-entity-record';\n\nconst MAX_LOADING_TIME = 10000; // 10 seconds\n\nexport function useIsSiteEditorLoading() {\n\tconst { isLoaded: hasLoadedPost } = useEditedEntityRecord();\n\tconst [ loaded, setLoaded ] = useState( false );\n\tconst inLoadingPause = useSelect(\n\t\t( select ) => {\n\t\t\tconst hasResolvingSelectors =\n\t\t\t\tselect( coreStore ).hasResolvingSelectors();\n\t\t\treturn ! loaded && ! hasResolvingSelectors;\n\t\t},\n\t\t[ loaded ]\n\t);\n\n\t/*\n\t * If the maximum expected loading time has passed, we're marking the\n\t * editor as loaded, in order to prevent any failed requests from blocking\n\t * the editor canvas from appearing.\n\t */\n\tuseEffect( () => {\n\t\tlet timeout;\n\n\t\tif ( ! loaded ) {\n\t\t\ttimeout = setTimeout( () => {\n\t\t\t\tsetLoaded( true );\n\t\t\t}, MAX_LOADING_TIME );\n\t\t}\n\n\t\treturn () => {\n\t\t\tclearTimeout( timeout );\n\t\t};\n\t}, [ loaded ] );\n\n\tuseEffect( () => {\n\t\tif ( inLoadingPause ) {\n\t\t\t/*\n\t\t\t * We're using an arbitrary 1s timeout here to catch brief moments\n\t\t\t * without any resolving selectors that would result in displaying\n\t\t\t * brief flickers of loading state and loaded state.\n\t\t\t *\n\t\t\t * It's worth experimenting with different values, since this also\n\t\t\t * adds 1s of artificial delay after loading has finished.\n\t\t\t */\n\t\t\tconst timeout = setTimeout( () => {\n\t\t\t\tsetLoaded( true );\n\t\t\t}, 1000 );\n\n\t\t\treturn () => {\n\t\t\t\tclearTimeout( timeout );\n\t\t\t};\n\t\t}\n\t}, [ inLoadingPause ] );\n\n\treturn ! loaded || ! hasLoadedPost;\n}\n"]}
1
+ {"version":3,"names":["useEffect","useState","useSelect","store","coreStore","useEditedEntityRecord","MAX_LOADING_TIME","useIsSiteEditorLoading","isLoaded","hasLoadedPost","loaded","setLoaded","inLoadingPause","select","hasResolvingSelectors","timeout","setTimeout","clearTimeout"],"sources":["@wordpress/edit-site/src/components/layout/hooks.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useEffect, useState } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport useEditedEntityRecord from '../use-edited-entity-record';\n\nconst MAX_LOADING_TIME = 10000; // 10 seconds\n\nexport function useIsSiteEditorLoading() {\n\tconst { isLoaded: hasLoadedPost } = useEditedEntityRecord();\n\tconst [ loaded, setLoaded ] = useState( false );\n\tconst inLoadingPause = useSelect(\n\t\t( select ) => {\n\t\t\tconst hasResolvingSelectors =\n\t\t\t\tselect( coreStore ).hasResolvingSelectors();\n\t\t\treturn ! loaded && ! hasResolvingSelectors;\n\t\t},\n\t\t[ loaded ]\n\t);\n\n\t/*\n\t * If the maximum expected loading time has passed, we're marking the\n\t * editor as loaded, in order to prevent any failed requests from blocking\n\t * the editor canvas from appearing.\n\t */\n\tuseEffect( () => {\n\t\tlet timeout;\n\n\t\tif ( ! loaded ) {\n\t\t\ttimeout = setTimeout( () => {\n\t\t\t\tsetLoaded( true );\n\t\t\t}, MAX_LOADING_TIME );\n\t\t}\n\n\t\treturn () => {\n\t\t\tclearTimeout( timeout );\n\t\t};\n\t}, [ loaded ] );\n\n\tuseEffect( () => {\n\t\tif ( inLoadingPause ) {\n\t\t\t/*\n\t\t\t * We're using an arbitrary 1s timeout here to catch brief moments\n\t\t\t * without any resolving selectors that would result in displaying\n\t\t\t * brief flickers of loading state and loaded state.\n\t\t\t *\n\t\t\t * It's worth experimenting with different values, since this also\n\t\t\t * adds 1s of artificial delay after loading has finished.\n\t\t\t */\n\t\t\tconst timeout = setTimeout( () => {\n\t\t\t\tsetLoaded( true );\n\t\t\t}, 1000 );\n\n\t\t\treturn () => {\n\t\t\t\tclearTimeout( timeout );\n\t\t\t};\n\t\t}\n\t}, [ inLoadingPause ] );\n\n\treturn ! loaded || ! hasLoadedPost;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,EAAEC,QAAQ,QAAQ,oBAAoB;AACxD,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;;AAEzD;AACA;AACA;AACA,OAAOC,qBAAqB,MAAM,6BAA6B;AAE/D,MAAMC,gBAAgB,GAAG,KAAK,CAAC,CAAC;;AAEhC,OAAO,SAASC,sBAAsBA,CAAA,EAAG;EACxC,MAAM;IAAEC,QAAQ,EAAEC;EAAc,CAAC,GAAGJ,qBAAqB,CAAC,CAAC;EAC3D,MAAM,CAAEK,MAAM,EAAEC,SAAS,CAAE,GAAGV,QAAQ,CAAE,KAAM,CAAC;EAC/C,MAAMW,cAAc,GAAGV,SAAS,CAC7BW,MAAM,IAAM;IACb,MAAMC,qBAAqB,GAC1BD,MAAM,CAAET,SAAU,CAAC,CAACU,qBAAqB,CAAC,CAAC;IAC5C,OAAO,CAAEJ,MAAM,IAAI,CAAEI,qBAAqB;EAC3C,CAAC,EACD,CAAEJ,MAAM,CACT,CAAC;;EAED;AACD;AACA;AACA;AACA;EACCV,SAAS,CAAE,MAAM;IAChB,IAAIe,OAAO;IAEX,IAAK,CAAEL,MAAM,EAAG;MACfK,OAAO,GAAGC,UAAU,CAAE,MAAM;QAC3BL,SAAS,CAAE,IAAK,CAAC;MAClB,CAAC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