@wordpress/edit-site 5.28.5 → 5.30.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 (446) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/build/components/actions/index.js +1 -1
  3. package/build/components/actions/index.js.map +1 -1
  4. package/build/components/block-editor/editor-canvas.js +10 -11
  5. package/build/components/block-editor/editor-canvas.js.map +1 -1
  6. package/build/components/block-editor/use-site-editor-settings.js +2 -1
  7. package/build/components/block-editor/use-site-editor-settings.js.map +1 -1
  8. package/build/components/code-editor/index.js +3 -2
  9. package/build/components/code-editor/index.js.map +1 -1
  10. package/build/components/editor/index.js +5 -19
  11. package/build/components/editor/index.js.map +1 -1
  12. package/build/components/editor-canvas-container/index.js +1 -1
  13. package/build/components/editor-canvas-container/index.js.map +1 -1
  14. package/build/components/global-styles/color-palette-panel.js +9 -0
  15. package/build/components/global-styles/color-palette-panel.js.map +1 -1
  16. package/build/components/global-styles/font-families.js +1 -1
  17. package/build/components/global-styles/font-families.js.map +1 -1
  18. package/build/components/global-styles/font-library-modal/collection-font-variant.js.map +1 -1
  19. package/build/components/global-styles/font-library-modal/context.js +11 -0
  20. package/build/components/global-styles/font-library-modal/context.js.map +1 -1
  21. package/build/components/global-styles/font-library-modal/font-collection.js +5 -16
  22. package/build/components/global-styles/font-library-modal/font-collection.js.map +1 -1
  23. package/build/components/global-styles/font-library-modal/index.js +2 -2
  24. package/build/components/global-styles/font-library-modal/index.js.map +1 -1
  25. package/build/components/global-styles/font-library-modal/installed-fonts.js +1 -1
  26. package/build/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
  27. package/build/components/global-styles/font-library-modal/library-font-variant.js.map +1 -1
  28. package/build/components/global-styles/font-library-modal/upload-fonts.js.map +1 -1
  29. package/build/components/global-styles/font-library-modal/utils/index.js +27 -0
  30. package/build/components/global-styles/font-library-modal/utils/index.js.map +1 -1
  31. package/build/components/global-styles/font-library-modal/utils/preview-styles.js +1 -1
  32. package/build/components/global-styles/font-library-modal/utils/preview-styles.js.map +1 -1
  33. package/build/components/global-styles/gradients-palette-panel.js.map +1 -1
  34. package/build/components/global-styles/header.js +1 -1
  35. package/build/components/global-styles/header.js.map +1 -1
  36. package/build/components/global-styles/highlighted-colors.js +50 -0
  37. package/build/components/global-styles/highlighted-colors.js.map +1 -0
  38. package/build/components/global-styles/preview-colors.js +62 -0
  39. package/build/components/global-styles/preview-colors.js.map +1 -0
  40. package/build/components/global-styles/preview-iframe.js +131 -0
  41. package/build/components/global-styles/preview-iframe.js.map +1 -0
  42. package/build/components/global-styles/preview-styles.js +163 -0
  43. package/build/components/global-styles/preview-styles.js.map +1 -0
  44. package/build/components/global-styles/preview-typography.js +65 -0
  45. package/build/components/global-styles/preview-typography.js.map +1 -0
  46. package/build/components/global-styles/screen-block-list.js +1 -1
  47. package/build/components/global-styles/screen-block-list.js.map +1 -1
  48. package/build/components/global-styles/screen-block.js +1 -1
  49. package/build/components/global-styles/screen-block.js.map +1 -1
  50. package/build/components/global-styles/screen-colors.js +10 -2
  51. package/build/components/global-styles/screen-colors.js.map +1 -1
  52. package/build/components/global-styles/screen-root.js +2 -2
  53. package/build/components/global-styles/screen-root.js.map +1 -1
  54. package/build/components/global-styles/screen-typography.js +10 -2
  55. package/build/components/global-styles/screen-typography.js.map +1 -1
  56. package/build/components/global-styles/style-variations-container.js +12 -84
  57. package/build/components/global-styles/style-variations-container.js.map +1 -1
  58. package/build/components/global-styles/{typogrphy-elements.js → typography-elements.js} +1 -1
  59. package/build/components/global-styles/typography-elements.js.map +1 -0
  60. package/build/components/global-styles/utils.js +22 -0
  61. package/build/components/global-styles/utils.js.map +1 -1
  62. package/build/components/global-styles/variations/variation.js +90 -0
  63. package/build/components/global-styles/variations/variation.js.map +1 -0
  64. package/build/components/global-styles/variations/variations-color.js +36 -0
  65. package/build/components/global-styles/variations/variations-color.js.map +1 -0
  66. package/build/components/global-styles/{variations-panel.js → variations/variations-panel.js} +1 -1
  67. package/build/components/global-styles/variations/variations-panel.js.map +1 -0
  68. package/build/components/global-styles/variations/variations-typography.js +64 -0
  69. package/build/components/global-styles/variations/variations-typography.js.map +1 -0
  70. package/build/components/header-edit-mode/document-tools/index.js +1 -2
  71. package/build/components/header-edit-mode/document-tools/index.js.map +1 -1
  72. package/build/components/header-edit-mode/index.js +16 -13
  73. package/build/components/header-edit-mode/index.js.map +1 -1
  74. package/build/components/header-edit-mode/more-menu/index.js +17 -6
  75. package/build/components/header-edit-mode/more-menu/index.js.map +1 -1
  76. package/build/components/keyboard-shortcuts/edit-mode.js +0 -13
  77. package/build/components/keyboard-shortcuts/edit-mode.js.map +1 -1
  78. package/build/components/keyboard-shortcuts/register.js +0 -18
  79. package/build/components/keyboard-shortcuts/register.js.map +1 -1
  80. package/build/components/layout/index.js +4 -2
  81. package/build/components/layout/index.js.map +1 -1
  82. package/build/components/page-patterns/dataviews-pattern-actions.js +25 -8
  83. package/build/components/page-patterns/dataviews-pattern-actions.js.map +1 -1
  84. package/build/components/page-patterns/header.js +2 -1
  85. package/build/components/page-patterns/header.js.map +1 -1
  86. package/build/components/page-patterns/index.js +0 -1
  87. package/build/components/page-patterns/index.js.map +1 -1
  88. package/build/components/{list/added-by.js → page-templates-template-parts/hooks.js} +1 -61
  89. package/build/components/page-templates-template-parts/hooks.js.map +1 -0
  90. package/build/components/page-templates-template-parts/index.js +14 -6
  91. package/build/components/page-templates-template-parts/index.js.map +1 -1
  92. package/build/components/revisions/index.js.map +1 -1
  93. package/build/components/save-button/index.js +2 -1
  94. package/build/components/save-button/index.js.map +1 -1
  95. package/build/components/save-panel/index.js +18 -3
  96. package/build/components/save-panel/index.js.map +1 -1
  97. package/build/components/sidebar/index.js +1 -1
  98. package/build/components/sidebar/index.js.map +1 -1
  99. package/build/components/sidebar-edit-mode/global-styles-sidebar.js +5 -5
  100. package/build/components/sidebar-edit-mode/global-styles-sidebar.js.map +1 -1
  101. package/build/components/sidebar-edit-mode/page-panels/page-status.js.map +1 -1
  102. package/build/components/sidebar-edit-mode/template-panel/hooks.js +20 -5
  103. package/build/components/sidebar-edit-mode/template-panel/hooks.js.map +1 -1
  104. package/build/components/sidebar-edit-mode/template-panel/index.js +48 -5
  105. package/build/components/sidebar-edit-mode/template-panel/index.js.map +1 -1
  106. package/build/components/sidebar-edit-mode/template-panel/template-actions.js +2 -9
  107. package/build/components/sidebar-edit-mode/template-panel/template-actions.js.map +1 -1
  108. package/build/components/sidebar-navigation-screen-global-styles/index.js +6 -2
  109. package/build/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  110. package/build/components/sidebar-navigation-screen-main/index.js +1 -2
  111. package/build/components/sidebar-navigation-screen-main/index.js.map +1 -1
  112. package/build/components/sidebar-navigation-screen-navigation-menu/delete-modal.js.map +1 -1
  113. package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +0 -3
  114. package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -1
  115. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js.map +1 -1
  116. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js.map +1 -1
  117. package/build/components/sidebar-navigation-screen-pattern/use-pattern-details.js +2 -2
  118. package/build/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +1 -1
  119. package/build/components/sidebar-navigation-screen-template/index.js +2 -2
  120. package/build/components/sidebar-navigation-screen-template/index.js.map +1 -1
  121. package/build/components/sidebar-navigation-screen-templates-browse/content.js +2 -2
  122. package/build/components/sidebar-navigation-screen-templates-browse/content.js.map +1 -1
  123. package/build/components/start-template-options/index.js.map +1 -1
  124. package/build/hooks/commands/use-edit-mode-commands.js +3 -171
  125. package/build/hooks/commands/use-edit-mode-commands.js.map +1 -1
  126. package/build/hooks/index.js +0 -1
  127. package/build/hooks/index.js.map +1 -1
  128. package/build/hooks/push-changes-to-global-styles/index.js +4 -5
  129. package/build/hooks/push-changes-to-global-styles/index.js.map +1 -1
  130. package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +156 -0
  131. package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -0
  132. package/build/store/actions.js +19 -50
  133. package/build/store/actions.js.map +1 -1
  134. package/build/utils/clone-deep.js +15 -0
  135. package/build/utils/clone-deep.js.map +1 -0
  136. package/build-module/components/actions/index.js +1 -1
  137. package/build-module/components/actions/index.js.map +1 -1
  138. package/build-module/components/block-editor/editor-canvas.js +10 -11
  139. package/build-module/components/block-editor/editor-canvas.js.map +1 -1
  140. package/build-module/components/block-editor/use-site-editor-settings.js +2 -1
  141. package/build-module/components/block-editor/use-site-editor-settings.js.map +1 -1
  142. package/build-module/components/code-editor/index.js +3 -2
  143. package/build-module/components/code-editor/index.js.map +1 -1
  144. package/build-module/components/editor/index.js +6 -20
  145. package/build-module/components/editor/index.js.map +1 -1
  146. package/build-module/components/editor-canvas-container/index.js +2 -2
  147. package/build-module/components/editor-canvas-container/index.js.map +1 -1
  148. package/build-module/components/global-styles/color-palette-panel.js +8 -0
  149. package/build-module/components/global-styles/color-palette-panel.js.map +1 -1
  150. package/build-module/components/global-styles/font-families.js +1 -1
  151. package/build-module/components/global-styles/font-families.js.map +1 -1
  152. package/build-module/components/global-styles/font-library-modal/collection-font-variant.js.map +1 -1
  153. package/build-module/components/global-styles/font-library-modal/context.js +12 -1
  154. package/build-module/components/global-styles/font-library-modal/context.js.map +1 -1
  155. package/build-module/components/global-styles/font-library-modal/font-collection.js +7 -18
  156. package/build-module/components/global-styles/font-library-modal/font-collection.js.map +1 -1
  157. package/build-module/components/global-styles/font-library-modal/index.js +2 -2
  158. package/build-module/components/global-styles/font-library-modal/index.js.map +1 -1
  159. package/build-module/components/global-styles/font-library-modal/installed-fonts.js +1 -1
  160. package/build-module/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
  161. package/build-module/components/global-styles/font-library-modal/library-font-variant.js.map +1 -1
  162. package/build-module/components/global-styles/font-library-modal/upload-fonts.js.map +1 -1
  163. package/build-module/components/global-styles/font-library-modal/utils/index.js +26 -0
  164. package/build-module/components/global-styles/font-library-modal/utils/index.js.map +1 -1
  165. package/build-module/components/global-styles/font-library-modal/utils/preview-styles.js +1 -1
  166. package/build-module/components/global-styles/font-library-modal/utils/preview-styles.js.map +1 -1
  167. package/build-module/components/global-styles/gradients-palette-panel.js.map +1 -1
  168. package/build-module/components/global-styles/header.js +1 -1
  169. package/build-module/components/global-styles/header.js.map +1 -1
  170. package/build-module/components/global-styles/highlighted-colors.js +43 -0
  171. package/build-module/components/global-styles/highlighted-colors.js.map +1 -0
  172. package/build-module/components/global-styles/preview-colors.js +54 -0
  173. package/build-module/components/global-styles/preview-colors.js.map +1 -0
  174. package/build-module/components/global-styles/preview-iframe.js +124 -0
  175. package/build-module/components/global-styles/preview-iframe.js.map +1 -0
  176. package/build-module/components/global-styles/preview-styles.js +155 -0
  177. package/build-module/components/global-styles/preview-styles.js.map +1 -0
  178. package/build-module/components/global-styles/preview-typography.js +58 -0
  179. package/build-module/components/global-styles/preview-typography.js.map +1 -0
  180. package/build-module/components/global-styles/screen-block-list.js +1 -1
  181. package/build-module/components/global-styles/screen-block-list.js.map +1 -1
  182. package/build-module/components/global-styles/screen-block.js +1 -1
  183. package/build-module/components/global-styles/screen-block.js.map +1 -1
  184. package/build-module/components/global-styles/screen-colors.js +10 -2
  185. package/build-module/components/global-styles/screen-colors.js.map +1 -1
  186. package/build-module/components/global-styles/screen-root.js +2 -2
  187. package/build-module/components/global-styles/screen-root.js.map +1 -1
  188. package/build-module/components/global-styles/screen-typography.js +10 -2
  189. package/build-module/components/global-styles/screen-typography.js.map +1 -1
  190. package/build-module/components/global-styles/style-variations-container.js +13 -85
  191. package/build-module/components/global-styles/style-variations-container.js.map +1 -1
  192. package/build-module/components/global-styles/{typogrphy-elements.js → typography-elements.js} +1 -1
  193. package/build-module/components/global-styles/typography-elements.js.map +1 -0
  194. package/build-module/components/global-styles/utils.js +21 -0
  195. package/build-module/components/global-styles/utils.js.map +1 -1
  196. package/build-module/components/global-styles/variations/variation.js +82 -0
  197. package/build-module/components/global-styles/variations/variation.js.map +1 -0
  198. package/build-module/components/global-styles/variations/variations-color.js +28 -0
  199. package/build-module/components/global-styles/variations/variations-color.js.map +1 -0
  200. package/build-module/components/global-styles/{variations-panel.js → variations/variations-panel.js} +1 -1
  201. package/build-module/components/global-styles/variations/variations-panel.js.map +1 -0
  202. package/build-module/components/global-styles/variations/variations-typography.js +56 -0
  203. package/build-module/components/global-styles/variations/variations-typography.js.map +1 -0
  204. package/build-module/components/header-edit-mode/document-tools/index.js +1 -2
  205. package/build-module/components/header-edit-mode/document-tools/index.js.map +1 -1
  206. package/build-module/components/header-edit-mode/index.js +17 -14
  207. package/build-module/components/header-edit-mode/index.js.map +1 -1
  208. package/build-module/components/header-edit-mode/more-menu/index.js +19 -8
  209. package/build-module/components/header-edit-mode/more-menu/index.js.map +1 -1
  210. package/build-module/components/keyboard-shortcuts/edit-mode.js +0 -13
  211. package/build-module/components/keyboard-shortcuts/edit-mode.js.map +1 -1
  212. package/build-module/components/keyboard-shortcuts/register.js +0 -18
  213. package/build-module/components/keyboard-shortcuts/register.js.map +1 -1
  214. package/build-module/components/layout/index.js +5 -3
  215. package/build-module/components/layout/index.js.map +1 -1
  216. package/build-module/components/page-patterns/dataviews-pattern-actions.js +25 -8
  217. package/build-module/components/page-patterns/dataviews-pattern-actions.js.map +1 -1
  218. package/build-module/components/page-patterns/header.js +2 -1
  219. package/build-module/components/page-patterns/header.js.map +1 -1
  220. package/build-module/components/page-patterns/index.js +0 -1
  221. package/build-module/components/page-patterns/index.js.map +1 -1
  222. package/build-module/components/{list/added-by.js → page-templates-template-parts/hooks.js} +2 -59
  223. package/build-module/components/page-templates-template-parts/hooks.js.map +1 -0
  224. package/build-module/components/page-templates-template-parts/index.js +13 -5
  225. package/build-module/components/page-templates-template-parts/index.js.map +1 -1
  226. package/build-module/components/revisions/index.js.map +1 -1
  227. package/build-module/components/save-button/index.js +2 -1
  228. package/build-module/components/save-button/index.js.map +1 -1
  229. package/build-module/components/save-panel/index.js +18 -3
  230. package/build-module/components/save-panel/index.js.map +1 -1
  231. package/build-module/components/sidebar/index.js +1 -1
  232. package/build-module/components/sidebar/index.js.map +1 -1
  233. package/build-module/components/sidebar-edit-mode/global-styles-sidebar.js +5 -5
  234. package/build-module/components/sidebar-edit-mode/global-styles-sidebar.js.map +1 -1
  235. package/build-module/components/sidebar-edit-mode/page-panels/page-status.js.map +1 -1
  236. package/build-module/components/sidebar-edit-mode/template-panel/hooks.js +20 -5
  237. package/build-module/components/sidebar-edit-mode/template-panel/hooks.js.map +1 -1
  238. package/build-module/components/sidebar-edit-mode/template-panel/index.js +50 -7
  239. package/build-module/components/sidebar-edit-mode/template-panel/index.js.map +1 -1
  240. package/build-module/components/sidebar-edit-mode/template-panel/template-actions.js +2 -9
  241. package/build-module/components/sidebar-edit-mode/template-panel/template-actions.js.map +1 -1
  242. package/build-module/components/sidebar-navigation-screen-global-styles/index.js +6 -2
  243. package/build-module/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  244. package/build-module/components/sidebar-navigation-screen-main/index.js +1 -2
  245. package/build-module/components/sidebar-navigation-screen-main/index.js.map +1 -1
  246. package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-modal.js.map +1 -1
  247. package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +0 -3
  248. package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -1
  249. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js.map +1 -1
  250. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js.map +1 -1
  251. package/build-module/components/sidebar-navigation-screen-pattern/use-pattern-details.js +1 -1
  252. package/build-module/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +1 -1
  253. package/build-module/components/sidebar-navigation-screen-template/index.js +1 -1
  254. package/build-module/components/sidebar-navigation-screen-template/index.js.map +1 -1
  255. package/build-module/components/sidebar-navigation-screen-templates-browse/content.js +1 -1
  256. package/build-module/components/sidebar-navigation-screen-templates-browse/content.js.map +1 -1
  257. package/build-module/components/start-template-options/index.js.map +1 -1
  258. package/build-module/hooks/commands/use-edit-mode-commands.js +4 -172
  259. package/build-module/hooks/commands/use-edit-mode-commands.js.map +1 -1
  260. package/build-module/hooks/index.js +0 -1
  261. package/build-module/hooks/index.js.map +1 -1
  262. package/build-module/hooks/push-changes-to-global-styles/index.js +1 -3
  263. package/build-module/hooks/push-changes-to-global-styles/index.js.map +1 -1
  264. package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +144 -0
  265. package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -0
  266. package/build-module/store/actions.js +19 -50
  267. package/build-module/store/actions.js.map +1 -1
  268. package/build-module/utils/clone-deep.js +9 -0
  269. package/build-module/utils/clone-deep.js.map +1 -0
  270. package/build-style/style-rtl.css +152 -472
  271. package/build-style/style.css +152 -472
  272. package/package.json +43 -42
  273. package/src/components/actions/index.js +1 -1
  274. package/src/components/block-editor/editor-canvas.js +13 -12
  275. package/src/components/block-editor/style.scss +0 -3
  276. package/src/components/block-editor/use-site-editor-settings.js +1 -0
  277. package/src/components/code-editor/index.js +3 -2
  278. package/src/components/editor/index.js +10 -27
  279. package/src/components/editor-canvas-container/index.js +2 -5
  280. package/src/components/{test → error-boundary/test}/error-boundary.js +7 -5
  281. package/src/components/global-styles/color-palette-panel.js +11 -1
  282. package/src/components/global-styles/font-families.js +1 -1
  283. package/src/components/global-styles/font-library-modal/collection-font-variant.js +1 -1
  284. package/src/components/global-styles/font-library-modal/context.js +24 -0
  285. package/src/components/global-styles/font-library-modal/font-collection.js +7 -24
  286. package/src/components/global-styles/font-library-modal/index.js +2 -2
  287. package/src/components/global-styles/font-library-modal/installed-fonts.js +1 -1
  288. package/src/components/global-styles/font-library-modal/library-font-variant.js +1 -1
  289. package/src/components/global-styles/font-library-modal/upload-fonts.js +1 -1
  290. package/src/components/global-styles/font-library-modal/utils/index.js +34 -0
  291. package/src/components/global-styles/font-library-modal/utils/preview-styles.js +2 -1
  292. package/src/components/global-styles/gradients-palette-panel.js +2 -2
  293. package/src/components/global-styles/header.js +1 -1
  294. package/src/components/global-styles/highlighted-colors.js +39 -0
  295. package/src/components/global-styles/preview-colors.js +61 -0
  296. package/src/components/global-styles/preview-iframe.js +153 -0
  297. package/src/components/global-styles/preview-styles.js +185 -0
  298. package/src/components/global-styles/preview-typography.js +62 -0
  299. package/src/components/global-styles/screen-block-list.js +1 -1
  300. package/src/components/global-styles/screen-block.js +4 -1
  301. package/src/components/global-styles/screen-colors.js +13 -1
  302. package/src/components/global-styles/screen-revisions/style.scss +2 -2
  303. package/src/components/global-styles/screen-root.js +2 -2
  304. package/src/components/global-styles/screen-typography.js +19 -2
  305. package/src/components/global-styles/style-variations-container.js +14 -92
  306. package/src/components/global-styles/style.scss +1 -35
  307. package/src/components/global-styles/utils.js +37 -0
  308. package/src/components/global-styles/variations/style.scss +44 -0
  309. package/src/components/global-styles/variations/variation.js +93 -0
  310. package/src/components/global-styles/variations/variations-color.js +30 -0
  311. package/src/components/global-styles/{variations-panel.js → variations/variations-panel.js} +1 -1
  312. package/src/components/global-styles/variations/variations-typography.js +85 -0
  313. package/src/components/header-edit-mode/document-tools/index.js +1 -2
  314. package/src/components/header-edit-mode/index.js +22 -31
  315. package/src/components/header-edit-mode/more-menu/index.js +25 -11
  316. package/src/components/header-edit-mode/style.scss +4 -0
  317. package/src/components/keyboard-shortcuts/edit-mode.js +0 -11
  318. package/src/components/keyboard-shortcuts/register.js +0 -19
  319. package/src/components/layout/index.js +5 -2
  320. package/src/components/page-patterns/dataviews-pattern-actions.js +41 -10
  321. package/src/components/page-patterns/header.js +1 -0
  322. package/src/components/page-patterns/index.js +1 -2
  323. package/src/components/page-patterns/style.scss +0 -182
  324. package/src/components/{list/added-by.js → page-templates-template-parts/hooks.js} +1 -66
  325. package/src/components/page-templates-template-parts/index.js +20 -3
  326. package/src/components/page-templates-template-parts/style.scss +48 -0
  327. package/src/components/revisions/index.js +1 -1
  328. package/src/components/save-button/index.js +2 -1
  329. package/src/components/save-hub/style.scss +1 -1
  330. package/src/components/save-panel/index.js +34 -12
  331. package/src/components/sidebar/index.js +1 -1
  332. package/src/components/sidebar-button/style.scss +1 -1
  333. package/src/components/sidebar-edit-mode/global-styles-sidebar.js +5 -7
  334. package/src/components/sidebar-edit-mode/page-panels/page-status.js +1 -1
  335. package/src/components/sidebar-edit-mode/style.scss +4 -0
  336. package/src/components/sidebar-edit-mode/template-panel/hooks.js +37 -24
  337. package/src/components/sidebar-edit-mode/template-panel/index.js +76 -18
  338. package/src/components/sidebar-edit-mode/template-panel/style.scss +5 -14
  339. package/src/components/sidebar-edit-mode/template-panel/template-actions.js +1 -12
  340. package/src/components/sidebar-navigation-screen-global-styles/index.js +4 -1
  341. package/src/components/sidebar-navigation-screen-main/index.js +0 -2
  342. package/src/components/sidebar-navigation-screen-navigation-menu/delete-modal.js +1 -1
  343. package/src/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +0 -2
  344. package/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js +1 -1
  345. package/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js +1 -1
  346. package/src/components/sidebar-navigation-screen-pattern/use-pattern-details.js +1 -1
  347. package/src/components/sidebar-navigation-screen-template/index.js +1 -1
  348. package/src/components/sidebar-navigation-screen-templates-browse/content.js +1 -1
  349. package/src/components/start-template-options/index.js +1 -1
  350. package/src/hooks/commands/use-edit-mode-commands.js +3 -184
  351. package/src/hooks/index.js +0 -1
  352. package/src/hooks/push-changes-to-global-styles/index.js +1 -4
  353. package/src/hooks/use-theme-style-variations/test/use-theme-style-variations-by-property.js +1137 -0
  354. package/src/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +159 -0
  355. package/src/store/actions.js +21 -85
  356. package/src/store/test/actions.js +0 -75
  357. package/src/style.scss +3 -8
  358. package/src/utils/clone-deep.js +8 -0
  359. package/build/components/global-styles/preview.js +0 -271
  360. package/build/components/global-styles/preview.js.map +0 -1
  361. package/build/components/global-styles/typogrphy-elements.js.map +0 -1
  362. package/build/components/global-styles/variations-panel.js.map +0 -1
  363. package/build/components/header-edit-mode/mode-switcher/index.js +0 -62
  364. package/build/components/header-edit-mode/mode-switcher/index.js.map +0 -1
  365. package/build/components/list/added-by.js.map +0 -1
  366. package/build/components/list/header.js +0 -55
  367. package/build/components/list/header.js.map +0 -1
  368. package/build/components/list/index.js +0 -80
  369. package/build/components/list/index.js.map +0 -1
  370. package/build/components/list/table.js +0 -94
  371. package/build/components/list/table.js.map +0 -1
  372. package/build/components/list/use-register-shortcuts.js +0 -51
  373. package/build/components/list/use-register-shortcuts.js.map +0 -1
  374. package/build/components/page-patterns/duplicate-menu-item.js +0 -93
  375. package/build/components/page-patterns/duplicate-menu-item.js.map +0 -1
  376. package/build/components/page-patterns/grid-item.js +0 -223
  377. package/build/components/page-patterns/grid-item.js.map +0 -1
  378. package/build/components/page-patterns/grid.js +0 -31
  379. package/build/components/page-patterns/grid.js.map +0 -1
  380. package/build/components/page-patterns/no-patterns.js +0 -18
  381. package/build/components/page-patterns/no-patterns.js.map +0 -1
  382. package/build/components/page-patterns/patterns-list.js +0 -168
  383. package/build/components/page-patterns/patterns-list.js.map +0 -1
  384. package/build/components/page-patterns/rename-menu-item.js +0 -105
  385. package/build/components/page-patterns/rename-menu-item.js.map +0 -1
  386. package/build/components/sidebar-edit-mode/template-panel/replace-template-button.js +0 -83
  387. package/build/components/sidebar-edit-mode/template-panel/replace-template-button.js.map +0 -1
  388. package/build/components/sidebar-navigation-screen-main/template-part-hint.js +0 -36
  389. package/build/components/sidebar-navigation-screen-main/template-part-hint.js.map +0 -1
  390. package/build/components/sidebar-navigation-screen-navigation-menu/edit-button.js +0 -36
  391. package/build/components/sidebar-navigation-screen-navigation-menu/edit-button.js.map +0 -1
  392. package/build/hooks/navigation-menu-edit.js +0 -82
  393. package/build/hooks/navigation-menu-edit.js.map +0 -1
  394. package/build-module/components/global-styles/preview.js +0 -264
  395. package/build-module/components/global-styles/preview.js.map +0 -1
  396. package/build-module/components/global-styles/typogrphy-elements.js.map +0 -1
  397. package/build-module/components/global-styles/variations-panel.js.map +0 -1
  398. package/build-module/components/header-edit-mode/mode-switcher/index.js +0 -56
  399. package/build-module/components/header-edit-mode/mode-switcher/index.js.map +0 -1
  400. package/build-module/components/list/added-by.js.map +0 -1
  401. package/build-module/components/list/header.js +0 -47
  402. package/build-module/components/list/header.js.map +0 -1
  403. package/build-module/components/list/index.js +0 -72
  404. package/build-module/components/list/index.js.map +0 -1
  405. package/build-module/components/list/table.js +0 -86
  406. package/build-module/components/list/table.js.map +0 -1
  407. package/build-module/components/list/use-register-shortcuts.js +0 -45
  408. package/build-module/components/list/use-register-shortcuts.js.map +0 -1
  409. package/build-module/components/page-patterns/duplicate-menu-item.js +0 -85
  410. package/build-module/components/page-patterns/duplicate-menu-item.js.map +0 -1
  411. package/build-module/components/page-patterns/grid-item.js +0 -215
  412. package/build-module/components/page-patterns/grid-item.js.map +0 -1
  413. package/build-module/components/page-patterns/grid.js +0 -23
  414. package/build-module/components/page-patterns/grid.js.map +0 -1
  415. package/build-module/components/page-patterns/no-patterns.js +0 -11
  416. package/build-module/components/page-patterns/no-patterns.js.map +0 -1
  417. package/build-module/components/page-patterns/patterns-list.js +0 -160
  418. package/build-module/components/page-patterns/patterns-list.js.map +0 -1
  419. package/build-module/components/page-patterns/rename-menu-item.js +0 -98
  420. package/build-module/components/page-patterns/rename-menu-item.js.map +0 -1
  421. package/build-module/components/sidebar-edit-mode/template-panel/replace-template-button.js +0 -76
  422. package/build-module/components/sidebar-edit-mode/template-panel/replace-template-button.js.map +0 -1
  423. package/build-module/components/sidebar-navigation-screen-main/template-part-hint.js +0 -29
  424. package/build-module/components/sidebar-navigation-screen-main/template-part-hint.js.map +0 -1
  425. package/build-module/components/sidebar-navigation-screen-navigation-menu/edit-button.js +0 -27
  426. package/build-module/components/sidebar-navigation-screen-navigation-menu/edit-button.js.map +0 -1
  427. package/build-module/hooks/navigation-menu-edit.js +0 -75
  428. package/build-module/hooks/navigation-menu-edit.js.map +0 -1
  429. package/src/components/global-styles/preview.js +0 -327
  430. package/src/components/header-edit-mode/mode-switcher/index.js +0 -60
  431. package/src/components/list/header.js +0 -48
  432. package/src/components/list/index.js +0 -87
  433. package/src/components/list/style.scss +0 -188
  434. package/src/components/list/table.js +0 -140
  435. package/src/components/list/use-register-shortcuts.js +0 -49
  436. package/src/components/page-patterns/duplicate-menu-item.js +0 -105
  437. package/src/components/page-patterns/grid-item.js +0 -331
  438. package/src/components/page-patterns/grid.js +0 -22
  439. package/src/components/page-patterns/no-patterns.js +0 -12
  440. package/src/components/page-patterns/patterns-list.js +0 -229
  441. package/src/components/page-patterns/rename-menu-item.js +0 -132
  442. package/src/components/sidebar-edit-mode/template-panel/replace-template-button.js +0 -89
  443. package/src/components/sidebar-navigation-screen-main/template-part-hint.js +0 -34
  444. package/src/components/sidebar-navigation-screen-navigation-menu/edit-button.js +0 -22
  445. package/src/hooks/navigation-menu-edit.js +0 -92
  446. /package/src/components/global-styles/{typogrphy-elements.js → typography-elements.js} +0 -0
@@ -0,0 +1,90 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = Variation;
8
+ var _react = require("react");
9
+ var _classnames = _interopRequireDefault(require("classnames"));
10
+ var _element = require("@wordpress/element");
11
+ var _keycodes = require("@wordpress/keycodes");
12
+ var _i18n = require("@wordpress/i18n");
13
+ var _blockEditor = require("@wordpress/block-editor");
14
+ var _globalStylesProvider = require("../global-styles-provider");
15
+ var _lockUnlock = require("../../../lock-unlock");
16
+ /**
17
+ * External dependencies
18
+ */
19
+
20
+ /**
21
+ * WordPress dependencies
22
+ */
23
+
24
+ /**
25
+ * Internal dependencies
26
+ */
27
+
28
+ const {
29
+ GlobalStylesContext,
30
+ areGlobalStyleConfigsEqual
31
+ } = (0, _lockUnlock.unlock)(_blockEditor.privateApis);
32
+ function Variation({
33
+ variation,
34
+ children
35
+ }) {
36
+ const [isFocused, setIsFocused] = (0, _element.useState)(false);
37
+ const {
38
+ base,
39
+ user,
40
+ setUserConfig
41
+ } = (0, _element.useContext)(GlobalStylesContext);
42
+ const context = (0, _element.useMemo)(() => {
43
+ var _variation$settings, _variation$styles;
44
+ return {
45
+ user: {
46
+ settings: (_variation$settings = variation.settings) !== null && _variation$settings !== void 0 ? _variation$settings : {},
47
+ styles: (_variation$styles = variation.styles) !== null && _variation$styles !== void 0 ? _variation$styles : {}
48
+ },
49
+ base,
50
+ merged: (0, _globalStylesProvider.mergeBaseAndUserConfigs)(base, variation),
51
+ setUserConfig: () => {}
52
+ };
53
+ }, [variation, base]);
54
+ const selectVariation = () => {
55
+ setUserConfig(() => ({
56
+ settings: variation.settings,
57
+ styles: variation.styles
58
+ }));
59
+ };
60
+ const selectOnEnter = event => {
61
+ if (event.keyCode === _keycodes.ENTER) {
62
+ event.preventDefault();
63
+ selectVariation();
64
+ }
65
+ };
66
+ const isActive = (0, _element.useMemo)(() => areGlobalStyleConfigsEqual(user, variation), [user, variation]);
67
+ let label = variation?.title;
68
+ if (variation?.description) {
69
+ label = (0, _i18n.sprintf)( /* translators: %1$s: variation title. %2$s variation description. */
70
+ (0, _i18n.__)('%1$s (%2$s)'), variation?.title, variation?.description);
71
+ }
72
+ return (0, _react.createElement)(GlobalStylesContext.Provider, {
73
+ value: context
74
+ }, (0, _react.createElement)("div", {
75
+ className: (0, _classnames.default)('edit-site-global-styles-variations_item', {
76
+ 'is-active': isActive
77
+ }),
78
+ role: "button",
79
+ onClick: selectVariation,
80
+ onKeyDown: selectOnEnter,
81
+ tabIndex: "0",
82
+ "aria-label": label,
83
+ "aria-current": isActive,
84
+ onFocus: () => setIsFocused(true),
85
+ onBlur: () => setIsFocused(false)
86
+ }, (0, _react.createElement)("div", {
87
+ className: "edit-site-global-styles-variations_item-preview"
88
+ }, children(isFocused))));
89
+ }
90
+ //# sourceMappingURL=variation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_classnames","_interopRequireDefault","require","_element","_keycodes","_i18n","_blockEditor","_globalStylesProvider","_lockUnlock","GlobalStylesContext","areGlobalStyleConfigsEqual","unlock","blockEditorPrivateApis","Variation","variation","children","isFocused","setIsFocused","useState","base","user","setUserConfig","useContext","context","useMemo","_variation$settings","_variation$styles","settings","styles","merged","mergeBaseAndUserConfigs","selectVariation","selectOnEnter","event","keyCode","ENTER","preventDefault","isActive","label","title","description","sprintf","__","_react","createElement","Provider","value","className","classnames","role","onClick","onKeyDown","tabIndex","onFocus","onBlur"],"sources":["@wordpress/edit-site/src/components/global-styles/variations/variation.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo, useContext, useState } from '@wordpress/element';\nimport { ENTER } from '@wordpress/keycodes';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { mergeBaseAndUserConfigs } from '../global-styles-provider';\nimport { unlock } from '../../../lock-unlock';\n\nconst { GlobalStylesContext, areGlobalStyleConfigsEqual } = unlock(\n\tblockEditorPrivateApis\n);\n\nexport default function Variation( { variation, children } ) {\n\tconst [ isFocused, setIsFocused ] = useState( false );\n\tconst { base, user, setUserConfig } = useContext( GlobalStylesContext );\n\tconst context = useMemo(\n\t\t() => ( {\n\t\t\tuser: {\n\t\t\t\tsettings: variation.settings ?? {},\n\t\t\t\tstyles: variation.styles ?? {},\n\t\t\t},\n\t\t\tbase,\n\t\t\tmerged: mergeBaseAndUserConfigs( base, variation ),\n\t\t\tsetUserConfig: () => {},\n\t\t} ),\n\t\t[ variation, base ]\n\t);\n\n\tconst selectVariation = () => {\n\t\tsetUserConfig( () => ( {\n\t\t\tsettings: variation.settings,\n\t\t\tstyles: variation.styles,\n\t\t} ) );\n\t};\n\n\tconst selectOnEnter = ( event ) => {\n\t\tif ( event.keyCode === ENTER ) {\n\t\t\tevent.preventDefault();\n\t\t\tselectVariation();\n\t\t}\n\t};\n\n\tconst isActive = useMemo(\n\t\t() => areGlobalStyleConfigsEqual( user, variation ),\n\t\t[ user, variation ]\n\t);\n\n\tlet label = variation?.title;\n\tif ( variation?.description ) {\n\t\tlabel = sprintf(\n\t\t\t/* translators: %1$s: variation title. %2$s variation description. */\n\t\t\t__( '%1$s (%2$s)' ),\n\t\t\tvariation?.title,\n\t\t\tvariation?.description\n\t\t);\n\t}\n\n\treturn (\n\t\t<GlobalStylesContext.Provider value={ context }>\n\t\t\t<div\n\t\t\t\tclassName={ classnames(\n\t\t\t\t\t'edit-site-global-styles-variations_item',\n\t\t\t\t\t{\n\t\t\t\t\t\t'is-active': isActive,\n\t\t\t\t\t}\n\t\t\t\t) }\n\t\t\t\trole=\"button\"\n\t\t\t\tonClick={ selectVariation }\n\t\t\t\tonKeyDown={ selectOnEnter }\n\t\t\t\ttabIndex=\"0\"\n\t\t\t\taria-label={ label }\n\t\t\t\taria-current={ isActive }\n\t\t\t\tonFocus={ () => setIsFocused( true ) }\n\t\t\t\tonBlur={ () => setIsFocused( false ) }\n\t\t\t>\n\t\t\t\t<div className=\"edit-site-global-styles-variations_item-preview\">\n\t\t\t\t\t{ children( isFocused ) }\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</GlobalStylesContext.Provider>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AAKA,IAAAK,qBAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AAjBA;AACA;AACA;;AAGA;AACA;AACA;;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,gBAAO,EACvB,MAAMd,0BAA0B,CAAEU,IAAI,EAAEN,SAAU,CAAC,EACnD,CAAEM,IAAI,EAAEN,SAAS,CAClB,CAAC;EAED,IAAIwB,KAAK,GAAGxB,SAAS,EAAEyB,KAAK;EAC5B,IAAKzB,SAAS,EAAE0B,WAAW,EAAG;IAC7BF,KAAK,GAAG,IAAAG,aAAO,GACd;IACA,IAAAC,QAAE,EAAE,aAAc,CAAC,EACnB5B,SAAS,EAAEyB,KAAK,EAChBzB,SAAS,EAAE0B,WACZ,CAAC;EACF;EAEA,OACC,IAAAG,MAAA,CAAAC,aAAA,EAACnC,mBAAmB,CAACoC,QAAQ;IAACC,KAAK,EAAGvB;EAAS,GAC9C,IAAAoB,MAAA,CAAAC,aAAA;IACCG,SAAS,EAAG,IAAAC,mBAAU,EACrB,yCAAyC,EACzC;MACC,WAAW,EAAEX;IACd,CACD,CAAG;IACHY,IAAI,EAAC,QAAQ;IACbC,OAAO,EAAGnB,eAAiB;IAC3BoB,SAAS,EAAGnB,aAAe;IAC3BoB,QAAQ,EAAC,GAAG;IACZ,cAAad,KAAO;IACpB,gBAAeD,QAAU;IACzBgB,OAAO,EAAGA,CAAA,KAAMpC,YAAY,CAAE,IAAK,CAAG;IACtCqC,MAAM,EAAGA,CAAA,KAAMrC,YAAY,CAAE,KAAM;EAAG,GAEtC,IAAA0B,MAAA,CAAAC,aAAA;IAAKG,SAAS,EAAC;EAAiD,GAC7DhC,QAAQ,CAAEC,SAAU,CAClB,CACD,CACwB,CAAC;AAEjC"}
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = ColorVariations;
8
+ var _react = require("react");
9
+ var _components = require("@wordpress/components");
10
+ var _i18n = require("@wordpress/i18n");
11
+ var _subtitle = _interopRequireDefault(require("../subtitle"));
12
+ var _variation = _interopRequireDefault(require("./variation"));
13
+ var _previewColors = _interopRequireDefault(require("../preview-colors"));
14
+ /**
15
+ * WordPress dependencies
16
+ */
17
+
18
+ /**
19
+ * Internal dependencies
20
+ */
21
+
22
+ function ColorVariations({
23
+ variations
24
+ }) {
25
+ return (0, _react.createElement)(_components.__experimentalVStack, {
26
+ spacing: 3
27
+ }, (0, _react.createElement)(_subtitle.default, {
28
+ level: 3
29
+ }, (0, _i18n.__)('Presets')), (0, _react.createElement)(_components.__experimentalGrid, {
30
+ columns: 3
31
+ }, variations.map((variation, index) => (0, _react.createElement)(_variation.default, {
32
+ key: index,
33
+ variation: variation
34
+ }, () => (0, _react.createElement)(_previewColors.default, null)))));
35
+ }
36
+ //# sourceMappingURL=variations-color.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_components","require","_i18n","_subtitle","_interopRequireDefault","_variation","_previewColors","ColorVariations","variations","_react","createElement","__experimentalVStack","spacing","default","level","__","__experimentalGrid","columns","map","variation","index","key"],"sources":["@wordpress/edit-site/src/components/global-styles/variations/variations-color.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalGrid as Grid,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport Subtitle from '../subtitle';\nimport Variation from './variation';\nimport StylesPreviewColors from '../preview-colors';\n\nexport default function ColorVariations( { variations } ) {\n\treturn (\n\t\t<VStack spacing={ 3 }>\n\t\t\t<Subtitle level={ 3 }>{ __( 'Presets' ) }</Subtitle>\n\t\t\t<Grid columns={ 3 }>\n\t\t\t\t{ variations.map( ( variation, index ) => (\n\t\t\t\t\t<Variation key={ index } variation={ variation }>\n\t\t\t\t\t\t{ () => <StylesPreviewColors /> }\n\t\t\t\t\t</Variation>\n\t\t\t\t) ) }\n\t\t\t</Grid>\n\t\t</VStack>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAIA,IAAAC,KAAA,GAAAD,OAAA;AAKA,IAAAE,SAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,UAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,cAAA,GAAAF,sBAAA,CAAAH,OAAA;AAdA;AACA;AACA;;AAOA;AACA;AACA;;AAKe,SAASM,eAAeA,CAAE;EAAEC;AAAW,CAAC,EAAG;EACzD,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACV,WAAA,CAAAW,oBAAM;IAACC,OAAO,EAAG;EAAG,GACpB,IAAAH,MAAA,CAAAC,aAAA,EAACP,SAAA,CAAAU,OAAQ;IAACC,KAAK,EAAG;EAAG,GAAG,IAAAC,QAAE,EAAE,SAAU,CAAa,CAAC,EACpD,IAAAN,MAAA,CAAAC,aAAA,EAACV,WAAA,CAAAgB,kBAAI;IAACC,OAAO,EAAG;EAAG,GAChBT,UAAU,CAACU,GAAG,CAAE,CAAEC,SAAS,EAAEC,KAAK,KACnC,IAAAX,MAAA,CAAAC,aAAA,EAACL,UAAA,CAAAQ,OAAS;IAACQ,GAAG,EAAGD,KAAO;IAACD,SAAS,EAAGA;EAAW,GAC7C,MAAM,IAAAV,MAAA,CAAAC,aAAA,EAACJ,cAAA,CAAAO,OAAmB,MAAE,CACpB,CACV,CACG,CACC,CAAC;AAEX"}
@@ -9,7 +9,7 @@ var _react = require("react");
9
9
  var _blocks = require("@wordpress/blocks");
10
10
  var _data = require("@wordpress/data");
11
11
  var _components = require("@wordpress/components");
12
- var _navigationButton = require("./navigation-button");
12
+ var _navigationButton = require("../navigation-button");
13
13
  /**
14
14
  * WordPress dependencies
15
15
  */
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_blocks","require","_data","_components","_navigationButton","getCoreBlockStyles","blockStyles","filter","style","source","useBlockVariations","name","useSelect","select","getBlockStyles","blocksStore","coreBlockStyles","VariationsPanel","_react","createElement","__experimentalItemGroup","isBordered","isSeparated","map","index","isDefault","NavigationButtonAsItem","key","path","encodeURIComponent","label"],"sources":["@wordpress/edit-site/src/components/global-styles/variations/variations-panel.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport { useSelect } from '@wordpress/data';\nimport { __experimentalItemGroup as ItemGroup } from '@wordpress/components';\n/**\n * Internal dependencies\n */\n\nimport { NavigationButtonAsItem } from '../navigation-button';\n\nfunction getCoreBlockStyles( blockStyles ) {\n\treturn blockStyles?.filter( ( style ) => style.source === 'block' );\n}\n\nexport function useBlockVariations( name ) {\n\tconst blockStyles = 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\tconst coreBlockStyles = getCoreBlockStyles( blockStyles );\n\treturn coreBlockStyles;\n}\n\nexport function VariationsPanel( { name } ) {\n\tconst coreBlockStyles = useBlockVariations( name );\n\n\treturn (\n\t\t<ItemGroup isBordered isSeparated>\n\t\t\t{ coreBlockStyles.map( ( style, index ) => {\n\t\t\t\tif ( style?.isDefault ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\treturn (\n\t\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\tpath={\n\t\t\t\t\t\t\t'/blocks/' +\n\t\t\t\t\t\t\tencodeURIComponent( name ) +\n\t\t\t\t\t\t\t'/variations/' +\n\t\t\t\t\t\t\tencodeURIComponent( style.name )\n\t\t\t\t\t\t}\n\t\t\t\t\t\taria-label={ style.label }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ style.label }\n\t\t\t\t\t</NavigationButtonAsItem>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</ItemGroup>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAKA,IAAAG,iBAAA,GAAAH,OAAA;AAVA;AACA;AACA;;AAIA;AACA;AACA;;AAIA,SAASI,kBAAkBA,CAAEC,WAAW,EAAG;EAC1C,OAAOA,WAAW,EAAEC,MAAM,CAAIC,KAAK,IAAMA,KAAK,CAACC,MAAM,KAAK,OAAQ,CAAC;AACpE;AAEO,SAASC,kBAAkBA,CAAEC,IAAI,EAAG;EAC1C,MAAML,WAAW,GAAG,IAAAM,eAAS,EAC1BC,MAAM,IAAM;IACb,MAAM;MAAEC;IAAe,CAAC,GAAGD,MAAM,CAAEE,aAAY,CAAC;IAChD,OAAOD,cAAc,CAAEH,IAAK,CAAC;EAC9B,CAAC,EACD,CAAEA,IAAI,CACP,CAAC;EACD,MAAMK,eAAe,GAAGX,kBAAkB,CAAEC,WAAY,CAAC;EACzD,OAAOU,eAAe;AACvB;AAEO,SAASC,eAAeA,CAAE;EAAEN;AAAK,CAAC,EAAG;EAC3C,MAAMK,eAAe,GAAGN,kBAAkB,CAAEC,IAAK,CAAC;EAElD,OACC,IAAAO,MAAA,CAAAC,aAAA,EAAChB,WAAA,CAAAiB,uBAAS;IAACC,UAAU;IAACC,WAAW;EAAA,GAC9BN,eAAe,CAACO,GAAG,CAAE,CAAEf,KAAK,EAAEgB,KAAK,KAAM;IAC1C,IAAKhB,KAAK,EAAEiB,SAAS,EAAG;MACvB,OAAO,IAAI;IACZ;IACA,OACC,IAAAP,MAAA,CAAAC,aAAA,EAACf,iBAAA,CAAAsB,sBAAsB;MACtBC,GAAG,EAAGH,KAAO;MACbI,IAAI,EACH,UAAU,GACVC,kBAAkB,CAAElB,IAAK,CAAC,GAC1B,cAAc,GACdkB,kBAAkB,CAAErB,KAAK,CAACG,IAAK,CAC/B;MACD,cAAaH,KAAK,CAACsB;IAAO,GAExBtB,KAAK,CAACsB,KACe,CAAC;EAE3B,CAAE,CACQ,CAAC;AAEd"}
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = TypographyVariations;
8
+ var _react = require("react");
9
+ var _element = require("@wordpress/element");
10
+ var _components = require("@wordpress/components");
11
+ var _i18n = require("@wordpress/i18n");
12
+ var _blockEditor = require("@wordpress/block-editor");
13
+ var _globalStylesProvider = require("../global-styles-provider");
14
+ var _lockUnlock = require("../../../lock-unlock");
15
+ var _useThemeStyleVariationsByProperty = require("../../../hooks/use-theme-style-variations/use-theme-style-variations-by-property");
16
+ var _previewTypography = _interopRequireDefault(require("../preview-typography"));
17
+ var _subtitle = _interopRequireDefault(require("../subtitle"));
18
+ var _utils = require("../utils");
19
+ var _variation = _interopRequireDefault(require("./variation"));
20
+ /**
21
+ * WordPress dependencies
22
+ */
23
+
24
+ /**
25
+ * Internal dependencies
26
+ */
27
+
28
+ const {
29
+ GlobalStylesContext
30
+ } = (0, _lockUnlock.unlock)(_blockEditor.privateApis);
31
+ function TypographyVariations() {
32
+ const typographyVariations = (0, _useThemeStyleVariationsByProperty.useCurrentMergeThemeStyleVariationsWithUserConfig)({
33
+ property: 'typography',
34
+ filter: variation => variation?.settings?.typography?.fontFamilies && Object.keys(variation?.settings?.typography?.fontFamilies).length
35
+ });
36
+ const {
37
+ base
38
+ } = (0, _element.useContext)(GlobalStylesContext);
39
+
40
+ /*
41
+ * Filter duplicate variations based on the font families used in the variation.
42
+ */
43
+ const uniqueTypographyVariations = typographyVariations?.length ? Object.values(typographyVariations.reduce((acc, variation) => {
44
+ const [bodyFontFamily, headingFontFamily] = (0, _utils.getFontFamilies)((0, _globalStylesProvider.mergeBaseAndUserConfigs)(base, variation));
45
+ if (headingFontFamily?.name && bodyFontFamily?.name && !acc[`${headingFontFamily?.name}:${bodyFontFamily?.name}`]) {
46
+ acc[`${headingFontFamily?.name}:${bodyFontFamily?.name}`] = variation;
47
+ }
48
+ return acc;
49
+ }, {})) : [];
50
+ return (0, _react.createElement)(_components.__experimentalVStack, {
51
+ spacing: 3
52
+ }, (0, _react.createElement)(_subtitle.default, {
53
+ level: 3
54
+ }, (0, _i18n.__)('Presets')), (0, _react.createElement)(_components.__experimentalGrid, {
55
+ columns: 3,
56
+ className: "edit-site-global-styles-style-variations-container"
57
+ }, typographyVariations && typographyVariations.length ? uniqueTypographyVariations.map((variation, index) => (0, _react.createElement)(_variation.default, {
58
+ key: index,
59
+ variation: variation
60
+ }, () => (0, _react.createElement)(_previewTypography.default, {
61
+ variation: variation
62
+ }))) : null));
63
+ }
64
+ //# sourceMappingURL=variations-typography.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_element","require","_components","_i18n","_blockEditor","_globalStylesProvider","_lockUnlock","_useThemeStyleVariationsByProperty","_previewTypography","_interopRequireDefault","_subtitle","_utils","_variation","GlobalStylesContext","unlock","blockEditorPrivateApis","TypographyVariations","typographyVariations","useCurrentMergeThemeStyleVariationsWithUserConfig","property","filter","variation","settings","typography","fontFamilies","Object","keys","length","base","useContext","uniqueTypographyVariations","values","reduce","acc","bodyFontFamily","headingFontFamily","getFontFamilies","mergeBaseAndUserConfigs","name","_react","createElement","__experimentalVStack","spacing","default","level","__","__experimentalGrid","columns","className","map","index","key"],"sources":["@wordpress/edit-site/src/components/global-styles/variations/variations-typography.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useContext } from '@wordpress/element';\nimport {\n\t__experimentalGrid as Grid,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { mergeBaseAndUserConfigs } from '../global-styles-provider';\nimport { unlock } from '../../../lock-unlock';\nimport { useCurrentMergeThemeStyleVariationsWithUserConfig } from '../../../hooks/use-theme-style-variations/use-theme-style-variations-by-property';\nimport PreviewTypography from '../preview-typography';\nimport Subtitle from '../subtitle';\nimport { getFontFamilies } from '../utils';\nimport Variation from './variation';\n\nconst { GlobalStylesContext } = unlock( blockEditorPrivateApis );\n\nexport default function TypographyVariations() {\n\tconst typographyVariations =\n\t\tuseCurrentMergeThemeStyleVariationsWithUserConfig( {\n\t\t\tproperty: 'typography',\n\t\t\tfilter: ( variation ) =>\n\t\t\t\tvariation?.settings?.typography?.fontFamilies &&\n\t\t\t\tObject.keys( variation?.settings?.typography?.fontFamilies )\n\t\t\t\t\t.length,\n\t\t} );\n\n\tconst { base } = useContext( GlobalStylesContext );\n\n\t/*\n\t * Filter duplicate variations based on the font families used in the variation.\n\t */\n\tconst uniqueTypographyVariations = typographyVariations?.length\n\t\t? Object.values(\n\t\t\t\ttypographyVariations.reduce( ( acc, variation ) => {\n\t\t\t\t\tconst [ bodyFontFamily, headingFontFamily ] =\n\t\t\t\t\t\tgetFontFamilies(\n\t\t\t\t\t\t\tmergeBaseAndUserConfigs( base, variation )\n\t\t\t\t\t\t);\n\t\t\t\t\tif (\n\t\t\t\t\t\theadingFontFamily?.name &&\n\t\t\t\t\t\tbodyFontFamily?.name &&\n\t\t\t\t\t\t! acc[\n\t\t\t\t\t\t\t`${ headingFontFamily?.name }:${ bodyFontFamily?.name }`\n\t\t\t\t\t\t]\n\t\t\t\t\t) {\n\t\t\t\t\t\tacc[\n\t\t\t\t\t\t\t`${ headingFontFamily?.name }:${ bodyFontFamily?.name }`\n\t\t\t\t\t\t] = variation;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn acc;\n\t\t\t\t}, {} )\n\t\t )\n\t\t: [];\n\n\treturn (\n\t\t<VStack spacing={ 3 }>\n\t\t\t<Subtitle level={ 3 }>{ __( 'Presets' ) }</Subtitle>\n\t\t\t<Grid\n\t\t\t\tcolumns={ 3 }\n\t\t\t\tclassName=\"edit-site-global-styles-style-variations-container\"\n\t\t\t>\n\t\t\t\t{ typographyVariations && typographyVariations.length\n\t\t\t\t\t? uniqueTypographyVariations.map( ( variation, index ) => (\n\t\t\t\t\t\t\t<Variation key={ index } variation={ variation }>\n\t\t\t\t\t\t\t\t{ () => (\n\t\t\t\t\t\t\t\t\t<PreviewTypography\n\t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= require("@wordpress/icons");
13
13
  var _components = require("@wordpress/components");
14
14
  var _editor = require("@wordpress/editor");
15
- var _store = require("../../../store");
16
15
  var _lockUnlock = require("../../../lock-unlock");
17
16
  /**
18
17
  * WordPress dependencies
@@ -35,7 +34,7 @@ function DocumentTools({
35
34
  } = (0, _data.useSelect)(select => {
36
35
  const {
37
36
  getEditorMode
38
- } = select(_store.store);
37
+ } = select(_editor.store);
39
38
  return {
40
39
  isVisualMode: getEditorMode() === 'visual'
41
40
  };
@@ -1 +1 @@
1
- {"version":3,"names":["_compose","require","_blockEditor","_data","_i18n","_icons","_components","_editor","_store","_lockUnlock","DocumentTools","EditorDocumentTools","unlock","editorPrivateApis","blockEditorMode","hasFixedToolbar","isDistractionFree","isVisualMode","useSelect","select","getEditorMode","editSiteStore","__unstableSetEditorMode","useDispatch","blockEditorStore","setDeviceType","editorStore","isLargeViewport","useViewportMatch","isZoomedOutViewExperimentEnabled","window","__experimentalEnableZoomedOutView","isZoomedOutView","_react","createElement","disableBlockTools","listViewLabel","__","ToolbarItem","as","Button","className","icon","chevronUpDown","isPressed","label","onClick","size"],"sources":["@wordpress/edit-site/src/components/header-edit-mode/document-tools/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useViewportMatch } from '@wordpress/compose';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { chevronUpDown } from '@wordpress/icons';\nimport { Button, ToolbarItem } from '@wordpress/components';\nimport {\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../../store';\nimport { unlock } from '../../../lock-unlock';\n\nconst { DocumentTools: EditorDocumentTools } = unlock( editorPrivateApis );\n\nexport default function DocumentTools( {\n\tblockEditorMode,\n\thasFixedToolbar,\n\tisDistractionFree,\n} ) {\n\tconst { isVisualMode } = useSelect( ( select ) => {\n\t\tconst { getEditorMode } = select( editSiteStore );\n\n\t\treturn {\n\t\t\tisVisualMode: getEditorMode() === 'visual',\n\t\t};\n\t}, [] );\n\tconst { __unstableSetEditorMode } = useDispatch( blockEditorStore );\n\tconst { setDeviceType } = useDispatch( editorStore );\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tconst isZoomedOutViewExperimentEnabled =\n\t\twindow?.__experimentalEnableZoomedOutView && isVisualMode;\n\tconst isZoomedOutView = blockEditorMode === 'zoom-out';\n\n\treturn (\n\t\t<EditorDocumentTools\n\t\t\tdisableBlockTools={ ! isVisualMode }\n\t\t\tlistViewLabel={ __( 'List View' ) }\n\t\t>\n\t\t\t{ isZoomedOutViewExperimentEnabled &&\n\t\t\t\tisLargeViewport &&\n\t\t\t\t! isDistractionFree &&\n\t\t\t\t! hasFixedToolbar && (\n\t\t\t\t\t<ToolbarItem\n\t\t\t\t\t\tas={ Button }\n\t\t\t\t\t\tclassName=\"edit-site-header-edit-mode__zoom-out-view-toggle\"\n\t\t\t\t\t\ticon={ chevronUpDown }\n\t\t\t\t\t\tisPressed={ isZoomedOutView }\n\t\t\t\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\t\t\t\tlabel={ __( 'Zoom-out View' ) }\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tsetDeviceType( 'Desktop' );\n\t\t\t\t\t\t\t__unstableSetEditorMode(\n\t\t\t\t\t\t\t\tisZoomedOutView ? 'edit' : 'zoom-out'\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t</EditorDocumentTools>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IA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AAGZ;IACZ;IACAa,KAAK,EAAG,IAAAR,QAAE,EAAE,eAAgB,CAAG;IAC/BS,OAAO,EAAGA,CAAA,KAAM;MACfrB,aAAa,CAAE,SAAU,CAAC;MAC1BH,uBAAuB,CACtBU,eAAe,GAAG,MAAM,GAAG,UAC5B,CAAC;IACF,CAAG;IACHe,IAAI,EAAC;EAAS,CACd,CAEiB,CAAC;AAExB"}
1
+ {"version":3,"names":["_compose","require","_blockEditor","_data","_i18n","_icons","_components","_editor","_lockUnlock","DocumentTools","EditorDocumentTools","unlock","editorPrivateApis","blockEditorMode","hasFixedToolbar","isDistractionFree","isVisualMode","useSelect","select","getEditorMode","editorStore","__unstableSetEditorMode","useDispatch","blockEditorStore","setDeviceType","isLargeViewport","useViewportMatch","isZoomedOutViewExperimentEnabled","window","__experimentalEnableZoomedOutView","isZoomedOutView","_react","createElement","disableBlockTools","listViewLabel","__","ToolbarItem","as","Button","className","icon","chevronUpDown","isPressed","label","onClick","size"],"sources":["@wordpress/edit-site/src/components/header-edit-mode/document-tools/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useViewportMatch } from '@wordpress/compose';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { chevronUpDown } from '@wordpress/icons';\nimport { Button, ToolbarItem } from '@wordpress/components';\nimport {\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../../lock-unlock';\n\nconst { DocumentTools: EditorDocumentTools } = unlock( editorPrivateApis );\n\nexport default function DocumentTools( {\n\tblockEditorMode,\n\thasFixedToolbar,\n\tisDistractionFree,\n} ) {\n\tconst { isVisualMode } = useSelect( ( select ) => {\n\t\tconst { getEditorMode } = select( editorStore );\n\n\t\treturn {\n\t\t\tisVisualMode: getEditorMode() === 'visual',\n\t\t};\n\t}, [] );\n\tconst { __unstableSetEditorMode } = useDispatch( blockEditorStore );\n\tconst { setDeviceType } = useDispatch( editorStore );\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tconst isZoomedOutViewExperimentEnabled =\n\t\twindow?.__experimentalEnableZoomedOutView && isVisualMode;\n\tconst isZoomedOutView = blockEditorMode === 'zoom-out';\n\n\treturn (\n\t\t<EditorDocumentTools\n\t\t\tdisableBlockTools={ ! isVisualMode }\n\t\t\tlistViewLabel={ __( 'List View' ) }\n\t\t>\n\t\t\t{ isZoomedOutViewExperimentEnabled &&\n\t\t\t\tisLargeViewport &&\n\t\t\t\t! isDistractionFree &&\n\t\t\t\t! hasFixedToolbar && (\n\t\t\t\t\t<ToolbarItem\n\t\t\t\t\t\tas={ Button }\n\t\t\t\t\t\tclassName=\"edit-site-header-edit-mode__zoom-out-view-toggle\"\n\t\t\t\t\t\ticon={ chevronUpDown }\n\t\t\t\t\t\tisPressed={ isZoomedOutView }\n\t\t\t\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\t\t\t\tlabel={ __( 'Zoom-out View' ) }\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tsetDeviceType( 'Desktop' );\n\t\t\t\t\t\t\t__unstableSetEditorMode(\n\t\t\t\t\t\t\t\tisZoomedOutView ? 'edit' : 'zoom-out'\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t</EditorDocumentTools>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AAQA,IAAAO,WAAA,GAAAP,OAAA;AAjBA;AACA;AACA;;AAYA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BAAuB,CACtBS,eAAe,GAAG,MAAM,GAAG,UAC5B,CAAC;IACF,CAAG;IACHe,IAAI,EAAC;EAAS,CACd,CAEiB,CAAC;AAExB"}
@@ -36,6 +36,9 @@ var _constants = require("../../utils/constants");
36
36
  * Internal dependencies
37
37
  */
38
38
 
39
+ const {
40
+ useShowBlockTools
41
+ } = (0, _lockUnlock.unlock)(_blockEditor.privateApis);
39
42
  const {
40
43
  PostViewLink,
41
44
  PreviewDropdown
@@ -47,9 +50,7 @@ function HeaderEditMode() {
47
50
  blockEditorMode,
48
51
  blockSelectionStart,
49
52
  showIconLabels,
50
- editorCanvasView,
51
- hasFixedToolbar,
52
- isZoomOutMode
53
+ editorCanvasView
53
54
  } = (0, _data.useSelect)(select => {
54
55
  const {
55
56
  getEditedPostType
@@ -71,20 +72,20 @@ function HeaderEditMode() {
71
72
  blockSelectionStart: getBlockSelectionStart(),
72
73
  showIconLabels: getPreference('core', 'showIconLabels'),
73
74
  editorCanvasView: (0, _lockUnlock.unlock)(select(_store.store)).getEditorCanvasContainerView(),
74
- hasFixedToolbar: getPreference('core', 'fixedToolbar'),
75
- isDistractionFree: getPreference('core', 'distractionFree'),
76
- isZoomOutMode: __unstableGetEditorMode() === 'zoom-out'
75
+ isDistractionFree: getPreference('core', 'distractionFree')
77
76
  };
78
77
  }, []);
79
78
  const isLargeViewport = (0, _compose.useViewportMatch)('medium');
80
- const isTopToolbar = !isZoomOutMode && hasFixedToolbar && isLargeViewport;
79
+ const {
80
+ showFixedToolbar
81
+ } = useShowBlockTools();
82
+ const showTopToolbar = isLargeViewport && showFixedToolbar;
81
83
  const blockToolbarRef = (0, _element.useRef)();
82
84
  const disableMotion = (0, _compose.useReducedMotion)();
83
85
  const hasDefaultEditorCanvasView = !(0, _editorCanvasContainer.useHasEditorCanvasContainer)();
84
86
  const isFocusMode = _constants.FOCUSABLE_ENTITIES.includes(templateType);
85
87
  const isZoomedOutView = blockEditorMode === 'zoom-out';
86
88
  const [isBlockToolsCollapsed, setIsBlockToolsCollapsed] = (0, _element.useState)(true);
87
- const hasBlockSelected = !!blockSelectionStart;
88
89
  (0, _element.useEffect)(() => {
89
90
  // If we have a new block selection, show the block tools
90
91
  if (blockSelectionStart) {
@@ -121,16 +122,16 @@ function HeaderEditMode() {
121
122
  }, (0, _react.createElement)(_documentTools.default, {
122
123
  blockEditorMode: blockEditorMode,
123
124
  isDistractionFree: isDistractionFree
124
- }), isTopToolbar && (0, _react.createElement)(_react.Fragment, null, (0, _react.createElement)("div", {
125
+ }), showTopToolbar && (0, _react.createElement)(_react.Fragment, null, (0, _react.createElement)("div", {
125
126
  className: (0, _classnames.default)('selected-block-tools-wrapper', {
126
- 'is-collapsed': isBlockToolsCollapsed || !hasBlockSelected
127
+ 'is-collapsed': isBlockToolsCollapsed
127
128
  })
128
129
  }, (0, _react.createElement)(_blockEditor.BlockToolbar, {
129
130
  hideDragHandle: true
130
131
  })), (0, _react.createElement)(_components.Popover.Slot, {
131
132
  ref: blockToolbarRef,
132
133
  name: "block-toolbar"
133
- }), hasBlockSelected && (0, _react.createElement)(_components.Button, {
134
+ }), (0, _react.createElement)(_components.Button, {
134
135
  className: "edit-site-header-edit-mode__block-tools-toggle",
135
136
  icon: isBlockToolsCollapsed ? _icons.next : _icons.previous,
136
137
  onClick: () => {
@@ -139,7 +140,7 @@ function HeaderEditMode() {
139
140
  label: isBlockToolsCollapsed ? (0, _i18n.__)('Show block tools') : (0, _i18n.__)('Hide block tools')
140
141
  }))), !isDistractionFree && (0, _react.createElement)("div", {
141
142
  className: (0, _classnames.default)('edit-site-header-edit-mode__center', {
142
- 'is-collapsed': !isBlockToolsCollapsed && isLargeViewport
143
+ 'is-collapsed': !isBlockToolsCollapsed && showTopToolbar
143
144
  })
144
145
  }, !hasDefaultEditorCanvasView ? (0, _editorCanvasContainer.getEditorCanvasContainerTitle)(editorCanvasView) : (0, _react.createElement)(_editor.DocumentBar, null)), (0, _react.createElement)("div", {
145
146
  className: "edit-site-header-edit-mode__end"
@@ -153,7 +154,9 @@ function HeaderEditMode() {
153
154
  })
154
155
  }, (0, _react.createElement)(PreviewDropdown, {
155
156
  disabled: isFocusMode || !hasDefaultEditorCanvasView
156
- })), (0, _react.createElement)(PostViewLink, null), (0, _react.createElement)(_saveButton.default, null), !isDistractionFree && (0, _react.createElement)(_interface.PinnedItems.Slot, {
157
+ })), (0, _react.createElement)(PostViewLink, null), (0, _react.createElement)(_saveButton.default, {
158
+ size: "compact"
159
+ }), !isDistractionFree && (0, _react.createElement)(_interface.PinnedItems.Slot, {
157
160
  scope: "core/edit-site"
158
161
  }), (0, _react.createElement)(_moreMenu.default, {
159
162
  showIconLabels: showIconLabels
@@ -1 +1 @@
1
- {"version":3,"names":["_classnames","_interopRequireDefault","require","_compose","_blockEditor","_data","_element","_interface","_i18n","_icons","_components","_preferences","_editor","_moreMenu","_saveButton","_documentTools","_store","_editorCanvasContainer","_lockUnlock","_constants","PostViewLink","PreviewDropdown","unlock","editorPrivateApis","HeaderEditMode","templateType","isDistractionFree","blockEditorMode","blockSelectionStart","showIconLabels","editorCanvasView","hasFixedToolbar","isZoomOutMode","useSelect","select","getEditedPostType","editSiteStore","getBlockSelectionStart","__unstableGetEditorMode","blockEditorStore","get","getPreference","preferencesStore","getDeviceType","editorStore","deviceType","getEditorCanvasContainerView","isLargeViewport","useViewportMatch","isTopToolbar","blockToolbarRef","useRef","disableMotion","useReducedMotion","hasDefaultEditorCanvasView","useHasEditorCanvasContainer","isFocusMode","FOCUSABLE_ENTITIES","includes","isZoomedOutView","isBlockToolsCollapsed","setIsBlockToolsCollapsed","useState","hasBlockSelected","useEffect","toolbarVariants","y","isDistractionFreeHovering","view","edit","toolbarTransition","type","duration","ease","_react","createElement","className","classnames","__unstableMotion","div","variants","transition","default","Fragment","BlockToolbar","hideDragHandle","Popover","Slot","ref","name","Button","icon","next","previous","onClick","collapsed","label","__","getEditorCanvasContainerTitle","DocumentBar","disabled","PinnedItems","scope"],"sources":["@wordpress/edit-site/src/components/header-edit-mode/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useViewportMatch, useReducedMotion } from '@wordpress/compose';\nimport {\n\tBlockToolbar,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { useSelect } from '@wordpress/data';\nimport { useEffect, useRef, useState } from '@wordpress/element';\nimport { PinnedItems } from '@wordpress/interface';\nimport { __ } from '@wordpress/i18n';\nimport { next, previous } from '@wordpress/icons';\nimport {\n\tButton,\n\t__unstableMotion as motion,\n\tPopover,\n} from '@wordpress/components';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport {\n\tDocumentBar,\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport MoreMenu from './more-menu';\nimport SaveButton from '../save-button';\nimport DocumentTools from './document-tools';\nimport { store as editSiteStore } from '../../store';\nimport {\n\tgetEditorCanvasContainerTitle,\n\tuseHasEditorCanvasContainer,\n} from '../editor-canvas-container';\nimport { unlock } from '../../lock-unlock';\nimport { FOCUSABLE_ENTITIES } from '../../utils/constants';\n\nconst { PostViewLink, PreviewDropdown } = unlock( editorPrivateApis );\n\nexport default function HeaderEditMode() {\n\tconst {\n\t\ttemplateType,\n\t\tisDistractionFree,\n\t\tblockEditorMode,\n\t\tblockSelectionStart,\n\t\tshowIconLabels,\n\t\teditorCanvasView,\n\t\thasFixedToolbar,\n\t\tisZoomOutMode,\n\t} = useSelect( ( select ) => {\n\t\tconst { getEditedPostType } = select( editSiteStore );\n\t\tconst { getBlockSelectionStart, __unstableGetEditorMode } =\n\t\t\tselect( blockEditorStore );\n\t\tconst { get: getPreference } = select( preferencesStore );\n\t\tconst { getDeviceType } = select( editorStore );\n\n\t\treturn {\n\t\t\tdeviceType: getDeviceType(),\n\t\t\ttemplateType: getEditedPostType(),\n\t\t\tblockEditorMode: __unstableGetEditorMode(),\n\t\t\tblockSelectionStart: getBlockSelectionStart(),\n\t\t\tshowIconLabels: getPreference( 'core', 'showIconLabels' ),\n\t\t\teditorCanvasView: unlock(\n\t\t\t\tselect( editSiteStore )\n\t\t\t).getEditorCanvasContainerView(),\n\t\t\thasFixedToolbar: getPreference( 'core', 'fixedToolbar' ),\n\t\t\tisDistractionFree: getPreference( 'core', 'distractionFree' ),\n\t\t\tisZoomOutMode: __unstableGetEditorMode() === 'zoom-out',\n\t\t};\n\t}, [] );\n\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tconst isTopToolbar = ! isZoomOutMode && hasFixedToolbar && isLargeViewport;\n\tconst blockToolbarRef = useRef();\n\tconst disableMotion = useReducedMotion();\n\n\tconst hasDefaultEditorCanvasView = ! useHasEditorCanvasContainer();\n\n\tconst isFocusMode = FOCUSABLE_ENTITIES.includes( templateType );\n\n\tconst isZoomedOutView = blockEditorMode === 'zoom-out';\n\n\tconst [ isBlockToolsCollapsed, setIsBlockToolsCollapsed ] =\n\t\tuseState( true );\n\n\tconst hasBlockSelected = !! blockSelectionStart;\n\n\tuseEffect( () => {\n\t\t// If we have a new block selection, show the block tools\n\t\tif ( blockSelectionStart ) {\n\t\t\tsetIsBlockToolsCollapsed( false );\n\t\t}\n\t}, [ blockSelectionStart ] );\n\n\tconst toolbarVariants = {\n\t\tisDistractionFree: { y: '-50px' },\n\t\tisDistractionFreeHovering: { y: 0 },\n\t\tview: { y: 0 },\n\t\tedit: { y: 0 },\n\t};\n\n\tconst toolbarTransition = {\n\t\ttype: 'tween',\n\t\tduration: disableMotion ? 0 : 0.2,\n\t\tease: 'easeOut',\n\t};\n\n\treturn (\n\t\t<div\n\t\t\tclassName={ classnames( 'edit-site-header-edit-mode', {\n\t\t\t\t'show-icon-labels': showIconLabels,\n\t\t\t} ) }\n\t\t>\n\t\t\t{ hasDefaultEditorCanvasView && (\n\t\t\t\t<motion.div\n\t\t\t\t\tclassName=\"edit-site-header-edit-mode__start\"\n\t\t\t\t\tvariants={ toolbarVariants }\n\t\t\t\t\ttransition={ toolbarTransition }\n\t\t\t\t>\n\t\t\t\t\t<DocumentTools\n\t\t\t\t\t\tblockEditorMode={ blockEditorMode }\n\t\t\t\t\t\tisDistractionFree={ isDistractionFree }\n\t\t\t\t\t/>\n\t\t\t\t\t{ isTopToolbar && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t\t\t'selected-block-tools-wrapper',\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t'is-collapsed':\n\t\t\t\t\t\t\t\t\t\t\tisBlockToolsCollapsed ||\n\t\t\t\t\t\t\t\t\t\t\t! hasBlockSelected,\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\t\t\t<BlockToolbar hideDragHandle />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<Popover.Slot\n\t\t\t\t\t\t\t\tref={ blockToolbarRef }\n\t\t\t\t\t\t\t\tname=\"block-toolbar\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t{ hasBlockSelected && (\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tclassName=\"edit-site-header-edit-mode__block-tools-toggle\"\n\t\t\t\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t\t\t\tisBlockToolsCollapsed ? next : previous\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\t\tsetIsBlockToolsCollapsed(\n\t\t\t\t\t\t\t\t\t\t\t( collapsed ) => ! collapsed\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\tlabel={\n\t\t\t\t\t\t\t\t\t\tisBlockToolsCollapsed\n\t\t\t\t\t\t\t\t\t\t\t? __( 'Show block tools' )\n\t\t\t\t\t\t\t\t\t\t\t: __( 'Hide block tools' )\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\t</>\n\t\t\t\t\t) }\n\t\t\t\t</motion.div>\n\t\t\t) }\n\n\t\t\t{ ! isDistractionFree && (\n\t\t\t\t<div\n\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t'edit-site-header-edit-mode__center',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'is-collapsed':\n\t\t\t\t\t\t\t\t! isBlockToolsCollapsed && isLargeViewport,\n\t\t\t\t\t\t}\n\t\t\t\t\t) }\n\t\t\t\t>\n\t\t\t\t\t{ ! hasDefaultEditorCanvasView ? (\n\t\t\t\t\t\tgetEditorCanvasContainerTitle( editorCanvasView )\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<DocumentBar />\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t) }\n\n\t\t\t<div className=\"edit-site-header-edit-mode__end\">\n\t\t\t\t<motion.div\n\t\t\t\t\tclassName=\"edit-site-header-edit-mode__actions\"\n\t\t\t\t\tvariants={ toolbarVariants }\n\t\t\t\t\ttransition={ toolbarTransition }\n\t\t\t\t>\n\t\t\t\t\t{ isLargeViewport && (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t\t'edit-site-header-edit-mode__preview-options',\n\t\t\t\t\t\t\t\t{ 'is-zoomed-out': isZoomedOutView }\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<PreviewDropdown\n\t\t\t\t\t\t\t\tdisabled={\n\t\t\t\t\t\t\t\t\tisFocusMode || ! hasDefaultEditorCanvasView\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) }\n\t\t\t\t\t<PostViewLink />\n\t\t\t\t\t<SaveButton />\n\t\t\t\t\t{ ! isDistractionFree && (\n\t\t\t\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AAA;IACCC,SAAS,EAAG,IAAAC,mBAAU,EACrB,6CAA6C,EAC7C;MAAE,eAAe,EAAElB;IAAgB,CACpC;EAAG,GAEH,IAAAe,MAAA,CAAAC,aAAA,EAACtD,eAAe;IACf+E,QAAQ,EACP5C,WAAW,IAAI,CAAEF;EACjB,CACD,CACG,CACL,EACD,IAAAoB,MAAA,CAAAC,aAAA,EAACvD,YAAY,MAAE,CAAC,EAChB,IAAAsD,MAAA,CAAAC,aAAA,EAAC7D,WAAA,CAAAoE,OAAU,MAAE,CAAC,EACZ,CAAExD,iBAAiB,IACpB,IAAAgD,MAAA,CAAAC,aAAA,EAACpE,UAAA,CAAA8F,WAAW,CAACd,IAAI;IAACe,KAAK,EAAC;EAAgB,CAAE,CAC1C,EACD,IAAA5B,MAAA,CAAAC,aAAA,EAAC9D,SAAA,CAAAqE,OAAQ;IAACrD,cAAc,EAAGA;EAAgB,CAAE,CAClC,CACR,CACD,CAAC;AAER"}
1
+ {"version":3,"names":["_classnames","_interopRequireDefault","require","_compose","_blockEditor","_data","_element","_interface","_i18n","_icons","_components","_preferences","_editor","_moreMenu","_saveButton","_documentTools","_store","_editorCanvasContainer","_lockUnlock","_constants","useShowBlockTools","unlock","blockEditorPrivateApis","PostViewLink","PreviewDropdown","editorPrivateApis","HeaderEditMode","templateType","isDistractionFree","blockEditorMode","blockSelectionStart","showIconLabels","editorCanvasView","useSelect","select","getEditedPostType","editSiteStore","getBlockSelectionStart","__unstableGetEditorMode","blockEditorStore","get","getPreference","preferencesStore","getDeviceType","editorStore","deviceType","getEditorCanvasContainerView","isLargeViewport","useViewportMatch","showFixedToolbar","showTopToolbar","blockToolbarRef","useRef","disableMotion","useReducedMotion","hasDefaultEditorCanvasView","useHasEditorCanvasContainer","isFocusMode","FOCUSABLE_ENTITIES","includes","isZoomedOutView","isBlockToolsCollapsed","setIsBlockToolsCollapsed","useState","useEffect","toolbarVariants","y","isDistractionFreeHovering","view","edit","toolbarTransition","type","duration","ease","_react","createElement","className","classnames","__unstableMotion","div","variants","transition","default","Fragment","BlockToolbar","hideDragHandle","Popover","Slot","ref","name","Button","icon","next","previous","onClick","collapsed","label","__","getEditorCanvasContainerTitle","DocumentBar","disabled","size","PinnedItems","scope"],"sources":["@wordpress/edit-site/src/components/header-edit-mode/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useViewportMatch, useReducedMotion } from '@wordpress/compose';\nimport {\n\tBlockToolbar,\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { useSelect } from '@wordpress/data';\nimport { useEffect, useRef, useState } from '@wordpress/element';\nimport { PinnedItems } from '@wordpress/interface';\nimport { __ } from '@wordpress/i18n';\nimport { next, previous } from '@wordpress/icons';\nimport {\n\tButton,\n\t__unstableMotion as motion,\n\tPopover,\n} from '@wordpress/components';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport {\n\tDocumentBar,\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport MoreMenu from './more-menu';\nimport SaveButton from '../save-button';\nimport DocumentTools from './document-tools';\nimport { store as editSiteStore } from '../../store';\nimport {\n\tgetEditorCanvasContainerTitle,\n\tuseHasEditorCanvasContainer,\n} from '../editor-canvas-container';\nimport { unlock } from '../../lock-unlock';\nimport { FOCUSABLE_ENTITIES } from '../../utils/constants';\n\nconst { useShowBlockTools } = unlock( blockEditorPrivateApis );\nconst { PostViewLink, PreviewDropdown } = unlock( editorPrivateApis );\n\nexport default function HeaderEditMode() {\n\tconst {\n\t\ttemplateType,\n\t\tisDistractionFree,\n\t\tblockEditorMode,\n\t\tblockSelectionStart,\n\t\tshowIconLabels,\n\t\teditorCanvasView,\n\t} = useSelect( ( select ) => {\n\t\tconst { getEditedPostType } = select( editSiteStore );\n\t\tconst { getBlockSelectionStart, __unstableGetEditorMode } =\n\t\t\tselect( blockEditorStore );\n\t\tconst { get: getPreference } = select( preferencesStore );\n\t\tconst { getDeviceType } = select( editorStore );\n\n\t\treturn {\n\t\t\tdeviceType: getDeviceType(),\n\t\t\ttemplateType: getEditedPostType(),\n\t\t\tblockEditorMode: __unstableGetEditorMode(),\n\t\t\tblockSelectionStart: getBlockSelectionStart(),\n\t\t\tshowIconLabels: getPreference( 'core', 'showIconLabels' ),\n\t\t\teditorCanvasView: unlock(\n\t\t\t\tselect( editSiteStore )\n\t\t\t).getEditorCanvasContainerView(),\n\t\t\tisDistractionFree: getPreference( 'core', 'distractionFree' ),\n\t\t};\n\t}, [] );\n\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tconst { showFixedToolbar } = useShowBlockTools();\n\tconst showTopToolbar = isLargeViewport && showFixedToolbar;\n\tconst blockToolbarRef = useRef();\n\tconst disableMotion = useReducedMotion();\n\n\tconst hasDefaultEditorCanvasView = ! useHasEditorCanvasContainer();\n\n\tconst isFocusMode = FOCUSABLE_ENTITIES.includes( templateType );\n\n\tconst isZoomedOutView = blockEditorMode === 'zoom-out';\n\n\tconst [ isBlockToolsCollapsed, setIsBlockToolsCollapsed ] =\n\t\tuseState( true );\n\n\tuseEffect( () => {\n\t\t// If we have a new block selection, show the block tools\n\t\tif ( blockSelectionStart ) {\n\t\t\tsetIsBlockToolsCollapsed( false );\n\t\t}\n\t}, [ blockSelectionStart ] );\n\n\tconst toolbarVariants = {\n\t\tisDistractionFree: { y: '-50px' },\n\t\tisDistractionFreeHovering: { y: 0 },\n\t\tview: { y: 0 },\n\t\tedit: { y: 0 },\n\t};\n\n\tconst toolbarTransition = {\n\t\ttype: 'tween',\n\t\tduration: disableMotion ? 0 : 0.2,\n\t\tease: 'easeOut',\n\t};\n\n\treturn (\n\t\t<div\n\t\t\tclassName={ classnames( 'edit-site-header-edit-mode', {\n\t\t\t\t'show-icon-labels': showIconLabels,\n\t\t\t} ) }\n\t\t>\n\t\t\t{ hasDefaultEditorCanvasView && (\n\t\t\t\t<motion.div\n\t\t\t\t\tclassName=\"edit-site-header-edit-mode__start\"\n\t\t\t\t\tvariants={ toolbarVariants }\n\t\t\t\t\ttransition={ toolbarTransition }\n\t\t\t\t>\n\t\t\t\t\t<DocumentTools\n\t\t\t\t\t\tblockEditorMode={ blockEditorMode }\n\t\t\t\t\t\tisDistractionFree={ isDistractionFree }\n\t\t\t\t\t/>\n\t\t\t\t\t{ showTopToolbar && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t\t\t'selected-block-tools-wrapper',\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t'is-collapsed': isBlockToolsCollapsed,\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\t\t\t<BlockToolbar hideDragHandle />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<Popover.Slot\n\t\t\t\t\t\t\t\tref={ blockToolbarRef }\n\t\t\t\t\t\t\t\tname=\"block-toolbar\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tclassName=\"edit-site-header-edit-mode__block-tools-toggle\"\n\t\t\t\t\t\t\t\ticon={ isBlockToolsCollapsed ? next : previous }\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\tsetIsBlockToolsCollapsed(\n\t\t\t\t\t\t\t\t\t\t( collapsed ) => ! collapsed\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\tlabel={\n\t\t\t\t\t\t\t\t\tisBlockToolsCollapsed\n\t\t\t\t\t\t\t\t\t\t? __( 'Show block tools' )\n\t\t\t\t\t\t\t\t\t\t: __( 'Hide block tools' )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</>\n\t\t\t\t\t) }\n\t\t\t\t</motion.div>\n\t\t\t) }\n\n\t\t\t{ ! isDistractionFree && (\n\t\t\t\t<div\n\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t'edit-site-header-edit-mode__center',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'is-collapsed':\n\t\t\t\t\t\t\t\t! isBlockToolsCollapsed && showTopToolbar,\n\t\t\t\t\t\t}\n\t\t\t\t\t) }\n\t\t\t\t>\n\t\t\t\t\t{ ! hasDefaultEditorCanvasView ? (\n\t\t\t\t\t\tgetEditorCanvasContainerTitle( editorCanvasView )\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<DocumentBar />\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t) }\n\n\t\t\t<div className=\"edit-site-header-edit-mode__end\">\n\t\t\t\t<motion.div\n\t\t\t\t\tclassName=\"edit-site-header-edit-mode__actions\"\n\t\t\t\t\tvariants={ toolbarVariants }\n\t\t\t\t\ttransition={ toolbarTransition }\n\t\t\t\t>\n\t\t\t\t\t{ isLargeViewport && (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t\t'edit-site-header-edit-mode__preview-options',\n\t\t\t\t\t\t\t\t{ 'is-zoomed-out': isZoomedOutView }\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<PreviewDropdown\n\t\t\t\t\t\t\t\tdisabled={\n\t\t\t\t\t\t\t\t\tisFocusMode || ! hasDefaultEditorCanvasView\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) }\n\t\t\t\t\t<PostViewLink />\n\t\t\t\t\t<SaveButton size=\"compact\" />\n\t\t\t\t\t{ ! isDistractionFree && (\n\t\t\t\t\t\t<PinnedItems.Slot scope=\"core/edit-site\" />\n\t\t\t\t\t) }\n\t\t\t\t\t<MoreMenu showIconLabels={ showIconLabels } />\n\t\t\t\t</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,MAAA,CAAAC,aAAA,EAACpD,YAAY,MAAE,CAAC,EAChB,IAAAmD,MAAA,CAAAC,aAAA,EAAC7D,WAAA,CAAAoE,OAAU;IAACmB,IAAI,EAAC;EAAS,CAAE,CAAC,EAC3B,CAAEzE,iBAAiB,IACpB,IAAA8C,MAAA,CAAAC,aAAA,EAACpE,UAAA,CAAA+F,WAAW,CAACf,IAAI;IAACgB,KAAK,EAAC;EAAgB,CAAE,CAC1C,EACD,IAAA7B,MAAA,CAAAC,aAAA,EAAC9D,SAAA,CAAAqE,OAAQ;IAACnD,cAAc,EAAGA;EAAgB,CAAE,CAClC,CACR,CACD,CAAC;AAER"}
@@ -14,14 +14,14 @@ var _components = require("@wordpress/components");
14
14
  var _interface = require("@wordpress/interface");
15
15
  var _preferences = require("@wordpress/preferences");
16
16
  var _coreData = require("@wordpress/core-data");
17
+ var _editor = require("@wordpress/editor");
17
18
  var _keyboardShortcutHelpModal = _interopRequireWildcard(require("../../keyboard-shortcut-help-modal"));
18
19
  var _preferencesModal = _interopRequireWildcard(require("../../preferences-modal"));
19
20
  var _toolsMoreMenuGroup = _interopRequireDefault(require("../tools-more-menu-group"));
20
21
  var _siteExport = _interopRequireDefault(require("./site-export"));
21
22
  var _welcomeGuideMenuItem = _interopRequireDefault(require("./welcome-guide-menu-item"));
22
23
  var _copyContentMenuItem = _interopRequireDefault(require("./copy-content-menu-item"));
23
- var _modeSwitcher = _interopRequireDefault(require("../mode-switcher"));
24
- var _store = require("../../../store");
24
+ var _lockUnlock = require("../../../lock-unlock");
25
25
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
26
26
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
27
27
  /**
@@ -32,6 +32,9 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
32
32
  * Internal dependencies
33
33
  */
34
34
 
35
+ const {
36
+ ModeSwitcher
37
+ } = (0, _lockUnlock.unlock)(_editor.privateApis);
35
38
  function MoreMenu({
36
39
  showIconLabels
37
40
  }) {
@@ -46,16 +49,24 @@ function MoreMenu({
46
49
  }, []);
47
50
  const {
48
51
  toggleDistractionFree
49
- } = (0, _data.useDispatch)(_store.store);
52
+ } = (0, _data.useDispatch)(_editor.store);
50
53
  const turnOffDistractionFree = () => {
51
54
  setPreference('core', 'distractionFree', false);
52
55
  };
53
- return (0, _react.createElement)(_react.Fragment, null, (0, _react.createElement)(_interface.MoreMenuDropdown, {
56
+ return (0, _react.createElement)(_react.Fragment, null, (0, _react.createElement)(_components.DropdownMenu, {
57
+ icon: _icons.moreVertical,
58
+ label: (0, _i18n.__)('Options'),
59
+ popoverProps: {
60
+ placement: 'bottom-end',
61
+ className: 'more-menu-dropdown__content'
62
+ },
54
63
  toggleProps: {
55
64
  showTooltip: !showIconLabels,
56
65
  ...(showIconLabels && {
57
66
  variant: 'tertiary'
58
- })
67
+ }),
68
+ tooltipPosition: 'bottom',
69
+ size: 'compact'
59
70
  }
60
71
  }, ({
61
72
  onClose
@@ -86,7 +97,7 @@ function MoreMenu({
86
97
  info: (0, _i18n.__)('Focus on one block at a time'),
87
98
  messageActivated: (0, _i18n.__)('Spotlight mode activated'),
88
99
  messageDeactivated: (0, _i18n.__)('Spotlight mode deactivated')
89
- })), (0, _react.createElement)(_modeSwitcher.default, null), (0, _react.createElement)(_interface.ActionItem.Slot, {
100
+ })), (0, _react.createElement)(ModeSwitcher, null), (0, _react.createElement)(_interface.ActionItem.Slot, {
90
101
  name: "core/edit-site/plugin-more-menu",
91
102
  label: (0, _i18n.__)('Plugins'),
92
103
  as: _components.MenuGroup,
@@ -1 +1 @@
1
- {"version":3,"names":["_i18n","require","_data","_keycodes","_icons","_components","_interface","_preferences","_coreData","_keyboardShortcutHelpModal","_interopRequireWildcard","_preferencesModal","_toolsMoreMenuGroup","_interopRequireDefault","_siteExport","_welcomeGuideMenuItem","_copyContentMenuItem","_modeSwitcher","_store","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","MoreMenu","showIconLabels","openModal","useDispatch","interfaceStore","setPreference","preferencesStore","isBlockBasedTheme","useSelect","select","coreStore","getCurrentTheme","is_block_theme","toggleDistractionFree","editSiteStore","turnOffDistractionFree","_react","createElement","Fragment","MoreMenuDropdown","toggleProps","showTooltip","variant","onClose","MenuGroup","label","_x","PreferenceToggleMenuItem","scope","name","onToggle","__","info","messageActivated","messageDeactivated","handleToggling","shortcut","displayShortcut","primaryShift","ActionItem","Slot","as","fillProps","onClick","MenuItem","KEYBOARD_SHORTCUT_HELP_MODAL_NAME","access","icon","external","role","href","target","rel","VisuallyHidden","PREFERENCES_MODAL_NAME"],"sources":["@wordpress/edit-site/src/components/header-edit-mode/more-menu/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { displayShortcut } from '@wordpress/keycodes';\nimport { external } from '@wordpress/icons';\nimport { MenuGroup, MenuItem, VisuallyHidden } from '@wordpress/components';\nimport {\n\tActionItem,\n\tMoreMenuDropdown,\n\tstore as interfaceStore,\n} from '@wordpress/interface';\nimport {\n\tPreferenceToggleMenuItem,\n\tstore as preferencesStore,\n} from '@wordpress/preferences';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport {\n\tKEYBOARD_SHORTCUT_HELP_MODAL_NAME,\n\tdefault as KeyboardShortcutHelpModal,\n} from '../../keyboard-shortcut-help-modal';\nimport {\n\tPREFERENCES_MODAL_NAME,\n\tdefault as EditSitePreferencesModal,\n} from '../../preferences-modal';\nimport ToolsMoreMenuGroup from '../tools-more-menu-group';\nimport SiteExport from './site-export';\nimport WelcomeGuideMenuItem from './welcome-guide-menu-item';\nimport CopyContentMenuItem from './copy-content-menu-item';\nimport ModeSwitcher from '../mode-switcher';\nimport { store as editSiteStore } from '../../../store';\n\nexport default function MoreMenu( { showIconLabels } ) {\n\tconst { openModal } = useDispatch( interfaceStore );\n\tconst { set: setPreference } = useDispatch( preferencesStore );\n\tconst isBlockBasedTheme = useSelect( ( select ) => {\n\t\treturn select( coreStore ).getCurrentTheme().is_block_theme;\n\t}, [] );\n\n\tconst { toggleDistractionFree } = useDispatch( editSiteStore );\n\n\tconst turnOffDistractionFree = () => {\n\t\tsetPreference( 'core', 'distractionFree', false );\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<MoreMenuDropdown\n\t\t\t\ttoggleProps={ {\n\t\t\t\t\tshowTooltip: ! showIconLabels,\n\t\t\t\t\t...( showIconLabels && { variant: 'tertiary' } ),\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t{ ( { onClose } ) => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<MenuGroup label={ _x( 'View', 'noun' ) }>\n\t\t\t\t\t\t\t<PreferenceToggleMenuItem\n\t\t\t\t\t\t\t\tscope=\"core\"\n\t\t\t\t\t\t\t\tname=\"fixedToolbar\"\n\t\t\t\t\t\t\t\tonToggle={ turnOffDistractionFree }\n\t\t\t\t\t\t\t\tlabel={ __( 'Top toolbar' ) }\n\t\t\t\t\t\t\t\tinfo={ __(\n\t\t\t\t\t\t\t\t\t'Access all block and document tools in a single place'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tmessageActivated={ __(\n\t\t\t\t\t\t\t\t\t'Top toolbar activated'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tmessageDeactivated={ __(\n\t\t\t\t\t\t\t\t\t'Top toolbar deactivated'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<PreferenceToggleMenuItem\n\t\t\t\t\t\t\t\tscope=\"core\"\n\t\t\t\t\t\t\t\tname=\"distractionFree\"\n\t\t\t\t\t\t\t\tlabel={ __( 'Distraction free' ) }\n\t\t\t\t\t\t\t\tinfo={ __( 'Write with calmness' ) }\n\t\t\t\t\t\t\t\thandleToggling={ false }\n\t\t\t\t\t\t\t\tonToggle={ toggleDistractionFree }\n\t\t\t\t\t\t\t\tmessageActivated={ __(\n\t\t\t\t\t\t\t\t\t'Distraction free mode activated'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tmessageDeactivated={ __(\n\t\t\t\t\t\t\t\t\t'Distraction free mode deactivated'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tshortcut={ displayShortcut.primaryShift(\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\t\t<PreferenceToggleMenuItem\n\t\t\t\t\t\t\t\tscope=\"core\"\n\t\t\t\t\t\t\t\tname=\"focusMode\"\n\t\t\t\t\t\t\t\tlabel={ __( 'Spotlight mode' ) }\n\t\t\t\t\t\t\t\tinfo={ __( 'Focus on one block at a time' ) }\n\t\t\t\t\t\t\t\tmessageActivated={ __(\n\t\t\t\t\t\t\t\t\t'Spotlight mode activated'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tmessageDeactivated={ __(\n\t\t\t\t\t\t\t\t\t'Spotlight mode deactivated'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t<ModeSwitcher />\n\t\t\t\t\t\t<ActionItem.Slot\n\t\t\t\t\t\t\tname=\"core/edit-site/plugin-more-menu\"\n\t\t\t\t\t\t\tlabel={ __( 'Plugins' ) }\n\t\t\t\t\t\t\tas={ MenuGroup }\n\t\t\t\t\t\t\tfillProps={ { onClick: onClose } }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<MenuGroup label={ __( 'Tools' ) }>\n\t\t\t\t\t\t\t{ isBlockBasedTheme && <SiteExport /> }\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\topenModal(\n\t\t\t\t\t\t\t\t\t\tKEYBOARD_SHORTCUT_HELP_MODAL_NAME\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\tshortcut={ displayShortcut.access( 'h' ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Keyboard shortcuts' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t<WelcomeGuideMenuItem />\n\t\t\t\t\t\t\t<CopyContentMenuItem />\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\ticon={ external }\n\t\t\t\t\t\t\t\trole=\"menuitem\"\n\t\t\t\t\t\t\t\thref={ __(\n\t\t\t\t\t\t\t\t\t'https://wordpress.org/documentation/article/site-editor/'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\trel=\"noopener noreferrer\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Help' ) }\n\t\t\t\t\t\t\t\t<VisuallyHidden as=\"span\">\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t/* translators: accessibility text */\n\t\t\t\t\t\t\t\t\t\t__( '(opens in a new tab)' )\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t<ToolsMoreMenuGroup.Slot\n\t\t\t\t\t\t\t\tfillProps={ { onClose } }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t<MenuGroup>\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\topenModal( PREFERENCES_MODAL_NAME )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Preferences' ) }\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) }\n\t\t\t</MoreMenuDropdown>\n\t\t\t<KeyboardShortcutHelpModal />\n\t\t\t<EditSitePreferencesModal />\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AAKA,IAAAM,YAAA,GAAAN,OAAA;AAIA,IAAAO,SAAA,GAAAP,OAAA;AAKA,IAAAQ,0BAAA,GAAAC,uBAAA,CAAAT,OAAA;AAIA,IAAAU,iBAAA,GAAAD,uBAAA,CAAAT,OAAA;AAIA,IAAAW,mBAAA,GAAAC,sBAAA,CAAAZ,OAAA;AACA,IAAAa,WAAA,GAAAD,sBAAA,CAAAZ,OAAA;AACA,IAAAc,qBAAA,GAAAF,sBAAA,CAAAZ,OAAA;AACA,IAAAe,oBAAA,GAAAH,sBAAA,CAAAZ,OAAA;AACA,IAAAgB,aAAA,GAAAJ,sBAAA,CAAAZ,OAAA;AACA,IAAAiB,MAAA,GAAAjB,OAAA;AAAwD,SAAAkB,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA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CAAAgB,OAAyB,MAAE,CAAC,EAC7B,IAAA+B,MAAA,CAAAC,aAAA,EAAC9C,iBAAA,CAAAc,OAAwB,MAAE,CAC1B,CAAC;AAEL"}
1
+ {"version":3,"names":["_i18n","require","_data","_keycodes","_icons","_components","_interface","_preferences","_coreData","_editor","_keyboardShortcutHelpModal","_interopRequireWildcard","_preferencesModal","_toolsMoreMenuGroup","_interopRequireDefault","_siteExport","_welcomeGuideMenuItem","_copyContentMenuItem","_lockUnlock","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","ModeSwitcher","unlock","editorPrivateApis","MoreMenu","showIconLabels","openModal","useDispatch","interfaceStore","setPreference","preferencesStore","isBlockBasedTheme","useSelect","select","coreStore","getCurrentTheme","is_block_theme","toggleDistractionFree","editorStore","turnOffDistractionFree","_react","createElement","Fragment","DropdownMenu","icon","moreVertical","label","__","popoverProps","placement","className","toggleProps","showTooltip","variant","tooltipPosition","size","onClose","MenuGroup","_x","PreferenceToggleMenuItem","scope","name","onToggle","info","messageActivated","messageDeactivated","handleToggling","shortcut","displayShortcut","primaryShift","ActionItem","Slot","as","fillProps","onClick","MenuItem","KEYBOARD_SHORTCUT_HELP_MODAL_NAME","access","external","role","href","target","rel","VisuallyHidden","PREFERENCES_MODAL_NAME"],"sources":["@wordpress/edit-site/src/components/header-edit-mode/more-menu/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { displayShortcut } from '@wordpress/keycodes';\nimport { external, moreVertical } from '@wordpress/icons';\nimport {\n\tMenuGroup,\n\tMenuItem,\n\tVisuallyHidden,\n\tDropdownMenu,\n} from '@wordpress/components';\nimport { ActionItem, store as interfaceStore } from '@wordpress/interface';\nimport {\n\tPreferenceToggleMenuItem,\n\tstore as preferencesStore,\n} from '@wordpress/preferences';\nimport { store as coreStore } from '@wordpress/core-data';\nimport {\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport {\n\tKEYBOARD_SHORTCUT_HELP_MODAL_NAME,\n\tdefault as KeyboardShortcutHelpModal,\n} from '../../keyboard-shortcut-help-modal';\nimport {\n\tPREFERENCES_MODAL_NAME,\n\tdefault as EditSitePreferencesModal,\n} from '../../preferences-modal';\nimport ToolsMoreMenuGroup from '../tools-more-menu-group';\nimport SiteExport from './site-export';\nimport WelcomeGuideMenuItem from './welcome-guide-menu-item';\nimport CopyContentMenuItem from './copy-content-menu-item';\nimport { unlock } from '../../../lock-unlock';\n\nconst { ModeSwitcher } = unlock( editorPrivateApis );\n\nexport default function MoreMenu( { showIconLabels } ) {\n\tconst { openModal } = useDispatch( interfaceStore );\n\tconst { set: setPreference } = useDispatch( preferencesStore );\n\tconst isBlockBasedTheme = useSelect( ( select ) => {\n\t\treturn select( coreStore ).getCurrentTheme().is_block_theme;\n\t}, [] );\n\n\tconst { toggleDistractionFree } = useDispatch( editorStore );\n\n\tconst turnOffDistractionFree = () => {\n\t\tsetPreference( 'core', 'distractionFree', false );\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<DropdownMenu\n\t\t\t\ticon={ moreVertical }\n\t\t\t\tlabel={ __( 'Options' ) }\n\t\t\t\tpopoverProps={ {\n\t\t\t\t\tplacement: 'bottom-end',\n\t\t\t\t\tclassName: 'more-menu-dropdown__content',\n\t\t\t\t} }\n\t\t\t\ttoggleProps={ {\n\t\t\t\t\tshowTooltip: ! showIconLabels,\n\t\t\t\t\t...( showIconLabels && { variant: 'tertiary' } ),\n\t\t\t\t\ttooltipPosition: 'bottom',\n\t\t\t\t\tsize: 'compact',\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t{ ( { onClose } ) => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<MenuGroup label={ _x( 'View', 'noun' ) }>\n\t\t\t\t\t\t\t<PreferenceToggleMenuItem\n\t\t\t\t\t\t\t\tscope=\"core\"\n\t\t\t\t\t\t\t\tname=\"fixedToolbar\"\n\t\t\t\t\t\t\t\tonToggle={ turnOffDistractionFree }\n\t\t\t\t\t\t\t\tlabel={ __( 'Top toolbar' ) }\n\t\t\t\t\t\t\t\tinfo={ __(\n\t\t\t\t\t\t\t\t\t'Access all block and document tools in a single place'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tmessageActivated={ __(\n\t\t\t\t\t\t\t\t\t'Top toolbar activated'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tmessageDeactivated={ __(\n\t\t\t\t\t\t\t\t\t'Top toolbar deactivated'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<PreferenceToggleMenuItem\n\t\t\t\t\t\t\t\tscope=\"core\"\n\t\t\t\t\t\t\t\tname=\"distractionFree\"\n\t\t\t\t\t\t\t\tlabel={ __( 'Distraction free' ) }\n\t\t\t\t\t\t\t\tinfo={ __( 'Write with calmness' ) }\n\t\t\t\t\t\t\t\thandleToggling={ false }\n\t\t\t\t\t\t\t\tonToggle={ toggleDistractionFree }\n\t\t\t\t\t\t\t\tmessageActivated={ __(\n\t\t\t\t\t\t\t\t\t'Distraction free mode activated'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tmessageDeactivated={ __(\n\t\t\t\t\t\t\t\t\t'Distraction free mode deactivated'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tshortcut={ displayShortcut.primaryShift(\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\t\t<PreferenceToggleMenuItem\n\t\t\t\t\t\t\t\tscope=\"core\"\n\t\t\t\t\t\t\t\tname=\"focusMode\"\n\t\t\t\t\t\t\t\tlabel={ __( 'Spotlight mode' ) }\n\t\t\t\t\t\t\t\tinfo={ __( 'Focus on one block at a time' ) }\n\t\t\t\t\t\t\t\tmessageActivated={ __(\n\t\t\t\t\t\t\t\t\t'Spotlight mode activated'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tmessageDeactivated={ __(\n\t\t\t\t\t\t\t\t\t'Spotlight mode deactivated'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t<ModeSwitcher />\n\t\t\t\t\t\t<ActionItem.Slot\n\t\t\t\t\t\t\tname=\"core/edit-site/plugin-more-menu\"\n\t\t\t\t\t\t\tlabel={ __( 'Plugins' ) }\n\t\t\t\t\t\t\tas={ MenuGroup }\n\t\t\t\t\t\t\tfillProps={ { onClick: onClose } }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<MenuGroup label={ __( 'Tools' ) }>\n\t\t\t\t\t\t\t{ isBlockBasedTheme && <SiteExport /> }\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\topenModal(\n\t\t\t\t\t\t\t\t\t\tKEYBOARD_SHORTCUT_HELP_MODAL_NAME\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\tshortcut={ displayShortcut.access( 'h' ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Keyboard shortcuts' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t<WelcomeGuideMenuItem />\n\t\t\t\t\t\t\t<CopyContentMenuItem />\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\ticon={ external }\n\t\t\t\t\t\t\t\trole=\"menuitem\"\n\t\t\t\t\t\t\t\thref={ __(\n\t\t\t\t\t\t\t\t\t'https://wordpress.org/documentation/article/site-editor/'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\trel=\"noopener noreferrer\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Help' ) }\n\t\t\t\t\t\t\t\t<VisuallyHidden as=\"span\">\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t/* translators: accessibility text */\n\t\t\t\t\t\t\t\t\t\t__( '(opens in a new tab)' )\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t<ToolsMoreMenuGroup.Slot\n\t\t\t\t\t\t\t\tfillProps={ { onClose } }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t<MenuGroup>\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\topenModal( PREFERENCES_MODAL_NAME )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Preferences' ) }\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) }\n\t\t\t</DropdownMenu>\n\t\t\t<KeyboardShortcutHelpModal />\n\t\t\t<EditSitePreferencesModal />\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AAMA,IAAAK,UAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AAIA,IAAAO,SAAA,GAAAP,OAAA;AACA,IAAAQ,OAAA,GAAAR,OAAA;AAQA,IAAAS,0BAAA,GAAAC,uBAAA,CAAAV,OAAA;AAIA,IAAAW,iBAAA,GAAAD,uBAAA,CA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AEvB,IAAAnC,QAAE,EAAE,MAAO,CAAC,EACd,IAAAP,MAAA,CAAAC,aAAA,EAACvD,WAAA,CAAAiG,cAAc;IAACX,EAAE,EAAC;EAAM,GAEvB;EACA,IAAAzB,QAAE,EAAE,sBAAuB,CAEb,CACP,CAAC,EACX,IAAAP,MAAA,CAAAC,aAAA,EAAC/C,mBAAA,CAAAY,OAAkB,CAACiE,IAAI;IACvBE,SAAS,EAAG;MAAEjB;IAAQ;EAAG,CACzB,CACS,CAAC,EACZ,IAAAhB,MAAA,CAAAC,aAAA,EAACvD,WAAA,CAAAuE,SAAS,QACT,IAAAjB,MAAA,CAAAC,aAAA,EAACvD,WAAA,CAAAyF,QAAQ;IACRD,OAAO,EAAGA,CAAA,KACThD,SAAS,CAAE0D,wCAAuB;EAClC,GAEC,IAAArC,QAAE,EAAE,aAAc,CACX,CACA,CACV,CAEU,CAAC,EACf,IAAAP,MAAA,CAAAC,aAAA,EAAClD,0BAAA,CAAAe,OAAyB,MAAE,CAAC,EAC7B,IAAAkC,MAAA,CAAAC,aAAA,EAAChD,iBAAA,CAAAa,OAAwB,MAAE,CAC1B,CAAC;AAEL"}
@@ -21,14 +21,7 @@ var _constants2 = require("../../store/constants");
21
21
  */
22
22
 
23
23
  function KeyboardShortcutsEditMode() {
24
- const {
25
- getEditorMode
26
- } = (0, _data.useSelect)(_store.store);
27
24
  const isBlockInspectorOpen = (0, _data.useSelect)(select => select(_interface.store).getActiveComplementaryArea(_store.store.name) === _constants.SIDEBAR_BLOCK, []);
28
- const {
29
- switchEditorMode,
30
- toggleDistractionFree
31
- } = (0, _data.useDispatch)(_store.store);
32
25
  const {
33
26
  enableComplementaryArea,
34
27
  disableComplementaryArea
@@ -73,9 +66,6 @@ function KeyboardShortcutsEditMode() {
73
66
  enableComplementaryArea(_constants2.STORE_NAME, _constants.SIDEBAR_BLOCK);
74
67
  }
75
68
  });
76
- (0, _keyboardShortcuts.useShortcut)('core/edit-site/toggle-mode', () => {
77
- switchEditorMode(getEditorMode() === 'visual' ? 'text' : 'visual');
78
- });
79
69
  (0, _keyboardShortcuts.useShortcut)('core/edit-site/transform-heading-to-paragraph', event => handleTextLevelShortcut(event, 0));
80
70
  [1, 2, 3, 4, 5, 6].forEach(level => {
81
71
  //the loop is based off on a constant therefore
@@ -83,9 +73,6 @@ function KeyboardShortcutsEditMode() {
83
73
  //eslint-disable-next-line react-hooks/rules-of-hooks
84
74
  (0, _keyboardShortcuts.useShortcut)(`core/edit-site/transform-paragraph-to-heading-${level}`, event => handleTextLevelShortcut(event, level));
85
75
  });
86
- (0, _keyboardShortcuts.useShortcut)('core/edit-site/toggle-distraction-free', () => {
87
- toggleDistractionFree();
88
- });
89
76
  return null;
90
77
  }
91
78
  var _default = exports.default = KeyboardShortcutsEditMode;