@wordpress/edit-site 5.22.0 → 5.23.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 (355) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/components/actions/index.js +86 -4
  3. package/build/components/actions/index.js.map +1 -1
  4. package/build/components/add-new-template/new-template.js +0 -7
  5. package/build/components/add-new-template/new-template.js.map +1 -1
  6. package/build/components/block-editor/use-site-editor-settings.js +54 -63
  7. package/build/components/block-editor/use-site-editor-settings.js.map +1 -1
  8. package/build/components/dataviews/add-filter.js +90 -0
  9. package/build/components/dataviews/add-filter.js.map +1 -0
  10. package/build/components/dataviews/dataviews.js +23 -4
  11. package/build/components/dataviews/dataviews.js.map +1 -1
  12. package/build/components/dataviews/filters.js +36 -32
  13. package/build/components/dataviews/filters.js.map +1 -1
  14. package/build/components/dataviews/in-filter.js +22 -20
  15. package/build/components/dataviews/in-filter.js.map +1 -1
  16. package/build/components/dataviews/index.js +9 -2
  17. package/build/components/dataviews/index.js.map +1 -1
  18. package/build/components/dataviews/item-actions.js +81 -13
  19. package/build/components/dataviews/item-actions.js.map +1 -1
  20. package/build/components/dataviews/pagination.js +3 -2
  21. package/build/components/dataviews/pagination.js.map +1 -1
  22. package/build/components/dataviews/reset-filters.js +33 -0
  23. package/build/components/dataviews/reset-filters.js.map +1 -0
  24. package/build/components/dataviews/search.js +1 -0
  25. package/build/components/dataviews/search.js.map +1 -1
  26. package/build/components/dataviews/view-actions.js +27 -10
  27. package/build/components/dataviews/view-actions.js.map +1 -1
  28. package/build/components/dataviews/view-list.js +126 -5
  29. package/build/components/dataviews/view-list.js.map +1 -1
  30. package/build/components/dataviews/view-side-by-side.js +20 -0
  31. package/build/components/dataviews/view-side-by-side.js.map +1 -0
  32. package/build/components/editor/index.js +53 -53
  33. package/build/components/editor/index.js.map +1 -1
  34. package/build/components/global-styles/screen-revisions/index.js +42 -21
  35. package/build/components/global-styles/screen-revisions/index.js.map +1 -1
  36. package/build/components/global-styles/screen-root.js +3 -3
  37. package/build/components/global-styles/screen-root.js.map +1 -1
  38. package/build/components/global-styles/ui.js +3 -3
  39. package/build/components/global-styles/ui.js.map +1 -1
  40. package/build/components/global-styles-renderer/index.js +1 -1
  41. package/build/components/global-styles-renderer/index.js.map +1 -1
  42. package/build/components/header-edit-mode/document-tools/index.js +160 -0
  43. package/build/components/header-edit-mode/document-tools/index.js.map +1 -0
  44. package/build/components/header-edit-mode/index.js +48 -116
  45. package/build/components/header-edit-mode/index.js.map +1 -1
  46. package/build/components/header-edit-mode/more-menu/site-export.js +2 -6
  47. package/build/components/header-edit-mode/more-menu/site-export.js.map +1 -1
  48. package/build/components/layout/index.js +4 -19
  49. package/build/components/layout/index.js.map +1 -1
  50. package/build/components/list/added-by.js +1 -0
  51. package/build/components/list/added-by.js.map +1 -1
  52. package/build/components/page-content-focus-manager/back-to-page-notification.js +5 -10
  53. package/build/components/page-content-focus-manager/back-to-page-notification.js.map +1 -1
  54. package/build/components/page-content-focus-manager/disable-non-page-content-blocks.js +36 -23
  55. package/build/components/page-content-focus-manager/disable-non-page-content-blocks.js.map +1 -1
  56. package/build/components/page-main/index.js +2 -1
  57. package/build/components/page-main/index.js.map +1 -1
  58. package/build/components/page-pages/index.js +133 -78
  59. package/build/components/page-pages/index.js.map +1 -1
  60. package/build/components/page-pages/side-editor.js +25 -0
  61. package/build/components/page-pages/side-editor.js.map +1 -0
  62. package/build/components/page-patterns/grid-item.js +2 -2
  63. package/build/components/page-patterns/grid-item.js.map +1 -1
  64. package/build/components/page-patterns/patterns-list.js +3 -3
  65. package/build/components/page-patterns/patterns-list.js.map +1 -1
  66. package/build/components/page-patterns/use-patterns.js +1 -1
  67. package/build/components/page-patterns/use-patterns.js.map +1 -1
  68. package/build/components/page-templates/dataviews-templates.js +201 -0
  69. package/build/components/page-templates/dataviews-templates.js.map +1 -0
  70. package/build/components/page-templates/template-actions.js +168 -0
  71. package/build/components/page-templates/template-actions.js.map +1 -0
  72. package/build/components/sidebar/index.js +1 -2
  73. package/build/components/sidebar/index.js.map +1 -1
  74. package/build/components/sidebar-dataviews/add-new-view.js +124 -0
  75. package/build/components/sidebar-dataviews/add-new-view.js.map +1 -0
  76. package/build/components/sidebar-dataviews/custom-dataviews-list.js +189 -0
  77. package/build/components/sidebar-dataviews/custom-dataviews-list.js.map +1 -0
  78. package/build/components/sidebar-dataviews/dataview-item.js +71 -0
  79. package/build/components/sidebar-dataviews/dataview-item.js.map +1 -0
  80. package/build/components/sidebar-dataviews/default-views.js +60 -0
  81. package/build/components/sidebar-dataviews/default-views.js.map +1 -0
  82. package/build/components/sidebar-dataviews/index.js +21 -38
  83. package/build/components/sidebar-dataviews/index.js.map +1 -1
  84. package/build/components/sidebar-edit-mode/default-sidebar.js +2 -6
  85. package/build/components/sidebar-edit-mode/default-sidebar.js.map +1 -1
  86. package/build/components/sidebar-edit-mode/page-panels/edit-template.js +11 -11
  87. package/build/components/sidebar-edit-mode/page-panels/edit-template.js.map +1 -1
  88. package/build/components/sidebar-edit-mode/page-panels/page-summary.js +2 -1
  89. package/build/components/sidebar-edit-mode/page-panels/page-summary.js.map +1 -1
  90. package/build/components/sidebar-edit-mode/page-panels/reset-default-template.js +4 -12
  91. package/build/components/sidebar-edit-mode/page-panels/reset-default-template.js.map +1 -1
  92. package/build/components/sidebar-edit-mode/page-panels/swap-template-button.js +4 -12
  93. package/build/components/sidebar-edit-mode/page-panels/swap-template-button.js.map +1 -1
  94. package/build/components/sidebar-edit-mode/plugin-sidebar/index.js +2 -6
  95. package/build/components/sidebar-edit-mode/plugin-sidebar/index.js.map +1 -1
  96. package/build/components/sidebar-edit-mode/template-panel/hooks.js +3 -3
  97. package/build/components/sidebar-edit-mode/template-panel/hooks.js.map +1 -1
  98. package/build/components/sidebar-navigation-screen-global-styles/index.js +1 -1
  99. package/build/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  100. package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js +1 -1
  101. package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +1 -1
  102. package/build/components/sidebar-navigation-screen-page/page-details.js +3 -11
  103. package/build/components/sidebar-navigation-screen-page/page-details.js.map +1 -1
  104. package/build/components/sidebar-navigation-screen-patterns/use-theme-patterns.js +1 -1
  105. package/build/components/sidebar-navigation-screen-patterns/use-theme-patterns.js.map +1 -1
  106. package/build/components/site-hub/index.js +18 -6
  107. package/build/components/site-hub/index.js.map +1 -1
  108. package/build/components/start-template-options/index.js +12 -16
  109. package/build/components/start-template-options/index.js.map +1 -1
  110. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js +112 -49
  111. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  112. package/build/components/template-part-converter/convert-to-regular.js +1 -1
  113. package/build/components/template-part-converter/convert-to-regular.js.map +1 -1
  114. package/build/hooks/push-changes-to-global-styles/index.js +3 -1
  115. package/build/hooks/push-changes-to-global-styles/index.js.map +1 -1
  116. package/build/hooks/template-part-edit.js +6 -2
  117. package/build/hooks/template-part-edit.js.map +1 -1
  118. package/build/index.js +0 -3
  119. package/build/index.js.map +1 -1
  120. package/build/store/actions.js +35 -82
  121. package/build/store/actions.js.map +1 -1
  122. package/build/store/selectors.js +25 -63
  123. package/build/store/selectors.js.map +1 -1
  124. package/build/utils/constants.js +3 -3
  125. package/build/utils/constants.js.map +1 -1
  126. package/build-module/components/actions/index.js +85 -5
  127. package/build-module/components/actions/index.js.map +1 -1
  128. package/build-module/components/add-new-template/new-template.js +0 -7
  129. package/build-module/components/add-new-template/new-template.js.map +1 -1
  130. package/build-module/components/block-editor/use-site-editor-settings.js +54 -62
  131. package/build-module/components/block-editor/use-site-editor-settings.js.map +1 -1
  132. package/build-module/components/dataviews/add-filter.js +83 -0
  133. package/build-module/components/dataviews/add-filter.js.map +1 -0
  134. package/build-module/components/dataviews/dataviews.js +22 -4
  135. package/build-module/components/dataviews/dataviews.js.map +1 -1
  136. package/build-module/components/dataviews/filters.js +34 -32
  137. package/build-module/components/dataviews/filters.js.map +1 -1
  138. package/build-module/components/dataviews/in-filter.js +20 -19
  139. package/build-module/components/dataviews/in-filter.js.map +1 -1
  140. package/build-module/components/dataviews/index.js +1 -1
  141. package/build-module/components/dataviews/index.js.map +1 -1
  142. package/build-module/components/dataviews/item-actions.js +84 -16
  143. package/build-module/components/dataviews/item-actions.js.map +1 -1
  144. package/build-module/components/dataviews/pagination.js +3 -2
  145. package/build-module/components/dataviews/pagination.js.map +1 -1
  146. package/build-module/components/dataviews/reset-filters.js +26 -0
  147. package/build-module/components/dataviews/reset-filters.js.map +1 -0
  148. package/build-module/components/dataviews/search.js +1 -0
  149. package/build-module/components/dataviews/search.js.map +1 -1
  150. package/build-module/components/dataviews/view-actions.js +28 -11
  151. package/build-module/components/dataviews/view-actions.js.map +1 -1
  152. package/build-module/components/dataviews/view-list.js +128 -7
  153. package/build-module/components/dataviews/view-list.js.map +1 -1
  154. package/build-module/components/dataviews/view-side-by-side.js +12 -0
  155. package/build-module/components/dataviews/view-side-by-side.js.map +1 -0
  156. package/build-module/components/editor/index.js +57 -57
  157. package/build-module/components/editor/index.js.map +1 -1
  158. package/build-module/components/global-styles/screen-revisions/index.js +42 -21
  159. package/build-module/components/global-styles/screen-revisions/index.js.map +1 -1
  160. package/build-module/components/global-styles/screen-root.js +3 -3
  161. package/build-module/components/global-styles/screen-root.js.map +1 -1
  162. package/build-module/components/global-styles/ui.js +3 -3
  163. package/build-module/components/global-styles/ui.js.map +1 -1
  164. package/build-module/components/global-styles-renderer/index.js +1 -1
  165. package/build-module/components/global-styles-renderer/index.js.map +1 -1
  166. package/build-module/components/header-edit-mode/document-tools/index.js +152 -0
  167. package/build-module/components/header-edit-mode/document-tools/index.js.map +1 -0
  168. package/build-module/components/header-edit-mode/index.js +52 -120
  169. package/build-module/components/header-edit-mode/index.js.map +1 -1
  170. package/build-module/components/header-edit-mode/more-menu/site-export.js +2 -6
  171. package/build-module/components/header-edit-mode/more-menu/site-export.js.map +1 -1
  172. package/build-module/components/layout/index.js +5 -20
  173. package/build-module/components/layout/index.js.map +1 -1
  174. package/build-module/components/list/added-by.js +1 -1
  175. package/build-module/components/list/added-by.js.map +1 -1
  176. package/build-module/components/page-content-focus-manager/back-to-page-notification.js +5 -10
  177. package/build-module/components/page-content-focus-manager/back-to-page-notification.js.map +1 -1
  178. package/build-module/components/page-content-focus-manager/disable-non-page-content-blocks.js +36 -23
  179. package/build-module/components/page-content-focus-manager/disable-non-page-content-blocks.js.map +1 -1
  180. package/build-module/components/page-main/index.js +2 -1
  181. package/build-module/components/page-main/index.js.map +1 -1
  182. package/build-module/components/page-pages/index.js +137 -80
  183. package/build-module/components/page-pages/index.js.map +1 -1
  184. package/build-module/components/page-pages/side-editor.js +17 -0
  185. package/build-module/components/page-pages/side-editor.js.map +1 -0
  186. package/build-module/components/page-patterns/grid-item.js +2 -2
  187. package/build-module/components/page-patterns/grid-item.js.map +1 -1
  188. package/build-module/components/page-patterns/patterns-list.js +4 -4
  189. package/build-module/components/page-patterns/patterns-list.js.map +1 -1
  190. package/build-module/components/page-patterns/use-patterns.js +2 -2
  191. package/build-module/components/page-patterns/use-patterns.js.map +1 -1
  192. package/build-module/components/page-templates/dataviews-templates.js +193 -0
  193. package/build-module/components/page-templates/dataviews-templates.js.map +1 -0
  194. package/build-module/components/page-templates/template-actions.js +157 -0
  195. package/build-module/components/page-templates/template-actions.js.map +1 -0
  196. package/build-module/components/sidebar/index.js +1 -2
  197. package/build-module/components/sidebar/index.js.map +1 -1
  198. package/build-module/components/sidebar-dataviews/add-new-view.js +116 -0
  199. package/build-module/components/sidebar-dataviews/add-new-view.js.map +1 -0
  200. package/build-module/components/sidebar-dataviews/custom-dataviews-list.js +180 -0
  201. package/build-module/components/sidebar-dataviews/custom-dataviews-list.js.map +1 -0
  202. package/build-module/components/sidebar-dataviews/dataview-item.js +63 -0
  203. package/build-module/components/sidebar-dataviews/dataview-item.js.map +1 -0
  204. package/build-module/components/sidebar-dataviews/default-views.js +52 -0
  205. package/build-module/components/sidebar-dataviews/default-views.js.map +1 -0
  206. package/build-module/components/sidebar-dataviews/index.js +22 -39
  207. package/build-module/components/sidebar-dataviews/index.js.map +1 -1
  208. package/build-module/components/sidebar-edit-mode/default-sidebar.js +2 -6
  209. package/build-module/components/sidebar-edit-mode/default-sidebar.js.map +1 -1
  210. package/build-module/components/sidebar-edit-mode/page-panels/edit-template.js +12 -12
  211. package/build-module/components/sidebar-edit-mode/page-panels/edit-template.js.map +1 -1
  212. package/build-module/components/sidebar-edit-mode/page-panels/page-summary.js +3 -1
  213. package/build-module/components/sidebar-edit-mode/page-panels/page-summary.js.map +1 -1
  214. package/build-module/components/sidebar-edit-mode/page-panels/reset-default-template.js +5 -13
  215. package/build-module/components/sidebar-edit-mode/page-panels/reset-default-template.js.map +1 -1
  216. package/build-module/components/sidebar-edit-mode/page-panels/swap-template-button.js +5 -13
  217. package/build-module/components/sidebar-edit-mode/page-panels/swap-template-button.js.map +1 -1
  218. package/build-module/components/sidebar-edit-mode/plugin-sidebar/index.js +2 -6
  219. package/build-module/components/sidebar-edit-mode/plugin-sidebar/index.js.map +1 -1
  220. package/build-module/components/sidebar-edit-mode/template-panel/hooks.js +4 -4
  221. package/build-module/components/sidebar-edit-mode/template-panel/hooks.js.map +1 -1
  222. package/build-module/components/sidebar-navigation-screen-global-styles/index.js +1 -1
  223. package/build-module/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  224. package/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js +1 -1
  225. package/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +1 -1
  226. package/build-module/components/sidebar-navigation-screen-page/page-details.js +3 -11
  227. package/build-module/components/sidebar-navigation-screen-page/page-details.js.map +1 -1
  228. package/build-module/components/sidebar-navigation-screen-patterns/use-theme-patterns.js +2 -2
  229. package/build-module/components/sidebar-navigation-screen-patterns/use-theme-patterns.js.map +1 -1
  230. package/build-module/components/site-hub/index.js +19 -7
  231. package/build-module/components/site-hub/index.js.map +1 -1
  232. package/build-module/components/start-template-options/index.js +13 -16
  233. package/build-module/components/start-template-options/index.js.map +1 -1
  234. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js +112 -50
  235. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  236. package/build-module/components/template-part-converter/convert-to-regular.js +1 -1
  237. package/build-module/components/template-part-converter/convert-to-regular.js.map +1 -1
  238. package/build-module/hooks/push-changes-to-global-styles/index.js +4 -2
  239. package/build-module/hooks/push-changes-to-global-styles/index.js.map +1 -1
  240. package/build-module/hooks/template-part-edit.js +6 -2
  241. package/build-module/hooks/template-part-edit.js.map +1 -1
  242. package/build-module/index.js +0 -3
  243. package/build-module/index.js.map +1 -1
  244. package/build-module/store/actions.js +33 -79
  245. package/build-module/store/actions.js.map +1 -1
  246. package/build-module/store/selectors.js +19 -58
  247. package/build-module/store/selectors.js.map +1 -1
  248. package/build-module/utils/constants.js +1 -1
  249. package/build-module/utils/constants.js.map +1 -1
  250. package/build-style/style-rtl.css +69 -119
  251. package/build-style/style.css +69 -119
  252. package/package.json +41 -41
  253. package/src/components/actions/index.js +113 -5
  254. package/src/components/add-new-template/new-template.js +0 -5
  255. package/src/components/block-editor/style.scss +0 -87
  256. package/src/components/block-editor/use-site-editor-settings.js +68 -89
  257. package/src/components/dataviews/README.md +77 -83
  258. package/src/components/dataviews/add-filter.js +111 -0
  259. package/src/components/dataviews/dataviews.js +20 -2
  260. package/src/components/dataviews/filters.js +56 -49
  261. package/src/components/dataviews/in-filter.js +35 -17
  262. package/src/components/dataviews/index.js +1 -1
  263. package/src/components/dataviews/item-actions.js +95 -20
  264. package/src/components/dataviews/pagination.js +5 -4
  265. package/src/components/dataviews/reset-filters.js +26 -0
  266. package/src/components/dataviews/search.js +1 -0
  267. package/src/components/dataviews/style.scss +5 -1
  268. package/src/components/dataviews/view-actions.js +39 -9
  269. package/src/components/dataviews/view-list.js +174 -3
  270. package/src/components/dataviews/view-side-by-side.js +9 -0
  271. package/src/components/editor/index.js +149 -121
  272. package/src/components/global-styles/screen-revisions/index.js +52 -25
  273. package/src/components/global-styles/screen-root.js +2 -1
  274. package/src/components/global-styles/ui.js +1 -1
  275. package/src/components/global-styles-renderer/index.js +1 -1
  276. package/src/components/header-edit-mode/document-tools/index.js +201 -0
  277. package/src/components/header-edit-mode/index.js +86 -184
  278. package/src/components/header-edit-mode/more-menu/site-export.js +2 -6
  279. package/src/components/header-edit-mode/style.scss +35 -2
  280. package/src/components/layout/index.js +4 -11
  281. package/src/components/layout/style.scss +6 -18
  282. package/src/components/list/added-by.js +1 -1
  283. package/src/components/page-content-focus-manager/back-to-page-notification.js +4 -15
  284. package/src/components/page-content-focus-manager/disable-non-page-content-blocks.js +38 -33
  285. package/src/components/page-main/index.js +6 -1
  286. package/src/components/page-pages/index.js +162 -81
  287. package/src/components/page-pages/side-editor.js +14 -0
  288. package/src/components/page-patterns/grid-item.js +3 -3
  289. package/src/components/page-patterns/patterns-list.js +10 -4
  290. package/src/components/page-patterns/use-patterns.js +3 -2
  291. package/src/components/page-templates/dataviews-templates.js +224 -0
  292. package/src/components/page-templates/template-actions.js +209 -0
  293. package/src/components/sidebar/index.js +1 -2
  294. package/src/components/sidebar-dataviews/add-new-view.js +141 -0
  295. package/src/components/sidebar-dataviews/custom-dataviews-list.js +227 -0
  296. package/src/components/sidebar-dataviews/dataview-item.js +67 -0
  297. package/src/components/sidebar-dataviews/default-views.js +54 -0
  298. package/src/components/sidebar-dataviews/index.js +36 -45
  299. package/src/components/sidebar-dataviews/style.scss +22 -0
  300. package/src/components/sidebar-edit-mode/default-sidebar.js +6 -6
  301. package/src/components/sidebar-edit-mode/page-panels/edit-template.js +14 -21
  302. package/src/components/sidebar-edit-mode/page-panels/page-summary.js +3 -0
  303. package/src/components/sidebar-edit-mode/page-panels/reset-default-template.js +10 -9
  304. package/src/components/sidebar-edit-mode/page-panels/style.scss +5 -0
  305. package/src/components/sidebar-edit-mode/page-panels/swap-template-button.js +10 -9
  306. package/src/components/sidebar-edit-mode/plugin-sidebar/index.js +6 -6
  307. package/src/components/sidebar-edit-mode/template-panel/hooks.js +11 -7
  308. package/src/components/sidebar-navigation-screen-global-styles/index.js +1 -1
  309. package/src/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js +1 -1
  310. package/src/components/sidebar-navigation-screen-page/page-details.js +4 -17
  311. package/src/components/sidebar-navigation-screen-patterns/use-theme-patterns.js +2 -2
  312. package/src/components/site-hub/index.js +9 -8
  313. package/src/components/start-template-options/index.js +14 -12
  314. package/src/components/sync-state-with-url/use-init-edited-entity-from-url.js +117 -50
  315. package/src/components/template-part-converter/convert-to-regular.js +1 -1
  316. package/src/hooks/push-changes-to-global-styles/index.js +13 -6
  317. package/src/hooks/template-part-edit.js +4 -2
  318. package/src/index.js +0 -8
  319. package/src/store/actions.js +37 -95
  320. package/src/store/selectors.js +31 -91
  321. package/src/store/test/actions.js +11 -137
  322. package/src/store/test/selectors.js +0 -82
  323. package/src/style.scss +1 -0
  324. package/src/utils/constants.js +1 -1
  325. package/build/components/block-editor/block-editor-provider/default-block-editor-provider.js +0 -77
  326. package/build/components/block-editor/block-editor-provider/default-block-editor-provider.js.map +0 -1
  327. package/build/components/block-editor/block-editor-provider/index.js +0 -31
  328. package/build/components/block-editor/block-editor-provider/index.js.map +0 -1
  329. package/build/components/block-editor/block-editor-provider/navigation-block-editor-provider.js +0 -110
  330. package/build/components/block-editor/block-editor-provider/navigation-block-editor-provider.js.map +0 -1
  331. package/build/components/block-editor/block-editor-provider/use-page-content-blocks.js +0 -84
  332. package/build/components/block-editor/block-editor-provider/use-page-content-blocks.js.map +0 -1
  333. package/build/components/block-editor/index.js +0 -30
  334. package/build/components/block-editor/index.js.map +0 -1
  335. package/build/components/page-pages/default-views.js +0 -62
  336. package/build/components/page-pages/default-views.js.map +0 -1
  337. package/build-module/components/block-editor/block-editor-provider/default-block-editor-provider.js +0 -69
  338. package/build-module/components/block-editor/block-editor-provider/default-block-editor-provider.js.map +0 -1
  339. package/build-module/components/block-editor/block-editor-provider/index.js +0 -23
  340. package/build-module/components/block-editor/block-editor-provider/index.js.map +0 -1
  341. package/build-module/components/block-editor/block-editor-provider/navigation-block-editor-provider.js +0 -102
  342. package/build-module/components/block-editor/block-editor-provider/navigation-block-editor-provider.js.map +0 -1
  343. package/build-module/components/block-editor/block-editor-provider/use-page-content-blocks.js +0 -78
  344. package/build-module/components/block-editor/block-editor-provider/use-page-content-blocks.js.map +0 -1
  345. package/build-module/components/block-editor/index.js +0 -22
  346. package/build-module/components/block-editor/index.js.map +0 -1
  347. package/build-module/components/page-pages/default-views.js +0 -55
  348. package/build-module/components/page-pages/default-views.js.map +0 -1
  349. package/src/components/block-editor/block-editor-provider/default-block-editor-provider.js +0 -75
  350. package/src/components/block-editor/block-editor-provider/index.js +0 -29
  351. package/src/components/block-editor/block-editor-provider/navigation-block-editor-provider.js +0 -114
  352. package/src/components/block-editor/block-editor-provider/test/use-page-content-blocks.js +0 -116
  353. package/src/components/block-editor/block-editor-provider/use-page-content-blocks.js +0 -90
  354. package/src/components/block-editor/index.js +0 -28
  355. package/src/components/page-pages/default-views.js +0 -60
@@ -1 +1 @@
1
- {"version":3,"names":["_classnames","_interopRequireDefault","require","_components","_blocks","_data","_blockEditor","_i18n","_preferences","_icons","_coreData","_element","_screenRoot","_screenBlockList","_interopRequireWildcard","_screenBlock","_screenTypography","_screenTypographyElement","_screenColors","_screenColorPalette","_screenLayout","_screenStyleVariations","_styleBook","_screenCss","_screenRevisions","_lockUnlock","_store","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","SLOT_FILL_NAME","Slot","GlobalStylesMenuSlot","Fill","GlobalStylesMenuFill","createSlotFill","exports","GlobalStylesActionMenu","toggle","useDispatch","preferencesStore","canEditCSS","useSelect","select","getEntityRecord","__experimentalGetCurrentGlobalStylesId","coreStore","globalStylesId","globalStyles","undefined","_links","goTo","useNavigator","loadCustomCSS","_react","createElement","DropdownMenu","icon","moreVertical","label","__","onClose","MenuGroup","MenuItem","onClick","RevisionsCountBadge","className","children","classnames","GlobalStylesRevisionsMenu","setIsListViewOpened","editSiteStore","revisionsCount","_globalStyles$_links$","count","useGlobalStylesReset","unlock","blockEditorPrivateApis","canReset","onReset","setEditorCanvasContainerView","loadRevisions","hasRevisions","backup","disabled","Button","__experimentalIsFocusable","GlobalStylesNavigationScreen","props","__experimentalNavigatorScreen","filter","Boolean","join","BlockStylesNavigationScreens","parentMenu","blockStyles","blockName","map","style","index","path","name","variation","ContextScreens","blockStyleVariations","getBlockStyles","blocksStore","Fragment","length","GlobalStylesStyleBook","navigator","location","isSelected","encodeURIComponent","startsWith","onSelect","GlobalStylesBlockLink","selectedBlockName","selectedBlockClientId","getSelectedBlockClientId","getBlockName","blockEditorStore","clientId","blockHasGlobalStyles","useBlockHasGlobalStyles","useEffect","currentPath","newPath","skipFocus","GlobalStylesEditorCanvasContainerLink","editorCanvasContainerView","getEditorCanvasContainerView","GlobalStylesUI","blocks","getBlockTypes","__experimentalNavigatorProvider","initialPath","element","block","_default"],"sources":["@wordpress/edit-site/src/components/global-styles/ui.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalNavigatorProvider as NavigatorProvider,\n\t__experimentalNavigatorScreen as NavigatorScreen,\n\t__experimentalUseNavigator as useNavigator,\n\tcreateSlotFill,\n\tButton,\n\tDropdownMenu,\n\tMenuGroup,\n\tMenuItem,\n} from '@wordpress/components';\nimport { getBlockTypes, store as blocksStore } from '@wordpress/blocks';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { __ } from '@wordpress/i18n';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { backup, moreVertical } from '@wordpress/icons';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useEffect } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport ScreenRoot from './screen-root';\nimport {\n\tuseBlockHasGlobalStyles,\n\tdefault as ScreenBlockList,\n} from './screen-block-list';\nimport ScreenBlock from './screen-block';\nimport ScreenTypography from './screen-typography';\nimport ScreenTypographyElement from './screen-typography-element';\nimport ScreenColors from './screen-colors';\nimport ScreenColorPalette from './screen-color-palette';\nimport ScreenLayout from './screen-layout';\nimport ScreenStyleVariations from './screen-style-variations';\nimport StyleBook from '../style-book';\nimport ScreenCSS from './screen-css';\nimport ScreenRevisions from './screen-revisions';\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\n\nconst SLOT_FILL_NAME = 'GlobalStylesMenu';\nconst { Slot: GlobalStylesMenuSlot, Fill: GlobalStylesMenuFill } =\n\tcreateSlotFill( SLOT_FILL_NAME );\n\nfunction GlobalStylesActionMenu() {\n\tconst { toggle } = useDispatch( preferencesStore );\n\tconst { canEditCSS } = useSelect( ( select ) => {\n\t\tconst { getEntityRecord, __experimentalGetCurrentGlobalStylesId } =\n\t\t\tselect( coreStore );\n\n\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\tconst globalStyles = globalStylesId\n\t\t\t? getEntityRecord( 'root', 'globalStyles', globalStylesId )\n\t\t\t: undefined;\n\n\t\treturn {\n\t\t\tcanEditCSS: !! globalStyles?._links?.[ 'wp:action-edit-css' ],\n\t\t};\n\t}, [] );\n\tconst { goTo } = useNavigator();\n\tconst loadCustomCSS = () => goTo( '/css' );\n\n\treturn (\n\t\t<GlobalStylesMenuFill>\n\t\t\t<DropdownMenu icon={ moreVertical } label={ __( 'More' ) }>\n\t\t\t\t{ ( { onClose } ) => (\n\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t{ canEditCSS && (\n\t\t\t\t\t\t\t<MenuItem onClick={ loadCustomCSS }>\n\t\t\t\t\t\t\t\t{ __( 'Additional CSS' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\ttoggle(\n\t\t\t\t\t\t\t\t\t'core/edit-site',\n\t\t\t\t\t\t\t\t\t'welcomeGuideStyles'\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Welcome Guide' ) }\n\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t</MenuGroup>\n\t\t\t\t) }\n\t\t\t</DropdownMenu>\n\t\t</GlobalStylesMenuFill>\n\t);\n}\n\nfunction RevisionsCountBadge( { className, children } ) {\n\treturn (\n\t\t<span\n\t\t\tclassName={ classnames(\n\t\t\t\tclassName,\n\t\t\t\t'edit-site-global-styles-sidebar__revisions-count-badge'\n\t\t\t) }\n\t\t>\n\t\t\t{ children }\n\t\t</span>\n\t);\n}\nfunction GlobalStylesRevisionsMenu() {\n\tconst { setIsListViewOpened } = useDispatch( editSiteStore );\n\tconst { revisionsCount } = useSelect( ( select ) => {\n\t\tconst { getEntityRecord, __experimentalGetCurrentGlobalStylesId } =\n\t\t\tselect( coreStore );\n\n\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\tconst globalStyles = globalStylesId\n\t\t\t? getEntityRecord( 'root', 'globalStyles', globalStylesId )\n\t\t\t: undefined;\n\n\t\treturn {\n\t\t\trevisionsCount:\n\t\t\t\tglobalStyles?._links?.[ 'version-history' ]?.[ 0 ]?.count ?? 0,\n\t\t};\n\t}, [] );\n\tconst { useGlobalStylesReset } = unlock( blockEditorPrivateApis );\n\tconst [ canReset, onReset ] = useGlobalStylesReset();\n\tconst { goTo } = useNavigator();\n\tconst { setEditorCanvasContainerView } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\tconst loadRevisions = () => {\n\t\tsetIsListViewOpened( false );\n\t\tgoTo( '/revisions' );\n\t\tsetEditorCanvasContainerView( 'global-styles-revisions' );\n\t};\n\tconst hasRevisions = revisionsCount > 0;\n\n\treturn (\n\t\t<GlobalStylesMenuFill>\n\t\t\t{ canReset || hasRevisions ? (\n\t\t\t\t<DropdownMenu icon={ backup } label={ __( 'Revisions' ) }>\n\t\t\t\t\t{ ( { onClose } ) => (\n\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t{ hasRevisions && (\n\t\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\t\tonClick={ loadRevisions }\n\t\t\t\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t\t\t\t<RevisionsCountBadge>\n\t\t\t\t\t\t\t\t\t\t\t{ revisionsCount }\n\t\t\t\t\t\t\t\t\t\t</RevisionsCountBadge>\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ __( 'Revision history' ) }\n\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\tonReset();\n\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\tdisabled={ ! canReset }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Reset to defaults' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t) }\n\t\t\t\t</DropdownMenu>\n\t\t\t) : (\n\t\t\t\t<Button\n\t\t\t\t\tlabel={ __( 'Revisions' ) }\n\t\t\t\t\ticon={ backup }\n\t\t\t\t\tdisabled\n\t\t\t\t\t__experimentalIsFocusable\n\t\t\t\t/>\n\t\t\t) }\n\t\t</GlobalStylesMenuFill>\n\t);\n}\n\nfunction GlobalStylesNavigationScreen( { className, ...props } ) {\n\treturn (\n\t\t<NavigatorScreen\n\t\t\tclassName={ [\n\t\t\t\t'edit-site-global-styles-sidebar__navigator-screen',\n\t\t\t\tclassName,\n\t\t\t]\n\t\t\t\t.filter( Boolean )\n\t\t\t\t.join( ' ' ) }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n\nfunction BlockStylesNavigationScreens( {\n\tparentMenu,\n\tblockStyles,\n\tblockName,\n} ) {\n\treturn blockStyles.map( ( style, index ) => (\n\t\t<GlobalStylesNavigationScreen\n\t\t\tkey={ index }\n\t\t\tpath={ parentMenu + '/variations/' + style.name }\n\t\t>\n\t\t\t<ScreenBlock name={ blockName } variation={ style.name } />\n\t\t</GlobalStylesNavigationScreen>\n\t) );\n}\n\nfunction ContextScreens( { name, parentMenu = '' } ) {\n\tconst blockStyleVariations = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockStyles } = select( blocksStore );\n\t\t\treturn getBlockStyles( name );\n\t\t},\n\t\t[ name ]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<GlobalStylesNavigationScreen\n\t\t\t\tpath={ parentMenu + '/colors/palette' }\n\t\t\t>\n\t\t\t\t<ScreenColorPalette name={ name } />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t{ !! blockStyleVariations?.length && (\n\t\t\t\t<BlockStylesNavigationScreens\n\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\tblockStyles={ blockStyleVariations }\n\t\t\t\t\tblockName={ name }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nfunction GlobalStylesStyleBook() {\n\tconst navigator = useNavigator();\n\tconst { path } = navigator.location;\n\treturn (\n\t\t<StyleBook\n\t\t\tisSelected={ ( blockName ) =>\n\t\t\t\t// Match '/blocks/core%2Fbutton' and\n\t\t\t\t// '/blocks/core%2Fbutton/typography', but not\n\t\t\t\t// '/blocks/core%2Fbuttons'.\n\t\t\t\tpath === `/blocks/${ encodeURIComponent( blockName ) }` ||\n\t\t\t\tpath.startsWith(\n\t\t\t\t\t`/blocks/${ encodeURIComponent( blockName ) }/`\n\t\t\t\t)\n\t\t\t}\n\t\t\tonSelect={ ( blockName ) => {\n\t\t\t\t// Now go to the selected block.\n\t\t\t\tnavigator.goTo( '/blocks/' + encodeURIComponent( blockName ) );\n\t\t\t} }\n\t\t/>\n\t);\n}\n\nfunction GlobalStylesBlockLink() {\n\tconst navigator = useNavigator();\n\tconst { selectedBlockName, selectedBlockClientId } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getSelectedBlockClientId, getBlockName } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst clientId = getSelectedBlockClientId();\n\t\t\treturn {\n\t\t\t\tselectedBlockName: getBlockName( clientId ),\n\t\t\t\tselectedBlockClientId: clientId,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\tconst blockHasGlobalStyles = useBlockHasGlobalStyles( selectedBlockName );\n\t// When we're in the `Blocks` screen enable deep linking to the selected block.\n\tuseEffect( () => {\n\t\tif ( ! selectedBlockClientId || ! blockHasGlobalStyles ) {\n\t\t\treturn;\n\t\t}\n\t\tconst currentPath = navigator.location.path;\n\t\tif (\n\t\t\tcurrentPath !== '/blocks' &&\n\t\t\t! currentPath.startsWith( '/blocks/' )\n\t\t) {\n\t\t\treturn;\n\t\t}\n\t\tconst newPath = '/blocks/' + encodeURIComponent( selectedBlockName );\n\t\t// Avoid navigating to the same path. This can happen when selecting\n\t\t// a new block of the same type.\n\t\tif ( newPath !== currentPath ) {\n\t\t\tnavigator.goTo( newPath, { skipFocus: true } );\n\t\t}\n\t}, [ selectedBlockClientId, selectedBlockName, blockHasGlobalStyles ] );\n}\n\nfunction GlobalStylesEditorCanvasContainerLink() {\n\tconst { goTo, location } = useNavigator();\n\tconst editorCanvasContainerView = useSelect(\n\t\t( select ) =>\n\t\t\tunlock( select( editSiteStore ) ).getEditorCanvasContainerView(),\n\t\t[]\n\t);\n\n\t// If the user switches the editor canvas container view, redirect\n\t// to the appropriate screen. This effectively allows deep linking to the\n\t// desired screens from outside the global styles navigation provider.\n\tuseEffect( () => {\n\t\tif ( editorCanvasContainerView === 'global-styles-revisions' ) {\n\t\t\t// Switching to the revisions container view should\n\t\t\t// redirect to the revisions screen.\n\t\t\tgoTo( '/revisions' );\n\t\t} else if (\n\t\t\t!! editorCanvasContainerView &&\n\t\t\tlocation?.path === '/revisions'\n\t\t) {\n\t\t\t// Switching to any container other than revisions should\n\t\t\t// redirect from the revisions screen to the root global styles screen.\n\t\t\tgoTo( '/' );\n\t\t} else if ( editorCanvasContainerView === 'global-styles-css' ) {\n\t\t\tgoTo( '/css' );\n\t\t}\n\n\t\t// location?.path is not a dependency because we don't want to track it.\n\t\t// Doing so will cause an infinite loop. We could abstract logic to avoid\n\t\t// having to disable the check later.\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [ editorCanvasContainerView, goTo ] );\n}\n\nfunction GlobalStylesUI() {\n\tconst blocks = getBlockTypes();\n\tconst editorCanvasContainerView = useSelect(\n\t\t( select ) =>\n\t\t\tunlock( select( editSiteStore ) ).getEditorCanvasContainerView(),\n\t\t[]\n\t);\n\treturn (\n\t\t<NavigatorProvider\n\t\t\tclassName=\"edit-site-global-styles-sidebar__navigator-provider\"\n\t\t\tinitialPath=\"/\"\n\t\t>\n\t\t\t<GlobalStylesNavigationScreen path=\"/\">\n\t\t\t\t<ScreenRoot />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/variations\">\n\t\t\t\t<ScreenStyleVariations />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/blocks\">\n\t\t\t\t<ScreenBlockList />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography\">\n\t\t\t\t<ScreenTypography />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/text\">\n\t\t\t\t<ScreenTypographyElement element=\"text\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/link\">\n\t\t\t\t<ScreenTypographyElement element=\"link\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/heading\">\n\t\t\t\t<ScreenTypographyElement element=\"heading\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/caption\">\n\t\t\t\t<ScreenTypographyElement element=\"caption\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/button\">\n\t\t\t\t<ScreenTypographyElement element=\"button\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/colors\">\n\t\t\t\t<ScreenColors />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/layout\">\n\t\t\t\t<ScreenLayout />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/css\">\n\t\t\t\t<ScreenCSS />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path={ '/revisions' }>\n\t\t\t\t<ScreenRevisions />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t{ blocks.map( ( block ) => (\n\t\t\t\t<GlobalStylesNavigationScreen\n\t\t\t\t\tkey={ 'menu-block-' + block.name }\n\t\t\t\t\tpath={ '/blocks/' + encodeURIComponent( block.name ) }\n\t\t\t\t>\n\t\t\t\t\t<ScreenBlock name={ block.name } />\n\t\t\t\t</GlobalStylesNavigationScreen>\n\t\t\t) ) }\n\n\t\t\t<ContextScreens />\n\n\t\t\t{ blocks.map( ( block ) => (\n\t\t\t\t<ContextScreens\n\t\t\t\t\tkey={ 'screens-block-' + block.name }\n\t\t\t\t\tname={ block.name }\n\t\t\t\t\tparentMenu={ '/blocks/' + encodeURIComponent( block.name ) }\n\t\t\t\t/>\n\t\t\t) ) }\n\n\t\t\t{ 'style-book' === editorCanvasContainerView && (\n\t\t\t\t<GlobalStylesStyleBook />\n\t\t\t) }\n\n\t\t\t<GlobalStylesRevisionsMenu />\n\t\t\t<GlobalStylesActionMenu />\n\t\t\t<GlobalStylesBlockLink />\n\t\t\t<GlobalStylesEditorCanvasContainerLink />\n\t\t</NavigatorProvider>\n\t);\n}\nexport { GlobalStylesMenuSlot };\nexport default GlobalStylesUI;\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AAUA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AAIA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,SAAA,GAAAR,OAAA;AACA,IAAAS,QAAA,GAAAT,OAAA;AAKA,IAAAU,WAAA,GAAAX,sBAAA,CAAAC,OAAA;AACA,IAAAW,gBAAA,GAAAC,uBAAA,CAAAZ,OAAA;AAIA,IAAAa,YAAA,GAAAd,sBAAA,CAAAC,OAAA;AACA,IAAAc,iBAAA,GAAAf,sBAAA,CAAAC,OAAA;AACA,IAAAe,wBAAA,GAAAhB,sBAAA,CAAAC,OAAA;AACA,IAAAgB,aAAA,GAAAjB,sBAAA,CAAAC,OAAA;AACA,IAAAiB,mBAAA,GAAAlB,sBAAA,CAAAC,OAAA;AACA,IAAAkB,aAAA,GAAAnB,sBAAA,CAAAC,OAAA;AACA,IAAAmB,sBAAA,GAAApB,sBAAA,CAAAC,OAAA;AACA,IAAAoB,UAAA,GAAArB,sBAAA,CAAAC,OAAA;AACA,IAAA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MAAA,CAAAC,aAAA,EAAClB,sBAAsB,MAAE,CAAC,EAC1B,IAAAiB,MAAA,CAAAC,aAAA,EAAC6D,qBAAqB,MAAE,CAAC,EACzB,IAAA9D,MAAA,CAAAC,aAAA,EAAC0E,qCAAqC,MAAE,CACtB,CAAC;AAEtB;AAAC,IAAAU,QAAA,GAEcP,cAAc;AAAAhG,OAAA,CAAArB,OAAA,GAAA4H,QAAA"}
1
+ {"version":3,"names":["_classnames","_interopRequireDefault","require","_components","_blocks","_data","_blockEditor","_i18n","_preferences","_icons","_coreData","_element","_screenRoot","_screenBlockList","_interopRequireWildcard","_screenBlock","_screenTypography","_screenTypographyElement","_screenColors","_screenColorPalette","_screenLayout","_screenStyleVariations","_styleBook","_screenCss","_screenRevisions","_lockUnlock","_store","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","SLOT_FILL_NAME","useGlobalStylesReset","unlock","blockEditorPrivateApis","Slot","GlobalStylesMenuSlot","Fill","GlobalStylesMenuFill","createSlotFill","exports","GlobalStylesActionMenu","toggle","useDispatch","preferencesStore","canEditCSS","useSelect","select","getEntityRecord","__experimentalGetCurrentGlobalStylesId","coreStore","globalStylesId","globalStyles","undefined","_links","goTo","useNavigator","loadCustomCSS","_react","createElement","DropdownMenu","icon","moreVertical","label","__","onClose","MenuGroup","MenuItem","onClick","RevisionsCountBadge","className","children","classnames","GlobalStylesRevisionsMenu","setIsListViewOpened","editSiteStore","revisionsCount","_globalStyles$_links$","count","canReset","onReset","setEditorCanvasContainerView","loadRevisions","hasRevisions","backup","disabled","Button","__experimentalIsFocusable","GlobalStylesNavigationScreen","props","__experimentalNavigatorScreen","filter","Boolean","join","BlockStylesNavigationScreens","parentMenu","blockStyles","blockName","map","style","index","path","name","variation","ContextScreens","blockStyleVariations","getBlockStyles","blocksStore","Fragment","length","GlobalStylesStyleBook","navigator","location","isSelected","encodeURIComponent","startsWith","onSelect","GlobalStylesBlockLink","selectedBlockName","selectedBlockClientId","getSelectedBlockClientId","getBlockName","blockEditorStore","clientId","blockHasGlobalStyles","useBlockHasGlobalStyles","useEffect","currentPath","newPath","skipFocus","GlobalStylesEditorCanvasContainerLink","editorCanvasContainerView","getEditorCanvasContainerView","GlobalStylesUI","blocks","getBlockTypes","__experimentalNavigatorProvider","initialPath","element","block","_default"],"sources":["@wordpress/edit-site/src/components/global-styles/ui.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalNavigatorProvider as NavigatorProvider,\n\t__experimentalNavigatorScreen as NavigatorScreen,\n\t__experimentalUseNavigator as useNavigator,\n\tcreateSlotFill,\n\tButton,\n\tDropdownMenu,\n\tMenuGroup,\n\tMenuItem,\n} from '@wordpress/components';\nimport { getBlockTypes, store as blocksStore } from '@wordpress/blocks';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { __ } from '@wordpress/i18n';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { backup, moreVertical } from '@wordpress/icons';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useEffect } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport ScreenRoot from './screen-root';\nimport {\n\tuseBlockHasGlobalStyles,\n\tdefault as ScreenBlockList,\n} from './screen-block-list';\nimport ScreenBlock from './screen-block';\nimport ScreenTypography from './screen-typography';\nimport ScreenTypographyElement from './screen-typography-element';\nimport ScreenColors from './screen-colors';\nimport ScreenColorPalette from './screen-color-palette';\nimport ScreenLayout from './screen-layout';\nimport ScreenStyleVariations from './screen-style-variations';\nimport StyleBook from '../style-book';\nimport ScreenCSS from './screen-css';\nimport ScreenRevisions from './screen-revisions';\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\n\nconst SLOT_FILL_NAME = 'GlobalStylesMenu';\nconst { useGlobalStylesReset } = unlock( blockEditorPrivateApis );\nconst { Slot: GlobalStylesMenuSlot, Fill: GlobalStylesMenuFill } =\n\tcreateSlotFill( SLOT_FILL_NAME );\n\nfunction GlobalStylesActionMenu() {\n\tconst { toggle } = useDispatch( preferencesStore );\n\tconst { canEditCSS } = useSelect( ( select ) => {\n\t\tconst { getEntityRecord, __experimentalGetCurrentGlobalStylesId } =\n\t\t\tselect( coreStore );\n\n\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\tconst globalStyles = globalStylesId\n\t\t\t? getEntityRecord( 'root', 'globalStyles', globalStylesId )\n\t\t\t: undefined;\n\n\t\treturn {\n\t\t\tcanEditCSS: !! globalStyles?._links?.[ 'wp:action-edit-css' ],\n\t\t};\n\t}, [] );\n\tconst { goTo } = useNavigator();\n\tconst loadCustomCSS = () => goTo( '/css' );\n\n\treturn (\n\t\t<GlobalStylesMenuFill>\n\t\t\t<DropdownMenu icon={ moreVertical } label={ __( 'More' ) }>\n\t\t\t\t{ ( { onClose } ) => (\n\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t{ canEditCSS && (\n\t\t\t\t\t\t\t<MenuItem onClick={ loadCustomCSS }>\n\t\t\t\t\t\t\t\t{ __( 'Additional CSS' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\ttoggle(\n\t\t\t\t\t\t\t\t\t'core/edit-site',\n\t\t\t\t\t\t\t\t\t'welcomeGuideStyles'\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Welcome Guide' ) }\n\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t</MenuGroup>\n\t\t\t\t) }\n\t\t\t</DropdownMenu>\n\t\t</GlobalStylesMenuFill>\n\t);\n}\n\nfunction RevisionsCountBadge( { className, children } ) {\n\treturn (\n\t\t<span\n\t\t\tclassName={ classnames(\n\t\t\t\tclassName,\n\t\t\t\t'edit-site-global-styles-sidebar__revisions-count-badge'\n\t\t\t) }\n\t\t>\n\t\t\t{ children }\n\t\t</span>\n\t);\n}\nfunction GlobalStylesRevisionsMenu() {\n\tconst { setIsListViewOpened } = useDispatch( editSiteStore );\n\tconst { revisionsCount } = useSelect( ( select ) => {\n\t\tconst { getEntityRecord, __experimentalGetCurrentGlobalStylesId } =\n\t\t\tselect( coreStore );\n\n\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\tconst globalStyles = globalStylesId\n\t\t\t? getEntityRecord( 'root', 'globalStyles', globalStylesId )\n\t\t\t: undefined;\n\n\t\treturn {\n\t\t\trevisionsCount:\n\t\t\t\tglobalStyles?._links?.[ 'version-history' ]?.[ 0 ]?.count ?? 0,\n\t\t};\n\t}, [] );\n\tconst [ canReset, onReset ] = useGlobalStylesReset();\n\tconst { goTo } = useNavigator();\n\tconst { setEditorCanvasContainerView } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\tconst loadRevisions = () => {\n\t\tsetIsListViewOpened( false );\n\t\tgoTo( '/revisions' );\n\t\tsetEditorCanvasContainerView( 'global-styles-revisions' );\n\t};\n\tconst hasRevisions = revisionsCount > 0;\n\n\treturn (\n\t\t<GlobalStylesMenuFill>\n\t\t\t{ canReset || hasRevisions ? (\n\t\t\t\t<DropdownMenu icon={ backup } label={ __( 'Revisions' ) }>\n\t\t\t\t\t{ ( { onClose } ) => (\n\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t{ hasRevisions && (\n\t\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\t\tonClick={ loadRevisions }\n\t\t\t\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t\t\t\t<RevisionsCountBadge>\n\t\t\t\t\t\t\t\t\t\t\t{ revisionsCount }\n\t\t\t\t\t\t\t\t\t\t</RevisionsCountBadge>\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ __( 'Revision history' ) }\n\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\tonReset();\n\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\tdisabled={ ! canReset }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Reset to defaults' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t) }\n\t\t\t\t</DropdownMenu>\n\t\t\t) : (\n\t\t\t\t<Button\n\t\t\t\t\tlabel={ __( 'Revisions' ) }\n\t\t\t\t\ticon={ backup }\n\t\t\t\t\tdisabled\n\t\t\t\t\t__experimentalIsFocusable\n\t\t\t\t/>\n\t\t\t) }\n\t\t</GlobalStylesMenuFill>\n\t);\n}\n\nfunction GlobalStylesNavigationScreen( { className, ...props } ) {\n\treturn (\n\t\t<NavigatorScreen\n\t\t\tclassName={ [\n\t\t\t\t'edit-site-global-styles-sidebar__navigator-screen',\n\t\t\t\tclassName,\n\t\t\t]\n\t\t\t\t.filter( Boolean )\n\t\t\t\t.join( ' ' ) }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n\nfunction BlockStylesNavigationScreens( {\n\tparentMenu,\n\tblockStyles,\n\tblockName,\n} ) {\n\treturn blockStyles.map( ( style, index ) => (\n\t\t<GlobalStylesNavigationScreen\n\t\t\tkey={ index }\n\t\t\tpath={ parentMenu + '/variations/' + style.name }\n\t\t>\n\t\t\t<ScreenBlock name={ blockName } variation={ style.name } />\n\t\t</GlobalStylesNavigationScreen>\n\t) );\n}\n\nfunction ContextScreens( { name, parentMenu = '' } ) {\n\tconst blockStyleVariations = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockStyles } = select( blocksStore );\n\t\t\treturn getBlockStyles( name );\n\t\t},\n\t\t[ name ]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<GlobalStylesNavigationScreen\n\t\t\t\tpath={ parentMenu + '/colors/palette' }\n\t\t\t>\n\t\t\t\t<ScreenColorPalette name={ name } />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t{ !! blockStyleVariations?.length && (\n\t\t\t\t<BlockStylesNavigationScreens\n\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\tblockStyles={ blockStyleVariations }\n\t\t\t\t\tblockName={ name }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nfunction GlobalStylesStyleBook() {\n\tconst navigator = useNavigator();\n\tconst { path } = navigator.location;\n\treturn (\n\t\t<StyleBook\n\t\t\tisSelected={ ( blockName ) =>\n\t\t\t\t// Match '/blocks/core%2Fbutton' and\n\t\t\t\t// '/blocks/core%2Fbutton/typography', but not\n\t\t\t\t// '/blocks/core%2Fbuttons'.\n\t\t\t\tpath === `/blocks/${ encodeURIComponent( blockName ) }` ||\n\t\t\t\tpath.startsWith(\n\t\t\t\t\t`/blocks/${ encodeURIComponent( blockName ) }/`\n\t\t\t\t)\n\t\t\t}\n\t\t\tonSelect={ ( blockName ) => {\n\t\t\t\t// Now go to the selected block.\n\t\t\t\tnavigator.goTo( '/blocks/' + encodeURIComponent( blockName ) );\n\t\t\t} }\n\t\t/>\n\t);\n}\n\nfunction GlobalStylesBlockLink() {\n\tconst navigator = useNavigator();\n\tconst { selectedBlockName, selectedBlockClientId } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getSelectedBlockClientId, getBlockName } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst clientId = getSelectedBlockClientId();\n\t\t\treturn {\n\t\t\t\tselectedBlockName: getBlockName( clientId ),\n\t\t\t\tselectedBlockClientId: clientId,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\tconst blockHasGlobalStyles = useBlockHasGlobalStyles( selectedBlockName );\n\t// When we're in the `Blocks` screen enable deep linking to the selected block.\n\tuseEffect( () => {\n\t\tif ( ! selectedBlockClientId || ! blockHasGlobalStyles ) {\n\t\t\treturn;\n\t\t}\n\t\tconst currentPath = navigator.location.path;\n\t\tif (\n\t\t\tcurrentPath !== '/blocks' &&\n\t\t\t! currentPath.startsWith( '/blocks/' )\n\t\t) {\n\t\t\treturn;\n\t\t}\n\t\tconst newPath = '/blocks/' + encodeURIComponent( selectedBlockName );\n\t\t// Avoid navigating to the same path. This can happen when selecting\n\t\t// a new block of the same type.\n\t\tif ( newPath !== currentPath ) {\n\t\t\tnavigator.goTo( newPath, { skipFocus: true } );\n\t\t}\n\t}, [ selectedBlockClientId, selectedBlockName, blockHasGlobalStyles ] );\n}\n\nfunction GlobalStylesEditorCanvasContainerLink() {\n\tconst { goTo, location } = useNavigator();\n\tconst editorCanvasContainerView = useSelect(\n\t\t( select ) =>\n\t\t\tunlock( select( editSiteStore ) ).getEditorCanvasContainerView(),\n\t\t[]\n\t);\n\n\t// If the user switches the editor canvas container view, redirect\n\t// to the appropriate screen. This effectively allows deep linking to the\n\t// desired screens from outside the global styles navigation provider.\n\tuseEffect( () => {\n\t\tif ( editorCanvasContainerView === 'global-styles-revisions' ) {\n\t\t\t// Switching to the revisions container view should\n\t\t\t// redirect to the revisions screen.\n\t\t\tgoTo( '/revisions' );\n\t\t} else if (\n\t\t\t!! editorCanvasContainerView &&\n\t\t\tlocation?.path === '/revisions'\n\t\t) {\n\t\t\t// Switching to any container other than revisions should\n\t\t\t// redirect from the revisions screen to the root global styles screen.\n\t\t\tgoTo( '/' );\n\t\t} else if ( editorCanvasContainerView === 'global-styles-css' ) {\n\t\t\tgoTo( '/css' );\n\t\t}\n\n\t\t// location?.path is not a dependency because we don't want to track it.\n\t\t// Doing so will cause an infinite loop. We could abstract logic to avoid\n\t\t// having to disable the check later.\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [ editorCanvasContainerView, goTo ] );\n}\n\nfunction GlobalStylesUI() {\n\tconst blocks = getBlockTypes();\n\tconst editorCanvasContainerView = useSelect(\n\t\t( select ) =>\n\t\t\tunlock( select( editSiteStore ) ).getEditorCanvasContainerView(),\n\t\t[]\n\t);\n\treturn (\n\t\t<NavigatorProvider\n\t\t\tclassName=\"edit-site-global-styles-sidebar__navigator-provider\"\n\t\t\tinitialPath=\"/\"\n\t\t>\n\t\t\t<GlobalStylesNavigationScreen path=\"/\">\n\t\t\t\t<ScreenRoot />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/variations\">\n\t\t\t\t<ScreenStyleVariations />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/blocks\">\n\t\t\t\t<ScreenBlockList />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography\">\n\t\t\t\t<ScreenTypography />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/text\">\n\t\t\t\t<ScreenTypographyElement element=\"text\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/link\">\n\t\t\t\t<ScreenTypographyElement element=\"link\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/heading\">\n\t\t\t\t<ScreenTypographyElement element=\"heading\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/caption\">\n\t\t\t\t<ScreenTypographyElement element=\"caption\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/button\">\n\t\t\t\t<ScreenTypographyElement element=\"button\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/colors\">\n\t\t\t\t<ScreenColors />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/layout\">\n\t\t\t\t<ScreenLayout />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/css\">\n\t\t\t\t<ScreenCSS />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path={ '/revisions' }>\n\t\t\t\t<ScreenRevisions />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t{ blocks.map( ( block ) => (\n\t\t\t\t<GlobalStylesNavigationScreen\n\t\t\t\t\tkey={ 'menu-block-' + block.name }\n\t\t\t\t\tpath={ '/blocks/' + encodeURIComponent( block.name ) }\n\t\t\t\t>\n\t\t\t\t\t<ScreenBlock name={ block.name } />\n\t\t\t\t</GlobalStylesNavigationScreen>\n\t\t\t) ) }\n\n\t\t\t<ContextScreens />\n\n\t\t\t{ blocks.map( ( block ) => (\n\t\t\t\t<ContextScreens\n\t\t\t\t\tkey={ 'screens-block-' + block.name }\n\t\t\t\t\tname={ block.name }\n\t\t\t\t\tparentMenu={ '/blocks/' + encodeURIComponent( block.name ) }\n\t\t\t\t/>\n\t\t\t) ) }\n\n\t\t\t{ 'style-book' === editorCanvasContainerView && (\n\t\t\t\t<GlobalStylesStyleBook />\n\t\t\t) }\n\n\t\t\t<GlobalStylesRevisionsMenu />\n\t\t\t<GlobalStylesActionMenu />\n\t\t\t<GlobalStylesBlockLink />\n\t\t\t<GlobalStylesEditorCanvasContainerLink />\n\t\t</NavigatorProvider>\n\t);\n}\nexport { GlobalStylesMenuSlot };\nexport default GlobalStylesUI;\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AAUA,IAAAE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/D,GAAG,EAAG,aAAa,GAAGkH,KAAK,CAACrC,IAAM;IAClCD,IAAI,EAAG,UAAU,GAAGa,kBAAkB,CAAEyB,KAAK,CAACrC,IAAK;EAAG,GAEtD,IAAA5C,MAAA,CAAAC,aAAA,EAAC9D,YAAA,CAAAmB,OAAW;IAACsF,IAAI,EAAGqC,KAAK,CAACrC;EAAM,CAAE,CACL,CAC7B,CAAC,EAEH,IAAA5C,MAAA,CAAAC,aAAA,EAAC6C,cAAc,MAAE,CAAC,EAEhB8B,MAAM,CAACpC,GAAG,CAAIyC,KAAK,IACpB,IAAAjF,MAAA,CAAAC,aAAA,EAAC6C,cAAc;IACd/E,GAAG,EAAG,gBAAgB,GAAGkH,KAAK,CAACrC,IAAM;IACrCA,IAAI,EAAGqC,KAAK,CAACrC,IAAM;IACnBP,UAAU,EAAG,UAAU,GAAGmB,kBAAkB,CAAEyB,KAAK,CAACrC,IAAK;EAAG,CAC5D,CACA,CAAC,EAED,YAAY,KAAK6B,yBAAyB,IAC3C,IAAAzE,MAAA,CAAAC,aAAA,EAACmD,qBAAqB,MAAE,CACxB,EAED,IAAApD,MAAA,CAAAC,aAAA,EAACc,yBAAyB,MAAE,CAAC,EAC7B,IAAAf,MAAA,CAAAC,aAAA,EAAClB,sBAAsB,MAAE,CAAC,EAC1B,IAAAiB,MAAA,CAAAC,aAAA,EAAC0D,qBAAqB,MAAE,CAAC,EACzB,IAAA3D,MAAA,CAAAC,aAAA,EAACuE,qCAAqC,MAAE,CACtB,CAAC;AAEtB;AAAC,IAAAU,QAAA,GAEcP,cAAc;AAAA7F,OAAA,CAAAxB,OAAA,GAAA4H,QAAA"}
@@ -40,7 +40,7 @@ function useGlobalStylesRenderer() {
40
40
  styles: [...nonGlobalStyles, ...styles],
41
41
  __experimentalFeatures: settings
42
42
  });
43
- }, [styles, settings]);
43
+ }, [styles, settings, updateSettings, getSettings]);
44
44
  }
45
45
  function GlobalStylesRenderer() {
46
46
  useGlobalStylesRenderer();
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_data","_blockEditor","_store","_lockUnlock","useGlobalStylesOutput","unlock","blockEditorPrivateApis","useGlobalStylesRenderer","styles","settings","getSettings","useSelect","editSiteStore","updateSettings","useDispatch","useEffect","_currentStoreSettings","currentStoreSettings","nonGlobalStyles","Object","values","filter","style","isGlobalStyles","__experimentalFeatures","GlobalStylesRenderer"],"sources":["@wordpress/edit-site/src/components/global-styles-renderer/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst { useGlobalStylesOutput } = unlock( blockEditorPrivateApis );\n\nfunction useGlobalStylesRenderer() {\n\tconst [ styles, settings ] = useGlobalStylesOutput();\n\tconst { getSettings } = useSelect( editSiteStore );\n\tconst { updateSettings } = useDispatch( editSiteStore );\n\n\tuseEffect( () => {\n\t\tif ( ! styles || ! settings ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst currentStoreSettings = getSettings();\n\t\tconst nonGlobalStyles = Object.values(\n\t\t\tcurrentStoreSettings.styles ?? []\n\t\t).filter( ( style ) => ! style.isGlobalStyles );\n\t\tupdateSettings( {\n\t\t\t...currentStoreSettings,\n\t\t\tstyles: [ ...nonGlobalStyles, ...styles ],\n\t\t\t__experimentalFeatures: settings,\n\t\t} );\n\t}, [ styles, settings ] );\n}\n\nexport function GlobalStylesRenderer() {\n\tuseGlobalStylesRenderer();\n\n\treturn null;\n}\n"],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAKA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AAXA;AACA;AACA;;AAKA;AACA;AACA;;AAIA,MAAM;EAAEK;AAAsB,CAAC,GAAG,IAAAC,kBAAM,EAAEC,wBAAuB,CAAC;AAElE,SAASC,uBAAuBA,CAAA,EAAG;EAClC,MAAM,CAAEC,MAAM,EAAEC,QAAQ,CAAE,GAAGL,qBAAqB,CAAC,CAAC;EACpD,MAAM;IAAEM;EAAY,CAAC,GAAG,IAAAC,eAAS,EAAEC,YAAc,CAAC;EAClD,MAAM;IAAEC;EAAe,CAAC,GAAG,IAAAC,iBAAW,EAAEF,YAAc,CAAC;EAEvD,IAAAG,kBAAS,EAAE,MAAM;IAAA,IAAAC,qBAAA;IAChB,IAAK,CAAER,MAAM,IAAI,CAAEC,QAAQ,EAAG;MAC7B;IACD;IAEA,MAAMQ,oBAAoB,GAAGP,WAAW,CAAC,CAAC;IAC1C,MAAMQ,eAAe,GAAGC,MAAM,CAACC,MAAM,EAAAJ,qBAAA,GACpCC,oBAAoB,CAACT,MAAM,cAAAQ,qBAAA,cAAAA,qBAAA,GAAI,EAChC,CAAC,CAACK,MAAM,CAAIC,KAAK,IAAM,CAAEA,KAAK,CAACC,cAAe,CAAC;IAC/CV,cAAc,CAAE;MACf,GAAGI,oBAAoB;MACvBT,MAAM,EAAE,CAAE,GAAGU,eAAe,EAAE,GAAGV,MAAM,CAAE;MACzCgB,sBAAsB,EAAEf;IACzB,CAAE,CAAC;EACJ,CAAC,EAAE,CAAED,MAAM,EAAEC,QAAQ,CAAG,CAAC;AAC1B;AAEO,SAASgB,oBAAoBA,CAAA,EAAG;EACtClB,uBAAuB,CAAC,CAAC;EAEzB,OAAO,IAAI;AACZ"}
1
+ {"version":3,"names":["_element","require","_data","_blockEditor","_store","_lockUnlock","useGlobalStylesOutput","unlock","blockEditorPrivateApis","useGlobalStylesRenderer","styles","settings","getSettings","useSelect","editSiteStore","updateSettings","useDispatch","useEffect","_currentStoreSettings","currentStoreSettings","nonGlobalStyles","Object","values","filter","style","isGlobalStyles","__experimentalFeatures","GlobalStylesRenderer"],"sources":["@wordpress/edit-site/src/components/global-styles-renderer/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst { useGlobalStylesOutput } = unlock( blockEditorPrivateApis );\n\nfunction useGlobalStylesRenderer() {\n\tconst [ styles, settings ] = useGlobalStylesOutput();\n\tconst { getSettings } = useSelect( editSiteStore );\n\tconst { updateSettings } = useDispatch( editSiteStore );\n\n\tuseEffect( () => {\n\t\tif ( ! styles || ! settings ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst currentStoreSettings = getSettings();\n\t\tconst nonGlobalStyles = Object.values(\n\t\t\tcurrentStoreSettings.styles ?? []\n\t\t).filter( ( style ) => ! style.isGlobalStyles );\n\t\tupdateSettings( {\n\t\t\t...currentStoreSettings,\n\t\t\tstyles: [ ...nonGlobalStyles, ...styles ],\n\t\t\t__experimentalFeatures: settings,\n\t\t} );\n\t}, [ styles, settings, updateSettings, getSettings ] );\n}\n\nexport function GlobalStylesRenderer() {\n\tuseGlobalStylesRenderer();\n\n\treturn null;\n}\n"],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAKA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AAXA;AACA;AACA;;AAKA;AACA;AACA;;AAIA,MAAM;EAAEK;AAAsB,CAAC,GAAG,IAAAC,kBAAM,EAAEC,wBAAuB,CAAC;AAElE,SAASC,uBAAuBA,CAAA,EAAG;EAClC,MAAM,CAAEC,MAAM,EAAEC,QAAQ,CAAE,GAAGL,qBAAqB,CAAC,CAAC;EACpD,MAAM;IAAEM;EAAY,CAAC,GAAG,IAAAC,eAAS,EAAEC,YAAc,CAAC;EAClD,MAAM;IAAEC;EAAe,CAAC,GAAG,IAAAC,iBAAW,EAAEF,YAAc,CAAC;EAEvD,IAAAG,kBAAS,EAAE,MAAM;IAAA,IAAAC,qBAAA;IAChB,IAAK,CAAER,MAAM,IAAI,CAAEC,QAAQ,EAAG;MAC7B;IACD;IAEA,MAAMQ,oBAAoB,GAAGP,WAAW,CAAC,CAAC;IAC1C,MAAMQ,eAAe,GAAGC,MAAM,CAACC,MAAM,EAAAJ,qBAAA,GACpCC,oBAAoB,CAACT,MAAM,cAAAQ,qBAAA,cAAAA,qBAAA,GAAI,EAChC,CAAC,CAACK,MAAM,CAAIC,KAAK,IAAM,CAAEA,KAAK,CAACC,cAAe,CAAC;IAC/CV,cAAc,CAAE;MACf,GAAGI,oBAAoB;MACvBT,MAAM,EAAE,CAAE,GAAGU,eAAe,EAAE,GAAGV,MAAM,CAAE;MACzCgB,sBAAsB,EAAEf;IACzB,CAAE,CAAC;EACJ,CAAC,EAAE,CAAED,MAAM,EAAEC,QAAQ,EAAEI,cAAc,EAAEH,WAAW,CAAG,CAAC;AACvD;AAEO,SAASe,oBAAoBA,CAAA,EAAG;EACtClB,uBAAuB,CAAC,CAAC;EAEzB,OAAO,IAAI;AACZ"}
@@ -0,0 +1,160 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = DocumentTools;
8
+ var _react = require("react");
9
+ var _element = require("@wordpress/element");
10
+ var _compose = require("@wordpress/compose");
11
+ var _blockEditor = require("@wordpress/block-editor");
12
+ var _data = require("@wordpress/data");
13
+ var _i18n = require("@wordpress/i18n");
14
+ var _icons = require("@wordpress/icons");
15
+ var _components = require("@wordpress/components");
16
+ var _keyboardShortcuts = require("@wordpress/keyboard-shortcuts");
17
+ var _undo = _interopRequireDefault(require("../undo-redo/undo"));
18
+ var _redo = _interopRequireDefault(require("../undo-redo/redo"));
19
+ var _store = require("../../../store");
20
+ var _lockUnlock = require("../../../lock-unlock");
21
+ /**
22
+ * WordPress dependencies
23
+ */
24
+
25
+ /**
26
+ * Internal dependencies
27
+ */
28
+
29
+ const {
30
+ useShouldContextualToolbarShow
31
+ } = (0, _lockUnlock.unlock)(_blockEditor.privateApis);
32
+ const preventDefault = event => {
33
+ event.preventDefault();
34
+ };
35
+ function DocumentTools({
36
+ blockEditorMode,
37
+ hasFixedToolbar,
38
+ isDistractionFree,
39
+ showIconLabels,
40
+ setListViewToggleElement
41
+ }) {
42
+ const inserterButton = (0, _element.useRef)();
43
+ const {
44
+ isInserterOpen,
45
+ isListViewOpen,
46
+ listViewShortcut,
47
+ isVisualMode
48
+ } = (0, _data.useSelect)(select => {
49
+ const {
50
+ __experimentalGetPreviewDeviceType,
51
+ isInserterOpened,
52
+ isListViewOpened,
53
+ getEditorMode
54
+ } = select(_store.store);
55
+ const {
56
+ getShortcutRepresentation
57
+ } = select(_keyboardShortcuts.store);
58
+ return {
59
+ deviceType: __experimentalGetPreviewDeviceType(),
60
+ isInserterOpen: isInserterOpened(),
61
+ isListViewOpen: isListViewOpened(),
62
+ listViewShortcut: getShortcutRepresentation('core/edit-site/toggle-list-view'),
63
+ isVisualMode: getEditorMode() === 'visual'
64
+ };
65
+ }, []);
66
+ const {
67
+ __experimentalSetPreviewDeviceType: setPreviewDeviceType,
68
+ setIsInserterOpened,
69
+ setIsListViewOpened
70
+ } = (0, _data.useDispatch)(_store.store);
71
+ const {
72
+ __unstableSetEditorMode
73
+ } = (0, _data.useDispatch)(_blockEditor.store);
74
+ const isLargeViewport = (0, _compose.useViewportMatch)('medium');
75
+ const toggleInserter = (0, _element.useCallback)(() => {
76
+ if (isInserterOpen) {
77
+ // Focusing the inserter button should close the inserter popover.
78
+ // However, there are some cases it won't close when the focus is lost.
79
+ // See https://github.com/WordPress/gutenberg/issues/43090 for more details.
80
+ inserterButton.current.focus();
81
+ setIsInserterOpened(false);
82
+ } else {
83
+ setIsInserterOpened(true);
84
+ }
85
+ }, [isInserterOpen, setIsInserterOpened]);
86
+ const toggleListView = (0, _element.useCallback)(() => setIsListViewOpened(!isListViewOpen), [setIsListViewOpened, isListViewOpen]);
87
+ const {
88
+ shouldShowContextualToolbar,
89
+ canFocusHiddenToolbar,
90
+ fixedToolbarCanBeFocused
91
+ } = useShouldContextualToolbarShow();
92
+ // If there's a block toolbar to be focused, disable the focus shortcut for the document toolbar.
93
+ // There's a fixed block toolbar when the fixed toolbar option is enabled or when the browser width is less than the large viewport.
94
+ const blockToolbarCanBeFocused = shouldShowContextualToolbar || canFocusHiddenToolbar || fixedToolbarCanBeFocused;
95
+
96
+ /* translators: button label text should, if possible, be under 16 characters. */
97
+ const longLabel = (0, _i18n._x)('Toggle block inserter', 'Generic label for block inserter button');
98
+ const shortLabel = !isInserterOpen ? (0, _i18n.__)('Add') : (0, _i18n.__)('Close');
99
+ const isZoomedOutViewExperimentEnabled = window?.__experimentalEnableZoomedOutView && isVisualMode;
100
+ const isZoomedOutView = blockEditorMode === 'zoom-out';
101
+ return (0, _react.createElement)(_blockEditor.NavigableToolbar, {
102
+ className: "edit-site-header-edit-mode__document-tools",
103
+ "aria-label": (0, _i18n.__)('Document tools'),
104
+ shouldUseKeyboardFocusShortcut: !blockToolbarCanBeFocused
105
+ }, (0, _react.createElement)("div", {
106
+ className: "edit-site-header-edit-mode__toolbar"
107
+ }, !isDistractionFree && (0, _react.createElement)(_components.ToolbarItem, {
108
+ ref: inserterButton,
109
+ as: _components.Button,
110
+ className: "edit-site-header-edit-mode__inserter-toggle",
111
+ variant: "primary",
112
+ isPressed: isInserterOpen,
113
+ onMouseDown: preventDefault,
114
+ onClick: toggleInserter,
115
+ disabled: !isVisualMode,
116
+ icon: _icons.plus,
117
+ label: showIconLabels ? shortLabel : longLabel,
118
+ showTooltip: !showIconLabels,
119
+ "aria-expanded": isInserterOpen
120
+ }), isLargeViewport && (0, _react.createElement)(_react.Fragment, null, !hasFixedToolbar && (0, _react.createElement)(_components.ToolbarItem, {
121
+ as: _blockEditor.ToolSelector,
122
+ showTooltip: !showIconLabels,
123
+ variant: showIconLabels ? 'tertiary' : undefined,
124
+ disabled: !isVisualMode
125
+ }), (0, _react.createElement)(_components.ToolbarItem, {
126
+ as: _undo.default,
127
+ showTooltip: !showIconLabels,
128
+ variant: showIconLabels ? 'tertiary' : undefined
129
+ }), (0, _react.createElement)(_components.ToolbarItem, {
130
+ as: _redo.default,
131
+ showTooltip: !showIconLabels,
132
+ variant: showIconLabels ? 'tertiary' : undefined
133
+ }), !isDistractionFree && (0, _react.createElement)(_components.ToolbarItem, {
134
+ as: _components.Button,
135
+ className: "edit-site-header-edit-mode__list-view-toggle",
136
+ disabled: !isVisualMode || isZoomedOutView,
137
+ icon: _icons.listView,
138
+ isPressed: isListViewOpen
139
+ /* translators: button label text should, if possible, be under 16 characters. */,
140
+ label: (0, _i18n.__)('List View'),
141
+ onClick: toggleListView,
142
+ ref: setListViewToggleElement,
143
+ shortcut: listViewShortcut,
144
+ showTooltip: !showIconLabels,
145
+ variant: showIconLabels ? 'tertiary' : undefined,
146
+ "aria-expanded": isListViewOpen
147
+ }), isZoomedOutViewExperimentEnabled && !isDistractionFree && !hasFixedToolbar && (0, _react.createElement)(_components.ToolbarItem, {
148
+ as: _components.Button,
149
+ className: "edit-site-header-edit-mode__zoom-out-view-toggle",
150
+ icon: _icons.chevronUpDown,
151
+ isPressed: isZoomedOutView
152
+ /* translators: button label text should, if possible, be under 16 characters. */,
153
+ label: (0, _i18n.__)('Zoom-out View'),
154
+ onClick: () => {
155
+ setPreviewDeviceType('Desktop');
156
+ __unstableSetEditorMode(isZoomedOutView ? 'edit' : 'zoom-out');
157
+ }
158
+ }))));
159
+ }
160
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_element","require","_compose","_blockEditor","_data","_i18n","_icons","_components","_keyboardShortcuts","_undo","_interopRequireDefault","_redo","_store","_lockUnlock","useShouldContextualToolbarShow","unlock","blockEditorPrivateApis","preventDefault","event","DocumentTools","blockEditorMode","hasFixedToolbar","isDistractionFree","showIconLabels","setListViewToggleElement","inserterButton","useRef","isInserterOpen","isListViewOpen","listViewShortcut","isVisualMode","useSelect","select","__experimentalGetPreviewDeviceType","isInserterOpened","isListViewOpened","getEditorMode","editSiteStore","getShortcutRepresentation","keyboardShortcutsStore","deviceType","__experimentalSetPreviewDeviceType","setPreviewDeviceType","setIsInserterOpened","setIsListViewOpened","useDispatch","__unstableSetEditorMode","blockEditorStore","isLargeViewport","useViewportMatch","toggleInserter","useCallback","current","focus","toggleListView","shouldShowContextualToolbar","canFocusHiddenToolbar","fixedToolbarCanBeFocused","blockToolbarCanBeFocused","longLabel","_x","shortLabel","__","isZoomedOutViewExperimentEnabled","window","__experimentalEnableZoomedOutView","isZoomedOutView","_react","createElement","NavigableToolbar","className","shouldUseKeyboardFocusShortcut","ToolbarItem","ref","as","Button","variant","isPressed","onMouseDown","onClick","disabled","icon","plus","label","showTooltip","Fragment","ToolSelector","undefined","UndoButton","RedoButton","listView","shortcut","chevronUpDown"],"sources":["@wordpress/edit-site/src/components/header-edit-mode/document-tools/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useCallback, useRef } from '@wordpress/element';\nimport { useViewportMatch } from '@wordpress/compose';\nimport {\n\tToolSelector,\n\tNavigableToolbar,\n\tstore as blockEditorStore,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { _x, __ } from '@wordpress/i18n';\nimport { listView, plus, chevronUpDown } from '@wordpress/icons';\nimport { Button, ToolbarItem } from '@wordpress/components';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\n\n/**\n * Internal dependencies\n */\nimport UndoButton from '../undo-redo/undo';\nimport RedoButton from '../undo-redo/redo';\nimport { store as editSiteStore } from '../../../store';\nimport { unlock } from '../../../lock-unlock';\n\nconst { useShouldContextualToolbarShow } = unlock( blockEditorPrivateApis );\n\nconst preventDefault = ( event ) => {\n\tevent.preventDefault();\n};\n\nexport default function DocumentTools( {\n\tblockEditorMode,\n\thasFixedToolbar,\n\tisDistractionFree,\n\tshowIconLabels,\n\tsetListViewToggleElement,\n} ) {\n\tconst inserterButton = useRef();\n\tconst { isInserterOpen, isListViewOpen, listViewShortcut, isVisualMode } =\n\t\tuseSelect( ( select ) => {\n\t\t\tconst {\n\t\t\t\t__experimentalGetPreviewDeviceType,\n\t\t\t\tisInserterOpened,\n\t\t\t\tisListViewOpened,\n\t\t\t\tgetEditorMode,\n\t\t\t} = select( editSiteStore );\n\t\t\tconst { getShortcutRepresentation } = select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t);\n\n\t\t\treturn {\n\t\t\t\tdeviceType: __experimentalGetPreviewDeviceType(),\n\t\t\t\tisInserterOpen: isInserterOpened(),\n\t\t\t\tisListViewOpen: isListViewOpened(),\n\t\t\t\tlistViewShortcut: getShortcutRepresentation(\n\t\t\t\t\t'core/edit-site/toggle-list-view'\n\t\t\t\t),\n\t\t\t\tisVisualMode: getEditorMode() === 'visual',\n\t\t\t};\n\t\t}, [] );\n\n\tconst {\n\t\t__experimentalSetPreviewDeviceType: setPreviewDeviceType,\n\t\tsetIsInserterOpened,\n\t\tsetIsListViewOpened,\n\t} = useDispatch( editSiteStore );\n\tconst { __unstableSetEditorMode } = useDispatch( blockEditorStore );\n\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\n\tconst toggleInserter = useCallback( () => {\n\t\tif ( isInserterOpen ) {\n\t\t\t// Focusing the inserter button should close the inserter popover.\n\t\t\t// However, there are some cases it won't close when the focus is lost.\n\t\t\t// See https://github.com/WordPress/gutenberg/issues/43090 for more details.\n\t\t\tinserterButton.current.focus();\n\t\t\tsetIsInserterOpened( false );\n\t\t} else {\n\t\t\tsetIsInserterOpened( true );\n\t\t}\n\t}, [ isInserterOpen, setIsInserterOpened ] );\n\n\tconst toggleListView = useCallback(\n\t\t() => setIsListViewOpened( ! isListViewOpen ),\n\t\t[ setIsListViewOpened, isListViewOpen ]\n\t);\n\n\tconst {\n\t\tshouldShowContextualToolbar,\n\t\tcanFocusHiddenToolbar,\n\t\tfixedToolbarCanBeFocused,\n\t} = useShouldContextualToolbarShow();\n\t// If there's a block toolbar to be focused, disable the focus shortcut for the document toolbar.\n\t// There's a fixed block toolbar when the fixed toolbar option is enabled or when the browser width is less than the large viewport.\n\tconst blockToolbarCanBeFocused =\n\t\tshouldShowContextualToolbar ||\n\t\tcanFocusHiddenToolbar ||\n\t\tfixedToolbarCanBeFocused;\n\n\t/* translators: button label text should, if possible, be under 16 characters. */\n\tconst longLabel = _x(\n\t\t'Toggle block inserter',\n\t\t'Generic label for block inserter button'\n\t);\n\tconst shortLabel = ! isInserterOpen ? __( 'Add' ) : __( 'Close' );\n\n\tconst isZoomedOutViewExperimentEnabled =\n\t\twindow?.__experimentalEnableZoomedOutView && isVisualMode;\n\tconst isZoomedOutView = blockEditorMode === 'zoom-out';\n\n\treturn (\n\t\t<NavigableToolbar\n\t\t\tclassName=\"edit-site-header-edit-mode__document-tools\"\n\t\t\taria-label={ __( 'Document tools' ) }\n\t\t\tshouldUseKeyboardFocusShortcut={ ! blockToolbarCanBeFocused }\n\t\t>\n\t\t\t<div className=\"edit-site-header-edit-mode__toolbar\">\n\t\t\t\t{ ! isDistractionFree && (\n\t\t\t\t\t<ToolbarItem\n\t\t\t\t\t\tref={ inserterButton }\n\t\t\t\t\t\tas={ Button }\n\t\t\t\t\t\tclassName=\"edit-site-header-edit-mode__inserter-toggle\"\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\tisPressed={ isInserterOpen }\n\t\t\t\t\t\tonMouseDown={ preventDefault }\n\t\t\t\t\t\tonClick={ toggleInserter }\n\t\t\t\t\t\tdisabled={ ! isVisualMode }\n\t\t\t\t\t\ticon={ plus }\n\t\t\t\t\t\tlabel={ showIconLabels ? shortLabel : longLabel }\n\t\t\t\t\t\tshowTooltip={ ! showIconLabels }\n\t\t\t\t\t\taria-expanded={ isInserterOpen }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ isLargeViewport && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ ! hasFixedToolbar && (\n\t\t\t\t\t\t\t<ToolbarItem\n\t\t\t\t\t\t\t\tas={ ToolSelector }\n\t\t\t\t\t\t\t\tshowTooltip={ ! showIconLabels }\n\t\t\t\t\t\t\t\tvariant={\n\t\t\t\t\t\t\t\t\tshowIconLabels ? 'tertiary' : undefined\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdisabled={ ! isVisualMode }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<ToolbarItem\n\t\t\t\t\t\t\tas={ UndoButton }\n\t\t\t\t\t\t\tshowTooltip={ ! showIconLabels }\n\t\t\t\t\t\t\tvariant={ showIconLabels ? 'tertiary' : undefined }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<ToolbarItem\n\t\t\t\t\t\t\tas={ RedoButton }\n\t\t\t\t\t\t\tshowTooltip={ ! showIconLabels }\n\t\t\t\t\t\t\tvariant={ showIconLabels ? 'tertiary' : undefined }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{ ! isDistractionFree && (\n\t\t\t\t\t\t\t<ToolbarItem\n\t\t\t\t\t\t\t\tas={ Button }\n\t\t\t\t\t\t\t\tclassName=\"edit-site-header-edit-mode__list-view-toggle\"\n\t\t\t\t\t\t\t\tdisabled={ ! isVisualMode || isZoomedOutView }\n\t\t\t\t\t\t\t\ticon={ listView }\n\t\t\t\t\t\t\t\tisPressed={ isListViewOpen }\n\t\t\t\t\t\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\t\t\t\t\t\tlabel={ __( 'List View' ) }\n\t\t\t\t\t\t\t\tonClick={ toggleListView }\n\t\t\t\t\t\t\t\tref={ setListViewToggleElement }\n\t\t\t\t\t\t\t\tshortcut={ listViewShortcut }\n\t\t\t\t\t\t\t\tshowTooltip={ ! showIconLabels }\n\t\t\t\t\t\t\t\tvariant={\n\t\t\t\t\t\t\t\t\tshowIconLabels ? 'tertiary' : undefined\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\taria-expanded={ isListViewOpen }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ isZoomedOutViewExperimentEnabled &&\n\t\t\t\t\t\t\t! isDistractionFree &&\n\t\t\t\t\t\t\t! hasFixedToolbar && (\n\t\t\t\t\t\t\t\t<ToolbarItem\n\t\t\t\t\t\t\t\t\tas={ Button }\n\t\t\t\t\t\t\t\t\tclassName=\"edit-site-header-edit-mode__zoom-out-view-toggle\"\n\t\t\t\t\t\t\t\t\ticon={ chevronUpDown }\n\t\t\t\t\t\t\t\t\tisPressed={ isZoomedOutView }\n\t\t\t\t\t\t\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Zoom-out View' ) }\n\t\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\t\tsetPreviewDeviceType( 'Desktop' );\n\t\t\t\t\t\t\t\t\t\t__unstableSetEditorMode(\n\t\t\t\t\t\t\t\t\t\t\tisZoomedOutView\n\t\t\t\t\t\t\t\t\t\t\t\t? 'edit'\n\t\t\t\t\t\t\t\t\t\t\t\t: 'zoom-out'\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t</NavigableToolbar>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAMA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GA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,cAAc,GAAG,UAAU,GAAGgE;EAAW,CACnD,CAAC,EACA,CAAEjE,iBAAiB,IACpB,IAAA6C,MAAA,CAAAC,aAAA,EAAC7D,WAAA,CAAAiE,WAAW;IACXE,EAAE,EAAGC,kBAAQ;IACbL,SAAS,EAAC,8CAA8C;IACxDU,QAAQ,EAAG,CAAElD,YAAY,IAAIoC,eAAiB;IAC9Ce,IAAI,EAAGS,eAAU;IACjBb,SAAS,EAAGjD;IACZ;IACAuD,KAAK,EAAG,IAAArB,QAAE,EAAE,WAAY,CAAG;IAC3BiB,OAAO,EAAGzB,cAAgB;IAC1BmB,GAAG,EAAGjD,wBAA0B;IAChCmE,QAAQ,EAAG9D,gBAAkB;IAC7BuD,WAAW,EAAG,CAAE7D,cAAgB;IAChCqD,OAAO,EACNrD,cAAc,GAAG,UAAU,GAAGgE,SAC9B;IACD,iBAAgB3D;EAAgB,CAChC,CACD,EACCmC,gCAAgC,IACjC,CAAEzC,iBAAiB,IACnB,CAAED,eAAe,IAChB,IAAA8C,MAAA,CAAAC,aAAA,EAAC7D,WAAA,CAAAiE,WAAW;IACXE,EAAE,EAAGC,kBAAQ;IACbL,SAAS,EAAC,kDAAkD;IAC5DW,IAAI,EAAGW,oBAAe;IACtBf,SAAS,EAAGX;IACZ;IACAiB,KAAK,EAAG,IAAArB,QAAE,EAAE,eAAgB,CAAG;IAC/BiB,OAAO,EAAGA,CAAA,KAAM;MACfrC,oBAAoB,CAAE,SAAU,CAAC;MACjCI,uBAAuB,CACtBoB,eAAe,GACZ,MAAM,GACN,UACJ,CAAC;IACF;EAAG,CACH,CAEF,CAEC,CACY,CAAC;AAErB"}
@@ -7,22 +7,20 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.default = HeaderEditMode;
8
8
  var _react = require("react");
9
9
  var _classnames = _interopRequireDefault(require("classnames"));
10
- var _element = require("@wordpress/element");
11
10
  var _compose = require("@wordpress/compose");
12
11
  var _coreData = require("@wordpress/core-data");
13
12
  var _blockEditor = require("@wordpress/block-editor");
14
13
  var _data = require("@wordpress/data");
14
+ var _element = require("@wordpress/element");
15
15
  var _interface = require("@wordpress/interface");
16
16
  var _i18n = require("@wordpress/i18n");
17
17
  var _icons = require("@wordpress/icons");
18
18
  var _components = require("@wordpress/components");
19
- var _keyboardShortcuts = require("@wordpress/keyboard-shortcuts");
20
19
  var _preferences = require("@wordpress/preferences");
21
20
  var _moreMenu = _interopRequireDefault(require("./more-menu"));
22
21
  var _saveButton = _interopRequireDefault(require("../save-button"));
23
- var _undo = _interopRequireDefault(require("./undo-redo/undo"));
24
- var _redo = _interopRequireDefault(require("./undo-redo/redo"));
25
22
  var _documentActions = _interopRequireDefault(require("./document-actions"));
23
+ var _documentTools = _interopRequireDefault(require("./document-tools"));
26
24
  var _store = require("../../store");
27
25
  var _editorCanvasContainer = require("../editor-canvas-container");
28
26
  var _lockUnlock = require("../../lock-unlock");
@@ -40,40 +38,29 @@ var _constants = require("../../utils/constants");
40
38
  */
41
39
 
42
40
  const {
43
- useShouldContextualToolbarShow
41
+ BlockContextualToolbar
44
42
  } = (0, _lockUnlock.unlock)(_blockEditor.privateApis);
45
- const preventDefault = event => {
46
- event.preventDefault();
47
- };
48
43
  function HeaderEditMode({
49
44
  setListViewToggleElement
50
45
  }) {
51
- const inserterButton = (0, _element.useRef)();
52
46
  const {
53
47
  deviceType,
54
48
  templateType,
55
- isInserterOpen,
56
- isListViewOpen,
57
- listViewShortcut,
58
- isVisualMode,
59
49
  isDistractionFree,
60
50
  blockEditorMode,
51
+ blockSelectionStart,
61
52
  homeUrl,
62
53
  showIconLabels,
63
54
  editorCanvasView,
64
- hasFixedToolbar
55
+ hasFixedToolbar,
56
+ isZoomOutMode
65
57
  } = (0, _data.useSelect)(select => {
66
58
  const {
67
59
  __experimentalGetPreviewDeviceType,
68
- getEditedPostType,
69
- isInserterOpened,
70
- isListViewOpened,
71
- getEditorMode
60
+ getEditedPostType
72
61
  } = select(_store.store);
73
62
  const {
74
- getShortcutRepresentation
75
- } = select(_keyboardShortcuts.store);
76
- const {
63
+ getBlockSelectionStart,
77
64
  __unstableGetEditorMode
78
65
  } = select(_blockEditor.store);
79
66
  const postType = getEditedPostType();
@@ -86,56 +73,34 @@ function HeaderEditMode({
86
73
  return {
87
74
  deviceType: __experimentalGetPreviewDeviceType(),
88
75
  templateType: postType,
89
- isInserterOpen: isInserterOpened(),
90
- isListViewOpen: isListViewOpened(),
91
- listViewShortcut: getShortcutRepresentation('core/edit-site/toggle-list-view'),
92
- isVisualMode: getEditorMode() === 'visual',
93
76
  blockEditorMode: __unstableGetEditorMode(),
77
+ blockSelectionStart: getBlockSelectionStart(),
94
78
  homeUrl: getUnstableBase()?.home,
95
79
  showIconLabels: getPreference(_store.store.name, 'showIconLabels'),
96
80
  editorCanvasView: (0, _lockUnlock.unlock)(select(_store.store)).getEditorCanvasContainerView(),
81
+ hasFixedToolbar: getPreference(_store.store.name, 'fixedToolbar'),
97
82
  isDistractionFree: getPreference(_store.store.name, 'distractionFree'),
98
- hasFixedToolbar: getPreference(_store.store.name, 'fixedToolbar')
83
+ isZoomOutMode: __unstableGetEditorMode() === 'zoom-out'
99
84
  };
100
85
  }, []);
86
+ const isLargeViewport = (0, _compose.useViewportMatch)('medium');
87
+ const isTopToolbar = !isZoomOutMode && hasFixedToolbar && isLargeViewport;
88
+ const blockToolbarRef = (0, _element.useRef)();
101
89
  const {
102
- __experimentalSetPreviewDeviceType: setPreviewDeviceType,
103
- setIsInserterOpened,
104
- setIsListViewOpened
90
+ __experimentalSetPreviewDeviceType: setPreviewDeviceType
105
91
  } = (0, _data.useDispatch)(_store.store);
106
- const {
107
- __unstableSetEditorMode
108
- } = (0, _data.useDispatch)(_blockEditor.store);
109
92
  const disableMotion = (0, _compose.useReducedMotion)();
110
- const isLargeViewport = (0, _compose.useViewportMatch)('medium');
111
- const toggleInserter = (0, _element.useCallback)(() => {
112
- if (isInserterOpen) {
113
- // Focusing the inserter button should close the inserter popover.
114
- // However, there are some cases it won't close when the focus is lost.
115
- // See https://github.com/WordPress/gutenberg/issues/43090 for more details.
116
- inserterButton.current.focus();
117
- setIsInserterOpened(false);
118
- } else {
119
- setIsInserterOpened(true);
120
- }
121
- }, [isInserterOpen, setIsInserterOpened]);
122
- const toggleListView = (0, _element.useCallback)(() => setIsListViewOpened(!isListViewOpen), [setIsListViewOpened, isListViewOpen]);
123
- const {
124
- shouldShowContextualToolbar,
125
- canFocusHiddenToolbar,
126
- fixedToolbarCanBeFocused
127
- } = useShouldContextualToolbarShow();
128
- // If there's a block toolbar to be focused, disable the focus shortcut for the document toolbar.
129
- // There's a fixed block toolbar when the fixed toolbar option is enabled or when the browser width is less than the large viewport.
130
- const blockToolbarCanBeFocused = shouldShowContextualToolbar || canFocusHiddenToolbar || fixedToolbarCanBeFocused;
131
93
  const hasDefaultEditorCanvasView = !(0, _editorCanvasContainer.useHasEditorCanvasContainer)();
132
94
  const isFocusMode = _constants.FOCUSABLE_ENTITIES.includes(templateType);
133
-
134
- /* translators: button label text should, if possible, be under 16 characters. */
135
- const longLabel = (0, _i18n._x)('Toggle block inserter', 'Generic label for block inserter button');
136
- const shortLabel = !isInserterOpen ? (0, _i18n.__)('Add') : (0, _i18n.__)('Close');
137
- const isZoomedOutViewExperimentEnabled = window?.__experimentalEnableZoomedOutView && isVisualMode;
138
95
  const isZoomedOutView = blockEditorMode === 'zoom-out';
96
+ const [isBlockToolsCollapsed, setIsBlockToolsCollapsed] = (0, _element.useState)(true);
97
+ const hasBlockSelected = !!blockSelectionStart;
98
+ (0, _element.useEffect)(() => {
99
+ // If we have a new block selection, show the block tools
100
+ if (blockSelectionStart) {
101
+ setIsBlockToolsCollapsed(false);
102
+ }
103
+ }, [blockSelectionStart]);
139
104
  const toolbarVariants = {
140
105
  isDistractionFree: {
141
106
  y: '-50px'
@@ -159,68 +124,35 @@ function HeaderEditMode({
159
124
  className: (0, _classnames.default)('edit-site-header-edit-mode', {
160
125
  'show-icon-labels': showIconLabels
161
126
  })
162
- }, hasDefaultEditorCanvasView && (0, _react.createElement)(_blockEditor.NavigableToolbar, {
163
- as: _components.__unstableMotion.div,
127
+ }, hasDefaultEditorCanvasView && (0, _react.createElement)(_components.__unstableMotion.div, {
164
128
  className: "edit-site-header-edit-mode__start",
165
- "aria-label": (0, _i18n.__)('Document tools'),
166
- shouldUseKeyboardFocusShortcut: !blockToolbarCanBeFocused,
167
129
  variants: toolbarVariants,
168
130
  transition: toolbarTransition
169
- }, (0, _react.createElement)("div", {
170
- className: "edit-site-header-edit-mode__toolbar"
171
- }, !isDistractionFree && (0, _react.createElement)(_components.ToolbarItem, {
172
- ref: inserterButton,
173
- as: _components.Button,
174
- className: "edit-site-header-edit-mode__inserter-toggle",
175
- variant: "primary",
176
- isPressed: isInserterOpen,
177
- onMouseDown: preventDefault,
178
- onClick: toggleInserter,
179
- disabled: !isVisualMode,
180
- icon: _icons.plus,
181
- label: showIconLabels ? shortLabel : longLabel,
182
- showTooltip: !showIconLabels,
183
- "aria-expanded": isInserterOpen
184
- }), isLargeViewport && (0, _react.createElement)(_react.Fragment, null, !hasFixedToolbar && (0, _react.createElement)(_components.ToolbarItem, {
185
- as: _blockEditor.ToolSelector,
186
- showTooltip: !showIconLabels,
187
- variant: showIconLabels ? 'tertiary' : undefined,
188
- disabled: !isVisualMode
189
- }), (0, _react.createElement)(_components.ToolbarItem, {
190
- as: _undo.default,
191
- showTooltip: !showIconLabels,
192
- variant: showIconLabels ? 'tertiary' : undefined
193
- }), (0, _react.createElement)(_components.ToolbarItem, {
194
- as: _redo.default,
195
- showTooltip: !showIconLabels,
196
- variant: showIconLabels ? 'tertiary' : undefined
197
- }), !isDistractionFree && (0, _react.createElement)(_components.ToolbarItem, {
198
- as: _components.Button,
199
- className: "edit-site-header-edit-mode__list-view-toggle",
200
- disabled: !isVisualMode || isZoomedOutView,
201
- icon: _icons.listView,
202
- isPressed: isListViewOpen
203
- /* translators: button label text should, if possible, be under 16 characters. */,
204
- label: (0, _i18n.__)('List View'),
205
- onClick: toggleListView,
206
- ref: setListViewToggleElement,
207
- shortcut: listViewShortcut,
208
- showTooltip: !showIconLabels,
209
- variant: showIconLabels ? 'tertiary' : undefined,
210
- "aria-expanded": isListViewOpen
211
- }), isZoomedOutViewExperimentEnabled && !isDistractionFree && !hasFixedToolbar && (0, _react.createElement)(_components.ToolbarItem, {
212
- as: _components.Button,
213
- className: "edit-site-header-edit-mode__zoom-out-view-toggle",
214
- icon: _icons.chevronUpDown,
215
- isPressed: isZoomedOutView
216
- /* translators: button label text should, if possible, be under 16 characters. */,
217
- label: (0, _i18n.__)('Zoom-out View'),
131
+ }, (0, _react.createElement)(_documentTools.default, {
132
+ blockEditorMode: blockEditorMode,
133
+ isDistractionFree: isDistractionFree,
134
+ showIconLabels: showIconLabels,
135
+ setListViewToggleElement: setListViewToggleElement
136
+ }), isTopToolbar && (0, _react.createElement)(_react.Fragment, null, (0, _react.createElement)("div", {
137
+ className: (0, _classnames.default)('selected-block-tools-wrapper', {
138
+ 'is-collapsed': isBlockToolsCollapsed
139
+ })
140
+ }, (0, _react.createElement)(BlockContextualToolbar, {
141
+ isFixed: true
142
+ })), (0, _react.createElement)(_components.Popover.Slot, {
143
+ ref: blockToolbarRef,
144
+ name: "block-toolbar"
145
+ }), hasBlockSelected && (0, _react.createElement)(_components.Button, {
146
+ className: "edit-site-header-edit-mode__block-tools-toggle",
147
+ icon: isBlockToolsCollapsed ? _icons.next : _icons.previous,
218
148
  onClick: () => {
219
- setPreviewDeviceType('Desktop');
220
- __unstableSetEditorMode(isZoomedOutView ? 'edit' : 'zoom-out');
221
- }
222
- })))), !isDistractionFree && (0, _react.createElement)("div", {
223
- className: "edit-site-header-edit-mode__center"
149
+ setIsBlockToolsCollapsed(collapsed => !collapsed);
150
+ },
151
+ label: isBlockToolsCollapsed ? (0, _i18n.__)('Show block tools') : (0, _i18n.__)('Hide block tools')
152
+ }))), !isDistractionFree && (0, _react.createElement)("div", {
153
+ className: (0, _classnames.default)('edit-site-header-edit-mode__center', {
154
+ 'is-collapsed': !isBlockToolsCollapsed && isLargeViewport
155
+ })
224
156
  }, !hasDefaultEditorCanvasView ? (0, _editorCanvasContainer.getEditorCanvasContainerTitle)(editorCanvasView) : (0, _react.createElement)(_documentActions.default, null)), (0, _react.createElement)("div", {
225
157
  className: "edit-site-header-edit-mode__end"
226
158
  }, (0, _react.createElement)(_components.__unstableMotion.div, {