@wordpress/edit-site 3.0.7 → 3.0.11

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 (380) hide show
  1. package/build/components/add-new-template/index.js +49 -0
  2. package/build/components/add-new-template/index.js.map +1 -0
  3. package/build/components/add-new-template/new-template-part.js +78 -0
  4. package/build/components/add-new-template/new-template-part.js.map +1 -0
  5. package/build/components/add-new-template/new-template.js +114 -0
  6. package/build/components/add-new-template/new-template.js.map +1 -0
  7. package/build/components/block-editor/block-inspector-button.js +4 -3
  8. package/build/components/block-editor/block-inspector-button.js.map +1 -1
  9. package/build/components/block-editor/index.js +12 -8
  10. package/build/components/block-editor/index.js.map +1 -1
  11. package/build/components/block-editor/resizable-editor.js +6 -5
  12. package/build/components/block-editor/resizable-editor.js.map +1 -1
  13. package/build/components/block-editor/resize-handle.js +6 -4
  14. package/build/components/block-editor/resize-handle.js.map +1 -1
  15. package/build/components/create-template-part-modal/index.js +115 -0
  16. package/build/components/create-template-part-modal/index.js.map +1 -0
  17. package/build/components/edit-template-part-menu-button/index.js +15 -11
  18. package/build/components/edit-template-part-menu-button/index.js.map +1 -1
  19. package/build/components/editor/index.js +25 -20
  20. package/build/components/editor/index.js.map +1 -1
  21. package/build/components/error-boundary/index.js +5 -4
  22. package/build/components/error-boundary/index.js.map +1 -1
  23. package/build/components/global-styles/border-panel.js +5 -4
  24. package/build/components/global-styles/border-panel.js.map +1 -1
  25. package/build/components/global-styles/color-palette-panel.js +33 -9
  26. package/build/components/global-styles/color-palette-panel.js.map +1 -1
  27. package/build/components/global-styles/context-menu.js +5 -4
  28. package/build/components/global-styles/context-menu.js.map +1 -1
  29. package/build/components/global-styles/dimensions-panel.js +5 -4
  30. package/build/components/global-styles/dimensions-panel.js.map +1 -1
  31. package/build/components/global-styles/global-styles-provider.js +11 -46
  32. package/build/components/global-styles/global-styles-provider.js.map +1 -1
  33. package/build/components/global-styles/header.js +6 -5
  34. package/build/components/global-styles/header.js.map +1 -1
  35. package/build/components/global-styles/hooks.js +34 -30
  36. package/build/components/global-styles/hooks.js.map +1 -1
  37. package/build/components/global-styles/index.js +6 -6
  38. package/build/components/global-styles/navigation-button.js +8 -7
  39. package/build/components/global-styles/navigation-button.js.map +1 -1
  40. package/build/components/global-styles/palette.js +13 -9
  41. package/build/components/global-styles/palette.js.map +1 -1
  42. package/build/components/global-styles/screen-background-color.js +4 -3
  43. package/build/components/global-styles/screen-background-color.js.map +1 -1
  44. package/build/components/global-styles/screen-block-list.js +13 -4
  45. package/build/components/global-styles/screen-block-list.js.map +1 -1
  46. package/build/components/global-styles/screen-block.js +4 -3
  47. package/build/components/global-styles/screen-block.js.map +1 -1
  48. package/build/components/global-styles/screen-color-palette.js +4 -3
  49. package/build/components/global-styles/screen-color-palette.js.map +1 -1
  50. package/build/components/global-styles/screen-colors.js +19 -15
  51. package/build/components/global-styles/screen-colors.js.map +1 -1
  52. package/build/components/global-styles/screen-layout.js +8 -5
  53. package/build/components/global-styles/screen-layout.js.map +1 -1
  54. package/build/components/global-styles/screen-link-color.js +4 -3
  55. package/build/components/global-styles/screen-link-color.js.map +1 -1
  56. package/build/components/global-styles/screen-text-color.js +4 -3
  57. package/build/components/global-styles/screen-text-color.js.map +1 -1
  58. package/build/components/global-styles/screen-typography.js +4 -3
  59. package/build/components/global-styles/screen-typography.js.map +1 -1
  60. package/build/components/global-styles/subtitle.js +4 -3
  61. package/build/components/global-styles/subtitle.js.map +1 -1
  62. package/build/components/global-styles/typography-panel.js +10 -8
  63. package/build/components/global-styles/typography-panel.js.map +1 -1
  64. package/build/components/global-styles/ui.js +4 -3
  65. package/build/components/global-styles/ui.js.map +1 -1
  66. package/build/components/global-styles/use-global-styles-output.js +61 -44
  67. package/build/components/global-styles/use-global-styles-output.js.map +1 -1
  68. package/build/components/global-styles/utils.js +4 -3
  69. package/build/components/global-styles/utils.js.map +1 -1
  70. package/build/components/header/document-actions/index.js +23 -19
  71. package/build/components/header/document-actions/index.js.map +1 -1
  72. package/build/components/header/feature-toggle/index.js +9 -7
  73. package/build/components/header/feature-toggle/index.js.map +1 -1
  74. package/build/components/header/index.js +15 -15
  75. package/build/components/header/index.js.map +1 -1
  76. package/build/components/header/more-menu/index.js +30 -27
  77. package/build/components/header/more-menu/index.js.map +1 -1
  78. package/build/components/header/tools-more-menu-group/index.js +10 -7
  79. package/build/components/header/tools-more-menu-group/index.js.map +1 -1
  80. package/build/components/keyboard-shortcuts/index.js +30 -3
  81. package/build/components/keyboard-shortcuts/index.js.map +1 -1
  82. package/build/components/list/header.js +50 -0
  83. package/build/components/list/header.js.map +1 -0
  84. package/build/components/list/index.js +87 -0
  85. package/build/components/list/index.js.map +1 -0
  86. package/build/components/list/table.js +127 -0
  87. package/build/components/list/table.js.map +1 -0
  88. package/build/components/list/use-register-shortcuts.js +52 -0
  89. package/build/components/list/use-register-shortcuts.js.map +1 -0
  90. package/build/components/main-dashboard-button/index.js +4 -3
  91. package/build/components/main-dashboard-button/index.js.map +1 -1
  92. package/build/components/navigate-to-link/index.js +7 -6
  93. package/build/components/navigate-to-link/index.js.map +1 -1
  94. package/build/components/navigation-sidebar/index.js +25 -10
  95. package/build/components/navigation-sidebar/index.js.map +1 -1
  96. package/build/components/navigation-sidebar/navigation-panel/constants.js +1 -1
  97. package/build/components/navigation-sidebar/navigation-panel/content-navigation-item.js +4 -3
  98. package/build/components/navigation-sidebar/navigation-panel/content-navigation-item.js.map +1 -1
  99. package/build/components/navigation-sidebar/navigation-panel/index.js +37 -55
  100. package/build/components/navigation-sidebar/navigation-panel/index.js.map +1 -1
  101. package/build/components/navigation-sidebar/navigation-panel/menus/template-parts-sub.js +6 -5
  102. package/build/components/navigation-sidebar/navigation-panel/menus/template-parts-sub.js.map +1 -1
  103. package/build/components/navigation-sidebar/navigation-panel/menus/template-parts.js +26 -20
  104. package/build/components/navigation-sidebar/navigation-panel/menus/template-parts.js.map +1 -1
  105. package/build/components/navigation-sidebar/navigation-panel/menus/templates-sub.js +17 -10
  106. package/build/components/navigation-sidebar/navigation-panel/menus/templates-sub.js.map +1 -1
  107. package/build/components/navigation-sidebar/navigation-panel/menus/templates.js +11 -5
  108. package/build/components/navigation-sidebar/navigation-panel/menus/templates.js.map +1 -1
  109. package/build/components/navigation-sidebar/navigation-panel/navigation-entity-items.js +13 -11
  110. package/build/components/navigation-sidebar/navigation-panel/navigation-entity-items.js.map +1 -1
  111. package/build/components/navigation-sidebar/navigation-panel/new-template-dropdown.js +24 -18
  112. package/build/components/navigation-sidebar/navigation-panel/new-template-dropdown.js.map +1 -1
  113. package/build/components/navigation-sidebar/navigation-panel/search-results.js +14 -11
  114. package/build/components/navigation-sidebar/navigation-panel/search-results.js.map +1 -1
  115. package/build/components/navigation-sidebar/navigation-panel/template-hierarchy.js +8 -5
  116. package/build/components/navigation-sidebar/navigation-panel/template-hierarchy.js.map +1 -1
  117. package/build/components/navigation-sidebar/navigation-panel/template-navigation-item.js +4 -3
  118. package/build/components/navigation-sidebar/navigation-panel/template-navigation-item.js.map +1 -1
  119. package/build/components/navigation-sidebar/navigation-panel/template-preview.js +5 -4
  120. package/build/components/navigation-sidebar/navigation-panel/template-preview.js.map +1 -1
  121. package/build/components/navigation-sidebar/navigation-toggle/index.js +7 -27
  122. package/build/components/navigation-sidebar/navigation-toggle/index.js.map +1 -1
  123. package/build/components/save-button/index.js +5 -4
  124. package/build/components/save-button/index.js.map +1 -1
  125. package/build/components/sidebar/constants.js +1 -1
  126. package/build/components/sidebar/default-sidebar.js +11 -10
  127. package/build/components/sidebar/default-sidebar.js.map +1 -1
  128. package/build/components/sidebar/plugin-sidebar/index.js +5 -4
  129. package/build/components/sidebar/plugin-sidebar/index.js.map +1 -1
  130. package/build/components/sidebar/settings-header/index.js +4 -3
  131. package/build/components/sidebar/settings-header/index.js.map +1 -1
  132. package/build/components/sidebar/template-card/template-areas.js +17 -13
  133. package/build/components/sidebar/template-card/template-areas.js.map +1 -1
  134. package/build/components/template-details/index.js +14 -9
  135. package/build/components/template-details/index.js.map +1 -1
  136. package/build/components/template-details/template-areas.js +38 -29
  137. package/build/components/template-details/template-areas.js.map +1 -1
  138. package/build/components/template-part-converter/convert-to-regular.js +15 -11
  139. package/build/components/template-part-converter/convert-to-regular.js.map +1 -1
  140. package/build/components/template-part-converter/convert-to-template-part.js +29 -86
  141. package/build/components/template-part-converter/convert-to-template-part.js.map +1 -1
  142. package/build/components/welcome-guide/editor.js +58 -0
  143. package/build/components/welcome-guide/editor.js.map +1 -0
  144. package/build/components/welcome-guide/image.js +27 -0
  145. package/build/components/welcome-guide/image.js.map +1 -0
  146. package/build/components/welcome-guide/index.js +49 -0
  147. package/build/components/welcome-guide/index.js.map +1 -0
  148. package/build/components/welcome-guide/styles.js +83 -0
  149. package/build/components/welcome-guide/styles.js.map +1 -0
  150. package/build/index.js +40 -16
  151. package/build/index.js.map +1 -1
  152. package/build/plugins/index.js +4 -2
  153. package/build/plugins/index.js.map +1 -1
  154. package/build/plugins/welcome-guide-menu-item.js +39 -0
  155. package/build/plugins/welcome-guide-menu-item.js.map +1 -0
  156. package/build/store/actions.js +24 -24
  157. package/build/store/actions.js.map +1 -1
  158. package/build/store/constants.js +1 -1
  159. package/build/store/defaults.js +4 -1
  160. package/build/store/defaults.js.map +1 -1
  161. package/build/store/index.js +5 -3
  162. package/build/store/index.js.map +1 -1
  163. package/build/store/reducer.js +36 -14
  164. package/build/store/reducer.js.map +1 -1
  165. package/build/store/selectors.js +27 -19
  166. package/build/store/selectors.js.map +1 -1
  167. package/build/utils/is-template-removable.js +21 -0
  168. package/build/utils/is-template-removable.js.map +1 -0
  169. package/build-module/components/add-new-template/index.js +36 -0
  170. package/build-module/components/add-new-template/index.js.map +1 -0
  171. package/build-module/components/add-new-template/new-template-part.js +65 -0
  172. package/build-module/components/add-new-template/new-template-part.js.map +1 -0
  173. package/build-module/components/add-new-template/new-template.js +97 -0
  174. package/build-module/components/add-new-template/new-template.js.map +1 -0
  175. package/build-module/components/block-editor/block-inspector-button.js +4 -3
  176. package/build-module/components/block-editor/block-inspector-button.js.map +1 -1
  177. package/build-module/components/block-editor/index.js +12 -8
  178. package/build-module/components/block-editor/index.js.map +1 -1
  179. package/build-module/components/block-editor/resizable-editor.js +6 -5
  180. package/build-module/components/block-editor/resizable-editor.js.map +1 -1
  181. package/build-module/components/block-editor/resize-handle.js +6 -4
  182. package/build-module/components/block-editor/resize-handle.js.map +1 -1
  183. package/build-module/components/create-template-part-modal/index.js +102 -0
  184. package/build-module/components/create-template-part-modal/index.js.map +1 -0
  185. package/build-module/components/edit-template-part-menu-button/index.js +15 -11
  186. package/build-module/components/edit-template-part-menu-button/index.js.map +1 -1
  187. package/build-module/components/editor/index.js +24 -21
  188. package/build-module/components/editor/index.js.map +1 -1
  189. package/build-module/components/error-boundary/index.js +5 -4
  190. package/build-module/components/error-boundary/index.js.map +1 -1
  191. package/build-module/components/global-styles/border-panel.js +4 -3
  192. package/build-module/components/global-styles/border-panel.js.map +1 -1
  193. package/build-module/components/global-styles/color-palette-panel.js +33 -10
  194. package/build-module/components/global-styles/color-palette-panel.js.map +1 -1
  195. package/build-module/components/global-styles/context-menu.js +5 -4
  196. package/build-module/components/global-styles/context-menu.js.map +1 -1
  197. package/build-module/components/global-styles/dimensions-panel.js +4 -3
  198. package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
  199. package/build-module/components/global-styles/global-styles-provider.js +12 -42
  200. package/build-module/components/global-styles/global-styles-provider.js.map +1 -1
  201. package/build-module/components/global-styles/header.js +6 -5
  202. package/build-module/components/global-styles/header.js.map +1 -1
  203. package/build-module/components/global-styles/hooks.js +32 -28
  204. package/build-module/components/global-styles/hooks.js.map +1 -1
  205. package/build-module/components/global-styles/navigation-button.js +8 -7
  206. package/build-module/components/global-styles/navigation-button.js.map +1 -1
  207. package/build-module/components/global-styles/palette.js +13 -9
  208. package/build-module/components/global-styles/palette.js.map +1 -1
  209. package/build-module/components/global-styles/screen-background-color.js +4 -3
  210. package/build-module/components/global-styles/screen-background-color.js.map +1 -1
  211. package/build-module/components/global-styles/screen-block-list.js +11 -4
  212. package/build-module/components/global-styles/screen-block-list.js.map +1 -1
  213. package/build-module/components/global-styles/screen-block.js +4 -3
  214. package/build-module/components/global-styles/screen-block.js.map +1 -1
  215. package/build-module/components/global-styles/screen-color-palette.js +4 -3
  216. package/build-module/components/global-styles/screen-color-palette.js.map +1 -1
  217. package/build-module/components/global-styles/screen-colors.js +19 -15
  218. package/build-module/components/global-styles/screen-colors.js.map +1 -1
  219. package/build-module/components/global-styles/screen-layout.js +4 -3
  220. package/build-module/components/global-styles/screen-layout.js.map +1 -1
  221. package/build-module/components/global-styles/screen-link-color.js +4 -3
  222. package/build-module/components/global-styles/screen-link-color.js.map +1 -1
  223. package/build-module/components/global-styles/screen-text-color.js +4 -3
  224. package/build-module/components/global-styles/screen-text-color.js.map +1 -1
  225. package/build-module/components/global-styles/screen-typography.js +4 -3
  226. package/build-module/components/global-styles/screen-typography.js.map +1 -1
  227. package/build-module/components/global-styles/subtitle.js +4 -3
  228. package/build-module/components/global-styles/subtitle.js.map +1 -1
  229. package/build-module/components/global-styles/typography-panel.js +9 -7
  230. package/build-module/components/global-styles/typography-panel.js.map +1 -1
  231. package/build-module/components/global-styles/ui.js +4 -3
  232. package/build-module/components/global-styles/ui.js.map +1 -1
  233. package/build-module/components/global-styles/use-global-styles-output.js +60 -43
  234. package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
  235. package/build-module/components/global-styles/utils.js +3 -2
  236. package/build-module/components/global-styles/utils.js.map +1 -1
  237. package/build-module/components/header/document-actions/index.js +23 -19
  238. package/build-module/components/header/document-actions/index.js.map +1 -1
  239. package/build-module/components/header/feature-toggle/index.js +9 -7
  240. package/build-module/components/header/feature-toggle/index.js.map +1 -1
  241. package/build-module/components/header/index.js +15 -13
  242. package/build-module/components/header/index.js.map +1 -1
  243. package/build-module/components/header/more-menu/index.js +30 -27
  244. package/build-module/components/header/more-menu/index.js.map +1 -1
  245. package/build-module/components/header/tools-more-menu-group/index.js +10 -7
  246. package/build-module/components/header/tools-more-menu-group/index.js.map +1 -1
  247. package/build-module/components/keyboard-shortcuts/index.js +30 -3
  248. package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
  249. package/build-module/components/list/header.js +37 -0
  250. package/build-module/components/list/header.js.map +1 -0
  251. package/build-module/components/list/index.js +69 -0
  252. package/build-module/components/list/index.js.map +1 -0
  253. package/build-module/components/list/table.js +111 -0
  254. package/build-module/components/list/table.js.map +1 -0
  255. package/build-module/components/list/use-register-shortcuts.js +41 -0
  256. package/build-module/components/list/use-register-shortcuts.js.map +1 -0
  257. package/build-module/components/main-dashboard-button/index.js +4 -3
  258. package/build-module/components/main-dashboard-button/index.js.map +1 -1
  259. package/build-module/components/navigate-to-link/index.js +7 -6
  260. package/build-module/components/navigate-to-link/index.js.map +1 -1
  261. package/build-module/components/navigation-sidebar/index.js +25 -8
  262. package/build-module/components/navigation-sidebar/index.js.map +1 -1
  263. package/build-module/components/navigation-sidebar/navigation-panel/content-navigation-item.js +4 -3
  264. package/build-module/components/navigation-sidebar/navigation-panel/content-navigation-item.js.map +1 -1
  265. package/build-module/components/navigation-sidebar/navigation-panel/index.js +39 -55
  266. package/build-module/components/navigation-sidebar/navigation-panel/index.js.map +1 -1
  267. package/build-module/components/navigation-sidebar/navigation-panel/menus/template-parts-sub.js +6 -5
  268. package/build-module/components/navigation-sidebar/navigation-panel/menus/template-parts-sub.js.map +1 -1
  269. package/build-module/components/navigation-sidebar/navigation-panel/menus/template-parts.js +26 -20
  270. package/build-module/components/navigation-sidebar/navigation-panel/menus/template-parts.js.map +1 -1
  271. package/build-module/components/navigation-sidebar/navigation-panel/menus/templates-sub.js +17 -10
  272. package/build-module/components/navigation-sidebar/navigation-panel/menus/templates-sub.js.map +1 -1
  273. package/build-module/components/navigation-sidebar/navigation-panel/menus/templates.js +11 -5
  274. package/build-module/components/navigation-sidebar/navigation-panel/menus/templates.js.map +1 -1
  275. package/build-module/components/navigation-sidebar/navigation-panel/navigation-entity-items.js +13 -11
  276. package/build-module/components/navigation-sidebar/navigation-panel/navigation-entity-items.js.map +1 -1
  277. package/build-module/components/navigation-sidebar/navigation-panel/new-template-dropdown.js +24 -18
  278. package/build-module/components/navigation-sidebar/navigation-panel/new-template-dropdown.js.map +1 -1
  279. package/build-module/components/navigation-sidebar/navigation-panel/search-results.js +14 -11
  280. package/build-module/components/navigation-sidebar/navigation-panel/search-results.js.map +1 -1
  281. package/build-module/components/navigation-sidebar/navigation-panel/template-hierarchy.js +6 -3
  282. package/build-module/components/navigation-sidebar/navigation-panel/template-hierarchy.js.map +1 -1
  283. package/build-module/components/navigation-sidebar/navigation-panel/template-navigation-item.js +4 -3
  284. package/build-module/components/navigation-sidebar/navigation-panel/template-navigation-item.js.map +1 -1
  285. package/build-module/components/navigation-sidebar/navigation-panel/template-preview.js +5 -4
  286. package/build-module/components/navigation-sidebar/navigation-panel/template-preview.js.map +1 -1
  287. package/build-module/components/navigation-sidebar/navigation-toggle/index.js +8 -27
  288. package/build-module/components/navigation-sidebar/navigation-toggle/index.js.map +1 -1
  289. package/build-module/components/save-button/index.js +5 -4
  290. package/build-module/components/save-button/index.js.map +1 -1
  291. package/build-module/components/sidebar/default-sidebar.js +11 -10
  292. package/build-module/components/sidebar/default-sidebar.js.map +1 -1
  293. package/build-module/components/sidebar/plugin-sidebar/index.js +5 -4
  294. package/build-module/components/sidebar/plugin-sidebar/index.js.map +1 -1
  295. package/build-module/components/sidebar/settings-header/index.js +4 -3
  296. package/build-module/components/sidebar/settings-header/index.js.map +1 -1
  297. package/build-module/components/sidebar/template-card/template-areas.js +17 -13
  298. package/build-module/components/sidebar/template-card/template-areas.js.map +1 -1
  299. package/build-module/components/template-details/index.js +14 -9
  300. package/build-module/components/template-details/index.js.map +1 -1
  301. package/build-module/components/template-details/template-areas.js +38 -29
  302. package/build-module/components/template-details/template-areas.js.map +1 -1
  303. package/build-module/components/template-part-converter/convert-to-regular.js +15 -11
  304. package/build-module/components/template-part-converter/convert-to-regular.js.map +1 -1
  305. package/build-module/components/template-part-converter/convert-to-template-part.js +29 -86
  306. package/build-module/components/template-part-converter/convert-to-template-part.js.map +1 -1
  307. package/build-module/components/welcome-guide/editor.js +45 -0
  308. package/build-module/components/welcome-guide/editor.js.map +1 -0
  309. package/build-module/components/welcome-guide/image.js +19 -0
  310. package/build-module/components/welcome-guide/image.js.map +1 -0
  311. package/build-module/components/welcome-guide/index.js +35 -0
  312. package/build-module/components/welcome-guide/index.js.map +1 -0
  313. package/build-module/components/welcome-guide/styles.js +69 -0
  314. package/build-module/components/welcome-guide/styles.js.map +1 -0
  315. package/build-module/index.js +21 -1
  316. package/build-module/index.js.map +1 -1
  317. package/build-module/plugins/index.js +3 -2
  318. package/build-module/plugins/index.js.map +1 -1
  319. package/build-module/plugins/welcome-guide-menu-item.js +27 -0
  320. package/build-module/plugins/welcome-guide-menu-item.js.map +1 -0
  321. package/build-module/store/actions.js +11 -11
  322. package/build-module/store/actions.js.map +1 -1
  323. package/build-module/store/defaults.js +4 -1
  324. package/build-module/store/defaults.js.map +1 -1
  325. package/build-module/store/reducer.js +31 -10
  326. package/build-module/store/reducer.js.map +1 -1
  327. package/build-module/store/selectors.js +17 -10
  328. package/build-module/store/selectors.js.map +1 -1
  329. package/build-module/utils/is-template-removable.js +14 -0
  330. package/build-module/utils/is-template-removable.js.map +1 -0
  331. package/build-style/style-rtl.css +348 -32
  332. package/build-style/style.css +348 -32
  333. package/package.json +27 -27
  334. package/src/components/add-new-template/index.js +30 -0
  335. package/src/components/add-new-template/new-template-part.js +66 -0
  336. package/src/components/add-new-template/new-template.js +116 -0
  337. package/src/components/add-new-template/style.scss +11 -0
  338. package/src/components/create-template-part-modal/index.js +132 -0
  339. package/src/components/{template-part-converter → create-template-part-modal}/style.scss +9 -9
  340. package/src/components/editor/index.js +22 -15
  341. package/src/components/editor/style.scss +8 -0
  342. package/src/components/global-styles/color-palette-panel.js +64 -7
  343. package/src/components/global-styles/global-styles-provider.js +7 -36
  344. package/src/components/global-styles/hooks.js +58 -26
  345. package/src/components/global-styles/screen-block-list.js +11 -1
  346. package/src/components/global-styles/test/use-global-styles-output.js +2 -2
  347. package/src/components/global-styles/use-global-styles-output.js +2 -2
  348. package/src/components/global-styles/utils.js +1 -1
  349. package/src/components/header/index.js +0 -6
  350. package/src/components/keyboard-shortcuts/index.js +32 -0
  351. package/src/components/list/header.js +34 -0
  352. package/src/components/list/index.js +80 -0
  353. package/src/components/list/style.scss +113 -0
  354. package/src/components/list/table.js +132 -0
  355. package/src/components/list/use-register-shortcuts.js +45 -0
  356. package/src/components/navigation-sidebar/index.js +31 -8
  357. package/src/components/navigation-sidebar/navigation-panel/index.js +45 -55
  358. package/src/components/navigation-sidebar/navigation-panel/style.scss +4 -2
  359. package/src/components/navigation-sidebar/navigation-toggle/index.js +4 -28
  360. package/src/components/template-details/index.js +3 -2
  361. package/src/components/template-part-converter/convert-to-template-part.js +20 -140
  362. package/src/components/welcome-guide/editor.js +63 -0
  363. package/src/components/welcome-guide/image.js +11 -0
  364. package/src/components/welcome-guide/index.js +33 -0
  365. package/src/components/welcome-guide/style.scss +37 -0
  366. package/src/components/welcome-guide/styles.js +116 -0
  367. package/src/index.js +21 -1
  368. package/src/plugins/index.js +3 -1
  369. package/src/plugins/welcome-guide-menu-item.js +35 -0
  370. package/src/store/actions.js +11 -9
  371. package/src/store/defaults.js +4 -1
  372. package/src/store/test/actions.js +14 -20
  373. package/src/style.scss +9 -6
  374. package/src/utils/is-template-removable.js +13 -0
  375. package/build/components/header/navigation-link/index.js +0 -86
  376. package/build/components/header/navigation-link/index.js.map +0 -1
  377. package/build-module/components/header/navigation-link/index.js +0 -73
  378. package/build-module/components/header/navigation-link/index.js.map +0 -1
  379. package/src/components/header/navigation-link/index.js +0 -71
  380. package/src/components/header/navigation-link/style.scss +0 -69
@@ -30,10 +30,11 @@ var _subtitle = _interopRequireDefault(require("./subtitle"));
30
30
  /**
31
31
  * Internal dependencies
32
32
  */
33
- function BackgroundColorItem({
34
- name,
35
- parentMenu
36
- }) {
33
+ function BackgroundColorItem(_ref) {
34
+ let {
35
+ name,
36
+ parentMenu
37
+ } = _ref;
37
38
  const supports = (0, _hooks.getSupportedGlobalStylesPanels)(name);
38
39
  const hasSupport = supports.includes('backgroundColor') || supports.includes('background');
39
40
  const [backgroundColor] = (0, _hooks.useStyle)('color.background', name);
@@ -52,10 +53,11 @@ function BackgroundColorItem({
52
53
  })), (0, _element.createElement)(_components.FlexItem, null, (0, _i18n.__)('Background'))));
53
54
  }
54
55
 
55
- function TextColorItem({
56
- name,
57
- parentMenu
58
- }) {
56
+ function TextColorItem(_ref2) {
57
+ let {
58
+ name,
59
+ parentMenu
60
+ } = _ref2;
59
61
  const supports = (0, _hooks.getSupportedGlobalStylesPanels)(name);
60
62
  const hasSupport = supports.includes('color');
61
63
  const [color] = (0, _hooks.useStyle)('color.text', name);
@@ -73,10 +75,11 @@ function TextColorItem({
73
75
  })), (0, _element.createElement)(_components.FlexItem, null, (0, _i18n.__)('Text'))));
74
76
  }
75
77
 
76
- function LinkColorItem({
77
- name,
78
- parentMenu
79
- }) {
78
+ function LinkColorItem(_ref3) {
79
+ let {
80
+ name,
81
+ parentMenu
82
+ } = _ref3;
80
83
  const supports = (0, _hooks.getSupportedGlobalStylesPanels)(name);
81
84
  const hasSupport = supports.includes('linkColor');
82
85
  const [color] = (0, _hooks.useStyle)('elements.link.color.text', name);
@@ -94,9 +97,10 @@ function LinkColorItem({
94
97
  })), (0, _element.createElement)(_components.FlexItem, null, (0, _i18n.__)('Links'))));
95
98
  }
96
99
 
97
- function ScreenColors({
98
- name
99
- }) {
100
+ function ScreenColors(_ref4) {
101
+ let {
102
+ name
103
+ } = _ref4;
100
104
  const parentMenu = name === undefined ? '' : '/blocks/' + name;
101
105
  return (0, _element.createElement)(_element.Fragment, null, (0, _element.createElement)(_header.default, {
102
106
  back: parentMenu ? parentMenu : '/',
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/screen-colors.js"],"names":["BackgroundColorItem","name","parentMenu","supports","hasSupport","includes","backgroundColor","gradientValue","TextColorItem","color","LinkColorItem","ScreenColors","undefined"],"mappings":";;;;;;;;;;;AAGA;;AACA;;AAWA;;AACA;;AACA;;AACA;;AACA;;AAnBA;AACA;AACA;;AAUA;AACA;AACA;AAOA,SAASA,mBAAT,CAA8B;AAAEC,EAAAA,IAAF;AAAQC,EAAAA;AAAR,CAA9B,EAAqD;AACpD,QAAMC,QAAQ,GAAG,2CAAgCF,IAAhC,CAAjB;AACA,QAAMG,UAAU,GACfD,QAAQ,CAACE,QAAT,CAAmB,iBAAnB,KACAF,QAAQ,CAACE,QAAT,CAAmB,YAAnB,CAFD;AAGA,QAAM,CAAEC,eAAF,IAAsB,qBAAU,kBAAV,EAA8BL,IAA9B,CAA5B;AACA,QAAM,CAAEM,aAAF,IAAoB,qBAAU,gBAAV,EAA4BN,IAA5B,CAA1B;;AAEA,MAAK,CAAEG,UAAP,EAAoB;AACnB,WAAO,IAAP;AACA;;AAED,SACC,4BAAC,yBAAD;AAAkB,IAAA,IAAI,EAAGF,UAAU,GAAG;AAAtC,KACC,4BAAC,gCAAD;AAAQ,IAAA,OAAO,EAAC;AAAhB,KACC,4BAAC,oBAAD,QACC,4BAAC,0BAAD;AACC,IAAA,UAAU,EAAGK,aAAH,aAAGA,aAAH,cAAGA,aAAH,GAAoBD;AAD/B,IADD,CADD,EAMC,4BAAC,oBAAD,QAAY,cAAI,YAAJ,CAAZ,CAND,CADD,CADD;AAYA;;AAED,SAASE,aAAT,CAAwB;AAAEP,EAAAA,IAAF;AAAQC,EAAAA;AAAR,CAAxB,EAA+C;AAC9C,QAAMC,QAAQ,GAAG,2CAAgCF,IAAhC,CAAjB;AACA,QAAMG,UAAU,GAAGD,QAAQ,CAACE,QAAT,CAAmB,OAAnB,CAAnB;AACA,QAAM,CAAEI,KAAF,IAAY,qBAAU,YAAV,EAAwBR,IAAxB,CAAlB;;AAEA,MAAK,CAAEG,UAAP,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AAS,EAAC;AAAf,KACC,4BAAC,gCAAD;AAAQ,IAAA,OAAO,EAAG;AAAlB,KACC,4BAAC,gBAAD;AAAS,IAAA,IAAI,EAAGD;AAAhB,IADD,EAGC,4BAAC,gCAAD;AAAQ,IAAA,OAAO,EAAG;AAAlB,KACC,4BAAC,iBAAD,QAAY,cAAI,UAAJ,CAAZ,CADD,EAEC,4BAAC,mCAAD;AAAW,IAAA,UAAU,MAArB;AAAsB,IAAA,WAAW;AAAjC,KACC,4BAAC,mBAAD;AACC,IAAA,IAAI,EAAGA,IADR;AAEC,IAAA,UAAU,EAAGC;AAFd,IADD,EAKC,4BAAC,aAAD;AACC,IAAA,IAAI,EAAGD,IADR;AAEC,IAAA,UAAU,EAAGC;AAFd,IALD,EASC,4BAAC,aAAD;AACC,IAAA,IAAI,EAAGD,IADR;AAEC,IAAA,UAAU,EAAGC;AAFd,IATD,CAFD,CAHD,CADD,CATD,CADD;AAmCA;;eAEcS,Y","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\t__experimentalItemGroup as ItemGroup,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\tFlexItem,\n\tColorIndicator,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport ScreenHeader from './header';\nimport Palette from './palette';\nimport NavigationButton from './navigation-button';\nimport { getSupportedGlobalStylesPanels, useStyle } from './hooks';\nimport Subtitle from './subtitle';\n\nfunction BackgroundColorItem( { name, parentMenu } ) {\n\tconst supports = getSupportedGlobalStylesPanels( name );\n\tconst hasSupport =\n\t\tsupports.includes( 'backgroundColor' ) ||\n\t\tsupports.includes( 'background' );\n\tconst [ backgroundColor ] = useStyle( 'color.background', name );\n\tconst [ gradientValue ] = useStyle( 'color.gradient', name );\n\n\tif ( ! hasSupport ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<NavigationButton path={ parentMenu + '/colors/background' }>\n\t\t\t<HStack justify=\"flex-start\">\n\t\t\t\t<FlexItem>\n\t\t\t\t\t<ColorIndicator\n\t\t\t\t\t\tcolorValue={ gradientValue ?? backgroundColor }\n\t\t\t\t\t/>\n\t\t\t\t</FlexItem>\n\t\t\t\t<FlexItem>{ __( 'Background' ) }</FlexItem>\n\t\t\t</HStack>\n\t\t</NavigationButton>\n\t);\n}\n\nfunction TextColorItem( { name, parentMenu } ) {\n\tconst supports = getSupportedGlobalStylesPanels( name );\n\tconst hasSupport = supports.includes( 'color' );\n\tconst [ color ] = useStyle( 'color.text', name );\n\n\tif ( ! hasSupport ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<NavigationButton path={ parentMenu + '/colors/text' }>\n\t\t\t<HStack justify=\"flex-start\">\n\t\t\t\t<FlexItem>\n\t\t\t\t\t<ColorIndicator colorValue={ color } />\n\t\t\t\t</FlexItem>\n\t\t\t\t<FlexItem>{ __( 'Text' ) }</FlexItem>\n\t\t\t</HStack>\n\t\t</NavigationButton>\n\t);\n}\n\nfunction LinkColorItem( { name, parentMenu } ) {\n\tconst supports = getSupportedGlobalStylesPanels( name );\n\tconst hasSupport = supports.includes( 'linkColor' );\n\tconst [ color ] = useStyle( 'elements.link.color.text', name );\n\n\tif ( ! hasSupport ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<NavigationButton path={ parentMenu + '/colors/link' }>\n\t\t\t<HStack justify=\"flex-start\">\n\t\t\t\t<FlexItem>\n\t\t\t\t\t<ColorIndicator colorValue={ color } />\n\t\t\t\t</FlexItem>\n\t\t\t\t<FlexItem>{ __( 'Links' ) }</FlexItem>\n\t\t\t</HStack>\n\t\t</NavigationButton>\n\t);\n}\n\nfunction ScreenColors( { name } ) {\n\tconst parentMenu = name === undefined ? '' : '/blocks/' + name;\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\tback={ parentMenu ? parentMenu : '/' }\n\t\t\t\ttitle={ __( 'Colors' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Manage palettes and the default color of different global elements on the website.'\n\t\t\t\t) }\n\t\t\t/>\n\n\t\t\t<div className=\"edit-site-global-styles-screen-colors\">\n\t\t\t\t<VStack spacing={ 10 }>\n\t\t\t\t\t<Palette name={ name } />\n\n\t\t\t\t\t<VStack spacing={ 3 }>\n\t\t\t\t\t\t<Subtitle>{ __( 'Elements' ) }</Subtitle>\n\t\t\t\t\t\t<ItemGroup isBordered isSeparated>\n\t\t\t\t\t\t\t<BackgroundColorItem\n\t\t\t\t\t\t\t\tname={ name }\n\t\t\t\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<TextColorItem\n\t\t\t\t\t\t\t\tname={ name }\n\t\t\t\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<LinkColorItem\n\t\t\t\t\t\t\t\tname={ name }\n\t\t\t\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ItemGroup>\n\t\t\t\t\t</VStack>\n\t\t\t\t</VStack>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default ScreenColors;\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/screen-colors.js"],"names":["BackgroundColorItem","name","parentMenu","supports","hasSupport","includes","backgroundColor","gradientValue","TextColorItem","color","LinkColorItem","ScreenColors","undefined"],"mappings":";;;;;;;;;;;AAGA;;AACA;;AAWA;;AACA;;AACA;;AACA;;AACA;;AAnBA;AACA;AACA;;AAUA;AACA;AACA;AAOA,SAASA,mBAAT,OAAqD;AAAA,MAAvB;AAAEC,IAAAA,IAAF;AAAQC,IAAAA;AAAR,GAAuB;AACpD,QAAMC,QAAQ,GAAG,2CAAgCF,IAAhC,CAAjB;AACA,QAAMG,UAAU,GACfD,QAAQ,CAACE,QAAT,CAAmB,iBAAnB,KACAF,QAAQ,CAACE,QAAT,CAAmB,YAAnB,CAFD;AAGA,QAAM,CAAEC,eAAF,I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AU,EAAGC;AAFd,IALD,EASC,4BAAC,aAAD;AACC,IAAA,IAAI,EAAGD,IADR;AAEC,IAAA,UAAU,EAAGC;AAFd,IATD,CAFD,CAHD,CADD,CATD,CADD;AAmCA;;eAEcS,Y","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\t__experimentalItemGroup as ItemGroup,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\tFlexItem,\n\tColorIndicator,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport ScreenHeader from './header';\nimport Palette from './palette';\nimport NavigationButton from './navigation-button';\nimport { getSupportedGlobalStylesPanels, useStyle } from './hooks';\nimport Subtitle from './subtitle';\n\nfunction BackgroundColorItem( { name, parentMenu } ) {\n\tconst supports = getSupportedGlobalStylesPanels( name );\n\tconst hasSupport =\n\t\tsupports.includes( 'backgroundColor' ) ||\n\t\tsupports.includes( 'background' );\n\tconst [ backgroundColor ] = useStyle( 'color.background', name );\n\tconst [ gradientValue ] = useStyle( 'color.gradient', name );\n\n\tif ( ! hasSupport ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<NavigationButton path={ parentMenu + '/colors/background' }>\n\t\t\t<HStack justify=\"flex-start\">\n\t\t\t\t<FlexItem>\n\t\t\t\t\t<ColorIndicator\n\t\t\t\t\t\tcolorValue={ gradientValue ?? backgroundColor }\n\t\t\t\t\t/>\n\t\t\t\t</FlexItem>\n\t\t\t\t<FlexItem>{ __( 'Background' ) }</FlexItem>\n\t\t\t</HStack>\n\t\t</NavigationButton>\n\t);\n}\n\nfunction TextColorItem( { name, parentMenu } ) {\n\tconst supports = getSupportedGlobalStylesPanels( name );\n\tconst hasSupport = supports.includes( 'color' );\n\tconst [ color ] = useStyle( 'color.text', name );\n\n\tif ( ! hasSupport ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<NavigationButton path={ parentMenu + '/colors/text' }>\n\t\t\t<HStack justify=\"flex-start\">\n\t\t\t\t<FlexItem>\n\t\t\t\t\t<ColorIndicator colorValue={ color } />\n\t\t\t\t</FlexItem>\n\t\t\t\t<FlexItem>{ __( 'Text' ) }</FlexItem>\n\t\t\t</HStack>\n\t\t</NavigationButton>\n\t);\n}\n\nfunction LinkColorItem( { name, parentMenu } ) {\n\tconst supports = getSupportedGlobalStylesPanels( name );\n\tconst hasSupport = supports.includes( 'linkColor' );\n\tconst [ color ] = useStyle( 'elements.link.color.text', name );\n\n\tif ( ! hasSupport ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<NavigationButton path={ parentMenu + '/colors/link' }>\n\t\t\t<HStack justify=\"flex-start\">\n\t\t\t\t<FlexItem>\n\t\t\t\t\t<ColorIndicator colorValue={ color } />\n\t\t\t\t</FlexItem>\n\t\t\t\t<FlexItem>{ __( 'Links' ) }</FlexItem>\n\t\t\t</HStack>\n\t\t</NavigationButton>\n\t);\n}\n\nfunction ScreenColors( { name } ) {\n\tconst parentMenu = name === undefined ? '' : '/blocks/' + name;\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\tback={ parentMenu ? parentMenu : '/' }\n\t\t\t\ttitle={ __( 'Colors' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Manage palettes and the default color of different global elements on the website.'\n\t\t\t\t) }\n\t\t\t/>\n\n\t\t\t<div className=\"edit-site-global-styles-screen-colors\">\n\t\t\t\t<VStack spacing={ 10 }>\n\t\t\t\t\t<Palette name={ name } />\n\n\t\t\t\t\t<VStack spacing={ 3 }>\n\t\t\t\t\t\t<Subtitle>{ __( 'Elements' ) }</Subtitle>\n\t\t\t\t\t\t<ItemGroup isBordered isSeparated>\n\t\t\t\t\t\t\t<BackgroundColorItem\n\t\t\t\t\t\t\t\tname={ name }\n\t\t\t\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<TextColorItem\n\t\t\t\t\t\t\t\tname={ name }\n\t\t\t\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<LinkColorItem\n\t\t\t\t\t\t\t\tname={ name }\n\t\t\t\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ItemGroup>\n\t\t\t\t\t</VStack>\n\t\t\t\t</VStack>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default ScreenColors;\n"]}
@@ -2,8 +2,6 @@
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
4
 
5
- var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
6
-
7
5
  Object.defineProperty(exports, "__esModule", {
8
6
  value: true
9
7
  });
@@ -19,6 +17,10 @@ var _dimensionsPanel = _interopRequireWildcard(require("./dimensions-panel"));
19
17
 
20
18
  var _header = _interopRequireDefault(require("./header"));
21
19
 
20
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
21
+
22
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
23
+
22
24
  /**
23
25
  * WordPress dependencies
24
26
  */
@@ -26,9 +28,10 @@ var _header = _interopRequireDefault(require("./header"));
26
28
  /**
27
29
  * Internal dependencies
28
30
  */
29
- function ScreenLayout({
30
- name
31
- }) {
31
+ function ScreenLayout(_ref) {
32
+ let {
33
+ name
34
+ } = _ref;
32
35
  const parentMenu = name === undefined ? '' : '/blocks/' + name;
33
36
  const hasBorderPanel = (0, _borderPanel.useHasBorderPanel)(name);
34
37
  const hasDimensionsPanel = (0, _dimensionsPanel.useHasDimensionsPanel)(name);
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/screen-layout.js"],"names":["ScreenLayout","name","parentMenu","undefined","hasBorderPanel","hasDimensionsPanel"],"mappings":";;;;;;;;;;;;;AAGA;;AAKA;;AACA;;AACA;;AAVA;AACA;AACA;;AAGA;AACA;AACA;AAKA,SAASA,YAAT,CAAuB;AAAEC,EAAAA;AAAF,CAAvB,EAAkC;AACjC,QAAMC,UAAU,GAAGD,IAAI,KAAKE,SAAT,GAAqB,EAArB,GAA0B,aAAaF,IAA1D;AACA,QAAMG,cAAc,GAAG,oCAAmBH,IAAnB,CAAvB;AACA,QAAMI,kBAAkB,GAAG,4CAAuBJ,IAAvB,CAA3B;AAEA,SACC,qDACC,4BAAC,eAAD;AACC,IAAA,IAAI,EAAGC,UAAU,GAAGA,UAAH,GAAgB,GADlC;AAEC,IAAA,KAAK,EAAG,cAAI,QAAJ;AAFT,IADD,EAKGG,kBAAkB,IAAI,4BAAC,wBAAD;AAAiB,IAAA,IAAI,EAAGJ;AAAxB,IALzB,EAMGG,cAAc,IAAI,4BAAC,oBAAD;AAAa,IAAA,IAAI,EAAGH;AAApB,IANrB,CADD;AAUA;;eAEcD,Y","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport BorderPanel, { useHasBorderPanel } from './border-panel';\nimport DimensionsPanel, { useHasDimensionsPanel } from './dimensions-panel';\nimport ScreenHeader from './header';\n\nfunction ScreenLayout( { name } ) {\n\tconst parentMenu = name === undefined ? '' : '/blocks/' + name;\n\tconst hasBorderPanel = useHasBorderPanel( name );\n\tconst hasDimensionsPanel = useHasDimensionsPanel( name );\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\tback={ parentMenu ? parentMenu : '/' }\n\t\t\t\ttitle={ __( 'Layout' ) }\n\t\t\t/>\n\t\t\t{ hasDimensionsPanel && <DimensionsPanel name={ name } /> }\n\t\t\t{ hasBorderPanel && <BorderPanel name={ name } /> }\n\t\t</>\n\t);\n}\n\nexport default ScreenLayout;\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/screen-layout.js"],"names":["ScreenLayout","name","parentMenu","undefined","hasBorderPanel","hasDimensionsPanel"],"mappings":";;;;;;;;;;;AAGA;;AAKA;;AACA;;AACA;;;;;;AAVA;AACA;AACA;;AAGA;AACA;AACA;AAKA,SAASA,YAAT,OAAkC;AAAA,MAAX;AAAEC,IAAAA;AAAF,GAAW;AACjC,QAAMC,UAAU,GAAGD,IAAI,KAAKE,SAAT,GAAqB,EAArB,GAA0B,aAAaF,IAA1D;AACA,QAAMG,cAAc,GAAG,oCAAmBH,IAAnB,CAAvB;AACA,QAAMI,kBAAkB,GAAG,4CAAuBJ,IAAvB,CAA3B;AAEA,SACC,qDACC,4BAAC,eAAD;AACC,IAAA,IAAI,EAAGC,UAAU,GAAGA,UAAH,GAAgB,GADlC;AAEC,IAAA,KAAK,EAAG,cAAI,QAAJ;AAFT,IADD,EAKGG,kBAAkB,IAAI,4BAAC,wBAAD;AAAiB,IAAA,IAAI,EAAGJ;AAAxB,IALzB,EAMGG,cAAc,IAAI,4BAAC,oBAAD;AAAa,IAAA,IAAI,EAAGH;AAApB,IANrB,CADD;AAUA;;eAEcD,Y","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport BorderPanel, { useHasBorderPanel } from './border-panel';\nimport DimensionsPanel, { useHasDimensionsPanel } from './dimensions-panel';\nimport ScreenHeader from './header';\n\nfunction ScreenLayout( { name } ) {\n\tconst parentMenu = name === undefined ? '' : '/blocks/' + name;\n\tconst hasBorderPanel = useHasBorderPanel( name );\n\tconst hasDimensionsPanel = useHasDimensionsPanel( name );\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\tback={ parentMenu ? parentMenu : '/' }\n\t\t\t\ttitle={ __( 'Layout' ) }\n\t\t\t/>\n\t\t\t{ hasDimensionsPanel && <DimensionsPanel name={ name } /> }\n\t\t\t{ hasBorderPanel && <BorderPanel name={ name } /> }\n\t\t</>\n\t);\n}\n\nexport default ScreenLayout;\n"]}
@@ -24,9 +24,10 @@ var _hooks = require("./hooks");
24
24
  /**
25
25
  * Internal dependencies
26
26
  */
27
- function ScreenLinkColor({
28
- name
29
- }) {
27
+ function ScreenLinkColor(_ref) {
28
+ let {
29
+ name
30
+ } = _ref;
30
31
  const parentMenu = name === undefined ? '' : '/blocks/' + name;
31
32
  const supports = (0, _hooks.getSupportedGlobalStylesPanels)(name);
32
33
  const [solids] = (0, _hooks.useSetting)('color.palette', name);
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/screen-link-color.js"],"names":["ScreenLinkColor","name","parentMenu","undefined","supports","solids","areCustomSolidsEnabled","colorsPerOrigin","isLinkEnabled","hasLinkColor","includes","length","linkColor","setLinkColor","userLinkColor","settings","colorValue","onColorChange","label","clearable"],"mappings":";;;;;;;;;;;AAGA;;AACA;;AAKA;;AACA;;AAVA;AACA;AACA;;AAIA;AACA;AACA;AASA,SAASA,eAAT,CAA0B;AAAEC,EAAAA;AAAF,CAA1B,EAAqC;AACpC,QAAMC,UAAU,GAAGD,IAAI,KAAKE,SAAT,GAAqB,EAArB,GAA0B,aAAaF,IAA1D;AACA,QAAMG,QAAQ,GAAG,2CAAgCH,IAAhC,CAAjB;AACA,QAAM,CAAEI,MAAF,IAAa,uBAAY,eAAZ,EAA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i18n';\nimport { __experimentalPanelColorGradientSettings as PanelColorGradientSettings } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport ScreenHeader from './header';\nimport {\n\tgetSupportedGlobalStylesPanels,\n\tuseSetting,\n\tuseStyle,\n\tuseColorsPerOrigin,\n} from './hooks';\n\nfunction ScreenLinkColor( { name } ) {\n\tconst parentMenu = name === undefined ? '' : '/blocks/' + name;\n\tconst supports = getSupportedGlobalStylesPanels( name );\n\tconst [ solids ] = useSetting( 'color.palette', name );\n\tconst [ areCustomSolidsEnabled ] = useSetting( 'color.custom', name );\n\n\tconst colorsPerOrigin = useColorsPerOrigin( name );\n\n\tconst [ isLinkEnabled ] = useSetting( 'color.link', name );\n\n\tconst hasLinkColor =\n\t\tsupports.includes( 'linkColor' ) &&\n\t\tisLinkEnabled &&\n\t\t( solids.length > 0 || areCustomSolidsEnabled );\n\n\tconst [ linkColor, setLinkColor ] = useStyle(\n\t\t'elements.link.color.text',\n\t\tname\n\t);\n\tconst [ userLinkColor ] = useStyle(\n\t\t'elements.link.color.text',\n\t\tname,\n\t\t'user'\n\t);\n\n\tif ( ! hasLinkColor ) {\n\t\treturn null;\n\t}\n\n\tconst settings = [\n\t\t{\n\t\t\tcolorValue: linkColor,\n\t\t\tonColorChange: setLinkColor,\n\t\t\tlabel: __( 'Link color' ),\n\t\t\tclearable: linkColor === userLinkColor,\n\t\t},\n\t];\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\tback={ parentMenu + '/colors' }\n\t\t\t\ttitle={ __( 'Links' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Set the default color used for links across the site.'\n\t\t\t\t) }\n\t\t\t/>\n\n\t\t\t<PanelColorGradientSettings\n\t\t\t\ttitle={ __( 'Color' ) }\n\t\t\t\tsettings={ settings }\n\t\t\t\tcolors={ colorsPerOrigin }\n\t\t\t\tdisableCustomColors={ ! areCustomSolidsEnabled }\n\t\t\t\t__experimentalHasMultipleOrigins\n\t\t\t\tshowTitle={ false }\n\t\t\t/>\n\t\t</>\n\t);\n}\n\nexport default ScreenLinkColor;\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/screen-link-color.js"],"names":["ScreenLinkColor","name","parentMenu","undefined","supports","solids","areCustomSolidsEnabled","colorsPerOrigin","isLinkEnabled","hasLinkColor","includes","length","linkColor","setLinkColor","userLinkColor","settings","colorValue","onColorChange","label","clearable"],"mappings":";;;;;;;;;;;AAGA;;AACA;;AAKA;;AACA;;AAVA;AACA;AACA;;AAIA;AACA;AACA;AASA,SAASA,eAAT,OAAqC;AAAA,MAAX;AAAEC,IAAAA;AAAF,GAAW;AACpC,QAAMC,UAAU,GAAGD,IAAI,KAAKE,SAAT,GAAqB,EAArB,GAA0B,aAAaF,IAA1D;AACA,QAAMG,QAAQ,GAAG,2CAAgCH,IAAhC,CAAjB;AACA,QAAM,CAAEI,MAAF,IAAa,uBAAY,eAAZ,EAA6BJ,IAA7B,CAAnB;AACA,QAAM,CAAEK,sBAAF,IAA6B,uBAAY,cAAZ,EAA4BL,IAA5B,CAAnC;AAEA,QAAMM,eAAe,GAAG,+BAAoBN,IAApB,CAAxB;AAEA,QAAM,CAAEO,aAAF,IAAoB,uBAAY,YAAZ,EAA0BP,IAA1B,CAA1B;AAEA,QAAMQ,YAAY,GACjBL,QAAQ,CAACM,QAAT,CAAmB,WAAnB,KACAF,aADA,KAEEH,MAAM,CAACM,MAAP,GAAgB,CAAhB,IAAqBL,sBAFvB,CADD;AAKA,QAAM,CAAEM,SAAF,EAAaC,YAAb,IAA8B,qBACnC,0BADmC,EAEnCZ,IAFmC,CAApC;AAIA,QAAM,CAAEa,aAAF,IAAoB,qBACzB,0BADyB,EAEzBb,IAFyB,EAGzB,MAHyB,CAA1B;;AAMA,MAAK,CAAEQ,YAAP,EAAsB;AACrB,WAAO,IAAP;AACA;;AAED,QAAMM,QAAQ,GAAG,CAChB;AACCC,IAAAA,UAAU,EAAEJ,SADb;AAECK,IAAAA,aAAa,EAAEJ,YAFhB;AAGCK,IAAAA,KAAK,EAAE,cAAI,YAAJ,CAHR;AAICC,IAAAA,SAAS,EAAEP,SAAS,KAAKE;AAJ1B,GADgB,CAAjB;AASA,SACC,qDACC,4BAAC,eAAD;AACC,IAAA,IAAI,EAAGZ,UAAU,GAAG,SADrB;AAEC,IAAA,KAAK,EAAG,cAAI,OAAJ,CAFT;AAGC,IAAA,WAAW,EAAG,cACb,uDADa;AAHf,IADD,EASC,4BAAC,qDAAD;AACC,IAAA,KAAK,EAAG,cAAI,OAAJ,CADT;AAEC,IAAA,QAAQ,EAAGa,QAFZ;AAGC,IAAA,MAAM,EAAGR,eAHV;AAIC,IAAA,mBAAmB,EAAG,CAAED,sBAJzB;AAKC,IAAA,gCAAgC,MALjC;AAMC,IAAA,SAAS,EAAG;AANb,IATD,CADD;AAoBA;;eAEcN,e","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { __experimentalPanelColorGradientSettings as PanelColorGradientSettings } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport ScreenHeader from './header';\nimport {\n\tgetSupportedGlobalStylesPanels,\n\tuseSetting,\n\tuseStyle,\n\tuseColorsPerOrigin,\n} from './hooks';\n\nfunction ScreenLinkColor( { name } ) {\n\tconst parentMenu = name === undefined ? '' : '/blocks/' + name;\n\tconst supports = getSupportedGlobalStylesPanels( name );\n\tconst [ solids ] = useSetting( 'color.palette', name );\n\tconst [ areCustomSolidsEnabled ] = useSetting( 'color.custom', name );\n\n\tconst colorsPerOrigin = useColorsPerOrigin( name );\n\n\tconst [ isLinkEnabled ] = useSetting( 'color.link', name );\n\n\tconst hasLinkColor =\n\t\tsupports.includes( 'linkColor' ) &&\n\t\tisLinkEnabled &&\n\t\t( solids.length > 0 || areCustomSolidsEnabled );\n\n\tconst [ linkColor, setLinkColor ] = useStyle(\n\t\t'elements.link.color.text',\n\t\tname\n\t);\n\tconst [ userLinkColor ] = useStyle(\n\t\t'elements.link.color.text',\n\t\tname,\n\t\t'user'\n\t);\n\n\tif ( ! hasLinkColor ) {\n\t\treturn null;\n\t}\n\n\tconst settings = [\n\t\t{\n\t\t\tcolorValue: linkColor,\n\t\t\tonColorChange: setLinkColor,\n\t\t\tlabel: __( 'Link color' ),\n\t\t\tclearable: linkColor === userLinkColor,\n\t\t},\n\t];\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\tback={ parentMenu + '/colors' }\n\t\t\t\ttitle={ __( 'Links' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Set the default color used for links across the site.'\n\t\t\t\t) }\n\t\t\t/>\n\n\t\t\t<PanelColorGradientSettings\n\t\t\t\ttitle={ __( 'Color' ) }\n\t\t\t\tsettings={ settings }\n\t\t\t\tcolors={ colorsPerOrigin }\n\t\t\t\tdisableCustomColors={ ! areCustomSolidsEnabled }\n\t\t\t\t__experimentalHasMultipleOrigins\n\t\t\t\tshowTitle={ false }\n\t\t\t/>\n\t\t</>\n\t);\n}\n\nexport default ScreenLinkColor;\n"]}
@@ -24,9 +24,10 @@ var _hooks = require("./hooks");
24
24
  /**
25
25
  * Internal dependencies
26
26
  */
27
- function ScreenTextColor({
28
- name
29
- }) {
27
+ function ScreenTextColor(_ref) {
28
+ let {
29
+ name
30
+ } = _ref;
30
31
  const parentMenu = name === undefined ? '' : '/blocks/' + name;
31
32
  const supports = (0, _hooks.getSupportedGlobalStylesPanels)(name);
32
33
  const [solids] = (0, _hooks.useSetting)('color.palette', name);
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/screen-text-color.js"],"names":["ScreenTextColor","name","parentMenu","undefined","supports","solids","areCustomSolidsEnabled","isTextEnabled","colorsPerOrigin","hasTextColor","includes","length","color","setColor","userColor","settings","colorValue","onColorChange","label","clearable"],"mappings":";;;;;;;;;;;AAGA;;AACA;;AAKA;;AACA;;AAVA;AACA;AACA;;AAIA;AACA;AACA;AASA,SAASA,eA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EAAGa,QAFZ;AAGC,IAAA,MAAM,EAAGP,eAHV;AAIC,IAAA,mBAAmB,EAAG,CAAEF,sBAJzB;AAKC,IAAA,gCAAgC,MALjC;AAMC,IAAA,SAAS,EAAG;AANb,IATD,CADD;AAoBA;;eAEcN,e","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { __experimentalPanelColorGradientSettings as PanelColorGradientSettings } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport ScreenHeader from './header';\nimport {\n\tgetSupportedGlobalStylesPanels,\n\tuseSetting,\n\tuseStyle,\n\tuseColorsPerOrigin,\n} from './hooks';\n\nfunction ScreenTextColor( { name } ) {\n\tconst parentMenu = name === undefined ? '' : '/blocks/' + name;\n\tconst supports = getSupportedGlobalStylesPanels( name );\n\tconst [ solids ] = useSetting( 'color.palette', name );\n\tconst [ areCustomSolidsEnabled ] = useSetting( 'color.custom', name );\n\tconst [ isTextEnabled ] = useSetting( 'color.text', name );\n\n\tconst colorsPerOrigin = useColorsPerOrigin( name );\n\n\tconst hasTextColor =\n\t\tsupports.includes( 'color' ) &&\n\t\tisTextEnabled &&\n\t\t( solids.length > 0 || areCustomSolidsEnabled );\n\n\tconst [ color, setColor ] = useStyle( 'color.text', name );\n\tconst [ userColor ] = useStyle( 'color.text', name, 'user' );\n\n\tif ( ! hasTextColor ) {\n\t\treturn null;\n\t}\n\n\tconst settings = [\n\t\t{\n\t\t\tcolorValue: color,\n\t\t\tonColorChange: setColor,\n\t\t\tlabel: __( 'Text color' ),\n\t\t\tclearable: color === userColor,\n\t\t},\n\t];\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\tback={ parentMenu + '/colors' }\n\t\t\t\ttitle={ __( 'Text' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Set the default color used for text across the site.'\n\t\t\t\t) }\n\t\t\t/>\n\n\t\t\t<PanelColorGradientSettings\n\t\t\t\ttitle={ __( 'Color' ) }\n\t\t\t\tsettings={ settings }\n\t\t\t\tcolors={ colorsPerOrigin }\n\t\t\t\tdisableCustomColors={ ! areCustomSolidsEnabled }\n\t\t\t\t__experimentalHasMultipleOrigins\n\t\t\t\tshowTitle={ false }\n\t\t\t/>\n\t\t</>\n\t);\n}\n\nexport default ScreenTextColor;\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/screen-text-color.js"],"names":["ScreenTextColor","name","parentMenu","undefined","supports","solids","areCustomSolidsEnabled","isTextEnabled","colorsPerOrigin","hasTextColor","includes","length","color","setColor","userColor","settings","colorValue","onColorChange","label","clearable"],"mappings":";;;;;;;;;;;AAGA;;AACA;;AAKA;;AACA;;AAVA;AACA;AACA;;AAIA;AACA;AACA;AASA,SAASA,eAAT,OAAqC;AAAA,MAAX;AAAEC,IAAAA;AAAF,GAAW;AACpC,QAAMC,UAAU,GAAGD,IAAI,KAAKE,SAAT,GAAqB,EAArB,GAA0B,aAAaF,IAA1D;AACA,QAAMG,QAAQ,GAAG,2CAAgCH,IAAhC,CAAjB;AACA,QAAM,CAAEI,MAAF,IAAa,uBAAY,eAAZ,EAA6BJ,IAA7B,CAAnB;AACA,QAAM,CAAEK,sBAAF,IAA6B,uBAAY,cAAZ,EAA4BL,IAA5B,CAAnC;AACA,QAAM,CAAEM,aAAF,IAAoB,uBAAY,YAAZ,EAA0BN,IAA1B,CAA1B;AAEA,QAAMO,eAAe,GAAG,+BAAoBP,IAApB,CAAxB;AAEA,QAAMQ,YAAY,GACjBL,QAAQ,CAACM,QAAT,CAAmB,OAAnB,KACAH,aADA,KAEEF,MAAM,CAACM,MAAP,GAAgB,CAAhB,IAAqBL,sBAFvB,CADD;AAKA,QAAM,CAAEM,KAAF,EAASC,QAAT,IAAsB,qBAAU,YAAV,EAAwBZ,IAAxB,CAA5B;AACA,QAAM,CAAEa,SAAF,IAAgB,qBAAU,YAAV,EAAwBb,IAAxB,EAA8B,MAA9B,CAAtB;;AAEA,MAAK,CAAEQ,YAAP,EAAsB;AACrB,WAAO,IAAP;AACA;;AAED,QAAMM,QAAQ,GAAG,CAChB;AACCC,IAAAA,UAAU,EAAEJ,KADb;AAECK,IAAAA,aAAa,EAAEJ,QAFhB;AAGCK,IAAAA,KAAK,EAAE,cAAI,YAAJ,CAHR;AAICC,IAAAA,SAAS,EAAEP,KAAK,KAAKE;AAJtB,GADgB,CAAjB;AASA,SACC,qDACC,4BAAC,eAAD;AACC,IAAA,IAAI,EAAGZ,UAAU,GAAG,SADrB;AAEC,IAAA,KAAK,EAAG,cAAI,MAAJ,CAFT;AAGC,IAAA,WAAW,EAAG,cACb,sDADa;AAHf,IADD,EASC,4BAAC,qDAAD;AACC,IAAA,KAAK,EAAG,cAAI,OAAJ,CADT;AAEC,IAAA,QAAQ,EAAGa,QAFZ;AAGC,IAAA,MAAM,EAAGP,eAHV;AAIC,IAAA,mBAAmB,EAAG,CAAEF,sBAJzB;AAKC,IAAA,gCAAgC,MALjC;AAMC,IAAA,SAAS,EAAG;AANb,IATD,CADD;AAoBA;;eAEcN,e","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { __experimentalPanelColorGradientSettings as PanelColorGradientSettings } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport ScreenHeader from './header';\nimport {\n\tgetSupportedGlobalStylesPanels,\n\tuseSetting,\n\tuseStyle,\n\tuseColorsPerOrigin,\n} from './hooks';\n\nfunction ScreenTextColor( { name } ) {\n\tconst parentMenu = name === undefined ? '' : '/blocks/' + name;\n\tconst supports = getSupportedGlobalStylesPanels( name );\n\tconst [ solids ] = useSetting( 'color.palette', name );\n\tconst [ areCustomSolidsEnabled ] = useSetting( 'color.custom', name );\n\tconst [ isTextEnabled ] = useSetting( 'color.text', name );\n\n\tconst colorsPerOrigin = useColorsPerOrigin( name );\n\n\tconst hasTextColor =\n\t\tsupports.includes( 'color' ) &&\n\t\tisTextEnabled &&\n\t\t( solids.length > 0 || areCustomSolidsEnabled );\n\n\tconst [ color, setColor ] = useStyle( 'color.text', name );\n\tconst [ userColor ] = useStyle( 'color.text', name, 'user' );\n\n\tif ( ! hasTextColor ) {\n\t\treturn null;\n\t}\n\n\tconst settings = [\n\t\t{\n\t\t\tcolorValue: color,\n\t\t\tonColorChange: setColor,\n\t\t\tlabel: __( 'Text color' ),\n\t\t\tclearable: color === userColor,\n\t\t},\n\t];\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\tback={ parentMenu + '/colors' }\n\t\t\t\ttitle={ __( 'Text' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Set the default color used for text across the site.'\n\t\t\t\t) }\n\t\t\t/>\n\n\t\t\t<PanelColorGradientSettings\n\t\t\t\ttitle={ __( 'Color' ) }\n\t\t\t\tsettings={ settings }\n\t\t\t\tcolors={ colorsPerOrigin }\n\t\t\t\tdisableCustomColors={ ! areCustomSolidsEnabled }\n\t\t\t\t__experimentalHasMultipleOrigins\n\t\t\t\tshowTitle={ false }\n\t\t\t/>\n\t\t</>\n\t);\n}\n\nexport default ScreenTextColor;\n"]}
@@ -22,9 +22,10 @@ var _header = _interopRequireDefault(require("./header"));
22
22
  /**
23
23
  * Internal dependencies
24
24
  */
25
- function ScreenTypography({
26
- name
27
- }) {
25
+ function ScreenTypography(_ref) {
26
+ let {
27
+ name
28
+ } = _ref;
28
29
  const parentMenu = name === undefined ? '' : '/blocks/' + name;
29
30
  return (0, _element.createElement)(_element.Fragment, null, (0, _element.createElement)(_header.default, {
30
31
  back: parentMenu ? parentMenu : '/',
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/screen-typography.js"],"names":["ScreenTypography","name","parentMenu","undefined"],"mappings":";;;;;;;;;;;AAGA;;AAKA;;AACA;;AATA;AACA;AACA;;AAGA;AACA;AACA;AAIA,SAASA,gBAAT,CAA2B;AAAEC,EAAAA;AAAF,CAA3B,EAAsC;AACrC,QAAMC,UAAU,GAAGD,IAAI,KAAKE,SAAT,GAAqB,EAArB,GAA0B,aAAaF,IAA1D;AAEA,SACC,qDACC,4BAAC,eAAD;AACC,IAAA,IAAI,EAAGC,UAAU,GAAGA,UAAH,GAAgB,GADlC;AAEC,IAAA,KAAK,EAAG,cAAI,YAAJ,CAFT;AAGC,IAAA,WAAW,EAAG,cACb,2FADa;AAHf,IADD,EAQC,4BAAC,wBAAD;AAAiB,IAAA,IAAI,EAAGD;AAAxB,IARD,CADD;AAYA;;eAEcD,gB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport TypographyPanel from './typography-panel';\nimport ScreenHeader from './header';\n\nfunction ScreenTypography( { name } ) {\n\tconst parentMenu = name === undefined ? '' : '/blocks/' + name;\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\tback={ parentMenu ? parentMenu : '/' }\n\t\t\t\ttitle={ __( 'Typography' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Manage the fonts used on the website and the default aspect of different global elements.'\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t<TypographyPanel name={ name } />\n\t\t</>\n\t);\n}\n\nexport default ScreenTypography;\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/screen-typography.js"],"names":["ScreenTypography","name","parentMenu","undefined"],"mappings":";;;;;;;;;;;AAGA;;AAKA;;AACA;;AATA;AACA;AACA;;AAGA;AACA;AACA;AAIA,SAASA,gBAAT,OAAsC;AAAA,MAAX;AAAEC,IAAAA;AAAF,GAAW;AACrC,QAAMC,UAAU,GAAGD,IAAI,KAAKE,SAAT,GAAqB,EAArB,GAA0B,aAAaF,IAA1D;AAEA,SACC,qDACC,4BAAC,eAAD;AACC,IAAA,IAAI,EAAGC,UAAU,GAAGA,UAAH,GAAgB,GADlC;AAEC,IAAA,KAAK,EAAG,cAAI,YAAJ,CAFT;AAGC,IAAA,WAAW,EAAG,cACb,2FADa;AAHf,IADD,EAQC,4BAAC,wBAAD;AAAiB,IAAA,IAAI,EAAGD;AAAxB,IARD,CADD;AAYA;;eAEcD,gB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport TypographyPanel from './typography-panel';\nimport ScreenHeader from './header';\n\nfunction ScreenTypography( { name } ) {\n\tconst parentMenu = name === undefined ? '' : '/blocks/' + name;\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\tback={ parentMenu ? parentMenu : '/' }\n\t\t\t\ttitle={ __( 'Typography' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Manage the fonts used on the website and the default aspect of different global elements.'\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t<TypographyPanel name={ name } />\n\t\t</>\n\t);\n}\n\nexport default ScreenTypography;\n"]}
@@ -12,9 +12,10 @@ var _components = require("@wordpress/components");
12
12
  /**
13
13
  * WordPress dependencies
14
14
  */
15
- function Subtitle({
16
- children
17
- }) {
15
+ function Subtitle(_ref) {
16
+ let {
17
+ children
18
+ } = _ref;
18
19
  return (0, _element.createElement)(_components.__experimentalHeading, {
19
20
  className: "edit-site-global-styles-subtitle",
20
21
  level: 2
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/subtitle.js"],"names":["Subtitle","children"],"mappings":";;;;;;;;;AAGA;;AAHA;AACA;AACA;AAGA,SAASA,QAAT,CAAmB;AAAEC,EAAAA;AAAF,CAAnB,EAAkC;AACjC,SACC,4BAAC,iCAAD;AAAS,IAAA,SAAS,EAAC,kCAAnB;AAAsD,IAAA,KAAK,EAAG;AAA9D,KACGA,QADH,CADD;AAKA;;eAEcD,Q","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __experimentalHeading as Heading } from '@wordpress/components';\n\nfunction Subtitle( { children } ) {\n\treturn (\n\t\t<Heading className=\"edit-site-global-styles-subtitle\" level={ 2 }>\n\t\t\t{ children }\n\t\t</Heading>\n\t);\n}\n\nexport default Subtitle;\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/subtitle.js"],"names":["Subtitle","children"],"mappings":";;;;;;;;;AAGA;;AAHA;AACA;AACA;AAGA,SAASA,QAAT,OAAkC;AAAA,MAAf;AAAEC,IAAAA;AAAF,GAAe;AACjC,SACC,4BAAC,iCAAD;AAAS,IAAA,SAAS,EAAC,kCAAnB;AAAsD,IAAA,KAAK,EAAG;AAA9D,KACGA,QADH,CADD;AAKA;;eAEcD,Q","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __experimentalHeading as Heading } from '@wordpress/components';\n\nfunction Subtitle( { children } ) {\n\treturn (\n\t\t<Heading className=\"edit-site-global-styles-subtitle\" level={ 2 }>\n\t\t\t{ children }\n\t\t</Heading>\n\t);\n}\n\nexport default Subtitle;\n"]}
@@ -3,8 +3,8 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.useHasTypographyPanel = useHasTypographyPanel;
7
6
  exports.default = TypographyPanel;
7
+ exports.useHasTypographyPanel = useHasTypographyPanel;
8
8
 
9
9
  var _element = require("@wordpress/element");
10
10
 
@@ -46,9 +46,10 @@ function useHasLetterSpacingControl(name) {
46
46
  return (0, _hooks.useSetting)('typography.letterSpacing', name)[0] && supports.includes('letterSpacing');
47
47
  }
48
48
 
49
- function TypographyPanel({
50
- name
51
- }) {
49
+ function TypographyPanel(_ref) {
50
+ let {
51
+ name
52
+ } = _ref;
52
53
  const supports = (0, _hooks.getSupportedGlobalStylesPanels)(name);
53
54
  const [fontSizes] = (0, _hooks.useSetting)('typography.fontSizes', name);
54
55
  const disableCustomFontSizes = !(0, _hooks.useSetting)('typography.customFontSize', name)[0];
@@ -84,10 +85,11 @@ function TypographyPanel({
84
85
  fontStyle,
85
86
  fontWeight
86
87
  },
87
- onChange: ({
88
- fontStyle: newFontStyle,
89
- fontWeight: newFontWeight
90
- }) => {
88
+ onChange: _ref2 => {
89
+ let {
90
+ fontStyle: newFontStyle,
91
+ fontWeight: newFontWeight
92
+ } = _ref2;
91
93
  setFontStyle(newFontStyle);
92
94
  setFontWeight(newFontWeight);
93
95
  },
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/typography-panel.js"],"names":["useHasTypographyPanel","name","hasLineHeight","useHasLineHeightControl","hasFontAppearance","useHasAppearanceControl","hasLetterSpacing","useHasLetterSpacingControl","supports","includes","hasFontStyles","hasFontWeights","TypographyPanel","fontSizes","disableCustomFontSizes","fontFamilies","hasLineHeightEnabled","hasAppearanceControl","hasLetterSpacingControl","fontFamily","setFontFamily","fontSize","setFontSize","fontStyle","setFontStyle","fontWeight","setFontWeight","lineHeight","setLineHeight","letterSpacing","setLetterSpacing","newFontStyle","newFontWeight"],"mappings":";;;;;;;;;;AAGA;;AAMA;;AAKA;;AAdA;AACA;AACA;;AASA;AACA;AACA;AAGO,SAASA,qBAAT,CAAgCC,IAAhC,EAAuC;AAC7C,QAAMC,aAAa,GAAGC,uBAAuB,CAAEF,IAAF,CAA7C;AACA,QAAMG,iBAAiB,GAAGC,uBAAuB,CAAEJ,IAAF,CAAjD;AACA,QAAMK,gBAAgB,GAAGC,0BAA0B,CAAEN,IAAF,CAAnD;AACA,QAAMO,QAAQ,GAAG,2CAAgCP,IAAhC,CAAjB;AACA,SACCC,aAAa,IACbE,iBADA,IAEAE,gBAFA,IAGAE,QAAQ,CAACC,QAAT,CAAmB,UAAnB,CAJD;AAMA;;AAED,SAASN,uBAAT,CAAkCF,IAAlC,EAAyC;AACxC,QAAMO,QAAQ,GAAG,2CAAgCP,IAAhC,CAAjB;AACA,SACC,uBAAY,uBAAZ,EAAqCA,IAArC,EAA6C,CAA7C,KACAO,QAAQ,CAACC,QAAT,CAAmB,YAAnB,CAFD;AAIA;;AAED,SAASJ,uBAAT,CAAkCJ,IAAlC,EAAyC;AACxC,QAAMO,QAAQ,GAAG,2CAAgCP,IAAhC,CAAjB;AACA,QAAMS,aAAa,GACl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;AACNR,MAAAA,YAAY,CAAEO,YAAF,CAAZ;AACAL,MAAAA,aAAa,CAAEM,aAAF,CAAb;AACA,KAXF;AAYC,IAAA,aAAa,EAAGtB,aAZjB;AAaC,IAAA,cAAc,EAAGC;AAblB,IAvBF,EAuCGO,uBAAuB,IACxB,4BAAC,+CAAD;AACC,IAAA,KAAK,EAAGW,aADT;AAEC,IAAA,QAAQ,EAAGC;AAFZ,IAxCF,CADD;AAgDA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tLineHeightControl,\n\t__experimentalFontFamilyControl as FontFamilyControl,\n\t__experimentalFontAppearanceControl as FontAppearanceControl,\n\t__experimentalLetterSpacingControl as LetterSpacingControl,\n} from '@wordpress/block-editor';\nimport { PanelBody, FontSizePicker } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { getSupportedGlobalStylesPanels, useSetting, useStyle } from './hooks';\n\nexport function useHasTypographyPanel( name ) {\n\tconst hasLineHeight = useHasLineHeightControl( name );\n\tconst hasFontAppearance = useHasAppearanceControl( name );\n\tconst hasLetterSpacing = useHasLetterSpacingControl( name );\n\tconst supports = getSupportedGlobalStylesPanels( name );\n\treturn (\n\t\thasLineHeight ||\n\t\thasFontAppearance ||\n\t\thasLetterSpacing ||\n\t\tsupports.includes( 'fontSize' )\n\t);\n}\n\nfunction useHasLineHeightControl( name ) {\n\tconst supports = getSupportedGlobalStylesPanels( name );\n\treturn (\n\t\tuseSetting( 'typography.lineHeight', name )[ 0 ] &&\n\t\tsupports.includes( 'lineHeight' )\n\t);\n}\n\nfunction useHasAppearanceControl( name ) {\n\tconst supports = getSupportedGlobalStylesPanels( name );\n\tconst hasFontStyles =\n\t\tuseSetting( 'typography.fontStyle', name )[ 0 ] &&\n\t\tsupports.includes( 'fontStyle' );\n\tconst hasFontWeights =\n\t\tuseSetting( 'typography.fontWeight', name )[ 0 ] &&\n\t\tsupports.includes( 'fontWeight' );\n\treturn hasFontStyles || hasFontWeights;\n}\n\nfunction useHasLetterSpacingControl( name ) {\n\tconst supports = getSupportedGlobalStylesPanels( name );\n\treturn (\n\t\tuseSetting( 'typography.letterSpacing', name )[ 0 ] &&\n\t\tsupports.includes( 'letterSpacing' )\n\t);\n}\n\nexport default function TypographyPanel( { name } ) {\n\tconst supports = getSupportedGlobalStylesPanels( name );\n\tconst [ fontSizes ] = useSetting( 'typography.fontSizes', name );\n\tconst disableCustomFontSizes = ! useSetting(\n\t\t'typography.customFontSize',\n\t\tname\n\t)[ 0 ];\n\tconst [ fontFamilies ] = useSetting( 'typography.fontFamilies', name );\n\tconst hasFontStyles =\n\t\tuseSetting( 'typography.fontStyle', name )[ 0 ] &&\n\t\tsupports.includes( 'fontStyle' );\n\tconst hasFontWeights =\n\t\tuseSetting( 'typography.fontWeight', name )[ 0 ] &&\n\t\tsupports.includes( 'fontWeight' );\n\tconst hasLineHeightEnabled = useHasLineHeightControl( name );\n\tconst hasAppearanceControl = useHasAppearanceControl( name );\n\tconst hasLetterSpacingControl = useHasLetterSpacingControl( name );\n\n\tconst [ fontFamily, setFontFamily ] = useStyle(\n\t\t'typography.fontFamily',\n\t\tname\n\t);\n\tconst [ fontSize, setFontSize ] = useStyle( 'typography.fontSize', name );\n\n\tconst [ fontStyle, setFontStyle ] = useStyle(\n\t\t'typography.fontStyle',\n\t\tname\n\t);\n\tconst [ fontWeight, setFontWeight ] = useStyle(\n\t\t'typography.fontWeight',\n\t\tname\n\t);\n\tconst [ lineHeight, setLineHeight ] = useStyle(\n\t\t'typography.lineHeight',\n\t\tname\n\t);\n\tconst [ letterSpacing, setLetterSpacing ] = useStyle(\n\t\t'typography.letterSpacing',\n\t\tname\n\t);\n\n\treturn (\n\t\t<PanelBody className=\"edit-site-typography-panel\" initialOpen={ true }>\n\t\t\t{ supports.includes( 'fontFamily' ) && (\n\t\t\t\t<FontFamilyControl\n\t\t\t\t\tfontFamilies={ fontFamilies }\n\t\t\t\t\tvalue={ fontFamily }\n\t\t\t\t\tonChange={ setFontFamily }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ supports.includes( 'fontSize' ) && (\n\t\t\t\t<FontSizePicker\n\t\t\t\t\tvalue={ fontSize }\n\t\t\t\t\tonChange={ setFontSize }\n\t\t\t\t\tfontSizes={ fontSizes }\n\t\t\t\t\tdisableCustomFontSizes={ disableCustomFontSizes }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasLineHeightEnabled && (\n\t\t\t\t<LineHeightControl\n\t\t\t\t\tvalue={ lineHeight }\n\t\t\t\t\tonChange={ setLineHeight }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasAppearanceControl && (\n\t\t\t\t<FontAppearanceControl\n\t\t\t\t\tvalue={ {\n\t\t\t\t\t\tfontStyle,\n\t\t\t\t\t\tfontWeight,\n\t\t\t\t\t} }\n\t\t\t\t\tonChange={ ( {\n\t\t\t\t\t\tfontStyle: newFontStyle,\n\t\t\t\t\t\tfontWeight: newFontWeight,\n\t\t\t\t\t} ) => {\n\t\t\t\t\t\tsetFontStyle( newFontStyle );\n\t\t\t\t\t\tsetFontWeight( newFontWeight );\n\t\t\t\t\t} }\n\t\t\t\t\thasFontStyles={ hasFontStyles }\n\t\t\t\t\thasFontWeights={ hasFontWeights }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasLetterSpacingControl && (\n\t\t\t\t<LetterSpacingControl\n\t\t\t\t\tvalue={ letterSpacing }\n\t\t\t\t\tonChange={ setLetterSpacing }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</PanelBody>\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/typography-panel.js"],"names":["useHasTypographyPanel","name","hasLineHeight","useHasLineHeightControl","hasFontAppearance","useHasAppearanceControl","hasLetterSpacing","useHasLetterSpacingControl","supports","includes","hasFontStyles","hasFontWeights","TypographyPanel","fontSizes","disableCustomFontSizes","fontFamilies","hasLineHeightEnabled","hasAppearanceControl","hasLetterSpacingControl","fontFamily","setFontFamily","fontSize","setFontSize","fontStyle","setFontStyle","fontWeight","setFontWeight","lineHeight","setLineHeight","letterSpacing","setLetterSpacing","newFontStyle","newFontWeight"],"mappings":";;;;;;;;;;AAGA;;AAMA;;AAKA;;AAdA;AACA;AACA;;AASA;AACA;AACA;AAGO,SAASA,qBAAT,CAAgCC,IAAhC,EAAuC;AAC7C,QAAMC,aAAa,GAAGC,uBAAuB,CAAEF,IAAF,CAA7C;AACA,QAAMG,iBAAiB,GAAGC,uBAAuB,CAAEJ,IAAF,CAAjD;AACA,QAAMK,gBAAgB,GAAGC,0BAA0B,CAAEN,IAAF,CAAnD;AACA,QAAMO,QAAQ,GAAG,2CAAgCP,IAAhC,CAAjB;AACA,SACCC,aAAa,IACbE,iBADA,IAEAE,gBAFA,IAGAE,QAAQ,CAACC,QAAT,CAAmB,UAAnB,CAJD;AAMA;;AAED,SAASN,uBAAT,CAAkCF,IAAlC,EAAyC;AACxC,QAAMO,QAAQ,GAAG,2CAAgCP,IAAhC,CAAjB;AACA,SACC,uBAAY,uBAAZ,EAAqCA,IAArC,EAA6C,CAA7C,KACAO,QAAQ,CAACC,QAAT,CAAmB,YAAnB,CAFD;AAIA;;AAED,SAASJ,uBAAT,CAAkCJ,IAAlC,EAAyC;AACxC,QAAMO,QAAQ,GAAG,2CAAgCP,IAAhC,CAAjB;AACA,QAAMS,aAAa,GAClB,uBAAY,sBAAZ,EAAoCT,IAApC,EAA4C,CAA5C,KACAO,QAAQ,CAACC,QAAT,CAAmB,WAAnB,CAFD;AAGA,QAAME,cAAc,GACnB,uBAAY,uBAAZ,EAAqCV,IAArC,EAA6C,CAA7C,KACAO,QAAQ,CAACC,QAAT,CAAmB,YAAnB,CAFD;AAGA,SAAOC,aAAa,IAAIC,cAAxB;AACA;;AAED,SAASJ,0BAAT,CAAqCN,IAArC,EAA4C;AAC3C,QAAMO,QAAQ,GAAG,2CAAgCP,IAAhC,CAAjB;AACA,SACC,uBAAY,0BAAZ,EAAwCA,IAAxC,EAAgD,CAAhD,KAC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4B,aAAF,EAAiBC,gBAAjB,IAAsC,qBAC3C,0BAD2C,EAE3C7B,IAF2C,CAA5C;AAKA,SACC,4BAAC,qBAAD;AAAW,IAAA,SAAS,EAAC,4BAArB;AAAkD,IAAA,WAAW,EAAG;AAAhE,KACGO,QAAQ,CAACC,QAAT,CAAmB,YAAnB,KACD,4BAAC,4CAAD;AACC,IAAA,YAAY,EAAGM,YADhB;AAEC,IAAA,KAAK,EAAGI,UAFT;AAGC,IAAA,QAAQ,EAAGC;AAHZ,IAFF,EAQGZ,QAAQ,CAACC,QAAT,CAAmB,UAAnB,KACD,4BAAC,0BAAD;AACC,IAAA,KAAK,EAAGY,QADT;AAEC,IAAA,QAAQ,EAAGC,WAFZ;AAGC,IAAA,SAAS,EAAGT,SAHb;AAIC,IAAA,sBAAsB,EAAGC;AAJ1B,IATF,EAgBGE,oBAAoB,IACrB,4BAAC,8BAAD;AACC,IAAA,KAAK,EAAGW,UADT;AAEC,IAAA,QAAQ,EAAGC;AAFZ,IAjBF,EAsBGX,oBAAoB,IACrB,4BAAC,gDAAD;AACC,IAAA,KAAK,EAAG;AACPM,MAAAA,SADO;AAEPE,MAAAA;AAFO,KADT;AAKC,IAAA,QAAQ,EAAG,SAGJ;AAAA,UAHM;AACZF,QAAAA,SAAS,EAAEQ,YADC;AAEZN,QAAAA,UAAU,EAAEO;AAFA,OAGN;AACNR,MAAAA,YAAY,CAAEO,YAAF,CAAZ;AACAL,MAAAA,aAAa,CAAEM,aAAF,CAAb;AACA,KAXF;AAYC,IAAA,aAAa,EAAGtB,aAZjB;AAaC,IAAA,cAAc,EAAGC;AAblB,IAvBF,EAuCGO,uBAAuB,IACxB,4BAAC,+CAAD;AACC,IAAA,KAAK,EAAGW,aADT;AAEC,IAAA,QAAQ,EAAGC;AAFZ,IAxCF,CADD;AAgDA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tLineHeightControl,\n\t__experimentalFontFamilyControl as FontFamilyControl,\n\t__experimentalFontAppearanceControl as FontAppearanceControl,\n\t__experimentalLetterSpacingControl as LetterSpacingControl,\n} from '@wordpress/block-editor';\nimport { PanelBody, FontSizePicker } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { getSupportedGlobalStylesPanels, useSetting, useStyle } from './hooks';\n\nexport function useHasTypographyPanel( name ) {\n\tconst hasLineHeight = useHasLineHeightControl( name );\n\tconst hasFontAppearance = useHasAppearanceControl( name );\n\tconst hasLetterSpacing = useHasLetterSpacingControl( name );\n\tconst supports = getSupportedGlobalStylesPanels( name );\n\treturn (\n\t\thasLineHeight ||\n\t\thasFontAppearance ||\n\t\thasLetterSpacing ||\n\t\tsupports.includes( 'fontSize' )\n\t);\n}\n\nfunction useHasLineHeightControl( name ) {\n\tconst supports = getSupportedGlobalStylesPanels( name );\n\treturn (\n\t\tuseSetting( 'typography.lineHeight', name )[ 0 ] &&\n\t\tsupports.includes( 'lineHeight' )\n\t);\n}\n\nfunction useHasAppearanceControl( name ) {\n\tconst supports = getSupportedGlobalStylesPanels( name );\n\tconst hasFontStyles =\n\t\tuseSetting( 'typography.fontStyle', name )[ 0 ] &&\n\t\tsupports.includes( 'fontStyle' );\n\tconst hasFontWeights =\n\t\tuseSetting( 'typography.fontWeight', name )[ 0 ] &&\n\t\tsupports.includes( 'fontWeight' );\n\treturn hasFontStyles || hasFontWeights;\n}\n\nfunction useHasLetterSpacingControl( name ) {\n\tconst supports = getSupportedGlobalStylesPanels( name );\n\treturn (\n\t\tuseSetting( 'typography.letterSpacing', name )[ 0 ] &&\n\t\tsupports.includes( 'letterSpacing' )\n\t);\n}\n\nexport default function TypographyPanel( { name } ) {\n\tconst supports = getSupportedGlobalStylesPanels( name );\n\tconst [ fontSizes ] = useSetting( 'typography.fontSizes', name );\n\tconst disableCustomFontSizes = ! useSetting(\n\t\t'typography.customFontSize',\n\t\tname\n\t)[ 0 ];\n\tconst [ fontFamilies ] = useSetting( 'typography.fontFamilies', name );\n\tconst hasFontStyles =\n\t\tuseSetting( 'typography.fontStyle', name )[ 0 ] &&\n\t\tsupports.includes( 'fontStyle' );\n\tconst hasFontWeights =\n\t\tuseSetting( 'typography.fontWeight', name )[ 0 ] &&\n\t\tsupports.includes( 'fontWeight' );\n\tconst hasLineHeightEnabled = useHasLineHeightControl( name );\n\tconst hasAppearanceControl = useHasAppearanceControl( name );\n\tconst hasLetterSpacingControl = useHasLetterSpacingControl( name );\n\n\tconst [ fontFamily, setFontFamily ] = useStyle(\n\t\t'typography.fontFamily',\n\t\tname\n\t);\n\tconst [ fontSize, setFontSize ] = useStyle( 'typography.fontSize', name );\n\n\tconst [ fontStyle, setFontStyle ] = useStyle(\n\t\t'typography.fontStyle',\n\t\tname\n\t);\n\tconst [ fontWeight, setFontWeight ] = useStyle(\n\t\t'typography.fontWeight',\n\t\tname\n\t);\n\tconst [ lineHeight, setLineHeight ] = useStyle(\n\t\t'typography.lineHeight',\n\t\tname\n\t);\n\tconst [ letterSpacing, setLetterSpacing ] = useStyle(\n\t\t'typography.letterSpacing',\n\t\tname\n\t);\n\n\treturn (\n\t\t<PanelBody className=\"edit-site-typography-panel\" initialOpen={ true }>\n\t\t\t{ supports.includes( 'fontFamily' ) && (\n\t\t\t\t<FontFamilyControl\n\t\t\t\t\tfontFamilies={ fontFamilies }\n\t\t\t\t\tvalue={ fontFamily }\n\t\t\t\t\tonChange={ setFontFamily }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ supports.includes( 'fontSize' ) && (\n\t\t\t\t<FontSizePicker\n\t\t\t\t\tvalue={ fontSize }\n\t\t\t\t\tonChange={ setFontSize }\n\t\t\t\t\tfontSizes={ fontSizes }\n\t\t\t\t\tdisableCustomFontSizes={ disableCustomFontSizes }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasLineHeightEnabled && (\n\t\t\t\t<LineHeightControl\n\t\t\t\t\tvalue={ lineHeight }\n\t\t\t\t\tonChange={ setLineHeight }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasAppearanceControl && (\n\t\t\t\t<FontAppearanceControl\n\t\t\t\t\tvalue={ {\n\t\t\t\t\t\tfontStyle,\n\t\t\t\t\t\tfontWeight,\n\t\t\t\t\t} }\n\t\t\t\t\tonChange={ ( {\n\t\t\t\t\t\tfontStyle: newFontStyle,\n\t\t\t\t\t\tfontWeight: newFontWeight,\n\t\t\t\t\t} ) => {\n\t\t\t\t\t\tsetFontStyle( newFontStyle );\n\t\t\t\t\t\tsetFontWeight( newFontWeight );\n\t\t\t\t\t} }\n\t\t\t\t\thasFontStyles={ hasFontStyles }\n\t\t\t\t\thasFontWeights={ hasFontWeights }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasLetterSpacingControl && (\n\t\t\t\t<LetterSpacingControl\n\t\t\t\t\tvalue={ letterSpacing }\n\t\t\t\t\tonChange={ setLetterSpacing }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</PanelBody>\n\t);\n}\n"]}
@@ -40,9 +40,10 @@ var _screenLayout = _interopRequireDefault(require("./screen-layout"));
40
40
  /**
41
41
  * Internal dependencies
42
42
  */
43
- function ContextScreens({
44
- name
45
- }) {
43
+ function ContextScreens(_ref) {
44
+ let {
45
+ name
46
+ } = _ref;
46
47
  const parentMenu = name === undefined ? '' : '/blocks/' + name;
47
48
  return (0, _element.createElement)(_element.Fragment, null, (0, _element.createElement)(_components.__experimentalNavigatorScreen, {
48
49
  path: parentMenu + '/typography'
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/ui.js"],"names":["ContextScreens","name","parentMenu","undefined","GlobalStylesUI","blocks","map","block"],"mappings":";;;;;;;;;;;AAGA;;AAIA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AArBA;AACA;AACA;;AAOA;AACA;AACA;AAYA,SAASA,cAAT,CAAyB;AAAEC,EAAAA;AAAF,CAAzB,EAAoC;AACnC,QAAMC,UAAU,GAAGD,IAAI,KAAKE,SAAT,GAAqB,EAArB,GAA0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,GAAP,CAAcC,KAAF,IACb,4BAAC,yCAAD;AACC,IAAA,GAAG,EAAG,gBAAgBA,KAAK,CAACN,IAD7B;AAEC,IAAA,IAAI,EAAG,aAAaM,KAAK,CAACN;AAF3B,KAIC,4BAAC,oBAAD;AAAa,IAAA,IAAI,EAAGM,KAAK,CAACN;AAA1B,IAJD,CADC,CATH,EAkBC,4BAAC,cAAD,OAlBD,EAoBGI,MAAM,CAACC,GAAP,CAAcC,KAAF,IACb,4BAAC,cAAD;AACC,IAAA,GAAG,EAAG,mBAAmBA,KAAK,CAACN,IADhC;AAEC,IAAA,IAAI,EAAGM,KAAK,CAACN;AAFd,IADC,CApBH,CADD;AA6BA;;eAEcG,c","sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalNavigatorProvider as NavigatorProvider,\n\t__experimentalNavigatorScreen as NavigatorScreen,\n} from '@wordpress/components';\nimport { getBlockTypes } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport ScreenRoot from './screen-root';\nimport ScreenBlockList from './screen-block-list';\nimport ScreenBlock from './screen-block';\nimport ScreenTypography from './screen-typography';\nimport ScreenColors from './screen-colors';\nimport ScreenColorPalette from './screen-color-palette';\nimport ScreenBackgroundColor from './screen-background-color';\nimport ScreenTextColor from './screen-text-color';\nimport ScreenLinkColor from './screen-link-color';\nimport ScreenLayout from './screen-layout';\n\nfunction ContextScreens( { name } ) {\n\tconst parentMenu = name === undefined ? '' : '/blocks/' + name;\n\n\treturn (\n\t\t<>\n\t\t\t<NavigatorScreen path={ parentMenu + '/typography' }>\n\t\t\t\t<ScreenTypography name={ name } />\n\t\t\t</NavigatorScreen>\n\n\t\t\t<NavigatorScreen path={ parentMenu + '/colors' }>\n\t\t\t\t<ScreenColors name={ name } />\n\t\t\t</NavigatorScreen>\n\n\t\t\t<NavigatorScreen path={ parentMenu + '/colors/palette' }>\n\t\t\t\t<ScreenColorPalette name={ name } />\n\t\t\t</NavigatorScreen>\n\n\t\t\t<NavigatorScreen path={ parentMenu + '/colors/background' }>\n\t\t\t\t<ScreenBackgroundColor name={ name } />\n\t\t\t</NavigatorScreen>\n\n\t\t\t<NavigatorScreen path={ parentMenu + '/colors/text' }>\n\t\t\t\t<ScreenTextColor name={ name } />\n\t\t\t</NavigatorScreen>\n\n\t\t\t<NavigatorScreen path={ parentMenu + '/colors/link' }>\n\t\t\t\t<ScreenLinkColor name={ name } />\n\t\t\t</NavigatorScreen>\n\n\t\t\t<NavigatorScreen path={ parentMenu + '/layout' }>\n\t\t\t\t<ScreenLayout name={ name } />\n\t\t\t</NavigatorScreen>\n\t\t</>\n\t);\n}\n\nfunction GlobalStylesUI() {\n\tconst blocks = getBlockTypes();\n\n\treturn (\n\t\t<NavigatorProvider initialPath=\"/\">\n\t\t\t<NavigatorScreen path=\"/\">\n\t\t\t\t<ScreenRoot />\n\t\t\t</NavigatorScreen>\n\n\t\t\t<NavigatorScreen path=\"/blocks\">\n\t\t\t\t<ScreenBlockList />\n\t\t\t</NavigatorScreen>\n\n\t\t\t{ blocks.map( ( block ) => (\n\t\t\t\t<NavigatorScreen\n\t\t\t\t\tkey={ 'menu-block-' + block.name }\n\t\t\t\t\tpath={ '/blocks/' + block.name }\n\t\t\t\t>\n\t\t\t\t\t<ScreenBlock name={ block.name } />\n\t\t\t\t</NavigatorScreen>\n\t\t\t) ) }\n\n\t\t\t<ContextScreens />\n\n\t\t\t{ blocks.map( ( block ) => (\n\t\t\t\t<ContextScreens\n\t\t\t\t\tkey={ 'screens-block-' + block.name }\n\t\t\t\t\tname={ block.name }\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t</NavigatorProvider>\n\t);\n}\n\nexport default GlobalStylesUI;\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/ui.js"],"names":["ContextScreens","name","parentMenu","undefined","GlobalStylesUI","blocks","map","block"],"mappings":";;;;;;;;;;;AAGA;;AAIA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA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,yCAAD;AAAiB,IAAA,IAAI,EAAC;AAAtB,KACC,4BAAC,mBAAD,OADD,CADD,EAKC,4BAAC,yCAAD;AAAiB,IAAA,IAAI,EAAC;AAAtB,KACC,4BAAC,wBAAD,OADD,CALD,EASGA,MAAM,CAACC,GAAP,CAAcC,KAAF,IACb,4BAAC,yCAAD;AACC,IAAA,GAAG,EAAG,gBAAgBA,KAAK,CAACN,IAD7B;AAEC,IAAA,IAAI,EAAG,aAAaM,KAAK,CAACN;AAF3B,KAIC,4BAAC,oBAAD;AAAa,IAAA,IAAI,EAAGM,KAAK,CAACN;AAA1B,IAJD,CADC,CATH,EAkBC,4BAAC,cAAD,OAlBD,EAoBGI,MAAM,CAACC,GAAP,CAAcC,KAAF,IACb,4BAAC,cAAD;AACC,IAAA,GAAG,EAAG,mBAAmBA,KAAK,CAACN,IADhC;AAEC,IAAA,IAAI,EAAGM,KAAK,CAACN;AAFd,IADC,CApBH,CADD;AA6BA;;eAEcG,c","sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalNavigatorProvider as NavigatorProvider,\n\t__experimentalNavigatorScreen as NavigatorScreen,\n} from '@wordpress/components';\nimport { getBlockTypes } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport ScreenRoot from './screen-root';\nimport ScreenBlockList from './screen-block-list';\nimport ScreenBlock from './screen-block';\nimport ScreenTypography from './screen-typography';\nimport ScreenColors from './screen-colors';\nimport ScreenColorPalette from './screen-color-palette';\nimport ScreenBackgroundColor from './screen-background-color';\nimport ScreenTextColor from './screen-text-color';\nimport ScreenLinkColor from './screen-link-color';\nimport ScreenLayout from './screen-layout';\n\nfunction ContextScreens( { name } ) {\n\tconst parentMenu = name === undefined ? '' : '/blocks/' + name;\n\n\treturn (\n\t\t<>\n\t\t\t<NavigatorScreen path={ parentMenu + '/typography' }>\n\t\t\t\t<ScreenTypography name={ name } />\n\t\t\t</NavigatorScreen>\n\n\t\t\t<NavigatorScreen path={ parentMenu + '/colors' }>\n\t\t\t\t<ScreenColors name={ name } />\n\t\t\t</NavigatorScreen>\n\n\t\t\t<NavigatorScreen path={ parentMenu + '/colors/palette' }>\n\t\t\t\t<ScreenColorPalette name={ name } />\n\t\t\t</NavigatorScreen>\n\n\t\t\t<NavigatorScreen path={ parentMenu + '/colors/background' }>\n\t\t\t\t<ScreenBackgroundColor name={ name } />\n\t\t\t</NavigatorScreen>\n\n\t\t\t<NavigatorScreen path={ parentMenu + '/colors/text' }>\n\t\t\t\t<ScreenTextColor name={ name } />\n\t\t\t</NavigatorScreen>\n\n\t\t\t<NavigatorScreen path={ parentMenu + '/colors/link' }>\n\t\t\t\t<ScreenLinkColor name={ name } />\n\t\t\t</NavigatorScreen>\n\n\t\t\t<NavigatorScreen path={ parentMenu + '/layout' }>\n\t\t\t\t<ScreenLayout name={ name } />\n\t\t\t</NavigatorScreen>\n\t\t</>\n\t);\n}\n\nfunction GlobalStylesUI() {\n\tconst blocks = getBlockTypes();\n\n\treturn (\n\t\t<NavigatorProvider initialPath=\"/\">\n\t\t\t<NavigatorScreen path=\"/\">\n\t\t\t\t<ScreenRoot />\n\t\t\t</NavigatorScreen>\n\n\t\t\t<NavigatorScreen path=\"/blocks\">\n\t\t\t\t<ScreenBlockList />\n\t\t\t</NavigatorScreen>\n\n\t\t\t{ blocks.map( ( block ) => (\n\t\t\t\t<NavigatorScreen\n\t\t\t\t\tkey={ 'menu-block-' + block.name }\n\t\t\t\t\tpath={ '/blocks/' + block.name }\n\t\t\t\t>\n\t\t\t\t\t<ScreenBlock name={ block.name } />\n\t\t\t\t</NavigatorScreen>\n\t\t\t) ) }\n\n\t\t\t<ContextScreens />\n\n\t\t\t{ blocks.map( ( block ) => (\n\t\t\t\t<ContextScreens\n\t\t\t\t\tkey={ 'screens-block-' + block.name }\n\t\t\t\t\tname={ block.name }\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t</NavigatorProvider>\n\t);\n}\n\nexport default GlobalStylesUI;\n"]}
@@ -3,8 +3,8 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
+ exports.toStyles = exports.toCustomProperties = exports.getNodesWithStyles = exports.getNodesWithSettings = void 0;
6
7
  exports.useGlobalStylesOutput = useGlobalStylesOutput;
7
- exports.toStyles = exports.toCustomProperties = exports.getNodesWithSettings = exports.getNodesWithStyles = void 0;
8
8
 
9
9
  var _lodash = require("lodash");
10
10
 
@@ -52,14 +52,16 @@ function compileStyleValue(uncompiledValue) {
52
52
  */
53
53
 
54
54
 
55
- function getPresetsDeclarations(blockPresets = {}) {
56
- return (0, _lodash.reduce)(_utils.PRESET_METADATA, (declarations, {
57
- path,
58
- valueKey,
59
- cssVarInfix
60
- }) => {
55
+ function getPresetsDeclarations() {
56
+ let blockPresets = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
57
+ return (0, _lodash.reduce)(_utils.PRESET_METADATA, (declarations, _ref) => {
58
+ let {
59
+ path,
60
+ valueKey,
61
+ cssVarInfix
62
+ } = _ref;
61
63
  const presetByOrigin = (0, _lodash.get)(blockPresets, path, []);
62
- ['core', 'theme', 'user'].forEach(origin => {
64
+ ['default', 'theme', 'user'].forEach(origin => {
63
65
  if (presetByOrigin[origin]) {
64
66
  presetByOrigin[origin].forEach(value => {
65
67
  declarations.push(`--wp--preset--${cssVarInfix}--${(0, _lodash.kebabCase)(value.slug)}: ${value[valueKey]}`);
@@ -78,26 +80,31 @@ function getPresetsDeclarations(blockPresets = {}) {
78
80
  */
79
81
 
80
82
 
81
- function getPresetsClasses(blockSelector, blockPresets = {}) {
82
- return (0, _lodash.reduce)(_utils.PRESET_METADATA, (declarations, {
83
- path,
84
- cssVarInfix,
85
- classes
86
- }) => {
83
+ function getPresetsClasses(blockSelector) {
84
+ let blockPresets = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
85
+ return (0, _lodash.reduce)(_utils.PRESET_METADATA, (declarations, _ref2) => {
86
+ let {
87
+ path,
88
+ cssVarInfix,
89
+ classes
90
+ } = _ref2;
91
+
87
92
  if (!classes) {
88
93
  return declarations;
89
94
  }
90
95
 
91
96
  const presetByOrigin = (0, _lodash.get)(blockPresets, path, []);
92
- ['core', 'theme', 'user'].forEach(origin => {
97
+ ['default', 'theme', 'user'].forEach(origin => {
93
98
  if (presetByOrigin[origin]) {
94
- presetByOrigin[origin].forEach(({
95
- slug
96
- }) => {
97
- classes.forEach(({
98
- classSuffix,
99
- propertyName
100
- }) => {
99
+ presetByOrigin[origin].forEach(_ref3 => {
100
+ let {
101
+ slug
102
+ } = _ref3;
103
+ classes.forEach(_ref4 => {
104
+ let {
105
+ classSuffix,
106
+ propertyName
107
+ } = _ref4;
101
108
  const classSelectorToUse = `.has-${(0, _lodash.kebabCase)(slug)}-${classSuffix}`;
102
109
  const selectorToUse = blockSelector.split(',') // Selector can be "h1, h2, h3"
103
110
  .map(selector => `${selector}${classSelectorToUse}`).join(',');
@@ -111,7 +118,10 @@ function getPresetsClasses(blockSelector, blockPresets = {}) {
111
118
  }, '');
112
119
  }
113
120
 
114
- function flattenTree(input = {}, prefix, token) {
121
+ function flattenTree() {
122
+ let input = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
123
+ let prefix = arguments.length > 1 ? arguments[1] : undefined;
124
+ let token = arguments.length > 2 ? arguments[2] : undefined;
115
125
  let result = [];
116
126
  Object.keys(input).forEach(key => {
117
127
  const newKey = prefix + (0, _lodash.kebabCase)(key.replace('/', '-'));
@@ -135,11 +145,13 @@ function flattenTree(input = {}, prefix, token) {
135
145
  */
136
146
 
137
147
 
138
- function getStylesDeclarations(blockStyles = {}) {
139
- return (0, _lodash.reduce)(_blocks.__EXPERIMENTAL_STYLE_PROPERTY, (declarations, {
140
- value,
141
- properties
142
- }, key) => {
148
+ function getStylesDeclarations() {
149
+ let blockStyles = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
150
+ return (0, _lodash.reduce)(_blocks.__EXPERIMENTAL_STYLE_PROPERTY, (declarations, _ref5, key) => {
151
+ let {
152
+ value,
153
+ properties
154
+ } = _ref5;
143
155
  const pathToValue = value;
144
156
 
145
157
  if ((0, _lodash.first)(pathToValue) === 'elements') {
@@ -238,9 +250,10 @@ const getNodesWithSettings = (tree, blockSelectors) => {
238
250
  const pickPresets = treeToPickFrom => {
239
251
  const presets = {};
240
252
 
241
- _utils.PRESET_METADATA.forEach(({
242
- path
243
- }) => {
253
+ _utils.PRESET_METADATA.forEach(_ref6 => {
254
+ let {
255
+ path
256
+ } = _ref6;
244
257
  const value = (0, _lodash.get)(treeToPickFrom, path, false);
245
258
 
246
259
  if (value !== false) {
@@ -284,11 +297,12 @@ exports.getNodesWithSettings = getNodesWithSettings;
284
297
  const toCustomProperties = (tree, blockSelectors) => {
285
298
  const settings = getNodesWithSettings(tree, blockSelectors);
286
299
  let ruleset = '';
287
- settings.forEach(({
288
- presets,
289
- custom,
290
- selector
291
- }) => {
300
+ settings.forEach(_ref7 => {
301
+ let {
302
+ presets,
303
+ custom,
304
+ selector
305
+ } = _ref7;
292
306
  const declarations = getPresetsDeclarations(presets);
293
307
  const customProps = flattenTree(custom, '--wp--custom--', '--');
294
308
 
@@ -309,10 +323,11 @@ const toStyles = (tree, blockSelectors) => {
309
323
  const nodesWithStyles = getNodesWithStyles(tree, blockSelectors);
310
324
  const nodesWithSettings = getNodesWithSettings(tree, blockSelectors);
311
325
  let ruleset = '.wp-site-blocks > * { margin-top: 0; margin-bottom: 0; }.wp-site-blocks > * + * { margin-top: var( --wp--style--block-gap ); }';
312
- nodesWithStyles.forEach(({
313
- selector,
314
- styles
315
- }) => {
326
+ nodesWithStyles.forEach(_ref8 => {
327
+ let {
328
+ selector,
329
+ styles
330
+ } = _ref8;
316
331
  const declarations = getStylesDeclarations(styles);
317
332
 
318
333
  if (declarations.length === 0) {
@@ -321,10 +336,12 @@ const toStyles = (tree, blockSelectors) => {
321
336
 
322
337
  ruleset = ruleset + `${selector}{${declarations.join(';')};}`;
323
338
  });
324
- nodesWithSettings.forEach(({
325
- selector,
326
- presets
327
- }) => {
339
+ nodesWithSettings.forEach(_ref9 => {
340
+ let {
341
+ selector,
342
+ presets
343
+ } = _ref9;
344
+
328
345
  if (_utils.ROOT_BLOCK_SELECTOR === selector) {
329
346
  // Do not add extra specificity for top-level classes.
330
347
  selector = '';